]> code.delx.au - gnu-emacs/commitdiff
Merge from emacs-24; up to 2014-07-27T09:41:59Z!ttn@gnu.org
authorGlenn Morris <rgm@gnu.org>
Wed, 15 Oct 2014 02:42:58 +0000 (19:42 -0700)
committerGlenn Morris <rgm@gnu.org>
Wed, 15 Oct 2014 02:42:58 +0000 (19:42 -0700)
793 files changed:
ChangeLog
GNUmakefile
INSTALL
INSTALL.REPO
Makefile.in
README
admin/CPP-DEFINES
admin/ChangeLog
admin/FOR-RELEASE
admin/MAINTAINERS
admin/authors.el [moved from lisp/emacs-lisp/authors.el with 98% similarity]
admin/grammars/Makefile.in
admin/merge-gnulib
admin/merge-pkg-config [new file with mode: 0755]
admin/notes/bzr
admin/notes/changelogs
admin/notes/copyright
admin/notes/exit-value
admin/notes/unicode
admin/quick-install-emacs
admin/unidata/Makefile.in
admin/unidata/unidata-gen.el
admin/unidata/uvs.el
admin/update_autogen
admin/versioning [new file with mode: 0644]
autogen.sh
config.bat
configure.ac
doc/emacs/ChangeLog
doc/emacs/Makefile.in
doc/emacs/ack.texi
doc/emacs/cal-xtra.texi
doc/emacs/custom.texi
doc/emacs/emacs-xtra.texi
doc/emacs/emacs.texi
doc/emacs/emacsver.texi
doc/emacs/frames.texi
doc/emacs/help.texi
doc/emacs/macos.texi
doc/emacs/makefile.w32-in
doc/emacs/misc.texi
doc/emacs/msdos-xtra.texi [moved from doc/emacs/msdog-xtra.texi with 99% similarity]
doc/emacs/msdos.texi [moved from doc/emacs/msdog.texi with 99% similarity]
doc/emacs/programs.texi
doc/emacs/regs.texi
doc/lispintro/ChangeLog
doc/lispintro/Makefile.in
doc/lispintro/emacs-lisp-intro.texi
doc/lispref/ChangeLog
doc/lispref/Makefile.in
doc/lispref/commands.texi
doc/lispref/control.texi
doc/lispref/display.texi
doc/lispref/elisp.texi
doc/lispref/errors.texi
doc/lispref/eval.texi
doc/lispref/files.texi
doc/lispref/frames.texi
doc/lispref/functions.texi
doc/lispref/internals.texi
doc/lispref/keymaps.texi
doc/lispref/lists.texi
doc/lispref/minibuf.texi
doc/lispref/os.texi
doc/lispref/positions.texi
doc/lispref/processes.texi
doc/lispref/sequences.texi
doc/lispref/streams.texi
doc/lispref/strings.texi
doc/lispref/text.texi
doc/lispref/windows.texi
doc/man/ChangeLog
doc/man/emacs.1
doc/misc/ChangeLog
doc/misc/Makefile.in
doc/misc/ada-mode.texi
doc/misc/auth.texi
doc/misc/autotype.texi
doc/misc/bovine.texi
doc/misc/calc.texi
doc/misc/cc-mode.texi
doc/misc/cl.texi
doc/misc/dbus.texi
doc/misc/dired-x.texi
doc/misc/ebrowse.texi
doc/misc/ede.texi
doc/misc/ediff.texi
doc/misc/edt.texi
doc/misc/efaq-w32.texi
doc/misc/efaq.texi
doc/misc/eieio.texi
doc/misc/emacs-gnutls.texi
doc/misc/emacs-mime.texi
doc/misc/epa.texi
doc/misc/erc.texi
doc/misc/ert.texi
doc/misc/eshell.texi
doc/misc/eudc.texi
doc/misc/eww.texi
doc/misc/flymake.texi
doc/misc/forms.texi
doc/misc/gnus-coding.texi
doc/misc/gnus-faq.texi
doc/misc/gnus.texi
doc/misc/htmlfontify.texi
doc/misc/idlwave.texi
doc/misc/ido.texi
doc/misc/mairix-el.texi
doc/misc/message.texi
doc/misc/mh-e.texi
doc/misc/newsticker.texi
doc/misc/nxml-mode.texi
doc/misc/octave-mode.texi
doc/misc/org.texi
doc/misc/pcl-cvs.texi
doc/misc/pgg.texi
doc/misc/rcirc.texi
doc/misc/reftex.texi
doc/misc/remember.texi
doc/misc/sasl.texi
doc/misc/sc.texi
doc/misc/semantic.texi
doc/misc/ses.texi
doc/misc/sieve.texi
doc/misc/smtpmail.texi
doc/misc/speedbar.texi
doc/misc/srecode.texi
doc/misc/texinfo.tex
doc/misc/todo-mode.texi
doc/misc/tramp.texi
doc/misc/trampver.texi
doc/misc/url.texi
doc/misc/vhdl-mode.texi [new file with mode: 0644]
doc/misc/vip.texi
doc/misc/viper.texi
doc/misc/widget.texi
doc/misc/wisent.texi
doc/misc/woman.texi
etc/AUTHORS
etc/CENSORSHIP
etc/ChangeLog
etc/GNU
etc/LINUX-GNU
etc/MACHINES
etc/MH-E-NEWS
etc/NEWS
etc/NEWS.19
etc/NEWS.24 [new file with mode: 0644]
etc/PROBLEMS
etc/THE-GNU-PROJECT
etc/TODO
etc/WHY-FREE
etc/compilation.txt
etc/emacs-buffer.gdb
etc/refcards/emacsver.tex
etc/refcards/ru-refcard.tex
etc/themes/tsdh-light-theme.el
leim/ChangeLog
leim/Makefile.in
lib-src/ChangeLog
lib-src/Makefile.in
lib-src/ctags.c [new file with mode: 0644]
lib-src/emacsclient.c
lib-src/etags.c
lib-src/hexl.c
lib-src/make-docfile.c
lib-src/movemail.c
lib-src/ntlib.h
lib-src/test-distrib.c [deleted file]
lib-src/testfile [deleted file]
lib-src/update-game-score.c
lib/Makefile.am
lib/acl-internal.h
lib/acl.h
lib/fcntl.in.h
lib/getdtablesize.c
lib/gnulib.mk
lib/mktime.c
lib/openat-proc.c
lib/stdarg.in.h [deleted file]
lib/stdbool.in.h [deleted file]
lib/stdlib.in.h
lib/sys_select.in.h
lib/vla.h [new file with mode: 0644]
lisp/ChangeLog
lisp/ChangeLog.10
lisp/ChangeLog.11
lisp/ChangeLog.12
lisp/ChangeLog.14
lisp/ChangeLog.15
lisp/ChangeLog.16
lisp/ChangeLog.3
lisp/ChangeLog.7
lisp/ChangeLog.8
lisp/ChangeLog.9
lisp/Makefile.in
lisp/apropos.el
lisp/arc-mode.el
lisp/bookmark.el
lisp/bs.el
lisp/calc/calc-alg.el
lisp/calc/calc-forms.el
lisp/calc/calc-help.el
lisp/calc/calc-prog.el
lisp/calc/calc-yank.el
lisp/calculator.el
lisp/calendar/cal-bahai.el
lisp/calendar/cal-china.el
lisp/calendar/cal-coptic.el
lisp/calendar/cal-french.el
lisp/calendar/cal-hebrew.el
lisp/calendar/cal-islam.el
lisp/calendar/cal-iso.el
lisp/calendar/cal-julian.el
lisp/calendar/cal-mayan.el
lisp/calendar/cal-menu.el
lisp/calendar/cal-move.el
lisp/calendar/cal-persia.el
lisp/calendar/cal-x.el
lisp/calendar/calendar.el
lisp/calendar/diary-lib.el
lisp/calendar/holidays.el
lisp/calendar/icalendar.el
lisp/calendar/lunar.el
lisp/calendar/parse-time.el
lisp/calendar/time-date.el
lisp/cedet/ChangeLog
lisp/cedet/ede.el
lisp/cedet/ede/dired.el
lisp/cedet/semantic/ia.el
lisp/comint.el
lisp/composite.el
lisp/cus-start.el
lisp/dired-aux.el
lisp/dired-x.el
lisp/dired.el
lisp/doc-view.el
lisp/electric.el
lisp/emacs-lisp/autoload.el
lisp/emacs-lisp/byte-opt.el
lisp/emacs-lisp/byte-run.el
lisp/emacs-lisp/bytecomp.el
lisp/emacs-lisp/cconv.el
lisp/emacs-lisp/cl-extra.el
lisp/emacs-lisp/cl-indent.el
lisp/emacs-lisp/cl-lib.el
lisp/emacs-lisp/cl-macs.el
lisp/emacs-lisp/cl-seq.el
lisp/emacs-lisp/easy-mmode.el
lisp/emacs-lisp/edebug.el
lisp/emacs-lisp/eldoc.el
lisp/emacs-lisp/ert.el
lisp/emacs-lisp/find-func.el
lisp/emacs-lisp/gv.el
lisp/emacs-lisp/lisp-mode.el
lisp/emacs-lisp/lisp.el
lisp/emacs-lisp/macroexp.el
lisp/emacs-lisp/nadvice.el
lisp/emacs-lisp/package.el
lisp/emacs-lisp/pcase.el
lisp/emacs-lisp/regexp-opt.el
lisp/emacs-lisp/smie.el
lisp/emacs-lisp/subr-x.el
lisp/emacs-lisp/tabulated-list.el
lisp/emulation/cua-base.el
lisp/emulation/edt.el
lisp/epa-mail.el
lisp/epa.el
lisp/epg-config.el
lisp/epg.el
lisp/erc/ChangeLog
lisp/erc/erc-backend.el
lisp/erc/erc-ring.el
lisp/erc/erc-stamp.el
lisp/erc/erc-track.el
lisp/erc/erc.el
lisp/eshell/em-smart.el
lisp/eshell/esh-io.el
lisp/eshell/esh-util.el
lisp/eshell/eshell.el
lisp/faces.el
lisp/ffap.el
lisp/files.el
lisp/find-cmd.el
lisp/font-lock.el
lisp/frame.el
lisp/frameset.el
lisp/gnus/ChangeLog
lisp/gnus/ChangeLog.2
lisp/gnus/auth-source.el
lisp/gnus/gmm-utils.el
lisp/gnus/gnus-art.el
lisp/gnus/gnus-cache.el
lisp/gnus/gnus-cite.el
lisp/gnus/gnus-cloud.el [new file with mode: 0644]
lisp/gnus/gnus-delay.el
lisp/gnus/gnus-fun.el
lisp/gnus/gnus-group.el
lisp/gnus/gnus-html.el
lisp/gnus/gnus-icalendar.el
lisp/gnus/gnus-mlspl.el
lisp/gnus/gnus-msg.el
lisp/gnus/gnus-notifications.el
lisp/gnus/gnus-picon.el
lisp/gnus/gnus-setup.el [deleted file]
lisp/gnus/gnus-spec.el
lisp/gnus/gnus-srvr.el
lisp/gnus/gnus-start.el
lisp/gnus/gnus-sum.el
lisp/gnus/gnus-util.el
lisp/gnus/gnus.el
lisp/gnus/gravatar.el
lisp/gnus/mail-source.el
lisp/gnus/mailcap.el
lisp/gnus/message.el
lisp/gnus/mm-bodies.el
lisp/gnus/mm-decode.el
lisp/gnus/mm-extern.el
lisp/gnus/mm-url.el
lisp/gnus/mm-util.el
lisp/gnus/mm-uu.el
lisp/gnus/mm-view.el
lisp/gnus/mml-smime.el
lisp/gnus/mml.el
lisp/gnus/mml1991.el
lisp/gnus/mml2015.el
lisp/gnus/nndraft.el
lisp/gnus/nnfolder.el
lisp/gnus/nnheader.el
lisp/gnus/nnimap.el
lisp/gnus/nnir.el
lisp/gnus/nnmail.el
lisp/gnus/nnmaildir.el
lisp/gnus/nnrss.el
lisp/gnus/nntp.el
lisp/gnus/nnweb.el
lisp/gnus/rfc1843.el
lisp/gnus/sieve-manage.el
lisp/gnus/smime.el
lisp/gnus/spam.el
lisp/help-fns.el
lisp/help.el
lisp/hi-lock.el
lisp/hippie-exp.el
lisp/htmlfontify.el
lisp/ibuf-ext.el
lisp/ibuf-macs.el
lisp/ibuffer.el
lisp/icomplete.el
lisp/ielm.el
lisp/image-mode.el
lisp/imenu.el
lisp/info.el
lisp/international/characters.el
lisp/international/mule-cmds.el
lisp/international/mule-util.el
lisp/jit-lock.el
lisp/ldefs-boot.el
lisp/leim/quail/latin-post.el
lisp/leim/quail/sisheng.el
lisp/linum.el
lisp/loadup.el
lisp/ls-lisp.el
lisp/mail/emacsbug.el
lisp/mail/hashcash.el
lisp/mail/rmail.el
lisp/mail/rmailmm.el
lisp/mail/rmailsum.el
lisp/mail/smtpmail.el
lisp/man.el
lisp/menu-bar.el
lisp/mh-e/ChangeLog
lisp/mh-e/mh-acros.el
lisp/mh-e/mh-e.el
lisp/minibuffer.el
lisp/mouse-copy.el
lisp/mouse.el
lisp/mpc.el
lisp/msb.el
lisp/net/browse-url.el
lisp/net/dbus.el
lisp/net/dns.el
lisp/net/eww.el
lisp/net/gnutls.el
lisp/net/newst-backend.el
lisp/net/newst-plainview.el
lisp/net/newst-reader.el
lisp/net/newst-ticker.el
lisp/net/newst-treeview.el
lisp/net/newsticker.el
lisp/net/ntlm.el
lisp/net/rcirc.el
lisp/net/shr.el
lisp/net/tramp-adb.el
lisp/net/tramp-cache.el
lisp/net/tramp-ftp.el
lisp/net/tramp-gvfs.el
lisp/net/tramp-sh.el
lisp/net/tramp-smb.el
lisp/net/tramp.el
lisp/net/trampver.el
lisp/newcomment.el
lisp/nxml/nxml-mode.el
lisp/obsolete/cl-compat.el
lisp/obsolete/crisp.el [moved from lisp/emulation/crisp.el with 99% similarity]
lisp/obsolete/gulp.el [moved from lisp/emacs-lisp/gulp.el with 99% similarity]
lisp/obsolete/iswitchb.el
lisp/obsolete/lucid.el
lisp/obsolete/mailpost.el
lisp/obsolete/mouse-sel.el
lisp/obsolete/pc-select.el
lisp/obsolete/pgg-pgp.el
lisp/obsolete/pgg-pgp5.el
lisp/obsolete/tpu-edt.el [moved from lisp/emulation/tpu-edt.el with 99% similarity]
lisp/obsolete/tpu-extras.el [moved from lisp/emulation/tpu-extras.el with 99% similarity]
lisp/obsolete/tpu-mapper.el [moved from lisp/emulation/tpu-mapper.el with 99% similarity]
lisp/obsolete/vi.el [moved from lisp/emulation/vi.el with 99% similarity]
lisp/obsolete/vip.el [moved from lisp/emulation/vip.el with 99% similarity]
lisp/obsolete/ws-mode.el [moved from lisp/emulation/ws-mode.el with 99% similarity]
lisp/org/ChangeLog
lisp/org/ob-core.el
lisp/org/org-clock.el
lisp/org/org-compat.el
lisp/org/org-mouse.el
lisp/org/org-src.el
lisp/org/org-table.el
lisp/org/org.el
lisp/org/ox-html.el
lisp/org/ox-odt.el
lisp/org/ox-org.el
lisp/play/bubbles.el
lisp/play/dunnet.el
lisp/play/gametree.el
lisp/play/landmark.el
lisp/printing.el
lisp/progmodes/ada-mode.el
lisp/progmodes/ada-xref.el
lisp/progmodes/cap-words.el [deleted file]
lisp/progmodes/cc-awk.el
lisp/progmodes/cc-cmds.el
lisp/progmodes/cc-defs.el
lisp/progmodes/cc-engine.el
lisp/progmodes/cc-fonts.el
lisp/progmodes/cc-guess.el
lisp/progmodes/cc-langs.el
lisp/progmodes/cc-menus.el
lisp/progmodes/cc-mode.el
lisp/progmodes/cc-vars.el
lisp/progmodes/cfengine.el
lisp/progmodes/compile.el
lisp/progmodes/cperl-mode.el
lisp/progmodes/cwarn.el
lisp/progmodes/elisp-mode.el [new file with mode: 0644]
lisp/progmodes/f90.el
lisp/progmodes/grep.el
lisp/progmodes/gud.el
lisp/progmodes/hideif.el
lisp/progmodes/hideshow.el
lisp/progmodes/idlw-help.el
lisp/progmodes/idlw-shell.el
lisp/progmodes/inf-lisp.el
lisp/progmodes/js.el
lisp/progmodes/perl-mode.el
lisp/progmodes/prog-mode.el
lisp/progmodes/prolog.el
lisp/progmodes/ps-mode.el
lisp/progmodes/python.el
lisp/progmodes/scheme.el
lisp/progmodes/sh-script.el
lisp/progmodes/sql.el
lisp/progmodes/subword.el
lisp/progmodes/vera-mode.el
lisp/progmodes/verilog-mode.el
lisp/progmodes/vhdl-mode.el
lisp/progmodes/which-func.el
lisp/progmodes/xscheme.el
lisp/ps-print.el
lisp/ps-samp.el
lisp/rect.el
lisp/register.el
lisp/replace.el
lisp/reveal.el
lisp/ruler-mode.el
lisp/savehist.el
lisp/scroll-all.el
lisp/scroll-bar.el
lisp/select.el
lisp/server.el
lisp/ses.el
lisp/shell.el
lisp/simple.el
lisp/skeleton.el
lisp/speedbar.el
lisp/startup.el
lisp/subr.el
lisp/tempo.el
lisp/term.el
lisp/term/AT386.el
lisp/term/README
lisp/term/apollo.el [deleted file]
lisp/term/common-win.el
lisp/term/news.el
lisp/term/ns-win.el
lisp/term/pc-win.el
lisp/term/screen.el
lisp/term/tvi970.el
lisp/term/vt100.el
lisp/term/vt102.el [deleted file]
lisp/term/vt125.el [deleted file]
lisp/term/vt201.el [deleted file]
lisp/term/vt220.el [deleted file]
lisp/term/vt240.el [deleted file]
lisp/term/vt300.el [deleted file]
lisp/term/vt320.el [deleted file]
lisp/term/vt400.el [deleted file]
lisp/term/vt420.el [deleted file]
lisp/term/w32-win.el
lisp/term/wyse50.el
lisp/term/x-win.el
lisp/term/xterm.el
lisp/textmodes/bibtex.el
lisp/textmodes/conf-mode.el
lisp/textmodes/ispell.el
lisp/textmodes/reftex-auc.el
lisp/textmodes/reftex-cite.el
lisp/textmodes/reftex-dcr.el
lisp/textmodes/reftex-global.el
lisp/textmodes/reftex-index.el
lisp/textmodes/reftex-parse.el
lisp/textmodes/reftex-ref.el
lisp/textmodes/reftex-sel.el
lisp/textmodes/reftex-toc.el
lisp/textmodes/reftex.el
lisp/textmodes/remember.el
lisp/textmodes/rst.el
lisp/textmodes/sgml-mode.el
lisp/textmodes/tex-mode.el
lisp/textmodes/texnfo-upd.el
lisp/textmodes/tildify.el
lisp/tooltip.el
lisp/url/ChangeLog
lisp/url/url-cookie.el
lisp/url/url-dav.el
lisp/url/url-gw.el
lisp/url/url-handlers.el
lisp/url/url-http.el
lisp/url/url-news.el
lisp/url/url-tramp.el [new file with mode: 0644]
lisp/url/url-util.el
lisp/url/url-vars.el
lisp/url/url.el
lisp/vc/add-log.el
lisp/vc/diff-mode.el
lisp/vc/ediff-init.el
lisp/vc/ediff-util.el
lisp/vc/emerge.el
lisp/vc/smerge-mode.el
lisp/vc/vc-annotate.el
lisp/vc/vc-bzr.el
lisp/vc/vc-git.el
lisp/vc/vc-hg.el
lisp/vc/vc-hooks.el
lisp/vc/vc.el
lisp/w32-common-fns.el [deleted file]
lisp/w32-fns.el
lisp/whitespace.el
lisp/wid-edit.el
lisp/window.el
lisp/winner.el
lisp/woman.el
lisp/xt-mouse.el
lwlib/ChangeLog
lwlib/Makefile.in
lwlib/autodeps.mk [new file with mode: 0644]
lwlib/deps.mk [new file with mode: 0644]
lwlib/lwlib-Xm.c
lwlib/lwlib-int.h
lwlib/lwlib-widget.h [new file with mode: 0644]
lwlib/lwlib.c
lwlib/lwlib.h
lwlib/xlwmenu.c
m4/extern-inline.m4
m4/gnulib-common.m4
m4/gnulib-comp.m4
m4/manywarnings.m4
m4/pkg.m4 [new file with mode: 0644]
m4/pthread_sigmask.m4
m4/stdarg.m4 [deleted file]
m4/stdbool.m4 [deleted file]
m4/stdlib_h.m4
m4/timer_time.m4
m4/vararrays.m4 [new file with mode: 0644]
make-dist
msdos/ChangeLog
msdos/INSTALL
msdos/README
msdos/is_exec.c [deleted file]
msdos/sed2v2.inp
msdos/sigaction.c [deleted file]
nextstep/ChangeLog
nextstep/Makefile.in
nextstep/README
nt/ChangeLog
nt/INSTALL
nt/Makefile.in
nt/addsection.c [deleted file]
nt/config.nt
nt/emacs.rc
nt/emacsclient.rc
nt/gnulib.mk
nt/inc/ms-w32.h
nt/inc/sys/mman.h [new file with mode: 0644]
nt/makefile.w32-in
oldXMenu/ChangeLog
oldXMenu/Makefile.in
oldXMenu/XMenuInt.h
oldXMenu/autodeps.mk [new file with mode: 0644]
oldXMenu/deps.mk [new file with mode: 0644]
src/.gdbinit
src/ChangeLog
src/ChangeLog.8
src/Makefile.in
src/alloc.c
src/atimer.c
src/atimer.h
src/buffer.c
src/buffer.h
src/bytecode.c
src/callint.c
src/callproc.c
src/category.c
src/ccl.c
src/character.c
src/character.h
src/charset.c
src/charset.h
src/chartab.c
src/cmds.c
src/coding.c
src/coding.h
src/commands.h
src/composite.c
src/conf_post.h
src/data.c
src/dbusbind.c
src/decompress.c
src/deps.mk
src/dired.c
src/dispextern.h
src/dispnew.c
src/doc.c
src/dosfns.c
src/dosfns.h
src/editfns.c
src/emacs.c
src/eval.c
src/fileio.c
src/filelock.c
src/fns.c
src/font.c
src/font.h
src/fontset.c
src/frame.c
src/frame.h
src/fringe.c
src/ftfont.c
src/ftfont.h
src/ftxfont.c
src/gmalloc.c
src/gnutls.c
src/gtkutil.c
src/gtkutil.h
src/image.c
src/indent.c
src/insdel.c
src/intervals.h
src/keyboard.c
src/keyboard.h
src/keymap.c
src/keymap.h
src/lastfile.c
src/lisp.h
src/lisp.mk
src/lread.c
src/macfont.h
src/macfont.m
src/macros.c
src/marker.c
src/menu.c
src/menu.h
src/minibuf.c
src/msdos.c
src/nsfns.m
src/nsfont.m
src/nsgui.h
src/nsimage.m
src/nsmenu.m
src/nsselect.m
src/nsterm.h
src/nsterm.m
src/print.c
src/process.c
src/process.h
src/profiler.c
src/puresize.h
src/ralloc.c
src/regex.c
src/regex.h
src/scroll.c
src/search.c
src/sheap.c
src/sound.c
src/syntax.c
src/sysdep.c
src/sysselect.h
src/syssignal.h
src/systime.h
src/systty.h
src/term.c
src/termcap.c
src/termhooks.h
src/terminal.c
src/textprop.c
src/unexcoff.c
src/unexcw.c
src/unexhp9k800.c
src/unexmacosx.c
src/unexw32.c
src/vm-limit.c
src/w32.c
src/w32.h
src/w32console.c
src/w32fns.c
src/w32font.c
src/w32font.h
src/w32gui.h
src/w32heap.c
src/w32heap.h
src/w32inevt.c
src/w32inevt.h
src/w32menu.c
src/w32notify.c
src/w32proc.c
src/w32term.c
src/w32term.h
src/w32uniscribe.c
src/widget.c
src/widgetprv.h
src/window.c
src/window.h
src/xdisp.c
src/xfaces.c
src/xfns.c
src/xfont.c
src/xftfont.c
src/xgselect.c
src/xmenu.c
src/xrdb.c
src/xselect.c
src/xsmfns.c
src/xterm.c
src/xterm.h
test/ChangeLog
test/automated/Makefile.in
test/automated/advice-tests.el
test/automated/bytecomp-tests.el
test/automated/cl-lib.el
test/automated/compile-tests.el
test/automated/core-elisp-tests.el
test/automated/dbus-tests.el
test/automated/eieio-tests.el
test/automated/ert-tests.el
test/automated/flymake-tests.el
test/automated/fns-tests.el [new file with mode: 0644]
test/automated/icalendar-tests.el
test/automated/newsticker-tests.el
test/automated/package-test.el
test/automated/package-x-test.el [deleted file]
test/automated/pcase-tests.el [new file with mode: 0644]
test/automated/print-tests.el [new file with mode: 0644]
test/automated/ruby-mode-tests.el
test/automated/subr-x-tests.el [new file with mode: 0644]
test/automated/subword-tests.el
test/automated/syntax-tests.el [new file with mode: 0644]
test/automated/tildify-tests.el [new file with mode: 0644]
test/automated/timer-tests.el
test/automated/tramp-tests.el
test/automated/undo-tests.el
test/indent/octave.m
test/indent/perl.perl
test/indent/ps-mode.ps [new file with mode: 0644]
test/indent/ruby.rb
test/indent/scheme.scm [changed mode: 0755->0644]

index 3567ce607dfddb6a6db0e130125e5b4003312f86..67790a3195363cf1545f0a8aab044d655df7fabf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
-2014-10-11  Ken Brown  <kbrown@cornell.edu>
+2014-10-14  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * configure.ac: apple-darwin powerpc is unported.
+       Require OSX >= 10.6 even if --with-ns is not given.
+
+2014-10-12  Ken Brown  <kbrown@cornell.edu>
 
        * configure.ac (LD_SWITCH_SYSTEM_TEMACS) [CYGWIN]: Set stack size
        to 8 MB.  (Bug#18438)
 
-2014-10-02  Paul Eggert  <eggert@cs.ucla.edu>
+2014-10-12  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * configure.ac: Require OSX 10.6.  Remove NSInteger test,
+       use nsfont for Gnustep, macfont for OSX.
+
+2014-10-12  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Fix putenv race conditions that can crash Emacs (Bug#8705).
+       * configure.ac (LOCALTIME_CACHE): Remove.
+       We needn't worry about SunOS 4 any more; Sun dropped support in 2003.
+       All uses of LOCALTIME_CACHE removed.  This simplifies the fix.
+       (tzalloc): Add check for this function.
+
+2014-10-06  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * configure.ac: Add -Wno-string-plus-int for clang.
+
+2014-10-04  Glenn Morris  <rgm@gnu.org>
+
+       * configure.ac: Silence warning with some old Xrandr.h.  (Bug#18465)
+
+2014-10-03  Paul Eggert  <eggert@cs.ucla.edu>
 
        * configure.ac: Port to strict POSIX shells on non-MinGW (Bug#18612).
 
-2014-09-21  Jan Djärv  <jan.h.d@swipnet.se>
+2014-09-29  Eli Zaretskii  <eliz@gnu.org>
+
+       * README: Bump version to 25.0.50.
+
+       * configure.ac (AC_INIT): Bump version to 25.0.50.
+
+2014-09-29  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * configure.ac (HAVE_STATEMENT_EXPRESSIONS): Remove.
+       For USE_STACK_LISP_OBJECTS, we always assume __GNUC__.
+
+2014-09-27  Ken Brown  <kbrown@cornell.edu>
+
+       * configure.ac [CYGWIN]: Enable sound support.
+
+2014-09-25  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * configure.ac (MAKEINFO): Allow 'makeinfo' to be called 'texi2any'.
+
+2014-09-23  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Merge from gnulib, incorporating:
+       2014-09-11 fcntl-h: fix compilation with Intel C++ compiler
+       2014-09-04 pthread, pthread_sigmask, threadlib: port to Ubuntu 14.04
+
+2014-09-22  Jan Djärv  <jan.h.d@swipnet.se>
 
        * configure.ac: Increase headerpad_extra to 1000, update the comment
        about load commands (Bug#18505).
 
-2014-09-13  Eli Zaretskii  <eliz@gnu.org>
+2014-09-15  Eli Zaretskii  <eliz@gnu.org>
 
        * configure.ac (HAVE_SOUND): Check for mmsystem.h header that
        defines the sound stuff on MS-Windows.  (Bug#18463)
 
-2014-08-22  Ken Brown  <kbrown@cornell.edu>
+2014-09-10  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Improve the experimental local and scoped allocation.
+       * configure.ac (HAVE_STRUCT_ATTRIBUTE_ALIGNED)
+       (HAVE_STATEMENT_EXPRESSIONS): New configure-time checks.
+
+2014-09-07  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Expand @AM_DEFAULT_VERBOSITY@ even if Automake is old (Bug#18415).
+       * configure.ac: Assume verbose output for older Automake.
+
+2014-09-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * configure.ac (MAKEINFO): Clean up some configuration bitrot.
+       MAKEINFO is already set before we get here, so no need to call AC_PATH_PROG.
+       Bypass $am_missing_run.  Simplify version-number checking.
+
+2014-09-02  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Merge from gnulib, incorporating:
+       2014-09-02 gnulib-common.m4: port to GCC 4.2.1 and Sun Studio 12 C++
+       2014-09-01 manywarnings: add GCC 4.9 warnings
+       * m4/gnulib-common.m4, m4/manywarnings.m4: Update from gnulib.
+
+2014-09-01  Paul Eggert  <eggert@cs.ucla.edu>
+
+       --enable-silent-rules now suppresses more chatter.
+       * INSTALL: Document this.
+
+       Clean up extern decls a bit.
+       * configure.ac (WERROR_CFLAGS): Don't disable -Wnested-externs.
+       While we're at it, don't disable -Wlogical-op either.
+
+2014-08-31  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * configure.ac (MAKE): Export it, for config.status.
+       Needed on AIX when 'configure' infers MAKE=gmake.
+       (__restrict_arr): Remove; no longer used.
+
+2014-08-30  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Vector-sorting fixes (Bug#18361).
+       * configure.ac (qsort_r): Remove, as we no longer use qsort-like
+       functions.
+       * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
+       * lib/vla.h, m4/vararrays.m4: New files, copied from gnulib.
+       * lib/stdlib.in.h, m4/stdlib_h.m4: Sync from gnulib, incorporating:
+       2014-08-29 qsort_r: new module, for GNU-style qsort_r
+       The previous two files' changes are boilerplate generated by
+       admin/merge-gnulib, and should not affect Emacs.
+
+2014-08-29  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * configure.ac (AC_CHECK_FUNCS): Check for qsort_r.
+
+2014-08-28  Ken Brown  <kbrown@cornell.edu>
+
+       * configure.ac (HYBRID_MALLOC): New macro; define to use gmalloc
+       before dumping and the system malloc after dumping.  Define on
+       Cygwin.  (Bug#18222)
+
+2014-08-28  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (appdatadir): New variable.
+       (install-etc, uninstall, clean): Handle etc/emacs.appdata.xml.
+
+2014-08-27  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Improve robustness of new string-collation code (Bug#18051).
+       * configure.ac (newlocale): Check for this, not for uselocale.
+
+2014-08-26  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Detect features needed to handle C stack overflows.
+       * configure.ac: Check for sigaltstack and related sigaction
+       support.  Unconditionally check for sigsetjmp and siglongjmp.
+       (HAVE_STACK_OVERFLOW_HANDLING): Define if we can support it.
+
+       (HAVE_LINUX_SYSINFO): Avoid false positive on Solaris.
+
+2014-08-25  Ken Brown  <kbrown@cornell.edu>
+
+       * configure.ac (G_SLICE_ALWAYS_MALLOC): Remove obsolete macro.
+
+2014-08-25  Christoph Scholtes  <cschol2112@gmail.com>
+
+       * INSTALL.REPO: Remove reference to obsolete configure scripts
+       on non-Posix platforms (Bug#18323).
+
+2014-08-24  Michael Albinus  <michael.albinus@gmx.de>
+
+       * configure.ac: Check also for the uselocale function.  (Bug#18051)
+
+2014-08-23  Karol Ostrovsky  <karol.ostrovsky@gmail.com>  (tiny change)
+
+       * configure.ac: Accept "*-mingw*", not just "*-mingw32", as
+       canonical name of a MinGW build, because using MSYS2 'uname'
+       produces "MINGW64".
+
+2014-08-21  Ken Brown  <kbrown@cornell.edu>
 
        * configure.ac (HAVE_XPM): Explain the use of CPPFLAGS in the
        Cygwin-w32 build.  (Bug#18302)
 
-2014-08-10  Paul Eggert  <eggert@cs.ucla.edu>
+2014-08-11  Paul Eggert  <eggert@cs.ucla.edu>
 
        Don't prevent random file systems from being unmounted (Bug#18232).
        This fix relies on having the 'fchdir' function, and on having
        allocates memory, since that can cause problems in Emacs.
        * lib/save-cwd.h: Copy from gnulib.
 
-2014-07-11  Paul Eggert  <eggert@cs.ucla.edu>
+2014-08-10  Eli Zaretskii  <eliz@gnu.org>
+
+       * config.bat: Fix some confusing wording.
+
+2014-08-09  Eli Zaretskii  <eliz@gnu.org>
+
+       * config.bat: Fix EOL format in lines modified by last commit.
+
+2014-08-09  Reuben Thomas  <rrt@sc3d.org>
+
+       * make-dist (files): Remove msdos/is_exec.c and sigaction.c.
+       * config.bat: Require DJGPP 2.02 or later.
+
+2014-08-09  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Merge from gnulib, incorporating:
+       2014-08-07 getdtablesize: fall back on sysconf (_SC_OPEN_MAX)
+       2014-08-05 sys_select: fix FD_ZERO problem on Solaris 10
+       * lib/getdtablesize.c, lib/sys_select.in.h: Update from gnulib.
+
+2014-08-07  Reuben Thomas  <rrt@sc3d.org>
+
+       * README: ``MSDOG'' becomes ``MS-DOS''.
+
+2014-08-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Merge from gnulib, incorporating:
+       2014-08-04 extern-inline: port to FreeBSD, DragonFly
+       * lib/gnulib.mk: Regenerate (comment change only).
+       * m4/extern-inline.m4: Update from gnulib.
+
+2014-08-02  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * configure.ac (HAVE_TIMERFD): Also check for TFD_NONBLOCK,
+       since the code is using TFD_NONBLOCK now.
+
+2014-07-31  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Simplify timerfd configuration and fix some minor glitches.
+       * configure.ac (HAVE_TIMERFD): Define only if TFD_CLOEXEC works,
+       since the code leaked file descriptors to children when !TFD_CLOEXEC.
+       (HAVE_TIMERFD_CLOEXEC): Remove; no longer used.
+       * m4/clock_time.m4 (gl_CLOCK_TIME): Don't check for clock_getres.
+       This reverts the previous change to this file, so it matches
+       gnulib again.
+
+2014-07-28  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * configure.ac (toplevel): Check whether GNU/Linux-specific
+       timerfd functions and macros are available.
+       * m4/clock_time.m4 (gl_CLOCK_TIME): Check for clock_getres as well.
+
+2014-07-13  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Improve behavior of 'bzr up; cd src; make -k'.
+       * Makefile.in (ACLOCAL_INPUTS): Add all m4/*.m4 files.
+
+2014-07-12  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Merge from gnulib, incorporating:
+       2014-06-27 mktime: merge #if/#ifdef usage from glibc
+       * lib/mktime.c: Update from gnulib.
 
        * Makefile.in (install-arch-indep): Avoid readdir race (Bug#17971).
 
-2014-06-20  Paul Eggert  <eggert@cs.ucla.edu>
+2014-07-10  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * configure.ac: Check whether sys/sysinfo.h provides
+       Linux 'sysinfo' function and 'struct sysinfo' type.
+
+2014-06-28  Glenn Morris  <rgm@gnu.org>
+
+       * configure.ac (lwlib_deps_frag, oldxmenu_deps_frag): New output files.
+       * make-dist (lwlib, oldXMenu): Distribute *.mk.
+
+2014-06-27  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (src): No more need to pass BOOTSTRAPEMACS.
+
+       * make-dist: Exclude test/automated/*.log.
+
+2014-06-26  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (mostlyclean, clean): Maybe clean test/automated.
+
+2014-06-21  Paul Eggert  <eggert@cs.ucla.edu>
 
        * configure.ac: Warn about --enable-link-time-optimization's issues
        in --help message (Bug#17806).
        use -ffat-lto-objects if supported; otherwise Emacs won't
        build with GCC 4.9.0.
 
-2014-06-14  Paul Eggert  <eggert@cs.ucla.edu>
+2014-06-20  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Diagnose failures due to colons in directory names (Bug#17278).
+       * Makefile.in (epaths-force): Don't allow ':' in directories whose
+       names go into a colon-separated path.
+       * configure.ac: Fail if submake fails.
+
+2014-06-17  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Omit redundant extern decls.
+       Most of this patch is from Dmitry Antipov, in:
+       http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00263.html
+       * configure.ac (WERROR_CFLAGS): Add -Wredundant-decls.
+
+       Merge from gnulib, incorporating:
+       2014-06-17 acl: port to gcc -Wredundant-decls
+       2014-06-01 gnulib-common.m4: Fix typo in _GL_UNUSED_LABEL.
+       * lib/acl.h, m4/gnulib-common.m4: Update from gnulib.
+
+2014-06-15  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in: Use `make -C' rather than `cd && make' throughout.
+
+       * Makefile.in: Parallelize clean rules using GNU make features.
+       (submake_template): New definition.
+       (mostlyclean_dirs, clean_dirs, distclean_dirs, maintainer_clean_dirs):
+       New variables.
+       (mostlyclean, clean, distclean, bootstrap-clean, maintainer-clean)
+       (extraclean): Define using each subdirectory as a prequisite.
+       * lib/Makefile.am (bootstrap-clean): New.
+
+2014-06-15  Paul Eggert  <eggert@cs.ucla.edu>
 
        Port part of the AIX fix to Solaris (Bug#17598).
        * configure.ac (_REENTRANT): Define on Solaris if HAVE_PTHREAD.
        for the same reason that _THREAD_SAFE is needed on AIX, e.g., to
        make sure that each thread has its own 'errno'.
 
+2014-06-13  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (CC, CFLAGS, LDFLAGS, CPPFLAGS, abs_top_srcdir):
+       Remove, no longer used.
+       (lib, lib-src, lisp, nt, src, blessmail, install-arch-dep)
+       (install-nt, install-strip, uninstall, uninstall-nt)
+       (mostlyclean, clean, distclean, bootstrap-clean)
+       (maintainer-clean, extraclean, TAGS, tags, check, $(DOCS)):
+       ($(INSTALL_DOC), $(UNINSTALL_DOC), info, bootstrap, check-declare):
+       GNU make automatically passes command-line arguments to sub-makes.
+
 2014-06-11  Paul Eggert  <eggert@cs.ucla.edu>
 
-       Backport fcntl.h AIX fix from the trunk (Bug#17598).
-       This fixes a bug with the shell freezing.  See:
-       http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17598#185
-       Merge from gnulib, incorporating:
-       2014-05-31 dup2, fcntl, fcntl-h: port to AIX 7.1
-       * lib/fcntl.in.h, m4/dup2.m4, m4/fcntl.m4:
-       Update from gnulib.
+       Use a shell function in configure.ac to cut down on code duplication.
+       * configure.ac (emacs_check_gnu_make): New shell function.
+       Use it to avoid duplication when checking for GNU Make.
+       It's OK for 'configure' to use shell functions these days,
+       as long as we follow the advice in the 'Shell Functions'
+       section of the Autoconf manual.
+
+2014-06-11  Glenn Morris  <rgm@gnu.org>
+
+       * configure.ac: Require at least version 3.81 of GNU make.
+
+2014-06-10  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Rely on AC_CANONICAL_HOST to detect whether we're using mingw.
+       See the thread containing:
+       http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00206.html
+       * configure.ac (AC_CANONICAL_HOST): Invoke this as early as we
+       can, which is just after AM_INIT_AUTOMAKE.  Then check for mingw
+       just after that.
+
+2014-06-10  Glenn Morris  <rgm@gnu.org>
 
-2014-06-07  Paul Eggert  <eggert@cs.ucla.edu>
+       * Makefile.in (AUTOCONF, AUTOMAKE, AUTOHEADER, ACLOCAL):
+       New, set by configure.  Use throughout where appropriate.
+
+       * Makefile.in (INFO_EXT): Remove and replace by ".info" throughout.
+       * configure.ac (INFO_EXT, INFO_OPTS): Remove output variables.
+
+2014-06-08  Paul Eggert  <eggert@cs.ucla.edu>
 
        Port better to AIX (Bug#17598).
        * configure.ac (with_xpm_set): New shell var.
        (LIBXPM): Append -lXpm if -lXaw is also used, as the latter
        requires the former on AIX.
 
-2014-05-30  Paul Eggert  <eggert@cs.ucla.edu>
+2014-06-05  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Try harder to find GNU Make when configuring.
+       * configure.ac (AC_PROG_MAKE_SET): Define a dummy.
+       (MAKE): Set it to GNU Make, if one can be found.
+       Search PATH for 'make', 'gmake', 'gnumake'.
+       This works better on platforms like AIX, where GNU Make
+       might be in /opt/freeware/bin/make, and reside
+       behind /usr/bin/make in the PATH.
+
+2014-06-05  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * configure.ac (POLL_FOR_INPUT): Define with HAVE_WINDOW_SYSTEM.
+       * INSTALL: Mention SVG image support.
+
+2014-06-05  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * configure.ac: --without-all now implies --without-xft, --disable-acl.
+       * INSTALL: Remove apparently unmaintained documentation about what
+       --without-all exactly means.
+
+2014-06-03  Eli Zaretskii  <eliz@gnu.org>
+
+       * configure.ac (C_HEAP_SWITCH): Remove.
+
+2014-06-02  Paul Eggert  <eggert@cs.ucla.edu>
 
        Fix port to 32-bit AIX with xlc (Bug#17598).
        This doesn't fix Bug#17598, but it does fix a regression since Emacs
        2014-05-30 ftoastr: work around compiler bug in IBM xlc 12.1
        * lib/ftoastr.c: Update from gnulib.
 
-2014-05-22  Paul Eggert  <eggert@cs.ucla.edu>
+2014-06-01  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Merge from gnulib, incorporating:
+       2014-06-02 acl: apply pure attribute to two functions
+       2014-06-01 gnulib-common.m4: add _GL_UNUSED_LABEL
+       2014-05-31 dup2, fcntl, fcntl-h: port to AIX 7.1
+       2014-05-30 ftoastr: work around compiler bug in IBM xlc 12.1
+       * lib/acl-internal.h, lib/fcntl.in.h, lib/ftoastr.h:
+       * m4/dup2.m4, m4/fcntl.m4, m4/gnulib-common.m4:
+       Update from gnulib.
+
+2014-06-01  Juanma Barranquero  <lekktu@gmail.com>
+
+       * configure.ac (C_HEAP_SWITCH): Raise HEAPSIZE value for 32-bit
+       builds on Windows.
+
+2014-05-29  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * configure.ac (pthread_sigmask): Look in LIB_PTHREAD too (Bug#17561).
+       Fixes configuration glitch found in <http://bugs.gnu.org/17561#59>.
+
+2014-05-29  Eli Zaretskii  <eliz@gnu.org>
+
+       * configure.ac (ADDSECTION, TEMACS_POST_LINK): Don't compute,
+       unused.
+
+2014-05-29  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Don't substitute sigprocmask for pthread_sigmask (Bug#17561).
+       sigprocmask isn't portable in a multithreaded process.
+       * configure.ac (gl_THREADLIB): Remove dummy.
+       Merge from gnulib, incorporating:
+       2014-05-28 pthread_sigmask, timer-time: use gl_THREADLIB only if needed
+       * m4/pthread_sigmask.m4, m4/timer_time.m4: Update from gnulib.
+
+2014-05-29  Glenn Morris  <rgm@gnu.org>
+
+       * configure.ac: Explicitly drop some ancient Solaris versions.
+
+2014-05-27  Fabrice Popineau  <fabrice.popineau@gmail.com>
+
+       * configure.ac (C_HEAP_SWITCH): Define for different values of
+       dumped heap size depending on 32/64bits arch on Windows.
+       Don't check for pthreads.h on MinGW32/64, it gets in the way.
+       Use mmap(2) for buffers and system malloc for MinGW32/64.
+       (EMACS_HEAPSIZE): Remove.
+
+2014-05-27  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Merge from gnulib, incorporating:
+       2014-05-21 fchdir: port 'open' and 'close' redefinitions to AIX 7.1
+       * lib/openat-proc.c: Update from gnulib.
+
+2014-05-26  Paul Eggert  <eggert@cs.ucla.edu>
 
        Fix port to 32-bit AIX (Bug#17540).
        * configure.ac (opsys): On Power Architecture, treat release 7 of
        AIX like releases 5 and 6.
 
+2014-05-19  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Remove dependencies on getdelim and getline.
+       * configure.ac (getdelim, getline): Remove.
+
 2014-05-18  Glenn Morris  <rgm@gnu.org>
 
-       * configure.ac (INSTALL_INFO):
-       Revert to just checking for "install-info".
+       * configure.ac: Do not bother testing for png in non-graphical builds.
 
-2014-05-17  Glenn Morris  <rgm@gnu.org>
+2014-05-18  Paul Eggert  <eggert@cs.ucla.edu>
 
-       * configure.ac (INSTALL_INFO): Try the identical-but-quieter-on-Debian
-       "ginstall-info" before "install-info".
+       Port ctags+etags build to Sun C 5.12.
+       * .bzrignore: Remove lib-src/ctags.c.
 
-2014-05-04  Paul Eggert  <eggert@cs.ucla.edu>
+       Port recent libpng changes to hosts with missing png.h.
+       * configure.ac (HAVE_PNG): Port to platforms where libpng-config
+       succeeds but png.h is absent, by testing libpng-config's output
+       rather than trusting it.  I ran into this problem when building
+       Emacs trunk on a Solaris 10 host.
 
-       Revert recent libpng changes (Bug#17339).
-       They fix only bugs that aren't being reported, so it may be better
-       to do them on the trunk.
-       * configure.ac (PNG_CFLAGS): Remove.  All uses removed.
-       (LIBPNG): Don't be consistent about -lpng16 versus -lpng.
-       Ignore libpng-config's exit status.  Always append -lz -lm.
+2014-05-17  Paul Eggert  <eggert@cs.ucla.edu>
 
-       * configure.ac (LIBPNG): Add -lz -lm on platforms where they're needed
-       but libpng-config --libs omits them.  Problem reported by Glenn
-       Morris.
+       Assume C99 or later (Bug#17487).
+       * lib/stdarg.in.h, lib/stdbool.in.h, m4/stdarg.m4, m4/stdbool.m4:
+       Remove.
+       * configure.ac (_AC_PROG_CC_C89): Define a dummy, to keep 'configure'
+       smaller.
+       (gl_PROG_CC_C99): Use this to get C99 or later.
+       * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
 
-2014-05-03  Paul Eggert  <eggert@cs.ucla.edu>
+2014-05-16  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Don't require pkg-config when building from repository.
+       * INSTALL: Prefer './configure FOO=BAR' to 'FOO=BAR ./configure'.
+       * INSTALL.REPO: pkg-config is no longer required to build from
+       the repository.
+       * autogen.sh: Don't check for pkg-config.
+       (progs): Remove pkg-config.
+       (pkg_config_min, AUTORECONF_ENV, env_space, ACLOCAL_PATH):
+       Remove.  All uses removed.
+       * m4/pkg.m4: New file, built by admin/merge-pkg-config.
+       * configure.ac: Remove unnecessary m4_pattern_forbid of ^PKG_ and
+       an AC_ARG_VAR of PKG_CONFIG_PATH.  pkg.m4 does that for us.
+       (EMACS_CHECK_MODULES): Remove workaround for old pkg-config bug,
+       as we use pkg.m4 from a newer pkg-config.
+
+2014-05-15  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * configure.ac (LIBPNG): Do not test for libpng if NS_IMPL_COCOA.
+
+2014-05-13  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * configure.ac (HAVE_XFIXES): Define if available.
+       (XFIXES_CFLAGS, XFIXES_LIBS): New AC_SUBSTs.
+       (--enable-link-time-optimization): Add clang support.
+       * INSTALL: Mention it.
+
+2014-05-12  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * configure.ac (EMACS_CHECK_MODULES): Fix typo in previous change.
+
+2014-05-11  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Work around bug in pkg-config before 0.26 (Bug#17438).
+       * configure.ac (EMACS_CHECK_MODULES): Check for failed exit status
+       of pkg-config, on older pkg-config versions that don't do it
+       properly.
+
+2014-05-07  Glenn Morris  <rgm@gnu.org>
+
+       * autogen.sh: Check for failing aclocal.
+
+2014-05-05  Glenn Morris  <rgm@gnu.org>
+
+       * autogen.sh: Check any pre-existing ACLOCAL_PATH.
+
+2014-05-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Consult libpng-config more consistently (Bug#17339).
+       This is mainly for simplicity, but it should also avoid
+       some future problems like the ones we recently had with NetBSD.
+       * configure.ac (LIBPNG): Configure after LIBZ.  Use libpng-config
+       for cflags, too.  Append -lz if we're not already doing that with
+       LIBZ.  Do not bother appending -lm, since we always append that.
+       Coalesce some duplicate code.
+
+       * autogen.sh: Use ‘"’ to quote a message that often contains ‘'’.
 
        Require ImageMagick >= 6.3.5, due to PixelSetMagickColor (Bug#17339).
        * configure.ac (IMAGEMAGICK_MODULE): Bump prereq from 6.2.8 to 6.3.5.
        A more-complicated fix would be to remove uses of PixelSetMagickColor,
        introduced in ImageMagick 6.3.5 (Sept. 2007).
 
-2014-05-02  Paul Eggert  <eggert@cs.ucla.edu>
-
-       Consult libpng-config more consistently (Bug#17339).
-       * configure.ac (edit_cflags): Move this up and to the top level,
-       so that PNG_CFLAGS can use it too.
-       (PNG_CFLAGS): New var.
-       (png_longjmp): Use PNG_CFLAGS when checking.
-       (LIBPNG): Be consistent about -lpng16 etc; e.g., don't use -lpng16
-       in some places and -lpng in others.  Test libpng-config's exit
-       status.  If it succeeds, use its output rather than appending -lz -lm.
-
-2014-05-01  Glenn Morris  <rgm@gnu.org>
+2014-05-04  Glenn Morris  <rgm@gnu.org>
 
        * configure.ac (LIBPNG): Consult libpng-config for the precise
        form of "-lpng" to use.  (Bug#17339)
 
-2014-04-29  Glenn Morris  <rgm@gnu.org>
+2014-05-03  Glenn Morris  <rgm@gnu.org>
+
+       * autogen.sh: If all else fails, try using pkg-config to find pkg.m4.
+
+2014-05-03  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Get --enable-gcc-warnings to work after touching configure.ac.
+       Preserve ACLOCAL_PATH in later builds, so that by default it has
+       the same value as it did in the first build after initial checkout.
+       * Makefile.in (ACLOCAL_PATH): New macro.
+       ($(srcdir)/aclocal.m4): Use it.
+       * configure.ac (ACLOCAL_PATH): AC_SUBST it.
+       * autogen.sh (env_space): New var.
+       Tell user what variables, if any, to pass to 'configure'.
+
+       Get --enable-gcc-warnings working again.
+       The recent changes to configure.ac removed the transliteration of
+       -I to -isystem in CFLAGS, which is needed for --enable-gcc-warnings.
+       Bring this back while keeping the spirit of the recent changes.
+       * configure.ac (edit_cflags): Restore this shell var, and put it
+       at the top level, where it'll be useful when emacs-24 is next merged.
+       (EMACS_CHECK_MODULES): New macro.  All uses of PKG_CHECK_MODULES
+       changed to use it.
+
+       Make it easier on maintainers who use their own Automake.
+       * autogen.sh (ACLOCAL_PATH, AUTORECONF_ENV): New vars.
+       Set them to avoid problems when maintainers prepend their own
+       Automake installations to their PATH.  Report an error if pkg.m4
+       can't be found.
+
+2014-05-02  Glenn Morris  <rgm@gnu.org>
+
+       * configure.ac (PKG_CONFIG_PATH): Declare with AC_ARG_VAR.
+
+       * configure.ac (--with-pkg-config-prog): Remove.
+       Use the PKG_CONFIG environment variable instead if you need it.
+
+       * configure.ac: Use pkg-config's pkg.m4, rather than reinventing it.
+       Add explicit AC_SUBST's where needed.
+       * autogen.sh (progs): Add pkg-config.
+       (pkg_config_min): New variable.
+
+       * configure.ac (AC_CONFIG_MACRO_DIR): Use it.
+
+       * autogen.sh (get_version): Handle no leading whitespace.
+       (check_version, main): Handle program names with hyphens.
+
+2014-04-30  Glenn Morris  <rgm@gnu.org>
 
        * configure.ac: Treat MirBSD as OpenBSD.  (Bug#17339)
 
+2014-04-21  Daniel Colascione  <dancol@dancol.org>
+
+       * .bzrignore: Add a.out to bzr ignore list (a test generates this
+       file).
+
+2014-04-19  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Link to glib-using libraries when checking for glib (Bug#17289).
+       * configure.ac (XGSELOBJ): Include GTK_LIBS, RSVG_LIBS, etc.
+       when testing whether Glib is linked in.  Similarly for CFLAGS.
+
+2014-04-17  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * GNUmakefile: Speed up 'make bootstrap' in fresh checkout.
+       (ORDINARY_GOALS): New macro, which excludes 'bootstrap'.
+       (bootstrap, .PHONY): New rules.
+       * INSTALL.REPO: Document current procedure better.
+       Move copyright notice to just before license notice.
+
+       * Makefile.in (FRC, force-info): Remove.
+       All uses removed.  This hack is no longer needed here
+       now that we can assume GNU Make's .PHONY feature works.
+       (bootstrap): No need to make 'info', since 'all' now implies 'info'.
+
 2014-04-16  Eli Zaretskii  <eliz@gnu.org>
 
        * config.bat: Update for Emacs 24.4.
 
-2014-04-13  Paul Eggert  <eggert@cs.ucla.edu>
+2014-04-16  Paul Eggert  <eggert@cs.ucla.edu>
 
        Port to IRIX 6.5 (Bug#9684).
        This port requires IRIX cc, as I did not have time to get
        in an optional library that also contains getdelim, and causes
        a later 'configure' to incorrectly think getdelim is supported.
 
-2014-04-13  Eli Zaretskii  <eliz@gnu.org>
+2014-04-16  Eli Zaretskii  <eliz@gnu.org>
 
        * configure.ac (LN_S_FILEONLY, LN_S): Use "/bin/ln" on MinGW, to
        ensure the MSYS ln.exe is invoked.
 
+2014-04-15  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Remove DATA_SEG_BITS.
+       * configure.ac (DATA_SEG_BITS): Remove.  All uses removed.
+
+2014-04-14  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * autogen.sh: Use autoreconf's -f option (Bug#17258).
+
+       Clean up configure-time library handling a bit.
+       This patch was inspired by emacs-24 bzr 116961, which fixed
+       a bug due to sloppy library handling in 'configure'.
+       * configure.ac (LIB_MATH, LIB_PTHREAD, LIBXMU):
+       Use AC_SEARCH_LIBS instead of AC_CHECK_LIB as per Autoconf manual.
+       (LIB_MATH, LIB_PTHREAD, HAVE_X11, IMAGEMAGICK_LIBS, GTK_LIBS)
+       (DBUS_LIBS, LIBXMU, XFT_LIBS, LIBXSM, LIBXML2_LIBS, LIBS_MAIL)
+       (with_kerberos):
+       Don't let the library choice infect $LIBS.
+       (dnet_ntoa, cma_open): Remove obsolete tests.
+       (emacs_pthread_function): Probe for pthread_kill, not pthread_self,
+       as that's a bit more selective on GNU/Linux.
+       (LIBXEXT): Remove.
+       (touchlock): Test for existence when $LIBS_MAIL is in use.
+       (AC_CHECK_FUNCS): Use only $LIB_MATH in addition to $LIBS
+       when testing for typical functions like accept4, lrand48.
+       (random, rint): Remove obsolete HP-UX 9 A.09.05 test.
+
 2014-04-11  Glenn Morris  <rgm@gnu.org>
 
        * make-dist: Do not distribute generated admin/grammars/Makefile.
        Do distribute lib-src/update-game-score.exe.manifest.
 
-2014-04-09  Ken Brown  <kbrown@cornell.edu>
+2014-04-11  Ken Brown  <kbrown@cornell.edu>
 
        * configure.ac (EMACS_MANIFEST): Revert last change (but leave
        UPDATE_MANIFEST empty).
 
-2014-04-03  Ken Brown  <kbrown@cornell.edu>
+2014-04-07  Ken Brown  <kbrown@cornell.edu>
 
        * configure.ac (EMACS_MANIFEST, UPDATE_MANIFEST): Leave these
        variables empty on Cygwin.  (Bug#17176)
 
-2014-03-31  Glenn Morris  <rgm@gnu.org>
+2014-04-03  Glenn Morris  <rgm@gnu.org>
+
+       * make-dist: Further update AC_INIT regexp.
+
+2014-04-02  Glenn Morris  <rgm@gnu.org>
 
        * configure.ac: Make the final "Does Emacs use Gsettings" message
        consistent with src/config.h.
 2014-03-31  Jan Djärv  <jan.h.d@swipnet.se>
 
        * configure.ac: Fix errors from previous checkin (GSettings check).
-       Backport from trunk.
 
-2014-03-30  Daniel Colascione  <dancol@dancol.org>
+2014-03-29  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * configure.ac: Add check that GSettings is in libgio (Bug#17118).
 
-       * configure.ac: Include GFILENOTIFY objects in glib check.  (Bug#17069)
+2014-03-28  Glenn Morris  <rgm@gnu.org>
 
-2014-03-30  Jan Djärv  <jan.h.d@swipnet.se>
+       * configure.ac (AC_INIT): Add "GNU" in package, add bug address.
+       (PACKAGE_BUGREPORT): Use it.
+       (make-dist): Update AC_INIT regexp.
 
-       * configure.ac: Add check that GSettings is in libgio (Bug#17118).
-       Backport from trunk.
+       * configure.ac (ACL_SUMMARY): Rename from acl_summary, for consistency.
+       (EMACS_CONFIG_FEATURES): New define.
+
+2014-03-27  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * configure.ac: Suggest './configure MAKE=gmake' in diagnostic.
+       This tends to work better than 'MAKE=gmake ./configure' if later
+       builds run config.status etc.
+
+2014-03-27  Glenn Morris  <rgm@gnu.org>
+
+       * configure.ac: Require GNU make.
+       (HAVE_GNU_MAKE): Remove.
 
 2014-03-26  Paul Eggert  <eggert@cs.ucla.edu>
 
        2014-03-26 strftime: wrap macros in "do {...} while(0)"
        * lib/strftime.c: Update from gnulib.
 
+2014-03-26  Glenn Morris  <rgm@gnu.org>
+
+       * configure.ac (CLASH_DETECTION): Remove option.  Every platform
+       supports it, and the runtime option `create-lockfiles' replaces it.
+
+2014-03-23  Daniel Colascione  <dancol@dancol.org>
+
+       * configure.ac: (Bug#17069) Include GFILENOTIFY objects in glib check.
+
+2014-03-22  Glenn Morris  <rgm@gnu.org>
+
+       * make-dist: Do not distribute lib-src/testfile.
+
+2014-03-21  Eli Zaretskii  <eliz@gnu.org>
+
+       * configure.ac: Bump version to 24.4.50.
+
+2014-03-21  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (all): Depend on `info'.  (Bug#16626)
+
 2014-03-07  Paul Eggert  <eggert@cs.ucla.edu>
 
        Merge from gnulib, incorporating:
 
 2013-07-29  Michael Albinus  <michael.albinus@gmx.de>
 
-       * INSTALL (DETAILED BUILDING AND INSTALLATION): Add
-       --without-file-notification to --without-all.
+       * INSTALL (DETAILED BUILDING AND INSTALLATION):
+       Add --without-file-notification to --without-all.
 
 2013-07-29  Xue Fuqiao  <xfq.free@gmail.com>
 
        CONFIG_SITE for the MSYS build on MS-Windows.
        (Makefile): Use $(CFG).
 
-       * .bzrignore: Ignore *.res, *.tmp, and *.map.  Remove
-       src/emacs.res.
+       * .bzrignore: Ignore *.res, *.tmp, and *.map.
+       Remove src/emacs.res.
 
 2013-05-16  Paul Eggert  <eggert@cs.ucla.edu>
 
        detail: -with-x... and --srcdir.
        (options, boolean_opts): Delete; we don't have enough options to
        make this worthwhile.
-       (prefix, bindir, lisppath, datadir, libdir, lockdir): Deleted,
+       (prefix, bindir, lisppath, datadir, libdir, lockdir): Delete,
        along with the code which supported them; these should be set as
        arguments to the top-level make.
        (config_h_opts): Since this no longer doubles as a list of option
index 22c57f5cb5b9bad9d38e02b0de8d3dbb83398dba..b4b33f4dbb636d080d1d9b5b45f100a2a65f978c 100644 (file)
@@ -55,7 +55,9 @@ else
 # Once 'configure' exists, run it.
 # Finally, run the actual 'make'.
 
-default $(filter-out configure Makefile,$(MAKECMDGOALS)): Makefile
+ORDINARY_GOALS = $(filter-out configure Makefile bootstrap,$(MAKECMDGOALS))
+
+default $(ORDINARY_GOALS): Makefile
        $(MAKE) -f Makefile $(MAKECMDGOALS)
 # Execute in sequence, so that multiple user goals don't conflict.
 .NOTPARALLEL:
@@ -72,5 +74,11 @@ Makefile: configure
        ./configure
        @echo >&2 'Makefile built.'
 
+# 'make bootstrap' in a fresh checkout needn't run 'configure' twice.
+bootstrap: Makefile
+       $(MAKE) -f Makefile all
+
+.PHONY: bootstrap default $(ORDINARY_GOALS)
+
 endif
 endif
diff --git a/INSTALL b/INSTALL
index 2f4f41773c1a532ed9ca61715665d6a641084d59..eb8857f9dfd870fbda94c6a99d4908906975955e 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -23,6 +23,9 @@ find some things, or what options to use.
 `src/config.h' file containing system-dependent definitions.
 Running the `make' utility then builds the package for your system.
 
+Building Emacs requires GNU make, <http://www.gnu.org/software/make/>.
+On most systems that Emacs supports, this is the default `make' program.
+
 Here's the procedure to build Emacs using `configure' on systems which
 are supported by it.  In some cases, if the simplified procedure fails,
 you might need to use various non-default options, and maybe perform
@@ -48,7 +51,6 @@ sections if you need to.
                 SOURCE-DIR/configure
 
       where SOURCE-DIR is the top-level Emacs source directory.
-      This may not work unless you use GNU make.
 
   3. When `configure' finishes, it prints several lines of details
      about the system configuration.  Read those details carefully
@@ -166,6 +168,7 @@ X11 is being used.
   X libjpeg for JPEG: http://www.ijg.org/
   X libtiff for TIFF: http://www.remotesensing.org/libtiff/
   X libgif for GIF:   http://sourceforge.net/projects/giflib/
+    librsvg2 for SVG: http://wiki.gnome.org/action/show/Projects/LibRsvg
 
 If you supply the appropriate --without-LIB option, 'configure' will
 omit the corresponding library from Emacs, even if that makes for a
@@ -246,9 +249,8 @@ with the mouse.  You can get fancy 3D-style scroll bars, even without
 Gtk or Motif, if you have the Xaw3d library installed (see
 "Image support libraries" above for Xaw3d availability).
 
-You can tell configure where to search for GTK by specifying
-`--with-pkg-config-prog=PATH' where PATH is the pathname to
-pkg-config.
+You can tell configure where to search for GTK by giving it the
+argument PKG_CONFIG='/full/name/of/pkg-config'.
 
 Emacs will autolaunch a D-Bus session bus, when the environment
 variable DISPLAY is set, but no session bus is running.  This might be
@@ -277,6 +279,7 @@ or more of these options:
   --without-tiff       for TIFF image support
   --without-gif        for GIF image support
   --without-png        for PNG image support
+  --without-rsvg       for SVG image support
 
 Use --without-toolkit-scroll-bars to disable Motif or Xaw3d scroll bars.
 
@@ -288,22 +291,17 @@ systems which support that.
 
 Use --without-sound to disable sound support.
 
-Use --without-all if you want to build a small executable with the minimal
-dependencies on external libraries, at the cost of disabling most of the
-features that are normally enabled by default.  Using --without-all is
-equivalent to --without-sound --without-dbus --without-libotf
---without-selinux --without-xft --without-gsettings --without-gnutls
---without-rsvg --without-xml2 --without-gconf --without-imagemagick
---without-m17n-flt --without-jpeg --without-tiff --without-gif
---without-png --without-gpm --without-file-notification.  Note that
---without-all leaves X support enabled, and using the GTK2 or GTK3
+Use --without-all for a smaller executable with fewer dependencies on
+external libraries, at the cost of disabling many features.  Although
+--without-all disables libraries not needed for ordinary Emacs
+operation, it does enable X support, and using the GTK2 or GTK3
 toolkit creates a lot of library dependencies.  So if you want to
 build a small executable with very basic X support, use --without-all
 --with-x-toolkit=no.  For the smallest possible executable without X,
 use --without-all --without-x.  If you want to build with just a few
 features enabled, you can combine --without-all with --with-FEATURE.
-For example, you can use --without-all --with-dbus to build with DBus
-support and nothing more.
+For example, you can use --without-all --without-x --with-dbus to
+build with DBus support and nothing more.
 
 Use --with-wide-int to implement Emacs values with the type 'long long',
 even on hosts where a narrower type would do.  With this option, on a
@@ -315,12 +313,22 @@ and is useful with GNU-compatible compilers.  On a recent GNU system
 there should be no warnings; on older and on non-GNU systems the
 generated warnings may still be useful.
 
-Use --enable-link-time-optimization to enable link-time optimizer, which
-is available in GNU compiler since version 4.5.0.  If your compiler is not
-GNU or older than version 4.5.0, this option does nothing.  If `configure'
-can determine number of online CPUS on your system, final link-time
-optimization and code generation is executed in parallel using one job
-per each available online CPU.
+Use --enable-silent-rules to cause 'make' to chatter less.  This is
+helpful when combined with options like --enable-gcc-warnings that
+generate long shell-command lines.  'make V=0' also suppresses the
+chatter.
+
+Use --enable-link-time-optimization to enable link-time optimizer.  If
+you're using GNU compiler, this feature is supported since version 4.5.0.
+If `configure' can determine number of online CPUS on your system, final
+link-time optimization and code generation is executed in parallel using
+one job per each available online CPU.
+
+This option is also supported for clang.  You should have GNU binutils
+with `gold' linker and plugin support, and clang with LLVMgold.so plugin.
+Read http://llvm.org/docs/GoldPlugin.html for details.  Also note that
+this feature is still experimental, so prepare to build binutils and
+clang from the corresponding source code repositories.
 
 The `--prefix=PREFIXDIR' option specifies where the installation process
 should put emacs and its data files.  This defaults to `/usr/local'.
@@ -387,10 +395,11 @@ compiler.  By default, gcc is used if available.
 Here's an example of a `configure' invocation, assuming a Bourne-like
 shell such as Bash, which uses these variables:
 
- CPPFLAGS='-I/foo/myinclude' LDFLAGS='-L/bar/mylib' \
-  CFLAGS='-O3' LIBS='-lfoo -lbar' ./configure
+  ./configure \
+    CPPFLAGS='-I/foo/myinclude' LDFLAGS='-L/bar/mylib' \
+    CFLAGS='-O3' LIBS='-lfoo -lbar'
 
-(this is all one long line).  This tells `configure' to instruct the
+(this is all one shell command).  This tells `configure' to instruct the
 preprocessor to look in the `/foo/myinclude' directory for header
 files (in addition to the standard directories), instruct the linker
 to look in `/bar/mylib' for libraries, pass the -O3 optimization
@@ -400,12 +409,11 @@ libraries in addition to the standard ones.
 For some libraries, like Gtk+, fontconfig and ALSA, `configure' uses
 pkg-config to find where those libraries are installed.
 If you want pkg-config to look in special directories, you have to set
-the environment variable PKG_CONFIG_PATH to point to the directories
-where the .pc-files for those libraries are.
-For example:
+PKG_CONFIG_PATH to point to the directories where the .pc-files for
+those libraries are.  For example:
 
PKG_CONFIG_PATH='/usr/local/alsa/lib/pkgconfig:/opt/gtk+-2.8/lib/pkgconfig' \
-   ./configure
 ./configure \
+    PKG_CONFIG_PATH='/usr/local/alsa/lib/pkgconfig:/opt/gtk+-2.8/lib/pkgconfig'
 
 The work of `configure' can be done by editing various files in the
 distribution, but using `configure' is easier.  See the section called
@@ -421,12 +429,8 @@ SOURCE-DIR refers to the top-level Emacs source directory which is
 where Emacs's configure script is located.  `configure' looks for the
 Emacs source code in the directory that `configure' is in.
 
-To build in a separate directory, you must use a version of `make'
-that supports the `VPATH' variable, such as GNU `make'.
-
-(Do not try to build in a separate directory by creating many links
-to the real source directory--there is no need, and installation will
-fail.)
+(Do not try to build in a separate directory by creating many links to
+the real source directory--there is no need, and installation will fail.)
 
 4) Put into `./lisp/site-init.el' or `./lisp/site-load.el' any Emacs
 Lisp code you want Emacs to load before it is dumped out.  Use
@@ -712,8 +716,8 @@ Strictly speaking, not all of the executables in `./lib-src' need be copied.
     are used by Emacs; they do need to be copied.
 - The programs `etags', `ctags', and `emacsclient' are intended to be
     run by users; they are handled below.
-- The programs `make-docfile' and `test-distrib' were
-    used in building Emacs, and are not needed any more.
+- The program `make-docfile' was used in building Emacs, and is
+    not needed any more.
 
 2) Copy the files in `./info' to the place specified in
 `./lisp/site-init.el' or `./lisp/info.el'.  Note that if the
index ecf5bc068fe889a74f5dc6a9f834b2ec0b14a2ba..83b6f2f41331fe35813c527ce37fdb9604896971 100644 (file)
@@ -1,9 +1,10 @@
-Copyright (C) 2002-2014 Free Software Foundation, Inc.
-See the end of the file for license conditions.
-
-
             Building and Installing Emacs from the Repository
 
+Simply run 'make'.  This should work if your files are freshly checked
+out from the repository, and if you have the proper tools installed.
+If it doesn't work, or if you have special build requirements, the
+following information may be helpful.
+
 Building Emacs from the source-code repository requires some tools
 that are not needed when building from a release.  You will need:
 
@@ -14,48 +15,32 @@ automake  - at least the version specified near the start of
 makeinfo  - not strictly necessary, but highly recommended, so that
   you can build the manuals.
 
-The `autogen.sh' script can help you figure out if you have the
-necessary tools.
-
-The first time you build, there are a couple of extra steps.
-First, generate the `configure' script and some related files:
+To use the autotools, run the following shell command to generate the
+'configure' script and some related files:
 
   $ ./autogen.sh
 
-(or you can just run `autoreconf -i -I m4').
-
-You can then configure your build (use `./configure --help' to see
-options you can set):
+You can then configure your build as follows:
 
   $ ./configure
 
-If you want later builds to go faster, at the expense of sometimes
-doing the wrong thing if you update the build procedure, you can
-invoke "./configure -C" instead.
-
-Some of the files that are included in the Emacs tarball, such as
-byte-compiled Lisp files, are not stored in the repository.  Therefore, to
-build from the repository you must run "make bootstrap" instead of
-just "make":
-
-  $ make bootstrap
-
-Normally, it is not necessary to use "make bootstrap" after every
-update from the repository.  "make" should work in 90% of the cases and be
-much quicker.
+The 'configure' script has many options; run './configure --help' to
+see them.  For example, if you want later builds to go faster, albeit
+sometimes doing the wrong thing if you update the build procedure, you
+can invoke './configure -C'.  After configuring, build Emacs as follows:
 
   $ make
 
-(If you want to install the Emacs binary, type "make install" instead
-of "make" in the last command.)
+If you want to install Emacs, type 'make install' instead of 'make' in
+the last command.
 
-Occasionally the file "lisp/loaddefs.el" (and similar automatically
-generated files, such as esh-groups.el, and *-loaddefs.el in some
-subdirectories of lisp/, e.g. mh-e/ and calendar/) will need to be
+Occasionally the file 'lisp/loaddefs.el' (and similar automatically
+generated files, such as 'esh-groups.el', and '*-loaddefs.el' in some
+subdirectories of 'lisp/', e.g., 'mh-e/' and 'calendar/') will need to be
 updated to reflect new autoloaded functions.  If you see errors (rather
 than warnings) about undefined lisp functions during compilation, that
 may be the reason.  Finally, sometimes there can be build failures
-related to *loaddefs.el (e.g. "required feature `esh-groups' was not
+related to '*loaddefs.el' (e.g., "required feature `esh-groups' was not
 provided").  In that case, follow the instructions below.
 
 To update loaddefs.el (and similar files), do:
@@ -63,14 +48,9 @@ To update loaddefs.el (and similar files), do:
   $ cd lisp
   $ make autoloads
 
-If either of the above partial procedures fails, try "make bootstrap".
-If CPU time is not an issue, the most thorough way to rebuild, and
-avoid any spurious problems, is always to use this method.
-
-Users of non-Posix systems (MS-Windows etc.) should run the
-platform-specific configuration scripts (nt/configure.bat, config.bat,
-etc.) before "make bootstrap" or "make"; the rest of the procedure is
-applicable to those systems as well.
+If either of the above partial procedures fails, try 'make bootstrap'.
+If CPU time is not an issue, 'make bootstrap' is the most thorough way
+to rebuild, and avoid any spurious problems.
 
 Because the repository version of Emacs is a work in progress, it will
 sometimes fail to build.  Please wait a day or so (and check the
@@ -82,6 +62,8 @@ never platform-specific.
 
 
 \f
+Copyright (C) 2002-2014 Free Software Foundation, Inc.
+
 This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
index 103b035a3c9d091329eb040841a2dbacdead167c..dee3f7167a10eed8e20863c1ef5ee572d3eacac7 100644 (file)
@@ -60,8 +60,8 @@
 
 SHELL = @SHELL@
 
-# This may not work with certain non-GNU make's.  It only matters when
-# inheriting a CDPATH not starting with the current directory.
+# This only matters when inheriting a CDPATH not starting with the
+# current directory.
 CDPATH=
 
 # If Make doesn't predefine MAKE, set it here.
@@ -76,10 +76,11 @@ QUIET_SUBMAKE = MAKELEVEL=0
 cache_file = @cache_file@
 CONFIGURE_FLAGS = --cache-file=$(cache_file)
 
-CC=@CC@
-CFLAGS=@CFLAGS@
-LDFLAGS=@LDFLAGS@
-CPPFLAGS=@CPPFLAGS@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+ACLOCAL = @ACLOCAL@
+
 EXEEXT=@EXEEXT@
 
 ### These help us choose version- and architecture-specific directories
@@ -146,8 +147,7 @@ man1dir=$(mandir)/man1
 # Where to install and expect the info files describing Emacs.
 infodir=@infodir@
 # Info files not in the doc/misc directory (we get those via make echo-info).
-INFO_EXT=@INFO_EXT@
-INFO_NONMISC=emacs$(INFO_EXT) eintr$(INFO_EXT) elisp$(INFO_EXT)
+INFO_NONMISC=emacs.info eintr.info elisp.info
 
 # If no makeinfo was found and configured --without-makeinfo, "no"; else "yes".
 HAVE_MAKEINFO=@HAVE_MAKEINFO@
@@ -166,8 +166,6 @@ bitmapdir=@bitmapdir@
 # We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
 srcdir=@srcdir@
 abs_srcdir=@abs_srcdir@
-# MinGW CPPFLAGS may use this.
-abs_top_srcdir=@abs_top_srcdir@
 
 # Where the manpage source files are kept.
 mansrcdir=$(srcdir)/doc/man
@@ -181,6 +179,9 @@ x_default_search_path=@x_default_search_path@
 # Where the etc/emacs.desktop file is to be installed.
 desktopdir=$(datarootdir)/applications
 
+# Where the etc/emacs.appdata.xml file is to be installed.
+appdatadir=$(datarootdir)/appdata
+
 # Where the etc/images/icons/hicolor directory is to be installed.
 icondir=$(datarootdir)/icons
 
@@ -288,9 +289,9 @@ SUBDIR_MAKEFILES = `echo $(SUBDIR_MAKEFILES_IN:.in=) | sed 's|$(srcdir)/||g'`
 COPYDIR = ${srcdir}/etc ${srcdir}/lisp
 COPYDESTS = "$(DESTDIR)${etcdir}" "$(DESTDIR)${lispdir}"
 
-all: ${SUBDIR}
+all: ${SUBDIR} info
 
-.PHONY: all ${SUBDIR} blessmail epaths-force epaths-force-w32 FRC
+.PHONY: all ${SUBDIR} blessmail epaths-force epaths-force-w32
 
 removenullpaths=sed -e 's/^:*//' -e 's/:*$$//g' -e 's/::*/:/g'
 
@@ -298,7 +299,15 @@ removenullpaths=sed -e 's/^:*//' -e 's/:*$$//g' -e 's/::*/:/g'
 # See comments in configure.ac for why it is done this way, as opposed
 # to just letting configure generate epaths.h from epaths.in in a
 # similar way to how Makefile is made from Makefile.in.
-epaths-force: FRC
+epaths-force:
+       @for dir in '$(abs_srcdir)' '$(lispdir)' '$(archlibdir)'; do \
+         case $$dir in \
+           *:*) \
+             echo >&2 "Build or installation directory '$$dir'"; \
+             echo >&2 "cannot contain ':'."; \
+             exit 1;; \
+         esac; \
+       done
        @(standardlisppath=`echo "${standardlisppath}" | ${removenullpaths}` ; \
          locallisppath=`echo "${locallisppath}" | ${removenullpaths}` ; \
          buildlisppath=`echo "${buildlisppath}" | ${removenullpaths}` ; \
@@ -335,7 +344,7 @@ msys_sed_sh_escape=sed -e 's/[];$$*.^[]/\\\\&/g'
 # MS-Windows format (e.g. 'c:/foo/bar'), because temacs is a MinGW
 # program that doesn't support MSYS-style paths (e.g. '/c/foo/bar' or
 # '/foo/bar').
-epaths-force-w32: FRC
+epaths-force-w32:
        @(w32srcdir=`${srcdir}/build-aux/msys-to-w32 "${srcdir}"`; \
          w32prefix=`${srcdir}/build-aux/msys-to-w32 "${prefix}" N`; \
          w32prefixpattern=`echo "$${w32prefix}" | ${msys_sed_sh_escape}` ; \
@@ -359,40 +368,21 @@ src: lib-src
 lisp: src
 
 # These targets should be "${SUBDIR} without `src'".
-lib lib-src lisp nt: Makefile FRC
-       cd $@ && $(MAKE) all $(MFLAGS)                         \
-         CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \
-         LDFLAGS='${LDFLAGS}' MAKE='${MAKE}'
-
-# Pass to src/Makefile.in an additional BOOTSTRAPEMACS variable which
-# is either set to bootstrap-emacs (in case bootstrap-emacs has not been
-# constructed yet) or the empty string (otherwise).
-# src/Makefile.in uses it to implement conditional dependencies, so that
-# files that need bootstrap-emacs to be built do not additionally need
-# to be kept fresher than bootstrap-emacs.  Otherwise changing a single
-# file src/foo.c forces dumping a new bootstrap-emacs, then re-byte-compiling
-# all preloaded elisp files, and only then dump the actual src/emacs, which
-# is not wrong, but is overkill in 99.99% of the cases.
-#
+lib lib-src lisp nt: Makefile
+       $(MAKE) -C $@ all
+
 # Note the use of single quotes in the value of vcswitness.
 # This passes an unexpanded $srcdir to src's Makefile, which then
 # expands it using its own value of srcdir (which points to the
 # source directory of src/).
-src: Makefile FRC
+src: Makefile
        dirstate='.bzr/checkout/dirstate';                              \
        vcswitness='$$(srcdir)/../'$$dirstate;                          \
        [ -r "$(srcdir)/$$dirstate" ] || vcswitness='';                 \
-       cd $@ || exit;                                                  \
-       boot=bootstrap-emacs$(EXEEXT);                                  \
-       [ ! -x "$$boot" ] || boot='';                                   \
-       $(MAKE) all $(MFLAGS)                                           \
-         CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}'          \
-         LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="$$boot"   \
-         VCSWITNESS="$$vcswitness"
-
-blessmail: Makefile src FRC
-       cd lib-src && $(MAKE) maybe-blessmail $(MFLAGS) \
-         MAKE='${MAKE}' archlibdir='$(archlibdir)'
+       $(MAKE) -C $@ all VCSWITNESS="$$vcswitness"
+
+blessmail: Makefile src
+       $(MAKE) -C lib-src maybe-blessmail
 
 # We used to have one rule per */Makefile.in, but that leads to race
 # conditions with parallel makes, so let's assume that the time stamp on
@@ -423,16 +413,17 @@ config.status: ${srcdir}/configure ${srcdir}/lisp/version.el
 AUTOCONF_INPUTS = $(srcdir)/configure.ac $(srcdir)/aclocal.m4
 
 $(srcdir)/configure: $(AUTOCONF_INPUTS)
-       cd ${srcdir} && autoconf
+       cd ${srcdir} && ${AUTOCONF}
 
-ACLOCAL_INPUTS = $(srcdir)/configure.ac $(srcdir)/m4/gnulib-comp.m4
+ACLOCAL_PATH = @ACLOCAL_PATH@
+ACLOCAL_INPUTS = $(srcdir)/configure.ac $(wildcard $(srcdir)/m4/*.m4)
 $(srcdir)/aclocal.m4: $(ACLOCAL_INPUTS)
-       cd $(srcdir) && aclocal -I m4
+       cd $(srcdir) && ACLOCAL_PATH='$(ACLOCAL_PATH)' $(ACLOCAL) -I m4
 
 AUTOMAKE_INPUTS = $(srcdir)/aclocal.m4 $(srcdir)/lib/Makefile.am \
   $(srcdir)/lib/gnulib.mk
 $(srcdir)/lib/Makefile.in: $(AUTOMAKE_INPUTS)
-       cd $(srcdir) && automake --gnu -a -c lib/Makefile
+       cd $(srcdir) && $(AUTOMAKE) --gnu -a -c lib/Makefile
 
 # Regenerate files that this makefile would have made, if this makefile
 # had been built by Automake.  The name 'am--refresh' is for
@@ -445,9 +436,9 @@ $(srcdir)/src/config.in: $(srcdir)/src/stamp-h.in
        @ # because stamp-h.in has changed (since building stamp-h.in
        @ # refreshes config.in as well), but if config.in is missing
        @ # then we really need to do something more.
-       [ -r "$@" ] || ( cd ${srcdir} && autoheader )
+       [ -r "$@" ] || ( cd ${srcdir} && ${AUTOHEADER} )
 $(srcdir)/src/stamp-h.in: $(AUTOCONF_INPUTS)
-       cd ${srcdir} && autoheader
+       cd ${srcdir} && ${AUTOHEADER}
        rm -f $(srcdir)/src/stamp-h.in
        echo timestamp > $(srcdir)/src/stamp-h.in
 
@@ -484,11 +475,7 @@ write_subdir=if [ -f "$${subdir}/subdirs.el" ]; \
 ### Lisp files and DOC file to work properly.
 install-arch-dep: src install-arch-indep install-etcdoc install-$(NTDIR)
        umask 022; ${MKDIR_P} "$(DESTDIR)${bindir}"
-       cd lib-src && \
-         $(MAKE) install $(MFLAGS) prefix="${prefix}" \
-           exec_prefix="${exec_prefix}" bindir="${bindir}" \
-           libexecdir="${libexecdir}" archlibdir="${archlibdir}" \
-           INSTALL_STRIP=${INSTALL_STRIP}
+       $(MAKE) -C lib-src install
        if test "${ns_self_contained}" = "no"; then \
          ${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs${EXEEXT} "$(DESTDIR)${bindir}/$(EMACSFULL)" || exit 1 ; \
          chmod 1755 "$(DESTDIR)${bindir}/$(EMACSFULL)" || true; \
@@ -506,12 +493,7 @@ install-arch-dep: src install-arch-indep install-etcdoc install-$(NTDIR)
 ### in nt/, and its Posix do-nothing shadow.
 install-:
 install-nt:
-       cd $(NTDIR) && \
-         $(MAKE) install $(MFLAGS) prefix="${prefix}" \
-           exec_prefix="${exec_prefix}" bindir="${bindir}" \
-           libexecdir="${libexecdir}" archlibdir="${archlibdir}" \
-           datadir="${datadir}" \
-           INSTALL_STRIP=${INSTALL_STRIP}
+       $(MAKE) -C $(NTDIR) install
 
 ## In the share directory, we are deleting:
 ## applications (with emacs.desktop, also found in etc/)
@@ -658,7 +640,7 @@ install-info: info
           [ -f "$(DESTDIR)${infodir}/dir" ] || \
              [ ! -f ${srcdir}/info/dir ] || \
              ${INSTALL_DATA} ${srcdir}/info/dir "$(DESTDIR)${infodir}/dir"; \
-          info_misc=`cd doc/misc && $(QUIET_SUBMAKE) $(MAKE) -s echo-info`; \
+          info_misc=`$(QUIET_SUBMAKE) $(MAKE) -s -C doc/misc echo-info`; \
           cd ${srcdir}/info ; \
           for elt in ${INFO_NONMISC} $${info_misc}; do \
              test "$(HAVE_MAKEINFO)" = "no" && test ! -f $$elt && continue; \
@@ -708,6 +690,12 @@ install-etc:
          ${srcdir}/etc/emacs.desktop > $${tmp}; \
        ${INSTALL_DATA} $${tmp} "$(DESTDIR)${desktopdir}/${EMACS_NAME}.desktop"; \
        rm -f $${tmp}
+       umask 022; ${MKDIR_P} "$(DESTDIR)${appdatadir}"
+       tmp=etc/emacs.tmpappdata; rm -f $${tmp}; \
+       sed -e "s/emacs\.desktop/${EMACS_NAME}.desktop/" \
+         ${srcdir}/etc/emacs.appdata.xml > $${tmp}; \
+       ${INSTALL_DATA} $${tmp} "$(DESTDIR)${appdatadir}/${EMACS_NAME}.appdata.xml"; \
+       rm -f $${tmp}
        thisdir=`/bin/pwd`; \
        cd ${iconsrcdir} || exit 1; umask 022 ; \
        for dir in */*/apps */*/mimetypes; do \
@@ -725,19 +713,14 @@ install-etc:
 
 ### Build Emacs and install it, stripping binaries while installing them.
 install-strip:
-       $(MAKE) $(MFLAGS) INSTALL_STRIP=-s install
+       $(MAKE) INSTALL_STRIP=-s install
 
 ### Delete all the installed files that the `install' target would
 ### create (but not the noninstalled files such as `make all' would create).
 ###
 ### Don't delete the lisp and etc directories if they're in the source tree.
 uninstall: uninstall-$(NTDIR) uninstall-doc
-       cd lib-src &&                                   \
-        $(MAKE) $(MFLAGS) uninstall                    \
-           prefix="${prefix}" exec_prefix="${exec_prefix}" \
-           bindir="${bindir}" libexecdir="${libexecdir}" \
-           archlibdir="${archlibdir}"
-
+       $(MAKE) -C lib-src uninstall
        -unset CDPATH; \
        for dir in "$(DESTDIR)${lispdir}" "$(DESTDIR)${etcdir}" ; do    \
          if [ -d "$${dir}" ]; then                     \
@@ -754,7 +737,7 @@ uninstall: uninstall-$(NTDIR) uninstall-doc
        done
        -rm -rf "$(DESTDIR)${libexecdir}/emacs/${version}"
        thisdir=`/bin/pwd`; \
-       (info_misc=`cd doc/misc && $(QUIET_SUBMAKE) $(MAKE) -s echo-info`; \
+       (info_misc=`$(QUIET_SUBMAKE) $(MAKE) -s -C doc/misc echo-info`; \
         if cd "$(DESTDIR)${infodir}"; then \
           for elt in ${INFO_NONMISC} $${info_misc}; do \
             (cd "$${thisdir}"; \
@@ -777,6 +760,7 @@ uninstall: uninstall-$(NTDIR) uninstall-doc
             hicolor/scalable/mimetypes/`echo emacs-document | sed '$(TRANSFORM)'`.svg; \
        fi)
        -rm -f "$(DESTDIR)${desktopdir}/${EMACS_NAME}.desktop"
+       -rm -f "$(DESTDIR)${appdatadir}/${EMACS_NAME}.appdata.xml"
        for file in snake-scores tetris-scores; do \
          file="$(DESTDIR)${gamedir}/$${file}"; \
          [ -s "$${file}" ] || rm -f "$$file"; \
@@ -786,34 +770,35 @@ uninstall: uninstall-$(NTDIR) uninstall-doc
 ### in nt/, and its Posix do-nothing shadow.
 uninstall-:
 uninstall-nt:
-       cd $(NTDIR) &&                                  \
-        $(MAKE) $(MFLAGS) uninstall                    \
-           prefix="${prefix}" exec_prefix="${exec_prefix}" \
-           bindir="${bindir}" libexecdir="${libexecdir}" \
-           archlibdir="${archlibdir}"
-
-FRC:
+       $(MAKE) -C $(NTDIR) uninstall
 
 # ==================== Cleaning up and miscellanea ====================
 
 .PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean extraclean
 
+## Eg:
+## src_clean:
+##     make -C src clean
+define submake_template
+.PHONY: $(1)_$(2)
+$(1)_$(2):
+       $$(MAKE) -C $(1) $(2)
+endef
+
 ### `mostlyclean'
 ###      Like `clean', but may refrain from deleting a few files that people
 ###      normally don't want to recompile.  For example, the `mostlyclean'
 ###      target for GCC does not delete `libgcc.a', because recompiling it
 ###      is rarely necessary and takes a lot of time.
-mostlyclean: FRC
-       cd src      && $(MAKE) $(MFLAGS) mostlyclean
-       cd oldXMenu && $(MAKE) $(MFLAGS) mostlyclean
-       cd lwlib    && $(MAKE) $(MFLAGS) mostlyclean
-       cd lib      && $(MAKE) $(MFLAGS) mostlyclean
-       cd lib-src  && $(MAKE) $(MFLAGS) mostlyclean
-       cd nt       && $(MAKE) $(MFLAGS) mostlyclean
-       -cd doc/emacs     && $(MAKE) $(MFLAGS) mostlyclean
-       -cd doc/misc      && $(MAKE) $(MFLAGS) mostlyclean
-       -cd doc/lispref   && $(MAKE) $(MFLAGS) mostlyclean
-       -cd doc/lispintro && $(MAKE) $(MFLAGS) mostlyclean
+mostlyclean_dirs = src oldXMenu lwlib lib lib-src nt doc/emacs doc/misc \
+  doc/lispref doc/lispintro
+
+$(foreach dir,$(mostlyclean_dirs),$(eval $(call submake_template,$(dir),mostlyclean)))
+
+mostlyclean: $(mostlyclean_dirs:=_mostlyclean)
+       for dir in test/automated; do \
+         [ ! -d $$dir ] || $(MAKE) -C $$dir mostlyclean; \
+       done
 
 ### `clean'
 ###      Delete all files from the current directory that are normally
@@ -823,24 +808,21 @@ mostlyclean: FRC
 ###      with them.
 ###
 ###      Delete `.dvi' files here if they are not part of the distribution.
-clean: FRC
-       -rm -f etc/emacs.tmpdesktop
-       cd src      && $(MAKE) $(MFLAGS) clean
-       cd oldXMenu && $(MAKE) $(MFLAGS) clean
-       cd lwlib    && $(MAKE) $(MFLAGS) clean
-       cd lib      && $(MAKE) $(MFLAGS) clean
-       cd lib-src  && $(MAKE) $(MFLAGS) clean
-       cd nt       && $(MAKE) $(MFLAGS) clean
-       -cd doc/emacs     && $(MAKE) $(MFLAGS) clean
-       -cd doc/misc      && $(MAKE) $(MFLAGS) clean
-       -cd doc/lispref   && $(MAKE) $(MFLAGS) clean
-       -cd doc/lispintro && $(MAKE) $(MFLAGS) clean
-       cd nextstep && $(MAKE) $(MFLAGS) clean
+clean_dirs = $(mostlyclean_dirs) nextstep
+
+$(foreach dir,$(clean_dirs),$(eval $(call submake_template,$(dir),clean)))
+
+clean: $(clean_dirs:=_clean)
+       for dir in test/automated; do \
+         [ ! -d $$dir ] || $(MAKE) -C $$dir clean; \
+       done
+       -rm -f etc/emacs.tmpdesktop etc/emacs.tmpappdata
 
 ### `bootclean'
 ###      Delete all files that need to be remade for a clean bootstrap.
 top_bootclean=\
        rm -f config.cache config.log
+
 ### `distclean'
 ###      Delete all files from the current directory that are created by
 ###      configuring or building the program.  If you have unpacked the
@@ -850,44 +832,25 @@ top_bootclean=\
 top_distclean=\
        ${top_bootclean}; \
        rm -f config.status config.log~ Makefile stamp-h1 ${SUBDIR_MAKEFILES}
-distclean: FRC
-       cd src      && $(MAKE) $(MFLAGS) distclean
-       cd oldXMenu && $(MAKE) $(MFLAGS) distclean
-       cd lwlib    && $(MAKE) $(MFLAGS) distclean
-       cd lib      && $(MAKE) $(MFLAGS) distclean
-       cd lib-src  && $(MAKE) $(MFLAGS) distclean
-       cd nt       && $(MAKE) $(MFLAGS) distclean
-       cd doc/emacs     && $(MAKE) $(MFLAGS) distclean
-       cd doc/misc      && $(MAKE) $(MFLAGS) distclean
-       cd doc/lispref   && $(MAKE) $(MFLAGS) distclean
-       cd doc/lispintro && $(MAKE) $(MFLAGS) distclean
-       cd leim     && $(MAKE) $(MFLAGS) distclean
-       cd lisp     && $(MAKE) $(MFLAGS) distclean
-       cd nextstep && $(MAKE) $(MFLAGS) distclean
+
+distclean_dirs = $(clean_dirs) leim lisp
+
+$(foreach dir,$(distclean_dirs),$(eval $(call submake_template,$(dir),distclean)))
+
+distclean: $(distclean_dirs:=_distclean)
        for dir in test/automated admin/grammars admin/unidata; do \
-         [ ! -d $$dir ] || (cd $$dir && $(MAKE) $(MFLAGS) distclean); \
+         [ ! -d $$dir ] || $(MAKE) -C $$dir distclean; \
        done
        ${top_distclean}
 
 ### `bootstrap-clean'
 ###      Delete everything that can be reconstructed by `make' and that
 ###      needs to be deleted in order to force a bootstrap from a clean state.
-bootstrap-clean: FRC
-       cd src      && $(MAKE) $(MFLAGS) bootstrap-clean
-       cd oldXMenu && $(MAKE) $(MFLAGS) maintainer-clean
-       cd lwlib    && $(MAKE) $(MFLAGS) maintainer-clean
-       cd lib      && $(MAKE) $(MFLAGS) maintainer-clean
-       cd lib-src  && $(MAKE) $(MFLAGS) maintainer-clean
-       cd nt       && $(MAKE) $(MFLAGS) maintainer-clean
-       -cd doc/emacs     && $(MAKE) $(MFLAGS) maintainer-clean
-       -cd doc/misc      && $(MAKE) $(MFLAGS) maintainer-clean
-       -cd doc/lispref   && $(MAKE) $(MFLAGS) maintainer-clean
-       -cd doc/lispintro && $(MAKE) $(MFLAGS) maintainer-clean
-       cd leim     && $(MAKE) $(MFLAGS) bootstrap-clean
-       cd lisp     && $(MAKE) $(MFLAGS) bootstrap-clean
-       cd nextstep && $(MAKE) $(MFLAGS) maintainer-clean
+$(foreach dir,$(distclean_dirs),$(eval $(call submake_template,$(dir),bootstrap-clean)))
+
+bootstrap-clean: $(distclean_dirs:=_bootstrap-clean)
        for dir in test/automated admin/grammars admin/unidata; do \
-         [ ! -d $$dir ] || (cd $$dir && $(MAKE) $(MFLAGS) bootstrap-clean); \
+         [ ! -d $$dir ] || $(MAKE) -C $$dir bootstrap-clean; \
        done
        [ ! -f config.log ] || mv -f config.log config.log~
        rm -rf ${srcdir}/info
@@ -907,12 +870,14 @@ bootstrap-clean: FRC
 top_maintainer_clean=\
        ${top_distclean}; \
        rm -fr autom4te.cache
-maintainer-clean: bootstrap-clean FRC
-       cd src  && $(MAKE) $(MFLAGS) maintainer-clean
-       cd leim && $(MAKE) $(MFLAGS) maintainer-clean
-       cd lisp && $(MAKE) $(MFLAGS) maintainer-clean
+
+maintainer_clean_dirs = src leim lisp
+
+$(foreach dir,$(maintainer_clean_dirs),$(eval $(call submake_template,$(dir),maintainer-clean)))
+
+maintainer-clean: bootstrap-clean $(maintainer_clean_dirs:=_maintainer-clean)
        for dir in test/automated admin/grammars admin/unidata; do \
-         [ ! -d $$dir ] || (cd $$dir && $(MAKE) $(MFLAGS) maintainer-clean); \
+         [ ! -d $$dir ] || $(MAKE) -C $$dir maintainer-clean; \
        done
        ${top_maintainer_clean}
 
@@ -920,8 +885,12 @@ maintainer-clean: bootstrap-clean FRC
 ### says GCC supports it, and that's where the configuration part of
 ### the coding standards seem to come from.  It's like distclean, but
 ### it deletes backup and autosave files too.
-extraclean:
-       for i in ${SUBDIR}; do (cd $$i; $(MAKE) $(MFLAGS) extraclean); done
+### Note that we abuse this in some subdirectories (eg leim),
+### to delete some generated files that are slow to rebuild.
+$(foreach dir,$(SUBDIR),$(eval $(call submake_template,$(dir),extraclean)))
+
+## FIXME this is busted because most of these do not have extraclean rules.
+extraclean: $(SUBDIR:=_extraclean)
        ${top_maintainer_clean}
        -rm -f config-tmp-*
        -rm -f *~ \#*
@@ -930,14 +899,14 @@ extraclean:
 # even when the build directory and source dir are different.
 .PHONY: TAGS tags
 TAGS tags: lib lib-src src
-       cd src; $(MAKE) $(MFLAGS) tags
+       $(MAKE) -C src tags
 
 check: all
        @if test ! -d test/automated; then \
          echo "You do not seem to have the test/ directory."; \
          echo "Maybe you are using a release tarfile, rather than a repository checkout."; \
        else \
-         cd test/automated && $(MAKE) $(MFLAGS) check; \
+         $(MAKE) -C test/automated check; \
        fi
 
 dist:
@@ -951,10 +920,10 @@ PSS   = lispref-ps   lispintro-ps   emacs-ps   misc-ps
 
 DOCS = $(DVIS) $(HTMLS) $(INFOS) $(PDFS) $(PSS)
 $(DOCS):
-       t=$@; IFS=-; set $$t; IFS=; cd doc/$$1 && $(MAKE) $(MFLAGS) $$2
+       t=$@; IFS=-; set $$t; IFS=; $(MAKE) -C doc/$$1 $$2
 
 .PHONY: $(DOCS) docs pdf ps
-.PHONY: info dvi dist check html info-real info-dir force-info check-info
+.PHONY: info dvi dist check html info-real info-dir check-info
 
 ## TODO add etc/refcards.
 docs: $(DOCS)
@@ -1000,7 +969,7 @@ INSTALL_DOC = $(INSTALL_DVI) $(INSTALL_HTML) $(INSTALL_PDF) $(INSTALL_PS)
 ## Install non .info forms of the documentation.
 ## TODO add etc/refcards.
 $(INSTALL_DOC):
-       t=$@; IFS=-; set $$t; IFS=; cd doc/$$2 && $(MAKE) $(MFLAGS) $$1-$$3
+       t=$@; IFS=-; set $$t; IFS=; $(MAKE) -C doc/$$2 $$1-$$3
 
 .PHONY: $(INSTALL_DOC) install-doc
 .PHONY: install-dvi install-html install-pdf install-ps
@@ -1023,7 +992,7 @@ UNINSTALL_PS = uninstall-emacs-ps uninstall-lispref-ps \
 UNINSTALL_DOC = $(UNINSTALL_DVI) $(UNINSTALL_HTML) $(UNINSTALL_PDF) $(UNINSTALL_PS)
 
 $(UNINSTALL_DOC):
-       t=$@; IFS=-; set $$t; IFS=; cd doc/$$2 && $(MAKE) $(MFLAGS) $$1-$$3
+       t=$@; IFS=-; set $$t; IFS=; $(MAKE) -C doc/$$2 $$1-$$3
 
 .PHONY: $(UNINSTALL_DOC) uninstall-doc
 .PHONY: uninstall-dvi uninstall-html uninstall-pdf uninstall-ps
@@ -1035,7 +1004,6 @@ uninstall-pdf: $(UNINSTALL_PDF)
 uninstall-ps: $(UNINSTALL_PS)
 
 
-force-info:
 # Note that man/Makefile knows how to put the info files in $(srcdir),
 # so we can do ok running make in the build dir.
 # This used to have a clause that exited with an error if MAKEINFO = no.
@@ -1047,11 +1015,11 @@ force-info:
 # would require changing every rule in doc/ that builds an info file,
 # and it's not worth it.  This case is only relevant if you download a
 # release, then change the .texi files.
-info: force-info
+info:
        @if test "$(HAVE_MAKEINFO)" = "no"; then \
          echo "Configured --without-makeinfo, not building manuals" ; \
        else \
-         $(MAKE) $(MFLAGS) info-real info-dir; \
+         $(MAKE) info-real info-dir; \
        fi
 
 ## build-aux/make-info-dir expects only certain dircategories.
@@ -1089,10 +1057,10 @@ check-info: info
 #  * Run autogen.sh.
 #  * Rebuild Makefile, to update the build procedure itself.
 #  * Do the actual build.
-bootstrap: bootstrap-clean FRC
+bootstrap: bootstrap-clean
        cd $(srcdir) && ./autogen.sh
-       $(MAKE) $(MFLAGS) MAKEFILE_NAME=force-Makefile force-Makefile
-       $(MAKE) $(MFLAGS) info all
+       $(MAKE) MAKEFILE_NAME=force-Makefile force-Makefile
+       $(MAKE) all
 
 .PHONY: check-declare
 
@@ -1101,4 +1069,4 @@ check-declare:
          echo "You must build Emacs to use this command"; \
          exit 1; \
        fi
-       cd lisp && $(MAKE) $(MFLAGS) $@
+       $(MAKE) -C lisp $@
diff --git a/README b/README
index dd61492a612063f8a529a198c01fe70a70357e94..6c83c75bee3e577a648a4c5124a6fc5681c44c6c 100644 (file)
--- a/README
+++ b/README
@@ -2,7 +2,7 @@ Copyright (C) 2001-2014 Free Software Foundation, Inc.
 See the end of the file for license conditions.
 
 
-This directory tree holds version 24.3.94 of GNU Emacs, the extensible,
+This directory tree holds version 25.0.50 of GNU Emacs, the extensible,
 customizable, self-documenting real-time display editor.
 
 The file INSTALL in this directory says how to build and install GNU
@@ -84,7 +84,7 @@ There are several subdirectories:
 `doc/lispref'   holds the source code for the Emacs Lisp reference manual.
 `doc/lispintro' holds the source code for the Introduction to Programming
                 in Emacs Lisp manual.
-`msdos'     holds configuration files for compiling Emacs under MSDOG.
+`msdos'     holds configuration files for compiling Emacs under MS-DOS.
 `nextstep'  holds instructions and some other files for compiling the
             Nextstep port of Emacs, for GNUstep and Mac OS X Cocoa.
 `nt'        holds various command files and documentation files that pertain
index 27d87dcaa2aaaa920b1e83a887fc9ee71f692643..a98d1b9039e72289618f208ab3906fb66884b5ab 100644 (file)
@@ -86,8 +86,6 @@ BROKEN_FIONREAD
 BROKEN_GET_CURRENT_DIR_NAME
 BROKEN_NON_BLOCKING_CONNECT
 BROKEN_PTY_READ_AFTER_EAGAIN
-CLASH_DETECTION
-DATA_SEG_BITS
 DEFAULT_SOUND_DEVICE
 DEVICE_SEP
 DIRECTORY_SEP
@@ -201,17 +199,13 @@ HAVE_KRB5_H
 HAVE_KRB_H
 HAVE_LANGINFO_CODESET
 HAVE_LIBDGC
-HAVE_LIBDNET
 HAVE_LIBKSTAT
 HAVE_LIBLOCKFILE
-HAVE_LIBM
 HAVE_LIBMAIL
 HAVE_LIBOTF
 HAVE_LIBPERFSTAT
 HAVE_LIBPNG_PNG_H
-HAVE_LIBPTHREADS
 HAVE_LIBSELINUX
-HAVE_LIBXEXT
 HAVE_LIBXML2
 HAVE_LIBXMU
 HAVE_LOCALTIME_R
@@ -374,7 +368,6 @@ HAVE___FPENDING
 INTERNAL_TERMINAL
 IS_ANY_SEP
 IS_DIRECTORY_SEP
-LOCALTIME_CACHE
 MAIL_USE_FLOCK
 MAIL_USE_LOCKF
 MAIL_USE_POP
index 48d7a211a76279b696d7a5f4d2fd90fc50fd99de..f3d6d048e21250c65d43902b1c5fecc116e1e536 100644 (file)
@@ -1,4 +1,39 @@
-2014-09-03  Eli Zaretskii  <eliz@gnu.org>
+2014-10-13  Glenn Morris  <rgm@gnu.org>
+
+       * authors.el (authors-aliases, authors-fixed-case)
+       (authors-obsolete-files-regexps): Additions.
+       (authors-no-scan-regexps): New constant.
+       (authors-no-scan-file-p): New function.
+       (authors): Respect authors-no-scan-file-p.
+
+2014-10-12  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Fix putenv race conditions with undefined behavior (Bug#8705).
+       * merge-gnulib (GNULIB_MODULES): Add time_r, since Emacs now
+       calls localtime_r and gmtime_r directly.
+
+2014-10-07  Glenn Morris  <rgm@gnu.org>
+
+       * unidata/Makefile.in: Check for deleted uni- files.  (Bug#18489)
+       (all): Use unifiles rather than charprop.el.
+       (FORCE): New variable and phony rule.
+       (${unidir}/charprop.el): Respect FORCE.
+       (unifiles): New rule.
+
+       * unidata/Makefile.in (unidir): Rename from DSTDIR.  Change all uses.
+       (charprop.el, install): Remove rules.
+       (clean): Simplify.
+
+2014-10-04  Glenn Morris  <rgm@gnu.org>
+
+       * authors.el (authors-renamed-files-alist): Add package-x-test.el
+
+2014-10-01  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * unidata/unidata-gen.el (unidata-gen-table-word-list): Use alist-get
+       and cl-incf.
+
+2014-09-08  Eli Zaretskii  <eliz@gnu.org>
 
        * unidata/unidata-gen.el (unidata-check): Bring this function up
        to date with the currently supported methods of generating Unicode
        the check.  Update the copyright years in the reference to the
        Unicode data files we use.
 
-2014-06-24  Eli Zaretskii  <eliz@gnu.org>
+2014-08-30  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Vector-sorting fixes (Bug#18361).
+       * merge-gnulib (GNULIB_MODULES): Add vla.
+
+2014-08-30  Eli Zaretskii  <eliz@gnu.org>
+
+       * authors.el (authors): Fix last change so it works for MS-Windows
+       as well.
+
+2014-08-29  Michael Albinus  <michael.albinus@gmx.de>
+
+       * authors.el (authors): Use LOCALE argument of `string-collate-lessp'.
+
+2014-08-28  Michael Albinus  <michael.albinus@gmx.de>
+
+       * authors.el (authors-aliases): Addition.
+
+2014-08-26  Glenn Morris  <rgm@gnu.org>
+
+       * authors.el (authors-ignored-files, authors-valid-file-names)
+       (authors-renamed-files-alist): Additions.
+       (authors-renamed-files-alist): Revert 2014-08-09 change.
+       (authors): Sort authors in utf-8 order.  (Bug#2263)
+
+2014-08-09  Reuben Thomas  <rrt@sc3d.org>
+
+       * notes/copyright: Remove mention of msdos/is_exec.c and
+       sigaction.c.
+       * authors.el (authors-renamed-files-alist): Removed is_exec.c.
+
+2014-08-07  Reuben Thomas  <rrt@sc3d.org>
+
+       * notes/exit-value: Remove specific discussion of VMS.
+
+2014-08-07  Reuben Thomas  <rrt@sc3d.org>
+
+       Refer to MS-DOS using the same name everywhere.
+
+       * FOR-RELEASE: ``MS-DOG'', ``MSDOG'' and ``msdog'' become
+       ``MS-DOS''.
+       * MAINTAINERS: ditto.
+
+2014-07-14  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Use binary-io module, O_BINARY, and "b" flag (Bug#18006).
+       * merge-gnulib (GNULIB_MODULES): Add binary-io.  It was already
+       present implicitly; this just makes the dependence explicit.
+
+2014-06-30  Glenn Morris  <rgm@gnu.org>
+
+       * update_autogen: Find loaddefs targets rather than
+       parsing lisp/Makefile.in
+
+2014-06-29  Glenn Morris  <rgm@gnu.org>
+
+       * update_autogen: Remove need to cd into/out of lisp/.
+
+       * grammars/Makefile.in (bootstrap-clean): Don't delete Makefile,
+       for sake of top-level maintainer-clean rule.
+
+2014-06-26  Eli Zaretskii  <eliz@gnu.org>
 
        * notes/unicode: Some notes about what to do when a new Unicode
        version is imported.
 
-2014-06-24  Glenn Morris  <rgm@gnu.org>
+2014-06-26  Glenn Morris  <rgm@gnu.org>
+
+       * authors.el: Move here from ../lisp/emacs-lisp.
+
+2014-06-25  Glenn Morris  <rgm@gnu.org>
+
+       * grammars/Makefile.in (${bovinedir}/c-by.el, ${bovinedir}/make-by.el):
+       (${wisentdir}/js-wy.el, ${wisentdir}/python-wy.el):
+       Replace with pattern rules.
+       (${bovinedir}/scm-by.el, ${wisentdir}/javat-wy.el)
+       (${cedetdir}/srecode/srt-wy.el): Use $<.
+
+       * unidata/Makefile.in (${top_srcdir}/src/macuvs.h): Make and load .elc.
+       (.el.elc): Replace with pattern rule.
+       (%.elc): New.
+       (unidata.txt): Use $<.
+       (compile): Remove.
+       (${DSTDIR}/charprop.el): Use order-only prereqs rather than a sub-make.
+
+       * unidata/uvs.el (uvs-print-table-ivd): Fix free variable typo.
+
+2014-06-21  Glenn Morris  <rgm@gnu.org>
 
        * unidata/BidiMirroring.txt: Update to 7.0.0 (only comment changes).
        * unidata/UnicodeData.txt: Update to 7.0.0.
        * unidata/IVD_Sequences.txt: Update to 2014-05-16 version.
 
-2014-06-16  Stephen Berman  <Stephen.Berman@gmx.net>
+2014-06-21  Stephen Berman  <Stephen.Berman@gmx.net>
 
        * notes/elpa: Use "git" instead of "bzr" in the name of machine to
        clone the repository from.
 
-2014-05-26  Paul Eggert  <eggert@cs.ucla.edu>
+2014-06-13  Glenn Morris  <rgm@gnu.org>
+
+       * unidata/Makefile.in (${DSTDIR}/charprop.el):
+       GNU make automatically passes command-line arguments to sub-makes.
+
+2014-06-02  Paul Eggert  <eggert@cs.ucla.edu>
 
        Include sources used to create macuvs.h.
        * unidata/IVD_Sequences.txt: New file.
        (uvs-print-table-ivd): Output a header in the form that
        unidata-gen.el generates.
 
-2014-05-26  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+2014-05-25  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
-       * mac/uvs.el: New file.  Generates ../src/macuvs.h.
+       * mac/uvs.el: New file from Mac port.  Generates src/macuvs.h.
 
-2014-05-11  Glenn Morris  <rgm@gnu.org>
+2014-05-17  Paul Eggert  <eggert@cs.ucla.edu>
 
-       * find-gc.el: Move here from ../lisp/emacs-lisp.
+       Assume C99 or later (Bug#17487).
+       * merge-gnulib (GNULIB_MODULES): Remove stdarg, stdbool.
+       (GNULIB_TOOL_FLAGS): Avoid stdarg, stdbool.
+
+2014-05-16  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Don't require pkg-config when building from repository.
+       * merge-pkg-config: New script.
+       * notes/copyright: Update for m4/*.m4, in particular m4/pkg.m4.
+
+2014-05-13  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * merge-gnulib: Defer to autogen.sh for ACLOCAL_PATH computation.
+
+2014-05-12  Glenn Morris  <rgm@gnu.org>
 
-2014-05-10  Glenn Morris  <rgm@gnu.org>
+       * find-gc.el: Move here from ../lisp/emacs-lisp.
 
        * admin.el (set-version-in-file): Don't set identical version.
        (set-version): Provide default version number.
        (set-version, set-copyright): Give start/end messages.
 
-2014-04-17  Paul Eggert  <eggert@cs.ucla.edu>
+2014-04-18  Paul Eggert  <eggert@cs.ucla.edu>
 
        * notes/bzr: Update instructions for merging from gnulib.
        Remove obsolete note about tramp.el and tramp-sh.el.
        Change "emacs-23" to "emacs-24".
 
+2014-04-11  Glenn Morris  <rgm@gnu.org>
+
+       * grammars/Makefile.in (EMACSDATA, EMACSDOC, EMACSPATH): Unexport.
+
+2014-03-22  Glenn Morris  <rgm@gnu.org>
+
+       * quick-install-emacs (AVOID): Remove testfile and test-distrib.
+
+2014-03-21  Glenn Morris  <rgm@gnu.org>
+
+       * update_autogen: Auto-detect VCS in use.
+       (vcs): New variable.
+       (status, commit, main): Handle git.
+
 2014-03-07  Paul Eggert  <eggert@cs.ucla.edu>
 
        Fix oversight preventing lib/sys/types.h from being generated.
index b5bf6739a86382dc165cfae0ea18e47eaf54422c..bdd26947e4be71c998d61aa03f17dfe6b74cca21 100644 (file)
@@ -202,8 +202,8 @@ mark.texi
 mini.texi         
 misc.texi         
 modes.texi        
-msdog.texi        
-msdog-xtra.texi   
+msdos.texi        
+msdos-xtra.texi   
 mule.texi         
 m-x.texi          
 package.texi      
index efcc63081b5f09019d090774b0888e0d76492a38..9a46b64c3e8bc0a921f6119eb30add29ccee2403 100644 (file)
@@ -36,7 +36,7 @@ Eli Zaretskii
            lisp/dos-fns.el
            lisp/dos-w32.el
            lisp/dos-vars.el
-           doc/emacs/msdog.texi
+           doc/emacs/msdos.texi
 
 Kenichi Handa
        Mule
similarity index 98%
rename from lisp/emacs-lisp/authors.el
rename to admin/authors.el
index 51bd41530ccac84ec2fcae5ea52d361266fbc45d..aefd947e802cf0883cd2938c8f32069608e49f1f 100644 (file)
@@ -301,6 +301,7 @@ Changes to files matching one of the regexps in this list are not listed.")
     "images/icons/allout-widgets-dark-bg"
     "images/icons/allout-widgets-light-bg"
     ;; Never had any meaningful changes logged, now deleted:
+    "lib/stdarg.in.h" "lib/stdbool.in.h"
     "unidata/bidimirror.awk" "unidata/biditype.awk"
     "split-man" "Xkeymap.txt" "ms-7bkermit" "ulimit.hack"
     "gnu-hp300" "refcard.bit" "ledit.l" "forms.README" "forms-d2.dat"
@@ -593,9 +594,10 @@ Changes to files in this list are not listed.")
     "README"
     ;; There were a few of these, not just the generated top-level one.
     "configure" "config.h"
+    "is_exec.c" "sigaction.c"
     ;; nt/
     "ebuild.bat" "install.bat" "fast-install.bat"
-    "debug.bat.in" "emacs.bat.in"
+    "debug.bat.in" "emacs.bat.in" "addsection.c"
     "inc/sys/dir.h" "inc/gettext.h"
     ".gdbinit-union"
     "alloca.s"
@@ -649,6 +651,8 @@ Changes to files in this list are not listed.")
     "mh-exec.el" "mh-init.el" "mh-customize.el"
     "net/zone-mode.el" "xesam.el"
     "term/mac-win.el" "sup-mouse.el"
+    "term/vt102.el" "term/vt201.el" "term/vt220.el" "term/vt300.el"
+    "term/vt320.el" "term/vt400.el" "term/vt420.el"
     "url-https.el"
     "org-mac-message.el" "org-mew.el" "org-w3m.el" "org-vm.el" "org-wl.el"
     "org-mks.el" "org-remember.el" "org-xoxo.el" "org-docbook.el"
@@ -656,6 +660,7 @@ Changes to files in this list are not listed.")
     "org-exp-blocks.el"                     ; maybe this is ob-exp now? dunno
     "org-lparse.el"
     "org-special-blocks.el" "org-taskjuggler.el"
+    "progmodes/cap-words.el"
     ;; gnus
     "nnwfm.el" "nnlistserv.el" "nnkiboze.el" "nndb.el" "nnsoup.el"
     "netrc.el" "password.el" "sasl-cram.el" "sasl-digest.el" "sasl-ntlm.el"
@@ -774,6 +779,13 @@ in the repository.")
     ;; Obsolete.
     ("emacs-lisp/assoc.el" . "assoc.el")
     ("emacs-lisp/cust-print.el" . "cust-print.el")
+    ("emacs-lisp/gulp.el" . "gulp.el")
+    ("emulation/crisp.el" . "crisp.el")
+    ("emulation/tpu-edt.el" . "tpu-edt.el")
+    ("emulation/tpu-extras.el" . "tpu-extras.el")
+    ("emulation/vi.el" . "vi.el")
+    ("emulation/vip.el" . "vip.el")
+    ("emulation/ws-mode.el" . "ws-mode.el")
     ("mail/mailpost.el" . "mailpost.el")
     ("play/bruce.el" . "bruce.el")
     ("play/yow.el" . "yow.el")
@@ -787,6 +799,7 @@ in the repository.")
     ;; The one in lisp is eshell/eshell.el.
     ("eshell.el" . "automated/eshell.el")
     ("eshell/esh-test.el" . "automated/eshell.el")
+    ("automated/package-x-test.el" . "automated/package-test.el")
     ;; INSTALL-CVS -> .CVS -> .BZR -> .REPO
     ("INSTALL-CVS" . "INSTALL.REPO")
     ("INSTALL.CVS" . "INSTALL.REPO")
@@ -805,6 +818,8 @@ in the repository.")
     ("emacs.tex" . "emacs.texi")
     ("faq.texi" . "efaq.texi")
     ("major.texi" . "modes.texi")
+    ("msdog-xtra.texi" . "msdos-xtra.texi")
+    ("msdog.texi" . "msdos.texi")
     ;; And from emacs/ to misc/ and back again.
     ("ns-emacs.texi" . "macos.texi")
     ("overrides.texi" . "gnus-overrides.texi")
@@ -843,6 +858,8 @@ in the repository.")
     ("autogen/update_autogen" . "update_autogen")
     ;; Moved from etc/ to admin/.
     ("grammars" . "grammars")
+    ;; Moved from lisp/emacs-lisp/ to admin/.
+    ("emacs-lisp/authors.el" . "authors.el")
     ;; From etc to lisp/cedet/semantic/.
     ("grammars/bovine-grammar.el" . "bovine/grammar.el")
     ("grammars/wisent-grammar.el" . "wisent/grammar.el")
@@ -1325,7 +1342,11 @@ list of their contributions.\n")
       (maphash #'authors-add-to-author-list table)
       (setq authors-author-list
            (sort authors-author-list
-                 (lambda (a b) (string-lessp (car a) (car b)))))
+                 (lambda (a b)
+                   (string-collate-lessp (car a) (car b)
+                                         (if (eq system-type 'windows-nt)
+                                             "enu_USA"
+                                           "en_US.UTF-8")))))
       (dolist (a authors-author-list)
        (let ((author (car a))
              (wrote (nth 1 a))
index 827240a8d4ea94864d93b85886999420bf33b41f..c3ee2ef951f9fd446f9fc13a41db3f0b730abbbd 100644 (file)
@@ -28,6 +28,9 @@ srcdir = @srcdir@
 top_srcdir = @top_srcdir@
 top_builddir = @top_builddir@
 
+# Prevent any settings in the user environment causing problems.
+unexport EMACSDATA EMACSDOC EMACSPATH
+
 EMACS = ${top_builddir}/src/emacs
 emacs = EMACSLOADPATH= "${EMACS}" -batch --no-site-file --no-site-lisp
 
@@ -63,39 +66,32 @@ bovine: ${BOVINE}
 
 wisent: ${WISENT}
 
-
-${bovinedir}/c-by.el: ${srcdir}/c.by
+## c-by.el, make-by.el.
+${bovinedir}/%-by.el: ${srcdir}/%.by
        [ ! -f "$@" ] || chmod +w "$@"
-       ${make_bovine} -o "$@" ${srcdir}/c.by
-
-${bovinedir}/make-by.el: ${srcdir}/make.by
-       [ ! -f "$@" ] || chmod +w "$@"
-       ${make_bovine} -o "$@" ${srcdir}/make.by
+       ${make_bovine} -o "$@" $<
 
 ${bovinedir}/scm-by.el: ${srcdir}/scheme.by
        [ ! -f "$@" ] || chmod +w "$@"
-       ${make_bovine} -o "$@" ${srcdir}/scheme.by
-
-
-${cedetdir}/semantic/grammar-wy.el: ${srcdir}/grammar.wy
-       [ ! -f "$@" ] || chmod +w "$@"
-       ${make_wisent} -o "$@" ${srcdir}/grammar.wy
+       ${make_bovine} -o "$@" $<
 
-${wisentdir}/javat-wy.el: ${srcdir}/java-tags.wy
+## grammar-wy.el
+${cedetdir}/semantic/%-wy.el: ${srcdir}/%.wy
        [ ! -f "$@" ] || chmod +w "$@"
-       ${make_wisent} -o "$@" ${srcdir}/java-tags.wy
+       ${make_wisent} -o "$@" $<
 
-${wisentdir}/js-wy.el: ${srcdir}/js.wy
+## js-wy.el, python-wy.el
+${wisentdir}/%-wy.el: ${srcdir}/%.wy
        [ ! -f "$@" ] || chmod +w "$@"
-       ${make_wisent} -o "$@" ${srcdir}/js.wy
+       ${make_wisent} -o "$@" $<
 
-${wisentdir}/python-wy.el: ${srcdir}/python.wy
+${wisentdir}/javat-wy.el: ${srcdir}/java-tags.wy
        [ ! -f "$@" ] || chmod +w "$@"
-       ${make_wisent} -o "$@" ${srcdir}/python.wy
+       ${make_wisent} -o "$@" $<
 
 ${cedetdir}/srecode/srt-wy.el: ${srcdir}/srecode-template.wy
        [ ! -f "$@" ] || chmod +w "$@"
-       ${make_wisent} -o "$@" ${srcdir}/srecode-template.wy
+       ${make_wisent} -o "$@" $<
 
 
 .PHONY: distclean bootstrap-clean maintainer-clean extraclean
@@ -103,7 +99,10 @@ ${cedetdir}/srecode/srt-wy.el: ${srcdir}/srecode-template.wy
 distclean:
        rm -f Makefile
 
-bootstrap-clean maintainer-clean: distclean
+## Perhaps this should do what extraclean (qv) does.
+bootstrap-clean:
+
+maintainer-clean: distclean
 
 ## We do not normally delete the generated files, even in bootstrap.
 ## Creating them does not take long, so we could easily change this.
index 6c0dffb6dcee7aff575d6f360dda9885a8114b05..dc3cd6cf5413da71bc1fd29925c0123db57c27fb 100755 (executable)
@@ -26,7 +26,7 @@
 GNULIB_URL=git://git.savannah.gnu.org/gnulib.git
 
 GNULIB_MODULES='
-  alloca-opt byteswap c-ctype c-strcase
+  alloca-opt binary-io byteswap c-ctype c-strcase
   careadlinkat close-stream count-one-bits count-trailing-zeros
   crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512
   dtoastr dtotimespec dup2 environ execinfo faccessat
@@ -35,11 +35,11 @@ GNULIB_MODULES='
   intprops largefile lstat
   manywarnings memrchr mkostemp mktime
   pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat
-  sig2str socklen stat-time stdalign stdarg stdbool stdio
+  sig2str socklen stat-time stdalign stdio
   strftime strtoimax strtoumax symlink sys_stat
-  sys_time time timer-time timespec-add timespec-sub
+  sys_time time time_r timer-time timespec-add timespec-sub
   unsetenv update-copyright utimens
-  warnings
+  vla warnings
 '
 
 GNULIB_TOOL_FLAGS='
@@ -49,6 +49,7 @@ GNULIB_TOOL_FLAGS='
   --avoid=open --avoid=openat-die --avoid=opendir
   --avoid=raise
   --avoid=save-cwd --avoid=select --avoid=sigprocmask
+  --avoid=stdarg --avoid=stdbool
   --avoid=threadlib
   --conditional-dependencies --import --no-changelog --no-vc-files
   --makefile-name=gnulib.mk
@@ -96,4 +97,5 @@ rm -- "$src"lib/gl_openssl.h "$src"m4/fcntl-o.m4 "$src"m4/gl-openssl.m4 \
       "$src"m4/gnulib-cache.m4"$src" m4/warn-on-use.m4 &&
 cp -- "$gnulib_srcdir"/build-aux/texinfo.tex "$src"doc/misc &&
 cp -- "$gnulib_srcdir"/build-aux/move-if-change "$src"build-aux &&
-autoreconf -i -I m4 -- ${src:+"$src"}
+{ test -z "$src" || cd "$src"; } &&
+./autogen.sh
diff --git a/admin/merge-pkg-config b/admin/merge-pkg-config
new file mode 100755 (executable)
index 0000000..fd03a44
--- /dev/null
@@ -0,0 +1,63 @@
+#! /bin/sh
+# Merge pkg-config macros into Emacs sources.
+# Typical usage:
+#
+#      admin/merge-pkg-config
+
+# Copyright 2014 Free Software Foundation, Inc.
+
+# This file is part of GNU Emacs.
+
+# GNU Emacs is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU Emacs is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+# written by Paul Eggert
+
+{
+  # Maybe ACLOCAL_PATH is already set-up.
+  oIFS=$IFS
+  IFS=:
+  for dir in $ACLOCAL_PATH ''; do
+    test -n "$dir" && test -r "$dir/pkg.m4" && break
+  done
+  IFS=$oIFS
+
+  test -n "$dir"
+} || {
+  # Use the pkg.m4 installed where aclocal knows about it.
+  # Maybe we are running our own aclocal, which doesn't know where
+  # the standard pkg.m4 is installed, so try running all the
+  # aclocal programs in our PATH.
+  oIFS=$IFS
+  IFS=:
+  for dir in $PATH ''; do
+    if test -n "$dir" && test -x "$dir/aclocal"; then
+      dir=$("$dir/aclocal" --print-ac-dir) && test -r "$dir/pkg.m4" && break
+    fi
+  done
+  IFS=$oIFS
+
+  test -n "$dir"
+} || {
+  echo >&2 "$0: cannot find pkg.m4"
+  exit 1
+}
+
+test -d m4 || {
+  echo >&2 "$0: please run this command in the main source directory"
+  exit 1
+}
+
+echo >&2 "$0: copying $dir/pkg.m4 to m4/pkg.m4"
+
+cp $dir/pkg.m4 m4
index a1ef8f64133f1b9994d825eafab1904390b861d3..b962b370221f953d4f3e2d0d7a9cce264d85fdeb 100644 (file)
@@ -307,6 +307,18 @@ When finished, use
 
 or simply delete the entire branch if you created it just for this.
 
+** Some tips for speeding up bisections:
+
+*** Use ./configure --without-all --cache-file=/tmp/config.cache
+(assuming the thing you are testing for does not need a feature that
+--without-all disables).
+
+*** Rather than `make', use `make -C lib && make -C src bootstrap-emacs
+&& make -C src emacs', to avoid compiling the non-essential lisp files
+(unless the thing you are testing for only shows up in compiled files;
+if so compile just the relevant ones).  Obviously use whatever make -j
+option is appropriate for your system.
+
 * Commit emails
 
 ** Old method: bzr-hookless-email
@@ -388,3 +400,11 @@ and skipping the branch.  See:
  http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg00436.html
 
 which includes a provisional patch to git-remote-bzr to do that.
+
+** remote name
+
+Although Git itself is agnostic about what names you choose for
+the remote repo, it seems git-bzr is more likely to get confused.
+After the clone as described above, the remote name is "origin";
+changing it is Not Recommended.  [Insert 9-hour high-entropy then
+mysterious bug w/ JSON parsing errors anecdote here. --ttn]
index 1025cfc217fbee8a1489399c8d9aefd06286ece8..e8158060e7025ec2abaa2f1f2f549ec0e82a3b57 100644 (file)
@@ -1,3 +1,12 @@
+Emacs generally follows the GNU coding standards when it comes to ChangeLogs:
+http://www.gnu.org/prep/standards/html_node/Change-Logs.html
+
+One exception is that we still sometimes quote `like-this' (as the
+standards used to recommend) rather than 'like-this' (as they do now),
+because `...' is so widely used elsewhere in Emacs.
+http://lists.gnu.org/archive/html/emacs-devel/2014-05/msg00514.html
+
+
 If installing changes written by someone else, make the ChangeLog
 entry in their name, not yours.
 
index a54bcb6108bb82dcd5dd69221e79be3c7d705c05..77ca913701564b90a3d9663bc1b22bca9d847876 100644 (file)
@@ -137,7 +137,10 @@ GNUstep/Emacs.base/Resources/Info-gnustep.plist
 aclocal.m4
 configure
 m4/*.m4
- - copyright FSF, with unlimited permission to copy, distribute and modify
+ - These files are copyright FSF, with unlimited permission to copy,
+   distribute and modify, so long as the copyright notice is preserved.
+   Exception: m4/pkg.m4 is copyright Scott James Remnant; it is
+   distributed under the same terms as for the rest of Emacs.
 
 lib/Makefile.in
  - copyright FSF, with MIT-like license
@@ -161,13 +164,6 @@ etc/letter.pbm,letter.xpm
 etc/FTP, ORDERS
   - trivial (at time of writing), no license needed
 
-etc/GNU, INTERVIEW, LINUX-GNU, MOTIVATION, SERVICE, THE-GNU-PROJECT,
-WHY-FREE
-  rms: "These are statements of opinion or testimony. Their licenses
-  should permit verbatim copying only. Please don't change the
-  licenses that they have. They are distributed with Emacs but they
-  are not part of Emacs."
-
 etc/HELLO
   standard notices. Just a note that although the file itself is not
   really copyrightable, in the wider context of it being part of
@@ -320,11 +316,6 @@ licensing@fsf.org starting on Thu, 07 Aug 2003 with subject:
 "[gnu.org #58812] Changing license of MH-E manual"
 
 
-msdos/is_exec.c, sigaction.c - these files are copyright DJ Delorie.
-Leave the copyrights alone. Leave the Eli Zaretskii copyright in
-is_exec.c alone. See the msdos/README file for the legal history of
-these files.
-
 msdos/sed*.inp - These files are copyright FSF and distributed under
 an MIT-like license.
 
@@ -567,8 +558,7 @@ oldXMenu/insque.c (rms: "We wrote that specifically for Emacs, so
 definitely relicense that.").
 
 2. The files that are copyright FSF and AIST, or AIST alone, should be
-and were updated, ditto the oldXMenu files with FSF copyright, and
-msdos/is_exec.c and sigaction.c.
+and were updated, ditto the oldXMenu files with FSF copyright.
 
 3. lwlib/
 
index cad6862c8aa83a781e802122ef9b456a9cf66448..96337e4c8ddd990a9f684574d242bd842b65063b 100644 (file)
@@ -1,35 +1,28 @@
 ttn 2004-05-09
 
-The exit value of a program returning to the shell on unixoid systems is
-typically 0 for success, and non-0 (such as 1) for failure.  For vms it is
-odd (1,3,5...) for success, even (0,2,4...) for failure.
-
-This holds from the point of view of the "shell" (in quotes because vms has a
-different dispatch model that is not explained further here).
-
-From the point of view of the program, nowadays stdlib.h on both type of
-systems provides macros `EXIT_SUCCESS' and `EXIT_FAILURE' that should DTRT.
-
-NB: The numerical values of these macros DO NOT need to fulfill the exit
-value requirements outlined in the first paragraph!  That is the job of the
+The exit value of a program returning to the shell on unixoid systems
+is typically 0 for success, and non-0 (such as 1) for failure. This is
+not always the case on other systems.
+
+From the point of view of the program stdlib.h provides macros
+`EXIT_SUCCESS' and `EXIT_FAILURE' that should DTRT.  N.B. The
+numerical values of these macros DO NOT need to fulfill the exit value
+requirements outlined in the first paragraph!  That is the job of the
 `exit' function.  Thus, this kind of construct shows misunderstanding:
 
-   #ifdef VMS
+   #ifdef WEIRD_OS
       exit (1);
    #else
       exit (0);
    #endif
 
-Values aside from EXIT_SUCCESS and EXIT_FAILURE are tricky.
-
-
-
-ttn 2004-05-12
+Values aside from EXIT_SUCCESS and EXIT_FAILURE are tricky, but can be
+used to indicate finer gradations of failure.  If this is the only
+information available to the caller, clamping such values to
+EXIT_FAILURE loses information.  If there are other ways to indicate
+the problem to the caller (such as a message to stderr) it may be ok
+to clamp.  In all cases, it is the relationship between the program
+and its caller that must be examined.
 
-Values aside from EXIT_SUCCESS and EXIT_FAILURE can be used to indicate
-finer gradations of failure.  If this is the only information available
-to the caller, clamping such values to EXIT_FAILURE loses information.
-If there are other ways to indicate the problem to the caller (such as
-a message to stderr) it may be ok to clamp.  In all cases, it is the
-relationship between the program and its caller that must be examined.
-[Insert ZAMM quote here.]
+[Insert ZAMM quote here.] <-- I presume this refers to ``Zen and the
+Art of Motorcycle Maintenance'' - Reuben Thomas <rrt@sc3d.org>.
index cff619fd8b82d23b3abb6fb942bcf5f476d4ce0b..79e0e1d77e4657a9157a8ba9691adf24aa5d7303 100644 (file)
@@ -214,13 +214,6 @@ nontrivial changes to the build process.
 
        admin/charsets/mapfiles/cns2ucsdkw.txt
 
- * no-conversion
-
-     This file purposely contains arbitrary bytes interspersed within text,
-     to test whether the Emacs distribution is corrupted.
-
-       lib-src/testfile
-
  * iso-2022-7bit
 
      This file switches between CJK charsets, which is not encoded in UTF-8.
index f29d1cb377f330a0e42de86b527bc59067eefd35..5edc8d4d9adf06b677954bdd4bf0c128760bb7e9 100755 (executable)
@@ -30,7 +30,7 @@
 PUBLIC_LIBSRC_BINARIES='emacsclient etags ctags ebrowse'
 PUBLIC_LIBSRC_SCRIPTS='grep-changelog'
 
-AVOID="CVS -DIC README COPYING ChangeLog ~ [.]orig$ [.]rej$ Makefile$ Makefile.in$ makefile$ makefile.w32-in$ stamp-subdir [.]cvsignore [.]arch-ids [{]arch[}] [.][cho]$ make-docfile testfile test-distrib"
+AVOID="CVS -DIC README COPYING ChangeLog ~ [.]orig$ [.]rej$ Makefile$ Makefile.in$ makefile$ makefile.w32-in$ stamp-subdir [.]cvsignore [.]arch-ids [{]arch[}] [.][cho]$ make-docfile"
 
 # Prune old binaries lying around in the source tree
 PRUNE=no
index 3074864bb688fb5483a9371f1874b99ede2557b7..4649b3b339d2735529756798e47855e2498a0cb1 100644 (file)
@@ -28,53 +28,53 @@ top_srcdir = @top_srcdir@
 top_builddir = @top_builddir@
 
 EMACS = ${top_builddir}/src/emacs
-DSTDIR = ${top_srcdir}/lisp/international
+unidir = ${top_srcdir}/lisp/international
 emacs = "${EMACS}" -batch --no-site-file --no-site-lisp
 
-.PHONY: all compile install
+.PHONY: all unifiles
 
-all: ${top_srcdir}/src/macuvs.h ${DSTDIR}/charprop.el
+all: ${top_srcdir}/src/macuvs.h unifiles
 
-${top_srcdir}/src/macuvs.h: ${srcdir}/uvs.el ${srcdir}/IVD_Sequences.txt
-       ${EMACS} -batch -l "${srcdir}/uvs.el" \
+## Specify .elc as an order-only prereq so as to not needlessly rebuild
+## target just because the .elc is missing.
+## Same with charprop.el below.
+${top_srcdir}/src/macuvs.h: ${srcdir}/uvs.el ${srcdir}/IVD_Sequences.txt | \
+  ${srcdir}/uvs.elc
+       ${emacs} -L ${srcdir} -l uvs \
          --eval '(uvs-print-table-ivd "${srcdir}/IVD_Sequences.txt" "Adobe-Japan1")' \
          > $@
 
-.el.elc:
+%.elc: %.el
        ${emacs} -f batch-byte-compile $<
 
 unidata.txt: ${srcdir}/UnicodeData.txt
-       sed -e 's/\([^;]*\);\(.*\)/(#x\1 "\2")/' -e 's/;/" "/g' < ${srcdir}/UnicodeData.txt > $@
+       sed -e 's/\([^;]*\);\(.*\)/(#x\1 "\2")/' -e 's/;/" "/g' < $< > $@
 
-compile: ${srcdir}/unidata-gen.elc
+FORCE =
+FORCE:
+.PHONY: FORCE
 
-## Depend on .el rather than .elc so as not to needlessly rebuild
-## uni-*.el files just because .elc is missing.
-## Same for UnicodeData.txt v unidata.txt.
-${DSTDIR}/charprop.el: ${srcdir}/unidata-gen.el ${srcdir}/UnicodeData.txt
-       ${MAKE} ${MFLAGS} compile unidata.txt EMACS="${EMACS}"
+${unidir}/charprop.el: ${FORCE} ${srcdir}/unidata-gen.el ${srcdir}/UnicodeData.txt | \
+  ${srcdir}/unidata-gen.elc unidata.txt
        -if [ -f "$@" ]; then \
-         cd ${DSTDIR} && chmod +w charprop.el `sed -n 's/^;; FILE: //p' < charprop.el`; \
+         cd ${unidir} && chmod +w charprop.el `sed -n 's/^;; FILE: //p' < charprop.el`; \
        fi
        ${emacs} -L ${srcdir} -l unidata-gen -f unidata-gen-files \
-         ${srcdir} "${DSTDIR}"
+         ${srcdir} "${unidir}"
 
-## Like the above, but generate in PWD rather than lisp/international.
-charprop.el: ${srcdir}/unidata-gen.elc unidata.txt
-       ${emacs} -L ${srcdir} -l unidata-gen -f unidata-gen-files \
-         ${srcdir}
+## Check for deleted uni- files, and if any such, force a rebuild.
+## Perhaps a more elegant way would be for the previous rule
+## to generate a Makefile fragment explicitly listing the uni- files,
+## which this file could include.  If no fragment, rebuild everything.
+unifiles: ${unidir}/charprop.el
+       for f in `sed -n 's/^;; FILE: //p' < $<`; do \
+         [ -f ${unidir}/$$f ] || { ${MAKE} $< FORCE=FORCE || exit 1; break; };\
+       done
 
 .PHONY: clean bootstrap-clean distclean maintainer-clean extraclean
 
-install: charprop.el
-       cp charprop.el ${DSTDIR}
-       cp `sed -n 's/^;; FILE: //p' < charprop.el` ${DSTDIR}
-
 clean:
-       if test -f charprop.el; then \
-         rm -f `sed -n 's/^;; FILE: //p' < charprop.el`; \
-       fi
-       rm -f charprop.el ${srcdir}/*.elc unidata.txt
+       rm -f ${srcdir}/*.elc unidata.txt
 
 bootstrap-clean: clean
 
@@ -88,7 +88,7 @@ maintainer-clean: distclean
 ## Cf leim/ja-dic (which is much slower).
 extraclean:
        rm -f ${top_srcdir}/src/macuvs.h
-       if test -f ${DSTDIR}/charprop.el; then \
-         (cd ${DSTDIR} && rm -f `sed -n 's/^;; FILE: //p' < charprop.el`); \
-         rm -f ${DSTDIR}/charprop.el; \
+       if test -f ${unidir}/charprop.el; then \
+         (cd ${unidir} && rm -f `sed -n 's/^;; FILE: //p' < charprop.el`); \
+         rm -f ${unidir}/charprop.el; \
        fi
index fb9b6dccc72bd48018ab32660c4cec1b1a6a979a..ec4f9d154d28b7b1e7110f4a6d2f2439db3b7510 100644 (file)
@@ -88,6 +88,8 @@
 ;; CHAR-or-RANGE: a character code or a cons of character codes
 ;; PROPn: string representing the nth property value
 
+(eval-when-compile (require 'cl-lib))
+
 (defvar unidata-list nil)
 
 ;; Name of the directory containing files of Unicode Character Database.
@@ -923,11 +925,7 @@ is the character itself.")))
              (dotimes (i (length vec))
                (dolist (elt (aref vec i))
                  (if (symbolp elt)
-                     (let ((slot (assq elt word-list)))
-                       (if slot
-                           (setcdr slot (1+ (cdr slot)))
-                         (setcdr word-list
-                                 (cons (cons elt 1) (cdr word-list))))))))
+                      (cl-incf (alist-get elt (cdr word-list) 0)))))
              (set-char-table-range table (cons start limit) vec))))))
     (setq word-list (sort (cdr word-list)
                          #'(lambda (x y) (> (cdr x) (cdr y)))))
index 7559a5669744f5ffd1a34febbb572a4077f09780..4a17c7267124bb7b2c7d66c54fb7fab4e73b4395 100644 (file)
@@ -198,8 +198,8 @@ corresponding number."
   (let ((uvs-alist
         (with-temp-buffer
           (insert-file-contents filename)
-          (setq uvs-alist (uvs-alist-from-ivd collection-id
-                                              sequence-id-to-glyph-func)))))
+          (uvs-alist-from-ivd collection-id
+                              sequence-id-to-glyph-func))))
     (princ "/* Automatically generated by uvs.el.  */\n")
     (princ
      (format "static const unsigned char mac_uvs_table_%s_bytes[] =\n  {\n"
index b9511969a1503cf707dd0a3fbadca630071dafb4..ef0edfef50c0f6b6c74488be218ed892e387714d 100755 (executable)
@@ -47,6 +47,14 @@ cd $PD
 cd ../
 [ -d admin ] || die "Could not locate admin directory"
 
+if [ -d .bzr ]; then
+    vcs=bzr
+elif [ -d .git ]; then
+    vcs=git
+else
+    die "Cannot determine vcs"
+fi
+
 
 usage ()
 {
@@ -143,7 +151,10 @@ OPTIND=1
 ## Run status on inputs, list modified files on stdout.
 status ()
 {
-    bzr status -S "$@" >| $tempfile || die "bzr status error for $@"
+    local statflag="-S"
+    [ "$vcs" = "git" ] && statflag="-s"
+
+    $vcs status $statflag "$@" >| $tempfile || die "$vcs status error for $@"
 
     local stat file modified
 
@@ -217,8 +228,11 @@ commit ()
 
     echo "Committing..."
 
-    ## bzr status output is always relative to top-level, not PWD.
-    bzr commit -m "Auto-commit of $type files." "$@" || return $?
+    $vcs commit -m "Auto-commit of $type files." "$@" || return $?
+
+    [ "$vcs" = "git" ] && {
+        $vcs push || return $?
+    }
 
     echo "Committed files: $@"
 }                               # function commit
@@ -257,7 +271,7 @@ EOF
                 *-xtra.texi|*efaq-w32.texi) continue ;;
             esac
 
-            dircat=`sed -n -e 's/@value{emacsname}/Emacs/' -e 's/^@dircategory //p' $file`
+            dircat=$(sed -n -e 's/@value{emacsname}/Emacs/' -e 's/^@dircategory //p' $file)
 
             ## TODO warn about unknown topics (check-info in top-level
             ## Makefile does this).
@@ -291,7 +305,8 @@ EOF
 
     modified=$(status $basegen) || die
 
-    cd $oldpwd
+    ## bzr status output is always relative to top-level, not PWD.
+    [ "$vcs" = "bzr" ] && cd $oldpwd
 
     commit "generated" $modified || die "commit error"
 
@@ -307,15 +322,20 @@ EOF
 
 echo "Finding loaddef targets..."
 
-sed -n -e '/^AUTOGEN_VCS/,/^$/p' lisp/Makefile.in | \
-    sed -e '/AUTOGEN_VCS/d' -e '/^$/d' -e 's/\\//' \
-    >| $tempfile || die "sed error"
+find lisp -name '*.el' -exec grep '^;.*generated-autoload-file:' {} + | \
+    sed -e '/loaddefs\|esh-groups/d' -e 's|/[^/]*: "|/|' -e 's/"//g' \
+    >| $tempfile || die "Error finding targets"
 
 genfiles=
 
 while read genfile; do
 
-    [ -r lisp/$genfile ] || die "Unable to read $genfile"
+    ## Or we can just use sort -u when making tempfile...
+    case " $genfiles " in
+        *" $genfile "*) continue ;;
+    esac
+
+    [ -r $genfile ] || die "Unable to read $genfile"
 
     genfiles="$genfiles $genfile"
 done < $tempfile
@@ -354,17 +374,12 @@ make -C lisp "$@" autoloads EMACS=../src/bootstrap-emacs || die "make src error"
     cp $ldefs_in $ldefs_out || die "cp ldefs_boot error"
 
 
-cd lisp
-
 echo "Checking status of loaddef files..."
 
 ## It probably would be fine to just check+commit lisp/, since
 ## making autoloads should not effect any other files.  But better
 ## safe than sorry.
-modified=$(status $genfiles ${ldefs_out#lisp/}) || die
-
-
-cd ../
+modified=$(status $genfiles $ldefs_out) || die
 
 
 commit "loaddefs" $modified || die "commit error"
diff --git a/admin/versioning b/admin/versioning
new file mode 100644 (file)
index 0000000..da547ee
--- /dev/null
@@ -0,0 +1,49 @@
+GNU EMACS VERSIONING                                   -*- org -*-
+
+The version number scheme of Emacs, including how to determine when to
+bump various components of the version number, has evolved over the
+years.  This file defines the current method, explains why it was
+chosen, and lightly documents the previous schemes.  It was prompted
+by http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00872.html.
+
+Related info:
+- [[file:FOR-RELEASE][FOR-RELEASE]]
+- [[file:make-tarball.txt][make-tarball.txt]]
+
+* what: MAJOR.MINOR
+
+This has always been the case (see [[was]], below).  MINOR is 1 or more,
+usually, the exception being for pretest releases, where there is
+an additional trailing ".ALPHA" (e.g., 24.3.95 prior to 24.4).
+
+To determine any release's version, we follow this algorithm:
+
+- If MAJOR-CHANGES, increment MAJOR and set MINOR to 1.
+- Otherwise, increment MINOR.
+
+where MAJOR-CHANGES is defined roughly as the union of:
+
+- dropped support for IMPORTANT
+  - platforms (almost never happens)
+  - Emacs Lisp features
+  - non-programming features/packages
+- IMPORTANT additions and changes
+  - Emacs Lisp features
+  - non-programming features/packages
+
+and IMPORTANT is defined through discussion on the [[http://mail.gnu.org/archive/html/emacs-devel/][emacs-devel]]
+mailing list and/or private arm-twisting (although this latter
+method is somewhat discouraged :-D).
+
+* why
+
+People expect bumps in MINOR for "minor" changes.  This typically
+includes bugfixes, doc improvements, or fully-backward-compatible
+additions and changes, only.
+
+Anything else is actually IMPORTANT, to the user.  [Actually, who
+really knows what the user thinks?  I certainly don't. --ttn]
+
+* was
+
+TODO (be sure to include "ad-hoc" :-D)
index 6b7c647c4c56ff81aa98c2f0cdb03ddf9e6978de..48e6d19c69d6d6aec6aea0ee1368762c0450f41e 100755 (executable)
@@ -50,7 +50,7 @@ automake_min=`sed -n 's/^ *AM_INIT_AUTOMAKE(\([0-9\.]*\)).*/\1/p' configure.ac`
 get_version ()
 {
     ## Remove eg "./autogen.sh: line 50: autoconf: command not found".
-    $1 --version 2>&1 | sed -e '/not found/d' -n -e '1 s/.* \([1-9][0-9\.]*\).*/\1/p'
+    $1 --version 2>&1 | sed -e '/not found/d' -e 's/.* //' -n -e '1 s/\([0-9][0-9\.]*\).*/\1/p'
 }
 
 ## $1 = version string, eg "2.59"
@@ -76,7 +76,7 @@ minor_version ()
 check_version ()
 {
     ## Respect eg $AUTOMAKE if it is set, like autoreconf does.
-    uprog=`echo $1 | sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+    uprog=`echo $1 | sed -e 's/-/_/g' -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
 
     eval uprog=\$${uprog}
 
@@ -114,7 +114,9 @@ missing=
 
 for prog in $progs; do
 
-    eval min=\$${prog}_min
+    sprog=`echo "$prog" | sed 's/-/_/g'`
+
+    eval min=\$${sprog}_min
 
     echo "Checking for $prog (need at least version $min)..."
 
@@ -133,7 +135,7 @@ for prog in $progs; do
 
     if [ $retval -ne 0 ]; then
         missing="$missing $prog"
-        eval ${prog}_why=\""$stat"\"
+        eval ${sprog}_why=\""$stat"\"
     fi
 
 done
@@ -147,7 +149,9 @@ Building Emacs from Bzr requires the following specialized programs:
 EOF
 
     for prog in $progs; do
-        eval min=\$${prog}_min
+        sprog=`echo "$prog" | sed 's/-/_/g'`
+
+        eval min=\$${sprog}_min
 
         echo "$prog (minimum version $min)"
     done
@@ -159,7 +163,9 @@ Your system seems to be missing the following tool(s):
 EOF
 
     for prog in $missing; do
-        eval why=\$${prog}_why
+        sprog=`echo "$prog" | sed 's/-/_/g'`
+
+        eval why=\$${sprog}_why
 
         echo "$prog ($why)"
     done
@@ -188,7 +194,7 @@ this script.
 If you know that the required versions are in your PATH, but this
 script has made an error, then you can simply run
 
-autoreconf -i -I m4
+autoreconf -fi -I m4
 
 instead of this script.
 
@@ -198,17 +204,19 @@ EOF
     exit 1
 fi
 
-echo "Your system has the required tools, running autoreconf..."
+echo 'Your system has the required tools.'
+echo "Running 'autoreconf -fi -I m4' ..."
 
 
 ## Let autoreconf figure out what, if anything, needs doing.
-autoreconf -i -I m4 || exit $?
+## Use autoreconf's -f option in case autoreconf itself has changed.
+autoreconf -fi -I m4 || exit $?
 
 ## Create a timestamp, so that './autogen.sh; make' doesn't
 ## cause 'make' to needlessly run 'autoheader'.
 echo timestamp > src/stamp-h.in || exit
 
-echo "You can now run \`./configure'."
+echo "You can now run './configure'."
 
 exit 0
 
index cc354478ee985a5de263bf1a36c79f75f990c272..67ad3715381a9f92c34f41a12f574a5ff4012b70 100644 (file)
@@ -22,10 +22,10 @@ rem   ----------------------------------------------------------------------
 rem   YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS:\r
 rem\r
 rem   + msdos version 3 or better.\r
-rem   + DJGPP version 2.0 or later (version 2.03 or later recommended).\r
+rem   + DJGPP version 2.02 or later (version 2.03 or later recommended).\r
 rem   + make utility that allows breaking of the 128 chars limit on\r
 rem     command lines.  ndmake (as of version 4.5) won't work due to a\r
-rem     line length limit.  The make that comes with DJGPP does work (and is\r
+rem     line length limit.  The DJGPP port of make works (and is\r
 rem     recommended).\r
 rem   + rm, mv, and cp (from GNU file utilities).\r
 rem   + sed (you can use the port that comes with DJGPP).\r
@@ -109,7 +109,7 @@ Goto End
 :djgppOk\r
 echo int main()           >junk.c\r
 echo #ifdef __DJGPP__    >>junk.c\r
-echo {return (__DJGPP__)*10;} >>junk.c\r
+echo {return (__DJGPP__)*10 + (__DJGPP_MINOR__);} >>junk.c\r
 echo #else               >>junk.c\r
 echo #ifdef __GO32__     >>junk.c\r
 echo {return 10;}         >>junk.c\r
@@ -126,8 +126,8 @@ Echo To compile 'Emacs' under MS-DOS you MUST have DJGPP installed!
 Goto End\r
 :go32Ok\r
 set djgpp_ver=2\r
-If Not ErrorLevel 20 Echo To build 'Emacs' you need DJGPP v2.0 or later!\r
-If Not ErrorLevel 20 Goto End\r
+If Not ErrorLevel 22 Echo To build 'Emacs' you need DJGPP v2.02 or later!\r
+If Not ErrorLevel 22 Goto End\r
 rm -f junk.c junk junk.exe\r
 rem DJECHO is used by the top-level Makefile in the v2.x build\r
 Echo Checking whether 'djecho' is available...\r
@@ -135,7 +135,6 @@ redir -o Nul -eo djecho -o junk.$$$ foo
 If Exist junk.$$$ Goto djechoOk\r
 Echo To build 'Emacs' you need the 'djecho.exe' program!\r
 Echo 'djecho.exe' is part of 'djdevNNN.zip' basic DJGPP development kit.\r
-Echo Versions of DJGPP before 2.02 called this program 'echo.exe'.\r
 Echo Either unpack 'djecho.exe' from the 'djdevNNN.zip' archive,\r
 Echo or, if you have 'echo.exe', copy it to 'djecho.exe'.\r
 Echo Then run CONFIG.BAT again with the same arguments you did now.\r
index 185518b16a84a9545692edbf189b71118b451bc9..9757e4ff205afdd5420705405a8651878beb0701 100644 (file)
@@ -22,24 +22,8 @@ dnl  You should have received a copy of the GNU General Public License
 dnl  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 AC_PREREQ(2.65)
-AC_INIT(emacs, 24.3.94)
-
-dnl We get MINGW64 with MSYS2
-if test "x$MSYSTEM" = "xMINGW32" -o "x$MSYSTEM" = "xMINGW64"
-then
-  . $srcdir/nt/mingw-cfg.site
-
-  case $srcdir in
-    /* | ?:*)
-      # srcdir is an absolute path.  In this case, force the format
-      # "/c/foo/bar", to simplify later conversions to native Windows
-      # format ("c:/foo/bar")
-      srcdir=`cd "${srcdir}" && pwd -W`
-      # 'eval' pacifies strict POSIX non-MinGW shells (Bug#18612).
-      eval 'srcdir="/${srcdir:0:1}${srcdir:2}"'
-      ;;
-  esac
-fi
+dnl Note this is parsed by (at least) make-dist and lisp/cedet/ede/emacs.el.
+AC_INIT(GNU Emacs, 25.0.50, bug-gnu-emacs@gnu.org)
 
 dnl Set emacs_config_options to the options of 'configure', quoted for the shell,
 dnl and then quoted again for a C string.  Separate options with spaces.
@@ -83,13 +67,16 @@ done
 AC_CONFIG_HEADERS(src/config.h:src/config.in)
 AC_CONFIG_SRCDIR(src/lisp.h)
 AC_CONFIG_AUX_DIR(build-aux)
+dnl automake 1.13 and later understand this, making -I m4 unnecessary.
+dnl With older versions this is a no-op.
+AC_CONFIG_MACRO_DIR(m4)
 
 xcsdkdir=
 AC_CHECK_PROGS(XCRUN, [xcrun])
 if test -n "$XCRUN"; then
   if test -z "$MAKE"; then
     dnl Call the variable MAKE_PROG, not MAKE, to avoid confusion with
-    dnl SET_MAKE and with the usual MAKE variable that 'make' itself uses.
+    dnl the usual MAKE variable that 'make' itself uses.
     AC_CHECK_PROG([MAKE_PROG], [make], [yes])
     if test -z "$MAKE_PROG"; then
       MAKE="$XCRUN MAKE"
@@ -99,9 +86,77 @@ if test -n "$XCRUN"; then
   fi
 fi
 
+dnl GNU Make is required, so don't test for its individual features.
+am_cv_make_support_nested_variables=yes
+AC_DEFUN([AC_PROG_MAKE_SET],
+  [SET_MAKE=
+   AC_SUBST([SET_MAKE])])
+
+dnl Check for GNU Make and possibly set MAKE before running AM_INIT_AUTOMAKE.
+[emacs_check_gnu_make ()
+{
+  emacs_makeout=`($1 --version) 2>/dev/null` &&
+  case $emacs_makeout in
+    'GNU Make '3.8[1-9]* | 'GNU Make '3.9[0-9]* | \
+    'GNU Make '3.[1-9][0-9][0-9]* | 'GNU Make '[4-9]* | 'GNU Make '[1-9][0-9]* )
+       ac_path_MAKE_found=:;;
+  esac
+}]
+AC_CACHE_CHECK([for GNU Make], [ac_cv_path_MAKE],
+  [ac_path_MAKE_found=false
+   if test -n "$MAKE"; then
+     emacs_check_gnu_make "$MAKE"
+     ac_cv_path_MAKE=$MAKE
+   else
+     emacs_tried_make=false
+     emacs_tried_gmake=false
+     emacs_tried_gnumake=false
+     AC_PATH_PROGS_FEATURE_CHECK([MAKE], [make gmake gnumake],
+       [[emacs_check_gnu_make "$ac_path_MAKE"
+        if $ac_path_MAKE_found; then
+          # Use the fully-qualified program name only if the basename
+          # would not resolve to it.
+          if eval \$emacs_tried_$ac_prog; then
+            ac_cv_path_MAKE=$ac_path_MAKE
+          else
+            ac_cv_path_MAKE=$ac_prog
+          fi
+        fi
+        eval emacs_tried_$ac_prog=:]])
+   fi])
+$ac_path_MAKE_found || {
+AC_MSG_ERROR([[Building Emacs requires GNU Make, at least version 3.81.
+If you have it installed under another name, configure with 'MAKE=...'.
+For example, run '$0 MAKE=gnu-make'.]])
+}
+MAKE=$ac_cv_path_MAKE
+export MAKE
+
 dnl Fairly arbitrary, older versions might work too.
 AM_INIT_AUTOMAKE(1.11)
 
+dnl Canonicalize the configuration name.
+AC_CANONICAL_HOST
+canonical=$host
+configuration=${host_alias-${build_alias-$host}}
+
+dnl We get MINGW64 with MSYS2, MINGW32 with MSYS.
+case $canonical in
+ *-mingw*)
+  . $srcdir/nt/mingw-cfg.site
+
+  case $srcdir in
+    /* | ?:*)
+      # srcdir is an absolute path.  In this case, force the format
+      # "/c/foo/bar", to simplify later conversions to native Windows
+      # format ("c:/foo/bar").
+      srcdir=`cd "${srcdir}" && pwd -W`
+      # 'eval' pacifies strict POSIX non-MinGW shells (Bug#18612).
+      eval 'srcdir="/${srcdir:0:1}${srcdir:2}"'
+      ;;
+  esac;;
+esac
+
 dnl Support for --program-prefix, --program-suffix and
 dnl --program-transform-name options
 AC_ARG_PROGRAM
@@ -200,7 +255,7 @@ AC_ARG_WITH([mailhost],[AS_HELP_STRING([--with-mailhost=HOSTNAME],
 
 AC_ARG_WITH([sound],[AS_HELP_STRING([--with-sound=VALUE],
   [compile with sound support (VALUE one of: yes, alsa, oss, bsd-ossaudio, no;
-default yes).  Only for GNU/Linux, FreeBSD, NetBSD, MinGW.])],
+default yes).  Only for GNU/Linux, FreeBSD, NetBSD, MinGW, Cygwin.])],
   [ case "${withval}" in
       yes|no|alsa|oss|bsd-ossaudio) val=$withval ;;
       *) AC_MSG_ERROR([`--with-sound=$withval' is invalid;
@@ -294,6 +349,9 @@ otherwise for the first of `gfile' or `inotify' that is usable.])
 dnl http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01844.html
 OPTION_DEFAULT_ON([makeinfo],[don't require makeinfo for building manuals])
 
+## This might be a 'configure' arg.
+AC_SUBST([ACLOCAL_PATH])
+
 ## Makefile.in needs the cache file name.
 AC_SUBST(cache_file)
 
@@ -303,15 +361,6 @@ OPTION_DEFAULT_ON([compress-install],
   [don't compress some files (.el, .info, etc.) when installing.  Equivalent to:
 make GZIP_PROG= install])
 
-AC_ARG_WITH([pkg-config-prog],dnl
-[AS_HELP_STRING([--with-pkg-config-prog=FILENAME],
-                  [file name of pkg-config for finding GTK and librsvg])])
-if test "X${with_pkg_config_prog}" != X; then
-   if test "${with_pkg_config_prog}" != yes; then
-      PKG_CONFIG="${with_pkg_config_prog}"
-   fi
-fi
-
 AC_ARG_WITH(gameuser,dnl
 [AS_HELP_STRING([--with-gameuser=USER],[user for shared game score files])])
 test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \
@@ -443,8 +492,7 @@ AC_SUBST(PROFILING_CFLAGS)
 AC_ARG_ENABLE(autodepend,
 [AS_HELP_STRING([--enable-autodepend],
                [automatically generate dependencies to .h-files.
-                Requires GNU Make and Gcc. Enabled if GNU Make and Gcc is
-                found])],
+                Requires gcc, enabled if found.])],
 [ac_enable_autodepend="${enableval}"],[ac_enable_autodepend=yes])
 
 AC_ARG_ENABLE(gtk-deprecation-warnings,
@@ -452,12 +500,6 @@ AC_ARG_ENABLE(gtk-deprecation-warnings,
                [Show Gtk+/Gdk deprecation warnings for Gtk+ >= 3.0])],
 [ac_enable_gtk_deprecation_warnings="${enableval}"],[])
 
-### Canonicalize the configuration name.
-
-AC_CANONICAL_HOST
-canonical=$host
-configuration=${host_alias-${build_alias-$host}}
-
 dnl This used to use changequote, but, apart from `changequote is evil'
 dnl per the autoconf manual, we can speed up autoconf somewhat by quoting
 dnl the great gob of text.  Thus it's not processed for possible expansion.
@@ -515,7 +557,7 @@ case "${canonical}" in
   *-apple-darwin* )
     case "${canonical}" in
       i[3456]86-* )  ;;
-      powerpc-* )    ;;
+      powerpc-* )    unported=yes ;;
       x86_64-* )     ;;
       * )            unported=yes ;;
     esac
@@ -581,10 +623,13 @@ case "${canonical}" in
                opsys=sol2-10
                emacs_check_sunpro_c=yes
                ;;
+      *-sunos5.[1-5]* | *-solaris2.[1-5]* ) unported=yes ;;
+      ## Note that Emacs 23.1's NEWS said the following would be dropped.
       *-sunos5.6* | *-solaris2.6* )
                opsys=sol2-6
                RANLIB="ar -ts"
                ;;
+      ## 5.7 EOL Aug 2008, 5.8 EOL Mar 2012.
       *-sunos5.[7-9]* | *-solaris2.[7-9]* )
                opsys=sol2-6
                emacs_check_sunpro_c=yes
@@ -607,7 +652,7 @@ case "${canonical}" in
   i[3456]86-*-* )
     case "${canonical}" in
       *-darwin* )               opsys=darwin ;;
-      *-mingw32 )
+      *-mingw* )
                opsys=mingw32
                # MinGW overrides and adds some system headers in nt/inc.
                GCC_TEST_OPTIONS="-I $srcdir/nt/inc"
@@ -622,7 +667,7 @@ case "${canonical}" in
   # MinGW64
   x86_64-*-* )
     case "${canonical}" in
-      *-mingw32 )
+      *-mingw* )
                opsys=mingw32
                # MinGW overrides and adds some system headers in nt/inc.
                GCC_TEST_OPTIONS="-I $srcdir/nt/inc"
@@ -656,13 +701,23 @@ dnl quotation ends
 
 if test $unported = yes; then
   AC_MSG_ERROR([Emacs does not support `${canonical}' systems.
-If you think it should, please send a report to bug-gnu-emacs@gnu.org.
+If you think it should, please send a report to ${PACKAGE_BUGREPORT}.
 Check `etc/MACHINES' for recognized configuration names.])
 fi
 
+case "$canonical" in
+  *-apple-darwin* )
+  x="`uname -r`"
+    case "$x" in
+      [[0-9]].*) AC_MSG_ERROR([OSX 10.6 or later required]) ;;
+    esac
+esac
 
 #### Choose a compiler.
 
+dnl Don't bother to test for C89.
+AC_DEFUN([_AC_PROG_CC_C89], [$2])
+
 dnl Sets GCC=yes if using gcc.
 AC_PROG_CC([gcc cc cl clang "$XCRUN gcc" "$XCRUN clang"])
 if test -n "$XCRUN"; then
@@ -670,6 +725,9 @@ if test -n "$XCRUN"; then
   test -n "$AR" && export AR
 fi
 
+dnl Emacs needs C99 or later.
+gl_PROG_CC_C99
+
 AM_PROG_CC_C_O
 
 if test x$GCC = xyes; then
@@ -688,8 +746,6 @@ AC_DEFUN([gl_CRYPTO_CHECK])
 # Avoid gnulib's tests for HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW,
 # as we don't use them.
 AC_DEFUN([gl_FCNTL_O_FLAGS])
-# Avoid gnulib's threadlib module, as we do threads our own way.
-AC_DEFUN([gl_THREADLIB])
 
 # Initialize gnulib right after choosing the compiler.
 dnl Amongst other things, this sets AR and ARFLAGS.
@@ -755,41 +811,6 @@ AC_ARG_ENABLE([gcc-warnings],
   [gl_gcc_warnings=no]
 )
 
-AC_ARG_ENABLE(link-time-optimization,
-[AS_HELP_STRING([--enable-link-time-optimization],
-                [build emacs with link-time optimization.
-                This requires GCC 4.5.0 or later.
-                It also makes Emacs harder to debug, and when we tried it
-                with GCC 4.9.0 x86-64 it made Emacs slower, so it's not
-                recommended for typical use.])],
-if test "${enableval}" != "no"; then
-   AC_MSG_CHECKING([whether link-time optimization is supported])
-   ac_lto_supported=no
-   if test x$GCC = xyes; then
-      CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null`
-      if test x$CPUS != x; then
-        LTO="-flto=$CPUS"
-      else
-        LTO="-flto"
-      fi
-      old_CFLAGS=$CFLAGS
-      CFLAGS="$CFLAGS $LTO"
-      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
-       [ac_lto_supported=yes], [ac_lto_supported=no])
-      CFLAGS="$old_CFLAGS"
-   fi
-   AC_MSG_RESULT([$ac_lto_supported])
-   if test "$ac_lto_supported" = "yes"; then
-      CFLAGS="$CFLAGS $LTO"
-      dnl The following is needed for GCC 4.9.0.  The GCC 4.9.0 release notes
-      dnl suggest that instead of -ffat-lto-objects we should use gcc-ar and
-      dnl gcc-ranlib in place of ar and ranlib, but gcc-ar makes /usr/bin/ar
-      dnl dump core on Fedora 20, so play it safe for now.
-      gl_COMPILER_OPTION_IF([-ffat-lto-objects],
-       [CFLAGS="$CFLAGS -ffat-lto-objects"])
-   fi
-fi)
-
 # clang is unduly picky about some things.
 AC_CACHE_CHECK([whether the compiler is clang], [emacs_cv_clang],
   [AC_COMPILE_IFELSE(
@@ -811,6 +832,7 @@ if test "$gl_gcc_warnings" != yes; then
      gl_WARN_ADD([-Wno-switch])
      gl_WARN_ADD([-Wno-tautological-constant-out-of-range-compare])
      gl_WARN_ADD([-Wno-pointer-sign])
+     gl_WARN_ADD([-Wno-string-plus-int])
   fi
 else
   isystem='-isystem '
@@ -831,10 +853,8 @@ else
 
   nw="$nw -Wsystem-headers"         # Don't let system headers trigger warnings
   nw="$nw -Woverlength-strings"     # Not a problem these days
-  nw="$nw -Wlogical-op"             # any use of fwrite provokes this
   nw="$nw -Wformat-nonliteral"      # we do this a lot
-  nw="$nw -Wvla"                    # warnings in gettext.h
-  nw="$nw -Wnested-externs"         # use of XARGMATCH/verify_function__
+  nw="$nw -Wvla"                    # Emacs uses <vla.h>.
   nw="$nw -Wswitch-default"         # Too many warnings for now
   nw="$nw -Winline"                 # OK to ignore 'inline'
   nw="$nw -Wjump-misses-init"       # We sometimes safely jump over init.
@@ -851,7 +871,8 @@ else
   # Emacs's use of alloca inhibits protecting the stack.
   nw="$nw -Wstack-protector"
 
-  # The following line should be removable at some point.
+  # Emacs's use of partly-pure functions such as CHECK_TYPE make this
+  # option problematic.
   nw="$nw -Wsuggest-attribute=pure"
 
   # This part is merely for shortening the command line,
@@ -870,6 +891,7 @@ else
   for w in $ws; do
     gl_WARN_ADD([$w])
   done
+  gl_WARN_ADD([-Wredundant-decls])     # Prefer this, as we don't use Bison.
   gl_WARN_ADD([-Wno-missing-field-initializers]) # We need this one
   gl_WARN_ADD([-Wno-sign-compare])     # Too many warnings for now
   gl_WARN_ADD([-Wno-type-limits])      # Too many warnings for now
@@ -877,10 +899,6 @@ else
   gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now
   gl_WARN_ADD([-Wno-format-nonliteral])
 
-  # In spite of excluding -Wlogical-op above, it is enabled, as of
-  # gcc 4.5.0 20090517.
-  gl_WARN_ADD([-Wno-logical-op])
-
   # More things that clang is unduly picky about.
   if test $emacs_cv_clang = yes; then
     gl_WARN_ADD([-Wno-format-extra-args])
@@ -915,6 +933,72 @@ edit_cflags="
   s/^ //
 "
 
+AC_ARG_ENABLE(link-time-optimization,
+[AS_HELP_STRING([--enable-link-time-optimization],
+                [build emacs with link-time optimization.
+                This requires GCC 4.5.0 or later, or clang.
+                (Note that clang support is experimental - see INSTALL.)
+                It also makes Emacs harder to debug, and when we tried it
+                with GCC 4.9.0 x86-64 it made Emacs slower, so it's not
+                recommended for typical use.])],
+if test "${enableval}" != "no"; then
+   ac_lto_supported=no
+   if test $emacs_cv_clang = yes; then
+      AC_MSG_CHECKING([whether link-time optimization is supported by clang])
+      GOLD_PLUGIN=`$CC -print-file-name=LLVMgold.so 2>/dev/null`
+      if test -x "$GOLD_PLUGIN"; then
+        LTO="-flto"
+      fi
+   elif test x$GCC = xyes; then
+      AC_MSG_CHECKING([whether link-time optimization is supported by gcc])
+      CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null`
+      if test x$CPUS != x; then
+        LTO="-flto=$CPUS"
+      else
+        LTO="-flto"
+      fi
+   else
+      AC_MSG_ERROR([Link-time optimization is not supported with your compiler.])
+   fi
+   if test -z "$LTO"; then
+      ac_lto_supported=no
+   else
+      old_CFLAGS=$CFLAGS
+      CFLAGS="$CFLAGS $LTO"
+      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+         [ac_lto_supported=yes], [ac_lto_supported=no])
+         CFLAGS="$old_CFLAGS"
+   fi
+   AC_MSG_RESULT([$ac_lto_supported])
+   if test "$ac_lto_supported" = "yes"; then
+      CFLAGS="$CFLAGS $LTO"
+      if test x$emacs_cv_clang = xyes; then
+        AC_MSG_WARN([Please read INSTALL before using link-time optimization with clang])
+        # WARNING: 'ar --plugin ...' doesn't work without
+        # command, so plugin name is appended to ARFLAGS.
+        ARFLAGS="cru --plugin $GOLD_PLUGIN"
+        RANLIB="$RANLIB --plugin $GOLD_PLUGIN"
+      else
+        dnl The following is needed for GCC 4.9.0.  The GCC 4.9.0 release notes
+        dnl suggest that instead of -ffat-lto-objects we should use gcc-ar and
+        dnl gcc-ranlib in place of ar and ranlib, but gcc-ar makes /usr/bin/ar
+        dnl dump core on Fedora 20, so play it safe for now.
+        gl_COMPILER_OPTION_IF([-ffat-lto-objects],
+          [CFLAGS="$CFLAGS -ffat-lto-objects"])
+      fi
+   fi
+fi)
+
+dnl Port to Automake 1.11.
+dnl This section can be removed once we assume Automake 1.14 or later.
+: ${AM_DEFAULT_VERBOSITY=1}
+: ${AM_V=$AM_DEFAULT_VERBOSITY}
+: ${AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY}
+AC_SUBST([AM_V])
+AM_SUBST_NOTMAKE([AM_V])
+AC_SUBST([AM_DEFAULT_V])
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])
+AC_SUBST([AM_DEFAULT_VERBOSITY])
 
 dnl Some other nice autoconf tests.
 dnl These are commented out, since gl_EARLY and/or Autoconf already does them.
@@ -1023,15 +1107,16 @@ if test $opsys = gnu-linux; then
 fi
 
 ## Need makeinfo >= 4.7 (?) to build the manuals.
-AC_PATH_PROG(MAKEINFO, makeinfo, no)
-dnl By this stage, configure has already checked for egrep and set EGREP,
-dnl or exited with an error if no egrep was found.
 if test "$MAKEINFO" != "no"; then
-  case `
-    $MAKEINFO --version 2> /dev/null |
-    $EGREP 'texinfo[[^0-9]]*([[1-4]][[0-9]]+|[[5-9]]|4\.[[7-9]]|4\.[[1-6]][[0-9]]+)'
-  ` in
-    '') MAKEINFO=no;;
+  if test "$MAKEINFO" = "${am_missing_run}makeinfo"; then
+    MAKEINFO=makeinfo
+  fi
+  case `($MAKEINFO --version) 2>/dev/null` in
+    *' (GNU texinfo) '4.[[7-9]]* | \
+    *' (GNU texinfo) '4.[[1-9][0-9]]* | \
+    *' (GNU texinfo) '[[5-9]]* | \
+    *' (GNU texinfo) '[[1-9][0-9]]* ) ;;
+    *) MAKEINFO=no;;
   esac
 fi
 
@@ -1059,12 +1144,6 @@ with the `--without-makeinfo' option to build without the manuals.] )
 fi
 AC_SUBST(HAVE_MAKEINFO)
 
-dnl Just so that there is only a single place we need to edit.
-INFO_EXT=.info
-INFO_OPTS=--no-split
-AC_SUBST(INFO_EXT)
-AC_SUBST(INFO_OPTS)
-
 if test $opsys = mingw32; then
    DOCMISC_W32=efaq-w32
 else
@@ -1261,7 +1340,7 @@ test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
   C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
 if test "$opsys" = "mingw32"; then
   case "$canonical" in
-    x86_64-*-mingw32) C_SWITCH_SYSTEM="-mtune=generic" ;;
+    x86_64-*-mingw*) C_SWITCH_SYSTEM="-mtune=generic" ;;
     *) C_SWITCH_SYSTEM="-mtune=pentium4" ;;
   esac
 fi
@@ -1295,13 +1374,22 @@ else
   CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
 fi
 
-# Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better.
+# Suppress obsolescent Autoconf test for size_t; Emacs assumes C99 or better.
 AC_DEFUN([AC_TYPE_SIZE_T])
 # Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them.
 AC_DEFUN([AC_TYPE_UID_T])
 
+# sqrt and other floating-point functions such as fmod and frexp
+# are found in -lm on many systems.
+OLD_LIBS=$LIBS
+AC_SEARCH_LIBS([sqrt], [m])
+if test "X$LIBS" = "X$OLD_LIBS"; then
+  LIB_MATH=
+else
+  LIB_MATH=$ac_cv_search_sqrt
+fi
+LIBS=$OLD_LIBS
 
-LIB_MATH=-lm
 dnl Current possibilities handled by sed (aix4-2 -> aix,
 dnl gnu-linux -> gnu/linux, etc.):
 dnl gnu, gnu/linux, gnu/kfreebsd, aix, cygwin, darwin, hpux, irix.
@@ -1346,59 +1434,24 @@ AC_DEFINE_UNQUOTED(SYSTEM_TYPE, "$SYSTEM_TYPE",
 pre_PKG_CONFIG_CFLAGS=$CFLAGS
 pre_PKG_CONFIG_LIBS=$LIBS
 
-AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-
-dnl This function definition taken from Gnome 2.0
-dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
-dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
-dnl also defines GSTUFF_PKG_ERRORS on error
-AC_DEFUN([PKG_CHECK_MODULES], [
-  succeeded=no
-
-  if test "$PKG_CONFIG" = "no" ; then
-     ifelse([$4], , [AC_MSG_ERROR([
-      *** The pkg-config script could not be found. Make sure it is in your path, or give the full name of pkg-config with the PKG_CONFIG environment variable or --with-pkg-config-prog.  Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config.])], [$4])
-  else
-     PKG_CONFIG_MIN_VERSION=0.9.0
-     if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
-        AC_MSG_CHECKING(for $2)
-
-        if "$PKG_CONFIG" --exists "$2" 2>&AS_MESSAGE_LOG_FD &&
-          $1_CFLAGS=`"$PKG_CONFIG" --cflags "$2" 2>&AS_MESSAGE_LOG_FD` &&
-          $1_LIBS=`"$PKG_CONFIG" --libs "$2" 2>&AS_MESSAGE_LOG_FD`; then
-           $1_CFLAGS=`AS_ECHO(["$$1_CFLAGS"]) | sed -e "$edit_cflags"`
-           $1_LIBS=`AS_ECHO(["$$1_LIBS"]) | sed -e 's,///*,/,g'`
-            AC_MSG_RESULT([yes CFLAGS='$$1_CFLAGS' LIBS='$$1_LIBS'])
-            succeeded=yes
-        else
-            AC_MSG_RESULT(no)
-            $1_CFLAGS=""
-            $1_LIBS=""
-            ## If we have a custom action on failure, don't print errors, but
-           ## do set a variable so people can do so.  Do it in a subshell
-           ## to capture any diagnostics in invoking pkg-config.
-           $1_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$2") 2>&1`
-           ifelse([$4], ,echo "$$1_PKG_ERRORS",)
-        fi
-
-        AC_SUBST($1_CFLAGS)
-        AC_SUBST($1_LIBS)
-     else
-        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
-        echo "*** See http://www.freedesktop.org/software/pkgconfig"
-     fi
-  fi
-
-  if test $succeeded = yes; then
-     ifelse([$3], , :, [$3])
-  else
-     ifelse([$4], , [AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.])], [$4])
-  fi
-])
+PKG_PROG_PKG_CONFIG(0.9.0)
+
+dnl EMACS_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4)
+dnl acts like PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4,
+dnl HAVE_GSTUFF=yes, HAVE_GSTUFF=no) -- see pkg-config man page --
+dnl except that it postprocesses CFLAGS as needed for --enable-gcc-warnings.
+dnl EMACS_CHECK_MODULES accepts optional 3rd and 4th arguments that
+dnl can take the place of the default HAVE_GSTUFF=yes and HAVE_GSTUFF=no
+dnl actions.
+AC_DEFUN([EMACS_CHECK_MODULES],
+  [PKG_CHECK_MODULES([$1], [$2],
+     [$1_CFLAGS=`AS_ECHO(["$$1_CFLAGS"]) | sed -e "$edit_cflags"`
+      m4_default([$3], [HAVE_$1=yes])],
+     [m4_default([$4], [HAVE_$1=no])])])
 
 HAVE_SOUND=no
 if test "${with_sound}" != "no"; then
-  # Sound support for GNU/Linux, the free BSDs, and MinGW.
+  # Sound support for GNU/Linux, the free BSDs, MinGW, and Cygwin.
   AC_CHECK_HEADERS([machine/soundcard.h sys/soundcard.h soundcard.h mmsystem.h],
     have_sound_header=yes, [], [
     #ifdef __MINGW32__
@@ -1422,7 +1475,7 @@ if test "${with_sound}" != "no"; then
   if test "${with_sound}" = "alsa" || test "${with_sound}" = "yes"; then
     ALSA_REQUIRED=1.0.0
     ALSA_MODULES="alsa >= $ALSA_REQUIRED"
-    PKG_CHECK_MODULES(ALSA, $ALSA_MODULES, HAVE_ALSA=yes, HAVE_ALSA=no)
+    EMACS_CHECK_MODULES([ALSA], [$ALSA_MODULES])
     if test $HAVE_ALSA = yes; then
       SAVE_CFLAGS="$CFLAGS"
       SAVE_LIBS="$LIBS"
@@ -1461,7 +1514,7 @@ if test "${with_sound}" != "no"; then
      case "$opsys" in
        dnl defined __FreeBSD__ || defined __NetBSD__ || defined __linux__
        dnl Adjust the --with-sound help text if you change this.
-       gnu-linux|freebsd|netbsd|mingw32)
+       gnu-linux|freebsd|netbsd|mingw32|cygwin)
          AC_DEFINE(HAVE_SOUND, 1, [Define to 1 if you have sound support.])
          HAVE_SOUND=yes
          ;;
@@ -1474,6 +1527,7 @@ fi
 dnl checks for header files
 AC_CHECK_HEADERS_ONCE(
   sys/systeminfo.h
+  sys/sysinfo.h
   coff.h pty.h
   sys/resource.h
   sys/utsname.h pwd.h utmp.h util.h)
@@ -1489,6 +1543,26 @@ if test $emacs_cv_personality_linux32 = yes; then
             [Define to 1 if personality LINUX32 can be set.])
 fi
 
+# Note that Solaris has sys/sysinfo.h which defines struct
+# sysinfo as well.  To make sure that we're using GNU/Linux
+# sysinfo, we explicitly set one of its fields.
+if test "$ac_cv_header_sys_sysinfo_h" = yes; then
+  AC_MSG_CHECKING([if Linux sysinfo may be used])
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/sysinfo.h>]],
+                                     [[struct sysinfo si;
+                                       si.totalram = 0;
+                                       sysinfo (&si)]])],
+    emacs_cv_linux_sysinfo=yes, emacs_cv_linux_sysinfo=no)
+  AC_MSG_RESULT($emacs_cv_linux_sysinfo)
+  if test $emacs_cv_linux_sysinfo = yes; then
+    AC_DEFINE([HAVE_LINUX_SYSINFO], 1, [Define to 1 if you have Linux sysinfo function.])
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/sysinfo.h>]],
+                                       [[struct sysinfo si; return si.mem_unit]])],
+      AC_DEFINE(LINUX_SYSINFO_UNIT, 1,
+                [Define to 1 if Linux sysinfo sizes are in multiples of mem_unit bytes.]))
+  fi
+fi
+
 dnl On Solaris 8 there's a compilation warning for term.h because
 dnl it doesn't define `bool'.
 AC_CHECK_HEADERS(term.h, , , -)
@@ -1533,32 +1607,20 @@ dnl Check for endianness.
 dnl AC_C_BIGENDIAN is done by gnulib.
 
 dnl check for Make feature
-dnl AC_PROG_MAKE_SET is done by Automake.
 
 DEPFLAGS=
 MKDEPDIR=":"
 deps_frag=deps.mk
-dnl check for GNU Make if we have GCC and autodepend is on.
+dnl check if we have GCC and autodepend is on.
 if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
-   AC_MSG_CHECKING([whether we are using GNU Make])
-   HAVE_GNU_MAKE=no
-   testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'`
-   if test "x$testval" != x; then
-      HAVE_GNU_MAKE=yes
-   else
-      ac_enable_autodepend=no
-   fi
-   AC_MSG_RESULT([$HAVE_GNU_MAKE])
-   if test $HAVE_GNU_MAKE = yes; then
-      AC_MSG_CHECKING([whether gcc understands -MMD -MF])
-      SAVE_CFLAGS="$CFLAGS"
-      CFLAGS="$CFLAGS -MMD -MF deps.d -MP"
-      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], , ac_enable_autodepend=no)
-      CFLAGS="$SAVE_CFLAGS"
-      test -f deps.d || ac_enable_autodepend=no
-      rm -rf deps.d
-      AC_MSG_RESULT([$ac_enable_autodepend])
-   fi
+   AC_MSG_CHECKING([whether gcc understands -MMD -MF])
+   SAVE_CFLAGS="$CFLAGS"
+   CFLAGS="$CFLAGS -MMD -MF deps.d -MP"
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], , ac_enable_autodepend=no)
+   CFLAGS="$SAVE_CFLAGS"
+   test -f deps.d || ac_enable_autodepend=no
+   rm -rf deps.d
+   AC_MSG_RESULT([$ac_enable_autodepend])
    if test $ac_enable_autodepend = yes; then
       DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP'
       ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
@@ -1566,11 +1628,14 @@ if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
       deps_frag=autodeps.mk
    fi
 fi
+lwlib_deps_frag=$srcdir/lwlib/$deps_frag
+oldxmenu_deps_frag=$srcdir/oldXMenu/$deps_frag
 deps_frag=$srcdir/src/$deps_frag
 AC_SUBST(MKDEPDIR)
 AC_SUBST(DEPFLAGS)
 AC_SUBST_FILE(deps_frag)
-
+AC_SUBST_FILE(lwlib_deps_frag)
+AC_SUBST_FILE(oldxmenu_deps_frag)
 
 lisp_frag=$srcdir/src/lisp.mk
 AC_SUBST_FILE(lisp_frag)
@@ -1659,12 +1724,14 @@ if test "${with_ns}" != no; then
      ns_appbindir=${ns_appdir}/Contents/MacOS
      ns_appresdir=${ns_appdir}/Contents/Resources
      ns_appsrc=Cocoa/Emacs.base
+     ns_fontfile=macfont.o
   elif test -f $GNUSTEP_CONFIG_FILE; then
      NS_IMPL_GNUSTEP=yes
      ns_appdir=`pwd`/nextstep/Emacs.app
      ns_appbindir=${ns_appdir}
      ns_appresdir=${ns_appdir}/Resources
      ns_appsrc=GNUstep/Emacs.base
+     ns_fontfile=nsfont.o
      dnl FIXME sourcing this several times in subshells seems inefficient.
      GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
      GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
@@ -1707,49 +1774,25 @@ fail;
 
   macfont_file=""
   if test "${NS_IMPL_COCOA}" = "yes"; then
-    AC_MSG_CHECKING([for OSX 10.4 or newer])
+    AC_MSG_CHECKING([for OSX 10.6 or newer])
     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AppKit/AppKit.h>],
                                      [
 #ifdef MAC_OS_X_VERSION_MAX_ALLOWED
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
  ; /* OK */
 #else
- error "OSX 10.4 or newer required";
+ error "OSX 10.6 or newer required";
 #endif
 #endif
                    ])],
-                   ns_osx_have_104=yes,
-                   ns_osx_have_104=no)
-    AC_MSG_RESULT([$ns_osx_have_104])
+                   ns_osx_have_106=yes,
+                   ns_osx_have_106=no)
+    AC_MSG_RESULT([$ns_osx_have_106])
 
-    if test $ns_osx_have_104 = no; then
-       AC_MSG_ERROR([`OSX 10.4 or newer is required']);
-    fi
-    AC_MSG_CHECKING([for OSX 10.5 or newer])
-    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <AppKit/AppKit.h>],
-                                     [
-#ifdef MAC_OS_X_VERSION_MAX_ALLOWED
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
- ; /* OK */
-#else
- error "OSX 10.5 not found";
-#endif
-#endif
-                   ])],
-                   ns_osx_have_105=yes,
-                   ns_osx_have_105=no)
-    AC_MSG_RESULT([$ns_osx_have_105])
-    if test $ns_osx_have_105 = yes; then
-      macfont_file="macfont.o"
+    if test $ns_osx_have_106 = no; then
+       AC_MSG_ERROR([`OSX 10.6 or newer is required']);
     fi
   fi
-  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <Foundation/NSObjCRuntime.h>],
-                                     [NSInteger i;])],
-                   ns_have_nsinteger=yes,
-                   ns_have_nsinteger=no)
-  if test $ns_have_nsinteger = yes; then
-    AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is defined.])
-  fi
 fi
 
 AC_SUBST(LIBS_GNUSTEP)
@@ -1782,7 +1825,7 @@ if test "${HAVE_NS}" = yes; then
      INSTALL_ARCH_INDEP_EXTRA=
   fi
 
-  NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o $macfont_file"
+  NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o $ns_fontfile"
 fi
 CFLAGS="$tmp_CFLAGS"
 CPPFLAGS="$tmp_CPPFLAGS"
@@ -1985,9 +2028,13 @@ AC_CACHE_CHECK(
 doug_lea_malloc=$emacs_cv_var_doug_lea_malloc
 
 system_malloc=$emacs_cv_sanitize_address
+
+hybrid_malloc=
+
 case "$opsys" in
   ## darwin ld insists on the use of malloc routines in the System framework.
-  darwin|sol2-10) system_malloc=yes ;;
+  darwin|mingw32|sol2-10) system_malloc=yes ;;
+  cygwin) hybrid_malloc=yes;;
 esac
 
 GMALLOC_OBJ=
@@ -1999,6 +2046,13 @@ if test "${system_malloc}" = "yes"; then
   GNU_MALLOC_reason="
     (The GNU allocators don't work with this system configuration.)"
   VMLIMIT_OBJ=
+elif test "$hybrid_malloc" = yes; then
+  AC_DEFINE(HYBRID_MALLOC, 1,
+    [Define to use gmalloc before dumping and the system malloc after.])
+  GNU_MALLOC=
+  GNU_MALLOC_reason="only before dumping"
+  GMALLOC_OBJ=gmalloc.o
+  VMLIMIT_OBJ=
 else
   test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
   VMLIMIT_OBJ=vm-limit.o
@@ -2034,7 +2088,7 @@ if test "$doug_lea_malloc" = "yes" ; then
   ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
   ## Does the AC_FUNC_MMAP test below make this check unnecessary?
   case "$opsys" in
-    gnu*) REL_ALLOC=no ;;
+    mingw32|gnu*) REL_ALLOC=no ;;
   esac
 fi
 
@@ -2044,7 +2098,7 @@ fi
 
 use_mmap_for_buffers=no
 case "$opsys" in
-  cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;;
+  cygwin|mingw32|freebsd|irix6-5) use_mmap_for_buffers=yes ;;
 esac
 
 AC_FUNC_MMAP
@@ -2055,64 +2109,44 @@ fi
 
 LIBS="$LIBS_SYSTEM $LIBS"
 
-dnl If found, this adds -ldnet to LIBS, which Autoconf uses for checks.
-AC_CHECK_LIB(dnet, dnet_ntoa)
-dnl This causes -lresolv to get used in subsequent tests,
-dnl which causes failures on some systems such as HPUX 9.
-dnl AC_CHECK_LIB(resolv, gethostbyname)
-
 dnl FIXME replace main with a function we actually want from this library.
 AC_CHECK_LIB(Xbsd, main, LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd")
 
-dnl Check if pthreads is available.
+dnl Check for the POSIX thread library.
 LIB_PTHREAD=
+if test "$opsys" != "mingw32"; then
 AC_CHECK_HEADERS_ONCE(pthread.h)
 if test "$ac_cv_header_pthread_h"; then
   dnl gmalloc.c uses pthread_atfork, which is not available on older-style
   dnl hosts such as MirBSD 10, so test for pthread_atfork instead of merely
-  dnl testing for pthread_self if Emacs uses gmalloc.c.
+  dnl testing for pthread_kill if Emacs uses gmalloc.c.
   if test "$GMALLOC_OBJ" = gmalloc.o; then
     emacs_pthread_function=pthread_atfork
   else
-    emacs_pthread_function=pthread_self
+    emacs_pthread_function=pthread_kill
   fi
-  AC_CHECK_LIB(pthread, $emacs_pthread_function, HAVE_PTHREAD=yes)
-fi
-if test "$HAVE_PTHREAD" = yes; then
-  case "${canonical}" in
-    *-hpux*) ;;
-    *) LIB_PTHREAD="-lpthread"
-       LIBS="$LIB_PTHREAD $LIBS" ;;
-  esac
-  AC_DEFINE(HAVE_PTHREAD, 1, [Define to 1 if you have pthread (-lpthread).])
-
-  # Some systems optimize for single-threaded programs by default, and
-  # need special flags to disable these optimizations. For example, the
-  # definition of 'errno' in <errno.h>.
-  case $opsys in
-    sol*)
-      AC_DEFINE([_REENTRANT], 1,
-       [Define to 1 if your system requires this in multithreaded code.]);;
-    aix4-2)
-      AC_DEFINE([_THREAD_SAFE], 1,
-       [Define to 1 if your system requires this in multithreaded code.]);;
-  esac
+  OLD_LIBS=$LIBS
+  AC_SEARCH_LIBS([$emacs_pthread_function], [pthread],
+    [AC_DEFINE([HAVE_PTHREAD], [1],
+       [Define to 1 if you have pthread (-lpthread).])
+     # Some systems optimize for single-threaded programs by default, and
+     # need special flags to disable these optimizations. For example, the
+     # definition of 'errno' in <errno.h>.
+     case $opsys in
+       sol*)
+         AC_DEFINE([_REENTRANT], 1,
+       [Define to 1 if your system requires this in multithreaded code.]);;
+       aix4-2)
+         AC_DEFINE([_THREAD_SAFE], 1,
+       [Define to 1 if your system requires this in multithreaded code.]);;
+     esac])
+ if test "X$LIBS" != "X$OLD_LIBS"; then
+    eval LIB_PTHREAD=\$ac_cv_search_$emacs_pthread_function
+  fi
+  LIBS=$OLD_LIBS
 fi
 AC_SUBST([LIB_PTHREAD])
-
-AC_CHECK_LIB(pthreads, cma_open)
-
-## Note: when using cpp in s/aix4.2.h, this definition depended on
-## HAVE_LIBPTHREADS.  That was not defined earlier in configure when
-## the system file was sourced.  Hence the value of LIBS_SYSTEM
-## added to LIBS in configure would never contain the pthreads part,
-## but the value used in Makefiles might.  FIXME?
-##
-## -lpthreads seems to be necessary for Xlib in X11R6, and should
-## be harmless on older versions of X where it happens to exist.
-test "$opsys" = "aix4-2" && \
-  test $ac_cv_lib_pthreads_cma_open = yes && \
-  LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
+fi
 
 dnl Check for need for bigtoc support on IBM AIX
 
@@ -2130,12 +2164,12 @@ aix*)
   ;;
 esac
 
-# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
-# used for the tests that follow.  We set them back to REAL_CFLAGS and
-# REAL_CPPFLAGS later on.
+# Change CFLAGS, CPPFLAGS, and LIBS temporarily so that C_SWITCH_X_SITE
+# is for the tests that follow.  We set them back later on.
 
 REAL_CFLAGS="$CFLAGS"
 REAL_CPPFLAGS="$CPPFLAGS"
+REAL_LIBS="$LIBS"
 
 if test "${HAVE_X11}" = "yes"; then
   DEFS="$C_SWITCH_X_SITE $DEFS"
@@ -2160,12 +2194,8 @@ if test "${HAVE_X11}" = "yes"; then
      [xgnu_linux_first_failure=no],
      [xgnu_linux_first_failure=yes])
     if test "${xgnu_linux_first_failure}" = "yes"; then
-      OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
-      OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
       OLD_CPPFLAGS="$CPPFLAGS"
       OLD_LIBS="$LIBS"
-      LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
-      C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
       CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
       LIBS="$LIBS -b i486-linuxaout"
       AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
@@ -2174,15 +2204,15 @@ if test "${HAVE_X11}" = "yes"; then
        [xgnu_linux_second_failure=yes])
       if test "${xgnu_linux_second_failure}" = "yes"; then
        # If we get the same failure with -b, there is no use adding -b.
-       # So take it out.  This plays safe.
-       LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
-       C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
-       CPPFLAGS="$OLD_CPPFLAGS"
-       LIBS="$OLD_LIBS"
+       # So leave it out.  This plays safe.
         AC_MSG_RESULT(no)
       else
+       LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
+       C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
         AC_MSG_RESULT(yes)
       fi
+      CPPFLAGS=$OLD_CPPFLAGS
+      LIBS=$OLD_LIBS
     else
       AC_MSG_RESULT(no)
     fi
@@ -2238,7 +2268,7 @@ if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${opsys}" =
     RSVG_REQUIRED=2.11.0
     RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
 
-    PKG_CHECK_MODULES(RSVG, $RSVG_MODULE, HAVE_RSVG=yes, :)
+    EMACS_CHECK_MODULES([RSVG], [$RSVG_MODULE])
     AC_SUBST(RSVG_CFLAGS)
     AC_SUBST(RSVG_LIBS)
 
@@ -2249,7 +2279,6 @@ if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${opsys}" =
       if test "${opsys}" = "mingw32"; then
                RSVG_LIBS=
       fi
-      LIBS="$RSVG_LIBS $LIBS"
     fi
   fi
 fi
@@ -2260,15 +2289,19 @@ if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${HAVE_W32}"
     ## 6.3.5 is the earliest version known to work; see Bug#17339.
     ## 6.8.2 makes Emacs crash; see Bug#13867.
     IMAGEMAGICK_MODULE="Wand >= 6.3.5 Wand != 6.8.2"
-    PKG_CHECK_MODULES(IMAGEMAGICK, $IMAGEMAGICK_MODULE, HAVE_IMAGEMAGICK=yes, :)
+    EMACS_CHECK_MODULES([IMAGEMAGICK], [$IMAGEMAGICK_MODULE])
     AC_SUBST(IMAGEMAGICK_CFLAGS)
     AC_SUBST(IMAGEMAGICK_LIBS)
 
     if test $HAVE_IMAGEMAGICK = yes; then
       AC_DEFINE(HAVE_IMAGEMAGICK, 1, [Define to 1 if using imagemagick.])
+      OLD_CFLAGS=$CFLAGS
+      OLD_LIBS=$LIBS
       CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
       LIBS="$IMAGEMAGICK_LIBS $LIBS"
       AC_CHECK_FUNCS(MagickExportImagePixels MagickMergeImageLayers)
+      CFLAGS=$OLD_CFLAGS
+      LIBS=$OLD_LIBS
     fi
   fi
 fi
@@ -2286,7 +2319,8 @@ if test "${opsys}" != "mingw32"; then
     GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
 
     dnl Checks for libraries.
-    PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no)
+    EMACS_CHECK_MODULES([GTK], [$GTK_MODULES],
+      [pkg_check_gtk=yes], [pkg_check_gtk=no])
     if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then
        AC_MSG_ERROR($GTK_PKG_ERRORS)
     fi
@@ -2313,7 +2347,8 @@ if test "${opsys}" != "mingw32"; then
     GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
 
     dnl Checks for libraries.
-    PKG_CHECK_MODULES(GTK, $GTK_MODULES, pkg_check_gtk=yes, pkg_check_gtk=no)
+    EMACS_CHECK_MODULES([GTK], [$GTK_MODULES],
+      [pkg_check_gtk=yes], [pkg_check_gtk=no])
     if test "$pkg_check_gtk" = "no" &&
        { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; }
     then
@@ -2323,10 +2358,12 @@ if test "${opsys}" != "mingw32"; then
   fi
 fi
 
+OLD_CFLAGS=$CFLAGS
+OLD_LIBS=$LIBS
+
 if test x"$pkg_check_gtk" = xyes; then
 
   AC_SUBST(GTK_LIBS)
-  C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
   CFLAGS="$CFLAGS $GTK_CFLAGS"
   LIBS="$GTK_LIBS $LIBS"
   dnl Try to compile a simple GTK program.
@@ -2358,6 +2395,7 @@ if test x"$pkg_check_gtk" = xyes; then
       AC_MSG_ERROR([Gtk+ wanted, but it does not compile, see config.log.  Maybe some x11-devel files missing?]);
     fi
   else
+    C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
     HAVE_GTK=yes
     AC_DEFINE(USE_GTK, 1, [Define to 1 if using GTK.])
     GTK_OBJ="gtkutil.o $GTK_OBJ"
@@ -2426,33 +2464,40 @@ if test "${HAVE_GTK}" = "yes"; then
  term_header=gtkutil.h
 fi
 
+CFLAGS=$OLD_CFLAGS
+LIBS=$OLD_LIBS
+
 dnl D-Bus has been tested under GNU/Linux only.  Must be adapted for
 dnl other platforms.
 HAVE_DBUS=no
 DBUS_OBJ=
 if test "${with_dbus}" = "yes"; then
-   PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0, HAVE_DBUS=yes, HAVE_DBUS=no)
+   EMACS_CHECK_MODULES([DBUS], [dbus-1 >= 1.0])
    if test "$HAVE_DBUS" = yes; then
-     LIBS="$LIBS $DBUS_LIBS"
      AC_DEFINE(HAVE_DBUS, 1, [Define to 1 if using D-Bus.])
      dnl dbus_watch_get_unix_fd has been introduced in D-Bus 1.1.1.
      dnl dbus_type_is_valid and dbus_validate_* have been introduced in
      dnl D-Bus 1.5.12.
+     OLD_LIBS=$LIBS
+     LIBS="$LIBS $DBUS_LIBS"
      AC_CHECK_FUNCS(dbus_watch_get_unix_fd \
                    dbus_type_is_valid \
                    dbus_validate_bus_name \
                     dbus_validate_path \
                    dbus_validate_interface \
                    dbus_validate_member)
+     LIBS=$OLD_LIBS
      DBUS_OBJ=dbusbind.o
    fi
 fi
+AC_SUBST(DBUS_CFLAGS)
+AC_SUBST(DBUS_LIBS)
 AC_SUBST(DBUS_OBJ)
 
 dnl GSettings has been tested under GNU/Linux only.
 HAVE_GSETTINGS=no
 if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
-   PKG_CHECK_MODULES(GSETTINGS, gio-2.0 >= 2.26, HAVE_GSETTINGS=yes, HAVE_GSETTINGS=no)
+   EMACS_CHECK_MODULES([GSETTINGS], [gio-2.0 >= 2.26])
    if test "$HAVE_GSETTINGS" = "yes"; then
       old_CFLAGS=$CFLAGS
       CFLAGS="$CFLAGS $GSETTINGS_CFLAGS"
@@ -2486,7 +2531,7 @@ dnl GConf has been tested under GNU/Linux only.
 dnl The version is really arbitrary, it is about the same age as Gtk+ 2.6.
 HAVE_GCONF=no
 if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
-   PKG_CHECK_MODULES(GCONF, gconf-2.0 >= 2.13, HAVE_GCONF=yes, HAVE_GCONF=no)
+   EMACS_CHECK_MODULES([GCONF], [gconf-2.0 >= 2.13])
    if test "$HAVE_GCONF" = yes; then
       AC_DEFINE(HAVE_GCONF, 1, [Define to 1 if using GConf.])
       dnl Newer GConf doesn't link with g_objects, so this is not defined.
@@ -2496,7 +2541,7 @@ if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
 fi
 
 if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
-    PKG_CHECK_MODULES(GOBJECT, gobject-2.0 >= 2.0, HAVE_GOBJECT=yes, HAVE_GOBJECT=no)
+    EMACS_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.0])
     if test "$HAVE_GOBJECT" = "yes"; then
        SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GOBJECT_CFLAGS"
        SETTINGS_LIBS="$SETTINGS_LIBS $GOBJECT_LIBS"
@@ -2527,12 +2572,14 @@ AC_SUBST(LIBSELINUX_LIBS)
 HAVE_GNUTLS=no
 HAVE_GNUTLS3=no
 if test "${with_gnutls}" = "yes" ; then
-  PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 3.0.0], HAVE_GNUTLS3=yes, HAVE_GNUTLS3=no)
+  EMACS_CHECK_MODULES([LIBGNUTLS], [gnutls >= 3.0.0],
+    [HAVE_GNUTLS3=yes], [HAVE_GNUTLS3=no])
   if test "${HAVE_GNUTLS3}" = "yes"; then
     AC_DEFINE(HAVE_GNUTLS3, 1, [Define if using GnuTLS v3.])
     HAVE_GNUTLS="yes"
   else
-    PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.6.6], HAVE_GNUTLS=yes, HAVE_GNUTLS=no)
+    EMACS_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.6.6],
+      [HAVE_GNUTLS=yes], [HAVE_GNUTLS=no])
   fi
   if test "${HAVE_GNUTLS}" = "yes"; then
     AC_DEFINE(HAVE_GNUTLS, 1, [Define if using GnuTLS.])
@@ -2574,7 +2621,7 @@ dnl only sense when glib has been compiled with inotify support.  How
 dnl to check?
 case $with_file_notification,$NOTIFY_OBJ in
   gfile, | yes,)
-    PKG_CHECK_MODULES(GFILENOTIFY, gio-2.0 >= 2.24, HAVE_GFILENOTIFY=yes, HAVE_GFILENOTIFY=no)
+    EMACS_CHECK_MODULES([GFILENOTIFY], [gio-2.0 >= 2.24])
     if test "$HAVE_GFILENOTIFY" = "yes"; then
        AC_DEFINE(HAVE_GFILENOTIFY, 1, [Define to 1 if using GFile.])
        NOTIFY_OBJ=gfilenotify.o
@@ -2663,6 +2710,7 @@ fi
 X_TOOLKIT_TYPE=$USE_X_TOOLKIT
 
 LIBXTR6=
+LIBXMU=
 if test "${USE_X_TOOLKIT}" != "none"; then
   AC_MSG_CHECKING(X11 toolkit version)
   AC_CACHE_VAL(emacs_cv_x11_toolkit_version_6,
@@ -2689,37 +2737,20 @@ dnl If using toolkit, check whether libXmu.a exists.
 dnl tranle@intellicorp.com says libXmu.a can need XtMalloc in libXt.a to link.
   OLDLIBS="$LIBS"
   if test x$HAVE_X11XTR6 = xyes; then
-    LIBS="-lXt -lSM -lICE $LIBS"
+    OTHERLIBS='-lXt -lSM -lICE'
   else
-    LIBS="-lXt $LIBS"
+    OTHERLIBS='-lXt'
+  fi
+  AC_SEARCH_LIBS([XmuConvertStandardSelection], [Xmu], [], [], [$OTHERLIBS])
+  if test "X$LIBS" != "X$OLDLIBS"; then
+    LIBXMU=$ac_cv_search_XmuConvertStandardSelection
   fi
-  AC_CHECK_LIB(Xmu, XmuConvertStandardSelection)
-  test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
-  dnl ac_cv_lib_Xmu_XmuConvertStandardSelection is also referenced below.
+  LIBS=$OLDLIBS
+  dnl ac_cv_search_XmuConvertStandardSelection is also referenced below.
 fi
 AC_SUBST(LIBXTR6)
-
-dnl FIXME the logic here seems weird, but this is what cpp was doing.
-dnl Why not just test for libxmu in the normal way?
-LIBXMU=-lXmu
-case $opsys in
-  ## These systems don't supply Xmu.
-  hpux* | aix4-2 )
-    test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
-    ;;
-  mingw32 )
-    LIBXMU=
-    ;;
-esac
 AC_SUBST(LIBXMU)
 
-# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
-if test "${HAVE_X11}" = "yes"; then
-  if test "${USE_X_TOOLKIT}" != "none"; then
-    AC_CHECK_LIB(Xext, XShapeQueryExtension)
-  fi
-fi
-
 LIBXP=
 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
   # OpenMotif may be installed in such a way on some GNU/Linux systems.
@@ -2864,16 +2895,20 @@ fi
 
 ### Start of font-backend (under X11) section.
 if test "${HAVE_X11}" = "yes"; then
-   PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= 2.2.0, HAVE_FC=yes, HAVE_FC=no)
-
-   ## Use -lXft if available, unless `--with-xft=no'.
-   HAVE_XFT=maybe
-    if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
+    ## Use -lXft if available, unless `--with-xft=no'.
+    HAVE_XFT=maybe
+    if test "x${with_x}" = "xno"; then
       with_xft="no";
     fi
+
+    if test "$with_xft" != no; then
+      EMACS_CHECK_MODULES([FONTCONFIG], [fontconfig >= 2.2.0])
+      with_xft=$HAVE_FONTCONFIG
+    fi
+
     if test "x${with_xft}" != "xno"; then
 
-      PKG_CHECK_MODULES(XFT, xft >= 0.13.0, , HAVE_XFT=no)
+      EMACS_CHECK_MODULES([XFT], [xft >= 0.13.0], [], [HAVE_XFT=no])
       ## Because xftfont.c uses XRenderQueryExtension, we also
       ## need to link to -lXrender.
       HAVE_XRENDER=no
@@ -2894,11 +2929,10 @@ if test "${HAVE_X11}" = "yes"; then
          AC_DEFINE(HAVE_XFT, 1, [Define to 1 if you have the Xft library.])
            AC_SUBST(XFT_LIBS)
          C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
-       else
-         CPPFLAGS="$OLD_CPPFLAGS"
-         CFLAGS="$OLD_CFLAGS"
-         LIBS="$OLD_LIBS"
        fi                        # "${HAVE_XFT}" = "yes"
+       CPPFLAGS=$OLD_CPPFLAGS
+       CFLAGS=$OLD_CFLAGS
+       LIBS=$OLD_LIBS
       fi                          # "$HAVE_XFT" != no
     fi                            # "x${with_xft}" != "xno"
 
@@ -2913,8 +2947,7 @@ if test "${HAVE_X11}" = "yes"; then
        dnl ftfont.o: undefined reference to symbol 'FT_New_Face'
        dnl if -lfreetype is not specified.
        dnl The following is needed to set FREETYPE_LIBS.
-       PKG_CHECK_MODULES(FREETYPE, freetype2, HAVE_FREETYPE=yes,
-                        HAVE_FREETYPE=no)
+       EMACS_CHECK_MODULES([FREETYPE], [freetype2])
 
        test "$HAVE_FREETYPE" = "no" && AC_MSG_ERROR(libxft requires libfreetype)
     fi
@@ -2924,8 +2957,7 @@ if test "${HAVE_X11}" = "yes"; then
       AC_DEFINE(HAVE_FREETYPE, 1,
                [Define to 1 if using the freetype and fontconfig libraries.])
       if test "${with_libotf}" != "no"; then
-       PKG_CHECK_MODULES(LIBOTF, libotf, HAVE_LIBOTF=yes,
-                         HAVE_LIBOTF=no)
+       EMACS_CHECK_MODULES([LIBOTF], [libotf])
        if test "$HAVE_LIBOTF" = "yes"; then
          AC_DEFINE(HAVE_LIBOTF, 1, [Define to 1 if using libotf.])
          AC_CHECK_LIB(otf, OTF_get_variation_glyphs,
@@ -2944,7 +2976,7 @@ if test "${HAVE_X11}" = "yes"; then
     HAVE_M17N_FLT=no
     if test "${HAVE_LIBOTF}" = yes; then
       if test "${with_m17n_flt}" != "no"; then
-       PKG_CHECK_MODULES(M17N_FLT, m17n-flt, HAVE_M17N_FLT=yes, HAVE_M17N_FLT=no)
+       EMACS_CHECK_MODULES([M17N_FLT], [m17n-flt])
        if test "$HAVE_M17N_FLT" = "yes"; then
          AC_DEFINE(HAVE_M17N_FLT, 1, [Define to 1 if using libm17n-flt.])
        fi
@@ -3105,67 +3137,6 @@ elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
 fi
 AC_SUBST(LIBJPEG)
 
-### Use -lpng if available, unless `--with-png=no'.
-### mingw32 doesn't use -lpng, since it loads the library dynamically.
-HAVE_PNG=no
-LIBPNG=
-if test "${opsys}" = "mingw32"; then
-  if test "${with_png}" != "no"; then
-    AC_CHECK_HEADER(png.h, HAVE_PNG=yes, HAVE_PNG=no)
-  fi
-  if test "${HAVE_PNG}" = "yes"; then
-    AC_DEFINE(HAVE_PNG, 1, [Define to 1 if you have the png library (-lpng).])
-
-    AC_CHECK_DECL(png_longjmp,
-      [],
-      [AC_DEFINE(PNG_DEPSTRUCT, [],
-        [Define to empty to suppress deprecation warnings when building
-         with --enable-gcc-warnings and with libpng versions before 1.5,
-         which lack png_longjmp.])],
-      [[#ifdef HAVE_LIBPNG_PNG_H
-       # include <libpng/png.h>
-       #else
-       # include <png.h>
-       #endif
-      ]])
-  fi
-elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
-  if test "${with_png}" != "no"; then
-    # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
-    # in /usr/include/libpng.
-    AC_CHECK_HEADERS(png.h libpng/png.h, break)
-    if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
-      AC_CHECK_LIB(png, png_get_channels, HAVE_PNG=yes, , -lz -lm)
-    fi
-  fi
-
-  if test "${HAVE_PNG}" = "yes"; then
-    AC_DEFINE(HAVE_PNG, 1, [Define to 1 if you have the png library.])
-
-    dnl Some systems, eg NetBSD 6, only provide eg "libpng16", not "libpng".
-    lpng=`libpng-config --libs 2> /dev/null`
-    case $lpng in
-      -l*) : ;;
-      *) lpng="-lpng" ;;
-    esac
-    LIBPNG="$lpng -lz -lm"
-
-    AC_CHECK_DECL(png_longjmp,
-      [],
-      [AC_DEFINE(PNG_DEPSTRUCT, [],
-        [Define to empty to suppress deprecation warnings when building
-         with --enable-gcc-warnings and with libpng versions before 1.5,
-         which lack png_longjmp.])],
-      [[#ifdef HAVE_LIBPNG_PNG_H
-       # include <libpng/png.h>
-       #else
-       # include <png.h>
-       #endif
-      ]])
-  fi
-fi
-AC_SUBST(LIBPNG)
-
 HAVE_ZLIB=no
 LIBZ=
 if test "${with_zlib}" != "no"; then
@@ -3185,6 +3156,69 @@ if test "${HAVE_ZLIB}" = "yes"; then
 fi
 AC_SUBST(LIBZ)
 
+### Use -lpng if available, unless `--with-png=no'.
+HAVE_PNG=no
+LIBPNG=
+PNG_CFLAGS=
+if test "${NS_IMPL_COCOA}" = yes; then
+  : # Nothing to do
+elif test "${with_png}" != no; then
+  # mingw32 loads the library dynamically.
+  if test "$opsys" = mingw32; then
+    AC_CHECK_HEADER([png.h], [HAVE_PNG=yes])
+  elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
+    AC_MSG_CHECKING([for png])
+    png_cflags=`(libpng-config --cflags) 2>&AS_MESSAGE_LOG_FD` &&
+    png_libs=`(libpng-config --libs) 2>&AS_MESSAGE_LOG_FD` || {
+      # libpng-config does not work; configure by hand.
+      # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
+      # in /usr/include/libpng.
+      if test -r /usr/include/libpng/png.h &&
+        test ! -r /usr/include/png.h; then
+       png_cflags=-I/usr/include/libpng
+      else
+       png_cflags=
+      fi
+      png_libs='-lpng'
+    }
+    SAVE_CFLAGS=$CFLAGS
+    SAVE_LIBS=$LIBS
+    CFLAGS="$CFLAGS $png_cflags"
+    LIBS="$png_libs -lz -lm $LIBS"
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM([[#include <png.h>]],
+        [[return !png_get_channels (0, 0);]])],
+      [HAVE_PNG=yes
+       PNG_CFLAGS=`AS_ECHO(["$png_cflags"]) | sed -e "$edit_cflags"`
+       LIBPNG=$png_libs
+       # $LIBPNG requires explicit -lz in some cases.
+       # We don't know what those cases are, exactly, so play it safe and
+       # append -lz to any nonempty $LIBPNG, unless we're already using LIBZ.
+       if test -n "$LIBPNG" && test -z "$LIBZ"; then
+        LIBPNG="$LIBPNG -lz"
+       fi])
+    CFLAGS=$SAVE_CFLAGS
+    LIBS=$SAVE_LIBS
+    AC_MSG_RESULT([$HAVE_PNG])
+  fi
+fi
+if test $HAVE_PNG = yes; then
+  AC_DEFINE([HAVE_PNG], [1], [Define to 1 if you have the png library.])
+
+  SAVE_CFLAGS=$CFLAGS
+  CFLAGS="$CFLAGS $PNG_CFLAGS"
+  AC_CHECK_DECL([png_longjmp],
+    [],
+    [AC_DEFINE([PNG_DEPSTRUCT], [],
+       [Define to empty to suppress deprecation warnings when building
+       with --enable-gcc-warnings and with libpng versions before 1.5,
+       which lack png_longjmp.])],
+    [[#include <png.h>
+    ]])
+  CFLAGS=$SAVE_CFLAGS
+fi
+AC_SUBST(LIBPNG)
+AC_SUBST(PNG_CFLAGS)
 
 ### Use -ltiff if available, unless `--with-tiff=no'.
 ### mingw32 doesn't use -ltiff, since it loads the library dynamically.
@@ -3317,10 +3351,6 @@ if test "${HAVE_X11}" = "yes"; then
   if test "${HAVE_X_SM}" = "yes"; then
     AC_DEFINE(HAVE_X_SM, 1, [Define to 1 if you have the SM library (-lSM).])
     LIBXSM="-lSM -lICE"
-    case "$LIBS" in
-      *-lSM*) ;;
-      *)      LIBS="$LIBXSM $LIBS" ;;
-    esac
   fi
 fi
 AC_SUBST(LIBXSM)
@@ -3330,14 +3360,17 @@ HAVE_XRANDR=no
 if test "${HAVE_X11}" = "yes"; then
   XRANDR_REQUIRED=1.2.2
   XRANDR_MODULES="xrandr >= $XRANDR_REQUIRED"
-  PKG_CHECK_MODULES(XRANDR, $XRANDR_MODULES, HAVE_XRANDR=yes, HAVE_XRANDR=no)
+  EMACS_CHECK_MODULES([XRANDR], [$XRANDR_MODULES])
   if test $HAVE_XRANDR = no; then
     # Test old way in case pkg-config doesn't have it (older machines).
+    # Include Xrender.h by hand to work around bug in older Xrandr.h
+    # (e.g. RHEL5) and silence (harmless) configure warning (bug#18465).
     AC_CHECK_HEADER(X11/extensions/Xrandr.h,
-      [AC_CHECK_LIB(Xrandr, XRRGetScreenResources, HAVE_XRANDR=yes)])
+      [AC_CHECK_LIB(Xrandr, XRRGetScreenResources, HAVE_XRANDR=yes)],
+      [], [AC_INCLUDES_DEFAULT
+#include <X11/extensions/Xrender.h>])
     if test $HAVE_XRANDR = yes; then
       XRANDR_LIBS=-lXrandr
-      AC_SUBST(XRANDR_LIBS)
     fi
   fi
   if test $HAVE_XRANDR = yes; then
@@ -3352,35 +3385,57 @@ if test "${HAVE_X11}" = "yes"; then
     AC_DEFINE(HAVE_XRANDR, 1, [Define to 1 if you have the XRandr extension.])
   fi
 fi
+AC_SUBST(XRANDR_CFLAGS)
+AC_SUBST(XRANDR_LIBS)
 
 ### Use Xinerama (-lXinerama) if available
 HAVE_XINERAMA=no
 if test "${HAVE_X11}" = "yes"; then
   XINERAMA_REQUIRED=1.0.2
   XINERAMA_MODULES="xinerama >= $XINERAMA_REQUIRED"
-  PKG_CHECK_MODULES(XINERAMA, $XINERAMA_MODULES, HAVE_XINERAMA=yes,
-                    HAVE_XINERAMA=no)
+  EMACS_CHECK_MODULES([XINERAMA], [$XINERAMA_MODULES])
   if test $HAVE_XINERAMA = no; then
     # Test old way in case pkg-config doesn't have it (older machines).
     AC_CHECK_HEADER(X11/extensions/Xinerama.h,
       [AC_CHECK_LIB(Xinerama, XineramaQueryExtension, HAVE_XINERAMA=yes)])
     if test $HAVE_XINERAMA = yes; then
       XINERAMA_LIBS=-lXinerama
-      AC_SUBST(XINERAMA_LIBS)
     fi
   fi
   if test $HAVE_XINERAMA = yes; then
     AC_DEFINE(HAVE_XINERAMA, 1, [Define to 1 if you have the Xinerama extension.])
   fi
 fi
+AC_SUBST(XINERAMA_CFLAGS)
+AC_SUBST(XINERAMA_LIBS)
 
+### Use Xfixes (-lXfixes) if available
+HAVE_XFIXES=no
+if test "${HAVE_X11}" = "yes"; then
+  XFIXES_REQUIRED=4.0.0
+  XFIXES_MODULES="xfixes >= $XFIXES_REQUIRED"
+  EMACS_CHECK_MODULES([XFIXES], [$XFIXES_MODULES])
+  if test $HAVE_XFIXES = no; then
+    # Test old way in case pkg-config doesn't have it (older machines).
+    AC_CHECK_HEADER(X11/extensions/Xfixes.h,
+      [AC_CHECK_LIB(Xfixes, XFixesHideCursor, HAVE_XFIXES=yes)])
+    if test $HAVE_XFIXES = yes; then
+      XFIXES_LIBS=-lXfixes
+    fi
+  fi
+  if test $HAVE_XFIXES = yes; then
+    AC_DEFINE(HAVE_XFIXES, 1, [Define to 1 if you have the Xfixes extension.])
+  fi
+fi
+AC_SUBST(XFIXES_CFLAGS)
+AC_SUBST(XFIXES_LIBS)
 
 ### Use libxml (-lxml2) if available
 ### mingw32 doesn't use -lxml2, since it loads the library dynamically.
 HAVE_LIBXML2=no
 if test "${with_xml2}" != "no"; then
   ### I'm not sure what the version number should be, so I just guessed.
-  PKG_CHECK_MODULES(LIBXML2, libxml-2.0 > 2.6.17, HAVE_LIBXML2=yes, HAVE_LIBXML2=no)
+  EMACS_CHECK_MODULES([LIBXML2], [libxml-2.0 > 2.6.17])
   # Built-in libxml2 on OS X 10.8 lacks libxml-2.0.pc.
   if test "${HAVE_LIBXML2}" != "yes" -a "$opsys" = "darwin"; then
     SAVE_CPPFLAGS="$CPPFLAGS"
@@ -3396,8 +3451,8 @@ if test "${with_xml2}" != "no"; then
   fi
   if test "${HAVE_LIBXML2}" = "yes"; then
     if test "${opsys}" != "mingw32"; then
-      LIBS="$LIBXML2_LIBS $LIBS"
-      AC_CHECK_LIB(xml2, htmlReadMemory, HAVE_LIBXML2=yes, HAVE_LIBXML2=no)
+      AC_CHECK_LIB(xml2, htmlReadMemory, HAVE_LIBXML2=yes, HAVE_LIBXML2=no
+        [$LIBXML2_LIBS])
     else
       LIBXML2_LIBS=""
     fi
@@ -3426,19 +3481,17 @@ if test $emacs_cv_netdb_declares_h_errno = yes; then
   AC_DEFINE(HAVE_H_ERRNO, 1, [Define to 1 if netdb.h declares h_errno.])
 fi
 
-# sqrt and other floating-point functions such as fmod and frexp
-# are found in -lm on most systems, but mingw32 doesn't use -lm.
-if test "${opsys}" != "mingw32"; then
-  AC_CHECK_LIB(m, sqrt)
-fi
-
 # Check for mail-locking functions in a "mail" library.  Probably this should
 # have the same check as for liblockfile below.
 AC_CHECK_LIB(mail, maillock, have_mail=yes, have_mail=no)
 if test $have_mail = yes; then
   LIBS_MAIL=-lmail
-  LIBS="$LIBS_MAIL $LIBS"
   AC_DEFINE(HAVE_LIBMAIL, 1, [Define to 1 if you have the `mail' library (-lmail).])
+
+  OLD_LIBS=$LIBS
+  LIBS="$LIBS_MAIL $LIBS"
+  AC_CHECK_FUNCS(touchlock)
+  LIBS=$OLD_LIBS
 else
   LIBS_MAIL=
 fi
@@ -3446,7 +3499,6 @@ dnl Debian, at least:
 AC_CHECK_LIB(lockfile, maillock, have_lockfile=yes, have_lockfile=no)
 if test $have_lockfile = yes; then
    LIBS_MAIL=-llockfile
-   LIBS="$LIBS_MAIL $LIBS"
    AC_DEFINE(HAVE_LIBLOCKFILE, 1, [Define to 1 if you have the `lockfile' library (-llockfile).])
 else
 # If we have the shared liblockfile, assume we must use it for mail
@@ -3511,37 +3563,29 @@ case "$mail_lock" in
 esac
 AC_SUBST(BLESSMAIL_TARGET)
 
-
+OLD_LIBS=$LIBS
+LIBS="$LIB_PTHREAD $LIB_MATH $LIBS"
 AC_CHECK_FUNCS(accept4 fchdir gethostname \
 getrusage get_current_dir_name \
-lrand48 \
-select getpagesize setlocale \
+lrand48 random rint \
+select getpagesize setlocale newlocale \
 getrlimit setrlimit shutdown getaddrinfo \
-strsignal setitimer \
+pthread_sigmask strsignal setitimer \
 sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
-gai_strerror getline getdelim sync \
+gai_strerror sync \
 getpwent endpwent getgrent endgrent \
-touchlock \
 cfmakeraw cfsetspeed copysign __executable_start log2)
+LIBS=$OLD_LIBS
 
 dnl No need to check for aligned_alloc and posix_memalign if using
-dnl gmalloc.o, as it supplies them.  Don't use these functions on
-dnl Darwin as they are incompatible with unexmacosx.c.
-if test -z "$GMALLOC_OBJ" && test "$opsys" != darwin; then
+dnl gmalloc.o, as it supplies them, unless we're using hybrid_malloc.
+dnl Don't use these functions on Darwin as they are incompatible with
+dnl unexmacosx.c.
+if (test -z "$GMALLOC_OBJ" || test "$hybrid_malloc" = yes) \
+  && test "$opsys" != darwin; then
   AC_CHECK_FUNCS([aligned_alloc posix_memalign], [break])
 fi
 
-## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
-## has a broken `rint' in some library versions including math library
-## version number A.09.05.
-## You can fix the math library by installing patch number PHSS_4630.
-## But we can fix it more reliably for Emacs by just not using rint.
-## We also skip HAVE_RANDOM - see comments in src/conf_post.h.
-case $opsys in
-   hpux*) : ;;
-   *) AC_CHECK_FUNCS(random rint) ;;
-esac
-
 dnl Cannot use AC_CHECK_FUNCS
 AC_CACHE_CHECK([for __builtin_unwind_init],
               emacs_cv_func___builtin_unwind_init,
@@ -3686,6 +3730,36 @@ fi
 AC_SUBST(LIBS_TERMCAP)
 AC_SUBST(TERMCAP_OBJ)
 
+# GNU/Linux-specific timer functions.
+AC_CACHE_CHECK([for timerfd interface], [emacs_cv_have_timerfd],
+  [AC_COMPILE_IFELSE(
+     [AC_LANG_PROGRAM([[#include <sys/timerfd.h>
+                     ]],
+                     [[timerfd_create (CLOCK_REALTIME,
+                                       TFD_CLOEXEC | TFD_NONBLOCK);
+                       timerfd_settime (0, TFD_TIMER_ABSTIME, 0, 0);]])],
+     [emacs_cv_have_timerfd=yes],
+     [emacs_cv_have_timerfd=no])])
+if test "$emacs_cv_have_timerfd" = yes; then
+  AC_DEFINE([HAVE_TIMERFD], 1,
+    [Define to 1 if timerfd functions are supported as in GNU/Linux.])
+fi
+
+# Alternate stack for signal handlers.
+AC_CACHE_CHECK([whether signals can be handled on alternate stack],
+              [emacs_cv_alternate_stack],
+  [AC_COMPILE_IFELSE(
+     [AC_LANG_PROGRAM([[#include <signal.h>
+                     ]],
+                     [[stack_t ss;
+                       struct sigaction sa;
+                       ss.ss_sp = malloc (SIGSTKSZ);
+                       ss.ss_size = SIGSTKSZ;
+                       sa.sa_flags = SA_SIGINFO | SA_ONSTACK;
+                       sigaltstack (&ss, 0);
+                       sigaction (SIGSEGV, &sa, 0);]])],
+     [emacs_cv_alternate_stack=yes],
+     [emacs_cv_alternate_stack=no])])
 
 # Do we have res_init, for detecting changes in /etc/resolv.conf?
 # On Darwin, res_init appears not to be useful: see bug#562 and
@@ -3758,6 +3832,7 @@ DESLIB=
 KRB4LIB=
 
 if test "${with_kerberos}" != no; then
+  OLD_LIBS=$LIBS
   AC_CHECK_LIB(com_err, com_err, have_com_err=yes, have_com_err=no)
   if test $have_com_err = yes; then
     COM_ERRLIB=-lcom_err
@@ -3814,6 +3889,7 @@ if test "${with_kerberos}" != no; then
                                       [AC_CHECK_HEADERS(kerberos/krb.h)])])
   fi
   AC_CHECK_HEADERS(com_err.h)
+  LIBS=$OLD_LIBS
 fi
 
 AC_SUBST(COM_ERRLIB)
@@ -3824,43 +3900,7 @@ AC_SUBST(KRB4LIB)
 
 AC_CHECK_HEADERS(valgrind/valgrind.h)
 
-AC_CHECK_FUNCS_ONCE(tzset)
-AC_MSG_CHECKING(whether localtime caches TZ)
-AC_CACHE_VAL(emacs_cv_localtime_cache,
-[if test x$ac_cv_func_tzset = xyes; then
-AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <time.h>
-char TZ_GMT0[] = "TZ=GMT0";
-char TZ_PST8[] = "TZ=PST8";
-main()
-{
-  time_t now = time ((time_t *) 0);
-  int hour_GMT0, hour_unset;
-  if (putenv (TZ_GMT0) != 0)
-    exit (1);
-  hour_GMT0 = localtime (&now)->tm_hour;
-  unsetenv("TZ");
-  hour_unset = localtime (&now)->tm_hour;
-  if (putenv (TZ_PST8) != 0)
-    exit (1);
-  if (localtime (&now)->tm_hour == hour_GMT0)
-    exit (1);
-  unsetenv("TZ");
-  if (localtime (&now)->tm_hour != hour_unset)
-    exit (1);
-  exit (0);
-}]])], emacs_cv_localtime_cache=no, emacs_cv_localtime_cache=yes,
-[# If we have tzset, assume the worst when cross-compiling.
-emacs_cv_localtime_cache=yes])
-else
-       # If we lack tzset, report that localtime does not cache TZ,
-       # since we can't invalidate the cache if we don't have tzset.
-       emacs_cv_localtime_cache=no
-fi])dnl
-AC_MSG_RESULT($emacs_cv_localtime_cache)
-if test $emacs_cv_localtime_cache = yes; then
-  AC_DEFINE(LOCALTIME_CACHE, 1,
-           [Define to 1 if localtime caches TZ.])
-fi
+AC_CHECK_FUNCS_ONCE(tzalloc tzset)
 
 ok_so_far=yes
 AC_CHECK_FUNC(socket, , ok_so_far=no)
@@ -3876,23 +3916,23 @@ dnl Fixme: Not used.  Should this be HAVE_SOCKETS?
            [Define to 1 if you have inet sockets.])
 fi
 
-dnl Check for a Solaris 2.4 vfork bug that Autoconf misses (through 2.69).
-dnl This can be removed once we assume Autoconf 2.70.
-case $canonical in
-  *-solaris2.4 | *-solaris2.4.*)
-    dnl Disable the Autoconf-generated vfork test.
-    : ${ac_cv_func_vfork_works=no};;
-esac
-
 AC_FUNC_FORK
 
 AC_CHECK_FUNCS(snprintf)
 
-dnl Check this late.  It depends on what other libraries (lrsvg, Gtk+ etc)
-dnl Emacs uses.
+dnl Check for glib.  This differs from other library checks in that
+dnl Emacs need not link to glib unless some other library is already
+dnl linking to glib.  Although glib provides no facilities that Emacs
+dnl needs for its own purposes, when glib is present Emacs needs to
+dnl use primitives like g_main_context_query to avoid clashing with
+dnl glib at a low level.
+dnl
+dnl Check this late, since it depends on $GTK_CFLAGS etc.
 XGSELOBJ=
 OLDCFLAGS="$CFLAGS"
 OLDLIBS="$LIBS"
+CFLAGS="$CFLAGS $GTK_CFLAGS $RSVG_CFLAGS $DBUS_CFLAGS $SETTINGS_CFLAGS"
+LIBS="$LIBS $GTK_LIBS $RSVG_LIBS $DBUS_LIBS $SETTINGS_LIBS"
 CFLAGS="$CFLAGS $GFILENOTIFY_CFLAGS"
 LIBS="$LIBS $GFILENOTIFY_LIBS"
 AC_MSG_CHECKING([whether GLib is linked in])
@@ -3927,15 +3967,6 @@ fi
 
 AC_TYPE_MBSTATE_T
 
-AC_CACHE_CHECK([for C restricted array declarations], emacs_cv_c_restrict_arr,
-  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[void fred (int x[__restrict]);]], [[]])],
-                  emacs_cv_c_restrict_arr=yes, emacs_cv_c_restrict_arr=no)])
-if test "$emacs_cv_c_restrict_arr" = yes; then
-  AC_DEFINE(__restrict_arr, __restrict,
-    [Define to compiler's equivalent of C99 restrict keyword in array
-     declarations.  Define as empty for no equivalent.])
-fi
-
 dnl Fixme: AC_SYS_POSIX_TERMIOS should probably be used, but it's not clear
 dnl how the tty code is related to POSIX and/or other versions of termios.
 dnl The following looks like a useful start.
@@ -3954,14 +3985,6 @@ if test "${opsys}" != "mingw32"; then
      in the full name stands for the login id.])
 fi
 
-dnl Every platform that uses configure supports this.
-dnl There is a create-lockfiles option you can
-dnl customize if you do not want the lock files to be written.
-dnl So it is not clear that this #define still needs to exist.
-AC_DEFINE(CLASH_DETECTION, 1, [Define if you want lock files to be written,
-  so that Emacs can tell instantly when you try to modify a file that
-  someone else has modified in his/her Emacs.])
-
 dnl Everybody supports this, except MS.
 dnl Seems like the kind of thing we should be testing for, though.
 ## Note: PTYs are broken on darwin <6.  Use at your own risk.
@@ -4036,7 +4059,7 @@ AH_TEMPLATE(NO_EDITRES, [Define if XEditRes should not be used.])
 case $opsys in
   aix4-2)
     dnl Unfortunately without libXmu we cannot support EditRes.
-    if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then
+    if test "x$ac_cv_search_XmuConvertStandardSelection" = xno; then
       AC_DEFINE(NO_EDITRES, 1)
     fi
     ;;
@@ -4331,28 +4354,6 @@ case $opsys in
 esac
 
 
-dnl Used in lisp.h, emacs.c, vm-limit.c
-dnl NEWS.18 describes this as "a number which contains
-dnl the high bits to be inclusive or'ed with pointers that are unpacked."
-AH_TEMPLATE(DATA_SEG_BITS, [Extra bits to be or'd in with any pointers
-stored in a Lisp_Object.])
-dnl if Emacs uses fewer than 32 bits for the value field of a LISP_OBJECT.
-
-case $opsys in
-  aix*)
-    dnl This works with 32-bit executables; Emacs doesn't support 64-bit.
-    AC_DEFINE(DATA_SEG_BITS, [0x20000000])
-    ;;
-  hpux*)
-    dnl The data segment on this machine always starts at address 0x40000000.
-    AC_DEFINE(DATA_SEG_BITS, [0x40000000])
-    ;;
-  irix6-5)
-    AC_DEFINE(DATA_SEG_BITS, [0x10000000])
-    ;;
-esac
-
-
 AH_TEMPLATE(TAB3, [Undocumented.])
 
 case $opsys in
@@ -4434,22 +4435,31 @@ AC_CACHE_CHECK([for _setjmp], [emacs_cv_func__setjmp],
      [emacs_cv_func__setjmp=no])])
 if test $emacs_cv_func__setjmp = yes; then
   AC_DEFINE([HAVE__SETJMP], 1, [Define to 1 if _setjmp and _longjmp work.])
-else
-  AC_CACHE_CHECK([for sigsetjmp], [emacs_cv_func_sigsetjmp],
-    [AC_LINK_IFELSE(
-       [AC_LANG_PROGRAM(
-        [[#include <setjmp.h>
-        ]],
-        [[sigjmp_buf j;
-          if (! sigsetjmp (j, 1))
-            siglongjmp (j, 1);]])],
-       [emacs_cv_func_sigsetjmp=yes],
-       [emacs_cv_func_sigsetjmp=no])])
-  if test $emacs_cv_func_sigsetjmp = yes; then
-    AC_DEFINE([HAVE_SIGSETJMP], 1,
-      [Define to 1 if sigsetjmp and siglongjmp work.
-       The value of this symbol is irrelevant if HAVE__SETJMP is defined.])
-  fi
+fi
+
+# We need to preserve signal mask to handle C stack overflows.
+AC_CACHE_CHECK([for sigsetjmp], [emacs_cv_func_sigsetjmp],
+  [AC_LINK_IFELSE(
+     [AC_LANG_PROGRAM(
+       [[#include <setjmp.h>
+       ]],
+       [[sigjmp_buf j;
+         if (! sigsetjmp (j, 1))
+          siglongjmp (j, 1);]])],
+     [emacs_cv_func_sigsetjmp=yes],
+     [emacs_cv_func_sigsetjmp=no])])
+if test $emacs_cv_func_sigsetjmp = yes; then
+  AC_DEFINE([HAVE_SIGSETJMP], 1,
+    [Define to 1 if sigsetjmp and siglongjmp work.])
+fi
+
+# We need all of these features to handle C stack overflows.
+if test "$ac_cv_header_sys_resource_h" = "yes" -a \
+       "$ac_cv_func_getrlimit" = "yes" -a \
+       "$emacs_cv_func_sigsetjmp" = "yes" -a \
+       "$emacs_cv_alternate_stack" = yes; then
+  AC_DEFINE([HAVE_STACK_OVERFLOW_HANDLING], 1,
+    [Define to 1 if C stack overflow can be handled in some cases.])
 fi
 
 case $opsys in
@@ -4580,20 +4590,7 @@ if test $emacs_cv_usable_FIONREAD = yes; then
   fi
 fi
 
-
 case $opsys in
-  dnl Emacs supplies its own malloc, but glib calls posix_memalign,
-  dnl and on Cygwin prior to version 1.7.24 that becomes the
-  dnl Cygwin-supplied posix_memalign.  As malloc is not the Cygwin
-  dnl malloc, the Cygwin posix_memalign always returns ENOSYS.  A
-  dnl workaround is to set G_SLICE=always-malloc.  This is no longer
-  dnl needed starting with cygwin-1.7.24, and it is no longer
-  dnl effective starting with glib-2.36. */
-  cygwin)
-    AC_DEFINE(G_SLICE_ALWAYS_MALLOC, 1, [Define to set the
-      G_SLICE environment variable to "always-malloc" at startup.])
-    ;;
-
   hpux11)
     dnl It works to open the pty's tty in the parent (Emacs), then
     dnl close and reopen it in the child.
@@ -4616,6 +4613,7 @@ esac
 # Set up the CFLAGS for real compilation, so we can substitute it.
 CFLAGS="$REAL_CFLAGS"
 CPPFLAGS="$REAL_CPPFLAGS"
+LIBS="$REAL_LIBS"
 
 ## Hack to detect a buggy GCC version.
 if test "x$GCC" = xyes \
@@ -4779,6 +4777,22 @@ else
 fi
 AC_SUBST(LIBXMENU)
 
+AC_CACHE_CHECK([for struct alignment],
+  [emacs_cv_struct_alignment],
+  [AC_COMPILE_IFELSE(
+     [AC_LANG_PROGRAM([[#include <stddef.h>
+                       struct __attribute__ ((aligned (8))) s { char c; };
+                       struct t { char c; struct s s; };
+                       char verify[offsetof (struct t, s) == 8 ? 1 : -1];
+                     ]])],
+     [emacs_cv_struct_alignment=yes],
+     [emacs_cv_struct_alignment=no])])
+if test "$emacs_cv_struct_alignment" = yes; then
+  AC_DEFINE([HAVE_STRUCT_ATTRIBUTE_ALIGNED], 1,
+    [Define to 1 if 'struct __attribute__ ((aligned (N)))' aligns the
+     structure to an N-byte boundary.])
+fi
+
 if test "${GNU_MALLOC}" = "yes" ; then
   AC_DEFINE(GNU_MALLOC, 1,
            [Define to 1 if you want to use the GNU memory allocator.])
@@ -4830,6 +4844,12 @@ AH_VERBATIM([FORTIFY_SOUR],
 #endif
 ])
 
+# If user asks to omit features, disable optional features that gnulib
+# might otherwise enable.
+if test "$with_features" = no && test "$enable_acl" != yes; then
+  enable_acl=no
+fi
+
 # Configure gnulib.  Although this does not affect CFLAGS or LIBS permanently.
 # it temporarily reverts them to their pre-pkg-config values,
 # because gnulib needs to work with both src (which uses the
@@ -4895,11 +4915,9 @@ case "$opsys" in
   gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;;
 
   mingw32)
-   ## MinGW64 does not prepend an underscore to symbols, so we must
-   ## pass a different -entry switch to linker.  FIXME: It is better
-   ## to make the entry points the same by changing unexw32.c.
+   ## Is it any better under MinGW64 to relocate emacs into higher addresses?
    case "$canonical" in
-     x86_64-*-*) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,__start -Wl,-Map,./temacs.map" ;;
+     x86_64-*-*) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x400000000 -Wl,-entry,__start -Wl,-Map,./temacs.map" ;;
      *) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,__start -Wl,-Map,./temacs.map" ;;
    esac
    ;;
@@ -4920,27 +4938,10 @@ LD_SWITCH_SYSTEM_TEMACS="$LDFLAGS_NOCOMBRELOC $LD_SWITCH_SYSTEM_TEMACS"
 
 AC_SUBST(LD_SWITCH_SYSTEM_TEMACS)
 
-## MinGW-specific post-link processing of temacs.
-TEMACS_POST_LINK=":"
-ADDSECTION=
-EMACS_HEAPSIZE=
-if test "${opsys}" = "mingw32"; then
-  TEMACS_POST_LINK="\$(MINGW_TEMACS_POST_LINK)"
-  ADDSECTION="../nt/addsection\$(EXEEXT)"
-  ## Preload heap size of temacs.exe in MB.
-  case "$canonical" in
-    x86_64-*-*) EMACS_HEAPSIZE=42 ;;
-    *) EMACS_HEAPSIZE=27 ;;
-  esac
-fi
-
-AC_SUBST(ADDSECTION)
-AC_SUBST(TEMACS_POST_LINK)
-AC_SUBST(EMACS_HEAPSIZE)
-
 ## Common for all window systems
 if test "$window_system" != "none"; then
   AC_DEFINE(HAVE_WINDOW_SYSTEM, 1, [Define if you have a window system.])
+  AC_DEFINE(POLL_FOR_INPUT, 1, [Define if you poll periodically to detect C-g.])
   WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o"
 fi
 
@@ -4994,9 +4995,9 @@ if test "${HAVE_GTK}" = "yes"; then
 fi
 
 if test $USE_ACL -ne 0; then
-  acl_summary="yes $LIB_ACL"
+  ACL_SUMMARY="yes $LIB_ACL"
 else
-  acl_summary=no
+  ACL_SUMMARY=no
 fi
 
 echo "
@@ -5021,6 +5022,23 @@ else
 echo "  Where do we find X Windows libraries?                   Standard dirs"
 fi
 
+optsep=
+emacs_config_features=
+for opt in XAW3D XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS \
+  GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT \
+  LIBOTF XFT ZLIB; do
+
+    case $opt in
+      NOTIFY|ACL) eval val=\${${opt}_SUMMARY} ;;
+      *) eval val=\${HAVE_$opt} ;;
+    esac
+    test x"$val" = xno && continue
+    AS_VAR_APPEND([emacs_config_features], ["$optsep$opt"])
+    optsep=' '
+done
+AC_DEFINE_UNQUOTED(EMACS_CONFIG_FEATURES, "${emacs_config_features}",
+  [Summary of some of the main features enabled by configure.])
+
 echo "  Does Emacs use -lXaw3d?                                 ${HAVE_XAW3D}"
 echo "  Does Emacs use -lXpm?                                   ${HAVE_XPM}"
 echo "  Does Emacs use -ljpeg?                                  ${HAVE_JPEG}"
@@ -5037,7 +5055,7 @@ echo "  Does Emacs use -ldbus?                                  ${HAVE_DBUS}"
 echo "  Does Emacs use -lgconf?                                 ${HAVE_GCONF}"
 echo "  Does Emacs use GSettings?                               ${HAVE_GSETTINGS}"
 echo "  Does Emacs use a file notification library?             ${NOTIFY_SUMMARY}"
-echo "  Does Emacs use access control lists?                    ${acl_summary}"
+echo "  Does Emacs use access control lists?                    ${ACL_SUMMARY}"
 echo "  Does Emacs use -lselinux?                               ${HAVE_LIBSELINUX}"
 echo "  Does Emacs use -lgnutls?                                ${HAVE_GNUTLS}"
 echo "  Does Emacs use -lxml2?                                  ${HAVE_LIBXML2}"
@@ -5153,7 +5171,7 @@ if test "${opsys}" = "mingw32"; then
   ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force-w32
 else
   ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
-fi
+fi || AC_MSG_ERROR(['src/epaths.h' could not be made.])
 ], [GCC="$GCC" CPPFLAGS="$CPPFLAGS" opsys="$opsys"])
 
 dnl NB we have to cheat and use the ac_... version because abs_top_srcdir
@@ -5166,3 +5184,5 @@ fi
 ])
 
 AC_OUTPUT
+
+test "$MAKE" = make || AC_MSG_NOTICE([Now you can run '$MAKE'.])
index 1626a156ea1481c564ec3582ca033b4710958a14..23e1d0dff76ae02087ca26ef3b87098313889ee8 100644 (file)
@@ -2,16 +2,27 @@
 
        * Makefile.in (dist): Update for new output variables.
 
-2014-10-06  Glenn Morris  <rgm@gnu.org>
+2014-10-12  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * macos.texi (Mac OS / GNUstep, Mac / GNUstep Basics)
+       (Mac / GNUstep Customization): Mac OS X 10.6 or later now required.
+
+2014-10-09  Glenn Morris  <rgm@gnu.org>
 
        * package.texi (Package Menu): The package list was changed to not
        say "unsigned" any more.
 
-2014-10-04  Glenn Morris  <rgm@gnu.org>
+2014-10-05  Glenn Morris  <rgm@gnu.org>
 
        * misc.texi (Sorting):
        * search.texi (Query Replace): Markup fixes.
 
+2014-10-04  Martin Rudalics  <rudalics@gmx.at>
+
+       * frames.texi (Scroll Bars): Describe use of horizontal scroll bars.
+
+2014-10-04  Glenn Morris  <rgm@gnu.org>
+
        * cmdargs.texi (Misc X):
        * display.texi (Optional Mode Line):
        * misc.texi (emacsclient Options):
 
        * frames.texi (Frame Commands):
        * cmdargs.texi (Window Size X): Mention the use of
-       `frame-resize-pixelwise' to make frames truly fullscreen or
-       maximized.
+       `frame-resize-pixelwise' to make frames truly fullscreen or maximized.
 
-2014-10-01  Glenn Morris  <rgm@gnu.org>
+2014-10-02  Glenn Morris  <rgm@gnu.org>
 
        * package.texi (Package Installation): Mention etc/package-keyring.gpg.
 
+2014-09-29  Eli Zaretskii  <eliz@gnu.org>
+
+       * emacsver.texi (EMACSVER): Bump to 20.0.50.
+
+2014-09-15  Daniel Colascione  <dancol@dancol.org>
+
+       * regs.texi (Text Registers): Update end-user documentation
+       to reflect `insert-register' interface change.
+
+2014-08-07  Reuben Thomas  <rrt@sc3d.org>
+
+       * programs.texi (Program Modes): Don't advertise VMS DCL support
+       any more.
+
+2014-08-07  Reuben Thomas  <rrt@sc3d.org>
+
+       Refer to MS-DOS using the same name everywhere.
+
+       * Makefile.in (EMACSSOURCES): ``MS-DOG'', ``MSDOG'' and ``msdog''
+       become ``MS-DOS''; ``msdog'' in filenames becomes ``msdos''.
+       * emacs-xtra.texi: ditto.
+       * emacs.texi: ditto.
+       * makefile.w32-in: ditto.
+       * msdog-xtra.texi: ditto, and rename file.
+       * msdog.texi: ditto, and rename file.
+
 2014-07-21  Glenn Morris  <rgm@gnu.org>
 
        * emacs.texi (Intro): Workaround makeinfo 4 @acronym bug.  (Bug#18040)
 
-2014-07-03  Juri Linkov  <juri@jurta.org>
+2014-07-09  Juri Linkov  <juri@jurta.org>
 
        * search.texi (Regexp Search): Update lax space matching that is
        not active in regexp search by default now.  (Bug#17901)
 
-2014-06-29  Glenn Morris  <rgm@gnu.org>
+2014-07-03  Glenn Morris  <rgm@gnu.org>
 
        * help.texi (Misc Help):
        * trouble.texi (Checklist): "Online" help doesn't mean what it
        used to any more.
 
+2014-06-23  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (%.texi): Disable implicit rules.
+       (mkinfodir): Remove.
+       (.dvi.ps): Replace with pattern rule.
+       (${buildinfodir}): New rule.
+       ($(buildinfodir)/emacs.info): Use order-only prereq for output dir.
+       Use $<.
+       (emacs.dvi, emacs.pdf, emacs.html, emacs-xtra.dvi, emacs-xtra.pdf):
+       Use $<.
+       (%.ps): New rule.
+
+2014-06-15  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (bootstrap-clean): New.
+
+2014-06-10  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (INFO_EXT): Remove and replace by ".info" throughout.
+       (INFO_OPTS): Set directly rather than with configure.
+
 2014-06-08  Glenn Morris  <rgm@gnu.org>
 
        * entering.texi (Entering Emacs): Small fix re initial-buffer-choice.
        * ack.texi (Acknowledgments):
        * emacs.texi (Acknowledgments): Updates.
 
-2014-06-07  Glenn Morris  <rgm@gnu.org>
+2014-06-08  Glenn Morris  <rgm@gnu.org>
+
+       * ack.texi (Acknowledgments):
+       * emacs.texi (Acknowledgments): Updates.
 
        * programs.texi (Prettifying Symbols): Remove node.
        (Misc for Programs): Mention more briefly here.
        * emacs.texi (Top): Update menu.
 
-2014-06-05  Glenn Morris  <rgm@gnu.org>
-
        * package.texi (Package Menu, Package Installation):
        Mention signed packages.
-
-2014-06-03  Glenn Morris  <rgm@gnu.org>
-
-       * package.texi (Package Installation): Mention package-pinned-packages.
+       (Package Installation): Mention package-pinned-packages.
 
 2014-06-02  Glenn Morris  <rgm@gnu.org>
 
+       * ack.texi (Acknowledgments): Remove some obsolete items.
        * misc.texi [iftex]: Update chapter summary.
-       (Emulation): Remove ludicrously outdated claim.
-
-2014-05-29  Glenn Morris  <rgm@gnu.org>
+       (Emulation): Remove section.
 
        * macos.texi (Mac / GNUstep Customization): Mention ns custom group.
        (Customization options specific to Mac OS / GNUstep): Remove section.
 
-2014-05-28  Glenn Morris  <rgm@gnu.org>
-
-       * macos.texi (Mac / GNUstep Customization): Mention some new features.
-
-2014-05-27  Glenn Morris  <rgm@gnu.org>
-
        * abbrevs.texi (Expanding Abbrevs): Update re abbrev-expand-function.
 
-2014-05-21  Eli Zaretskii  <eliz@gnu.org>
+2014-05-26  Eli Zaretskii  <eliz@gnu.org>
 
        * frames.texi (Fonts): Clarify which frames are affected by
        setting font from the menu and in default-frame-alist.
        (Bug#17532)
 
-2014-05-12  Eli Zaretskii  <eliz@gnu.org>
+2014-05-14  Eli Zaretskii  <eliz@gnu.org>
 
-       * mule.texi (Language Environments): Remove unused @anchor.
-       (Bug#17479)
+       * mule.texi (Language Environments): Remove unused @anchor.  (Bug#17479)
 
-2014-05-02  Eli Zaretskii  <eliz@gnu.org>
+2014-05-04  Eli Zaretskii  <eliz@gnu.org>
 
        * trouble.texi (Lossage, DEL Does Not Delete, Stuck Recursive)
        (Screen Garbled, Text Garbled, After a Crash, Emergency Escape)
        (Bug Criteria, Understanding Bug Reporting, Checklist, Service):
        Improve indexing.
 
-2014-04-29  Eli Zaretskii  <eliz@gnu.org>
+2014-05-04  Leo Liu  <sdl.web@gmail.com>
+
+       * cal-xtra.texi (Non-Gregorian Diary): Document new features for
+       Chinese calendar and diary.
+
+2014-04-30  Eli Zaretskii  <eliz@gnu.org>
 
        * trouble.texi (Quitting, DEL Does Not Delete, Emergency Escape)
        (Bug Criteria): Fix usage of @kbd and @key.  (Bug#17362)
 
        * anti.texi (Antinews): Fix usage of @kbd and @key.
 
-2014-04-26  Eli Zaretskii  <eliz@gnu.org>
-
        * sending.texi (Mail Signature): Document signature variables used
        by Message mode.  (Bug#17308)
 
-2014-04-21  Eli Zaretskii  <eliz@gnu.org>
+2014-04-22  Eli Zaretskii  <eliz@gnu.org>
 
        * buffers.texi (Uniquify): Clarify the default uniquification.
 
        EMACSLOADPATH.  Index all the environment variables.
        (Misc Variables): Index all the environment variables.
 
-2014-04-13  Eli Zaretskii  <eliz@gnu.org>
+2014-04-17  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * Makefile.in (infoclean): Be consistent about reporting failures.
+       Do not fail merely because the info directory does not exist,
+       but do fail if it exists and can't be cleaned.
+
+2014-04-16  Eli Zaretskii  <eliz@gnu.org>
 
        * display.texi (Cursor Display): Explain better how to customize
        'blink-cursor-blinks'.
 
-2014-04-05  Glenn Morris  <rgm@gnu.org>
+2014-04-07  Glenn Morris  <rgm@gnu.org>
 
        * trouble.texi (Checklist): Dribble files may contain passwords.
 
-2014-04-04  Glenn Morris  <rgm@gnu.org>
-
        * files.texi (Backup Names):
        * arevert-xtra.texi (Supporting additional buffers):
        Update for default values of some -function vars no longer being nil.
        (Supporting additional buffers):
        Update for buffer-stale-function also applying to file-buffers.
 
+2014-03-28  Glenn Morris  <rgm@gnu.org>
+
+       * custom.texi (Terminal Init): Mention term-file-aliases.
+
+2014-03-26  Glenn Morris  <rgm@gnu.org>
+
+       * ack.texi (Acknowledgments): Remove reference to obsolete file.
+
+2014-03-22  Glenn Morris  <rgm@gnu.org>
+
+       * help.texi (Help Files): Update C-h g description.
+
 2014-03-16  Dmitry Gutov  <dgutov@yandex.ru>
 
        * programs.texi (Matching): Update the missed spot.  (Bug#17008)
 
        * frames.texi (Dialog Boxes): Add use-file-dialog.
 
-2003-11-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-11-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * ack.texi: Note that Alan Mackenzie contributed the AWK support
        in CC Mode.
index 1d686959934c19adadb13c3d7d64fdc8b5700e10..352768517fac98138c3fd2edc3126cfe495dcf9f 100644 (file)
@@ -54,12 +54,11 @@ GZIP_PROG = @GZIP_PROG@
 
 HTML_OPTS = --no-split --html
 
-INFO_EXT=@INFO_EXT@
 # Options used only when making info output.
 # --no-split is only needed because of MS-DOS.
 # For a possible alternative, see
 # http://lists.gnu.org/archive/html/emacs-devel/2011-01/msg01182.html
-INFO_OPTS=@INFO_OPTS@
+INFO_OPTS= --no-split
 
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
@@ -92,7 +91,7 @@ EMACS_XTRA= \
        $(srcdir)/vc-xtra.texi \
        $(srcdir)/vc1-xtra.texi \
        $(srcdir)/fortran-xtra.texi \
-       $(srcdir)/msdog-xtra.texi
+       $(srcdir)/msdos-xtra.texi
 
 EMACSSOURCES= \
        ${srcdir}/emacs.texi \
@@ -136,53 +135,53 @@ EMACSSOURCES= \
        ${srcdir}/xresources.texi \
        ${srcdir}/anti.texi \
        ${srcdir}/macos.texi \
-       ${srcdir}/msdog.texi \
+       ${srcdir}/msdos.texi \
        ${srcdir}/gnu.texi \
        ${srcdir}/glossary.texi \
        ${srcdir}/ack.texi \
        ${srcdir}/kmacro.texi \
        $(EMACS_XTRA)
 
-## The info/ directory exists in release tarfiles but not the repository.
-mkinfodir = @${MKDIR_P} ${buildinfodir}
+## Disable implicit rules.
+%.texi: ;
 
 .PHONY: info dvi html pdf ps
 
-.SUFFIXES: .ps .dvi
-
-.dvi.ps:
-       $(DVIPS) -o $@ $<
-
-info: $(buildinfodir)/emacs$(INFO_EXT)
+info: $(buildinfodir)/emacs.info
 dvi: $(DVI_TARGETS)
 html: $(HTML_TARGETS)
 pdf: $(PDF_TARGETS)
 ps: $(PS_TARGETS)
 
+## The info/ directory exists in release tarfiles but not the repository.
+${buildinfodir}:
+       ${MKDIR_P} $@
+
 # Note that all the Info targets build the Info files in srcdir.
 # There is no provision for Info files to exist in the build directory.
 # In a distribution of Emacs, the Info files should be up to date.
-# Note: "<" is not portable in ordinary make rules.
-$(buildinfodir)/emacs$(INFO_EXT): ${EMACSSOURCES}
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/emacs.texi
+$(buildinfodir)/emacs.info: ${EMACSSOURCES} | ${buildinfodir}
+       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $<
 
 emacs.dvi: ${EMACSSOURCES}
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs.texi
+       $(ENVADD) $(TEXI2DVI) $<
 
 emacs.pdf: ${EMACSSOURCES}
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs.texi
+       $(ENVADD) $(TEXI2PDF) $<
 
 emacs.html: ${EMACSSOURCES}
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/emacs.texi
+       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ $<
 
 emacs-xtra.dvi: $(EMACS_XTRA)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-xtra.texi
+       $(ENVADD) $(TEXI2DVI) $<
 
 emacs-xtra.pdf: $(EMACS_XTRA)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-xtra.texi
+       $(ENVADD) $(TEXI2PDF) $<
+
+%.ps: %.dvi
+       $(DVIPS) -o $@ $<
 
-.PHONY: mostlyclean clean distclean maintainer-clean infoclean
+.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean infoclean
 
 ## Temp files.
 mostlyclean:
@@ -199,9 +198,12 @@ distclean: clean
 
 ## In the standalone tarfile, the clean rule runs this.
 infoclean:
-       -cd $(buildinfodir) && rm -f emacs$(INFO_EXT) emacs$(INFO_EXT)-[1-9] emacs$(INFO_EXT)-[1-9][0-9]
+       rm -f \
+         $(buildinfodir)/emacs.info \
+         $(buildinfodir)/emacs.info-[1-9] \
+         $(buildinfodir)/emacs.info-[1-9][0-9]
 
-maintainer-clean: distclean infoclean
+bootstrap-clean maintainer-clean: distclean infoclean
 
 .PHONY: dist
 
index ccd58b7aece1ede1d176dfd7920f744e5aa8a678..9f2496da26300ee8ca49920a6c029555fa4d5df8 100644 (file)
@@ -349,8 +349,7 @@ mail messages; and @file{saveplace.el}, for preserving point's
 location in files between editing sessions.
 
 @item
-Gary Foster wrote @file{crisp.el}, the emulation for CRiSP and Brief
-editors; and @file{scroll-all.el}, a mode for scrolling several buffers
+Gary Foster wrote @file{scroll-all.el}, a mode for scrolling several buffers
 together.
 
 @item
@@ -601,7 +600,7 @@ buffers.
 @item
 Michael Kifer wrote @code{ediff}, an interactive interface to the
 @command{diff}, @command{patch}, and @command{merge} programs; and
-Viper, another emulator of the VI editor.
+Viper, an emulator of the VI editor.
 
 @item
 Richard King wrote the first version of @file{userlock.el} and
@@ -883,9 +882,6 @@ a mode for editing makefiles.
 Thien-Thi Nguyen and Dan Nicolaescu wrote @file{hideshow.el}, a minor
 mode for selectively displaying blocks of text.
 
-@item
-Jurgen Nickelsen wrote @file{ws-mode.el}, providing WordStar emulation.
-
 @item
 Dan Nicolaescu added support for running Emacs as a daemon.  He also
 wrote @file{romanian.el}, support for editing Romanian text;
@@ -1037,10 +1033,8 @@ Alex Rezinsky wrote @file{which-func.el}, a mode that shows the name
 of the current function in the mode line.
 
 @item
-Rob Riepel wrote @file{tpu-edt.el} and its associated files, providing
-an emulation of the VMS TPU text editor emulating the VMS EDT editor,
-and @file{vt-control.el}, providing some control functions for the DEC
-VT line of terminals.
+Rob Riepel wrote @file{vt-control.el}, providing some control
+functions for the DEC VT line of terminals.
 
 @item
 Nick Roberts wrote @file{t-mouse.el}, for mouse support in text
@@ -1083,9 +1077,6 @@ references in Info files.
 James B. Salem and Brewster Kahle wrote @file{completion.el}, providing
 dynamic word completion.
 
-@item
-Masahiko Sato wrote @file{vip.el}, an emulation of the VI editor.
-
 @item
 Holger Schauer wrote @file{fortune.el}, a package for using fortune in
 message signatures.
@@ -1194,9 +1185,8 @@ written @file{easymenu.el}, a facility for defining Emacs menus;
 color; and also co-authored portions of CC mode.
 
 @item
-Sam Steingold wrote @file{gulp.el}, a facility for asking package
-maintainers for updated versions of their packages via e-mail, and
-@file{midnight.el}, a package for running a command every midnight.
+Sam Steingold wrote @file{midnight.el}, a package for running a
+command every midnight.
 
 @item
 Ake Stenhoff and Lars Lindberg wrote @file{imenu.el}, a framework for
index 82864859473cdd810bbeb8ca224ff3be04c5136b..cf1eba17dec03645b789fcbd259e219e33532bcd 100644 (file)
@@ -517,7 +517,7 @@ the fourth pattern.
 @subsection Diary Entries Using non-Gregorian Calendars
 
   As well as entries based on the standard Gregorian calendar, your
-diary can have entries based on Bahá'í, Hebrew, or Islamic dates.
+diary can have entries based on Bahá'í, Chinese, Hebrew, or Islamic dates.
 Recognition of such entries can be time-consuming, however, and since
 most people don't use them, you must explicitly enable their use.  If
 you want the diary to recognize Hebrew-date diary entries, for example,
@@ -531,22 +531,27 @@ you must do this:
 @findex diary-islamic-mark-entries
 @findex diary-bahai-list-entries
 @findex diary-bahai-mark-entries
+@findex diary-chinese-list-entries
+@findex diary-chinese-mark-entries
 @smallexample
 (add-hook 'diary-nongregorian-listing-hook 'diary-hebrew-list-entries)
 (add-hook 'diary-nongregorian-marking-hook 'diary-hebrew-mark-entries)
 @end smallexample
 
 @noindent
-Similarly, for Islamic and Bahá'í entries, add
-@code{diary-islamic-list-entries} and @code{diary-islamic-mark-entries}, or
-@code{diary-bahai-list-entries} and @code{diary-bahai-mark-entries}.
+Similarly, for Islamic, Bahá'í and Chinese entries, add
+@code{diary-islamic-list-entries} and @code{diary-islamic-mark-entries},
+@code{diary-bahai-list-entries} and @code{diary-bahai-mark-entries},
+or @code{diary-chinese-list-entries} and @code{diary-chinese-mark-entries}.
 
 @vindex diary-bahai-entry-symbol
+@vindex diary-chinese-entry-symbol
 @vindex diary-hebrew-entry-symbol
 @vindex diary-islamic-entry-symbol
   These diary entries have the same formats as Gregorian-date diary
 entries; except that @code{diary-bahai-entry-symbol} (default @samp{B})
-must precede a Bahá'í date, @code{diary-hebrew-entry-symbol} (default
+must precede a Bahá'í date, @code{diary-chinese-entry-symbol} (default
+@samp{C}) a Chinese date, @code{diary-hebrew-entry-symbol} (default
 @samp{H}) a Hebrew date, and @code{diary-islamic-entry-symbol} (default
 @samp{I}) an Islamic date.  Moreover, non-Gregorian month names may not
 be abbreviated (because the first three letters are often not unique).
@@ -573,7 +578,7 @@ nonmarking if preceded by @code{diary-nonmarking-symbol} (default
 
   Here is a table of commands used in the calendar to create diary
 entries that match the selected date and other dates that are similar in
-the Bahá'í, Hebrew, or Islamic calendars:
+the Bahá'í, Chinese, Hebrew, or Islamic calendars:
 
 @table @kbd
 @item i h d
@@ -594,6 +599,14 @@ the Bahá'í, Hebrew, or Islamic calendars:
 @code{diary-bahai-insert-monthly-entry}
 @item i B y
 @code{diary-bahai-insert-yearly-entry}
+@item i C d
+@code{diary-chinese-insert-entry}
+@item i C m
+@code{diary-chinese-insert-monthly-entry}
+@item i C y
+@code{diary-chinese-insert-yearly-entry}
+@item i C a
+@code{diary-chinese-insert-anniversary-entry}
 @end table
 
 @findex diary-hebrew-insert-entry
@@ -605,6 +618,11 @@ the Bahá'í, Hebrew, or Islamic calendars:
 @findex diary-bahai-insert-entry
 @findex diary-bahai-insert-monthly-entry
 @findex diary-bahai-insert-yearly-entry
+@findex diary-chinese-insert-entry
+@findex diary-chinese-insert-monthly-entry
+@findex diary-chinese-insert-yearly-entry
+@findex diary-chinese-insert-anniversary-entry
+
   These commands work much like the corresponding commands for ordinary
 diary entries: they apply to the date that point is on in the calendar
 window, and what they do is insert just the date portion of a diary
index 9b78128d3231615fb852f280ffcce1369a3ddef4..0d0013f5ace10ba9a241eeaa26a6259328574519 100644 (file)
@@ -2445,9 +2445,13 @@ harmless, so those do not need a conditional.
 @node Terminal Init
 @subsection Terminal-specific Initialization
 
+@vindex term-file-aliases
   Each terminal type can have a Lisp library to be loaded into Emacs when
 it is run on that type of terminal.  For a terminal type named
-@var{termtype}, the library is called @file{term/@var{termtype}} and it is
+@var{termtype}, the library is called @file{term/@var{termtype}}.
+(If there is an entry of the form @code{(@var{termtype} . @var{alias})}
+in the @code{term-file-aliases} association list, Emacs uses
+@var{alias} in place of @var{termtype}.)  The library is
 found by searching the directories @code{load-path} as usual and trying the
 suffixes @samp{.elc} and @samp{.el}.  Normally it appears in the
 subdirectory @file{term} of the directory where most Emacs libraries are
index 817d1c6fd056dde5720d3e44324b46f98b771fa5..ba2b0f0d67758a88523f78556f6b51df7b232b60 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo    @c -*-texinfo-*-
 @comment %**start of header
-@setfilename ../../info/emacs-xtra
+@setfilename ../../info/emacs-xtra.info
 @settitle Specialized Emacs Features
 @c Merge all functions, variables, and keys into the concept index.
 @syncodeindex fn cp
@@ -120,7 +120,7 @@ the Emacs manual.
 
 @include fortran-xtra.texi
 
-@include msdog-xtra.texi
+@include msdos-xtra.texi
 
 @lowersections
 @end iftex
index 81a7580751159b38160e9e4b22a644777a29af68..702aa64bc250db934a6890dd7dccce736495c654 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo  @c -*- coding: utf-8 -*-
 
-@setfilename ../../info/emacs
+@setfilename ../../info/emacs.info
 @settitle GNU Emacs Manual
 
 @c The edition number appears in more than one place in this file
@@ -201,7 +201,6 @@ Advanced Features
 * Editing Binary Files::  Editing binary files with Hexl mode.
 * Saving Emacs Sessions:: Saving Emacs state from one session to the next.
 * Recursive Edit::      Performing edits while "within another command".
-* Emulation::           Emulating some other editors with Emacs.
 * Hyperlinking::        Following links in buffers.
 * Amusements::          Various games and hacks.
 * Packages::            Installing additional features.
@@ -1575,8 +1574,8 @@ Lisp programming.
 
 @include anti.texi
 @include macos.texi
-@c Includes msdog-xtra.
-@include msdog.texi
+@c Includes msdos-xtra.
+@include msdos.texi
 @include gnu.texi
 @include glossary.texi
 @ifnottex
index fe5e41e091eb306dc6aaffee4b6b23b15910d06a..ac01c185bc1dfef1bfa3fd9684ab45165a8eb125 100644 (file)
@@ -1,4 +1,4 @@
 @c It would be nicer to generate this using configure and @version@.
 @c However, that would mean emacsver.texi would always be newer
 @c then the info files in release tarfiles.
-@set EMACSVER 24.3.94
+@set EMACSVER 25.0.50
index 8c2289b83de189c4ebc56738b4de6db6cb3726ae..da0dd8aa6ac50e428b66722f6f089a860782d6d3 100644 (file)
@@ -904,10 +904,11 @@ those are drawn by the toolkit and not directly by Emacs.
 @section Scroll Bars
 @cindex Scroll Bar mode
 @cindex mode, Scroll Bar
+@cindex Vertical Scroll Bar
 
-  On graphical displays, there is a @dfn{scroll bar} on the side of
-each Emacs window.  Clicking @kbd{Mouse-1} on the scroll bar's up and
-down buttons scrolls the window by one line at a time.  Clicking
+  On graphical displays, there is a @dfn{vertical scroll bar} on the
+side of each Emacs window.  Clicking @kbd{Mouse-1} on the scroll bar's
+up and down buttons scrolls the window by one line at a time.  Clicking
 @kbd{Mouse-1} above or below the scroll bar's inner box scrolls the
 window by nearly the entire height of the window, like @kbd{M-v} and
 @kbd{C-v} respectively (@pxref{Moving Point}).  Dragging the inner box
@@ -921,23 +922,23 @@ in the scroll bar lets you drag the inner box up and down.
 
 @findex scroll-bar-mode
 @findex toggle-scroll-bar
-  To toggle the use of scroll bars, type @kbd{M-x scroll-bar-mode}.
-This command applies to all frames, including frames yet to be
-created.  To toggle scroll bars for just the selected frame, use the
-command @kbd{M-x toggle-scroll-bar}.
+  To toggle the use of vertical scroll bars, type @kbd{M-x
+scroll-bar-mode}.  This command applies to all frames, including frames
+yet to be created.  To toggle vertical scroll bars for just the selected
+frame, use the command @kbd{M-x toggle-scroll-bar}.
 
 @vindex scroll-bar-mode
-  To control the use of scroll bars at startup, customize the variable
-@code{scroll-bar-mode}.  Its value should be either @code{right} (put
-scroll bars on the right side of windows), @code{left} (put them on
-the left), or @code{nil} (disable scroll bars).  By default, Emacs
-puts scroll bars on the right if it was compiled with GTK+ support on
-the X Window System, and on MS-Windows or Mac OS; Emacs puts scroll
-bars on the left if compiled on the X Window System without GTK+
-support (following the old convention for X applications).
+  To control the use of vertical scroll bars at startup, customize the
+variable @code{scroll-bar-mode}.  Its value should be either
+@code{right} (put scroll bars on the right side of windows), @code{left}
+(put them on the left), or @code{nil} (disable vertical scroll bars).
+By default, Emacs puts scroll bars on the right if it was compiled with
+GTK+ support on the X Window System, and on MS-Windows or Mac OS; Emacs
+puts scroll bars on the left if compiled on the X Window System without
+GTK+ support (following the old convention for X applications).
 
 @vindex scroll-bar-width
-@cindex width of the scroll bar
+@cindex width of the vertical scroll bar
   You can also use the X resource @samp{verticalScrollBars} to enable
 or disable the scroll bars (@pxref{Resources}).  To control the scroll
 bar width, change the @code{scroll-bar-width} frame parameter
@@ -954,6 +955,39 @@ end of the buffer is shown; if @code{nil}, the thumb will be at the
 bottom when the end of the buffer is shown.  You can not over-scroll
 when the entire buffer is visible.
 
+@cindex Horizontal Scroll Bar
+@cindex Horizontal Scroll Bar mode
+  On graphical displays with toolkit support, Emacs may also supply a
+@dfn{horizontal scroll bar} on the bottom of each window.  Clicking
+@kbd{Mouse-1} on the that scroll bar's left and right buttons scrolls
+the window horizontally by one column at a time.  Clicking @kbd{Mouse-1}
+on the left or right of the scroll bar's inner box scrolls the window by
+four columns.  Dragging the inner box scrolls the window continuously.
+
+  Note that such horizontal scrolling can make the window's position of
+point disappear on the left or the right.  Typing a character to insert
+text or moving point with a keyboard command will usually bring it back
+into view.
+
+@findex horizontal-scroll-bar-mode
+  To toggle the use of horizontal scroll bars, type @kbd{M-x
+horizontal-scroll-bar-mode}.  This command applies to all frames,
+including frames yet to be created.  To toggle horizontal scroll bars
+for just the selected frame, use the command @kbd{M-x
+toggle-horizontal-scroll-bar}.
+
+@vindex horizontal-scroll-bar-mode
+  To control the use of horizontal scroll bars at startup, customize the
+variable @code{horizontal-scroll-bar-mode}.
+
+@vindex scroll-bar-height
+@cindex height of the horizontal scroll bar
+  You can also use the X resource @samp{horizontalScrollBars} to enable
+or disable horizontal scroll bars (@pxref{Resources}).  To control the
+scroll bar height, change the @code{scroll-bar-height} frame parameter
+(@pxref{Frame Parameters,,, elisp, The Emacs Lisp Reference Manual}).
+
+
 @node Drag and Drop
 @section Drag and Drop
 @cindex drag and drop
index c2857331988afb022ea8ff6fb6911e3e284b646a..22bebed87df120fc81239b95a543f5cc153a9a4d 100644 (file)
@@ -604,7 +604,8 @@ Display information about where to get external packages
 @item C-h C-f
 Display the Emacs frequently-answered-questions list (@code{view-emacs-FAQ}).
 @item C-h g
-Display information about the GNU Project (@code{describe-gnu-project}).
+Visit a @uref{http://www.gnu.org} page with information about the GNU
+Project (@code{describe-gnu-project}).
 @item C-h C-m
 Display information about ordering printed copies of Emacs manuals
 (@code{view-order-manuals}).
index 2177ad4e21046c5132d5d886a04892f7a1da5b90..048b49cefc944f8883ba112d1a3f00c462521175 100644 (file)
@@ -12,7 +12,7 @@ the GNUstep libraries on GNU/Linux or other operating systems, or on
 Mac OS X with native window system support.  On Mac OS X, Emacs can be
 built either without window system support, with X11, or with the
 Cocoa interface; this section only applies to the Cocoa build.  This
-does not support versions of Mac OS X earlier than 10.4.
+does not support versions of Mac OS X earlier than 10.6.
 
   For various historical and technical reasons, Emacs uses the term
 @samp{Nextstep} internally, instead of ``Cocoa'' or ``Mac OS X''; for
@@ -84,7 +84,7 @@ set, which often causes the subprocesses it launches to behave differently than
 they would when launched from the shell.
 
 For the PATH and MANPATH variables, a system-wide method
-of setting PATH is recommended on Mac OS X 10.5 and later, using the
+of setting PATH is recommended on Mac OS X, using the
 @file{/etc/paths} files and the @file{/etc/paths.d} directory.
 
 @node Mac / GNUstep Customization
@@ -118,7 +118,7 @@ Useful in this context is the listing of all faces obtained by
 @kbd{M-x list-faces-display}.
 
 @cindex Core Text, on Mac OS X
-In Mac OS X 10.5 and later, Emacs uses a Core Text based font backend
+In Mac OS X, Emacs uses a Core Text based font backend
 by default.  If you prefer the older font style, enter the following
 at the command-line before starting Emacs:
 
index 297ec496fe68fec52f9a9413497c26801fb2df4a..d492a50686a2f9c5344d1bdf79fea9f9e1ab7f19 100644 (file)
@@ -54,7 +54,7 @@ EMACS_XTRA=\
        $(srcdir)/vc-xtra.texi \
        $(srcdir)/vc1-xtra.texi \
        $(srcdir)/fortran-xtra.texi \
-       $(srcdir)/msdog-xtra.texi
+       $(srcdir)/msdos-xtra.texi
 
 EMACSSOURCES= \
        $(srcdir)/emacs.texi \
@@ -97,7 +97,7 @@ EMACSSOURCES= \
        $(srcdir)/xresources.texi \
        $(srcdir)/anti.texi \
        $(srcdir)/macos.texi \
-       $(srcdir)/msdog.texi \
+       $(srcdir)/msdos.texi \
        $(srcdir)/gnu.texi \
        $(srcdir)/glossary.texi \
        $(srcdir)/ack.texi \
index 9d660f16e19c53b69c15ceb39f2e12af9d51cecc..af4d21fe1801173b8143f497b187144002beaa99 100644 (file)
@@ -1,17 +1,17 @@
 @c This is part of the Emacs manual.
-@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2014 Free Software
-@c Foundation, Inc.
+@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2014
+@c   Free Software Foundation, Inc.
 @c See file emacs.texi for copying conditions.
 @iftex
 @chapter Miscellaneous Commands
 
   This chapter contains several brief topics that do not fit anywhere
-else: viewing ``document files'', reading Usenet news, running shell
-commands and shell subprocesses, using a single shared Emacs for
-utilities that expect to run an editor as a subprocess, printing
-hardcopy, sorting text, editing binary files, saving an Emacs session
-for later resumption, following hyperlinks, emulating other editors,
-and various diversions and amusements.
+else: reading Usenet news, viewing PDFs and other such documents, web
+browsing, running shell commands and shell subprocesses, using a
+single shared Emacs for utilities that expect to run an editor as a
+subprocess, printing, sorting text, editing binary files, saving an
+Emacs session for later resumption, recursive editing level, following
+hyperlinks, and various diversions and amusements.
 
 @end iftex
 
@@ -2268,20 +2268,20 @@ new major mode which provides a command to switch back.  These
 approaches give you more flexibility to go back to unfinished tasks in
 the order you choose.
 
+@ignore
+@c Apart from edt and viper, this is all obsolete.
+@c (Can't believe we were saying ``most other editors'' into 2014!)
+@c There seems no point having a node just for those, which both have
+@c their own manuals.
 @node Emulation
 @section Emulation
 @cindex emulating other editors
 @cindex other editors
 @cindex EDT
 @cindex vi
-@cindex PC key bindings
-@cindex scrolling all windows
-@cindex PC selection
-@cindex Motif key bindings
-@cindex Macintosh key bindings
 @cindex WordStar
 
-  GNU Emacs can be programmed to emulate (more or less) some other
+  GNU Emacs can be programmed to emulate (more or less) most other
 editors.  Standard facilities can emulate these:
 
 @table @asis
@@ -2318,7 +2318,7 @@ buffers or major modes while in EDT emulation.
 
 @item vi (Berkeley editor)
 @findex viper-mode
-Viper is the newest emulator for vi.  It implements several levels of
+Viper is an emulator for vi.  It implements several levels of
 emulation; level 1 is closest to vi itself, while level 5 departs
 somewhat from strict emulation to take advantage of the capabilities of
 Emacs.  To invoke Viper, type @kbd{M-x viper-mode}; it will guide you
@@ -2359,6 +2359,8 @@ not use it.
 @kbd{M-x wordstar-mode} provides a major mode with WordStar-like
 key bindings.
 @end table
+@end ignore
+
 
 @node Hyperlinking
 @section Hyperlinking and Navigation Features
similarity index 99%
rename from doc/emacs/msdog-xtra.texi
rename to doc/emacs/msdos-xtra.texi
index 876be52282a05a6cac797bc4b097012874144ed9..c8f587cd9d16ebbd4a5066a677ef4b0793ecf4ad 100644 (file)
@@ -6,19 +6,18 @@
 @c printed version) or in the main Emacs manual (for the on-line version).
 @node MS-DOS
 @section Emacs and MS-DOS
-@cindex MS-DOG
 @cindex MS-DOS peculiarities
 
   This section briefly describes the peculiarities of using Emacs on
-the MS-DOS ``operating system'' (also known as ``MS-DOG'').
+the MS-DOS ``operating system''.
 @iftex
 Information about Emacs and Microsoft's current operating system
-Windows (also known as ``Losedows'') is in the main Emacs manual
+Windows is in the main Emacs manual
 (@pxref{Microsoft Windows,,, emacs, the Emacs Manual}).
 @end iftex
 @ifnottex
 Information about peculiarities common to MS-DOS and Microsoft's
-current operating systems Windows (also known as ``Losedows'') is in
+current operating systems Windows is in
 @ref{Microsoft Windows}.
 @end ifnottex
 
similarity index 99%
rename from doc/emacs/msdog.texi
rename to doc/emacs/msdos.texi
index 7c5b360072868310fb9dd67fea2c44c220e1e91c..a4d61e2e73ac42a44f2232409eb2f91a5a145cff 100644 (file)
@@ -9,7 +9,7 @@
 
   This section describes peculiarities of using Emacs on Microsoft
 Windows.  Some of these peculiarities are also relevant to Microsoft's
-older MS-DOS ``operating system'' (also known as ``MS-DOG'').
+older MS-DOS operating system.
 However, Emacs features that are relevant @emph{only} to MS-DOS are
 described in a separate
 @iftex
@@ -986,5 +986,5 @@ click-to-focus policy.
 @end ifnottex
 
 @ifnottex
-@include msdog-xtra.texi
+@include msdos-xtra.texi
 @end ifnottex
index 05008790b4ff51656e9e828911c63a04cd7c4b82..4c80449c2a2a22d0afed7d64ea44a4262b7b7efa 100644 (file)
@@ -88,8 +88,8 @@ Fortran, Icon, IDL (CORBA), IDLWAVE, Java, Javascript, Metafont
 Octave, Pascal, Perl, Pike, PostScript, Prolog, Python, Ruby, Simula, Tcl,
 and VHDL@.  An alternative mode for Perl is called CPerl mode.  Modes are
 also available for the scripting languages of the common GNU and Unix
-shells, VMS DCL, and MS-DOS/MS-Windows @samp{BAT} files, and for
-makefiles, DNS master files, and various sorts of configuration files.
+shells, and MS-DOS/MS-Windows @samp{BAT} files, and for makefiles,
+DNS master files, and various sorts of configuration files.
 
   Ideally, Emacs should have a major mode for each programming
 language that you might want to edit.  If it doesn't have a mode for
index a0ff70793885b7330c7534b39eb11c3d9f38f854..bc4abb389c43a42be01fa29a88315ef0d5cc47b8 100644 (file)
@@ -149,9 +149,9 @@ during the collection process, you can use the following setting.
 @kindex C-x r i
 @findex insert-register
   @kbd{C-x r i @var{r}} inserts in the buffer the text from register
-@var{r}.  Normally it leaves point before the text and sets the mark
-after, without activating it.  With a numeric argument, it instead
-puts point after the text and the mark before.
+@var{r}.  Normally it leaves point after the text and sets the mark
+before, without activating it.  With a numeric argument, it instead
+puts before after the text and the mark after.
 
 @node Rectangle Registers
 @section Saving Rectangles in Registers
index 72c6023bba7f0800e4226953dd59185e3867f05a..6ccac447134dc5623444f338bcf1636d3f1b0b30 100644 (file)
@@ -2,16 +2,45 @@
 
        * Makefile.in (dist): Update for new output variables.
 
-2014-07-15  Álvar Jesús Ibeas Martín  <alvar.ibeas@unican.es>  (tiny change)
+2014-07-16  Álvar Jesús Ibeas Martín  <alvar.ibeas@unican.es>  (tiny change)
 
        * emacs-lisp-intro.texi (Variables, Buffer Names, if & or)
        (Symbols as Chest, fwd-para while): Fix typos.
 
-2014-06-29  Glenn Morris  <rgm@gnu.org>
+2014-07-03  Glenn Morris  <rgm@gnu.org>
 
        * emacs-lisp-intro.texi (Note for Novices, Finding More, Conclusion):
        "Online" help doesn't mean what it used to any more.
 
+2014-06-23  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (%.texi): Disable implicit rules.
+       (mkinfodir): Remove.
+       (.dvi.ps): Replace with explicit rule.
+       (${buildinfodir}): New rule.
+       (${buildinfodir}/eintr.info): Use order-only prereq for output dir.
+       Use $<.
+       (emacs-lisp-intro.dvi, emacs-lisp-intro.pdf, emacs-lisp-intro.html):
+       Use $<.
+       (emacs-lisp-intro.ps): New rule.
+
+2014-06-15  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (bootstrap-clean): New.
+
+2014-06-10  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (INFO_EXT): Remove and replace by ".info" throughout.
+       (INFO_OPTS): Set directly rather than with configure.
+
+2014-06-02  Glenn Morris  <rgm@gnu.org>
+
+       * emacs-lisp-intro.texi (Autoload): Update loaddefs.el details.
+
+2014-04-17  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * Makefile.in (infoclean): Be consistent about reporting failures.
+
 2014-02-25  Glenn Morris  <rgm@gnu.org>
 
        * emacs-lisp-intro.texi (X11 Colors): Don't use setq with hooks.
index f88a8cb419b99979396b5bb18f8ad142ef6fc5fa..49d3fe3c9572a3cdf3d9db57e68b7cc8cddd3698 100644 (file)
@@ -46,9 +46,8 @@ GZIP_PROG = @GZIP_PROG@
 
 HTML_OPTS = --no-split --html
 
-INFO_EXT=@INFO_EXT@
 # Options used only when making info output.
-INFO_OPTS=@INFO_OPTS@
+INFO_OPTS= --no-split
 
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
@@ -67,42 +66,41 @@ HTML_TARGETS = emacs-lisp-intro.html
 PDF_TARGETS = emacs-lisp-intro.pdf
 PS_TARGETS = emacs-lisp-intro.ps
 
-mkinfodir = @${MKDIR_P} ${buildinfodir}
-
 srcs = ${srcdir}/emacs-lisp-intro.texi ${srcdir}/doclicense.texi \
   ${emacsdir}/emacsver.texi
 
-.PHONY: info dvi html pdf ps
-
-.SUFFIXES: .ps .dvi
-
-.dvi.ps:
-       $(DVIPS) -o $@ $<
+## Disable implicit rules.
+%.texi: ;
 
-info: ${buildinfodir}/eintr$(INFO_EXT)
+.PHONY: info dvi html pdf ps
 
+info: ${buildinfodir}/eintr.info
 dvi: $(DVI_TARGETS)
 html: $(HTML_TARGETS)
 pdf: $(PDF_TARGETS)
 ps: $(PS_TARGETS)
 
+${buildinfodir}:
+       ${MKDIR_P} $@
+
 # The file name eintr must fit within 5 characters, to allow for
 # -NN extensions to fit into DOS 8+3 limits without clashing.
-# Note: "<" is not portable in ordinary make rules.
-${buildinfodir}/eintr$(INFO_EXT): ${srcs}
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/emacs-lisp-intro.texi
+${buildinfodir}/eintr.info: ${srcs} | ${buildinfodir}
+       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $<
 
 emacs-lisp-intro.dvi: ${srcs}
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-lisp-intro.texi
+       $(ENVADD) $(TEXI2DVI) $<
 
 emacs-lisp-intro.pdf: ${srcs}
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-lisp-intro.texi
+       $(ENVADD) $(TEXI2PDF) $<
 
 emacs-lisp-intro.html: ${srcs}
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/emacs-lisp-intro.texi
+       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ $<
+
+emacs-lisp-intro.ps: emacs-lisp-intro.dvi
+       $(DVIPS) -o $@ $<
 
-.PHONY: mostlyclean clean distclean maintainer-clean infoclean
+.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean infoclean
 
 mostlyclean:
        rm -f *.aux *.log *.toc *.cp *.cps *.fn *.fns *.ky *.kys \
@@ -116,9 +114,11 @@ distclean: clean
        rm -f Makefile
 
 infoclean:
-       -cd $(buildinfodir) && rm -f eintr$(INFO_EXT) eintr$(INFO_EXT)-[1-9]
+       rm -f \
+         $(buildinfodir)/eintr.info \
+         $(buildinfodir)/eintr.info-[1-9]
 
-maintainer-clean: distclean infoclean
+bootstrap-clean maintainer-clean: distclean infoclean
 
 .PHONY: dist
 
index 8ff57619c04b5da7485c3f3f5ab7e67069e59599..f915d0da8abb703e33601566cf225ed276d33c1c 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo                                      @c -*-texinfo-*-
 @comment %**start of header
-@setfilename ../../info/eintr
+@setfilename ../../info/eintr.info
 @c setfilename emacs-lisp-intro.info
 @c sethtmlfilename emacs-lisp-intro.html
 @settitle Programming in Emacs Lisp
@@ -17548,8 +17548,8 @@ are not loaded right away; but you need to wait a moment when you
 first use such a function, while its containing file is evaluated.
 
 Rarely used functions are frequently autoloaded.  The
-@file{loaddefs.el} library contains hundreds of autoloaded functions,
-from @code{bookmark-set} to @code{wordstar-mode}.  Of course, you may
+@file{loaddefs.el} library contains thousands of autoloaded functions,
+from @code{5x5} to @code{zone}.  Of course, you may
 come to use a `rare' function frequently.  When you do, you should
 load that function's file with a @code{load} expression in your
 @file{.emacs} file.
index 272f21f4570dec146dd11ed1cef9736c60e9bb85..3955bd09b38c60f09b69db1470ff5e367bfb0479 100644 (file)
@@ -2,13 +2,15 @@
 
        * Makefile.in (dist): Update for new output variables.
 
-2014-10-09  Glenn Morris  <rgm@gnu.org>
+2014-10-12  Glenn Morris  <rgm@gnu.org>
 
        * elisp.texi (DATE): Bump to October 2014.
 
+2014-10-09  Glenn Morris  <rgm@gnu.org>
+
        * frames.texi (Multiple Terminals): Copyedits.
 
-2014-10-08  Eli Zaretskii  <eliz@gnu.org>
+2014-10-09  Eli Zaretskii  <eliz@gnu.org>
 
        * frames.texi (Multiple Terminals): Improve the description of X
        display names.  Add index entries.
        frame might be positioned differently than specified by the frame
        parameters alist.
 
+2014-10-08  Leo Liu  <sdl.web@gmail.com>
+
+       * streams.texi (Output Functions): Document new argument ENSURE to
+       terpri.  (Bug#18652)
+
+2014-10-04  Martin Rudalics  <rudalics@gmx.at>
+
+       * display.texi (Scroll Bars): Add description of horizontal scroll
+       bars and associated functions.
+       * frames.texi (Layout Parameters): Add horizontal scroll bar
+       entries.  Remove paragraph on "combined fringe widths".
+       * windows.texi (Window Sizes): Describe affects of horizontal
+       scroll bars on window layout and sizes.  Fix description of
+       window-full-height-p.
+       (Resizing Windows): Mention horizontal scroll bar.
+
 2014-10-04  Glenn Morris  <rgm@gnu.org>
 
        * commands.texi (Generic Commands): Copyedits.
 2014-10-03  Martin Rudalics  <rudalics@gmx.at>
 
        * frames.texi (Size Parameters, Size and Position): Mention that
-       with some window managers you have to set
-       `frame-resize-pixelwise' in order make a frame truly fullscreen
-       or maximized.
+       with some window managers you have to set `frame-resize-pixelwise'
+       in order make a frame truly fullscreen or maximized.
+
+2014-10-01  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Improve doc for use of 'int', and discuss 'ssize_t'.
+       * internals.texi (C Integer Types): Mention 'int' for other
+       randomish values that lie in 'int' range.  Mention 'ssize_t'.  See:
+       http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00019.html
+
+       Use AUTO_CONS instead of SCOPED_CONS, etc.
+       * internals.texi (Stack-allocated Objects):
+       Adjust to match the revised, less error-prone macros.
+
+2014-09-30  Paul Eggert  <eggert@cs.ucla.edu>
 
-2014-09-04  Stefan Monnier  <monnier@iro.umontreal.ca>
+       * internals.texi (Stack-allocated Objects): Further improvements.
+       Give an example of misuse.
+
+2014-09-30  Eli Zaretskii  <eliz@gnu.org>
+
+       * internals.texi (Stack-allocated Objects): Minor improvements of
+       the wording and the indexing.
+
+2014-09-30  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * internals.texi (Stack-allocated Objects): Describe this feature.
+
+2014-09-15  Daniel Colascione  <dancol@dancol.org>
+
+       * text.texi (Registers): Make `insert-register' documentation
+       reflect interface change.
+
+2014-09-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * functions.texi (Core Advising Primitives): Add a note about the
        confusing treatment of `interactive' for :filter-args (bug#18399).
 
-2014-08-19  Eli Zaretskii  <eliz@gnu.org>
+2014-09-07  Michael Albinus  <michael.albinus@gmx.de>
+
+       * strings.texi (Text Comparison): Describe `string-collate-equalp'
+       and `string-collate-lessp'.
+
+2014-09-06  Leo Liu  <sdl.web@gmail.com>
+
+       * control.texi (Pattern matching case statement): Document vector
+       qpattern.  (Bug#18327)
+
+2014-08-29  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * lists.texi (Functions that Rearrange Lists): Remove
+       description of sort ...
+       * sequences.texi (Sequence Functions): ... and generalize
+       it for sequences.  Add an example.
+
+2014-08-28  Eli Zaretskii  <eliz@gnu.org>
 
        * display.texi (Bidirectional Display): Update the Emacs's class
        of bidirectional conformance.
 
-2014-07-08  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-08-27  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * eval.texi (Eval): Mention possible recovery from stack overflow.
+
+2014-07-11  Eli Zaretskii  <eliz@gnu.org>
+
+       * internals.texi (Garbage Collection): Fix last change.
+
+2014-07-11  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * internals.texi (Garbage Collection): Mention memory-info.
+
+2014-07-11  Michael Albinus  <michael.albinus@gmx.de>
+
+       * minibuf.texi (Intro to Minibuffers, Reading a Password):
+       Password hiding is available in batch mode, do not mention it in
+       the exclusion list.  Mention `read-hide-char'.  (Bug#17839)
+
+2014-07-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * debugging.texi (Function Debugging, Debugger Commands):
        Update debug-on-entry w.r.t behavior after redefinitions (bug#17902).
 
-2014-06-29  Glenn Morris  <rgm@gnu.org>
+2014-07-03  Glenn Morris  <rgm@gnu.org>
 
        * help.texi (Help Functions): "Online" help doesn't mean what it
        used to any more.
 
-2014-06-26  Glenn Morris  <rgm@gnu.org>
+2014-07-02  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * keymaps.texi (Key Lookup): Remove mention of indirect entries.
+       (Scanning Keymaps): Reword the `noindirect' argument.
+
+2014-06-28  Glenn Morris  <rgm@gnu.org>
 
        * minibuf.texi (Intro to Minibuffers): Batch mode is basic.
        (Reading a Password): Mention batch mode.  (Bug#17839)
 
+2014-06-23  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (%.texi): Disable implicit rules.
+       (mkinfodir): Remove.
+       (.dvi.ps): Replace with explicit rule.
+       (html): Declare as PHONY.
+       (${buildinfodir}): New rule.
+       ($(buildinfodir)/elisp.info): Use order-only prereq for output dir.
+       Use $<.
+       (elisp.dvi, elisp.html, elisp.pdf): Use $<.
+       (elisp.ps): New rule.
+
 2014-06-21  Eli Zaretskii  <eliz@gnu.org>
 
        * positions.texi (Screen Lines): Clarify how columns are counted
        by vertical-motion.
 
-2014-06-14  Eli Zaretskii  <eliz@gnu.org>
+2014-06-15  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (bootstrap-clean): New.
+
+2014-06-15  Eli Zaretskii  <eliz@gnu.org>
 
        * commands.texi (Accessing Mouse): Improve the wording of the
        posn-col-row documentation.  (Bug#17768)
 
+2014-06-10  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (INFO_EXT): Remove and replace by ".info" throughout.
+       (INFO_OPTS): Set directly rather than with configure.
+
+2014-06-09  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Say (accept-process-output P)'s result pertains to P if P is non-nil.
+       * processes.texi (Accepting Output): Mention that if PROCESS is non-nil,
+       the return value is about PROCESS, not about other processes.
+
 2014-06-08  Glenn Morris  <rgm@gnu.org>
 
        * os.texi (Startup Summary): Small fix for initial-buffer-choice.
 
        * numbers.texi (Comparison of Numbers): Copyedits.
 
-2014-06-06  Glenn Morris  <rgm@gnu.org>
+2014-06-08  Glenn Morris  <rgm@gnu.org>
 
        * display.texi (Window Systems): Remove window-setup-hook.
        * os.texi (Startup Summary, Init File):
 
        * display.texi (Overlay Properties): Update re priority.  (Bug#17234)
 
-2014-06-05  Glenn Morris  <rgm@gnu.org>
-
        * package.texi (Package Archives): Mention signing packages.
 
-2014-05-27  Glenn Morris  <rgm@gnu.org>
+2014-06-07  Eli Zaretskii  <eliz@gnu.org>
+
+       * commands.texi (Click Events): Update contents of click event's
+       position list due to last changes in make_lispy_position.
+
+2014-06-02  Glenn Morris  <rgm@gnu.org>
 
        * text.texi (Buffer Contents):
        Update for filter-buffer-substring changes.
        * abbrevs.texi (Abbrev Expansion): Update for expand-abbrev changes.
        * functions.texi (Advising Functions): Standardize menu case.
 
-2014-05-17  Eli Zaretskii  <eliz@gnu.org>
+2014-05-26  Eli Zaretskii  <eliz@gnu.org>
 
        * display.texi (Invisible Text): Clarify the description of
        line-move-ignore-invisible.  (Bug#17511)
 
-2014-05-07  Paul Eggert  <eggert@cs.ucla.edu>
+2014-05-22  Leo Liu  <sdl.web@gmail.com>
+
+       * sequences.texi (Sequence Functions): Don't mention when and how
+       SEQ to nreverse is mutated.
+
+2014-05-21  Leo Liu  <sdl.web@gmail.com>
+
+       * sequences.texi (Sequence Functions): Update nreverse.
+
+2014-05-19  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Allow any non-nil value to count as true in bool-vector.
+       * sequences.texi (Bool-Vectors): Coalesce discussion of how to
+       print them.  bool-vector's args need not be t or nil.
+
+2014-05-19  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * sequences.texi (Bool-vectors): Mention bool-vector.
+
+2014-05-17  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Assume C99 or later (Bug#17487).
+       * internals.texi (C Dialect): Document this.
+
+2014-05-15  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * lists.texi (Building Cons Cells and Lists): Remove
+       description of `reverse' and `'nreverse' to generalize them...
+       * sequences.texi (Sequences): ...for sequences here.
+
+2014-05-14  Glenn Morris  <rgm@gnu.org>
+
+       * files.texi (Changing Files): Mention with-file-modes.
+
+2014-05-08  Paul Eggert  <eggert@cs.ucla.edu>
 
        * internals.texi (C Dialect): New section.
        (C Integer Types): Mention bool_bf.
 
-2014-04-29  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-04-30  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * processes.texi (Filter Functions, Sentinels): Advertise add-function.
 
-2014-04-24  Eli Zaretskii  <eliz@gnu.org>
+2014-04-29  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * windows.texi (Window Configurations, Window Configurations):
+       Window configs don't store marks any more.
+
+2014-04-25  Eli Zaretskii  <eliz@gnu.org>
 
        * strings.texi (Text Comparison): Mention equal-including-properties
        for when text properties of the strings matter for comparison.
 
-2014-04-21  Eli Zaretskii  <eliz@gnu.org>
+2014-04-22  Eli Zaretskii  <eliz@gnu.org>
 
        * text.texi (Registers): Document register-read-with-preview.
 
        * internals.texi (Building Emacs): Improve indexing.
 
-2014-04-15  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-04-17  Daniel Colascione  <dancol@dancol.org>
 
-       * display.texi (Overlay Properties): Reword the doc of `priority'.
-       (Finding Overlays): Document new arg of `overlays-at'.
+       * frames.texi (Terminal Parameters): Document new
+       tty-mode-set-strings and tty-mode-reset-strings terminal
+       parameters.
 
-2014-04-05  Glenn Morris  <rgm@gnu.org>
+2014-04-17  Paul Eggert  <eggert@cs.ucla.edu>
 
-       * os.texi (Recording Input): Dribble files may contain passwords.
+       * Makefile.in (infoclean): Be consistent about reporting failures.
+
+2014-04-09  Daniel Colascione  <dancol@dancol.org>
+
+       * errors.texi (Standard Errors): Document required error
+       parameters for `scan-error'.
+
+       * positions.texi (List Motion): Explain new `up-list' arguments.
+       Mention `backward-up-list'.
+
+2014-04-08  Daniel Colascione  <dancol@dancol.org>
+
+       * minibuf.texi (Programmed Completion): Improve phrasing, remove
+       incorrect bullet count.
 
-2014-04-04  Glenn Morris  <rgm@gnu.org>
+2014-04-07  Glenn Morris  <rgm@gnu.org>
+
+       * os.texi (Recording Input): Dribble files may contain passwords.
 
        * backups.texi (Making Backups, Reverting):
        Update for default values of some -function vars no longer being nil.
        (Reverting): Update for buffer-stale-function
        also applying to file-buffers.
 
-2014-03-25  Eli Zaretskii  <eliz@gnu.org>
+2014-03-31  Daniel Colascione  <dancol@dancol.org>
+
+       * minibuf.texi (Completion in Buffers): Discuss using lazy
+       completion tables for inline completion.
+
+2014-03-28  Glenn Morris  <rgm@gnu.org>
+
+       * os.texi (Terminal-Specific): Mention term-file-aliases.
+
+2014-03-26  Eli Zaretskii  <eliz@gnu.org>
 
        * files.texi (Kinds of Files): Improve documentation of
        file-symlink-p.  (Bug#17073)  Add cross-references.
 
-2014-03-24  Barry O'Reilly  <gundaetiapo@gmail.com>
+2014-03-26  Barry O'Reilly  <gundaetiapo@gmail.com>
 
        * markers.texi (Moving Marker Positions): The 2014-03-02 doc
        change mentioning undo's inability to handle relocated markers no
        * text.texi (Undo): Expand documentation of (TEXT . POS) and
        (MARKER . ADJUSTMENT) undo elements.
 
+2014-03-26  Glenn Morris  <rgm@gnu.org>
+
+       * files.texi (File Locks): All systems support locking.
+
 2014-03-22  Glenn Morris  <rgm@gnu.org>
 
+       * commands.texi (Defining Commands):
+       Mention that interactive-only also affects describe-function.
+
+       * functions.texi (Declare Form): Add interactive-only.
+       * commands.texi (Defining Commands) Mention declare.
+
        * commands.texi (Defining Commands): List interactive-only values.
 
 2014-03-22  Eli Zaretskii  <eliz@gnu.org>
        * functions.texi (Core Advising Primitives): Fix cross-reference
        in last change.
 
-2014-03-21  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-03-22  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * functions.texi (Advising Functions): Explain a bit more how
        arguments work.
index fdb643e0fc8b00255f880d9434cc334d4fc98751..22955fb9baeb1997aede3f70a9411e1f89cb4137 100644 (file)
@@ -49,9 +49,8 @@ GZIP_PROG = @GZIP_PROG@
 
 HTML_OPTS = --no-split --html
 
-INFO_EXT=@INFO_EXT@
 # Options used only when making info output.
-INFO_OPTS=@INFO_OPTS@
+INFO_OPTS= --no-split
 
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
@@ -125,36 +124,36 @@ srcs = \
   $(srcdir)/gpl.texi \
   $(srcdir)/doclicense.texi
 
-mkinfodir = @${MKDIR_P} ${buildinfodir}
+## Disable implicit rules.
+%.texi: ;
 
-.PHONY: info dvi pdf ps
+.PHONY: info dvi html pdf ps
 
-.SUFFIXES: .ps .dvi
-
-.dvi.ps:
-       $(DVIPS) -o $@ $<
-
-info: $(buildinfodir)/elisp$(INFO_EXT)
+info: $(buildinfodir)/elisp.info
 dvi: $(DVI_TARGETS)
 html: $(HTML_TARGETS)
 pdf: $(PDF_TARGETS)
 ps: $(PS_TARGETS)
 
-## Note: "<" is not portable in ordinary make rules.
-$(buildinfodir)/elisp$(INFO_EXT): $(srcs)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $(srcdir)/elisp.texi
+${buildinfodir}:
+       ${MKDIR_P} $@
+
+$(buildinfodir)/elisp.info: $(srcs) | ${buildinfodir}
+       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $<
 
 elisp.dvi: $(srcs)
-       $(ENVADD) $(TEXI2DVI) $(srcdir)/elisp.texi
+       $(ENVADD) $(TEXI2DVI) $<
 
 elisp.html: $(srcs)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ $(srcdir)/elisp.texi
+       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ $<
 
 elisp.pdf: $(srcs)
-       $(ENVADD) $(TEXI2PDF) $(srcdir)/elisp.texi
+       $(ENVADD) $(TEXI2PDF) $<
+
+elisp.ps: elisp.dvi
+       $(DVIPS) -o $@ $<
 
-.PHONY: mostlyclean clean distclean maintainer-clean infoclean
+.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean infoclean
 
 ## [12] stuff is from two-volume.make.
 mostlyclean:
@@ -171,9 +170,12 @@ distclean: clean
        rm -f Makefile
 
 infoclean:
-       -cd $(buildinfodir) && rm -f elisp$(INFO_EXT) elisp$(INFO_EXT)-[1-9] elisp$(INFO_EXT)-[1-9][0-9]
+       rm -f \
+         $(buildinfodir)/elisp.info \
+         $(buildinfodir)/elisp.info-[1-9] \
+         $(buildinfodir)/elisp.info-[1-9][0-9]
 
-maintainer-clean: distclean infoclean
+bootstrap-clean maintainer-clean: distclean infoclean
 
 .PHONY: dist
 
index 5e22941c037e8ce1c4b28b7bd5f3deaa259fad43..e5db4d875395b41389ebd213ef72f883d58a80c8 100644 (file)
@@ -122,16 +122,19 @@ function symbol's @code{interactive-form} property.  A non-@code{nil}
 value for this property takes precedence over any @code{interactive}
 form in the function body itself.  This feature is seldom used.
 
+@anchor{The interactive-only property}
 @cindex @code{interactive-only} property
   Sometimes, a function is only intended to be called interactively,
 never directly from Lisp.  In that case, give the function a
-non-@code{nil} @code{interactive-only} property.  This causes the
-byte compiler to warn if the command is called from Lisp.  The value
-of the property can be: a string, which the byte-compiler will
-use directly in its warning (it should end with a period,
-and not start with a capital, e.g. ``use @dots{} instead.''); @code{t};
-any other symbol, which should be an alternative function to use in
-Lisp code.
+non-@code{nil} @code{interactive-only} property, either directly
+or via @code{declare} (@pxref{Declare Form}).  This causes the
+byte compiler to warn if the command is called from Lisp.  The output
+of @code{describe-function} will include similar information.
+The value of the property can be: a string, which the byte-compiler
+will use directly in its warning (it should end with a period, and not
+start with a capital, e.g. ``use @dots{} instead.''); @code{t}; any
+other symbol, which should be an alternative function to use in Lisp
+code.
 
 @menu
 * Using Interactive::     General rules for @code{interactive}.
@@ -1388,8 +1391,9 @@ The position in the string where the click occurred.
 @item @var{text-pos}
 For clicks on a marginal area or on a fringe, this is the buffer
 position of the first visible character in the corresponding line in
-the window.  For other events, it is the current buffer position in
-the window.
+the window.  For clicks on the mode line or the header line, this is
+@code{nil}.  For other events, it is the buffer position closest to
+the click.
 
 @item @var{col}, @var{row}
 These are the actual column and row coordinate numbers of the glyph
index 800e174d3fc9dcfbaf18ace609ce1b4e26ba32cd..5cf6368db52d5ac5548cd76be9c9cb2f8879a0b9 100644 (file)
@@ -370,6 +370,10 @@ More specifically, a Q-pattern can take the following forms:
 @item (@var{qpattern1} . @var{qpattern2})
 This pattern matches any cons cell whose @code{car} matches @var{QPATTERN1} and
 whose @code{cdr} matches @var{PATTERN2}.
+@item [@var{qpattern1 qpattern2..qpatternm}]
+This pattern matches a vector of length @code{M} whose 0..(M-1)th
+elements match @var{QPATTERN1}, @var{QPATTERN2}..@var{QPATTERNm},
+respectively.
 @item @var{atom}
 This pattern matches any atom @code{equal} to @var{atom}.
 @item ,@var{upattern}
index 46be5ecf3f032d7132365ca87d61dd68c66b094a..7248aa32a30ff87021a5f1b82104c33ecc1f1fe1 100644 (file)
@@ -23,7 +23,7 @@ that Emacs presents to the user.
 * Faces::               A face defines a graphics style for text characters:
                           font, colors, etc.
 * Fringes::             Controlling window fringes.
-* Scroll Bars::         Controlling vertical scroll bars.
+* Scroll Bars::         Controlling scroll bars.
 * Window Dividers::     Separating windows visually.
 * Display Property::    Enabling special display features.
 * Images::              Displaying images in Emacs buffers.
@@ -3866,102 +3866,164 @@ arrow position.  If either property is not set, the default
 @code{overlay-arrow-string} or @code{overlay-arrow} fringe indicator
 is used.
 
+
 @node Scroll Bars
 @section Scroll Bars
 @cindex scroll bars
 
 Normally the frame parameter @code{vertical-scroll-bars} controls
-whether the windows in the frame have vertical scroll bars, and
-whether they are on the left or right.  The frame parameter
-@code{scroll-bar-width} specifies how wide they are (@code{nil}
-meaning the default).  @xref{Layout Parameters}.
+whether the windows in the frame have vertical scroll bars, and whether
+they are on the left or right.  The frame parameter
+@code{scroll-bar-width} specifies how wide they are (@code{nil} meaning
+the default).
+
+   The frame parameter @code{horizontal-scroll-bars} controls whether
+the windows in the frame have horizontal scroll bars.  The frame
+parameter @code{scroll-bar-height} specifies how high they are
+(@code{nil} meaning the default).  @xref{Layout Parameters}.
+
+@vindex horizontal-scroll-bars-available-p
+   Horizontal scroll bars are not available on all platforms.  The
+function @code{horizontal-scroll-bars-available-p} which takes no
+argument returns non-@code{nil} if they are available on your system.
+
+   The following three functions take as argument a live frame which
+defaults to the selected one.
 
 @defun frame-current-scroll-bars &optional frame
-This function reports the scroll bar type settings for frame
-@var{frame}.  The value is a cons cell
-@code{(@var{vertical-type} .@: @var{horizontal-type})}, where
-@var{vertical-type} is either @code{left}, @code{right}, or @code{nil}
-(which means no scroll bar.)  @var{horizontal-type} is meant to
-specify the horizontal scroll bar type, but since they are not
-implemented, it is always @code{nil}.
-@end defun
-
-@vindex vertical-scroll-bar
-  You can enable or disable scroll bars for a particular buffer,
-by setting the variable @code{vertical-scroll-bar}.  This variable
-automatically becomes buffer-local when set.  The possible values are
-@code{left}, @code{right}, @code{t}, which means to use the
-frame's default, and @code{nil} for no scroll bar.
+This function reports the scroll bar types for frame @var{frame}.  The
+value is a cons cell @code{(@var{vertical-type} .@:
+@var{horizontal-type})}, where @var{vertical-type} is either
+@code{left}, @code{right}, or @code{nil} (which means no vertical scroll
+bar.)  @var{horizontal-type} is either @code{bottom} or @code{nil}
+(which means no horizontal scroll bar).
+@end defun
 
-  You can also control this for individual windows.  Call the function
-@code{set-window-scroll-bars} to specify what to do for a specific window:
+@defun frame-scroll-bar-width &optional Lisp_Object &optional frame
+This function returns the width of vertical scroll bars of @var{frame}
+in pixels.
+@end defun
 
-@defun set-window-scroll-bars window width &optional vertical-type horizontal-type
-This function sets the width and type of scroll bars for window
-@var{window}.
+@defun frame-scroll-bar-height &optional Lisp_Object &optional frame
+This function returns the height of horizontal scroll bars of
+@var{frame} in pixels.
+@end defun
 
-@var{width} specifies the scroll bar width in pixels (@code{nil} means
-use the width specified for the frame).  @var{vertical-type} specifies
-whether to have a vertical scroll bar and, if so, where.  The possible
-values are @code{left}, @code{right} and @code{nil}, just like the
-values of the @code{vertical-scroll-bars} frame parameter.
+You can override the frame specific settings for individual windows by
+using the following function:
 
-The argument @var{horizontal-type} is meant to specify whether and
-where to have horizontal scroll bars, but since they are not
-implemented, it has no effect.  If @var{window} is @code{nil}, the
-selected window is used.
+@defun set-window-scroll-bars window &optional width vertical-type height horizontal-type
+This function sets the width and/or height and the types of scroll bars
+for window @var{window}.
+
+@var{width} specifies the width of the vertical scroll bar in pixels
+(@code{nil} means use the width specified for the frame).
+@var{vertical-type} specifies whether to have a vertical scroll bar and,
+if so, where.  The possible values are @code{left}, @code{right},
+@code{t}, which means to use the frame's default, and @code{nil} for no
+vertical scroll bar.
+
+@var{height} specifies the height of the horizontal scroll bar in pixels
+(@code{nil} means use the height specified for the frame).
+@var{horizontal-type} specifies whether to have a horizontal scroll bar.
+The possible values are @code{bottom}, @code{t}, which means to use the
+frame's default, and @code{nil} for no horizontal scroll bar.
+
+If @var{window} is @code{nil}, the selected window is used.
 @end defun
 
+The following four functions take as argument a live window which
+defaults to the selected one.
+
 @defun window-scroll-bars &optional window
-Report the width and type of scroll bars specified for @var{window}.
-If @var{window} is omitted or @code{nil}, the selected window is used.
-The value is a list of the form @code{(@var{width}
-@var{cols} @var{vertical-type} @var{horizontal-type})}.  The value
-@var{width} is the value that was specified for the width (which may
-be @code{nil}); @var{cols} is the number of columns that the scroll
-bar actually occupies.
+This function returns a list of the form @code{(@var{width}
+@var{columns} @var{vertical-type} @var{height} @var{lines}
+@var{horizontal-type})}.
 
-@var{horizontal-type} is not actually meaningful.
+The value @var{width} is the value that was specified for the width of
+the vertical scroll bar (which may be @code{nil}); @var{columns} is the
+(possibly rounded) number of columns that the vertical scroll bar
+actually occupies.
+
+The value @var{height} is the value that was specified for the height of
+the horizontal scroll bar (which may be @code{nil}); @var{lines} is the
+(possibly rounded) number of lines that the horizontally scroll bar
+actually occupies.
+@end defun
+
+@defun window-current-scroll-bars &optional window
+This function reports the scroll bar type for window @var{window}.  The
+value is a cons cell @code{(@var{vertical-type} .@:
+@var{horizontal-type})}.  Unlike @code{window-scroll-bars}, this reports
+the scroll bar type actually used, once frame defaults and
+@code{scroll-bar-mode} are taken into account.
 @end defun
 
 @defun window-scroll-bar-width &optional window
 This function returns the width in pixels of @var{window}'s vertical
-scrollbar.  @var{window} must be a live window, and defaults to the
-selected window.
+scrollbar.
+@end defun
+
+@defun window-scroll-bar-height &optional window
+This function returns the height in pixels of @var{window}'s horizontal
+scrollbar.
 @end defun
 
 If you don't specify these values for a window with
 @code{set-window-scroll-bars}, the buffer-local variables
-@code{scroll-bar-mode} and @code{scroll-bar-width} in the buffer being
-displayed control the window's vertical scroll bars.  The function
+@code{vertical-scroll-bar}, @code{horizontal-scroll-bar},
+@code{scroll-bar-width} and @code{scroll-bar-height} in the buffer being
+displayed control the window's scroll bars.  The function
 @code{set-window-buffer} examines these variables.  If you change them
-in a buffer that is already visible in a window, you can make the
-window take note of the new values by calling @code{set-window-buffer}
+in a buffer that is already visible in a window, you can make the window
+take note of the new values by calling @code{set-window-buffer}
 specifying the same buffer that is already displayed.
 
-@defopt scroll-bar-mode
-This variable, always local in all buffers, controls whether and where
-to put scroll bars in windows displaying the buffer.  The possible values
-are @code{nil} for no scroll bar, @code{left} to put a scroll bar on
-the left, and @code{right} to put a scroll bar on the right.
-@end defopt
+You can control the appearance of scroll bars for a particular buffer by
+setting the following variables which automatically become buffer-local
+when set.
 
-@defun window-current-scroll-bars &optional window
-This function reports the scroll bar type for window @var{window}.
-If @var{window} is omitted or @code{nil}, the selected window is used.
-The value is a cons cell
-@code{(@var{vertical-type} .@: @var{horizontal-type})}.  Unlike
-@code{window-scroll-bars}, this reports the scroll bar type actually
-used, once frame defaults and @code{scroll-bar-mode} are taken into
-account.
-@end defun
+@defvar vertical-scroll-bar
+This variable specifies the location of the vertical scroll bar.  The
+possible values are @code{left}, @code{right}, @code{t}, which means to
+use the frame's default, and @code{nil} for no scroll bar.
+@end defvar
+
+@defvar horizontal-scroll-bar
+This variable specifies the location of the horizontal scroll bar.  The
+possible values are @code{bottom}, @code{t}, which means to use the
+frame's default, and @code{nil} for no scroll bar.
+@end defvar
 
 @defvar scroll-bar-width
-This variable, always local in all buffers, specifies the width of the
-buffer's scroll bars, measured in pixels.  A value of @code{nil} means
-to use the value specified by the frame.
+This variable specifies the width of the buffer's vertical scroll bars,
+measured in pixels.  A value of @code{nil} means to use the value
+specified by the frame.
 @end defvar
 
+@defvar scroll-bar-height
+This variable specifies the height of the buffer's horizontal scroll
+bar, measured in pixels.  A value of @code{nil} means to use the value
+specified by the frame.
+@end defvar
+
+Finally you can toggle the display of scroll bars on all frames by
+customizing the variables @code{scroll-bar-mode} and
+@code{horizontal-scroll-bar-mode}.
+
+@defopt scroll-bar-mode
+This variable controls whether and where to put vertical scroll bars in
+all frames.  The possible values are @code{nil} for no scroll bars,
+@code{left} to put scroll bars on the left and @code{right} to put
+scroll bars on the right.
+@end defopt
+
+@defopt horizontal-scroll-bar-mode
+This variable controls whether to display horizontal scroll bars on all
+frames.
+@end defopt
+
+
 @node Window Dividers
 @section Window Dividers
 @cindex window dividers
index 973ee6f930c80441187fea2b66224eef9db29d7c..fa665da34a401900efe07b009dd150688b21f59f 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo  @c -*-texinfo-*-
 @c %**start of header
-@setfilename elisp
+@setfilename ../../info/elisp.info
 
 @ifset VOL1
 @set volflag
@@ -1343,7 +1343,7 @@ Emacs Display
 * Faces::                   A face defines a graphics style
                               for text characters: font, colors, etc.
 * Fringes::                 Controlling window fringes.
-* Scroll Bars::             Controlling vertical scroll bars.
+* Scroll Bars::             Controlling scroll bars.
 * Window Dividers::         Separating windows visually.
 * Display Property::        Enabling special display features.
 * Images::                  Displaying images in Emacs buffers.
index e00496e34784adb07db4a9c514111fb8c1045999..dba8d219774c70a1baf5c2f2eca3b7852a53ca22 100644 (file)
@@ -157,7 +157,10 @@ The message is @samp{Attempt to modify a protected file}.
 @item scan-error
 The message is @samp{Scan error}.  This happens when certain
 syntax-parsing functions find invalid syntax or mismatched
-parentheses.  @xref{List Motion}, and @xref{Parsing Expressions}.
+parentheses.  Conventionally raised with three argument: a
+human-readable error message, the start of the obstacle that cannot be
+moved over, and the end of the obstacle.  @xref{List Motion}, and
+@xref{Parsing Expressions}.
 
 @item search-failed
 The message is @samp{Search failed}.  @xref{Searching and Matching}.
index 05250233b00c0a86d0889e2ec7d8f9e50f57f8e2..6ffc7db8abf13867c7d1237ae0bd173cc48983a2 100644 (file)
@@ -805,7 +805,12 @@ message @code{"Lisp nesting exceeds max-lisp-eval-depth"}).
 This limit, with the associated error when it is exceeded, is one way
 Emacs Lisp avoids infinite recursion on an ill-defined function.  If
 you increase the value of @code{max-lisp-eval-depth} too much, such
-code can cause stack overflow instead.
+code can cause stack overflow instead.  On some systems, this overflow
+can be handled.  In that case, normal Lisp evaluation is interrupted
+and control is transferred back to the top level command loop
+(@code{top-level}).  Note that there is no way to enter Emacs Lisp
+debugger in this situation.  @xref{Error Debugging}.
+
 @cindex Lisp nesting error
 
 The depth limit counts internal uses of @code{eval}, @code{apply}, and
index b071c6a8f35492a6e5ccce32c4d7e1907a6ddc00..ac77b94d8f6b7ef0f149e6920641b69761b56627 100644 (file)
@@ -714,15 +714,15 @@ some other job.
 This function locks the file @var{filename}, if the current buffer is
 modified.  The argument @var{filename} defaults to the current buffer's
 visited file.  Nothing is done if the current buffer is not visiting a
-file, or is not modified, or if the system does not support locking.
+file, or is not modified, or if the option @code{create-lockfiles} is
+@code{nil}.
 @end defun
 
 @defun unlock-buffer
 This function unlocks the file being visited in the current buffer,
 if the buffer is modified.  If the buffer is not modified, then
 the file should not be locked, so this function does nothing.  It also
-does nothing if the current buffer is not visiting a file, or if the
-system does not support locking.
+does nothing if the current buffer is not visiting a file, or is not locked.
 @end defun
 
 @defopt create-lockfiles
@@ -1693,6 +1693,16 @@ version of an existing file; saving a file preserves its existing
 permissions.
 @end defun
 
+@defmac with-file-modes mode body@dots{}
+This macro evaluates the @var{body} forms with the default
+permissions for new files temporarily set to @var{modes} (whose value
+is as for @code{set-file-modes} above).  When finished, it restores
+the original default file permissions, and returns the value of the
+last form in @var{body}.
+
+This is useful for creating private files, for example.
+@end defmac
+
 @defun default-file-modes
 This function returns the default file permissions, as an integer.
 @end defun
index d5617ed3cfddc07f49e3ea26bcf0b3b30e9d3658..a14702a7ce199fe25a9b39988d5927a725a27907 100644 (file)
@@ -767,19 +767,21 @@ Whether the frame has scroll bars for vertical scrolling, and which side
 of the frame they should be on.  The possible values are @code{left},
 @code{right}, and @code{nil} for no scroll bars.
 
-@ignore
 @vindex horizontal-scroll-bars, a frame parameter
 @item horizontal-scroll-bars
-Whether the frame has scroll bars for horizontal scrolling
-(non-@code{nil} means yes).  Horizontal scroll bars are not currently
-implemented.
-@end ignore
+Whether the frame has scroll bars for horizontal scrolling (@code{t} and
+@code{bottom} mean yes, @code{nil} means no).
 
 @vindex scroll-bar-width, a frame parameter
 @item scroll-bar-width
 The width of vertical scroll bars, in pixels, or @code{nil} meaning to
 use the default width.
 
+@vindex scroll-bar-height, a frame parameter
+@item scroll-bar-height
+The height of horizontal scroll bars, in pixels, or @code{nil} meaning
+to use the default height.
+
 @vindex left-fringe, a frame parameter
 @vindex right-fringe, a frame parameter
 @item left-fringe
@@ -793,14 +795,6 @@ these two frame parameters, the return value is always an integer.
 When using @code{set-frame-parameter}, passing a @code{nil} value
 imposes an actual default value of 8 pixels.
 
-The combined fringe widths must add up to an integral number of
-columns, so the actual default fringe widths for the frame, as
-reported by @code{frame-parameter}, may be larger than what you
-specify.  Any extra width is distributed evenly between the left and
-right fringe.  However, you can force one fringe or the other to a
-precise width by specifying that width as a negative integer.  If both
-widths are negative, only the left fringe gets the specified width.
-
 @vindex right-divider-width, a frame parameter
 @item right-divider-width
 The width (thickness) reserved for the right divider (@pxref{Window
@@ -1393,6 +1387,18 @@ terminal.  @xref{DEL Does Not Delete,,, emacs, The Emacs Manual}.
 @item terminal-initted
 After the terminal is initialized, this is set to the
 terminal-specific initialization function.
+@item tty-mode-set-strings
+When present, a list of strings containing escape sequences that Emacs
+will output while configuring a tty for rendering.  Emacs emits these
+strings only when configuring a terminal: if you want to enable a mode
+on a terminal that is already active (for example, while in
+@code{tty-setup-hook}), explicitly output the necessary escape
+sequence using @code{send-string-to-terminal} in addition to adding
+the sequence to @code{tty-mode-set-strings}.
+@item tty-mode-reset-strings
+When present, a list of strings that undo the effects of the strings
+in @code{tty-mode-set-strings}.  Emacs emits these strings when
+exiting, deleting a terminal, or suspending itself.
 @end table
 
 @node Frame Titles
index f551a6c749dc36fc2f2f1114894a8bd38a6cec6b..023175e3632d8e3d599a7f76ed12132ab7902998 100644 (file)
@@ -1209,7 +1209,7 @@ ways to do it.  The added function is also called an @emph{advice}.
 @menu
 * Core Advising Primitives::    Primitives to manipulate advice.
 * Advising Named Functions::    Advising named functions.
-* Advice combinators::          Ways to compose advices.
+* Advice combinators::          Ways to compose advice.
 * Porting old advices::         Adapting code using the old defadvice.
 @end menu
 
@@ -1749,6 +1749,10 @@ Indent calls to this function or macro according to @var{indent-spec}.
 This is typically used for macros, though it works for functions too.
 @xref{Indenting Macros}.
 
+@item (interactive-only @var{value})
+Set the function's @code{interactive-only} property to @var{value}.
+@xref{The interactive-only property}.
+
 @item (obsolete @var{current-name} @var{when})
 Mark the function or macro as obsolete, similar to a call to
 @code{make-obsolete} (@pxref{Obsolete Functions}).  @var{current-name}
index bfc9d491c5e8cd1f36dd82ae9e938eeb07390b67..db6ed41268c071397d806895f8f0fcd4e66436c5 100644 (file)
@@ -14,6 +14,7 @@ internal aspects of GNU Emacs that may be of interest to C programmers.
 * Building Emacs::      How the dumped Emacs is made.
 * Pure Storage::        Kludge to make preloaded Lisp functions shareable.
 * Garbage Collection::  Reclaiming space for Lisp objects no longer used.
+* Stack-allocated Objects::    Temporary conses and strings on C stack.
 * Memory Usage::        Info about total size of Lisp objects made so far.
 * C Dialect::           What C variant Emacs is written in.
 * Writing Emacs Primitives::   Writing C code for Emacs.
@@ -513,6 +514,11 @@ created in this Emacs session.  Each of these counters increments for
 a certain kind of object.  See the documentation string for details.
 @end defun
 
+@defun memory-info
+This functions returns an amount of total system memory and how much
+of it is free.  On an unsupported system, the value may be @code{nil}.
+@end defun
+
 @defvar gcs-done
 This variable contains the total number of garbage collections
 done so far in this Emacs session.
@@ -524,6 +530,35 @@ during garbage collection so far in this Emacs session, as a
 floating-point number.
 @end defvar
 
+@node Stack-allocated Objects
+@section Stack-allocated Objects
+
+@cindex stack allocated Lisp objects
+@cindex Lisp objects, stack-allocated
+  The garbage collector described above is used to manage data visible
+from Lisp programs, as well as most of the data internally used by the
+Lisp interpreter.  Sometimes it may be useful to allocate temporary
+internal objects using the C stack of the interpreter.  This can help
+performance, as stack allocation is typically faster than using heap
+memory to allocate and the garbage collector to free.  The downside is
+that using such objects after they are freed results in undefined
+behavior, so uses should be well thought out and carefully debugged by
+using the @code{GC_CHECK_MARKED_OBJECTS} feature (see
+@file{src/alloc.c}).  In particular, stack-allocated objects should
+never be made visible to user Lisp code.
+
+  Currently, cons cells and strings can be allocated this way.  This
+is implemented by C macros like @code{AUTO_CONS} and
+@code{AUTO_STRING} that define a named @code{Lisp_Object} with block
+lifetime.  These objects are not freed by the garbage collector;
+instead, they have automatic storage duration, i.e., they are
+allocated like local variables and are automatically freed at the end
+of execution of the C block that defined the object.
+
+  For performance reasons, stack-allocated strings are limited to
+@acronym{ASCII} characters, and many of these strings are immutable,
+i.e., calling @code{ASET} on them produces undefined behavior.
+
 @node Memory Usage
 @section Memory Usage
 @cindex memory usage
@@ -580,15 +615,14 @@ Emacs session.
 @section C Dialect
 @cindex C programming language
 
-The C part of Emacs is portable to C89: C99-specific features such as
-@samp{<stdbool.h>} and @samp{inline} are not used without a check,
+The C part of Emacs is portable to C99 or later: C11-specific features such
+as @samp{<stdalign.h>} and @samp{_Noreturn} are not used without a check,
 typically at configuration time, and the Emacs build procedure
-provides a substitute implementation if necessary.  Some C99 features,
-such as declarations after statements, are too difficult to provide
-substitutes for, so they are avoided entirely.
+provides a substitute implementation if necessary.  Some C11 features,
+such as anonymous structures and unions, are too difficult to emulate,
+so they are avoided entirely.
 
-At some point in the not-too-distant future the base C dialect will
-change from C89 to C99, and eventually it will no doubt change to C11.
+At some point in the future the base C dialect will no doubt change to C11.
 
 @node Writing Emacs Primitives
 @section Writing Emacs Primitives
@@ -1591,6 +1625,8 @@ of @code{intptr_t}).
 
 @item
 Prefer @code{int} for Emacs character codes, in the range 0 ..@: 0x3FFFFF.
+More generally, prefer @code{int} for integers known to be in
+@code{int} range, e.g., screen column counts.
 
 @item
 Prefer @code{ptrdiff_t} for sizes, i.e., for integers bounded by the
@@ -1601,6 +1637,17 @@ for signed types.  Using @code{ptrdiff_t} limits objects to
 anyway since they would break pointer subtraction, so this does not
 impose an arbitrary limit.
 
+@item
+Avoid @code{ssize_t} except when communicating to low-level APIs that
+have @code{ssize_t}-related limitations.  Although it's equivalent to
+@code{ptrdiff_t} on typical platforms, @code{ssize_t} is occasionally
+narrower, so using it for size-related calculations could overflow.
+Also, @code{ptrdiff_t} is more ubiquitous and better-standardized, has
+standard @code{printf} formats, and is the basis for Emacs's internal
+size-overflow checking.  When using @code{ssize_t}, please note that
+POSIX requires support only for values in the range @minus{}1 ..@:
+@code{SSIZE_MAX}.
+
 @item
 Prefer @code{intptr_t} for internal representations of pointers, or
 for integers bounded only by the number of objects that can exist at
index 7cc2b39345693e4ba5166c9ddc28ada98e7e09db..e652da033857963a7806c4e471f31d8c09af6d2e 100644 (file)
@@ -1043,22 +1043,6 @@ lambda expression.  This is presumed to be a function, and is treated
 as such (see above).  In order to execute properly as a key binding,
 this function must be a command---it must have an @code{interactive}
 specification.  @xref{Defining Commands}.
-
-@item
-If the @sc{car} of @var{list} is a keymap and the @sc{cdr} is an event
-type, then this is an @dfn{indirect entry}:
-
-@example
-(@var{othermap} . @var{othertype})
-@end example
-
-When key lookup encounters an indirect entry, it looks up instead the
-binding of @var{othertype} in @var{othermap} and uses that.
-
-This feature permits you to define one key as an alias for another key.
-For example, an entry whose @sc{car} is the keymap called @code{esc-map}
-and whose @sc{cdr} is 32 (the code for @key{SPC}) means, ``Use the global
-binding of @kbd{Meta-@key{SPC}}, whatever that may be''.
 @end itemize
 
 @item @var{symbol}
@@ -1066,9 +1050,7 @@ binding of @kbd{Meta-@key{SPC}}, whatever that may be''.
 The function definition of @var{symbol} is used in place of
 @var{symbol}.  If that too is a symbol, then this process is repeated,
 any number of times.  Ultimately this should lead to an object that is
-a keymap, a command, or a keyboard macro.  A list is allowed if it is a
-keymap or a command, but indirect entries are not understood when found
-via symbols.
+a keymap, a command, or a keyboard macro.
 
 Note that keymaps and keyboard macros (strings and vectors) are not
 valid functions, so a symbol with a keymap, string, or vector as its
@@ -1097,8 +1079,7 @@ binding is not executable as a command.
 @end table
 
   In short, a keymap entry may be a keymap, a command, a keyboard
-macro, a symbol that leads to one of them, or an indirection or
-@code{nil}.
+macro, a symbol that leads to one of them, or @code{nil}.
 
 @node Functions for Key Lookup
 @section Functions for Key Lookup
@@ -1945,9 +1926,9 @@ entirely of @acronym{ASCII} characters (or meta variants of @acronym{ASCII}
 characters) are preferred to all other key sequences and that the
 return value can never be a menu binding.
 
-If @var{noindirect} is non-@code{nil}, @code{where-is-internal} doesn't
-follow indirect keymap bindings.  This makes it possible to search for
-an indirect definition itself.
+If @var{noindirect} is non-@code{nil}, @code{where-is-internal} doesn't look
+inside menu-items to find their commands.  This makes it possible to search for
+a menu-item itself.
 
 The fifth argument, @var{no-remap}, determines how this function
 treats command remappings (@pxref{Remapping Commands}).  There are two
index cde7d9ce44ce2f53055b50927ba1e590f68e6c27..21be5cca4fcd4026880a66a54e281ff361ecfee5 100644 (file)
@@ -601,25 +601,6 @@ not a list, the sequence's elements do not become elements of the
 resulting list.  Instead, the sequence becomes the final @sc{cdr}, like
 any other non-list final argument.
 
-@defun reverse list
-This function creates a new list whose elements are the elements of
-@var{list}, but in reverse order.  The original argument @var{list} is
-@emph{not} altered.
-
-@example
-@group
-(setq x '(1 2 3 4))
-     @result{} (1 2 3 4)
-@end group
-@group
-(reverse x)
-     @result{} (4 3 2 1)
-x
-     @result{} (1 2 3 4)
-@end group
-@end example
-@end defun
-
 @defun copy-tree tree &optional vecp
 This function returns a copy of the tree @code{tree}.  If @var{tree} is a
 cons cell, this makes a new cons cell with the same @sc{car} and
@@ -1143,126 +1124,6 @@ each time you run it!  Here is what happens:
 @end smallexample
 @end defun
 
-@defun nreverse list
-@cindex reversing a list
-  This function reverses the order of the elements of @var{list}.
-Unlike @code{reverse}, @code{nreverse} alters its argument by reversing
-the @sc{cdr}s in the cons cells forming the list.  The cons cell that
-used to be the last one in @var{list} becomes the first cons cell of the
-value.
-
-  For example:
-
-@example
-@group
-(setq x '(a b c))
-     @result{} (a b c)
-@end group
-@group
-x
-     @result{} (a b c)
-(nreverse x)
-     @result{} (c b a)
-@end group
-@group
-;; @r{The cons cell that was first is now last.}
-x
-     @result{} (a)
-@end group
-@end example
-
-  To avoid confusion, we usually store the result of @code{nreverse}
-back in the same variable which held the original list:
-
-@example
-(setq x (nreverse x))
-@end example
-
-  Here is the @code{nreverse} of our favorite example, @code{(a b c)},
-presented graphically:
-
-@smallexample
-@group
-@r{Original list head:}                       @r{Reversed list:}
- -------------        -------------        ------------
-| car  | cdr  |      | car  | cdr  |      | car | cdr  |
-|   a  |  nil |<--   |   b  |   o  |<--   |   c |   o  |
-|      |      |   |  |      |   |  |   |  |     |   |  |
- -------------    |   --------- | -    |   -------- | -
-                  |             |      |            |
-                   -------------        ------------
-@end group
-@end smallexample
-@end defun
-
-@defun sort list predicate
-@cindex stable sort
-@cindex sorting lists
-This function sorts @var{list} stably, though destructively, and
-returns the sorted list.  It compares elements using @var{predicate}.  A
-stable sort is one in which elements with equal sort keys maintain their
-relative order before and after the sort.  Stability is important when
-successive sorts are used to order elements according to different
-criteria.
-
-The argument @var{predicate} must be a function that accepts two
-arguments.  It is called with two elements of @var{list}.  To get an
-increasing order sort, the @var{predicate} should return non-@code{nil} if the
-first element is ``less than'' the second, or @code{nil} if not.
-
-The comparison function @var{predicate} must give reliable results for
-any given pair of arguments, at least within a single call to
-@code{sort}.  It must be @dfn{antisymmetric}; that is, if @var{a} is
-less than @var{b}, @var{b} must not be less than @var{a}.  It must be
-@dfn{transitive}---that is, if @var{a} is less than @var{b}, and @var{b}
-is less than @var{c}, then @var{a} must be less than @var{c}.  If you
-use a comparison function which does not meet these requirements, the
-result of @code{sort} is unpredictable.
-
-The destructive aspect of @code{sort} is that it rearranges the cons
-cells forming @var{list} by changing @sc{cdr}s.  A nondestructive sort
-function would create new cons cells to store the elements in their
-sorted order.  If you wish to make a sorted copy without destroying the
-original, copy it first with @code{copy-sequence} and then sort.
-
-Sorting does not change the @sc{car}s of the cons cells in @var{list};
-the cons cell that originally contained the element @code{a} in
-@var{list} still has @code{a} in its @sc{car} after sorting, but it now
-appears in a different position in the list due to the change of
-@sc{cdr}s.  For example:
-
-@example
-@group
-(setq nums '(1 3 2 6 5 4 0))
-     @result{} (1 3 2 6 5 4 0)
-@end group
-@group
-(sort nums '<)
-     @result{} (0 1 2 3 4 5 6)
-@end group
-@group
-nums
-     @result{} (1 2 3 4 5 6)
-@end group
-@end example
-
-@noindent
-@strong{Warning}: Note that the list in @code{nums} no longer contains
-0; this is the same cons cell that it was before, but it is no longer
-the first one in the list.  Don't assume a variable that formerly held
-the argument now holds the entire sorted list!  Instead, save the result
-of @code{sort} and use that.  Most often we store the result back into
-the variable that held the original list:
-
-@example
-(setq nums (sort nums '<))
-@end example
-
-@xref{Sorting}, for more functions that perform sorting.
-See @code{documentation} in @ref{Accessing Documentation}, for a
-useful example of @code{sort}.
-@end defun
-
 @node Sets And Lists
 @section Using Lists as Sets
 @cindex lists as sets
index 4a94f41d73275fcf5c4435da02b47c49699d896e..1c6a74a89fddb8c9806d3a9d3a561e3913460907 100644 (file)
@@ -102,8 +102,8 @@ the minibuffer is in a separate frame.  @xref{Minibuffers and Frames}.
   When Emacs is running in batch mode, any request to read from the
 minibuffer actually reads a line from the standard input descriptor that
 was supplied when Emacs was started.  This supports only basic input:
-none of the special minibuffer features (history, completion,
-password hiding, etc.) are available in batch mode.
+none of the special minibuffer features (history, completion, etc.)
+are available in batch mode.
 
 @node Text from Minibuffer
 @section Reading Text Strings with the Minibuffer
@@ -1736,7 +1736,7 @@ possible match, and ignore the match if the predicate returns
 
 @item
 A flag specifying the type of completion operation to perform.  This
-is one of the following four values:
+flag may be one of the following values.
 
 @table @code
 @item nil
@@ -1875,11 +1875,34 @@ next function in @code{completion-at-point-functions} instead of
 reporting a completion failure.
 @end table
 
+Supplying a function for @var{collection} is strongly recommended if
+generating the list of completions is an expensive operation.  Emacs
+may internally call functions in @code{completion-at-point-functions}
+many times, but care about the value of @var{collection} for only some
+of these calls.  By supplying a function for @var{collection}, Emacs
+can defer generating completions until necessary.  You can use
+@var{completion-table-dynamic} to create a wrapper function:
+
+@smallexample
+;; Avoid this pattern.
+(let ((beg ...) (end ...) (my-completions (my-make-completions)))
+  (list beg end my-completions))
+
+;; Use this instead.
+(let ((beg ...) (end ...))
+  (list beg
+        end
+        (completion-table-dynamic
+          (lambda (_)
+            (my-make-completions)))))
+@end smallexample
+
 A function in @code{completion-at-point-functions} may also return a
-function.  In that case, that returned function is called, with no
-argument, and it is entirely responsible for performing the
-completion.  We discourage this usage; it is intended to help convert
-old code to using @code{completion-at-point}.
+function instead of a list as described above.  In that case, that
+returned function is called, with no argument, and it is entirely
+responsible for performing the completion.  We discourage this usage;
+it is intended to help convert old code to using
+@code{completion-at-point}.
 
 The first function in @code{completion-at-point-functions} to return a
 non-@code{nil} value is used by @code{completion-at-point}.  The
@@ -2124,9 +2147,10 @@ function @code{read-passwd}.
 
 @defun read-passwd prompt &optional confirm default
 This function reads a password, prompting with @var{prompt}.  It does
-not echo the password as the user types it; instead, it echoes @samp{.}
-for each character in the password.  (Note that in batch mode, the
-input is not hidden.)
+not echo the password as the user types it; instead, it echoes
+@samp{.}  for each character in the password.  If you want to apply
+another character to hide the password, let-bind the variable
+@code{read-hide-char} with that character.
 
 The optional argument @var{confirm}, if non-@code{nil}, says to read the
 password twice and insist it must be the same both times.  If it isn't
index 3b63e08676cf06f1e28046ea767dc7ec9971e7ae..5cfbb9ff2ef40a02c2bb1a7995af6e00b0c71db6 100644 (file)
@@ -443,10 +443,13 @@ This variable holds the name of the @file{.emacs.d} directory.  It is
 run on that type of terminal.  The library's name is constructed by
 concatenating the value of the variable @code{term-file-prefix} and the
 terminal type (specified by the environment variable @env{TERM}).
-Normally, @code{term-file-prefix} has the value
-@code{"term/"}; changing this is not recommended.  Emacs finds the file
-in the normal manner, by searching the @code{load-path} directories, and
-trying the @samp{.elc} and @samp{.el} suffixes.
+Normally, @code{term-file-prefix} has the value @code{"term/"};
+changing this is not recommended.  If there is an entry matching
+@env{TERM} in the @code{term-file-aliases} association list,
+Emacs uses the associated value in place of @env{TERM}.
+Emacs finds the file in the normal manner, by searching the
+@code{load-path} directories, and trying the @samp{.elc} and
+@samp{.el} suffixes.
 
 @cindex Termcap
   The usual role of a terminal-specific library is to enable special
@@ -475,7 +478,7 @@ a normal hook that Emacs runs after initializing a new text terminal.
 You could use this hook to define initializations for terminals that do not
 have their own libraries.  @xref{Hooks}.
 
-@defvar term-file-prefix
+@defopt term-file-prefix
 @cindex @env{TERM} environment variable
 If the value of this variable is non-@code{nil}, Emacs loads a
 terminal-specific initialization file as follows:
@@ -490,7 +493,14 @@ init file if you do not wish to load the
 terminal-initialization file.
 
 On MS-DOS, Emacs sets the @env{TERM} environment variable to @samp{internal}.
-@end defvar
+@end defopt
+
+@defopt term-file-aliases
+This variable is an an association list mapping terminal types to
+their aliases.  For example, an element of the form @code{("vt102"
+. "vt100")} means to treat a terminal of type @samp{vt102} like one of
+type @samp{vt100}.
+@end defopt
 
 @defvar tty-setup-hook
 This variable is a normal hook that Emacs runs after initializing a
index fee36fa833db7f2ccf808418bf73caf333f60db2..e32f0ef0b34986a3f9f27f3cf03f582ee5df8865 100644 (file)
@@ -651,9 +651,19 @@ parentheses.  (Other syntactic entities such as words or paired string
 quotes are ignored.)
 @end deffn
 
-@deffn Command up-list &optional arg
-This function moves forward out of @var{arg} (default 1) levels of parentheses.
-A negative argument means move backward but still to a less deep spot.
+@deffn Command up-list &optional arg escape-strings no-syntax-crossing
+This function moves forward out of @var{arg} (default 1) levels of
+parentheses.  A negative argument means move backward but still to a
+less deep spot.  If @var{escape-strings} is non-nil (as it is
+interactively), move out of enclosing strings as well. If
+@var{no-syntax-crossing} is non-nil (as it is interactively), prefer
+to break out of any enclosing string instead of moving to the start of
+a list broken across multiple strings.  On error, location of point is
+unspecified.
+@end deffn
+
+@deffn Command backward-up-list &optional arg escape-strings no-syntax-crossing
+This function is just like @code{up-list}, but with a negated argument.
 @end deffn
 
 @deffn Command down-list &optional arg
index c91afdffdebd1085d266d69d719f9440771c3ece..db80f0537e09d09618b5d2849141c7b8b5b450cd 100644 (file)
@@ -1484,7 +1484,7 @@ The arguments @var{seconds} and @var{millisec} let you specify timeout
 periods.  The former specifies a period measured in seconds and the
 latter specifies one measured in milliseconds.  The two time periods
 thus specified are added together, and @code{accept-process-output}
-returns after that much time, whether or not there has been any
+returns after that much time, even if there is no
 subprocess output.
 
 The argument @var{millisec} is obsolete (and should not be used),
@@ -1502,7 +1502,8 @@ recommended, but may be necessary for specific applications, such as
 speech synthesis.
 
 The function @code{accept-process-output} returns non-@code{nil} if it
-did get some output, or @code{nil} if the timeout expired before output
+got output from @var{process}, or from any process if @var{process} is
+@code{nil}.  It returns @code{nil} if the timeout expired before output
 arrived.
 @end defun
 
index b518bfc6b73408f66088986558dca230f3ef51ca..d3a6792c1bab5b70f67b7899e79953df5b754675 100644 (file)
@@ -217,6 +217,208 @@ y @result{} [foo (69 2)]
 @end example
 @end defun
 
+@defun reverse seq
+@cindex string reverse
+@cindex list reverse
+@cindex vector reverse
+@cindex sequence reverse
+This function creates a new sequence whose elements are the elements
+of @var{seq}, but in reverse order.  The original argument @var{seq}
+is @emph{not} altered.   Note that char-table cannot be reversed.
+
+@example
+@group
+(setq x '(1 2 3 4))
+     @result{} (1 2 3 4)
+@end group
+@group
+(reverse x)
+     @result{} (4 3 2 1)
+x
+     @result{} (1 2 3 4)
+@end group
+@group
+(setq x [1 2 3 4])
+     @result{} [1 2 3 4]
+@end group
+@group
+(reverse x)
+     @result{} [4 3 2 1]
+x
+     @result{} [1 2 3 4]
+@end group
+@group
+(setq x "xyzzy")
+     @result{} "xyzzy"
+@end group
+@group
+(reverse x)
+     @result{} "yzzyx"
+x
+     @result{} "xyzzy"
+@end group
+@end example
+@end defun
+
+@defun nreverse seq
+@cindex reversing a string
+@cindex reversing a list
+@cindex reversing a vector
+  This function reverses the order of the elements of @var{seq}.
+Unlike @code{reverse} the original @var{seq} may be modified.
+
+  For example:
+
+@example
+@group
+(setq x '(a b c))
+     @result{} (a b c)
+@end group
+@group
+x
+     @result{} (a b c)
+(nreverse x)
+     @result{} (c b a)
+@end group
+@group
+;; @r{The cons cell that was first is now last.}
+x
+     @result{} (a)
+@end group
+@end example
+
+  To avoid confusion, we usually store the result of @code{nreverse}
+back in the same variable which held the original list:
+
+@example
+(setq x (nreverse x))
+@end example
+
+  Here is the @code{nreverse} of our favorite example, @code{(a b c)},
+presented graphically:
+
+@smallexample
+@group
+@r{Original list head:}                       @r{Reversed list:}
+ -------------        -------------        ------------
+| car  | cdr  |      | car  | cdr  |      | car | cdr  |
+|   a  |  nil |<--   |   b  |   o  |<--   |   c |   o  |
+|      |      |   |  |      |   |  |   |  |     |   |  |
+ -------------    |   --------- | -    |   -------- | -
+                  |             |      |            |
+                   -------------        ------------
+@end group
+@end smallexample
+
+  For the vector, it is even simpler because you don't need setq:
+
+@example
+(setq x [1 2 3 4])
+     @result{} [1 2 3 4]
+(nreverse x)
+     @result{} [4 3 2 1]
+x
+     @result{} [4 3 2 1]
+@end example
+
+Note that unlike @code{reverse}, this function doesn't work with strings.
+Although you can alter string data by using @code{aset}, it is strongly
+encouraged to treat strings as immutable.
+
+@end defun
+
+@defun sort sequence predicate
+@cindex stable sort
+@cindex sorting lists
+@cindex sorting vectors
+This function sorts @var{sequence} stably.  Note that this function doesn't work
+for all sequences; it may be used only for lists and vectors.  If @var{sequence}
+is a list, it is modified destructively.  This functions returns the sorted
+@var{sequence} and compares elements using @var{predicate}.  A stable sort is
+one in which elements with equal sort keys maintain their relative order before
+and after the sort.  Stability is important when successive sorts are used to
+order elements according to different criteria.
+
+The argument @var{predicate} must be a function that accepts two
+arguments.  It is called with two elements of @var{sequence}.  To get an
+increasing order sort, the @var{predicate} should return non-@code{nil} if the
+first element is ``less than'' the second, or @code{nil} if not.
+
+The comparison function @var{predicate} must give reliable results for
+any given pair of arguments, at least within a single call to
+@code{sort}.  It must be @dfn{antisymmetric}; that is, if @var{a} is
+less than @var{b}, @var{b} must not be less than @var{a}.  It must be
+@dfn{transitive}---that is, if @var{a} is less than @var{b}, and @var{b}
+is less than @var{c}, then @var{a} must be less than @var{c}.  If you
+use a comparison function which does not meet these requirements, the
+result of @code{sort} is unpredictable.
+
+The destructive aspect of @code{sort} for lists is that it rearranges the
+cons cells forming @var{sequence} by changing @sc{cdr}s.  A nondestructive
+sort function would create new cons cells to store the elements in their
+sorted order.  If you wish to make a sorted copy without destroying the
+original, copy it first with @code{copy-sequence} and then sort.
+
+Sorting does not change the @sc{car}s of the cons cells in @var{sequence};
+the cons cell that originally contained the element @code{a} in
+@var{sequence} still has @code{a} in its @sc{car} after sorting, but it now
+appears in a different position in the list due to the change of
+@sc{cdr}s.  For example:
+
+@example
+@group
+(setq nums '(1 3 2 6 5 4 0))
+     @result{} (1 3 2 6 5 4 0)
+@end group
+@group
+(sort nums '<)
+     @result{} (0 1 2 3 4 5 6)
+@end group
+@group
+nums
+     @result{} (1 2 3 4 5 6)
+@end group
+@end example
+
+@noindent
+@strong{Warning}: Note that the list in @code{nums} no longer contains
+0; this is the same cons cell that it was before, but it is no longer
+the first one in the list.  Don't assume a variable that formerly held
+the argument now holds the entire sorted list!  Instead, save the result
+of @code{sort} and use that.  Most often we store the result back into
+the variable that held the original list:
+
+@example
+(setq nums (sort nums '<))
+@end example
+
+For the better understanding of what stable sort is, consider the following
+vector example.  After sorting, all items whose @code{car} is 8 are grouped
+at the beginning of @code{vector}, but their relative order is preserved.
+All items whose @code{car} is 9 are grouped at the end of @code{vector},
+but their relative order is also preserved:
+
+@example
+@group
+(setq
+  vector
+  (vector '(8 . "xxx") '(9 . "aaa") '(8 . "bbb") '(9 . "zzz")
+          '(9 . "ppp") '(8 . "ttt") '(8 . "eee") '(9 . "fff")))
+     @result{} [(8 . "xxx") (9 . "aaa") (8 . "bbb") (9 . "zzz")
+         (9 . "ppp") (8 . "ttt") (8 . "eee") (9 . "fff")]
+@end group
+@group
+(sort vector (lambda (x y) (< (car x) (car y))))
+     @result{} [(8 . "xxx") (8 . "bbb") (8 . "ttt") (8 . "eee")
+         (9 . "aaa") (9 . "zzz") (9 . "ppp") (9 . "fff")]
+@end group
+@end example
+                
+@xref{Sorting}, for more functions that perform sorting.
+See @code{documentation} in @ref{Accessing Documentation}, for a
+useful example of @code{sort}.
+@end defun
+
 @node Arrays
 @section Arrays
 @cindex array
@@ -699,7 +901,7 @@ value into an element of the bool-vector, the effect is to store
 and the length cannot be changed once the bool-vector is created.
 Bool-vectors are constants when evaluated.
 
-  There are two special functions for working with bool-vectors; aside
+  Several functions work specifically with bool-vectors; aside
 from that, you manipulate them with same functions used for other kinds
 of arrays.
 
@@ -708,6 +910,11 @@ Return a new bool-vector of @var{length} elements,
 each one initialized to @var{initial}.
 @end defun
 
+@defun bool-vector &rest objects
+This function creates and returns a bool-vector whose elements are the
+arguments, @var{objects}.
+@end defun
+
 @defun bool-vector-p object
 This returns @code{t} if @var{object} is a bool-vector,
 and @code{nil} otherwise.
@@ -761,9 +968,29 @@ or @code{nil}, and @var{i} is an index into @code{a}.
 Return the number of elements that are @code{t} in bool vector @var{a}.
 @end defun
 
-  Here is an example of creating, examining, and updating a
-bool-vector.  Note that the printed form represents up to 8 boolean
-values as a single character.
+  The printed form represents up to 8 boolean values as a single
+character:
+
+@example
+@group
+(bool-vector t nil t nil)
+     @result{} #&4"^E"
+(bool-vector)
+     @result{} #&0""
+@end group
+@end example
+
+You can use @code{vconcat} to print a bool-vector like other vectors:
+
+@example
+@group
+(vconcat (bool-vector nil t nil t))
+     @result{} [nil t nil t]
+@end group
+@end example
+
+  Here is another example of creating, examining, and updating a
+bool-vector:
 
 @example
 (setq bv (make-bool-vector 5 t))
index 1d549ae891688aa2c4ee67eb74b135a86240200c..c287b6177133b65dd8033d5f4a98cb3a0c4a2a7a 100644 (file)
@@ -615,10 +615,13 @@ spacing between calls.
 @end example
 @end defun
 
-@defun terpri &optional stream
+@defun terpri &optional stream ensure
 @cindex newline in print
-This function outputs a newline to @var{stream}.  The name stands
-for ``terminate print''.
+This function outputs a newline to @var{stream}.  The name stands for
+``terminate print''.  If @var{ensure} is non-nil no newline is printed
+if @var{stream} is already at the beginning of a line.  Note in this
+case @var{stream} can not be a function and an error is signalled if
+it is.  This function returns @code{t} if a newline is printed.
 @end defun
 
 @defun write-char character &optional stream
index e6b00f06f79425ffb85c0276b1f43adc3d9e0653..5e0148b75a96837b1d5a317050883c0367ff1b33 100644 (file)
@@ -458,6 +458,59 @@ Representations}.
 @code{string-equal} is another name for @code{string=}.
 @end defun
 
+@defun string-collate-equalp string1 string2 &optional locale ignore-case
+This function returns @code{t} if @var{string1} and @var{string2} are
+equal with respect to collation rules.  A collation rule is not only
+determined by the lexicographic order of the characters contained in
+@var{string1} and @var{string2}, but also further rules about
+relations between these characters.  Usually, it is defined by the
+@var{locale} environment Emacs is running with.
+
+For example, characters with different coding points but
+the same meaning might be considered as equal, like different grave
+accent Unicode characters:
+
+@example
+@group
+(string-collate-equalp (string ?\uFF40) (string ?\u1FEF))
+     @result{} t
+@end group
+@end example
+
+The optional argument @var{locale}, a string, overrides the setting of
+your current locale identifier for collation.  The value is system
+dependent; a @var{locale} "en_US.UTF-8" is applicable on POSIX
+systems, while it would be, e.g., "enu_USA.1252" on MS-Windows
+systems.
+
+If @var{IGNORE-CASE} is non-nil, characters are converted to lower-case
+before comparing them.
+
+To emulate Unicode-compliant collation on MS-Windows systems,
+bind @code{w32-collate-ignore-punctuation} to a non-nil value, since
+the codeset part of the locale cannot be "UTF-8" on MS-Windows.
+
+If your system does not support a locale environment, this function
+behaves like @code{string-equal}.
+
+Do NOT use this function to compare file names for equality, only
+for sorting them.
+@end defun
+
+@defun string-prefix-p string1 string2 &optional ignore-case
+This function returns non-@code{nil} if @var{string1} is a prefix of
+@var{string2}; i.e., if @var{string2} starts with @var{string1}.  If
+the optional argument @var{ignore-case} is non-@code{nil}, the
+comparison ignores case differences.
+@end defun
+
+@defun string-suffix-p suffix string &optional ignore-case
+This function returns non-@code{nil} if @var{suffix} is a suffix of
+@var{string}; i.e., if @var{string} ends with @var{suffix}.  If the
+optional argument @var{ignore-case} is non-@code{nil}, the comparison
+ignores case differences.
+@end defun
+
 @cindex lexical comparison
 @defun string< string1 string2
 @c (findex string< causes problems for permuted index!!)
@@ -516,6 +569,50 @@ are used.
 @code{string-lessp} is another name for @code{string<}.
 @end defun
 
+@defun string-collate-lessp string1 string2 &optional locale ignore-case
+This function returns @code{t} if @var{string1} is less than
+@var{string2} in collation order.  A collation order is not only
+determined by the lexicographic order of the characters contained in
+@var{string1} and @var{string2}, but also further rules about
+relations between these characters.  Usually, it is defined by the
+@var{locale} environment Emacs is running with.
+
+For example, punctuation and whitespace characters might be considered
+less significant for @ref{Sorting,,sorting}.
+
+@example
+@group
+(sort '("11" "12" "1 1" "1 2" "1.1" "1.2") 'string-collate-lessp)
+     @result{} ("11" "1 1" "1.1" "12" "1 2" "1.2")
+@end group
+@end example
+
+The optional argument @var{locale}, a string, overrides the setting of
+your current locale identifier for collation.  The value is system
+dependent; a @var{locale} "en_US.UTF-8" is applicable on POSIX
+systems, while it would be, e.g., "enu_USA.1252" on MS-Windows
+systems.  The @var{locale} "POSIX" lets @code{string-collate-lessp}
+behave like @code{string-lessp}:
+
+@example
+@group
+(sort '("11" "12" "1 1" "1 2" "1.1" "1.2")
+      (lambda (s1 s2) (string-collate-lessp s1 s2 "POSIX")))
+     @result{} ("1 1" "1 2" "1.1" "1.2" "11" "12")
+@end group
+@end example
+
+If @var{IGNORE-CASE} is non-nil, characters are converted to lower-case
+before comparing them.
+
+To emulate Unicode-compliant collation on MS-Windows systems,
+bind @code{w32-collate-ignore-punctuation} to a non-nil value, since
+the codeset part of the locale cannot be "UTF-8" on MS-Windows.
+
+If your system does not support a locale environment, this function
+behaves like @code{string-lessp}.
+@end defun
+
 @defun string-prefix-p string1 string2 &optional ignore-case
 This function returns non-@code{nil} if @var{string1} is a prefix of
 @var{string2}; i.e., if @var{string2} starts with @var{string1}.  If
index 6665cc3e673791393b4bf16b7adef5f5d624bd87..f21d2b76656cacdc739da5a82330dec7bd916514 100644 (file)
@@ -4114,8 +4114,9 @@ buffer.
 Normally, this command puts point before the inserted text, and the
 mark after it.  However, if the optional second argument @var{beforep}
 is non-@code{nil}, it puts the mark before and point after.
-You can pass a non-@code{nil} second argument @var{beforep} to this
-function interactively by supplying any prefix argument.
+
+When called interactively, the command defaults to putting point after
+text, and a prefix argument inverts this behavior.
 
 If the register contains a rectangle, then the rectangle is inserted
 with its upper left corner at point.  This means that text is inserted
index 1e27d744c7eb2df12df823a5a5d5d24efbad4773..5060fef804f90a1b863ff16695dba6c5832fd866 100644 (file)
@@ -394,13 +394,14 @@ internal window).  The @var{edges} element is a list @code{(@var{left}
 @group
         ____________________________________________
        |______________ Header Line ______________|RD| ^
-     ^ |LS|LF|LM|                       |RM|RF|RS|  | |
+     ^ |LS|LM|LF|                       |RF|RM|RS|  | |
      | |  |  |  |                       |  |  |  |  | |
 Window |  |  |  |       Text Area       |  |  |  |  | Window
 Body | |  |  |  |     (Window Body)     |  |  |  |  | Total
 Height |  |  |  |                       |  |  |  |  | Height
      | |  |  |  |<- Window Body Width ->|  |  |  |  | |
      v |__|__|__|_______________________|__|__|__|  | |
+       |_________ Horizontal Scroll Bar _________|  | |
        |_______________ Mode Line _______________|__| |
        |_____________ Bottom Divider _______________| v
         <---------- Window Total Width ------------>
@@ -414,15 +415,15 @@ Height |  |  |  |                       |  |  |  |  | Height
   At the center of the window is the @dfn{text area}, or @dfn{body},
 where the buffer text is displayed.  The text area can be surrounded by
 a series of optional areas.  On the left and right, from innermost to
-outermost, these are the left and right margins, denoted by LM and RM in
-the schematic (@pxref{Display Margins}); the left and right fringes,
-denoted by LF and RF (@pxref{Fringes}); the left or right scroll bar,
-only one of which is present at any time, denoted by LS and RS
-(@pxref{Scroll Bars}); and the right divider, denoted by RD
+outermost, these are the left and right fringes, denoted by LF and RF
+(@pxref{Fringes}); the left and right margins, denoted by LM and RM in
+the schematic (@pxref{Display Margins}); the left or right vertical
+scroll bar, only one of which is present at any time, denoted by LS and
+RS (@pxref{Scroll Bars}); and the right divider, denoted by RD
 (@pxref{Window Dividers}).  At the top of the window is the header line
-(@pxref{Header Lines}); at the bottom of the window is the mode line
-(@pxref{Mode Line Format}) followed by the bottom divider (@pxref{Window
-Dividers}).
+(@pxref{Header Lines}).  At the bottom of the window are the horizontal
+scroll bar (@pxref{Scroll Bars}); the mode line (@pxref{Mode Line
+Format}); and the bottom divider (@pxref{Window Dividers}).
 
   Emacs provides miscellaneous functions for finding the height and
 width of a window.  The return value of many of these functions can be
@@ -439,11 +440,8 @@ displayed within it.
 @cindex height of a window
 @cindex total height of a window
   The @dfn{total height} of a window is the number of lines comprising
-the window's body, the header line, the mode line and the bottom divider
-(if any).  Note that the height of a frame is not the same as the height
-of its root window (@pxref{Windows and Frames}), since a frame may also
-contain an echo area, a menu bar, and a tool bar (@pxref{Size and
-Position}).
+the window's body, the header line, the horizontal scroll bar, the mode
+line and the bottom divider (if any).
 
 @defun window-total-height &optional window round
 This function returns the total height, in lines, of the window
@@ -457,8 +455,8 @@ rounded internally.  This is done in a way such that, if the window is a
 parent window, the sum of the total heights of all its child windows
 internally equals the total height of their parent.  This means that
 although two windows have the same pixel height, their internal total
-heights may differ by one line.  This means also, that if this window is
-vertically combined and has a right sibling, the topmost row of that
+heights may differ by one line.  This means also, that if window is
+vertically combined and has a next sibling, the topmost row of that
 sibling can be calculated as the sum of this window's topmost row and
 total height (@pxref{Coordinates and Windows})
 
@@ -490,11 +488,10 @@ window, the sum of the total widths of all its children internally
 equals the total width of their parent.  This means that although two
 windows have the same pixel width, their internal total widths may
 differ by one column.  This means also, that if this window is
-horizontally combined and has a right sibling, the leftmost column of
+horizontally combined and has a next sibling, the leftmost column of
 that sibling can be calculated as the sum of this window's leftmost
-column and total width (@pxref{Coordinates and Windows}).  The
-optional argument @var{round} behaves as it does for
-@code{window-total-height}.
+column and total width (@pxref{Coordinates and Windows}).  The optional
+argument @var{round} behaves as it does for @code{window-total-height}.
 @end defun
 
 @defun window-total-size &optional window horizontal round
@@ -517,9 +514,10 @@ window in units of pixels.
 This function returns the total height of window @var{window} in pixels.
 @var{window} must be a valid window and defaults to the selected one.
 
-The return value includes mode and header line and a bottom divider, if
-any.  If @var{window} is an internal window, its pixel height is the
-pixel height of the screen areas spanned by its children.
+The return value includes mode and header line, a horizontal scroll bar
+and a bottom divider, if any.  If @var{window} is an internal window,
+its pixel height is the pixel height of the screen areas spanned by its
+children.
 @end defun
 
 @cindex window pixel height
@@ -542,10 +540,12 @@ the screen areas spanned by its children.
 window has any adjacent windows.
 
 @defun window-full-height-p &optional window
-This function returns non-@code{nil} if @var{window} has no other
-window above or below it in its frame, i.e., its total height equals
-the total height of the root window on that frame.  If @var{window} is
-omitted or @code{nil}, it defaults to the selected window.
+This function returns non-@code{nil} if @var{window} has no other window
+above or below it in its frame.  More precisely, this means that the
+total height of @var{window} equals the total height of the root window
+on that frame.  The minibuffer window does not count in this regard.  If
+@var{window} is omitted or @code{nil}, it defaults to the selected
+window.
 @end defun
 
 @defun window-full-width-p &optional window
@@ -559,7 +559,8 @@ that of the root window on that frame.  If @var{window} is omitted or
 @cindex body height of a window
 @cindex window body width
 The @dfn{body height} of a window is the height of its text area, which
-does not include a mode or header line or a bottom divider.
+does not include a mode or header line, a horizontal scroll bar, or a
+bottom divider.
 
 @defun window-body-height &optional window pixelwise
 This function returns the height, in lines, of the body of window
@@ -646,7 +647,8 @@ size:
 @defopt window-min-height
 This option specifies the minimum total height, in lines, of any window.
 Its value has to accommodate at least one text line as well as a mode
-and header line and a bottom divider, if present.
+and header line, a horizontal scroll bar and a bottom divider, if
+present.
 @end defopt
 
 @defopt window-min-width
@@ -685,10 +687,11 @@ of @var{window}'s lines.
 
 The return value makes sure that all components of @var{window} remain
 fully visible if @var{window}'s size were actually set to it.  With
-@var{horizontal} @code{nil} it includes the mode and header line and the
-bottom divider.  With @var{horizontal} non-@code{nil} it includes the
-fringes, a scroll bar, and a right divider, if present.  It does not,
-however, include the space reserved for the margins.
+@var{horizontal} @code{nil} it includes the mode and header line, the
+horizontal scroll bar and the bottom divider.  With @var{horizontal}
+non-@code{nil} it includes the fringes, a scroll bar, and a right
+divider, if present.  It does not, however, include the space reserved
+for the margins.
 
 The optional argument @var{ignore}, if non-@code{nil}, means ignore
 restrictions imposed by fixed size windows, @code{window-min-height} or
@@ -740,11 +743,11 @@ Normally, the variables @code{window-min-height} and
 (@pxref{Window Sizes}).  However, if the optional argument @var{ignore}
 is non-@code{nil}, this function ignores @code{window-min-height} and
 @code{window-min-width}, as well as @code{window-size-fixed}.  Instead,
-it considers the minimum-height window to be one consisting of a header,
-a mode line and a bottom divider (if any), plus a text area one line
-tall; and a minimum-width window as one consisting of fringes, margins,
-a scroll bar and a right divider (if any), plus a text area two columns
-wide.
+it considers the minimum-height window to be one consisting of a header
+and a mode line, a horizontal scrollbar and a bottom divider (if any),
+plus a text area one line tall; and a minimum-width window as one
+consisting of fringes, margins, a scroll bar and a right divider (if
+any), plus a text area two columns wide.
 
 If the optional argument @var{pixelwise} is non-@code{nil},
 @var{delta} is interpreted as pixels.
@@ -3646,7 +3649,7 @@ This function returns the top pixel edge of window @var{window}.
 
 A @dfn{window configuration} records the entire layout of one
 frame---all windows, their sizes, which buffers they contain, how those
-buffers are scrolled, and their values of point and the mark; also their
+buffers are scrolled, and their value of point; also their
 fringes, margins, and scroll bar settings.  It also includes the value
 of @code{minibuffer-scroll-window}.  As a special exception, the window
 configuration does not record the value of point in the selected window
@@ -3722,13 +3725,13 @@ This function returns @code{t} if @var{object} is a window configuration.
 
 @defun compare-window-configurations config1 config2
 This function compares two window configurations as regards the
-structure of windows, but ignores the values of point and mark and the
+structure of windows, but ignores the values of point and the
 saved scrolling positions---it can return @code{t} even if those
 aspects differ.
 
 The function @code{equal} can also compare two window configurations; it
 regards configurations as unequal if they differ in any respect, even a
-saved point or mark.
+saved point.
 @end defun
 
 @defun window-configuration-frame config
index 34ecda837ef32b4905f42d605d78c233e7833dd7..8723d9a9d6dbc6b9e899007bfcedd74a88421a4c 100644 (file)
@@ -1,3 +1,7 @@
+2014-09-29  Eli Zaretskii  <eliz@gnu.org>
+
+       * emacs.1: Bump version to 25.0.50.
+
 2014-01-12  Glenn Morris  <rgm@gnu.org>
 
        * emacs.1: Replace reference to etc/MAILINGLISTS.
index 9fd609006ff7939c8b805221fe66e99c0a149326..6ad6ee1030b427eb5a79a7b311e5ee1d73084877 100644 (file)
@@ -1,5 +1,5 @@
 .\" See section COPYING for copyright and redistribution information.
-.TH EMACS 1 "2007 April 13" "GNU Emacs 24.3.94"
+.TH EMACS 1 "2007 April 13" "GNU Emacs 25.0.50"
 .
 .
 .SH NAME
index f4291479ce10aa3196682363334b38494348b318..23c3e66b86ffa8b6d6506183b93ed068a13db909 100644 (file)
 
        * Makefile.in (dist): Update for new output variables.
 
+2014-10-08  Leo Liu  <sdl.web@gmail.com>
+
+       * cl.texi (Porting Common Lisp): Remove parse-integer.
+
+2014-10-06  Ulf Jasper  <ulf.jasper@web.de>
+
+       * newsticker.texi (Supported Formats): Fix order of subheading and
+       itemize.
+
 2014-10-04  Glenn Morris  <rgm@gnu.org>
 
        * vip.texi (Other Vi Commands): Markup fix.
 
-2014-10-02  Bastien Guerry  <bzg@gnu.org>
+2014-10-03  Bastien Guerry  <bzg@gnu.org>
 
-       * org.texi (Key bindings and useful functions): Fix typo.  Use the
-       correct function's name.
+       * org.texi (Key bindings and useful functions): Fix typo.
+       Use the correct function's name.
 
-2014-10-02  Michael Brand  <michael.ch.brand@gmail.com>
+2014-10-03  Michael Brand  <michael.ch.brand@gmail.com>
 
        * org.texi (Formula syntax for Calc): Add `f-1' to TBLFM example
        about `nan'.
 
-2014-10-02  Nicolas Goaziou  <mail@nicolasgoaziou.fr>
+2014-10-03  Nicolas Goaziou  <mail@nicolasgoaziou.fr>
 
        * org.texi (Export settings): Be more explicit about how output
        file name is built.
 
        * org.texi (Headings and sectioning structure): Document menus.
 
-2014-10-02  Nicolas Goaziou  <n.goaziou@gmail.com>
-
        * org.texi (Include files, Publishing options): Remove reference
-       to inexistent variable.
+       to nonexistent variable.
+
+2014-10-03  Eli Zaretskii  <eliz@gnu.org>
+
+       * erc.texi (Connecting): Remove stray "OA" that failed the manual
+       build.
+
+2014-10-03  Kelvin White  <kwhite@gnu.org>
+
+       * erc.texi (Advanced Usage, Options): Add descriptions and examples
+       for erc-format-nick-function and erc-rename-buffers options.
+
+2014-09-26  Leo Liu  <sdl.web@gmail.com>
+
+       * cl.texi (Predicates on Numbers): Document cl-digit-char-p.
+       (Numerical Functions): Document cl-parse-integer.  (Bug#18557)
 
-2014-07-25  Stephen Berman  <stephen.berman@gmx.net>
+2014-09-24  Ulf Jasper  <ulf.jasper@web.de>
+
+       * newsticker.texi: Reworked.  Document new treeview group
+       commands.  Remove VERSION, UPDATED, use EMACSVER instead.  Use
+       term 'feed reader'.
+
+2014-09-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Less chatter in 'make' output.
+       * Makefile.in (clean): Simplify, for shorter command line.
+
+2014-08-07  Reuben Thomas  <rrt@sc3d.org>
+
+       * ediff.texi (Merging and diff3): Don't mention lack of support
+       for VMS diff, we no longer support VMS.
+
+2014-08-07  Michael Albinus  <michael.albinus@gmx.de>
+
+       * tramp.texi (Remote shell setup): Explain, how to change command
+       line arguments of remote "nc" listener.
+
+2014-07-31  Tassilo Horn  <tsdh@gnu.org>
+
+       * gnus.texi (Group Parameters): Document that `gcc-self' may also be a
+       list.
+
+2014-07-28  Stephen Berman  <stephen.berman@gmx.net>
 
        * todo-mode.texi (Marked Items): Correct omission of item deletion
        from commands applying to both todo and done items.
 
-2014-07-04  Stephen Berman  <stephen.berman@gmx.net>
+2014-07-18  Albert Krewinkel  <albert+gnus@zeitkraut.de>
+
+       * gnus.texi (Posting Styles): Document the possibility to perform
+       string replacements when matching against headers.
+
+2014-07-09  Stephen Berman  <stephen.berman@gmx.net>
 
        * todo-mode.texi (Levels of Organization): Comment out statement
        that Emacs recognizes todo files by their extension, since this
        feature has been removed due to bug#17482.
 
-2014-06-29  Glenn Morris  <rgm@gnu.org>
+2014-07-03  Michael Albinus  <michael.albinus@gmx.de>
+
+       * trampver.texi: Update release number.
+
+2014-07-03  Glenn Morris  <rgm@gnu.org>
 
        * info.texi, mh-e.texi: "Online help" doesn't mean what it
        used to any more.
 
        * idlwave.texi (Introduction): Comment out dead http screenshot links.
 
-2014-06-23  Leo Liu  <sdl.web@gmail.com>
+2014-06-24  Leo Liu  <sdl.web@gmail.com>
+
+       * dired-x.texi (Omitting Files in Dired, Omitting Variables):
+       Fix key binding to dired-omit-mode.  (Bug#16354)
+
+2014-06-24  Eli Zaretskii  <eliz@gnu.org>
 
-       * dired-x.texi (Omitting Files in Dired, Omitting Variables): Fix
-       key binding to dired-omit-mode.  (Bug#16354)
+       * autotype.texi (Skeleton Language): Document the \n feature better.
 
-2014-06-22  Eli Zaretskii  <eliz@gnu.org>
+2014-06-23  Glenn Morris  <rgm@gnu.org>
 
-       * autotype.texi (Skeleton Language): Document the \n feature
-       better.
+       * Makefile.in (%.texi): Disable implicit rules.
+
+2014-06-22  Mario Lang  <mlang@delysid.org>
+
+       * srecode.texi (Base Arguments): The the -> to the.
+
+       * org.texi (Images in ODT export): The the -> the.
 
 2014-06-21  Eli Zaretskii  <eliz@gnu.org>
 
        * autotype.texi (Skeleton Language): Document the feature of \n
        when at eol.
 
-2014-06-15  Michael Albinus  <michael.albinus@gmx.de>
+2014-06-21  Michael Albinus  <michael.albinus@gmx.de>
 
        * dbus.texi (Type Conversion): Formatting edits in example.
 
-2014-06-10  Glenn Morris  <rgm@gnu.org>
+2014-06-15  Michael Albinus  <michael.albinus@gmx.de>
+
+       Sync with Tramp 2.2.10.
+
+       * tramp.texi (Inline methods): Remove restriction on "telnet".
+       Recommend sharing ssh connections for "plink".
+       (External methods): Remove "sftp".  Merge "pscp" and "psftp"
+       descriptions.  Recommend sharing ssh connections.  Add "nc" method.
+       (GVFS based methods): Add "sftp".
+       (Customizing Completion, External packages, Issues):
+       Use @dots{}.
+
+       * trampver.texi: Update release number.
+
+2014-06-15  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (bootstrap-clean): New.
+
+2014-06-12  Vincent Belaïche  <vincentb1@users.sourceforge.net>
+
+       * ses.texi: Adding documentation for SES local printer functions.
+
+2014-06-12  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in: Use GNU Make features to reduce duplication.
+       (mkinfodir): Remove.
+       (${buildinfodir}): Generate using an order-only prerequisite.
+       (.dvi.ps): Replace with pattern rule.
+       ($INFO_TARGETS): Mark as PHONY.
+       (${buildinfodir}): New rule.
+       (EXTRA_OPTS, need_emacsver, need_emacsver_prefix): New variables.
+       (${buildinfodir}/%.info, %.dvi, %.pdf, %.html, %.ps):
+       New pattern rules, replacing numerous previous explicit rules.
+       (info_template): New definition.
+       (gnus.dvi, gnus.pdf): Use distinct intermediate files.
+       (mostlyclean): Adjust for above gnus change.
+
+2014-06-11  Glenn Morris  <rgm@gnu.org>
 
        * Makefile.in (INFO_INSTALL): Update for 2013-08-28 DOCMISC_W32 change.
 
+2014-06-10  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (INFO_EXT): Remove and replace by ".info" throughout.
+       (INFO_OPTS): Set directly rather than with configure.
+
 2014-06-08  Karl Berry  <karl@gnu.org>
 
        * doc/info.texi (Help-^L): "mode line", "screenful",
        * todo-mode.texi (Moving and Deleting Items):
        * woman.texi (Navigation): Markup fixes re SPC, RET.
 
-2014-05-24  Paul Eggert  <eggert@cs.ucla.edu>
+2014-06-02  Glenn Morris  <rgm@gnu.org>
+
+       * efaq.texi (Finding a package with particular functionality):
+       Update example.
+       * vip.texi: Mention this is obsolete.
+
+2014-05-27  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * texinfo.tex: Update from gnulib.
+
+2014-05-26  Paul Eggert  <eggert@cs.ucla.edu>
 
        Specify coding if Latin-1 Emacs would misinterpret (Bug#17575).
        * htmlfontify.texi, org.texi: Add "coding: utf-8".
 
-2014-05-23  Stephen Berman  <stephen.berman@gmx.net>
+2014-05-26  Stephen Berman  <stephen.berman@gmx.net>
 
        * todo-mode.texi: Update in light of changes due to bug#17482.
        Replace numerous mistaken uses of literal quotes with proper
        (Todo Mode Entry Points): Comment out reference to using find-file
        or Dired to visit Todo files, since this has been disabled (bug#17482).
 
-2014-05-06  Michael Albinus  <michael.albinus@gmx.de>
+2014-05-20  Leo Liu  <sdl.web@gmail.com>
+
+       * cl.texi (List Functions, Efficiency Concerns): Update cl-endp.
+
+2014-05-13  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * texinfo.tex: Update from gnulib.
+
+2014-05-08  Michael Albinus  <michael.albinus@gmx.de>
 
        * tramp.texi (Frequently Asked Questions): Mention HISTFILE
        setting in ~/.ssh/environment.
 
-2014-05-02  Stephen Berman  <stephen.berman@gmx.net>
+2014-05-04  Stephen Berman  <stephen.berman@gmx.net>
 
        * todo-mode.texi: Update, improve exposition, add cross
        references, fix typos.
        (Inserting New Items, Editing Item Headers and Text): Rewrite to
        document new user interface.
 
-2014-05-01  Glenn Morris  <rgm@gnu.org>
+2014-05-04  Glenn Morris  <rgm@gnu.org>
 
        * autotype.texi (Skeleton Language):
        * message.texi (Header Commands): Replace `iff'.
 
+2014-05-02  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * vhdl-mode.texi: Add "@documentencoding UTF-8",
+       since this is a toplevel .texi file.
+
 2014-04-22  Bastien Guerry  <bzg@gnu.org>
 
        * org.texi (Installation): Be more clear on why installing Org
        * org.texi (Top, Exporting): Org has its own documentation and
        should therefore be removed from "Other build-in back-ends".
 
+2014-04-22  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * cl.texi (Structures): Remove cl-struct-set-slot-value.
+
+2014-04-20  Daniel Colascione  <dancol@dancol.org>
+
+       * cl.texi (Declarations): Document changes to `cl-the' and defstruct functions.
+
+2014-04-17  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * Makefile.in (infoclean): Be consistent about reporting failures.
+
+2014-03-27  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (INFO_COMMON): Add vhdl-mode.
+       (vhdl_mode_deps, vhdl-mode, $(buildinfodir)/vhdl-mode$(INFO_EXT))
+       (vhdl-mode.dvi, vhdl-mode.pdf, vhdl-mode.html): New rules/variables.
+
+       * vhdl-mode.texi: General clean-up.  Set copyright to FSF, add license.
+       Remove hand-written node pointers.  Remove info re old Emacs versions.
+       Markup fixes.
+       (Getting Connected): Remove irrelevant info.
+       (Indentation Commands, Requirements): Remove empty/irrelevant nodes.
+       (Frequently Asked Questions): Electric indent is now enabled.
+
+2014-03-27  Reto Zimmermann  <reto@gnu.org>
+           Rod Whitby  <software.vhdl-mode@rwhitby.net>
+
+       * vhdl-mode.texi: New file, imported from upstream vhdl-mode.
+
 2014-03-26  Paul Eggert  <eggert@cs.ucla.edu>
 
        * texinfo.tex: Update from gnulib.
 
-2014-03-24  Michael Albinus  <michael.albinus@gmx.de>
+2014-03-26  Michael Albinus  <michael.albinus@gmx.de>
 
        * tramp.texi (Frequently Asked Questions): Add fish shell settings.
 
+2014-03-23  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus.texi (Ma Gnus): Mention header attachment buttons.
+
+2014-03-23  Lars Ingebrigtsen  <larsi@gnus.org>
+
+       * emacs-mime.texi (MML Definition): Document recipient-filename.
+
+2014-03-23  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus.texi (MIME Commands):
+       Mention gnus-mime-buttonize-attachments-in-header and
+       gnus-mime-display-attachment-buttons-in-header.
+
+2014-03-23  Lars Ingebrigtsen  <larsi@gnus.org>
+
+       * message.texi (Forwarding):
+       Mention `message-forward-included-headers'.
+
+2014-03-23  Lars Ingebrigtsen  <larsi@gnus.org>
+
+       * gnus.texi: w3 is no longer supported by Gnus.
+
+2014-03-22  Glenn Morris  <rgm@gnu.org>
+
+       * efaq.texi (Informational files for Emacs): Do not mention etc/GNU.
+
 2014-03-21  Glenn Morris  <rgm@gnu.org>
 
        * ede.texi (ede-linux):
 
        * org.texi (Installation, Activation): Split from Installation and
        Activation.
-       (Clocking work time): Documented new features.
+       (Clocking work time): Document new features.
 
 2006-08-13  Alex Schroeder  <alex@gnu.org>
 
        * emacs-mime.texi (Flowed text): Add mm-fill-flowed.  (Sync
        2004-01-27 from the trunk).
 
-2006-02-24  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2006-02-24  Alan Mackenzie  <acm@muc.de>
 
        * cc-mode.texi: Rename c-hungry-backspace to
        c-hungry-delete-backwards, at the request of RMS.  Leave the old
        name as an alias.
 
-2006-02-24  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2006-02-24  Alan Mackenzie  <acm@muc.de>
 
        * cc-mode.texi: Correct the definition of c-beginning-of-defun, to
        include the function header within the defun.
 
-2006-02-24  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2006-02-24  Alan Mackenzie  <acm@muc.de>
 
        * cc-mode.texi: Correct two typos.
 
-2006-02-24  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2006-02-24  Alan Mackenzie  <acm@muc.de>
 
        * cc-mode.texi (Comment Commands): State that C-u M-; kills any
        existing comment.
        (MIME with Emacs mail packages): Delete section about the Emacs
        MIME FAQ (it's not reachable anymore).
 
-2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2005-12-08  Alan Mackenzie  <acm@muc.de>
 
        * cc-mode.texi: The manual has been extensively revised: the
        information about using CC Mode has been separated from the larger
 
 2005-10-10  Carsten Dominik  <dominik@science.uva.nl>
 
-       * org.texi (Workflow states): Documented that change in keywords
+       * org.texi (Workflow states): Document that change in keywords
        becomes active only after restart of Emacs.
 
 2005-10-08  Michael Albinus  <michael.albinus@gmx.de>
 
        * Makefile.in (../info/tramp, tramp.dvi): Depend on trampver.texi.
 
-2004-08-11  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2004-08-11  Martin Stjernholm  <mast@lysator.liu.se>
 
        * cc-mode.texi: Various updates for CC Mode 5.30.9.
 
 
        * eshell.texi (Known Problems): Add doc item.
 
-2003-11-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-11-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * cc-mode.texi: Update for CC Mode 5.30.
 
index 4254ebefde791af2284b4eabdae89b3d2dfc7368..250d3c39c453bc6f466f99898368efcefdf45918 100644 (file)
 
 SHELL = @SHELL@
 
-# Where to find the source code.  $(srcdir) will be the man-aux
-# subdirectory of the source tree.  This is
-# set by the configure script's `--srcdir' option.
+# Where to find the source code.  $(srcdir) will be the doc/misc subdirectory
+# of the source tree.  This is set by configure's `--srcdir' option.
 srcdir=@srcdir@
 
 version=@version@
 
 ## Where the output files go.
+## Note that all the Info targets build the Info files in srcdir.
+## There is no provision for Info files to exist in the build directory.
+## In a tarfile of Emacs, the Info files should be up to date.
 buildinfodir = $(srcdir)/../../info
+
 ## Directory with emacsver.texi.
 emacsdir = $(srcdir)/../emacs
 
@@ -47,15 +50,16 @@ GZIP_PROG = @GZIP_PROG@
 
 HTML_OPTS = --no-split --html
 
-INFO_EXT=@INFO_EXT@
 # Options used only when making info output.
-INFO_OPTS=@INFO_OPTS@
+# (Note that idlwave, info used --nosplit even without the .info extension.)
+INFO_OPTS= --no-split
 
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 
 # The makeinfo program is part of the Texinfo distribution.
 # Use --force so that it generates output even if there are errors.
+# (TODO?  Why is this appropriate?)
 MAKEINFO = @MAKEINFO@
 MAKEINFO_OPTS = --force -I$(emacsdir)
 
@@ -70,7 +74,7 @@ INFO_COMMON = ada-mode auth autotype bovine calc ccmode cl \
        mairix-el message mh-e newsticker nxml-mode octave-mode \
        org pcl-cvs pgg rcirc remember reftex sasl \
        sc semantic ses sieve smtpmail speedbar srecode todo-mode tramp \
-       url vip viper widget wisent woman
+       url vhdl-mode vip viper widget wisent woman
 
 ## Info files to install on current platform.
 INFO_INSTALL = $(INFO_COMMON) $(DOCMISC_W32)
@@ -97,18 +101,14 @@ DVIPS = dvips
 ENVADD = TEXINPUTS="$(srcdir):$(emacsdir):$(TEXINPUTS)" \
          MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)"
 
-mkinfodir = @${MKDIR_P} ${buildinfodir}
-
 gfdl = ${srcdir}/doclicense.texi
 
-.PHONY: info dvi html pdf ps echo-info
+.PHONY: info dvi html pdf ps echo-info $(INFO_TARGETS)
 ## Prevent implicit rule triggering for foo.info.
 .SUFFIXES:
 
-.SUFFIXES: .ps .dvi
-
-.dvi.ps:
-       $(DVIPS) -o $@ $<
+## Disable implicit rules.
+%.texi: ;
 
 # Default.
 info: $(INFO_TARGETS)
@@ -117,7 +117,7 @@ info: $(INFO_TARGETS)
 ## Base file names of output info files.
 echo-info:
        @echo "$(INFO_INSTALL) " | \
-         sed -e 's|[^ ]*/||g' -e 's/\.info//g' -e "s/  */$(INFO_EXT) /g"
+         sed -e 's|[^ ]*/||g' -e 's/\.info//g' -e "s/  */.info /g"
 
 dvi: $(DVI_TARGETS)
 
@@ -127,742 +127,101 @@ pdf: $(PDF_TARGETS)
 
 ps: $(PS_TARGETS)
 
-# Note that all the Info targets build the Info files in srcdir.
-# There is no provision for Info files to exist in the build directory.
-# In a distribution of Emacs, the Info files should be up to date.
-
-# Note: "<" is not portable in ordinary make rules.
-
-ada_mode_deps = ${srcdir}/ada-mode.texi ${gfdl}
-ada-mode : $(buildinfodir)/ada-mode$(INFO_EXT)
-$(buildinfodir)/ada-mode$(INFO_EXT): $(ada_mode_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/ada-mode.texi
-ada-mode.dvi: $(ada_mode_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/ada-mode.texi
-ada-mode.pdf: $(ada_mode_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/ada-mode.texi
-ada-mode.html: $(ada_mode_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/ada-mode.texi
-
-auth_deps = ${srcdir}/auth.texi ${gfdl}
-auth : $(buildinfodir)/auth$(INFO_EXT)
-$(buildinfodir)/auth$(INFO_EXT): $(auth_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/auth.texi
-auth.dvi: $(auth_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/auth.texi
-auth.pdf: $(auth_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/auth.texi
-auth.html: $(auth_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/auth.texi
-
-autotype_deps = ${srcdir}/autotype.texi ${gfdl}
-autotype : $(buildinfodir)/autotype$(INFO_EXT)
-$(buildinfodir)/autotype$(INFO_EXT): $(autotype_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/autotype.texi
-autotype.dvi: $(autotype_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/autotype.texi
-autotype.pdf: $(autotype_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/autotype.texi
-autotype.html: $(autotype_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/autotype.texi
-
-bovine_deps = ${srcdir}/bovine.texi ${gfdl}
-bovine : $(buildinfodir)/bovine$(INFO_EXT)
-$(buildinfodir)/bovine$(INFO_EXT): $(bovine_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/bovine.texi
-bovine.dvi: $(bovine_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/bovine.texi
-bovine.pdf: $(bovine_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/bovine.texi
-bovine.html: $(bovine_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/bovine.texi
-
-calc_deps = ${srcdir}/calc.texi $(emacsdir)/emacsver.texi ${gfdl}
-calc : $(buildinfodir)/calc$(INFO_EXT)
-$(buildinfodir)/calc$(INFO_EXT): $(calc_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/calc.texi
-calc.dvi: $(calc_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/calc.texi
-calc.pdf: $(calc_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/calc.texi
-calc.html: $(calc_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/calc.texi
-
-cc_mode_deps = ${srcdir}/cc-mode.texi ${gfdl}
-ccmode : $(buildinfodir)/ccmode$(INFO_EXT)
-$(buildinfodir)/ccmode$(INFO_EXT): $(cc_mode_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/cc-mode.texi
-cc-mode.dvi: $(cc_mode_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/cc-mode.texi
-cc-mode.pdf: $(cc_mode_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/cc-mode.texi
-cc-mode.html: $(cc_mode_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/cc-mode.texi
-
-cl_deps = ${srcdir}/cl.texi $(emacsdir)/emacsver.texi ${gfdl}
-cl : $(buildinfodir)/cl$(INFO_EXT)
-$(buildinfodir)/cl$(INFO_EXT): $(cl_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/cl.texi
-cl.dvi: $(cl_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/cl.texi
-cl.pdf: $(cl_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/cl.texi
-cl.html: $(cl_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/cl.texi
-
-dbus_deps = ${srcdir}/dbus.texi ${gfdl}
-dbus : $(buildinfodir)/dbus$(INFO_EXT)
-$(buildinfodir)/dbus$(INFO_EXT): $(dbus_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/dbus.texi
-dbus.dvi: $(dbus_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/dbus.texi
-dbus.pdf: $(dbus_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/dbus.texi
-dbus.html: $(dbus_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/dbus.texi
-
-dired_x_deps = ${srcdir}/dired-x.texi $(emacsdir)/emacsver.texi ${gfdl}
-dired-x : $(buildinfodir)/dired-x$(INFO_EXT)
-$(buildinfodir)/dired-x$(INFO_EXT): $(dired_x_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/dired-x.texi
-dired-x.dvi: $(dired_x_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/dired-x.texi
-dired-x.pdf: $(dired_x_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/dired-x.texi
-dired-x.html: $(dired_x_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/dired-x.texi
-
-ebrowse_deps = ${srcdir}/ebrowse.texi ${gfdl}
-ebrowse : $(buildinfodir)/ebrowse$(INFO_EXT)
-$(buildinfodir)/ebrowse$(INFO_EXT): $(ebrowse_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/ebrowse.texi
-ebrowse.dvi: $(ebrowse_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/ebrowse.texi
-ebrowse.pdf: $(ebrowse_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/ebrowse.texi
-ebrowse.html: $(ebrowse_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/ebrowse.texi
-
-ede_deps = ${srcdir}/ede.texi ${gfdl}
-ede : $(buildinfodir)/ede$(INFO_EXT)
-$(buildinfodir)/ede$(INFO_EXT): $(ede_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/ede.texi
-ede.dvi: $(ede_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/ede.texi
-ede.pdf: $(ede_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/ede.texi
-ede.html: $(ede_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/ede.texi
-
-ediff_deps = ${srcdir}/ediff.texi ${gfdl}
-ediff : $(buildinfodir)/ediff$(INFO_EXT)
-$(buildinfodir)/ediff$(INFO_EXT): $(ediff_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/ediff.texi
-ediff.dvi: $(ediff_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/ediff.texi
-ediff.pdf: $(ediff_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/ediff.texi
-ediff.html: $(ediff_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/ediff.texi
-
-edt_deps = ${srcdir}/edt.texi ${gfdl}
-edt : $(buildinfodir)/edt$(INFO_EXT)
-$(buildinfodir)/edt$(INFO_EXT): $(edt_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/edt.texi
-edt.dvi: $(edt_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/edt.texi
-edt.pdf: $(edt_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/edt.texi
-edt.html: $(edt_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/edt.texi
-
-## No gfdl dependency.
-efaq_deps = ${srcdir}/efaq.texi $(emacsdir)/emacsver.texi
-efaq : $(buildinfodir)/efaq$(INFO_EXT)
-$(buildinfodir)/efaq$(INFO_EXT): $(efaq_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/efaq.texi
-efaq.dvi: $(efaq_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/efaq.texi
-efaq.pdf: $(efaq_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/efaq.texi
-efaq.html: $(efaq_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/efaq.texi
-
-efaq_w32_deps = ${srcdir}/efaq-w32.texi $(emacsdir)/emacsver.texi
-efaq-w32 : $(buildinfodir)/efaq-w32$(INFO_EXT)
-$(buildinfodir)/efaq-w32$(INFO_EXT): $(efaq_w32_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/efaq-w32.texi
-efaq-w32.dvi: $(efaq_w32_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/efaq-w32.texi
-efaq-w32.pdf: $(efaq_w32_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/efaq-w32.texi
-efaq-w32.html: $(efaq_w32_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/efaq-w32.texi
-
-eieio_deps = ${srcdir}/eieio.texi ${gfdl}
-eieio : $(buildinfodir)/eieio$(INFO_EXT)
-$(buildinfodir)/eieio$(INFO_EXT): $(eieio_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/eieio.texi
-eieio.dvi: $(eieio_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/eieio.texi
-eieio.pdf: $(eieio_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/eieio.texi
-eieio.html: $(eieio_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/eieio.texi
-
-emacs_gnutls_deps = ${srcdir}/emacs-gnutls.texi ${gfdl}
-emacs-gnutls : $(buildinfodir)/emacs-gnutls$(INFO_EXT)
-$(buildinfodir)/emacs-gnutls$(INFO_EXT): $(emacs_gnutls_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/emacs-gnutls.texi
-emacs-gnutls.dvi: $(emacs_gnutls_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-gnutls.texi
-emacs-gnutls.pdf: $(emacs_gnutls_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-gnutls.texi
-emacs-gnutls.html: $(emacs_gnutls_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/emacs-gnutls.texi
-
-emacs_mime_deps = ${srcdir}/emacs-mime.texi ${gfdl}
-emacs-mime : $(buildinfodir)/emacs-mime$(INFO_EXT)
-$(buildinfodir)/emacs-mime$(INFO_EXT): $(emacs_mime_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) --enable-encoding -o $@ ${srcdir}/emacs-mime.texi
-emacs-mime.dvi: $(emacs_mime_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-mime.texi
-emacs-mime.pdf: $(emacs_mime_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-mime.texi
-emacs-mime.html: $(emacs_mime_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) --enable-encoding -o $@ ${srcdir}/emacs-mime.texi
-
-epa_deps = ${srcdir}/epa.texi ${gfdl}
-epa : $(buildinfodir)/epa$(INFO_EXT)
-$(buildinfodir)/epa$(INFO_EXT): $(epa_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/epa.texi
-epa.dvi: $(epa_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/epa.texi
-epa.pdf: $(epa_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/epa.texi
-epa.html: $(epa_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/epa.texi
-
-erc_deps = ${srcdir}/erc.texi $(emacsdir)/emacsver.texi ${gfdl}
-erc : $(buildinfodir)/erc$(INFO_EXT)
-$(buildinfodir)/erc$(INFO_EXT): $(erc_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/erc.texi
-erc.dvi: $(erc_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/erc.texi
-erc.pdf: $(erc_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/erc.texi
-erc.html: $(erc_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/erc.texi
-
-ert_deps = ${srcdir}/ert.texi ${gfdl}
-ert : $(buildinfodir)/ert$(INFO_EXT)
-$(buildinfodir)/ert$(INFO_EXT): $(ert_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/ert.texi
-ert.dvi: $(ert_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/ert.texi
-ert.pdf: $(ert_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/ert.texi
-ert.html: $(ert_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/ert.texi
-
-eshell_deps = ${srcdir}/eshell.texi ${gfdl}
-eshell : $(buildinfodir)/eshell$(INFO_EXT)
-$(buildinfodir)/eshell$(INFO_EXT): $(eshell_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/eshell.texi
-eshell.dvi: $(eshell_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/eshell.texi
-eshell.pdf: $(eshell_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/eshell.texi
-eshell.html: $(eshell_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/eshell.texi
-
-eudc_deps = ${srcdir}/eudc.texi ${gfdl}
-eudc : $(buildinfodir)/eudc$(INFO_EXT)
-$(buildinfodir)/eudc$(INFO_EXT): $(eudc_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/eudc.texi
-eudc.dvi: $(eudc_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/eudc.texi
-eudc.pdf: $(eudc_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/eudc.texi
-eudc.html: $(eudc_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/eudc.texi
-
-eww_deps = ${srcdir}/eww.texi ${gfdl}
-eww : $(buildinfodir)/eww$(INFO_EXT)
-$(buildinfodir)/eww$(INFO_EXT): $(eww_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/eww.texi
-eww.dvi: $(eww_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/eww.texi
-eww.pdf: $(eww_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/eww.texi
-eww.html: $(eww_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/eww.texi
-
-flymake_deps = ${srcdir}/flymake.texi ${gfdl}
-flymake : $(buildinfodir)/flymake$(INFO_EXT)
-$(buildinfodir)/flymake$(INFO_EXT): $(flymake_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/flymake.texi
-flymake.dvi: $(flymake_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/flymake.texi
-flymake.pdf: $(flymake_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/flymake.texi
-flymake.html: $(flymake_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/flymake.texi
-
-forms_deps = ${srcdir}/forms.texi ${gfdl}
-forms : $(buildinfodir)/forms$(INFO_EXT)
-$(buildinfodir)/forms$(INFO_EXT): $(forms_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/forms.texi
-forms.dvi: $(forms_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/forms.texi
-forms.pdf: $(forms_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/forms.texi
-forms.html: $(forms_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/forms.texi
-
-## gnus/message/emacs-mime/sieve/pgg are part of Gnus.
+${buildinfodir}:
+       ${MKDIR_P} $@
+
+### The general case.
+
+EXTRA_OPTS =
+
+${buildinfodir}/%.info: ${srcdir}/%.texi ${gfdl} | ${buildinfodir}
+       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) $(EXTRA_OPTS) -o $@ $<
+
+## The short aliases, eg efaq = $(buildinfodir)/efaq.info.
+define info_template
+ $(1): $$(buildinfodir)/$(1).info
+endef
+
+## "info" is already taken.
+info.info: $(buildinfodir)/info.info
+
+$(foreach ifile,$(filter-out info.info,$(INFO_TARGETS)),$(eval $(call info_template,$(ifile))))
+
+
+%.dvi: ${srcdir}/%.texi ${gfdl}
+       $(ENVADD) $(TEXI2DVI) $<
+
+%.pdf: ${srcdir}/%.texi ${gfdl}
+       $(ENVADD) $(TEXI2PDF) $<
+
+%.html: ${srcdir}/%.texi ${gfdl}
+       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) $(EXTRA_OPTS) -o $@ $<
+
+%.ps: %.dvi
+       $(DVIPS) -o $@ $<
+
+
+### The exceptions.
+
+## Extra dependencies.
+
+need_emacsver = calc cl dired-x efaq efaq-w32 erc ido reftex woman
+need_emacsver_prefix = $(addprefix ${buildinfodir}/,${need_emacsver})
+
+$(need_emacsver_prefix:=.info) $(need_emacsver:=.dvi) $(need_emacsver:=.pdf) $(need_emacsver:=.html) : ${emacsdir}/emacsver.texi
+
+$(buildinfodir)/gnus.info gnus.html: ${srcdir}/gnus-faq.texi
+
+$(buildinfodir)/semantic.info semantic.dvi semantic.pdf semantic.html: ${srcdir}/sem-user.texi
+
+
+## Please can we just rename cc-mode.texi to ccmode.texi...
+${buildinfodir}/ccmode.info: ${srcdir}/cc-mode.texi ${gfdl}
+       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $<
+
+## efaq, efaq_w32 do not depend on gfdl.
+## Maybe we can use .SECONDEXPANSION for this.
+${buildinfodir}/efaq%.info: ${srcdir}/efaq%.texi
+       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $<
+
+efaq%.dvi: ${srcdir}/efaq%.texi
+       $(ENVADD) $(TEXI2DVI) $<
+
+efaq%.pdf: ${srcdir}/efaq%.texi
+       $(ENVADD) $(TEXI2PDF) $<
+
+efaq%.html: ${srcdir}/efaq%.texi
+       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ $<
+
+${buildinfodir}/emacs-mime.info emacs-mime.html: EXTRA_OPTS = --enable-encoding
+
 gnus_deps = ${srcdir}/gnus.texi ${srcdir}/gnus-faq.texi ${gfdl}
-gnus : $(buildinfodir)/gnus$(INFO_EXT)
-$(buildinfodir)/gnus$(INFO_EXT): $(gnus_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/gnus.texi
 gnus.dvi: $(gnus_deps)
-       sed -e '/@iflatex/,/@end iflatex/d' ${srcdir}/gnus.texi > gnustmp.texi
-       $(ENVADD) $(TEXI2DVI) gnustmp.texi
-       cp gnustmp.dvi $@
-       rm gnustmp.*
+       sed -e '/@iflatex/,/@end iflatex/d' $< > gnustmpdvi.texi
+       $(ENVADD) $(TEXI2DVI) gnustmpdvi.texi
+       cp gnustmpdvi.dvi $@
+       rm gnustmpdvi.*
+
 gnus.pdf: $(gnus_deps)
-       sed -e '/@iflatex/,/@end iflatex/d' ${srcdir}/gnus.texi > gnustmp.texi
-       $(ENVADD) $(TEXI2PDF) gnustmp.texi
-       cp gnustmp.pdf $@
-       rm gnustmp.*
-gnus.html: $(gnus_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/gnus.texi
-
-htmlfontify_deps = ${srcdir}/htmlfontify.texi ${gfdl}
-htmlfontify : $(buildinfodir)/htmlfontify$(INFO_EXT)
-$(buildinfodir)/htmlfontify$(INFO_EXT): $(htmlfontify_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/htmlfontify.texi
-htmlfontify.dvi: $(htmlfontify_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/htmlfontify.texi
-htmlfontify.pdf: $(htmlfontify_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/htmlfontify.texi
-htmlfontify.html: $(htmlfontify_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/htmlfontify.texi
-
-idlwave_deps = ${srcdir}/idlwave.texi ${gfdl}
-idlwave : $(buildinfodir)/idlwave$(INFO_EXT)
-# NB this one needs --no-split even without a .info extension.
-$(buildinfodir)/idlwave$(INFO_EXT): $(idlwave_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/idlwave.texi
-idlwave.dvi: $(idlwave_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/idlwave.texi
-idlwave.pdf: $(idlwave_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/idlwave.texi
-idlwave.html: $(idlwave_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/idlwave.texi
-
-ido_deps = ${srcdir}/ido.texi $(emacsdir)/emacsver.texi ${gfdl}
-ido : $(buildinfodir)/ido$(INFO_EXT)
-$(buildinfodir)/ido$(INFO_EXT): $(ido_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/ido.texi
-ido.dvi: $(ido_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/ido.texi
-ido.pdf: $(ido_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/ido.texi
-ido.html: $(ido_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/ido.texi
-
-info_deps = ${srcdir}/info.texi ${gfdl}
-# Avoid name clash with overall "info" target.
-info.info : $(buildinfodir)/info$(INFO_EXT)
-# NB this one needs --no-split even without a .info extension.
-$(buildinfodir)/info$(INFO_EXT): $(info_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/info.texi
-info.dvi: $(info_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/info.texi
-info.pdf: $(info_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/info.texi
-info.html: $(info_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/info.texi
-
-mairix_el_deps = ${srcdir}/mairix-el.texi ${gfdl}
-mairix-el : $(buildinfodir)/mairix-el$(INFO_EXT)
-$(buildinfodir)/mairix-el$(INFO_EXT): $(mairix_el_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/mairix-el.texi
-mairix-el.dvi: $(mairix_el_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/mairix-el.texi
-mairix-el.pdf: $(mairix_el_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/mairix-el.texi
-mairix-el.html: $(mairix_el_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/mairix-el.texi
-
-message_deps = ${srcdir}/message.texi ${gfdl}
-message : $(buildinfodir)/message$(INFO_EXT)
-$(buildinfodir)/message$(INFO_EXT): $(message_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/message.texi
-message.dvi: $(message_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/message.texi
-message.pdf: $(message_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/message.texi
-message.html: $(message_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/message.texi
-
-mh_e_deps = ${srcdir}/mh-e.texi ${gfdl}
-mh-e : $(buildinfodir)/mh-e$(INFO_EXT)
-$(buildinfodir)/mh-e$(INFO_EXT): $(mh_e_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/mh-e.texi
-mh-e.dvi: $(mh_e_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/mh-e.texi
-mh-e.pdf: $(mh_e_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/mh-e.texi
-mh-e.html: $(mh_e_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/mh-e.texi
-
-newsticker_deps = ${srcdir}/newsticker.texi ${gfdl}
-newsticker : $(buildinfodir)/newsticker$(INFO_EXT)
-$(buildinfodir)/newsticker$(INFO_EXT): $(newsticker_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/newsticker.texi
-newsticker.dvi: $(newsticker_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/newsticker.texi
-newsticker.pdf: $(newsticker_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/newsticker.texi
-newsticker.html: $(newsticker_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/newsticker.texi
-
-nxml_mode_deps = ${srcdir}/nxml-mode.texi ${gfdl}
-nxml-mode : $(buildinfodir)/nxml-mode$(INFO_EXT)
-$(buildinfodir)/nxml-mode$(INFO_EXT): $(nxml_mode_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/nxml-mode.texi
-nxml-mode.dvi: $(nxml_mode_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/nxml-mode.texi
-nxml-mode.pdf: $(nxml_mode_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/nxml-mode.texi
-nxml-mode.html: $(nxml_mode_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/nxml-mode.texi
-
-octave_mode_deps = ${srcdir}/octave-mode.texi ${gfdl}
-octave-mode : $(buildinfodir)/octave-mode$(INFO_EXT)
-$(buildinfodir)/octave-mode$(INFO_EXT): $(octave_mode_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/octave-mode.texi
-octave-mode.dvi: $(octave_mode_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/octave-mode.texi
-octave-mode.pdf: $(octave_mode_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/octave-mode.texi
-octave-mode.html: $(octave_mode_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/octave-mode.texi
-
-org_deps = ${srcdir}/org.texi ${gfdl}
-org : $(buildinfodir)/org$(INFO_EXT)
-$(buildinfodir)/org$(INFO_EXT): $(org_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/org.texi
-org.dvi: $(org_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/org.texi
-org.pdf: $(org_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/org.texi
-org.html: $(org_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/org.texi
-
-pcl_cvs_deps = ${srcdir}/pcl-cvs.texi ${gfdl}
-pcl-cvs : $(buildinfodir)/pcl-cvs$(INFO_EXT)
-$(buildinfodir)/pcl-cvs$(INFO_EXT): $(pcl_cvs_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/pcl-cvs.texi
-pcl-cvs.dvi: $(pcl_cvs_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/pcl-cvs.texi
-pcl-cvs.pdf: $(pcl_cvs_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/pcl-cvs.texi
-pcl-cvs.html: $(pcl_cvs_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/pcl-cvs.texi
-
-pgg_deps = ${srcdir}/pgg.texi ${gfdl}
-pgg : $(buildinfodir)/pgg$(INFO_EXT)
-$(buildinfodir)/pgg$(INFO_EXT): $(pgg_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/pgg.texi
-pgg.dvi: $(pgg_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/pgg.texi
-pgg.pdf: $(pgg_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/pgg.texi
-pgg.html: $(pgg_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/pgg.texi
-
-rcirc_deps = ${srcdir}/rcirc.texi ${gfdl}
-rcirc : $(buildinfodir)/rcirc$(INFO_EXT)
-$(buildinfodir)/rcirc$(INFO_EXT): $(rcirc_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/rcirc.texi
-rcirc.dvi: $(rcirc_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/rcirc.texi
-rcirc.pdf: $(rcirc_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/rcirc.texi
-rcirc.html: $(rcirc_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/rcirc.texi
-
-reftex_deps = ${srcdir}/reftex.texi $(emacsdir)/emacsver.texi ${gfdl}
-reftex : $(buildinfodir)/reftex$(INFO_EXT)
-$(buildinfodir)/reftex$(INFO_EXT): $(reftex_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/reftex.texi
-reftex.dvi: $(reftex_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/reftex.texi
-reftex.pdf: $(reftex_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/reftex.texi
-reftex.html: $(reftex_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/reftex.texi
-
-remember_deps = ${srcdir}/remember.texi ${gfdl}
-remember : $(buildinfodir)/remember$(INFO_EXT)
-$(buildinfodir)/remember$(INFO_EXT): $(remember_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/remember.texi
-remember.dvi: $(remember_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/remember.texi
-remember.pdf: $(remember_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/remember.texi
-remember.html: $(remember_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/remember.texi
-
-sasl_deps = ${srcdir}/sasl.texi ${gfdl}
-sasl : $(buildinfodir)/sasl$(INFO_EXT)
-$(buildinfodir)/sasl$(INFO_EXT): $(sasl_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/sasl.texi
-sasl.dvi: $(sasl_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/sasl.texi
-sasl.pdf: $(sasl_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/sasl.texi
-sasl.html: $(sasl_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/sasl.texi
-
-sc_deps = ${srcdir}/sc.texi ${gfdl}
-sc : $(buildinfodir)/sc$(INFO_EXT)
-$(buildinfodir)/sc$(INFO_EXT): $(sc_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/sc.texi
-sc.dvi: $(sc_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/sc.texi
-sc.pdf: $(sc_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/sc.texi
-sc.html: $(sc_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/sc.texi
-
-semantic_deps = ${srcdir}/semantic.texi ${srcdir}/sem-user.texi ${gfdl}
-semantic : $(buildinfodir)/semantic$(INFO_EXT)
-$(buildinfodir)/semantic$(INFO_EXT): $(semantic_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/semantic.texi
-semantic.dvi: $(semantic_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/semantic.texi
-semantic.pdf: $(semantic_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/semantic.texi
-semantic.html: $(semantic_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/semantic.texi
-
-ses_deps = ${srcdir}/ses.texi ${gfdl}
-ses : $(buildinfodir)/ses$(INFO_EXT)
-$(buildinfodir)/ses$(INFO_EXT): $(ses_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/ses.texi
-ses.dvi: $(ses_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/ses.texi
-ses.pdf: $(ses_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/ses.texi
-ses.html: $(ses_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/ses.texi
-
-sieve_deps = ${srcdir}/sieve.texi ${gfdl}
-sieve : $(buildinfodir)/sieve$(INFO_EXT)
-$(buildinfodir)/sieve$(INFO_EXT): $(sieve_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/sieve.texi
-sieve.dvi: $(sieve_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/sieve.texi
-sieve.pdf: $(sieve_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/sieve.texi
-sieve.html: $(sieve_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/sieve.texi
-
-smtpmail_deps = ${srcdir}/smtpmail.texi ${gfdl}
-smtpmail : $(buildinfodir)/smtpmail$(INFO_EXT)
-$(buildinfodir)/smtpmail$(INFO_EXT): $(smtpmail_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/smtpmail.texi
-smtpmail.dvi: $(smtpmail_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/smtpmail.texi
-smtpmail.pdf: $(smtpmail_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/smtpmail.texi
-smtpmail.html: $(smtpmail_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/smtpmail.texi
-
-speedbar_deps = ${srcdir}/speedbar.texi ${gfdl}
-speedbar : $(buildinfodir)/speedbar$(INFO_EXT)
-$(buildinfodir)/speedbar$(INFO_EXT): $(speedbar_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/speedbar.texi
-speedbar.dvi: $(speedbar_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/speedbar.texi
-speedbar.pdf: $(speedbar_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/speedbar.texi
-speedbar.html: $(speedbar_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/speedbar.texi
-
-srecode_deps = ${srcdir}/srecode.texi ${gfdl}
-srecode : $(buildinfodir)/srecode$(INFO_EXT)
-$(buildinfodir)/srecode$(INFO_EXT): $(srecode_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/srecode.texi
-srecode.dvi: $(srecode_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/srecode.texi
-srecode.pdf: $(srecode_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/srecode.texi
-srecode.html: $(srecode_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/srecode.texi
-
-todo_mode_deps = ${srcdir}/todo-mode.texi ${gfdl}
-todo-mode : $(buildinfodir)/todo-mode$(INFO_EXT)
-$(buildinfodir)/todo-mode$(INFO_EXT): $(todo_mode_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/todo-mode.texi
-todo-mode.dvi: $(todo_mode_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/todo-mode.texi
-todo-mode.pdf: $(todo_mode_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/todo-mode.texi
-todo-mode.html: $(todo_mode_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/todo-mode.texi
-
-tramp_deps = ${srcdir}/tramp.texi ${srcdir}/trampver.texi ${gfdl}
-tramp : $(buildinfodir)/tramp$(INFO_EXT)
-$(buildinfodir)/tramp$(INFO_EXT): $(tramp_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ -D emacs ${srcdir}/tramp.texi
-tramp.dvi: $(tramp_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/tramp.texi
-tramp.pdf: $(tramp_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/tramp.texi
-tramp.html: $(tramp_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ -D emacs ${srcdir}/tramp.texi
-
-url_deps = ${srcdir}/url.texi ${gfdl}
-url : $(buildinfodir)/url$(INFO_EXT)
-$(buildinfodir)/url$(INFO_EXT): $(url_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/url.texi
-url.dvi: $(url_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/url.texi
-url.pdf: $(url_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/url.texi
-url.html: $(url_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/url.texi
-
-vip_deps = ${srcdir}/vip.texi ${gfdl}
-vip : $(buildinfodir)/vip$(INFO_EXT)
-$(buildinfodir)/vip$(INFO_EXT): $(vip_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/vip.texi
-vip.dvi: $(vip_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/vip.texi
-vip.pdf: $(vip_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/vip.texi
-vip.html: $(vip_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/vip.texi
-
-viper_deps = ${srcdir}/viper.texi ${gfdl}
-viper : $(buildinfodir)/viper$(INFO_EXT)
-$(buildinfodir)/viper$(INFO_EXT): $(viper_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/viper.texi
-viper.dvi: $(viper_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/viper.texi
-viper.pdf: $(viper_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/viper.texi
-viper.html: $(viper_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/viper.texi
-
-widget_deps = ${srcdir}/wisent.texi ${gfdl}
-widget : $(buildinfodir)/widget$(INFO_EXT)
-$(buildinfodir)/widget$(INFO_EXT): $(widget_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/widget.texi
-widget.dvi: $(widget_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/widget.texi
-widget.pdf: $(widget_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/widget.texi
-widget.html: $(widget_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/widget.texi
-
-wisent_deps = ${srcdir}/wisent.texi ${gfdl}
-wisent : $(buildinfodir)/wisent$(INFO_EXT)
-$(buildinfodir)/wisent$(INFO_EXT): $(wisent_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/wisent.texi
-wisent.dvi: $(wisent_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/wisent.texi
-wisent.pdf: $(wisent_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/wisent.texi
-wisent.html: $(wisent_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/wisent.texi
-
-woman_deps = ${srcdir}/woman.texi $(emacsdir)/emacsver.texi ${gfdl}
-woman : $(buildinfodir)/woman$(INFO_EXT)
-$(buildinfodir)/woman$(INFO_EXT): $(woman_deps)
-       $(mkinfodir)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/woman.texi
-woman.dvi: $(woman_deps)
-       $(ENVADD) $(TEXI2DVI) ${srcdir}/woman.texi
-woman.pdf: $(woman_deps)
-       $(ENVADD) $(TEXI2PDF) ${srcdir}/woman.texi
-woman.html: $(woman_deps)
-       $(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ ${srcdir}/woman.texi
-
-.PHONY: mostlyclean clean distclean maintainer-clean
+       sed -e '/@iflatex/,/@end iflatex/d' $< > gnustmppdf.texi
+       $(ENVADD) $(TEXI2PDF) gnustmppdf.texi
+       cp gnustmppdf.pdf $@
+       rm gnustmppdf.*
+
+${buildinfodir}/tramp.info tramp.html: EXTRA_OPTS = -D emacs
+${buildinfodir}/tramp.info tramp.html: ${srcdir}/trampver.texi
+
+
+.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean
 
 mostlyclean:
        rm -f *.aux *.log *.toc *.c[mp] *.c[mp]s *.fn *.fns \
          *.ky *.kys *.op *.ops *.p[gj] *.p[gj]s *.sc *.scs *.ss \
          *.t[gp] *.t[gp]s *.vr *.vrs
-       rm -f gnustmp.*
+       rm -f gnustmp*
 
 clean: mostlyclean
-       rm -f $(DVI_TARGETS) $(HTML_TARGETS) $(PDF_TARGETS) $(PS_TARGETS)
-       rm -f efaq-w32.dvi efaq-w32.html efaq-w32.pdf efaq-w32.ps
+       rm -f *.dvi *.html *.pdf *.ps
        rm -f emacs-misc-${version}.tar*
 
 distclean: clean
@@ -870,12 +229,15 @@ distclean: clean
 
 ## buildinfodir is relative to srcdir.
 infoclean:
-       cd $(buildinfodir); for file in $(INFO_TARGETS); do \
-         file=`echo $${file} | sed 's/\.info$$//'`${INFO_EXT}; \
-         rm -f $${file} $${file}-[1-9] $${file}-[1-9][0-9]; \
+       for file in $(INFO_TARGETS); do \
+         file=`echo $${file} | sed 's/\.info$$//'`.info; \
+         rm -f \
+           $(buildinfodir)/$${file} \
+           $(buildinfodir)/$${file}-[1-9] \
+           $(buildinfodir)/$${file}-[1-9][0-9]; \
        done
 
-maintainer-clean: distclean infoclean
+bootstrap-clean maintainer-clean: distclean infoclean
 
 dist:
        rm -rf emacs-misc-${version}
index e68bf055f35ff2cae46429492688fcaf783f67e7..ac39c7cab9f54f4a7a78b88e3cb68496bd61208d 100644 (file)
@@ -1,5 +1,5 @@
 \input texinfo  @c -*-texinfo-*-
-@setfilename ../../info/ada-mode
+@setfilename ../../info/ada-mode.info
 @settitle Ada Mode
 @documentencoding UTF-8
 
index 2de4cfdab7fb67c10ceff5aa0591002eaba48643..207ffc6d79b41962510d2100f7a0dd406491ef90 100644 (file)
@@ -4,7 +4,7 @@
 
 @set VERSION 0.3
 
-@setfilename ../../info/auth
+@setfilename ../../info/auth.info
 @settitle Emacs auth-source Library @value{VERSION}
 @documentencoding UTF-8
 
index 3ddeb08a306eb8a6d6c4518bd8c8d448e6949529..a2988795fc58ee9dde9c5e2390d9caf1349256d9 100644 (file)
@@ -1,7 +1,7 @@
 \input texinfo
 @c This is an annex of the Emacs manual.
 @c Author: Daniel Pfeiffer <Daniel.Pfeiffer@Informatik.START.dbp.de>
-@setfilename ../../info/autotype
+@setfilename ../../info/autotype.info
 @c @node Autotypist, Picture, Abbrevs, Top
 @c @chapter Features for Automatic Typing
 @settitle Features for Automatic Typing
index 2ac355f805f4770e1e2c8dd3c7d3f60120e38abf..28c75f8a58a74ca3ab1c1d97a9aeab50b1ea38f1 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo  @c -*-texinfo-*-
 @c %**start of header
-@setfilename ../../info/bovine
+@setfilename ../../info/bovine.info
 @set TITLE  Bovine parser development
 @set AUTHOR Eric M. Ludlam, David Ponce, and Richard Y. Kim
 @settitle @value{TITLE}
index 56aa2d04a1a07e9995b65df92511f539a20161f0..2e9d71acd4f522cfdbdeffe3712d12c7a2b1bb23 100644 (file)
@@ -1,7 +1,7 @@
 \input texinfo                  @c -*-texinfo-*-
 @comment %**start of header (This is for running Texinfo on a region.)
 @c smallbook
-@setfilename ../../info/calc
+@setfilename ../../info/calc.info
 @c [title]
 @settitle GNU Emacs Calc Manual
 @documentencoding UTF-8
index cbb49e00efaa433b05ad3a4fea9dae5b56f6b735..74e34854417870a31fc480603b99c7c9bf8e725f 100644 (file)
@@ -81,7 +81,7 @@ the second with them pointing to the XEmacs manuals.
 @comment No overfull hbox marks in the dvi file.
 @finalout
 
-@setfilename  ../../info/ccmode
+@setfilename  ../../info/ccmode.info
 @settitle     CC Mode Manual
 @documentencoding UTF-8
 @footnotestyle end
index 4eb8508fd3c907df300a1e679f1b7ba4700f9177..c15918afc4e2ad7d3f43adff97b5f047460be25a 100644 (file)
@@ -1,5 +1,5 @@
 \input texinfo    @c -*-texinfo-*-
-@setfilename ../../info/cl
+@setfilename ../../info/cl.info
 @settitle Common Lisp Extensions
 @documentencoding UTF-8
 @include emacsver.texi
@@ -2627,10 +2627,10 @@ In this package, @code{cl-locally} is no different from @code{progn}.
 @end defmac
 
 @defmac cl-the type form
-Type information provided by @code{cl-the} is ignored in this package;
-in other words, @code{(cl-the @var{type} @var{form})} is equivalent to
-@var{form}.  Future byte-compiler optimizations may make use of this
-information.
+@code{cl-the} returns the value of @code{form}, first checking (if
+optimization settings permit) that it is of type @code{type}.  Future
+byte-compiler optimizations may also make use of this information to
+improve runtime efficiency.
 
 For example, @code{mapcar} can map over both lists and arrays.  It is
 hard for the compiler to expand @code{mapcar} into an in-line loop
@@ -2929,6 +2929,12 @@ This predicate tests whether @var{integer} is even.  It is an
 error if the argument is not an integer.
 @end defun
 
+@defun cl-digit-char-p char radix
+Test if @var{char} is a digit in the specified @var{radix} (default is
+10).  If true return the decimal value of digit @var{char} in
+@var{radix}.
+@end defun
+
 @node Numerical Functions
 @section Numerical Functions
 
@@ -3011,6 +3017,15 @@ This function returns the same value as the second return value
 of @code{cl-truncate}.
 @end defun
 
+@defun cl-parse-integer string &key start end radix junk-allowed
+This function implements the Common Lisp @code{parse-integer}
+function.  It parses an integer in the specified @var{radix} from the
+substring of @var{string} between @var{start} and @var{end}.  Any
+leading and trailing whitespace chars are ignored. It signals an error
+if the substring between @var{start} and @var{end} cannot be parsed as
+an integer unless @var{junk-allowed} is non-nil.
+@end defun
+
 @node Random Numbers
 @section Random Numbers
 
@@ -3679,10 +3694,8 @@ This function is a synonym for @code{(cdr @var{x})}.
 @end defun
 
 @defun cl-endp x
-Common Lisp defines this function to act like @code{null}, but
-signaling an error if @code{x} is neither a @code{nil} nor a
-cons cell.  This package simply defines @code{cl-endp} as a synonym
-for @code{null}.
+This function acts like @code{null}, but signals an error if @code{x}
+is neither a @code{nil} nor a cons cell.
 @end defun
 
 @defun cl-list-length x
@@ -4247,6 +4260,40 @@ of the included type and the first new slot.
 Except as noted, the @code{cl-defstruct} facility of this package is
 entirely compatible with that of Common Lisp.
 
+The @code{cl-defstruct} package also provides a few structure
+introspection functions.
+
+@defun cl-struct-sequence-type struct-type
+This function returns the underlying data structure for
+@code{struct-type}, which is a symbol.  It returns @code{vector} or
+@code{list}, or @code{nil} if @code{struct-type} is not actually a
+structure.
+@end defun
+
+@defun cl-struct-slot-info struct-type
+This function returns a list of slot descriptors for structure
+@code{struct-type}.  Each entry in the list is @code{(name . opts)},
+where @code{name} is the name of the slot and @code{opts} is the list
+of slot options given to @code{defstruct}.  Dummy entries represent
+the slots used for the struct name and that are skipped to implement
+@code{:initial-offset}.
+@end defun
+
+@defun cl-struct-slot-offset struct-type slot-name
+Return the offset of slot @code{slot-name} in @code{struct-type}.  The
+returned zero-based slot index is relative to the start of the
+structure data type and is adjusted for any structure name and
+:initial-offset slots.  Signal error if struct @code{struct-type} does
+not contain @code{slot-name}.
+@end defun
+
+@defun cl-struct-slot-value struct-type slot-name inst
+Return the value of slot @code{slot-name} in @code{inst} of
+@code{struct-type}.  @code{struct} and @code{slot-name} are symbols.
+@code{inst} is a structure instance.  This routine is also a
+@code{setf} place.  Can signal the same errors as @code{cl-struct-slot-offset}.
+@end defun
+
 @node Assertions
 @chapter Assertions and Errors
 
@@ -4415,12 +4462,11 @@ supposed to arise in complying programs; implementations are strongly
 encouraged but not required to signal an error in these situations.
 This package sometimes omits such error checking in the interest of
 compactness and efficiency.  For example, @code{cl-do} variable
-specifiers are supposed to be lists of one, two, or three forms;
-extra forms are ignored by this package rather than signaling a
-syntax error.  The @code{cl-endp} function is simply a synonym for
-@code{null} in this package.  Functions taking keyword arguments
-will accept an odd number of arguments, treating the trailing
-keyword as if it were followed by the value @code{nil}.
+specifiers are supposed to be lists of one, two, or three forms; extra
+forms are ignored by this package rather than signaling a syntax
+error.  Functions taking keyword arguments will accept an odd number
+of arguments, treating the trailing keyword as if it were followed by
+the value @code{nil}.
 
 Argument lists (as processed by @code{cl-defun} and friends)
 @emph{are} checked rigorously except for the minor point just
@@ -4661,9 +4707,8 @@ exactly the same thing, so this package has not bothered to
 implement a Common Lisp-style @code{make-list}.
 
 @item
-A few more notable Common Lisp features not included in this
-package:  @code{compiler-let}, @code{tagbody}, @code{prog},
-@code{ldb/dpb}, @code{parse-integer}, @code{cerror}.
+A few more notable Common Lisp features not included in this package:
+@code{compiler-let}, @code{prog}, @code{ldb/dpb}, @code{cerror}.
 
 @item
 Recursion.  While recursion works in Emacs Lisp just like it
index 4c63ecddb7d63741ed5c453a7804429665b73b8b..0c19cb963e700ffb0998a5a098c402f2d6955c1f 100644 (file)
@@ -1,5 +1,5 @@
 \input texinfo   @c -*-texinfo-*-
-@setfilename ../../info/dbus
+@setfilename ../../info/dbus.info
 @c %**start of header
 @settitle Using of D-Bus
 @documentencoding UTF-8
index fe40c5e300fb9f3b6d9fea5be8ca2b9023540b0b..1eb512b7372743d4422e5af071467409739cd9c9 100644 (file)
@@ -7,7 +7,7 @@
 @c [Dodd's address no longer valid.]
 
 @comment %**start of header (This is for running Texinfo on a region.)
-@setfilename ../../info/dired-x
+@setfilename ../../info/dired-x.info
 @settitle Dired Extra User's Manual
 @documentencoding UTF-8
 
index 9ff3e28e99df0b3427291f2bc876230244a4819d..bbb94fe465680a32d6b819c3db48c28af2a93c07 100644 (file)
@@ -1,7 +1,7 @@
 \input texinfo   @c -*-texinfo-*-
 
 @comment %**start of header
-@setfilename ../../info/ebrowse
+@setfilename ../../info/ebrowse.info
 @settitle A Class Browser for C++
 @documentencoding UTF-8
 @setchapternewpage odd
index 89e576b8c25024fa6376afb52d2e70ac6799f56e..c61a32c4f0a7e4a26be30397e3add8d585604312 100644 (file)
@@ -1,5 +1,5 @@
 \input texinfo
-@setfilename ../../info/ede
+@setfilename ../../info/ede.info
 @settitle Emacs Development Environment
 @documentencoding UTF-8
 
index ea4bcc8f5b92d62ff3c744cc23d512ae97262fc0..4e1806de94d69652f92fcd295b31d78cbc2137f2 100644 (file)
@@ -7,7 +7,7 @@
 @comment Using ediff.info instead of ediff in setfilename breaks DOS.
 @comment @setfilename ediff
 @comment @setfilename ediff.info
-@setfilename ../../info/ediff
+@setfilename ../../info/ediff.info
 
 @settitle Ediff User's Manual
 @documentencoding UTF-8
@@ -350,8 +350,7 @@ All the above functions use the POSIX @code{diff} or @code{diff3} programs
 to find differences between two files.  They process the @code{diff} output
 and display it in a convenient form.  At present, Ediff understands only
 the plain output from diff.  Options such as @samp{-c} are not supported,
-nor is the format produced by incompatible file comparison programs such as
-the VMS version of @code{diff}.
+nor is the format produced by incompatible file comparison programs.
 
 The functions @code{ediff-files}, @code{ediff-buffers},
 @code{ediff-files3}, @code{ediff-buffers3} first display the coarse,
@@ -1945,11 +1944,6 @@ Specifies the default directory to look for patches.
 
 @end table
 
-@noindent
-@strong{Warning:} Ediff does not support the output format of VMS
-@code{diff}.  Instead, make sure you are using some implementation of POSIX
-@code{diff}, such as @code{gnudiff}.
-
 @node Merging and diff3
 @section Merging and diff3
 
index 6e066220020c30de0973cd23a89f6e2a55e7abe2..17057526d2e854a92c1cefcc396ab0037a7bdbb7 100644 (file)
@@ -1,5 +1,5 @@
 \input texinfo
-@setfilename ../../info/edt
+@setfilename ../../info/edt.info
 @settitle EDT Emulation for Emacs
 @documentencoding UTF-8
 
index c59f7547d8d63bfeee5905afedf8c476495c1a11..f7086b6d3a9cb132b3b2b62876b853ef8272db55 100644 (file)
@@ -1,5 +1,5 @@
 \input texinfo    @c -*-coding:utf-8 -*-
-@setfilename efaq-w32
+@setfilename ../../info/efaq-w32.info
 @settitle GNU Emacs FAQ For MS Windows
 @setchapternewpage odd
 @syncodeindex pg cp
index c320b8b6c080a50506a75677be9e223724272a50..f048f75372c650bf30f6682e1c73cf9542cf1ac5 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo   @c -*- mode: texinfo; -*-
 @c %**start of header
-@setfilename ../../info/efaq
+@setfilename ../../info/efaq.info
 @settitle GNU Emacs FAQ
 @documentencoding UTF-8
 @c %**end of header
@@ -861,7 +861,6 @@ You can get Tkinfo at
 @cindex Files included with Emacs
 @cindex @file{COPYING}, description of file
 @cindex @file{DISTRIB}, description of file
-@cindex @file{GNU}, description of file
 @cindex @file{MACHINES}, description of file
 @cindex @file{NEWS}, description of file
 
@@ -883,9 +882,6 @@ GNU General Public License
 @item DISTRIB
 Emacs Availability Information
 
-@item GNU
-The GNU Manifesto
-
 @item MACHINES
 Status of Emacs on Various Machines and Systems
 
@@ -3268,8 +3264,8 @@ archive sites that make GNU software available.
 
 First of all, you should check to make sure that the package isn't
 already available.  For example, typing @kbd{M-x apropos @key{RET}
-wordstar @key{RET}} lists all functions and variables containing the
-string @samp{wordstar}.
+python @key{RET}} lists all functions and variables containing the
+string @samp{python}.
 
 It is also possible that the package is on your system, but has not been
 loaded.  To see which packages are available for loading, look through
index 937fae26907482345c3c38744a91bfe51f1d422d..8f93300e24a8100c73f3e87a109bf411c171b2ca 100644 (file)
@@ -1,5 +1,5 @@
 \input texinfo
-@setfilename ../../info/eieio
+@setfilename ../../info/eieio.info
 @set TITLE Enhanced Implementation of Emacs Interpreted Objects
 @set AUTHOR Eric M. Ludlam
 @settitle @value{TITLE}
index bc054ac76b0dc4ab0d0cadfba47598c53796a6b9..8eb5298010f3b3fa60b296b600f8ca6c8da8c33e 100644 (file)
@@ -2,7 +2,7 @@
 
 @set VERSION 0.3
 
-@setfilename ../../info/emacs-gnutls
+@setfilename ../../info/emacs-gnutls.info
 @settitle Emacs GnuTLS Integration @value{VERSION}
 @documentencoding UTF-8
 
index 19cdd43882e74a68563e1d8ebb87fe85bbe64b87..36ea0b2cac62ab84d80ae7c692bcf6305f5da3cd 100644 (file)
@@ -2,7 +2,7 @@
 
 @include gnus-overrides.texi
 
-@setfilename ../../info/emacs-mime
+@setfilename ../../info/emacs-mime.info
 @settitle Emacs MIME Manual
 @synindex fn cp
 @synindex vr cp
@@ -405,7 +405,7 @@ variable will cause @samp{text/html} parts to be treated as attachments.
 @item mm-text-html-renderer
 @vindex mm-text-html-renderer
 This selects the function used to render @acronym{HTML}.  The predefined
-renderers are selected by the symbols @code{gnus-article-html}, @code{w3},
+renderers are selected by the symbols @code{gnus-article-html},
 @code{w3m}@footnote{See @uref{http://emacs-w3m.namazu.org/} for more
 information about emacs-w3m}, @code{links}, @code{lynx},
 @code{w3m-standalone} or @code{html2text}.  If @code{nil} use an
@@ -418,11 +418,11 @@ Some @acronym{HTML} mails might have the trick of spammers using
 @samp{<img>} tags.  It is likely to be intended to verify whether you
 have read the mail.  You can prevent your personal information from
 leaking by setting this option to @code{nil} (which is the default).
-It is currently ignored by Emacs/w3.  For emacs-w3m, you may use the
-command @kbd{t} on the image anchor to show an image even if it is
-@code{nil}.@footnote{The command @kbd{T} will load all images.  If you
-have set the option @code{w3m-key-binding} to @code{info}, use @kbd{i}
-or @kbd{I} instead.}
+For emacs-w3m, you may use the command @kbd{t} on the image anchor to
+show an image even if it is @code{nil}.@footnote{The command @kbd{T}
+will load all images.  If you have set the option
+@code{w3m-key-binding} to @code{info}, use @kbd{i} or @kbd{I}
+instead.}
 
 @item mm-w3m-safe-url-regexp
 @vindex mm-w3m-safe-url-regexp
@@ -648,6 +648,12 @@ The @acronym{MIME} type of the part (@code{Content-Type}).
 Use the contents of the file in the body of the part
 (@code{Content-Disposition}).
 
+@item recipient-filename
+Use this as the file name in the generated @acronym{MIME} message for
+the recipient.  That is, even if the file is called @file{foo.txt}
+locally, use this name instead in the @code{Content-Disposition} in
+the sent message.
+
 @item charset
 The contents of the body of the part are to be encoded in the character
 set specified (@code{Content-Type}). @xref{Charset Translation}.
index 0632e735df02f8778b75b58f68ac9bd2ff863651..8ee683e09517da56689efbe71849c32ec29b8ced 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo                  @c -*- mode: texinfo -*-
 @c %**start of header
-@setfilename ../../info/epa
+@setfilename ../../info/epa.info
 @settitle EasyPG Assistant User's Manual
 @documentencoding UTF-8
 @c %**end of header
index 4cb5eaed60459e55065024350521d929f4696821..bcdae1e84db3fdf0a8df4e1ec54f98eabce39ff1 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo
 @c %**start of header
-@setfilename ../../info/erc
+@setfilename ../../info/erc.info
 @settitle ERC Manual
 @syncodeindex fn cp
 @include emacsver.texi
@@ -588,6 +588,16 @@ In the latter case, if the first nick in the list is already in use,
 other nicks are tried in the list order.
 @end defopt
 
+@defopt erc-format-nick-function
+A function to format a nickname for message display
+
+You can set this to @code{erc-format-@@nick} to display user mode prefix
+@end defopt
+
+@example
+(setq erc-format-nick-function 'erc-format-@@nick)
+@end example
+
 @defopt erc-nick-uniquifier
 The string to append to the nick if it is already in use.
 @end defopt
@@ -661,7 +671,8 @@ your Emacs configuration file.  Everything after the @code{(require
 ;; using the version of ERC that comes with Emacs
 (add-to-list 'load-path "~/elisp/erc")
 
-;; Load ERC
+;; Load ERC -- again, you don't need this if you are using the version
+;; of ERC that comes with Emacs
 (require 'erc)
 
 ;; Load authentication info from an external source.  Put sensitive
@@ -712,6 +723,12 @@ stuff, to the current ERC buffer."
 ;; Join the #emacs and #erc channels whenever connecting to Freenode.
 (setq erc-autojoin-channels-alist '(("freenode.net" "#emacs" "#erc")))
 
+;; Rename server buffers to reflect the current network name instead
+;; of IP:PORT. (e.g. "freenode" instead of "84.240.3.129:6667"). This
+;; is useful when using a bouncer like ZNC where you have multiple
+;; connections to the same server.
+(setq erc-rename-buffers t)
+
 ;; Interpret mIRC-style color commands in IRC chats
 (setq erc-interpret-mirc-color t)
 
@@ -750,6 +767,14 @@ lurkers.  The function @code{erc-lurker-p} determines whether a given
 nickname is considered a lurker.
 @end defopt
 
+@defopt erc-rename-buffers
+If non, @code{nil}, this will rename server buffers to reflect the
+current network name instead of IP:PORT
+
+@example
+(setq erc-rename-buffers t)
+@end example
+@end defopt
 
 @node Getting Help and Reporting Bugs
 @chapter Getting Help and Reporting Bugs
index ec1614c714096179fda638f0acfeb9724e5474c1..9f29c2529c6708589c9611be10ad21512a37f78a 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo
 @c %**start of header
-@setfilename ../../info/ert
+@setfilename ../../info/ert.info
 @settitle Emacs Lisp Regression Testing
 @documentencoding UTF-8
 @c %**end of header
index e7c3c71afd886adbd88eb39666f7abbd586b8174..e77e6906b06fc2f3c7054a72100005b140c4287e 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo  @c -*-texinfo-*-
 @c %**start of header
-@setfilename ../../info/eshell
+@setfilename ../../info/eshell.info
 @settitle Eshell: The Emacs Shell
 @defindex cm
 @synindex vr fn
index a54a37a72e68ab5d3a83e48f6f767f06f3e165c3..086e7416a24aad1f18751d45feeab18c5888d725 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo.tex
 @c %**start of header
-@setfilename ../../info/eudc
+@setfilename ../../info/eudc.info
 @settitle Emacs Unified Directory Client (EUDC) Manual
 @afourpaper
 @documentencoding UTF-8
index 827c35f02ef4bdfeb22ff59105ef14e1d394e7c1..c22a41e451c638463e30971e8867479f2e10e873 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo @c -*-texinfo-*-
 @c %**start of header
-@setfilename ../../info/eww
+@setfilename ../../info/eww.info
 @settitle Emacs Web Wowser
 @documentencoding UTF-8
 @c %**end of header
index 761056a69a50f503edca563f58fc424e2c902aea..7bd8fd1338d928a3cbcf5de68ce9a81e84172c40 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo   @c -*-texinfo-*-
 @comment %**start of header
-@setfilename ../../info/flymake
+@setfilename ../../info/flymake.info
 @set VERSION 0.3
 @set UPDATED April 2004
 @settitle GNU Flymake @value{VERSION}
index 8ea470d2da8f018ec3eba69ed45dc263dd2702ec..ea7999a023f6ae2889addca9596280900bbdd635 100644 (file)
@@ -3,7 +3,7 @@
 @c Written by Johan Vromans, and edited by Richard Stallman
 
 @comment %**start of header (This is for running Texinfo on a region.)
-@setfilename ../../info/forms
+@setfilename ../../info/forms.info
 @settitle Forms Mode User's Manual
 @syncodeindex vr cp
 @syncodeindex fn cp
index 44cc29b9c3938bb4e79b5061dc52ea8780378995..0b2b063275da993bd7902a22a598c903f8142178 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo
 
-@setfilename gnus-coding
+@setfilename gnus-coding.info
 @settitle Gnus Coding Style and Maintenance Guide
 @documentencoding UTF-8
 @syncodeindex fn cp
index 7bb89fdf0294720e3647ac3d7fd7b2391a2c1f14..fd4f427431df16614fa150fcc421bf6a04f042c0 100644 (file)
@@ -723,7 +723,7 @@ POP3 mail source.  See @pxref{Mail Source Specifiers} for VALUE.
                 the top of the article buffer?
 * FAQ 4-6::     I'd like Gnus NOT to render HTML-mails but show me the
                 text part if it's available. How to do it?
-* FAQ 4-7::     Can I use some other browser than w3 to render my
+* FAQ 4-7::     Can I use some other browser than shr to render my
                 HTML-mails?
 * FAQ 4-8::     Is there anything I can do to make poorly formatted
                 mails more readable?
@@ -868,12 +868,12 @@ too.
 @node FAQ 4-7
 @subsubheading Question 4.7
 
-Can I use some other browser than w3 to render my HTML-mails?
+Can I use some other browser than w3m to render my HTML-mails?
 
 @subsubheading Answer
 
 Only if you use Gnus 5.10 or younger. In this case you've got the
-choice between w3, w3m, links, lynx and html2text, which
+choice between shr, w3m, links, lynx and html2text, which
 one is used can be specified in the variable
 mm-text-html-renderer, so if you want links to render your
 mail say
index 8f1550942e968846a7469fafdde1dbaf33c9b16a..a25d7c540f3dfa590d9a52a67a7ea489ea34fdfb 100644 (file)
@@ -2,7 +2,7 @@
 
 @include gnus-overrides.texi
 
-@setfilename ../../info/gnus
+@setfilename ../../info/gnus.info
 @settitle Gnus Manual
 @syncodeindex fn cp
 @syncodeindex vr cp
@@ -704,7 +704,6 @@ Browsing the Web
 * Archiving Mail::
 * Web Searches::                Creating groups from articles that match a string.
 * RSS::                         Reading RDF site summary.
-* Customizing W3::              Doing stuff to Emacs/W3 from Gnus.
 
 Other Sources
 
@@ -2881,12 +2880,17 @@ news group.
 @item gcc-self
 @cindex gcc-self
 If @code{(gcc-self . t)} is present in the group parameter list, newly
-composed messages will be @code{Gcc}'d to the current group.  If
+composed messages will be @code{gcc}d to the current group.  If
 @code{(gcc-self . none)} is present, no @code{Gcc:} header will be
-generated, if @code{(gcc-self . "string")} is present, this string will
-be inserted literally as a @code{gcc} header.  This parameter takes
-precedence over any default @code{Gcc} rules as described later
-(@pxref{Archived Messages}), with the exception for messages to resend.
+generated, if @code{(gcc-self . "group")} is present, this string will
+be inserted literally as a @code{Gcc:} header.  It should be a group
+name.  The @code{gcc-self} value may also be a list of strings and
+@code{t}, e.g., @code{(gcc-self "group1" "group2" t)} means to
+@code{gcc} the newly composed message into the groups @code{"group1"}
+and @code{"group2"}, and into the current group.  The @code{gcc-self}
+parameter takes precedence over any default @code{Gcc} rules as
+described later (@pxref{Archived Messages}), with the exception for
+messages to resend.
 
 @strong{Caveat}: Adding @code{(gcc-self . t)} to the parameter list of
 @code{nntp} groups (or the like) isn't valid.  An @code{nntp} server
@@ -9140,9 +9144,6 @@ Use Gnus simple html renderer.
 @item gnus-w3m
 Use Gnus rendered based on w3m.
 
-@item w3
-Use Emacs/W3.
-
 @item w3m
 Use @uref{http://emacs-w3m.namazu.org/, emacs-w3m}.
 
@@ -9805,6 +9806,19 @@ Make all the @acronym{MIME} parts have buttons in front of them.  This is
 mostly useful if you wish to save (or perform other actions) on inlined
 parts.
 
+@item W M h
+@kindex W M h (Summary)
+@findex gnus-mime-buttonize-attachments-in-header
+@vindex gnus-mime-display-attachment-buttons-in-header
+Display @acronym{MIME} part buttons in the end of the header of an
+article (@code{gnus-mime-buttonize-attachments-in-header}).  This
+command toggles the display.  Note that buttons to be added to the
+header are only the ones that aren't inlined in the body.  If you want
+those buttons always to be displayed, set
+@code{gnus-mime-display-attachment-buttons-in-header} to non-@code{nil}.
+The default is @code{t}.  To change the appearance of buttons, customize
+@code{gnus-header-face-alist}.
+
 @item K m
 @kindex K m (Summary)
 @findex gnus-summary-repair-multipart
@@ -12804,10 +12818,12 @@ variable, which is a vector of the following headers: number subject
 from date id references chars lines xref extra.
 
 In the case of a string value, if the @code{match} is a regular
-expression, a @samp{gnus-match-substitute-replacement} is proceed on
-the value to replace the positional parameters @samp{\@var{n}} by the
-corresponding parenthetical matches (see @xref{Replacing Match,,
-Replacing the Text that Matched, elisp, The Emacs Lisp Reference Manual}.)
+expression, or if it takes the form @code{(header @var{match}
+@var{regexp})}, a @samp{gnus-match-substitute-replacement} is proceed
+on the value to replace the positional parameters @samp{\@var{n}} by
+the corresponding parenthetical matches (see @xref{Replacing Match,,
+Replacing the Text that Matched, elisp, The Emacs Lisp Reference
+Manual}.)
 
 @vindex message-reply-headers
 
@@ -12839,6 +12855,10 @@ So here's a new example:
         ;; @r{If I'm replying to Larsi, set the Organization header.}
         ((header "from" "larsi.*org")
          (Organization "Somewhere, Inc."))
+        ;; @r{Reply to a message from the same subaddress the message}
+        ;; @r{was sent to.}
+        ((header "x-original-to" "me\\(\\+.+\\)@@example.org")
+         (address "me\\1@@example.org"))
         ((posting-from-work-p) ;; @r{A user defined function}
          (signature-file "~/.work-signature")
          (address "user@@bar.foo")
@@ -16841,12 +16861,8 @@ interfaces to these sources.
 * Archiving Mail::
 * Web Searches::                Creating groups from articles that match a string.
 * RSS::                         Reading RDF site summary.
-* Customizing W3::              Doing stuff to Emacs/W3 from Gnus.
 @end menu
 
-All the web sources require Emacs/W3 and the url library or those
-alternatives to work.
-
 The main caveat with all these web sources is that they probably won't
 work for a very long time.  Gleaning information from the @acronym{HTML} data
 is guesswork at best, and when the layout is altered, the Gnus back end
@@ -16922,10 +16938,6 @@ make money off of advertisements, not to provide services to the
 community.  Since @code{nnweb} washes the ads off all the articles, one
 might think that the providers might be somewhat miffed.  We'll see.
 
-You must have the @code{url} and @code{W3} package or those alternatives
-(try @code{customize-group} on the @samp{mm-url} variable group)
-installed to be able to use @code{nnweb}.
-
 Virtual server variables:
 
 @table @code
@@ -17123,38 +17135,6 @@ Parameters}) in order to display @samp{text/html} parts only in
 @end lisp
 
 
-@node Customizing W3
-@subsection Customizing W3
-@cindex W3
-@cindex html
-@cindex url
-@cindex Netscape
-
-Gnus uses the url library to fetch web pages and Emacs/W3 (or those
-alternatives) to display web pages.  Emacs/W3 is documented in its own
-manual, but there are some things that may be more relevant for Gnus
-users.
-
-For instance, a common question is how to make Emacs/W3 follow links
-using the @code{browse-url} functions (which will call some external web
-browser like Netscape).  Here's one way:
-
-@lisp
-(eval-after-load "w3"
-  '(progn
-    (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
-    (defun w3-fetch (&optional url target)
-      (interactive (list (w3-read-url-with-default)))
-      (if (eq major-mode 'gnus-article-mode)
-          (browse-url url)
-        (w3-fetch-orig url target)))))
-@end lisp
-
-Put that in your @file{.emacs} file, and hitting links in W3-rendered
-@acronym{HTML} in the Gnus article buffers will use @code{browse-url} to
-follow the link.
-
-
 @node Other Sources
 @section Other Sources
 
@@ -26339,7 +26319,7 @@ XEmacs is distributed as a collection of packages.  You should install
 whatever packages the Gnus XEmacs package requires.  The current
 requirements are @samp{gnus}, @samp{mail-lib}, @samp{xemacs-base},
 @samp{eterm}, @samp{sh-script}, @samp{net-utils}, @samp{os-utils},
-@samp{dired}, @samp{mh-e}, @samp{sieve}, @samp{ps-print}, @samp{W3},
+@samp{dired}, @samp{mh-e}, @samp{sieve}, @samp{ps-print},
 @samp{pgg}, @samp{mailcrypt}, @samp{ecrypto}, and @samp{sasl}.
 
 
@@ -28416,6 +28396,19 @@ New features in Ma Gnus:
 
 @itemize @bullet
 
+@item Changes in summary and article mode
+@c **************************************
+
+@itemize @bullet
+
+@item
+By default, @acronym{MIME} part buttons for attachments (if any) will
+appear in the end of the article header in addition to the bottom of the
+article body, so you can easily find them without scrolling the article
+again and again.  @xref{MIME Commands}.
+
+@end itemize
+
 @item Changes in Message mode and related Gnus features
 @c ****************************************************
 
index d31a087be2a912bfb7824ad7e0e28be20409d00b..5bf0449504bbc9c52f0c028c986e519f919c9bbd 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo
 @comment %**start of header
-@setfilename ../../info/htmlfontify
+@setfilename ../../info/htmlfontify.info
 @settitle Htmlfontify User Manual
 @exampleindent 2
 @documentencoding UTF-8
index b1ed47ed7b74b92b31303dc7db951ca75558eb4e..5c1c8ba350fbe4f1b7201045d42a6d18ec0bcaae 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo  @c -*-texinfo-*-
 @c %**start of header
-@setfilename ../../info/idlwave
+@setfilename ../../info/idlwave.info
 @settitle IDLWAVE User Manual
 @synindex ky cp
 @syncodeindex vr cp
index 0a94a19df84ded4a3c3f88559737bd82853111ec..82acadae2e19d0addaeeee97702f5ed6c9b92ded 100644 (file)
@@ -1,5 +1,5 @@
 \input texinfo    @c -*-texinfo-*-
-@setfilename ../../info/ido
+@setfilename ../../info/ido.info
 @settitle Interactive Do
 @documentencoding UTF-8
 @include emacsver.texi
index f20582659ba87e3b654ee03a87cbf08fdc30207b..42e7c2bb934856a6d461f4c1a295f59c800e4b9c 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo.tex
 
-@setfilename ../../info/mairix-el
+@setfilename ../../info/mairix-el.info
 @settitle Emacs Interface for Mairix
 
 @documentencoding UTF-8
index 7421360211ca3f476a638e44c506a3c8c9ce45af..792aa4e9ea9e088bfc6f9f53c672801735c8aaa5 100644 (file)
@@ -2,7 +2,7 @@
 
 @include gnus-overrides.texi
 
-@setfilename ../../info/message
+@setfilename ../../info/message.info
 @settitle Message Manual
 @documentencoding UTF-8
 @synindex fn cp
@@ -310,7 +310,13 @@ news.
 @table @code
 @item message-forward-ignored-headers
 @vindex message-forward-ignored-headers
-All headers that match this regexp will be deleted when forwarding a message.
+In non-@code{nil}, all headers that match this regexp will be deleted
+when forwarding a message.
+
+@item message-forward-included-headers
+@vindex message-forward-included-headers
+In non-@code{nil}, only headers that match this regexp will be kept
+when forwarding a message.
 
 @item message-make-forward-subject-function
 @vindex message-make-forward-subject-function
index b4538f89db59f11a0b3f582b2f642b869f9859f4..6b64a108af5101af12d203a53cb3c5d5758e8e6c 100644 (file)
@@ -3,7 +3,7 @@
 @c Note: This document requires makeinfo version 4.6 or greater to build.
 @c
 @c %**start of header
-@setfilename ../../info/mh-e
+@setfilename ../../info/mh-e.info
 @settitle The MH-E Manual
 @documentencoding UTF-8
 @c %**end of header
index f51d954948f19c3360c6b979bd458a708145bed7..bef63c0a1dd7e4267a5f0b6c8424ff3962fc6cac 100644 (file)
@@ -1,8 +1,8 @@
 \input texinfo   @c -*-texinfo-*-
 @comment %**start of header
-@setfilename ../../info/newsticker
-@set VERSION 1.99
-@set UPDATED June 2008
+@setfilename ../../info/newsticker.info
+@include emacsver.texi
+@set VERSION @value{EMACSVER}
 @settitle Newsticker @value{VERSION}
 @syncodeindex vr cp
 @syncodeindex fn cp
@@ -11,7 +11,8 @@
 @comment %**end of header
 
 @copying
-This manual is for Newsticker (version @value{VERSION}, @value{UPDATED}).
+This manual documents Newsticker, a feed reader for Emacs.  It
+corresponds to Emacs version @value{EMACSVER}.
 
 @noindent
 Copyright @copyright{} 2004--2014 Free Software Foundation, Inc.
@@ -31,12 +32,11 @@ modify this GNU manual.''
 
 @dircategory Emacs network features
 @direntry
-* Newsticker: (newsticker).     A Newsticker for Emacs.
+* Newsticker: (newsticker).     A feed reader for Emacs.
 @end direntry
 
 @titlepage
-@title Newsticker---a Newsticker for Emacs
-@subtitle for version @value{VERSION}, @value{UPDATED}
+@title Newsticker---a feed reader for Emacs
 @author Ulf Jasper
 @author @email{ulf.jasper@@web.de}
 @author @uref{http://ulf.epplejasper.de/}
@@ -56,136 +56,419 @@ modify this GNU manual.''
 @end ifnottex
 
 @menu
-* Overview::        General description of newsticker.
-* Requirements::    Requirements for using newsticker.
-* Installation::    Installing newsticker on your system.
-* Usage::           Basic newsticker instructions.
-* Configuration::   Customizable newsticker settings.
-* Remarks::         Remarks about newsticker.
+* Overview::             What is Newsticker?
+* Installation::         Things to do before starting Newsticker the first time.
+* Retrieving News::      How Newsticker fetches headlines.
+* Headline Management::  How Newsticker stores headlines.
+* Reading News::         How to read RSS and Atom feeds with Newsticker.
+* Automatic Processing:: Automatically process news items.
+* Configuration::        Customize Newsticker to your liking.
+* Supported Formats::    RSS and Atom formats supported by Newsticker.
+
 * GNU Free Documentation License:: The license for this documentation.
-* Index::           Variable, function, and concept index.
+* Index::                          Variable, function, and concept index.
 @end menu
 
 @node Overview
 @chapter Overview
 
-Newsticker provides a newsticker for Emacs.  A newsticker is a thing
-that asynchronously retrieves headlines from a list of news sites,
-prepares these headlines for reading, and allows for loading the
-corresponding articles in a web browser.
+Newsticker provides a @b{Feed Reader} for Emacs.  It retrieves
+headlines from a list of news sites, processes them, and provides
+frontends for reading and managing them. (Standard headline formats
+are RSS and Atom which makes Newsticker an ``RSS Reader'', ``Atom
+Reader'' or ``Feed Aggregator''.)
 
+Headlines (or news items) consist of a title, (mostly) a description,
+and a link to the full story. The description may be a brief summary
+in plain text or a full HTML-formatted article.  A headline may carry
+enclosed data such as images, audio or video files, typically in the
+case of so ``podcast feeds''.
 
-Headlines consist of a title and (possibly) a small description.  They
-are contained in ``RSS'' (RDF Site Summary) or ``Atom'' files.  Newsticker
-works with the following RSS formats:
+Newsticker downloads headlines asynchronously at configurable times,
+processes and stores them so that you can read them later.  The list
+of subscribed feeds, the headline processing, the presentation of the
+headlines and almost all other aspects of Newsticker can be
+customized to your liking.
 
-@itemize
-@item RSS 0.91 (see @uref{http://backend.userland.com/rss091} or
-@uref{http://my.netscape.com/publish/formats/rss-spec-0.91.html}),
-@item RSS 0.92 (see @uref{http://backend.userland.com/rss092}),
-@item RSS 1.0 (see @uref{http://purl.org/rss/1.0/spec}
-@item RSS 2.0 (see @uref{http://blogs.law.harvard.edu/tech/rss}),
-@end itemize
-@itemize
-as well as the following Atom formats:
-@item Atom 0.3
-@item Atom 1.0 (see
-@uref{https://datatracker.ietf.org/doc/rfc4287/}).
-@end itemize
+@node Installation
+@chapter Installation
 
-That makes Newsticker.el an ``Atom aggregator'', ``RSS reader'', ``Feed
-aggregator'', or ``Feed reader''.
+As Newsticker is part of GNU Emacs there is no need to perform any
+installation steps in order to use it.
 
-Newsticker provides several commands for reading headlines, navigating
-through them, marking them as read/unread, hiding old headlines etc.
-Headlines can be displayed as plain text or as rendered HTML.
+Newsticker is highly customizable. All options have reasonable default
+values, so that (in most cases) it is not necessary to customize
+anything before you start Newsticker for the first time.
 
-Headlines can be displayed in the echo area, either scrolling like
-messages in a stock-quote ticker, or just changing.
-
-Newsticker allows for automatic processing of headlines by providing
-hooks and (sample) functions for automatically downloading images and
-enclosed files (as delivered by, e.g., podcasts).
-
-@ignore
-@ifhtml
-Here are screen shots of the @uref{newsticker-1.7.png, version 1.7
-(current version)} and some older screen shots:
-@uref{newsticker-1.6.png, version 1.6},
-@uref{newsticker-1.5.png, version 1.5},
-@uref{newsticker-1.4.png, version 1.4}
-@uref{newsticker-1.3.png, version 1.3},
-@uref{newsticker-1.0.png, version 1.0}.
-@end ifhtml
-@end ignore
-
-@node Requirements
-@chapter Requirements
-
-Newsticker can be used with
-@uref{http://www.gnu.org/software/emacs/emacs.html, GNU Emacs} version
-21.1 or later as well as @uref{http://www.xemacs.org, XEmacs}.  It
-requires an XML-parser (@file{xml.el}), which is part of GNU Emacs.  If
-you are using XEmacs you want to get the @file{net-utils} package
-which contains @file{xml.el} for XEmacs.
-
-Newsticker retrieves headlines either via Emacs's built-in retrieval
-functions, by an arbitrary external program that retrieves files via
-http and prints them to stdout (like
-@uref{http://www.gnu.org/software/wget/wget.html, wget}, or---on a
-per feed basis---via an arbitrary Lisp command.
+@node Retrieving News
+@chapter Retrieving News
 
+Newsticker downloads news periodically in the background.  This is
+triggered as soon as you start reading news (@ref{Reading News}).
 
-@node Installation
-@chapter Installation
+@findex newsticker-start
+@findex newsticker-stop
+Alternatively you may use the command @code{newsticker-start}
+(@code{newsticker-stop}) in order to start (stop) the periodic
+download of news without opening the reader.
 
-As Newsticker is part of GNU Emacs there is no need to perform any
-installation steps in order to use Newsticker.
+The following variables define which feeds are fetched and how this is
+done.
+
+@table @code
+@vindex newsticker-url-list-defaults
+@item newsticker-url-list-defaults
+You may select any number of feeds from this list of (sample) news feeds.
+
+@vindex newsticker-url-list
+@item newsticker-url-list
+All your personal news feeds are defined here.  Each feed is
+identified by its name and an URL.  You may set the start-time and the
+retrieval interval for each feed as well as the retrieval command
+arguments in case that the default values do not fit a certain feed.
+
+@vindex newsticker-retrieval-method
+@vindex newsticker-wget-name
+@vindex newsticker-wget-arguments
+@item newsticker-retrieval-method
+By default Newsticker uses Emacs's built-in download capabilities for
+fetching headlines.  You may change this to use an external tool like
+@code{wget}.  In this case you need to set @code{newsticker-wget-name}
+and possibly @code{newsticker-wget-arguments}.
+
+@vindex newsticker-retrieval-interval
+@item newsticker-retrieval-interval
+The number of seconds between headline retrievals.
+@end table
+
+@node Headline Management
+@chapter Headline Management
+
+@cindex Age
+@cindex Status
+
+Newsticker assigns a status (or ``age'') to each headline which you
+can modify manually.  This makes it easy to distinguish new headlines
+from old ones, to keep important headlines, to hide boring headlines
+etc.  An item is ``new'' when it has just arrived and has not been
+read.  You can mark it as ``old'' when you have read it or -- if you
+want to keep it -- you can mark it as ``immortal''.  You can do that
+manually and you can define filters which do that automatically, see
+below.  When a headline has vanished from the feed it is automatically
+marked as ``obsolete'' unless it has the status ``immortal''.
+``Obsolete'' headlines get removed automatically after a certain time.
+
+@table @code
+@cindex Filter
+@vindex newsticker-auto-mark-filter-list
+@item newsticker-auto-mark-filter-list
+You may define any number of filters for automatically marking newly
+arrived headlines as ``immortal'' or ``old''.  A filter looks for a
+regular expression in either the title or the description of a
+headline and then, if the expression matches, marks the headline as
+``immortal'' or as ``old''.  This is done only once, when a headline
+is fetched for the very first time.
+
+@vindex newsticker-keep-obsolete-items
+@vindex newsticker-obsolete-item-max-age
+@item newsticker-keep-obsolete-items
+Obsolete headlines are removed immediately unless
+@code{newsticker-keep-obsolete-items} is non-nil in which case they
+are kept until @code{newsticker-obsolete-item-max-age} is reached.
+
+@vindex newsticker-automatically-mark-items-as-old
+@item newsticker-automatically-mark-items-as-old
+If this is set to `t' then a ``new'' item becomes ``old'' as soon as
+it is retrieved a second time.
+
+@end table
+
+@node Reading News
+@chapter Reading News
+
+@findex newsticker-show-news
+Start Newsticker with the command @kbd{M-x newsticker-show-news}. This
+will start the asynchronous news download and displays all available
+headlines.
+
+@menu
+* Frontends::        Select the way headlines are displayed.
+* Navigation::       Move to the next unread headline etc.
+* Marking::          Mark important headlines.
+* More Actions::     Add new feeds etc..
+@end menu
+
+@node Frontends
+@section Frontends
+@cindex Frontends
+
+@vindex newsticker-frontend
+Newsticker provides two different @i{views} for browsing, marking and
+reading news.  The variable @code{newsticker-frontend} determines the
+actual headline reader.
+
+@subheading Treeview
+@cindex Treeview
+
+In this view separate windows are used for displaying feeds, headlines
+and their descriptions.  The feeds are shown as a tree on the left
+hand side, headlines of the currently selected feed are shown on the
+upper right side, and the full contents of the currently selected
+headline is shown on the lower right side.
+
+Feeds can be placed into groups, which themselves can be placed in
+groups and so on.  This results in the tree which is displayed on the
+left.  A node represents either a feed or a group of feeds holding a
+subtree.  The following commands allow for managing groups.
+
+@table @kbd
+@item M-a
+@kindex M-a
+@findex newsticker-group-add-group
+Add a new feed group. Name of the new group and of the parent group
+must be entered.  If The name of the parent group is the new group
+becomes a top-level group. (@code{newsticker-group-add-group})
+@item M-m
+@kindex M-m
+@findex newsticker-group-move-feed
+Moves a feed into a group. The name of the group must be
+entered. (@code{newsticker-group-move-feed})
+@end table
+
+The position of groups and feeds within the tree can be changed with these
+commands:
+
+@table @kbd
+@item M-up
+@itemx M-down
+@kindex M-up
+@kindex M-down
+@findex newsticker-group-shift-feed-up
+@findex newsticker-group-shift-feed-down
+Shift the currently selected feed up and down within its group.
+@item M-S-up
+@itemx M-S-down
+@kindex M-S-up
+@kindex M-S-down
+@findex newsticker-group-shift-group-up
+@findex newsticker-group-shift-group-down
+Shift the currently selected group up and down within its parent group.
+@end table
+
+The group settings are saved to a file either automatically when
+newsticker is being quit or manually when the following command is
+executed.
+
+@table @kbd
+@item s
+@kindex s
+@findex newsticker-treeview-save
+Save treeview group settings.
+@end table
+
+The Treeview is updated automatically as soon as new headlines have
+arrived.
+
+The Treeview is used when the variable @code{newsticker-frontend} is
+set to the value @code{newsticker-treeview}. (Alternatively it can be
+started with the command @code{newsticker-treeview}.)
+
+@subheading Plainview
+@cindex Plainview
 
-However, if you are using imenu, which allows for navigating with the
-help of a menu, you should add the following to your Emacs startup file
-(@file{~/.emacs}).
+In this view all headlines of all feeds are displayed in a single
+buffer (@file{*newsticker*}). The modeline in the @file{*newsticker*}
+buffer informs you whenever new headlines have arrived.
+
+You may want to use imenu with Plainview, which allows for navigating
+with the help of a menu. In this case add the following to your Emacs
+startup file (@file{~/.emacs}).
 
 @lisp
 (add-hook 'newsticker-mode-hook 'imenu-add-menubar-index)
 @end lisp
 
-That's it.
+(Note that preparing the Plainview takes significantly more time than
+starting the Treeview because all headlines are displayed in a single
+buffer.  When you have subscribed to a large amount of feeds you may
+find that Newsticker's efforts of minimizing rendering times, caching
+rendered items and so on  you may find However, when you have
+subscribed to a large amount of feeds you may want to give the
+Treeview a try.)
 
-@node Usage
-@chapter Usage
+The Plainview is used when the variable @code{newsticker-frontend} is
+set to the value @code{newsticker-plainview}. (Alternatively it can be
+started with the command @code{newsticker-plainview}.)
 
-@findex newsticker-show-news
-The command @code{newsticker-show-news} will display all available
-headlines.  It will also start the asynchronous download of headlines.
+@subheading Ticker
+@cindex Ticker
 
-You can choose between two different frontends for reading headlines:
-@itemize
-@item Newsticker's @emph{treeview} uses separate windows for the
-feeds (in tree form), a list of headlines for the current feed, and
-the content of the current headline.  Feeds can be placed into groups,
-which themselves can be placed in groups and so on.
-@item Newsticker's @emph{plainview} displays all headlines in a
-single buffer, called @file{*newsticker*}.  The modeline in the
-@file{*newsticker*} buffer informs you whenever new headlines have
-arrived.
-@end itemize
-In both views clicking mouse-button 2 or pressing @key{RET} on a
-headline will call @code{browse-url} to load the corresponding news
-story in your favorite web browser.
+Additionally, headlines can be displayed in the echo area in the style of a
+news ticker.
 
 @findex newsticker-start-ticker
 @findex newsticker-stop-ticker
-The scrolling, or flashing of headlines in the echo area, can be
+Headlines can be displayed in the echo area, either scrolling like
+messages in a stock-quote ticker, or just changing.  This can be
 started with the command @code{newsticker-start-ticker}.  It can be
 stopped with @code{newsticker-stop-ticker}.
 
-@findex newsticker-start
-@findex newsticker-stop
-If you just want to start the periodic download of headlines use the
-command @code{newsticker-start}.  Calling @code{newsticker-stop} will
-stop the periodic download, but will call
-@code{newsticker-stop-ticker} as well.
+
+@node Navigation
+@section Navigation
+@cindex Navigation
+
+Navigating through the list of feeds and headlines is rather
+straightforward.  You may do this either with the mouse or with the
+keyboard.  The following key bindings are provided in both, the
+Treeview as well as the Plainview.
+
+@table @kbd
+@item f
+@findex newsticker-next-feed
+@findex newsticker-treeview-next-feed
+Move to next feed (@code{newsticker-next-feed},
+@code{newsticker-treeview-next-feed}).
+@item F
+@findex newsticker-previous-feed
+@findex newsticker-treeview-prev-feed
+Move to previous feed (@code{newsticker-previous-feed},
+@code{newsticker-treeview-prev-feed}).
+@item n
+@findex newsticker-next-item
+@findex newsticker-treeview-next-item
+Move to next item (@code{newsticker-next-item},
+@code{newsticker-treeview-next-item}).
+@item N
+@findex newsticker-next-new-item
+@findex newsticker-treeview-next-new-item
+Move to next new item (possibly in another feed)
+(@code{newsticker-next-new-item},
+@code{newsticker-treeview-next-new-item}).
+@item p
+@findex newsticker-previous-item
+@findex newsticker-treeview-prev-item
+Move to previous item (@code{newsticker-previous-item},
+@code{newsticker-treeview-prev-item}).
+@item P
+@findex newsticker-previous-new-item
+@findex newsticker-treeview-prev-new-item
+Move to previous new item (possibly in another feed)
+(@code{newsticker-previous-new-item},
+@code{newsticker-treeview-prev-new-item}).
+@end table
+
+@subheading Treeview
+@table @kbd
+@item j
+@findex newsticker-treeview-jump
+Enter the name of a feed and jump to it
+(@code{newsticker-treeview-jump}).
+@end table
+
+
+@node Marking
+@section Marking
+@cindex Marking
+
+The following key bindings are provided in both, the Treeview as well
+as the Plainview.
+
+@table @kbd
+@item o
+@findex newsticker-mark-item-at-point-as-read
+@findex newsticker-treeview-mark-item-old
+Mark current item as old.
+(@code{newsticker-mark-item-at-point-as-read},
+@code{newsticker-treeview-mark-item-old}).
+@item i
+@findex newsticker-mark-item-at-point-as-immortal
+@findex newsticker-treeview-mark-item-immortal
+Mark current item as immortal.  Immortal items are kept forever.
+(@code{newsticker-mark-item-at-point-as-immortal},
+@code{newsticker-treeview-mark-item-immortal}).
+@end table
+
+@node More Actions
+@section More Actions
+@cindex More Actions
+
+@subheading View full article
+@table @kbd
+@cindex Get News
+@item v
+@itemx RET
+@itemx <mouse-1>
+@findex newsticker-treeview-browse-url
+Open the link to the full article (as contained in the current
+headline) in your web browser @code{newsticker-treeview-browse-url}).
+@end table
+
+@subheading Get News
+@cindex Get News
+
+You can force immediate download of news with the following commands.
+
+@table @kbd
+@item g
+@findex newsticker-treeview-get-news
+Get news for currently shown feed (@code{newsticker-treeview-get-news}).
+@item G
+@findex newsticker-get-all-news
+Get news for all feeds (@code{newsticker-get-all-news}).
+@end table
+
+@subheading Add More Feeds
+@cindex Add More Feeds
+
+@table @kbd
+@item a
+@findex newsticker-add-url
+The command @code{newsticker-add-url} prompts for an URL and a name of
+a new feed.  It then prepares a customization buffer where the details
+of the new feed can be set.
+@end table
+
+
+@node Automatic Processing
+@chapter Automatic Processing
+@cindex Automatic Processing
+
+Apart from automatic marking of headlines (by means of filters)
+Newsticker provides the possibility to fully process newly arrived
+headlines.  Instead of reading headlines yourself you can tell
+Newsticker to do that for you.
+
+@vindex newsticker-new-item-functions
+In order to do so write a function which takes three arguments
+
+@table @var
+@item FEED
+the name of the corresponding news feed,
+@item TITLE
+the title of the headline,
+@item DESC
+the decoded description of the headline.
+@end table
+
+and add it to @code{newsticker-new-item-functions}.  Each function
+contained in this list is called once for each new headline.
+Depending on the feed, the title and the description of a headline you
+can
+
+@itemize
+@item
+automatically download images referenced in HTML-formatted
+descriptions (for which a function already exists, see
+@code{newsticker-download-images}),
+@item
+automatically save enclosed audio and video files (for which another
+function exists as well, see @code{newsticker-download-images}),
+@item
+flash the screen while playing some sound,
+@item
+whatever you want.
+@end itemize
 
 @node Configuration
 @chapter Configuration
@@ -195,11 +478,8 @@ Emacs customization methods.  Call the command
 @code{customize-group} and enter @samp{newsticker} for the customization
 group.
 
-All Newsticker options have reasonable default values, so that in most
-cases it is not necessary to customize settings before starting Newsticker
-for the first time.
-
-The following list shows the available groups of newsticker options
+@noindent
+The following list shows the available groups of Newsticker options
 and some of the most important options.
 
 @itemize
@@ -296,13 +576,35 @@ treeview reader.
 
 @end itemize
 
+@noindent
 For the complete list of options please have a look at the
 customization buffers.
 
-@node Remarks
-@chapter Remarks
+@node Supported Formats
+@appendix Supported Formats
+@cindex Supported Formats
+
+Newsticker works with the standard RSS and Atom formats listed below
+(being lenient with feeds which break the specifications).
+
+@subheading RSS formats
+
+@itemize
+@item RSS 0.91 (see @uref{http://backend.userland.com/rss091} or
+@uref{http://my.netscape.com/publish/formats/rss-spec-0.91.html})
+@item RSS 0.92 (see @uref{http://backend.userland.com/rss092})
+@item RSS 1.0 (see @uref{http://purl.org/rss/1.0/spec})
+@item RSS 2.0 (see @uref{http://blogs.law.harvard.edu/tech/rss})
+@end itemize
+
+@subheading Atom formats
+
+@itemize
+@item Atom 0.3
+@item Atom 1.0 (see
+@uref{https://datatracker.ietf.org/doc/rfc4287/})
+@end itemize
 
-Byte-compiling newsticker.el is recommended.
 
 @node GNU Free Documentation License
 @appendix GNU Free Documentation License
@@ -310,7 +612,7 @@ Byte-compiling newsticker.el is recommended.
 
 @node Index
 @unnumbered Index
-
 @printindex cp
 
+
 @bye
index 53030305bfb980b036244b75821dab3a743da646..93a8d9a9f77e8ddf65fb05be689db4602e4fd776 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo @c -*- texinfo -*-
 @c %**start of header
-@setfilename ../../info/nxml-mode
+@setfilename ../../info/nxml-mode.info
 @settitle nXML Mode
 @documentencoding UTF-8
 @c %**end of header
index 31c2112845af04d9c42266b62d32a2b516194155..6fefab3c4439673479df29647d4c2f04893bef3e 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo                  @c -*-texinfo-*-
 @c %**start of header
-@setfilename ../../info/octave-mode
+@setfilename ../../info/octave-mode.info
 @settitle Octave Mode
 @documentencoding UTF-8
 @c %**end of header
index 7c796070fb3c56597a5c5fccc21f06ff52a9fdfa..2af44239e8d32e0957ccea96707cd434b07de13a 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo
 @c %**start of header
-@setfilename ../../info/org
+@setfilename ../../info/org.info
 @settitle The Org Manual
 
 @set VERSION 8.2.9
index 6b56bc03223bd56aa4aa1b186d75150e3650be90..099c4be2c1d155ba644306f5d6e3a237eea4fca1 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo  @c -*-texinfo-*-
 @c %**start of header
-@setfilename ../../info/pcl-cvs
+@setfilename ../../info/pcl-cvs.info
 @settitle PCL-CVS---Emacs Front-End to CVS
 @syncodeindex vr fn
 @documentencoding UTF-8
index 53c66c8fb34d010b73ccedbd68f204b3fd06a5ea..193f7f7830469160b1057834157a510d1f23be6a 100644 (file)
@@ -2,7 +2,7 @@
 
 @include gnus-overrides.texi
 
-@setfilename ../../info/pgg
+@setfilename ../../info/pgg.info
 
 @set VERSION 0.1
 @settitle PGG @value{VERSION}
index 2a7c52c33d92c4d314a39ed4f27dc0c991165d86..e37db1997569d45db33bb163db47f56adb2b4111 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo
 @c %**start of header
-@setfilename ../../info/rcirc
+@setfilename ../../info/rcirc.info
 @settitle rcirc Manual
 @documentencoding UTF-8
 @c %**end of header
index 6d79d352e40f47ced6f686fc36b01ab15a518649..7a1b224fee69c21bb6abfc3c4456334f1dafb47b 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo  @c -*-texinfo-*-
 @c %**start of header
-@setfilename ../../info/reftex
+@setfilename ../../info/reftex.info
 @settitle RefTeX User Manual
 @documentencoding UTF-8
 @synindex ky cp
index 5e2c1e2b0f6ec28ad40a55466dbe9e880c62bf8b..28c0ef5d8b3f83d109ac9c0fe889037db4933385 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo @c -*-texinfo-*-
 @c %**start of header
-@setfilename ../../info/remember
+@setfilename ../../info/remember.info
 @settitle Remember Manual
 @syncodeindex fn cp
 @documentencoding UTF-8
index ce3300dcc5be2fee67248fd8d45771a789f4973b..41afd9bdc1484937f09d88be3dc94c0322510982 100644 (file)
@@ -2,7 +2,7 @@
 
 @include gnus-overrides.texi
 
-@setfilename ../../info/sasl
+@setfilename ../../info/sasl.info
 
 @set VERSION 0.2
 @settitle Emacs SASL Library @value{VERSION}
index 83429a8e8e2f6530552b6c461f78198bcc3434a7..8a997cd4907ca07b22d3b13379ea3386b2a803bd 100644 (file)
@@ -1,7 +1,7 @@
 \input texinfo  @comment -*-texinfo-*-
 @comment 3.48
 @comment %**start of header (This is for running Texinfo on a region.)
-@setfilename ../../info/sc
+@setfilename ../../info/sc.info
 @settitle Supercite User's Manual
 @documentencoding UTF-8
 @iftex
index 0b0d7a364d6f556bf73cc88ddfec78005bc521fd..9b9f29f1f191eb809e13add65e9ed2e4c14dc4ca 100644 (file)
@@ -1,5 +1,5 @@
 \input texinfo
-@setfilename ../../info/semantic
+@setfilename ../../info/semantic.info
 @set TITLE  Semantic Manual
 @set AUTHOR Eric M. Ludlam, David Ponce, and Richard Y. Kim
 @settitle @value{TITLE}
index 2e1159a98fe9bd4a3d67ba288d552b6e57b3f72c..48511221442f3b8d82cd6fa710af23d90a67ef63 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo   @c -*- mode: texinfo; coding: utf-8; -*-
 @c %**start of header
-@setfilename ../../info/ses
+@setfilename ../../info/ses.info
 @settitle @acronym{SES}: Simple Emacs Spreadsheet
 @setchapternewpage off
 @syncodeindex fn cp
@@ -435,6 +435,13 @@ Centering with dashes and spill-over.
 Centering with tildes (~) and spill-over.
 @end table
 
+You can define printer function local to a sheet with command
+@code{ses-define-local-printer}. For instance define printer
+@samp{foo} to @code{"%.2f"} and then use symbol @samp{foo} as a
+printer function. Then, if you call again
+@code{ses-define-local-printer} on @samp{foo} to redefine it as
+@code{"%.3f"} all the cells using printer @samp{foo} will be reprinted
+accordingly.
 
 @node Clearing cells
 @section Clearing cells
index 422468c22103928c96aafd45cf9f11864ab3acdb..98177e0c91ea6277caa6ff1deb80a99da1b4b31b 100644 (file)
@@ -2,7 +2,7 @@
 
 @include gnus-overrides.texi
 
-@setfilename ../../info/sieve
+@setfilename ../../info/sieve.info
 @settitle Emacs Sieve Manual
 @documentencoding UTF-8
 @synindex fn cp
index cb22dc87d2a2e589020576f37628e5fc0cdd4ffd..f539cd0e2247ecabeb86da10a01c1e92ec717c78 100644 (file)
@@ -1,5 +1,5 @@
 \input texinfo  @c -*-texinfo-*-
-@setfilename ../../info/smtpmail
+@setfilename ../../info/smtpmail.info
 @settitle Emacs SMTP Library
 @documentencoding UTF-8
 @syncodeindex vr fn
index f5acc254c53cf55b7bc476e19b668f8527e0a03b..c57c4b65ded1717e7ed6e40d39446106a9646689 100644 (file)
@@ -1,5 +1,5 @@
 \input texinfo   @c -*-texinfo-*-
-@setfilename ../../info/speedbar
+@setfilename ../../info/speedbar.info
 @settitle Speedbar: File/Tag summarizing utility
 @documentencoding UTF-8
 @syncodeindex fn cp
index cd72656c91bf31b1ee2d34cce4f019ca21e5ea96..749bdf09fba8812417a57b991d5fac03316947ce 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo
 @c %**start of header
-@setfilename ../../info/srecode
+@setfilename ../../info/srecode.info
 @set TITLE SRecoder Manual
 @set AUTHOR Eric M. Ludlam
 @settitle @value{TITLE}
@@ -1191,7 +1191,7 @@ If there is an active region via @code{transient-mark-mode}, or
 @code{mouse-drag-region}, then the @code{REGION} section will be
 enabled.
 
-In addition, @code{REGIONTEXT} will be set the the text in the region,
+In addition, @code{REGIONTEXT} will be set to the text in the region,
 and that region of text will be ``killed'' from the current buffer.
 
 If standard-output is NOT the current buffer, then the region will not
index 0f2673c849e25850ca3d3d5533fefb29c6f5c13d..6312dadbce044dda55f728598b21705a1007ca3c 100644 (file)
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2014-03-17.07}
+\def\texinfoversion{2014-05-20.16}
 %
 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -2146,7 +2146,7 @@ end
   \let\tenttsl=\secttsl
   \def\curfontsize{sec}%
   \def\lsize{subsec}\def\lllsize{reduced}%
-  \resetmathfonts \setleading{16pt}}
+  \resetmathfonts \setleading{17pt}}
 \def\subsecfonts{%
   \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl
   \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc
@@ -8856,20 +8856,20 @@ end
 {
   \catcode`\_ = \active
   \globaldefs=1
-\parseargdef\documentlanguage{\begingroup
-  \let_=\normalunderscore  % normal _ character for filenames
+\parseargdef\documentlanguage{%
   \tex % read txi-??.tex file in plain TeX.
     % Read the file by the name they passed if it exists.
+    \let_ = \normalunderscore  % normal _ character for filename test
     \openin 1 txi-#1.tex
     \ifeof 1
-      \documentlanguagetrywithoutunderscore{#1_\finish}%
+      \documentlanguagetrywithoutunderscore #1_\finish
     \else
       \globaldefs = 1  % everything in the txi-LL files needs to persist
       \input txi-#1.tex
     \fi
     \closein 1
   \endgroup % end raw TeX
-\endgroup}
+}
 %
 % If they passed de_DE, and txi-de_DE.tex doesn't exist,
 % try txi-de.tex.
index 9b0ec6e85a33b16ad47cfebadaa43c92c938b133..8b9903419abbd58c3f573a022548772dba2befb1 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo.tex   @c -*-texinfo-*-
 @c %**start of header
-@setfilename ../../info/todo-mode
+@setfilename ../../info/todo-mode.info
 @settitle Todo Mode User Manual
 @syncodeindex fn cp
 @syncodeindex vr cp
@@ -158,7 +158,7 @@ you want.
 All todo files reside in a single directory, whose location is specified
 by the user option @code{todo-directory}.  This directory may also
 contain other types of Todo files, which are discussed later
-(@pxref{Todo Archive Mode} and @ref{Todo Filtered Items Mode}).  
+(@pxref{Todo Archive Mode} and @ref{Todo Filtered Items Mode}).
 @c Emacs recognizes Todo files by their extension, so when you visit
 @c the files the buffer is in the appropriate mode and the current
 @c category is correctly displayed.
index 1f6eaef6880a21baaab0e80bf18ddc466c957230..a245de823906a257c5e746ce6056735142af1f6e 100644 (file)
@@ -1,5 +1,5 @@
 \input texinfo   @c -*-texinfo-*-
-@setfilename ../../info/tramp
+@setfilename ../../info/tramp.info
 @c %**start of header
 @settitle TRAMP User Manual
 @documentencoding UTF-8
@@ -605,11 +605,10 @@ action.
 @cindex methods, inline
 
 The inline methods in @value{tramp} are quite powerful and can work in
-situations where you cannot use an external transfer program to connect.
-Inline methods are the only methods that work when connecting to the
-remote host via telnet.  (There are also strange inline methods which
-allow you to transfer files between @emph{user identities} rather than
-hosts, see below.)
+situations where you cannot use an external transfer program to
+connect.  There are also strange inline methods which allow you to
+transfer files between @emph{user identities} rather than hosts, see
+below.
 
 These methods depend on the existence of a suitable encoding and
 decoding command on remote host.  Locally, @value{tramp} may be able to
@@ -748,7 +747,10 @@ This method is mostly interesting for Windows users using the PuTTY
 implementation of SSH@.  It uses @samp{plink -ssh} to log in to the
 remote host.
 
-This supports the @samp{-P} argument.
+With a recent PuTTY, it is recommended to check the @samp{Share SSH
+connections if possible} control for that session.
+
+This method supports the @samp{-P} argument.
 
 
 @item @option{plinkx}
@@ -757,9 +759,10 @@ This supports the @samp{-P} argument.
 
 Another method using PuTTY on Windows.  Instead of host names, it
 expects PuTTY session names, calling @samp{plink -load @var{session}
--t"}.  User names are relevant only in case the corresponding session
-hasn't defined a user name.  Different port numbers must be defined in
-the session.
+-t}.  User names and port numbers must be defined in the session.
+
+With a recent PuTTY, it is recommended to check the @samp{Share SSH
+connections if possible} control for that session.
 
 @end table
 
@@ -820,22 +823,6 @@ specify @samp{-p 42} in the argument list for @command{ssh}, and to
 specify @samp{-P 42} in the argument list for @command{scp}.
 
 
-@item @option{sftp}---@command{ssh} and @command{sftp}
-@cindex method sftp
-@cindex sftp method
-@cindex sftp (with sftp method)
-@cindex ssh (with sftp method)
-
-That is mostly the same method as @option{scp}, but using
-@command{sftp} as transfer command.  So the same remarks are valid.
-
-This command does not work like @value{ftppackagename}, where
-@command{ftp} is called interactively, and all commands are send from
-within this session.  Instead of, @command{ssh} is used for login.
-
-This method supports the @samp{-p} argument.
-
-
 @item @option{rsync}---@command{ssh} and @command{rsync}
 @cindex method rsync
 @cindex rsync method
@@ -881,33 +868,27 @@ This method supports the @samp{-p} argument.
 
 
 @item @option{pscp}---@command{plink} and @command{pscp}
+@item @option{psftp}---@command{plink} and @command{psftp}
 @cindex method pscp
 @cindex pscp method
 @cindex pscp (with pscp method)
 @cindex plink (with pscp method)
 @cindex PuTTY (with pscp method)
-
-This method is similar to @option{scp}, but it uses the
-@command{plink} command to connect to the remote host, and it uses
-@command{pscp} for transferring the files.  These programs are part
-of PuTTY, an SSH implementation for Windows.
-
-This method supports the @samp{-P} argument.
-
-
-@item @option{psftp}---@command{plink} and @command{psftp}
 @cindex method psftp
 @cindex psftp method
-@cindex psftp (with psftp method)
+@cindex pscp (with psftp method)
 @cindex plink (with psftp method)
 @cindex PuTTY (with psftp method)
 
-As you would expect, this method is similar to @option{sftp}, but it
-uses the @command{plink} command to connect to the remote host, and it
-uses @command{psftp} for transferring the files.  These programs are
-part of PuTTY, an SSH implementation for Windows.
+These methods are similar to @option{scp} or @option{sftp}, but they
+use the @command{plink} command to connect to the remote host, and
+they use @command{pscp} or @command{psftp} for transferring the files.
+These programs are part of PuTTY, an SSH implementation for Windows.
 
-This method supports the @samp{-P} argument.
+With a recent PuTTY, it is recommended to configure the @samp{Share
+SSH connections if possible} control for that session.
+
+These methods support the @samp{-P} argument.
 
 
 @item @option{fcp}---@command{fsh} and @command{fcp}
@@ -938,6 +919,19 @@ opens just one connection to the remote host and then keeps it open,
 anyway.
 
 
+@item @option{nc}---@command{telnet} and @command{nc}
+@cindex method nc
+@cindex nc method
+@cindex nc (with nc method)
+@cindex telnet (with nc method)
+
+Using @command{telnet} to connect to the remote host and @command{nc}
+for file transfer is often the only possibility to access dumb
+devices, like routers or NAS hosts.  Those hosts have just a
+restricted @command{busybox} as local shell, and there is no program
+to encode and decode files for transfer.
+
+
 @item @option{ftp}
 @cindex method ftp
 @cindex ftp method
@@ -1066,6 +1060,17 @@ OBEX is an FTP-like access protocol for simple devices, like cell
 phones.  For the time being, @value{tramp} only supports OBEX over Bluetooth.
 
 
+@item @option{sftp}
+@cindex method sftp
+@cindex sftp method
+
+As you might expect, this method uses @command{sftp} in order to
+access the remote host.  Contrary to the @option{ssh} and @option{scp}
+methods, it doesn't open an @command{ssh} session for login.
+Therefore, it could be used to access to remote hosts which refuse
+@command{ssh} for security reasons.
+
+
 @item @option{synce}
 @cindex method synce
 @cindex synce method
@@ -1077,10 +1082,10 @@ FUSE, it also needs the SYNCE-GVFS plugin.
 @end table
 
 @defopt tramp-gvfs-methods
-This customer option, a list, defines the external methods which
-shall be used with GVFS@.  Per default, these are @option{dav},
-@option{davs}, @option{obex} and @option{synce}.  Other possible
-values are @option{ftp}, @option{sftp} and @option{smb}.
+This customer option, a list, defines the external methods which shall
+be used with GVFS@.  Per default, these are @option{dav},
+@option{davs}, @option{obex}, @option{sftp} and @option{synce}.  Other
+possible values are @option{ftp} and @option{smb}.
 @end defopt
 @end ifset
 
@@ -1503,7 +1508,7 @@ customize which files are taken into account for user and host name
 completion (@pxref{File name completion}).  For every method, it keeps
 a set of configuration files, accompanied by a Lisp function able to
 parse that file.  Entries in @code{tramp-completion-function-alist}
-have the form (@var{method} @var{pair1} @var{pair2} ...).
+have the form (@var{method} @var{pair1} @var{pair2} @dots{}).
 
 Each @var{pair} is composed of (@var{function} @var{file}).
 @var{function} is responsible to extract user names and host names
@@ -2057,6 +2062,32 @@ fi
 @end ifset
 @end ifinfo
 
+@item @command{busybox} / @command{nc}
+@cindex Unix command nc
+@cindex nc Unix command
+
+The @command{nc} command will be used with the @option{nc} method.  On
+the remote host, a listener will be installed.  Unfortunately, the
+command line syntax for this has been changed with the different
+@command{busybox} versions.  @value{tramp} uses the following syntax
+(see @code{tramp-methods}):
+
+@example
+# nc -l -p 42
+@end example
+
+If your remote @command{nc} refuses to accept the @command{-p}
+parameter, you could overwrite the syntax with the following form:
+
+@lisp
+(add-to-list
+ 'tramp-connection-properties
+ `(,(regexp-quote "192.168.0.1") "remote-copy-args" (("-l") ("%r"))))
+@end lisp
+
+@noindent
+with @samp{192.168.0.1} being the IP address of your remote host
+(@pxref{Predefined connection information}).
 @end table
 
 
@@ -3774,7 +3805,7 @@ a non-@code{nil} value.
 
 @lisp
 (let ((non-essential t))
-  ...)
+  @dots{})
 @end lisp
 
 
@@ -3793,7 +3824,7 @@ should let-bind the variable @code{process-file-side-effects} to
 
 @lisp
 (let (process-file-side-effects)
-  ...)
+  @dots{})
 @end lisp
 
 For asynchronous processes, @value{tramp} flushes the file attributes
@@ -3934,7 +3965,7 @@ file:
 
 The autoload of the @value{emacsname} @value{tramp} package must be
 disabled.  This can be achieved by setting file permissions @code{000}
-to the files @file{.../xemacs-packages/lisp/tramp/auto-autoloads.el*}.
+to the files @file{@dots{}/xemacs-packages/lisp/tramp/auto-autoloads.el*}.
 
 In case of unified file names, all @value{emacsname} download sites are
 added to @code{tramp-default-method-alist} with default method
index 3b66239f284c4fd10d8139ac0351395956b523dd..cfcb66401830c10ff3954af710734bf680e8698b 100644 (file)
@@ -5,10 +5,10 @@
 @c Copyright (C) 2003-2014 Free Software Foundation, Inc.
 @c See file doclicense.texi for copying conditions.
 
-@c In the Tramp CVS, the version number is auto-frobbed from
+@c In the Tramp GIT, the version number is auto-frobbed from
 @c configure.ac, so you should edit that file and run
 @c "autoconf && ./configure" to change the version number.
-@set trampver 2.2.9-24.4
+@set trampver 2.2.11-pre
 
 @c Other flags from configuration
 @set instprefix /usr/local
index 765d97d598070d77604395d9e1f414283fb64267..48e18391f29a90dc07504ce43b47edbfbd775c6b 100644 (file)
@@ -1,5 +1,5 @@
 \input texinfo
-@setfilename ../../info/url
+@setfilename ../../info/url.info
 @settitle URL Programmer's Manual
 
 @documentencoding UTF-8
diff --git a/doc/misc/vhdl-mode.texi b/doc/misc/vhdl-mode.texi
new file mode 100644 (file)
index 0000000..39bdcac
--- /dev/null
@@ -0,0 +1,1022 @@
+\input texinfo   @c -*- texinfo -*-
+
+@setfilename ../../info/vhdl-mode.info
+@settitle VHDL Mode, an Emacs mode for editing VHDL code
+@documentencoding UTF-8
+
+@c Adapted from the VHDL Mode texinfo manual version 2 by Rodney J. Whitby.
+@c Adapted from the CC Mode texinfo manual by Barry A. Warsaw.
+
+@copying
+This file documents VHDL Mode, an Emacs mode for editing VHDL code.
+
+Copyright @copyright{} 1995--2008, 2010, 2012, 2014 Free Software
+Foundation, Inc.
+
+@quotation
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with the Front-Cover texts being ``A GNU Manual,''
+and with the Back-Cover Texts as in (a) below.  A copy of the license
+is included in the section entitled ``GNU Free Documentation License.''
+
+(a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
+modify this GNU manual.''
+@end quotation
+@end copying
+
+@dircategory Emacs editing modes
+@direntry
+* VHDL Mode: (vhdl-mode).       Emacs mode for editing VHDL code.
+@end direntry
+
+@finalout
+
+@titlepage
+@title VHDL Mode
+@sp 2
+@subtitle A GNU Emacs mode for editing VHDL code.
+@sp 2
+@author Reto Zimmermann
+@author @email{reto@@gnu.org}
+@author Rod Whitby
+@author @email{software.vhdl-mode@@rwhitby.net}
+
+@page
+@vskip 0pt plus 1filll
+@insertcopying
+@end titlepage
+
+@contents
+
+@ifnottex
+@node Top
+@top VHDL Mode, an Emacs mode for editing VHDL code
+
+@insertcopying
+@end ifnottex
+
+@menu
+* Introduction::
+* Getting Connected::
+* New Indentation Engine::
+* Customizing Indentation::
+* Syntactic Symbols::
+* Frequently Asked Questions::
+* Getting the latest VHDL Mode release::
+* Sample .emacs File::
+* Limitations and Known Bugs::
+* Mailing Lists and Submitting Bug Reports::
+* GNU Free Documentation License:: The license for this documentation.
+* Concept Index::
+* Command Index::               Command Index
+* Key Index::                   Key Index
+* Variable Index::              Variable Index
+@end menu
+
+@node     Introduction
+@chapter  Introduction
+@cindex   Introduction
+
+Welcome to VHDL Mode. This is a GNU Emacs mode for editing files
+containing VHDL code.
+
+This manual will describe the following:
+
+@itemize @bullet
+@item
+How to get started using VHDL Mode.
+
+@item
+How the indentation engine works.
+
+@item
+How to customize the indentation engine.
+
+@end itemize
+
+@findex vhdl-version
+The major version number was incremented to 3 with the addition of
+many new features for editing VHDL code to the new indentation engine,
+which was introduced in major version 2. To find the minor revision
+number of this release, use @kbd{M-x vhdl-version RET}.
+
+A special word of thanks goes to Rod Whitby, who wrote the
+VHDL Mode indentation engine, and to Barry Warsaw, who wrote
+the CC Mode indentation engine that formed the basis
+thereof. Their manuals were also the basis for this manual.
+
+This manual is not very up-to-date. It basically contains the
+indentation machine documentation by Rod Whitby with only minor
+adaptions. A short documentation of the entire VHDL Mode is available
+within the mode itself by typing @kbd{C-c C-h}. Also, all commands and
+customization of most variables are available through the menu, which
+makes everything highly self-explaining.
+
+@node     Getting Connected
+@chapter  Getting Connected
+@cindex   Getting Connected
+
+To get started, simply visit a @file{.vhd} file in Emacs; or type
+@kbd{M-x vhdl-mode RET}.
+
+@node     New Indentation Engine
+@chapter  New Indentation Engine
+@cindex   New Indentation Engine
+
+VHDL Mode has a new indentation engine, providing a simplified, yet
+flexible and general mechanism for customizing indentation. It breaks
+indentation calculation into two steps. First for the line of code being
+indented, VHDL Mode analyzes what kind of language construct it's
+looking at, then it applies user defined offsets to the current line
+based on this analysis.
+
+This section will briefly cover how indentation is calculated in
+VHDL Mode. It is important to understand the indentation model
+being used so that you will know how to customize VHDL Mode for
+your personal coding style.
+
+@menu
+* Syntactic Analysis::       Step 1 -- Syntactic Analysis
+* Indentation Calculation::  Step 2 -- Indentation Calculation
+@end menu
+
+@node  Syntactic Analysis
+@section  Syntactic Analysis
+@cindex   Syntactic Analysis
+
+@vindex vhdl-offsets-alist
+@vindex offsets-alist (vhdl-)
+@cindex relative buffer position
+@cindex syntactic symbol
+@cindex syntactic component
+@cindex syntactic component list
+@cindex relative buffer position
+The first thing VHDL Mode does when indenting a line of code, is
+to analyze the line, determining the @dfn{syntactic component list} of
+the construct on that line.  A @dfn{syntactic component} consists of a
+pair of information (in lisp parlance, a @emph{cons cell}), where the
+first part is a @dfn{syntactic symbol}, and the second part is a
+@dfn{relative buffer position}.  Syntactic symbols describe elements of
+VHDL code, e.g. @code{statement}, @code{comment}, @code{block-open},
+@code{block-close}, etc.  @xref{Syntactic Symbols}, for a complete list
+of currently recognized syntactic symbols and their semantics.  Also,
+the variable @code{vhdl-offsets-alist} contains the list of currently
+supported syntactic symbols.
+
+Conceptually, a line of VHDL code is always indented relative to the
+indentation of some line higher up in the buffer.  This is represented
+by the relative buffer position in the syntactic component.
+
+It might help to see an example. Suppose we had the following code as
+the only thing in a VHDL Mode buffer @footnote{The line numbers
+in this and future examples don't actually appear in the buffer.}:
+@example
+@group
+
+  1: inverter : process
+  2: begin
+  3:   q <= not d;
+  4:   wait on d;
+  5: end inverter;
+
+@end group
+@end example
+
+@kindex C-c C-x
+@findex vhdl-show-syntactic-information
+@findex show-syntactic-information (vhdl-)
+We can use the command @kbd{C-c C-x}
+(@code{vhdl-show-syntactic-information}) to simply report what the
+syntactic analysis is for the current line.  Running this command on
+line 4 of example 1, we'd see in the echo area:
+@example
+
+((statement . 28))
+
+@end example
+
+This tells us that the line is a statement and it is indented relative
+to buffer position 28, which happens to be the @samp{q} on line 3.  If
+you were to move point to line 3 and hit @kbd{C-c C-x}, you would see:
+@example
+
+((statement-block-intro . 20))
+
+@end example
+
+This indicates that line 3 is the first statement in a block, and is
+indented relative to buffer position 20, which is the @samp{b} in the
+@code{begin} keyword on line 2.
+
+@cindex comment only line
+Syntactic component lists can contain more than one component, and
+individual syntactic components need not have relative buffer positions.
+The most common example of this is a line that contains a @dfn{comment
+only line}.
+@example
+@group
+
+%%% TBD %%%
+
+@end group
+@end example
+
+@noindent
+Hitting @kbd{C-c C-x} on line 3 of the example gives us:
+@example
+
+((comment-intro) (block-intro . 46))
+
+@end example
+
+@noindent
+so you can see that the syntactic component list contains two syntactic
+components.  Also notice that the first component,
+@samp{(comment-intro)} has no relative buffer position.
+
+@node  Indentation Calculation
+@section  Indentation Calculation
+@cindex   Indentation Calculation
+
+@vindex vhdl-offsets-alist
+@vindex offsets-alist (vhdl-)
+Indentation for the current line is calculated using the syntactic
+component list derived in step 1 above (see @ref{Syntactic
+Analysis}).  Each component contributes to the final total indentation
+of the line in two ways.
+
+First, the syntactic symbols are looked up in the @code{vhdl-offsets-alist}
+variable, which is an association list of syntactic symbols and the
+offsets to apply for those symbols.  These offsets are added to the
+running total.
+
+Second, if the component has a relative buffer position, VHDL Mode
+adds the column number of that position to the running total.  By adding
+up the offsets and columns for every syntactic component on the list,
+the final total indentation for the current line is computed.
+
+Let's use our code example above to see how this works.  Here is our
+example again.
+@example
+@group
+
+  1: inverter : process
+  2: begin
+  3:   q <= not d;
+  4:   wait on d;
+  5: end inverter;
+
+@end group
+@end example
+
+@kindex TAB
+Let's say point is on line 3 and we hit the @key{TAB} key to re-indent
+the line.  Remember that the syntactic component list for that
+line is:
+@example
+
+((statement-block-intro . 20))
+
+@end example
+
+@noindent
+VHDL Mode looks up @code{statement-block-intro} in the
+@code{vhdl-offsets-alist} variable.  Let's say it finds the value @samp{2};
+it adds this to the running total (initialized to zero), yielding a
+running total indentation of 2 spaces.
+
+Next VHDL Mode goes to buffer position 20 and asks for the
+current column.  Since the @code{begin} keyword at buffer position 20 is
+in column zero, it adds @samp{0} to the running total.  Since there is
+only one syntactic component on the list for this line, indentation
+calculation is complete, and the total indentation for the line is 2
+spaces.
+Simple, huh?
+
+Actually, the mode usually just does The Right Thing without you having
+to think about it in this much detail.  But when customizing
+indentation, it's helpful to understand the general indentation model
+being used.
+
+@vindex vhdl-echo-syntactic-information-p
+@vindex echo-syntactic-information-p (vhdl-)
+@cindex TAB
+To help you configure VHDL Mode, you can set the variable
+@code{vhdl-echo-syntactic-information-p} to non-@code{nil} so that the
+syntactic component list and calculated offset will always be echoed in
+the minibuffer when you hit @kbd{TAB}.
+
+
+@ignore
+@node  Indentation Commands
+@chapter  Indentation Commands
+@cindex   Indentation Commands
+
+@strong{<TBD>}
+@end ignore
+
+
+@node     Customizing Indentation
+@chapter  Customizing Indentation
+@cindex   Customizing Indentation
+
+@cindex vhdl-set-offset
+@cindex set-offset (vhdl-)
+The @code{vhdl-offsets-alist} variable is where you customize all your
+indentations.  You simply need to decide what additional offset you want
+to add for every syntactic symbol.  You can use the command @kbd{C-c
+O} (@code{vhdl-set-offset}) as the way to set offsets, both
+interactively and from your mode hook.  Also, you can set up
+@emph{styles} of indentation.  Most likely, you'll find one of the
+pre-defined styles will suit your needs, but if not, this section will
+describe how to set up basic editing configurations.  @xref{Styles}, for
+an explanation of how to set up named styles.
+
+@cindex vhdl-basic-offset
+@cindex basic-offset (vhdl-)
+As mentioned previously, the variable @code{vhdl-offsets-alist} is an
+association list between syntactic symbols and the offsets to be applied
+for those symbols.  In fact, these offset values can be an integer, a
+function or variable name, or one of the following symbols: @code{+},
+@code{-}, @code{++}, @code{--}, @code{*}, or @code{/}.  The symbol
+values have the following meanings:
+
+@itemize @bullet
+
+@item
+@code{+}  --  1 x @code{vhdl-basic-offset}
+@item
+@code{-}  --  -1 x @code{vhdl-basic-offset}
+@item
+@code{++} --  2 x @code{vhdl-basic-offset}
+@item
+@code{--} --  -2 x @code{vhdl-basic-offset}
+@item
+@code{*}  --  0.5 x @code{vhdl-basic-offset}
+@item
+@code{/}  --  -0.5 x @code{vhdl-basic-offset}
+
+@end itemize
+
+@noindent
+So, for example, because most of the default offsets are defined in
+terms of @code{+}, @code{-}, and @code{0}, if you like the general
+indentation style, but you use 2 spaces instead of 4 spaces per level,
+you can probably achieve your style just by changing
+@code{vhdl-basic-offset} like so (in your @file{.emacs} file):
+@example
+
+(setq vhdl-basic-offset 2)
+
+@end example
+
+To change indentation styles more radically, you will want to change the
+value associated with the syntactic symbols in the
+@code{vhdl-offsets-alist} variable.  First, I'll show you how to do that
+interactively, then I'll describe how to make changes to your
+@file{.emacs} file so that your changes are more permanent.
+
+@menu
+* Interactive Customization::
+* Permanent Customization::
+* Styles::
+* Advanced Customizations::
+@end menu
+
+@node     Interactive Customization
+@section  Interactive Customization
+@cindex   Interactive Customization
+
+As an example of how to customize indentation, let's change the
+style of the example above from:
+@example
+@group
+
+  1: inverter : process
+  2: begin
+  3:   q <= not d;
+  4:   wait on d;
+  5: end inverter;
+
+@end group
+@end example
+@noindent
+to:
+@example
+@group
+
+  1: inverter : process
+  2: begin
+  3:     q <= not d;
+  4:     wait on d;
+  5: end inverter;
+
+@end group
+@end example
+
+In other words, we want to change the indentation of the statements
+inside the inverter process.  Notice that the construct we want to
+change starts on line 3.  To change the indentation of a line, we need
+to see which syntactic component affect the offset calculations for that
+line.  Hitting @kbd{C-c C-x} on line 3 yields:
+@example
+
+((statement-block-intro . 20))
+
+@end example
+
+@findex vhdl-set-offset
+@findex set-offset (vhdl-)
+@kindex C-c O
+@noindent
+So we know that to change the offset of the first signal assignment, we need to
+change the indentation for the @code{statement-block-intro} syntactic
+symbol.  To do this interactively, just hit @kbd{C-c O}
+(@code{vhdl-set-offset}).  This prompts you for the syntactic symbol to
+change, providing a reasonable default.  In this case, the default is
+@code{statement-block-intro}, which is just the syntactic symbol we want to
+change!
+
+After you hit return, VHDL Mode will then prompt you for the new
+offset value, with the old value as the default.  The default in this
+case is @samp{+}, so hit backspace to delete the @samp{+}, then hit
+@samp{++} and @kbd{RET}.  This will associate an offset of twice the
+basic indent with the syntactic symbol @code{statement-block-intro} in
+the @code{vhdl-offsets-alist} variable.
+
+@findex vhdl-indent-defun
+@findex indent-defun (vhdl-)
+To check your changes quickly, just enter @kbd{M-x vhdl-indent-defun} to
+reindent the entire function.  The example should now look like:
+@example
+@group
+
+  1: inverter : process
+  2: begin
+  3:     q <= not d;
+  4:     wait on d;
+  5: end inverter;
+
+@end group
+@end example
+
+Notice how just changing the offset on line 3 is all we needed to do.
+Since the other affected lines are indented relative to line 3, they are
+automatically indented the way you'd expect.  For more complicated
+examples, this may not always work.  The general approach to take is to
+always start adjusting offsets for lines higher up in the file, then
+re-indent and see if any following lines need further adjustments.
+
+@node     Permanent Customization
+@section  Permanent Indentation
+@cindex   Permanent Indentation
+
+@vindex vhdl-mode-hook
+@cindex hooks
+To make this change permanent, you need to add some lisp code to your
+@file{.emacs} file.  VHDL Mode provides a @code{vhdl-mode-hook}
+that you can use to customize your language editing styles.  This hook
+gets run as the last thing when you enter VHDL Mode.
+
+Here's a simplified example of what you can add to your @file{.emacs}
+file to make the changes described in the previous section
+(@ref{Interactive Customization}) more permanent.  See the Emacs
+manuals for more information on customizing Emacs via hooks.
+@xref{Sample .emacs File}, for a more complete sample @file{.emacs} file.
+
+@example
+@group
+
+(defun my-vhdl-mode-hook ()
+  ;; my customizations for all of vhdl-mode
+  (vhdl-set-offset 'statement-block-intro '++)
+  ;; other customizations can go here
+  )
+(add-hook 'vhdl-mode-hook 'my-vhdl-mode-hook)
+
+@end group
+@end example
+
+For complex customizations, you will probably want to set up a
+@emph{style} that groups all your customizations under a single
+name.  @xref{Styles}.
+
+The offset value can also be a function, and this is how power users
+gain enormous flexibility in customizing indentation.  @xref{Advanced
+Customizations}.
+
+@node     Styles
+@section  Styles
+@cindex   Styles
+
+Most people only need to edit code formatted in just a few well-defined
+and consistent styles.  For example, their organization might impose a
+``blessed'' style that all its programmers must conform to.  Similarly,
+people who work on GNU software will have to use the GNU coding style on
+C code.  Some shops are more lenient, allowing some variety of coding
+styles, and as programmers come and go, there could be a number of
+styles in use.  For this reason, VHDL Mode makes it convenient for
+you to set up logical groupings of customizations called @dfn{styles},
+associate a single name for any particular style, and pretty easily
+start editing new or existing code using these styles.  This chapter
+describes how to set up styles and how to edit your C code using styles.
+
+@menu
+* Built-in Styles::
+* Adding Styles::
+* File Styles::
+@end menu
+
+
+@node     Built-in Styles
+@subsection  Built-in Styles
+@cindex   Built-in Styles
+
+If you're lucky, one of VHDL Mode's built-in styles might be just
+what you're looking for.  Some of the most common VHDL styles are
+already built-in.  These include:
+
+@itemize @bullet
+@item
+@cindex IEEE style
+@code{GNU} -- the coding style in the IEEE Language Reference Manual.
+
+@end itemize
+
+@findex vhdl-set-style
+@findex set-style (vhdl-)
+If you'd like to experiment with these built-in styles you can simply
+type @kbd{M-x vhdl-set-style RET} in a VHDL Mode buffer.
+
+You will be prompted for one of the above styles (with completion).
+Enter one of the styles and hit @kbd{RET}.  Note however that setting a
+style in this way does @emph{not} automatically re-indent your file.
+@ignore
+For commands that you can use to view the effect of your changes, see
+@ref{Indentation Commands}.
+@end ignore
+
+Once you find a built-in style you like, you can make the change
+permanent by adding a call to your @file{.emacs} file.  Let's say for
+example that you want to use the @code{IEEE} style in all your
+files.  You would add this:
+@example
+@group
+
+(defun my-vhdl-mode-hook ()
+  ;; use IEEE style for all VHDL code
+  (vhdl-set-style "IEEE")
+  ;; other customizations can go here
+  )
+(add-hook 'vhdl-mode-hook 'my-vhdl-mode-hook)
+
+@end group
+@end example
+
+@noindent
+@xref{Permanent Customization}.
+
+@node     Adding Styles
+@subsection  Adding Styles
+@cindex   Adding Styles
+
+@vindex vhdl-style-alist
+@vindex style-alist (vhdl-)
+@findex vhdl-add-style
+@findex add-style (vhdl-)
+If none of the built-in styles is appropriate, you'll probably want to
+add a new style definition.  Styles are kept in the @code{vhdl-style-alist}
+variable, but you probably won't want to modify this variable directly.
+VHDL Mode provides a function, called @code{vhdl-add-style}, that you
+can use to easily add new styles or update existing styles.  This
+function takes two arguments, a @var{stylename} string, and an
+association list @var{description} of style customizations.  If
+@var{stylename} is not already in @code{vhdl-style-alist}, the new style is
+added, otherwise the style already associated with @var{stylename} is
+changed to the new @var{description}.  This function also takes an
+optional third argument, which if non-@code{nil}, automatically
+institutes the new style in the current buffer.
+
+The sample @file{.emacs} file provides a concrete example of how a new
+style can be added and automatically set.  @xref{Sample .emacs File}.
+
+@node     File Styles
+@subsection  File Styles
+@cindex   File Styles
+
+@cindex local variables
+The Emacs manual describes how you can customize certain variables on a
+per-file basis by including a @dfn{Local Variable} block at the end of
+the file.  So far, you've only seen a functional interface to
+VHDL Mode, which is highly inconvenient for use in a Local Variable
+block.  VHDL Mode provides two variables that make it easier for
+you to customize your style on a per-file basis.
+
+@vindex vhdl-file-style
+@vindex file-style (vhdl-)
+@vindex vhdl-file-offsets
+@vindex file-offsets (vhdl-)
+
+The variable @code{vhdl-file-style} can be set to a style name string as
+described in @ref{Built-in Styles}.  When the file is visited,
+VHDL Mode will automatically set the file's style to this style
+using @code{vhdl-set-style}.
+
+@vindex vhdl-offsets-alist
+@vindex offsets-alist (vhdl-)
+@findex vhdl-set-offset
+@findex set-offset (vhdl-)
+Another variable, @code{vhdl-file-offsets}, takes an association list
+similar to what is allowed in @code{vhdl-offsets-alist}.  When the file is
+visited, VHDL Mode will automatically institute these offsets using
+@code{vhdl-set-offset}.  @xref{Customizing Indentation}.
+
+Note that file style settings (i.e. @code{vhdl-file-style}) are applied
+before file offset settings (i.e. @code{vhdl-file-offsets}).
+
+
+@node     Advanced Customizations
+@section  Advanced Customizations
+@cindex   Advanced Customizations
+
+@vindex vhdl-style-alist
+@vindex style-alist (vhdl-)
+@vindex vhdl-basic-offset
+@vindex basic-offset (vhdl-)
+For most users, VHDL Mode will support their coding styles with
+very little need for customizations.  Usually, one of the standard
+styles defined in @code{vhdl-style-alist} will do the trick.  Sometimes,
+one of the syntactic symbol offsets will need to be tweaked slightly, or
+perhaps @code{vhdl-basic-offset} will need to be changed.  However, some
+styles require a more advanced ability for customization, and one of the
+real strengths of VHDL Mode is that the syntactic analysis model
+provides a very flexible framework for customizing indentation. This
+allows you to perform special indentation calculations for situations
+not handled by the mode directly.
+
+@menu
+* Custom Indentation Functions::
+* Other Special Indentations::
+@end menu
+
+@node     Custom Indentation Functions
+@subsection  Custom Indentation Functions
+@cindex   Custom Indentation Functions
+
+@cindex custom indentation functions
+One of the most common ways to customize VHDL Mode is by writing
+@dfn{custom indentation functions} and associating them with specific
+syntactic symbols (see @ref{Syntactic Symbols}).  VHDL Mode itself
+uses custom indentation functions to provide more sophisticated
+indentation, for example when lining up selected signal assignments:
+@example
+@group
+
+%%% TBD %%%
+
+@end group
+@end example
+
+In this example, the @code{statement-cont} syntactic symbol has an
+offset of @code{+}, and @code{vhdl-basic-offset} is 2, so lines 4
+through 6 are simply indented two spaces to the right of line 3.  But
+perhaps we'd like VHDL Mode to be a little more intelligent so
+that it offsets the waveform descriptions relative to the signal
+assignment operator in line 3.  To do this, we have to write a custom
+indentation function which finds the column of signal assignment
+operator on the first line of the statement.  Here is the lisp code
+(from the @file{vhdl-mode.el} source file) that implements this:
+@example
+@group
+
+(defun vhdl-lineup-statement-cont (langelem)
+  ;; line up statement-cont after the assignment operator
+  (save-excursion
+    (let* ((relpos (cdr langelem))
+          (assignp (save-excursion
+                    (goto-char (vhdl-point 'boi))
+                    (and (re-search-forward "\\(<\\|:\\)="
+                                            (vhdl-point 'eol) t)
+                         (- (point) (vhdl-point 'boi)))))
+          (curcol (progn
+                    (goto-char relpos)
+                    (current-column)))
+          foundp)
+      (while (and (not foundp)
+                 (< (point) (vhdl-point 'eol)))
+       (re-search-forward "\\(<\\|:\\)=\\|(" (vhdl-point 'eol) 'move)
+       (if (vhdl-in-literal (cdr langelem))
+           (forward-char)
+         (if (= (preceding-char) ?\()
+             ;; skip over any parenthesized expressions
+             (goto-char (min (vhdl-point 'eol)
+                             (scan-lists (point) 1 1)))
+           ;; found an assignment operator (not at eol)
+           (setq foundp (not (looking-at "\\s-*$"))))))
+      (if (not foundp)
+         ;; there's no assignment operator on the line
+         vhdl-basic-offset
+       ;; calculate indentation column after assign and ws, unless
+       ;; our line contains an assignment operator
+       (if (not assignp)
+           (progn
+             (forward-char)
+             (skip-chars-forward " \t")
+             (setq assignp 0)))
+       (- (current-column) assignp curcol))
+      )))
+
+@end group
+@end example
+@noindent
+Custom indent functions take a single argument, which is a syntactic
+component cons cell (see @ref{Syntactic Analysis}).  The
+function returns an integer offset value that will be added to the
+running total indentation for the lne.  Note that what actually gets
+returned is the difference between the column that the signal assignment
+operator is on, and the column of the buffer relative position passed in
+the function's argument.  Remember that VHDL Mode automatically
+adds in the column of the component's relative buffer position and we
+don't want that value added into the final total twice.
+
+@cindex statement-cont syntactic symbol
+@findex vhdl-lineup-statement-cont
+@findex lineup-statement-cont (vhdl-)
+Now, to associate the function @code{vhdl-lineup-statement-cont} with the
+@code{statement-cont} syntactic symbol, we can add something like the
+following to our @code{vhdl-mode-hook}:
+@example
+
+(vhdl-set-offset 'statement-cont 'vhdl-lineup-statement-cont)
+
+@end example
+
+@findex vhdl-indent-defun
+Now the function looks like this after re-indenting (using @kbd{M-x
+vhdl-indent-defun}):
+@example
+@group
+
+%%% TBD %%%
+
+@end group
+@end example
+
+@vindex vhdl-offsets-alist
+@vindex offsets-alist (vhdl-)
+Custom indentation functions can be as simple or as complex as you like,
+and any syntactic symbol that appears in @code{vhdl-offsets-alist} can have
+a custom indentation function associated with it.  Note however that
+using many custom indentation functions may have a performance impact on
+VHDL Mode.
+
+@node     Other Special Indentations
+@subsection  Other Special Indentations
+@cindex   Other Special Indentations
+
+@vindex vhdl-special-indent-hook
+@vindex special-indent-hook (vhdl-)
+One other variable is available for you to customize VHDL Mode:
+@code{vhdl-special-indent-hook}.  This is a standard hook variable that
+is called after every line is indented by VHDL Mode.  You can use
+it to do any special indentation or line adjustments your style
+dictates, such as adding extra indentation to the port map clause in a
+component instantiation, etc.  Note however, that you should not change
+@code{point} or @code{mark} inside your @code{vhdl-special-indent-hook}
+functions.
+
+
+@node  Syntactic Symbols
+@chapter  Syntactic Symbols
+@cindex   Syntactic Symbols
+
+@vindex vhdl-offsets-alist
+The complete list of recognized syntactic symbols is described in the
+@code{vhdl-offsets-alist} variable.  This chapter will provide some
+examples to help clarify these symbols.
+
+@cindex -open syntactic symbols
+@cindex -close syntactic symbols
+Most syntactic symbol names follow a general naming convention.  When a
+line begins with a @code{begin} or @code{end} keyword, the syntactic
+symbol will contain the suffix @code{-open} or @code{-close}
+respectively.
+
+@cindex -intro syntactic symbols
+@cindex -cont syntactic symbols
+@cindex -block-intro syntactic symbols
+Usually, a distinction is made between the first line that introduces a
+construct and lines that continue a construct, and the syntactic symbols
+that represent these lines will contain the suffix @code{-intro} or
+@code{-cont} respectively.  As a sub-classification of this scheme, a
+line which is the first of a particular block construct will contain the
+suffix @code{-block-intro}.
+
+@strong{<TBD> include the name and a brief example of every syntactic
+symbol currently recognized}
+
+@node  Frequently Asked Questions
+@chapter  Frequently Asked Questions
+@cindex   Frequently Asked Questions
+
+@kindex C-x h
+@kindex ESC C-\
+@kindex ESC C-q
+@kindex ESC C-u
+@kindex RET
+@kindex LFD
+@findex newline-and-indent
+@quotation
+
+@strong{Q.} @emph{How do I re-indent the whole file?}
+
+@strong{A.} Visit the file and hit @kbd{C-x h} to mark the whole
+buffer. Then hit @kbd{@key{ESC} C-\} to re-indent the entire region
+which you've just marked. Or just enter @kbd{M-x vhdl-indent-buffer}.
+@sp 2
+
+@strong{Q.} @emph{How do I re-indent the entire function?}
+
+@strong{A.} Hit @kbd{@key{ESC} C-h} to mark the entire function. Then
+hit @kbd{@key{ESC} C-\} to re-indent the entire region which you've just
+marked.
+@sp 2
+
+@strong{Q.} @emph{How do I re-indent the current block?}
+
+@strong{A.} First move to the brace which opens the block with
+@kbd{@key{ESC} C-u}, then re-indent that expression with
+@kbd{@key{ESC} C-q}.
+@sp 2
+
+@strong{Q.} @emph{How do I re-indent the current statement?}
+
+@strong{A.} First move to the beginning of the statement with
+@kbd{@key{ESC} a}, then re-indent that expression with @kbd{@key{ESC}
+C-q}.
+@sp 2
+
+@strong{Q.} @emph{I put @code{(vhdl-set-offset 'statement-cont 0)}
+in my @file{.emacs} file but I get an error saying that
+@code{vhdl-set-offset}'s function definition is void.}
+
+@strong{A.} This means that VHDL Mode wasn't loaded into your
+Emacs session by the time the @code{vhdl-set-offset} call was reached,
+mostly likely because VHDL Mode is being autoloaded.  Instead
+of putting the @code{vhdl-set-offset} line in your top-level
+@file{.emacs} file, put it in your @code{vhdl-mode-hook}, or
+simply add the following to the top of your @file{.emacs} file:
+@example
+
+(require 'vhdl-mode)
+
+@end example
+
+See the sample @file{.emacs} file @ref{Sample .emacs File} for
+details.
+
+@end quotation
+
+
+@node  Getting the latest VHDL Mode release
+@chapter  Getting the latest VHDL Mode release
+@cindex   Getting the latest VHDL Mode release
+
+The best way to be sure you always have the latest VHDL Mode release
+is to join the @code{vhdl-mode-announce} mailing list.  If you are a
+brave soul, and wish to participate in beta testing of new releases of
+VHDL Mode, you may also join the @code{vhdl-mode-victims} mailing
+list.  Send email to the maintainer @email{reto@@gnu.org} to join
+either of these lists.
+
+The official Emacs VHDL Mode Home Page can be found at
+@uref{http://www.iis.ee.ethz.ch/~zimmi/emacs/vhdl-mode.html}.
+
+@node  Sample .emacs File
+@chapter  Sample @file{.emacs} file
+@cindex   Sample @file{.emacs} file
+
+Most customizations can be done using the `Customize' entry in the
+VHDL Mode menu, which requires no editing of the .emacs file.
+If you want to customize indentation, here you go:
+
+@example
+;; Here's a sample .emacs file that might help you along the way.  Just
+;; copy this region and paste it into your .emacs file.  You may want to
+;; change some of the actual values.
+
+(defconst my-vhdl-style
+  '((vhdl-tab-always-indent        . t)
+    (vhdl-comment-only-line-offset . 4)
+    (vhdl-offsets-alist            . ((arglist-close    . vhdl-lineup-arglist)
+                                      (statement-cont   . 0)
+                                      (case-alternative . 4)
+                                      (block-open       . 0)))
+    (vhdl-echo-syntactic-information-p . t)
+    )
+  "My VHDL Programming Style")
+
+;; Customizations for vhdl-mode
+(defun my-vhdl-mode-hook ()
+  ;; add my personal style and set it for the current buffer
+  (vhdl-add-style "PERSONAL" my-vhdl-style t)
+  ;; offset customizations not in my-vhdl-style
+  (vhdl-set-offset 'statement-case-intro '++)
+  ;; other customizations
+  (setq tab-width 8
+        ;; this will make sure spaces are used instead of tabs
+        indent-tabs-mode nil)
+  ;; keybindings for VHDL are put in vhdl-mode-map
+  (define-key vhdl-mode-map "\C-m" 'newline-and-indent)
+  )
+
+(add-hook 'vhdl-mode-hook 'my-vhdl-mode-hook)
+@end example
+
+@node  Limitations and Known Bugs
+@chapter  Limitations and Known Bugs
+@cindex   Limitations and Known Bugs
+
+@itemize @bullet
+@item
+Re-indenting large regions or expressions can be slow.
+
+@ignore
+@item
+The index menu does not work on my XEmacs installation (don't know why).
+@end ignore
+
+@end itemize
+
+@node  Mailing Lists and Submitting Bug Reports
+@chapter  Mailing Lists and Submitting Bug Reports
+@cindex   Mailing Lists and Submitting Bug Reports
+
+@kindex C-c C-b
+@findex vhdl-submit-bug-report
+@findex submit-bug-report (vhdl-)
+@cindex beta testers mailing list
+@cindex announcement mailing list
+To report bugs, use the @kbd{C-c C-b} (@code{vhdl-submit-bug-report})
+command.  This provides vital information I need to reproduce your
+problem.  Make sure you include a concise, but complete code example.
+Please try to boil your example down to just the essential code needed
+to reproduce the problem, and include an exact recipe of steps needed to
+expose the bug.  Be especially sure to include any code that appears
+@emph{before} your bug example.
+
+For other help or suggestions, send a message to @email{reto@@gnu.org}.
+
+Send an add message to @email{reto@@gnu.org} to get on the
+@code{vhdl-mode-victims} beta testers list where beta releases of
+VHDL Mode are posted.  Note that you shouldn't expect beta
+releases to be as stable as public releases.
+
+There is also an announce only list where the latest public releases
+of VHDL Mode are posted.  Send an add message to
+@email{reto@@gnu.org} to be added to this list.
+
+
+@node GNU Free Documentation License
+@appendix GNU Free Documentation License
+@include doclicense.texi
+
+
+@node    Concept Index
+@unnumbered Concept Index
+
+@printindex cp
+
+
+@node    Command Index
+@unnumbered Command Index
+
+Since all VHDL Mode commands are prepended with the string
+@samp{vhdl-}, each appears under its @code{vhdl-<thing>} name and its
+@code{<thing> (vhdl-)} name.
+@iftex
+@sp 2
+@end iftex
+@printindex fn
+
+
+@node    Key Index
+@unnumbered Key Index
+
+@printindex ky
+
+
+@node    Variable Index
+@unnumbered Variable Index
+
+Since all VHDL Mode variables are prepended with the string
+@samp{vhdl-}, each appears under its @code{vhdl-<thing>} name and its
+@code{<thing> (vhdl-)} name.
+@iftex
+@sp 2
+@end iftex
+@printindex vr
+
+@bye
index e7a53e768a768a4ef9478d759eb9c401e0b8ec5d..a6c6d3067eafd4198788e5de55f90d18646fffb0 100644 (file)
@@ -1,5 +1,5 @@
 \input texinfo
-@setfilename ../../info/vip
+@setfilename ../../info/vip.info
 @settitle VIP
 
 @documentencoding UTF-8
@@ -38,7 +38,7 @@ modify this GNU manual.''
 
 @dircategory Emacs misc features
 @direntry
-* VIP: (vip).                   An older VI-emulation for Emacs.
+* VIP: (vip).                   An obsolete VI-emulation for Emacs.
 @end direntry
 
 @ifnottex
@@ -53,6 +53,9 @@ are fairly accustomed to Vi but not so much with Emacs.  Also we will
 concentrate mainly on differences from Vi, especially features unique to
 VIP.
 
+VIP is obsolete since Emacs 24.5---consider using Viper instead.
+@xref{Top, Viper,, viper, The Viper VI-emulation mode for Emacs}.
+
 It is recommended that you read nodes on survey and on customization before
 you start using VIP@.  Other nodes may be visited as needed.
 
@@ -83,6 +86,9 @@ fairly accustomed to Vi but not so much with Emacs.  Also we will
 concentrate mainly on differences from Vi, especially features unique to
 VIP.
 
+VIP is obsolete since Emacs 24.5---consider using Viper instead.
+@xref{Top, Viper,, viper, The Viper VI-emulation mode for Emacs}.
+
 It is recommended that you read chapters on survey and on customization
 before you start using VIP@.  Other chapters may be used as future
 references.
index ae122f5aae4c32c02ee09be0563498af4b4c63c4..837b8c2e2d2ed0169a1987022f39ed92b49abd2c 100644 (file)
@@ -4,7 +4,7 @@
 @comment Using viper.info instead of viper in setfilename breaks DOS.
 @comment @setfilename viper
 @comment @setfilename viper.info
-@setfilename ../../info/viper
+@setfilename ../../info/viper.info
 
 @documentencoding UTF-8
 
index 8aca11551ab240fedefee48dea6fcfa4eb94b69c..0685dbdb5b1908aeb23852098cd5cb6ec868181a 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo.tex
 @c %**start of header
-@setfilename ../../info/widget
+@setfilename ../../info/widget.info
 @settitle The Emacs Widget Library
 @syncodeindex fn cp
 @syncodeindex vr cp
index dce853a13d0d834dfaad125c84fb9211602b0510..b5d7899bd55ab60a4bd2de8a600a937db0eea49e 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo  @c -*-texinfo-*-
 @c %**start of header
-@setfilename ../../info/wisent
+@setfilename ../../info/wisent.info
 @set TITLE  Wisent Parser Development
 @set AUTHOR Eric M. Ludlam, David Ponce, and Richard Y. Kim
 @settitle @value{TITLE}
index 5a63d3523f6c9dad85205c93edd81da3ffba9f31..1e5e0a7dfa7c9d9bf146f05bea20c38cc8dea7ce 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo   @c -*-texinfo-*-
 @c %**start of header
-@setfilename ../../info/woman
+@setfilename ../../info/woman.info
 @settitle WoMan: Browse Unix Manual Pages ``W.O. (without) Man''
 @include emacsver.texi
 @afourpaper
index d17733dda64bd57e0efbd19334e1f34eeb738056..2b93bb25dab3dcb6d0a1b009b6cf9f9a17280019 100644 (file)
@@ -3,44 +3,33 @@ Foundation's distribution of GNU Emacs.  To show our appreciation for
 their public spirit, we list here in alphabetical order a condensed
 list of their contributions.
 
-Aaron Ecay: changed ob-R.el ob-core.el org-src.el ox-latex.el nsterm.m
-  ob-awk.el ob-exp.el ob-python.el ob-tangle.el org-bibtex.el org-id.el
-  org.el org.texi paren.el
+Aaron Ecay: changed nsterm.m
 
 Aaron Larson: co-wrote bibtex.el
 
-Aaron S. Hawley: wrote undo-tests.el
-and changed simple.el files.texi isearch.el morse.el sgml-mode.el
-  tar-mode.el thingatpt.el add-log.el autoinsert.el building.texi calc.el
-  cc-fonts.el comint.el compare-w.el custom.texi diff.el edebug.el
-  etags.el ffap.el files.el flyspell.el and 28 other files
+Aaron S. Hawley: changed files.texi morse.el tar-mode.el add-log.el
+  autoinsert.el building.texi custom.texi files.el glossary.texi
+  isearch.el jka-cmpr-hook.el misc.texi re-builder.el sgml-mode.el
+  texinfo.el thingatpt.el tutorial.el
 
-Abdó Roig-Maranges: changed org.el org-agenda.el ox-html.el ox-odt.el
-
-Abraham Nahum: changed configure.ac dgux4.h sysdep.c
+Abraham Nahum: changed configure.in dgux4.h sysdep.c
 
 Abramo Bagnara: changed term.c
 
-Achim Gratz: changed org.el org-compat.el org.texi org-clock.el
-  ob-core.el ob.el ob-exp.el ob-perl.el org-agenda.el org-macs.el
-  org-table.el ob-R.el ob-eval.el ob-fortran.el ob-ref.el ob-tangle.el
-  org-element.el org-exp-blocks.el org-macro.el ox-odt.el ob-C.el
-  and 17 other files
+Achim Gratz: changed org-clock.el org.el org.texi ob-ref.el ob.el
+  org-macs.el
 
-Adam Gołębiowski: changed lib-src/Makefile.in
+Adam Gołębiowski: changed Makefile.in
 
 Adam Hupp: changed emacs.py emacs2.py emacs3.py gud.el
   progmodes/python.el
 
-Adam Sjøgren: changed spam.el mml2015.el shr.el xterm.c blink.xpm
-  braindamaged.xpm cry.xpm dead.xpm evil.xpm forced.xpm frown.xpm
-  grin.xpm gtkutil.c indifferent.xpm reverse-smile.xpm sad.xpm smile.xpm
-  wry.xpm gnus-html.el gnus-spec.el gnus-start.el and 5 other files
-
-Adam Sokolnicki: changed ruby-mode.el
+Adam Sjøgren: changed spam.el blink.xpm braindamaged.xpm cry.xpm dead.xpm
+  evil.xpm forced.xpm frown.xpm grin.xpm indifferent.xpm
+  reverse-smile.xpm sad.xpm smile.xpm wry.xpm xterm.c gnus-html.el
+  gnus-start.el gnus-sum.el gnus.el gtkutil.c shr.el xterm.h
 
-Adam Spiers: changed org.texi calendar.el cus-edit.el org-clock.el
-  ox-html.el
+Adam Spiers: changed calendar.el
 
 Adam W: changed mail-source.el
 
@@ -55,17 +44,14 @@ Adrian Colley: changed aix3-2.h
 Adrian Lanz: changed mail-source.el spam.el
 
 Adrian Robert: co-wrote ns-win.el
-and changed nsterm.m nsfns.m nsfont.m nsterm.h nsmenu.m configure.ac
-  src/Makefile.in macos.texi README config.in emacs.c font.c keyboard.c
-  nsgui.h nsimage.m xdisp.c image.c lib-src/Makefile.in lisp.h menu.c
-  Makefile.in and 79 other files
+and changed nsterm.m nsfns.m nsfont.m nsterm.h Makefile.in nsmenu.m
+  configure.in README config.in emacs.c font.c keyboard.c nsgui.h
+  nsimage.m xdisp.c image.c lisp.h macos.texi menu.c Info-gnustep.plist
+  darwin.h and 82 other files
 
-Agustín Martín: changed ispell.el flyspell.el fixit.texi
+Ævar Arnfjörð Bjarmason: changed rcirc.el
 
-Aidan Gauland: wrote em-tramp.el
-and changed eshell.texi em-term.el em-unix.el erc-match.el
-  automated/eshell.el em-cmpl.el em-dirs.el em-ls.el em-script.el
-  esh-proc.el
+Agustín Martín: changed ispell.el flyspell.el fixit.texi
 
 Aidan Kehoe: changed ipa.el lread.c mm-util.el erc-log.el erc.el
   gnus-sum.el gnus-util.el latin-ltx.el nnfolder.el ob-tangle.el
@@ -77,19 +63,17 @@ and changed cc-mode.el perl-mode.el
 Aki Vehtari: changed bibtex.el gnus-art.el gnus-score.el gnus-sum.el
   nnmail.el tar-mode.el
 
-Akinori Musha: changed ruby-mode.el Makefile.in sieve-mode.el
+Akinori Musha: changed ruby-mode.el
 
 Alakazam Petrofsky: changed hanoi.el
 
 Alan Mackenzie: wrote cc-awk.el
 and co-wrote cc-align.el cc-cmds.el cc-defs.el cc-engine.el cc-fonts.el
   cc-langs.el cc-mode.el cc-styles.el cc-vars.el
-and changed cc-mode.texi lread.c programs.texi font-lock.el isearch.el
-  font-core.el lisp.el modes.texi search.texi cc-menus.el cc-subword.el
-  display.texi easy-mmode.el os.texi startup.el subr.el text.texi
-  INSTALL.REPO add-log.el buffers.texi bytecomp.el and 23 other files
-
-Alan Schmitt: changed ob-ocaml.el org-faces.el
+and changed cc-mode.texi lread.c programs.texi font-lock.el font-core.el
+  isearch.el lisp.el modes.texi cc-subword.el display.texi os.texi
+  search.texi startup.el subr.el text.texi INSTALL.REPO add-log.el
+  buffers.texi bytecomp.el callint.c cc-fix.el and 22 other files
 
 Alan Shutko: changed diary-lib.el calendar.el bindings.el cal-hebrew.el
   easy-mmode.el gnus-sum.el ibuf-ext.el ibuffer.el lunar.el macros.el
@@ -97,18 +81,13 @@ Alan Shutko: changed diary-lib.el calendar.el bindings.el cal-hebrew.el
 
 Alastair Burt: changed gnus-art.el smiley.el
 
-Albert Krewinkel: co-wrote sieve-manage.el
-and changed sieve.el sieve.texi
-
 Albert L. Ting: changed gnus-group.el mail-hist.el
 
 Aleksei Gusev: changed progmodes/compile.el
 
 Alex Coventry: changed files.el
 
-Alex Ott: changed TUTORIAL.ru ede/files.el ru-refcard.tex base.el
-  cedet-files.el cpp-root.el ede.el ede/generic.el idle.el ispell.el
-  semantic/format.el
+Alex Ott: changed TUTORIAL.ru ru-refcard.tex ispell.el ru-refcard.ps
 
 Alex Rezinsky: wrote which-func.el
 
@@ -117,17 +96,15 @@ Alex Schroeder: wrote ansi-color.el cus-theme.el erc-compat.el
   spam-stat.el sql.el
 and co-wrote longlines.el mail/rmailmm.el
 and changed erc.el erc-track.el erc-button.el erc-stamp.el erc-match.el
-  erc-autoaway.el erc-nickserv.el rcirc.texi Makefile erc-autojoin.el
-  erc-fill.el erc-pcomplete.el erc-complete.el erc-ibuffer.el
-  erc-members.el rmail.el comint.el custom.el erc-bbdb.el erc-chess.el
-  erc-ezbounce.el and 35 other files
+  erc-autoaway.el erc-nickserv.el rcirc.texi erc-autojoin.el erc-fill.el
+  erc-pcomplete.el erc-complete.el erc-ibuffer.el erc-members.el rmail.el
+  comint.el custom.el erc-bbdb.el erc-chess.el erc-ezbounce.el
+  erc-imenu.el and 32 other files
 
 Alex Shinn: changed files.el
 
 Alexander Becher: changed vc-annotate.el
 
-Alexander Haeckel: changed getset.el
-
 Alexander Klimov: changed files.el calc-graph.el files.texi man.el rx.el
   sendmail.el
 
@@ -140,8 +117,6 @@ and changed rmailsum.el man.el rmail.el sendmail.el
 
 Alexander Shopov: changed code-pages.el
 
-Alexander Vorobiev: changed org-compat.el
-
 Alexander Zhuckov: changed ebrowse.c
 
 Alexandre Julliard: wrote vc-git.el
@@ -162,7 +137,7 @@ Alfred M. Szmidt: changed html2text.el openbsd.h progmodes/compile.el
 
 Alfredo Finelli: changed TUTORIAL.it
 
-Ali Bahrami: changed configure configure.ac sol2-10.h
+Ali Bahrami: changed configure configure.in sol2-10.h
 
 Alin C. Soare: changed lisp-mode.el hexl.el
 
@@ -170,8 +145,8 @@ Allen S. Rout: changed org-capture.el
 
 Alon Albert: wrote rcompile.el
 
-Alp Aker: changed nsfont.m nsterm.m buff-menu.el nsfns.m nsmenu.m
-  nsterm.h configure.ac macfont.m mule-cmds.el nsselect.m window.el
+Alp Aker: changed nsfont.m nsterm.h nsterm.m buff-menu.el configure.in
+  nsfns.m nsmenu.m
 
 Ami Fischman: changed bindings.el calendar.el diary-lib.el print.c
   savehist.el vc-git.el
@@ -180,11 +155,8 @@ Anand Mitra: changed gnus-sum.el
 
 Anders Holst: wrote hippie-exp.el
 
-Anders Lindgern: changed nsterm.m
-
 Anders Lindgren: wrote autorevert.el cwarn.el follow.el
-and changed font-lock.el nsterm.m etags.c compile.el ert.el nsfont.m
-  nsterm.h
+and changed font-lock.el etags.c compile.el nsfont.m nsterm.m
 
 Andre Spiegel: changed vc.el vc-hooks.el vc-cvs.el vc-rcs.el vc-sccs.el
   files.el dired.el files.texi cperl-mode.el ediff-util.el log-view.el
@@ -196,8 +168,6 @@ Andre Srinivasan: changed gnus-group.el gnus-sum.el gnus.texi message.el
 
 Andrea Russo: changed erc-dcc.el info-look.el
 
-Andreas Amann: changed emacsclient.c
-
 Andreas Burtzlaff: changed org.el
 
 Andreas Büsching: changed emacsclient.c
@@ -214,21 +184,20 @@ and changed erc.el erc-bbdb.el erc-button.el erc-log.el erc-stamp.el
 Andreas Jaeger: changed gnus-msg.el gnus-start.el gnus-xmas.el
   nnfolder.el nnml.el
 
-Andreas Leha: changed ob-latex.el ob.el
+Andreas Leha: changed ob.el
 
 Andreas Leue: changed artist.el
 
 Andreas Luik: changed xfns.c xterm.c
 
-Andreas Politz: changed editfns.c elp.el frame.c ibuffer.el ido.el
-  imenu.el modes.texi outline.el sql.el subr.el term.el
+Andreas Politz: changed editfns.c elp.el ido.el outline.el term.el
 
 Andreas Rottmann: changed emacsclient.1 emacsclient.c misc.texi server.el
 
-Andreas Schwab: changed configure.ac lisp.h xdisp.c process.c alloc.c
-  coding.c Makefile.in keyboard.c files.el fileio.c xterm.c editfns.c
-  emacs.c print.c src/Makefile.in fns.c lread.c eval.c xfns.c font.c
-  sysdep.c and 632 other files
+Andreas Schwab: changed Makefile.in configure.in lisp.h xdisp.c alloc.c
+  process.c coding.c files.el keyboard.c xterm.c editfns.c emacs.c fns.c
+  print.c eval.c fileio.c lread.c sysdep.c dired.el xfns.c buffer.c
+  and 577 other files
 
 Andreas Seltenreich: changed nnweb.el gnus.texi message.el gnus-sum.el
   gnus.el nnslashdot.el gnus-srvr.el gnus-util.el mm-url.el mm-uu.el
@@ -238,54 +207,41 @@ Andreas Seltenreich: changed nnweb.el gnus.texi message.el gnus-sum.el
 
 Andreas Vögele: changed pgg-def.el
 
-Andrei Chițu: changed icalendar.el
-
-Andrew Beals: changed spook.lines
-
 Andrew Choi: changed macterm.c darwin.h mac-win.el sysdep.c emacs.c mac.c
   macfns.c fontset.c frame.c keyboard.c xfaces.c dispextern.h macmenu.c
-  unexmacosx.c configure.ac frame.h macterm.h titdic-cnv.el xdisp.c
-  alloc.c callproc.c and 27 other files
+  unexmacosx.c Makefile.in configure.in frame.h macterm.h titdic-cnv.el
+  xdisp.c alloc.c and 26 other files
 
 Andrew Cohen: wrote spam-wash.el
-and changed nnir.el gnus-sum.el nnimap.el gnus-msg.el gnus.texi
-  gnus-group.el gnus-int.el dns.el gnus-art.el gnus-registry.el
-  gnus-srvr.el gnus.el nnheader.el nnspool.el
+and changed nnir.el gnus-sum.el nnimap.el gnus.texi gnus-group.el
+  gnus-int.el dns.el gnus-art.el gnus-registry.el gnus-srvr.el gnus.el
+  nnheader.el nnspool.el
 
 Andrew Csillag: wrote m4-mode.el
 
 Andrew Hall: changed paren.el
 
-Andrew Hyatt: changed org-archive.el org.el org.texi
-
-Andrew Innes: changed makefile.nt w32fns.c w32term.c w32.c w32proc.c
-  makefile.w32-in fileio.c gmake.defs leim/makefile.w32-in
-  lib-src/makefile.w32-in w32-fns.el dos-w32.el inc/ms-w32.h nmake.defs
-  nt/makefile.w32-in src/makefile.w32-in w32term.h makefile.def unexw32.c
-  w32menu.c w32xfns.c and 139 other files
+Andrew Innes: changed makefile.w32-in makefile.nt w32fns.c w32term.c
+  w32.c w32proc.c fileio.c gmake.defs w32-fns.el dos-w32.el ms-w32.h
+  nmake.defs w32term.h makefile.def unexw32.c w32menu.c w32xfns.c addpm.c
+  cmdproxy.c emacs.c w32-win.el and 137 other files
 
-Andrew Oram: changed calendar.texi (and other doc files)
+Andrew Oram: changed calendar.texi (and other files in man/)
 
 Andrew Schein: changed sql.el
 
-Andrew W. Nosenko: changed tramp.el
-
 Andrew Zhilin: changed emacs22.png emacs22.ico
 
 Andrey Slusar: changed gnus-async.el gnus.el
 
 Andrey Zhdanov: changed gud.el
 
-Andrzej Lichnerowicz: wrote ob-io.el ob-scala.el
-
-Andy Moreton: changed emacs/makefile.w32-in
+Andy Moreton: changed makefile.w32-in
 
 Andy Norman: wrote ange-ftp.el
 
 Andy Petrusenco: changed w32term.c
 
-Andy Sawyer: changed saveplace.el
-
 Andy Seaborne: changed keyboard.c
 
 Andy Stewart: wrote org-w3m.el
@@ -299,12 +255,11 @@ Anna M. Bigatti: wrote cal-html.el
 
 Antoine Levitt: changed gnus-group.el gnus-sum.el message.texi ada-prj.el
   ange-ftp.el cus-edit.el dired-x.el ebnf2ps.el emerge.el erc-button.el
-  erc-goodies.el erc-stamp.el erc-track.el files.el find-file.el
-  gnus-art.el gnus-uu.el gnus.el gnus.texi message.el mh-funcs.el
-  and 8 other files
+  erc-goodies.el erc-track.el files.el find-file.el gnus-art.el
+  gnus-uu.el gnus.el gnus.texi message.el mh-funcs.el mh-mime.el
+  and 7 other files
 
-Ari Roponen: changed atimer.c doc.c hash.texi mule.texi package.el
-  startup.el time-date.el
+Ari Roponen: changed atimer.c doc.c mule.texi startup.el time-date.el
 
 Arisawa Akihiro: changed characters.el coding.c epa-file.el japan-util.el
   language/tibetan.el message.el mm-decode.el mm-view.el ps-print.el
@@ -315,31 +270,23 @@ Arnaud Giersch: changed gnus-sum.el
 Arne Georg Gleditsch: changed gnus-sum.el
 
 Arne Jørgensen: wrote latexenc.el
-and changed smime.el mml-smime.el smime-ldap.el flymake.el gnus-art.el
-  gnus-sieve.el ldap.el message.el mm-decode.el mml-sec.el mml.el
-  mule-conf.el nnimap.el nnrss.el wid-edit.el
+and changed smime.el mml-smime.el smime-ldap.el gnus-art.el gnus-sieve.el
+  ldap.el message.el mm-decode.el mml-sec.el mml.el mule-conf.el
+  nnimap.el nnrss.el wid-edit.el
 
-Arni Magnusson: wrote bat-mode.el
-and changed ada-mode.texi frames.texi generic-x.el texinfo.el
+Arni Magnusson: changed ada-mode.texi frames.texi texinfo.el
 
 Artem Chuprina: changed message.el
 
-Arun Persaud: changed org-agenda.el org-src.el
-
 Ashwin Ram: wrote refer.el
 
-Atsuo Ohki: changed lread.c
-
 Aubrey Jaffer: changed info.el unexelf.c
 
-Aurélien Aptel: changed cus-face.el dispextern.h display.texi faces.el
-  nsterm.m ox-html.el url.texi w32term.c xfaces.c xterm.c
-
 Axel Boldt: changed ehelp.el electric.el
 
 B. Anyos: changed w32term.c
 
-Baoqiu Cui: changed org-docbook.el
+Baoqiu Cui: wrote org-docbook.el
 
 Barry A. Warsaw: wrote assoc.el elp.el man.el regi.el reporter.el
   supercite.el
@@ -347,29 +294,23 @@ and co-wrote cc-align.el cc-cmds.el cc-compat.el cc-defs.el cc-engine.el
   cc-guess.el cc-langs.el cc-menus.el cc-mode.el cc-styles.el cc-vars.el
 and changed c++-mode.el cplus-md1.el syntax.c syntax.h
 
-Barry Fishman: changed configure.ac gnu-linux.h image.c
-
-Barry O'reilly: changed simple.el lisp.h keyboard.c markers.texi
-  undo-tests.el alloc.c bytecode.c casetab.c data.c eval.c fileio.c fw.el
-  idle.el insdel.c lread.c pulse.el search.c subr.el text.texi
-  timer-tests.el undo.c
+Barry Fishman: changed gnu-linux.h
 
-Bastien Guerry: wrote gnus-bookmark.el
+Bastien Guerry: wrote gnus-bookmark.el org-latex.el
 and co-wrote org-bibtex.el org-list.el org-protocol.el org-src.el
-and changed org.el org-agenda.el org.texi ox-html.el org-clock.el
-  org-table.el ox-latex.el org-capture.el ox.el ox-odt.el org-compat.el
-  ox-publish.el ob.el org-colview.el org-mobile.el org-macs.el
-  org-pcomplete.el org-faces.el org-timer.el ox-ascii.el org-archive.el
-  and 115 other files
+and changed org.el org-agenda.el org-html.el org-clock.el org-exp.el
+  org.texi org-table.el org-capture.el org-publish.el org-timer.el
+  org-export-latex.el org-archive.el org-ascii.el org-colview.el
+  org-exp-blocks.el org-mobile.el ob.el org-eshell.el bookmark.el info.el
+  org-attach.el and 36 other files
 
 Ben A. Mesander: co-wrote erc-dcc.el
 
-Ben Harris: changed configure.ac
+Ben Harris: changed configure.in
 
-Ben Key: changed w32.c w32fns.c w32menu.c configure.bat INSTALL
-  gmake.defs nmake.defs src/makefile.w32-in w32.h w32term.c configure.ac
-  emacs.c inc/ms-w32.h keyboard.c lib-src/makefile.w32-in make-docfile.c
-  nsfont.m nsterm.m sound.c xfaces.c
+Ben Key: changed w32.c w32fns.c w32menu.c configure.bat makefile.w32-in
+  INSTALL gmake.defs nmake.defs w32.h w32term.c configure.in emacs.c
+  keyboard.c make-docfile.c ms-w32.h nsfont.m nsterm.m sound.c xfaces.c
 
 Ben Menasha: changed nnmh.el
 
@@ -381,10 +322,10 @@ Bengt Martensson: co-wrote bibtex.el
 Benjamin Andresen: wrote ob-screen.el
 
 Benjamin Drieu: wrote pong.el
-and changed org-clock.el org.el
+and changed org-clock.el
 
-Benjamin Riefenstahl: changed w32select.c emacs.c inc/ms-w32.h lisp.h
-  mac-win.el macterm.c mule-cmds.el runemacs.c tcl.el w32.c w32.h
+Benjamin Riefenstahl: changed w32select.c emacs.c lisp.h mac-win.el
+  macterm.c ms-w32.h mule-cmds.el runemacs.c tcl.el w32.c w32.h
 
 Benjamin Rutt: co-wrote gnus-dired.el
 and changed vc.el gnus-msg.el message.el diff-mode.el ffap.el nnimap.el
@@ -393,7 +334,7 @@ and changed vc.el gnus-msg.el message.el diff-mode.el ffap.el nnimap.el
 Bernhard Herzog: changed vc-hg.el menu.c xsmfns.c
 
 Bernt Hansen: changed org-agenda.el org-clock.el org.el org-capture.el
-  org-indent.el org.texi ox-html.el
+  org-html.el org-indent.el org.texi
 
 Bill Atkins: changed wdired.el
 
@@ -402,13 +343,12 @@ Bill Burton: changed ptx.h sequent-ptx.h
 Bill Carpenter: wrote feedmail.el (public domain)
 
 Bill Mann: wrote perl-mode.el
-and changed configure.ac unexaix.c ibmrs6000.h usg5-4-3.h
+and changed configure.in unexaix.c ibmrs6000.h usg5-4-3.h
 
 Bill Pringlemeir: changed messcompat.el
 
 Bill Richter: changed fill.el quail.el ccl.el encoded-kb.el fontset.el
-  international/mule-util.el kinsoku.el kkc.el mule-cmds.el mule-conf.el
-  mule.el
+  kinsoku.el kkc.el mule-cmds.el mule-conf.el mule-util.el mule.el
 
 Bill Rozas: wrote scheme.el
 and changed xscheme.el
@@ -419,11 +359,11 @@ Bill Wohler: wrote mh-buffers.el mh-comp.el mh-compat.el mh-e.el
   mh-folder.el mh-funcs.el mh-letter.el mh-mime.el mh-scan.el mh-seq.el
   mh-show.el mh-utils.el mh-xface.el
 and co-wrote mh-junk.el
-and changed mh-customize.el mh-search.el mh-alias.el Makefile mh-e.texi
-  mh-identity.el README mh-speed.el mh-init.el mh-acros.el mh-gnus.el
-  mh-unit.el mh-inc.el mh-xemacs-compat.el mh-print.el lisp/Makefile.in
-  image.el mh-tool-bar.el mh-xemacs.el display.texi makefile.w32-in
-  and 87 other files
+and changed mh-customize.el mh-search.el mh-alias.el mh-identity.el
+  mh-e.texi mh-speed.el mh-init.el mh-acros.el mh-gnus.el mh-unit.el
+  mh-inc.el mh-xemacs-compat.el mh-print.el Makefile.in image.el
+  mh-tool-bar.el mh-xemacs.el README display.texi makefile.w32-in
+  mh-pick.el and 86 other files
 
 Bjorn Solberg: changed nnimap.el
 
@@ -456,17 +396,13 @@ Bojan Petrovic: changed pop3.el
 Boris Goldowsky: wrote avoid.el descr-text.el enriched.el facemenu.el
   format.el shadowfile.el
 and changed fill.el simple.el indent.el paragraphs.el cmds.c intervals.c
-  intervals.h add-log.el cc-mode.el enriched.txt fileio.c make-mode.el
+  intervals.h add-log.el cc-mode.el enriched.doc fileio.c make-mode.el
   text-mode.el textprop.c ada.el allout.el awk-mode.el bibtex.el buffer.c
   buffer.h c-mode.el and 38 other files
 
 Boris Samorodov: changed imap.el
 
-Boyd Lynn Gerber: changed configure.ac
-
-Bozhidar Batsov: changed ruby-mode.el subr-x.el subr.el bytecomp.el
-  lisp-mode.el package.el progmodes/python.el prolog.el
-  ruby-mode-tests.el scheme.el
+Boyd Lynn Gerber: changed configure.in
 
 Brad Howes: changed gnus-demon.el
 
@@ -476,22 +412,19 @@ Brendan Kehoe: changed hpux9.h
 
 Brent Goodrick: changed abbrev.el
 
-Brian Cully: changed macos.texi
+Brian Cully: changed ns-emacs.texi
 
 Brian D. Carlstrom: changed gud.el smtpmail.el
 
-Brian Fox: changed Makefile.in Makefile configure.ac minibuf.c dired.el
-  files.el lib-src/Makefile.in oldXMenu/Makefile.in rmail.el search.c
-  simple.el sysdep.c compile.el forms.texi frame.c keyboard.c make-dist
-  subr.el systty.h texindex.c xterm.c and 47 other files
-
-Brian Jenkins: changed frame.c frames.texi hooks.texi
+Brian Fox: changed Makefile.in Makefile configure.in minibuf.c dired.el
+  files.el rmail.el search.c simple.el sysdep.c compile.el forms.texi
+  frame.c info.texi keyboard.c make-dist subr.el systty.h texindex.c
+  xterm.c ymakefile and 46 other files
 
 Brian Marick: co-wrote hideif.el
 
 Brian P Templeton: changed erc.el erc-compat.el erc-fill.el
-  erc-nickserv.el erc-pcomplete.el erc-stamp.el erc-track.el lread.c
-  nsfont.m
+  erc-nickserv.el erc-pcomplete.el erc-stamp.el erc-track.el
 
 Brian Palmer: changed erc.el erc-list.el
 
@@ -502,23 +435,15 @@ Brian Preble: changed abbrev.el apropos.el asm-mode.el awk-mode.el
 
 Brian Sniffen: changed gnus-draft.el imap.el mm-decode.el
 
-Brian van den Broek: changed org.texi
-
-Bruno Félix Rezende Ribeiro: changed functions.texi
-
 Bruno Haible: co-wrote po.el
 and changed INSTALL emacs.1 epaths.in info.el paths.el
 
-Bryan Henderson: changed Makefile term.el
+Bryan Henderson: changed term.el
 
 Bryan O'Sullivan: changed ange-ftp.el
 
-Caio Tiago Oliveira: changed ob-scala.el
-
 Caleb Deupree: changed w32-fns.el
 
-Cameron Desautels: changed regexp-opt.el ruby-mode.el
-
 Carl D. Roth: changed gnus-nocem.el
 
 Carl Edman: co-wrote ns-win.el
@@ -528,25 +453,27 @@ Carl Henrik Lunde: changed format-spec.el
 Carsten Bormann: changed ibmrs6000.h latin-post.el
 
 Carsten Dominik: wrote idlw-complete-structtag.el idlw-toolbar.el
-  org-agenda.el org-archive.el org-capture.el org-clock.el org-colview.el
-  org-compat.el org-datetree.el org-faces.el org-feed.el org-footnote.el
-  org-id.el org-indent.el org-info.el org-inlinetask.el org-macs.el
-  org-mobile.el org-rmail.el org-table.el org-timer.el org.el
+  org-agenda.el org-archive.el org-ascii.el org-beamer.el org-capture.el
+  org-clock.el org-colview.el org-compat.el org-datetree.el org-exp.el
+  org-faces.el org-feed.el org-footnote.el org-html.el org-icalendar.el
+  org-id.el org-indent.el org-info.el org-inlinetask.el org-install.el
+  org-jsinfo.el org-macs.el org-mks.el org-mobile.el org-remember.el
+  org-rmail.el org-table.el org-timer.el org-vm.el org-xoxo.el org.el
   reftex-auc.el reftex-cite.el reftex-dcr.el reftex-global.el
   reftex-index.el reftex-parse.el reftex-ref.el reftex-sel.el
   reftex-toc.el reftex-vars.el reftex.el
 and co-wrote idlw-help.el idlw-shell.el idlwave.el org-bbdb.el
   org-bibtex.el org-entities.el org-gnus.el org-list.el org-pcomplete.el
-  org-src.el ox-beamer.el ox-html.el ox-icalendar.el
-and changed ox.el ox-latex.el org.texi org-remember.el orgcard.tex
-  ox-publish.el org-docbook.el ox-ascii.el org-attach.el org-protocol.el
-  org-mouse.el org-mac-message.el org-wl.el ox-jsinfo.el org-crypt.el
+  org-src.el
+and changed org-latex.el org.texi org-publish.el orgcard.tex
+  org-export-latex.el org-colview-xemacs.el org-docbook.el org-attach.el
+  org-mouse.el org-protocol.el org-mac-message.el org-wl.el org-crypt.el
   org-freemind.el idlw-rinfo.el org-exp-blocks.el org-habit.el org-mhe.el
-  org-plot.el and 35 other files
+  org-plot.el org-special-blocks.el reftex.texi and 24 other files
 
-Caveh Jalali: changed configure.ac intel386.h sol2-4.h
+Caveh Jalali: changed configure.in intel386.h sol2-4.h
 
-Chad Brown: changed aix4-2.h bsd-common.h config.in configure.ac cygwin.h
+Chad Brown: changed aix4-2.h bsd-common.h config.in configure.in cygwin.h
   dired.c gnu-linux.h mh-comp.el msdos.h sed2v2.inp sysdep.c usg5-4.h
 
 Changwoo Ryu: changed files.el
@@ -569,25 +496,25 @@ Chip Coldwell: changed font.c
 
 Chong Yidong: wrote compile-tests.el dichromacy-theme.el
   font-parse-tests.el redisplay-testsuite.el tabulated-list.el
-  xml-parse-tests.el
 and co-wrote longlines.el tango-dark-theme.el tango-theme.el
-and changed simple.el display.texi xdisp.c files.el frames.texi
-  cus-edit.el files.texi custom.el subr.el text.texi faces.el keyboard.c
-  startup.el package.el misc.texi emacs.texi modes.texi mouse.el
-  custom.texi image.c window.el and 949 other files
+and changed xdisp.c simple.el display.texi files.el frames.texi
+  files.texi cus-edit.el keyboard.c custom.el text.texi package.el
+  startup.el faces.el xterm.c emacs.texi misc.texi subr.el image.c
+  mouse.el custom.texi xfns.c and 845 other files
 
 Chris Chase: co-wrote idlw-shell.el idlwave.el
 
 Chris Foote: changed progmodes/python.el
 
-Chris Gray: changed mm-decode.el ox-html.el
+Chris Gray: wrote org-special-blocks.el
+and changed mm-decode.el
 
 Chris Hall: changed callproc.c frame.c
 
 Chris Hanson: changed xscheme.el scheme.el xterm.c hpux.h x11term.c
-  hp9000s300.h keyboard.c process.c texinfmt.el sort.el syntax.c
-  texnfo-upd.el x11fns.c xfns.c dired.el emacsclient.c fileio.c
-  hp9000s800.h indent.c info.el man.el and 17 other files
+  hp9000s300.h keyboard.c process.c texinfmt.el emacsclient.c sort.el
+  syntax.c texnfo-upd.el x11fns.c xfns.c dired.el fileio.c hp9000s800.h
+  indent.c info.el man.el and 17 other files
 
 Chris Hecker: changed calc-aent.el
 
@@ -605,59 +532,49 @@ Chris Prince: changed w32term.c
 Chris Smith: wrote icon.el
 and changed icon-mode.el
 
-Christian Egli: changed org-taskjuggler.el org.texi
+Christian Egli: wrote org-taskjuggler.el
+and changed org.texi
 
-Christian Faulhammer: changed configure configure.ac src/Makefile.in
+Christian Faulhammer: changed Makefile.in configure configure.in
   vc-bzr.el
 
 Christian Limpach: co-wrote ns-win.el
-and changed configure.ac
+and changed configure.in
 
 Christian Lynbech: changed appt.el emacsserver.c tramp.el
 
 Christian Millour: changed shell.el
 
-Christian Moe: changed org-bbdb.el org-special-blocks.el ox-html.el
-  ox-odt.el
+Christian Moe: changed org-bbdb.el org-html.el org-special-blocks.el
 
 Christian Neukirchen: changed mm-util.el
 
-Christian Ohler: wrote ert-tests.el ert.el
-and co-wrote ert-x.el
-and changed Makefile.in automated automated/Makefile.in configure.ac
-  ert-x-tests.el ert.texi misc/Makefile.in misc/makefile.w32-in
+Christian Ohler: wrote ert-tests.el ert-x.el ert.el
+and changed Makefile.in automated configure.in ert-x-tests.el ert.texi
+  makefile.w32-in
 
 Christian Plate: changed nnmaildir.el sgml-mode.el
 
 Christian Plaunt: wrote soundex.el
 
-Christian Wittern: changed image-mode.el
-
 Christian von Roques: changed mml2015.el epg.el gnus-start.el
 
-Christoph Bauer: changed configure.ac
-
-Christoph Conrad: changed gnus-agent.el gnus-score.el
-  lib-src/makefile.w32-in qp.el
-
-Christoph Dittmann: changed ox-beamer.el
+Christoph Bauer: changed configure.in
 
-Christoph Egger: changed configure.ac
+Christoph Conrad: changed gnus-agent.el gnus-score.el makefile.w32-in
+  qp.el
 
-Christoph Scholtes: changed README.W32 lib/makefile.w32-in
-  nt/makefile.w32-in progmodes/python.el stdint.h INSTALL
-  maintaining.texi src/makefile.w32-in zipdist.bat admin.el bookmark.el
-  config.nt configure.bat control.texi cua-base.el gmake.defs
-  help-mode.el help.el ido.el lib-src/makefile.w32-in make-dist
-  and 9 other files
+Christoph Scholtes: changed makefile.w32-in README.W32
+  progmodes/python.el stdint.h INSTALL maintaining.texi zipdist.bat
+  admin.el bookmark.el config.nt configure.bat control.texi cua-base.el
+  gmake.defs help-mode.el help.el ido.el make-dist makedist.bat menu.c
+  minibuf.c and 6 other files
 
 Christoph Wedler: wrote antlr-mode.el
 and changed format.el gnus-art.el gnus-picon.el message.el register.el
   smiley.el texinfmt.el
 
-Christophe Junke: changed org-agenda.el org.el
-
-Christophe Rhodes: changed ox-latex.el ox.el
+Christophe Rhodes: changed org-exp.el
 
 Christophe de Dinechin: co-wrote ns-win.el
 
@@ -672,19 +589,17 @@ Christopher J. White: changed url-http.el
 
 Christopher Oliver: changed mouse.el
 
-Christopher Schmidt: changed ibuffer.el tips.texi cl-macs.el comint.el
-  dired-x.el dired.el files.el files.texi find-dired.el gnus-int.el
-  gnus-msg.el gnus.texi help-fns.el info.el locate.el lread.c
-  minibuf-eldef.el mm-decode.el mml.el org.el org.texi and 11 other files
+Christopher Schmidt: changed ibuffer.el
+
+Christopher Suckling: co-wrote org-mac-message.el
 
 Chuck Blake: changed term.c
 
 Chunyu Wang: changed gnus-art.el pcl-cvs.texi
 
-Claudio Bley: changed image.c image.el process.c src/makefile.w32-in
-  stat.h w32-win.el w32.c
+Claudio Bley: changed makefile.w32-in process.c
 
-Claudio Fontana: changed Makefile.in leim/Makefile.in lib-src/Makefile.in
+Claudio Fontana: changed Makefile.in
 
 Colin Marquardt: changed gnus.el message.el
 
@@ -692,34 +607,29 @@ Colin Rafferty: changed message.el
 
 Colin Walters: wrote ibuf-ext.el ibuf-macs.el ibuffer.el
 and changed calc.el replace.el update-game-score.c calc-ext.el
-  calc-misc.el calc-macs.el calc-mode.el calc-graph.el gamegrid.el
-  calc-aent.el calc-bin.el calc-embed.el calc-keypd.el calc-math.el
-  calc-prog.el calc-units.el calcalg2.el font-core.el info.el calc-alg.el
-  calc-arith.el and 81 other files
+  calc-misc.el Makefile.in calc-macs.el calc-mode.el calc-graph.el
+  gamegrid.el calc-aent.el calc-bin.el calc-embed.el calc-keypd.el
+  calc-math.el calc-prog.el calc-units.el calcalg2.el font-core.el
+  info.el calc-alg.el and 78 other files
 
 Colin Williams: changed calc.texi
 
-Constantin Kulikov: changed server.el startup.el
-
 Courtney Bane: changed term.c
 
 Craig Markwardt: changed icalendar.el
 
 Craig McDaniel: changed sheap.c
 
-Craig Tanis: changed ox-latex.el
-
 D. E. Evans: changed basic.texi
 
 Daiki Ueno: wrote epa-dired.el epa-file.el epa-hook.el epa-mail.el epa.el
   epg-config.el epg.el pgg-def.el pgg-gpg.el pgg-parse.el pgg-pgp.el
   pgg-pgp5.el pgg.el plstore.el sasl.el starttls.el
 and co-wrote sasl-cram.el sasl-digest.el
-and changed mml2015.el mml1991.el epa.texi auth-source.el mml-smime.el
-  gnus.texi mm-decode.el mm-uu.el mml.el package.el auth.texi gnus-sum.el
-  mm-view.el mml-sec.el archive-contents archive-contents.sig dired.el
-  dired.texi epa-file-hook.el epa-setup.el epg-package-info.el
-  and 30 other files
+and changed mml2015.el mml1991.el epa.texi auth-source.el gnus.texi
+  mm-uu.el mml-smime.el Makefile.in auth.texi gnus-sum.el mm-decode.el
+  mm-view.el mml-sec.el mml.el dired.el dired.texi epa-file-hook.el
+  epa-setup.el epg-package-info.el faces.el files.el and 17 other files
 
 Dale Gulledge: changed TUTORIAL.eo
 
@@ -728,13 +638,9 @@ Dale Hagglund: changed unexelf.c
 Dale R. Worley: wrote emerge.el (public domain)
 and changed mail-extr.el
 
-Dale Sedivec: changed sgml-mode.el wisent/python.el
-
-Damien Cassou: changed info.el
-
 Damien Elmes: changed erc.el erc-dcc.el erc-track.el erc-log.el
-  erc-pcomplete.el README erc-button.el erc-nets.el erc-ring.el Makefile
-  erc-fill.el erc-match.el erc-members.el erc-nickserv.el
+  erc-pcomplete.el erc-button.el erc-nets.el erc-ring.el erc-fill.el
+  erc-match.el erc-members.el erc-nickserv.el
 
 Damon Anton Permezel: wrote hanoi.el (public domain)
 
@@ -745,59 +651,48 @@ Dan Christensen: changed gnus-sum.el nndoc.el nnfolder.el gnus-art.el
   spam.el time-date.el
 
 Dan Davison: wrote ob-matlab.el ob-octave.el
-and co-wrote ob-R.el ob-core.el ob-exp.el ob-lob.el ob-perl.el
-  ob-python.el ob-ref.el org-src.el
-and changed ob.el ob-sh.el org.el ox.el ox-latex.el ob-tangle.el ob-C.el
+and co-wrote ob-R.el ob-exp.el ob-lob.el ob-perl.el ob-python.el
+  ob-ref.el ob.el org-src.el
+and changed ob-sh.el org-exp.el org.el org-latex.el ob-tangle.el ob-C.el
   ob-asymptote.el ob-clojure.el ob-haskell.el ob-ruby.el ob-scheme.el
   ob-table.el ob-ditaa.el ob-dot.el ob-gnuplot.el ob-js.el ob-mscgen.el
-  ob-ocaml.el ob-org.el ob-plantuml.el and 14 other files
+  ob-ocaml.el ob-org.el ob-plantuml.el ob-sass.el and 13 other files
 
 Dan Nicolaescu: wrote iris-ansi.el romanian.el vc-dir.el
 and co-wrote hideshow.el
-and changed vc.el configure.ac vc-hg.el vc-git.el src/Makefile.in
-  vc-bzr.el sysdep.c emacs.c process.c vc-cvs.el lisp.h term.c
-  vc-hooks.el xterm.c keyboard.c vc-svn.el xterm.el callproc.c darwin.h
-  term.el gnu-linux.h and 925 other files
+and changed vc.el Makefile.in configure.in vc-hg.el vc-git.el vc-bzr.el
+  sysdep.c emacs.c process.c vc-cvs.el lisp.h term.c vc-hooks.el xterm.c
+  keyboard.c vc-svn.el xterm.el callproc.c darwin.h term.el gnu-linux.h
+  and 918 other files
 
 Dan Rosenberg: changed movemail.c
 
-Dani Moncayo: changed Makefile.in buffers.texi configure.ac lists.texi
-  mini.texi msys-to-w32 nt/makefile.w32-in INSTALL basic.texi custom.texi
-  dired.texi display.texi emacs-lisp-intro.texi killing.texi make-dist
-  mark.texi msysconfig.sh simple.el text.texi version.el zipdist.bat
-
-Daniel Bergey: changed indian.el
+Dani Moncayo: changed buffers.texi lists.texi custom.texi dired.texi
+  makefile.w32-in text.texi
 
 Daniel Brockman: changed cus-start.el format-spec.el ibuffer.el rcirc.el
 
-Daniel Clemente: changed generic-x.el ox-html.el
+Daniel Clemente: changed generic-x.el org-html.el
 
 Daniel Colascione: co-wrote js.el
-and changed w32fns.c emacs.c image.c keyboard.c configure.ac cygw32.c
-  process.c src/Makefile.in w32term.h cygw32.h dbusbind.c sh-script.el
-  unexw32.c w32term.c alloc.c cl-macs.el coding.c conf_post.h menu.c
-  w32-win.el w32.c and 100 other files
+and changed cmdproxy.c subr.el syntax.el DEBUG cc-engine.el cus-start.el
+  eval.c fns.c frames.texi imenu.el keyboard.c lisp.h nxml-mode.el
+  nxml-rap.el nxml-util.el sh-script.el which-func.el
 
-Daniel Dehennin: changed mml2015.el gnus-msg.el mm-decode.el ox.el
+Daniel Dehennin: changed mml2015.el gnus-msg.el mm-decode.el
 
 Daniel E. Doherty: changed calc.texi
 
-Daniel Elliott: changed octave.el
+Daniel Elliott: changed octave-mod.el
 
 Daniel Engeler: changed sysdep.c elisp.texi emacs.texi internals.texi
   misc.texi process.c process.h processes.texi term.el w32.c w32.h
 
-Daniel Hackney: wrote package-test.el package-x-test.el
-and co-wrote package.el
-and changed package-x.el ange-ftp.el automated/Makefile.in browse-url.el
-  dbus.el dired-x.el ediff-diff.el ediff-init.el ediff-merg.el
-  ediff-mult.el ediff-util.el ediff-wind.el ediff.el emacsclient.c
-  emerge.el eudc.el eudcb-ldap.el eww.el finder.el imap.el package
-  and 6 other files
+Daniel Hackney: changed emacsclient.c package.el process.c
 
 Daniel Jensen: changed apropos.el
 
-Daniel Laliberte: wrote cust-print.el edebug.el isearch.el
+Daniel Laliberte: wrote cl-specs.el cust-print.el edebug.el isearch.el
 and co-wrote hideif.el
 and changed mlconvert.el eval-region.el
 
@@ -829,42 +724,35 @@ Danny Roozendaal: wrote handwrite.el
 
 Danny Siu: changed gnus-sum.el gnus-picon.el nndoc.el nnimap.el smiley.el
 
-Darren Hoo: changed db-find.el db.el gnus-art.el isearch.el man.el
-  nsmenu.m startup.el
+Darren Hoo: changed db.el gnus-art.el
 
 Darren Stalder: changed gnus-util.el
 
 Darrin B. Jewell: changed etags.c lisp.h
 
-Dato Simó: changed network-stream.el
-
 Dave Detlefs: co-wrote cc-align.el cc-cmds.el cc-defs.el cc-engine.el
   cc-langs.el cc-menus.el cc-mode.el cc-styles.el cc-vars.el
 
-Dave Goldberg: changed message.el
-
 Dave Lambert: changed sol2-5.h xfns.c xterm.c xterm.h
 
 Dave Love: wrote autoarg.el autoconf.el benchmark.el cap-words.el
   cfengine.el elide-head.el hl-line.el language/georgian.el
-  latin1-disp.el quail/georgian.el refill.el rfc1345.el sgml-input.el
-  smiley.el sym-comp.el tool-bar.el uni-input.el utf-7.el utf-8-lang.el
-  vc/vc-bzr.el welsh.el
+  latin1-disp.el progmodes/python.el quail/georgian.el refill.el
+  rfc1345.el sgml-input.el smiley.el sym-comp.el tool-bar.el uni-input.el
+  utf-7.el utf-8-lang.el vc/vc-bzr.el welsh.el
 and co-wrote latin-ltx.el socks.el
-and changed configure.ac help.el mule-cmds.el fortran.el mule-conf.el
-  xterm.c browse-url.el mule.el coding.c src/Makefile.in european.el
-  fns.c mule-diag.el simple.el wid-edit.el cus-edit.el cus-start.el
-  files.el keyboard.c byte-opt.el info.el and 773 other files
+and changed Makefile.in configure.in help.el mule-cmds.el fortran.el
+  mule-conf.el xterm.c browse-url.el mule.el coding.c european.el fns.c
+  mule-diag.el simple.el wid-edit.el cus-edit.el cus-start.el files.el
+  keyboard.c byte-opt.el info.el and 770 other files
 
 Dave Pearson: wrote 5x5.el quickurl.el
 
 David A. Capello: changed etags.c
 
-David Abrahams: changed gnus-int.el gnus-sum.el nnimap.el
-  gnus-registry.el org-agenda.el auth-source.el coding.c cus-start.el
-  ediff-init.el ediff-util.el filelock.c gnus-range.el gnus-salt.el
-  gnus.texi mairix.el nnir.el nnmairix.el nnregistry.el org-clock.el
-  org.el
+David Abrahams: changed gnus-sum.el org-agenda.el coding.c ediff-init.el
+  gnus-registry.el gnus.texi mairix.el nnimap.el nnir.el nnmairix.el
+  nnregistry.el org-clock.el
 
 David Bakhash: wrote strokes.el
 
@@ -874,24 +762,20 @@ David Burger: changed macros.el
 
 David Byers: changed minibuf.c
 
-David Cadé: changed mpc.el
-
-David Caldwell: changed unexmacosx.c
-
 David Casperson: changed font-core.el menu-bar.el tex-mode.el
 
 David De La Harpe Golden: changed files.el mouse.el simple.el fileio.c
   cus-start.el nsselect.m select.el w32-fns.el x-win.el xterm.c
 
-David Edmondson: changed message.el mml2015.el gnus-cite.el imap.el
-  mm-uu.el mm-view.el nnfolder.el nnimap.el nnml.el shr.el
+David Edmondson: changed message.el gnus-cite.el imap.el mm-uu.el
+  mm-view.el mml2015.el nnfolder.el nnimap.el nnml.el
 
 David Engster: wrote mairix.el nnmairix.el
-and changed cedet/semantic.el db.el insert.el semantic/complete.el c.el
-  db-el.el db-find.el ede-grammar.el eieio-opt.el eieio.el eieio.texi
-  gnus.texi registry.el srecode/compile.el wisent/python.el analyze.el
-  bovine/el.el bovine/grammar.el c.by db-file.el decorate/mode.el
-  and 84 other files
+and changed gnus.texi insert.el registry.el db-find.el gnus-msg.el
+  analyze/complete.el base.el bovine-grammar.el cedet/srecode.el
+  cpp-root.el db-typecache.el db.el dictionary.el display.texi
+  document.el ede-grammar.el ede/custom.el ede/generic.el files.el
+  filters.el gnus-registry.el and 23 other files
 
 David Gillespie: wrote calc-aent.el calc-alg.el calc-arith.el calc-bin.el
   calc-comb.el calc-cplx.el calc-embed.el calc-ext.el calc-fin.el
@@ -901,9 +785,9 @@ David Gillespie: wrote calc-aent.el calc-alg.el calc-arith.el calc-bin.el
   calc-prog.el calc-rewr.el calc-rules.el calc-sel.el calc-stat.el
   calc-store.el calc-stuff.el calc-trail.el calc-undo.el calc-units.el
   calc-vec.el calc-yank.el calc.el calcalg2.el calcalg3.el calccomp.el
-  calcsel2.el cl-compat.el cl-extra.el cl-macs.el cl-seq.el cl.texi
-  edmacro.el emacs-lisp/cl-lib.el obsolete/complete.el
-and changed info.el bytecomp.el cl.el complete.el
+  calcsel2.el cl-compat.el cl-extra.el cl-macs.el cl-seq.el cl.el cl.texi
+  edmacro.el obsolete/complete.el
+and changed info.el bytecomp.el complete.el
 
 David Glasser: changed tar-mode.el
 
@@ -916,27 +800,27 @@ David Hedbor: changed nnmail.el
 
 David Hull: changed vc-hg.el
 
-David Hunter: changed config.nt flymake.el inc/ms-w32.h process.c
+David Hunter: changed config.nt flymake.el ms-w32.h process.c
 
-David J. Biesack: changed antlr-mode.el quickurl.el
+David J. Biesack: changed antlr-mode.el
 
-David J. MacKenzie: changed configure.ac Makefile.in etags.c fakemail.c
-  cvtmail.c movemail.c termcap.c wakeup.c yow.c Makefile avoid.el b2m.c
-  config.in digest-doc.c emacsclient.c emacsserver.c emacstool.c
-  etags-vmslib.c fortran.el hexl.c isearch.el and 14 other files
+David J. MacKenzie: changed configure.in etags.c Makefile.in fakemail.c
+  movemail.c wakeup.c cvtmail.c qsort.c termcap.c yow.c Makefile avoid.el
+  b2m.c config.in digest-doc.c emacsclient.c emacsserver.c emacstool.c
+  etags-vmslib.c fortran.el hexl.c and 14 other files
 
-David Kastrup: changed greek.el replace.el efaq.texi search.c ange-ftp.el
-  calc.el help.el keymaps.texi mouse.el subr.el woman.el desktop.el
-  gnus-art.el keymap.c keymap.h lisp-mnt.el meta-mode.el mpuz.el
-  process.c search.texi startup.el and 81 other files
+David Kastrup: changed quail/greek.el replace.el faq.texi search.c
+  ange-ftp.el calc.el help.el keymaps.texi mouse.el subr.el woman.el
+  Makefile.in desktop.el gnus-art.el keymap.c keymap.h lisp-mnt.el
+  meta-mode.el mpuz.el process.c search.texi and 79 other files
 
 David Kågedal: wrote tempo.el
 and changed sendmail.el xmenu.c
 
 David Lawrence: changed comint.el simple.el files.el c++-mode.el
-  compile.el inf-lisp.el shell.el emerge.el tex-mode.el c-mode.el cl.el
-  dired.el getdate.y gnus.el history.el lisp-mode.el lisp.el mh-e.el
-  rnews.el subr.el Makefile and 79 other files
+  compile.el getdate.y inf-lisp.el shell.el emerge.el tex-mode.el
+  c-mode.el cl.el dired.el emacs.1 emacsserver.c gnus.el history.el
+  lisp-mode.el lisp.el mh-e.el rnews.el and 79 other files
 
 David Lord: changed timeclock.el
 
@@ -948,11 +832,12 @@ and changed display.texi
 David M. Smith: wrote ielm.el
 and changed imenu.el pgg-def.el xterm.c
 
-David Maus: changed org.el org-agenda.el ox.el org-feed.el org-wl.el
-  org-macs.el ox-html.el org-capture.el org.texi org-gnus.el org-bbdb.el
-  org-clock.el org-protocol.el ox-publish.el ob-haskell.el ob.el
-  org-bibtex.el org-compat.el org-footnote.el org-id.el org-list.el
-  and 20 other files
+David Maus: co-wrote org-wl.el
+and changed org.el org-agenda.el org-feed.el org-exp.el org-html.el
+  org-macs.el org-capture.el org.texi org-gnus.el org-bbdb.el
+  org-clock.el org-protocol.el org-publish.el ob-haskell.el ob.el
+  org-bibtex.el org-compat.el org-footnote.el org-id.el org-latex.el
+  org-list.el and 20 other files
 
 David McCabe: changed lisp-mode.el
 
@@ -965,45 +850,40 @@ David Moore: co-wrote nnvirtual.el
 and changed gnus-xmas.el
 
 David Mosberger-Tang: changed alpha.h unexelf.c cm.h config.in
-  configure.ac cvtmail.c data.c dispnew.c emacsserver.c etags.c
+  configure.in cvtmail.c data.c dispnew.c emacsserver.c etags.c
   fakemail.c keyboard.c mem-limits.h process.c profile.c sorted-doc.c
   sysdep.c terminfo.c unexelf1.c yow.c
 
-David O'Toole: wrote ox-publish.el
+David O'Toole: wrote org-publish.el
 and co-wrote ob-lisp.el
 
-David Ponce: wrote bovine/grammar.el cedet.el comp.el java-tags.el
-  mode-local.el recentf.el ruler-mode.el semantic/grammar.el
+David Ponce: wrote bovine-grammar.el cedet.el comp.el grammar-wy.el
+  grammar.el java-tags.el mode-local.el recentf.el ruler-mode.el
   semantic/java.el semantic/wisent.el senator.el tree-widget.el
-  wisent/grammar.el wisent/wisent.el
+  wisent-grammar.el wisent/wisent.el
 and co-wrote util-modes.el
 and changed w32menu.c w32term.c close.png close.xpm empty.png empty.xpm
   end-guide.png end-guide.xpm files.el guide.png guide.xpm handle.png
   handle.xpm keyboard.c leaf.png leaf.xpm no-guide.png no-guide.xpm
-  no-handle.png no-handle.xpm open.png and 22 other files
+  no-handle.png no-handle.xpm open.png and 20 other files
 
 David Reitter: wrote mailclient.el
-and changed nsterm.m nsfns.m ns-win.el nsfont.m cus-start.el macos.texi
-  menu-bar.el nsmenu.m simple.el commands.h cus-edit.el easy-mmode.el
-  emacsbug.el emacsclient.c faces.el flyspell.el info.el keyboard.c
-  keymap.c lib-src/Makefile.in macterm.c and 13 other files
+and changed nsterm.m nsfns.m ns-win.el nsfont.m Makefile.in cus-start.el
+  macos.texi menu-bar.el nsmenu.m simple.el commands.h cus-edit.el
+  easy-mmode.el emacsbug.el emacsclient.c faces.el flyspell.el info.el
+  keyboard.c keymap.c macterm.c and 12 other files
 
-David Robinow: changed w32inevt.c lib-src/makefile.w32-in
-  lispintro/makefile.w32-in
+David Robinow: changed makefile.w32-in w32inevt.c
 
 David Robinson: changed menu-bar.el x-win.el
 
-David Röthlisberger: changed ido.el
-
 David S. Goldberg: changed gnus-art.el message.el
 
 David Vazquez: changed m4-mode.el
 
 David Z. Maze: changed nnml.el nnrss.el
 
-Davor Cubranic: changed nsterm.m
-
-Deanna Phillips: changed configure.ac
+Deanna Phillips: changed configure.in
 
 Debarshi Ray: changed erc-backend.el erc.el
 
@@ -1023,10 +903,9 @@ and changed complete.el
 
 Denis Stünkel: changed ibuf-ext.el
 
-Deniz Dogan: changed rcirc.el simple.el css-mode.el TUTORIAL.sv
-  commands.texi erc-log.el erc.el image.el iswitchb.el lisp-mode.el
-  process.c progmodes/python.el quickurl.el rcirc.texi vc/vc-bzr.el
-  wdired.el window.el
+Deniz Dogan: changed rcirc.el simple.el css-mode.el commands.texi
+  image.el iswitchb.el lisp-mode.el process.c progmodes/python.el
+  quickurl.el rcirc.texi vc/vc-bzr.el wdired.el window.el
 
 Dennis Gilmore: changed sparc.h
 
@@ -1044,14 +923,14 @@ Detlev Zundel: wrote re-builder.el
 
 Devon Sean McCullough: changed comint.el url-http.el
 
-Dhruva Krishnamurthy: changed emacsclient.c fontset.c makefile.w32-in
-  misc/makefile.w32-in nt/makefile.w32-in sound.c w32proc.c
+Dhruva Krishnamurthy: changed makefile.w32-in emacsclient.c fontset.c
+  sound.c w32proc.c
 
 Diane Murray: changed erc.el erc-backend.el erc-menu.el erc-button.el
   erc-track.el erc-match.el erc-nets.el erc-list.el erc-autoaway.el
   erc-capab.el erc-nickserv.el erc-stamp.el erc-compat.el erc-fill.el
   erc-goodies.el erc-ibuffer.el erc-log.el erc-nicklist.el url-http.el
-  Makefile erc-dcc.el and 37 other files
+  erc-dcc.el erc-networks.el and 35 other files
 
 Didier Verna: wrote gnus-diary.el nndiary.el
 and co-wrote nnml.el
@@ -1059,11 +938,11 @@ and changed nntp.el message.el gnus-group.el gnus-sum.el gnus-msg.el
   gnus.texi gnus-art.el gnus-srvr.el gnus-start.el gnus-topic.el
   gnus-xmas.el gnus-picon.el gnus-salt.el cus-edit.el gnus-int.el
   gnus-util.el message.texi nnmail.el rect.el cl-indent.el gmm-utils.el
-  and 9 other files
+  and 8 other files
 
 Dieter Schuster: changed etags.c
 
-Dima Kogan: changed hideshow.el subword.el gud.el simple.el
+Dima Kogan: changed hideshow.el
 
 Dirk Herrmann: co-wrote bibtex.el
 
@@ -1073,21 +952,16 @@ Dirk-Jan C. Binnema: changed org-agenda.el
 
 Dmitri Paduchikh: changed advice.el
 
-Dmitry Antipov: changed xdisp.c alloc.c lisp.h xterm.c buffer.c window.c
-  frame.c xfns.c w32term.c frame.h font.c nsterm.m w32fns.c xfaces.c
-  dispnew.c editfns.c keyboard.c window.h xterm.h dispextern.h buffer.h
-  and 238 other files
+Dmitry Antipov: changed alloc.c keyboard.c buffer.c ccl.c editfns.c
+  emacs.c fontset.c keymap.c lisp.h lread.c lwlib-Xaw.c lwlib-Xm.c
+  lwlib-utils.c lwlib.c macmenu.c w32menu.c xdisp.c xlwmenu.c xmenu.c
 
 Dmitry Bolshakov: changed hideshow.el
 
 Dmitry Dzhus: changed gdb-mi.el gud.el fadr.el all.xpm building.texi
   emacs.texi process.c thread.xpm
 
-Dmitry Gutov: changed ruby-mode.el ruby-mode-tests.el ruby.rb package.el
-  log-edit.el vc-git.el package-test.el newcomment.el archive-contents
-  js.el lisp.el minibuffer.el package-x-test.el whitespace.el
-  lisp-mode.el package-x.el programs.texi simple.el smie.el vc.el
-  .dir-locals.el and 20 other files
+Dmitry Gutov: changed lisp.el ruby-mode.el
 
 Dmitry Kurochkin: changed isearch.el
 
@@ -1103,18 +977,14 @@ Doug Cutting: co-wrote disass.el
 
 Doug Maxey: changed mouse.el
 
-Douglas Lewan: changed TUTORIAL.pt_BR
-
 Drake Wilson: changed emacsclient.c files.el misc.texi
 
 Drew Adams: wrote light-blue-theme.el
 and co-wrote color.el
-and changed cus-edit.el dired.el faces.el files.el help-mode.el imenu.el
-  info.el isearch.el menu-bar.el mouse.el ange-ftp.el bindings.el
-  bookmark.el custom.el descr-text.el dired.texi etags.el finder.el
-  frame.el help-fns.el help.el and 10 other files
-
-E Sabof: changed hi-lock.el image-dired.el
+and changed cus-edit.el dired.el faces.el files.el info.el isearch.el
+  menu-bar.el mouse.el ange-ftp.el bindings.el bookmark.el custom.el
+  descr-text.el dired.texi etags.el finder.el frame.el help-fns.el
+  help.el image-dired.el modes.texi and 7 other files
 
 E. Jay Berkenbilt: changed b2m.c flyspell.el ispell.el unrmail.el
   whitespace.el window.h
@@ -1123,11 +993,9 @@ Ed L. Cashin: changed gnus-sum.el imap.el
 
 Ed Swarthout: changed hexl.el textmodes/table.el
 
-Eduard Wiebe: wrote flymake-tests.el
-and changed dired.el flymake.texi Makefile browse-url.el flymake.el
-  footnote.el javascript.el jit-lock.el korean.el locate.el mule-conf.el
-  nxml-mode.texi objects.texi ps-print.el sysdep.c test.c test.pl
-  vc-rcs.el
+Eduard Wiebe: changed dired.el browse-url.el flymake.texi footnote.el
+  javascript.el jit-lock.el korean.el locate.el mule-conf.el
+  nxml-mode.texi objects.texi ps-print.el vc-rcs.el
 
 Eduardo Muñoz: changed dired.el ls-lisp.el
 
@@ -1150,7 +1018,7 @@ Edward Trumbo: changed Makefile.in
 
 Edwin Steiner: changed gnus-nocem.el
 
-Ehud Karni: changed rmail.el aviion-intel.h complete.el configure.ac
+Ehud Karni: changed rmail.el aviion-intel.h complete.el configure.in
   frame.el progmodes/compile.el rmailsum.el sort.el xdisp.c
 
 Eirik Fuller: changed ralloc.c xterm.c
@@ -1159,20 +1027,19 @@ Eli Barzilay: wrote calculator.el
 
 Eli Tziperman: wrote rmail-spam-filter.el
 
-Eli Zaretskii: wrote [bidirectional display in xdisp.c]
-  [tty menus in term.c] bidi.c rxvt.el tty-colors.el
-and changed xdisp.c msdos.c w32.c w32fns.c files.el fileio.c simple.el
-  display.texi w32proc.c dispnew.c sed1v2.inp src/makefile.w32-in
-  config.bat msdos.h emacs.c term.c process.c dispextern.h
-  src/Makefile.in info.el mainmake.v2 and 795 other files
+Eli Zaretskii: wrote [bidirectional display in xdisp.c] bidi.c rxvt.el
+  tty-colors.el
+and changed makefile.w32-in xdisp.c msdos.c Makefile.in files.el
+  config.bat fileio.c simple.el msdos.h info.el mainmake.v2 rmail.el
+  sed1v2.inp display.texi w32.c pc-win.el process.c dispnew.c startup.el
+  dispextern.h dired.c and 702 other files
 
-Elias Oltmanns: changed tls.el gnus-agent.el gnus-cite.el gnus-int.el
-  gnus-srvr.el gnus.el
+Elias Oltmanns: changed tls.el gnus-agent.el gnus-int.el gnus-srvr.el
+  gnus.el
 
-Elias Pipping: changed doc-view.el XDelAssoc.c XMakeAssoc.c files.el
-  shr.el
+Elias Pipping: changed XDelAssoc.c XMakeAssoc.c shr.el
 
-Emanuele Giaquinta: changed configure.ac rxvt.el charset.c etags.c
+Emanuele Giaquinta: changed configure.in rxvt.el charset.c etags.c
   fontset.c frame.el gnus-faq.texi loadup.el lread.c sh-script.el
   text.texi
 
@@ -1182,29 +1049,29 @@ Emilio C. Lopes: changed woman.el cmuscheme.el help.el vc.el advice.el
   animate.el apropos.el artist.el bookmark.el cal-menu.el calc-prog.el
   calc-store.el calcalg3.el calendar.el calendar.texi checkdoc.el
   code-pages.el codepage.el completion.el cus-edit.el diff.el
-  and 54 other files
+  and 53 other files
 
 Emmanuel Briot: wrote ada-prj.el xml.el
 and co-wrote ada-mode.el ada-xref.el
 and changed ada-stmt.el
 
-Era Eriksson: changed bibtex.el dired.el ses.el ses.texi shell.el
-  tramp.el tramp.texi
-
-Eric Abrahamsen: changed org.el org.texi ox-html.el ox-latex.el
+Era Eriksson: changed bibtex.el dired.el shell.el tramp.el tramp.texi
 
 Eric Bélanger: changed image.c
 
-Eric Decker: changed sysdep.c (and other files for HP-UX support)
+Eric Decker: changed hp800.h hpux10-20.h sysdep.c
 
 Eric Ding: wrote goto-addr.el
 and changed mh-utils.el mh-e.el mh-comp.el mh-mime.el
 
 Eric Eide: changed gnus-xmas.el
 
-Eric Hanchrow: changed erc.el vc-git.el TUTORIAL.es abbrev.el
-  autorevert.el cperl-mode.el dired.el emacsclient.c env.el frames.texi
-  ibuf-ext.el ispell.el ldap.el make-dist opascal.el tramp.texi window.el
+Eric Hanchrow: changed vc-git.el TUTORIAL.es abbrev.el autorevert.el
+  cperl-mode.el delphi.el dired.el emacsclient.c env.el erc.el
+  frames.texi ibuf-ext.el ispell.el ldap.el make-dist tramp.texi
+  window.el
+
+Éric Jacoboni: changed fr-refcard.tex
 
 Eric Knauel: changed gnus.el spam-report.el spam.el
 
@@ -1219,13 +1086,12 @@ Eric M. Ludlam: wrote analyze.el analyze/complete.el analyze/debug.el
   ede.el ede/custom.el ede/dired.el ede/files.el ede/generic.el
   ede/linux.el ede/locate.el ede/make.el ede/shell.el ede/simple.el
   ede/speedbar.el ede/srecode.el ede/util.el edit.el eieio-base.el
-  eieio-core.el eieio-custom.el eieio-datadebug.el eieio-opt.el
-  eieio-speedbar.el eieio-test-methodinvoke.el eieio-test-persist.el
-  eieio-tests.el eieio.el emacs-lisp/chart.el emacs.el expandproto.el
-  extract.el ezimage.el fcn.el fields.el filter.el filters.el fw.el
-  gcc.el getset.el global.el html.el ia-sb.el ia.el idle.el idutils.el
-  include.el insert.el inversion.el javascript.el lex-spp.el lex.el
-  list.el makefile-edit.el map.el mru-bookmark.el pconf.el pmake.el
+  eieio-custom.el eieio-datadebug.el eieio-opt.el eieio-speedbar.el
+  eieio.el emacs-lisp/chart.el emacs.el expandproto.el extract.el
+  ezimage.el fcn.el fields.el filter.el filters.el fw.el gcc.el getset.el
+  global.el html.el ia-sb.el ia.el idle.el idutils.el include.el
+  insert.el inversion.el javascript.el lex-spp.el lex.el list.el
+  makefile-edit.el map.el mru-bookmark.el pconf.el pmake.el
   proj-archive.el proj-aux.el proj-comp.el proj-elisp.el proj-info.el
   proj-misc.el proj-obj.el proj-prog.el proj-scheme.el proj-shared.el
   proj.el project-am.el pulse.el refs.el sb-image.el sb.el scm.el
@@ -1239,52 +1105,48 @@ Eric M. Ludlam: wrote analyze.el analyze/complete.el analyze/debug.el
   srt.el symref.el symref/grep.el system.el tag-file.el tag-ls.el
   tag-write.el tag.el test.el
 and co-wrote db-ebrowse.el srecode/cpp.el util-modes.el
-and changed c.srt ede.texi info.el rmail.el speedbspec.el cedet.el
-  ede-autoconf.srt ede-make.srt eieio.texi gud.el sb-dir-minus.xpm
+and changed info.el rmail.el speedbspec.el gud.el sb-dir-minus.xpm
   sb-dir-plus.xpm sb-dir.xpm sb-mail.xpm sb-pg-minus.xpm sb-pg-plus.xpm
   sb-pg.xpm sb-tag-gt.xpm sb-tag-minus.xpm sb-tag-plus.xpm
-  sb-tag-type.xpm and 30 other files
+  sb-tag-type.xpm sb-tag-v.xpm sb-tag.xpm Makefile.in c-by.el cedet.el
+  comint.el and 18 other files
 
 Eric Marsden: changed gnus-cache.el url-util.el
 
 Eric S Fraga: wrote ob-ledger.el
 and co-wrote ob-maxima.el
-and changed ox-icalendar.el org.texi ox-latex.el
+and changed org-icalendar.el org-latex.el org.texi
 
 Eric S. Raymond: wrote AT386.el asm-mode.el cookie1.el finder.el gud.el
   keyswap.el lisp-mnt.el loadhist.el
 and co-wrote make-mode.el
-and changed vc.el vc-hooks.el vc-svn.el vc-cvs.el vc-git.el files.texi
-  vc-bzr.el vc-dispatcher.el vc-hg.el vc-sccs.el vc-rcs.el vc-mcvs.el
-  files.el comint.el emacsbug.el simple.el vc-arch.el vc-mtn.el
-  add-log.el cust-print.el dired.el and 257 other files
+and changed vc.el vc-hooks.el vc-svn.el vc-cvs.el files.texi vc-bzr.el
+  vc-dispatcher.el vc-git.el vc-hg.el vc-sccs.el vc-rcs.el vc-mcvs.el
+  Makefile.in files.el comint.el simple.el vc-arch.el vc-mtn.el
+  add-log.el cust-print.el dired.el and 249 other files
 
 Eric Schulte: wrote ob-C.el ob-asymptote.el ob-awk.el ob-calc.el
   ob-comint.el ob-css.el ob-ditaa.el ob-dot.el ob-emacs-lisp.el
   ob-eval.el ob-gnuplot.el ob-haskell.el ob-java.el ob-js.el ob-keys.el
-  ob-latex.el ob-makefile.el ob-ocaml.el ob-org.el ob-ruby.el ob-sass.el
+  ob-latex.el ob-ocaml.el ob-org.el ob-ruby.el ob-sass.el ob-scheme.el
   ob-sh.el ob-shen.el ob-sql.el ob-sqlite.el ob-table.el ob-tangle.el
-  ob.el org-plot.el
-and co-wrote ob-R.el ob-clojure.el ob-core.el ob-exp.el ob-fortran.el
-  ob-lisp.el ob-lob.el ob-maxima.el ob-perl.el ob-picolisp.el
-  ob-python.el ob-ref.el ob-scheme.el org-bibtex.el
-and changed org.texi org.el org-exp-blocks.el ox.el ox-latex.el
-  org-src.el ob-plantuml.el org-macs.el org-table.el ob-screen.el
-  org-agenda.el org-mouse.el orgcard.tex ob-lilypond.el ob-mscgen.el
-  ob-octave.el org-clock.el org-compat.el org-footnote.el ox-ascii.el
-  ox-html.el and 12 other files
+  org-exp-blocks.el org-plot.el
+and co-wrote ob-R.el ob-clojure.el ob-exp.el ob-fortran.el ob-lisp.el
+  ob-lob.el ob-maxima.el ob-perl.el ob-picolisp.el ob-python.el ob-ref.el
+  ob.el org-bibtex.el
+and changed org.texi org.el org-exp.el org-latex.el ob-plantuml.el
+  org-src.el org-table.el org-agenda.el org-macs.el orgcard.tex
+  ob-lilypond.el ob-mscgen.el ob-octave.el ob-screen.el org-ascii.el
+  org-footnote.el org-html.el org-mouse.el gnus-art.el ob-ledger.el
+  ob-matlab.el and 5 other files
 
 Eric Youngdale: changed etags-vmslib.c
 
 Eric Yu: changed speedbar.texi
 
-Erik Charlebois: changed syntax.el w32fns.c w32term.c w32term.h
-
-Erik Hetzner: changed org.el
-
 Erik Naggum: wrote disp-table.el mailheader.el parse-time.el
 and changed simple.el emacs.c files.el lread.c rmail.el alloc.c editfns.c
-  keyboard.c apropos.el configure.ac dispnew.c filelock.c fns.c keymap.c
+  keyboard.c apropos.el configure.in dispnew.c filelock.c fns.c keymap.c
   lisp.h print.c process.c add-log.el buffer.c casetab.c cl-macs.el
   and 114 other files
 
@@ -1297,7 +1159,7 @@ Espen Wiborg: changed utf-7.el
 Ethan Bradford: changed ispell.el ange-ftp.el gnus.el gnuspost.el lpr.el
   mailalias.el vt-control.el
 
-Ethan Ligon: changed org-docbook.el ox-html.el
+Ethan Ligon: changed org-docbook.el org-html.el
 
 Eugene Exarevsky: changed sql.el
 
@@ -1307,31 +1169,21 @@ Evgeni Dobrev: changed man.el
 
 Evgeny Roubinchtein: changed mail-source.el pc-select.el
 
-Exal de Jesus Garcia Carrillo: changed erc-sound.el erc.texi
-
-Eyal Lotem: changed ido.el
+Exal de Jesus Garcia Carrillo: changed erc.texi erc-sound.el
 
 F. Thomas May: wrote blackbox.el
 
-Fabián Ezequiel Gallina: wrote progmodes/python.el
-and changed python-tests.el imenu.el
+Fabian Ezequiel Gallina: changed progmodes/python.el
 
 Fabrice Bauzac: changed dired-aux.el
 
-Fabrice Niessen: wrote leuven-theme.el
-and changed org-agenda.el
-
-Fabrice Popineau: changed w32.c w32fns.c ms-w32.h w32heap.c w32term.c
-  configure.ac lisp.h nmake.defs unexw32.c w32proc.c addsection.c alloc.c
-  config.nt dispextern.h emacs-x64.manifest emacs-x86.manifest emacs.c
-  etags.c fileio.c frame.c gmake.defs and 19 other files
+Fabrice Popineau: changed config.nt etags.c fileio.c gnus-cache.el
+  inttypes.h lisp.h ms-w32.h nmake.defs regex.c stdint.h w32.c w32heap.c
 
 Fan Kai: changed esh-arg.el
 
 Faried Nawaz: changed message.el
 
-Felix H. Dahlke: changed js.el
-
 Felix Lee: changed flyspell.el outline.el cl.texi data.c gud.el nntp.el
   process.c progmodes/compile.el vc.el xdisp.c
 
@@ -1339,22 +1191,14 @@ Felix Mueller: changed nsterm.m
 
 Felix S. T. Wu: co-wrote vi.el (public domain)
 
-Feng Li: changed calc-ext.el pascal.el which-func.el
-
-Feng Shu: changed org.el org.texi ox.el ox-html.el ox-latex.el ox-odt.el
+Feng Li: changed calc-ext.el
 
 Ferenc Wagner: changed nnweb.el
 
 Filipe Cabecinhas: changed nsterm.m
 
-Filipp Gunbin: changed cc-menus.el
-
 Flemming Hoejstrup Hansen: changed forms.el
 
-Florian Adamsky: changed recentf.el
-
-Florian Beck: changed org.el
-
 Florian Ragwitz: changed gnus-html.el sieve-manage.el
 
 Florian Weimer: changed message.el gnus.el coding.c gnus-sum.el gnus.texi
@@ -1366,13 +1210,11 @@ Francesc Rocher: changed MORE.STUFF startup.el cus-start.el gnus.el
   gnus.png gnus.svg macterm.c splash.png splash.svg splash8.xpm w32term.c
   xdisp.c xterm.c
 
-Francesco Pizzolante: changed org-clock.el org-macs.el org.el ox-html.el
-
 Francesco Potortì: wrote cmacexp.el
-and changed etags.c man.el delta.h etags.1 undigest.el comint.el
-  configure.ac maintaining.texi uniquify.el latin-post.el rmail.el
-  etags.el latin-alt.el lib-src/Makefile.in sgml-mode.el Makefile.in
-  data.c european.el filelock.c files.el generic-x.el and 44 other files
+and changed etags.c man.el delta.h etags.1 undigest.el Makefile.in
+  comint.el configure.in maintaining.texi uniquify.el latin-post.el
+  rmail.el etags.el latin-alt.el sgml-mode.el data.c european.el
+  filelock.c files.el generic-x.el gud.el and 45 other files
 
 Francis Devereux: changed nsfont.m
 
@@ -1380,10 +1222,10 @@ Francis J. Wright: wrote woman.el
 and changed dired.el comint.el cus-edit.el files.el ps-print.el
 
 Francis Litterio: changed erc.el erc-list.el erc-dcc.el erc-notify.el
-  erc-button.el erc-goodies.el erc-nets.el erc-ring.el Makefile
-  erc-pcomplete.el message.el erc-backend.el erc-ibuffer.el erc-match.el
-  erc-nickserv.el erc-page.el erc-speedbar.el gnus-util.el keymaps.texi
-  os.texi saveplace.el and 4 other files
+  erc-button.el erc-goodies.el erc-nets.el erc-ring.el erc-pcomplete.el
+  message.el erc-backend.el erc-ibuffer.el erc-match.el erc-nickserv.el
+  erc-page.el erc-speedbar.el gnus-util.el keymaps.texi os.texi
+  saveplace.el w32term.c and 3 other files
 
 Francois Felix Ingrand: changed gnus-salt.el
 
@@ -1398,8 +1240,6 @@ Frank Schmitt: changed gnus-sum.el cmdargs.texi gnus-faq.texi
 
 Frank Weinberg: changed gnus-art.el
 
-François Allisson: changed org.texi
-
 François Pinard: co-wrote po.el
 and changed nndoc.el allout.el bytecomp.el gnus-sum.el gnus-util.el
   gnus-uu.el make-mode.el nnmail.el org.el rmailsum.el timezone.el
@@ -1417,9 +1257,9 @@ and changed gnus.el
 
 Frederic Pierresteguy: wrote widget.c
 and changed xmenu.c xterm.c xfns.c dpx2.h lwlib.c rmailsum.el rmail.el
-  xlwmenu.c xterm.h lwlib-Xaw.c lwlib-Xlw.c configure.ac lwlib-Xaw.h
-  lwlib-int.h xdisp.c compile.el editfns.c fns.c frame.h hilit19.el
-  keyboard.c and 10 other files
+  xlwmenu.c xterm.h lwlib-Xaw.c lwlib-Xlw.c Makefile.in configure.in
+  lwlib-Xaw.h lwlib-int.h xdisp.c compile.el editfns.c fns.c frame.h
+  hilit19.el and 9 other files
 
 Frederik Fouvry: changed sendmail.el TUTORIAL.nl emacs.bash faces.el
   filecache.el mailalias.el rmail.el thumbs.el
@@ -1459,56 +1299,45 @@ Geoff Gole: changed align.el ibuffer.el whitespace.el
 
 Geoff Greene: changed message.el
 
-Geoff Kuenning: changed gnus-art.el gnus.texi
-
 Geoff Voelker: wrote ms-w32.h w32-fns.el w32.c w32.h w32heap.c w32heap.h
   w32inevt.c w32proc.c w32term.c
 and changed makefile.nt w32fns.c fileio.c makefile.def callproc.c
-  s/ms-w32.h emacs.bat.in unexw32.c w32term.h dos-w32.el loadup.el
-  w32-win.el emacs.c keyboard.c ntterm.c process.c w32console.c addpm.c
-  cmdproxy.c comint.el files.el and 102 other files
+  s/ms-w32.h unexw32.c w32term.h dos-w32.el emacs.bat loadup.el
+  w32-win.el emacs.c keyboard.c process.c w32console.c addpm.c cmdproxy.c
+  comint.el files.el ntterm.c and 104 other files
 
 Georg C. F. Greve: changed pgg-gpg.el
 
-George Kettleborough: changed org-clock.el org-timer.el
-
-George Mcninch: changed nnir.el
-
 George V. Reilly: changed emacs.ico makefile.nt
 
 Georges Brun-Cottan: wrote easy-mmode.el
 
 Gerd Möllmann: wrote authors.el ebrowse.el jit-lock.el rx.el tooltip.el
 and changed xdisp.c xterm.c dispnew.c dispextern.h xfns.c xfaces.c
-  window.c keyboard.c lisp.h faces.el alloc.c buffer.c startup.el xterm.h
-  fns.c simple.el term.c configure.ac frame.c xmenu.c emacs.c
-  and 613 other files
+  window.c keyboard.c lisp.h Makefile.in faces.el alloc.c buffer.c
+  startup.el xterm.h fns.c simple.el term.c frame.c xmenu.c emacs.c
+  and 617 other files
 
 Gergely Nagy: changed erc.el
 
-Gergely Risko: changed coding.c
-
 Germano Caronni: changed ralloc.c
 
 Gernot Heiser: changed refer.el
 
-Giorgos Keramidas: changed configure.ac erc-backend.el erc.el .bzrignore
-  alloc.c amdx86-64.h apropos.el display.texi erc-services.el filelock.c
-  fringe.c fringe.el lisp.h rcirc.el windows.texi xmenu.c
-
-Giovanni Ridolfi: changed org.texi
+Giorgos Keramidas: changed configure.in erc-backend.el erc.el alloc.c
+  amdx86-64.h apropos.el display.texi erc-services.el filelock.c fringe.c
+  fringe.el lisp.h rcirc.el windows.texi xmenu.c
 
 Giuliano Procida: changed perl-mode.el
 
-Giuseppe Scrivano: changed browse-url.el buffer.c configure.ac sysdep.c
+Giuseppe Scrivano: changed browse-url.el buffer.c configure.in sysdep.c
   xsmfns.c
 
 Glenn Morris: wrote automated/f90.el automated/vc-bzr.el check-declare.el
-and changed configure.ac src/Makefile.in calendar.el Makefile.in
-  diary-lib.el files.el lisp/Makefile.in rmail.el progmodes/f90.el
-  bytecomp.el emacs.texi simple.el make-dist ack.texi misc/Makefile.in
-  cal-menu.el appt.el cal-hebrew.el display.texi startup.el calendar.texi
-  and 1537 other files
+and changed Makefile.in configure.in calendar.el diary-lib.el rmail.el
+  progmodes/f90.el files.el cal-menu.el appt.el cal-hebrew.el fortran.el
+  bytecomp.el holidays.el emacs.texi calendar.texi ack.texi make-dist
+  simple.el sed1v2.inp cal-islam.el dired-x.el and 1249 other files
 
 Glynn Clements: wrote gamegrid.el snake.el tetris.el
 
@@ -1516,7 +1345,7 @@ Gordon Matzigkeit: changed gnus-uu.el
 
 Greg Hill: changed bytecomp.el
 
-Greg Hudson: changed configure.ac indent.c
+Greg Hudson: changed configure.in indent.c
 
 Greg Klanderman: changed messagexmas.el
 
@@ -1525,22 +1354,15 @@ and changed tar-mode.el
 
 Greg Stark: changed gnus-ems.el timezone.el
 
-Gregor Kappler: changed ox.el
-
 Gregor Schmid: changed intervals.c intervals.h tcl-mode.el textprop.c
   dispnew.c indent.c xdisp.c
 
-Gregor Zattler: changed emacs-lisp-intro.texi
-
 Gregorio Gervasio, Jr.: changed gnus-sum.el
 
 Gregory Chernov: changed nnslashdot.el
 
 Gregory Neil Shapiro: changed mailabbrev.el
 
-Grégoire Jadi: changed org.texi ob-core.el org-id.el org.el reporter.el
-  sendmail.el
-
 Guanpeng Xu: changed add-log.el TUTORIAL.cn display.texi mouse.el
   pcomplete.el search.c subr.el type-break.el
 
@@ -1548,14 +1370,10 @@ Gunnar Horrigmo: changed gnus-sum.el
 
 Gustav Hållberg: changed descr-text.el progmodes/compile.el rect.el vc.el
 
-Gustav Wikström: changed org-agenda.el org.texi
-
 Guy Geens: changed gnus-score.el
 
 Gwern Branwen: changed browse-url.el
 
-Gábor Vida: changed gnus-demon.el auth-source.el ido.el
-
 Göran Uddeborg: changed isc4-1.h
 
 Hallvard B. Furuseth: co-wrote byte-opt.el byte-run.el bytecomp.el
@@ -1568,8 +1386,6 @@ Han Boetes: changed netbsd.h
 
 Han-Wen Nienhuys: changed emacsclient.c server.el
 
-Hanataka, Shinya: changed coding.c
-
 Hans Chalupsky: wrote advice.el trace.el
 and changed bytecomp.el
 
@@ -1577,24 +1393,19 @@ Hans Henrik Eriksen: wrote simula.el
 
 Hans de Graaff: changed mml.el
 
-Hans-Peter Deifel: changed ob.el
-
 Harald Maier: changed w32heap.c
 
 Harald Meland: changed gnus-art.el gnus-salt.el gnus-score.el
   gnus-util.el gnus-win.el mail-source.el
 
-Harri Kiiskinen: changed org-protocol.el ox-publish.el
+Harri Kiiskinen: changed org-publish.el
 
 Heiko Muenkel: changed b2m.c
 
-Helmut Eller: changed emacs-lisp/debug.el cl-indent.el cl-macs.el eval.c
-  lisp-mode.el process-tests.el process.c
+Helmut Eller: changed cl-macs.el emacs-lisp/debug.el process.c
 
 Helmut Waitzmann: changed gnus-sum.el gnus.texi
 
-Henning Weiss: changed org-mobile.el
-
 Henrik Enberg: changed rmailout.el gnus-art.el gnus-msg.el lread.c
   mail/rmailmm.el rmail.el rmailedit.el rmailkwd.el rmailmsc.el
   rmailsort.el rmailsum.el xfaces.c
@@ -1611,7 +1422,7 @@ Hewlett-Packard: changed emacsclient.c keyboard.c server.el
 
 Hideki Iwamoto: changed etags.c
 
-Hiroshi Fujishima: changed efaq.texi gnus-score.el mail-source.el
+Hiroshi Fujishima: changed faq.texi gnus-score.el mail-source.el
   spam-stat.el
 
 Hiroshi Nakano: changed ralloc.c unexelf.c
@@ -1646,7 +1457,7 @@ Håkan Granath: changed dired.el
 
 Håkon Malmedal: changed calendar.el holidays.el
 
-Ian Eure: changed sql.el url-util.el
+Ian Eure: changed sql.el
 
 Ian Lance Taylor: changed sco4.h
 
@@ -1655,8 +1466,6 @@ and changed ange-ftp.el desktop.el tex-mode.el
 
 Igor Kuzmin: wrote cconv.el
 
-Ikumi Keita: changed characters.el minibuf.c
-
 Ilja Weis: co-wrote gnus-topic.el
 
 Ilya N. Golubev: changed mm-util.el shell.el
@@ -1666,10 +1475,8 @@ Ilya Shlyakhter: changed org.el ob-lilypond.el org-clock.el
 
 Ilya Zakharevich: wrote tmm.el
 and co-wrote cperl-mode.el
-and changed syntax.c intervals.c syntax.h textprop.c dired.c font-lock.el
-  intervals.h regex.c regex.h search.c
-
-Ilya Zonov: changed org-mouse.el
+and changed syntax.c syntax.h textprop.c dired.c font-lock.el interval.c
+  intervals.c intervals.h regex.c regex.h search.c
 
 Indiana University Foundation: changed buffer.c buffer.h indent.c
   region-cache.c region-cache.h search.c xdisp.c
@@ -1680,33 +1487,27 @@ Inge Frick: changed easymenu.el keyboard.c view.el compile.el
 
 Inge Wallin: co-wrote avl-tree.el ewoc.el
 
-Ingo Lohmar: changed help-fns.el ls-lisp.el org-agenda.el org.el
-
 Inoue Seiichiro: changed xterm.c xfns.c xterm.h
 
 International Business Machines: changed emacs.c fileio.c process.c
   sysdep.c unexcoff.c
 
-Ippei Furuhashi: changed org.texi org-colview.el org-table.el org.el
-
 Irie Shinsuke: changed subr.el
 
 Irie Tetsuya: changed gnus.texi message.texi
 
+İsmail Dönmez: changed nsfont.m nsterm.m url-auth.el xterm.c
+
 Istvan Marko: changed gnus-agent.el xfns.c
 
 Itai Zukerman: changed mm-decode.el
 
-Ivan Andrus: changed find-file.el ibuf-ext.el ibuffer.el
-
 Ivan Boldyrev: changed mml1991.el
 
 Ivan Kanis: wrote vc-hg.el
-and changed eww.el shr.el appt.el dired.el saveplace.el term.el time.el
-
-Ivan Shmakov: changed desktop.el diff-mode.el nndoc.el tcl.el tex-mode.el
+and changed appt.el term.el time.el
 
-Ivan Vilata I Balaguer: changed org-clock.el org.texi
+Ivan Shmakov: changed tcl.el
 
 Ivan Zakharyaschev: changed codepage.el lread.c
 
@@ -1714,10 +1515,6 @@ Ivar Rummelhoff: wrote winner.el
 
 Iwamuro Motonori: changed gnus-kill.el
 
-J. R. Hacker: wrote new-pkg-1.0.el signed-bad-1.0.el signed-good-1.0.el
-  simple-depend-1.0.el simple-single-1.3.el simple-single-1.4.el
-  simple-two-depend-1.1.el
-
 J.D. Smith: co-wrote idlw-help.el idlw-shell.el idlwave.el
 and changed idlw-rinfo.el idlw-toolbar.el comint.el idlwave.texi vc.el
   bibtex.el files.texi hideshow.el idlw-complete-structtag.el misc.texi
@@ -1725,10 +1522,6 @@ and changed idlw-rinfo.el idlw-toolbar.el comint.el idlwave.texi vc.el
 
 Jaap-Henk Hoepman: changed mm-decode.el
 
-Jacek Chrząszcz: changed ispell.el
-
-Jack Duthen: changed which-func.el
-
 Jack Repenning: changed unexelfsgi.c
 
 Jack Twilley: changed message.el
@@ -1741,13 +1534,10 @@ Jae-Hyeon Park: changed fontset.el
 
 Jaeyoun Chung: changed hangul3.el hanja3.el gnus-mule.el hangul.el
 
-Jambunathan K: wrote ox-odt.el
-and co-wrote ox-html.el
-and changed org-lparse.el org.el org.texi ox.el icomplete.el
-  OrgOdtContentTemplate.xml OrgOdtStyles.xml hi-lock.el replace.el
-  minibuffer.el org-footnote.el org-inlinetask.el register.el doc-view.el
-  etags.el htmlfontify.el ido.el indian.el iswitchb.el org-bbdb.el
-  org-compat.el and 6 other files
+Jambunathan K: wrote org-lparse.el org-odt.el
+and changed org.el org-exp.el org.texi OrgOdtContentTemplate.xml
+  org-footnote.el org-inlinetask.el OrgOdtStyles.xml htmlfontify.el
+  org-html.el package-x.el quail/indian.el tar-mode.el
 
 James Clark: wrote nxml-enc.el nxml-glyph.el nxml-maint.el nxml-mode.el
   nxml-ns.el nxml-outln.el nxml-parse.el nxml-rap.el nxml-uchnm.el
@@ -1765,12 +1555,12 @@ James R. Larus: co-wrote mh-e.el
 James R. Van Zandt: changed sh-script.el
 
 James TD Smith: changed org.el org-colview.el org-clock.el
-  org-remember.el org-plot.el org-agenda.el org-compat.el org-habit.el
-  org.texi
+  org-remember.el org-colview-xemacs.el org-plot.el org-agenda.el
+  org-compat.el org-habit.el org.texi
 
 James Troup: changed gnus-sum.el
 
-James Van Artsdalen: changed unexcoff.c
+James Van Artsdalen: changed unexcoff.c usg5-4.h
 
 James Wright: changed em-unix.el
 
@@ -1778,20 +1568,19 @@ Jamie Zawinski: wrote mailabbrev.el tar-mode.el
 and co-wrote byte-opt.el byte-run.el bytecomp.el disass.el font-lock.el
 and changed bytecode.c mail-extr.el subr.el
 
-Jan Beich: changed configure.ac
-
 Jan Böcker: wrote org-docview.el
-and changed org.el org.texi
+and changed org.el
+
+Jan Böker: changed org.el
 
 Jan Djärv: wrote dnd.el dynamic-setting.el x-dnd.el
-and changed gtkutil.c xterm.c nsterm.m xfns.c configure.ac xmenu.c
-  xterm.h nsfns.m nsterm.h nsmenu.m gtkutil.h keyboard.c x-win.el frame.c
-  emacs.c process.c xsettings.c src/Makefile.in frames.texi nsfont.m
-  ns-win.el and 301 other files
+and changed gtkutil.c xterm.c xfns.c configure.in xmenu.c xterm.h
+  gtkutil.h nsterm.m x-win.el keyboard.c Makefile.in frames.texi
+  xsettings.c emacs.c frame.c nsfns.m xselect.c process.c xlwmenu.c
+  config.in cus-start.el and 303 other files
 
 Jan Moringen: co-wrote srecode/cpp.el tango-dark-theme.el tango-theme.el
-and changed dbus.el dbus.texi dbusbind.c eieio.el idle.el insert.el
-  log-edit.el srecode/find.el wisent/python.el zeroconf.el
+and changed dbus.el dbus.texi dbusbind.c eieio.el log-edit.el zeroconf.el
 
 Jan Nieuwenhuizen: changed info.el TUTORIAL.nl add-log.el emacs.c
   emacsclient.c gnus-start.el gud.el nnmh.el server.el startup.el
@@ -1800,10 +1589,7 @@ Jan Rychter: changed gnus-msg.el
 
 Jan Schormann: wrote solitaire.el
 
-Jan Seeger: changed ox-publish.el parse-time.el
-
-Jan Tatarik: wrote gnus-icalendar.el
-and changed gnus-score.el gnus-logic.el
+Jan Seeger: changed org-publish.el parse-time.el
 
 Jan Vroonhof: changed gnus-cite.el gnus-msg.el nntp.el
 
@@ -1811,24 +1597,15 @@ Jan-Hein Buhrman: changed ange-ftp.el env.el
 
 Jared Finder: changed progmodes/compile.el
 
-Jarek Czekalski: changed keyboard.c callproc.c mini.texi minibuf.c
-  misc.texi shell.el w32fns.c xgselect.c
-
 Jari Aalto: changed add-log.el filecache.el progmodes/grep.el comint.el
   gnus-art.el gnus-sum.el gnus.texi ispell.el lisp-mnt.el man.el
-  nnmail.el apropos.el autorevert.el checkdoc.el cperl-mode.el
-  css-mode.el desktop.el em-ls.el emacs-lisp/debug.el emacsclient.1
-  executable.el and 23 other files
-
-Jarmo Hurri: changed org-gnus.el org-table.el org.texi
-
-Jarosław Rzeszótko: changed url-http.el
+  nnmail.el apropos.el autorevert.el checkdoc.el cperl-mode.el desktop.el
+  em-ls.el emacs-lisp/debug.el emacsclient.1 executable.el files.el
+  and 20 other files
 
 Jason Baker: changed gnus-art.el
 
-Jason Dunsmore: changed org.el ox-html.el
-
-Jason L. Wright: changed smtpmail.el
+Jason Dunsmore: changed org-html.el org.el
 
 Jason Merrill: changed gnus-sum.el add-log.el gnus-salt.el imap.el
   nnfolder.el
@@ -1836,33 +1613,23 @@ Jason Merrill: changed gnus-sum.el add-log.el gnus-salt.el imap.el
 Jason Riedy: changed org-table.el org.texi
 
 Jason Rumney: wrote w32-vars.el
-and changed w32fns.c w32term.c w32font.c w32menu.c w32-win.el w32term.h
-  w32.c w32uniscribe.c src/makefile.w32-in w32-fns.el makefile.nt
-  w32console.c w32bdf.c lib-src/makefile.w32-in configure.bat keyboard.c
-  w32proc.c w32select.c font.c image.c w32font.h and 166 other files
+and changed w32fns.c w32term.c w32font.c makefile.w32-in w32menu.c
+  w32-win.el w32term.h w32.c w32uniscribe.c w32-fns.el makefile.nt
+  w32console.c w32bdf.c configure.bat keyboard.c w32proc.c w32select.c
+  font.c image.c w32font.h w32gui.h and 160 other files
 
-Jason S. Cornez: changed keyboard.c
-
-Jay Belanger: changed calc.texi calc.el calc-ext.el calc-units.el
-  calc-aent.el calc-embed.el calc-help.el calc-lang.el calc-prog.el
-  calc-forms.el calccomp.el calc-math.el calc-arith.el calc-graph.el
-  calc-misc.el calcalg2.el calc-alg.el calc-store.el calc-yank.el
-  calc-bin.el calc-mode.el and 39 other files
+Jay Belanger: changed calc.texi calc.el calc-ext.el calc-aent.el
+  calc-units.el calc-embed.el calc-help.el calc-lang.el calc-prog.el
+  calc-math.el calccomp.el calc-arith.el calc-graph.el calc-forms.el
+  calc-misc.el calc-store.el calc-yank.el calcalg2.el calc-bin.el
+  calc-alg.el calc-vec.el and 40 other files
 
 Jay K. Adams: wrote jka-cmpr-hook.el jka-compr.el
 
-Jay McCarthy: changed org-colview.el
-
 Jay Sachs: changed gnus-score.el gnus-win.el
 
-Jean Haidouk: changed latin-alt.el latin-post.el latin-pre.el
-
-Jean-Philippe Gravel: changed gdb-mi.el
-
 Jean-Philippe Theberge: wrote thumbs.el
 
-Jed Brown: changed progmodes/compile.el
-
 Jeff Dairiki: changed whitespace.el
 
 Jeff Dwork: changed ehelp.el facemenu.el
@@ -1875,12 +1642,11 @@ Jeff Morgenthaler: changed flow-ctrl.el vt200.el vt201.el vt220.el
 Jeff Norden: wrote kermit.el
 
 Jeff Peck: wrote sun.el
-and changed emacstool.1 emacstool.c
 
 Jeffrey C Honig: wrote mh-print.el
 and changed mh-e.el mh-comp.el mh-utils.el mh-mime.el mh-customize.el
-  mh-folder.el mh-funcs.el mh-alias.el mh-seq.el mh-show.el Makefile
-  bsdos4.h mh-junk.el mh-letter.el
+  mh-funcs.el mh-alias.el mh-seq.el bsdos4.h mh-folder.el mh-junk.el
+  mh-show.el
 
 Jens Krinke: changed smime.el
 
@@ -1894,13 +1660,11 @@ Jens Toivo Berger Thielemann: changed word-help.el
 Jens-Ulrik Holger Petersen: changed cus-edit.el ffap.el find-func.el
   gnus.el
 
-Jeramey Crawford: changed amdx86-64.h configure.ac
+Jeramey Crawford: changed amdx86-64.h configure.in
 
 Jeremy Bertram Maitin-Shepard: changed erc.el erc-backend.el
   erc-button.el erc-track.el mml.el
 
-Jeremy Moore: changed hideif.el
-
 Jeremy Whitlock: changed progmodes/python.el
 
 Jerry Frain: changed systime.h usg5-4.h
@@ -1923,22 +1687,18 @@ Jihyun Cho: wrote hangul.el hanja-util.el
 
 Jim Blandy: wrote tvi970.el
 and co-wrote wyse50.el
-and changed keyboard.c xterm.c xfns.c window.c process.c ymakefile
-  dispnew.c xdisp.c sysdep.c configure.ac lisp.h Makefile.in keymap.c
+and changed keyboard.c xterm.c xfns.c Makefile.in window.c process.c
+  ymakefile dispnew.c xdisp.c sysdep.c configure.in lisp.h keymap.c
   configure make-dist buffer.c frame.c screen.c simple.el alloc.c emacs.c
-  and 402 other files
+  and 388 other files
 
-Jim Diamond: changed server.el
-
-Jim Kingdon: changed emacs.texi emacsclient.c functions.texi hp300bsd.h
+Jim Kingdon: changed emacsclient.c emacs.tex functions.texinfo hp300bsd.h
   rmail.el
 
-Jim Meyering: changed lread.c make-docfile.c w32.c w32font.c copyright.el
-  ebrowse.c emacs.c nsfont.m pop.c term.c xfaces.c xselect.c xterm.c
-  alloc.c artist.el autoinsert.el buffer.h callproc.c character.h
-  charset.c configure and 56 other files
-
-Jim Paris: changed process.c
+Jim Meyering: changed lread.c w32.c copyright.el ebrowse.c emacs.c
+  make-docfile.c nsfont.m term.c w32font.c xfaces.c xselect.c Makefile.in
+  alloc.c artist.el autoinsert.el buffer.h character.h charset.c
+  configure configure.in doprnt.c and 53 other files
 
 Jim Radford: changed gnus-start.el
 
@@ -1946,7 +1706,7 @@ Jim Salem: wrote completion.el
 
 Jim Thompson: co-wrote ps-print.el ps-samp.el
 
-Jim Wilson: changed alloca.c oldXMenu/Makefile.in
+Jim Wilson: changed Makefile.in alloca.c
 
 Jindrich Makovicka: changed eval.c fns.c
 
@@ -1958,11 +1718,9 @@ Joachim Reiter: changed org-footnote.el
 
 Joakim Hove: wrote html2text.el
 
-Joakim Hårsman: changed w32fns.c
-
 Joakim Verona: wrote db-javascript.el
 and co-wrote db-ebrowse.el
-and changed Makefile.in configure.ac image-mode.el image.c image.el
+and changed Makefile.in configure.in image-mode.el image.c image.el
   nnrss.el progmodes/compile.el thingatpt.el window.c window.h
 
 Joanna Pluta: changed TUTORIAL.pl
@@ -1971,11 +1729,11 @@ Jochen Hein: changed gnus-art.el
 
 Jochen Küpper: changed gnus.texi calc-units.el
 
-Joe Buehler: changed configure.ac cygwin.h src/Makefile.in Makefile.in
-  browse-url.el comint.el configure dired-aux.el dired.el dirtrack.el
-  dos-w32.el fast-lock.el filecache.el fileio.c files.el gmalloc.c
-  gnus-util.el hippie-exp.el keyboard.c lastfile.c lib-src/Makefile.in
-  and 13 other files
+Joe Buehler: changed Makefile.in configure.in cygwin.h browse-url.el
+  comint.el configure dired-aux.el dired.el dirtrack.el dos-w32.el
+  fast-lock.el filecache.el fileio.c files.el gmalloc.c gnus-util.el
+  hippie-exp.el keyboard.c lastfile.c loadup.el mem-limits.h
+  and 11 other files
 
 Joe Casadonte: changed gnus-srvr.el
 
@@ -1989,14 +1747,10 @@ Joe Ramey: changed filelock.c rmailsum.el
 
 Joe Reiss: changed gnus-art.el
 
-Joe Vornehm Jr.: changed ido.el
-
 Joe Wells: wrote mail-extr.el resume.el
 and co-wrote apropos.el
 and changed arc-mode.el tex-mode.el
 
-Joel Bion: changed pcmpl-gnu.el
-
 Joel Boehland: co-wrote ob-clojure.el ob-lisp.el
 
 Joel N. Weber II: changed comint.el make-dist
@@ -2006,21 +1760,19 @@ Joel Ray Holveck: changed gnus-sum.el info.el
 Joev Dubach: changed nntp.el
 
 Johan Bockgård: changed erc.el cl-macs.el erc-backend.el erc-button.el
-  erc-match.el icomplete.el xdisp.c browse-url.el bytecomp.el custom.el
-  display.texi erc-compat.el erc-nickserv.el erc-ring.el erc-speak.el
-  erc-track.el help-fns.el mouse-sel.el simple.el subr.el xterm.el
-  and 54 other files
+  erc-match.el xdisp.c browse-url.el bytecomp.el custom.el display.texi
+  erc-compat.el erc-nickserv.el erc-ring.el erc-speak.el erc-track.el
+  help-fns.el icomplete.el mouse-sel.el simple.el subr.el xterm.el
+  and 48 other files
 
 Johan Euphrosine: changed ibuf-ext.el
 
 Johan Vromans: wrote forms-d2.el forms.el iso-acc.el
 and changed complete.el
 
-Johannes Weiner: changed browse-url.el keyboard.c configure.ac
+Johannes Weiner: changed browse-url.el keyboard.c configure.in
   lisp-mode.el lisp.h pp.el sound.c w32term.c xfaces.c xterm.c
 
-John Anthony: changed inf-lisp.el ruby-mode.el text-mode.el
-
 John Basrai: changed man.el
 
 John F. Carr: changed dired.c
@@ -2040,10 +1792,6 @@ John Hughes: changed term.c
 John J Foerch: changed display.texi erc-stamp.el org.el
   progmodes/compile.el
 
-John K. Luebs: changed org.el
-
-John Marino: changed configure.ac
-
 John Mongan: changed progmodes/f90.el
 
 John Paul Wallington: changed ibuffer.el ibuf-ext.el subr.el help-fns.el
@@ -2055,44 +1803,38 @@ John Sullivan: changed window.c
 
 John Tobey: changed gud.el
 
-John W. Eaton: co-wrote octave.el
+John W. Eaton: co-wrote octave-mod.el
+and changed octave-inf.el
 
-John Wiegley: wrote align.el automated/eshell.el cal-bahai.el em-alias.el
-  em-banner.el em-basic.el em-cmpl.el em-dirs.el em-glob.el em-hist.el
-  em-ls.el em-pred.el em-prompt.el em-rebind.el em-script.el em-smart.el
+John Wiegley: wrote align.el cal-bahai.el em-alias.el em-banner.el
+  em-basic.el em-cmpl.el em-dirs.el em-glob.el em-hist.el em-ls.el
+  em-pred.el em-prompt.el em-rebind.el em-script.el em-smart.el
   em-term.el em-unix.el em-xtra.el erc-identd.el esh-arg.el esh-cmd.el
   esh-ext.el esh-io.el esh-mode.el esh-module.el esh-opt.el esh-proc.el
   esh-util.el esh-var.el eshell/eshell.el eudcb-mab.el isearchb.el
   org-attach.el org-crypt.el org-habit.el pcmpl-cvs.el pcomplete.el
-  remember.el timeclock.el
-and co-wrote org-pcomplete.el
+  remember.el test/eshell.el timeclock.el
+and co-wrote org-mac-message.el org-pcomplete.el
 and changed org-clock.el org-agenda.el erc-chess.el org.el erc.el
-  iswitchb.el ido.el alloc.c allout.el auth-source.el cal-menu.el
+  iswitchb.el ido.el esh-test.el Makefile.in allout.el cal-menu.el
   calendar.el desktop.el diary-lib.el erc-bbdb.el erc-button.el
   erc-complete.el erc-fill.el erc-ibuffer.el erc-list.el erc-match.el
-  and 22 other files
+  and 19 other files
 
 John Williams: changed etags.el
 
 John Yates: changed hideshow.el
 
-Jon Anders Skorpen: changed ox-publish.el
+Jon Anders Skorpen: changed org-publish.el
 
 Jon Ericson: changed gnus.el spam-report.el
 
 Jon K Hellan: wrote utf7.el
 
-Jonas Bernoulli: changed eieio.el button.el lisp-mnt.el tabulated-list.el
-  tips.texi
-
-Jonas Hoersch: changed org-inlinetask.el org.el
-
-Jonathan I. Kamens: changed pop.c movemail.c rmail.el configure.ac b2m.pl
-  lib-src/Makefile.in Makefile.in config.in files.el pop.h terminal.el
-  vc.el gnus-sum.el jka-compr.el rmailout.el rnewspost.el sendmail.el
-  simple.el timezone.el vc-hooks.el
-
-Jonathan Leech-Pepin: wrote ox-texinfo.el
+Jonathan I. Kamens: changed pop.c movemail.c rmail.el Makefile.in
+  configure.in b2m.pl config.in files.el pop.h terminal.el vc.el
+  gnus-sum.el jka-compr.el rmailout.el rnewspost.el sendmail.el simple.el
+  timezone.el vc-hooks.el
 
 Jonathan Marchand: changed cpp-root.el
 
@@ -2104,35 +1846,29 @@ Jonathan Vail: changed vc.el
 
 Jonathan Yavner: wrote ses.el tcover-ses.el tcover-unsafep.el
   testcover.el unsafep.el
-and changed ses.texi ses-example.ses edebug.el editfns.c files.el
-  functions.texi misc/Makefile.in subr.el variables.texi
+and changed ses.texi ses-example.ses Makefile.in edebug.el editfns.c
+  files.el functions.texi subr.el variables.texi
 
-Joost Diepenmaat: changed org.el
-
-Jorgen Schäfer: wrote erc-autoaway.el erc-goodies.el erc-spelling.el
+Jorgen Schaefer: wrote erc-autoaway.el erc-goodies.el erc-spelling.el
 and changed erc.el erc-track.el erc-backend.el erc-match.el erc-stamp.el
-  erc-button.el erc-fill.el erc-members.el erc-truncate.el erc-compat.el
-  Makefile erc-dcc.el erc-ibuffer.el erc-macs.el erc-page.el
-  erc-pcomplete.el erc-sound.el minibuffer.el erc-bbdb.el erc-imenu.el
-  erc-lang.el and 10 other files
+  erc-button.el erc-fill.el erc-truncate.el erc-compat.el erc-members.el
+  erc-dcc.el erc-ibuffer.el erc-page.el erc-pcomplete.el erc-sound.el
+  erc-bbdb.el erc-imenu.el erc-lang.el erc-list.el erc-macs.el
+  erc-menu.el and 8 other files
 
 Jose A. Ortega Ruiz: changed gnus-sum.el
 
 Jose E. Marchesi: changed ada-mode.el gomoku.el simple.el smtpmail.el
 
-Jose Marino: changed idlw-shell.el
-
 Joseph Arceneaux: wrote xrdb.c
 and changed xterm.c xfns.c keyboard.c screen.c dispnew.c xdisp.c window.c
   x-win.el fileio.c buffer.c xterm.h minibuf.c editfns.c lread.c
   process.c alloc.c buffer.h files.el screen.el insdel.c emacs.c
   and 106 other files
 
-Joseph M. Kelsey: changed fileio.c skeleton.el
+Joseph M. Kelsey: changed dir.h fileio.c skeleton.el
 
-Josh Elsasser: changed configure.ac
-
-Josh Feinstein: changed erc-join.el erc.el
+Josh Elsasser: changed configure.in
 
 Josh Huber: changed mml-sec.el mml.el message.el gnus-msg.el mml2015.el
   nnmail.el ChangeLog ChangeLog.1 gnus-cite.el gnus-delay.el gnus-spec.el
@@ -2146,21 +1882,17 @@ Jouni K. Seppänen: changed gnus.texi nnimap.el mm-url.el
 
 João Cachopo: changed spam.el
 
-João Távora: wrote elec-pair.el electric-tests.el
-and changed shr.el electric.el emacs.texi lisp-mode.el
-  progmodes/python.el python-tests.el simple.el tex-mode.el tls.el vc.el
-
 Juan León Lahoz García: wrote wdired.el
 and changed files.el perl-mode.el
 
 Juan Pechiar: wrote ob-mscgen.el
 and changed ob-octave.el
 
-Juanma Barranquero: wrote emacs-lock.el frameset.el
-and changed src/makefile.w32-in subr.el desktop.el config.nt w32fns.c
-  lib-src/makefile.w32-in server.el emacsclient.c files.el simple.el
-  bs.el faces.el help-fns.el org.el w32term.c xdisp.c buffer.c keyboard.c
-  w32.c ido.el makefile.w32-in and 1130 other files
+Juanma Barranquero: wrote emacs-lock.el
+and changed makefile.w32-in subr.el w32fns.c files.el server.el bs.el
+  emacsclient.c help-fns.el faces.el org.el simple.el buffer.c xdisp.c
+  keyboard.c desktop.el process.c w32term.c window.c ido.el w32.c
+  allout.el and 1089 other files
 
 Juergen Kreileder: changed imap.el nnimap.el
 
@@ -2168,19 +1900,19 @@ Juergen Nickelsen: wrote ws-mode.el
 
 Julian Gehring: changed org.texi orgcard.tex
 
-Julian Scheid: changed tramp.el color.el
+Julian Scheid: changed tramp.el
 
 Julien Avarre: changed gnus-fun.el
 
 Julien Barnier: changed ob-comint.el ob-sh.el org.el
 
-Julien Danjou: wrote erc-desktop-notifications.el gnus-gravatar.el
-  gnus-notifications.el gravatar.el notifications.el shr-color.el
+Julien Danjou: wrote gnus-gravatar.el gravatar.el notifications.el
+  shr-color.el
 and co-wrote color.el
-and changed shr.el org-agenda.el gnus-art.el nnimap.el gnus-html.el
-  gnus.el message.el gnus-group.el gnus-sum.el gnus-util.el mm-decode.el
-  mm-view.el org.el gnus.texi nnir.el sieve-manage.el mm-uu.el
-  color-lab.el gnus-demon.el gnus-int.el gnus-msg.el and 96 other files
+and changed shr.el org-agenda.el gnus-art.el gnus-html.el gnus.el
+  mm-decode.el gnus-group.el gnus-util.el message.el org.el gnus-sum.el
+  gnus.texi mm-view.el nnimap.el mm-uu.el nnir.el sieve-manage.el
+  color-lab.el url-cache.el auth-source.el gnus-ems.el and 82 other files
 
 Julien Gilles: wrote gnus-ml.el
 
@@ -2189,31 +1921,24 @@ Junio Hamano: changed window.el
 Jure Cuhalev: changed ispell.el
 
 Juri Linkov: wrote files-x.el misearch.el occur-tests.el
-and changed isearch.el info.el replace.el simple.el dired-aux.el
-  progmodes/grep.el dired.el progmodes/compile.el startup.el faces.el
-  files.el menu-bar.el display.texi descr-text.el desktop.el bindings.el
-  image-mode.el cus-edit.el ispell.el man.el comint.el
-  and 355 other files
+and changed info.el isearch.el simple.el replace.el progmodes/grep.el
+  dired-aux.el progmodes/compile.el dired.el startup.el faces.el files.el
+  display.texi menu-bar.el descr-text.el bindings.el cus-edit.el
+  image-mode.el ispell.el man.el dired-x.el log-view.el
+  and 338 other files
 
 Justin Bogner: changed fortune.el
 
-Justin Gordon: changed ox-md.el
-
 Justin Sheehy: changed gnus-sum.el nntp.el
 
-Justus Piater: changed org-agenda.el smtpmail.el
-
-Jérémie Courrèges-Anglas: changed org.texi ox-latex.el
+Justus Piater: changed smtpmail.el
 
-Jérémy Compostella: changed battery.el keyboard.c windmove.el window.el
-  xdisp.c
+Jérémy Compostella: changed battery.el windmove.el window.el
 
-Jérôme Marant: changed make-dist Makefile.in bindings.el configure.ac
-  emacsclient.c leim/Makefile.in misc.texi
+Jérôme Marant: changed Makefile.in make-dist bindings.el configure.in
+  emacsclient.c misc.texi
 
-Jürgen Hötzel: wrote tramp-adb.el
-and changed comint.el em-unix.el esh-util.el tramp.el url-handlers.el
-  wid-edit.el
+Jürgen Hötzel: changed comint.el url-handlers.el wid-edit.el
 
 K. Shane Hartman: wrote chistory.el echistory.el electric.el emacsbug.el
   helper.el picture.el view.el
@@ -2227,32 +1952,30 @@ Kahlil Hodgson: changed timeclock.el
 Kai Großjohann: wrote gnus-delay.el nnir.el tramp-uu.el trampver.el
 and co-wrote longlines.el tramp-sh.el tramp.el
 and changed message.el gnus-agent.el gnus-sum.el files.el nnmail.el
-  tramp.texi nntp.el gnus.el simple.el ange-ftp.el dired.el paragraphs.el
-  bindings.el files.texi gnus-art.el gnus-group.el man.el INSTALL
-  Makefile.in crisp.el fileio.c and 45 other files
+  tramp.texi nntp.el gnus.el simple.el ange-ftp.el Makefile.in dired.el
+  paragraphs.el bindings.el files.texi gnus-art.el gnus-group.el man.el
+  INSTALL crisp.el fileio.c and 45 other files
 
-Kai Tetzlaff: changed ox-publish.el url-http.el
+Kai Tetzlaff: changed org-publish.el url-http.el
 
-Kailash C. Chowksey: changed HELLO ind-util.el kannada.el knd-util.el
-  lisp/Makefile.in loadup.el makefile.w32-in
-
-Kalle Kankare: changed image.c
+Kailash C. Chowksey: changed HELLO Makefile.in ind-util.el kannada.el
+  knd-util.el loadup.el makefile.w32-in
 
 Kalle Olavi Niemitalo: changed keyboard.c
 
-Kan-Ru Chen: changed nnir.el ecomplete.el window.el gnus-diary.el
-  gnus.texi ibuf-ext.el nnmbox.el nroff-mode.el
+Kan-Ru Chen: changed nnir.el ecomplete.el gnus-diary.el gnus.texi
+  nroff-mode.el
 
 Kanematsu Daiji: changed nnimap.el
 
-Karel Klíč: changed fileio.c files.el configure.ac eval.c ftfont.c lisp.h
-  src/Makefile.in text.texi tramp.el
+Karel Klíč: changed fileio.c files.el Makefile.in configure.in eval.c
+  ftfont.c lisp.h text.texi tramp.el
 
-Karl Berry: changed info.texi emacs.texi elisp.texi text.texi anti.texi
-  display.texi efaq.texi ada-mode.texi autotype.texi calc.texi
-  cc-mode.texi cl.texi dired-x.texi ebrowse.texi ediff.texi
-  emacs-mime.texi emacs-xtra.texi eshell.texi eudc.texi filelock.c
-  forms.texi and 94 other files
+Karl Berry: changed emacs.texi info.texi elisp.texi text.texi anti.texi
+  display.texi emacs-xtra.texi faq.texi filelock.c gnu.texi macos.texi
+  minibuf.texi mule.texi processes.texi texinfo.tex ada-mode.texi
+  autotype.texi building.texi calc.texi cc-mode.texi cl.texi
+  and 93 other files
 
 Karl Chen: changed files.el align.el cc-vars.el emacsclient.c gnus-art.el
   help-mode.el jka-cmpr-hook.el make-mode.el perl-mode.el
@@ -2264,13 +1987,13 @@ Karl Eichwalder: changed Makefile.in add-log.el bookmark.el dired-aux.el
 Karl Fogel: wrote bookmark.el mail-hist.el saveplace.el
 and changed files.el doc-view.el image-mode.el info.el simple.el INSTALL
   autogen.sh isearch.el menu-bar.el thingatpt.el INSTALL.REPO configure
-  configure.ac editfns.c gnus-bookmark.el gnus-msg.el gnus-sum.el man.el
+  configure.in editfns.c gnus-bookmark.el gnus-msg.el gnus-sum.el man.el
   nnmail.el org-agenda.el vc-svn.el and 4 other files
 
 Karl Heuer: changed keyboard.c lisp.h xdisp.c buffer.c xfns.c xterm.c
-  alloc.c files.el frame.c configure.ac window.c data.c minibuf.c
-  editfns.c fns.c process.c Makefile.in fileio.c simple.el keymap.c
-  indent.c and 446 other files
+  alloc.c files.el frame.c window.c configure.in Makefile.in data.c
+  minibuf.c editfns.c fns.c process.c fileio.c simple.el keymap.c
+  indent.c and 444 other files
 
 Karl Kleinpaste: changed gnus-sum.el gnus-art.el gnus-picon.el
   gnus-score.el gnus-uu.el gnus-xmas.el gnus.el mm-uu.el mml.el nnmail.el
@@ -2286,10 +2009,10 @@ Karl Pflästerer: changed gnus-art.el gnus-score.el mml.el spam-stat.el
 Katsuhiro Hermit Endo: changed gnus-group.el gnus-spec.el
 
 Katsumi Yamaoka: wrote canlock.el
-and changed gnus-art.el message.el gnus-sum.el gnus.texi mm-decode.el
-  mm-util.el gnus-msg.el gnus-util.el mm-view.el mml.el gnus-group.el
-  rfc2047.el gnus-start.el gnus.el shr.el nntp.el gnus-agent.el nnrss.el
-  nnmail.el mm-uu.el gnus-html.el and 147 other files
+and changed gnus-art.el gnus-sum.el message.el gnus.texi mm-decode.el
+  mm-util.el mm-view.el gnus-group.el mml.el rfc2047.el gnus-util.el
+  gnus-start.el gnus-msg.el gnus.el shr.el nntp.el gnus-agent.el nnrss.el
+  mm-uu.el nnmail.el gnus-html.el and 135 other files
 
 Kaushik Srenevasan: changed gdb-mi.el
 
@@ -2297,8 +2020,7 @@ Kaveh R. Ghazi: changed delta88k.h xterm.c
 
 Kayvan Sylvan: changed supercite.el
 
-Kazuhiro Ito: changed coding.c flow-fill.el font.c keyboard.c
-  make-mode.el starttls.el xdisp.c
+Kazuhiro Ito: changed coding.c flow-fill.el
 
 Kazushi Marukawa: changed filelock.c hexl.c profile.c unexalpha.c
 
@@ -2312,12 +2034,9 @@ Keith Gabryelski: wrote hexl.c hexl.el
 
 Keith Packard: changed font.c
 
-Kelly Dean: changed simple.el fileio.c help-macro.el
-
-Ken Brown: changed configure.ac gmalloc.c sheap.c cygwin.h browse-url.el
-  emacs.c emacs.rc conf_post.h dispextern.h frame.c src/Makefile.in
-  unexcw.c vm-limit.c w32term.c xgselect.c CPP-DEFINES alloc.c callproc.c
-  config.nt dired.c fileio.c and 13 other files
+Ken Brown: changed configure.in cygwin.h sheap.c browse-url.el gmalloc.c
+  vm-limit.c callproc.c dired.c emacs.c fileio.c gdb-mi.el loadup.el
+  mem-limits.h unexcw.c
 
 Ken Brush: changed emacsclient.c
 
@@ -2328,28 +2047,24 @@ and changed pgg-gpg.el pgg.el progmodes/python.el locked-encrypted.png
   locked-encrypted.xpm pgg-pgp.el pgg-pgp5.el unlocked-encrypted.png
   unlocked-encrypted.xpm README edebug.el pgg.texi tips.texi
 
-Ken Olum: changed message.el
-
-Ken Raeburn: changed lisp.h lread.c alloc.c buffer.c fns.c keyboard.c
-  minibuf.c coding.c editfns.c fileio.c keymap.c xdisp.c configure.ac
-  emacs.c undo.c xfns.c xterm.c charset.h coding.h fontset.c process.c
-  and 97 other files
+Ken Raeburn: changed lisp.h lread.c Makefile.in alloc.c buffer.c fns.c
+  keyboard.c minibuf.c coding.c editfns.c fileio.c keymap.c xdisp.c
+  configure.in emacs.c undo.c xfns.c xterm.c charset.h coding.h fontset.c
+  and 93 other files
 
 Ken Stevens: wrote ispell.el
 
-Kenichi Handa: wrote composite.el decoder-tests.el isearch-x.el
-  language/cyrillic.el ps-bdf.el py-punct.el pypunct-b5.el thai-word.el
+Kenichi Handa: wrote composite.el isearch-x.el language/cyrillic.el
+  ps-bdf.el py-punct.el pypunct-b5.el thai-word.el
 and co-wrote ps-def.el ps-mule.el ps-print.el ps-samp.el quail.el
 and changed coding.c mule-cmds.el mule.el fontset.c charset.c xdisp.c
-  font.c fontset.el xterm.c fileio.c mule-conf.el characters.el fns.c
-  ftfont.c mule-diag.el coding.h charset.h ccl.c xfaces.c editfns.c
-  composite.c and 392 other files
+  fontset.el font.c xterm.c Makefile.in fileio.c mule-conf.el
+  characters.el fns.c ftfont.c mule-diag.el charset.h ccl.c coding.h
+  xfaces.c editfns.c and 388 other files
 
 Kenichi Okada: co-wrote sasl-cram.el sasl-digest.el
 
-Kenjiro Nakayama: changed eww.el
-
-Kenneth Stailey: changed alpha.h configure.ac ns32000.h openbsd.h pmax.h
+Kenneth Stailey: changed alpha.h configure.in ns32000.h openbsd.h pmax.h
   sparc.h unexalpha.c unexelf.c
 
 Kentaro Ohkouchi: changed emacs.png README emacs.ico emacs.svg
@@ -2381,19 +2096,19 @@ and changed gnus-agent.el gnus-sum.el gnus-start.el gnus-int.el nntp.el
   nnagent.el nnheader.el gnus-async.el gnus-registry.el gnus-salt.el
   gnus-uu.el and 3 other files
 
-Kevin Layer: changed mml.el w32proc.c
+Kevin Layer: changed w32proc.c
 
-Kevin Rodgers: changed compile.el mailabbrev.el progmodes/compile.el
-  dired-x.el files.el ange-ftp.el byte-opt.el desktop.el diff-mode.el
+Kevin Rodgers: changed compile.el mailabbrev.el dired-x.el files.el
+  progmodes/compile.el ange-ftp.el byte-opt.el desktop.el diff-mode.el
   dired-x.texi ffap.el files.texi flyspell.el isearch.el killing.texi
   lisp.el loadhist.el mailalias.el menu-bar.el print.c progmodes/grep.el
   and 8 other files
 
 Kevin Ryde: wrote info-xref.el
 and changed info-look.el info.el checkdoc.el cl.texi compilation.txt
-  etags.c arc-mode.el ffap.el gnus-art.el gnus-sum.el mule.el os.texi
-  progmodes/compile.el woman.el MORE.STUFF browse-url.el copyright.el
-  dig.el flyspell.el keyboard.c mailcap.el and 85 other files
+  arc-mode.el ffap.el gnus-art.el gnus-sum.el mule.el os.texi
+  progmodes/compile.el MORE.STUFF browse-url.el copyright.el dig.el
+  etags.c flyspell.el keyboard.c mailcap.el man.el and 80 other files
 
 Kim F. Storm: wrote bindat.el cua-base.el cua-gmrk.el cua-rect.el ido.el
   keypad.el kmacro.el
@@ -2408,16 +2123,14 @@ Kim-Minh Kaplan: changed gnus-picon.el gnus-sum.el gnus-start.el
 
 Kimit Yada: changed copyright.el
 
-Kirill A. Korinskiy: changed fortune.el
-
-Kirk Kelsey: changed make-mode.el vc-hg.el
+Kirk Kelsey: changed make-mode.el
 
 Kishore Kumar: changed terminal.el
 
 Klaus Straubinger: changed url-http.el url-history.el pcmpl-rpm.el
   url-cookie.el url.el
 
-Klaus Zeitler: changed configure.ac files.el sh-script.el vcursor.el
+Klaus Zeitler: changed configure.in files.el sh-script.el vcursor.el
 
 Knut Anders Hatlen: changed nnimap.el imap.el
 
@@ -2427,8 +2140,6 @@ and changed hanja.el hangul.el hangul3.el hanja-jis.el symbol-ksc.el
 Kobayashi Yasuhiro: changed w32fns.c configure.bat indent.c info.el
   w32term.c w32term.h window.c xfns.c
 
-Kodi Arfer: changed org.texi ox-html.el
-
 Konrad Hinsen: wrote org-eshell.el
 and changed ob-python.el
 
@@ -2438,8 +2149,9 @@ Kristoffer Grönlund: wrote wombat-theme.el
 
 Kurt B. Kaiser: changed message.el
 
-Kurt Hornik: co-wrote octave.el
-and changed battery.el ielm.el octave-hlp.el octave-mode.texi term.el
+Kurt Hornik: wrote octave-inf.el
+and co-wrote octave-mod.el
+and changed battery.el ielm.el octave-hlp.el term.el
 
 Kurt Swanson: changed gnus-art.el gnus-salt.el gnus-sum.el gnus-ems.el
   gnus-group.el gnus-msg.el gnus-score.el gnus-util.el nnmail.el window.c
@@ -2452,15 +2164,13 @@ Kyotaro Horiguchi: changed coding.c indent.c
 Károly Lőrentey: changed xfns.c bindings.el keyboard.c menu-bar.el
   buffer.c coding.c frame.el print.c rxvt.el simple.el spam.el sysdep.c
   x-win.el xdisp.c xt-mouse.el xterm.c xterm.h .gdbinit AT386.el HELLO
-  README and 101 other files
-
-Laimonas Vėbra: changed european.el
+  Makefile.in and 101 other files
 
 Lara Rios: co-wrote cal-menu.el
 
 Lars Balker Rasmussen: changed gnus-art.el gnus-agent.el message.el
 
-Lars Brinkhoff: changed building.texi config.in configure.ac editfns.c
+Lars Brinkhoff: changed building.texi config.in configure.in editfns.c
   fns.c os.texi
 
 Lars Hansen: changed desktop.el tramp.el info.el mh-e.el dired-x.el
@@ -2471,28 +2181,28 @@ Lars Hansen: changed desktop.el tramp.el info.el mh-e.el dired-x.el
 Lars Lindberg: wrote msb.el
 and co-wrote dabbrev.el imenu.el
 
-Lars Ljung: changed esh-ext.el isearch.el
+Lars Ljung: changed esh-ext.el
 
-Lars Magne Ingebrigtsen: wrote compface.el dns.el ecomplete.el eww.el
+Lars Magne Ingebrigtsen: wrote compface.el dns.el ecomplete.el
   format-spec.el gnus-agent.el gnus-art.el gnus-async.el gnus-bcklg.el
   gnus-cache.el gnus-demon.el gnus-draft.el gnus-dup.el gnus-eform.el
   gnus-ems.el gnus-fun.el gnus-group.el gnus-html.el gnus-int.el
   gnus-logic.el gnus-picon.el gnus-range.el gnus-salt.el gnus-spec.el
   gnus-srvr.el gnus-start.el gnus-sum.el gnus-undo.el gnus-util.el
   gnus-uu.el gnus-win.el ietf-drums.el mail-parse.el mail-prsvr.el
-  mail-source.el message.el messcompat.el mm-archive.el mm-view.el mml.el
-  netrc.el network-stream.el nnagent.el nndir.el nndraft.el nngateway.el
-  nnmail.el nnoo.el nntp.el nnweb.el qp.el rfc2045.el rfc2231.el rtree.el
-  score-mode.el shr.el spam.el url-domsuf.el url-queue.el zlib-tests.el
+  mail-source.el message.el messcompat.el mm-view.el mml.el netrc.el
+  network-stream.el nnagent.el nndir.el nndraft.el nngateway.el nnmail.el
+  nnoo.el nntp.el nnweb.el qp.el rfc2045.el rfc2231.el rtree.el
+  score-mode.el shr.el spam.el url-queue.el
 and co-wrote gnus-kill.el gnus-mh.el gnus-msg.el gnus-score.el
   gnus-topic.el gnus.el gssapi.el mailcap.el mm-bodies.el mm-decode.el
   mm-encode.el mm-util.el nnbabyl.el nndoc.el nneething.el nnfolder.el
   nnheader.el nnimap.el nnmbox.el nnmh.el nnml.el nnspool.el nnvirtual.el
   rfc2047.el time-date.el
-and changed gnus.texi gnus-cite.el smtpmail.el pop3.el gnus-xmas.el
-  auth-source.el proto-stream.el subr.el url-http.el dired.el simple.el
-  files.el image.c gnutls.c xml.c editfns.c nnrss.el nnultimate.el
-  gnus-nocem.el gnus-registry.el imap.el and 237 other files
+and changed gnus.texi gnus-cite.el pop3.el smtpmail.el gnus-xmas.el
+  auth-source.el proto-stream.el url-http.el gnutls.c subr.el xml.c
+  dired.el editfns.c nnultimate.el gnus-nocem.el imap.el nnkiboze.el
+  nnrss.el nnslashdot.el simple.el spam-report.el and 210 other files
 
 Lars Rasmusson: changed ebrowse.c
 
@@ -2501,10 +2211,11 @@ Lasse Rasinen: changed gnus-start.el
 Laurent Martelli: changed mm-decode.el
 
 Lawrence Mitchell: wrote erc-backend.el erc-log.el
-and changed erc.el ox-latex.el org.el ox.el erc-match.el erc-nets.el
-  erc-nickserv.el ox-html.el browse-url.el erc-button.el erc-compat.el
-  erc-dcc.el erc-fill.el erc-list.el erc-track.el ielm.el ob.el Makefile
-  cl-macs.el erc-autoaway.el erc-autojoin.el and 25 other files
+and changed erc.el org-latex.el org.el erc-match.el erc-nets.el
+  erc-nickserv.el org-exp.el browse-url.el erc-button.el erc-compat.el
+  erc-dcc.el erc-fill.el erc-list.el erc-track.el ielm.el ob.el
+  org-html.el cl-macs.el erc-autoaway.el erc-autojoin.el erc-bbdb.el
+  and 23 other files
 
 Lawrence R. Dodd: co-wrote dired-x.el
 and changed fortran.el ispell.el sendmail.el cmuscheme.el comint.el
@@ -2512,56 +2223,41 @@ and changed fortran.el ispell.el sendmail.el cmuscheme.el comint.el
   lisp.el man.el minibuf.c rcs2log rmail.el simple.el terminal.el
   text-mode.el tpu-edt.el and 3 other files
 
-Le Wang: changed org-src.el comint.el hilit-chg.el misc.el
-
 Leigh Stoller: changed emacsclient.c server.el
 
-Lennart Borgman: co-wrote ert-x.el
+Lennart Borgman: wrote ert-x.el org-freemind.el
 and changed nxml-mode.el tutorial.el window.el ada-xref.el buff-menu.el
   emacs-lisp/debug.el emacsclient.c filesets.el flymake.el help-fns.el
-  isearch.el linum.el lisp-mode.el lisp.el mouse.el recentf.el
-  remember.el replace.el ruby-mode.el shell.el texinfmt.el
-  and 3 other files
+  isearch.el linum.el lisp-mode.el mouse.el recentf.el remember.el
+  replace.el ruby-mode.el shell.el texinfmt.el w32term.c w32term.h
 
 Lennart Staflin: changed dired.el diary-ins.el diary-lib.el tq.el xdisp.c
 
-Leo Liu: wrote calc-tests.el pcmpl-x.el
-and changed octave.el ido.el rcirc.el subr.el files.el simple.el
-  flymake.el smie.el abbrev.el eldoc.el progmodes/python.el
-  progmodes/compile.el register.el rng-valid.el bindings.el comint.el
-  diff-mode.el dired-x.el font-lock.el indent.el kmacro.el
-  and 132 other files
-
-Leo P. White: changed eieio-custom.el
+Leo Liu: changed rcirc.el ido.el abbrev.el makefile.w32-in subr.el
+  Makefile.in deps.mk diff-mode.el dnd.el em-hist.el erc.el files.el
+  fns.c font-lock.el footnote.el gl-comp.m4 gnulib.mk help-mode.el
+  iswitchb.el minibuf.c minibuffer.el and 62 other files
 
 Leonard H. Tower Jr.: changed rnews.el rnewspost.el emacsbug.el
   rmailout.el sendmail.el
 
-Leonard Randall: changed org-bibtex.el
-
-Leonardo Nobrega: changed progmodes/python.el
-
-Levin Du: changed parse-time.el org-clock.el
+Levin Du: changed parse-time.el
 
-Lewis Perin: changed emacs-x86.manifest
+Lewis Perin: changed emacs.manifest
 
 Liam Healy: changed outline.el
 
-Liam Stitt: changed url-file.el url-vars.el
-
 Liang Wang: changed etags.el
 
 Litvinov Sergey: changed ob-maxima.el ob-octave.el
 
 Lloyd Zusman: changed mml.el pgg-gpg.el
 
-Lluís Vilanova: changed ede/linux.el
-
 Luc Teirlinck: wrote help-at-pt.el
 and changed files.el autorevert.el cus-edit.el subr.el simple.el
-  frames.texi startup.el display.texi files.texi dired.el comint.el
-  modes.texi custom.texi emacs.texi fns.c frame.el ielm.el minibuf.texi
-  variables.texi buffers.texi commands.texi and 215 other files
+  frames.texi startup.el display.texi files.texi Makefile.in dired.el
+  comint.el custom.texi emacs.texi fns.c frame.el ielm.el minibuf.texi
+  modes.texi variables.texi buffers.texi and 212 other files
 
 Luca Capello: changed mm-encode.el
 
@@ -2569,39 +2265,39 @@ Lucid, Inc.: changed byte-opt.el byte-run.el bytecode.c bytecomp.el
   delsel.el disass.el faces.el font-lock.el lmenu.el mailabbrev.el
   select.el xfaces.c xselect.c
 
-Ludovic Courtès: wrote nnregistry.el
-and changed configure.ac gnus.texi
-
-Luis Felipe López Acevedo: changed TUTORIAL.es
+Ludovic Courtes: changed nnregistry.el
 
-Luis R Anaya: co-wrote ox-man.el
+Ludovic Courtès: wrote nnregistry.el
+and changed gnus.texi
 
 Lukas Huonker: changed tetris.el
 
-Luke Lee: changed hideif.el
+Łukasz Demianiuk: changed erc.el
+
+Łukasz Stelmach: changed cookie1.el message.el org-agenda.el org-bbdb.el
+  org-exp.el org-html.el org.el
 
 Lute Kamstra: changed modes.texi emacs-lisp/debug.el generic-x.el
-  generic.el font-lock.el simple.el subr.el battery.el debugging.texi
-  easy-mmode.el elisp.texi emacs-lisp/generic.el hl-line.el info.el
-  octave.el basic.texi bindings.el calc.el cmdargs.texi diff-mode.el
-  doclicense.texi and 291 other files
+  generic.el font-lock.el simple.el subr.el Makefile.in battery.el
+  debugging.texi easy-mmode.el elisp.texi emacs-lisp/generic.el
+  hl-line.el info.el basic.texi bindings.el calc.el cmdargs.texi
+  diff-mode.el doclicense.texi and 291 other files
 
 Lynn Slater: wrote help-macro.el
 
 Maciek Pasternacki: changed nnrss.el
 
-Madan Ramakrishnan: changed org-agenda.el
-
-Magnus Henoch: changed url-http.el ispell.el url.el dbusbind.c
-  configure.ac dns.el nnmaildir.el url-gw.el url-parse.el url-proxy.el
-  autoinsert.el cl.texi cyrillic.el dbus.el gnus.texi hashcash.el image.c
-  log-edit.el message.el org-clock.el org-table.el and 13 other files
+Magnus Henoch: changed url-http.el ispell.el url.el dbusbind.c dns.el
+  url-gw.el url-parse.el url-proxy.el autoinsert.el cl.texi configure.in
+  dbus.el gnus.texi hashcash.el log-edit.el message.el org-clock.el
+  org-latex.el org-table.el process.c quail/cyrillic.el
+  and 10 other files
 
 Malcolm Purvis: changed spam-stat.el
 
 Manoj Srivastava: wrote manoj-dark-theme.el
 
-Manuel Giraud: changed ox-html.el ox-publish.el org.texi
+Manuel Giraud: changed org-html.el org-publish.el org.texi
 
 Manuel Gómez: changed speedbar.el
 
@@ -2624,15 +2320,13 @@ Marco Melgazzi: changed term.el
 
 Marco Walther: changed mips-siemens.h unexelfsni.c unexsni.c
 
-Marcus G. Daniels: changed xterm.c configure.ac lwlib-Xm.c lwlib.c
-  xdisp.c xfns.c dispnew.c src/Makefile.in xmenu.c alloc.c config.in
+Marcus G. Daniels: changed xterm.c configure.in lwlib-Xm.c lwlib.c
+  xdisp.c xfns.c Makefile.in dispnew.c xmenu.c alloc.c config.in
   editfns.c emacs.c frame.c frame.h irix5-0.h keyboard.c linux.h
   lwlib-Xm.h lwlib.h ntterm.c and 11 other files
 
 Marcus Harnisch: changed gnus-art.el
 
-Marcus Karlsson: changed image.c
-
 Marek Martin: changed nnfolder.el
 
 Marien Zwart: changed progmodes/python.el
@@ -2641,38 +2335,35 @@ Mario Lang: wrote erc-button.el erc-ibuffer.el erc-imenu.el erc-menu.el
   erc-netsplit.el erc-networks.el erc-notify.el erc-speedbar.el
   erc-stamp.el erc-track.el erc-xdcc.el
 and co-wrote erc-fill.el
-and changed erc.el erc-dcc.el erc-speak.el Makefile erc-bbdb.el
-  erc-complete.el erc-pcomplete.el erc-chess.el erc-list.el battery.el
-  erc-match.el erc-autojoin.el erc-nets.el erc-nickserv.el erc-ring.el
-  artist.el cpp-root.el db-el.el db-global.el db-javascript.el db.el
-  and 25 other files
+and changed erc.el erc-dcc.el erc-speak.el erc-bbdb.el erc-complete.el
+  erc-pcomplete.el erc-chess.el erc-list.el battery.el erc-match.el
+  erc-autojoin.el erc-nets.el erc-nickserv.el erc-ring.el artist.el
+  cpp-root.el db-el.el db-global.el db-javascript.el db.el diff.el
+  and 24 other files
 
 Mark A. Hershberger: changed xml.el nnrss.el mm-url.el cperl-mode.el
-  isearch.el vc-bzr.el  NXML-NEWS cc-mode.texi compilation.txt ede.texi
-  eieio.texi esh-mode.el flymake.el gnus-group.el misc/Makefile.in
-  misc/makefile.w32-in nxml-mode.texi progmodes/compile.el
+  isearch.el vc-bzr.el  Makefile.in NXML-NEWS cc-mode.texi
+  compilation.txt ede.texi eieio.texi esh-mode.el flymake.el
+  gnus-group.el makefile.w32-in nxml-mode.texi progmodes/compile.el
   progmodes/python.el programs.texi and 7 other files
 
 Mark D. Baushke: changed mh-e.el mh-utils.el mh-mime.el mh-comp.el
-  mh-search.el mh-customize.el Makefile mh-identity.el mh-seq.el
-  mh-speed.el mh-funcs.el mh-alias.el etags.c mh-junk.el mh-tool-bar.el
+  mh-search.el mh-customize.el mh-identity.el mh-seq.el mh-speed.el
+  mh-funcs.el mh-alias.el etags.c mh-junk.el mh-tool-bar.el
   mh-xemacs-compat.el pgg-gpg.el
 
-Mark Davies: changed amdx86-64.h configure configure.ac hp800.h
-  lib-src/Makefile.in netbsd.h ralloc.c sh3el.h sort.el
+Mark Davies: changed Makefile.in amdx86-64.h configure configure.in
+  hp800.h netbsd.h ralloc.c sh3el.h sort.el
 
 Mark Diekhans: changed files.el progmodes/compile.el subr.el
 
-Mark E. Shoulson: changed org.el org-entities.el
-
 Mark H. Weaver: changed comint.el
 
 Mark Hood: changed gnus-uu.el
 
 Mark Lambert: changed process.c process.h
 
-Mark Lillibridge: changed rmail.el mail-utils.el mail/rmailmm.el
-  unrmail.el
+Mark Lillibridge: changed rmail.el mail-utils.el unrmail.el
 
 Mark Mitchell: changed font-lock.el
 
@@ -2682,6 +2373,8 @@ Mark Osbourne: changed hexl-mode.el
 
 Mark Plaksin: changed nnrss.el term.el
 
+Mark Shoulson: changed org.el
+
 Mark Thomas: changed flow-fill.el gnus-sum.el gnus-util.el nnmail.el
 
 Mark Triggs: changed nnir.el
@@ -2696,8 +2389,6 @@ Markus Armbruster: changed avoid.el
 
 Markus Gritsch: changed ebrowse.el
 
-Markus Hauck: changed org-agenda.el
-
 Markus Heiser: changed gud.el
 
 Markus Heritsch: co-wrote ada-mode.el ada-stmt.el ada-xref.el
@@ -2705,11 +2396,11 @@ Markus Heritsch: co-wrote ada-mode.el ada-stmt.el ada-xref.el
 Markus Holmberg: changed thingatpt.el
 
 Markus Rost: wrote cus-test.el
-and changed cus-edit.el files.el progmodes/compile.el rmail.el
-  tex-mode.el find-func.el rmailsum.el simple.el cus-dep.el dired.el
-  mule-cmds.el rmailout.el checkdoc.el configure.ac custom.el emacsbug.el
-  gnus.el help-fns.el ls-lisp.el mwheel.el sendmail.el
-  and 126 other files
+and changed cus-edit.el Makefile.in files.el progmodes/compile.el
+  rmail.el tex-mode.el find-func.el rmailsum.el simple.el cus-dep.el
+  dired.el mule-cmds.el rmailout.el checkdoc.el configure.in custom.el
+  emacsbug.el gnus.el help-fns.el ls-lisp.el mwheel.el
+  and 122 other files
 
 Markus Sauermann: changed lisp-mode.el
 
@@ -2722,7 +2413,6 @@ and changed bytecomp.el byte-opt.el doctor.el image-mode.el
 Marshall T. Vandegrift: changed gnus-fun.el
 
 Martin Blais: co-wrote rst.el
-and changed progmodes/compile.el
 
 Martin Boyer: changed bibtex.el menu-bar.el
 
@@ -2735,24 +2425,24 @@ Martin Kretzschmar: changed gnus-spec.el gnus-sum.el
 Martin Larose: changed message.el
 
 Martin Lorentzon: wrote vc-annotate.el
-and changed vc.el vc-cvs.el vc-rcs.el vc-sccs.el vc-hooks.el
+and changed vc.el vc-cvs.el vc-hooks.el vc-rcs.el vc-sccs.el
 
 Martin Neitzel: changed supercite.el
 
 Martin Pohlack: changed iimage.el pc-select.el
 
-Martin Rudalics: changed window.el window.c windows.texi frame.c xdisp.c
-  help.el w32term.c xterm.c buffer.c w32fns.c cus-start.el dired.el
-  window.h frame.el files.el mouse.el subr.el xfns.c buffers.texi
-  cus-edit.el display.texi and 165 other files
+Martin Rudalics: changed window.el window.c windows.texi frame.c buffer.c
+  help.el window.h cus-start.el frame.el cus-edit.el files.el
+  buffers.texi dired.el subr.el add-log.el xdisp.c font-lock.el
+  help-fns.el lisp.h mouse.el wid-edit.el and 137 other files
 
 Martin Stjernholm: wrote cc-bytecomp.el
 and co-wrote cc-align.el cc-cmds.el cc-compat.el cc-defs.el cc-engine.el
   cc-fonts.el cc-langs.el cc-menus.el cc-mode.el cc-styles.el cc-vars.el
-and changed cc-fix.el nnimap.el cc-guess.el cc-mode-19.el cc-mode.texi
-  lisp/Makefile.in ack.texi awk-mode.el cc-awk.el cc-lobotomy.el
-  cc-make.el cc-subword.el files.el generic-x.el gnus-agent.el
-  gnus-art.el gnus-demon.el mm-decode.el simple.el
+and changed cc-fix.el cc-mode.texi Makefile.in cc-guess.el cc-mode-19.el
+  nnimap.el ack.texi awk-mode.el cc-awk.el cc-lobotomy.el cc-make.el
+  cc-style.el cc-subword.el files.el generic-x.el gnus-agent.el
+  gnus-art.el mm-decode.el simple.el
 
 Martin Svenson: changed progmodes/python.el
 
@@ -2769,15 +2459,12 @@ and co-wrote gnus-kill.el gnus-mh.el gnus-msg.el gnus.el nnbabyl.el
   nnspool.el nnvirtual.el time-date.el
 and changed gnuspost.el
 
-Masashi Fujimoto: changed battery.el
-
-Masatake Yamato: wrote add-log-tests.el imenu-test.el ld-script.el
-  subword.el
+Masatake Yamato: wrote ld-script.el subword.el
 and co-wrote cc-guess.el
 and changed etags.el asm-mode.el hexl.el xdisp.c bindings.el man.el
   xfaces.c simple.el vc.el wid-edit.el add-log.el etags.c faces.el
-  pcvs.el progmodes/compile.el register.el ruler-mode.el sh-script.el
-  buffer.c cc-langs.el cus-face.el and 79 other files
+  pcvs.el progmodes/compile.el register.el ruler-mode.el buffer.c
+  cc-langs.el cus-face.el dired-x.el and 73 other files
 
 Masayuki Ataka: changed texinfmt.el texinfo.el characters.el cmuscheme.el
   make-mode.el
@@ -2787,13 +2474,9 @@ Masayuki Fujii: changed dnd.el w32-win.el
 Mathias Dahl: wrote image-dired.el
 and changed tumme.el dired.el dired.texi
 
-Mathias Megyei: changed lisp/Makefile.in
-
-Mats Lidell: changed TUTORIAL.sv european.el gnus-art.el org-element.el
+Mathias Megyei: changed Makefile.in
 
-Matt Armstrong: changed gnus-topic.el gnus.el imap.el message.el
-
-Matt Fidler: changed package.el
+Mats Lidell: changed TUTORIAL.sv european.el gnus-art.el
 
 Matt Hodges: changed textmodes/table.el faces.el iswitchb.el simple.el
   tmm.el cal-menu.el calendar.el calendar.texi diary-lib.el easymenu.el
@@ -2801,9 +2484,6 @@ Matt Hodges: changed textmodes/table.el faces.el iswitchb.el simple.el
   locate.el paragraphs.el pcomplete.el repeat.el and 3 other files
 
 Matt Lundin: changed org-agenda.el org-bibtex.el org-footnote.el org.el
-  org-bbdb.el org-datetree.el org-gnus.el
-
-Matt McClure: changed progmodes/python.el
 
 Matt Pharr: changed message.el
 
@@ -2814,9 +2494,7 @@ Matt Swift: changed dired.el editfns.c lisp-mode.el mm-decode.el
 
 Matthew Junker: changed cal-tex.el
 
-Matthew Leach: changed font-lock.el
-
-Matthew Luckie: changed configure.ac
+Matthew Luckie: changed configure.in
 
 Matthew Mundell: changed calendar.texi diary-lib.el files.texi
   type-break.el debugging.texi display.texi edebug.texi editfns.c eval.c
@@ -2824,42 +2502,30 @@ Matthew Mundell: changed calendar.texi diary-lib.el files.texi
   objects.texi os.texi positions.texi searching.texi subr.el text.texi
   and 3 other files
 
-Matthias Dahl: changed faces.el
-
 Matthias Förste: changed files.el
 
-Matthias Meulien: changed bookmark.el buff-menu.el tabify.el vc-dir.el
-
 Matthias Wiehl: changed gnus.el
 
 Matthieu Devin: wrote delsel.el
 
 Matthieu Moy: changed gnus-msg.el message.el
 
-Max Mikhanosha: changed org-agenda.el org-habit.el org.el
-
 Maxime Edouard Robert Froumentin: changed gnus-art.el mml.el
 
-Memnon Anon: changed org.texi
-
-Micah Anderson: changed spook.lines
-
-Michael Albinus: wrote dbus-tests.el dbus.el file-notify-tests.el
-  filenotify.el secrets.el tramp-cmds.el tramp-compat.el tramp-ftp.el
-  tramp-gvfs.el tramp-gw.el tramp-smb.el tramp-tests.el xesam.el
+Michael Albinus: wrote dbus.el secrets.el tramp-cmds.el tramp-compat.el
+  tramp-ftp.el tramp-gvfs.el tramp-gw.el tramp-smb.el xesam.el
   zeroconf.el
 and co-wrote tramp-cache.el tramp-sh.el tramp.el
-and changed tramp.texi dbusbind.c trampver.texi trampver.el ange-ftp.el
-  tramp-adb.el dbus.texi tramp-fish.el files.el autorevert.el files.texi
-  tramp-imap.el notifications.el tramp-vc.el configure.ac
-  lisp/Makefile.in tramp-uu.el em-unix.el keyboard.c simple.el
-  tramp-util.el and 102 other files
+and changed tramp.texi dbusbind.c trampver.texi dbus.texi trampver.el
+  ange-ftp.el tramp-fish.el files.el files.texi tramp-imap.el Makefile.in
+  tramp-vc.el tramp-util.el tramp-uu.el notifications.el simple.el
+  auth-source.el dired-aux.el configure.in em-unix.el fileio.c
+  and 66 other files
 
-Michael Ben-Gershon: changed acorn.h configure.ac riscix1-1.h riscix1-2.h
+Michael Ben-Gershon: changed acorn.h configure.in riscix1-1.h riscix1-2.h
   unexec.c
 
-Michael Brand: changed org.texi org-table.el org.el org-agenda.el
-  org-capture.el ob-tangle.el org-feed.el org-id.el org-list.el
+Michael Brand: changed org.el org-agenda.el org.texi org-table.el
 
 Michael D. Ernst: wrote reposition.el
 and changed dired-x.el uniquify.el ispell.el bibtex.el rmail.el dired.el
@@ -2872,24 +2538,18 @@ and changed tex-mode.el
 
 Michael Downes: changed gnus-sum.el
 
-Michael Gauland: co-wrote ob-scheme.el
-and changed ebnf2ps.el org-src.el
-
 Michael Gschwind: wrote iso-cvt.el
 
 Michael Harnois: changed nnimap.el
 
-Michael Heerdegen: changed dired.el eldoc.el wdired.el
-
-Michael Hoffman: changed term.el
-
 Michael Hotchin: changed progmodes/compile.el
 
 Michael I. Bushnell: changed rmail.el simple.el callproc.c gnu.h gnus.el
   lread.c process.c screen.el search.c sendmail.el startup.el timer.c
 
-Michael K. Johnson: changed configure.ac emacs.c process.c sysdep.c
-  syssignal.h systty.h unexcoff.c
+Michael K. Johnson: changed configure.in emacs.c intel386.h linux.h
+  mem-limits.h process.c sysdep.c syssignal.h systty.h template.h
+  unexcoff.c
 
 Michael Kifer: wrote ediff-diff.el ediff-help.el ediff-hook.el
   ediff-init.el ediff-merg.el ediff-mult.el ediff-ptch.el ediff-util.el
@@ -2897,28 +2557,28 @@ Michael Kifer: wrote ediff-diff.el ediff-help.el ediff-hook.el
   viper-init.el viper-keym.el viper-macs.el viper-mous.el viper-util.el
   viper.el
 and co-wrote cal-x.el
-and changed viper*.el ediff*.el viper.texi ediff.texi ediff-merge.el
-  menu-bar.el appt.el desktop.el ediff-meta.el viper-mouse.el
-
-Michael Marchionna: changed nsterm.m
+and changed viper*.el ediff*.el viper.texi ediff.texi ediff-hooks.el
+  ediff-merge.el menu-bar.el appt.el desktop.el ediff-meta.el
+  viper-mouse.el
 
-Michael Markert: changed ob.el org-agenda.el org-docbook.el org-table.el
-  org.el ox-ascii.el ox-html.el ox-latex.el
+Michael Markert: changed ob.el org-agenda.el org-ascii.el
+  org-contacts-wl.el org-docbook.el org-html.el org-latex.el org-table.el
+  org.el
 
 Michael McNamara: co-wrote verilog-mode.el
 
-Michael Olson: changed erc.el erc-backend.el Makefile erc-track.el
+Michael Olson: changed erc.el erc-backend.el erc.texi erc-track.el
   erc-log.el erc-stamp.el erc-autoaway.el erc-dcc.el erc-goodies.el
-  erc-list.el erc-compat.el erc-identd.el erc.texi ERC-NEWS erc-bbdb.el
+  erc-list.el erc-compat.el erc-identd.el ERC-NEWS erc-bbdb.el
   erc-match.el erc-notify.el erc-ibuffer.el erc-services.el remember.el
-  erc-button.el and 63 other files
+  erc-button.el erc-nicklist.el and 60 other files
 
 Michael Piotrowski: changed gnus-art.el gnus-sum.el ps-print.el
 
 Michael R. Cook: changed gnus-sum.el gnus-topic.el gnus-art.el
 
-Michael R. Mauger: changed sql.el emacsclient.c comint.el cua-base.el
-  custom.el facemenu.el recentf.el replace.el tramp.el w32fns.c
+Michael R. Mauger: changed sql.el emacsclient.c cua-base.el custom.el
+  facemenu.el recentf.el replace.el tramp.el w32fns.c
 
 Michael R. Wolf: changed ange-ftp.el
 
@@ -2933,30 +2593,22 @@ Michael Sperber: changed aix3-1.h aix4-2.h gnus.texi mail-source.el
 
 Michael Staats: wrote pc-select.el
 
-Michael Vehrs: changed woman.el
-
-Michael Welsh Duggan: changed nnimap.el lisp.h sh-script.el w32term.c
+Michael Welsh Duggan: changed lisp.h nnimap.el sh-script.el w32term.c
   buffer.c gnus-spec.el keyboard.c nnir.el nnmail.el print.c
   sieve-manage.el termhooks.h url-http.el w32-win.el w32fns.c w32menu.c
   w32term.h woman.el xdisp.c xterm.c
 
-Michael Weylandt: changed ox-latex.el
-
-Michael Witten: changed TUTORIAL fixit.texi intro.texi
-
 Michal Jankowski: changed insdel.c keyboard.c
 
-Michal Nazarewicz: changed remember.el simple.el bindings.el buffer.c
-  cmds.c files.el fill.el flyspell.el frame.c frame.h ispell.el mpc.el
-  server.el startup.el w32term.c xterm.c
+Michal Nazarewicz: changed frame.c frame.h ispell.el w32term.c xterm.c
 
-Michal Sojka: changed ox-icalendar.el
+Michal Sojka: changed org-icalendar.el
 
-Michaël Cadilhac: changed browse-url.el fr-dired-ref.tex gnus-sum.el
-  gnus.texi ido.el Makefile emacsbug.el files.el fill.el flyspell.el
-  fr-refcard.tex ispell.el meta-mode.el nnrss.el anti.texi battery.el
-  blackbox.el bs.el calccard.tex callint.c cmuscheme.el
-  and 58 other files
+Michaël Cadilhac: changed browse-url.el gnus-sum.el gnus.texi ido.el
+  emacsbug.el files.el fill.el flyspell.el fr-drdref.tex fr-refcard.ps
+  fr-refcard.tex ispell.el meta-mode.el nnrss.el
+  refcards/fr-dired-ref.pdf Makefile anti.texi battery.el blackbox.el
+  bs.el calccard.pdf and 93 other files
 
 Michelangelo Grigni: wrote ffap.el
 and changed gnus-score.el
@@ -2966,8 +2618,6 @@ Microelectronics and Computer Technology Corporation: changed
   rmailkwd.el rmailmsc.el rmailout.el rmailsum.el scribe.el server.el
   sysdep.c unexcoff.c xmenu.c
 
-Mihir Rege: changed js.el
-
 Mikael Djurfeldt: changed xdisp.c
 
 Mikael Fornius: changed org.el org-habit.el
@@ -2976,7 +2626,7 @@ Mike Haertel: changed 7300.h
 
 Mike Kazantsev: changed erc-dcc.el
 
-Mike Kupfer: changed mh-comp.el mh-e.el mh-utils.el
+Mike Kupfer: changed mh-e.el mh-utils.el
 
 Mike Lamb: changed em-unix.el esh-util.el pcmpl-unix.el
 
@@ -2989,8 +2639,6 @@ Mike Newton: co-wrote bibtex.el
 Mike Rowan: changed process.c alloc.c dispnew.c keyboard.c process.h
   sysdep.c xdisp.c
 
-Mike Sperber: changed org.el org-footnote.el
-
 Mike Williams: wrote mouse-sel.el thingatpt.el
 and changed sgml-mode.el xml-lite.el
 
@@ -3001,33 +2649,28 @@ Mikio Nakajima: changed ring.el viper-util.el
 Milan Zamazal: wrote glasses.el language/czech.el quail/czech.el
   tildify.el
 and co-wrote language/slovak.el prolog.el quail/slovak.el
-and changed czech.el abbrev.el filecache.el files.el mm-view.el org.el
-  progmodes/compile.el slovak.el
+and changed abbrev.el filecache.el files.el mm-view.el org.el
+  progmodes/compile.el
 
 Miles Bader: wrote button.el face-remap.el image-file.el macroexp.el
   mb-depth.el minibuf-eldef.el rfn-eshadow.el
 and changed comint.el faces.el simple.el editfns.c xfaces.c xdisp.c
-  info.el minibuf.c display.texi wid-edit.el xterm.c dispextern.h
-  quick-install-emacs subr.el window.el cus-edit.el diff-mode.el xfns.c
-  bytecomp.el help.el lisp.h and 273 other files
+  info.el minibuf.c display.texi wid-edit.el xterm.c Makefile.in
+  dispextern.h quick-install-emacs subr.el window.el cus-edit.el
+  diff-mode.el xfns.c bytecomp.el help.el and 270 other files
 
 Milton Wulei: changed gdb-ui.el
 
-Mirek Kaim: changed configure.ac
-
 Mirko Vukovic: changed emacs.texi maintaining.texi
 
-Mitchel Humpherys: changed vc-git.el
-
 Miyashita Hisashi: changed ccl.c coding.c coding.h mule-cmds.el
   mule-conf.el mule.el pop3.el
 
 Miyoshi Masanori: changed mouse.el smtpmail.el xdisp.c
 
 Mohsen Banan: wrote persian.el
-and changed loadup.el
 
-Mon Key: changed animate.el imap.el syntax.el
+Mon Key: changed animate.el syntax.el
 
 Morten Welinder: wrote [many MS-DOS files] arc-mode.el desktop.el
   dosfns.c internal.el msdos.h pc-win.el s-region.el
@@ -3040,12 +2683,8 @@ Mosur Mohan: changed etags.c
 
 Motorola: changed buff-menu.el
 
-Muchenxuan Tong: changed org-agenda.el org-mobile.el org-timer.el
-
 Murata Shuuichirou: changed coding.c
 
-Myles English: changed org-clock.el
-
 N. Raghavendra: changed timezone.el
 
 Nachum Dershowitz: co-wrote cal-hebrew.el
@@ -3055,21 +2694,18 @@ and changed imap.el gnus.el
 
 Nakagawa Makoto: changed ldap.el
 
-Nakaji Hiroyuki: changed mm-util.el amdx86-64.h configure.ac smiley.el
+Nakaji Hiroyuki: changed mm-util.el amdx86-64.h configure.in smiley.el
 
 Nakamura Toshikazu: changed w32fns.c
 
-Nali Toja: changed configure.ac
+Nali Toja: changed configure.in
 
 Naohiro Aota: changed fontset.c ftfont.c gnus-art.el mm-view.el tls.el
   xftfont.c
 
 Nathan J. Williams: changed imap.el
 
-Nathan Trapuzzano: changed cconv.el cl-macs.el cperl-mode.el gnus.texi
-  linum.el progmodes/python.el python-tests.el
-
-Nathan Weizenbaum: changed js.el progmodes/python.el
+Nathan Weizenbaum: changed js.el
 
 Nathaniel Flath: changed cc-menus.el cc-engine.el cc-fonts.el cc-langs.el
   cc-mode.el cc-vars.el
@@ -3080,61 +2716,48 @@ Neil Mager: wrote appt.el
 
 Neil W. Van Dyke: wrote webjump.el
 
-Nelson H. F. Beebe: changed configure.ac
+Nelson H. F. Beebe: changed configure.in
 
-Nelson Jose dos Santos Ferreira: changed nnsoup.el emacs.el gnus-art.el
-  gnus-dup.el gnus-win.el spam-stat.el
+Nelson Jose dos Santos Ferreira: changed nnsoup.el gnus-art.el
+  gnus-dup.el spam-stat.el
 
 Nevin Kapur: changed nnmail.el gnus-sum.el nnimap.el gnus-group.el
   gnus-registry.el gnus.el nnbabyl.el nnfolder.el nnmbox.el nnmh.el
   nnml.el
 
-Nguyen Thai Ngoc Duy: co-wrote vnvni.el
-
 Niall Mansfield: changed etags.c
 
-Nic Ferrier: changed ert.el tramp.el
+Nic Ferrier: changed tramp.el
 
 Nicholas Maniscalco: changed term.el
 
 Nick Alcock: changed gnus.el
 
-Nick Dokos: changed ox.el icalendar.el mh-search.el org-mobile.el org.el
-  url-cache.el
+Nick Dokos: changed org-exp.el mh-search.el org.el url-cache.el
 
 Nick Roberts: wrote gdb-mi.el t-mouse.el
 and changed gdb-ui.el gud.el building.texi tooltip.el speedbar.el
   bindings.el thumbs.el xt-mouse.el .gdbinit DEBUG cc-mode.el comint.el
   keyboard.c subr.el frames.texi help-mode.el progmodes/compile.el
-  xdisp.c display.texi term.c vc-svn.el and 145 other files
+  xdisp.c Makefile.in display.texi term.c and 154 other files
 
 Nico Francois: changed w32fns.c w32inevt.c w32menu.c
 
 Nicolas Avrutin: changed url-http.el
 
-Nicolas Calderon Asselin: changed org-clock.el
-
-Nicolas Goaziou: wrote org-element.el org-macro.el ox-ascii.el
-  ox-latex.el ox-md.el ox-org.el ox.el
-and co-wrote ox-beamer.el ox-icalendar.el ox-man.el
-and changed org-list.el org.el ox-html.el org-footnote.el org.texi
-  ox-publish.el org-inlinetask.el org-indent.el ox-odt.el org-docbook.el
-  ox-texinfo.el ob-exp.el org-timer.el ob.el org-agenda.el org-capture.el
-  ob-asymptote.el org-macs.el org-pcomplete.el org-clock.el org-table.el
-  and 22 other files
-
-Nicolas Richard: changed simple.el align.el battery.el eieio-opt.el
-  ispell.el minibuffer.el ob.el org.el package.el
+Nicolas Goaziou: changed org-list.el org.el org-footnote.el org-exp.el
+  org-latex.el org-html.el org-inlinetask.el org-indent.el org-docbook.el
+  org-timer.el ob-asymptote.el org-ascii.el org-capture.el ob.el
+  org-agenda.el org-archive.el ob-exp.el org-clock.el org-macs.el
+  org-mouse.el org.texi and 3 other files
 
 Niels Giesen: changed icalendar.el org-agenda.el org-clock.el
-  org-docbook.el org-table.el ox-icalendar.el ox-latex.el
+  org-docbook.el org-icalendar.el
 
 Niimi Satoshi: changed pp.el search.c
 
 Niklas Morberg: changed nnweb.el gnus-art.el nnimap.el spam.el
 
-Nikolai Weibull: changed org.el
-
 Nikolaj Schumacher: changed flymake.el progmodes/compile.el eldoc.el
   elp.el nsfont.m rx.el
 
@@ -3146,7 +2769,7 @@ Noah Friedman: wrote eldoc.el rlogin.el type-break.el
 and co-wrote erc-dcc.el
 and changed rsz-mini.el comint.el emacs-buffer.gdb files.el Makefile
   mailabbrev.el sendmail.el subr.el timer.el yow.el apropos.el battery.el
-  bytecomp.el calc.el coding.c complete.el config.in configure.ac
+  bytecomp.el calc.el coding.c complete.el config.in configure.in
   copyright.h fns.c gnu-linux.h and 19 other files
 
 Noah Lavine: changed tramp.el
@@ -3157,7 +2780,7 @@ Nobuyuki Hikichi: changed news-risc.h
 
 Noel Cragg: changed mh-junk.el
 
-Noorul Islam: changed ox-latex.el org.el org.texi ox-html.el
+Noorul Islam: changed org-latex.el org-html.el org.el org.texi
   org-capture.el org-gnus.el org-habit.el package.el
 
 Norbert Koch: changed gnus-msg.el gnus-score.el
@@ -3169,18 +2792,16 @@ Nuutti Kotivuori: changed gnus-sum.el flow-fill.el gnus-cache.el
 
 Odd Gripenstam: wrote dcl-mode.el
 
-Ognyan Kulev: changed TUTORIAL.bg cyrillic.el
+Ognyan Kulev: changed TUTORIAL.bg quail/cyrillic.el
 
-Okazaki Tetsurou: changed cc-fonts.el vc-svn.el vc.el
+Okazaki Tetsurou: changed cc-fonts.el
 
 Olaf Sylvester: wrote bs.el
 
 Ole Aamot: changed compile.el
 
-Oleg S. Tihonov: changed cyrillic.el ispell.el language/cyrillic.el
-  map-ynp.el subr.el
-
-Oleh Krehel: changed org-capture.el org-clock.el replace.el
+Oleg S. Tihonov: changed ispell.el language/cyrillic.el map-ynp.el
+  quail/cyrillic.el subr.el
 
 Oleksandr Gavenko: changed generic-x.el progmodes/grep.el
 
@@ -3193,8 +2814,7 @@ Oliver Scholz: wrote ipa-praat.el
 and changed gamegrid.el gnus-cite.el nonascii.texi rx.el startup.el
   update-game-score.c
 
-Oliver Seidel: wrote otodo-mode.el
-and co-wrote todo-mode.el
+Oliver Seidel: wrote todo-mode.el
 
 Olivier Laurens: changed forms.el
 
@@ -3212,9 +2832,11 @@ Oscar Figueiredo: wrote eudc-bob.el eudc-export.el eudc-hotlist.el
   eudc-vars.el eudc.el eudcb-bbdb.el eudcb-ldap.el eudcb-ph.el ldap.el
 and changed ph.el
 
+Óscar Fuentes: changed ido.el cmdproxy.c emacsclient.c vc-bzr.el
+
 P. E. Jareth Hein: changed gnus-util.el
 
-Pascal Dupuis: changed octave.el
+Pascal Dupuis: changed octave-inf.el
 
 Pascal Rigaux: changed image.c rfc2231.el
 
@@ -3229,12 +2851,12 @@ Paul Curry: changed cc-subword.el
 Paul D. Smith: wrote snmp-mode.el
 and changed imenu.el make-mode.el
 
-Paul Eggert: wrote rcs2log
+Paul Eggert: wrote rcs2log vcdiff
 and co-wrote cal-dst.el
-and changed lisp.h configure.ac alloc.c process.c fileio.c sysdep.c
-  xdisp.c image.c editfns.c keyboard.c emacs.c data.c lread.c callproc.c
-  xterm.c fns.c eval.c Makefile.in dispextern.h dispnew.c gnulib.mk
-  and 1016 other files
+and changed lisp.h Makefile.in editfns.c alloc.c xdisp.c configure.in
+  fileio.c image.c process.c fns.c xterm.c dispextern.h keyboard.c data.c
+  lread.c sysdep.c xfns.c eval.c emacs.c buffer.c config.in
+  and 573 other files
 
 Paul Fisher: changed fns.c
 
@@ -3247,15 +2869,14 @@ and changed message.el gnus-util.el gnus-int.el gnus.el gnus-agent.el
   gnus-start.el gnus-sum.el nnmail.el
 
 Paul Pogonyshev: changed progmodes/python.el subr.el which-func.el
-  align.el byte-opt.el configure.ac dabbrev.el display.texi eldoc.el
-  etags.el image-file.el image.c image.el info.el replace.el search.texi
-  searching.texi ses.el src/Makefile.in tar-mode.el url-http.el window.el
-
-Paul Reilly: changed dgux.h lwlib-Xm.c lwlib.c xlwmenu.c configure.ac
-  mail-utils.el process.c rmail.el xfns.c dgux5-4R2.h dgux5-4R3.h
-  files.el keyboard.c lwlib-Xaw.c lwlib-Xm.h lwlib-int.h lwlib.h
-  lwlib/Makefile.in mail/rmailmm.el rmailedit.el rmailkwd.el
-  and 10 other files
+  Makefile.in align.el byte-opt.el configure.in dabbrev.el display.texi
+  eldoc.el etags.el image-file.el image.c image.el info.el replace.el
+  search.texi searching.texi ses.el tar-mode.el url-http.el window.el
+
+Paul Reilly: changed dgux.h lwlib-Xm.c lwlib.c xlwmenu.c configure.in
+  mail-utils.el process.c rmail.el xfns.c Makefile.in dgux5-4R2.h
+  dgux5-4R3.h files.el keyboard.c lwlib-Xaw.c lwlib-Xm.h lwlib-int.h
+  lwlib.h mail/rmailmm.el rmailedit.el rmailkwd.el and 10 other files
 
 Paul Rivier: changed ada-mode.el mixal-mode.el reftex-vars.el reftex.el
 
@@ -3267,10 +2888,10 @@ Paul Stevenson: changed nnvirtual.el
 
 Paul Stodghill: changed gnus-agent.el gnus-util.el
 
-Pavel Janík: changed keyboard.c xterm.c COPYING xdisp.c process.c emacs.c
-  lisp.h menu-bar.el ldap.el make-dist xfns.c buffer.c coding.c eval.c
-  fileio.c flyspell.el fns.c indent.c Makefile.in callint.c cus-start.el
-  and 712 other files
+Pavel Janík: changed keyboard.c xterm.c COPYING xdisp.c Makefile.in
+  process.c emacs.c lisp.h menu-bar.el ldap.el make-dist xfns.c buffer.c
+  coding.c eval.c fileio.c flyspell.el fns.c indent.c callint.c
+  cus-start.el and 710 other files
 
 Pavel Kobiakov: wrote flymake.el
 and changed flymake.texi
@@ -3297,13 +2918,11 @@ and changed vc.el vc-hooks.el diff-mode.el etags.c etags.el forms.el
 Per Persson: wrote gnus-vm.el
 and co-wrote erc-dcc.el
 
-Per Starbäck: changed ispell.el characters.el dired.el gnus-start.el BUGS
-  apropos.el bibtex.el bytecomp.el charset.h coding.c doctor.el emacs.c
+Per Starbäck: changed ispell.el dired.el gnus-start.el BUGS apropos.el
+  bytecomp.el characters.el charset.h coding.c doctor.el emacs.c
   european.el iso-transl.el pcmpl-gnu.el replace.el startup.el
   trouble.texi vc.el xdisp.c
 
-Pete Beardmore: changed semantic/complete.el idle.el
-
 Pete Kazmier: changed gnus-art.el
 
 Pete Ware: changed message.el
@@ -3330,29 +2949,25 @@ Peter Kleiweg: wrote ps-mode.el
 
 Peter Liljenberg: wrote elint.el
 
-Peter Münster: changed gnus-demon.el gnus-group.el gnus-start.el
-  gnus.texi org-agenda.el org.el
+Peter Münster: changed gnus.texi org-agenda.el org.el
 
-Peter O'Gorman: changed configure.ac frame.h hpux10-20.h termhooks.h
+Peter O'Gorman: changed configure.in frame.h hpux10-20.h termhooks.h
 
-Peter Oliver: changed perl-mode.el server.el
+Peter Oliver: changed server.el
 
 Peter Povinec: changed term.el
 
-Peter Rosin: changed configure.ac
-
-Peter Runestig: changed configure.bat dos-w32.el emacs.rc
-  emacs/makefile.w32-in envadd.bat gmake.defs lispintro/makefile.w32-in
-  lispref/makefile.w32-in misc/makefile.w32-in multi-install-info.bat
-  nmake.defs nt/makefile.w32-in src/makefile.w32-in w32fns.c zone-mode.el
+Peter Runestig: changed makefile.w32-in configure.bat dos-w32.el emacs.rc
+  envadd.bat gmake.defs multi-install-info.bat nmake.defs w32fns.c
+  zone-mode.el
 
 Peter S. Galbraith: wrote mh-alias.el mh-identity.el mh-inc.el
   mh-limit.el
 and changed mh-comp.el mh-e.el mh-utils.el mh-mime.el mh-customize.el
-  mh-seq.el Makefile mh-init.el mh-search.el mh-xemacs-compat.el
-  mh-xemacs-toolbar.el README info-look.el mh-compat.el mh-funcs.el
-  alias.pbm alias.xpm cabinet.xpm goto-addr.el highlight.xpm mh-junk.el
-  and 11 other files
+  mh-seq.el mh-init.el mh-search.el mh-xemacs-compat.el
+  mh-xemacs-toolbar.el info-look.el mh-compat.el mh-funcs.el alias.pbm
+  alias.xpm cabinet.xpm goto-addr.el highlight.xpm mh-junk.el
+  mh-xemacs-icons.el mh-xemacs.el and 9 other files
 
 Peter Seibel: changed cl-indent.el lisp-mode.el
 
@@ -3364,26 +2979,19 @@ Peter Whaite: changed data.c
 
 Peter von der Ahe: changed gnus-ems.el
 
-Petr Hracek: changed emacs.1
+Petr Salinger: changed configure.in gnu-kfreebsd.h
 
-Petr Salinger: changed configure.ac gnu-kfreebsd.h
-
-Petri Kaurinkoski: changed configure.ac iris4d.h irix6-0.h irix6-5.h
+Petri Kaurinkoski: changed configure.in iris4d.h irix6-0.h irix6-5.h
   usg5-4.h
 
 Phil Hagelberg: wrote ert-x-tests.el
 and changed package.el pcmpl-unix.el subr.el
 
-Phil Sainty: changed subword.el
-
 Phil Sung: changed follow.el progmodes/python.el wdired.el
 
 Philip Jackson: wrote find-cmd.el org-irc.el
 
-Philipp Haselwarter: changed gnus-agent.el gnus-sum.el gnus-sync.el
-  gnus.texi newcomment.el
-
-Philipp Rumpf: changed electric.el
+Philipp Haselwarter: changed gnus-agent.el gnus.texi
 
 Philippe Schnoebelen: wrote gomoku.el mpuz.el
 
@@ -3401,29 +3009,29 @@ Pieter Schoenmakers: changed TUTORIAL.nl
 
 Pinku Surana: changed sql.el
 
-Piotr Zieliński: wrote org-mouse.el
+Piotr Zielinski: wrote org-mouse.el
 
 Prestoo Ten: changed screen.el
 
 Primoz Peterlin: changed TUTORIAL.sl
 
-Puneeth Chaganti: changed org.texi ox.el org-agenda.el org-capture.el
-  ox-html.el
+Puneeth Chaganti: changed org.texi org-exp.el org-agenda.el
+  org-capture.el org-html.el
 
 R. Bernstein: changed gud.el
 
-Rafael Laboissiere: changed org-remember.el org-bibtex.el org.el org.texi
+Rafael Laboissiere: changed org.el org.texi
 
 Rafael Sepúlveda: changed TUTORIAL.es
 
 Raffael Mancini: changed misc.el
 
-Rainer Orth: changed gtkutil.c lisp/Makefile.in
+Rainer Orth: changed Makefile.in
 
-Rainer Schöpf: changed osf1.h unexalpha.c alloc.c alpha.h buffer.c
-  callint.c data.c dispextern.h doc.c editfns.c floatfns.c frame.h lisp.h
-  lread.c marker.c mem-limits.h print.c puresize.h window.h xdisp.c
-  xterm.h
+Rainer Schoepf: wrote alpha.h unexalpha.c
+and changed osf1.h alloc.c buffer.c callint.c data.c dispextern.h doc.c
+  editfns.c floatfns.c frame.h lisp.h lread.c marker.c mem-limits.h
+  print.c puresize.h window.h xdisp.c xterm.h
 
 Raja R. Harinath: changed gnus-salt.el nnml.el
 
@@ -3433,16 +3041,14 @@ Rajesh Vaidheeswarran: wrote old-whitespace.el
 and changed whitespace.el ffap.el
 
 Ralf Angeli: wrote scroll-lock.el
-and changed w32fns.c reftex-cite.el gnus-art.el reftex-toc.el reftex.el
-  reftex-auc.el reftex-dcr.el reftex-global.el reftex-index.el
-  reftex-parse.el reftex-ref.el reftex-sel.el reftex-vars.el reftex.texi
+and changed w32fns.c gnus-art.el reftex-cite.el reftex-toc.el reftex.el
   tex-mode.el comint.el flow-fill.el frame.el killing.texi mm-uu.el
-  mm-view.el and 6 other files
+  mm-view.el package.el pcl-cvs.texi reftex-auc.el reftex-dcr.el
+  reftex-global.el reftex-index.el reftex-parse.el reftex-ref.el
+  reftex-sel.el and 6 other files
 
 Ralf Fassel: changed dabbrev.el files.el fill.el iso-acc.el tar-mode.el
 
-Ralf Mattes: changed el.srt
-
 Ralph Schleicher: wrote battery.el info-look.el
 and changed libc.el browse-url.el fileio.c info.el mm-decode.el
   nnultimate.el perl-mode.el which-func.el
@@ -3453,14 +3059,9 @@ Randal Schwartz: wrote pp.el
 
 Randall Smith: changed dired.el
 
-Ransom Williams: changed files.el
-
-Rasmus Pank: changed org.el ox-latex.el ob-C.el org-entities.el
-  org-src.el ox.el
-
 Raul Acevedo: changed info.el options.el
 
-Ray Blaak: co-wrote opascal.el
+Ray Blaak: co-wrote delphi.el
 
 Raymond Scholz: co-wrote deuglify.el
 and changed gnus-art.el gnus-msg.el gnus.texi message.el nnmail.el
@@ -3470,7 +3071,7 @@ Reiner Steib: wrote gmm-utils.el gnus-news.el
 and changed message.el gnus.texi gnus-art.el gnus-sum.el gnus-group.el
   gnus.el mml.el gnus-faq.texi mm-util.el gnus-score.el message.texi
   gnus-msg.el gnus-start.el gnus-util.el spam-report.el mm-uu.el spam.el
-  mm-decode.el files.el gnus-agent.el nnmail.el and 176 other files
+  mm-decode.el files.el gnus-agent.el nnmail.el and 182 other files
 
 Remek Trzaska: changed gnus-ems.el
 
@@ -3478,33 +3079,30 @@ Remi Letot: changed nnmaildir.el
 
 Renaud Rioboo: changed nnmail.el
 
-René Kyllingstad: changed editfns.c mule-cmds.el pcomplete.el
+René Kyllingstad: changed pcomplete.el
 
 Reto Zimmermann: wrote vera-mode.el
 and co-wrote vhdl-mode.el
 
-Reuben Thomas: changed remember.el files.el flymake.el indent.c
-  loading.texi pcvs-defs.el rect.el simple.el
+Reuben Thomas: changed files.el flymake.el loading.texi pcvs-defs.el
+  simple.el
 
 Riccardo Murri: changed vc-bzr.el tls.el
 
-Richard Copley: changed Makefile.in epaths.in epaths.nt gdb-mi.el
-
-Richard Dawe: changed config.in src/Makefile.in
+Richard Dawe: changed Makefile.in config.in
 
 Richard G. Bielawski: changed modes.texi paren.el
 
 Richard Hoskins: changed message.el
 
 Richard Kim: wrote wisent/python.el
-and changed bovine.texi db-global.el loading.texi python-wy.el
-  texnfo-upd.el wisent.texi
+and changed loading.texi python-wy.el texnfo-upd.el
 
 Richard King: wrote filelock.c uniquify.el userlock.el
 
 Richard L. Pieri: wrote pop3.el
 
-Richard Lawrence: changed org-agenda.el ox-latex.el
+Richard Lawrence: changed org-latex.el
 
 Richard Levitte: changed vc-mtn.el
 
@@ -3515,13 +3113,13 @@ Richard M. Stallman: wrote [The original GNU Emacs and numerous files]
 and co-wrote cc-align.el cc-cmds.el cc-defs.el cc-engine.el cc-langs.el
   cc-menus.el cc-mode.el cc-styles.el cc-vars.el font-lock.el
 and changed files.el keyboard.c simple.el xterm.c xdisp.c rmail.el
-  fileio.c process.c sysdep.c buffer.c xfns.c window.c configure.ac
-  subr.el startup.el sendmail.el emacs.c Makefile.in editfns.c info.el
-  dired.el and 1340 other files
+  Makefile.in fileio.c process.c sysdep.c buffer.c xfns.c window.c
+  configure.in subr.el startup.el sendmail.el emacs.c editfns.c info.el
+  dispnew.c and 1350 other files
 
 Richard Mlynarik: wrote cl-indent.el ebuff-menu.el ehelp.el rfc822.el
   terminal.el yow.el
-and changed files.el rmail.el simple.el info.el sysdep.c bytecomp.el
+and changed files.el simple.el rmail.el info.el sysdep.c bytecomp.el
   startup.el keyboard.c fileio.c process.c sendmail.el window.c editfns.c
   unexec.c xfns.c keymap.c lisp-mode.el minibuf.c buffer.c dired.el
   dispnew.c and 140 other files
@@ -3531,12 +3129,10 @@ and changed sh-script.el ediff-init.el regexp-opt.el simple.el
 
 Rick Farnbach: wrote morse.el
 
-Rick Frankel: changed ox-html.el ob-sql.el org.texi
-
 Rick Sladkey: wrote backquote.el
 and changed gud.el intervals.c intervals.h simple.el
 
-Rob Browning: changed configure.ac
+Rob Browning: changed configure.in
 
 Rob Christie: changed nsmenu.m
 
@@ -3544,8 +3140,8 @@ Rob Giardina: changed org-agenda.el
 
 Rob Kaut: changed vhdl-mode.el
 
-Rob Riepel: wrote tpu-edt.doc tpu-edt.el tpu-extras.el tpu-mapper.el
-  vt-control.el
+Rob Riepel: wrote tpu-edt.el tpu-extras.el tpu-mapper.el vt-control.el
+and changed tpu-doc.el
 
 Robert Bihlmeyer: changed gnus-score.el gnus-util.el message.el
 
@@ -3555,22 +3151,20 @@ Robert Fenk: changed desktop.el
 
 Robert J. Chassell: wrote makeinfo.el page-ext.el texinfo.el
   texnfo-upd.el
-and changed texinfmt.el emacs-lisp-intro.texi emacs.texi texinfo.tex
-  info.el texinfo-update.el INSTALL case-table.el cl.texi help-fns.el
+and changed texinfmt.el emacs-lisp-intro.texi emacs.tex texinfo.tex
+  info.el texinfo-update.el INSTALL case-table.el cl.texinfo help-fns.el
   help-mode.el history.el informat.el latin-1.el latin-2.el latin-3.el
-  latin-4.el page.el tex-mode.el texinfo.texi vip.texi
-
-Robert Jarzmik: changed ede/linux.el inversion.el
+  latin-4.el page.el tex-mode.el texinfo.texinfo vip.texinfo
 
 Robert Marshall: changed mule-cmds.el
 
-Robert P. Goldman: changed org.texi ob-exp.el org.el ox-latex.el
+Robert P. Goldman: changed org.texi ob-exp.el org-latex.el org.el
 
 Robert Pluim: changed gnus-demon.el org-agenda.el
 
 Robert Thorpe: changed cus-start.el indent.el
 
-Roberto Huelga Díaz: changed org-clock.el org-timer.el
+Roberto Huelga: changed org-clock.el
 
 Roberto Rodríguez: changed ada-mode.texi glossary.texi widget.texi
 
@@ -3578,36 +3172,35 @@ Roderick Schertler: changed dgux.h dgux4.h gud.el sysdep.c
 
 Rodney J. Whitby: co-wrote vhdl-mode.el
 
-Rodrigo Real: changed pt-br-refcard.tex
+Rodrigo Real: changed pt-br-refcard.tex pt-br-refcard.ps
 
 Roger Breitenstein: changed smtpmail.el
 
 Roland B. Roberts: changed buffer.h callproc.c dired.c files.el
   gnus-group.el gnus-sum.el process.c sort.el sysdep.c systty.h
 
-Roland Kaufmann: changed ox.el
+Roland Kaufmann: changed org-exp.el
 
 Roland McGrath: wrote autoload.el etags.el map-ynp.el progmodes/grep.el
 and co-wrote find-dired.el progmodes/compile.el
-and changed compile.el add-log.el configure.ac files.el vc.el simple.el
-  mailabbrev.el comint.el Makefile.in buffer.c upd-copyr.el menu-bar.el
-  etags.c mem-limits.h ralloc.c src/Makefile.in fileio.c data.c process.c
-  rlogin.el rmail.el and 139 other files
+and changed compile.el add-log.el configure.in files.el Makefile.in vc.el
+  simple.el mailabbrev.el comint.el buffer.c upd-copyr.el etags.c
+  menu-bar.el mem-limits.h ralloc.c fileio.c data.c process.c rlogin.el
+  rmail.el shell.el and 137 other files
 
 Roland Winkler: wrote proced.el
-and changed bibtex.el faces.el crm.el process.c appt.el artist.el
-  conf-mode.el cus-edit.el diary-lib.el flyspell.el hideshow.el
-  ibuf-ext.el ibuffer.el ispell.el make-mode.el sgml-mode.el sh-script.el
-  skeleton.el smtpmail.el
+and changed bibtex.el process.c appt.el artist.el conf-mode.el
+  flyspell.el hideshow.el ibuffer.el ispell.el make-mode.el sgml-mode.el
+  sh-script.el skeleton.el smtpmail.el
 
 Rolf Ebert: co-wrote ada-mode.el ada-stmt.el ada-xref.el
 and changed files.el find-file.el
 
-Romain Francoise: changed efaq.texi message.el make-dist gnus.texi
-  dired-x.el Makefile.in comint.el fileio.c ibuf-ext.el subr.el
-  configure.ac files.texi gnus-sum.el gnus-uu.el progmodes/compile.el
-  puresize.h replace.el startup.el doclicense.texi emacs.c gnus-fun.el
-  and 150 other files
+Romain Francoise: changed faq.texi message.el Makefile.in make-dist
+  gnus.texi dired-x.el comint.el ibuf-ext.el subr.el gnus-sum.el
+  gnus-uu.el progmodes/compile.el puresize.h replace.el startup.el
+  configure.in doclicense.texi emacs.c files.texi gnus-fun.el help-fns.el
+  and 146 other files
 
 Roman Belenov: changed which-func.el
 
@@ -3617,15 +3210,13 @@ Ronan Waide: changed smtpmail.el
 
 Ross Patterson: co-wrote org-protocol.el
 
-Roy Hashimoto: changed mm-view.el
-
 Roy Liu: changed ns-win.el
 
 Rui-Tao Dong: changed nnweb.el
 
 Rune Kleveland: changed xfns.c
 
-Rupert Swarbrick: changed cal-html.el gnus-score.el
+Rupert Swarbrick: changed gnus-score.el
 
 Russ Allbery: changed message.el
 
@@ -3633,31 +3224,21 @@ Ryan Barrett: changed dirtrack.el
 
 Ryan C. Thompson: changed savehist.el
 
-Ryan Crum: changed json.el
-
 Ryan Twitchell: changed ido.el
 
 Ryan Yeske: wrote rcirc.el
 and changed ffap.el ispell.el message.texi rmailsum.el simple.el
   testcover.el webjump.el
 
-Ryo Takaishi: changed ob-tangle.el org-capture.el org-protocol.el
-
 Ryo Yoshitake: changed xterm.c frame.c frame.h mac.c macfns.c w32fns.c
   xfns.c
 
 Ryszard Kubiak: co-wrote ogonek.el
 
-Rémi Vanicat: changed ox-icalendar.el org-table.el
-
-Rüdiger Sonderfeld: wrote inotify-test.el reftex-tests.el
-and changed octave.el eww.el shr.el bibtex.el configure.ac
-  misc/Makefile.in reftex-vars.el TUTORIAL.de ada-mode.el building.texi
-  calc-lang.el dired.texi editfns.c emacs.c emacs.texi epa.el erc.el
-  eww.texi ffap.el files.texi floatfns.c and 28 other files
+Rémi Vanicat: changed org-icalendar.el
 
 Sacha Chua: wrote erc-pcomplete.el
-and changed erc.el org.el erc-button.el org.texi
+and changed erc.el erc-button.el
 
 Saito Takuya: changed mule.el progmodes/compile.el
 
@@ -3669,14 +3250,12 @@ Sam Kendall: changed etags.c etags.el
 
 Sam Steingold: wrote gulp.el midnight.el
 and changed progmodes/compile.el cl-indent.el vc-cvs.el vc.el mouse.el
-  simple.el font-lock.el vc-hg.el ange-ftp.el files.el tex-mode.el
-  window.el add-log.el bindings.el bookmark.el bug-reference.el
-  calendar.el diary-lib.el dired.el etags.el pcvs.el and 145 other files
-
-Samuel Bronson: changed custom.el emacsclient.c keyboard.c
-  progmodes/grep.el
+  simple.el font-lock.el ange-ftp.el vc-hg.el window.el add-log.el
+  bookmark.el bug-reference.el diary-lib.el dired.el etags.el pcvs.el
+  tex-mode.el apropos.el bindings.el emacs-lisp/debug.el
+  and 126 other files
 
-Samuel Loury: changed org.el
+Samuel Bronson: changed custom.el
 
 Samuel Tardieu: changed smime.el
 
@@ -3684,22 +3263,20 @@ Samuel Thibault: changed gnu.h sysdep.c term.c
 
 Sanghyuk Suh: changed mac-win.el macterm.c
 
-Santiago Payà I Miralta: changed vc-hg.el
-
 Sascha Lüdecke: co-wrote mml1991.el
 and changed gnus-win.el
 
-Sascha Wilde: changed pgg-gpg.el pgg.texi pgg.el bubbles.el configure.ac
+Sascha Wilde: changed pgg-gpg.el pgg.texi pgg.el bubbles.el configure.in
   ede/srecode.el proj-shared.el vc-hg.el
 
 Satyaki Das: wrote mh-acros.el mh-gnus.el mh-search.el mh-speed.el
   mh-thread.el mh-tool-bar.el
 and co-wrote mh-junk.el
 and changed mh-e.el mh-utils.el mh-seq.el mh-comp.el mh-mime.el
-  mh-customize.el mh-funcs.el Makefile mh-alias.el mh-unit.el mh-init.el
+  mh-customize.el mh-funcs.el mh-alias.el mh-unit.el mh-init.el
   mh-identity.el mh-make.el mh-xemacs-toolbar.el mh-xemacs-compat.el
-  pgg-gpg.el mh-inc.el highlight.xpm mh-logo.xpm mh-print.el mh-xemacs.el
-  simple.el
+  pgg-gpg.el mh-inc.el highlight.xpm mh-func.el mh-logo.xpm mh-print.el
+  mh-xemacs.el simple.el
 
 Schlumberger Technology Corporation: changed gud.el
 
@@ -3718,8 +3295,6 @@ Scott Frazer: wrote deeper-blue-theme.el whiteboard-theme.el
 
 Scott M. Meyers: changed cmacexp.el
 
-Sean Connor: changed gnus-sum.el
-
 Sean Neakums: changed gnus-msg.el gnus-uu.el supercite.el
 
 Sean O'Halpin: changed ob.el
@@ -3738,18 +3313,15 @@ and co-wrote dired-x.el find-dired.el
 and changed add-log.el
 
 Sebastian Rose: co-wrote org-protocol.el
-and changed ox-publish.el ftfont.c ox-jsinfo.el
+and changed org-publish.el ftfont.c org-jsinfo.el
 
 Sebastian Tennant: changed desktop.el
 
-Sebastian Wiesner: changed bytecomp.el comint.el files.el replace.el
-  simple.el
-
 Sebastien Kirche: changed mail-extr.el
 
-Seiji Zenitani: changed nsfns.m frame.c xterm.c PkgInfo document.icns
-  find-func.el frame.h help-fns.el macfns.c nsfont.m nsterm.m w32fns.c
-  xdisp.c xfns.c
+Seiji Zenitani: changed nsfns.m frame.c xterm.c Info.plist PkgInfo
+  document.icns find-func.el frame.h help-fns.el macfns.c nsfont.m
+  nsterm.m w32fns.c xdisp.c xfns.c
 
 Sen Nagata: wrote crm.el rfc2368.el
 
@@ -3763,10 +3335,6 @@ Sergey Litvinov: co-wrote ob-fortran.el
 
 Sergey Poznyakoff: changed mh-mime.el rmail.el rmail.texi smtpmail.el
 
-Sergio Durigan Junior: changed eudcb-bbdb.el gdb-mi.el
-
-Sergio Martinez: changed nnimap.el
-
 Sergio Pokrovskij: changed TUTORIAL.eo
 
 Seweryn Kokot: changed positions.texi searching.texi
@@ -3775,7 +3343,7 @@ Shaun Johnson: changed ob-tangle.el org-exp-blocks.el
 
 Shawn Boles: changed url-cookie.el
 
-Shawn M. Carey: wrote [some early FreeBSD support]
+Shawn M. Carey: wrote freebsd.h
 
 Shenghuo Zhu: wrote binhex.el mm-extern.el mm-partial.el mm-url.el
   mm-uu.el mml2015.el nnrss.el rfc1843.el uudecode.el
@@ -3784,11 +3352,11 @@ and changed gnus-art.el message.el gnus-sum.el gnus-msg.el gnus.el
   gnus-agent.el mm-decode.el mm-util.el gnus-group.el mml.el
   gnus-start.el gnus-util.el mm-view.el nnslashdot.el nnmail.el nntp.el
   gnus-topic.el gnus-xmas.el rfc2047.el mail-source.el gnus-win.el
-  and 95 other files
+  and 97 other files
 
 Shigeru Fukaya: wrote bytecomp-tests.el
-and changed apropos.el byte-opt.el bytecomp.el elint.el rx-new.el ses.el
-  texinfmt.el
+and changed byte-opt.el bytecomp-testsuite.el bytecomp.el elint.el
+  rx-new.el ses.el texinfmt.el
 
 Shinichirou Sugou: changed etags.c
 
@@ -3807,23 +3375,19 @@ Sidney Markowitz: changed doctor.el nsmenu.m
 
 Sigbjorn Finne: changed gnus-srvr.el
 
-Simen Heggestøyl: changed scheme.el
-
 Simon Josefsson: wrote dig.el dns-mode.el flow-fill.el fringe.el imap.el
-  mml-sec.el mml-smime.el password-cache.el rfc2104.el sieve-mode.el
-  sieve.el smime.el starttls.el tls.el url-imap.el
+  mml-sec.el mml-smime.el password-cache.el rfc2104.el sieve-manage.el
+  sieve-mode.el sieve.el smime.el starttls.el tls.el url-imap.el
 and co-wrote gnus-sieve.el gssapi.el mml1991.el nnfolder.el nnimap.el
-  nnml.el sieve-manage.el
+  nnml.el
 and changed message.el gnus-sum.el gnus-art.el smtpmail.el pgg-gpg.el
   pgg.el gnus-agent.el mml2015.el mml.el gnus-group.el mm-decode.el
   gnus-msg.el gnus.texi pgg-pgp5.el browse-url.el gnus-int.el gnus.el
-  hashcash.el mm-view.el password.el gnus-cache.el and 100 other files
-
-Simon Law: changed delsel.el electric.el
+  hashcash.el mm-view.el password.el gnus-cache.el and 99 other files
 
 Simon Leinen: changed Makefile.in smtpmail.el Makefile cm.c cm.h hpux9.h
-  indent.c leim/Makefile.in process.c sc.texi sgml-mode.el term.c vc.el
-  xfns.c xmenu.c xterm.c
+  indent.c process.c sc.texinfo sgml-mode.el term.c vc.el xfns.c xmenu.c
+  xterm.c
 
 Simon Marshall: wrote fast-lock.el lazy-lock.el regexp-opt.el
 and co-wrote comint.el shell.el
@@ -3832,11 +3396,7 @@ and changed font-lock.el rmail.el fortran.el sendmail.el subr.el dired.el
   menu-bar.el perl-mode.el ps-print.el rmailsum.el bytecomp.el
   cc-fonts.el data.c faces.el lisp-mode.el and 56 other files
 
-Simon Schubert: changed json.el
-
-Simon South: co-wrote opascal.el
-
-Simon Thum: changed ob-maxima.el
+Simon South: co-wrote delphi.el
 
 Skip Collins: changed w32fns.c w32term.c w32term.h
 
@@ -3856,17 +3416,15 @@ Stefan Guath: changed find-dired.el
 
 Stefan Merten: co-wrote rst.el
 
-Stefan Monnier: wrote bibtex-style.el bzrmerge.el cl.el
-  completion-tests.el core-elisp-tests.el css-mode.el cvs-status.el
-  diff-mode.el gv.el lexbind-tests.el log-edit.el log-view.el
-  minibuffer.el mpc.el nadvice.el pcase.el pcvs-defs.el pcvs-info.el
-  pcvs-parse.el pcvs-util.el regexp-tests.el reveal.el smerge-mode.el
-  smie.el subword-tests.el vc-mtn.el
+Stefan Monnier: wrote bibtex-style.el bzrmerge.el css-mode.el
+  cvs-status.el diff-mode.el lexbind-tests.el log-edit.el log-view.el
+  minibuffer.el mpc.el pcase.el pcvs-defs.el pcvs-info.el pcvs-parse.el
+  pcvs-util.el reveal.el smerge-mode.el smie.el vc-mtn.el
 and co-wrote font-lock.el
-and changed subr.el simple.el lisp.h keyboard.c files.el vc.el
-  bytecomp.el xdisp.c alloc.c eval.c cl-macs.el progmodes/compile.el
-  keymap.c pcvs.el sh-script.el newcomment.el tex-mode.el buffer.c
-  vc-hooks.el window.c lread.c and 1207 other files
+and changed vc.el subr.el simple.el lisp.h keyboard.c files.el
+  bytecomp.el keymap.c Makefile.in progmodes/compile.el xdisp.c pcvs.el
+  alloc.c newcomment.el vc-hooks.el tex-mode.el buffer.c fileio.c eval.c
+  sh-script.el fill.el and 1033 other files
 
 Stefan Reichör: changed gnus-agent.el
 
@@ -3878,32 +3436,32 @@ Stefan Waldherr: changed nnweb.el
 
 Stefan Wiens: changed gnus-sum.el
 
-Stefan-W. Hahn: changed org-bibtex.el ps-print.el simple.el
+Steinar Bang: changed imap.el
 
-Stefano Facchini: changed gtkutil.c
-
-Steinar Bang: changed gnus-setup.el imap.el
+Štěpán Němec: changed INSTALL calc-ext.el cl.texi comint.el edebug.texi
+  font-lock.el loading.texi maps.texi mark.texi message.texi mini.texi
+  minibuf.texi misc.texi programs.texi subr.el tips.texi url-vars.el
+  url.texi vc-git.el window.c windows.texi
 
 Stephan Stahl: changed which-func.el buff-menu.el buffer.c dired-x.texi
   ediff-mult.el
 
 Stephen A. Wood: changed fortran.el
 
-Stephen Berman: co-wrote todo-mode.el
-and changed todo-mode.texi diary-lib.el minibuffer.el info.el
-  otodo-mode.el allout.el dframe.el dir dired-aux.el dired.el doc-view.el
-  elpa files.el find-dired.el frame.c gamegrid.el gnus-group.el gomoku.el
-  gtkutil.c misc/Makefile.in newcomment.el and 8 other files
+Stephen Berman: changed diary-lib.el todo-mode.el allout.el dframe.el
+  dired-aux.el dired.el files.el find-dired.el frame.c gnus-group.el
+  gtkutil.c info.el minibuffer.el newcomment.el page.el proced.el
+  recentf.el rfc822.el subr.el
 
-Stephen C. Gilardi: changed configure.ac
+Stephen C. Gilardi: changed configure.in
 
 Stephen Compall: changed saveplace.el texinfo.el
 
 Stephen Eglen: wrote iswitchb.el mspools.el
-and changed diary-lib.el octave.el org-agenda.el locate.el replace.el
+and changed diary-lib.el locate.el octave-inf.el org-agenda.el replace.el
   hexl.el info-look.el sendmail.el spell.el uce.el MORE.STUFF add-log.el
   advice.el allout.el autoinsert.el avoid.el backquote.el battery.el
-  bib-mode.el bruce.el c-mode.el and 80 other files
+  bib-mode.el bruce.el c-mode.el and 78 other files
 
 Stephen Gildea: wrote refcard.tex
 and co-wrote mh-funcs.el mh-search.el
@@ -3926,15 +3484,15 @@ Steve Grubb: changed vcdiff
 
 Steve Nygard: changed unexnext.c
 
-Steve Purcell: changed nnimap.el nsterm.m
+Steve Purcell: changed nnimap.el
 
 Steve Strassmann: wrote spook.el
 
 Steve Youngs: changed mh-utils.el mh-xemacs-compat.el mh-customize.el
-  mh-e.el mh-comp.el mh-mime.el Makefile dns.el gnus-art.el browse-url.el
+  mh-e.el mh-comp.el mh-mime.el dns.el gnus-art.el browse-url.el
   gnus-sum.el gnus-xmas.el mh-search.el mh-seq.el password.el
   run-at-time.el em-unix.el gmm-utils.el gnus-cite.el gnus-demon.el
-  gnus-ems.el and 17 other files
+  gnus-ems.el gnus-msg.el and 16 other files
 
 Steven E. Harris: changed nnheader.el
 
@@ -3946,10 +3504,10 @@ and changed gnus-xmas.el gnus-msg.el add-log.el edebug.el gnus-ems.el
 
 Steven Suhr: changed dispnew.c scroll.c term.c termchar.h
 
-Steven Tamm: changed macterm.c mac.c macfns.c configure.ac mac-win.el
-  unexmacosx.c darwin.h editfns.c lread.c macmenu.c scroll-bar.el
-  src/Makefile.in Makefile.in config.h config.in dispnew.c eval.c
-  fileio.c fns.c generic-x.el image.c and 4 other files
+Steven Tamm: changed macterm.c mac.c macfns.c configure.in mac-win.el
+  unexmacosx.c Makefile.in darwin.h editfns.c lread.c macmenu.c
+  scroll-bar.el config.h config.in dispnew.c eval.c fileio.c fns.c
+  generic-x.el image.c process.c and 3 other files
 
 Stewart M. Clamen: co-wrote cal-mayan.el cc-align.el cc-cmds.el
   cc-defs.el cc-engine.el cc-langs.el cc-menus.el cc-mode.el cc-styles.el
@@ -3961,12 +3519,8 @@ Stuart D. Herring: changed desktop.el files.el isearch.el align.el
   allout.el comint.el edebug.el find-lisp.el keymap.c minibuf.c sregex.el
   timeclock.el widget.texi
 
-Stuart Hickinbottom: changed org-clock.el
-
 Sudish Joseph: changed mac-win.el
 
-Suhail Shergill: changed ob-core.el ox-html.el
-
 Sun Microsystems, Inc: wrote emacs.icon sun.el
 and changed emacsclient.c server.el
 
@@ -3974,7 +3528,7 @@ Sun Yijiang: changed TUTORIAL.cn
 
 Sundar Narasimhan: changed rnews.el
 
-Suvayu Ali: changed org.texi org-inlinetask.el org-src.el org.el ox.el
+Suvayu Ali: changed org.texi org-exp.el org-inlinetask.el org-src.el
 
 Sven Joachim: changed files.el de-refcard.tex dired-aux.el emacs.1
   arc-mode.el dired-x.el em-cmpl.el em-hist.el em-ls.el esh-cmd.el
@@ -3987,34 +3541,26 @@ Syver Enstad: changed gud.el
 
 Sébastien Delafond: changed org.el
 
-Sébastien Gross: changed hideshow.el
-
-Sébastien Vauban: changed org.el org-agenda.el ox-latex.el ob-core.el
-  org-clock.el ox-html.el
-
-T.F. Torrey: changed org-rmail.el ox.el
+Sébastien Vauban: changed org.el org-agenda.el org-html.el org-latex.el
 
 T.V. Raman: changed completion.el files.el json.el mairix.el mspools.el
   xml.c
 
 Taichi Kawabata: wrote quail/indian.el ucs-normalize.el
-and changed indian.el devanagari.el ind-util.el devan-util.el
-  language/indian.el characters.el fontset.el leim/Makefile.in
-  lisp/Makefile.in malayalam.el mlm-util.el mule-conf.el tamil.el
-  tml-util.el
+and changed devanagari.el ind-util.el Makefile.in devan-util.el
+  language/indian.el characters.el fontset.el malayalam.el mlm-util.el
+  mule-conf.el tamil.el tml-util.el
 
 Takaaki Ota: wrote textmodes/table.el
 and changed appt.el dired.c etags.c ldap.el makefile.w32-in
   progmodes/compile.el recentf.el replace.el subr.el w32bdf.c
 
-Takafumi Arakaki: changed url-expand.el url-http.el which-func.el
-
 Takahashi Kaoru: changed texinfmt.el
 
 Takahashi Naoto: wrote ethio-util.el language/ethiopic.el latin-post.el
   quail/cyrillic.el quail/ethiopic.el robin.el
 and co-wrote latin-ltx.el quail.el
-and changed ethiopic.el fontset.el mule-conf.el
+and changed fontset.el mule-conf.el
 
 Takai Kousuke: changed ccl.el compface.el
 
@@ -4025,31 +3571,27 @@ and changed arc-mode.el
 
 Tassilo Horn: wrote doc-view.el
 and co-wrote org-gnus.el
-and changed reftex-vars.el gnus-sum.el tsdh-dark-theme.el gnus.texi
-  subword.el image-mode.el reftex.el tsdh-light-theme.el cc-cmds.el
-  display.texi em-term.el emacsbug.el files.el gnus-art.el misc.texi
-  nnimap.el reftex-cite.el buffers.texi control.texi help.texi info.el
-  and 53 other files
+and changed subword.el image-mode.el Makefile.in cc-cmds.el emacsbug.el
+  gnus-art.el gnus.texi nnimap.el files.el gnus-sum.el info.el
+  org-footnote.el org.el reftex-ref.el saveplace.el simple.el
+  tsdh-dark-theme.el tsdh-light-theme.el ack.texi artist.el bindings.el
+  and 26 other files
 
 Tatsuya Ichikawa: changed gnus-agent.el gnus-cache.el
 
 Ted Lemon: changed emacs.c lastfile.c puresize.h
 
-Ted Phelps: changed mh-search.el mh-e.el mh-folder.el mh-junk.el
-  mh-scan.el mh-tool-bar.el shr.el
+Ted Phelps: changed mh-search.el mh-tool-bar.el
 
-Ted Wiles: changed org-habit.el
-
-Teemu Likonen: changed dired.el erc-backend.el gnus-agent.el indent.el
-  message.el
+Teemu Likonen: changed dired.el gnus-agent.el message.el
 
 Teodor Zlatanov: wrote auth-source.el gnus-registry.el gnus-sync.el
   gnus-tests.el gnutls.el registry.el spam-report.el url-future-tests.el
-  url-future.el url-util-tests.el
-and changed spam.el gnus.el nnimap.el gnus.texi gnus-sum.el cfengine.el
-  auth.texi gnutls.c gnus-util.el netrc.el gnus-start.el message.el
-  spam-stat.el encrypt.el nnir.el nnmail.el gnutls.h imap.el
-  mail-source.el nnmairix.el nntp.el and 110 other files
+  url-future.el
+and changed spam.el gnus.el nnimap.el gnus.texi gnus-sum.el gnus-util.el
+  auth.texi netrc.el gnus-start.el gnutls.c message.el spam-stat.el
+  encrypt.el nnir.el nnmail.el imap.el mail-source.el nnmairix.el nntp.el
+  Makefile.in gnus-encrypt.el and 97 other files
 
 Terje Rosten: changed xfns.c version.el xterm.c xterm.h
 
@@ -4059,35 +3601,32 @@ Terry Jones: wrote shadow.el
 
 Tetsuo Tsukamoto: changed nnrss.el
 
-Tetsurou Okazaki: changed Makefile.in byte-opt.el lib-src/Makefile.in
-  log-edit.el lread.c xterm.c
+Tetsurou Okazaki: changed Makefile.in byte-opt.el log-edit.el lread.c
+  xterm.c
 
 Thamer Mahmoud: changed arabic.el
 
 Theodore Jump: changed makefile.nt makefile.def w32-win.el w32faces.c
 
 Thien-Thi Nguyen: co-wrote hideshow.el
-and changed ewoc.el vc.el info.el zone.el processes.texi lisp-mode.el
-  text.texi vc-rcs.el display.texi fileio.c files.el scheme.el vc-git.el
-  MORE.STUFF TUTORIAL.it bindat.el cc-vars.el configure.ac dcl-mode.el
-  diff-mode.el dired.el and 160 other files
+and changed ewoc.el vc.el info.el zone.el Makefile.in processes.texi
+  lisp-mode.el text.texi vc-rcs.el display.texi fileio.c files.el
+  scheme.el vc-git.el MORE.STUFF TUTORIAL.it bindat.el cc-vars.el
+  configure.in dcl-mode.el diff-mode.el and 158 other files
 
 Thierry Emery: changed kinsoku.el timezone.el url-http.el wid-edit.el
 
 Thierry Volpiatto: changed bookmark.el files.el dired-aux.el
-  eshell/eshell.el gnus-sum.el net-utils.el tramp.el files.texi
-  image-mode.el info.el man.el woman.el avoid.el dired.el doc-view.el
-  find-func.el font-lock.el gnus-art.el gnus-msg.el image-dired.el
-  message.el and 4 other files
-
-Thomas Bach: changed wisent/python.el
+  eshell/eshell.el gnus-sum.el files.texi image-mode.el info.el man.el
+  woman.el dired.el doc-view.el find-func.el gnus-art.el gnus-msg.el
+  image-dired.el tramp.el vc-rcs.el
 
 Thomas Baumann: wrote org-mhe.el
 and co-wrote org-bbdb.el
 
 Thomas Bellman: co-wrote avl-tree.el
 
-Thomas DeWeese: changed x-win.el
+Thomas Deweese: changed x-win.el
 
 Thomas Dorner: changed ange-ftp.el
 
@@ -4098,8 +3637,6 @@ Thomas Horsley: changed cxux-crt0.s cxux.h cxux7.h emacs.c nh3000.h
 
 Thomas Hühn: changed tutorial.el
 
-Thomas Kappler: changed nsfont.m
-
 Thomas Link: wrote filesets.el
 
 Thomas Morgan: changed org-habit.el forms.el select.el
@@ -4126,23 +3663,17 @@ Tibor Šimko: co-wrote language/slovak.el quail/slovak.el
 
 Tijs van Bakel: changed erc.el
 
-Tim Burt: changed org-datetree.el
-
 Tim Cross: changed keymaps.texi
 
 Tim Harper: changed ns-win.el
 
-Tim Howe: changed org-clock.el
-
 Tim Landscheidt: changed gnus.texi icalendar.el sort.el ws-mode.el
 
-Tim Van Holder: changed emacsclient.c Makefile.in configure.ac
+Tim Van Holder: changed emacsclient.c Makefile.in configure.in
   progmodes/compile.el which-func.el
 
 Timo Juhani Lindfors: changed gnus-msg.el
 
-Timo Myyrä: changed battery.el
-
 Timo Savola: changed emacs.c gtkutil.c startup.el x-win.el xfns.c xterm.c
   xterm.h
 
@@ -4153,14 +3684,13 @@ Tobias Ringström: changed etags.c
 Toby Allsopp: changed ldap.el eudc.el
 
 Toby Cubitt: co-wrote avl-tree.el
-and changed org-capture.el org.el org-agenda.el org-clock.el
-  org-colview.el org.texi
 
-Toby Speight: changed generic-x.el window.el
+Toby S. Cubitt: changed org.el
 
-Toke Høiland-Jørgensen: changed nnmaildir.el smime.el
+Toby Speight: changed generic-x.el window.el
 
-Tokuya Kameshima: changed org-mew.el org-agenda.el
+Tokuya Kameshima: wrote org-mew.el
+and co-wrote org-wl.el
 
 Tom Breton: changed autoinsert.el cus-edit.el gnus-agent.el lread.c
 
@@ -4172,23 +3702,15 @@ Tom Perrine: co-wrote modula2.el (public domain)
 
 Tom Rauchenwald: changed spam.el
 
-Tom Regner: changed notifications.el
-
-Tom Seddon: changed w32font.c
-
-Tom Tromey: wrote bug-reference.el erc-list.el package-x.el
-and co-wrote package.el tcl.el
-and changed buffer.c lisp.h makefile.el window.c keyboard.c keymap.c
-  xfns.c buffer.h bytecode.c callint.c callproc.c cmds.c composite.c
-  configure.ac dispextern.h doc.c editfns.c fileio.c frame.c insdel.c
-  intervals.h and 136 other files
-
-Tom Willemse: changed package.el
+Tom Tromey: wrote bug-reference.el erc-list.el package-x.el package.el
+and co-wrote tcl.el
+and changed buffer.c lisp.h makefile.el window.c xfns.c callint.c cmds.c
+  configure.in frame.c keyboard.c keymap.c xdisp.c buffer.h bytecode.c
+  callproc.c category.c character.c character.h charset.c coding.c
+  composite.c and 133 other files
 
 Tomas Abrahamsson: wrote artist.el
 
-Tomasz Gajewski: changed cpp-root.el
-
 Tommi Vainikainen: changed gnus-sum.el message.el mml-sec.el
 
 Tomohiko Morioka: co-wrote mm-bodies.el mm-decode.el mm-encode.el
@@ -4198,10 +3720,6 @@ and changed rmail.el nnmail.el rmailout.el gnus-sum.el nnfolder.el
   gnus-ems.el gnus-mule.el message.el nnspool.el nntp.el rmailkwd.el
   smiley.el
 
-Tomohiro Matsuyama: wrote profiler.el
-and changed profiler.c alloc.c emacs.c eval.c lisp.h src/Makefile.in
-  src/makefile.w32-in xdisp.c
-
 Tomoji Kagatani: wrote smtpmail.el
 
 Torbjörn Axelsson: changed options.el
@@ -4209,26 +3727,26 @@ Torbjörn Axelsson: changed options.el
 Torbjörn Einarsson: wrote progmodes/f90.el
 and changed f90.el
 
-Torsten Anders: changed ox-beamer.el
+Torsten Anders: changed org-beamer.el
 
 Torsten Bronger: changed latin-ltx.el
 
 Toru Tomabechi: wrote language/tibetan.el quail/tibetan.el tibet-util.el
 
 Toru Tsuneyoshi: changed ange-ftp.el buff-menu.el cus-start.el fileio.c
-  files.el fill.el lisp.h tramp.el w32fns.c
+  files.el lisp.h tramp.el w32fns.c
 
 Toshiaki Nomura: changed uxpds.h
 
-Trent W. Buck: changed rcirc.el remember.el rx.el
+Travis Jeffery: changed Info.plist
 
-Trevor Murphy: changed org.el
+Trent W. Buck: changed rcirc.el remember.el rx.el
 
 Trey Jackson: changed spam-stat.el
 
 Triet Hoai Lai: changed vntelex.el viet-util.el vietnamese.el
 
-Troels Nielsen: changed process.c buffer.c progmodes/compile.el window.el
+Troels Nielsen: changed process.c
 
 Trung Tran-Duc: changed nntp.el
 
@@ -4237,68 +3755,65 @@ Tsuchiya Masatoshi: changed gnus-art.el mm-view.el gnus-sum.el
   gnus-cache.el gnus-msg.el gnus.el nndiary.el nnfolder.el nnimap.el
   nnmaildir.el pgg.el rfc2047.el
 
-Tsugutomo Enami: changed frame.c keyboard.c configure.ac dispnew.c
+Tsugutomo Enami: changed frame.c keyboard.c configure.in dispnew.c
   fileio.c process.c simple.el sysdep.c xdisp.c add-log.el bytecomp.el
   editfns.c emacs.c frame.h gnus-group.el netbsd.h nnheader.el
-  perl-mode.el regex.c regex.h rmailsum.el and 5 other files
+  perl-mode.el regex.c regex.h rmailsum.el and 4 other files
 
 Tsuyoshi Akiho: changed gnus-sum.el nnrss.el
 
 Tudor Hulubei: changed iso-acc.el latin-pre.el
 
-U-Usuario: changed ob-gnuplot.el
-
 Uday S Reddy: changed etags.el fill.el
 
 Ulf Jasper: wrote bubbles.el icalendar-tests.el icalendar.el
   newst-backend.el newst-plainview.el newst-reader.el newst-ticker.el
   newst-treeview.el newsticker-tests.el newsticker.el
-and changed calendar.texi newsticker-plainview.el newsticker-treeview.el
-  newsticker.texi newsticker-backend.el newsticker-reader.el
-  newsticker-ticker.el Makefile.in README browse-url.xpm get-all.xpm
-  mark-immortal.xpm mark-read.xpm narrow.xpm newsticker next-feed.xpm
-  next-item.xpm prev-feed.xpm prev-item.xpm update.xpm xml.el
+and changed icalendar-testsuite.el calendar.texi newsticker-plainview.el
+  newsticker-treeview.el newsticker.texi newsticker-backend.el
+  newsticker-reader.el newsticker-ticker.el Makefile.in README
+  browse-url.xpm get-all.xpm mark-immortal.xpm mark-read.xpm narrow.xpm
+  newsticker newsticker-testsuite.el next-feed.xpm next-item.xpm
+  prev-feed.xpm prev-item.xpm and 3 other files
 
 Ulf Stegemann: co-wrote org-entities.el
 and changed org-gnus.el smime.el
 
 Ulrich Leodolter: changed w32proc.c
 
-Ulrich Müller: changed configure.ac doctor.el emacs.1 files.el gud.el
-  server.el src/Makefile.in ChgPane.c ChgSel.c HELLO INSTALL Makefile.in
-  XMakeAssoc.c authors.el bytecomp.el calc-units.el case-table.el
-  configure descr-text.el em-ls.el emacs.c and 34 other files
+Ulrich Mueller: changed configure.in Makefile.in doctor.el files.el
+  gud.el server.el ChgPane.c ChgSel.c HELLO INSTALL XMakeAssoc.c
+  authors.el bytecomp.el calc-units.el case-table.el configure em-ls.el
+  emacs.1 emacs.c emacs.desktop emacsclient.c and 26 other files
 
 Ulrich Neumerkel: changed xterm.c
 
 Ulrik Vieth: wrote meta-mode.el
 and changed files.el
 
-Uwe Brauer: changed mml-smime.el
-
 Vadim Nasardinov: changed allout.el
 
 Vagn Johansen: changed gnus-cache.el vc-svn.el
 
 Valentin Wüstholz: changed org.el
 
-Valery Alexeev: changed cyril-util.el cyrillic.el
+Valery Alexeev: changed cyril-util.el quail/cyrillic.el
 
-Vasily Korytov: changed cyrillic.el message.el cperl-mode.el gnus-art.el
-  gnus-dired.el gnus-msg.el gnus-util.el mail-source.el smiley.el
-
-Vegard Øye: changed viper-init.el
+Vasily Korytov: changed message.el quail/cyrillic.el cperl-mode.el
+  gnus-art.el gnus-dired.el gnus-msg.el gnus-util.el mail-source.el
+  smiley.el
 
 Victor Zandy: wrote zone.el
 
-Viktor Rosenfeld: changed ob-sql.el org.el
+Vida Gábor: changed gnus-demon.el
+
+Viktor Rosenfeld: changed ob-sql.el
 
 Ville Skyttä: changed mh-comp.el pgg.el tcl.el
 
 Vincent Belaïche: changed ses.el 5x5.el calc-alg.el calc-vec.el calc.texi
-  calc-embed.el calc-help.el calc-misc.el calc.el configure.bat
-  floatfns.c org.el recentf.el reftex-parse.el reftex-toc.el reftex.el
-  ses.texi
+  calc-embed.el calc-help.el calc-misc.el calc.el floatfns.c org.el
+  recentf.el
 
 Vincent Del Vecchio: changed info.el mh-utils.el
 
@@ -4309,52 +3824,40 @@ and co-wrote ps-def.el ps-mule.el ps-print.el ps-samp.el
 and changed ps-prin1.ps ps-bdf.el ps-prin0.ps blank-mode.el ps-prin3.ps
   ps-prin2.ps lpr.el subr.el diff-mode.el TUTORIAL.pt_BR compilation.txt
   easymenu.el loading.texi menu-bar.el misc.texi progmodes/compile.el
-  ps-print-def.el ps-vars.el
+  ps-print-def.el ps-print.ps ps-vars.el
 
-Vitalie Spinu: changed comint.el message.el ob-R.el ob-core.el
-  ob-tangle.el subr.el
+Vitalie Spinu: changed ob-R.el
 
 Vivek Dasmohapatra: wrote hfy-cmap.el htmlfontify.el
-and changed erc.el erc-backend.el erc-services.el hexl.el emacs.c
-  erc-join.el htmlfontify.texi sh-script.el xterm.c xterm.h
+and changed erc.el erc-backend.el emacs.c erc-join.el erc-services.el
+  sh-script.el xterm.c xterm.h
 
 Vladimir Alexiev: changed arc-mode.el nnvirtual.el tmm.el
 
-Vladimir Kazanov: changed java.srt
-
-Vladimir Lomov: changed ox-html.el
-
 Vladimir Volovich: changed smime.el
 
 Volker Sobek: changed programs.texi
 
 W. Martin Borgert: changed files.el schemas.xml
 
-W. Trevor King: changed xterm.el
-
 Walter C. Pelissero: changed browse-url.el url-methods.el
 
 Wang Diancheng: changed gdb-mi.el nnml.el
 
-Wei-Wei Guo: co-wrote rst.el
-
 Werner Benger: changed keyboard.c
 
 Werner Lemberg: wrote sisheng.el vntelex.el
-and co-wrote vnvni.el
-and changed TUTORIAL.de calc.texi chinese.el emacs.1 european.el
-  idlwave.el language/czech.el language/slovak.el lispref/Makefile.in
+and changed Makefile.in TUTORIAL.de calc.texi chinese.el emacs.1
+  european.el idlwave.el language/czech.el language/slovak.el
   reftex-vars.el reftex.el reftex.texi supercite.el advice.el
   calc-forms.el calc-sel.el calendar.el china-util.el cl-macs.el cl.texi
-  complete.el and 53 other files
+  complete.el and 50 other files
 
 Werner Meisner: changed lwlib-Xm.c
 
 Wes Hardaker: changed gnus-score.el gnus-art.el gnus-sum.el gnus-win.el
   spam.el
 
-Wesley Dawson: changed icomplete.el
-
 Wilfred Hughes: changed vc-git.el
 
 Will Glozer: changed macterm.c
@@ -4367,22 +3870,18 @@ William M. Perry: wrote url-dav.el url-gw.el url-http.el url-util.el
   url.el vc-dav.el
 and co-wrote mailcap.el socks.el
 and changed url-handlers.el url-file.el url-methods.el url-vars.el
-  url-https.el url-imap.el url-news.el url-nfs.el image.el mwheel.el
-  url-about.el url-auth.el url-cid.el url-dired.el url-expand.el
-  url-ftp.el url-history.el url-irc.el url-misc.el url-parse.el
-  url-privacy.el and 3 other files
-
-William Parsons: changed ange-ftp.el
+  url-https.el aclocal.m4 mule-sysdp.el url-imap.el url-news.el
+  url-nfs.el image.el mwheel.el url-about.el url-auth.el url-cid.el
+  url-dired.el url-expand.el url-ftp.el url-history.el url-irc.el
+  url-misc.el and 5 other files
 
 William Smith: changed strftime.c
 
 William Sommerfeld: wrote emacsclient.c scribe.el server.el
 
 William Stevenson: wrote adwaita-theme.el
-and changed artist.el
 
-William Xu: changed arc-mode.el gcc.el nsterm.m outline.el url.el
-  webjump.el
+William Xu: changed nsterm.m outline.el webjump.el
 
 Wilson H. Tien: changed unexelf.c
 
@@ -4392,23 +3891,20 @@ and changed files.el
 Wim Nieuwenhuizen: changed TUTORIAL.nl
 
 Wlodzimierz Bzyl: co-wrote ogonek.el
-and changed latin-pre.el pl-refcard.tex survival.tex
+and changed latin-pre.el pl-refcard.ps pl-refcard.tex refcard-pl.ps
+  refcard-pl.tex survival.tex
 
 Wolfgang Glas: changed unexsgi.c
 
-Wolfgang Jenkner: wrote man-tests.el
-and changed gnus-agent.el image-mode.el man.el ansi-color.el gnus-spec.el
-  gnus-sum.el gnus-util.el conf-mode.el functions.texi gnus-group.el
-  gnus-picon.el gnus-salt.el gnus-start.el gnus.texi intro.texi lread.c
-  network-stream.el nntp.el pcvs.el pop3.el progmodes/grep.el
-  and 3 other files
+Wolfgang Jenkner: changed conf-mode.el gnus-agent.el gnus-sum.el lread.c
+  network-stream.el pcvs.el pop3.el
 
 Wolfgang Lux: changed nsterm.m keyboard.c
 
 Wolfgang Rupprecht: wrote float-sup.el floatfns.c sup-mouse.el
-and changed process.c alloc.c callint.c config.in configure.ac data.c
-  fns.c lisp-mode.el lisp.h loadup.el lread.c net-utils.el nntp.el
-  print.c sort.el
+and changed config.in process.c alloc.c callint.c configure.in data.c
+  ecrt0.c fns.c lisp-mode.el lisp.h loadup.el lread.c net-utils.el
+  nntp.el print.c sort.el
 
 Wolfgang Scherer: changed vc-cvs.el
 
@@ -4420,32 +3916,21 @@ Wolfram Gloger: changed emacs.c
 
 Xavier Maillard: changed gnus-faq.texi gnus-score.el mh-utils.el spam.el
 
-Xue Fuqiao: changed display.texi maintaining.texi files.texi
-  nonascii.texi text.texi windows.texi os.texi vc-cvs.el vc-dir.el
-  emacs.texi ido.texi vc-git.el vc-hg.el vc-hooks.el vc-svn.el vc.el
-  vc/vc-bzr.el INSTALL cl.texi emacs-lisp-intro.texi frames.texi
-  and 92 other files
-
 Yagi Tatsuya: changed gnus-art.el gnus-start.el
 
-Yair F: changed hebrew.el
+Yair F: changed quail/hebrew.el
 
-Yamamoto Mitsuharu: wrote uvs.el
-and changed macterm.c macfns.c mac-win.el mac.c macterm.h macmenu.c
-  macgui.h image.c xdisp.c xterm.c macselect.c keyboard.c w32term.c
-  src/Makefile.in unexmacosx.c emacs.c darwin.h dispnew.c configure.ac
-  dispextern.h alloc.c and 90 other files
+Yamamoto Mitsuharu: changed macterm.c macfns.c mac-win.el mac.c macterm.h
+  macmenu.c macgui.h image.c xdisp.c macselect.c keyboard.c xterm.c
+  Makefile.in emacs.c darwin.h dispnew.c unexmacosx.c w32term.c alloc.c
+  dispextern.h configure.in and 88 other files
 
 Yann Dirson: changed imenu.el
 
-Yann Hodique: changed ox-publish.el package.el rcirc.el
-
-Yasushi Shoji: changed org-clock.el org.texi ox-ascii.el
+Yann Hodique: changed rcirc.el
 
-Yavor Doganov: changed configure.ac Makefile.in emacs.1 etags.1 make-dist
-  nsfont.m
-
-Ye Qianchuan: changed descr-text.el
+Yavor Doganov: changed configure.in Info-gnustep.plist Makefile.in
+  emacs.1 etags.1 make-dist nsfont.m
 
 Yoichi Nakayama: changed browse-url.el finder.el man.el rfc2368.el
 
@@ -4459,8 +3944,6 @@ Yoshiaki Kasahara: changed buffer.c term.c
 
 Yoshiki Hayashi: changed texinfmt.el nnheader.el
 
-Yoshinari Nomura: changed ox-html.el ox.el
-
 Yoshinori Koseki: wrote iimage.el
 and changed fontset.el message.el nnheader.el nnmail.el
 
@@ -4474,22 +3957,15 @@ Yuri Karaban: changed pop3.el
 
 Yuri Shtil: changed etags.c
 
-Yuriy Vostrikov: changed vc-git.el
+Yutaka Niibe: changed indent.c xdisp.c configure.in Makefile.in dispnew.c
+  sysdep.c config.in dired.el emacs.c fill.el fns.c gmalloc.c gnu-linux.h
+  indent.h process.c simple.el term.c window.c
 
-Yutaka Niibe: changed indent.c xdisp.c configure.ac dispnew.c sysdep.c
-  Makefile.in config.in dired.el emacs.c fill.el fns.c gmalloc.c
-  gnu-linux.h indent.h process.c simple.el src/Makefile.in term.c
-  window.c
-
-Yuya Nishihara: changed vc-hooks.el
-
-Yves Baumes: changed package.el
-
-Zachary Kanfer: changed org.el cus-edit.el keyboard.c
+Zachary Kanfer: changed cus-edit.el keyboard.c
 
 Zhang Wei: changed chinese.el characters.el mule-cmds.el xfns.c erc.el
-  faces.el fontset.el lib-src/makefile.w32-in mm-util.el mule.el
-  org-publish.el rfc2047.el x-win.el
+  faces.el fontset.el makefile.w32-in mm-util.el mule.el org-publish.el
+  rfc2047.el x-win.el
 
 Zhang Weize: wrote ob-plantuml.el
 
@@ -4497,30 +3973,7 @@ Zoltan Kemenczy: changed gud.el
 
 Zoran Milojevic: changed avoid.el
 
-Álvar Jesús Ibeas Martín: changed emacs-lisp-intro.texi
-
-Ævar Arnfjörð Bjarmason: changed rcirc.el
-
-Éric Jacoboni: changed fr-refcard.tex
-
-Óscar Fuentes: changed ido.el cmdproxy.c diff-mode.el emacsclient.c
-  vc-bzr.el
-
-İsmail Dönmez: changed nsfont.m nsterm.m url-auth.el xterm.c
-
-Łukasz Demianiuk: changed erc.el
-
-Łukasz Stelmach: changed cookie1.el gtkutil.c message.el org-agenda.el
-  org-bbdb.el org.el ox-html.el ox.el
-
-Štěpán Němec: changed INSTALL calc-ext.el cl.texi comint.el edebug.texi
-  font-lock.el loading.texi maps.texi mark.texi message.texi mini.texi
-  minibuf.texi misc.texi programs.texi subr.el tips.texi url-vars.el
-  url.texi vc-git.el window.c windows.texi
-
-Дядов Васил Стоянов: changed org-docview.el
-
-Йордан Миладинов: changed cyrillic.el
+Йордан Миладинов: changed quail/cyrillic.el
 
 Local Variables:
 coding: utf-8
index 33da02ca1003b781b06aac16d5a2220640fad7f9..a276331c57664fea543b10defd367c2b8733162d 100644 (file)
@@ -1,87 +1,8 @@
-               Censoring my Software
-                  Richard Stallman
-                       [From Datamation, 1 March 1996]
+Censoring my Software
 
+Note added March 2014:
 
-Last summer, a few clever legislators proposed a bill to "prohibit
-pornography" on the Internet.  Last fall, right-wing Christians made
-this cause their own.  Last week, President Clinton signed the bill,
-and we lost the freedom of the press for the public library of the
-future.  This week, I'm censoring GNU Emacs.
+This file is obsolete and will be removed in future.
+Please update any references to use
 
-No, GNU Emacs does not contain pornography.  It is a software package,
-an award-winning extensible and programmable text editor.  But the law
-that was passed applies to far more than pornography.  It prohibits
-"indecent" speech, which can include anything from famous poems, to
-masterpieces hanging in the Louvre, to advice about safe sex...to
-software.
-
-Naturally, there was a lot of opposition to this bill.  Not only from
-people who use the Internet, and people who appreciate erotica, but
-from everyone who cares about freedom of the press.
-
-But every time we tried to tell the public what was at stake, the
-forces of censorship responded with a lie: they told the public that
-the issue was simply pornography.  By embedding this lie as a
-presupposition in their statements about the issue, they succeeded in
-misinforming the public.  So here I am, censoring my software.
-
-You see, Emacs contains a version of the famous "doctor program",
-a.k.a. Eliza, originally developed by Professor Weizenbaum at MIT.
-This is the program that imitates a Rogerian psychotherapist.  The
-user talks to the program, and the program responds--by playing back
-the user's own statements, and by recognizing a long list of
-particular words.
-
-The Emacs doctor program was set up to recognize many common curse
-words, and respond with an appropriately cute message such as, "Would
-you please watch your tongue?" or "Let's not be vulgar."  In order to
-do this, it had to have a list of curse words.  That means the source
-code for the program was indecent.
-
-Because of the censorship law, I had to remove this feature.  (I
-replaced it with a message announcing that the program has been
-censored for your protection.)  The new version of the doctor doesn't
-recognize the indecent words.  If you curse at it, it curses right
-back to you--for lack of knowing better.
-
-Now that people are facing the threat of two years in prison for
-indecent network postings, it would be helpful if they could access
-precise rules via the Internet for how to avoid imprisonment.
-However, this is impossible.  The rules would have to mention the
-forbidden words, so posting them on the Internet would be against the
-rules.
-
-Of course, I'm making an assumption about just what "indecent" means.
-I have to do this, because nobody knows for sure.  The most obvious
-possible meaning is the meaning it has for television, so I'm using
-that as a tentative assumption.  However, there is a good chance that
-our courts will reject that interpretation of the law as
-unconstitutional.
-
-We can hope that the courts will recognize the Internet as a medium of
-publication like books and magazines.  If they do, they will entirely
-reject any law prohibiting "indecent" publications on the Internet.
-
-What really worries me is that the courts might take a muddled
-in-between escape route--by choosing another interpretation of
-"indecent", one that permits the doctor program or a statement of the
-decency rules, but prohibits some of the books that children can
-browse through in the public library and the bookstore.  Over the
-years, as the Internet replaces the public library and the bookstore,
-some of our freedom of the press will be lost.
-
-Just a few weeks ago, another country imposed censorship on the
-Internet.  That was China.  We don't think well of China in this
-country--its government doesn't respect basic freedoms.  But how well
-does our government respect them?  And do you care enough to preserve
-them here?
-
-If you care, stay in touch with the Voters Telecommunications Watch.
-Look in their Web site http://www.vtw.org/ for background information
-and political action recommendations.  Censorship won in February, but
-we can beat it in November.
-
-Copyright 1996 Richard Stallman
-Verbatim copying and distribution is permitted in any medium
-provided this notice is preserved.
+<http://www.gnu.org/philosophy/censoring-emacs.html>
index a1a8e258b1154164f2fb4cf9cf835d7cdc5f09eb..711208e0e32bfaf073ab108bf7e05a6c56075d65 100644 (file)
+2014-10-13  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * NEWS: Move and clarify OSX >= 10.6.
+
+2014-10-12  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * NEWS: OSX required is 10.6 or newer.
+
+2014-10-09  Leo Liu  <sdl.web@gmail.com>
+
+       * NEWS: Mention optional arg to terpri and new cl-lib functions.
+
+2014-10-05  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * NEWS: Mention ns-use-fullscreen-animation.
+
 2014-09-30  Bill Wohler         <wohler@newt.com>
 
        Release MH-E version 8.6
 
        * NEWS, MH-E-NEWS: Update for MH-E release 8.6.
 
-2014-09-29  Fabrice Niessen  <fniessen@pirilampo.org>
+2014-09-30  Fabrice Niessen  <fniessen@pirilampo.org>
 
        * themes/leuven-theme.el: Updates.
 
-2014-09-24  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-09-30  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * package-keyring.gpg: New file.
 
+2014-09-30  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * TODO: Remove char/unsigned char, long long, IRIX unexelf.c.
+       The first two are done, and IRIX support has been dropped.
+
+2014-09-29  Eli Zaretskii  <eliz@gnu.org>
+
+       * refcards/ru-refcard.tex: Bump version to 25.0.50.
+
+       * refcards/emacsver.tex: Bump version to 25.0.50.
+
+2014-09-14  Daniel Colascione  <dancol@dancol.org>
+
+       * NEWS: Mention changes to `insert-register'
+
+2014-09-13  Christopher Schmidt  <ch@ristopher.com>
+
+       * NEWS: Mention nil `calendar-mode-line-format' will not modify
+       the mode line of the calendar buffer.  (Bug#18467)
+
+2014-09-06  Leo Liu  <sdl.web@gmail.com>
+
+       * NEWS: Mention vector qpattern for pcase.  (Bug#18327).
+
+2014-09-01  Eli Zaretskii  <eliz@gnu.org>
+
+       * NEWS: Mention that ls-lisp uses string-collate-lessp.
+
+2014-09-01  Paul Eggert  <eggert@cs.ucla.edu>
+
+       --enable-silent-rules now suppresses more chatter.
+       * NEWS: Document this.
+
+2014-08-29  Leo Liu  <sdl.web@gmail.com>
+
+       * NEWS: Mention (:append FUN) to minibuffer-with-setup-hook.
+
+2014-08-29  Eli Zaretskii  <eliz@gnu.org>
+
+       * NEWS: Mention w32-collate-ignore-punctuation.
+
+2014-08-29  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * NEWS: Mention that `sort' can handle vectors.
+
 2014-08-28  Glenn Morris  <rgm@gnu.org>
 
        * emacs.appdata.xml: New file; description from Emacs's homepage.
 
-2014-07-12  Eli Zaretskii  <eliz@gnu.org>
+2014-08-25  Eli Zaretskii  <eliz@gnu.org>
+
+       * NEWS: Mention that string-collate-* functions are supported on
+       MS-Windows as well.
 
-       * PROBLEMS: Mention the problem from bug #17950.
+2014-08-08  Jan Nieuwenhuizen  <janneke@gnu.org>
 
-2014-07-04  Eli Zaretskii  <eliz@gnu.org>
+       * compilation.txt (file): Add Guile backtrace example.
 
-       * TODO: Remove items that were already done.  Rearrange a few
-       items that are closely related.  Update a couple of items with new
-       information.
+2014-08-09  Reuben Thomas  <rrt@sc3d.org>
 
-       * NEWS: Mention 'network-interface-list' and 'network-interface-info'
-       being available on MS-Windows.
+       * PROBLEMS: Remove msdos/is_exec.c and sigaction.c.
 
-2014-06-29  Glenn Morris  <rgm@gnu.org>
+2014-07-21  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * TODO: remove frame height remark.
+
+2014-07-11  Michael Albinus  <michael.albinus@gmx.de>
+
+       * NEWS: Passwords in batch mode are hidden.
+
+2014-07-03  Glenn Morris  <rgm@gnu.org>
 
        * refcards/calccard.tex (section{Getting Help}):
        Meaning of "on-line" has changed.
 
-2014-06-27  Glenn Morris  <rgm@gnu.org>
+2014-06-28  Glenn Morris  <rgm@gnu.org>
 
        * publicsuffix.txt: Update from source.
 
+2014-06-24  Eli Barzilay  <eli@barzilay.org>
+
+       * NEWS: calculator.el user-visible changes.
+
+2014-06-15  Michael Albinus  <michael.albinus@gmx.de>
+
+       * NEWS: New Tramp method "nc".
+
 2014-06-08  Leo Liu  <sdl.web@gmail.com>
 
        * themes/deeper-blue-theme.el: Use another fix.  (Bug#17695)
 
-2014-06-05  Juri Linkov  <juri@jurta.org>
+2014-06-08  Juri Linkov  <juri@jurta.org>
 
        * themes/deeper-blue-theme.el (diff-added, diff-changed, diff-removed):
        Set face definitions explicitly.  Inherit indicator faces from them.
        (Bug#17695)
 
-2014-05-24  Paul Eggert  <eggert@cs.ucla.edu>
+2014-05-28  Reuben Thomas  <rrt@sc3d.org>
+
+       * TODO: add a note that undo-tree could be used to save undo
+       information (Bug #17581).
+
+2014-05-27  Fabrice Popineau  <fabrice.popineau@gmail.com>
+
+       * NEWS: Mention build changes on MS-Windows.
+
+2014-05-26  Paul Eggert  <eggert@cs.ucla.edu>
 
        Specify coding if Latin-1 Emacs would misinterpret (Bug#17575).
        * ETAGS.EBNF, NEWS, ORG-NEWS: Add "coding: utf-8".
 
+2014-05-17  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * NEWS: Assume C99 or later (Bug#17487).
+
+2014-05-16  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Don't require pkg-config when building from repository.
+       * NEWS: Prefer './configure FOO=BAR' to 'FOO=BAR ./configure'.
+       * PROBLEMS (Build-time-problems): Remove pkg-config problem
+       that is no longer an issue.
+
+2014-05-13  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * PROBLEMS: Mention potential problems with
+       --enable-link-time-optimization and clang on Fedora 20.
+
+2014-05-04  Leo Liu  <sdl.web@gmail.com>
+
+       * NEWS: Mention support for Chinese dates in calendar and diary.
+
+2014-04-20  Daniel Colascione  <dancol@dancol.org>
+
+       * NEWS: Mention new struct functions and changes to `cl-the'.
+
+2014-04-17  Daniel Colascione  <dancol@dancol.org>
+
+       * NEWS: Mention bracketed paste support.
+
 2014-04-11  Glenn Morris  <rgm@gnu.org>
 
        * refcards/cs-dired-ref.tex, refcards/cs-refcard.tex:
        * refcards/sk-refcard.tex, refcards/sk-survival.tex:
        Input "utf8off", which seems to be needed.
 
+2014-04-01  Michael Albinus  <michael.albinus@gmx.de>
+
+       * NEWS: `url-handler-mode' passes operations to Tramp for some
+       protocols.
+
+2014-03-28  Tassilo Horn  <tsdh@gnu.org>
+
+       * themes/tsdh-light-theme.el (tsdh-light): Add gnus-group-* faces.
+
+2014-03-22  Glenn Morris  <rgm@gnu.org>
+
+       * CENSORSHIP, GNU, LINUX-GNU, THE-GNU-PROJECT, WHY-FREE: Replace
+       contents with pointers to www.gnu.org or emacs.info, mark obsolete.
+
 2014-03-14  Rüdiger Sonderfeld  <ruediger@c-plusplus.de>
 
        * tutorials/TUTORIAL.de: Adapt to recent changes in TUTORIAL.
diff --git a/etc/GNU b/etc/GNU
index 5562a142c03f802e63b6a33eb8280e904e7d82d7..f8078d41cd34d325473175864bae9914d669ab6b 100644 (file)
--- a/etc/GNU
+++ b/etc/GNU
@@ -1,544 +1,8 @@
-Copyright (C) 1985, 1993, 2001-2014 Free Software Foundation, Inc.
-
-   Permission is granted to anyone to make or distribute verbatim copies
-of this document, in any medium, provided that the copyright notice and
-permission notice are preserved, and that the distributor grants the
-recipient permission for further redistribution as permitted by this
-notice.
-
-   Modified versions may not be made.
-
 The GNU Manifesto
-*****************
-
-     The GNU Manifesto which appears below was written by Richard
-     Stallman at the beginning of the GNU project, to ask for
-     participation and support.  For the first few years, it was
-     updated in minor ways to account for developments, but now it
-     seems best to leave it unchanged as most people have seen it.
-
-     Since that time, we have learned about certain common
-     misunderstandings that different wording could help avoid.
-     Footnotes added in 1993 help clarify these points.
-
-     For up-to-date information about the available GNU software,
-     please see www.gnu.org.  For software tasks to work on, see
-     http://savannah.gnu.org/projects/tasklist.  For other ways
-     to contribute, see http://www.gnu.org/help.
-
-What's GNU?  Gnu's Not Unix!
-============================
-
-   GNU, which stands for Gnu's Not Unix, is the name for the complete
-Unix-compatible software system which I am writing so that I can give it
-away free to everyone who can use it.(1) Several other volunteers are
-helping me.  Contributions of time, money, programs and equipment are
-greatly needed.
-
-   So far we have an Emacs text editor with Lisp for writing editor
-commands, a source level debugger, a yacc-compatible parser generator,
-a linker, and around 35 utilities.  A shell (command interpreter) is
-nearly completed.  A new portable optimizing C compiler has compiled
-itself and may be released this year.  An initial kernel exists but
-many more features are needed to emulate Unix.  When the kernel and
-compiler are finished, it will be possible to distribute a GNU system
-suitable for program development.  We will use TeX as our text
-formatter, but an nroff is being worked on.  We will use the free,
-portable X window system as well.  After this we will add a portable
-Common Lisp, an Empire game, a spreadsheet, and hundreds of other
-things, plus on-line documentation.  We hope to supply, eventually,
-everything useful that normally comes with a Unix system, and more.
-
-   GNU will be able to run Unix programs, but will not be identical to
-Unix.  We will make all improvements that are convenient, based on our
-experience with other operating systems.  In particular, we plan to
-have longer file names, file version numbers, a crashproof file system,
-file name completion perhaps, terminal-independent display support, and
-perhaps eventually a Lisp-based window system through which several
-Lisp programs and ordinary Unix programs can share a screen.  Both C
-and Lisp will be available as system programming languages.  We will
-try to support UUCP, MIT Chaosnet, and Internet protocols for
-communication.
-
-   GNU is aimed initially at machines in the 68000/16000 class with
-virtual memory, because they are the easiest machines to make it run
-on.  The extra effort to make it run on smaller machines will be left
-to someone who wants to use it on them.
-
-   To avoid horrible confusion, please pronounce the `G' in the word
-`GNU' when it is the name of this project.
-
-Why I Must Write GNU
-====================
-
-   I consider that the golden rule requires that if I like a program I
-must share it with other people who like it.  Software sellers want to
-divide the users and conquer them, making each user agree not to share
-with others.  I refuse to break solidarity with other users in this
-way.  I cannot in good conscience sign a nondisclosure agreement or a
-software license agreement.  For years I worked within the Artificial
-Intelligence Lab to resist such tendencies and other inhospitalities,
-but eventually they had gone too far: I could not remain in an
-institution where such things are done for me against my will.
-
-   So that I can continue to use computers without dishonor, I have
-decided to put together a sufficient body of free software so that I
-will be able to get along without any software that is not free.  I
-have resigned from the AI lab to deny MIT any legal excuse to prevent
-me from giving GNU away.
-
-Why GNU Will Be Compatible with Unix
-====================================
-
-   Unix is not my ideal system, but it is not too bad.  The essential
-features of Unix seem to be good ones, and I think I can fill in what
-Unix lacks without spoiling them.  And a system compatible with Unix
-would be convenient for many other people to adopt.
-
-How GNU Will Be Available
-=========================
-
-   GNU is not in the public domain.  Everyone will be permitted to
-modify and redistribute GNU, but no distributor will be allowed to
-restrict its further redistribution.  That is to say, proprietary
-modifications will not be allowed.  I want to make sure that all
-versions of GNU remain free.
-
-Why Many Other Programmers Want to Help
-=======================================
-
-   I have found many other programmers who are excited about GNU and
-want to help.
-
-   Many programmers are unhappy about the commercialization of system
-software.  It may enable them to make more money, but it requires them
-to feel in conflict with other programmers in general rather than feel
-as comrades.  The fundamental act of friendship among programmers is the
-sharing of programs; marketing arrangements now typically used
-essentially forbid programmers to treat others as friends.  The
-purchaser of software must choose between friendship and obeying the
-law.  Naturally, many decide that friendship is more important.  But
-those who believe in law often do not feel at ease with either choice.
-They become cynical and think that programming is just a way of making
-money.
-
-   By working on and using GNU rather than proprietary programs, we can
-be hospitable to everyone and obey the law.  In addition, GNU serves as
-an example to inspire and a banner to rally others to join us in
-sharing.  This can give us a feeling of harmony which is impossible if
-we use software that is not free.  For about half the programmers I
-talk to, this is an important happiness that money cannot replace.
-
-How You Can Contribute
-======================
-
-   I am asking computer manufacturers for donations of machines and
-money.  I'm asking individuals for donations of programs and work.
-
-   One consequence you can expect if you donate machines is that GNU
-will run on them at an early date.  The machines should be complete,
-ready to use systems, approved for use in a residential area, and not
-in need of sophisticated cooling or power.
-
-   I have found very many programmers eager to contribute part-time
-work for GNU.  For most projects, such part-time distributed work would
-be very hard to coordinate; the independently-written parts would not
-work together.  But for the particular task of replacing Unix, this
-problem is absent.  A complete Unix system contains hundreds of utility
-programs, each of which is documented separately.  Most interface
-specifications are fixed by Unix compatibility.  If each contributor
-can write a compatible replacement for a single Unix utility, and make
-it work properly in place of the original on a Unix system, then these
-utilities will work right when put together.  Even allowing for Murphy
-to create a few unexpected problems, assembling these components will
-be a feasible task.  (The kernel will require closer communication and
-will be worked on by a small, tight group.)
-
-   If I get donations of money, I may be able to hire a few people full
-or part time.  The salary won't be high by programmers' standards, but
-I'm looking for people for whom building community spirit is as
-important as making money.  I view this as a way of enabling dedicated
-people to devote their full energies to working on GNU by sparing them
-the need to make a living in another way.
-
-Why All Computer Users Will Benefit
-===================================
-
-   Once GNU is written, everyone will be able to obtain good system
-software free, just like air.(2)
-
-   This means much more than just saving everyone the price of a Unix
-license.  It means that much wasteful duplication of system programming
-effort will be avoided.  This effort can go instead into advancing the
-state of the art.
-
-   Complete system sources will be available to everyone.  As a result,
-a user who needs changes in the system will always be free to make them
-himself, or hire any available programmer or company to make them for
-him.  Users will no longer be at the mercy of one programmer or company
-which owns the sources and is in sole position to make changes.
-
-   Schools will be able to provide a much more educational environment
-by encouraging all students to study and improve the system code.
-Harvard's computer lab used to have the policy that no program could be
-installed on the system if its sources were not on public display, and
-upheld it by actually refusing to install certain programs.  I was very
-much inspired by this.
-
-   Finally, the overhead of considering who owns the system software
-and what one is or is not entitled to do with it will be lifted.
-
-   Arrangements to make people pay for using a program, including
-licensing of copies, always incur a tremendous cost to society through
-the cumbersome mechanisms necessary to figure out how much (that is,
-which programs) a person must pay for.  And only a police state can
-force everyone to obey them.  Consider a space station where air must
-be manufactured at great cost: charging each breather per liter of air
-may be fair, but wearing the metered gas mask all day and all night is
-intolerable even if everyone can afford to pay the air bill.  And the
-TV cameras everywhere to see if you ever take the mask off are
-outrageous.  It's better to support the air plant with a head tax and
-chuck the masks.
-
-   Copying all or parts of a program is as natural to a programmer as
-breathing, and as productive.  It ought to be as free.
-
-Some Easily Rebutted Objections to GNU's Goals
-==============================================
-
-     "Nobody will use it if it is free, because that means they can't
-     rely on any support."
-
-     "You have to charge for the program to pay for providing the
-     support."
-
-   If people would rather pay for GNU plus service than get GNU free
-without service, a company to provide just service to people who have
-obtained GNU free ought to be profitable.(3)
-
-   We must distinguish between support in the form of real programming
-work and mere handholding.  The former is something one cannot rely on
-from a software vendor.  If your problem is not shared by enough
-people, the vendor will tell you to get lost.
-
-   If your business needs to be able to rely on support, the only way
-is to have all the necessary sources and tools.  Then you can hire any
-available person to fix your problem; you are not at the mercy of any
-individual.  With Unix, the price of sources puts this out of
-consideration for most businesses.  With GNU this will be easy.  It is
-still possible for there to be no available competent person, but this
-problem cannot be blamed on distribution arrangements.  GNU does not
-eliminate all the world's problems, only some of them.
-
-   Meanwhile, the users who know nothing about computers need
-handholding: doing things for them which they could easily do
-themselves but don't know how.
-
-   Such services could be provided by companies that sell just
-hand-holding and repair service.  If it is true that users would rather
-spend money and get a product with service, they will also be willing
-to buy the service having got the product free.  The service companies
-will compete in quality and price; users will not be tied to any
-particular one.  Meanwhile, those of us who don't need the service
-should be able to use the program without paying for the service.
-
-     "You cannot reach many people without advertising, and you must
-     charge for the program to support that."
-
-     "It's no use advertising a program people can get free."
-
-   There are various forms of free or very cheap publicity that can be
-used to inform numbers of computer users about something like GNU.  But
-it may be true that one can reach more microcomputer users with
-advertising.  If this is really so, a business which advertises the
-service of copying and mailing GNU for a fee ought to be successful
-enough to pay for its advertising and more.  This way, only the users
-who benefit from the advertising pay for it.
-
-   On the other hand, if many people get GNU from their friends, and
-such companies don't succeed, this will show that advertising was not
-really necessary to spread GNU.  Why is it that free market advocates
-don't want to let the free market decide this?(4)
-
-     "My company needs a proprietary operating system to get a
-     competitive edge."
-
-   GNU will remove operating system software from the realm of
-competition.  You will not be able to get an edge in this area, but
-neither will your competitors be able to get an edge over you.  You and
-they will compete in other areas, while benefiting mutually in this
-one.  If your business is selling an operating system, you will not
-like GNU, but that's tough on you.  If your business is something else,
-GNU can save you from being pushed into the expensive business of
-selling operating systems.
-
-   I would like to see GNU development supported by gifts from many
-manufacturers and users, reducing the cost to each.(5)
-
-     "Don't programmers deserve a reward for their creativity?"
-
-   If anything deserves a reward, it is social contribution.
-Creativity can be a social contribution, but only in so far as society
-is free to use the results.  If programmers deserve to be rewarded for
-creating innovative programs, by the same token they deserve to be
-punished if they restrict the use of these programs.
-
-     "Shouldn't a programmer be able to ask for a reward for his
-     creativity?"
-
-   There is nothing wrong with wanting pay for work, or seeking to
-maximize one's income, as long as one does not use means that are
-destructive.  But the means customary in the field of software today
-are based on destruction.
-
-   Extracting money from users of a program by restricting their use of
-it is destructive because the restrictions reduce the amount and the
-ways that the program can be used.  This reduces the amount of wealth
-that humanity derives from the program.  When there is a deliberate
-choice to restrict, the harmful consequences are deliberate destruction.
-
-   The reason a good citizen does not use such destructive means to
-become wealthier is that, if everyone did so, we would all become
-poorer from the mutual destructiveness.  This is Kantian ethics; or,
-the Golden Rule.  Since I do not like the consequences that result if
-everyone hoards information, I am required to consider it wrong for one
-to do so.  Specifically, the desire to be rewarded for one's creativity
-does not justify depriving the world in general of all or part of that
-creativity.
-
-     "Won't programmers starve?"
-
-   I could answer that nobody is forced to be a programmer.  Most of us
-cannot manage to get any money for standing on the street and making
-faces.  But we are not, as a result, condemned to spend our lives
-standing on the street making faces, and starving.  We do something
-else.
-
-   But that is the wrong answer because it accepts the questioner's
-implicit assumption: that without ownership of software, programmers
-cannot possibly be paid a cent.  Supposedly it is all or nothing.
-
-   The real reason programmers will not starve is that it will still be
-possible for them to get paid for programming; just not paid as much as
-now.
-
-   Restricting copying is not the only basis for business in software.
-It is the most common basis because it brings in the most money.  If it
-were prohibited, or rejected by the customer, software business would
-move to other bases of organization which are now used less often.
-There are always numerous ways to organize any kind of business.
-
-   Probably programming will not be as lucrative on the new basis as it
-is now.  But that is not an argument against the change.  It is not
-considered an injustice that sales clerks make the salaries that they
-now do.  If programmers made the same, that would not be an injustice
-either.  (In practice they would still make considerably more than
-that.)
-
-     "Don't people have a right to control how their creativity is
-     used?"
-
-   "Control over the use of one's ideas" really constitutes control over
-other people's lives; and it is usually used to make their lives more
-difficult.
-
-   People who have studied the issue of intellectual property rights(6)
-carefully (such as lawyers) say that there is no intrinsic right to
-intellectual property.  The kinds of supposed intellectual property
-rights that the government recognizes were created by specific acts of
-legislation for specific purposes.
-
-   For example, the patent system was established to encourage
-inventors to disclose the details of their inventions.  Its purpose was
-to help society rather than to help inventors.  At the time, the life
-span of 17 years for a patent was short compared with the rate of
-advance of the state of the art.  Since patents are an issue only among
-manufacturers, for whom the cost and effort of a license agreement are
-small compared with setting up production, the patents often do not do
-much harm.  They do not obstruct most individuals who use patented
-products.
-
-   The idea of copyright did not exist in ancient times, when authors
-frequently copied other authors at length in works of non-fiction.  This
-practice was useful, and is the only way many authors' works have
-survived even in part.  The copyright system was created expressly for
-the purpose of encouraging authorship.  In the domain for which it was
-invented--books, which could be copied economically only on a printing
-press--it did little harm, and did not obstruct most of the individuals
-who read the books.
-
-   All intellectual property rights are just licenses granted by society
-because it was thought, rightly or wrongly, that society as a whole
-would benefit by granting them.  But in any particular situation, we
-have to ask: are we really better off granting such license?  What kind
-of act are we licensing a person to do?
-
-   The case of programs today is very different from that of books a
-hundred years ago.  The fact that the easiest way to copy a program is
-from one neighbor to another, the fact that a program has both source
-code and object code which are distinct, and the fact that a program is
-used rather than read and enjoyed, combine to create a situation in
-which a person who enforces a copyright is harming society as a whole
-both materially and spiritually; in which a person should not do so
-regardless of whether the law enables him to.
-
-     "Competition makes things get done better."
-
-   The paradigm of competition is a race: by rewarding the winner, we
-encourage everyone to run faster.  When capitalism really works this
-way, it does a good job; but its defenders are wrong in assuming it
-always works this way.  If the runners forget why the reward is offered
-and become intent on winning, no matter how, they may find other
-strategies--such as, attacking other runners.  If the runners get into
-a fist fight, they will all finish late.
-
-   Proprietary and secret software is the moral equivalent of runners
-in a fist fight.  Sad to say, the only referee we've got does not seem
-to object to fights; he just regulates them ("For every ten yards you
-run, you can fire one shot").  He really ought to break them up, and
-penalize runners for even trying to fight.
-
-     "Won't everyone stop programming without a monetary incentive?"
-
-   Actually, many people will program with absolutely no monetary
-incentive.  Programming has an irresistible fascination for some
-people, usually the people who are best at it.  There is no shortage of
-professional musicians who keep at it even though they have no hope of
-making a living that way.
-
-   But really this question, though commonly asked, is not appropriate
-to the situation.  Pay for programmers will not disappear, only become
-less.  So the right question is, will anyone program with a reduced
-monetary incentive?  My experience shows that they will.
-
-   For more than ten years, many of the world's best programmers worked
-at the Artificial Intelligence Lab for far less money than they could
-have had anywhere else.  They got many kinds of non-monetary rewards:
-fame and appreciation, for example.  And creativity is also fun, a
-reward in itself.
-
-   Then most of them left when offered a chance to do the same
-interesting work for a lot of money.
-
-   What the facts show is that people will program for reasons other
-than riches; but if given a chance to make a lot of money as well, they
-will come to expect and demand it.  Low-paying organizations do poorly
-in competition with high-paying ones, but they do not have to do badly
-if the high-paying ones are banned.
-
-     "We need the programmers desperately.  If they demand that we stop
-     helping our neighbors, we have to obey."
-
-   You're never so desperate that you have to obey this sort of demand.
-Remember: millions for defense, but not a cent for tribute!
-
-     "Programmers need to make a living somehow."
-
-   In the short run, this is true.  However, there are plenty of ways
-that programmers could make a living without selling the right to use a
-program.  This way is customary now because it brings programmers and
-businessmen the most money, not because it is the only way to make a
-living.  It is easy to find other ways if you want to find them.  Here
-are a number of examples.
-
-   A manufacturer introducing a new computer will pay for the porting of
-operating systems onto the new hardware.
-
-   The sale of teaching, hand-holding and maintenance services could
-also employ programmers.
-
-   People with new ideas could distribute programs as freeware(7), asking
-for donations from satisfied users, or selling hand-holding services.
-I have met people who are already working this way successfully.
-
-   Users with related needs can form users' groups, and pay dues.  A
-group would contract with programming companies to write programs that
-the group's members would like to use.
-
-   All sorts of development can be funded with a Software Tax:
-
-     Suppose everyone who buys a computer has to pay x percent of the
-     price as a software tax.  The government gives this to an agency
-     like the NSF to spend on software development.
-
-     But if the computer buyer makes a donation to software development
-     himself, he can take a credit against the tax.  He can donate to
-     the project of his own choosing--often, chosen because he hopes to
-     use the results when it is done.  He can take a credit for any
-     amount of donation up to the total tax he had to pay.
-
-     The total tax rate could be decided by a vote of the payers of the
-     tax, weighted according to the amount they will be taxed on.
-
-     The consequences:
-
-        * The computer-using community supports software development.
-
-        * This community decides what level of support is needed.
-
-        * Users who care which projects their share is spent on can
-          choose this for themselves.
-
-   In the long run, making programs free is a step toward the
-post-scarcity world, where nobody will have to work very hard just to
-make a living.  People will be free to devote themselves to activities
-that are fun, such as programming, after spending the necessary ten
-hours a week on required tasks such as legislation, family counseling,
-robot repair and asteroid prospecting.  There will be no need to be
-able to make a living from programming.
-
-   We have already greatly reduced the amount of work that the whole
-society must do for its actual productivity, but only a little of this
-has translated itself into leisure for workers because much
-nonproductive activity is required to accompany productive activity.
-The main causes of this are bureaucracy and isometric struggles against
-competition.  Free software will greatly reduce these drains in the
-area of software production.  We must do this, in order for technical
-gains in productivity to translate into less work for us.
-
-   ---------- Footnotes ----------
-
-   (1)  The wording here was careless.  The intention was that nobody
-would have to pay for *permission* to use the GNU system.  But the
-words don't make this clear, and people often interpret them as saying
-that copies of GNU should always be distributed at little or no charge.
-That was never the intent; later on, the manifesto mentions the
-possibility of companies providing the service of distribution for a
-profit.  Subsequently I have learned to distinguish carefully between
-"free" in the sense of freedom and "free" in the sense of price.  Free
-software is software that users have the freedom to distribute and
-change.  Some users may obtain copies at no charge, while others pay to
-obtain copies--and if the funds help support improving the software, so
-much the better.  The important thing is that everyone who has a copy
-has the freedom to cooperate with others in using it.
-
-   (2)  This is another place I failed to distinguish carefully between
-the two different meanings of "free".  The statement as it stands is
-not false--you can get copies of GNU software at no charge, from your
-friends or over the net.  But it does suggest the wrong idea.
-
-   (3)  Several such companies now exist.
-
-   (4)  The Free Software Foundation raised most of its funds for 10
-years from a distribution service, although it is a charity rather
-than a company.
-
-   (5) A group of computer companies pooled funds around 1991 to
-support maintenance of the GNU C Compiler.
 
-   (6) In the 80s I had not yet realized how confusing it was to speak
-of "the issue" of "intellectual property".  That term is obviously
-biased; more subtle is the fact that it lumps together various
-disparate laws which raise very different issues.  Nowadays I urge
-people to reject the term "intellectual property" entirely, lest it
-lead others to suppose that those laws form one coherent issue.  The way to be
-clear is to discuss patents, copyrights, and trademarks separately.
-See http://www.gnu.org/philosophy/not-ipr.xhtml for more explanation
-of how this term spreads confusion and bias.
+Note added March 2014:
 
-   (7) Subsequently we have learned to distinguish between "free
-software" and "freeware".  The term "freeware" means software you are
-free to redistribute, but usually you are not free to study and change
-the source code, so most of it is not free software.  See
-http://www.gnu.org/philosophy/words-to-avoid.html for more
-explanation.
+This file is obsolete and will be removed in future.
+Please update any references to use
+  info node `(emacs)Manifesto'
+instead.
index 8d55f1a5c2d38abbea8b9b2c0752b0b1158bc7f2..9e1c1a513a14a3a533ce1f4e867ea571724bfb7f 100644 (file)
@@ -1,147 +1,8 @@
-                    Linux and the GNU system
+Linux and the GNU system
 
-The GNU project started in 1984 with the goal of developing a complete
-free Unix-like operating system: GNU.  "Free" refers to freedom, not
-price; it means you are free to run, copy, distribute, study, change,
-and improve the software.
+Note added March 2014:
 
-A Unix-like system consists of many different programs.  We found some
-components already available as free software--for example, X Windows
-and TeX.  We obtained other components by helping to convince their
-developers to make them free--for example, the Berkeley network
-utilities.  This left many missing components that we had to write in
-order to produce GNU--for example, GNU Emacs, the GNU C compiler, the
-GNU C library, Bash, and Ghostscript.  The GNU system consists of all
-these components together.
-
-The GNU project is not just about developing and distributing some
-useful free software.  The heart of the GNU project is an idea: that
-software should be free, that software users should have freedom to
-participate in a community.  To run your computer, you need an
-operating system; if it is not free, your freedom has been denied.  To
-have freedom, you need a free operating system.  We therefore set out
-to write one.
-
-In the long run, though, we cannot expect to keep the free operating
-system free unless the users are aware of the freedom it gives them,
-and value that freedom.  People who do not appreciate their freedom
-will not keep it long.  If we want to make freedom last, we need to
-spread awareness of the freedoms they have in free software.
-
-The GNU project's method is that free software and the idea of users'
-freedom support each other.  We develop GNU software, and as people
-encounter GNU programs or the GNU system and start to use them, they
-also think about the GNU idea.  The software shows that the idea can
-work in practice.  Some of these people come to agree with the idea,
-and then they are more likely to write additional free software.
-Thus, the software embodies the idea, spreads the idea, and grows from
-the idea.
-
-Early on in the development of GNU, various parts of it became popular
-even though users needed proprietary systems to run them on.  Porting
-the system to many systems and maintaining them required a lot of
-work.  After that work, most GNU software is easily configured for a
-variety of different platforms.
-
-By 1991, we had found or written all of the essential major components
-of the system except the kernel, which we were writing.  (This kernel
-consists of the Mach microkernel plus the GNU HURD.  The first test
-release was made in 1996.  Now, in 2002, it is running well, and
-Hurd-based GNU systems are starting to be used.)
-
-That was the situation when Linux came into being.  Linux is a kernel,
-like the kernel of Unix; it was written by Linus Torvalds, who
-released it under the GNU General Public License.  He did not write
-this kernel for GNU, but it fit into the gap in GNU.  The combination
-of GNU and Linux included all the major essential components of a
-Unix-compatible operating system.  Other people, with some work made
-the combination into a usable system.  The principal use of Linux, the
-kernel, is as part of this combination.
-
-The popularity of the GNU/Linux combination is success, in the sense
-of popularity, for GNU.  Ironically, the popularity of GNU/Linux
-undermines our method of communicating the ideas of GNU to people who
-use GNU.
-
-When GNU programs were only usable individually on top of another
-operating system, installing and using them meant knowing and
-appreciating these programs, and thus being aware of GNU, which led
-people to think about the philosophical base of GNU.  Now users can
-install a unified operating system which is basically GNU, but they
-usually think these are "Linux systems".  At first impression, a
-"Linux system" sounds like something completely distinct from the "GNU
-system," and that is what most users think.
-
-This leads many users to identify themselves as a separate community
-of "Linux users", distinct from the GNU user community.  They use more
-than just some GNU programs, they use almost all of the GNU system,
-but they don't think of themselves as GNU users.  Often they never
-hear about the GNU idea; if they do, they may not think it relates to
-them.
-
-Most introductions to the "Linux system" acknowledge that GNU software
-components play a role in it, but they don't say that the system as a
-whole is a modified version of the GNU system that the GNU project has
-been developing and compiling since Linus Torvalds was in junior high
-school.  They don't say that the main reason this free operating
-exists is that the GNU Project worked persistently to achieve its goal
-of freedom.
-
-As a result, most users don't know these things.  They believe that
-the "Linux system" was developed by Linus Torvalds "just for fun", and
-that their freedom is a matter of good fortune rather than the
-dedicated pursuit of freedom.  This creates a danger that they will
-leave the survival of free software to fortune as well.
-
-Since human beings tend to correct their first impressions less than
-called for by additional information they learn later, these users
-will tend to continue to underestimate their connection to GNU even if
-they do learn the facts.
-
-When we began trying to support the GNU/Linux system, we found this
-widespread misinformation led to a practical problem--it hampered
-cooperation on software maintenance.  Normally when users change a GNU
-program to make it work better on a particular system, they send the
-change to the maintainer of that program; then they work with the
-maintainer, explaining the change, arguing for it, and sometimes
-rewriting it for the sake of the overall coherence and maintainability
-of the package, to get the patch installed.  But people who thought of
-themselves as "Linux users" showed a tendency to release a forked
-"Linux-only" version of the GNU program and consider the job done.  In
-some cases we had to redo their work in order to make GNU programs run
-as released in GNU/Linux systems.
-
-How should the GNU project encourage its users to cooperate?  How
-should we spread the idea that freedom for computer users is
-important?
-
-We must continue to talk about the freedom to share and change
-software--and to teach other users to value these freedoms.  If we
-value having a free operating system, it makes sense to think about
-preserving those freedoms for the long term.  If we value having a
-variety of free software, it makes sense to think about encouraging
-others to write free software, instead of proprietary software.
-
-However, it is not enough just to talk about freedom; we must also
-make sure people know the reasons it is worth listening to what we
-say.
-
-Long explanations such as our philosophical articles are one way of
-informing the public, but you may not want to spend so much time on
-the matter.  The most effective way you can help with a small amount
-of work is simply by using the terms "Linux-based GNU system" or
-"GNU/Linux system", instead of "Linux system," when you write about or
-mention such a system.  Seeing these terms will show many people the
-reason to pay attention to our philosophical articles.
-
-The system as a whole is more GNU than Linux; the name "GNU/Linux" is
-fair.  When you are choosing the name of a distribution or a user
-group, a name with "GNU/Linux" will reflect both roots of the combined
-system, and will bring users into connection with both--including the
-spirit of freedom and community that is the basis and purpose of GNU.
-
-
-Copyright 1996, 2002 Richard Stallman
-Verbatim copying and redistribution is permitted
-without royalty as long as this notice is preserved.
+This file is obsolete and will be removed in future.
+Please update any references to use
 
+<http://www.gnu.org/gnu/linux-and-gnu.html>
index d60510eab91792ec257a1d23ff63e383d548885e..a51b4c93da7526930fc2ffc8844a69fc10b83d65 100644 (file)
@@ -39,8 +39,8 @@ the list at the end of this file.
   The GNU project wants users of GNU/Linux systems to be aware of how
   these systems relate to the GNU project, because that will help
   spread the GNU idea that software should be free--and thus encourage
-  people to write more free software.  See the file LINUX-GNU in this
-  directory for more explanation.
+  people to write more free software.  For more information, see
+  <http://www.gnu.org/gnu/linux-and-gnu.html>.
 
 *** 64-bit GNU/Linux
 
@@ -102,103 +102,21 @@ the list at the end of this file.
 
 ** Irix 6.5
 
-  It *may* be possible to build Emacs on Irix 6.5 with an old version
-  (3.1) of gcc.  Newer versions of gcc may not work.  None of the
-  current Emacs developers use Irix, though.  If you want to help
-  make Emacs on Irix work, see <http://debbugs.gnu.org/9684>.
+  Emacs versions later than 24.4 will not compile on Irix by default.
+  (Note that SGI stopped supporting Irix in December 2013.)
+  You should be able to work around the problem either by porting the
+  Emacs undumping code to GCC under Irix, or by configuring --with-wide-int.
+  Older versions of Emacs 24 (and 23?) also had problems on Irix.
+  It *may* be possible to build Emacs <= 24.4 on Irix 6.5 with an old
+  version (3.1) of gcc.  Newer versions of gcc may not work.
+  See <http://debbugs.gnu.org/9684>.
 
 \f
 * Obsolete platforms
 
-Support for the following obsolete platforms was removed in Emacs 23.1
-(the names in parentheses state the files in src/ that were removed):
-
-  Apollo SR10.x (unexapollo.c)
-  Convex (unexconvex.c and m/convex.c)
-  Xenix (unexenix.c and s/xenix.h)
-  Iris  (unexmips.c m/iris4d.h m/irist.h s/iris3-5.h s/iris3-6.h)
-  Gould (m/gould*)
-  Siemens machines running Sinix (unexsni.c)
-  Harris CXUX (s/cxux*)
-  ESIX, a variant of v.5.3 for the 386 (s/esix*)
-  Interactive (ISC) Unix (s/isc*)
-  Sony News (s/newsos*)
-  RTU 3.0, ucb universe (s/rtu.h)
-  UniSoft's UniPlus 5.2 (s/uniplus.h)
-  UMAX (s/umax.h)
-  AT&T UNIX PC model 7300 (m/7300.h)
-  Acorn
-  Alliant (m/alliant*)
-  Amdahl (m/amdahl*)
-  Altos 3068 Unix System V Release 2 (m/altos.h)
-  Apollo (m/apollo.h)
-  AT&T 3b (m/att3b.h)
-  Aviion (m/aviion*)
-  Berkeley 4.1 (m/bsd4.1.h)
-  Berkeley 4.2 (m/bsd4.2.h)
-  Berkeley 4.3 (m/bsd4.3.h)
-  Celerity (m/celerity.h)
-  clipper (m/clipper.h)
-  convergent S series (m/cnvrgnt.h)
-  cydra (m/cydra5.h)
-  Motorola System V/88 machines (m/delta88k.h)
-  Bull DPX/2 range (m/dpx2.h)
-  Dual machines using unisoft port (m/dual.h)
-  Elxsi machine (running enix) (m/elxsi.h)
-  Fujitsu F301 machine (m/f301.h)
-  i860 (m/i860.h)
-  ibm ps/2 aix386 (m/ibmps2-aix.h)
-  ISI 68000's (m/is*)
-  Masscomp 5000 series running RTU, ucb universe (m/masscomp.h)
-  Megatest 68000's (m/mega68.h)
-  Whitechapel Computer Works MG1 (ns16000 based) (m/mg1.h)
-  Harris Night Hawk Series 1200 and Series 3000 (m/nh3000.h m/nh4000.h)
-  ns16000 (m/ns16000.h)
-  National Semiconductor 32000, running Genix (m/ns32000.h)
-  TI Nu machines using system V (m/nu.h)
-  HLH Orion (m/orion.h m/orion105.h)
-  Paragon i860 (m/paragon.h)
-  PFU A-series (m/pfa50.h)
-  Plexus running System V.2 (m/plexus.h)
-  pyramid. (m/pyramid.h)
-  Bull SPS-7 (m/sps7.h)
-  Hitachi SR2001/SR2201 (m/sr2k.h)
-  Stride (m/stride.h)
-  Sun 1 (m/sun1.h)
-  Sun 2 (m/sun2.h)
-  SEQUENT SYMMETRY  (m/symmetry.h)
-  Tadpole 68k machines (m/tad68k.h)
-  tahoe (m/tahoe.h)
-  targon31 (m/targon31.h)
-  Tektronix* (m/tek4300.h m/tekxd88.h)
-  NCR Tower 32 running System V.2 (m/tower32.h)
-  NCR Tower 32 running System V.3 (m/tower32v3.h)
-  U-station (Nihon Unisys, SS5E; Sumitomo Denkoh, U-Station E30) (m/ustation.h)
-  Wicat (m/wicat.h)
-  Honeywell XPS100 running UNIX System V.2 (m/xps100.h)
-  Data General's DG/UX  (s/dgux*)
-  Irix before version 6
-  osf1 (s/osf*)
-  SunOS4 (s/sunos*)
-  RISCiX (s/riscix*)
-  SCO 3.2v4 (s/sco4.h)
-  SCO 3.2v5 (s/sco5.h)
-  Sun's 386-based RoadRunner (m/sun386.h)
-  Sun3 machines (m/sun3*)
-  Integrated Solutions 386 machine (m/is386.h)
-  Integrated Solutions `Optimum V' -- m68k-isi-bsd4.2 or -bsd4.3
-  Harris Power PC (powerpc-harris-powerunix)
-  Hewlett-Packard 9000 series 200 or 300 on some platforms -- m68k-hp-bsd or
-    m68k-hp-hpux; note m68k-*-netbsd* still works
-  IBM PS/2 -- i386-ibm-aix1.1 or i386-ibm-aix1.2
-  GEC 63 -- local-gec63-usg5.2
-  Tandem Integrity S2 -- mips-tandem-sysv
-  System V rel 0 -- usg5.0
-  System V rel 2 -- usg5.2
-  System V rel 2.2 -- usg5.2.2
-  System V rel 3 -- usg5.3
-  Ultrix -- bsd4.3
-  VMS (s/vms.h)
+Support for many obsolete platforms was removed in Emacs 23.1.
+If for some reason you encounter an ancient machine where current
+Emacs does not compile, try an older release like Emacs 22.3.
 
 \f
 Local variables:
index a07655aa018fdd58be164b56b684cf210eb343c1..012c3729f75c934ad533fd41f49d94bc260cfe1b 100644 (file)
@@ -23,6 +23,8 @@ Ensure that `mh-x-face-file' is a string before trying to use it
 
 Fix this error (closes SF #471).
 
+\f
+
 * Changes in MH-E 8.5
 
 Version 8.5 fixes bugs when incorporating or forwarding mail.
index eba9b9405850e447e422796652ca894f08b15763..e336ff5b9867af5897765138db3abf59898bea08 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
 GNU Emacs NEWS -- history of user-visible changes.
 
-Copyright (C) 2010-2014 Free Software Foundation, Inc.
+Copyright (C) 2014 Free Software Foundation, Inc.
 See the end of the file for license conditions.
 
 Please send Emacs bug reports to bug-gnu-emacs@gnu.org.
 If possible, use M-x report-emacs-bug.
 
-This file is about changes in Emacs version 24.
+This file is about changes in Emacs version 25.
 
-See files NEWS.23, NEWS.22, NEWS.21, NEWS.20, NEWS.19, NEWS.18,
+See files NEWS.24, NEWS.23, NEWS.22, NEWS.21, NEWS.20, NEWS.19, NEWS.18,
 and NEWS.1-17 for changes in older Emacs versions.
 
 You can narrow news to a specific version by calling `view-emacs-news'
 with a prefix argument or by typing C-u C-h C-n.
 
-\f
-* Installation Changes in Emacs 24.4
-
-** Emacs can now be compiled with ACL (access control list) support.
-This happens by default if a suitable support library is found at
-build time, like libacl on GNU/Linux.  To prevent this, use the
-configure option `--disable-acl'.  See below for the features this provides.
+Temporary note:
++++ indicates that all necessary documentation updates are complete.
+    (This means all relevant manuals in doc/ AND lisp doc-strings.)
+--- means no change in the manuals is needed.
+When you add a new item, use the appropriate mark if you are sure it applies,
+otherwise leave it unmarked.
 
-** Emacs can now be compiled with file notification support.
-This happens by default if a suitable system library is found at
-build time.  To prevent this, use the configure option
-`--without-file-notification'.  See below for file-notify features.
-This feature is not available for the Nextstep port.
+\f
+* Installation Changes in Emacs 25.1
 
-** Emacs can now be compiled with zlib support.
-This happens by default if zlib is present, which it normally is.
-To prevent this, use the configure option `--without-zlib'.
-This provides the function `zlib-decompress-region'; see below for details.
++++
+** Building Emacs now requires C99 or later.
 
-** The configure option `--without-compress-info' has been generalized,
-and renamed to `--without-compress-install'.  It now prevents compression
-of _any_ files during installation.
+** Building Emacs now requires GNU make, version 3.81 or later.
 
-** The configure option `--with-crt-dir' has been removed.
-It is no longer needed, as the crt*.o files are no longer linked specially.
+** By default, Emacs no longer works on IRIX.  We expect that Emacs
+users are not affected by this, as SGI stopped supporting IRIX in
+December 2013.  If you are affected, please send a bug report.  You
+should be able to work around the problem either by porting the Emacs
+undumping code to GCC under IRIX, or by configuring --with-wide-int,
+or by sticking with Emacs 24.4.
 
-** Directories passed to configure option `--enable-locallisppath' are
-no longer created during installation.
+---
+** The configure option `--with-pkg-config-prog' has been removed.
+Use './configure PKG_CONFIG=/full/name/of/pkg-config' if you need to.
 
-** Emacs for Nextstep (Mac OS X, GNUstep) can be built with ImageMagick support.
-This requires pkg-config to be available at build time.
+** The configure option '--enable-silent-rules' and the command
+'make V=0' now do a better job of suppressing chatter.
 
 \f
-* Startup Changes in Emacs 24.4
-
-** When initializing `load-path', an empty element in the EMACSLOADPATH
-environment variable (either leading, e.g., ":/foo"; trailing, e.g.,
-"/foo:"; or embedded, e.g., "/foo::/bar") is replaced with the default
-load-path (the one that would have been used if EMACSLOADPATH was unset).
-This makes it easier to _extend_ the load-path via EMACSLOADPATH
-(previously, EMACSLOADPATH had to specify the complete load-path,
-including the defaults).  (In older versions of Emacs, an empty element
-was replaced by ".", so use an explicit "." now if that is what you want.)
-
-** The -L option, which normally prepends its argument to load-path,
-will instead append, if the argument begins with `:' (or `;' on MS Windows;
-i.e., `path-separator').
-
-** If you use either site-load.el or site-init.el to customize the dumped
-Emacs executable, any changes to `load-path' that these files make
-will no longer be present after dumping.  To affect a permanent change
-to `load-path', use the `--enable-locallisppath' option of `configure'.
-
-** The user option `initial-buffer-choice' can now specify a function
-to set up the initial buffer.
+* Startup Changes in Emacs 25.1
 
 \f
-* Changes in Emacs 24.4
+* Changes in Emacs 25.1
 
-** Support for ACLs (access control lists).
-This requires a suitable support library to be found at build time.
-On GNU/Linux, the POSIX ACL interface is used via libacl.
-On MS-Windows, the NT Security APIs are used to emulate the POSIX interface.
-ACLs are extended file attributes, used e.g. for finer-grained permissions.
-
-*** Emacs preserves the ACL entries of files when backing up.
-
-*** New functions `file-acl' and `set-file-acl' get and set file ACLs.
-
-** Support for menus on text-mode terminals.
-If the terminal supports a mouse, clicking on the menu bar, or on
-sensitive portions of the mode line or header line, will drop down the
-menu defined at that position.  Likewise, clicking C-mouse-1, C-mouse-2, or
-C-mouse-3 on the text area will pop up the menus defined for those locations.
-
-If the text terminal does not support a mouse, you can activate the
-first menu-bar menu by typing F10, which invokes `menu-bar-open'.
-
-If you want the previous behavior, where F10 invoked `tmm-menubar',
-customize the option `tty-menu-open-use-tmm' to a non-nil value.
-(Typing M-` always invokes `tmm-menubar', even if `tty-menu-open-use-tmm'
-is nil.)
-
-** New option `load-prefer-newer' affects how the `load' function chooses
-the file to load.  If this is non-nil, then when both .el and .elc
-versions of a file exist, and the caller did not explicitly specify
-which one to load, then the newer file is loaded.  The default, nil,
-means to always load the .elc file.
-
-** Multi-monitor support
-
-*** New functions `display-monitor-attributes-list' and
-`frame-monitor-attributes' can be used to obtain information about
-each physical monitor on multi-monitor setups.
-
-*** The functions `display-pixel-width' and `display-pixel-height' now
-behave consistently among the platforms: they return the pixel width
-or height for all physical monitors associated with the given display
-as if they were on X.  To get information for each physical
-monitor, use the new functions above.  Similar notes also apply to
-`x-display-pixel-width', `x-display-pixel-height', `display-mm-width',
-`display-mm-height', `x-display-mm-width', and `x-display-mm-height'.
-
-** New function `zlib-decompress-region', which decompresses gzip- and
-zlib-format compressed data using built-in zlib support (if available).
-
-** The *Messages* buffer is created in `messages-buffer-mode',
-a new major mode, with read-only status.  Any code that might create
-the *Messages* buffer should call the function `messages-buffer' to do
-so and set up the mode.
-
-** The cursor stops blinking after 10 blinks (by default) on X and Nextstep.
-You can change the default by customizing `blink-cursor-blinks'.
-
-** In keymaps where SPC scrolls forward, S-SPC now scrolls backward.
-This affects View mode, etc.
-
-** The default value of `make-backup-file-name-function' is no longer nil.
-Instead it defaults to a function that does what the nil value used to.
-
-** Help
-
-*** The command `apropos-variable' is renamed to `apropos-user-option'.
-`apropos-user-option' shows all user options, while `apropos-variable'
-shows all variables.  When called with a universal prefix argument,
-the two commands swap their behaviors.  When `apropos-do-all' is
-non-nil, they output the same results.
-
-*** The key `?' now describes prefix bindings, like `C-h'.
-
-*** The command `describe-function' has been extended for EIEIO.
-Running it on constructors will show a full description of the
-generated class.  For generic functions, it will show all
-implementations together with links to the source.  The old commands
-`describe-class', `describe-constructor' and `describe-generic' were
-removed.
-
-*** The function `quail-help' is no longer an interactive command.
-Use `C-h C-\' (`describe-input-method') instead.
-
-** Frame and window handling
-
-*** New commands `toggle-frame-fullscreen' and `toggle-frame-maximized',
-bound to <f11> and M-<f10>, respectively.
-
-*** New hooks `focus-in-hook', `focus-out-hook'.
-These are normal hooks run when an Emacs frame gains or loses input focus.
-
-*** The function `window-in-direction' now takes additional arguments
-for specifying a reference point, wrapping the selection around frame
-borders, and specifying ways to select the minibuffer window.
-
-*** Emacs can now change frame sizes in units of pixels, rather than
-text rows or columns.  When maximizing a frame or making it fullscreen,
-remaining extra pixels are no longer given to the minibuffer, the rightmost
-fringe, or other unusable space, but are distributed among the text
-areas of the frame's windows.  If the new option `frame-resize-pixelwise'
-is non-nil, all frame size changes happen pixelwise and set the
-corresponding size hints for the window manager.
-
-*** Emacs can now change window sizes in units of pixels.
-Mouse-dragging a mode line or window divider now changes the size of
-adjacent windows pixelwise.  If the new option `window-resize-pixelwise'
-is non-nil, functions like `balance-windows-area' and `fit-window-to-buffer'
-resize windows pixelwise.  Most functions for changing or accessing
-window sizes now have an additional argument that allows changes to apply,
-or values to be returned, in pixels instead of lines/columns.
-
-*** The functions `window-body-height' and `window-body-width' now never
-count partially visible lines or columns if called with a nil PIXELWISE
-argument.
-
-*** Emacs can now draw dividers between adjacent windows.  To put
-dividers between side-by-side/vertically stacked windows customize the
-frame parameters `right-divider-width' and `bottom-divider-width' to
-some positive integer.  You can drag dividers with the mouse (they show
-a corresponding cursor when the mouse hovers over them).  You can change
-the appearance of dividers by customizing the faces `window-divider',
-`window-divider-first-pixel', and `window-divider-last-pixel'.  The last
-two are useful to provide a 3D effect, or to better distinguish dividers
-from surrounding display objects.
-
-*** New functions to return the pixel sizes of window components, namely
-`window-scroll-bar-width', `window-mode-line-height',
-`window-header-line-height', `window-right-divider-width', and
-`window-bottom-divider-width'.
+** x-select-enable-clipboard is renamed gui-select-enable-clipboard.
+Additionally it now also applies to OSX and GNUstep.
 
-*** The new function `window-text-pixel-size' returns the size of the
-text of a window's buffer in pixels.  This allows functions like
-`fit-frame-to-buffer' and `fit-window-to-buffer' to accurately fit a
-window to its buffer as it will be displayed.
-
-*** `fit-window-to-buffer' can now resize windows in both dimensions.
-This behavior is controlled by the new option
-`fit-window-to-buffer-horizontally'.  The new option
-`fit-frame-to-buffer' allows you to fit the window's frame to its buffer.
-
-*** `fit-frame-to-buffer' now fits frames in both dimensions.  The new
-options `fit-frame-to-buffer-margins' and `fit-frame-to-buffer-sizes'
-control the size of the frame and its position on screen.
++++
+** terpri gets an optional arg ENSURE to conditionally output a newline.
 
-*** Temp Buffer Resize Mode can now adjust the height and width of
-windows and frames.  The new option `temp-buffer-max-width' allows you to
-control the width of temporary buffer windows.  Moreover, if the new
-option `fit-frame-to-buffer' is non-nil and the buffer appears in the
-root window of a frame, Temp Buffer Resize Mode will try to adjust the
-width and/or height of the frame.
+** `insert-register' now leaves point after the inserted text
+when called interactively.  A prefix argument toggles this behavior.
 
-*** `split-window' is now a non-interactive function, not a command.
-As a command, it was a special case of `C-x 2' (`split-window-below'),
-and as such superfluous.  After being reimplemented in Lisp, its
-interactive form was mistakenly retained.
+** New var `truncate-string-ellipsis' to choose how to indicate truncation.
 
-*** The functions `window-size' and `window-total-size' now have an
-optional argument to return a rounded size value.
+---
+** The default value of `history-length' has increased to 100.
 
-*** `window-state-put' now allows you to put a window state into internal
-windows too.
++++
+** The new variable `term-file-aliases' replaces some files from lisp/term.
+The function `tty-run-terminal-initialization' consults this variable
+when deciding what terminal-specific initialization code to run.
 
-*** New option `scroll-bar-adjust-thumb-portion'.
-Available only on X, this option allows you to control over-scrolling
-using the scroll bar (i.e., dragging the thumb down even when the end
-of the buffer is visible).
-
-*** New display actions functions for `display-buffer':
-
-**** `display-buffer-at-bottom' chooses or creates a window at the
-bottom of the selected frame.
-
-**** `display-buffer-no-window' to not display the buffer in a window.
-
-*** New display action alist entry `allow-no-window' to indicate the
-caller of `display-buffer' is ready to handle the case of not displaying
-the buffer in a window.
+---
+** New variable `system-configuration-features', listing some of the
+main features that Emacs was compiled with.  This is mainly intended
+for use in Emacs bug reports.
 
-*** `display-buffer-in-previous-window' is now a member of
-`display-buffer-fallback-action'.
-
-** Lisp evaluation
++++
+** A password is now hidden also when typed in batch mode.  Another
+hiding character but the default `.' can be used by let-binding the
+variable `read-hide-char'.
 
-*** `eval-defun' on an already defined defcustom calls the :set function,
-if there is one.
-
-*** The commands `eval-expression' (`M-:'), `eval-last-sexp' (`C-x C-e'),
-and `eval-print-last-sexp' (`C-j' in Lisp Interaction mode) can take a
-zero prefix argument.  This disables truncation of lists in the output,
-equivalent to setting `(eval-expression-)print-length' and
-`(eval-expression-)print-level' to nil.  Additionally, it causes integers
-to be printed in other formats (octal, hexadecimal, and character).
-
-*** New hook `eval-expression-minibuffer-setup-hook' run by
-`eval-expression' on entering the minibuffer.
-
-** `cache-long-line-scans' is now non-nil, and renamed to `cache-long-scans',
-because it affects caching of paragraph scanning results as well.
-There is no reason to set this to nil except for debugging purposes.
-
-** `emacs-bzr-version' has been renamed to `emacs-repository-version',
-and works for git too, if you fetch the repository notes.
+** The new functions `string-collate-lessp' and `string-collate-equalp'
+preserve the collation order as defined by the system's locale(1)
+environment.  For the time being this is implemented for modern POSIX
+systems and for MS-Windows, for other systems they fall back to their
+counterparts `string-lessp' and `string-equal'.
 
-** The default value of `comment-use-global-state' is now t,
-and this variable has been marked obsolete.
+*** The ls-lisp package uses `string-collate-lessp' to sort file names.
+If you want the old, locale-independent sorting, customize the new
+option `ls-lisp-use-string-collate' to a nil value.
 
-** `write-region-inhibit-fsync' now defaults to t in batch mode.
+*** The MS-Windows specific variable `w32-collate-ignore-punctuation',
+if set to a non-nil value, causes the above 2 functions to ignore
+symbol and punctuation characters when collating strings.  This
+emulates the behavior of modern Posix platforms when the locale's
+codeset is "UTF-8" (as in "en_US.UTF-8").  This is needed because
+MS-Windows doesn't support UTF-8 as codeset in its locales.
 
-** The option `set-mark-default-inactive' has been deleted.
-This unfinished feature was introduced by accident in Emacs 23.1;
-simply disabling Transient Mark mode does the same thing.
+** New variable `ns-use-fullscreen-animation' controls animation for
+non-native NS fullscreen.  The default is nil.  Set to t to enable
+animation when entering and leaving fullscreen.  For native OSX fullscreen
+this has no effect.
 
 \f
-* Editing Changes in Emacs 24.4
-
-** Indentation
-
-*** `electric-indent-mode' is now enabled by default.
-Typing RET reindents the current line and indents the new line.
-`C-j' inserts a newline but does not indent.  In some programming modes,
-additional characters are electric (eg `{').
-
-*** New buffer-local `electric-indent-local-mode'.
-
-*** The behavior of `C-x TAB' (`indent-rigidly') has changed.
-When invoked without a prefix argument, it now activates a transient
-mode in which typing <left>, <right>, <S-left>, and <S-right> adjusts
-the text indentation in the region.  Typing any other key resumes
-normal editing behavior.
-
-*** `tab-stop-list' is now implicitly extended to infinity by repeating
-the last step.  Its default value is changed to nil, which means a tab
-stop every `tab-width' columns.
-
-** Uniquify is enabled by default, with `post-forward-angle-brackets' style.
-In other words, if you visit two files that have the same base name,
-then rather than creating buffers basename and basename<2>,
-Emacs uses basename<dirA> and basename<dirB>.  To change this,
-customize `uniquify-buffer-name-style'.  Set it to nil for the old behavior.
-
-** New command `C-x SPC' (`rectangle-mark-mode') makes a rectangular region.
-Most commands are still unaware of it, but kill/yank do work on the rectangle.
-
-** New option `visual-order-cursor-movement'.
-If this is non-nil, cursor motion with arrow keys will follow the
-visual order of characters on the screen: <left> always moves to the
-left, <right> always moves to the right, disregarding the surrounding
-bidirectional context.
-
-** New command `delete-duplicate-lines'.
-This searches the region for identical lines, and removes all but one
-copy of each repeated line.  The lines need not be sorted.
+* Editing Changes in Emacs 25.1
 
-** New command `cycle-spacing' acts like a smarter `just-one-space'.
-When called in succession, it cycles between spacing conventions:
-one space, no spaces, original spacing.
-
-** `blink-matching-paren' now only highlights the matching open-paren
-by default, instead of moving the cursor.  Set this variable to `jump' to
-restore the old behavior.
-
-** The new function `fill-single-char-nobreak-p' can stop fill from breaking
-a line after a one-letter word, which is an error in some typographical
-conventions.  To use it, add it to the `fill-nobreak-predicate' hook.
-
-** Registers
-
-*** All interactive commands that read a register (`copy-to-register', etc.)
-now display a temporary window after `register-preview-delay' seconds
-that summarizes existing registers.  To disable this, set that option to nil.
-Interactive commands that read registers and want to make use of this
-should use `register-read-with-preview' to read register names.
-
-*** New command `frameset-to-register' bound to `C-x r f', replacing
-`frame-configuration-to-register'.  It offers similar functionality,
-plus enhancements like the ability to restore deleted frames.
-(`frame-configuration-to-register' still exists, but no longer has a
-key binding.)
-
-*** New command `C-x C-k x' (`kmacro-to-register') stores keyboard
-macros in registers.
+** Emacs now supports "bracketed paste mode" when running on a terminal
+that supports it.  This facility allows Emacs to understand pasted
+chunks of text as strings to be inserted, instead of interpreting each
+character in the pasted text as actual user input.  This results in a
+paste experience similar to that under a window system, and significant
+performance improvements when pasting large amounts of text.
 
 \f
-* Changes in Specialized Modes and Packages in Emacs 24.4
-
-** Backtrace and debugger
-
-*** New Lisp debugger command `v' (`debugger-toggle-locals') toggles the
-display of local variables of the current stack frame.
-
-*** The Lisp debugger's `e' command (`debugger-eval-expression') now includes
-the lexical environment when evaluating the code in the context at point
-(and so allows you to access lexical variables).
-
-*** New minor mode `jit-lock-debug-mode' helps you debug code run via JIT Lock.
-
-** Battery information can now be retrieved from BSD's `apm' utility.
-
-** In the Buffer Menu, `M-s a C-o' shows matches for a regexp in marked buffers.
-
-** Calc
-
-*** Calc by default now uses the Gregorian calendar for all dates, and
-uses January 1, 1 AD as its day number 1.  Previously Calc used the
-Julian calendar for dates before September 14, 1752, and it used
-December 31, 1 BC as its day number 1; the new scheme is more
-consistent with Calendar's calendrical system and day numbering.
-
-*** The new option `calc-gregorian-switch' lets you configure if
-(and when) Calc switches from the Julian to the Gregorian calendar.
-
-*** Support for ISO 8601 dates.
+* Changes in Specialized Modes and Packages in Emacs 25.1
 
-** Calendar and Diary
+** ElDoc
+*** New minor mode global-eldoc-mode
+*** eldoc-documentation-function now defaults to nil
 
-*** New faces `calendar-weekday-header', `calendar-weekend-header',
-and `calendar-month-header'.
+** pcase
+*** New UPatterns `quote' and `app'.
+*** New UPatterns can be defined with `pcase-defmacro'.
++++
+*** New vector QPattern.
 
-*** New option `calendar-day-header-array'.
+** Lisp mode
+*** Strings after `:documentation' are highlighted as docstrings.
 
-*** New variable `diary-from-outlook-function', used by the command
-`diary-from-outlook'.
+** Rectangle editing
+*** Rectangle Mark mode can have corners past EOL or in the middle of a TAB.
+*** C-x C-x in rectangle-mark-mode now cycles through the four corners.
+*** `string-rectangle' provides on-the-fly preview of the result.
 
-*** The variable `calendar-font-lock-keywords' is obsolete.
+** New font-lock functions font-lock-ensure and font-lock-flush, which
+should be used instead of font-lock-fontify-buffer when called from Elisp.
 
-** CEDET
-
-*** EDE
-
-**** The cpp-root project now supports executing a compile command.
-It can be set through the new :compile-command slot or the
-buffer-local variable `compile-command'.
-
-**** Better selection of include directories for the 'linux' project.
-Include directories now support out-of-tree build directories and
-target architecture auto-detection.
-
-*** Semantic
-
-**** Improved detection of used namespaces in current scope in C++.
-
-**** Parsing of default values for variables and function arguments in C/C++.
-They are also displayed by the summarize feature in the mode line.
-
-**** Improved parsing of function pointers in C/C++.
-This also includes parsing of function pointers as function arguments.
-
-**** Parsing of C/C++ preprocessor macros that open new scope.
-For example, this enables parsing of macros that open new namespaces.
-
-**** Support for 'this' pointer in inline member functions in C++.
-
-** CFEngine mode
-
-*** Support for completion, ElDoc, and Flycheck has been added.
-
-*** The current CFEngine syntax is parsed from "cf-promises -s json".
-There is a fallback syntax available if you don't have cf-promises or
-if your version doesn't support that option.  See option `cfengine-cf-promises'.
+** Macro `minibuffer-with-setup-hook' takes (:append FUN) to mean
+appending FUN to `minibuffer-setup-hook'.
 
 ** cl-lib
+*** New functions cl-fresh-line, cl-digit-char-p and cl-parse-integer.
 
-*** New macro `cl-tagbody'.
-This executes statements while allowing for control transfer to labels.
-
-*** letf is now just an alias for cl-letf.
-
-** CUA mode
-
-*** CUA mode now uses `delete-selection-mode' and `shift-select-mode'.
-Hence, you can now enable it independently from those modes, and from
-`transient-mark-mode'.
-
-*** `cua-highlight-region-shift-only' is now obsolete.
-You can disable `transient-mark-mode' to get the same result.
-
-*** CUA's rectangles can now be used without CUA by calling the command
-`cua-rectangle-mark-mode'.
-
-** Delete Selection mode can now be used without Transient Mark mode.
-
-** Desktop
-
-*** `desktop-save-mode' by default now auto-saves an existing desktop file
-after `desktop-auto-save-timeout'.  To disable this, customize that option
-to nil (or zero).
-
-*** Desktop now saves and restores the frame/window configuration.
-To disable this, set `desktop-restore-frames' to nil.
-See also related options `desktop-restore-reuses-frames',
-`desktop-restore-in-current-display', and `desktop-restore-forces-onscreen'.
-
-** New Dired minor mode `dired-hide-details-mode' toggles whether details,
-such as file ownership or permissions, are visible in Dired buffers.
-See the new options `dired-hide-details-hide-symlink-targets' and
-`dired-hide-details-hide-information-lines' for customizing what to hide.
-
-** You can enable ElDoc inside the `eval-expression' minibuffer with:
-  (add-hook 'eval-expression-minibuffer-setup-hook 'eldoc-mode)
-The results display in the mode line.
-
-** Electric Pair mode
-
-*** New option `electric-pair-preserve-balance', enabled by default.
-If non-nil, pairing/skipping only kicks in when that help the balance
-of parentheses and quotes; i.e., the buffer should end up at least as
-balanced as before.
-
-You can further control this behavior by adjusting the predicates
-stored in `electric-pair-inhibit-predicate' and `electric-pair-skip-self'.
-
-*** New option `electric-pair-delete-adjacent-pairs', enabled by default.
-In `electric-pair-mode', the commands `backward-delete-char' and
-`backward-delete-char-untabify' are now bound to electric variants
-that delete the closer when invoked between adjacent pairs.
-
-*** New option `electric-pair-open-newline-between-pairs', enabled by default.
-In `electric-pair-mode', inserting a newline between adjacent pairs
-opens an extra newline after point, which is indented if
-`electric-indent-mode' is also set.
-
-*** New option `electric-pair-skip-whitespace', enabled by default.
-This controls if skipping over closing delimiters should jump over any
-whitespace slack.  Setting it to `chomp' makes it delete this
-whitespace.  See also the variable `electric-pair-skip-whitespace-chars'.
-
-*** New variables control the pairing in strings and comments.
-You can customize `electric-pair-text-pairs' and
-`electric-pair-text-syntax-table' to tweak pairing behavior inside
-strings and comments.
-
-** New EPA option `epa-mail-aliases'.
-You can set this to a list of email address aliases that `epa-mail-encrypt'
-should use to find keys.
-
-** New ERC option `erc-accidental-paste-threshold-seconds'.
-If set to a number, this can be used to avoid accidentally pasting large
-amounts of data into the ERC input.
-
-** New ERT macro `skip-unless' allows skipping ERT tests.
-
-** Eshell
-
-*** `eshell' now supports visual subcommands and options.
-Eshell has been able to handle "visual" commands (interactive,
-non-line oriented commands such as top that require display
-capabilities not provided by eshell) by running them in an Emacs
-terminal emulator.  See `eshell-visual-commands'.
-
-This feature has been extended to subcommands and options that make a
-usually line-oriented command a visual command.  Typical examples are
-"git log" and "git <command> --help", which display their output in a
-pager by default.  See `eshell-visual-subcommands' and `eshell-visual-options'.
-
-*** New Eshell-Tramp module.
-External su and sudo commands are now the default; the internal,
-Tramp-using variants can still be used by enabling the eshell-tramp module.
-
-** New F90 mode option `f90-smart-end-names'.
-
-** New option `gnutls-verify-error', if non-nil, means that Emacs
-should reject SSL/TLS certificates that GnuTLS determines as invalid.
-(This option defaults to nil at present, but this is expected to change
-in a future release.)
-
-** Hi-Lock
-
-*** New global command `M-s h .' (`highlight-symbol-at-point') highlights
-the symbol near point.
-
-*** New option `hi-lock-auto-select-face'.  When non-nil, hi-lock commands
-will cycle through faces in `hi-lock-face-defaults' without prompting.
-
-** Icomplete is now more similar to Ido.
-
-*** Icomplete by default now applies to all forms of minibuffer completion.
-The variable `icomplete-with-completion-tables' (now a user option)
-controls this.  To restore the old behavior, set it back to
-'(internal-complete-buffer).
-
-*** You can navigate through and select completions using the keys
-from `icomplete-minibuffer-map'.
-
-*** The string that separates potential completions is now a customizable
-option (`icomplete-separator').  The default is " | " rather than ",".
-
-*** New face `icomplete-first-match'; and new options
-`icomplete-hide-common-prefix' and `icomplete-show-matches-on-no-input'.
-
-*** The option `icomplete-show-key-bindings' has been removed.
-
-** Ido
-
-*** An Ido user manual is now included.
-
-*** The option `ido-use-virtual-buffers' can now take the value `auto'.
-This means to use virtual buffers if the current ido input does not match
-an existing buffer.
-
-*** The variable `ido-decorations' can optionally have two new elements,
-which are the brackets to use around the sole remaining completion.
-
-** Image mode
-
-*** New commands `n' (`image-next-file') and `p' (`image-previous-file')
-visit the next image file and the previous image file in the same
-directory, respectively.
-
-*** New commands to show specific frames of multi-frame images.
-`f' (`image-next-frame') and `b' (`image-previous-frame') visit the
-next or previous frame.  `F' (`image-goto-frame') shows a specific frame.
-
-*** New commands to speed up, slow down, or reverse animation.
-`a +' (`image-increase-speed') and `a -' (`image-decrease-speed') to
-speed up and slow down the animation.  `a r' (`image-reverse-speed')
-to reverse it and `a 0' (`image-reset-speed') to reset it.
-
-*** The command `image-mode-fit-frame' deletes other windows.
-When toggling, it restores the frame's previous window configuration.
-It also has an optional frame argument, which can be used by Lisp
-callers to fit the image to a frame other than the selected frame.
-
-** New Imenu option `imenu-generic-skip-comments-and-strings'.
-
-** Info
-
-*** New Info face `info-index-match', used to highlight matches in index
-entries displayed by `Info-index-next', `Info-virtual-index' and
-`info-apropos'.
-
-*** The Info-edit command is obsolete.  Editing Info nodes by hand
-has not been relevant for some time.
-
-** JS Mode
-
-*** New option `js-switch-indent-offset'.
-
-*** Better indentation of multiple-variable declarations.
-If a declaration spans several lines, variables on the following lines
-are lined up to the first one.
-
-*** Recognition and better indentation of continuations in array comprehensions.
-
-** MH-E has been updated to version 8.6 - see separate MH-E-NEWS file.
-
-** Octave mode
-
-*** Font locking for Texinfo comments and new keywords.
-
-*** Completion in Octave file buffers.
-
-*** ElDoc support.
-
-*** Jump to definition.
-
-*** Documentation lookup/search.
-
-** OPascal mode is the new name for Delphi mode
-
-*** All delphi-* variables and functions have been renamed to opascal-*.
-Obsolete aliases exist for those likely to have been used externally.
-
-*** The option `delphi-newline-always-indents' has been removed.
-Use `electric-indent-mode' instead.
-
-*** The TAB key runs the standard `indent-for-tab-command', not `delphi-tab'.
-
-** Package
-
-*** The package library now supports digital signing of packages.
-Maintainers of package archives should consider signing their packages
-to enhance security.
-
-**** If the user option `package-check-signature' is non-nil,
-Emacs tries to check package signatures at install time.
-The value `allow-unsigned' allows installation of unsigned packages.
-
-**** The user option `package-unsigned-archives' lists archives where
-Emacs will not try to check signatures.
-
-*** New option `package-pinned-packages'.  This is useful if you have multiple
-archives enabled, with more than one offering a given package that you want.
-
-*** In the `list-packages' buffer, you can use `f' (`package-menu-filter')
-to filter the list of packages by a keyword.
-
-*** In the `describe-package' buffer, there are now buttons listing the
-keywords related to the package.  Click on a button to see other packages
-related to that keyword.
-
-*** The format of `archive-contents' files, generated by package
-repositories, has changed to allow a new (fifth) element in the data
-vectors, containing an associative list with extra properties.
-(For example, `describe-package' uses the `:url' extra property to
-display a "Homepage" header.)
-
-** In Prolog mode, `prolog-use-smie' has been removed,
-along with the non-SMIE indentation code.
-
-** Python mode
-
-*** Out of the box support for CPython, iPython and readline based shells.
-**** `python-shell-completion-module-string-code' is no longer used.
-
-*** Automatic shell prompt detection.  New user options:
-**** `python-shell-interpreter-interactive-arg'.
-**** `python-shell-prompt-detect-enabled'.
-**** `python-shell-prompt-detect-failure-warning'.
-**** `python-shell-prompt-input-regexps'.
-**** `python-shell-prompt-output-regexps'.
-
-*** Python shell support for remote hosts via tramp.
-
-*** Correct display of line numbers for code sent to the Python shell.
-
-** Remember
-
-*** The new command `remember-notes' creates a buffer that is saved on exit.
-You can use it as a more permanent *scratch* buffer.
-
-*** Remember can now store notes in separate files.
-To use this, add `remember-store-in-files' to the `remember-handler-functions'
-option.  The files are saved in `remember-data-directory' using
-names specified by `remember-directory-file-name-format'.
-
-** Rmail
-
-*** Customize `rmail-mbox-format' to influence some minor aspects of
-how Rmail displays non-MIME messages.
-
-*** The `unrmail' command now converts from BABYL to mboxrd format,
-rather than mboxo.  Customize `unrmail-mbox-format' to change this.
+** Calendar and diary
 
-** Ruby mode
++++
+*** New commands to insert diary entries with Chinese dates:
+`diary-chinese-insert-anniversary-entry' `diary-chinese-insert-entry'
+`diary-chinese-insert-monthly-entry', `diary-chinese-insert-yearly-entry'.
 
-*** Improved syntax highlighting and indentation.
++++
+*** The calendar can now list and mark diary entries with Chinese dates.
+See `diary-chinese-list-entries' and `diary-chinese-mark-entries'.
 
-*** New `electric-indent-mode' integration.
+---
+*** The option `calendar-mode-line-format' can now be nil,
+which means to do nothing special with the mode line in calendars.
 
-*** New option `ruby-encoding-magic-comment-style'.
+---
+*** Many items obsolete since at least version 23.1 have been removed.
+The majority were function/variable/face aliases, too numerous to list here.
+The remainder were:
 
-*** New option `ruby-custom-encoding-magic-comment-template'.
+**** Functions `calendar-one-frame-setup', `calendar-only-one-frame-setup',
+`calendar-two-frame-setup', `european-calendar', `american-calendar'.
 
-*** New option `ruby-align-to-stmt-keywords'.
+**** Hooks `cal-menu-load-hook', `cal-x-load-hook'.
 
-*** New option `ruby-align-chained-calls'.
+**** Macro `calendar-for-loop'.
 
-*** More Ruby file types have been added to `auto-mode-alist'.
+**** Variables `european-calendar-style', `diary-face', `hebrew-holidays-{1,4}'.
 
-** Search and Replace
+**** The nil and list forms of `diary-display-function'.
 
-*** New global command `M-s .' (`isearch-forward-symbol-at-point')
-starts a symbol (identifier) incremental search forward with the
-symbol found near point added to the search string initially.
+** New ERT function `ert-summarize-tests-batch-and-exit'.
 
-*** `C-x 8 RET' in Isearch mode reads a character by its Unicode name
-and adds it to the search string.
+---
+** `Info-fontify-maximum-menu-size' can be t for no limit.
 
-*** `M-s i' in Isearch mode toggles whether search matches invisible text.
+---
+** ntlm.el has support for NTLM2.
 
-*** `query-replace' skips invisible text when `search-invisible' is nil,
-and opens overlays with hidden text when `search-invisible' is `open'.
+---
+** The Rmail commands d, C-d and u now handle repeat counts to delete or
+undelete multiple messages.
 
-*** A negative prefix argument of replacement commands replaces backward.
-`M-- M-%' replaces a string backward, `M-- C-M-%' replaces a regexp
-backward, `M-s w words M-- M-%' replaces a sequence of words backward.
+** Rmail can now render HTML mail messages if your Emacs was built with
+libxml2 or if you have the Lynx browser installed.  By default, Rmail
+will display the HTML version of a mail message that has both HTML and
+plain text parts, if display of HTML email is possible; customize the
+`rmail-mime-prefer-html' option to `nil' if you don't want that.
 
-*** By default, prefix arguments do not now terminate Isearch mode.
-Set `isearch-allow-prefix' to nil to restore the old behavior.
+** SES now supports local printer functions; see `ses-define-local-printer'.
 
-*** More Isearch commands accept prefix arguments, namely
-`isearch-printing-char', `isearch-quote-char', `isearch-yank-word',
-`isearch-yank-line'.
+** In sh-mode, you can now use `sh-shell' as a file-local variable to
+specify the type of shell in use (bash, csh, etc).
 
-*** Word search now matches whitespace at the beginning/end
-of the search string if it contains leading/trailing whitespace.
-In an incremental word search or when using a non-nil LAX argument
-of `word-search-regexp', the lax matching can also match part of
-the first word (in addition to the lax matching of the last word).
-The same rules are now applied to the symbol search, with the difference
-that it matches symbols, and non-symbol characters between symbols.
-
-** New SES command `ses-rename-cell' allows assignment of names to SES cells.
-
-** The shell.el option `explicit-bash-args' includes --noediting by default.
-All non-ancient Bash versions support this option.
-
-** Shell Script mode
-
-*** The SMIE indentation engine is now used by default - see `sh-use-smie'.
-
-*** `sh-mode' now has its own setting for `add-log-current-defun-function'.
-
-** SMIE
-
-*** You can customize the SMIE indentation of a mode via `smie-config'.
-The command `smie-config-guess' can help you derive the appropriate
-indentation settings, if you provide it with an indented sample file.
-Use `smie-config-save' to save the result.
-
-*** You can customize the SMIE indentation of a file by adding an entry to
-the file's local variables of the form: `eval: (smie-config-local '(RULES))'.
-
-*** New commands `smie-config-show-indent' and `smie-config-set-indent'.
-
-** SQL mode
-
-*** Improved login monitoring and appropriate response to login failures.
-New variable `sql-login-delay' defines maximum wait time for a connection.
-
-*** Oracle support.
-SQL*Plus script placeholders are properly highlighted and identified
-in `sql-placeholders-filter'.  When starting SQL*Plus, `sql-oracle-options'
-are passed before the logon parameter, as required.  The default now
-includes `-L', to limit the number of logon attempts per invocation.
-
-** New Term mode option `term-suppress-hard-newline'.
-
-** Todo mode has been rewritten and enhanced.
-The Todo mode user manual describes all commands and most user
-options.  To support some of these features, a new file format is
-used, which is incompatible with the old format; however, you can
-convert old todo and done item files to the new format on initializing
-the first new todo file, or at any later time with the provided
-conversion command.  The previous version of todo-mode.el has been
-renamed to otodo-mode.el and is now obsolete.  New features include:
-
-*** Support for multiple todo files and archive files of done items.
-
-*** Renaming, reordering, moving, merging, and deleting categories.
-
-*** Sortable tabular summaries of categories and the item types they contain.
-
-*** Cross-category lists of items filtered by specific criteria.
-
-*** More fine-grained interaction with the Emacs diary, by being able to
-decide for each todo item whether it appears in the Fancy Diary display.
-
-*** Highly flexible new item insertion and item editing.
-
-*** Moving items between categories, storing done items in their category
-or in archive files, undoing or unarchiving done items.
-
-*** Reprioritizing items by inputting a numerical priority.
-
-*** Extensive customizability of operation and display, including many faces.
-
-** Trace
-
-*** `trace-function' and `trace-function-background' no longer prompt for
-the output buffer.  Unless you use a prefix argument, they output to
-`trace-buffer'.
-
-*** With a prefix argument, `trace-function' and `trace-function-background'
-will prompt for a "context".  This is a Lisp expression, whose value at the
-time the function is entered/exited is printed along with the function's
-name and arguments.
+** The URL package accepts now the protocols "ssh", "scp" and "rsync".
+When `url-handler-mode' is enabled, file operations for these
+protocols as well as for "telnet" and "ftp" are passed to Tramp.
 
 ** Tramp
 
-*** New connection method "adb", which allows to access Android
-devices by the Android Debug Bridge.  The variable `tramp-adb-program'
-can be used to adapt the path of the "adb" program, if needed.
-
-*** Handlers for `file-acl' and `set-file-acl' for remote machines
-that support POSIX ACLs.
+*** New connection method "nc", which allows to access dumb busyboxes.
 
-*** Handlers for `file-notify-add-watch' and `file-notify-rm-watch'
-for remote machines that support filesystem notifications.
+** SQL mode
 
-*** The experimental url syntax for remote file names has been removed.
+*** New user variable `sql-default-directory' enables remote
+connections using Tramp.
 
-*** The connection methods "plink1", "ssh1", "ssh2", "scp1", "scp2",
-"scpc" and "rsyncc" are discontinued.  The ssh option
-"ControlMaster=auto" is set automatically in all ssh-based methods,
-when possible.  See `tramp-use-ssh-controlmaster-options'.
+*** New command `sql-send-line-and-next' sends the current line to the
+interactive buffer and advances to the next line, skipping whitespace
+and comments.
 
-** New URL command `url-cookie-list' displays the current cookies,
-and allows you to interactively remove cookies.
+*** Add support for Vertica SQL.
 
 ** VC and related modes
 
-*** In VC directory mode, `D' displays diffs between VC-controlled
-whole tree revisions.
-
-*** In VC directory mode, `L' lists the change log for the current VC
-controlled tree in a window.
-
-*** In VC directory mode, `I' shows a log of changes that will be
-received with a pull operation.
-
-*** `C-x v G' (globally) and `G' (in VC directory mode) ignores a file
-under current version control system.  When called with a prefix
-argument, you can remove a file from the ignored file list.
-
-** VHDL mode
-
-*** New options: `vhdl-actual-generic-name', `vhdl-beautify-options'.
-
-*** New commands: `vhdl-fix-statement-region', `vhdl-fix-statement-buffer'.
-
-** The Woman commands `woman-default-faces' and `woman-monochrome-faces'
-are obsolete.  Customize the `woman-*' faces instead.
-
-** More packages look for ~/.emacs.d/<foo> additionally to ~/.<foo>.
-Affected files:
-~/.emacs.d/timelog     replaces  ~/.timelog
-~/.emacs.d/vip         replaces  ~/.vip
-~/.emacs.d/viper       replaces  ~/.viper
-~/.emacs.d/ido.last    replaces  ~/.ido.last
-~/.emacs.d/kkcrc       replaces  ~/.kkcrc
-~/.emacs.d/quickurls   replaces  ~/.quickurls
-~/.emacs.d/idlwave/    replaces  ~/.idlwave/
-~/.emacs.d/bdfcache.el replaces  ~/.bdfcache.el
-~/.emacs.d/places      replaces  ~/.emacs-places
-~/.emacs.d/shadows     replaces  ~/.shadows
-~/.emacs.d/shadow_todo replaces  ~/.shadow_todo
-~/.emacs.d/strokes     replaces  ~/.strokes
-~/.emacs.d/notes       replaces  ~/.notes
-~/.emacs.d/type-break  replaces  ~/.type-break
-Also the following files used by the now obsolete otodo-mode.el:
-~/.emacs.d/todo-do     replaces  ~/.todo-do
-~/.emacs.d/todo-done   replaces  ~/.todo-done
-~/.emacs.d/todo-top    replaces  ~/.todo-top
-
-** Obsolete packages
-
-*** iswitchb.el; use icomplete-mode.
+*** New option `vc-annotate-background-mode' controls whether
+the color range from `vc-annotate-color-map' is applied to the
+background or to the foreground.
 
-*** longlines.el; use visual-line-mode.
+** Calculator: decimal display mode uses "," groups, so it's more
+fitting for use in money calculations; factorial works with
+non-integer inputs.
 
-*** meese.el.
+** HideIfDef mode now support full C/C++ expressions, argumented macro expansions
+, interactive macro evaluation and automatic scanning of #defined symbols.
 
-*** sup-mouse.el.
+*** New custom variable `hide-ifdef-header-regexp' to define C/C++ header file
+name patterns. Default case-insensitive .h, .hh, .hpp and .hxx.
+*** New custom variable `hide-ifdef-expand-reinclusion-protection' to prevent
+reinclusion protected header files from being fully hidden.
+*** New custom variable `hide-ifdef-exclude-define-regexp' to define symbol
+name patterns (e.x. all "FOR_DOXYGEN_ONLY_*") to be excluded.
 
-*** terminal.el; use term.el instead.
+** TeX mode
 
-*** the old version of todo-mode.el (renamed to otodo-mode.el).
+*** New custom variable `tex-print-file-extension' to help users who
+use PDF instead of DVI.
 
-*** xesam.el (owing to the cancellation of the XESAM project).
-
-*** yow.el; use fortune.el or cookie1.el instead.
-
-\f
-* New Modes and Packages in Emacs 24.4
-
-** New package eww.el provides a built-in web browser.
-This requires Emacs to have been compiled with libxml2 support.
-
-** New package nadvice.el offers lighter-weight advice facilities.
-It is layered as:
-
-*** `add-function'/`remove-function', which can be used to add/remove code on
-any function-carrying place, such as process filters or `<foo>-function' hooks.
-
-*** `advice-add'/`advice-remove' to add/remove a piece of advice on a named
-function, much like `defadvice' does.
-
-** New package frameset.el provides a set of operations to save a frameset
-(the state of all or a subset of the existing frames and windows, somewhat
-similar to a frame configuration), both in-session and persistently, and
-restore it at some point in the future.
+** Obsolete packages
 
-** New package filenotify.el provides an interface for file system
-notifications.  It requires that Emacs be compiled with one of the
-low-level libraries gfilenotify.c, inotify.c or w32notify.c.
+---
+*** gulp.el
 
-** New minor modes `prettify-symbols-mode' and `global-prettify-symbols-mode'
-display specified symbols as composed characters.  E.g., in Emacs Lisp mode,
-this replaces the string "lambda" with the Greek lambda character.
+---
+*** crisp.el, tpu-edt.el, ws-mode.el
+These emulations of old editors are believed to be no longer relevant
+ - contact emacs-devel@gnu.org if you disagree.
 
-** New minor mode `superword-mode', which overrides the default word motion
-commands to treat "symbol_words" as a single word, similar to what
-`subword-mode' does.
+---
+*** vi.el, vip.el (try M-x viper instead)
 
 \f
-* Incompatible Lisp Changes in Emacs 24.4
-
-** The default file coding for Emacs Lisp files is now utf-8.
-(See `file-coding-system-alist'.)  In most cases, this change is
-transparent, but files that contain unusual characters without
-specifying an explicit coding system may fail to load with obscure
-errors.  You should either convert them to utf-8 or add an explicit
-`coding:' cookie.
-
-** Default process filters and sentinels are not nil any more.
-Instead they default to a function that does what the nil value used to do.
-
-** Overlay priority does not have to be nil or a non-negative integer.
-Overlay priority can be other kinds of Lisp objects.  We didn't yet
-decide whether other types of values are stable enough, and therefore
-don't feel it's right to document them.  For now, don't assume in your
-code that the values of overlay priority can only be either nil or an
-integer, always test them with an appropriate predicate to be one or
-the other.  If you need to sort arbitrary overlays into priority
-order, `overlays-at' can now optionally do this.
-You should still only specify integer priorities on overlays you create.
-
-** The cars of the elements in `interpreter-mode-alist' are now
-treated as regexps rather than literal strings.
-
-** `overriding-terminal-local-map' no longer replaces the local keymaps.
-It used to disable the minor mode, major mode, and text-property keymaps,
-whereas now it simply has higher precedence.
-
-** `kill-region' has lost its `yank-handler' optional argument.
-
-** `(input-pending-p)' no longer runs other timers that are ready to run.
-The new optional CHECK-TIMERS parameter allows for the prior behavior.
-
-** `defvar' and `defcustom' in a let-binding affect the "external" default.
-
-** The syntax of ?» and ?« is now punctuation instead of matched parens.
-Some languages match those as »...«, and others as «...», so it is
-better for Emacs to stay neutral by default.
-
-** `read-event' does not always decode chars in ttys any more.  As was the case
-in Emacs 22 and before, `read-event' (and `read-char') by default read raw
-bytes from the terminal.  If you want to read decoded chars instead (as was
-always the case in Emacs-23, for example), pass a non-nil
-`inherit-input-method' argument.
-
-** In `symbol-function', nil and "unbound" are indistinguishable.
-`symbol-function' does not signal a `void-function' error any more.
-To determine if a symbol's function definition is void, use `fboundp'.
-
-** `defadvice' does not honor the `freeze' flag and cannot advise
-special-forms any more.
-
-** `dolist' no longer binds VAR while evaluating the RESULT form,
-when lexical binding is enabled.  Previously, VAR was bound to nil,
-which often led to spurious unused-variable warnings.
-
-** The return value of `backup-buffer' has changed.
-The second argument is no longer an SELinux context, instead it is an
-alist of extended attributes as returned by the new function
-`file-extended-attributes'.  The attributes can be applied to another
-file using `set-file-extended-attributes'.
-
-** By default `copy-file' no longer copies file permission bits to an
-existing destination; and it sets the file permission bits of a newly
-created destination to those of the source, masked by the default file
-permissions.  To copy the file permission bits, pass t as the
-PRESERVE-PERMISSIONS argument of `copy-file'.
-
-** `visited-file-modtime' now returns -1 for nonexistent files.
-Formerly it returned a list (-1 LOW USEC PSEC), but this was ambiguous
-in the presence of files with negative time stamps.
-
-** Frame-local variables that affect redisplay do not work any more.
-More specifically, redisplay does not bother to check for a frame-local
-value when looking up variables.
-
-** In compiled Lisp files, the header no longer includes a timestamp.
-
-** The option `inhibit-local-menu-bar-menus' has been removed.
+* New Modes and Packages in Emacs 25.1
 
 \f
-* Lisp Changes in Emacs 24.4
-
-** Change to the Emacs Lisp coding conventions: the package descriptor
-and name of global variables, constants, and functions should be separated
-by two hyphens if the symbol is not meant to be used by other packages.
-
-** The second argument of `eval' can now specify a lexical environment.
-
-** New macro `define-alternatives' can be used to define generic commands.
-Generic commands are interactive functions whose implementation can be
-selected among several alternatives, as a matter of user preference.
-
-** Numeric comparison functions =, <, >, <=, >= can now take many arguments.
+* Incompatible Lisp Changes in Emacs 25.1
 
-** New functions `special-form-p' and `macrop'.
+** window-configurations no longer record the buffers's marks.
 
-** New macro `with-eval-after-load'.
-This is like the old `eval-after-load', but better behaved.
+** inhibit-modification-hooks now also inhibits lock-file checks, as well as
+active region handling.
 
-** If you give a symbol a `defalias-fset-function' property, `defalias'
-on that symbol will use the associated value as a function to call
-in place of `fset'.
+** deactivate-mark is now buffer-local.
 
-** New variable `enable-dir-local-variables'.
-Directory-local variables are ignored if this is nil.  This may be
-useful for modes that want to ignore directory-locals while still
-respecting file-local variables.
+** `cl-the' now asserts that its argument is of the given type.
 
-** `read-regexp' now uses the new variable `read-regexp-defaults-function'
-as a function to call to provide default values.
++++
+** Mouse click events on mode line or header line no longer include
+any reference to a buffer position.  The 6th member of the mouse
+position list returned for such events is now nil.
 
-** New functions `group-gid' and `group-real-gid'.
-
-** New function `get-pos-property'.
-
-** New hook `pre-redisplay-function'.
-
-** `byte-compile-interactive-only-functions' is now obsolete.
-To specify that a command should only be called interactively, give it
-a non-nil `interactive-only' property.
-
-** New function `string-suffix-p'.
-
-** `split-string' now takes an optional argument TRIM.
-The value, if non-nil, is a regexp that specifies what to trim from
-the start and end of each substring.
-
-** Completion
-
-*** The separator used by `completing-read-multiple' is now a regexp.
-The default `crm-separator' has been changed to allow surrounding spaces
-around the comma.
-
-*** New function `completion-table-with-cache' is a wrapper for
-`completion-table-dynamic' that caches the result of the last lookup.
-
-*** New function `completion-table-merge' to combine several
-completion tables by merging their completions.
-
-*** The `common-substring' argument of `display-completion-list',
-which has been documented as obsolete since Emacs 23.1, is now _really_
-obsolete, and no longer advertised.  Instead either call
-`completion-hilit-commonality' to add the highlighting; or use
-`completion-all-completions', which returns highlighted strings.
-
-** Encoding and decoding of text
-
-*** New coding-system `prefer-utf-8'.
-This is like `undecided' but prefers UTF-8 on decoding if the text to
-be decoded does not contain any invalid UTF-8 sequences.  On encoding,
-any non-ASCII characters are automatically encoded as UTF-8.
-
-*** New attributes of coding-systems whose type is `undecided'.
-Two new attributes, `:inhibit-null-byte-detection' and
-`:inhibit-iso-escape-detection', determine how to detect encoding of
-text that includes null bytes and ISO-2022 escape sequences, respectively.
-Each of these attributes can be either nil, zero, or t.  If t, decoding
-text ignores null bytes and ISO-2022 sequences, respectively.  If nil,
-null bytes cause text to be decoded with no-conversion, and ISO-2022
-sequences cause Emacs to assume the text is encoded in one of the ISO-2022
-encodings, such as iso-2022-7bit.  If zero, Emacs consults the variables
-`inhibit-null-byte-detection' and `inhibit-iso-escape-detection'.
-The new attribute `:prefer-utf-8', if non-nil, causes Emacs to prefer
-UTF-8 encoding and decoding, whenever possible.
-
-These attributes are only meaningful for coding-systems of type `undecided'.
-(The type of a coding-system is determined by its `:coding-type' attribute
-and can be accessed by calling the `coding-system-type' function.)
-
-** Error-handling
-
-*** New function `define-error'.
-
-*** `with-demoted-errors' takes an additional argument `format'.
-
-*** Errors from timer functions are no longer silently discarded,
-but are reported as messages.  So you may see "Error running timer"
-messages from code that was failing silently till now.  Set
-`debug-on-error' non-nil to get a real error and a backtrace.
-
-** Faces
-
-*** Face specs set via Custom themes now replace the `defface' spec
-rather than inheriting from it.  In other words, setting a face via a
-theme now behaves like setting it via Customize: you only need to
-specify the attributes that you want, you don't need to unset those
-that you don't want.
-
-*** The function `face-spec-set' is now like `setq' for face specs.
-Its third arg now accepts values specifying a face spec type (defface,
-custom, or override spec), and the relevant spec is set accordingly.
-
-*** New face spec attribute :distant-foreground
-specifies foreground to use if background color is near the foreground
-color that would otherwise have been used.
-
-*** New function `add-face-text-property', which can be used to
-conveniently prepend/append new face properties.
-
-*** New face characteristic (supports :underline (:style wave))
-specifies whether or not the terminal can display a wavy line.
-
-** File-handling
-
-*** Support for filesystem notifications.
-Emacs now supports notifications of filesystem changes, such as
-creation, modification, and deletion of files.  This requires the
-`glib' API, or the 'inotify' API (on GNU/Linux systems only).  On
-MS-Windows systems, this is supported for Windows XP and newer.
-
-*** The 9th element returned by `file-attributes' is now unspecified.
-Formerly, it was t if the file's gid would change if file were deleted
-and recreated.  This value has been inaccurate for years on many
-platforms, and nobody seems to have noticed or cared.
-
-*** The 6th argument to `copy-file' has been renamed to
-PRESERVE-PERMISSIONS as it now handles ACL entries and the traditional
-Unix file permission bits as well as SELinux context.
-
-*** The function `file-ownership-preserved-p' now has an optional
-argument GROUP which causes it check for file group too.  This can be
-used in place of the 9th element of `file-attributes'.
-
-*** The function `set-visited-file-modtime' now accepts a 0 or -1 argument,
-with the same interpretation as the returned value of `visited-file-modtime'.
-
-** Image API
-
-*** `image-animated-p' is now `image-multi-frame-p'.
-It returns non-nil for any image that contains multiple frames,
-whether or not it specifies a frame delay.
-
-*** New variable `image-default-frame-delay' gives the frame delay for
-animated images which do not specify a frame delay.
-
-*** New functions `image-current-frame' and `image-show-frame' for getting
-and setting the current frame of a multi-frame image.
-
-** ImageMagick
-
-*** ImageMagick images now support the :max-width and :max-height keywords.
-
-*** When using `create-image' with image data, you can pass a :format
-attribute (via the property-list argument) in order to help
-ImageMagick detect the image type.  The value should be a MIME
-content-type that is found in the new variable `image-format-suffixes'.
-
-** Revert and Autorevert
-
-*** If Emacs is compiled with file notification support, it uses notifications
-instead of checking file time stamps.  To disable this, set the user option
-`auto-revert-use-notify' to nil.  Alternatively, you can specify a regular
-expression matching directories to be excluded from file notifications via
-`auto-revert-notify-exclude-dir-regexp'.
-
-*** The default values of `buffer-stale-function', `revert-buffer-function',
-and `revert-buffer-insert-file-contents-function' are no longer nil.
-Instead they default to functions that do what the nil value used to.
-
-*** `buffer-stale-function' is now used for buffers visiting files too.
-
-*** The new user option `auto-revert-remote-files' enables reversion
-of remote files, if non-nil.
-
-** Terminal
-
-*** Functions to pop up menus and dialogs now work on all terminals,
-including TTYs.  This includes `x-popup-menu', `x-popup-dialog',
-`message-box', `yes-or-no-p', etc.
-
-The function `display-popup-menus-p' will now return non-nil for a
-display or frame whenever a mouse is supported on that display or frame.
-
-*** New hook `tty-setup-hook', run at the end of initializing a text terminal.
-
-*** The hook `term-setup-hook' is obsolete.  It is entirely equivalent
-to `emacs-startup-hook'.  See also the new `tty-setup-hook'.
-
-** Minor internal changes to the details of lock files.
-The lock for DIR/FILE is now _always_ DIR/.#FILE.
-If DIR/.#FILE already exists and is not an Emacs lock file,
-Emacs makes no attempt to lock DIR/FILE.  (Previously, it fell back to
-numbered lock files DIR/.#FILE.0...).
-On file systems that do not support symbolic links, the lock is now a
-regular file with contents being what would have been in the symlink.
-
-** New bool-vector set operation functions:
-*** `bool-vector-exclusive-or'
-*** `bool-vector-union'
-*** `bool-vector-intersection'
-*** `bool-vector-set-difference'
-*** `bool-vector-not'
-*** `bool-vector-subsetp'
-*** `bool-vector-count-consecutive'
-*** `bool-vector-count-population'
-
-** New library subr-x.el with miscellaneous small utility functions:
-*** `hash-table-keys'
-*** `hash-table-values'
-*** `string-blank-p'
-*** `string-empty-p'
-*** `string-join'
-*** `string-reverse'
-*** `string-trim-left'
-*** `string-trim-right'
-*** `string-trim'
-*** `string-remove-prefix'
-*** `string-remove-suffix'
-
-** The `time-to-seconds' alias to `float-time' is no longer marked obsolete.
-
-** The spelling of the rx.el category `chinese-two-byte' has been
-corrected (the first 'e' was missing).
-
-** EIEIO namespace cleanup, obsolete-aliasing functions to use `eieio-' prefix:
-*** object-name -> eieio-object-name
-*** object-class -> eieio-object-class
-*** object-class-fast -> eieio--object-class
-*** object-class-name -> eieio-object-class-name
-*** object-name-string -> eieio-object-name-string
-*** object-num-slots -> eieio--object-num-slots
-*** object-set-name-string -> eieio-object-set-name-string
-*** class-of -> eieio-object-class
-*** class-name -> eieio-class-name
-*** class-parent -> eieio-class-parent
-*** class-parents -> eieio-class-parents
-*** class-parents-fast -> eieio-class-parents-fast
-*** class-children -> eieio-class-children
-*** class-num-slots -> eieio--class-num-slots
-*** class-precedence-list -> eieio-class-precedence-list
-*** class-direct-subclasses -> eieio-class-children
-*** class-direct-superclasses -> eieio-class-parents
-
-** Obsoleted functions
-*** `log10'
-*** `dont-compile'
-*** `lisp-complete-symbol'
-*** `field-complete'
-*** `minibuffer-completion-contents'
-*** `isearch-nonincremental-exit-minibuffer'
-*** `isearch-filter-visible'
-*** `generic-make-keywords-list'
-*** `get-upcase-table' (use `case-table-get-table' instead).
-
-** `with-wrapper-hook' is obsoleted by `add-function'.
-The few hooks that used with-wrapper-hook are replaced as follows:
-*** `abbrev-expand-function' obsoletes `abbrev-expand-functions'.
-*** `completion-in-region-function' obsoletes `completion-in-region-functions'.
-*** `filter-buffer-substring-function' obsoletes `filter-buffer-substring-functions'.
-
-\f
-* Changes in Emacs 24.4 on Non-Free Operating Systems
-
-** New Core Text based font backend for Mac OS X 10.5 and newer.
-To use the old font backend, use the following on the command line:
-  % defaults write org.gnu.Emacs FontBackend ns
-GNUstep and Mac OS X 10.4 use the old font backend.
-
-** Improved fullscreen support on Mac OS X 10.7 and newer, where the
-default fullscreen method is now "native" fullscreen.  To use the
-old style fullscreen, customize `ns-use-native-fullscreen' to nil.
-
-** On Mac OS X 10.7 and newer, Emacs can use sRGB colorspace, and does so
-by default.  Customize `ns-use-srgb-colorspace' to go back to the old method.
-Note that this does not apply to images.
-
-** The procedure for building Emacs on MS-Windows has changed.
-It is now built by running the same configure script as on all other
-platforms.  This requires the MSYS environment and MinGW development
-tools.  See the updated instructions in nt/INSTALL for details.
-
-Using the Posix configure script and Makefiles also means a change in
-the directory structure of the Emacs installation on Windows.  It is
-now the same as on GNU and Unix systems.  In particular, the auxiliary
-programs, such as cmdproxy.exe and hexl.exe, are in
-libexec/emacs/VERSION/i686-pc-mingw32 (where VERSION is the Emacs
-version), version-independent site-lisp is in share/emacs/site-lisp,
-version-specific Lisp files are in share/emacs/VERSION/lisp and in
-share/emacs/VERSION/site-lisp, Info docs are in share/info, and data
-files are in share/emacs/VERSION/etc.  (Emacs knows about all these
-directories and will find the files in there automatically; there's no
-need to set any variables due to this change.)
-
-** Emacs on Windows 2000 and later can now access files and directories
-whose names cannot be encoded in the current system codepage.
-
-The new variable `w32-unicode-filenames' controls this feature: if it
-is t, Emacs uses Unicode APIs to pass file names to system calls,
-which lifts the limitation of file names to the current locale.
-
-** Lock files now work on MS-Windows.
-This helps to prevent losing your edits if the same file is being
-edited in another Emacs session or by another user.  See the node
-"Interlocking" in the Emacs User Manual for the details.  To disable
-file locking, customize `create-lockfiles' to nil.
-
-** The "generate a backtrace on fatal error" feature now works on MS-Windows.
-The backtrace is written to the 'emacs_backtrace.txt' file in the
-directory where Emacs was running.
-
-** The `network-interface-list' and `network-interface-info' functions
-are now available on MS-Windows.
-
-** The variable `buffer-file-type' is no longer supported.
-Setting it has no effect, and %t in the mode-line format is ignored.
-Likewise, `file-name-buffer-file-type-alist' is now obsolete, and
-modifying it has no effect.
+** Menu items in keymaps do not support the "key shortcut cache" any more.
+These slots used to hold key-shortcut data, but have been obsolete since
+Emacs-21.
 
 \f
-* Installation Changes in Emacs 24.3
+* Lisp Changes in Emacs 25.1
 
-** The default X toolkit is now Gtk+ version 3.
-If you don't pass `--with-x-toolkit' to configure, or if you use
-`--with-x-toolkit=gtk' or `--with-x-toolkit=yes', configure will try
-to build with Gtk+ version 3, and if that fails, try Gtk+ version 2.
-You can explicitly require a specific version by passing
-`--with-x-toolkit=gtk2' or `--with-x-toolkit=gtk3' to configure.
+** Some "x-*" were obsoleted:
+*** x-select-text is renamed gui-select-text.
+*** x-selection-value is renamed gui-selection-value.
+*** x-get-selection is renamed gui-get-selection.
+*** x-get-clipboard and x-clipboard-yank are marked obsolete.
+*** x-get-selection-value is renamed to gui-get-primary-selection.
+*** x-set-selection is renamed to gui-set-selection
 
-** New configure option `--enable-link-time-optimization', to utilize
-an appropriate feature provided by GCC since version 4.5.0.
+** call-process-shell-command and process-file-shell-command
+don't take "&rest args" any more.
 
-** New configure option `--without-all' to disable most of the optional
-features (image support, etc.) that are normally enabled by default.
+** New function `alist-get', which is also a valid place (aka lvalue).
 
-** New configure option `--enable-gcc-warnings' (for developing/debugging
-Emacs).  If building with GCC, this enables compile-time checks that
-warn/give errors about possibly-questionable C code.  On a recent GNU
-system there should be no warnings; on older and on non-GNU systems
-the results may be useful to developers.
+** New function `funcall-interactively', which works like `funcall'
+but makes `called-interactively-p' treat the function as (you guessed it)
+called interactively.
 
-** The configure option `--enable-use-lisp-union-type' has been
-renamed to `--enable-check-lisp-object-type', as the resulting
-Lisp_Object type no longer uses a union to implement the compile time
-check that this option enables.
+** New function `function-put' to use instead of `put' for function properties.
 
-** The configure option `--disable-maintainer-mode' has been removed,
-as it was confusingly-named and rarely useful.
++++
+** New properties that can be specified with `declare':
+*** (interactive-only INSTEAD), says to use INSTEAD for non-interactive use.
+*** (pure VAL), if VAL is non-nil, indicates the function is pure.
+*** (side-effect-free VAL), if VAL is non-nil, indicates the function does not
+have side effects.
 
-** The configure options `--program-prefix', `--program-suffix', and
-`--program-transform-name' apply to more than just the installed
-binaries.  Now they also affect the man pages, icons, and the
-etc/emacs.desktop file; but not the info pages, since this would break
-links between the various manuals.
++++
+** New macro `with-file-modes', for evaluating expressions with default file
+permissions set to temporary values (e.g., for creating private files).
 
-** You can use `NO_BIN_LINK=t make install' to prevent the installation
-overwriting "emacs" in the installation bin/ directory with a link
-to "emacs-VERSION".
+** You can access the slots of structures using `cl-struct-slot-value'.
 
-** Emacs uses libtinfo in preference to libncurses, if available.
+** Functions `rmail-delete-forward' and `rmail-delete-backward' take an
+optional repeat-count argument.
 
-** On FreeBSD and NetBSD, configure no longer adds /usr/local/lib and
-/usr/pkg/lib to the linker search path.  You must add them yourself if
-you want them.
+** Function `sort' can deal with vectors.
 
-** The standalone scripts `rcs-checkin' and `vcdiff' have been removed
-(from the bin and libexec directories, respectively).  The former is
-no longer relevant, the latter is replaced by lisp (in vc-sccs.el).
+---
+** New utilities in subr-x.el:
+*** New macros `if-let' and `when-let' allow defining bindings and to
+    execute code depending whether all values are true.
+*** New macros `thread-first' and `thread-last' allow threading a form
+    as the first or last argument of subsequent forms.
 
 \f
-* Startup Changes in Emacs 24.3
-
-** Emacs no longer searches for `leim-list.el' files beneath the standard
-lisp/ directory.  There should not be any there anyway.  If you have
-been adding them there, put them somewhere else; e.g., site-lisp.
-
-** The `--no-site-lisp' command line option now works for Nextstep builds.
+* Changes in Frames and Windows Code in Emacs 25.1
+
++++
+** Emacs can now draw horizontal scroll bars on some platforms that
+provide toolkit scroll bars, namely Gtk+, Lucid, Motif and Windows.
+Horizontal scroll bars are turned off by default.
+*** New function `horizontal-scroll-bars-available-p' telling whether
+    horizontal scroll bars are available on the underlying system.
+*** New mode `horizontal-scroll-bar-mode' to toggle horizontal scroll
+    bars on all existing and future frames.
+*** New function `toggle-horizontal-scroll-bar' to toggle horizontal
+    scroll bars on the selected frame.
+*** New frame parameters `horizontal-scroll-bars' and
+    `scroll-bar-height' to set horizontal scroll bars and their height
+    for individual frames and in `default-frame-alist'.
+*** New functions `frame-scroll-bar-height' and
+    `window-scroll-bar-height' return the height of horizontal scroll
+    bars on a specific frame or window.
+*** `set-window-scroll-bars' now accepts five parameters where the last
+    two specify height and type of the window's horizontal scroll bar.
+*** `window-scroll-bars' now returns type and sizes of horizontal scroll
+    bars too.
+*** New buffer-local variables `horizontal-scroll-bar' and
+    `scroll-bar-height'.
+
+** The height of a frame's menu and tool bar are no more counted in the
+frame's text height.  This means that the text height stands only for
+the height of the frame's root window plus that of the echo area (if
+present).  This was already the behavior for frames with external tool
+and menu bars (like in the Gtk builds) but has now been extended to all
+builds.
+
+** Frames now do not necessarily preserve the number of columns or lines
+they display when setting default font, menu bar, fringe width, or
+scroll bars.  In particular, maximized and fullscreen frames are
+conceptually never resized if such settings change.  For fullheight and
+fullwidth frames, the behavior may depend on the toolkit used.
+*** New option `frame-inhibit-implied-resize' if non-nil, means that
+   setting default font, menu bar, fringe width, or scroll bars of a
+   specific frame does not resize that frame in order to preserve the
+   number of columns or lines it displays.
 
 \f
-* Changes in Emacs 24.3
-
-** Help
-
-*** `C-h f' (`describe-function') can now perform autoloading.
-When this command is called for an autoloaded function whose docstring
-contains a key substitution construct, that function's library is
-automatically loaded, so that the documentation can be shown
-correctly.  To disable this, set `help-enable-auto-load' to nil.
-
-*** `C-h f' now reports previously-autoloaded functions as "autoloaded",
-even after their associated libraries have been loaded (and the
-autoloads have been redefined as functions).
-
-** ImageMagick
-
-*** Images displayed via ImageMagick now support transparency and the
-:background image specification property.
-
-*** When available, ImageMagick support is automatically enabled.
-It is no longer necessary to call `imagemagick-register-types'
-explicitly to install ImageMagick image types; that function is called
-automatically at startup, or when customizing an imagemagick- option.
-
-*** Setting `imagemagick-types-inhibit' to t now disables the use of
-ImageMagick to view images.  (You must call `imagemagick-register-types'
-afterwards if you do not use customize to change this.)
-
-*** The new variable `imagemagick-enabled-types' also affects which
-ImageMagick types are treated as images.  The function
-`imagemagick-filter-types' returns the list of types that will be
-treated as images.
-
-** Minibuffer
-
-*** In minibuffer filename prompts, `C-M-f' and `C-M-b' now move to the
-next and previous path separator, respectively.
-
-*** `minibuffer-electric-default-mode' can shorten "(default ...)" to "[...]"
-in minibuffer prompts.  Just set `minibuffer-eldef-shorten-default'
-non-nil before enabling the mode.
-
-** Mode line
-
-*** New option `mode-line-default-help-echo' specifies the help text
-(shown in a tooltip or in the echo area) for any part of the mode line
-that does not have its own specialized help text.
-
-*** You can now click mouse-3 in the coding system indicator to invoke
-`set-buffer-file-coding-system'.
-
-** Server and client
-
-*** emacsclient now obeys string values for `initial-buffer-choice',
-if it is told to open a new frame without specifying any file to visit
-or expression to evaluate.
-
-*** New option `server-auth-key' specifies a shared server key.
-
-** Emacs now generates backtraces on fatal errors.
-On encountering a fatal error, Emacs now outputs a textual description
-of the fatal signal, and a short backtrace on platforms like glibc
-that support backtraces.
-
-** `C-x C-q' is now bound to the new minor mode `read-only-mode'.
-This minor mode replaces `toggle-read-only', which is now obsolete.
-
-** Most `y-or-n' prompts now allow you to scroll the selected window.
-Typing `C-v' or `M-v' at a y-or-n prompt scrolls forward or backward
-respectively, without exiting from the prompt.
-
-** In the Package Menu, newly-available packages are listed as "new",
-and sorted above the other "available" packages by default.
-
-** If your Emacs was built from a repository checkout, the new variable
-`emacs-bzr-version' contains information about the bzr revision used.
-
-** New option `create-lockfiles' specifies usage of lockfiles.
-It defaults to t.  Changing it to nil inhibits the creation of lock
-files (use this with caution).
-
-** New option `enable-remote-dir-locals', if non-nil, allows directory-local
-variables on remote hosts.
-
-** The entry for PCL-CVS has been removed from the Tools menu.
-The PCL-CVS commands are still available via the keyboard.
-
-** Using "unibyte: t" in Lisp source files is obsolete.
-Use "coding: raw-text" instead.
-
-** In the buffer made by `M-x report-emacs-bug', the `C-c m' binding
-has been changed to `C-c M-i' (`report-emacs-bug-insert-to-mailer').
-The previous binding, introduced in Emacs 24.1, was a mistake, because
-`C-c LETTER' bindings are reserved for user customizations.
-
-** Internationalization
-
-*** New language environment: Persian.
-
-*** New input method `vietnamese-vni'.
-
-** Nextstep (GNUstep / Mac OS X) port
-
-*** Support for fullscreen and the frame parameter fullscreen.
-
-*** A file dialog is used for open/save operations initiated from the
-menu/toolbar.
-
-\f
-* Editing Changes in Emacs 24.3
-
-** Search and Replace
-
-*** Non-regexp Isearch now performs "lax" space matching.
-Each sequence of spaces in the supplied search string may match any
-sequence of one or more whitespace characters, as specified by the
-variable `search-whitespace-regexp'.  (This variable is also used by a
-similar existing feature for regexp Isearch.)
-
-*** New Isearch command `M-s SPC' toggles lax space matching.
-This applies to both ordinary and regexp Isearch.
-
-*** New option `replace-lax-whitespace'.
-If non-nil, `query-replace' uses flexible whitespace matching too.
-The default is nil.
-
-*** Global `M-s _' starts a symbol (identifier) incremental search,
-and `M-s _' in Isearch toggles symbol search mode.
-`M-s c' in Isearch toggles search case-sensitivity.
-
-** Navigation commands
-
-*** New binding `M-g c' for `goto-char'.
-
-*** New binding `M-g TAB' for `move-to-column'.
-
-*** `M-g TAB' (`move-to-column') prompts for a column number if called
-interactively with no prefix arg.  Previously, it moved to column 1.
-
-** New option `yank-handled-properties' allows processing of text
-properties on yanked text, in ways that are more general than just
-removing them (as is done by `yank-excluded-properties').
-
-** New option `delete-trailing-lines' specifies whether
-M-x delete-trailing-whitespace should delete trailing lines at the end
-of the buffer.  It defaults to t.
-
-** `C-u M-=' now counts lines/words/characters in the entire buffer.
-
-** `C-x 8 RET' is now bound to `insert-char', which is now a command.
-`ucs-insert' is now an obsolete alias for `insert-char'.
-
-** The `z' key no longer has a binding in most special modes.
-It used to be bound to `kill-this-buffer', but `z' is too easy to
-accidentally type.
-
-** New command `C-x r M-w' (`copy-rectangle-as-kill').
-It copies the region-rectangle as the last rectangle kill.
-
-** Registers
-
-*** `C-x r +' is now overloaded to invoke `append-to-register'.
-
-*** New option `register-separator' specifies the register containing
-the text to put between collected texts for use with
-M-x append-to-register and M-x prepend-to-register.
-
-\f
-* Changes in Specialized Modes and Packages in Emacs 24.3
-
-** Common Lisp emulation (CL)
-
-*** CL's main entry is now (require 'cl-lib).
-`cl-lib' is like the old `cl' except that it uses the namespace cleanly;
-i.e., all its definitions have the "cl-" prefix (and internal definitions
-use the "cl--" prefix).
-
-If `cl' provided a feature under the name `foo', then `cl-lib'
-provides it under the name `cl-foo' instead; with the exceptions of the
-few `cl' definitions that had to use `foo*' to avoid conflicts with
-pre-existing Elisp entities.  These have been renamed to `cl-foo'
-rather than `cl-foo*'.
-
-The old `cl' is now deprecated and is mainly just a bunch of aliases that
-provide the old, non-prefixed names.  Some exceptions are listed below:
-
-*** `cl-flet' is not like `flet' (which is deprecated).
-Instead it obeys the behavior of Common-Lisp's `flet'.
-In particular, in cl-flet function definitions are lexically scoped,
-whereas in flet the scoping is dynamic.
-
-*** `cl-labels' is slightly different from `labels'.
-The difference is that it relies on the `lexical-binding' machinery
-(as opposed to the `lexical-let' machinery used previously) to capture
-definitions in closures, so such closures will only work if `lexical-binding'
-is in use.
-
-*** `cl-letf' is not exactly like `letf'.
-The only difference is in details that relate to some deprecated usage
-of `symbol-function' in place forms.
-
-*** `progv' was rewritten to use the `let' machinery.
-A side effect is that variables without corresponding values are bound
-to nil rather than being made unbound.
-
-*** The following methods of extending `setf' are obsolete
-(use features from gv.el instead):
-`define-modify-macro' (use `gv-letplace')
-`defsetf' (use `gv-define-simple-setter' or `gv-define-setter')
-`define-setf-expander' (use `gv-define-setter' or `gv-define-expander')
-`get-setf-method' no longer exists (see "Incompatible Lisp Changes")
-
-** Diff mode
-
-*** Changes are now highlighted using the same color scheme as in
-modern VCSes.  Deletions are displayed in red (new faces
-`diff-refine-removed' and `smerge-refined-removed', and new definition
-of `diff-removed'), insertions in green (new faces `diff-refine-added'
-and `smerge-refined-added', and new definition of `diff-added').
-
-*** The variable `diff-use-changed-face' defines whether to use the
-face `diff-changed', or `diff-removed' and `diff-added' to highlight
-changes in context diffs.
-
-*** The new command `diff-delete-trailing-whitespace' removes trailing
-whitespace introduced by a diff.
-
-** Ediff now uses the same color scheme as Diff mode.
-
-** Python mode
-
-A new version of python.el, which provides several new features, including:
-per-buffer shells, better indentation, Python 3 support, and improved
-shell-interaction compatible with iPython (and virtually any other
-text based shell).
-
-*** Some user options have been replaced/renamed, including (old -> new):
-**** python-indent -> python-indent-offset
-**** python-guess-indent -> python-indent-guess-indent-offset
-**** python-pdbtrack-do-tracking-p -> python-pdbtrack-activate
-**** python-use-skeletons -> python-skeleton-autoinsert
-
-*** Some user options have been removed, including:
-
-**** `python-indent-string-contents': Strings are never indented.
-
-**** `python-honour-comment-indentation':
-Comments are always considered as indentation markers.
-
-**** `python-continuation-offset': Indentation is automatically
-calculated in a pep8 compliant way depending on the context.
-
-**** `python-shell-prompt-alist', `python-shell-continuation-prompt-alist':
-Have no direct mapping as the shell interaction is completely different.
-
-**** `python-python-command', `python-jython-command':
-Replaced by `python-shell-interpreter'.
-
-**** `inferior-python-filter-regexp', `python-remove-cwd-from-path',
-`python-pdbtrack-minor-mode-string', `python-source-modes':
-No longer relevant.
-
-*** Some commands have been replaced (old -> new):
-**** python-insert-class -> python-skeleton-class
-**** python-insert-def -> python-skeleton-def
-**** python-insert-for -> python-skeleton-for
-**** python-insert-if -> python-skeleton-if
-**** python-insert-try/except -> python-skeleton-try
-**** python-insert-try/finally -> python-skeleton-try
-**** python-insert-while -> python-skeleton-while
-**** python-find-function -> python-nav-jump-to-defun
-**** python-next-statement -> python-nav-forward-sentence
-**** python-previous-statement -> python-nav-backward-sentence
-**** python-beginning-of-defun-function -> python-nav-beginning-of-defun
-**** python-end-of-defun-function -> python-nav-end-of-defun
-**** python-send-buffer -> python-shell-send-buffer
-**** python-send-defun -> python-shell-send-defun
-**** python-send-region -> python-shell-send-region
-**** python-send-region-and-go -> emulate with python-shell-send-region
-and python-shell-switch-to-shell
-**** python-send-string -> python-shell-send-string
-**** python-switch-to-python -> python-shell-switch-to-shell
-**** python-describe-symbol -> python-eldoc-at-point
-
-** D-Bus
-
-*** New variables `dbus-compiled-version' and `dbus-runtime-version'.
-
-*** The D-Bus object manager interface is implemented.
-
-*** Variables of type :(u)int32 and :(u)int64 accept floating points,
-if their value does not fit into Emacs's integer range.
-
-*** The function `dbus-call-method' is now non-blocking.
-It can be interrupted by `C-g'.  `dbus-call-method-non-blocking' is obsolete.
-
-*** Signals can also be sent as unicast messages.
-
-*** The argument list of `dbus-register-signal' has been extended,
-according to the new match rule types of D-Bus.
-
-*** `dbus-init-bus' supports private connections.
-
-*** There is a new function `dbus-setenv'.
-
-** `desktop-path' no longer includes the "." directory.
-Desktop files are now located in ~/.emacs.d by default.
-
-** Dired
-
-*** `dired-do-async-shell-command' executes each file sequentially
-if the command ends in `;' (when operating on multiple files).
-Otherwise, it executes the command on each file in parallel.
-
-*** Typing `M-n' in the minibuffer of `dired-do-chmod', `dired-do-chgrp',
-`dired-do-chown', and `dired-do-touch' yanks the attributes of the
-file at point.
-
-*** When the region is active, `m' (`dired-mark'), `u' (`dired-unmark'),
-`DEL' (`dired-unmark-backward'), and `d' (`dired-flag-file-deletion')
-mark/unmark/flag all files in the active region.
-
-*** The minibuffer default for `=' (`dired-diff') has changed.
-It is now the backup file for the file at point, if one exists.
-In Transient Mark mode the default is the file at the active mark.
-
-*** `M-=' is no longer bound to `dired-backup-diff' in Dired buffers.
-The global binding for `M-=', `count-words-region' is in effect.
-
-** ERC
-
-*** New module "notifications", which can send a notification when you
-receive a private message or your nickname is mentioned.
-
-*** ERC will look up server/channel names via auth-source and use any
-channel keys found.
-
-*** New option `erc-lurker-hide-list', similar to `erc-hide-list', but
-only applies to messages sent by lurkers.
-
-** reStructuredText mode
-
-*** Keybindings (see `C-c C-h'), TAB indentation, filling and auto-filling,
-fontification, comment handling, and customization have all been revised
-and improved.
-
-*** Support for `imenu' and `which-function-mode'.
-
-*** The reStructuredText syntax is more closely covered.
-Sphinx support has been improved.
-
-*** `rst-insert-list' inserts new list or continues existing lists.
-
-*** A negative prefix argument always works for `rst-adjust'.
-
-*** The window configuration is reset after displaying a TOC.
-
-*** The constant `rst-version' describes the rst.el package version.
-
-** Ruby mode
-
-*** Support for percent literals and recognition of regular expressions
-in method calls without parentheses with more methods, including Cucumber
-steps definitions.
-
-*** Improved syntax highlighting and indentation.
-
-*** New command `ruby-toggle-block', bound to `C-c {'.
-
-*** Some non-standard keybindings/commands have been removed:
-
-**** `ruby-electric-brace'; use `electric-indent-mode' instead.
-
-**** `ruby-mark-defun'; use `mark-defun'.
-
-**** `ruby-beginning-of-defun' and `ruby-end-of-defun' are replaced by
-appropriate settings for the variables `beginning-of-defun-function'
-and `end-of-defun-function'.
-
-**** Non-standard keybindings for `backward-kill-word', `comment-region',
-`reindent-then-newline-and-indent' and `newline' have been removed.
-
-** Shell Script mode
-
-*** Pairing of parens/quotes uses `electric-pair-mode' instead of skeleton-pair.
-
-*** `sh-electric-here-document-mode' now controls auto-insertion of here-docs.
-
-*** `sh-use-smie' lets you choose a new indentation and navigation code.
-
-** VHDL mode
-
-*** The free software compiler GHDL is supported (and now the default).
-
-*** Support for the VHDL-AMS packages has been added/updated.
-
-*** Updated to the 2002 revision of the VHDL standard.
-
-*** Accepts \r and \f as whitespace.
-
-** Apropos
-
-*** The faces used by Apropos are now directly customizable.
-These faces are named `apropos-symbol', `apropos-keybinding', and so on;
-see the `apropos' Custom group for details.
-
-*** The old options whose values specified faces to use have been removed
-(i.e. `apropos-symbol-face', `apropos-keybinding-face', `apropos-label-face',
-`apropos-match-face' and `apropos-property-face'.).
-
-** Buffer Menu
-
-*** This package has been rewritten to use Tabulated List mode.
-
-*** Option `Buffer-menu-buffer+size-width' is now obsolete.
-Use `Buffer-menu-name-width' and `Buffer-menu-size-width' instead.
-
-** Calc
-
-*** Algebraic simplification mode is now the default.
-To restrict to the limited simplifications given by the former
-default simplification mode, use `m I'.
-
-** Calendar
-
-*** You can customize the header text that appears above each calendar month.
-See the variable `calendar-month-header'.
-
-*** New LaTeX calendar style, produced by `cal-tex-cursor-week2-summary'.
-
-*** The calendars produced by cal-html include holidays.
-Customize `cal-html-holidays' to change this.
-
-** CEDET
-
-*** The major modes from the parser generators "Bovine" and "Wisent"
-are now properly integrated in Emacs.  The file suffixes ".by" and ".wy"
-are in `auto-mode-alist', and the corresponding manuals are included.
-
-*** EDE
-
-**** Menu support for the "Configuration" feature.  This allows users to
-choose the active configuration (such as debug or install) from the menu.
-
-**** New command `ede-set' to interactively set project-local variables.
-
-**** Support for compiling, debugging, and running in "generic" projects.
-
-**** Autoconf editing support for M4 macros with complex arguments.
-
-**** Compilation support for the "linux" project type.
-
-**** "simple" projects have been removed; use "generic" projects instead.
-
-*** Semantic
-
-**** Support for parsing #include statements inside a namespace in C/C++.
-
-**** Improved support for 'extern "C"' declarations in C/C++.
-
-**** The ability to ignore more common special C/C++ preprocessor symbols,
-such as '__nonnull' and '__asm'.  Add '__cplusplus' macro when parsing C++.
-If available, include cdefs.h as an additional source of preprocessor symbols.
-
-**** Improved C/C++ function pointer parsing.
-
-**** In Python, support for converting imports to include file names.
-
-**** Ability to dynamically determine the Python load path.
-
-**** Support for the Python 'WITH' and 'AT' keywords.
-
-**** Improved tooltip completion.
-
-*** SRecode
-
-**** The SRecode manual is now included.
-
-**** Tag generation supports constructor/destructor settings and system
-include differentiation.
-
-**** Addition of 'Framework' support: Frameworks are specified when a
-particular kind of library (such as Android) is needed in a common language
-mode (like Java).
-
-**** Support for nested templates and let variables override based on priority.
-
-**** Support for merging tables from multiple related modes, such as
-default -> c++ -> arduino.
-
-** Compile has a new option `compilation-always-kill'.
-
-** Customize
-
-*** `custom-reset-button-menu' now defaults to t.
-
-*** Non-option variables are never matched in `customize-apropos' and
-`customize-apropos-options' (i.e., the prefix argument does nothing for
-these commands now).
-
-** Term
-
-*** The variables `term-default-fg-color' and `term-default-bg-color'
-are now deprecated in favor of the customizable face `term'.
-
-*** You can customize how to display ANSI terminal colors and styles
-by customizing the corresponding `term-color-<COLOR>',
-`term-color-underline' and `term-color-bold' faces.
-
-** Tramp
-
-*** The syntax has been extended in order to allow ad-hoc proxy definitions.
-
-*** Remote processes are now also supported on remote MS-Windows hosts.
-
-** URL
-
-*** Structs made by `url-generic-parse-url' have nil `attributes' slot.
-Previously, this slot stored semicolon-separated attribute-value pairs
-appended to some imap URLs, but this is not compatible with RFC 3986.
-So now the `filename' slot stores the entire path and query components,
-and the `attributes' slot is always nil.
-
-*** New function `url-encode-url' for encoding a URI string.
-The `url-retrieve' function now uses this to encode its URL argument,
-in case that is not properly encoded.
-
-** notifications.el supports now version 1.2 of the Notifications API.
-The function `notifications-get-capabilities' returns the supported
-server properties.
-
-** Flymake uses fringe bitmaps to indicate errors and warnings.
-See `flymake-fringe-indicator-position', `flymake-error-bitmap' and
-`flymake-warning-bitmap'.
-
-** The FFAP option `ffap-url-unwrap-remote' can now be a list of strings,
-specifying URL types that should be converted to remote file names at
-the FFAP prompt.  The default is now '("ftp").
-
-** New Ibuffer `derived-mode' filter, bound to `/ M'.
-The old binding for `/ M' (filter by used-mode) is now bound to `/ m'.
-
-** New option `mouse-avoidance-banish-position' specifies where the
-`banish' mouse avoidance setting moves the mouse.
-
-** In Perl mode, new option `perl-indent-parens-as-block' causes non-block
-closing brackets to be aligned with the line of the opening bracket.
-
-** In Proced mode, new command `proced-renice' renices marked processes.
-
-** New option `async-shell-command-buffer' specifies the buffer to use
-for a new asynchronous `shell-command' when the default output buffer
-`*Async Shell Command*' is already in use.
-
-** SQL mode has a new option `sql-db2-escape-newlines'.
-If non-nil, newlines sent to the command interpreter will be escaped
-by a backslash.  The default does not escape the newlines and assumes
-that the sql statement will be terminated by a semicolon.
-
-** New command `tabulated-list-sort', bound to `S' in Tabulated List mode
-(and modes that derive from it), sorts the column at point, or the Nth
-column if a numeric prefix argument is given.
-
-** `which-func-modes' now defaults to t, so Which Function mode, when
-enabled, applies to all applicable major modes.
-
-** `winner-mode-hook' now runs when the mode is disabled, as well as when
-it is enabled.
-
-** Follow mode no longer works by using advice.
-The option `follow-intercept-processes' has been removed.
-
-** `javascript-generic-mode' is now an obsolete alias for `js-mode'.
-
-** Hooks renamed to avoid obsolete "-hooks" suffix:
-*** semantic-lex-reset-hooks -> semantic-lex-reset-functions
-*** semantic-change-hooks -> semantic-change-functions
-*** semantic-edits-new-change-hooks -> semantic-edits-new-change-functions
-*** semantic-edits-delete-change-hooks -> semantic-edits-delete-change-functions
-*** semantic-edits-reparse-change-hooks -> semantic-edits-reparse-change-functions
-*** semanticdb-save-database-hooks -> semanticdb-save-database-functions
-*** c-prepare-bug-report-hooks -> c-prepare-bug-report-hook
-*** rcirc-sentinel-hooks -> rcirc-sentinel-functions
-*** rcirc-receive-message-hooks -> rcirc-receive-message-functions
-*** rcirc-activity-hooks -> rcirc-activity-functions
-*** rcirc-print-hooks -> rcirc-print-functions
-*** dbus-event-error-hooks -> dbus-event-error-functions
-*** eieio-pre-method-execution-hooks -> eieio-pre-method-execution-functions
-*** checkdoc-style-hooks -> checkdoc-style-functions
-*** checkdoc-comment-style-hooks -> checkdoc-comment-style-functions
-*** archive-extract-hooks -> archive-extract-hook
-*** filesets-cache-fill-content-hooks -> filesets-cache-fill-content-hook
-*** hfy-post-html-hooks -> hfy-post-html-hook
-*** nndiary-request-create-group-hooks -> nndiary-request-create-group-functions
-*** nndiary-request-update-info-hooks -> nndiary-request-update-info-functions
-*** nndiary-request-accept-article-hooks -> nndiary-request-accept-article-functions
-*** gnus-subscribe-newsgroup-hooks -> gnus-subscribe-newsgroup-functions
-
-** Obsolete packages
-
-*** assoc.el
-In most cases, assoc+member+push+delq work just as well.
-And in any case it's just a terrible package: ugly semantics, terrible
-inefficiency, and not namespace-clean.
-*** bruce.el
-*** cust-print.el
-*** ledit.el
-*** mailpost.el
-*** mouse-sel.el
-*** patcomp.el
-
-\f
-* Incompatible Lisp Changes in Emacs 24.3
-
-** Docstrings starting with `*' no longer indicate user options.
-Only variables defined using `defcustom' are considered user options.
-The function `user-variable-p' is now an obsolete alias for
-`custom-variable-p'.
-
-** The return values of `defalias', `defun' and `defmacro' have changed,
-and are now undefined.  For backwards compatibility, `defun' and
-`defmacro' currently return the name of the newly defined
-function/macro, but this should not be relied upon.
-
-** `random' by default now returns a different random sequence in
-every Emacs run.  Use `(random S)', where S is a string, to set the
-random seed to a value based on S, in order to get a repeatable
-sequence in later calls.
-
-** If the NEWTEXT arg to `replace-match' contains a substring "\?",
-that substring is inserted literally even if the LITERAL arg is
-non-nil, instead of causing an error to be signaled.
-
-** `select-window' now always makes the window's buffer current.
-It does so even if the window was selected before.
-
-** The function `x-select-font' can return a font spec, instead of a
-font name as a string.  Whether it returns a font spec or a font name
-depends on the graphical library.
-
-** `face-spec-set' no longer sets frame-specific attributes when the
-third argument is a frame (that usage was obsolete since Emacs 22.2).
-
-** `set-buffer-multibyte' now signals an error in narrowed buffers.
-
-** The CL package's `get-setf-method' function no longer exists.
-Generalized variables are now part of core Emacs Lisp, and implemented
-differently to the way cl.el used to do it.  It is not possible to
-define a compatible replacement for `get-setf-method'.  See the file
-gv.el for internal details of the new implementation.
-
-** The arguments of `dbus-register-signal' are no longer just strings,
-but keywords or keyword-string pairs.  The old argument list will
-still be supported for Emacs 24.x.
-
-** Miscellaneous name changes
-Some Lisp symbols have been renamed to correct their spelling,
-or to be more consistent with standard Emacs terminology.
-
-*** Renamed functions
-**** hangul-input-method-inactivate -> hangul-input-method-deactivate
-**** inactivate-input-method -> deactivate-input-method
-**** quail-inactivate -> quail-deactivate
-**** robin-inactivate -> robin-deactivate
-**** viper-inactivate-input-method -> viper-deactivate-input-method
-**** viper-inactivate-input-method-action ->
-     viper-deactivate-input-method-action
-**** ucs-input-inactivate -> ucs-input-deactivate
-
-*** Renamed hooks
-The old hooks are still supported for backward compatibility, but they
-are deprecated and will be removed eventually.
-**** input-method-inactivate-hook -> input-method-deactivate-hook
-**** robin-inactivate-hook -> robin-deactivate-hook
-**** quail-inactivate-hook -> quail-deactivate-hook
-
-*** Renamed variables
-**** follow-deactive-menu -> follow-inactive-menu
-**** inactivate-current-input-method-function ->
-     deactivate-current-input-method-function
-
-** Some obsolete functions, variables, and faces have been removed:
-*** `last-input-char', `last-command-char', `unread-command-char'
-*** `facemenu-unlisted-faces'
-*** `rmail-decode-mime-charset'
-*** `iswitchb-read-buffer'
-*** `sc-version', `sc-submit-bug-report'
-*** `set-char-table-default'
-*** `string-to-sequence' (use `string-to-list' or `string-to-vector')
-*** `compile-internal'
-*** `modeline'
-*** `mode-line-inverse-video'
-*** `follow-mode-off-hook'
-*** `cvs-commit-buffer-require-final-newline'
-(use `log-edit-require-final-newline' instead)
-*** `cvs-changelog-full-paragraphs'
-(use `log-edit-changelog-full-paragraphs' instead)
-*** `cvs-diff-ignore-marks', `cvs-diff-buffer-name'
-*** `vc-ignore-vc-files' (use `vc-handled-backends' instead)
-*** `vc-master-templates' (use `vc-handled-backends' instead)
-*** `vc-checkout-carefully'
-
-\f
-* Lisp Changes in Emacs 24.3
-
-** CL-style generalized variables are now in core Elisp.
-`setf' is autoloaded; `push' and `pop' accept generalized variables.
-You can define your own generalized variables using `gv-define-simple-setter',
-`gv-define-setter', etc.
-
-** Emacs tries to macroexpand interpreted (non-compiled) files during load.
-This can significantly speed up execution of non-byte-compiled code,
-but can also bump into previously unnoticed cyclic dependencies.
-These are generally harmless: they will simply cause the macro calls
-to be left for later expansion (as before), but will result in a
-warning ("Eager macro-expansion skipped due to cycle") describing the cycle.
-You may wish to restructure your code so this does not happen.
-
-** New sampling-based Elisp profiler.
-Try M-x profiler-start, do some work, and then call M-x profiler-report.
-When finished, use M-x profiler-stop.  The sampling rate can be based on
-CPU time or memory allocations.
-
-** `defun' also accepts a (declare DECLS) form, like `defmacro'.
-The interpretation of the DECLS is determined by `defun-declarations-alist'.
-
-** New macros `setq-local' and `defvar-local'.
-
-** Face underlining can now use a wave.
-
-** `read-regexp' has a new argument HISTORY; the first argument PROMPT
-of `read-regexp' accepts a string ending with a colon and space, and its
-second argument DEFAULTS can be a list of strings accessible via `M-n'
-in the minibuffer ahead of other hard-coded useful regexp-related values.
-More commands use `read-regexp' now to read their regexp arguments.
-
-** Completion
-
-*** New function `completion-table-with-quoting' to handle completion
-in the presence of quoting, such as file completion in shell buffers.
-
-*** New function `completion-table-subvert' to use an existing completion
-table, but with a different prefix.
-
-** Debugger
-
-*** New error type and new function `user-error'.
-These do not trigger the debugger.
-
-*** New option `debugger-bury-or-kill', saying what to do with the
-debugger buffer when exiting debug.
-
-*** Set `debug-on-message' to enter the debugger when a certain
-message is displayed in the echo area.  This can be useful when trying
-to work out which code is doing something.
-
-*** New var `inhibit-debugger', automatically set to prevent accidental
-recursive invocations.
-
-** Window handling
-
-*** New command `fit-frame-to-buffer' adjusts the frame height to
-fit the contents.
-
-*** The command `fit-window-to-buffer' can adjust the frame height
-if the new option `fit-frame-to-buffer' is non-nil.
-
-*** New macro `with-temp-buffer-window', similar to
-`with-output-to-temp-buffer'.
-
-*** `temp-buffer-resize-mode' no longer resizes windows that have been
-reused.
-
-*** New option `switch-to-buffer-preserve-window-point' to restore a
-window's point when switching buffers.
-
-*** New display action alist entries `window-height' and `window-width'
-specify the size of new windows created by `display-buffer'.
-
-*** New display action alist entry `pop-up-frame-parameters', if
-non-nil, specifies frame parameters to give any newly-created frame.
-
-*** New display action alist entry `inhibit-switch-frame', if non-nil,
-tells display action functions to avoid changing which frame is
-selected.
-
-*** New display action alist entry `previous-window', if non-nil,
-specifies window to reuse in `display-buffer-in-previous-window'.
-
-*** New display action functions `display-buffer-below-selected',
-and `display-buffer-in-previous-window'.
-
-*** The functions `get-lru-window', `get-mru-window' and `get-largest-window'
-now accept a third argument to avoid choosing the selected window.
-
-*** Additional values recognized for option `window-combination-limit'.
-
-*** The following variables are obsolete, as they can be replaced by
-appropriate entries in the `display-buffer-alist' function introduced
-in Emacs 24.1:
-**** `dired-shrink-to-fit'
-**** `display-buffer-reuse-frames'
-**** `display-buffer-function'
-**** `special-display-buffer-names'
-**** `special-display-frame-alist'
-**** `special-display-function'
-**** `special-display-regexps'
-
-** Time
-
-*** `current-time-string' no longer requires that its argument's year
-must be in the range 1000..9999.  It now works with any year supported
-by the underlying C implementation.
-
-*** `current-time' now returns extended-format time stamps
-(HIGH LOW USEC PSEC), where the new PSEC slot specifies picoseconds.
-PSEC is typically a multiple of 1000 on current machines.  Other
-functions that use this format, such as `file-attributes' and
-`format-time-string', have been changed accordingly.  Old-format time
-stamps are still accepted.
-
-*** The format of timers in `timer-list' and `timer-idle-list' is now
-[TRIGGERED-P HI-SECS LO-SECS USECS REPEAT-DELAY FUNCTION ARGS IDLE-DELAY PSECS].
-The PSECS slot is new, and uses picosecond resolution.  It can be
-accessed via the new `timer--psecs' accessor.
-
-*** Last-modified time stamps in undo lists now are of the form
-(t HI-SECS LO-SECS USECS PSECS) instead of (t HI-SECS . LO-SECS).
-
-** EIEIO
-
-*** Improved security when handling persistent objects:
-
-**** `eieio-persistent-read' now features optional arguments for specifying
-the class to load, as well as a flag stating whether subclasses are allowed;
-if provided, other classes will be rejected by the reader.  For
-compatibility with existing code, if the class is omitted only a
-warning is issued.
-
-**** New specialized reader for pulling in classes and signaling errors
-without evaluation of suspicious code.
-
-**** All slots that contain objects must have a :type.  Slots with lists
-of objects must use a new type predicate for a list of an object type.
-
-*** Support for `find-function' and similar utilities, through the addition
-of filename support to generated symbols.
-
-** Floating point functions now always return special values like NaN,
-instead of signaling errors, if given invalid args; e.g., (log -1.0).
-Previously, they returned NaNs on some platforms but signaled errors
-on others.  The affected functions are acos, asin, tan, exp, expt,
-log, log10, sqrt, and mod.
-
-** New fringe bitmap `exclamation-mark'.
-
-** Miscellaneous changes to special forms and macros
-
-*** `defun' and `defmacro' are now macros rather than special forms.
-
-*** `kbd' is now a function rather than a macro.
-
-** Miscellaneous new functions
-
-*** `set-temporary-overlay-map' sets up a temporary keymap that
-takes precedence over most other maps for a short while (normally one key).
-
-*** `autoloadp' tests if its argument is an autoloaded object.
-
-*** `autoload-do-load' performs the autoloading operation.
-
-*** `buffer-narrowed-p' tests if the buffer is narrowed.
-
-*** `file-name-base' returns a file name sans directory and extension.
-
-*** `function-get' fetches a function property, following aliases.
-
-*** `posnp' tests if an object is a `posn'.
-
-*** `system-users' returns the user names on the system.
-
-*** `system-groups' returns the group names on the system.
-
-*** `tty-top-frame' returns the topmost frame of a text terminal.
-
-** The following functions and variables are obsolete:
-*** `automount-dir-prefix' (use `directory-abbrev-alist')
-*** `buffer-has-markers-at'
-*** `macro-declaration-function' (use `macro-declarations-alist')
-*** `window-system-version' (provides no useful information)
-*** `dired-pop-to-buffer' (use `dired-mark-pop-up')
-*** `query-replace-interactive'
-*** `font-list-limit' (has had no effect since Emacs < 23)
-
-\f
-* Changes in Emacs 24.3 on Non-Free Operating Systems
-
-** Cygwin builds can use the native MS Windows user interface.
-Pass `--with-w32' to configure.  The default remains the X11 interface.
-
-** Two new functions are available in Cygwin builds:
-`cygwin-convert-file-name-from-windows' and
-`cygwin-convert-file-name-to-windows'.  These functions allow Lisp
-code to access the Cygwin file-name mapping machinery to convert
-between Cygwin and Windows-native file and directory names.
-
-** When invoked with the -nw switch to run on the Windows text-mode terminal,
-Emacs now supports `mouse-highlight', help-echo (in the echo area), and
-`mouse-autoselect-window'.
-
-** On MS Windows Vista and later Emacs now supports symbolic links.
-
-** On MS Windows, you can pass `--without-libxml2' to configure.bat to omit
-support for libxml2, even if its presence is detected.
-
-** On Mac OS X, the Nextstep port requires OS X 10.4 or later.
-
-** On Mac OS X, configure no longer automatically adds the Fink "/sw"
-directories to the search path.  You must add them yourself if you want them.
-
-\f
-* Changes in Emacs 24.2
-
-** This is mainly a bug-fix release.
-
-\f
-* Installation Changes in Emacs 24.1
-
-** Emacs can be compiled with Gtk+ 3.0 if you pass --with-x-toolkit=gtk3
-to configure.  Note that other libraries used by Emacs, RSVG and GConf,
-also depend on Gtk+.  You can disable them with --without-rsvg and
---without-gconf.
-
-** Emacs can be compiled with GnuTLS support.
-This happens by default if a suitably recent version of the library is
-found at build time.  To prevent this, use the configure option
-`--without-gnutls'.  See below for GnuTLS features.
-
-** Emacs can be compiled with SELinux support.
-This happens by default if a suitably recent version of the library is
-found at build time.  To prevent this, use the configure option
-`--without-selinux'.  See below for SELinux features.
-
-** Emacs can be compiled with ImageMagick support.
-This happens by default if a suitably recent version of the library is
-found at build time.  To prevent this, use the configure option
-`--without-imagemagick'.  See below for ImageMagick features.
-This feature is not available for the Nextstep or MS ports.
-
-** Emacs can be compiled with libxml2 support.
-This happens by default if a suitably recent version of the library is
-found at build time.  To prevent this, use the configure option
-`--without-xml2'.  See below for libxml2 features.
-
-** By default, the installed Info and man pages are compressed.
-You can disable this by configuring --without-compress-info.
-
-** New configure option --with-wide-int.
-With it, Emacs integers typically have 62 bits, even on 32-bit machines.
-On 32-bit hosts, this raises the limit on buffer sizes from about 512 MiB
-to about 2 GiB.
-
-** New configure options: --with-mmdf, --with-mail-unlink, --with-mailhost.
-These provide no new functionality, they just remove the need to edit
-lib-src/Makefile by hand in order to use the associated features.
-
-** New configure option --enable-use-lisp-union-type.
-This is only useful for Emacs developers to debug certain types of bugs.
-This is not a new feature; only the configure flag is new.
-
-** The standalone programs digest-doc and sorted-doc are removed.
-Emacs now uses Lisp commands `doc-file-to-man' and `doc-file-to-info'.
-
-** The standalone program `fakemail' is removed.
-If you need it, feedmail.el provides a superset of the functionality.
-
-\f
-* Startup Changes in Emacs 24.1
-
-** The --unibyte, --multibyte, --no-multibyte, and --no-unibyte
-command line arguments, and the EMACS_UNIBYTE environment variable, no
-longer have any effect.  (They were declared obsolete in Emacs 23.)
-
-** New command line option `--no-site-lisp' removes site-lisp directories
-from load-path.  -Q now implies this.  This option does not affect the
-EMACSLOADPATH environment variable (and hence has no effect for
-Nextstep builds).
-
-\f
-* Changes in Emacs 24.1
-
-** Completion
-
-*** Many packages now use the `completion-at-point' command,
-rather than implementing separate completion commands.
-
-*** `completion-at-point' now handles tags and semantic completion.
-
-*** Completion in a non-minibuffer now tries to detect the end of completion
-and pops down the *Completions* buffer accordingly.
-
-*** New option `completion-cycle-threshold' allows completion cycling.
-
-*** New option `completion-category-overrides' for overriding the
-default completion style in certain circumstances.
-
-*** New completion style `substring'.
-
-*** Completion of buffer names uses `substring' completion by default.
-
-*** The option `widget-complete-field' has been removed.
-
-** Mail changes
-
-*** The first time you try sending mail, Emacs asks for a mail method.
-This is implemented by a new default for `send-mail-function', which
-is `sendmail-query-once'.  This offers to use the smtpmail package, or
-to use the old defaults relying on external mail facilities
-(`sendmail-send-it' on GNU/Linux and other Unix-like systems, and
-`mailclient-send-it' on Windows).
-
-*** Typing `C-c m' in the buffer made by `M-x report-emacs-bug'
-transfers the report to your desktop's preferred mail client, if there
-is one.  This uses either the "xdg-email" utility, or Mac OS's "open"
-command.
-
-*** See Changes in Specialized Modes and Packages for SMTPmail changes
-and Mail mode changes
-
-** Emacs server and client changes
-
-*** New option `server-port' specifies the port for TCP Emacs servers.
-
-*** New emacsclient argument -q/--quiet suppresses some status messages.
-
-*** New emacsclient argument --frame-parameters specifies the frame
-parameters of any newly-created graphical frame.
-
-*** If emacsclient shuts down due to Emacs signaling an error,
-its exit status is 1.
-
-*** New emacsclient argument --parent-id ID.
-This opens a client frame in parent X window ID, via XEmbed, similar
-to the --parent-id argument to Emacs.
-
-** Internationalization changes
-
-*** Emacs now supports display and editing of bidirectional text.
-Right-to-left (RTL) scripts, such as Arabic, Farsi, and Hebrew, are
-displayed in the correct visual order as expected by users of those
-scripts.  The display reordering is a "full bidirectionality" class
-implementation of the Unicode Bidirectional Algorithm (UBA).  Buffers
-with no RTL text should look exactly the same as before.
-
-**** New buffer-local variable `bidi-display-reordering'.
-To disable display reordering in a buffer, change this to nil.
-
-**** New buffer-local variable `bidi-paragraph-direction'.
-If nil (the default), Emacs determines the base direction of each
-paragraph from its text, as specified by the UBA.  Setting the value
-to `right-to-left' or `left-to-right' forces a base direction on each
-paragraph.
-
-Paragraphs with right-to-left base direction are displayed starting at
-the right window edge.
-
-*** Enhanced support for characters with no glyphs in available fonts,
-or, on text terminals, characters that cannot be encoded by the
-terminal coding system.  The new option `glyphless-char-display-control'
-specifies how to display them: as a hexadecimal code in a box, a thin
-1-pixel space, an empty box, etc.
-
-*** New input methods for Farsi and Bulgarian
-(farsi-isiri-9147, farsi-transliterate-banan, bulgarian-alt-phonetic).
-
-*** `nobreak-char-display' now also highlights Unicode hyphen chars
-(U+2010 and U+2011).
-
-*** New Hebrew translation of the Emacs Tutorial.
-Type `C-u C-h t' to choose it in case your language setup doesn't
-automatically select it.
-
-** An Emacs Lisp package manager is now included.
-This is a convenient way to download and install additional packages,
-from a package repository at http://elpa.gnu.org.
-
-*** M-x list-packages shows a list of packages, which can be
-selected for installation.
-
-*** New command `describe-package', bound to `C-h P'.
-
-*** By default, all installed packages are loaded automatically when
-Emacs starts up.  To disable this, set `package-enable-at-startup' to
-nil.  To specify the packages to load, customize `package-load-list'.
-
-** Custom theme changes
-
-*** New command `M-x customize-themes', which provides a convenient
-interface for enabling and disabling Custom themes.
-
-*** New option `custom-theme-load-path' is the load path for themes.
-Emacs no longer looks for Custom themes in `load-path'.  The default
-value of `custom-theme-load-path' says to look for themes in
-`custom-theme-directory', followed by a subdirectory of
-`data-directory' named "themes/", which contains a small selection of
-built-in Custom themes.
-
-*** New option `custom-safe-themes' records known-safe theme files.
-If a theme is not in this list, Emacs queries before loading it, and
-offers to save the theme to `custom-safe-themes' automatically.  By
-default, all themes included in Emacs are treated as safe.
-
-** Improved GTK integration
-
-*** GTK scroll-bars are now placed on the right by default.
-The function `set-scroll-bar-mode' can change this.
-
-*** GTK tool bars can have just text, just images or images and text.
-Customize `tool-bar-style' to choose the style.  On a Gnome desktop,
-the default is taken from desktop settings.
-
-*** GTK tool bars can be placed on any edge of the frame.
-The frame-parameter tool-bar-position controls this.  It takes the
-values top, left, right or bottom.  The Options => Show/Hide menu has
-entries for this.
-
-*** The default colors for selected text (the `region' face) are taken
-from the GTK theme when Emacs is built with GTK.
-
-*** Emacs uses GTK tooltips by default if built with GTK.
-You can disable this by changing `x-gtk-use-system-tooltips' to nil.
-
-** Graphical interface changes
-
-*** On graphical displays, the mode-line no longer ends in dashes.
-Also, the first dash (which does not indicate anything) is just
-displayed as a space.
-
-*** `menu-bar-select-buffer-function' lets you choose another operation
-instead of `switch-to-buffer' when selecting an item in the Buffers menu.
-
-*** Lucid menus and dialogs can display antialiased fonts if Emacs is
-built with Xft.  These fonts can be set via X resources, for example:
-Emacs.pane.menubar.font: Courier-12
-
-** Exiting changes
-
-*** Emacs now calls `kill-emacs' if it receives SIGTERM or SIGHUP,
-or if it receives a SIGINT signal in batch mode.
-
-*** `kill-emacs-hook' is now also run in batch mode.
-Third-party code which adds to `kill-emacs-hook' should check if they
-do the right thing in batch mode.
-
-** Scrolling changes
-
-*** New scrolling commands `scroll-up-command' and `scroll-down-command'
-(bound to C-v/[next] and M-v/[prior]) do not signal errors at top/bottom
-of buffer at first key-press (instead they move to top/bottom of buffer)
-when `scroll-error-top-bottom' is non-nil.
-
-*** New option `scroll-error-top-bottom' (see above).
-
-*** New scrolling commands `scroll-up-line' and `scroll-down-line'
-scroll a line instead of full screen.
-
-*** New property `scroll-command' should be set on a command's symbol to
-define it as a scroll command affected by `scroll-preserve-screen-position'.
-
-*** If you customize `scroll-conservatively' to a value greater than 100,
-Emacs will never recenter point in the window when it scrolls due to
-cursor motion commands or commands that move point (e.f., `M-g M-g').
-Previously, you needed to use `most-positive-fixnum' as the value of
-`scroll-conservatively' to achieve the same effect.
-
-*** "Aggressive" scrolling now honors the scroll margins.
-If you customize `scroll-up-aggressively' or
-`scroll-down-aggressively' and move point off the window, Emacs now
-scrolls the window so as to avoid positioning point inside the scroll
-margin.
-
-** Basic SELinux support has been added.
-This requires Emacs to be linked with libselinux at build time.
-
-*** Emacs preserves the SELinux file context when backing up.
-Also, the function `copy-file' has an extra optional argument for
-preserving SELinux context, and the return value of `backup-buffer'
-now includes the SELinux context.
-
-*** New functions `file-selinux-context' and `set-file-selinux-context'
-get and set the SELinux context of a file.
-
-** Trash changes
-
-*** `delete-by-moving-to-trash' now only affects commands that specify
-trashing.  This avoids inadvertently trashing temporary files.
-
-*** Calling `delete-file' or `delete-directory' with a prefix argument
-now forces true deletion, regardless of `delete-by-moving-to-trash'.
-
-** File- and directory-local variable changes
-
-*** You can stop directory local vars from applying to subdirectories.
-Add an element (subdirs . nil) to the alist portion of any variables
-settings to indicate that the section should not apply to
-subdirectories.
-
-*** Directory local variables can apply to some file-less buffers.
-Affected modes include dired, vc-dir, and log-edit.  For example,
-adding "(diff-mode . ((mode . whitespace)))" to .dir-locals.el will
-turn on `whitespace-mode' for *vc-diff* buffers.  Modes should call
-`hack-dir-local-variables-non-file-buffer' to support this.
-
-*** Using "mode: MINOR-MODE" to enable a minor mode is deprecated.
-Instead, use "eval: (minor-mode 1)".
-
-*** The variable `inhibit-first-line-modes-regexps' has been renamed
-to `inhibit-local-variables-regexps'.  As the name suggests, it now
-applies to ALL file local variables, not just -*- lines.  The
-associated `inhibit-first-line-modes-suffixes' has been renamed in the
-corresponding way.
-
-** Window changes
-
-*** The `quit-window' command now restores the last buffer displayed
-in the quitted window.
-
-*** Resizing an Emacs frame now preserves proportional window sizes,
-modulo restrictions like window minimum sizes and fixed-size windows.
-
-*** The behavior of `display-buffer' is now customizable in detail.
-
-**** New option `display-buffer-base-action' specifies a list of
-user-determined display "actions" (functions and optional arguments
-for choosing the displaying window).
-
-This takes precedence over the default display action, which is
-specified by `display-buffer-fallback-action'.
-
-**** New option `display-buffer-alist' maps buffer name regexps to
-display actions, taking precedence over `display-buffer-base-action'.
-
-*** New option `window-combination-limit'.
-The new option `window-combination-limit' allows to return the space
-obtained for resizing or creating a window more reliably to the window
-from which such space was obtained.
-
-*** New option `window-combination-resize'.
-The new option `window-combination-resize' allows to split a window that
-otherwise cannot be split because it's too small by stealing space from
-other windows in the same combination.  Subsequent resizing or deletion
-of the window will resize all windows in the same combination as well.
-
-*** New option `frame-auto-hide-function' lets you choose between
-iconifying or deleting a frame when burying a buffer in a dedicated
-frame, or quitting a window showing a buffer in a frame of its own.
-
-*** New commands `maximize-window' and `minimize-window'.
-These maximize and minimize the size of a window within its frame.
-
-*** New commands `switch-to-prev-buffer' and `switch-to-next-buffer'.
-These functions allow to navigate through the live buffers that have
-been shown in a specific window.
-
-** Minibuffer changes
-
-*** The inactive minibuffer has its own major mode `minibuffer-inactive-mode'.
-This is handy for minibuffer-only frames, and is also used for the feature
-where mouse-1 pops up *Messages*"', which can now easily be changed.
-
-*** Minibuffers set `truncate-lines' to nil.
-If you want to change the value to something else, you could use
-for example `minibuffer-setup-hook'.
-
-** `auto-mode-case-fold' is now enabled by default.
-
-** `backup-by-copying-when-mismatch' now defaults to t.
-
-** New basic faces `error', `warning', `success'.
-These are used to highlight text indicating failure, caution or
-successful operation.
-
-** New option `list-colors-sort' defines the color sort order
-for `list-colors-display'.
-
-** The variable `focus-follows-mouse' now always defaults to nil.
-
-\f
-* Editing Changes in Emacs 24.1
-
-** Search changes
-
-*** C-y in Isearch is now bound to `isearch-yank-kill', instead of
-`isearch-yank-line'.
-
-*** M-y in Isearch is now bound to `isearch-yank-pop', instead of
-`isearch-yank-kill'.
-
-*** M-s C-e in Isearch is now bound to `isearch-yank-line'.
-
-** New commands `count-words-region' and `count-words'.
-
-*** M-= is bound to `count-words-region', not `count-lines-region'.
-The `count-words-region' command, when called interactively, reports
-the number of lines, words, and characters in the region.  It is a
-superset of the old `count-lines-region', which is now an obsolete
-alias for it.
-
-** The command `just-one-space' (M-SPC), if given a negative argument,
-also deletes newlines around point.
-
-** Deletion changes
-
-*** New option `delete-active-region'.
-If non-nil, [delete] and DEL delete the region if it is active and no
-prefix argument is given.  If set to `kill', those commands kill
-instead.
-
-*** New command `delete-forward-char', bound to [delete].
-This is meant for interactive use, and obeys `delete-active-region'.
-The command `delete-char' does not obey `delete-active-region'.
-
-*** `delete-backward-char' is now a Lisp function.
-Apart from obeying `delete-active-region', its behavior is unchanged.
-However, the byte compiler now warns if it is called from Lisp; Lisp
-callers should use delete-char with a negative argument instead.
-
-*** The option `mouse-region-delete-keys' has been deleted.
-
-** Selection changes.
-
-The default handling of clipboard and primary selections has been
-changed to conform with modern X applications.  In short, most
-commands for killing and yanking text now use the clipboard, while
-mouse commands use the primary selection.
-
-In the following, we provide a list of these changes, followed by a
-list of steps to get the old behavior back if you prefer that.
-
-*** `select-active-regions' now defaults to t.
-Merely selecting text (e.g. with drag-mouse-1) no longer puts it in
-the kill ring.  The selected text is put in the primary selection, if
-the system possesses a separate primary selection facility (e.g. X).
-
-**** `select-active-regions' also accepts a new value, `only'.
-This means to only set the primary selection for temporarily active
-regions (usually made by mouse-dragging or shift-selection);
-"ordinary" active regions, such as those made with C-SPC followed by
-point motion, do not alter the primary selection.
-
-**** `mouse-drag-copy-region' now defaults to nil.
-
-*** mouse-2 is now bound to `mouse-yank-primary'.
-This pastes from the primary selection, ignoring the kill-ring.
-Previously, mouse-2 was bound to `mouse-yank-at-click'.
-
-*** `x-select-enable-clipboard' now defaults to t on all platforms.
-
-*** `x-select-enable-primary' now defaults to nil.
-Thus, commands that kill text or copy it to the kill-ring (such as
-M-w, C-w, and C-k) also use the clipboard---not the primary selection.
-
-**** The "Copy", "Cut", and "Paste" items in the "Edit" menu are now
-exactly equivalent to M-w, C-w, and C-y respectively.
-
-**** Note that on MS-Windows, `x-select-enable-clipboard' was already
-non-nil by default, as Windows does not support the primary selection
-between applications.
-
-*** To return to the previous behavior, do the following:
-
-**** Change `select-active-regions' to nil.
-**** Change `mouse-drag-copy-region' to t.
-**** Change `x-select-enable-primary' to t (on X only).
-**** Change `x-select-enable-clipboard' to nil.
-**** Bind `mouse-yank-at-click' to mouse-2.
-
-*** Support for X cut buffers has been removed.
-
-*** X clipboard managers are now supported.
-To inhibit this, change `x-select-enable-clipboard-manager' to nil.
-
-** New command `C-x r N' (`rectangle-number-lines') numbers the lines
-in the current rectangle.  With a prefix argument, this prompts for a
-number to count from and for a format string.
-
-** `redisplay-dont-pause' now defaults to t.
-This makes Emacs feel more responsive to editing commands that arrive
-at high rate, e.g. if you lean on some key, because stopping redisplay
-in the middle (when this variable is nil) forces more expensive
-updates later on, and Emacs appears to be unable to keep up.
-
-** The behavior of <TAB> for active regions in Text mode has changed.
-In Text and related modes, typing <TAB> (`indent-for-tab-command')
-when the region is active causes Emacs to indent all the lines in the
-region, aligning them with the line previous to the first line in the
-region (or with the left margin if there is no previous line).
-
-** When `occur' is called with a prefix argument, matching strings are
-collected into the `*Occur*' buffer without line numbers.  If there
-are parenthesized subexpressions in the specified regexp, `occur'
-reads replacement text that may contain \\& and \\N whose convention
-follows `replace-match'.
-
-\f
-* Changes in Specialized Modes and Packages in Emacs 24.1
-
-** Archive Mode has basic support for browsing and updating 7z archives.
-
-** BibTeX mode
-
-*** BibTeX mode now supports biblatex.
-Use the variable `bibtex-dialect' to select different BibTeX dialects.
-`bibtex-entry-field-alist' is now an obsolete alias for
-`bibtex-BibTeX-entry-alist'.
-
-*** New command `bibtex-search-entries', bound to C-c C-a.
-
-*** New `bibtex-entry-format' option `sort-fields', disabled by default.
-
-*** New variable `bibtex-search-entry-globally'.
-
-** Browse-url
-
-*** New option `browse-url-mailto-function' specifies how to handle "mailto:"s.
-
-*** The default browser used by the package is now the "xdg-open" program,
-on platforms that support it.  This calls your desktop's preferred browser.
-
-** Calc
-
-*** Support for musical notes.
-
-*** Support for logarithmic units.
-
-*** No longer uses the tex prefix for TeX specific unit names when
-using TeX or LaTeX mode.
-
-*** New option to highlight selections using faces.
-
-*** `calc-histogram' has the option of using a vector to determine the bins.
-
-*** New "O" option prefix.
-
-*** Use the "O" prefix to "d r" (`calc-radix') to turn on twos-complement mode.
-
-** Calendar, Diary, and Appt
-
-*** Diary entries can contain non-printing "comments".
-See the variable `diary-comment-start'.
-
-*** Appointments can specify their individual warning times.
-See the variable `appt-warning-time-regexp'.
-
-*** The function specified by `appt-disp-window-function' may be passed
-lists of arguments if multiple appointments are due at similar times.
-If you are using a custom function for this, you should update it.
-
-*** New function `diary-hebrew-birthday'.
-
-*** Elements of `calendar-day-abbrev-array' and `calendar-month-abbrev-array'
-may no longer be nil, but must all be strings.
-
-*** The obsolete (since Emacs 22.1) method of enabling the appt
-package by adding `appt-make-list' to `diary-hook' has been removed.
-Use `appt-activate' instead.
-
-*** Some appt variables (obsolete since Emacs 22.1) have been removed:
-appt-issue-message (use the function appt-activate)
-appt-visible/appt-msg-window (use the variable appt-display-format)
-
-*** Some diary function aliases (obsolete since Emacs 22.1) have been removed:
-view-diary-entries, list-diary-entries, show-all-diary-entries
-
-** CC Mode
-
-*** New feature to "guess" the style in an existing buffer.
-The main entry point is M-x c-guess.
-
-*** Java Mode now supports Java 5.0 (Tiger) and 6 (Mustang).
-
-*** `c-beginning-of-defun' and `c-end-of-defun' now respect nested scopes.
-Thus C-M-a will, by default, go to the beginning of the immediate function,
-not the top level.
-
-*** "Macros with semicolons" can be registered for correct indentation.
-Where such a macro ends a line (no semicolon) the next statement is no longer
-parsed as a statement continuation.
-
-** Comint and modes derived from it use the standard completion code.
-
-** Compilation mode
-
-*** Compilation mode can be used without Font Lock mode.
-`compilation-parse-errors-function' is now obsolete.
-
-*** New variable `compilation-filter-start', which is bound while
-`compilation-filter-hook' runs.  It records the start position of the
-text inserted by `compilation-filter'.
-
-*** `compilation-error-screen-columns' and `compilation-first-column'
-are obeyed in the editing buffer.  So programming language modes can
-set them, whereas previously only the value in the *Compilation*
-buffer was used.
-
-** Customize
-
-*** Customize buffers now contain a search field.
-The search is performed using `customize-apropos'.
-To turn off the search field, set `custom-search-field' to nil.
-
-*** Options in customize group buffers start out hidden if not customized.
-Use the arrow to the left of the option name to toggle visibility.
-
-*** custom-buffer-sort-alphabetically now defaults to t.
-
-*** The color widget now has a "Choose" button, which allows you to
-choose a color via `list-colors-display'.
-
-** D-Bus
-
-*** It is now possible to access buses other than the default system
-or session bus.
-
-*** The `dbus-register-method' and `dbus-register-property' functions
-optionally do not register names.
-
-*** The new function `dbus-register-service' registers a known service
-name on a D-Bus without also registering a property or a method.
-
-** Dired-x
-
-*** C-x C-j (`dired-jump') and C-x 4 C-j (`dired-jump-other-window'),
-if called with a prefix argument, read a file name from the minibuffer
-instead of using the current buffer.
-
-*** The "dired local variables" feature of Dired-x is obsolete.
-The standard directory local variables feature replaces it.
-
-** ERC changes
-
-*** New options `erc-autojoin-timing' and `erc-autojoin-delay',
-controlling attempts to autojoin a channel.
-
-*** New variable `erc-coding-system-precedence': If we use `undecided'
-as the server coding system, this variable will then be consulted.
-The default is to decode strings that can be decoded as utf-8 as
-utf-8, and do the normal `undecided' decoding for the rest.
-
-** Eshell changes
-
-*** The default value of `eshell-directory-name' has changed
-to be an "eshell" directory in `user-emacs-directory'.
-The old "~/.eshell/" directory is still used if it exists, though.
-
-** gdb-mi
-
-*** The M-x gdb command now uses the GDB Machine Interface protocol.
-It now supports multithread non-stop debugging and simultaneous
-debugging of several threads.
-
-** Image mode
-
-*** RET (`image-toggle-animation') toggles animation, if applicable.
-Animation plays once, unless the option `image-animate-loop' is non-nil.
-
-** Info
-
-*** New command M-x info-display-manual displays a named Info manual.
-If that manual is already visited in some Info buffer, it displays
-that buffer.  (This is handy if you have many manuals in many *info*
-buffers, and don't remember the name of the buffer visiting the manual
-you want to consult.)  Otherwise, it loads and displays the manual.
-
-*** `e' is now bound to `end-of-buffer' rather than to `Info-edit'.
-This is for compatibility with the stand-alone Info reader program,
-and also because `Info-edit' is a rarely used command that is disabled
-by default.
-
-** Mail mode changes (not Message mode)
-
-*** New command M-x mail-add-attachment for adding MIME attachments
-
-*** The command M-x mail-attach-file was renamed to M-x mail-insert-file.
-(Its name is misleading, since it has nothing to do with MIME
-attachments.)  The old name is now an obsolete alias to the new name.
-
-** MH-E has been updated to MH-E version 8.3.1.
-See MH-E-NEWS for details.
-
-** Modula-2 mode provides auto-indentation.
-
-** mpc.el: Can use pseudo tags of the form tag1|tag2 as a union of two tags.
-
-** nXML mode no longer binds C-RET to `nxml-complete'.
-Completion is now performed via `completion-at-point', bound to C-M-i
-or M-TAB.  If `nxml-bind-meta-tab-to-complete-flag' is non-nil (the
-default), this performs tag completion.
-
-** Org mode has been updated to version 7.8.09.
-See ORG-NEWS for details.
-
-** Prolog mode has been completely revamped, with lots of additional
-functionality such as more intelligent indentation, electricity,
-support for more variants, including Mercury, and a lot more.
-
-** Rmail
-
-*** The command `rmail-epa-decrypt' decrypts OpenPGP data
-in the Rmail incoming message.
-
-*** The variable `rmail-message-filter' no longer has any effect.
-This change was made in Emacs 23.1 but was not advertised at the time.
-Try using `rmail-show-message-hook' instead.
-
-** Shell mode
-
-*** M-x shell prompts for the shell path name if the default directory
-is a remote file name and neither the environment variable $ESHELL nor
-the variable `explicit-shell-file-name' is set.
-
-*** TAB is now bound to the standard `completion-at-point' command,
-which now implements the pcomplete rules for shell command completion.
-
-** SMTPmail
-
-*** SMTPmail now uses encrypted connections (via STARTTLS) by default
-if the mail server supports them.  This uses either built-in GnuTLS
-support, or the starttls.el library.  Customize `smtpmail-stream-type'
-to change this.
-
-*** The variable `smtpmail-auth-credentials' has been removed.
-By default, the information is now stored in the file ~/.authinfo.
-This was the default value of smtpmail-auth-credentials.  If you had
-customized smtpmail-auth-credentials to a list of user names and
-passwords, those settings are not used.  During your first connection
-to the smtp server, Emacs will prompt for the user name and password,
-and offer to save them to ~/.authinfo.  Or you can manually copy the
-credentials to ~/.authinfo.  For example, if you had
-
-  (setq smtpmail-auth-credentials
-        '(("mail.example.org" 25 "jim" "s!cret")))
-
-then the equivalent line in ~/.authinfo would be
-
-  machine mail.example.org port 25 login jim password s!cret
-
-See the auth-source manual for more information, e.g. on encrypting
-the credentials file.
-
-*** The variable `smtpmail-starttls-credentials' has been removed.
-If you had that set, you need to put
-
-  machine smtp.whatever.foo port 25 key "~/.my_smtp_tls.key" cert "~/.my_smtp_tls.cert"
-
-in your ~/.authinfo file instead.
-
-*** SMTPmail defaults to using the address in the From: header as the
-SMTP MAIL FROM envelope.  To override this, set `mail-envelope-from'
-to the address you wish to use instead.
-
-** SQL mode
-
-*** New options `sql-port', `sql-connection-alist', `sql-send-terminator',
-and `sql-oracle-scan-on'.
-
-*** New options controlling prompting for login parameters.
-Each supported product has a custom variable `sql-*-login-params',
-which is a list of the parameters to be prompted for before a
-connection is established.
-
-*** The command `sql-product-interactive' now takes a prefix argument,
-which causes it to prompt for an SQL product.
-
-*** Product-specific SQL interactive commands now take prefix arguments.
-These commands (`sql-sqlite', `sql-postgres', `sql-mysql', etc.),
-given a prefix argument, prompt for a name for the SQL interactive
-buffer.  This reduces the need for calling `sql-rename-buffer'.
-
-*** SQL interactive modes suppress command continuation prompts, and
-replace tabs with spaces.  The first change impacts multiple line SQL
-statements entered with C-j between each line, statements yanked into
-the buffer and statements sent with `sql-send-*' functions.  The
-second prevents the MySQL and Postgres interpreters from listing
-object name completions when sent text via `sql-send-*' functions.
-
-*** New command `sql-connect' starts a predefined SQLi session,
-using the login parameters from `sql-connection-alist'.
-
-*** New "Save Connection" menu item in SQLi buffers.
-This gathers the login params specified for the SQLi session, if it
-was not started by a connection, and saves them as a new connection.
-
-*** New commands for listing database objects and details:
-sql-list-all and sql-list-table.
-
-*** An API for manipulating SQL product definitions has been added.
-
-** TeX modes
-
-*** latex-electric-env-pair-mode keeps \begin..\end matched on the fly.
-
-** Tramp
-
-*** New inline access method "ksu" (kerberized su).
-
-*** The following access methods are discontinued: "ssh1_old",
-"ssh2_old", "scp1_old", "scp2_old", "imap", "imaps" and "fish".
-
-*** The user option `remote-file-name-inhibit-cache' controls whether
-remote file attributes are cached for better performance.
-
-*** The option `ange-ftp-binary-file-name-regexp' has changed its
-default value to "".
-
-*** Handlers for `file-selinux-context' and `set-file-selinux-context'
-for remote machines which support SELinux.
-
-** New function `url-queue-retrieve', which behaves like url-retrieve,
-but with limits (`url-queue-parallel-processes', `url-queue-timeout') on
-the degree of parallelism.
-
-** VC and related modes
-
-*** Support for pulling on distributed version control systems.
-The command C-x v + (`vc-pull') runs a "pull" operation, if it is
-supported (currently with Bzr, Git, and Mercurial), to update the
-current branch and working tree.  A prefix argument means to prompt
-the user for specifics, e.g. a pull location.
-
-*** `vc-update' is now an alias for `vc-pull'.
-
-*** Support for merging on distributed version control systems.
-The command C-x v m (`vc-merge') now runs a "merge" operation, if it
-is supported (currently with Bzr, Git, and Mercurial), to merge
-changes from another branch into the current one.  It prompts for
-specifics, e.g. a merge source.
-
-*** New option `vc-revert-show-diff' controls whether `vc-revert'
-shows a diff while querying the user.  It defaults to t.
-
-*** Log entries in some Log View buffers can be toggled to display a
-longer description by typing RET (log-view-toggle-entry-display).
-This is currently supported for Bzr, Git, and Mercurial (to support
-another backend, define a `log-view-expanded-log-entry-function').
-In the Log View buffers made by C-x v L (`vc-print-root-log'), you can
-use this to display the full log entry for the revision at point.
-
-*** New command `vc-ediff' allows visual comparison of two revisions
-of a file similar to `vc-diff', but using ediff backend.
-
-*** The option `vc-initial-comment' was removed in Emacs 23.2, but
-this was not advertised at the time.
-
-*** `vc-toggle-read-only' is an obsolete alias for `toggle-read-only'.
-Since Emacs 23, it has done the same thing as `toggle-read-only', but
-this was not advertised at the time.
-
-** Obsolete modes
-
-*** abbrevlist.el
-
-*** erc-hecomplete.el (use erc-pcomplete.el instead)
-
-*** partial-completion-mode (complete.el) is obsolete.
-You can get a comparable behavior with:
-(setq completion-styles '(partial-completion initials))
-(setq completion-pcm-complete-word-inserts-delimiters t)
-
-*** pc-mode.el is obsolete (CUA mode is much more comprehensive).
-
-*** pgg is obsolete (use EasyPG instead).
-
-*** sregex.el is obsolete, since rx.el is a strict superset.
-
-*** s-region.el and pc-select.el are obsolete.
-They are superseded by shift-select-mode, enabled by default since 23.1.
-
-*** vc-mcvs.el is obsolete (for lack of a maintainer).
-
-** Miscellaneous
-
-*** The Landmark game is now invoked with `landmark', not `lm'.
-Its functions and variables have been similarly renamed.
-
-*** In `ido-file-completion-map', C-v is no longer bound to `ido-toggle-vc'.
-(This interfered with cua-mode.)
-
-*** f90.el has some support for Fortran 2008 syntax.
-
-*** `copyright-fix-years' can optionally convert consecutive years to ranges.
-
-*** New command `nato-region' converts text to NATO phonetic alphabet.
-
-\f
-* New Modes and Packages in Emacs 24.1
-
-** Occur Edit mode applies edits made in *Occur* buffers to the
-original buffers.  It is bound to "e" in Occur mode.
-
-** New global minor mode electric-pair-mode.
-When enabled, typing an open parenthesis automatically inserts the
-matching closing one.
-
-** New global minor mode electric-indent-mode.
-When enabled, typing certain characters triggers reindentation.
-Major modes wishing to use this can set electric-indent-chars or
-electric-indent-functions.
-
-** New global minor mode electric-layout-mode.
-When enabled, typing certain characters automatically inserts newlines.
-Major modes wishing to use this can set electric-layout-rules.
-
-** tabulated-list.el provides a generic major mode for tabulated data,
-from which other modes can be derived.
-
-** pcase.el provides the ML-style pattern matching macro `pcase'.
-
-** secrets.el is an implementation of the Secret Service API, an
-interface to password managers like GNOME Keyring or KDE Wallet.  The
-Secret Service API requires D-Bus for communication.  The command
-`secrets-show-secrets' offers a buffer with a visualization of the
-secrets.
-
-** notifications.el provides an implementation of the Desktop
-Notifications API.  It requires D-Bus for communication.
-
-** soap-client.el supports access to SOAP web services from Emacs.
-soap-inspect.el is an interactive inspector for SOAP WSDL structures.
-
-** New generic mode, xmodmap-generic-mode, for xmodmap files.
-
-** New emacs-lock.el package.
-The previous version has been moved to obsolete/old-emacs-lock.el.
-Now, there is a proper minor mode `emacs-lock-mode'.  Protection
-against exiting Emacs and killing the buffer can be set separately.
-The mechanism for automatically turning off protection for buffers
-with dead inferior processes has been generalized.
-
-\f
-* Incompatible Lisp Changes in Emacs 24.1
-
-** Passing a nil argument to a minor mode function call now ENABLES
-the minor mode unconditionally.  This is so that you can write e.g.
-
- (add-hook 'text-mode-hook 'foo-mode)
-
-to enable foo-mode in Text mode buffers, removing the need for
-`turn-on-foo-mode' style functions.  This affects all mode commands
-defined by `define-minor-mode'.  If called interactively, the mode
-command still toggles the minor mode.
-
-** The return value of `backup-buffer' has changed.
-It is now a list of three elements, where the second element is a list
-describing the original file's SELinux context.  If Emacs or the
-system lacks SELinux support, the context list is (nil nil nil nil).
-See "Basic SELinux support" above, under "Changes in Emacs 24.1".
-
-** `char-direction-table' and the `char-direction' function were deleted.
-They were buggy and inferior to the new support of bidirectional
-editing introduced in Emacs 24.  If you need the bidirectional
-properties of a character, use `get-char-code-property' with the last
-argument `bidi-class'.
-
-** `copy-directory' now copies the source directory as a subdirectory
-of the target directory, if the latter is an existing directory.  The
-new optional arg COPY-CONTENTS, if non-nil, makes the function copy
-the contents directly into a pre-existing target directory.
-
-** For mouse click input events in the text area, the Y pixel
-coordinate in the POSITION list now counts from the top of the text
-area, excluding any header line.  Previously, it counted from the top
-of the header line.
-
-** Support for "old-style" backquotes, obsolete for 10+ years, has
-been further reduced.  Now a backquote not followed by a space is
-always treated as a "new-style" backquote.  Please remove all
-"old-style" backquotes from your code.  If your code uses backquotes
-as documented in the Elisp manual, and compiles without warning, then
-you have nothing to do in this regard.  Code not following the
-appropriate conventions may fail to compile.
-
-The most common cause of trouble seems to be an old-style backquote
-followed by a newline.  Another cause of trouble is vector notation
-for key sequence notation: instead of [(control ,)] and [(control ')],
-you should write [(control ?,)] and [(control ?')], which will work in
-older Emacsen too.
-
-** The macro `eval-at-startup' was removed in Emacs 23.2, but this
-was not advertised at the time.  The function `custom-initialize-delay'
-replaced all known uses.
-
-** `view-buffer' now treats special mode-class in the same way that
-`view-file' has since Emacs 22 (i.e. it won't enable View mode if the
-major mode is special).
-
-** Menu and tool bar changes
-
-*** During startup, Emacs no longer adds entries for `menu-bar-lines'
-and `tool-bar-lines' to `default-frame-alist' and `initial-frame-alist'.
-With these alist entries omitted, `make-frame' checks the value of the
-variable `menu-bar-mode'/`tool-bar-mode' to determine whether to create
-a menu-bar or tool-bar, respectively.  If the alist entries are added,
-they override the value of `menu-bar-mode'/`tool-bar-mode'.
-
-*** The menu bar bindings's caches are not used any more.
-Use (where-is-internal <def> nil t) instead.
-
-** Regions created by mouse dragging are now normal active regions,
-similar to those created by shift-selection (see Selection changes
-above).  In previous Emacs versions, these regions were delineated by
-`mouse-drag-overlay'; that variable has been removed.
-
-** The fourth argument of `filter-buffer-substring' has been removed.
-If you want to remove text properties from the final result, simply
-pass the result through substring-no-properties.
-
-** cl.el no longer provides `cl-19'.
-
-** The following obsolete functions and aliases have been removed
-(the appropriate new function is given in parentheses; "not needed"
-means you can just remove all calls to the function in question):
-
-*** `comint-kill-output' (`comint-delete-output')
-*** `decompose-composite-char' (`char-to-string')
-*** `outline-visible' (`outline-invisible-p')
-*** `internal-find-face' (`facep')
-*** `internal-get-face' (`facep and check-face')
-*** `frame-update-faces' (not needed)
-*** `frame-update-face-colors' (`frame-set-background-mode')
-*** `x-frob-font-weight' and `x-frob-font-slant' (`make-face-*' functions)
-*** `x-make-font-bold' and `x-make-font-demibold' (`make-face-bold')
-*** `x-make-font-italic' and `x-make-font-oblique' (`make-face-italic')
-*** `x-make-font-bold-italic' (`make-face-bold-italic')
-*** `x-make-font-unbold' (`make-face-unbold')
-*** `x-make-font-unitalic' (`make-face-unitalic')
-*** `mldrag-drag-mode-line' (`mouse-drag-mode-line')
-*** `mldrag-drag-vertical-line' (`mouse-drag-vertical-line')
-*** `iswitchb-default-keybindings' (`iswitchb-mode')
-*** `char-bytes' (== 1)
-*** `isearch-return-char' (`isearch-printing-char')
-*** `make-local-hook' (not needed)
-*** `set-screen-height' (`set-frame-height')
-*** `set-screen-width' (`set-frame-width')
-
-** The following obsolete variables and varaliases have been removed
-(the appropriate new variable is given in parentheses):
-
-*** `checkdoc-minor-keymap' (`checkdoc-minor-mode-map')
-*** `vc-header-alist' (`vc-BACKEND-header')
-*** `directory-sep-char' (== ?/)
-*** `font-lock-defaults-alist' (`font-lock-defaults')
-*** `e' (`float-e').
-
-** The following obsolete files were removed:
-sc.el, x-menu.el, rnews.el, rnewspost.el
-
-** The format of the finder-inf.el file has changed, since the Finder
-mechanism is now based on the package system.  The variable
-`finder-package-info' is replaced by `package--builtins' and
-`finder-keywords-hash'.
-
-** When generating autoloads, `update-directory-autoloads' no longer
-assumes every inspected file is in your `load-path'.  It instead
-generates relative names according to the current `load-path'.
-
-\f
-* Lisp Changes in Emacs 24.1
-
-** Code can now use lexical scoping by default instead of dynamic scoping.
-The `lexical-binding' variable enables lexical scoping for local
-variables.  It is typically set via a file-local variable in the first
-line of the file, in which case it applies to all the code in that
-file.
-
-*** `eval' takes a new optional argument `lexical' to choose the new lexical
-binding instead of the old dynamic binding mode.
-
-*** Lexically scoped interpreted functions are represented with a new form
-of function value which looks like (closure ENV ARGS &rest BODY).
-
-*** New macro `letrec' to define recursive local functions.
-
-*** `defvar' and `defconst' now mark the variable as special (dynamic).
-So do `defcustom' and other forms that call `defvar' as a subroutine.
-
-*** New function `special-variable-p' to check whether a variable is
-declared as dynamically bound.
-
-*** The form ((lambda ...) ...) is deprecated.
-
-** An Emacs Lisp testing tool is now included.
-Emacs Lisp developers can use this tool to write automated tests for
-their code.  See the ERT info manual for details.
-
-** Changes for bidirectional display and editing
-
-*** New function `current-bidi-paragraph-direction'.
-This returns the base direction of the paragraph at point.
-
-*** New function `bidi-string-mark-left-to-right'.
-Given a string containing characters from right-to-left scripts, this
-function returns another string which can be safely inserted into a
-buffer, such that any following text will be always displayed to the
-right of that string.  (This works by appending an invisible Unicode
-"LEFT-TO-RIGHT MARK" character if the argument string might need it.)
-
-This is useful when the buffer has overall left-to-right paragraph
-direction and you need to insert a string whose contents are not known
-in advance, without disrupting the layout of the line.
-
-** Window changes
-
-*** Window tree functions are accessible in Elisp.
-Functions are provided to return the parent, siblings or child windows
-of any window including internal windows (windows not associated with a
-buffer) in the window tree.
-
-**** New function `window-valid-p' gives non-nil for live and internal
-windows.
-
-**** Window manipulation can deal with internal windows.
-Many window handling functions like `split-window', `delete-window', or
-`delete-other-windows' as well as the window resizing functions can now
-act on any window including internal ones.
-
-*** window-total-height/-width vs window-body-height/-width.
-The function `window-height' has been renamed to `window-total-height'
-and `window-width' has been renamed to `window-body-width'.  The old
-names are provided as aliases.  Two new functions `window-total-width'
-and `window-body-height' are provided.
-
-*** Window parameters specific to window handling functions.
-For each window you can specify a parameter to override the default
-behavior of a number of functions like `split-window', `delete-window'
-and `delete-other-windows'.  The variable `ignore-window-parameters'
-allows to ignore processing such parameters.
-
-*** New semantics of third argument of `split-window'.
-The third argument of `split-window' has been renamed to SIDE and can be
-set to any of the values 'below, 'right, 'above, or 'left to make the
-new window appear on the corresponding side of the window that shall be
-split.  Any other value of SIDE will cause `split-window' to split the
-window into two side-by-side windows as before.
-
-*** Window resizing functions.
-A new standard function for resizing windows called `window-resize' has
-been introduced.  This and all other functions for resizing windows no
-longer delete any windows when they become too small.
-
-*** Deleting the selected window now selects the most recently selected
-live window on that frame instead.
-
-*** `adjust-window-trailing-edge' adjustments.
-`adjust-window-trailing-edge' can now deal with fixed-size windows and
-is able to resize other windows if a window adjacent to the trailing
-edge cannot be shrunk any more.  This makes its behavior more similar to
-that of Emacs 21 without compromising, however, its inability to delete
-windows which was introduced in Emacs 22.
-
-*** Window-local buffer lists.
-Windows now have local buffer lists.  This means that removing a buffer
-from display in a window will preferably show the buffer previously
-shown in that window with its previous window-start and window-point
-positions.  This also means that the same buffer may be automatically
-shown twice even if it already appears in another window.
-
-*** `switch-to-buffer' has a new optional argument FORCE-SAME-WINDOW,
-which if non-nil requires the buffer to be displayed in the currently
-selected window, signaling an error otherwise.  If nil, another window
-can be used, e.g. if the selected one is strongly dedicated.
-
-*** `split-window-vertically' and `split-window-horizontally' renamed
-to `split-window-below' and `split-window-right' respectively.
-The old names are kept as aliases.
-
-*** Display actions
-
-**** The second arg to `display-buffer' and `pop-to-buffer' is now
-named ACTION, and takes a display action of the same form as
-`display-buffer-base-action' (see Changes, above).  A non-nil,
-non-list value is treated specially, as the old meaning.
-
-**** New variable `display-buffer-overriding-action'.
-
-**** The procedure of `display-buffer' etc. to choose a window is
-determined by combining `display-buffer-overriding-action',
-`display-buffer-alist', the ACTION arg, `display-buffer-base-action',
-and `display-buffer-fallback-action'.  The second and fourth of these
-are user-customizable variables.
-
-See the docstring of `display-buffer' for details.
-
-*** New functions `window-state-get' and `window-state-put'.
-These functions allow to save and restore the state of an arbitrary
-frame or window as an Elisp object.
-
-** Completion
-
-*** New variable `completion-extra-properties' used to specify extra
-properties of the current completion:
-- :annotate-function, same as the old completion-annotate-function.
-- :exit-function, function to call after completion took place.
-
-*** Functions on `completion-at-point-functions' can return any of the
-properties valid for `completion-extra-properties'.
-
-*** `completion-annotate-function' is obsolete.
-
-*** New `metadata' method for completion tables.  The metadata thus returned
-can specify various details of the data returned by `all-completions':
-- `category' is the kind of objects returned (e.g., `buffer', `file', ...),
-  used to select a style in completion-category-overrides.
-- `annotation-function' to add annotations in *Completions*.
-- `display-sort-function' to specify how to sort entries in *Completions*.
-- `cycle-sort-function' to specify how to sort entries when cycling.
-
-*** `minibuffer-local-filename-must-match-map' is not used any more.
-Instead, the bindings in `minibuffer-local-filename-completion-map'
-are combined with `minibuffer-local-must-match-map'.
-
-*** New variable `completing-read-function' allows overriding the
-behavior of `completing-read'.
-
-** `glyphless-char-display' can now distinguish between graphical and
-text terminal display, via a char-table entry that is a cons cell.
-
-** `pre-command-hook'/`post-command-hook' are not reset to nil on error.
-Instead, the offending function is removed.
-
-** New hook types
-
-*** New function `run-hook-wrapped' for running an abnormal hook by
-passing the hook functions as arguments to a "wrapping" function.
-Like `run-hook-with-args-until-success', it stops at the first
-non-nil return value.
-
-*** New macro `with-wrapper-hook' for running an abnormal hook as a
-set of "wrapping" filters, similar to around advice.
-(A version of this macro was actually added in Emacs 23.2 but was not
-advertised at the time.)
-
-** Debugger changes
-
-*** New macro `condition-case-unless-debug' (this was actually added in
-Emacs 23.1 as condition-case-no-debug, but not advertised)
-
-*** The macro `with-demoted-errors' was added in Emacs 23.1, but not advertised.
-
-*** Variable `stack-trace-on-error' removed.
-
-*** The debugger can now "continue" from an error, which means it will
-jump to the error handler as if the debugger had not been invoked
-instead of jumping all the way to the top-level.
-
-*** Set `debug-on-event' to enter the debugger on events like SIGUSR1.
-This can be useful when `inhibit-quit' is set.
-
-** The new function `server-eval-at' allows evaluation of Lisp forms on
-named Emacs server instances.
-
-** `call-process' and `call-process-region' allow a `(:file "file")' spec
-to redirect STDOUT to a file.
-
-** The function `format-time-string' now supports the %N directive,
-for higher-resolution time stamps.
-
-** New input reading functions
-
-*** New function `read-char-choice' reads a restricted set of
-characters, discarding any inputs not inside the set.
-
-*** The command `read-color' now requires a match for a color name
-or RGB triplet, instead of signaling an error if the user provides
-invalid input.
-
-**** `facemenu-read-color' is now an alias for `read-color'.
-
-** `image-library-alist' is renamed to `dynamic-library-alist'.
-The variable is now used to load all kind of supported dynamic libraries,
-not just image libraries.  The previous name is still available as an
-obsolete alias.
-
-** Syntax parsing changes
-
-*** New variable `syntax-propertize-function'.
-This replaces `font-lock-syntactic-keywords' which is now obsolete.
-This allows syntax-table properties to be set independently from font-lock:
-just call syntax-propertize to make sure the text is propertized.
-Together with this new variable come a new hook
-syntax-propertize-extend-region-functions, as well as two helper functions:
-syntax-propertize-via-font-lock to reuse old font-lock-syntactic-keywords
-as-is; and syntax-propertize-rules which provides a new way to specify
-syntactic rules.
-
-*** Syntax tables support a new "comment style c" additionally to style b.
-
-** New hook `post-self-insert-hook', run after `self-insert-command'.
-
-** frame-local variables cannot be let-bound any more.
-
-** Major and minor mode changes
-
-*** `set-auto-mode' now respects mode: local variables at the end of files,
-as well as those in the -*- line.
-
-*** `prog-mode' is a new major mode from which programming modes
-should be derived.
-
-**** `prog-mode-hook' can be used to enable features for programming
-modes, e.g. (add-hook 'prog-mode-hook 'flyspell-prog-mode) to enable
-on-the-fly spell checking for comments and strings.
-
-*** New hook `change-major-mode-after-body-hook', run by
-`run-mode-hooks' just before any other mode hooks.
-
-*** Enabled globalized minor modes can be disabled in specific major modes.
-If the global mode is global-FOO-mode, then run (FOO-mode -1) in the
-major mode's hook, where FOO-mode toggles the mode on a per-buffer basis.
-
-*** `define-minor-mode' accepts new keywords :variable, :after-hook.
-
-** File-handling changes
-
-*** `delete-file' and `delete-directory' now accept optional arg TRASH.
-Trashing is performed if TRASH and `delete-by-moving-to-trash' are
-both non-nil.  Interactively, TRASH defaults to t, unless a prefix
-argument is supplied (see Trash changes, above).
-
-*** New file predicates: `file-equal-p', `file-in-directory-p'.
-
-** Tool-bars can display separators.
-Tool-bar separators are handled like menu separators in menu-bar maps,
-i.e. via menu entries of the form `(menu-item "--")'.
-
-** Image API
-
-*** Animated images support (currently animated gifs only).
-
-**** `image-animated-p' returns non-nil if an image can be animated.
-
-**** `image-animate' animates a supplied image spec.
-
-**** `image-animate-timer' returns the timer object for an image that
-is being animated.
-
-*** `image-extension-data' has been renamed to `image-metadata'.
-The old name is an obsolete alias to the new one.
-
-*** Image mode can view any image type that ImageMagick supports.
-This requires Emacs to be built with ImageMagick support.
-
-**** New function `imagemagick-types', defined if ImageMagick support
-is enabled, returns a list of image file extensions that your
-ImageMagick installation supports.
-
-**** New function `imagemagick-register-types' enables ImageMagick
-image types in Image mode and in `create-image' and other helper
-functions.
-
-**** New option `imagemagick-types-inhibit' excludes certain
-ImageMagick image types from `imagemagick-register-types'.
-
-**** With ImageMagick support, there are extra Image mode commands to
-resize and rotate images: `image-transform-fit-to-height',
-`image-transform-fit-to-width', `image-transform-set-rotation', and
-`image-transform-set-scale'.
-
-** `compose-mail' now accepts an optional 8th arg, RETURN-ACTION, and
-passes it to the mail user agent function.  This argument specifies an
-action for returning to the caller after finishing with the mail.  For
-example, this is used by Rmail to optionally delete a mail window.
-
-** XML and HTML parsing
-If Emacs is compiled with libxml2 support, there are two new
-functions: `libxml-parse-html-region' (which parses "real world" HTML)
-and `libxml-parse-xml-region' (which parses XML).  Both return an
-Emacs Lisp parse tree.
-
-** Networking and encryption changes
-
-*** `open-network-stream' can now be used to open an encrypted stream.
-It now accepts an optional `:type' parameter for initiating a TLS
-connection, directly or via STARTTLS.  To do STARTTLS, additional
-parameters (`:end-of-command', `:success', `:capabilities-command')
-must also be supplied.
-
-*** New library gnutls.el.
-The new function `gnutls-available-p' returns non-nil if Emacs is
-built with GnuTLS support.  The main entry points are
-`open-gnutls-stream' and `gnutls-negotiate'.  It's easiest to use
-these functions through `open-network-stream', because that can
-upgrade connections through STARTTLS opportunistically or use plain
-SSL, depending on your needs.  For debugging, set `gnutls-log-level'
-greater than 0.
-
-*** New primitive `secure-hash' that supports many secure hash algorithms:
-md5, sha1, sha2, sha224, sha256, sha384, and sha512.  The lisp library
-sha1.el has been removed.  The `sha1' feature is provided by default.
-
-** Isearch
-
-*** New hook `isearch-update-post-hook' that runs in `isearch-update'.
-
-** Progress reporters can now "spin".
-The MIN-VALUE and MAX-VALUE arguments of `make-progress-reporter' can
-now be nil, or omitted.  This makes a "non-numeric" reporter.  Each
-time you call `progress-reporter-update' on that progress reporter,
-with a nil or omitted VALUE argument, the reporter message is
-displayed with a "spinning bar".
-
-** New variable `revert-buffer-in-progress-p' is true while a buffer is
-being reverted, even if the buffer has a local `revert-buffer-function'.
-
-** New variables `delayed-warnings-list' and `delayed-warnings-hook'.
-If delayed-warnings-list is non-nil, the command loop calls
-`delayed-warnings-hook' after `post-command-hook'.  At present, this
-is only used by Emacs on some platforms to display warnings during
-startup, which might otherwise not be noticed.  This uses the
-functions `display-delayed-warnings' and `collapse-delayed-warnings'.
-
-** rx.el has a new `group-n' construct for explicitly numbered groups.
-
-** New function `make-composed-keymap' that constructs a new keymap
-from multiple input maps.  You can use this to make a keymap that
-inherits from multiple maps, eg:
- (set-keymap-parent newmap (make-composed-keymap othermap parent))
-
-** New function `string-prefix-p'.
-(This was actually added in Emacs 23.2 but was not advertised at the time.)
-
-** New reader macro ## that stands for the empty symbol.
-This means that the empty symbol can now be read back.  Also, #: by itself
-(when not immediately followed by a possible symbol character) stands for
-an empty uninterned symbol.
-
-** New math functions `isnan', `copysign', `frexp', `ldexp'.
-
-** The following functions and variables are obsolete:
-
-*** `tooltip-use-echo-area' is obsolete.
-Rather than setting this to t, disable Tooltip mode instead.
-
-*** buffer-substring-filters is obsolete.
-Use `filter-buffer-substring-functions' instead.
-
-*** `byte-compile-disable-print-circle' is obsolete.
-
-*** `deferred-action-list' and `deferred-action-function' are obsolete.
-Use `post-command-hook' instead.
-
-*** `font-lock-maximum-size' is obsolete.
-
-\f
-* Changes in Emacs 24.1 on Non-Free Operating Systems
-
-** On MS Windows, Emacs warns when using the obsolete init file _emacs,
-and also when HOME is set to C:\ by default.
-
-** New configure.bat options
-
-*** --enable-checking builds Emacs with extra runtime checks.
-
-*** --distfiles specifies files to be included in binary distribution.
-
-*** --without-gnutls disables automatic GnuTLS detection.
-
-*** --lib for general library linkage, works with the USER_LIBS build variable.
-
-** New make target `dist' to create binary distribution for MS Windows.
-
-** The Lisp function `w32-default-color-map' is now obsolete.
-(It is only used internally in the Emacs C code.)
+* Changes in Emacs 25.1 on Non-Free Operating Systems
 
-** Customize ns-auto-hide-menu-bar to have the menu-bar hidden, but
-reappear on mouse-over.  (Requires OS X 10.6 or later.)
+---
+** Building Emacs for MS-Windows requires at least Windows XP
+or Windows Server 2003.  The built binaries still run on all versions
+of Windows starting with Windows 9X.
 
-** On Mac OS X, dragging a file into Emacs visits the file, like on
-other platforms, rather than inserting its contents into the buffer.
+** Building Emacs on OSX with Coca (--with-ns) now requires 10.6 or newer.
+PowerPC on OSX is not supported.
 
 \f
 ----------------------------------------------------------------------
index 3b73e863ceb7af223ee6c573d05b14bc6910d523..184f8540c76602f9906c0ffe864cd9bd819510ef 100644 (file)
@@ -477,7 +477,7 @@ buffers that use a particular major mode, use the mode hook, as in
 this example:
 
     (add-hook 'emacs-lisp-mode-hook
-             '(lambda () (imenu-add-to-menubar "Index")))
+             (lambda () (imenu-add-to-menubar "Index")))
 
 ** Changes in BibTeX mode.
 
@@ -614,7 +614,7 @@ be different.
 It is generally recommended to use `system-configuration' rather
 than `system-type'.
 
-See the file LINUX-GNU in this directory for more about this.
+See <http://www.gnu.org/gnu/linux-and-gnu.html> for more about this.
 
 ** The functions shell-command and dired-call-process
 now run file name handlers for default-directory, if it has them.
diff --git a/etc/NEWS.24 b/etc/NEWS.24
new file mode 100644 (file)
index 0000000..eba9b94
--- /dev/null
@@ -0,0 +1,3822 @@
+GNU Emacs NEWS -- history of user-visible changes.
+
+Copyright (C) 2010-2014 Free Software Foundation, Inc.
+See the end of the file for license conditions.
+
+Please send Emacs bug reports to bug-gnu-emacs@gnu.org.
+If possible, use M-x report-emacs-bug.
+
+This file is about changes in Emacs version 24.
+
+See files NEWS.23, NEWS.22, NEWS.21, NEWS.20, NEWS.19, NEWS.18,
+and NEWS.1-17 for changes in older Emacs versions.
+
+You can narrow news to a specific version by calling `view-emacs-news'
+with a prefix argument or by typing C-u C-h C-n.
+
+\f
+* Installation Changes in Emacs 24.4
+
+** Emacs can now be compiled with ACL (access control list) support.
+This happens by default if a suitable support library is found at
+build time, like libacl on GNU/Linux.  To prevent this, use the
+configure option `--disable-acl'.  See below for the features this provides.
+
+** Emacs can now be compiled with file notification support.
+This happens by default if a suitable system library is found at
+build time.  To prevent this, use the configure option
+`--without-file-notification'.  See below for file-notify features.
+This feature is not available for the Nextstep port.
+
+** Emacs can now be compiled with zlib support.
+This happens by default if zlib is present, which it normally is.
+To prevent this, use the configure option `--without-zlib'.
+This provides the function `zlib-decompress-region'; see below for details.
+
+** The configure option `--without-compress-info' has been generalized,
+and renamed to `--without-compress-install'.  It now prevents compression
+of _any_ files during installation.
+
+** The configure option `--with-crt-dir' has been removed.
+It is no longer needed, as the crt*.o files are no longer linked specially.
+
+** Directories passed to configure option `--enable-locallisppath' are
+no longer created during installation.
+
+** Emacs for Nextstep (Mac OS X, GNUstep) can be built with ImageMagick support.
+This requires pkg-config to be available at build time.
+
+\f
+* Startup Changes in Emacs 24.4
+
+** When initializing `load-path', an empty element in the EMACSLOADPATH
+environment variable (either leading, e.g., ":/foo"; trailing, e.g.,
+"/foo:"; or embedded, e.g., "/foo::/bar") is replaced with the default
+load-path (the one that would have been used if EMACSLOADPATH was unset).
+This makes it easier to _extend_ the load-path via EMACSLOADPATH
+(previously, EMACSLOADPATH had to specify the complete load-path,
+including the defaults).  (In older versions of Emacs, an empty element
+was replaced by ".", so use an explicit "." now if that is what you want.)
+
+** The -L option, which normally prepends its argument to load-path,
+will instead append, if the argument begins with `:' (or `;' on MS Windows;
+i.e., `path-separator').
+
+** If you use either site-load.el or site-init.el to customize the dumped
+Emacs executable, any changes to `load-path' that these files make
+will no longer be present after dumping.  To affect a permanent change
+to `load-path', use the `--enable-locallisppath' option of `configure'.
+
+** The user option `initial-buffer-choice' can now specify a function
+to set up the initial buffer.
+
+\f
+* Changes in Emacs 24.4
+
+** Support for ACLs (access control lists).
+This requires a suitable support library to be found at build time.
+On GNU/Linux, the POSIX ACL interface is used via libacl.
+On MS-Windows, the NT Security APIs are used to emulate the POSIX interface.
+ACLs are extended file attributes, used e.g. for finer-grained permissions.
+
+*** Emacs preserves the ACL entries of files when backing up.
+
+*** New functions `file-acl' and `set-file-acl' get and set file ACLs.
+
+** Support for menus on text-mode terminals.
+If the terminal supports a mouse, clicking on the menu bar, or on
+sensitive portions of the mode line or header line, will drop down the
+menu defined at that position.  Likewise, clicking C-mouse-1, C-mouse-2, or
+C-mouse-3 on the text area will pop up the menus defined for those locations.
+
+If the text terminal does not support a mouse, you can activate the
+first menu-bar menu by typing F10, which invokes `menu-bar-open'.
+
+If you want the previous behavior, where F10 invoked `tmm-menubar',
+customize the option `tty-menu-open-use-tmm' to a non-nil value.
+(Typing M-` always invokes `tmm-menubar', even if `tty-menu-open-use-tmm'
+is nil.)
+
+** New option `load-prefer-newer' affects how the `load' function chooses
+the file to load.  If this is non-nil, then when both .el and .elc
+versions of a file exist, and the caller did not explicitly specify
+which one to load, then the newer file is loaded.  The default, nil,
+means to always load the .elc file.
+
+** Multi-monitor support
+
+*** New functions `display-monitor-attributes-list' and
+`frame-monitor-attributes' can be used to obtain information about
+each physical monitor on multi-monitor setups.
+
+*** The functions `display-pixel-width' and `display-pixel-height' now
+behave consistently among the platforms: they return the pixel width
+or height for all physical monitors associated with the given display
+as if they were on X.  To get information for each physical
+monitor, use the new functions above.  Similar notes also apply to
+`x-display-pixel-width', `x-display-pixel-height', `display-mm-width',
+`display-mm-height', `x-display-mm-width', and `x-display-mm-height'.
+
+** New function `zlib-decompress-region', which decompresses gzip- and
+zlib-format compressed data using built-in zlib support (if available).
+
+** The *Messages* buffer is created in `messages-buffer-mode',
+a new major mode, with read-only status.  Any code that might create
+the *Messages* buffer should call the function `messages-buffer' to do
+so and set up the mode.
+
+** The cursor stops blinking after 10 blinks (by default) on X and Nextstep.
+You can change the default by customizing `blink-cursor-blinks'.
+
+** In keymaps where SPC scrolls forward, S-SPC now scrolls backward.
+This affects View mode, etc.
+
+** The default value of `make-backup-file-name-function' is no longer nil.
+Instead it defaults to a function that does what the nil value used to.
+
+** Help
+
+*** The command `apropos-variable' is renamed to `apropos-user-option'.
+`apropos-user-option' shows all user options, while `apropos-variable'
+shows all variables.  When called with a universal prefix argument,
+the two commands swap their behaviors.  When `apropos-do-all' is
+non-nil, they output the same results.
+
+*** The key `?' now describes prefix bindings, like `C-h'.
+
+*** The command `describe-function' has been extended for EIEIO.
+Running it on constructors will show a full description of the
+generated class.  For generic functions, it will show all
+implementations together with links to the source.  The old commands
+`describe-class', `describe-constructor' and `describe-generic' were
+removed.
+
+*** The function `quail-help' is no longer an interactive command.
+Use `C-h C-\' (`describe-input-method') instead.
+
+** Frame and window handling
+
+*** New commands `toggle-frame-fullscreen' and `toggle-frame-maximized',
+bound to <f11> and M-<f10>, respectively.
+
+*** New hooks `focus-in-hook', `focus-out-hook'.
+These are normal hooks run when an Emacs frame gains or loses input focus.
+
+*** The function `window-in-direction' now takes additional arguments
+for specifying a reference point, wrapping the selection around frame
+borders, and specifying ways to select the minibuffer window.
+
+*** Emacs can now change frame sizes in units of pixels, rather than
+text rows or columns.  When maximizing a frame or making it fullscreen,
+remaining extra pixels are no longer given to the minibuffer, the rightmost
+fringe, or other unusable space, but are distributed among the text
+areas of the frame's windows.  If the new option `frame-resize-pixelwise'
+is non-nil, all frame size changes happen pixelwise and set the
+corresponding size hints for the window manager.
+
+*** Emacs can now change window sizes in units of pixels.
+Mouse-dragging a mode line or window divider now changes the size of
+adjacent windows pixelwise.  If the new option `window-resize-pixelwise'
+is non-nil, functions like `balance-windows-area' and `fit-window-to-buffer'
+resize windows pixelwise.  Most functions for changing or accessing
+window sizes now have an additional argument that allows changes to apply,
+or values to be returned, in pixels instead of lines/columns.
+
+*** The functions `window-body-height' and `window-body-width' now never
+count partially visible lines or columns if called with a nil PIXELWISE
+argument.
+
+*** Emacs can now draw dividers between adjacent windows.  To put
+dividers between side-by-side/vertically stacked windows customize the
+frame parameters `right-divider-width' and `bottom-divider-width' to
+some positive integer.  You can drag dividers with the mouse (they show
+a corresponding cursor when the mouse hovers over them).  You can change
+the appearance of dividers by customizing the faces `window-divider',
+`window-divider-first-pixel', and `window-divider-last-pixel'.  The last
+two are useful to provide a 3D effect, or to better distinguish dividers
+from surrounding display objects.
+
+*** New functions to return the pixel sizes of window components, namely
+`window-scroll-bar-width', `window-mode-line-height',
+`window-header-line-height', `window-right-divider-width', and
+`window-bottom-divider-width'.
+
+*** The new function `window-text-pixel-size' returns the size of the
+text of a window's buffer in pixels.  This allows functions like
+`fit-frame-to-buffer' and `fit-window-to-buffer' to accurately fit a
+window to its buffer as it will be displayed.
+
+*** `fit-window-to-buffer' can now resize windows in both dimensions.
+This behavior is controlled by the new option
+`fit-window-to-buffer-horizontally'.  The new option
+`fit-frame-to-buffer' allows you to fit the window's frame to its buffer.
+
+*** `fit-frame-to-buffer' now fits frames in both dimensions.  The new
+options `fit-frame-to-buffer-margins' and `fit-frame-to-buffer-sizes'
+control the size of the frame and its position on screen.
+
+*** Temp Buffer Resize Mode can now adjust the height and width of
+windows and frames.  The new option `temp-buffer-max-width' allows you to
+control the width of temporary buffer windows.  Moreover, if the new
+option `fit-frame-to-buffer' is non-nil and the buffer appears in the
+root window of a frame, Temp Buffer Resize Mode will try to adjust the
+width and/or height of the frame.
+
+*** `split-window' is now a non-interactive function, not a command.
+As a command, it was a special case of `C-x 2' (`split-window-below'),
+and as such superfluous.  After being reimplemented in Lisp, its
+interactive form was mistakenly retained.
+
+*** The functions `window-size' and `window-total-size' now have an
+optional argument to return a rounded size value.
+
+*** `window-state-put' now allows you to put a window state into internal
+windows too.
+
+*** New option `scroll-bar-adjust-thumb-portion'.
+Available only on X, this option allows you to control over-scrolling
+using the scroll bar (i.e., dragging the thumb down even when the end
+of the buffer is visible).
+
+*** New display actions functions for `display-buffer':
+
+**** `display-buffer-at-bottom' chooses or creates a window at the
+bottom of the selected frame.
+
+**** `display-buffer-no-window' to not display the buffer in a window.
+
+*** New display action alist entry `allow-no-window' to indicate the
+caller of `display-buffer' is ready to handle the case of not displaying
+the buffer in a window.
+
+*** `display-buffer-in-previous-window' is now a member of
+`display-buffer-fallback-action'.
+
+** Lisp evaluation
+
+*** `eval-defun' on an already defined defcustom calls the :set function,
+if there is one.
+
+*** The commands `eval-expression' (`M-:'), `eval-last-sexp' (`C-x C-e'),
+and `eval-print-last-sexp' (`C-j' in Lisp Interaction mode) can take a
+zero prefix argument.  This disables truncation of lists in the output,
+equivalent to setting `(eval-expression-)print-length' and
+`(eval-expression-)print-level' to nil.  Additionally, it causes integers
+to be printed in other formats (octal, hexadecimal, and character).
+
+*** New hook `eval-expression-minibuffer-setup-hook' run by
+`eval-expression' on entering the minibuffer.
+
+** `cache-long-line-scans' is now non-nil, and renamed to `cache-long-scans',
+because it affects caching of paragraph scanning results as well.
+There is no reason to set this to nil except for debugging purposes.
+
+** `emacs-bzr-version' has been renamed to `emacs-repository-version',
+and works for git too, if you fetch the repository notes.
+
+** The default value of `comment-use-global-state' is now t,
+and this variable has been marked obsolete.
+
+** `write-region-inhibit-fsync' now defaults to t in batch mode.
+
+** The option `set-mark-default-inactive' has been deleted.
+This unfinished feature was introduced by accident in Emacs 23.1;
+simply disabling Transient Mark mode does the same thing.
+
+\f
+* Editing Changes in Emacs 24.4
+
+** Indentation
+
+*** `electric-indent-mode' is now enabled by default.
+Typing RET reindents the current line and indents the new line.
+`C-j' inserts a newline but does not indent.  In some programming modes,
+additional characters are electric (eg `{').
+
+*** New buffer-local `electric-indent-local-mode'.
+
+*** The behavior of `C-x TAB' (`indent-rigidly') has changed.
+When invoked without a prefix argument, it now activates a transient
+mode in which typing <left>, <right>, <S-left>, and <S-right> adjusts
+the text indentation in the region.  Typing any other key resumes
+normal editing behavior.
+
+*** `tab-stop-list' is now implicitly extended to infinity by repeating
+the last step.  Its default value is changed to nil, which means a tab
+stop every `tab-width' columns.
+
+** Uniquify is enabled by default, with `post-forward-angle-brackets' style.
+In other words, if you visit two files that have the same base name,
+then rather than creating buffers basename and basename<2>,
+Emacs uses basename<dirA> and basename<dirB>.  To change this,
+customize `uniquify-buffer-name-style'.  Set it to nil for the old behavior.
+
+** New command `C-x SPC' (`rectangle-mark-mode') makes a rectangular region.
+Most commands are still unaware of it, but kill/yank do work on the rectangle.
+
+** New option `visual-order-cursor-movement'.
+If this is non-nil, cursor motion with arrow keys will follow the
+visual order of characters on the screen: <left> always moves to the
+left, <right> always moves to the right, disregarding the surrounding
+bidirectional context.
+
+** New command `delete-duplicate-lines'.
+This searches the region for identical lines, and removes all but one
+copy of each repeated line.  The lines need not be sorted.
+
+** New command `cycle-spacing' acts like a smarter `just-one-space'.
+When called in succession, it cycles between spacing conventions:
+one space, no spaces, original spacing.
+
+** `blink-matching-paren' now only highlights the matching open-paren
+by default, instead of moving the cursor.  Set this variable to `jump' to
+restore the old behavior.
+
+** The new function `fill-single-char-nobreak-p' can stop fill from breaking
+a line after a one-letter word, which is an error in some typographical
+conventions.  To use it, add it to the `fill-nobreak-predicate' hook.
+
+** Registers
+
+*** All interactive commands that read a register (`copy-to-register', etc.)
+now display a temporary window after `register-preview-delay' seconds
+that summarizes existing registers.  To disable this, set that option to nil.
+Interactive commands that read registers and want to make use of this
+should use `register-read-with-preview' to read register names.
+
+*** New command `frameset-to-register' bound to `C-x r f', replacing
+`frame-configuration-to-register'.  It offers similar functionality,
+plus enhancements like the ability to restore deleted frames.
+(`frame-configuration-to-register' still exists, but no longer has a
+key binding.)
+
+*** New command `C-x C-k x' (`kmacro-to-register') stores keyboard
+macros in registers.
+
+\f
+* Changes in Specialized Modes and Packages in Emacs 24.4
+
+** Backtrace and debugger
+
+*** New Lisp debugger command `v' (`debugger-toggle-locals') toggles the
+display of local variables of the current stack frame.
+
+*** The Lisp debugger's `e' command (`debugger-eval-expression') now includes
+the lexical environment when evaluating the code in the context at point
+(and so allows you to access lexical variables).
+
+*** New minor mode `jit-lock-debug-mode' helps you debug code run via JIT Lock.
+
+** Battery information can now be retrieved from BSD's `apm' utility.
+
+** In the Buffer Menu, `M-s a C-o' shows matches for a regexp in marked buffers.
+
+** Calc
+
+*** Calc by default now uses the Gregorian calendar for all dates, and
+uses January 1, 1 AD as its day number 1.  Previously Calc used the
+Julian calendar for dates before September 14, 1752, and it used
+December 31, 1 BC as its day number 1; the new scheme is more
+consistent with Calendar's calendrical system and day numbering.
+
+*** The new option `calc-gregorian-switch' lets you configure if
+(and when) Calc switches from the Julian to the Gregorian calendar.
+
+*** Support for ISO 8601 dates.
+
+** Calendar and Diary
+
+*** New faces `calendar-weekday-header', `calendar-weekend-header',
+and `calendar-month-header'.
+
+*** New option `calendar-day-header-array'.
+
+*** New variable `diary-from-outlook-function', used by the command
+`diary-from-outlook'.
+
+*** The variable `calendar-font-lock-keywords' is obsolete.
+
+** CEDET
+
+*** EDE
+
+**** The cpp-root project now supports executing a compile command.
+It can be set through the new :compile-command slot or the
+buffer-local variable `compile-command'.
+
+**** Better selection of include directories for the 'linux' project.
+Include directories now support out-of-tree build directories and
+target architecture auto-detection.
+
+*** Semantic
+
+**** Improved detection of used namespaces in current scope in C++.
+
+**** Parsing of default values for variables and function arguments in C/C++.
+They are also displayed by the summarize feature in the mode line.
+
+**** Improved parsing of function pointers in C/C++.
+This also includes parsing of function pointers as function arguments.
+
+**** Parsing of C/C++ preprocessor macros that open new scope.
+For example, this enables parsing of macros that open new namespaces.
+
+**** Support for 'this' pointer in inline member functions in C++.
+
+** CFEngine mode
+
+*** Support for completion, ElDoc, and Flycheck has been added.
+
+*** The current CFEngine syntax is parsed from "cf-promises -s json".
+There is a fallback syntax available if you don't have cf-promises or
+if your version doesn't support that option.  See option `cfengine-cf-promises'.
+
+** cl-lib
+
+*** New macro `cl-tagbody'.
+This executes statements while allowing for control transfer to labels.
+
+*** letf is now just an alias for cl-letf.
+
+** CUA mode
+
+*** CUA mode now uses `delete-selection-mode' and `shift-select-mode'.
+Hence, you can now enable it independently from those modes, and from
+`transient-mark-mode'.
+
+*** `cua-highlight-region-shift-only' is now obsolete.
+You can disable `transient-mark-mode' to get the same result.
+
+*** CUA's rectangles can now be used without CUA by calling the command
+`cua-rectangle-mark-mode'.
+
+** Delete Selection mode can now be used without Transient Mark mode.
+
+** Desktop
+
+*** `desktop-save-mode' by default now auto-saves an existing desktop file
+after `desktop-auto-save-timeout'.  To disable this, customize that option
+to nil (or zero).
+
+*** Desktop now saves and restores the frame/window configuration.
+To disable this, set `desktop-restore-frames' to nil.
+See also related options `desktop-restore-reuses-frames',
+`desktop-restore-in-current-display', and `desktop-restore-forces-onscreen'.
+
+** New Dired minor mode `dired-hide-details-mode' toggles whether details,
+such as file ownership or permissions, are visible in Dired buffers.
+See the new options `dired-hide-details-hide-symlink-targets' and
+`dired-hide-details-hide-information-lines' for customizing what to hide.
+
+** You can enable ElDoc inside the `eval-expression' minibuffer with:
+  (add-hook 'eval-expression-minibuffer-setup-hook 'eldoc-mode)
+The results display in the mode line.
+
+** Electric Pair mode
+
+*** New option `electric-pair-preserve-balance', enabled by default.
+If non-nil, pairing/skipping only kicks in when that help the balance
+of parentheses and quotes; i.e., the buffer should end up at least as
+balanced as before.
+
+You can further control this behavior by adjusting the predicates
+stored in `electric-pair-inhibit-predicate' and `electric-pair-skip-self'.
+
+*** New option `electric-pair-delete-adjacent-pairs', enabled by default.
+In `electric-pair-mode', the commands `backward-delete-char' and
+`backward-delete-char-untabify' are now bound to electric variants
+that delete the closer when invoked between adjacent pairs.
+
+*** New option `electric-pair-open-newline-between-pairs', enabled by default.
+In `electric-pair-mode', inserting a newline between adjacent pairs
+opens an extra newline after point, which is indented if
+`electric-indent-mode' is also set.
+
+*** New option `electric-pair-skip-whitespace', enabled by default.
+This controls if skipping over closing delimiters should jump over any
+whitespace slack.  Setting it to `chomp' makes it delete this
+whitespace.  See also the variable `electric-pair-skip-whitespace-chars'.
+
+*** New variables control the pairing in strings and comments.
+You can customize `electric-pair-text-pairs' and
+`electric-pair-text-syntax-table' to tweak pairing behavior inside
+strings and comments.
+
+** New EPA option `epa-mail-aliases'.
+You can set this to a list of email address aliases that `epa-mail-encrypt'
+should use to find keys.
+
+** New ERC option `erc-accidental-paste-threshold-seconds'.
+If set to a number, this can be used to avoid accidentally pasting large
+amounts of data into the ERC input.
+
+** New ERT macro `skip-unless' allows skipping ERT tests.
+
+** Eshell
+
+*** `eshell' now supports visual subcommands and options.
+Eshell has been able to handle "visual" commands (interactive,
+non-line oriented commands such as top that require display
+capabilities not provided by eshell) by running them in an Emacs
+terminal emulator.  See `eshell-visual-commands'.
+
+This feature has been extended to subcommands and options that make a
+usually line-oriented command a visual command.  Typical examples are
+"git log" and "git <command> --help", which display their output in a
+pager by default.  See `eshell-visual-subcommands' and `eshell-visual-options'.
+
+*** New Eshell-Tramp module.
+External su and sudo commands are now the default; the internal,
+Tramp-using variants can still be used by enabling the eshell-tramp module.
+
+** New F90 mode option `f90-smart-end-names'.
+
+** New option `gnutls-verify-error', if non-nil, means that Emacs
+should reject SSL/TLS certificates that GnuTLS determines as invalid.
+(This option defaults to nil at present, but this is expected to change
+in a future release.)
+
+** Hi-Lock
+
+*** New global command `M-s h .' (`highlight-symbol-at-point') highlights
+the symbol near point.
+
+*** New option `hi-lock-auto-select-face'.  When non-nil, hi-lock commands
+will cycle through faces in `hi-lock-face-defaults' without prompting.
+
+** Icomplete is now more similar to Ido.
+
+*** Icomplete by default now applies to all forms of minibuffer completion.
+The variable `icomplete-with-completion-tables' (now a user option)
+controls this.  To restore the old behavior, set it back to
+'(internal-complete-buffer).
+
+*** You can navigate through and select completions using the keys
+from `icomplete-minibuffer-map'.
+
+*** The string that separates potential completions is now a customizable
+option (`icomplete-separator').  The default is " | " rather than ",".
+
+*** New face `icomplete-first-match'; and new options
+`icomplete-hide-common-prefix' and `icomplete-show-matches-on-no-input'.
+
+*** The option `icomplete-show-key-bindings' has been removed.
+
+** Ido
+
+*** An Ido user manual is now included.
+
+*** The option `ido-use-virtual-buffers' can now take the value `auto'.
+This means to use virtual buffers if the current ido input does not match
+an existing buffer.
+
+*** The variable `ido-decorations' can optionally have two new elements,
+which are the brackets to use around the sole remaining completion.
+
+** Image mode
+
+*** New commands `n' (`image-next-file') and `p' (`image-previous-file')
+visit the next image file and the previous image file in the same
+directory, respectively.
+
+*** New commands to show specific frames of multi-frame images.
+`f' (`image-next-frame') and `b' (`image-previous-frame') visit the
+next or previous frame.  `F' (`image-goto-frame') shows a specific frame.
+
+*** New commands to speed up, slow down, or reverse animation.
+`a +' (`image-increase-speed') and `a -' (`image-decrease-speed') to
+speed up and slow down the animation.  `a r' (`image-reverse-speed')
+to reverse it and `a 0' (`image-reset-speed') to reset it.
+
+*** The command `image-mode-fit-frame' deletes other windows.
+When toggling, it restores the frame's previous window configuration.
+It also has an optional frame argument, which can be used by Lisp
+callers to fit the image to a frame other than the selected frame.
+
+** New Imenu option `imenu-generic-skip-comments-and-strings'.
+
+** Info
+
+*** New Info face `info-index-match', used to highlight matches in index
+entries displayed by `Info-index-next', `Info-virtual-index' and
+`info-apropos'.
+
+*** The Info-edit command is obsolete.  Editing Info nodes by hand
+has not been relevant for some time.
+
+** JS Mode
+
+*** New option `js-switch-indent-offset'.
+
+*** Better indentation of multiple-variable declarations.
+If a declaration spans several lines, variables on the following lines
+are lined up to the first one.
+
+*** Recognition and better indentation of continuations in array comprehensions.
+
+** MH-E has been updated to version 8.6 - see separate MH-E-NEWS file.
+
+** Octave mode
+
+*** Font locking for Texinfo comments and new keywords.
+
+*** Completion in Octave file buffers.
+
+*** ElDoc support.
+
+*** Jump to definition.
+
+*** Documentation lookup/search.
+
+** OPascal mode is the new name for Delphi mode
+
+*** All delphi-* variables and functions have been renamed to opascal-*.
+Obsolete aliases exist for those likely to have been used externally.
+
+*** The option `delphi-newline-always-indents' has been removed.
+Use `electric-indent-mode' instead.
+
+*** The TAB key runs the standard `indent-for-tab-command', not `delphi-tab'.
+
+** Package
+
+*** The package library now supports digital signing of packages.
+Maintainers of package archives should consider signing their packages
+to enhance security.
+
+**** If the user option `package-check-signature' is non-nil,
+Emacs tries to check package signatures at install time.
+The value `allow-unsigned' allows installation of unsigned packages.
+
+**** The user option `package-unsigned-archives' lists archives where
+Emacs will not try to check signatures.
+
+*** New option `package-pinned-packages'.  This is useful if you have multiple
+archives enabled, with more than one offering a given package that you want.
+
+*** In the `list-packages' buffer, you can use `f' (`package-menu-filter')
+to filter the list of packages by a keyword.
+
+*** In the `describe-package' buffer, there are now buttons listing the
+keywords related to the package.  Click on a button to see other packages
+related to that keyword.
+
+*** The format of `archive-contents' files, generated by package
+repositories, has changed to allow a new (fifth) element in the data
+vectors, containing an associative list with extra properties.
+(For example, `describe-package' uses the `:url' extra property to
+display a "Homepage" header.)
+
+** In Prolog mode, `prolog-use-smie' has been removed,
+along with the non-SMIE indentation code.
+
+** Python mode
+
+*** Out of the box support for CPython, iPython and readline based shells.
+**** `python-shell-completion-module-string-code' is no longer used.
+
+*** Automatic shell prompt detection.  New user options:
+**** `python-shell-interpreter-interactive-arg'.
+**** `python-shell-prompt-detect-enabled'.
+**** `python-shell-prompt-detect-failure-warning'.
+**** `python-shell-prompt-input-regexps'.
+**** `python-shell-prompt-output-regexps'.
+
+*** Python shell support for remote hosts via tramp.
+
+*** Correct display of line numbers for code sent to the Python shell.
+
+** Remember
+
+*** The new command `remember-notes' creates a buffer that is saved on exit.
+You can use it as a more permanent *scratch* buffer.
+
+*** Remember can now store notes in separate files.
+To use this, add `remember-store-in-files' to the `remember-handler-functions'
+option.  The files are saved in `remember-data-directory' using
+names specified by `remember-directory-file-name-format'.
+
+** Rmail
+
+*** Customize `rmail-mbox-format' to influence some minor aspects of
+how Rmail displays non-MIME messages.
+
+*** The `unrmail' command now converts from BABYL to mboxrd format,
+rather than mboxo.  Customize `unrmail-mbox-format' to change this.
+
+** Ruby mode
+
+*** Improved syntax highlighting and indentation.
+
+*** New `electric-indent-mode' integration.
+
+*** New option `ruby-encoding-magic-comment-style'.
+
+*** New option `ruby-custom-encoding-magic-comment-template'.
+
+*** New option `ruby-align-to-stmt-keywords'.
+
+*** New option `ruby-align-chained-calls'.
+
+*** More Ruby file types have been added to `auto-mode-alist'.
+
+** Search and Replace
+
+*** New global command `M-s .' (`isearch-forward-symbol-at-point')
+starts a symbol (identifier) incremental search forward with the
+symbol found near point added to the search string initially.
+
+*** `C-x 8 RET' in Isearch mode reads a character by its Unicode name
+and adds it to the search string.
+
+*** `M-s i' in Isearch mode toggles whether search matches invisible text.
+
+*** `query-replace' skips invisible text when `search-invisible' is nil,
+and opens overlays with hidden text when `search-invisible' is `open'.
+
+*** A negative prefix argument of replacement commands replaces backward.
+`M-- M-%' replaces a string backward, `M-- C-M-%' replaces a regexp
+backward, `M-s w words M-- M-%' replaces a sequence of words backward.
+
+*** By default, prefix arguments do not now terminate Isearch mode.
+Set `isearch-allow-prefix' to nil to restore the old behavior.
+
+*** More Isearch commands accept prefix arguments, namely
+`isearch-printing-char', `isearch-quote-char', `isearch-yank-word',
+`isearch-yank-line'.
+
+*** Word search now matches whitespace at the beginning/end
+of the search string if it contains leading/trailing whitespace.
+In an incremental word search or when using a non-nil LAX argument
+of `word-search-regexp', the lax matching can also match part of
+the first word (in addition to the lax matching of the last word).
+The same rules are now applied to the symbol search, with the difference
+that it matches symbols, and non-symbol characters between symbols.
+
+** New SES command `ses-rename-cell' allows assignment of names to SES cells.
+
+** The shell.el option `explicit-bash-args' includes --noediting by default.
+All non-ancient Bash versions support this option.
+
+** Shell Script mode
+
+*** The SMIE indentation engine is now used by default - see `sh-use-smie'.
+
+*** `sh-mode' now has its own setting for `add-log-current-defun-function'.
+
+** SMIE
+
+*** You can customize the SMIE indentation of a mode via `smie-config'.
+The command `smie-config-guess' can help you derive the appropriate
+indentation settings, if you provide it with an indented sample file.
+Use `smie-config-save' to save the result.
+
+*** You can customize the SMIE indentation of a file by adding an entry to
+the file's local variables of the form: `eval: (smie-config-local '(RULES))'.
+
+*** New commands `smie-config-show-indent' and `smie-config-set-indent'.
+
+** SQL mode
+
+*** Improved login monitoring and appropriate response to login failures.
+New variable `sql-login-delay' defines maximum wait time for a connection.
+
+*** Oracle support.
+SQL*Plus script placeholders are properly highlighted and identified
+in `sql-placeholders-filter'.  When starting SQL*Plus, `sql-oracle-options'
+are passed before the logon parameter, as required.  The default now
+includes `-L', to limit the number of logon attempts per invocation.
+
+** New Term mode option `term-suppress-hard-newline'.
+
+** Todo mode has been rewritten and enhanced.
+The Todo mode user manual describes all commands and most user
+options.  To support some of these features, a new file format is
+used, which is incompatible with the old format; however, you can
+convert old todo and done item files to the new format on initializing
+the first new todo file, or at any later time with the provided
+conversion command.  The previous version of todo-mode.el has been
+renamed to otodo-mode.el and is now obsolete.  New features include:
+
+*** Support for multiple todo files and archive files of done items.
+
+*** Renaming, reordering, moving, merging, and deleting categories.
+
+*** Sortable tabular summaries of categories and the item types they contain.
+
+*** Cross-category lists of items filtered by specific criteria.
+
+*** More fine-grained interaction with the Emacs diary, by being able to
+decide for each todo item whether it appears in the Fancy Diary display.
+
+*** Highly flexible new item insertion and item editing.
+
+*** Moving items between categories, storing done items in their category
+or in archive files, undoing or unarchiving done items.
+
+*** Reprioritizing items by inputting a numerical priority.
+
+*** Extensive customizability of operation and display, including many faces.
+
+** Trace
+
+*** `trace-function' and `trace-function-background' no longer prompt for
+the output buffer.  Unless you use a prefix argument, they output to
+`trace-buffer'.
+
+*** With a prefix argument, `trace-function' and `trace-function-background'
+will prompt for a "context".  This is a Lisp expression, whose value at the
+time the function is entered/exited is printed along with the function's
+name and arguments.
+
+** Tramp
+
+*** New connection method "adb", which allows to access Android
+devices by the Android Debug Bridge.  The variable `tramp-adb-program'
+can be used to adapt the path of the "adb" program, if needed.
+
+*** Handlers for `file-acl' and `set-file-acl' for remote machines
+that support POSIX ACLs.
+
+*** Handlers for `file-notify-add-watch' and `file-notify-rm-watch'
+for remote machines that support filesystem notifications.
+
+*** The experimental url syntax for remote file names has been removed.
+
+*** The connection methods "plink1", "ssh1", "ssh2", "scp1", "scp2",
+"scpc" and "rsyncc" are discontinued.  The ssh option
+"ControlMaster=auto" is set automatically in all ssh-based methods,
+when possible.  See `tramp-use-ssh-controlmaster-options'.
+
+** New URL command `url-cookie-list' displays the current cookies,
+and allows you to interactively remove cookies.
+
+** VC and related modes
+
+*** In VC directory mode, `D' displays diffs between VC-controlled
+whole tree revisions.
+
+*** In VC directory mode, `L' lists the change log for the current VC
+controlled tree in a window.
+
+*** In VC directory mode, `I' shows a log of changes that will be
+received with a pull operation.
+
+*** `C-x v G' (globally) and `G' (in VC directory mode) ignores a file
+under current version control system.  When called with a prefix
+argument, you can remove a file from the ignored file list.
+
+** VHDL mode
+
+*** New options: `vhdl-actual-generic-name', `vhdl-beautify-options'.
+
+*** New commands: `vhdl-fix-statement-region', `vhdl-fix-statement-buffer'.
+
+** The Woman commands `woman-default-faces' and `woman-monochrome-faces'
+are obsolete.  Customize the `woman-*' faces instead.
+
+** More packages look for ~/.emacs.d/<foo> additionally to ~/.<foo>.
+Affected files:
+~/.emacs.d/timelog     replaces  ~/.timelog
+~/.emacs.d/vip         replaces  ~/.vip
+~/.emacs.d/viper       replaces  ~/.viper
+~/.emacs.d/ido.last    replaces  ~/.ido.last
+~/.emacs.d/kkcrc       replaces  ~/.kkcrc
+~/.emacs.d/quickurls   replaces  ~/.quickurls
+~/.emacs.d/idlwave/    replaces  ~/.idlwave/
+~/.emacs.d/bdfcache.el replaces  ~/.bdfcache.el
+~/.emacs.d/places      replaces  ~/.emacs-places
+~/.emacs.d/shadows     replaces  ~/.shadows
+~/.emacs.d/shadow_todo replaces  ~/.shadow_todo
+~/.emacs.d/strokes     replaces  ~/.strokes
+~/.emacs.d/notes       replaces  ~/.notes
+~/.emacs.d/type-break  replaces  ~/.type-break
+Also the following files used by the now obsolete otodo-mode.el:
+~/.emacs.d/todo-do     replaces  ~/.todo-do
+~/.emacs.d/todo-done   replaces  ~/.todo-done
+~/.emacs.d/todo-top    replaces  ~/.todo-top
+
+** Obsolete packages
+
+*** iswitchb.el; use icomplete-mode.
+
+*** longlines.el; use visual-line-mode.
+
+*** meese.el.
+
+*** sup-mouse.el.
+
+*** terminal.el; use term.el instead.
+
+*** the old version of todo-mode.el (renamed to otodo-mode.el).
+
+*** xesam.el (owing to the cancellation of the XESAM project).
+
+*** yow.el; use fortune.el or cookie1.el instead.
+
+\f
+* New Modes and Packages in Emacs 24.4
+
+** New package eww.el provides a built-in web browser.
+This requires Emacs to have been compiled with libxml2 support.
+
+** New package nadvice.el offers lighter-weight advice facilities.
+It is layered as:
+
+*** `add-function'/`remove-function', which can be used to add/remove code on
+any function-carrying place, such as process filters or `<foo>-function' hooks.
+
+*** `advice-add'/`advice-remove' to add/remove a piece of advice on a named
+function, much like `defadvice' does.
+
+** New package frameset.el provides a set of operations to save a frameset
+(the state of all or a subset of the existing frames and windows, somewhat
+similar to a frame configuration), both in-session and persistently, and
+restore it at some point in the future.
+
+** New package filenotify.el provides an interface for file system
+notifications.  It requires that Emacs be compiled with one of the
+low-level libraries gfilenotify.c, inotify.c or w32notify.c.
+
+** New minor modes `prettify-symbols-mode' and `global-prettify-symbols-mode'
+display specified symbols as composed characters.  E.g., in Emacs Lisp mode,
+this replaces the string "lambda" with the Greek lambda character.
+
+** New minor mode `superword-mode', which overrides the default word motion
+commands to treat "symbol_words" as a single word, similar to what
+`subword-mode' does.
+
+\f
+* Incompatible Lisp Changes in Emacs 24.4
+
+** The default file coding for Emacs Lisp files is now utf-8.
+(See `file-coding-system-alist'.)  In most cases, this change is
+transparent, but files that contain unusual characters without
+specifying an explicit coding system may fail to load with obscure
+errors.  You should either convert them to utf-8 or add an explicit
+`coding:' cookie.
+
+** Default process filters and sentinels are not nil any more.
+Instead they default to a function that does what the nil value used to do.
+
+** Overlay priority does not have to be nil or a non-negative integer.
+Overlay priority can be other kinds of Lisp objects.  We didn't yet
+decide whether other types of values are stable enough, and therefore
+don't feel it's right to document them.  For now, don't assume in your
+code that the values of overlay priority can only be either nil or an
+integer, always test them with an appropriate predicate to be one or
+the other.  If you need to sort arbitrary overlays into priority
+order, `overlays-at' can now optionally do this.
+You should still only specify integer priorities on overlays you create.
+
+** The cars of the elements in `interpreter-mode-alist' are now
+treated as regexps rather than literal strings.
+
+** `overriding-terminal-local-map' no longer replaces the local keymaps.
+It used to disable the minor mode, major mode, and text-property keymaps,
+whereas now it simply has higher precedence.
+
+** `kill-region' has lost its `yank-handler' optional argument.
+
+** `(input-pending-p)' no longer runs other timers that are ready to run.
+The new optional CHECK-TIMERS parameter allows for the prior behavior.
+
+** `defvar' and `defcustom' in a let-binding affect the "external" default.
+
+** The syntax of ?» and ?« is now punctuation instead of matched parens.
+Some languages match those as »...«, and others as «...», so it is
+better for Emacs to stay neutral by default.
+
+** `read-event' does not always decode chars in ttys any more.  As was the case
+in Emacs 22 and before, `read-event' (and `read-char') by default read raw
+bytes from the terminal.  If you want to read decoded chars instead (as was
+always the case in Emacs-23, for example), pass a non-nil
+`inherit-input-method' argument.
+
+** In `symbol-function', nil and "unbound" are indistinguishable.
+`symbol-function' does not signal a `void-function' error any more.
+To determine if a symbol's function definition is void, use `fboundp'.
+
+** `defadvice' does not honor the `freeze' flag and cannot advise
+special-forms any more.
+
+** `dolist' no longer binds VAR while evaluating the RESULT form,
+when lexical binding is enabled.  Previously, VAR was bound to nil,
+which often led to spurious unused-variable warnings.
+
+** The return value of `backup-buffer' has changed.
+The second argument is no longer an SELinux context, instead it is an
+alist of extended attributes as returned by the new function
+`file-extended-attributes'.  The attributes can be applied to another
+file using `set-file-extended-attributes'.
+
+** By default `copy-file' no longer copies file permission bits to an
+existing destination; and it sets the file permission bits of a newly
+created destination to those of the source, masked by the default file
+permissions.  To copy the file permission bits, pass t as the
+PRESERVE-PERMISSIONS argument of `copy-file'.
+
+** `visited-file-modtime' now returns -1 for nonexistent files.
+Formerly it returned a list (-1 LOW USEC PSEC), but this was ambiguous
+in the presence of files with negative time stamps.
+
+** Frame-local variables that affect redisplay do not work any more.
+More specifically, redisplay does not bother to check for a frame-local
+value when looking up variables.
+
+** In compiled Lisp files, the header no longer includes a timestamp.
+
+** The option `inhibit-local-menu-bar-menus' has been removed.
+
+\f
+* Lisp Changes in Emacs 24.4
+
+** Change to the Emacs Lisp coding conventions: the package descriptor
+and name of global variables, constants, and functions should be separated
+by two hyphens if the symbol is not meant to be used by other packages.
+
+** The second argument of `eval' can now specify a lexical environment.
+
+** New macro `define-alternatives' can be used to define generic commands.
+Generic commands are interactive functions whose implementation can be
+selected among several alternatives, as a matter of user preference.
+
+** Numeric comparison functions =, <, >, <=, >= can now take many arguments.
+
+** New functions `special-form-p' and `macrop'.
+
+** New macro `with-eval-after-load'.
+This is like the old `eval-after-load', but better behaved.
+
+** If you give a symbol a `defalias-fset-function' property, `defalias'
+on that symbol will use the associated value as a function to call
+in place of `fset'.
+
+** New variable `enable-dir-local-variables'.
+Directory-local variables are ignored if this is nil.  This may be
+useful for modes that want to ignore directory-locals while still
+respecting file-local variables.
+
+** `read-regexp' now uses the new variable `read-regexp-defaults-function'
+as a function to call to provide default values.
+
+** New functions `group-gid' and `group-real-gid'.
+
+** New function `get-pos-property'.
+
+** New hook `pre-redisplay-function'.
+
+** `byte-compile-interactive-only-functions' is now obsolete.
+To specify that a command should only be called interactively, give it
+a non-nil `interactive-only' property.
+
+** New function `string-suffix-p'.
+
+** `split-string' now takes an optional argument TRIM.
+The value, if non-nil, is a regexp that specifies what to trim from
+the start and end of each substring.
+
+** Completion
+
+*** The separator used by `completing-read-multiple' is now a regexp.
+The default `crm-separator' has been changed to allow surrounding spaces
+around the comma.
+
+*** New function `completion-table-with-cache' is a wrapper for
+`completion-table-dynamic' that caches the result of the last lookup.
+
+*** New function `completion-table-merge' to combine several
+completion tables by merging their completions.
+
+*** The `common-substring' argument of `display-completion-list',
+which has been documented as obsolete since Emacs 23.1, is now _really_
+obsolete, and no longer advertised.  Instead either call
+`completion-hilit-commonality' to add the highlighting; or use
+`completion-all-completions', which returns highlighted strings.
+
+** Encoding and decoding of text
+
+*** New coding-system `prefer-utf-8'.
+This is like `undecided' but prefers UTF-8 on decoding if the text to
+be decoded does not contain any invalid UTF-8 sequences.  On encoding,
+any non-ASCII characters are automatically encoded as UTF-8.
+
+*** New attributes of coding-systems whose type is `undecided'.
+Two new attributes, `:inhibit-null-byte-detection' and
+`:inhibit-iso-escape-detection', determine how to detect encoding of
+text that includes null bytes and ISO-2022 escape sequences, respectively.
+Each of these attributes can be either nil, zero, or t.  If t, decoding
+text ignores null bytes and ISO-2022 sequences, respectively.  If nil,
+null bytes cause text to be decoded with no-conversion, and ISO-2022
+sequences cause Emacs to assume the text is encoded in one of the ISO-2022
+encodings, such as iso-2022-7bit.  If zero, Emacs consults the variables
+`inhibit-null-byte-detection' and `inhibit-iso-escape-detection'.
+The new attribute `:prefer-utf-8', if non-nil, causes Emacs to prefer
+UTF-8 encoding and decoding, whenever possible.
+
+These attributes are only meaningful for coding-systems of type `undecided'.
+(The type of a coding-system is determined by its `:coding-type' attribute
+and can be accessed by calling the `coding-system-type' function.)
+
+** Error-handling
+
+*** New function `define-error'.
+
+*** `with-demoted-errors' takes an additional argument `format'.
+
+*** Errors from timer functions are no longer silently discarded,
+but are reported as messages.  So you may see "Error running timer"
+messages from code that was failing silently till now.  Set
+`debug-on-error' non-nil to get a real error and a backtrace.
+
+** Faces
+
+*** Face specs set via Custom themes now replace the `defface' spec
+rather than inheriting from it.  In other words, setting a face via a
+theme now behaves like setting it via Customize: you only need to
+specify the attributes that you want, you don't need to unset those
+that you don't want.
+
+*** The function `face-spec-set' is now like `setq' for face specs.
+Its third arg now accepts values specifying a face spec type (defface,
+custom, or override spec), and the relevant spec is set accordingly.
+
+*** New face spec attribute :distant-foreground
+specifies foreground to use if background color is near the foreground
+color that would otherwise have been used.
+
+*** New function `add-face-text-property', which can be used to
+conveniently prepend/append new face properties.
+
+*** New face characteristic (supports :underline (:style wave))
+specifies whether or not the terminal can display a wavy line.
+
+** File-handling
+
+*** Support for filesystem notifications.
+Emacs now supports notifications of filesystem changes, such as
+creation, modification, and deletion of files.  This requires the
+`glib' API, or the 'inotify' API (on GNU/Linux systems only).  On
+MS-Windows systems, this is supported for Windows XP and newer.
+
+*** The 9th element returned by `file-attributes' is now unspecified.
+Formerly, it was t if the file's gid would change if file were deleted
+and recreated.  This value has been inaccurate for years on many
+platforms, and nobody seems to have noticed or cared.
+
+*** The 6th argument to `copy-file' has been renamed to
+PRESERVE-PERMISSIONS as it now handles ACL entries and the traditional
+Unix file permission bits as well as SELinux context.
+
+*** The function `file-ownership-preserved-p' now has an optional
+argument GROUP which causes it check for file group too.  This can be
+used in place of the 9th element of `file-attributes'.
+
+*** The function `set-visited-file-modtime' now accepts a 0 or -1 argument,
+with the same interpretation as the returned value of `visited-file-modtime'.
+
+** Image API
+
+*** `image-animated-p' is now `image-multi-frame-p'.
+It returns non-nil for any image that contains multiple frames,
+whether or not it specifies a frame delay.
+
+*** New variable `image-default-frame-delay' gives the frame delay for
+animated images which do not specify a frame delay.
+
+*** New functions `image-current-frame' and `image-show-frame' for getting
+and setting the current frame of a multi-frame image.
+
+** ImageMagick
+
+*** ImageMagick images now support the :max-width and :max-height keywords.
+
+*** When using `create-image' with image data, you can pass a :format
+attribute (via the property-list argument) in order to help
+ImageMagick detect the image type.  The value should be a MIME
+content-type that is found in the new variable `image-format-suffixes'.
+
+** Revert and Autorevert
+
+*** If Emacs is compiled with file notification support, it uses notifications
+instead of checking file time stamps.  To disable this, set the user option
+`auto-revert-use-notify' to nil.  Alternatively, you can specify a regular
+expression matching directories to be excluded from file notifications via
+`auto-revert-notify-exclude-dir-regexp'.
+
+*** The default values of `buffer-stale-function', `revert-buffer-function',
+and `revert-buffer-insert-file-contents-function' are no longer nil.
+Instead they default to functions that do what the nil value used to.
+
+*** `buffer-stale-function' is now used for buffers visiting files too.
+
+*** The new user option `auto-revert-remote-files' enables reversion
+of remote files, if non-nil.
+
+** Terminal
+
+*** Functions to pop up menus and dialogs now work on all terminals,
+including TTYs.  This includes `x-popup-menu', `x-popup-dialog',
+`message-box', `yes-or-no-p', etc.
+
+The function `display-popup-menus-p' will now return non-nil for a
+display or frame whenever a mouse is supported on that display or frame.
+
+*** New hook `tty-setup-hook', run at the end of initializing a text terminal.
+
+*** The hook `term-setup-hook' is obsolete.  It is entirely equivalent
+to `emacs-startup-hook'.  See also the new `tty-setup-hook'.
+
+** Minor internal changes to the details of lock files.
+The lock for DIR/FILE is now _always_ DIR/.#FILE.
+If DIR/.#FILE already exists and is not an Emacs lock file,
+Emacs makes no attempt to lock DIR/FILE.  (Previously, it fell back to
+numbered lock files DIR/.#FILE.0...).
+On file systems that do not support symbolic links, the lock is now a
+regular file with contents being what would have been in the symlink.
+
+** New bool-vector set operation functions:
+*** `bool-vector-exclusive-or'
+*** `bool-vector-union'
+*** `bool-vector-intersection'
+*** `bool-vector-set-difference'
+*** `bool-vector-not'
+*** `bool-vector-subsetp'
+*** `bool-vector-count-consecutive'
+*** `bool-vector-count-population'
+
+** New library subr-x.el with miscellaneous small utility functions:
+*** `hash-table-keys'
+*** `hash-table-values'
+*** `string-blank-p'
+*** `string-empty-p'
+*** `string-join'
+*** `string-reverse'
+*** `string-trim-left'
+*** `string-trim-right'
+*** `string-trim'
+*** `string-remove-prefix'
+*** `string-remove-suffix'
+
+** The `time-to-seconds' alias to `float-time' is no longer marked obsolete.
+
+** The spelling of the rx.el category `chinese-two-byte' has been
+corrected (the first 'e' was missing).
+
+** EIEIO namespace cleanup, obsolete-aliasing functions to use `eieio-' prefix:
+*** object-name -> eieio-object-name
+*** object-class -> eieio-object-class
+*** object-class-fast -> eieio--object-class
+*** object-class-name -> eieio-object-class-name
+*** object-name-string -> eieio-object-name-string
+*** object-num-slots -> eieio--object-num-slots
+*** object-set-name-string -> eieio-object-set-name-string
+*** class-of -> eieio-object-class
+*** class-name -> eieio-class-name
+*** class-parent -> eieio-class-parent
+*** class-parents -> eieio-class-parents
+*** class-parents-fast -> eieio-class-parents-fast
+*** class-children -> eieio-class-children
+*** class-num-slots -> eieio--class-num-slots
+*** class-precedence-list -> eieio-class-precedence-list
+*** class-direct-subclasses -> eieio-class-children
+*** class-direct-superclasses -> eieio-class-parents
+
+** Obsoleted functions
+*** `log10'
+*** `dont-compile'
+*** `lisp-complete-symbol'
+*** `field-complete'
+*** `minibuffer-completion-contents'
+*** `isearch-nonincremental-exit-minibuffer'
+*** `isearch-filter-visible'
+*** `generic-make-keywords-list'
+*** `get-upcase-table' (use `case-table-get-table' instead).
+
+** `with-wrapper-hook' is obsoleted by `add-function'.
+The few hooks that used with-wrapper-hook are replaced as follows:
+*** `abbrev-expand-function' obsoletes `abbrev-expand-functions'.
+*** `completion-in-region-function' obsoletes `completion-in-region-functions'.
+*** `filter-buffer-substring-function' obsoletes `filter-buffer-substring-functions'.
+
+\f
+* Changes in Emacs 24.4 on Non-Free Operating Systems
+
+** New Core Text based font backend for Mac OS X 10.5 and newer.
+To use the old font backend, use the following on the command line:
+  % defaults write org.gnu.Emacs FontBackend ns
+GNUstep and Mac OS X 10.4 use the old font backend.
+
+** Improved fullscreen support on Mac OS X 10.7 and newer, where the
+default fullscreen method is now "native" fullscreen.  To use the
+old style fullscreen, customize `ns-use-native-fullscreen' to nil.
+
+** On Mac OS X 10.7 and newer, Emacs can use sRGB colorspace, and does so
+by default.  Customize `ns-use-srgb-colorspace' to go back to the old method.
+Note that this does not apply to images.
+
+** The procedure for building Emacs on MS-Windows has changed.
+It is now built by running the same configure script as on all other
+platforms.  This requires the MSYS environment and MinGW development
+tools.  See the updated instructions in nt/INSTALL for details.
+
+Using the Posix configure script and Makefiles also means a change in
+the directory structure of the Emacs installation on Windows.  It is
+now the same as on GNU and Unix systems.  In particular, the auxiliary
+programs, such as cmdproxy.exe and hexl.exe, are in
+libexec/emacs/VERSION/i686-pc-mingw32 (where VERSION is the Emacs
+version), version-independent site-lisp is in share/emacs/site-lisp,
+version-specific Lisp files are in share/emacs/VERSION/lisp and in
+share/emacs/VERSION/site-lisp, Info docs are in share/info, and data
+files are in share/emacs/VERSION/etc.  (Emacs knows about all these
+directories and will find the files in there automatically; there's no
+need to set any variables due to this change.)
+
+** Emacs on Windows 2000 and later can now access files and directories
+whose names cannot be encoded in the current system codepage.
+
+The new variable `w32-unicode-filenames' controls this feature: if it
+is t, Emacs uses Unicode APIs to pass file names to system calls,
+which lifts the limitation of file names to the current locale.
+
+** Lock files now work on MS-Windows.
+This helps to prevent losing your edits if the same file is being
+edited in another Emacs session or by another user.  See the node
+"Interlocking" in the Emacs User Manual for the details.  To disable
+file locking, customize `create-lockfiles' to nil.
+
+** The "generate a backtrace on fatal error" feature now works on MS-Windows.
+The backtrace is written to the 'emacs_backtrace.txt' file in the
+directory where Emacs was running.
+
+** The `network-interface-list' and `network-interface-info' functions
+are now available on MS-Windows.
+
+** The variable `buffer-file-type' is no longer supported.
+Setting it has no effect, and %t in the mode-line format is ignored.
+Likewise, `file-name-buffer-file-type-alist' is now obsolete, and
+modifying it has no effect.
+
+\f
+* Installation Changes in Emacs 24.3
+
+** The default X toolkit is now Gtk+ version 3.
+If you don't pass `--with-x-toolkit' to configure, or if you use
+`--with-x-toolkit=gtk' or `--with-x-toolkit=yes', configure will try
+to build with Gtk+ version 3, and if that fails, try Gtk+ version 2.
+You can explicitly require a specific version by passing
+`--with-x-toolkit=gtk2' or `--with-x-toolkit=gtk3' to configure.
+
+** New configure option `--enable-link-time-optimization', to utilize
+an appropriate feature provided by GCC since version 4.5.0.
+
+** New configure option `--without-all' to disable most of the optional
+features (image support, etc.) that are normally enabled by default.
+
+** New configure option `--enable-gcc-warnings' (for developing/debugging
+Emacs).  If building with GCC, this enables compile-time checks that
+warn/give errors about possibly-questionable C code.  On a recent GNU
+system there should be no warnings; on older and on non-GNU systems
+the results may be useful to developers.
+
+** The configure option `--enable-use-lisp-union-type' has been
+renamed to `--enable-check-lisp-object-type', as the resulting
+Lisp_Object type no longer uses a union to implement the compile time
+check that this option enables.
+
+** The configure option `--disable-maintainer-mode' has been removed,
+as it was confusingly-named and rarely useful.
+
+** The configure options `--program-prefix', `--program-suffix', and
+`--program-transform-name' apply to more than just the installed
+binaries.  Now they also affect the man pages, icons, and the
+etc/emacs.desktop file; but not the info pages, since this would break
+links between the various manuals.
+
+** You can use `NO_BIN_LINK=t make install' to prevent the installation
+overwriting "emacs" in the installation bin/ directory with a link
+to "emacs-VERSION".
+
+** Emacs uses libtinfo in preference to libncurses, if available.
+
+** On FreeBSD and NetBSD, configure no longer adds /usr/local/lib and
+/usr/pkg/lib to the linker search path.  You must add them yourself if
+you want them.
+
+** The standalone scripts `rcs-checkin' and `vcdiff' have been removed
+(from the bin and libexec directories, respectively).  The former is
+no longer relevant, the latter is replaced by lisp (in vc-sccs.el).
+
+\f
+* Startup Changes in Emacs 24.3
+
+** Emacs no longer searches for `leim-list.el' files beneath the standard
+lisp/ directory.  There should not be any there anyway.  If you have
+been adding them there, put them somewhere else; e.g., site-lisp.
+
+** The `--no-site-lisp' command line option now works for Nextstep builds.
+
+\f
+* Changes in Emacs 24.3
+
+** Help
+
+*** `C-h f' (`describe-function') can now perform autoloading.
+When this command is called for an autoloaded function whose docstring
+contains a key substitution construct, that function's library is
+automatically loaded, so that the documentation can be shown
+correctly.  To disable this, set `help-enable-auto-load' to nil.
+
+*** `C-h f' now reports previously-autoloaded functions as "autoloaded",
+even after their associated libraries have been loaded (and the
+autoloads have been redefined as functions).
+
+** ImageMagick
+
+*** Images displayed via ImageMagick now support transparency and the
+:background image specification property.
+
+*** When available, ImageMagick support is automatically enabled.
+It is no longer necessary to call `imagemagick-register-types'
+explicitly to install ImageMagick image types; that function is called
+automatically at startup, or when customizing an imagemagick- option.
+
+*** Setting `imagemagick-types-inhibit' to t now disables the use of
+ImageMagick to view images.  (You must call `imagemagick-register-types'
+afterwards if you do not use customize to change this.)
+
+*** The new variable `imagemagick-enabled-types' also affects which
+ImageMagick types are treated as images.  The function
+`imagemagick-filter-types' returns the list of types that will be
+treated as images.
+
+** Minibuffer
+
+*** In minibuffer filename prompts, `C-M-f' and `C-M-b' now move to the
+next and previous path separator, respectively.
+
+*** `minibuffer-electric-default-mode' can shorten "(default ...)" to "[...]"
+in minibuffer prompts.  Just set `minibuffer-eldef-shorten-default'
+non-nil before enabling the mode.
+
+** Mode line
+
+*** New option `mode-line-default-help-echo' specifies the help text
+(shown in a tooltip or in the echo area) for any part of the mode line
+that does not have its own specialized help text.
+
+*** You can now click mouse-3 in the coding system indicator to invoke
+`set-buffer-file-coding-system'.
+
+** Server and client
+
+*** emacsclient now obeys string values for `initial-buffer-choice',
+if it is told to open a new frame without specifying any file to visit
+or expression to evaluate.
+
+*** New option `server-auth-key' specifies a shared server key.
+
+** Emacs now generates backtraces on fatal errors.
+On encountering a fatal error, Emacs now outputs a textual description
+of the fatal signal, and a short backtrace on platforms like glibc
+that support backtraces.
+
+** `C-x C-q' is now bound to the new minor mode `read-only-mode'.
+This minor mode replaces `toggle-read-only', which is now obsolete.
+
+** Most `y-or-n' prompts now allow you to scroll the selected window.
+Typing `C-v' or `M-v' at a y-or-n prompt scrolls forward or backward
+respectively, without exiting from the prompt.
+
+** In the Package Menu, newly-available packages are listed as "new",
+and sorted above the other "available" packages by default.
+
+** If your Emacs was built from a repository checkout, the new variable
+`emacs-bzr-version' contains information about the bzr revision used.
+
+** New option `create-lockfiles' specifies usage of lockfiles.
+It defaults to t.  Changing it to nil inhibits the creation of lock
+files (use this with caution).
+
+** New option `enable-remote-dir-locals', if non-nil, allows directory-local
+variables on remote hosts.
+
+** The entry for PCL-CVS has been removed from the Tools menu.
+The PCL-CVS commands are still available via the keyboard.
+
+** Using "unibyte: t" in Lisp source files is obsolete.
+Use "coding: raw-text" instead.
+
+** In the buffer made by `M-x report-emacs-bug', the `C-c m' binding
+has been changed to `C-c M-i' (`report-emacs-bug-insert-to-mailer').
+The previous binding, introduced in Emacs 24.1, was a mistake, because
+`C-c LETTER' bindings are reserved for user customizations.
+
+** Internationalization
+
+*** New language environment: Persian.
+
+*** New input method `vietnamese-vni'.
+
+** Nextstep (GNUstep / Mac OS X) port
+
+*** Support for fullscreen and the frame parameter fullscreen.
+
+*** A file dialog is used for open/save operations initiated from the
+menu/toolbar.
+
+\f
+* Editing Changes in Emacs 24.3
+
+** Search and Replace
+
+*** Non-regexp Isearch now performs "lax" space matching.
+Each sequence of spaces in the supplied search string may match any
+sequence of one or more whitespace characters, as specified by the
+variable `search-whitespace-regexp'.  (This variable is also used by a
+similar existing feature for regexp Isearch.)
+
+*** New Isearch command `M-s SPC' toggles lax space matching.
+This applies to both ordinary and regexp Isearch.
+
+*** New option `replace-lax-whitespace'.
+If non-nil, `query-replace' uses flexible whitespace matching too.
+The default is nil.
+
+*** Global `M-s _' starts a symbol (identifier) incremental search,
+and `M-s _' in Isearch toggles symbol search mode.
+`M-s c' in Isearch toggles search case-sensitivity.
+
+** Navigation commands
+
+*** New binding `M-g c' for `goto-char'.
+
+*** New binding `M-g TAB' for `move-to-column'.
+
+*** `M-g TAB' (`move-to-column') prompts for a column number if called
+interactively with no prefix arg.  Previously, it moved to column 1.
+
+** New option `yank-handled-properties' allows processing of text
+properties on yanked text, in ways that are more general than just
+removing them (as is done by `yank-excluded-properties').
+
+** New option `delete-trailing-lines' specifies whether
+M-x delete-trailing-whitespace should delete trailing lines at the end
+of the buffer.  It defaults to t.
+
+** `C-u M-=' now counts lines/words/characters in the entire buffer.
+
+** `C-x 8 RET' is now bound to `insert-char', which is now a command.
+`ucs-insert' is now an obsolete alias for `insert-char'.
+
+** The `z' key no longer has a binding in most special modes.
+It used to be bound to `kill-this-buffer', but `z' is too easy to
+accidentally type.
+
+** New command `C-x r M-w' (`copy-rectangle-as-kill').
+It copies the region-rectangle as the last rectangle kill.
+
+** Registers
+
+*** `C-x r +' is now overloaded to invoke `append-to-register'.
+
+*** New option `register-separator' specifies the register containing
+the text to put between collected texts for use with
+M-x append-to-register and M-x prepend-to-register.
+
+\f
+* Changes in Specialized Modes and Packages in Emacs 24.3
+
+** Common Lisp emulation (CL)
+
+*** CL's main entry is now (require 'cl-lib).
+`cl-lib' is like the old `cl' except that it uses the namespace cleanly;
+i.e., all its definitions have the "cl-" prefix (and internal definitions
+use the "cl--" prefix).
+
+If `cl' provided a feature under the name `foo', then `cl-lib'
+provides it under the name `cl-foo' instead; with the exceptions of the
+few `cl' definitions that had to use `foo*' to avoid conflicts with
+pre-existing Elisp entities.  These have been renamed to `cl-foo'
+rather than `cl-foo*'.
+
+The old `cl' is now deprecated and is mainly just a bunch of aliases that
+provide the old, non-prefixed names.  Some exceptions are listed below:
+
+*** `cl-flet' is not like `flet' (which is deprecated).
+Instead it obeys the behavior of Common-Lisp's `flet'.
+In particular, in cl-flet function definitions are lexically scoped,
+whereas in flet the scoping is dynamic.
+
+*** `cl-labels' is slightly different from `labels'.
+The difference is that it relies on the `lexical-binding' machinery
+(as opposed to the `lexical-let' machinery used previously) to capture
+definitions in closures, so such closures will only work if `lexical-binding'
+is in use.
+
+*** `cl-letf' is not exactly like `letf'.
+The only difference is in details that relate to some deprecated usage
+of `symbol-function' in place forms.
+
+*** `progv' was rewritten to use the `let' machinery.
+A side effect is that variables without corresponding values are bound
+to nil rather than being made unbound.
+
+*** The following methods of extending `setf' are obsolete
+(use features from gv.el instead):
+`define-modify-macro' (use `gv-letplace')
+`defsetf' (use `gv-define-simple-setter' or `gv-define-setter')
+`define-setf-expander' (use `gv-define-setter' or `gv-define-expander')
+`get-setf-method' no longer exists (see "Incompatible Lisp Changes")
+
+** Diff mode
+
+*** Changes are now highlighted using the same color scheme as in
+modern VCSes.  Deletions are displayed in red (new faces
+`diff-refine-removed' and `smerge-refined-removed', and new definition
+of `diff-removed'), insertions in green (new faces `diff-refine-added'
+and `smerge-refined-added', and new definition of `diff-added').
+
+*** The variable `diff-use-changed-face' defines whether to use the
+face `diff-changed', or `diff-removed' and `diff-added' to highlight
+changes in context diffs.
+
+*** The new command `diff-delete-trailing-whitespace' removes trailing
+whitespace introduced by a diff.
+
+** Ediff now uses the same color scheme as Diff mode.
+
+** Python mode
+
+A new version of python.el, which provides several new features, including:
+per-buffer shells, better indentation, Python 3 support, and improved
+shell-interaction compatible with iPython (and virtually any other
+text based shell).
+
+*** Some user options have been replaced/renamed, including (old -> new):
+**** python-indent -> python-indent-offset
+**** python-guess-indent -> python-indent-guess-indent-offset
+**** python-pdbtrack-do-tracking-p -> python-pdbtrack-activate
+**** python-use-skeletons -> python-skeleton-autoinsert
+
+*** Some user options have been removed, including:
+
+**** `python-indent-string-contents': Strings are never indented.
+
+**** `python-honour-comment-indentation':
+Comments are always considered as indentation markers.
+
+**** `python-continuation-offset': Indentation is automatically
+calculated in a pep8 compliant way depending on the context.
+
+**** `python-shell-prompt-alist', `python-shell-continuation-prompt-alist':
+Have no direct mapping as the shell interaction is completely different.
+
+**** `python-python-command', `python-jython-command':
+Replaced by `python-shell-interpreter'.
+
+**** `inferior-python-filter-regexp', `python-remove-cwd-from-path',
+`python-pdbtrack-minor-mode-string', `python-source-modes':
+No longer relevant.
+
+*** Some commands have been replaced (old -> new):
+**** python-insert-class -> python-skeleton-class
+**** python-insert-def -> python-skeleton-def
+**** python-insert-for -> python-skeleton-for
+**** python-insert-if -> python-skeleton-if
+**** python-insert-try/except -> python-skeleton-try
+**** python-insert-try/finally -> python-skeleton-try
+**** python-insert-while -> python-skeleton-while
+**** python-find-function -> python-nav-jump-to-defun
+**** python-next-statement -> python-nav-forward-sentence
+**** python-previous-statement -> python-nav-backward-sentence
+**** python-beginning-of-defun-function -> python-nav-beginning-of-defun
+**** python-end-of-defun-function -> python-nav-end-of-defun
+**** python-send-buffer -> python-shell-send-buffer
+**** python-send-defun -> python-shell-send-defun
+**** python-send-region -> python-shell-send-region
+**** python-send-region-and-go -> emulate with python-shell-send-region
+and python-shell-switch-to-shell
+**** python-send-string -> python-shell-send-string
+**** python-switch-to-python -> python-shell-switch-to-shell
+**** python-describe-symbol -> python-eldoc-at-point
+
+** D-Bus
+
+*** New variables `dbus-compiled-version' and `dbus-runtime-version'.
+
+*** The D-Bus object manager interface is implemented.
+
+*** Variables of type :(u)int32 and :(u)int64 accept floating points,
+if their value does not fit into Emacs's integer range.
+
+*** The function `dbus-call-method' is now non-blocking.
+It can be interrupted by `C-g'.  `dbus-call-method-non-blocking' is obsolete.
+
+*** Signals can also be sent as unicast messages.
+
+*** The argument list of `dbus-register-signal' has been extended,
+according to the new match rule types of D-Bus.
+
+*** `dbus-init-bus' supports private connections.
+
+*** There is a new function `dbus-setenv'.
+
+** `desktop-path' no longer includes the "." directory.
+Desktop files are now located in ~/.emacs.d by default.
+
+** Dired
+
+*** `dired-do-async-shell-command' executes each file sequentially
+if the command ends in `;' (when operating on multiple files).
+Otherwise, it executes the command on each file in parallel.
+
+*** Typing `M-n' in the minibuffer of `dired-do-chmod', `dired-do-chgrp',
+`dired-do-chown', and `dired-do-touch' yanks the attributes of the
+file at point.
+
+*** When the region is active, `m' (`dired-mark'), `u' (`dired-unmark'),
+`DEL' (`dired-unmark-backward'), and `d' (`dired-flag-file-deletion')
+mark/unmark/flag all files in the active region.
+
+*** The minibuffer default for `=' (`dired-diff') has changed.
+It is now the backup file for the file at point, if one exists.
+In Transient Mark mode the default is the file at the active mark.
+
+*** `M-=' is no longer bound to `dired-backup-diff' in Dired buffers.
+The global binding for `M-=', `count-words-region' is in effect.
+
+** ERC
+
+*** New module "notifications", which can send a notification when you
+receive a private message or your nickname is mentioned.
+
+*** ERC will look up server/channel names via auth-source and use any
+channel keys found.
+
+*** New option `erc-lurker-hide-list', similar to `erc-hide-list', but
+only applies to messages sent by lurkers.
+
+** reStructuredText mode
+
+*** Keybindings (see `C-c C-h'), TAB indentation, filling and auto-filling,
+fontification, comment handling, and customization have all been revised
+and improved.
+
+*** Support for `imenu' and `which-function-mode'.
+
+*** The reStructuredText syntax is more closely covered.
+Sphinx support has been improved.
+
+*** `rst-insert-list' inserts new list or continues existing lists.
+
+*** A negative prefix argument always works for `rst-adjust'.
+
+*** The window configuration is reset after displaying a TOC.
+
+*** The constant `rst-version' describes the rst.el package version.
+
+** Ruby mode
+
+*** Support for percent literals and recognition of regular expressions
+in method calls without parentheses with more methods, including Cucumber
+steps definitions.
+
+*** Improved syntax highlighting and indentation.
+
+*** New command `ruby-toggle-block', bound to `C-c {'.
+
+*** Some non-standard keybindings/commands have been removed:
+
+**** `ruby-electric-brace'; use `electric-indent-mode' instead.
+
+**** `ruby-mark-defun'; use `mark-defun'.
+
+**** `ruby-beginning-of-defun' and `ruby-end-of-defun' are replaced by
+appropriate settings for the variables `beginning-of-defun-function'
+and `end-of-defun-function'.
+
+**** Non-standard keybindings for `backward-kill-word', `comment-region',
+`reindent-then-newline-and-indent' and `newline' have been removed.
+
+** Shell Script mode
+
+*** Pairing of parens/quotes uses `electric-pair-mode' instead of skeleton-pair.
+
+*** `sh-electric-here-document-mode' now controls auto-insertion of here-docs.
+
+*** `sh-use-smie' lets you choose a new indentation and navigation code.
+
+** VHDL mode
+
+*** The free software compiler GHDL is supported (and now the default).
+
+*** Support for the VHDL-AMS packages has been added/updated.
+
+*** Updated to the 2002 revision of the VHDL standard.
+
+*** Accepts \r and \f as whitespace.
+
+** Apropos
+
+*** The faces used by Apropos are now directly customizable.
+These faces are named `apropos-symbol', `apropos-keybinding', and so on;
+see the `apropos' Custom group for details.
+
+*** The old options whose values specified faces to use have been removed
+(i.e. `apropos-symbol-face', `apropos-keybinding-face', `apropos-label-face',
+`apropos-match-face' and `apropos-property-face'.).
+
+** Buffer Menu
+
+*** This package has been rewritten to use Tabulated List mode.
+
+*** Option `Buffer-menu-buffer+size-width' is now obsolete.
+Use `Buffer-menu-name-width' and `Buffer-menu-size-width' instead.
+
+** Calc
+
+*** Algebraic simplification mode is now the default.
+To restrict to the limited simplifications given by the former
+default simplification mode, use `m I'.
+
+** Calendar
+
+*** You can customize the header text that appears above each calendar month.
+See the variable `calendar-month-header'.
+
+*** New LaTeX calendar style, produced by `cal-tex-cursor-week2-summary'.
+
+*** The calendars produced by cal-html include holidays.
+Customize `cal-html-holidays' to change this.
+
+** CEDET
+
+*** The major modes from the parser generators "Bovine" and "Wisent"
+are now properly integrated in Emacs.  The file suffixes ".by" and ".wy"
+are in `auto-mode-alist', and the corresponding manuals are included.
+
+*** EDE
+
+**** Menu support for the "Configuration" feature.  This allows users to
+choose the active configuration (such as debug or install) from the menu.
+
+**** New command `ede-set' to interactively set project-local variables.
+
+**** Support for compiling, debugging, and running in "generic" projects.
+
+**** Autoconf editing support for M4 macros with complex arguments.
+
+**** Compilation support for the "linux" project type.
+
+**** "simple" projects have been removed; use "generic" projects instead.
+
+*** Semantic
+
+**** Support for parsing #include statements inside a namespace in C/C++.
+
+**** Improved support for 'extern "C"' declarations in C/C++.
+
+**** The ability to ignore more common special C/C++ preprocessor symbols,
+such as '__nonnull' and '__asm'.  Add '__cplusplus' macro when parsing C++.
+If available, include cdefs.h as an additional source of preprocessor symbols.
+
+**** Improved C/C++ function pointer parsing.
+
+**** In Python, support for converting imports to include file names.
+
+**** Ability to dynamically determine the Python load path.
+
+**** Support for the Python 'WITH' and 'AT' keywords.
+
+**** Improved tooltip completion.
+
+*** SRecode
+
+**** The SRecode manual is now included.
+
+**** Tag generation supports constructor/destructor settings and system
+include differentiation.
+
+**** Addition of 'Framework' support: Frameworks are specified when a
+particular kind of library (such as Android) is needed in a common language
+mode (like Java).
+
+**** Support for nested templates and let variables override based on priority.
+
+**** Support for merging tables from multiple related modes, such as
+default -> c++ -> arduino.
+
+** Compile has a new option `compilation-always-kill'.
+
+** Customize
+
+*** `custom-reset-button-menu' now defaults to t.
+
+*** Non-option variables are never matched in `customize-apropos' and
+`customize-apropos-options' (i.e., the prefix argument does nothing for
+these commands now).
+
+** Term
+
+*** The variables `term-default-fg-color' and `term-default-bg-color'
+are now deprecated in favor of the customizable face `term'.
+
+*** You can customize how to display ANSI terminal colors and styles
+by customizing the corresponding `term-color-<COLOR>',
+`term-color-underline' and `term-color-bold' faces.
+
+** Tramp
+
+*** The syntax has been extended in order to allow ad-hoc proxy definitions.
+
+*** Remote processes are now also supported on remote MS-Windows hosts.
+
+** URL
+
+*** Structs made by `url-generic-parse-url' have nil `attributes' slot.
+Previously, this slot stored semicolon-separated attribute-value pairs
+appended to some imap URLs, but this is not compatible with RFC 3986.
+So now the `filename' slot stores the entire path and query components,
+and the `attributes' slot is always nil.
+
+*** New function `url-encode-url' for encoding a URI string.
+The `url-retrieve' function now uses this to encode its URL argument,
+in case that is not properly encoded.
+
+** notifications.el supports now version 1.2 of the Notifications API.
+The function `notifications-get-capabilities' returns the supported
+server properties.
+
+** Flymake uses fringe bitmaps to indicate errors and warnings.
+See `flymake-fringe-indicator-position', `flymake-error-bitmap' and
+`flymake-warning-bitmap'.
+
+** The FFAP option `ffap-url-unwrap-remote' can now be a list of strings,
+specifying URL types that should be converted to remote file names at
+the FFAP prompt.  The default is now '("ftp").
+
+** New Ibuffer `derived-mode' filter, bound to `/ M'.
+The old binding for `/ M' (filter by used-mode) is now bound to `/ m'.
+
+** New option `mouse-avoidance-banish-position' specifies where the
+`banish' mouse avoidance setting moves the mouse.
+
+** In Perl mode, new option `perl-indent-parens-as-block' causes non-block
+closing brackets to be aligned with the line of the opening bracket.
+
+** In Proced mode, new command `proced-renice' renices marked processes.
+
+** New option `async-shell-command-buffer' specifies the buffer to use
+for a new asynchronous `shell-command' when the default output buffer
+`*Async Shell Command*' is already in use.
+
+** SQL mode has a new option `sql-db2-escape-newlines'.
+If non-nil, newlines sent to the command interpreter will be escaped
+by a backslash.  The default does not escape the newlines and assumes
+that the sql statement will be terminated by a semicolon.
+
+** New command `tabulated-list-sort', bound to `S' in Tabulated List mode
+(and modes that derive from it), sorts the column at point, or the Nth
+column if a numeric prefix argument is given.
+
+** `which-func-modes' now defaults to t, so Which Function mode, when
+enabled, applies to all applicable major modes.
+
+** `winner-mode-hook' now runs when the mode is disabled, as well as when
+it is enabled.
+
+** Follow mode no longer works by using advice.
+The option `follow-intercept-processes' has been removed.
+
+** `javascript-generic-mode' is now an obsolete alias for `js-mode'.
+
+** Hooks renamed to avoid obsolete "-hooks" suffix:
+*** semantic-lex-reset-hooks -> semantic-lex-reset-functions
+*** semantic-change-hooks -> semantic-change-functions
+*** semantic-edits-new-change-hooks -> semantic-edits-new-change-functions
+*** semantic-edits-delete-change-hooks -> semantic-edits-delete-change-functions
+*** semantic-edits-reparse-change-hooks -> semantic-edits-reparse-change-functions
+*** semanticdb-save-database-hooks -> semanticdb-save-database-functions
+*** c-prepare-bug-report-hooks -> c-prepare-bug-report-hook
+*** rcirc-sentinel-hooks -> rcirc-sentinel-functions
+*** rcirc-receive-message-hooks -> rcirc-receive-message-functions
+*** rcirc-activity-hooks -> rcirc-activity-functions
+*** rcirc-print-hooks -> rcirc-print-functions
+*** dbus-event-error-hooks -> dbus-event-error-functions
+*** eieio-pre-method-execution-hooks -> eieio-pre-method-execution-functions
+*** checkdoc-style-hooks -> checkdoc-style-functions
+*** checkdoc-comment-style-hooks -> checkdoc-comment-style-functions
+*** archive-extract-hooks -> archive-extract-hook
+*** filesets-cache-fill-content-hooks -> filesets-cache-fill-content-hook
+*** hfy-post-html-hooks -> hfy-post-html-hook
+*** nndiary-request-create-group-hooks -> nndiary-request-create-group-functions
+*** nndiary-request-update-info-hooks -> nndiary-request-update-info-functions
+*** nndiary-request-accept-article-hooks -> nndiary-request-accept-article-functions
+*** gnus-subscribe-newsgroup-hooks -> gnus-subscribe-newsgroup-functions
+
+** Obsolete packages
+
+*** assoc.el
+In most cases, assoc+member+push+delq work just as well.
+And in any case it's just a terrible package: ugly semantics, terrible
+inefficiency, and not namespace-clean.
+*** bruce.el
+*** cust-print.el
+*** ledit.el
+*** mailpost.el
+*** mouse-sel.el
+*** patcomp.el
+
+\f
+* Incompatible Lisp Changes in Emacs 24.3
+
+** Docstrings starting with `*' no longer indicate user options.
+Only variables defined using `defcustom' are considered user options.
+The function `user-variable-p' is now an obsolete alias for
+`custom-variable-p'.
+
+** The return values of `defalias', `defun' and `defmacro' have changed,
+and are now undefined.  For backwards compatibility, `defun' and
+`defmacro' currently return the name of the newly defined
+function/macro, but this should not be relied upon.
+
+** `random' by default now returns a different random sequence in
+every Emacs run.  Use `(random S)', where S is a string, to set the
+random seed to a value based on S, in order to get a repeatable
+sequence in later calls.
+
+** If the NEWTEXT arg to `replace-match' contains a substring "\?",
+that substring is inserted literally even if the LITERAL arg is
+non-nil, instead of causing an error to be signaled.
+
+** `select-window' now always makes the window's buffer current.
+It does so even if the window was selected before.
+
+** The function `x-select-font' can return a font spec, instead of a
+font name as a string.  Whether it returns a font spec or a font name
+depends on the graphical library.
+
+** `face-spec-set' no longer sets frame-specific attributes when the
+third argument is a frame (that usage was obsolete since Emacs 22.2).
+
+** `set-buffer-multibyte' now signals an error in narrowed buffers.
+
+** The CL package's `get-setf-method' function no longer exists.
+Generalized variables are now part of core Emacs Lisp, and implemented
+differently to the way cl.el used to do it.  It is not possible to
+define a compatible replacement for `get-setf-method'.  See the file
+gv.el for internal details of the new implementation.
+
+** The arguments of `dbus-register-signal' are no longer just strings,
+but keywords or keyword-string pairs.  The old argument list will
+still be supported for Emacs 24.x.
+
+** Miscellaneous name changes
+Some Lisp symbols have been renamed to correct their spelling,
+or to be more consistent with standard Emacs terminology.
+
+*** Renamed functions
+**** hangul-input-method-inactivate -> hangul-input-method-deactivate
+**** inactivate-input-method -> deactivate-input-method
+**** quail-inactivate -> quail-deactivate
+**** robin-inactivate -> robin-deactivate
+**** viper-inactivate-input-method -> viper-deactivate-input-method
+**** viper-inactivate-input-method-action ->
+     viper-deactivate-input-method-action
+**** ucs-input-inactivate -> ucs-input-deactivate
+
+*** Renamed hooks
+The old hooks are still supported for backward compatibility, but they
+are deprecated and will be removed eventually.
+**** input-method-inactivate-hook -> input-method-deactivate-hook
+**** robin-inactivate-hook -> robin-deactivate-hook
+**** quail-inactivate-hook -> quail-deactivate-hook
+
+*** Renamed variables
+**** follow-deactive-menu -> follow-inactive-menu
+**** inactivate-current-input-method-function ->
+     deactivate-current-input-method-function
+
+** Some obsolete functions, variables, and faces have been removed:
+*** `last-input-char', `last-command-char', `unread-command-char'
+*** `facemenu-unlisted-faces'
+*** `rmail-decode-mime-charset'
+*** `iswitchb-read-buffer'
+*** `sc-version', `sc-submit-bug-report'
+*** `set-char-table-default'
+*** `string-to-sequence' (use `string-to-list' or `string-to-vector')
+*** `compile-internal'
+*** `modeline'
+*** `mode-line-inverse-video'
+*** `follow-mode-off-hook'
+*** `cvs-commit-buffer-require-final-newline'
+(use `log-edit-require-final-newline' instead)
+*** `cvs-changelog-full-paragraphs'
+(use `log-edit-changelog-full-paragraphs' instead)
+*** `cvs-diff-ignore-marks', `cvs-diff-buffer-name'
+*** `vc-ignore-vc-files' (use `vc-handled-backends' instead)
+*** `vc-master-templates' (use `vc-handled-backends' instead)
+*** `vc-checkout-carefully'
+
+\f
+* Lisp Changes in Emacs 24.3
+
+** CL-style generalized variables are now in core Elisp.
+`setf' is autoloaded; `push' and `pop' accept generalized variables.
+You can define your own generalized variables using `gv-define-simple-setter',
+`gv-define-setter', etc.
+
+** Emacs tries to macroexpand interpreted (non-compiled) files during load.
+This can significantly speed up execution of non-byte-compiled code,
+but can also bump into previously unnoticed cyclic dependencies.
+These are generally harmless: they will simply cause the macro calls
+to be left for later expansion (as before), but will result in a
+warning ("Eager macro-expansion skipped due to cycle") describing the cycle.
+You may wish to restructure your code so this does not happen.
+
+** New sampling-based Elisp profiler.
+Try M-x profiler-start, do some work, and then call M-x profiler-report.
+When finished, use M-x profiler-stop.  The sampling rate can be based on
+CPU time or memory allocations.
+
+** `defun' also accepts a (declare DECLS) form, like `defmacro'.
+The interpretation of the DECLS is determined by `defun-declarations-alist'.
+
+** New macros `setq-local' and `defvar-local'.
+
+** Face underlining can now use a wave.
+
+** `read-regexp' has a new argument HISTORY; the first argument PROMPT
+of `read-regexp' accepts a string ending with a colon and space, and its
+second argument DEFAULTS can be a list of strings accessible via `M-n'
+in the minibuffer ahead of other hard-coded useful regexp-related values.
+More commands use `read-regexp' now to read their regexp arguments.
+
+** Completion
+
+*** New function `completion-table-with-quoting' to handle completion
+in the presence of quoting, such as file completion in shell buffers.
+
+*** New function `completion-table-subvert' to use an existing completion
+table, but with a different prefix.
+
+** Debugger
+
+*** New error type and new function `user-error'.
+These do not trigger the debugger.
+
+*** New option `debugger-bury-or-kill', saying what to do with the
+debugger buffer when exiting debug.
+
+*** Set `debug-on-message' to enter the debugger when a certain
+message is displayed in the echo area.  This can be useful when trying
+to work out which code is doing something.
+
+*** New var `inhibit-debugger', automatically set to prevent accidental
+recursive invocations.
+
+** Window handling
+
+*** New command `fit-frame-to-buffer' adjusts the frame height to
+fit the contents.
+
+*** The command `fit-window-to-buffer' can adjust the frame height
+if the new option `fit-frame-to-buffer' is non-nil.
+
+*** New macro `with-temp-buffer-window', similar to
+`with-output-to-temp-buffer'.
+
+*** `temp-buffer-resize-mode' no longer resizes windows that have been
+reused.
+
+*** New option `switch-to-buffer-preserve-window-point' to restore a
+window's point when switching buffers.
+
+*** New display action alist entries `window-height' and `window-width'
+specify the size of new windows created by `display-buffer'.
+
+*** New display action alist entry `pop-up-frame-parameters', if
+non-nil, specifies frame parameters to give any newly-created frame.
+
+*** New display action alist entry `inhibit-switch-frame', if non-nil,
+tells display action functions to avoid changing which frame is
+selected.
+
+*** New display action alist entry `previous-window', if non-nil,
+specifies window to reuse in `display-buffer-in-previous-window'.
+
+*** New display action functions `display-buffer-below-selected',
+and `display-buffer-in-previous-window'.
+
+*** The functions `get-lru-window', `get-mru-window' and `get-largest-window'
+now accept a third argument to avoid choosing the selected window.
+
+*** Additional values recognized for option `window-combination-limit'.
+
+*** The following variables are obsolete, as they can be replaced by
+appropriate entries in the `display-buffer-alist' function introduced
+in Emacs 24.1:
+**** `dired-shrink-to-fit'
+**** `display-buffer-reuse-frames'
+**** `display-buffer-function'
+**** `special-display-buffer-names'
+**** `special-display-frame-alist'
+**** `special-display-function'
+**** `special-display-regexps'
+
+** Time
+
+*** `current-time-string' no longer requires that its argument's year
+must be in the range 1000..9999.  It now works with any year supported
+by the underlying C implementation.
+
+*** `current-time' now returns extended-format time stamps
+(HIGH LOW USEC PSEC), where the new PSEC slot specifies picoseconds.
+PSEC is typically a multiple of 1000 on current machines.  Other
+functions that use this format, such as `file-attributes' and
+`format-time-string', have been changed accordingly.  Old-format time
+stamps are still accepted.
+
+*** The format of timers in `timer-list' and `timer-idle-list' is now
+[TRIGGERED-P HI-SECS LO-SECS USECS REPEAT-DELAY FUNCTION ARGS IDLE-DELAY PSECS].
+The PSECS slot is new, and uses picosecond resolution.  It can be
+accessed via the new `timer--psecs' accessor.
+
+*** Last-modified time stamps in undo lists now are of the form
+(t HI-SECS LO-SECS USECS PSECS) instead of (t HI-SECS . LO-SECS).
+
+** EIEIO
+
+*** Improved security when handling persistent objects:
+
+**** `eieio-persistent-read' now features optional arguments for specifying
+the class to load, as well as a flag stating whether subclasses are allowed;
+if provided, other classes will be rejected by the reader.  For
+compatibility with existing code, if the class is omitted only a
+warning is issued.
+
+**** New specialized reader for pulling in classes and signaling errors
+without evaluation of suspicious code.
+
+**** All slots that contain objects must have a :type.  Slots with lists
+of objects must use a new type predicate for a list of an object type.
+
+*** Support for `find-function' and similar utilities, through the addition
+of filename support to generated symbols.
+
+** Floating point functions now always return special values like NaN,
+instead of signaling errors, if given invalid args; e.g., (log -1.0).
+Previously, they returned NaNs on some platforms but signaled errors
+on others.  The affected functions are acos, asin, tan, exp, expt,
+log, log10, sqrt, and mod.
+
+** New fringe bitmap `exclamation-mark'.
+
+** Miscellaneous changes to special forms and macros
+
+*** `defun' and `defmacro' are now macros rather than special forms.
+
+*** `kbd' is now a function rather than a macro.
+
+** Miscellaneous new functions
+
+*** `set-temporary-overlay-map' sets up a temporary keymap that
+takes precedence over most other maps for a short while (normally one key).
+
+*** `autoloadp' tests if its argument is an autoloaded object.
+
+*** `autoload-do-load' performs the autoloading operation.
+
+*** `buffer-narrowed-p' tests if the buffer is narrowed.
+
+*** `file-name-base' returns a file name sans directory and extension.
+
+*** `function-get' fetches a function property, following aliases.
+
+*** `posnp' tests if an object is a `posn'.
+
+*** `system-users' returns the user names on the system.
+
+*** `system-groups' returns the group names on the system.
+
+*** `tty-top-frame' returns the topmost frame of a text terminal.
+
+** The following functions and variables are obsolete:
+*** `automount-dir-prefix' (use `directory-abbrev-alist')
+*** `buffer-has-markers-at'
+*** `macro-declaration-function' (use `macro-declarations-alist')
+*** `window-system-version' (provides no useful information)
+*** `dired-pop-to-buffer' (use `dired-mark-pop-up')
+*** `query-replace-interactive'
+*** `font-list-limit' (has had no effect since Emacs < 23)
+
+\f
+* Changes in Emacs 24.3 on Non-Free Operating Systems
+
+** Cygwin builds can use the native MS Windows user interface.
+Pass `--with-w32' to configure.  The default remains the X11 interface.
+
+** Two new functions are available in Cygwin builds:
+`cygwin-convert-file-name-from-windows' and
+`cygwin-convert-file-name-to-windows'.  These functions allow Lisp
+code to access the Cygwin file-name mapping machinery to convert
+between Cygwin and Windows-native file and directory names.
+
+** When invoked with the -nw switch to run on the Windows text-mode terminal,
+Emacs now supports `mouse-highlight', help-echo (in the echo area), and
+`mouse-autoselect-window'.
+
+** On MS Windows Vista and later Emacs now supports symbolic links.
+
+** On MS Windows, you can pass `--without-libxml2' to configure.bat to omit
+support for libxml2, even if its presence is detected.
+
+** On Mac OS X, the Nextstep port requires OS X 10.4 or later.
+
+** On Mac OS X, configure no longer automatically adds the Fink "/sw"
+directories to the search path.  You must add them yourself if you want them.
+
+\f
+* Changes in Emacs 24.2
+
+** This is mainly a bug-fix release.
+
+\f
+* Installation Changes in Emacs 24.1
+
+** Emacs can be compiled with Gtk+ 3.0 if you pass --with-x-toolkit=gtk3
+to configure.  Note that other libraries used by Emacs, RSVG and GConf,
+also depend on Gtk+.  You can disable them with --without-rsvg and
+--without-gconf.
+
+** Emacs can be compiled with GnuTLS support.
+This happens by default if a suitably recent version of the library is
+found at build time.  To prevent this, use the configure option
+`--without-gnutls'.  See below for GnuTLS features.
+
+** Emacs can be compiled with SELinux support.
+This happens by default if a suitably recent version of the library is
+found at build time.  To prevent this, use the configure option
+`--without-selinux'.  See below for SELinux features.
+
+** Emacs can be compiled with ImageMagick support.
+This happens by default if a suitably recent version of the library is
+found at build time.  To prevent this, use the configure option
+`--without-imagemagick'.  See below for ImageMagick features.
+This feature is not available for the Nextstep or MS ports.
+
+** Emacs can be compiled with libxml2 support.
+This happens by default if a suitably recent version of the library is
+found at build time.  To prevent this, use the configure option
+`--without-xml2'.  See below for libxml2 features.
+
+** By default, the installed Info and man pages are compressed.
+You can disable this by configuring --without-compress-info.
+
+** New configure option --with-wide-int.
+With it, Emacs integers typically have 62 bits, even on 32-bit machines.
+On 32-bit hosts, this raises the limit on buffer sizes from about 512 MiB
+to about 2 GiB.
+
+** New configure options: --with-mmdf, --with-mail-unlink, --with-mailhost.
+These provide no new functionality, they just remove the need to edit
+lib-src/Makefile by hand in order to use the associated features.
+
+** New configure option --enable-use-lisp-union-type.
+This is only useful for Emacs developers to debug certain types of bugs.
+This is not a new feature; only the configure flag is new.
+
+** The standalone programs digest-doc and sorted-doc are removed.
+Emacs now uses Lisp commands `doc-file-to-man' and `doc-file-to-info'.
+
+** The standalone program `fakemail' is removed.
+If you need it, feedmail.el provides a superset of the functionality.
+
+\f
+* Startup Changes in Emacs 24.1
+
+** The --unibyte, --multibyte, --no-multibyte, and --no-unibyte
+command line arguments, and the EMACS_UNIBYTE environment variable, no
+longer have any effect.  (They were declared obsolete in Emacs 23.)
+
+** New command line option `--no-site-lisp' removes site-lisp directories
+from load-path.  -Q now implies this.  This option does not affect the
+EMACSLOADPATH environment variable (and hence has no effect for
+Nextstep builds).
+
+\f
+* Changes in Emacs 24.1
+
+** Completion
+
+*** Many packages now use the `completion-at-point' command,
+rather than implementing separate completion commands.
+
+*** `completion-at-point' now handles tags and semantic completion.
+
+*** Completion in a non-minibuffer now tries to detect the end of completion
+and pops down the *Completions* buffer accordingly.
+
+*** New option `completion-cycle-threshold' allows completion cycling.
+
+*** New option `completion-category-overrides' for overriding the
+default completion style in certain circumstances.
+
+*** New completion style `substring'.
+
+*** Completion of buffer names uses `substring' completion by default.
+
+*** The option `widget-complete-field' has been removed.
+
+** Mail changes
+
+*** The first time you try sending mail, Emacs asks for a mail method.
+This is implemented by a new default for `send-mail-function', which
+is `sendmail-query-once'.  This offers to use the smtpmail package, or
+to use the old defaults relying on external mail facilities
+(`sendmail-send-it' on GNU/Linux and other Unix-like systems, and
+`mailclient-send-it' on Windows).
+
+*** Typing `C-c m' in the buffer made by `M-x report-emacs-bug'
+transfers the report to your desktop's preferred mail client, if there
+is one.  This uses either the "xdg-email" utility, or Mac OS's "open"
+command.
+
+*** See Changes in Specialized Modes and Packages for SMTPmail changes
+and Mail mode changes
+
+** Emacs server and client changes
+
+*** New option `server-port' specifies the port for TCP Emacs servers.
+
+*** New emacsclient argument -q/--quiet suppresses some status messages.
+
+*** New emacsclient argument --frame-parameters specifies the frame
+parameters of any newly-created graphical frame.
+
+*** If emacsclient shuts down due to Emacs signaling an error,
+its exit status is 1.
+
+*** New emacsclient argument --parent-id ID.
+This opens a client frame in parent X window ID, via XEmbed, similar
+to the --parent-id argument to Emacs.
+
+** Internationalization changes
+
+*** Emacs now supports display and editing of bidirectional text.
+Right-to-left (RTL) scripts, such as Arabic, Farsi, and Hebrew, are
+displayed in the correct visual order as expected by users of those
+scripts.  The display reordering is a "full bidirectionality" class
+implementation of the Unicode Bidirectional Algorithm (UBA).  Buffers
+with no RTL text should look exactly the same as before.
+
+**** New buffer-local variable `bidi-display-reordering'.
+To disable display reordering in a buffer, change this to nil.
+
+**** New buffer-local variable `bidi-paragraph-direction'.
+If nil (the default), Emacs determines the base direction of each
+paragraph from its text, as specified by the UBA.  Setting the value
+to `right-to-left' or `left-to-right' forces a base direction on each
+paragraph.
+
+Paragraphs with right-to-left base direction are displayed starting at
+the right window edge.
+
+*** Enhanced support for characters with no glyphs in available fonts,
+or, on text terminals, characters that cannot be encoded by the
+terminal coding system.  The new option `glyphless-char-display-control'
+specifies how to display them: as a hexadecimal code in a box, a thin
+1-pixel space, an empty box, etc.
+
+*** New input methods for Farsi and Bulgarian
+(farsi-isiri-9147, farsi-transliterate-banan, bulgarian-alt-phonetic).
+
+*** `nobreak-char-display' now also highlights Unicode hyphen chars
+(U+2010 and U+2011).
+
+*** New Hebrew translation of the Emacs Tutorial.
+Type `C-u C-h t' to choose it in case your language setup doesn't
+automatically select it.
+
+** An Emacs Lisp package manager is now included.
+This is a convenient way to download and install additional packages,
+from a package repository at http://elpa.gnu.org.
+
+*** M-x list-packages shows a list of packages, which can be
+selected for installation.
+
+*** New command `describe-package', bound to `C-h P'.
+
+*** By default, all installed packages are loaded automatically when
+Emacs starts up.  To disable this, set `package-enable-at-startup' to
+nil.  To specify the packages to load, customize `package-load-list'.
+
+** Custom theme changes
+
+*** New command `M-x customize-themes', which provides a convenient
+interface for enabling and disabling Custom themes.
+
+*** New option `custom-theme-load-path' is the load path for themes.
+Emacs no longer looks for Custom themes in `load-path'.  The default
+value of `custom-theme-load-path' says to look for themes in
+`custom-theme-directory', followed by a subdirectory of
+`data-directory' named "themes/", which contains a small selection of
+built-in Custom themes.
+
+*** New option `custom-safe-themes' records known-safe theme files.
+If a theme is not in this list, Emacs queries before loading it, and
+offers to save the theme to `custom-safe-themes' automatically.  By
+default, all themes included in Emacs are treated as safe.
+
+** Improved GTK integration
+
+*** GTK scroll-bars are now placed on the right by default.
+The function `set-scroll-bar-mode' can change this.
+
+*** GTK tool bars can have just text, just images or images and text.
+Customize `tool-bar-style' to choose the style.  On a Gnome desktop,
+the default is taken from desktop settings.
+
+*** GTK tool bars can be placed on any edge of the frame.
+The frame-parameter tool-bar-position controls this.  It takes the
+values top, left, right or bottom.  The Options => Show/Hide menu has
+entries for this.
+
+*** The default colors for selected text (the `region' face) are taken
+from the GTK theme when Emacs is built with GTK.
+
+*** Emacs uses GTK tooltips by default if built with GTK.
+You can disable this by changing `x-gtk-use-system-tooltips' to nil.
+
+** Graphical interface changes
+
+*** On graphical displays, the mode-line no longer ends in dashes.
+Also, the first dash (which does not indicate anything) is just
+displayed as a space.
+
+*** `menu-bar-select-buffer-function' lets you choose another operation
+instead of `switch-to-buffer' when selecting an item in the Buffers menu.
+
+*** Lucid menus and dialogs can display antialiased fonts if Emacs is
+built with Xft.  These fonts can be set via X resources, for example:
+Emacs.pane.menubar.font: Courier-12
+
+** Exiting changes
+
+*** Emacs now calls `kill-emacs' if it receives SIGTERM or SIGHUP,
+or if it receives a SIGINT signal in batch mode.
+
+*** `kill-emacs-hook' is now also run in batch mode.
+Third-party code which adds to `kill-emacs-hook' should check if they
+do the right thing in batch mode.
+
+** Scrolling changes
+
+*** New scrolling commands `scroll-up-command' and `scroll-down-command'
+(bound to C-v/[next] and M-v/[prior]) do not signal errors at top/bottom
+of buffer at first key-press (instead they move to top/bottom of buffer)
+when `scroll-error-top-bottom' is non-nil.
+
+*** New option `scroll-error-top-bottom' (see above).
+
+*** New scrolling commands `scroll-up-line' and `scroll-down-line'
+scroll a line instead of full screen.
+
+*** New property `scroll-command' should be set on a command's symbol to
+define it as a scroll command affected by `scroll-preserve-screen-position'.
+
+*** If you customize `scroll-conservatively' to a value greater than 100,
+Emacs will never recenter point in the window when it scrolls due to
+cursor motion commands or commands that move point (e.f., `M-g M-g').
+Previously, you needed to use `most-positive-fixnum' as the value of
+`scroll-conservatively' to achieve the same effect.
+
+*** "Aggressive" scrolling now honors the scroll margins.
+If you customize `scroll-up-aggressively' or
+`scroll-down-aggressively' and move point off the window, Emacs now
+scrolls the window so as to avoid positioning point inside the scroll
+margin.
+
+** Basic SELinux support has been added.
+This requires Emacs to be linked with libselinux at build time.
+
+*** Emacs preserves the SELinux file context when backing up.
+Also, the function `copy-file' has an extra optional argument for
+preserving SELinux context, and the return value of `backup-buffer'
+now includes the SELinux context.
+
+*** New functions `file-selinux-context' and `set-file-selinux-context'
+get and set the SELinux context of a file.
+
+** Trash changes
+
+*** `delete-by-moving-to-trash' now only affects commands that specify
+trashing.  This avoids inadvertently trashing temporary files.
+
+*** Calling `delete-file' or `delete-directory' with a prefix argument
+now forces true deletion, regardless of `delete-by-moving-to-trash'.
+
+** File- and directory-local variable changes
+
+*** You can stop directory local vars from applying to subdirectories.
+Add an element (subdirs . nil) to the alist portion of any variables
+settings to indicate that the section should not apply to
+subdirectories.
+
+*** Directory local variables can apply to some file-less buffers.
+Affected modes include dired, vc-dir, and log-edit.  For example,
+adding "(diff-mode . ((mode . whitespace)))" to .dir-locals.el will
+turn on `whitespace-mode' for *vc-diff* buffers.  Modes should call
+`hack-dir-local-variables-non-file-buffer' to support this.
+
+*** Using "mode: MINOR-MODE" to enable a minor mode is deprecated.
+Instead, use "eval: (minor-mode 1)".
+
+*** The variable `inhibit-first-line-modes-regexps' has been renamed
+to `inhibit-local-variables-regexps'.  As the name suggests, it now
+applies to ALL file local variables, not just -*- lines.  The
+associated `inhibit-first-line-modes-suffixes' has been renamed in the
+corresponding way.
+
+** Window changes
+
+*** The `quit-window' command now restores the last buffer displayed
+in the quitted window.
+
+*** Resizing an Emacs frame now preserves proportional window sizes,
+modulo restrictions like window minimum sizes and fixed-size windows.
+
+*** The behavior of `display-buffer' is now customizable in detail.
+
+**** New option `display-buffer-base-action' specifies a list of
+user-determined display "actions" (functions and optional arguments
+for choosing the displaying window).
+
+This takes precedence over the default display action, which is
+specified by `display-buffer-fallback-action'.
+
+**** New option `display-buffer-alist' maps buffer name regexps to
+display actions, taking precedence over `display-buffer-base-action'.
+
+*** New option `window-combination-limit'.
+The new option `window-combination-limit' allows to return the space
+obtained for resizing or creating a window more reliably to the window
+from which such space was obtained.
+
+*** New option `window-combination-resize'.
+The new option `window-combination-resize' allows to split a window that
+otherwise cannot be split because it's too small by stealing space from
+other windows in the same combination.  Subsequent resizing or deletion
+of the window will resize all windows in the same combination as well.
+
+*** New option `frame-auto-hide-function' lets you choose between
+iconifying or deleting a frame when burying a buffer in a dedicated
+frame, or quitting a window showing a buffer in a frame of its own.
+
+*** New commands `maximize-window' and `minimize-window'.
+These maximize and minimize the size of a window within its frame.
+
+*** New commands `switch-to-prev-buffer' and `switch-to-next-buffer'.
+These functions allow to navigate through the live buffers that have
+been shown in a specific window.
+
+** Minibuffer changes
+
+*** The inactive minibuffer has its own major mode `minibuffer-inactive-mode'.
+This is handy for minibuffer-only frames, and is also used for the feature
+where mouse-1 pops up *Messages*"', which can now easily be changed.
+
+*** Minibuffers set `truncate-lines' to nil.
+If you want to change the value to something else, you could use
+for example `minibuffer-setup-hook'.
+
+** `auto-mode-case-fold' is now enabled by default.
+
+** `backup-by-copying-when-mismatch' now defaults to t.
+
+** New basic faces `error', `warning', `success'.
+These are used to highlight text indicating failure, caution or
+successful operation.
+
+** New option `list-colors-sort' defines the color sort order
+for `list-colors-display'.
+
+** The variable `focus-follows-mouse' now always defaults to nil.
+
+\f
+* Editing Changes in Emacs 24.1
+
+** Search changes
+
+*** C-y in Isearch is now bound to `isearch-yank-kill', instead of
+`isearch-yank-line'.
+
+*** M-y in Isearch is now bound to `isearch-yank-pop', instead of
+`isearch-yank-kill'.
+
+*** M-s C-e in Isearch is now bound to `isearch-yank-line'.
+
+** New commands `count-words-region' and `count-words'.
+
+*** M-= is bound to `count-words-region', not `count-lines-region'.
+The `count-words-region' command, when called interactively, reports
+the number of lines, words, and characters in the region.  It is a
+superset of the old `count-lines-region', which is now an obsolete
+alias for it.
+
+** The command `just-one-space' (M-SPC), if given a negative argument,
+also deletes newlines around point.
+
+** Deletion changes
+
+*** New option `delete-active-region'.
+If non-nil, [delete] and DEL delete the region if it is active and no
+prefix argument is given.  If set to `kill', those commands kill
+instead.
+
+*** New command `delete-forward-char', bound to [delete].
+This is meant for interactive use, and obeys `delete-active-region'.
+The command `delete-char' does not obey `delete-active-region'.
+
+*** `delete-backward-char' is now a Lisp function.
+Apart from obeying `delete-active-region', its behavior is unchanged.
+However, the byte compiler now warns if it is called from Lisp; Lisp
+callers should use delete-char with a negative argument instead.
+
+*** The option `mouse-region-delete-keys' has been deleted.
+
+** Selection changes.
+
+The default handling of clipboard and primary selections has been
+changed to conform with modern X applications.  In short, most
+commands for killing and yanking text now use the clipboard, while
+mouse commands use the primary selection.
+
+In the following, we provide a list of these changes, followed by a
+list of steps to get the old behavior back if you prefer that.
+
+*** `select-active-regions' now defaults to t.
+Merely selecting text (e.g. with drag-mouse-1) no longer puts it in
+the kill ring.  The selected text is put in the primary selection, if
+the system possesses a separate primary selection facility (e.g. X).
+
+**** `select-active-regions' also accepts a new value, `only'.
+This means to only set the primary selection for temporarily active
+regions (usually made by mouse-dragging or shift-selection);
+"ordinary" active regions, such as those made with C-SPC followed by
+point motion, do not alter the primary selection.
+
+**** `mouse-drag-copy-region' now defaults to nil.
+
+*** mouse-2 is now bound to `mouse-yank-primary'.
+This pastes from the primary selection, ignoring the kill-ring.
+Previously, mouse-2 was bound to `mouse-yank-at-click'.
+
+*** `x-select-enable-clipboard' now defaults to t on all platforms.
+
+*** `x-select-enable-primary' now defaults to nil.
+Thus, commands that kill text or copy it to the kill-ring (such as
+M-w, C-w, and C-k) also use the clipboard---not the primary selection.
+
+**** The "Copy", "Cut", and "Paste" items in the "Edit" menu are now
+exactly equivalent to M-w, C-w, and C-y respectively.
+
+**** Note that on MS-Windows, `x-select-enable-clipboard' was already
+non-nil by default, as Windows does not support the primary selection
+between applications.
+
+*** To return to the previous behavior, do the following:
+
+**** Change `select-active-regions' to nil.
+**** Change `mouse-drag-copy-region' to t.
+**** Change `x-select-enable-primary' to t (on X only).
+**** Change `x-select-enable-clipboard' to nil.
+**** Bind `mouse-yank-at-click' to mouse-2.
+
+*** Support for X cut buffers has been removed.
+
+*** X clipboard managers are now supported.
+To inhibit this, change `x-select-enable-clipboard-manager' to nil.
+
+** New command `C-x r N' (`rectangle-number-lines') numbers the lines
+in the current rectangle.  With a prefix argument, this prompts for a
+number to count from and for a format string.
+
+** `redisplay-dont-pause' now defaults to t.
+This makes Emacs feel more responsive to editing commands that arrive
+at high rate, e.g. if you lean on some key, because stopping redisplay
+in the middle (when this variable is nil) forces more expensive
+updates later on, and Emacs appears to be unable to keep up.
+
+** The behavior of <TAB> for active regions in Text mode has changed.
+In Text and related modes, typing <TAB> (`indent-for-tab-command')
+when the region is active causes Emacs to indent all the lines in the
+region, aligning them with the line previous to the first line in the
+region (or with the left margin if there is no previous line).
+
+** When `occur' is called with a prefix argument, matching strings are
+collected into the `*Occur*' buffer without line numbers.  If there
+are parenthesized subexpressions in the specified regexp, `occur'
+reads replacement text that may contain \\& and \\N whose convention
+follows `replace-match'.
+
+\f
+* Changes in Specialized Modes and Packages in Emacs 24.1
+
+** Archive Mode has basic support for browsing and updating 7z archives.
+
+** BibTeX mode
+
+*** BibTeX mode now supports biblatex.
+Use the variable `bibtex-dialect' to select different BibTeX dialects.
+`bibtex-entry-field-alist' is now an obsolete alias for
+`bibtex-BibTeX-entry-alist'.
+
+*** New command `bibtex-search-entries', bound to C-c C-a.
+
+*** New `bibtex-entry-format' option `sort-fields', disabled by default.
+
+*** New variable `bibtex-search-entry-globally'.
+
+** Browse-url
+
+*** New option `browse-url-mailto-function' specifies how to handle "mailto:"s.
+
+*** The default browser used by the package is now the "xdg-open" program,
+on platforms that support it.  This calls your desktop's preferred browser.
+
+** Calc
+
+*** Support for musical notes.
+
+*** Support for logarithmic units.
+
+*** No longer uses the tex prefix for TeX specific unit names when
+using TeX or LaTeX mode.
+
+*** New option to highlight selections using faces.
+
+*** `calc-histogram' has the option of using a vector to determine the bins.
+
+*** New "O" option prefix.
+
+*** Use the "O" prefix to "d r" (`calc-radix') to turn on twos-complement mode.
+
+** Calendar, Diary, and Appt
+
+*** Diary entries can contain non-printing "comments".
+See the variable `diary-comment-start'.
+
+*** Appointments can specify their individual warning times.
+See the variable `appt-warning-time-regexp'.
+
+*** The function specified by `appt-disp-window-function' may be passed
+lists of arguments if multiple appointments are due at similar times.
+If you are using a custom function for this, you should update it.
+
+*** New function `diary-hebrew-birthday'.
+
+*** Elements of `calendar-day-abbrev-array' and `calendar-month-abbrev-array'
+may no longer be nil, but must all be strings.
+
+*** The obsolete (since Emacs 22.1) method of enabling the appt
+package by adding `appt-make-list' to `diary-hook' has been removed.
+Use `appt-activate' instead.
+
+*** Some appt variables (obsolete since Emacs 22.1) have been removed:
+appt-issue-message (use the function appt-activate)
+appt-visible/appt-msg-window (use the variable appt-display-format)
+
+*** Some diary function aliases (obsolete since Emacs 22.1) have been removed:
+view-diary-entries, list-diary-entries, show-all-diary-entries
+
+** CC Mode
+
+*** New feature to "guess" the style in an existing buffer.
+The main entry point is M-x c-guess.
+
+*** Java Mode now supports Java 5.0 (Tiger) and 6 (Mustang).
+
+*** `c-beginning-of-defun' and `c-end-of-defun' now respect nested scopes.
+Thus C-M-a will, by default, go to the beginning of the immediate function,
+not the top level.
+
+*** "Macros with semicolons" can be registered for correct indentation.
+Where such a macro ends a line (no semicolon) the next statement is no longer
+parsed as a statement continuation.
+
+** Comint and modes derived from it use the standard completion code.
+
+** Compilation mode
+
+*** Compilation mode can be used without Font Lock mode.
+`compilation-parse-errors-function' is now obsolete.
+
+*** New variable `compilation-filter-start', which is bound while
+`compilation-filter-hook' runs.  It records the start position of the
+text inserted by `compilation-filter'.
+
+*** `compilation-error-screen-columns' and `compilation-first-column'
+are obeyed in the editing buffer.  So programming language modes can
+set them, whereas previously only the value in the *Compilation*
+buffer was used.
+
+** Customize
+
+*** Customize buffers now contain a search field.
+The search is performed using `customize-apropos'.
+To turn off the search field, set `custom-search-field' to nil.
+
+*** Options in customize group buffers start out hidden if not customized.
+Use the arrow to the left of the option name to toggle visibility.
+
+*** custom-buffer-sort-alphabetically now defaults to t.
+
+*** The color widget now has a "Choose" button, which allows you to
+choose a color via `list-colors-display'.
+
+** D-Bus
+
+*** It is now possible to access buses other than the default system
+or session bus.
+
+*** The `dbus-register-method' and `dbus-register-property' functions
+optionally do not register names.
+
+*** The new function `dbus-register-service' registers a known service
+name on a D-Bus without also registering a property or a method.
+
+** Dired-x
+
+*** C-x C-j (`dired-jump') and C-x 4 C-j (`dired-jump-other-window'),
+if called with a prefix argument, read a file name from the minibuffer
+instead of using the current buffer.
+
+*** The "dired local variables" feature of Dired-x is obsolete.
+The standard directory local variables feature replaces it.
+
+** ERC changes
+
+*** New options `erc-autojoin-timing' and `erc-autojoin-delay',
+controlling attempts to autojoin a channel.
+
+*** New variable `erc-coding-system-precedence': If we use `undecided'
+as the server coding system, this variable will then be consulted.
+The default is to decode strings that can be decoded as utf-8 as
+utf-8, and do the normal `undecided' decoding for the rest.
+
+** Eshell changes
+
+*** The default value of `eshell-directory-name' has changed
+to be an "eshell" directory in `user-emacs-directory'.
+The old "~/.eshell/" directory is still used if it exists, though.
+
+** gdb-mi
+
+*** The M-x gdb command now uses the GDB Machine Interface protocol.
+It now supports multithread non-stop debugging and simultaneous
+debugging of several threads.
+
+** Image mode
+
+*** RET (`image-toggle-animation') toggles animation, if applicable.
+Animation plays once, unless the option `image-animate-loop' is non-nil.
+
+** Info
+
+*** New command M-x info-display-manual displays a named Info manual.
+If that manual is already visited in some Info buffer, it displays
+that buffer.  (This is handy if you have many manuals in many *info*
+buffers, and don't remember the name of the buffer visiting the manual
+you want to consult.)  Otherwise, it loads and displays the manual.
+
+*** `e' is now bound to `end-of-buffer' rather than to `Info-edit'.
+This is for compatibility with the stand-alone Info reader program,
+and also because `Info-edit' is a rarely used command that is disabled
+by default.
+
+** Mail mode changes (not Message mode)
+
+*** New command M-x mail-add-attachment for adding MIME attachments
+
+*** The command M-x mail-attach-file was renamed to M-x mail-insert-file.
+(Its name is misleading, since it has nothing to do with MIME
+attachments.)  The old name is now an obsolete alias to the new name.
+
+** MH-E has been updated to MH-E version 8.3.1.
+See MH-E-NEWS for details.
+
+** Modula-2 mode provides auto-indentation.
+
+** mpc.el: Can use pseudo tags of the form tag1|tag2 as a union of two tags.
+
+** nXML mode no longer binds C-RET to `nxml-complete'.
+Completion is now performed via `completion-at-point', bound to C-M-i
+or M-TAB.  If `nxml-bind-meta-tab-to-complete-flag' is non-nil (the
+default), this performs tag completion.
+
+** Org mode has been updated to version 7.8.09.
+See ORG-NEWS for details.
+
+** Prolog mode has been completely revamped, with lots of additional
+functionality such as more intelligent indentation, electricity,
+support for more variants, including Mercury, and a lot more.
+
+** Rmail
+
+*** The command `rmail-epa-decrypt' decrypts OpenPGP data
+in the Rmail incoming message.
+
+*** The variable `rmail-message-filter' no longer has any effect.
+This change was made in Emacs 23.1 but was not advertised at the time.
+Try using `rmail-show-message-hook' instead.
+
+** Shell mode
+
+*** M-x shell prompts for the shell path name if the default directory
+is a remote file name and neither the environment variable $ESHELL nor
+the variable `explicit-shell-file-name' is set.
+
+*** TAB is now bound to the standard `completion-at-point' command,
+which now implements the pcomplete rules for shell command completion.
+
+** SMTPmail
+
+*** SMTPmail now uses encrypted connections (via STARTTLS) by default
+if the mail server supports them.  This uses either built-in GnuTLS
+support, or the starttls.el library.  Customize `smtpmail-stream-type'
+to change this.
+
+*** The variable `smtpmail-auth-credentials' has been removed.
+By default, the information is now stored in the file ~/.authinfo.
+This was the default value of smtpmail-auth-credentials.  If you had
+customized smtpmail-auth-credentials to a list of user names and
+passwords, those settings are not used.  During your first connection
+to the smtp server, Emacs will prompt for the user name and password,
+and offer to save them to ~/.authinfo.  Or you can manually copy the
+credentials to ~/.authinfo.  For example, if you had
+
+  (setq smtpmail-auth-credentials
+        '(("mail.example.org" 25 "jim" "s!cret")))
+
+then the equivalent line in ~/.authinfo would be
+
+  machine mail.example.org port 25 login jim password s!cret
+
+See the auth-source manual for more information, e.g. on encrypting
+the credentials file.
+
+*** The variable `smtpmail-starttls-credentials' has been removed.
+If you had that set, you need to put
+
+  machine smtp.whatever.foo port 25 key "~/.my_smtp_tls.key" cert "~/.my_smtp_tls.cert"
+
+in your ~/.authinfo file instead.
+
+*** SMTPmail defaults to using the address in the From: header as the
+SMTP MAIL FROM envelope.  To override this, set `mail-envelope-from'
+to the address you wish to use instead.
+
+** SQL mode
+
+*** New options `sql-port', `sql-connection-alist', `sql-send-terminator',
+and `sql-oracle-scan-on'.
+
+*** New options controlling prompting for login parameters.
+Each supported product has a custom variable `sql-*-login-params',
+which is a list of the parameters to be prompted for before a
+connection is established.
+
+*** The command `sql-product-interactive' now takes a prefix argument,
+which causes it to prompt for an SQL product.
+
+*** Product-specific SQL interactive commands now take prefix arguments.
+These commands (`sql-sqlite', `sql-postgres', `sql-mysql', etc.),
+given a prefix argument, prompt for a name for the SQL interactive
+buffer.  This reduces the need for calling `sql-rename-buffer'.
+
+*** SQL interactive modes suppress command continuation prompts, and
+replace tabs with spaces.  The first change impacts multiple line SQL
+statements entered with C-j between each line, statements yanked into
+the buffer and statements sent with `sql-send-*' functions.  The
+second prevents the MySQL and Postgres interpreters from listing
+object name completions when sent text via `sql-send-*' functions.
+
+*** New command `sql-connect' starts a predefined SQLi session,
+using the login parameters from `sql-connection-alist'.
+
+*** New "Save Connection" menu item in SQLi buffers.
+This gathers the login params specified for the SQLi session, if it
+was not started by a connection, and saves them as a new connection.
+
+*** New commands for listing database objects and details:
+sql-list-all and sql-list-table.
+
+*** An API for manipulating SQL product definitions has been added.
+
+** TeX modes
+
+*** latex-electric-env-pair-mode keeps \begin..\end matched on the fly.
+
+** Tramp
+
+*** New inline access method "ksu" (kerberized su).
+
+*** The following access methods are discontinued: "ssh1_old",
+"ssh2_old", "scp1_old", "scp2_old", "imap", "imaps" and "fish".
+
+*** The user option `remote-file-name-inhibit-cache' controls whether
+remote file attributes are cached for better performance.
+
+*** The option `ange-ftp-binary-file-name-regexp' has changed its
+default value to "".
+
+*** Handlers for `file-selinux-context' and `set-file-selinux-context'
+for remote machines which support SELinux.
+
+** New function `url-queue-retrieve', which behaves like url-retrieve,
+but with limits (`url-queue-parallel-processes', `url-queue-timeout') on
+the degree of parallelism.
+
+** VC and related modes
+
+*** Support for pulling on distributed version control systems.
+The command C-x v + (`vc-pull') runs a "pull" operation, if it is
+supported (currently with Bzr, Git, and Mercurial), to update the
+current branch and working tree.  A prefix argument means to prompt
+the user for specifics, e.g. a pull location.
+
+*** `vc-update' is now an alias for `vc-pull'.
+
+*** Support for merging on distributed version control systems.
+The command C-x v m (`vc-merge') now runs a "merge" operation, if it
+is supported (currently with Bzr, Git, and Mercurial), to merge
+changes from another branch into the current one.  It prompts for
+specifics, e.g. a merge source.
+
+*** New option `vc-revert-show-diff' controls whether `vc-revert'
+shows a diff while querying the user.  It defaults to t.
+
+*** Log entries in some Log View buffers can be toggled to display a
+longer description by typing RET (log-view-toggle-entry-display).
+This is currently supported for Bzr, Git, and Mercurial (to support
+another backend, define a `log-view-expanded-log-entry-function').
+In the Log View buffers made by C-x v L (`vc-print-root-log'), you can
+use this to display the full log entry for the revision at point.
+
+*** New command `vc-ediff' allows visual comparison of two revisions
+of a file similar to `vc-diff', but using ediff backend.
+
+*** The option `vc-initial-comment' was removed in Emacs 23.2, but
+this was not advertised at the time.
+
+*** `vc-toggle-read-only' is an obsolete alias for `toggle-read-only'.
+Since Emacs 23, it has done the same thing as `toggle-read-only', but
+this was not advertised at the time.
+
+** Obsolete modes
+
+*** abbrevlist.el
+
+*** erc-hecomplete.el (use erc-pcomplete.el instead)
+
+*** partial-completion-mode (complete.el) is obsolete.
+You can get a comparable behavior with:
+(setq completion-styles '(partial-completion initials))
+(setq completion-pcm-complete-word-inserts-delimiters t)
+
+*** pc-mode.el is obsolete (CUA mode is much more comprehensive).
+
+*** pgg is obsolete (use EasyPG instead).
+
+*** sregex.el is obsolete, since rx.el is a strict superset.
+
+*** s-region.el and pc-select.el are obsolete.
+They are superseded by shift-select-mode, enabled by default since 23.1.
+
+*** vc-mcvs.el is obsolete (for lack of a maintainer).
+
+** Miscellaneous
+
+*** The Landmark game is now invoked with `landmark', not `lm'.
+Its functions and variables have been similarly renamed.
+
+*** In `ido-file-completion-map', C-v is no longer bound to `ido-toggle-vc'.
+(This interfered with cua-mode.)
+
+*** f90.el has some support for Fortran 2008 syntax.
+
+*** `copyright-fix-years' can optionally convert consecutive years to ranges.
+
+*** New command `nato-region' converts text to NATO phonetic alphabet.
+
+\f
+* New Modes and Packages in Emacs 24.1
+
+** Occur Edit mode applies edits made in *Occur* buffers to the
+original buffers.  It is bound to "e" in Occur mode.
+
+** New global minor mode electric-pair-mode.
+When enabled, typing an open parenthesis automatically inserts the
+matching closing one.
+
+** New global minor mode electric-indent-mode.
+When enabled, typing certain characters triggers reindentation.
+Major modes wishing to use this can set electric-indent-chars or
+electric-indent-functions.
+
+** New global minor mode electric-layout-mode.
+When enabled, typing certain characters automatically inserts newlines.
+Major modes wishing to use this can set electric-layout-rules.
+
+** tabulated-list.el provides a generic major mode for tabulated data,
+from which other modes can be derived.
+
+** pcase.el provides the ML-style pattern matching macro `pcase'.
+
+** secrets.el is an implementation of the Secret Service API, an
+interface to password managers like GNOME Keyring or KDE Wallet.  The
+Secret Service API requires D-Bus for communication.  The command
+`secrets-show-secrets' offers a buffer with a visualization of the
+secrets.
+
+** notifications.el provides an implementation of the Desktop
+Notifications API.  It requires D-Bus for communication.
+
+** soap-client.el supports access to SOAP web services from Emacs.
+soap-inspect.el is an interactive inspector for SOAP WSDL structures.
+
+** New generic mode, xmodmap-generic-mode, for xmodmap files.
+
+** New emacs-lock.el package.
+The previous version has been moved to obsolete/old-emacs-lock.el.
+Now, there is a proper minor mode `emacs-lock-mode'.  Protection
+against exiting Emacs and killing the buffer can be set separately.
+The mechanism for automatically turning off protection for buffers
+with dead inferior processes has been generalized.
+
+\f
+* Incompatible Lisp Changes in Emacs 24.1
+
+** Passing a nil argument to a minor mode function call now ENABLES
+the minor mode unconditionally.  This is so that you can write e.g.
+
+ (add-hook 'text-mode-hook 'foo-mode)
+
+to enable foo-mode in Text mode buffers, removing the need for
+`turn-on-foo-mode' style functions.  This affects all mode commands
+defined by `define-minor-mode'.  If called interactively, the mode
+command still toggles the minor mode.
+
+** The return value of `backup-buffer' has changed.
+It is now a list of three elements, where the second element is a list
+describing the original file's SELinux context.  If Emacs or the
+system lacks SELinux support, the context list is (nil nil nil nil).
+See "Basic SELinux support" above, under "Changes in Emacs 24.1".
+
+** `char-direction-table' and the `char-direction' function were deleted.
+They were buggy and inferior to the new support of bidirectional
+editing introduced in Emacs 24.  If you need the bidirectional
+properties of a character, use `get-char-code-property' with the last
+argument `bidi-class'.
+
+** `copy-directory' now copies the source directory as a subdirectory
+of the target directory, if the latter is an existing directory.  The
+new optional arg COPY-CONTENTS, if non-nil, makes the function copy
+the contents directly into a pre-existing target directory.
+
+** For mouse click input events in the text area, the Y pixel
+coordinate in the POSITION list now counts from the top of the text
+area, excluding any header line.  Previously, it counted from the top
+of the header line.
+
+** Support for "old-style" backquotes, obsolete for 10+ years, has
+been further reduced.  Now a backquote not followed by a space is
+always treated as a "new-style" backquote.  Please remove all
+"old-style" backquotes from your code.  If your code uses backquotes
+as documented in the Elisp manual, and compiles without warning, then
+you have nothing to do in this regard.  Code not following the
+appropriate conventions may fail to compile.
+
+The most common cause of trouble seems to be an old-style backquote
+followed by a newline.  Another cause of trouble is vector notation
+for key sequence notation: instead of [(control ,)] and [(control ')],
+you should write [(control ?,)] and [(control ?')], which will work in
+older Emacsen too.
+
+** The macro `eval-at-startup' was removed in Emacs 23.2, but this
+was not advertised at the time.  The function `custom-initialize-delay'
+replaced all known uses.
+
+** `view-buffer' now treats special mode-class in the same way that
+`view-file' has since Emacs 22 (i.e. it won't enable View mode if the
+major mode is special).
+
+** Menu and tool bar changes
+
+*** During startup, Emacs no longer adds entries for `menu-bar-lines'
+and `tool-bar-lines' to `default-frame-alist' and `initial-frame-alist'.
+With these alist entries omitted, `make-frame' checks the value of the
+variable `menu-bar-mode'/`tool-bar-mode' to determine whether to create
+a menu-bar or tool-bar, respectively.  If the alist entries are added,
+they override the value of `menu-bar-mode'/`tool-bar-mode'.
+
+*** The menu bar bindings's caches are not used any more.
+Use (where-is-internal <def> nil t) instead.
+
+** Regions created by mouse dragging are now normal active regions,
+similar to those created by shift-selection (see Selection changes
+above).  In previous Emacs versions, these regions were delineated by
+`mouse-drag-overlay'; that variable has been removed.
+
+** The fourth argument of `filter-buffer-substring' has been removed.
+If you want to remove text properties from the final result, simply
+pass the result through substring-no-properties.
+
+** cl.el no longer provides `cl-19'.
+
+** The following obsolete functions and aliases have been removed
+(the appropriate new function is given in parentheses; "not needed"
+means you can just remove all calls to the function in question):
+
+*** `comint-kill-output' (`comint-delete-output')
+*** `decompose-composite-char' (`char-to-string')
+*** `outline-visible' (`outline-invisible-p')
+*** `internal-find-face' (`facep')
+*** `internal-get-face' (`facep and check-face')
+*** `frame-update-faces' (not needed)
+*** `frame-update-face-colors' (`frame-set-background-mode')
+*** `x-frob-font-weight' and `x-frob-font-slant' (`make-face-*' functions)
+*** `x-make-font-bold' and `x-make-font-demibold' (`make-face-bold')
+*** `x-make-font-italic' and `x-make-font-oblique' (`make-face-italic')
+*** `x-make-font-bold-italic' (`make-face-bold-italic')
+*** `x-make-font-unbold' (`make-face-unbold')
+*** `x-make-font-unitalic' (`make-face-unitalic')
+*** `mldrag-drag-mode-line' (`mouse-drag-mode-line')
+*** `mldrag-drag-vertical-line' (`mouse-drag-vertical-line')
+*** `iswitchb-default-keybindings' (`iswitchb-mode')
+*** `char-bytes' (== 1)
+*** `isearch-return-char' (`isearch-printing-char')
+*** `make-local-hook' (not needed)
+*** `set-screen-height' (`set-frame-height')
+*** `set-screen-width' (`set-frame-width')
+
+** The following obsolete variables and varaliases have been removed
+(the appropriate new variable is given in parentheses):
+
+*** `checkdoc-minor-keymap' (`checkdoc-minor-mode-map')
+*** `vc-header-alist' (`vc-BACKEND-header')
+*** `directory-sep-char' (== ?/)
+*** `font-lock-defaults-alist' (`font-lock-defaults')
+*** `e' (`float-e').
+
+** The following obsolete files were removed:
+sc.el, x-menu.el, rnews.el, rnewspost.el
+
+** The format of the finder-inf.el file has changed, since the Finder
+mechanism is now based on the package system.  The variable
+`finder-package-info' is replaced by `package--builtins' and
+`finder-keywords-hash'.
+
+** When generating autoloads, `update-directory-autoloads' no longer
+assumes every inspected file is in your `load-path'.  It instead
+generates relative names according to the current `load-path'.
+
+\f
+* Lisp Changes in Emacs 24.1
+
+** Code can now use lexical scoping by default instead of dynamic scoping.
+The `lexical-binding' variable enables lexical scoping for local
+variables.  It is typically set via a file-local variable in the first
+line of the file, in which case it applies to all the code in that
+file.
+
+*** `eval' takes a new optional argument `lexical' to choose the new lexical
+binding instead of the old dynamic binding mode.
+
+*** Lexically scoped interpreted functions are represented with a new form
+of function value which looks like (closure ENV ARGS &rest BODY).
+
+*** New macro `letrec' to define recursive local functions.
+
+*** `defvar' and `defconst' now mark the variable as special (dynamic).
+So do `defcustom' and other forms that call `defvar' as a subroutine.
+
+*** New function `special-variable-p' to check whether a variable is
+declared as dynamically bound.
+
+*** The form ((lambda ...) ...) is deprecated.
+
+** An Emacs Lisp testing tool is now included.
+Emacs Lisp developers can use this tool to write automated tests for
+their code.  See the ERT info manual for details.
+
+** Changes for bidirectional display and editing
+
+*** New function `current-bidi-paragraph-direction'.
+This returns the base direction of the paragraph at point.
+
+*** New function `bidi-string-mark-left-to-right'.
+Given a string containing characters from right-to-left scripts, this
+function returns another string which can be safely inserted into a
+buffer, such that any following text will be always displayed to the
+right of that string.  (This works by appending an invisible Unicode
+"LEFT-TO-RIGHT MARK" character if the argument string might need it.)
+
+This is useful when the buffer has overall left-to-right paragraph
+direction and you need to insert a string whose contents are not known
+in advance, without disrupting the layout of the line.
+
+** Window changes
+
+*** Window tree functions are accessible in Elisp.
+Functions are provided to return the parent, siblings or child windows
+of any window including internal windows (windows not associated with a
+buffer) in the window tree.
+
+**** New function `window-valid-p' gives non-nil for live and internal
+windows.
+
+**** Window manipulation can deal with internal windows.
+Many window handling functions like `split-window', `delete-window', or
+`delete-other-windows' as well as the window resizing functions can now
+act on any window including internal ones.
+
+*** window-total-height/-width vs window-body-height/-width.
+The function `window-height' has been renamed to `window-total-height'
+and `window-width' has been renamed to `window-body-width'.  The old
+names are provided as aliases.  Two new functions `window-total-width'
+and `window-body-height' are provided.
+
+*** Window parameters specific to window handling functions.
+For each window you can specify a parameter to override the default
+behavior of a number of functions like `split-window', `delete-window'
+and `delete-other-windows'.  The variable `ignore-window-parameters'
+allows to ignore processing such parameters.
+
+*** New semantics of third argument of `split-window'.
+The third argument of `split-window' has been renamed to SIDE and can be
+set to any of the values 'below, 'right, 'above, or 'left to make the
+new window appear on the corresponding side of the window that shall be
+split.  Any other value of SIDE will cause `split-window' to split the
+window into two side-by-side windows as before.
+
+*** Window resizing functions.
+A new standard function for resizing windows called `window-resize' has
+been introduced.  This and all other functions for resizing windows no
+longer delete any windows when they become too small.
+
+*** Deleting the selected window now selects the most recently selected
+live window on that frame instead.
+
+*** `adjust-window-trailing-edge' adjustments.
+`adjust-window-trailing-edge' can now deal with fixed-size windows and
+is able to resize other windows if a window adjacent to the trailing
+edge cannot be shrunk any more.  This makes its behavior more similar to
+that of Emacs 21 without compromising, however, its inability to delete
+windows which was introduced in Emacs 22.
+
+*** Window-local buffer lists.
+Windows now have local buffer lists.  This means that removing a buffer
+from display in a window will preferably show the buffer previously
+shown in that window with its previous window-start and window-point
+positions.  This also means that the same buffer may be automatically
+shown twice even if it already appears in another window.
+
+*** `switch-to-buffer' has a new optional argument FORCE-SAME-WINDOW,
+which if non-nil requires the buffer to be displayed in the currently
+selected window, signaling an error otherwise.  If nil, another window
+can be used, e.g. if the selected one is strongly dedicated.
+
+*** `split-window-vertically' and `split-window-horizontally' renamed
+to `split-window-below' and `split-window-right' respectively.
+The old names are kept as aliases.
+
+*** Display actions
+
+**** The second arg to `display-buffer' and `pop-to-buffer' is now
+named ACTION, and takes a display action of the same form as
+`display-buffer-base-action' (see Changes, above).  A non-nil,
+non-list value is treated specially, as the old meaning.
+
+**** New variable `display-buffer-overriding-action'.
+
+**** The procedure of `display-buffer' etc. to choose a window is
+determined by combining `display-buffer-overriding-action',
+`display-buffer-alist', the ACTION arg, `display-buffer-base-action',
+and `display-buffer-fallback-action'.  The second and fourth of these
+are user-customizable variables.
+
+See the docstring of `display-buffer' for details.
+
+*** New functions `window-state-get' and `window-state-put'.
+These functions allow to save and restore the state of an arbitrary
+frame or window as an Elisp object.
+
+** Completion
+
+*** New variable `completion-extra-properties' used to specify extra
+properties of the current completion:
+- :annotate-function, same as the old completion-annotate-function.
+- :exit-function, function to call after completion took place.
+
+*** Functions on `completion-at-point-functions' can return any of the
+properties valid for `completion-extra-properties'.
+
+*** `completion-annotate-function' is obsolete.
+
+*** New `metadata' method for completion tables.  The metadata thus returned
+can specify various details of the data returned by `all-completions':
+- `category' is the kind of objects returned (e.g., `buffer', `file', ...),
+  used to select a style in completion-category-overrides.
+- `annotation-function' to add annotations in *Completions*.
+- `display-sort-function' to specify how to sort entries in *Completions*.
+- `cycle-sort-function' to specify how to sort entries when cycling.
+
+*** `minibuffer-local-filename-must-match-map' is not used any more.
+Instead, the bindings in `minibuffer-local-filename-completion-map'
+are combined with `minibuffer-local-must-match-map'.
+
+*** New variable `completing-read-function' allows overriding the
+behavior of `completing-read'.
+
+** `glyphless-char-display' can now distinguish between graphical and
+text terminal display, via a char-table entry that is a cons cell.
+
+** `pre-command-hook'/`post-command-hook' are not reset to nil on error.
+Instead, the offending function is removed.
+
+** New hook types
+
+*** New function `run-hook-wrapped' for running an abnormal hook by
+passing the hook functions as arguments to a "wrapping" function.
+Like `run-hook-with-args-until-success', it stops at the first
+non-nil return value.
+
+*** New macro `with-wrapper-hook' for running an abnormal hook as a
+set of "wrapping" filters, similar to around advice.
+(A version of this macro was actually added in Emacs 23.2 but was not
+advertised at the time.)
+
+** Debugger changes
+
+*** New macro `condition-case-unless-debug' (this was actually added in
+Emacs 23.1 as condition-case-no-debug, but not advertised)
+
+*** The macro `with-demoted-errors' was added in Emacs 23.1, but not advertised.
+
+*** Variable `stack-trace-on-error' removed.
+
+*** The debugger can now "continue" from an error, which means it will
+jump to the error handler as if the debugger had not been invoked
+instead of jumping all the way to the top-level.
+
+*** Set `debug-on-event' to enter the debugger on events like SIGUSR1.
+This can be useful when `inhibit-quit' is set.
+
+** The new function `server-eval-at' allows evaluation of Lisp forms on
+named Emacs server instances.
+
+** `call-process' and `call-process-region' allow a `(:file "file")' spec
+to redirect STDOUT to a file.
+
+** The function `format-time-string' now supports the %N directive,
+for higher-resolution time stamps.
+
+** New input reading functions
+
+*** New function `read-char-choice' reads a restricted set of
+characters, discarding any inputs not inside the set.
+
+*** The command `read-color' now requires a match for a color name
+or RGB triplet, instead of signaling an error if the user provides
+invalid input.
+
+**** `facemenu-read-color' is now an alias for `read-color'.
+
+** `image-library-alist' is renamed to `dynamic-library-alist'.
+The variable is now used to load all kind of supported dynamic libraries,
+not just image libraries.  The previous name is still available as an
+obsolete alias.
+
+** Syntax parsing changes
+
+*** New variable `syntax-propertize-function'.
+This replaces `font-lock-syntactic-keywords' which is now obsolete.
+This allows syntax-table properties to be set independently from font-lock:
+just call syntax-propertize to make sure the text is propertized.
+Together with this new variable come a new hook
+syntax-propertize-extend-region-functions, as well as two helper functions:
+syntax-propertize-via-font-lock to reuse old font-lock-syntactic-keywords
+as-is; and syntax-propertize-rules which provides a new way to specify
+syntactic rules.
+
+*** Syntax tables support a new "comment style c" additionally to style b.
+
+** New hook `post-self-insert-hook', run after `self-insert-command'.
+
+** frame-local variables cannot be let-bound any more.
+
+** Major and minor mode changes
+
+*** `set-auto-mode' now respects mode: local variables at the end of files,
+as well as those in the -*- line.
+
+*** `prog-mode' is a new major mode from which programming modes
+should be derived.
+
+**** `prog-mode-hook' can be used to enable features for programming
+modes, e.g. (add-hook 'prog-mode-hook 'flyspell-prog-mode) to enable
+on-the-fly spell checking for comments and strings.
+
+*** New hook `change-major-mode-after-body-hook', run by
+`run-mode-hooks' just before any other mode hooks.
+
+*** Enabled globalized minor modes can be disabled in specific major modes.
+If the global mode is global-FOO-mode, then run (FOO-mode -1) in the
+major mode's hook, where FOO-mode toggles the mode on a per-buffer basis.
+
+*** `define-minor-mode' accepts new keywords :variable, :after-hook.
+
+** File-handling changes
+
+*** `delete-file' and `delete-directory' now accept optional arg TRASH.
+Trashing is performed if TRASH and `delete-by-moving-to-trash' are
+both non-nil.  Interactively, TRASH defaults to t, unless a prefix
+argument is supplied (see Trash changes, above).
+
+*** New file predicates: `file-equal-p', `file-in-directory-p'.
+
+** Tool-bars can display separators.
+Tool-bar separators are handled like menu separators in menu-bar maps,
+i.e. via menu entries of the form `(menu-item "--")'.
+
+** Image API
+
+*** Animated images support (currently animated gifs only).
+
+**** `image-animated-p' returns non-nil if an image can be animated.
+
+**** `image-animate' animates a supplied image spec.
+
+**** `image-animate-timer' returns the timer object for an image that
+is being animated.
+
+*** `image-extension-data' has been renamed to `image-metadata'.
+The old name is an obsolete alias to the new one.
+
+*** Image mode can view any image type that ImageMagick supports.
+This requires Emacs to be built with ImageMagick support.
+
+**** New function `imagemagick-types', defined if ImageMagick support
+is enabled, returns a list of image file extensions that your
+ImageMagick installation supports.
+
+**** New function `imagemagick-register-types' enables ImageMagick
+image types in Image mode and in `create-image' and other helper
+functions.
+
+**** New option `imagemagick-types-inhibit' excludes certain
+ImageMagick image types from `imagemagick-register-types'.
+
+**** With ImageMagick support, there are extra Image mode commands to
+resize and rotate images: `image-transform-fit-to-height',
+`image-transform-fit-to-width', `image-transform-set-rotation', and
+`image-transform-set-scale'.
+
+** `compose-mail' now accepts an optional 8th arg, RETURN-ACTION, and
+passes it to the mail user agent function.  This argument specifies an
+action for returning to the caller after finishing with the mail.  For
+example, this is used by Rmail to optionally delete a mail window.
+
+** XML and HTML parsing
+If Emacs is compiled with libxml2 support, there are two new
+functions: `libxml-parse-html-region' (which parses "real world" HTML)
+and `libxml-parse-xml-region' (which parses XML).  Both return an
+Emacs Lisp parse tree.
+
+** Networking and encryption changes
+
+*** `open-network-stream' can now be used to open an encrypted stream.
+It now accepts an optional `:type' parameter for initiating a TLS
+connection, directly or via STARTTLS.  To do STARTTLS, additional
+parameters (`:end-of-command', `:success', `:capabilities-command')
+must also be supplied.
+
+*** New library gnutls.el.
+The new function `gnutls-available-p' returns non-nil if Emacs is
+built with GnuTLS support.  The main entry points are
+`open-gnutls-stream' and `gnutls-negotiate'.  It's easiest to use
+these functions through `open-network-stream', because that can
+upgrade connections through STARTTLS opportunistically or use plain
+SSL, depending on your needs.  For debugging, set `gnutls-log-level'
+greater than 0.
+
+*** New primitive `secure-hash' that supports many secure hash algorithms:
+md5, sha1, sha2, sha224, sha256, sha384, and sha512.  The lisp library
+sha1.el has been removed.  The `sha1' feature is provided by default.
+
+** Isearch
+
+*** New hook `isearch-update-post-hook' that runs in `isearch-update'.
+
+** Progress reporters can now "spin".
+The MIN-VALUE and MAX-VALUE arguments of `make-progress-reporter' can
+now be nil, or omitted.  This makes a "non-numeric" reporter.  Each
+time you call `progress-reporter-update' on that progress reporter,
+with a nil or omitted VALUE argument, the reporter message is
+displayed with a "spinning bar".
+
+** New variable `revert-buffer-in-progress-p' is true while a buffer is
+being reverted, even if the buffer has a local `revert-buffer-function'.
+
+** New variables `delayed-warnings-list' and `delayed-warnings-hook'.
+If delayed-warnings-list is non-nil, the command loop calls
+`delayed-warnings-hook' after `post-command-hook'.  At present, this
+is only used by Emacs on some platforms to display warnings during
+startup, which might otherwise not be noticed.  This uses the
+functions `display-delayed-warnings' and `collapse-delayed-warnings'.
+
+** rx.el has a new `group-n' construct for explicitly numbered groups.
+
+** New function `make-composed-keymap' that constructs a new keymap
+from multiple input maps.  You can use this to make a keymap that
+inherits from multiple maps, eg:
+ (set-keymap-parent newmap (make-composed-keymap othermap parent))
+
+** New function `string-prefix-p'.
+(This was actually added in Emacs 23.2 but was not advertised at the time.)
+
+** New reader macro ## that stands for the empty symbol.
+This means that the empty symbol can now be read back.  Also, #: by itself
+(when not immediately followed by a possible symbol character) stands for
+an empty uninterned symbol.
+
+** New math functions `isnan', `copysign', `frexp', `ldexp'.
+
+** The following functions and variables are obsolete:
+
+*** `tooltip-use-echo-area' is obsolete.
+Rather than setting this to t, disable Tooltip mode instead.
+
+*** buffer-substring-filters is obsolete.
+Use `filter-buffer-substring-functions' instead.
+
+*** `byte-compile-disable-print-circle' is obsolete.
+
+*** `deferred-action-list' and `deferred-action-function' are obsolete.
+Use `post-command-hook' instead.
+
+*** `font-lock-maximum-size' is obsolete.
+
+\f
+* Changes in Emacs 24.1 on Non-Free Operating Systems
+
+** On MS Windows, Emacs warns when using the obsolete init file _emacs,
+and also when HOME is set to C:\ by default.
+
+** New configure.bat options
+
+*** --enable-checking builds Emacs with extra runtime checks.
+
+*** --distfiles specifies files to be included in binary distribution.
+
+*** --without-gnutls disables automatic GnuTLS detection.
+
+*** --lib for general library linkage, works with the USER_LIBS build variable.
+
+** New make target `dist' to create binary distribution for MS Windows.
+
+** The Lisp function `w32-default-color-map' is now obsolete.
+(It is only used internally in the Emacs C code.)
+
+** Customize ns-auto-hide-menu-bar to have the menu-bar hidden, but
+reappear on mouse-over.  (Requires OS X 10.6 or later.)
+
+** On Mac OS X, dragging a file into Emacs visits the file, like on
+other platforms, rather than inserting its contents into the buffer.
+
+\f
+----------------------------------------------------------------------
+This file is part of GNU Emacs.
+
+GNU Emacs is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+\f
+Local variables:
+coding: utf-8
+mode: outline
+paragraph-separate: "[         \f]*$"
+end:
index cea2213a24edc8f66c133bbf00a3106eac03269b..3401f4895e005531245f4370d8edb163d5ba70a6 100644 (file)
@@ -835,6 +835,20 @@ you want to use fcitx with Emacs, you have two choices.  Toggle fcitx
 by another key (e.g. C-\) by modifying ~/.fcitx/config, or be
 accustomed to use C-@ for `set-mark-command'.
 
+*** Link-time optimization with clang doesn't work on Fedora 20.
+
+As of May 2014, Fedora 20 has broken LLVMgold.so plugin support in clang
+(tested with clang-3.4-6.fc20) - `clang --print-file-name=LLVMgold.so'
+prints `LLVMgold.so' instead of full path to plugin shared library, and
+`clang -flto' is unable to find the plugin with the following error:
+
+/bin/ld: error: /usr/bin/../lib/LLVMgold.so: could not load plugin library:
+/usr/bin/../lib/LLVMgold.so: cannot open shared object file: No such file
+or directory
+
+The only way to avoid this is to build your own clang from source code
+repositories, as described at http://clang.llvm.org/get_started.html.
+
 *** M-SPC seems to be ignored as input.
 
 See if your X server is set up to use this as a command
@@ -1233,7 +1247,7 @@ https://bugzilla.xfce.org/show_bug.cgi?id=7588 .
 
 When you start Emacs you may see something like this:
 
-(emacs:2286): LIBDBUSMENU-GTK-CRITICAL **: watch_submenu: assertion 
+(emacs:2286): LIBDBUSMENU-GTK-CRITICAL **: watch_submenu: assertion
 `GTK_IS_MENU_SHELL(menu)' failed
 
 This happens if the Emacs binary has been renamed.  The cause is the Ubuntu
@@ -2534,22 +2548,6 @@ or
 
 (The -R option disables address space randomization.)
 
-*** test-distrib says that the distribution has been clobbered.
-*** or, temacs prints "Command key out of range 0-127".
-*** or, temacs runs and dumps emacs, but emacs totally fails to work.
-*** or, temacs gets errors dumping emacs.
-
-This can be because the .elc files have been garbled.  Do not be
-fooled by the fact that most of a .elc file is text: these are
-binary files and can contain all 256 byte values.
-
-If you have a copy of Emacs whose .elc files have been damaged in this
-way, you should be able to fix it by using:
-
- make bootstrap
-
-to regenerate all the .elc files.
-
 *** temacs prints "Pure Lisp storage exhausted".
 
 This means that the Lisp code loaded from the .elc and .el files during
@@ -2589,27 +2587,6 @@ occurring with older versions of GCC (e.g. 3.3.5).
 This is due to a bug in the bcopy implementation in openSUSE 10.3.
 It is/will be fixed in an openSUSE update.
 
-** Installation
-
-*** On Solaris, use GNU Make when installing an out-of-tree build
-
-The Emacs configuration process allows you to configure the
-build environment so that you can build emacs in a directory
-outside of the distribution tree.  When installing Emacs from an
-out-of-tree build directory on Solaris, you may need to use GNU
-make.  The make programs bundled with Solaris support the VPATH
-macro but use it differently from the way the VPATH macro is
-used by GNU make.  The differences will cause the "make install"
-step to fail, leaving you with an incomplete emacs
-installation.  GNU make is available in /usr/sfw/bin on Solaris
-10 and can be installed as /opt/sfw/bin/gmake from the Solaris 9
-Software Companion CDROM.
-
-The problems due to the VPATH processing differences affect only
-out of tree builds so, if you are on a Solaris installation
-without GNU make, you can install Emacs completely by installing
-from a build environment using the original emacs distribution tree.
-
 ** First execution
 
 *** Emacs binary is not in executable format, and cannot be run.
@@ -2873,19 +2850,6 @@ This is an unfortunate side-effect of the support for Unix-style
 device names such as /dev/null in the DJGPP runtime library.  A
 work-around is to rename the problem directory to another name.
 
-*** MS-DOS+DJGPP: Problems on MS-DOS if DJGPP v2.0 is used to compile Emacs.
-
-There are two DJGPP library bugs which cause problems:
-
-  * Running `shell-command' (or `compile', or `grep') you get
-    `Searching for program: permission denied (EACCES), c:/command.com';
-  * After you shell to DOS, Ctrl-Break kills Emacs.
-
-To work around these bugs, you can use two files in the msdos
-subdirectory: `is_exec.c' and `sigaction.c'.  Compile them and link
-them into the Emacs executable `temacs'; then they will replace the
-incorrect library functions.
-
 *** MS-DOS: Emacs compiled for MSDOS cannot find some Lisp files, or other
 run-time support files, when long filename support is enabled.
 
index f3d554e45bfd41491651f78881da220f9813a84d..ece9aa6d8885b326f50e563d8b8904e660db65d9 100644 (file)
@@ -1,903 +1,8 @@
-  The GNU Project
+The GNU Project
 
-   by Richard Stallman
+Note added March 2014:
 
-   originally published in the book "Open Sources"
+This file is obsolete and will be removed in future.
+Please update any references to use
 
-  The first software-sharing community
-
-   When I started working at the MIT Artificial Intelligence Lab in 1971,
-   I became part of a software-sharing community that had existed for many
-   years. Sharing of software was not limited to our particular community;
-   it is as old as computers, just as sharing of recipes is as old as
-   cooking. But we did it more than most.
-
-   The AI Lab used a timesharing operating system called ITS (the
-   Incompatible Timesharing System) that the lab's staff hackers (1) had
-   designed and written in assembler language for the Digital PDP-10, one
-   of the large computers of the era. As a member of this community, an AI
-   lab staff system hacker, my job was to improve this system.
-
-   We did not call our software "free software", because that term did not
-   yet exist; but that is what it was. Whenever people from another
-   university or a company wanted to port and use a program, we gladly let
-   them. If you saw someone using an unfamiliar and interesting program,
-   you could always ask to see the source code, so that you could read it,
-   change it, or cannibalize parts of it to make a new program.
-
-   (1) The use of "hacker" to mean "security breaker" is a confusion on
-   the part of the mass media. We hackers refuse to recognize that
-   meaning, and continue using the word to mean, "Someone who loves to
-   program and enjoys being clever about it."
-
-  The collapse of the community
-
-   The situation changed drastically in the early 1980s when Digital
-   discontinued the PDP-10 series. Its architecture, elegant and powerful
-   in the 60s, could not extend naturally to the larger address spaces
-   that were becoming feasible in the 80s. This meant that nearly all of
-   the programs composing ITS were obsolete.
-
-   The AI lab hacker community had already collapsed, not long before. In
-   1981, the spin-off company Symbolics had hired away nearly all of the
-   hackers from the AI lab, and the depopulated community was unable to
-   maintain itself. (The book Hackers, by Steve Levy, describes these
-   events, as well as giving a clear picture of this community in its
-   prime.) When the AI lab bought a new PDP-10 in 1982, its administrators
-   decided to use Digital's non-free timesharing system instead of ITS.
-
-   The modern computers of the era, such as the VAX or the 68020, had
-   their own operating systems, but none of them were free software: you
-   had to sign a nondisclosure agreement even to get an executable copy.
-
-   This meant that the first step in using a computer was to promise not
-   to help your neighbor. A cooperating community was forbidden. The rule
-   made by the owners of proprietary software was, "If you share with your
-   neighbor, you are a pirate. If you want any changes, beg us to make
-   them."
-
-   The idea that the proprietary-software social system--the system that
-   says you are not allowed to share or change software--is antisocial,
-   that it is unethical, that it is simply wrong, may come as a surprise
-   to some readers. But what else could we say about a system based on
-   dividing the public and keeping users helpless? Readers who find the
-   idea surprising may have taken proprietary-software social system as
-   given, or judged it on the terms suggested by proprietary software
-   businesses. Software publishers have worked long and hard to convince
-   people that there is only one way to look at the issue.
-
-   When software publishers talk about "enforcing" their "rights" or
-   "stopping piracy", what they actually *say* is secondary. The real
-   message of these statements is in the unstated assumptions they take
-   for granted; the public is supposed to accept them uncritically. So
-   let's examine them.
-
-   One assumption is that software companies have an unquestionable
-   natural right to own software and thus have power over all its users.
-   (If this were a natural right, then no matter how much harm it does to
-   the public, we could not object.) Interestingly, the US Constitution
-   and legal tradition reject this view; copyright is not a natural right,
-   but an artificial government-imposed monopoly that limits the users'
-   natural right to copy.
-
-   Another unstated assumption is that the only important thing about
-   software is what jobs it allows you to do--that we computer users
-   should not care what kind of society we are allowed to have.
-
-   A third assumption is that we would have no usable software (or would
-   never have a program to do this or that particular job) if we did not
-   offer a company power over the users of the program. This assumption
-   may have seemed plausible, before the free software movement
-   demonstrated that we can make plenty of useful software without putting
-   chains on it.
-
-   If we decline to accept these assumptions, and judge these issues based
-   on ordinary common-sense morality while placing the users first, we
-   arrive at very different conclusions. Computer users should be free to
-   modify programs to fit their needs, and free to share software, because
-   helping other people is the basis of society.
-
-   There is no room here for an extensive statement of the reasoning
-   behind this conclusion, so I refer the reader to the web page,
-   http://www.gnu.org/philosophy/why-free.html.
-
-  A stark moral choice.
-
-   With my community gone, to continue as before was impossible. Instead,
-   I faced a stark moral choice.
-
-   The easy choice was to join the proprietary software world, signing
-   nondisclosure agreements and promising not to help my fellow hacker.
-   Most likely I would also be developing software that was released under
-   nondisclosure agreements, thus adding to the pressure on other people
-   to betray their fellows too.
-
-   I could have made money this way, and perhaps amused myself writing
-   code. But I knew that at the end of my career, I would look back on
-   years of building walls to divide people, and feel I had spent my life
-   making the world a worse place.
-
-   I had already experienced being on the receiving end of a nondisclosure
-   agreement, when someone refused to give me and the MIT AI lab the
-   source code for the control program for our printer. (The lack of
-   certain features in this program made use of the printer extremely
-   frustrating.) So I could not tell myself that nondisclosure agreements
-   were innocent. I was very angry when he refused to share with us; I
-   could not turn around and do the same thing to everyone else.
-
-   Another choice, straightforward but unpleasant, was to leave the
-   computer field. That way my skills would not be misused, but they would
-   still be wasted. I would not be culpable for dividing and restricting
-   computer users, but it would happen nonetheless.
-
-   So I looked for a way that a programmer could do something for the
-   good. I asked myself, was there a program or programs that I could
-   write, so as to make a community possible once again?
-
-   The answer was clear: what was needed first was an operating system.
-   That is the crucial software for starting to use a computer. With an
-   operating system, you can do many things; without one, you cannot run
-   the computer at all. With a free operating system, we could again have
-   a community of cooperating hackers--and invite anyone to join. And
-   anyone would be able to use a computer without starting out by
-   conspiring to deprive his or her friends.
-
-   As an operating system developer, I had the right skills for this job.
-   So even though I could not take success for granted, I realized that I
-   was elected to do the job. I chose to make the system compatible with
-   Unix so that it would be portable, and so that Unix users could easily
-   switch to it. The name GNU was chosen following a hacker tradition, as
-   a recursive acronym for "GNU's Not Unix."
-
-   An operating system does not mean just a kernel, barely enough to run
-   other programs. In the 1970s, every operating system worthy of the name
-   included command processors, assemblers, compilers, interpreters,
-   debuggers, text editors, mailers, and much more. ITS had them, Multics
-   had them, VMS had them, and Unix had them. The GNU operating system
-   would include them too.
-
-   Later I heard these words, attributed to Hillel (1):
-
-     If I am not for myself, who will be for me?
-     If I am only for myself, what am I?
-     If not now, when?
-
-   The decision to start the GNU project was based on a similar spirit.
-
-   (1) As an Atheist, I don't follow any religious leaders, but I
-   sometimes find I admire something one of them has said.
-
-  Free as in freedom
-
-   The term "free software" is sometimes misunderstood--it has nothing to
-   do with price. It is about freedom. Here, therefore, is the definition
-   of free software: a program is free software, for you, a particular
-   user, if:
-     * You have the freedom to run the program, for any purpose.
-     * You have the freedom to modify the program to suit your needs. (To
-       make this freedom effective in practice, you must have access to
-       the source code, since making changes in a program without having
-       the source code is exceedingly difficult.)
-     * You have the freedom to redistribute copies, either gratis or for a
-       fee.
-     * You have the freedom to distribute modified versions of the
-       program, so that the community can benefit from your improvements.
-
-   Since "free" refers to freedom, not to price, there is no contradiction
-   between selling copies and free software. In fact, the freedom to sell
-   copies is crucial: collections of free software sold on CD-ROMs are
-   important for the community, and selling them is an important way to
-   raise funds for free software development. Therefore, a program which
-   people are not free to include on these collections is not free
-   software.
-
-   Because of the ambiguity of "free", people have long looked for
-   alternatives, but no one has found a suitable alternative. The English
-   Language has more words and nuances than any other, but it lacks a
-   simple, unambiguous, word that means "free", as in
-   freedom--"unfettered" being the word that comes closest in meaning.
-   Such alternatives as "liberated", "freedom", and "open" have either the
-   wrong meaning or some other disadvantage.
-
-  GNU software and the GNU system
-
-   Developing a whole system is a very large project. To bring it into
-   reach, I decided to adapt and use existing pieces of free software
-   wherever that was possible. For example, I decided at the very
-   beginning to use TeX as the principal text formatter; a few years
-   later, I decided to use the X Window System rather than writing another
-   window system for GNU.
-
-   Because of this decision, the GNU system is not the same as the
-   collection of all GNU software. The GNU system includes programs that
-   are not GNU software, programs that were developed by other people and
-   projects for their own purposes, but which we can use because they are
-   free software.
-
-  Commencing the project
-
-   In January 1984 I quit my job at MIT and began writing GNU software.
-   Leaving MIT was necessary so that MIT would not be able to interfere
-   with distributing GNU as free software. If I had remained on the staff,
-   MIT could have claimed to own the work, and could have imposed their
-   own distribution terms, or even turned the work into a proprietary
-   software package. I had no intention of doing a large amount of work
-   only to see it become useless for its intended purpose: creating a new
-   software-sharing community.
-
-   However, Professor Winston, then the head of the MIT AI Lab, kindly
-   invited me to keep using the lab's facilities.
-
-  The first steps
-
-   Shortly before beginning the GNU project, I heard about the Free
-   University Compiler Kit, also known as VUCK. (The Dutch word for "free"
-   is written with a V.) This was a compiler designed to handle multiple
-   languages, including C and Pascal, and to support multiple target
-   machines. I wrote to its author asking if GNU could use it.
-
-   He responded derisively, stating that the university was free but the
-   compiler was not. I therefore decided that my first program for the GNU
-   project would be a multi-language, multi-platform compiler.
-
-   Hoping to avoid the need to write the whole compiler myself, I obtained
-   the source code for the Pastel compiler, which was a multi-platform
-   compiler developed at Lawrence Livermore Lab. It supported, and was
-   written in, an extended version of Pascal, designed to be a
-   system-programming language. I added a C front end, and began porting
-   it to the Motorola 68000 computer. But I had to give that up when I
-   discovered that the compiler needed many megabytes of stack space, and
-   the available 68000 Unix system would only allow 64k.
-
-   I then realized that the Pastel compiler functioned by parsing the
-   entire input file into a syntax tree, converting the whole syntax tree
-   into a chain of "instructions", and then generating the whole output
-   file, without ever freeing any storage. At this point, I concluded I
-   would have to write a new compiler from scratch. That new compiler is
-   now known as GCC; none of the Pastel compiler is used in it, but I
-   managed to adapt and use the C front end that I had written. But that
-   was some years later; first, I worked on GNU Emacs.
-
-  GNU Emacs
-
-   I began work on GNU Emacs in September 1984, and in early 1985 it was
-   beginning to be usable. This enabled me to begin using Unix systems to
-   do editing; having no interest in learning to use vi or ed, I had done
-   my editing on other kinds of machines until then.
-
-   At this point, people began wanting to use GNU Emacs, which raised the
-   question of how to distribute it. Of course, I put it on the anonymous
-   ftp server on the MIT computer that I used. (This computer,
-   prep.ai.mit.edu, thus became the principal GNU ftp distribution site;
-   when it was decommissioned a few years later, we transferred the name
-   to our new ftp server.) But at that time, many of the interested people
-   were not on the Internet and could not get a copy by ftp. So the
-   question was, what would I say to them?
-
-   I could have said, "Find a friend who is on the net and who will make a
-   copy for you." Or I could have done what I did with the original PDP-10
-   Emacs: tell them, "Mail me a tape and a SASE, and I will mail it back
-   with Emacs on it." But I had no job, and I was looking for ways to make
-   money from free software. So I announced that I would mail a tape to
-   whoever wanted one, for a fee of $150. In this way, I started a free
-   software distribution business, the precursor of the companies that
-   today distribute entire Linux-based GNU systems.
-
-  Is a program free for every user?
-
-   If a program is free software when it leaves the hands of its author,
-   this does not necessarily mean it will be free software for everyone
-   who has a copy of it. For example, public domain software (software
-   that is not copyrighted) is free software; but anyone can make a
-   proprietary modified version of it. Likewise, many free programs are
-   copyrighted but distributed under simple permissive licenses which
-   allow proprietary modified versions.
-
-   The paradigmatic example of this problem is the X Window System.
-   Developed at MIT, and released as free software with a permissive
-   license, it was soon adopted by various computer companies. They added
-   X to their proprietary Unix systems, in binary form only, and covered
-   by the same nondisclosure agreement. These copies of X were no more
-   free software than Unix was.
-
-   The developers of the X Window System did not consider this a
-   problem--they expected and intended this to happen. Their goal was not
-   freedom, just "success", defined as "having many users." They did not
-   care whether these users had freedom, only that they should be
-   numerous.
-
-   This led to a paradoxical situation where two different ways of
-   counting the amount of freedom gave different answers to the question,
-   "Is this program free?" If you judged based on the freedom provided by
-   the distribution terms of the MIT release, you would say that X was
-   free software. But if you measured the freedom of the average user of
-   X, you would have to say it was proprietary software. Most X users were
-   running the proprietary versions that came with Unix systems, not the
-   free version.
-
-  Copyleft and the GNU GPL
-
-   The goal of GNU was to give users freedom, not just to be popular. So
-   we needed to use distribution terms that would prevent GNU software
-   from being turned into proprietary software. The method we use is
-   called "copyleft".(1)
-
-   Copyleft uses copyright law, but flips it over to serve the opposite of
-   its usual purpose: instead of a means of privatizing software, it
-   becomes a means of keeping software free.
-
-   The central idea of copyleft is that we give everyone permission to run
-   the program, copy the program, modify the program, and distribute
-   modified versions--but not permission to add restrictions of their own.
-   Thus, the crucial freedoms that define "free software" are guaranteed
-   to everyone who has a copy; they become inalienable rights.
-
-   For an effective copyleft, modified versions must also be free. This
-   ensures that work based on ours becomes available to our community if
-   it is published. When programmers who have jobs as programmers
-   volunteer to improve GNU software, it is copyleft that prevents their
-   employers from saying, "You can't share those changes, because we are
-   going to use them to make our proprietary version of the program."
-
-   The requirement that changes must be free is essential if we want to
-   ensure freedom for every user of the program. The companies that
-   privatized the X Window System usually made some changes to port it to
-   their systems and hardware. These changes were small compared with the
-   great extent of X, but they were not trivial. If making changes were an
-   excuse to deny the users freedom, it would be easy for anyone to take
-   advantage of the excuse.
-
-   A related issue concerns combining a free program with non-free code.
-   Such a combination would inevitably be non-free; whichever freedoms are
-   lacking for the non-free part would be lacking for the whole as well.
-   To permit such combinations would open a hole big enough to sink a
-   ship. Therefore, a crucial requirement for copyleft is to plug this
-   hole: anything added to or combined with a copylefted program must be
-   such that the larger combined version is also free and copylefted.
-
-   The specific implementation of copyleft that we use for most GNU
-   software is the GNU General Public License, or GNU GPL for short. We
-   have other kinds of copyleft that are used in specific circumstances.
-   GNU manuals are copylefted also, but use a much simpler kind of
-   copyleft, because the complexity of the GNU GPL is not necessary for
-   manuals.(2)
-
-   (1) In 1984 or 1985, Don Hopkins (a very imaginative fellow) mailed me
-   a letter. On the envelope he had written several amusing sayings,
-   including this one: "Copyleft--all rights reversed." I used the word
-   "copyleft" to name the distribution concept I was developing at the
-   time.
-
-   (2) We now use the GNU Free Documentation License for documentation.
-
-  The Free Software Foundation
-
-   As interest in using Emacs was growing, other people became involved in
-   the GNU project, and we decided that it was time to seek funding once
-   again. So in 1985 we created the Free Software Foundation, a tax-exempt
-   charity for free software development. The FSF also took over the Emacs
-   tape distribution business; later it extended this by adding other free
-   software (both GNU and non-GNU) to the tape, and by selling free
-   manuals as well.
-
-   The FSF accepts donations, but most of its income has always come from
-   sales--of copies of free software, and of other related services. Today
-   it sells CD-ROMs of source code, CD-ROMs with binaries, nicely printed
-   manuals (all with freedom to redistribute and modify), and Deluxe
-   Distributions (where we build the whole collection of software for your
-   choice of platform).
-
-   Free Software Foundation employees have written and maintained a number
-   of GNU software packages. Two notable ones are the C library and the
-   shell. The GNU C library is what every program running on a GNU/Linux
-   system uses to communicate with Linux. It was developed by a member of
-   the Free Software Foundation staff, Roland McGrath. The shell used on
-   most GNU/Linux systems is BASH, the Bourne Again Shell(1), which was
-   developed by FSF employee Brian Fox.
-
-   We funded development of these programs because the GNU project was not
-   just about tools or a development environment. Our goal was a complete
-   operating system, and these programs were needed for that goal.
-
-   (1) "Bourne again Shell" is a joke on the name ``Bourne Shell'', which
-   was the usual shell on Unix.
-
-  Free software support
-
-   The free software philosophy rejects a specific widespread business
-   practice, but it is not against business. When businesses respect the
-   users' freedom, we wish them success.
-
-   Selling copies of Emacs demonstrates one kind of free software
-   business. When the FSF took over that business, I needed another way to
-   make a living. I found it in selling services relating to the free
-   software I had developed. This included teaching, for subjects such as
-   how to program GNU Emacs and how to customize GCC, and software
-   development, mostly porting GCC to new platforms.
-
-   Today each of these kinds of free software business is practiced by a
-   number of corporations. Some distribute free software collections on
-   CD-ROM; others sell support at levels ranging from answering user
-   questions, to fixing bugs, to adding major new features. We are even
-   beginning to see free software companies based on launching new free
-   software products.
-
-   Watch out, though--a number of companies that associate themselves with
-   the term "open source" actually base their business on non-free
-   software that works with free software. These are not free software
-   companies, they are proprietary software companies whose products tempt
-   users away from freedom. They call these "value added", which reflects
-   the values they would like us to adopt: convenience above freedom. If
-   we value freedom more, we should call them "freedom subtracted"
-   products.
-
-  Technical goals
-
-   The principal goal of GNU was to be free software. Even if GNU had no
-   technical advantage over Unix, it would have a social advantage,
-   allowing users to cooperate, and an ethical advantage, respecting the
-   user's freedom.
-
-   But it was natural to apply the known standards of good practice to the
-   work--for example, dynamically allocating data structures to avoid
-   arbitrary fixed size limits, and handling all the possible 8-bit codes
-   wherever that made sense.
-
-   In addition, we rejected the Unix focus on small memory size, by
-   deciding not to support 16-bit machines (it was clear that 32-bit
-   machines would be the norm by the time the GNU system was finished),
-   and to make no effort to reduce memory usage unless it exceeded a
-   megabyte. In programs for which handling very large files was not
-   crucial, we encouraged programmers to read an entire input file into
-   core, then scan its contents without having to worry about I/O.
-
-   These decisions enabled many GNU programs to surpass their Unix
-   counterparts in reliability and speed.
-
-  Donated computers
-
-   As the GNU project's reputation grew, people began offering to donate
-   machines running UNIX to the project. These were very useful, because
-   the easiest way to develop components of GNU was to do it on a UNIX
-   system, and replace the components of that system one by one. But they
-   raised an ethical issue: whether it was right for us to have a copy of
-   UNIX at all.
-
-   UNIX was (and is) proprietary software, and the GNU project's
-   philosophy said that we should not use proprietary software. But,
-   applying the same reasoning that leads to the conclusion that violence
-   in self defense is justified, I concluded that it was legitimate to use
-   a proprietary package when that was crucial for developing a free
-   replacement that would help others stop using the proprietary package.
-
-   But, even if this was a justifiable evil, it was still an evil. Today
-   we no longer have any copies of Unix, because we have replaced them
-   with free operating systems. If we could not replace a machine's
-   operating system with a free one, we replaced the machine instead.
-
-  The GNU Task List
-
-   As the GNU project proceeded, and increasing numbers of system
-   components were found or developed, eventually it became useful to make
-   a list of the remaining gaps. We used it to recruit developers to write
-   the missing pieces. This list became known as the GNU task list. In
-   addition to missing Unix components, we listed added various other
-   useful software and documentation projects that, we thought, a truly
-   complete system ought to have.
-
-   Today, hardly any Unix components are left in the GNU task list--those
-   jobs have been done, aside from a few inessential ones. But the list is
-   full of projects that some might call "applications". Any program that
-   appeals to more than a narrow class of users would be a useful thing to
-   add to an operating system.
-
-   Even games are included in the task list--and have been since the
-   beginning. Unix included games, so naturally GNU should too. But
-   compatibility was not an issue for games, so we did not follow the list
-   of games that Unix had. Instead, we listed a spectrum of different
-   kinds of games that users might like.
-
-  The GNU Library GPL
-
-   The GNU C library uses a special kind of copyleft called the GNU
-   Library General Public License(1), which gives permission to link
-   proprietary software with the library. Why make this exception?
-
-   It is not a matter of principle; there is no principle that says
-   proprietary software products are entitled to include our code. (Why
-   contribute to a project predicated on refusing to share with us?) Using
-   the LGPL for the C library, or for any library, is a matter of
-   strategy.
-
-   The C library does a generic job; every proprietary system or compiler
-   comes with a C library. Therefore, to make our C library available only
-   to free software would not have given free software any advantage--it
-   would only have discouraged use of our library.
-
-   One system is an exception to this: on the GNU system (and this
-   includes GNU/Linux), the GNU C library is the only C library. So the
-   distribution terms of the GNU C library determine whether it is
-   possible to compile a proprietary program for the GNU system. There is
-   no ethical reason to allow proprietary applications on the GNU system,
-   but strategically it seems that disallowing them would do more to
-   discourage use of the GNU system than to encourage development of free
-   applications.
-
-   That is why using the Library GPL is a good strategy for the C library.
-   For other libraries, the strategic decision needs to be considered on a
-   case-by-case basis. When a library does a special job that can help
-   write certain kinds of programs, then releasing it under the GPL,
-   limiting it to free programs only, is a way of helping other free
-   software developers, giving them an advantage against proprietary
-   software.
-
-   Consider GNU Readline, a library that was developed to provide
-   command-line editing for BASH. Readline is released under the ordinary
-   GNU GPL, not the Library GPL. This probably does reduce the amount
-   Readline is used, but that is no loss for us. Meanwhile, at least one
-   useful application has been made free software specifically so it could
-   use Readline, and that is a real gain for the community.
-
-   Proprietary software developers have the advantages money provides;
-   free software developers need to make advantages for each other. I hope
-   some day we will have a large collection of GPL-covered libraries that
-   have no parallel available to proprietary software, providing useful
-   modules to serve as building blocks in new free software, and adding up
-   to a major advantage for further free software development.
-
-   (1) This license is now called the GNU Lesser General Public License,
-   to avoid giving the idea that all libraries ought to use it.
-   See http://www.gnu.org/philosophy/why-not-lgpl.html.
-
-  Scratching an itch?
-
-   Eric Raymond says that "Every good work of software starts by
-   scratching a developer's personal itch." Maybe that happens sometimes,
-   but many essential pieces of GNU software were developed in order to
-   have a complete free operating system. They come from a vision and a
-   plan, not from impulse.
-
-   For example, we developed the GNU C library because a Unix-like system
-   needs a C library, the Bourne-Again Shell (bash) because a Unix-like
-   system needs a shell, and GNU tar because a Unix-like system needs a
-   tar program. The same is true for my own programs--the GNU C compiler,
-   GNU Emacs, GDB and GNU Make.
-
-   Some GNU programs were developed to cope with specific threats to our
-   freedom. Thus, we developed gzip to replace the Compress program, which
-   had been lost to the community because of the LZW patents. We found
-   people to develop LessTif, and more recently started GNOME and Harmony,
-   to address the problems caused by certain proprietary libraries (see
-   below). We are developing the GNU Privacy Guard to replace popular
-   non-free encryption software, because users should not have to choose
-   between privacy and freedom.
-
-   Of course, the people writing these programs became interested in the
-   work, and many features were added to them by various people for the
-   sake of their own needs and interests. But that is not why the programs
-   exist.
-
-  Unexpected developments
-
-   At the beginning of the GNU project, I imagined that we would develop
-   the whole GNU system, then release it as a whole. That is not how it
-   happened.
-
-   Since each component of the GNU system was implemented on a Unix
-   system, each component could run on Unix systems, long before a
-   complete GNU system existed. Some of these programs became popular, and
-   users began extending them and porting them---to the various
-   incompatible versions of Unix, and sometimes to other systems as well.
-
-   The process made these programs much more powerful, and attracted both
-   funds and contributors to the GNU project. But it probably also delayed
-   completion of a minimal working system by several years, as GNU
-   developers' time was put into maintaining these ports and adding
-   features to the existing components, rather than moving on to write one
-   missing component after another.
-
-  The GNU Hurd
-
-   By 1990, the GNU system was almost complete; the only major missing
-   component was the kernel. We had decided to implement our kernel as a
-   collection of server processes running on top of Mach. Mach is a
-   microkernel developed at Carnegie Mellon University and then at the
-   University of Utah; the GNU HURD is a collection of servers (or ``herd
-   of gnus'') that run on top of Mach, and do the various jobs of the Unix
-   kernel. The start of development was delayed as we waited for Mach to
-   be released as free software, as had been promised.
-
-   One reason for choosing this design was to avoid what seemed to be the
-   hardest part of the job: debugging a kernel program without a
-   source-level debugger to do it with. This part of the job had been done
-   already, in Mach, and we expected to debug the HURD servers as user
-   programs, with GDB. But it took a long time to make that possible, and
-   the multi-threaded servers that send messages to each other have turned
-   out to be very hard to debug. Making the HURD work solidly has
-   stretched on for many years.
-
-  Alix
-
-   The GNU kernel was not originally supposed to be called the HURD. Its
-   original name was Alix--named after the woman who was my sweetheart at
-   the time. She, a Unix system administrator, had pointed out how her
-   name would fit a common naming pattern for Unix system versions; as a
-   joke, she told her friends, "Someone should name a kernel after me." I
-   said nothing, but decided to surprise her with a kernel named Alix.
-
-   It did not stay that way. Michael Bushnell (now Thomas), the main
-   developer of the kernel, preferred the name HURD, and redefined Alix to
-   refer to a certain part of the kernel--the part that would trap system
-   calls and handle them by sending messages to HURD servers.
-
-   Ultimately, Alix and I broke up, and she changed her name;
-   independently, the HURD design was changed so that the C library would
-   send messages directly to servers, and this made the Alix component
-   disappear from the design.
-
-   But before these things happened, a friend of hers came across the name
-   Alix in the HURD source code, and mentioned the name to her. So the
-   name did its job.
-
-  Linux and GNU/Linux
-
-   The GNU Hurd is not ready for production use. Fortunately, another
-   kernel is available. In 1991, Linus Torvalds developed a
-   Unix-compatible kernel and called it Linux. Around 1992, combining
-   Linux with the not-quite-complete GNU system resulted in a complete
-   free operating system. (Combining them was a substantial job in itself,
-   of course.) It is due to Linux that we can actually run a version of
-   the GNU system today.
-
-   We call this system version GNU/Linux, to express its composition as a
-   combination of the GNU system with Linux as the kernel.
-
-  Challenges in our future
-
-   We have proved our ability to develop a broad spectrum of free
-   software. This does not mean we are invincible and unstoppable. Several
-   challenges make the future of free software uncertain; meeting them
-   will require steadfast effort and endurance, sometimes lasting for
-   years. It will require the kind of determination that people display
-   when they value their freedom and will not let anyone take it away.
-
-   The following four sections discuss these challenges.
-
-  Secret hardware
-
-   Hardware manufacturers increasingly tend to keep hardware
-   specifications secret. This makes it difficult to write free drivers so
-   that Linux and XFree86 can support new hardware. We have complete free
-   systems today, but we will not have them tomorrow if we cannot support
-   tomorrow's computers.
-
-   There are two ways to cope with this problem. Programmers can do
-   reverse engineering to figure out how to support the hardware. The rest
-   of us can choose the hardware that is supported by free software; as
-   our numbers increase, secrecy of specifications will become a
-   self-defeating policy.
-
-   Reverse engineering is a big job; will we have programmers with
-   sufficient determination to undertake it? Yes--if we have built up a
-   strong feeling that free software is a matter of principle, and
-   non-free drivers are intolerable. And will large numbers of us spend
-   extra money, or even a little extra time, so we can use free drivers?
-   Yes, if the determination to have freedom is widespread.
-
-  Non-free libraries
-
-   A non-free library that runs on free operating systems acts as a trap
-   for free software developers. The library's attractive features are the
-   bait; if you use the library, you fall into the trap, because your
-   program cannot usefully be part of a free operating system. (Strictly
-   speaking, we could include your program, but it won't run with the
-   library missing.) Even worse, if a program that uses the proprietary
-   library becomes popular, it can lure other unsuspecting programmers
-   into the trap.
-
-   The first instance of this problem was the Motif toolkit, back in the
-   80s. Although there were as yet no free operating systems, it was clear
-   what problem Motif would cause for them later on. The GNU Project
-   responded in two ways: by asking individual free software projects to
-   support the free X toolkit widgets as well as Motif, and by asking for
-   someone to write a free replacement for Motif. The job took many years;
-   LessTif, developed by the Hungry Programmers, became powerful enough to
-   support most Motif applications only in 1997.
-
-   Between 1996 and 1998, another non-free GUI toolkit library, called Qt,
-   was used in a substantial collection of free software, the desktop KDE.
-
-   Free GNU/Linux systems were unable to use KDE, because we could not use
-   the library. However, some commercial distributors of GNU/Linux systems
-   who were not strict about sticking with free software added KDE to
-   their systems--producing a system with more capabilities, but less
-   freedom. The KDE group was actively encouraging more programmers to use
-   Qt, and millions of new "Linux users" had never been exposed to the
-   idea that there was a problem in this. The situation appeared grim.
-
-   The free software community responded to the problem in two ways: GNOME
-   and Harmony.
-
-   GNOME, the GNU Network Object Model Environment, is GNU's desktop
-   project. Started in 1997 by Miguel de Icaza, and developed with the
-   support of Red Hat Software, GNOME set out to provide similar desktop
-   facilities, but using free software exclusively. It has technical
-   advantages as well, such as supporting a variety of languages, not just
-   C++. But its main purpose was freedom: not to require the use of any
-   non-free software.
-
-   Harmony is a compatible replacement library, designed to make it
-   possible to run KDE software without using Qt.
-
-   In November 1998, the developers of Qt announced a change of license
-   which, when carried out, should make Qt free software. There is no way
-   to be sure, but I think that this was partly due to the community's
-   firm response to the problem that Qt posed when it was non-free. (The
-   new license is inconvenient and inequitable, so it remains desirable to
-   avoid using Qt.)
-
-   [Subsequent note: in September 2000, Qt was rereleased under the GNU
-   GPL, which essentially solved this problem.]
-
-   How will we respond to the next tempting non-free library? Will the
-   whole community understand the need to stay out of the trap? Or will
-   many of us give up freedom for convenience, and produce a major
-   problem? Our future depends on our philosophy.
-
-  Software patents
-
-   The worst threat we face comes from software patents, which can put
-   algorithms and features off limits to free software for up to twenty
-   years. The LZW compression algorithm patents were applied for in 1983,
-   and we still cannot release free software to produce proper compressed
-   GIFs. In 1998, a free program to produce MP3 compressed audio was
-   removed from distribution under threat of a patent suit.
-
-   There are ways to cope with patents: we can search for evidence that a
-   patent is invalid, and we can look for alternative ways to do a job.
-   But each of these methods works only sometimes; when both fail, a
-   patent may force all free software to lack some feature that users
-   want. What will we do when this happens?
-
-   Those of us who value free software for freedom's sake will stay with
-   free software anyway. We will manage to get work done without the
-   patented features. But those who value free software because they
-   expect it to be technically superior are likely to call it a failure
-   when a patent holds it back. Thus, while it is useful to talk about the
-   practical effectiveness of the "cathedral" model of development (1),
-   and the reliability and power of some free software, we must not stop
-   there. We must talk about freedom and principle.
-
-   (1) It would have been clearer to write `of the "bazaar" model', since
-   that was the alternative that was new and initially controversial.
-
-  Free documentation
-
-   The biggest deficiency in our free operating systems is not in the
-   software--it is the lack of good free manuals that we can include in
-   our systems. Documentation is an essential part of any software
-   package; when an important free software package does not come with a
-   good free manual, that is a major gap. We have many such gaps today.
-
-   Free documentation, like free software, is a matter of freedom, not
-   price. The criterion for a free manual is pretty much the same as for
-   free software: it is a matter of giving all users certain freedoms.
-   Redistribution (including commercial sale) must be permitted, on-line
-   and on paper, so that the manual can accompany every copy of the
-   program.
-
-   Permission for modification is crucial too. As a general rule, I don't
-   believe that it is essential for people to have permission to modify
-   all sorts of articles and books. For example, I don't think you or I
-   are obliged to give permission to modify articles like this one, which
-   describe our actions and our views.
-
-   But there is a particular reason why the freedom to modify is crucial
-   for documentation for free software. When people exercise their right
-   to modify the software, and add or change its features, if they are
-   conscientious they will change the manual too--so they can provide
-   accurate and usable documentation with the modified program. A manual
-   which does not allow programmers to be conscientious and finish the
-   job, does not fill our community's needs.
-
-   Some kinds of limits on how modifications are done pose no problem. For
-   example, requirements to preserve the original author's copyright
-   notice, the distribution terms, or the list of authors, are ok. It is
-   also no problem to require modified versions to include notice that
-   they were modified, even to have entire sections that may not be
-   deleted or changed, as long as these sections deal with nontechnical
-   topics. These kinds of restrictions are not a problem because they
-   don't stop the conscientious programmer from adapting the manual to fit
-   the modified program. In other words, they don't block the free
-   software community from making full use of the manual.
-
-   However, it must be possible to modify all the *technical* content of
-   the manual, and then distribute the result in all the usual media,
-   through all the usual channels; otherwise, the restrictions do obstruct
-   the community, the manual is not free, and we need another manual.
-
-   Will free software developers have the awareness and determination to
-   produce a full spectrum of free manuals? Once again, our future depends
-   on philosophy.
-
-  We must talk about freedom
-
-   Estimates today are that there are ten million users of GNU/Linux
-   systems such as Debian GNU/Linux and Red Hat Linux. Free software has
-   developed such practical advantages that users are flocking to it for
-   purely practical reasons.
-
-   The good consequences of this are evident: more interest in developing
-   free software, more customers for free software businesses, and more
-   ability to encourage companies to develop commercial free software
-   instead of proprietary software products.
-
-   But interest in the software is growing faster than awareness of the
-   philosophy it is based on, and this leads to trouble. Our ability to
-   meet the challenges and threats described above depends on the will to
-   stand firm for freedom. To make sure our community has this will, we
-   need to spread the idea to the new users as they come into the
-   community.
-
-   But we are failing to do so: the efforts to attract new users into our
-   community are far outstripping the efforts to teach them the civics of
-   our community. We need to do both, and we need to keep the two efforts
-   in balance.
-
-  "Open Source"
-
-   Teaching new users about freedom became more difficult in 1998, when a
-   part of the community decided to stop using the term "free software"
-   and say "open source software" instead.
-
-   Some who favored this term aimed to avoid the confusion of "free" with
-   "gratis"--a valid goal. Others, however, aimed to set aside the spirit
-   of principle that had motivated the free software movement and the GNU
-   project, and to appeal instead to executives and business users, many
-   of whom hold an ideology that places profit above freedom, above
-   community, above principle. Thus, the rhetoric of "open source" focuses
-   on the potential to make high quality, powerful software, but shuns the
-   ideas of freedom, community, and principle.
-
-   The "Linux" magazines are a clear example of this--they are filled with
-   advertisements for proprietary software that works with GNU/Linux. When
-   the next Motif or Qt appears, will these magazines warn programmers to
-   stay away from it, or will they run ads for it?
-
-   The support of business can contribute to the community in many ways;
-   all else being equal, it is useful. But winning their support by
-   speaking even less about freedom and principle can be disastrous; it
-   makes the previous imbalance between outreach and civics education even
-   worse.
-
-   "Free software" and "open source" describe the same category of
-   software, more or less, but say different things about the software,
-   and about values. The GNU Project continues to use the term "free
-   software", to express the idea that freedom, not just technology, is
-   important.
-
-  Try!
-
-   Yoda's philosophy ("There is no `try'") sounds neat, but it doesn't
-   work for me. I have done most of my work while anxious about whether I
-   could do the job, and unsure that it would be enough to achieve the
-   goal if I did. But I tried anyway, because there was no one but me
-   between the enemy and my city. Surprising myself, I have sometimes
-   succeeded.
-
-   Sometimes I failed; some of my cities have fallen. Then I found another
-   threatened city, and got ready for another battle. Over time, I've
-   learned to look for threats and put myself between them and my city,
-   calling on other hackers to come and join me.
-
-   Nowadays, often I'm not the only one. It is a relief and a joy when I
-   see a regiment of hackers digging in to hold the line, and I realize,
-   this city may survive--for now. But the dangers are greater each year,
-   and now Microsoft has explicitly targeted our community. We can't take
-   the future of freedom for granted. Don't take it for granted! If you
-   want to keep your freedom, you must be prepared to defend it.
-
-  Copyright (C) 1998 Richard Stallman
-
-  Verbatim copying and distribution of this entire article is permitted
-  in any medium, provided this notice is preserved.
+<http://www.gnu.org/gnu/thegnuproject.html>
index 85022a5598f6cee6f9ee9774e4775471d8436304..ccd00e512186933ccbdfaf36c917a0253f011233 100644 (file)
--- a/etc/TODO
+++ b/etc/TODO
@@ -26,12 +26,62 @@ are the ones we consider more important, but these also may be
 difficult to fix.  Bugs with severity "minor" may be simpler, but this
 is not always true.
 
-* Tentative plan for Emacs-24
+* Speed up Elisp execution
+** Speed up function calls
+Change src/bytecode.c so that calls from byte-code functions to byte-code
+functions don't go through Ffuncall/funcall_lambda/exec_byte_code but instead
+stay within exec_byte_code.
+
+** Add new `switch' byte-code
+This byte-code would take one argument from the stack (the object to test)
+and one argument from the constant-pool (a switch table, implemented as an
+eq-hashtable) and would jump to the "label" contained in the hashtable.
+
+Then add a `case' special-form that can be compiled to this byte-code.
+This would behave just like cl-case, but instead of expanding to cond+eq it
+would be its own special form and would be compiled specially.
+
+Then change pcase to use `case' when applicable.
+
+Then change the byte-compiler to recognize (cond ((eq x 'foo) bar) ...)
+and turn it into a `case' for more efficient execution.
+
+** Improve the byte-compiler to recognize immutable (lexical) bindings
+and get rid of them if they're used only once and/or they're bound to
+a constant expression.
+
+Such things aren't present in hand-written code, but macro expansion and
+defsubst can often end up generating things like
+(funcall (lambda (arg) (body)) actual) which then get optimized to
+(let ((arg actual)) (body)) but should additionally get optimized further
+when `actual' is a constant/copyable expression.
+
+** Add an "indirect goto" byte-code and use it for local lambda expressions.
+E.g. when you have code like
+
+   (let ((foo (lambda (x) bar)))
+     (dosomething
+      (funcall foo toto)
+      (blabla (funcall foo titi))))
+
+turn those `funcalls' into jumps and their return into indirect jumps back.
+
+** Compile efficiently local recursive functions
+
+Similar to the previous point, we should be able to handle something like
+
+   (letrec ((loop () (blabla) (if (toto) (loop))))
+     (loop))
+
+which ideally should generate the same byte-code as
+
+   (while (progn (blabla) (toto)))
+
+* Things that were planned for Emacs-24
 
 ** concurrency: including it as an "experimental" compile-time option
-  sounds good.  Of course there might still be big questions around
-  "which form of concurrency" we'll want.
-** Overhaul of customize: sounds wonderful.
+  sounds good.  Of course there might still be big questions around "which form
+  of concurrency" we'll want.
 ** better support for dynamic embedded graphics: I like this idea (my
   mpc.el code could use it for the volume widget), though I wonder if the
   resulting efficiency will be sufficient.
@@ -43,10 +93,6 @@ is not always true.
 ** Random things that cross my mind right now that I'd like to see (some of
 them from my local hacks), but it's not obvious at all whether they'll
 make it.
-*** multiple inheritance for keymaps (to get rid of the
-  fix_submap_inheritance hack and to more cleanly express the
-  relationship between minibuffer-local-*-map): I've had this locally
-  for a long time, but the details of the semantics is somewhat ... delicate.
 *** prog-mode could/should provide a better fill-paragraph default
   that uses syntax-tables to recognize string/comment boundaries.
 *** provide more completion-at-point-functions.  Make existing
@@ -102,8 +148,6 @@ I suggest totally rewriting that part of Flymake, using the simplest
 mechanism that suffices for the specific needs.  That will be easy
 for users to customize.
 
-** Compute the list of active keymaps *after* reading the first event.
-
 ** Distribute a bar cursor of width > 1 evenly between the two glyphs
    on each side of the bar (what to do at the edges?).
 
@@ -119,10 +163,6 @@ for users to customize.
   It ought to be possible to omit text which is invisible (due to a
   text-property, overlay, or selective display) from the kill-ring.
 
-** Change the way define-minor-mode handles autoloading.
-  It should not generate :require.  Or :require in defcustom
-  should not be recorded in the user's custom-set-variables call.
-
 ** Feature to change cursor shape when Emacs is idle (for more than
   a specified time).
 
@@ -144,11 +184,6 @@ for users to customize.
   http://lists.gnu.org/archive/html/emacs-pretest-bug/2005-12/msg00165.html,
   and the rest of that discussion.
 
-** Height returned by frame-parameter ... and height given to
-   make-frame does not mean the same thing.  The former includes menu and
-   tool bar lines, the latter don't.  frame-parameter should return height
-   without menu and tool bar lines.
-
 ** In Emacs Info, examples of using Customize should be clickable
    and they should create Custom buffers.
 
@@ -200,14 +235,63 @@ http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00515.html
     processing.  That is why we added text properties and variable
     width fonts.  However, more features are still needed to achieve this.
 
-** Extended text-properties (to make overlays "obsolete")
+** Extend text-properties and overlays
 *** Several text-property planes
 This would get us rid of font-lock-face property (and I'd be happy to
 get rid of char-property-alias-alist as well) since font-lock would
 simply use the `face' property in the `font-lock' plane.
-Each property would come with an Elisp merge-function.  The merge
-would be performed in add-text-properties.
-*** zero-width text-properties.
+
+Basically `put-text-property' and friends would take an extra argument PLANE
+(maybe the best backward-compatible way to do that is to make it so that
+PROPERTY can be a cons cell (PLANE . PROP)).  So font-lock would
+do (put-text-property start end '(font-lock . face) value).
+
+All the properties coming from the various planes would get merged via an Elisp
+function (so it can merge `face' differently than `keymap' or it could give
+different priorities to different planes (we could imagine enabling/disabling
+planes)).  The merging would not happen lazily while looking up properties but
+instead it would take place eagerly in `add-text-properties'.  This is based on
+the idea that it's much more frequent to lookup properties than to
+modify them.  Also, when properties are looked up during redisplay, we
+generally can't run Elisp code, whereas we generally can do that when
+properties are added.
+
+*** Move overlays to intervals.c
+
+Currently overlays are implemented as (two) sorted singly linked lists (one
+for overlays_before some position and one for overlay_after that
+position, for some quirky definition of "before" and "after").
+The function `overlay-recenter' changes the position used for the split
+(and is called internally in various situations).
+
+Each overlay is itself implemented with two markers (which keep track of
+the overlay-start and overlay-end).  Markers are implemented as
+a non-sorted singly linked list of markers.  So every text
+insertion/deletion requires O(N) time, where N is the number of markers
+since we have to go down that list to update those markers that are
+affected by the modification.
+
+You can start in src/buffer.[ch], maybe grepping for overlays_before for
+a starting point.
+
+Text-properties, OTOH, are implemented with a (mostly) balanced binary
+tree.  This is implemented in src/intervals.[ch].
+
+So we'd like to change overlays so that they don't use markers (and we
+don't keep them in two sorted singly-linked lists) any more.  Instead,
+we'll store them inside the balanced binary tree used for
+text-properties.  I think we can use the "augmented tree" approach
+described in https://en.wikipedia.org/wiki/Interval_tree.
+
+To ease up debugging during development, I'd guess the implementation
+would first add the new stuff, keeping the old stuff (i.e. add to
+Lisp_Overlay whichever fields are needed for the new code, while keeping
+the old ones, add needed overlay fields to the intervals tree, but keep
+the old fields, the overlays_before etc...).  This way, you can add
+consistency checks that make sure the new code computes the same results
+as the old code.  And once that works well, we can remove the old code
+and old fields.
+
 ** Having tabs above a window to switch buffers in it.
 
 ** "Perspectives" are named persistent window configurations.  We have
@@ -308,6 +392,12 @@ familiar with GNUstep and Objective C.
 
 * Other features we would like:
 
+** A more modern printing interface.  One that pops up a dialog that lets
+you choose printer, page style, etc.
+Integration with the Gtk print dialog is apparently difficult.  See eg:
+http://lists.gnu.org/archive/html/emacs-devel/2009-03/msg00501.html
+http://lists.gnu.org/archive/html/emacs-devel/2009-04/msg00034.html
+
 ** Allow frames(terminals) created by emacsclient to inherit their environment
 from the emacsclient process.
 
@@ -405,6 +495,8 @@ rather than interactively.  This a trivial one-liner in easy-mode.el.
 
 ** Save undo information in special temporary files, and reload it
   when needed for undoing.  This could extend undo capacity.
+  undo-tree, in ELPA, already does this; its saving code could be
+  integrated without requiring the use of undo-tree.
 
 ** Change the Windows NT menu code
   so that it handles the deep_p argument and avoids
@@ -439,12 +531,6 @@ rather than interactively.  This a trivial one-liner in easy-mode.el.
   [Basic support added 2013/10:
   http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00904.html ]
 
-** Eliminate the storm of warnings concerning char/unsigned char
-  mismatches that we get with GCC 4.x and proprietary compilers on
-  various systems.  They make it difficult to spot the important warnings.
-
-** Fix anything necessary to use `long long' EMACS_INTs with GCC.
-
 ** Split out parts of lisp.h.
 
 ** Update the FAQ.
@@ -464,7 +550,8 @@ rather than interactively.  This a trivial one-liner in easy-mode.el.
 
 ** Add definitions for symbol properties, for documentation purposes.
 
-** Add horizontal scroll bars.
+** Temporarily remove scroll bars when they are not needed, typically
+  when a buffer can be fully displayed in its window.
 
 ** Provide an optional feature which computes a scroll bar slider's
   size and its position from lines instead of characters.
@@ -1202,10 +1289,6 @@ systems for HTML/XML files automatically."
 ** Replace linum.el with nlinum.el
    http://lists.gnu.org/archive/html/emacs-devel/2013-08/msg00379.html
 
-** Use pcomplete by default in shell-mode.
-   This means to make it behave (by default) more like the current code.
-   Use it also for read-shell-command, M-x compile, ...
-
 ** Merge sendmail.el and messages.el.
    Probably not a complete merge, but at least arrange for messages.el to be
    a derived mode of sendmail.el.  Or arrange for messages.el to be split
@@ -1248,9 +1331,6 @@ for vc-rcs-update-changelog.
 ** a two-char comment-starter whose two chars are symbol constituents will
 not be noticed if it appears within a word.
 
-** Fix unexelf.c to handle the .data.rel and .data.rel.local
-   sections made by GCC 3.4 on IRIX.
-
 \f
 This file is part of GNU Emacs.
 
index 0678d99ddb79b3ce50b6d781297d6fd5b69a6a8f..a70232d84a6fa0343f76951bb815b293c2287ce8 100644 (file)
@@ -1,244 +1,8 @@
-                  Why Software Should Not Have Owners
+Why Software Should Not Have Owners
 
-                         by Richard Stallman
+Note added March 2014:
 
-Digital information technology contributes to the world by making it
-easier to copy and modify information.  Computers promise to make this
-easier for all of us.
+This file is obsolete and will be removed in future.
+Please update any references to use
 
-Not everyone wants it to be easier.  The system of copyright gives
-software programs "owners", most of whom aim to withhold software's
-potential benefit from the rest of the public.  They would like to be
-the only ones who can copy and modify the software that we use.
-
-The copyright system grew up with printing--a technology for mass
-production copying.  Copyright fit in well with this technology
-because it restricted only the mass producers of copies.  It did not
-take freedom away from readers of books.  An ordinary reader, who did
-not own a printing press, could copy books only with pen and ink, and
-few readers were sued for that.
-
-Digital technology is more flexible than the printing press: when
-information has digital form, you can easily copy it to share it with
-others.  This very flexibility makes a bad fit with a system like
-copyright.  That's the reason for the increasingly nasty and draconian
-measures now used to enforce software copyright.  Consider these four
-practices of the Software Publishers Association (SPA):
-
-* Massive propaganda saying it is wrong to disobey the owners
-to help your friend.
-
-* Solicitation for stool pigeons to inform on their coworkers and
-colleagues.
-
-* Raids (with police help) on offices and schools, in which people are
-told they must prove they are innocent of illegal copying.
-
-* Prosecution (by the US government, at the SPA's request) of people
-such as MIT's David LaMacchia, not for copying software (he is not
-accused of copying any), but merely for leaving copying facilities
-unguarded and failing to censor their use.
-
-All four practices resemble those used in the former Soviet Union,
-where every copying machine had a guard to prevent forbidden copying,
-and where individuals had to copy information secretly and pass it
-from hand to hand as "samizdat".  There is of course a difference: the
-motive for information control in the Soviet Union was political; in
-the US the motive is profit.  But it is the actions that affect us,
-not the motive.  Any attempt to block the sharing of information, no
-matter why, leads to the same methods and the same harshness.
-
-Owners make several kinds of arguments for giving them the power
-to control how we use information:
-
-* Name calling.
-
-Owners use smear words such as "piracy" and "theft", as well as expert
-terminology such as "intellectual property" and "damage", to suggest a
-certain line of thinking to the public--a simplistic analogy between
-programs and physical objects.
-
-Our ideas and intuitions about property for material objects are about
-whether it is right to *take an object away* from someone else.  They
-don't directly apply to *making a copy* of something.  But the owners
-ask us to apply them anyway.
-
-* Exaggeration.
-
-Owners say that they suffer "harm" or "economic loss" when users copy
-programs themselves.  But the copying has no direct effect on the
-owner, and it harms no one.  The owner can lose only if the person who
-made the copy would otherwise have paid for one from the owner.
-
-A little thought shows that most such people would not have bought
-copies.  Yet the owners compute their "losses" as if each and every
-one would have bought a copy.  That is exaggeration--to put it kindly.
-
-* The law.
-
-Owners often describe the current state of the law, and the harsh
-penalties they can threaten us with.  Implicit in this approach is the
-suggestion that today's law reflects an unquestionable view of
-morality--yet at the same time, we are urged to regard these penalties
-as facts of nature that can't be blamed on anyone.
-
-This line of persuasion isn't designed to stand up to critical
-thinking; it's intended to reinforce a habitual mental pathway.
-
-It's elemental that laws don't decide right and wrong.  Every American
-should know that, forty years ago, it was against the law in many
-states for a black person to sit in the front of a bus; but only
-racists would say sitting there was wrong.
-
-* Natural rights.
-
-Authors often claim a special connection with programs they have
-written, and go on to assert that, as a result, their desires and
-interests concerning the program simply outweigh those of anyone
-else--or even those of the whole rest of the world.  (Typically
-companies, not authors, hold the copyrights on software, but we are
-expected to ignore this discrepancy.)
-
-To those who propose this as an ethical axiom--the author is more
-important than you--I can only say that I, a notable software author
-myself, call it bunk.
-
-But people in general are only likely to feel any sympathy with the
-natural rights claims for two reasons.
-
-One reason is an overstretched analogy with material objects.  When I
-cook spaghetti, I do object if someone else takes it and stops me from
-eating it.  In this case, that person and I have the same material
-interests at stake, and it's a zero-sum game.  The smallest
-distinction between us is enough to tip the ethical balance.
-
-But whether you run or change a program I wrote affects you directly
-and me only indirectly.  Whether you give a copy to your friend
-affects you and your friend much more than it affects me.  I shouldn't
-have the power to tell you not to do these things.  No one should.
-
-The second reason is that people have been told that natural rights
-for authors is the accepted and unquestioned tradition of our society.
-
-As a matter of history, the opposite is true.  The idea of natural
-rights of authors was proposed and decisively rejected when the US
-Constitution was drawn up.  That's why the Constitution only *permits*
-a system of copyright and does not *require* one; that's why it says
-that copyright must be temporary.  It also states that the purpose of
-copyright is to promote progress--not to reward authors.  Copyright
-does reward authors somewhat, and publishers more, but that is
-intended as a means of modifying their behavior.
-
-The real established tradition of our society is that copyright cuts
-into the natural rights of the public--and that this can only be
-justified for the public's sake.
-
-* Economics.
-
-The final argument made for having owners of software is that this
-leads to production of more software.
-
-Unlike the others, this argument at least takes a legitimate approach
-to the subject.  It is based on a valid goal--satisfying the users of
-software.  And it is empirically clear that people will produce more of
-something if they are well paid for doing so.
-
-But the economic argument has a flaw: it is based on the assumption
-that the difference is only a matter of how much money we have to pay.
-It assumes that "production of software" is what we want, whether the
-software has owners or not.
-
-People readily accept this assumption because it accords with our
-experiences with material objects.  Consider a sandwich, for instance.
-You might well be able to get an equivalent sandwich either free or
-for a price.  If so, the amount you pay is the only difference.
-Whether or not you have to buy it, the sandwich has the same taste,
-the same nutritional value, and in either case you can only eat it
-once.  Whether you get the sandwich from an owner or not cannot
-directly affect anything but the amount of money you have afterwards.
-
-This is true for any kind of material object--whether or not it has an
-owner does not directly affect what it *is*, or what you can do with
-it if you acquire it.
-
-But if a program has an owner, this very much affects what it is, and
-what you can do with a copy if you buy one.  The difference is not
-just a matter of money.  The system of owners of software encourages
-software owners to produce something--but not what society really
-needs.  And it causes intangible ethical pollution that affects us
-all.
-
-What does society need?  It needs information that is truly available
-to its citizens--for example, programs that people can read, fix,
-adapt, and improve, not just operate.  But what software owners
-typically deliver is a black box that we can't study or change.
-
-Society also needs freedom.  When a program has an owner, the users
-lose freedom to control part of their own lives.
-
-And above all society needs to encourage the spirit of voluntary
-cooperation in its citizens.  When software owners tell us that
-helping our neighbors in a natural way is "piracy", they pollute our
-society's civic spirit.
-
-This is why we say that free software is a matter of freedom, not
-price.
-
-The economic argument for owners is erroneous, but the economic issue
-is real.  Some people write useful software for the pleasure of
-writing it or for admiration and love; but if we want more software
-than those people write, we need to raise funds.
-
-For ten years now, free software developers have tried various methods
-of finding funds, with some success.  There's no need to make anyone
-rich; the median US family income, around $35k, proves to be enough
-incentive for many jobs that are less satisfying than programming.
-
-For years, until a fellowship made it unnecessary, I made a living
-from custom enhancements of the free software I had written.  Each
-enhancement was added to the standard released version and thus
-eventually became available to the general public.  Clients paid me so
-that I would work on the enhancements they wanted, rather than on the
-features I would otherwise have considered highest priority.
-
-The Free Software Foundation, a tax-exempt charity for free software
-development, raises funds by selling CD-ROMs, tapes and manuals (all
-of which users are free to copy and change), as well as from
-donations.  It now has a staff of five programmers, plus three
-employees who handle mail orders.
-
-Some free software developers make money by selling support services.
-Cygnus Support, with around 50 employees, estimates that about 15 per
-cent of its staff activity is free software development--a respectable
-percentage for a software company.
-
-Companies including Intel, Motorola, Texas Instruments and Analog
-Devices have combined to fund the continued development of the free
-GNU compiler for the language C.  Meanwhile, the GNU compiler for the
-Ada language is being funded by the US Air Force, which believes this
-is the most cost-effective way to get a high quality compiler.
-
-All these examples are small; the free software movement is still
-small, and still young.  But the example of listener-supported radio
-in this country shows it's possible to support a large activity
-without forcing each user to pay.
-
-As a computer user today, you may find yourself using a proprietary
-program.  If your friend asks to make a copy, it would be wrong to
-refuse.  Cooperation is more important than copyright.  But
-underground, closet cooperation does not make for a good society.  A
-person should aspire to live an upright life openly with pride, and
-this means saying "No" to proprietary software.
-
-You deserve to be able to cooperate openly and freely with other
-people who use software.  You deserve to be able to learn how the
-software works, and to teach your students with it.  You deserve to be
-able to hire your favorite programmer to fix it when it breaks.
-
-You deserve free software.
-
-
-Copyright 1994 Richard Stallman
-Verbatim copying and redistribution is permitted
-without royalty as long as this notice is preserved;
-alteration is not permitted.
+<http://www.gnu.org/philosophy/why-free.html>
index e835c57eb13135873606110846b521792e6354c1..919e4db30d263dcb0723c41bb6032759a9f707d6 100644 (file)
@@ -261,6 +261,26 @@ file:G:/cygwin/dev/build-myproj.xml:54: Compiler Adapter 'javac' can't be found.
 {standard input}:27041: Warning: end of file not at end of a line; newline inserted
 
 
+* Guile backtrace, 2.0.11
+
+symbols: guile-file, guile-line
+
+Backtrace:
+In ice-9/boot-9.scm:
+ 157: 6 [catch #t #<catch-closure 196e3e0> ...]
+In unknown file:
+   ?: 5 [apply-smob/1 #<catch-closure 196e3e0>]
+In ice-9/boot-9.scm:
+  63: 4 [call-with-prompt prompt0 ...]
+In ice-9/eval.scm:
+ 432: 3 [eval # #]
+In unknown file:
+   ?: 2 [eval (main (command-line)) #<directory (gud-break) 1962510>]
+In /home/janneke/vc/guile/examples/gud-break.scm:
+1038: 1 [main ("gud-break.scm")]
+1033: 0 [stderr "~a:hello world\n" (# # #)]
+
+
 * Lucid Compiler, lcc 3.x
 
 symbol: lcc
index 94a060234f5a393ed2762571c8ba1f0b55606cdc..ee786cff76eb0a9ff2392ce658b3510e7ae5b2d6 100644 (file)
@@ -79,7 +79,7 @@ set $yfile_buffers_only = 0
 
 define ygetptr
   set $ptr = $arg0
-  set $ptr = ((CHECK_LISP_OBJECT_TYPE ? $ptr.i : $ptr) & VALMASK) | DATA_SEG_BITS
+  set $ptr = (CHECK_LISP_OBJECT_TYPE ? $ptr.i : $ptr) & VALMASK
 end
 
 define ybuffer-list
index b2df1970ca30235b50d36ef7fcae6b86e1c65b45..7e5ff6488dc3e276cc11afddaa867800a4716b4b 100644 (file)
@@ -1,4 +1,4 @@
 %% This file is not generated by configure, because then the provided
 %% pdf files would always appear out-of-date.
-\def\versionemacs{24}           % major version of emacs
+\def\versionemacs{25}           % major version of emacs
 \def\year{2014}                 % latest copyright year
index 39a789d1d594a31ba19aab822190c3bc8c30e76a..0458ccba41fcbb14d3fd64ad133a41a363213d15 100644 (file)
@@ -21,7 +21,7 @@
 \newlength{\ColThreeWidth}
 \setlength{\ColThreeWidth}{25mm}
 
-\newcommand{\versionemacs}[0]{24} % version of Emacs this is for
+\newcommand{\versionemacs}[0]{25} % version of Emacs this is for
 \newcommand{\cyear}[0]{2014}       % copyright year
 
 \newcommand\shortcopyrightnotice[0]{\vskip 1ex plus 2 fill
index 6f6dae057813237ad0a9dc2dc44e6202bd98182d..7036ce45b34a4743e144b6034743648ddd9cbc42 100644 (file)
@@ -35,7 +35,18 @@ Used and created by Tassilo Horn.")
  '(dired-directory ((t (:inherit font-lock-function-name-face :weight bold))))
  '(gnus-button ((t (:inherit button))))
  '(gnus-header-name ((t (:box (:line-width 1 :style released-button) :weight bold))))
- '(header-line ((t (:inherit mode-line :inverse-video t))))
+ '(gnus-group-mail-1 ((t (:inherit gnus-group-mail-1-empty :weight bold))))
+ '(gnus-group-mail-1-empty ((t (:foreground "DodgerBlue4"))))
+ '(gnus-group-mail-2 ((t (:inherit gnus-group-mail-2-empty :weight bold))))
+ '(gnus-group-mail-2-empty ((t (:foreground "DodgerBlue3"))))
+ '(gnus-group-mail-3 ((t (:inherit gnus-group-mail-3-empty :weight bold))))
+ '(gnus-group-mail-3-empty ((t (:foreground "DodgerBlue2"))))
+ '(gnus-group-news-1 ((t (:inherit gnus-group-news-1-empty :weight bold))))
+ '(gnus-group-news-1-empty ((t (:foreground "tomato4"))))
+ '(gnus-group-news-2 ((t (:inherit gnus-group-news-2-empty :weight bold))))
+ '(gnus-group-news-2-empty ((t (:foreground "tomato3"))))
+ '(gnus-group-news-3 ((t (:inherit gnus-group-news-3-empty :weight bold))))
+ '(gnus-group-news-3-empty ((t (:foreground "tomato2")))) '(header-line ((t (:inherit mode-line :inverse-video t))))
  '(hl-line ((t (:background "grey95"))))
  '(minibuffer-prompt ((t (:background "yellow" :foreground "medium blue" :box (:line-width -1 :color "red" :style released-button) :weight bold))))
  '(mode-line ((t (:background "wheat" :foreground "black" :box (:line-width 1 :color "tan") :family "DejaVu Sans"))))
index 73dee39661821b404bac781819c98a1cfbc381c0..ac698f63e713bbc7aa5374198fab9d899f2994ef 100644 (file)
@@ -1,3 +1,22 @@
+2014-06-10  Glenn Morris  <rgm@gnu.org>
+
+       Use GNU Make features to simplify and parallelize.
+       * Makefile.in (CHINESE_TIT, TIT_SOURCES, MISC_SOURCES, changed.tit)
+       (changed.misc): Remove.
+       (${leimdir}/quail, ${leimdir}/ja-dic): Create using order-only prereq.
+       (misc_convert): New.
+       (${leimdir}/quail/%.el, ${leimdir}/quail/CT%.el)
+       (${leimdir}/quail/PY.el, ${leimdir}/quail/ZIRANMA.el)
+       (${leimdir}/quail/tsang-%.el, ${leimdir}/quail/quick-%.el):
+       Use pattern rules.
+       (${leimdir}/leim-list.el, ${leimdir}/ja-dic/ja-dic.el):
+       Use automatic variables.
+       (bootstrap-clean): No changed.* files to delete any more.
+
+2014-04-11  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (EMACSDATA, EMACSDOC, EMACSPATH): Unexport.
+
 2014-01-20  Paul Eggert  <eggert@cs.ucla.edu>
 
        Revert some of the CANNOT_DUMP fix (Bug#16494).
index 6bfc3ae70487c5bceba970fe604310a4bc6da85c..16f3917c61ca8b6119853015fedfc503a3404917 100644 (file)
@@ -29,6 +29,9 @@ srcdir=@srcdir@
 # Where the generated files go.
 leimdir = ${srcdir}/../lisp/leim
 
+# Prevent any settings in the user environment causing problems.
+unexport EMACSDATA EMACSDOC EMACSPATH
+
 # Which Emacs to use to convert TIT files to Emacs Lisp files,
 # and generate the file leim-list.el.
 EMACS = ../src/emacs
@@ -58,8 +61,6 @@ TIT_BIG5=\
        ${leimdir}/quail/QJ-b5.el       \
        ${leimdir}/quail/ZOZY.el
 
-CHINESE_TIT=${TIT_GB} ${TIT_BIG5}
-
 MISC= \
        ${leimdir}/quail/tsang-b5.el    \
        ${leimdir}/quail/quick-b5.el    \
@@ -70,80 +71,66 @@ MISC= \
        ${leimdir}/quail/CTLau.el       \
        ${leimdir}/quail/CTLau-b5.el
 
-## The generated .el files.
-TIT_MISC=${CHINESE_TIT} ${MISC}
+## All the generated .el files.
+TIT_MISC = ${TIT_GB} ${TIT_BIG5} ${MISC}
+
 
 all: ${leimdir}/leim-list.el ${leimdir}/ja-dic/ja-dic.el
 .PHONY: all
 
-TIT_SOURCES= \
-       ${srcdir}/CXTERM-DIC/4Corner.tit \
-       ${srcdir}/CXTERM-DIC/ARRAY30.tit \
-       ${srcdir}/CXTERM-DIC/CCDOSPY.tit \
-       ${srcdir}/CXTERM-DIC/ECDICT.tit \
-       ${srcdir}/CXTERM-DIC/ETZY.tit \
-       ${srcdir}/CXTERM-DIC/PY-b5.tit \
-       ${srcdir}/CXTERM-DIC/Punct-b5.tit \
-       ${srcdir}/CXTERM-DIC/Punct.tit \
-       ${srcdir}/CXTERM-DIC/QJ-b5.tit \
-       ${srcdir}/CXTERM-DIC/QJ.tit \
-       ${srcdir}/CXTERM-DIC/SW.tit \
-       ${srcdir}/CXTERM-DIC/TONEPY.tit \
-       ${srcdir}/CXTERM-DIC/ZOZY.tit
-
-${CHINESE_TIT}: changed.tit
-       @true
-
-## The changed.* files act to serialize this part of the build.
-## A single Emacs invocation creates all the CHINESE_TIT files.
-## Otherwise in a parallel build multiple Emacs instances could
-## interfere with each other.  If we used GNU make we could probably
-## parallelize this without the need for an explicit rule for each
-## file.  Something like the pattern rule:
-## quail/%.el: CXTERM-DIC/%.tit
-## It doesn't seem possible to do this with VPATH and suffix rules.
-changed.tit: ${TIT_SOURCES}
-       @${MKDIR_P} ${leimdir}/quail
-       ${RUN_EMACS} -l titdic-cnv \
-         -f batch-titdic-convert -dir ${leimdir}/quail ${srcdir}/CXTERM-DIC
-       echo "changed" > $@
-
-MISC_SOURCES= \
-       ${srcdir}/MISC-DIC/CTLau-b5.html \
-       ${srcdir}/MISC-DIC/CTLau.html \
-       ${srcdir}/MISC-DIC/cangjie-table.b5 \
-       ${srcdir}/MISC-DIC/cangjie-table.cns \
-       ${srcdir}/MISC-DIC/pinyin.map \
-       ${srcdir}/MISC-DIC/ziranma.cin
-
-${MISC}: changed.misc
-       @true
-
-changed.misc: ${MISC_SOURCES}
-       @${MKDIR_P} ${leimdir}/quail
+
+## Ensure the output directory exists.
+${TIT_MISC}: | ${leimdir}/quail
+
+${leimdir}/quail ${leimdir}/ja-dic:
+       ${MKDIR_P} $@
+
+
+## All of TIT_GB and TIT_BIG5.
+${leimdir}/quail/%.el: ${srcdir}/CXTERM-DIC/%.tit
        ${RUN_EMACS} -l titdic-cnv \
-         -f batch-miscdic-convert -dir ${leimdir}/quail ${srcdir}/MISC-DIC
-       echo "changed" > $@
+         -f batch-titdic-convert -dir ${leimdir}/quail $<
+
+
+misc_convert = ${RUN_EMACS} -l titdic-cnv -f batch-miscdic-convert -dir ${leimdir}/quail
+
+## CTLau.el, CTLau-b5.el.
+${leimdir}/quail/CT%.el: ${srcdir}/MISC-DIC/CT%.html
+       ${misc_convert} $<
+
+${leimdir}/quail/PY.el: ${srcdir}/MISC-DIC/pinyin.map
+       ${misc_convert} $<
+
+${leimdir}/quail/ZIRANMA.el: ${srcdir}/MISC-DIC/ziranma.cin
+       ${misc_convert} $<
+
+## Processing cangjie-table.b5 and cangjie-table.cns generates two files
+## in each case.
+${leimdir}/quail/tsang-%.el ${leimdir}/quail/quick-%.el: ${srcdir}/MISC-DIC/cangjie-table.%
+       ${misc_convert} $<
+
 
 .PHONY: leim-list.el
 leim-list.el: ${leimdir}/leim-list.el
 
-${leimdir}/leim-list.el: ${TIT_MISC} ${srcdir}/leim-ext.el
+${leimdir}/leim-list.el: ${srcdir}/leim-ext.el ${TIT_MISC}
        rm -f $@
        ${RUN_EMACS} -l international/quail \
          --eval "(update-leim-list-file (unmsys--file-name \"${leimdir}\"))"
-       sed -n -e '/^[^;]/p' -e 's/^;\(;*\)inc /;\1 /p' < ${srcdir}/leim-ext.el >> $@
+       sed -n -e '/^[^;]/p' -e 's/^;\(;*\)inc /;\1 /p' < $< >> $@
+
+
+${leimdir}/ja-dic/ja-dic.el: | $(leimdir)/ja-dic
 
 ${leimdir}/ja-dic/ja-dic.el: $(srcdir)/SKK-DIC/SKK-JISYO.L
-       @$(MKDIR_P) $(leimdir)/ja-dic
        $(RUN_EMACS) -batch -l ja-dic-cnv \
-         -f batch-skkdic-convert -dir "$(leimdir)/ja-dic" \
-         "$(srcdir)/SKK-DIC/SKK-JISYO.L"
+         -f batch-skkdic-convert -dir "$(leimdir)/ja-dic" "$<"
+
 
 .PHONY: bootstrap-clean distclean maintainer-clean extraclean
 
 bootstrap-clean:
-       rm -f ${TIT_MISC} ${leimdir}/leim-list.el changed.tit changed.misc
+       rm -f ${TIT_MISC} ${leimdir}/leim-list.el
 
 distclean:
        rm -f Makefile
@@ -152,8 +139,6 @@ maintainer-clean: distclean bootstrap-clean
 
 ## We do not delete ja-dic, even in a bootstrap, because it rarely
 ## changes and is slow to regenerate.
-## TODO? Could consider doing the same with TIT_MISC, though those
-## are much faster to generate.
 extraclean:
        rm -rf ${leimdir}/ja-dic
 
index f204ab517e28b56b1b5c64ef16dc302ab12dd92e..6c31841c1305f1ba5054c3b5a76ef1532d2d2dce 100644 (file)
@@ -1,8 +1,106 @@
+2014-09-23  Paul Eggert  <eggert@cs.ucla.edu>
+
+       movemail: don't dump core if the current time is outlandish
+       * movemail.c (popmail): Check for mbx_delimit_begin failure.
+       (mbx_delimit_begin): Fail if the current time is so outlandish
+       that localtime would fail or asctime would have undefined
+       behavior.  Use strftime to avoid asctime undefined behavior.
+
+2014-09-01  Paul Eggert  <eggert@cs.ucla.edu>
+
+       --enable-silent-rules now suppresses more chatter.
+       * Makefile.in (AM_DEFAULT_VERBOSITY, AM_V_CC, am__v_CC_)
+       (am__v_CC_0, am__v_CC_1, AM_V_CCLD, am__v_CCLD_, am__v_CCLD_0)
+       (am__v_CCLD_1): New macros, taken from Automake.
+       (regex.o, etags${EXEEXT}, ctags${EXEEXT}, ebrowse${EXEEXT})
+       (profile${EXEEXT}, make-docfile${EXEEXT}, movemail${EXEEXT})
+       (pop.o, emacsclient${EXEEXT}, emacsclientw${EXEEXT})
+       (emacsclientw${EXEEXT}, ntlib.o, hexl${EXEEXT})
+       (update-game-score${EXEEXT}): Use them.
+
+       * etags.c (emacs_strchr, emacs_strrchr): Remove.
+       All uses replaced by strchr and strrchr, which are on all
+       target platforms now.
+
+2014-07-15  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Use "b" flag more consistently; avoid "t" (Bug#18006).
+       * make-docfile.c (READ_TEXT): Remove; all uses replaced by "r".
+       (READ_BINARY): Remove; all uses replaced by "rb".
+
+2014-07-14  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Use binary-io module, O_BINARY, and "b" flag (Bug#18006).
+       * etags.c, hexl.c, make-docfile.c:
+       Include binary-io.h instead of fcntl.h and/or io.h.
+       (main): Use set_binary_mode or SET_BINARY
+       in place of handcrafted code.
+       * etags.c (main) [DOS_NT]:
+       * movemail.c (main) [WINDOWSNT]:
+       Don't mess with _fmode.
+       * etags.c (main, process_file_name, analyse_regex):
+       Use fopen/popen's "b" flag instead.
+       * movemail.c (main, popmail): Use open/lk_open/mkostemp's O_BINARY
+       instead.
+
+2014-07-13  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * make-docfile.c: Simplify a bit, to simplify further refactoring.
+       (outfile): Remove static var.  All uses changed to use stdout,
+       since it's always stdout anyway.  While we're at it, prefer
+       putchar/puts/fputs to printf when there are no format strings.
+       (main): Use freopen rather than fopen, so that stdout is reused.
+       Move O_BINARY stuff after the freopen, so it affects the
+       reopened file.
+       (write_c_args): Omit first arg, since it's always stdout now.
+       All uses changed.
+
 2014-07-12  Paul Eggert  <eggert@cs.ucla.edu>
 
        * etags.c (Lisp_functions): Also record cl-defun etc. (Bug#17965)
 
-2014-05-20  Paul Eggert  <eggert@cs.ucla.edu>
+2014-06-26  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (blessmail): Depend on lisp/mail/blessmail.el.
+       Use $<, $@.
+       (regex.o, etags${EXEEXT}, ctags${EXEEXT}, ebrowse${EXEEXT})
+       (profile${EXEEXT}, make-docfile${EXEEXT}, movemail${EXEEXT})
+       (pop.o, emacsclient${EXEEXT}, emacsclientw${EXEEXT}, ntlib.o)
+       (hexl${EXEEXT}, update-game-score${EXEEXT}, emacsclient.res): Use $<.
+       (ctags${EXEEXT}): Add $srcdir to dependency rather than using VPATH.
+
+2014-06-17  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Omit redundant extern decls.
+       * emacsclient.c (getenv): Remove decl.
+       * make-docfile.c (write_globals): Add ATTRIBUTE_CONST for
+       Fbyteorder, Ftool_bar_height, Fmax_char, Fidentity.
+
+2014-06-15  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (LDFLAGS): Explicitly set via configure.
+
+2014-06-15  Eli Zaretskii  <eliz@gnu.org>
+
+       * Makefile.in (CPPFLAGS): Define.
+
+2014-06-15  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (../lib/libgnu.a):
+       Use `make -C' rather than `cd && make'.
+
+       * Makefile.in (bootstrap-clean): New.
+
+2014-06-13  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (../lib/libgnu.a):
+       GNU make automatically passes command-line arguments to sub-makes.
+
+2014-05-26  Eli Zaretskii  <eliz@gnu.org>
+
+       * ntlib.h (lseek): Don't redirect to _lseek.
+
+2014-05-26  Paul Eggert  <eggert@cs.ucla.edu>
 
        Fix rcs2log problems with CVS.
        Problem reported by Glenn Morris in
        (logdir, llogdir): Work even if TMPDIR begins with '-' or has spaces.
        (output_authors, main awk script): Parse more-recent CVS output format.
 
-2014-05-03  Paul Eggert  <eggert@cs.ucla.edu>
+2014-05-19  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Remove dependencies on getline and getdelim.
+       Also, remove update-game-scores's limits on game scores and
+       simplify its file-locking code.
+       * update-game-score.c (struct score_entry): Unify the username and
+       data members to a single user_data member, since they don't need to be
+       changed independently and getdelim and getline aren't helpful.
+       Make the score member char *, not intmax_t, so that scores are not
+       limited to intmax_t.  All uses changed.
+       (lose_syserr): A zero errno stands for invalid data in score file.
+       (normalize_integer): New function.
+       (main): Use it.  Check for invalid scores.  Omit redundant stat check.
+       (read_score): First arg is now a string, not a FILE *.  All uses
+       changed.  Do not use getdelim or getline; that's way simpler.
+       (read_scores): Read the whole file, and let read_score handle each
+       line.
+       (score_compare): Compare strings representing integers, not integers.
+       (write_scores) [DOS_NT]: Eliminate unnecessary chmod.
+       (lock_file): Simplify locking code, eliminating goto.
+       Check for unlink failure.
+
+2014-05-18  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Port ctags+etags build to Sun C 5.12.
+       * Makefile.in (etags_args): Remove, replacing with ...
+       (etags_cflags, etags_libs): New macros.  All uses changed.
+       (ctags${EXEEXT}): Don't compile etags.c, as compiling etags.c in
+       parallel (once for ctags, once for etags) breaks parallel makes
+       with compilers that use the source file name to name temporaries,
+       such as Sun C 5.12.  Instead, compile ctags.c.
+       * ctags.c: New file.
+
+2014-05-04  Paul Eggert  <eggert@cs.ucla.edu>
 
        Handle systems without WCONTINUED consistently.  (Bug#15110, 17339)
        * emacsclient.c (WCONTINUED): Move to ../src/syswait.h.
 
-2014-04-29  Glenn Morris  <rgm@gnu.org>
+2014-04-30  Glenn Morris  <rgm@gnu.org>
 
        * Makefile.in ($(DESTDIR)${archlibdir}):
        Avoid non-portable "`\" nesting.  (Bug#17339)
        * update-game-score.c (write_scores): Condition fchmod call on
        DOS_NT, not WINDOWSNT.
 
+2014-03-22  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (etags_deps, etags_args): New, to reduce duplication.
+       (etags${EXEEXT}, ctags${EXEEXT}): Use etags_deps, etags_args.
+
+       * Makefile.in (etags${EXEEXT}, ebrowse${EXEEXT}, ctags${EXEEXT})
+       (profile${EXEEXT}, make-docfile${EXEEXT}, movemail${EXEEXT})
+       (emacsclient${EXEEXT}, emacsclientw${EXEEXT}, hexl${EXEEXT})
+       (update-game-score${EXEEXT}, emacsclient.res): Use $@.
+
+       * Makefile.in (../lib/libgnu.a): Explicitly pass MFLAGS.
+
+       * Makefile.in (DONT_INSTALL): Remove test-distrib.
+       (test-distrib${EXEEXT}): Remove rule.
+
+       * test-distrib.c, testfile: Remove.
+
 2014-03-10  Juanma Barranquero  <lekktu@gmail.com>
 
        * emacsclient.c (main): #ifdef out previous change on Windows.
index 4d9fdba7726383093eb28409c82ccb8c9c45bffe..fe101047dea3c525075491dbb671db66d3f33e42 100644 (file)
@@ -1,7 +1,7 @@
 ### @configure_input@
 
-# Copyright (C) 1985, 1987-1988, 1993-1994, 2001-2014 Free Software
-# Foundation, Inc.
+# Copyright (C) 1985, 1987-1988, 1993-1994, 2001-2014
+#   Free Software Foundation, Inc.
 
 # This file is part of GNU Emacs.
 
@@ -28,6 +28,9 @@ EMACSOPT = -batch --no-site-file --no-site-lisp
 
 CC=@CC@
 CFLAGS=@CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+
 version=@version@
 ## Used in $archlibdir.
 configuration=@configuration@
@@ -42,6 +45,19 @@ UPDATE_MANIFEST = @UPDATE_MANIFEST@
 # Program name transformation.
 TRANSFORM = @program_transform_name@
 
+# 'make' verbosity.
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 =
+
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 =
+
 # ==================== Where To Install Things ====================
 
 # Location to install Emacs.app under GNUstep / Mac OS X.
@@ -128,7 +144,7 @@ INSTALLABLE_SCRIPTS = grep-changelog
 UTILITIES = profile${EXEEXT} movemail${EXEEXT} hexl${EXEEXT} \
             update-game-score${EXEEXT}
 
-DONT_INSTALL= test-distrib${EXEEXT} make-docfile${EXEEXT}
+DONT_INSTALL= make-docfile${EXEEXT}
 
 # Like UTILITIES, but they're not system-dependent, and should not be
 #  deleted by the distclean target.
@@ -192,6 +208,7 @@ BASE_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \
              -I${srcdir} -I${srcdir}/../src -I${srcdir}/../lib
 
 ALL_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${LDFLAGS} ${CPPFLAGS} ${CFLAGS}
+## Unused.
 LINK_CFLAGS = ${BASE_CFLAGS} ${LDFLAGS} ${CFLAGS}
 CPP_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${CPPFLAGS} ${CFLAGS}
 
@@ -207,9 +224,9 @@ $(EXE_FILES): ../lib/libgnu.a
 
 ## Only used if we need blessmail, but no harm in always defining.
 ## This makes the actual blessmail executable.
-blessmail:
-       $(EMACS) $(EMACSOPT) -l $(srcdir)/../lisp/mail/blessmail.el
-       chmod +x blessmail
+blessmail: $(srcdir)/../lisp/mail/blessmail.el
+       $(EMACS) $(EMACSOPT) -l $<
+       chmod +x $@
 
 ## This checks if we need to run blessmail.
 ## Do not charge ahead and do it!  Let the installer decide.
@@ -255,7 +272,7 @@ $(DESTDIR)${archlibdir}: all
        fi
 
 .PHONY: install uninstall mostlyclean clean distclean maintainer-clean
-.PHONY: extraclean check tags
+.PHONY: bootstrap-clean extraclean check tags
 
 install: $(DESTDIR)${archlibdir}
        @echo
@@ -289,7 +306,7 @@ distclean: clean
        -rm -f TAGS
        -rm -f Makefile blessmail
 
-maintainer-clean: distclean
+bootstrap-clean maintainer-clean: distclean
        true
 
 extraclean: maintainer-clean
@@ -303,61 +320,55 @@ tags: TAGS
 TAGS: etags${EXEEXT}
        etags *.[ch]
 
-## This verifies that the non-ASCII characters in the file \`testfile\'
-## have not been clobbered by whatever means were used to copy and
-## distribute Emacs.  If they were clobbered, all the .elc files were
-## clobbered too.
-test-distrib${EXEEXT}: ${srcdir}/test-distrib.c
-       $(CC) ${ALL_CFLAGS} -o test-distrib${EXEEXT} ${srcdir}/test-distrib.c
-       ./test-distrib ${srcdir}/testfile
-
 ../lib/libgnu.a: $(config_h)
-       cd ../lib && $(MAKE) libgnu.a
+       $(MAKE) -C ../lib libgnu.a
 
 regex.o: $(srcdir)/../src/regex.c $(srcdir)/../src/regex.h $(config_h)
-       ${CC} -c ${CPP_CFLAGS} ${srcdir}/../src/regex.c
+       $(AM_V_CC)$(CC) -c $(CPP_CFLAGS) $<
 
-etags${EXEEXT}: ${srcdir}/etags.c regex.o $(NTLIB) $(config_h)
-       $(CC) ${ALL_CFLAGS} -DEMACS_NAME="\"GNU Emacs\"" \
-         -DVERSION="\"${version}\"" ${srcdir}/etags.c \
-         regex.o $(LOADLIBES) $(NTLIB) -o etags${EXEEXT}
 
-ebrowse${EXEEXT}: ${srcdir}/ebrowse.c ${srcdir}/../lib/min-max.h $(NTLIB) \
-                   $(config_h)
-       $(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" \
-         ${srcdir}/ebrowse.c $(LOADLIBES) $(NTLIB) -o ebrowse${EXEEXT}
+etags_deps = ${srcdir}/etags.c regex.o $(NTLIB) $(config_h)
+etags_cflags = -DEMACS_NAME="\"GNU Emacs\"" -DVERSION="\"${version}\"" -o $@
+etags_libs = regex.o $(LOADLIBES) $(NTLIB)
+
+etags${EXEEXT}: ${etags_deps}
+       $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} $(etags_cflags) $< $(etags_libs)
 
-## We depend on etags to assure that parallel makes do not write two
+## ctags.c is distinct from etags.c so that parallel makes do not write two
 ## etags.o files on top of each other.
-ctags${EXEEXT}: etags${EXEEXT}
-       $(CC) ${ALL_CFLAGS} -DCTAGS -DEMACS_NAME="\"GNU Emacs\"" \
-         -DVERSION="\"${version}\"" ${srcdir}/etags.c \
-         regex.o $(LOADLIBES) $(NTLIB) -o ctags${EXEEXT}
+## FIXME?
+## Can't we use a wrapper that calls 'etags --ctags'?
+ctags${EXEEXT}: ${srcdir}/ctags.c ${etags_deps}
+       $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} $(etags_cflags) $< $(etags_libs)
+
+ebrowse${EXEEXT}: ${srcdir}/ebrowse.c ${srcdir}/../lib/min-max.h $(NTLIB) \
+                   $(config_h)
+       $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" \
+         $< $(LOADLIBES) $(NTLIB) -o $@
 
 profile${EXEEXT}: ${srcdir}/profile.c $(NTLIB) $(config_h)
-       $(CC) ${ALL_CFLAGS} ${srcdir}/profile.c \
-         $(LOADLIBES) $(NTLIB) $(LIB_CLOCK_GETTIME) -o profile${EXEEXT}
+       $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} $< \
+         $(LOADLIBES) $(NTLIB) $(LIB_CLOCK_GETTIME) -o $@
 
 make-docfile${EXEEXT}: ${srcdir}/make-docfile.c $(NTLIB) $(config_h)
-       $(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) $(NTLIB) \
-         -o make-docfile${EXEEXT}
+       $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} $< $(LOADLIBES) $(NTLIB) -o $@
 
 movemail${EXEEXT}: ${srcdir}/movemail.c pop.o $(NTLIB) $(config_h)
-       $(CC) ${ALL_CFLAGS} ${MOVE_FLAGS} ${srcdir}/movemail.c pop.o \
-         $(LOADLIBES) $(NTLIB) $(LIBS_MOVE) -o movemail${EXEEXT}
+       $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} ${MOVE_FLAGS} $< pop.o \
+         $(LOADLIBES) $(NTLIB) $(LIBS_MOVE) -o $@
 
 pop.o: ${srcdir}/pop.c ${srcdir}/pop.h ${srcdir}/../lib/min-max.h $(config_h)
-       $(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/pop.c
+       $(AM_V_CC)$(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} $<
 
 emacsclient${EXEEXT}: ${srcdir}/emacsclient.c $(NTLIB) $(config_h)
-       $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c \
+       $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} $< \
           -DVERSION="\"${version}\"" $(NTLIB) $(LOADLIBES) $(LIB_FDATASYNC) \
-          $(LIB_WSOCK32) $(LIBS_ECLIENT) -o emacsclient${EXEEXT}
+          $(LIB_WSOCK32) $(LIBS_ECLIENT) -o $@
 
 emacsclientw${EXEEXT}: ${srcdir}/emacsclient.c $(NTLIB) $(CLIENTRES) $(config_h)
-       $(CC) ${ALL_CFLAGS} $(CLIENTRES) -mwindows ${srcdir}/emacsclient.c \
+       $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} $(CLIENTRES) -mwindows $< \
           -DVERSION="\"${version}\"" $(LOADLIBES) $(LIB_FDATASYNC) \
-          $(LIB_WSOCK32) $(LIBS_ECLIENT) -o emacsclientw${EXEEXT}
+          $(LIB_WSOCK32) $(LIBS_ECLIENT) -o $@
 
 NTINC = ${srcdir}/../nt/inc
 NTDEPS = $(NTINC)/ms-w32.h $(NTINC)/sys/stat.h $(NTINC)/inttypes.h \
@@ -367,18 +378,17 @@ NTDEPS = $(NTINC)/ms-w32.h $(NTINC)/sys/stat.h $(NTINC)/inttypes.h \
 # The dependency on $(NTDEPS) is a trick intended to cause recompile of
 # programs on MinGW whenever some private header in nt/inc is modified.
 ntlib.o: ${srcdir}/ntlib.c ${srcdir}/ntlib.h $(NTDEPS)
-       $(CC) -c ${CPP_CFLAGS} ${srcdir}/ntlib.c
+       $(AM_V_CC)$(CC) -c ${CPP_CFLAGS} $<
 
 hexl${EXEEXT}: ${srcdir}/hexl.c $(NTLIB) $(config_h)
-       $(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl${EXEEXT}
+       $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} $< $(LOADLIBES) -o $@
 
 update-game-score${EXEEXT}: ${srcdir}/update-game-score.c $(NTLIB) $(config_h)
-       $(CC) ${ALL_CFLAGS} -DHAVE_SHARED_GAME_DIR="\"$(gamedir)\"" \
-         ${srcdir}/update-game-score.c $(LOADLIBES) $(NTLIB) \
-         -o update-game-score${EXEEXT}
+       $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} \
+         -DHAVE_SHARED_GAME_DIR="\"$(gamedir)\"" \
+         $< $(LOADLIBES) $(NTLIB) -o $@
 
 emacsclient.res: $(NTINC)/../emacsclient.rc
-       $(WINDRES) -O coff --include-dir=$(NTINC)/.. -o emacsclient.res \
-         $(NTINC)/../emacsclient.rc
+       $(WINDRES) -O coff --include-dir=$(NTINC)/.. -o $@ $<
 
 ## Makefile ends here.
diff --git a/lib-src/ctags.c b/lib-src/ctags.c
new file mode 100644 (file)
index 0000000..0a6838a
--- /dev/null
@@ -0,0 +1,2 @@
+#define CTAGS 1
+#include "etags.c"
index a1177f54576df8086f5143a25c5a718b099c1ab3..ddc1b6de5e3a4a13d0e59bdc2255b97e0bcfe200 100644 (file)
@@ -82,10 +82,6 @@ char *w32_getenv (char *);
 #include <signal.h>
 #include <errno.h>
 
-
-\f
-char *getenv (const char *);
-
 #ifndef VERSION
 #define VERSION "unspecified"
 #endif
index 5f1f99c46776aea9304c01211c61b021b164f79b..84ed03e375f72e4a4ebfcf1c012a8f9dc2665b32 100644 (file)
@@ -105,17 +105,13 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4";
 #ifdef MSDOS
 # undef MSDOS
 # define MSDOS true
-# include <fcntl.h>
 # include <sys/param.h>
-# include <io.h>
 #else
 # define MSDOS false
 #endif /* MSDOS */
 
 #ifdef WINDOWSNT
-# include <fcntl.h>
 # include <direct.h>
-# include <io.h>
 # define MAXPATHLEN _MAX_PATH
 # undef HAVE_NTGUI
 # undef  DOS_NT
@@ -131,6 +127,7 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4";
 #include <errno.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <binary-io.h>
 #include <c-strcase.h>
 
 #include <assert.h>
@@ -342,8 +339,6 @@ static char *skip_non_spaces (char *);
 static char *skip_name (char *);
 static char *savenstr (const char *, int);
 static char *savestr (const char *);
-static char *etags_strchr (const char *, int);
-static char *etags_strrchr (const char *, int);
 static char *etags_getcwd (void);
 static char *relative_filename (char *, char *);
 static char *absolute_filename (char *, char *);
@@ -1002,13 +997,8 @@ main (int argc, char **argv)
   linebuffer filename_lb;
   bool help_asked = false;
   ptrdiff_t len;
- char *optstring;
- int opt;
-
-
-#ifdef DOS_NT
-  _fmode = O_BINARY;   /* all of files are treated as binary files */
-#endif /* DOS_NT */
+  char *optstring;
+  int opt;
 
   progname = argv[0];
   nincluded_files = 0;
@@ -1195,15 +1185,10 @@ main (int argc, char **argv)
       if (streq (tagfile, "-"))
        {
          tagf = stdout;
-#ifdef DOS_NT
-         /* Switch redirected `stdout' to binary mode (setting `_fmode'
-            doesn't take effect until after `stdout' is already open). */
-         if (!isatty (fileno (stdout)))
-           setmode (fileno (stdout), O_BINARY);
-#endif /* DOS_NT */
+         SET_BINARY (fileno (stdout));
        }
       else
-       tagf = fopen (tagfile, append_to_tagfile ? "a" : "w");
+       tagf = fopen (tagfile, append_to_tagfile ? "ab" : "wb");
       if (tagf == NULL)
        pfatal (tagfile);
     }
@@ -1306,7 +1291,7 @@ main (int argc, char **argv)
       append_to_tagfile = true;
     }
 
-  tagf = fopen (tagfile, append_to_tagfile ? "a" : "w");
+  tagf = fopen (tagfile, append_to_tagfile ? "ab" : "wb");
   if (tagf == NULL)
     pfatal (tagfile);
   put_entries (nodehead);      /* write all the tags (CTAGS) */
@@ -1347,8 +1332,8 @@ get_compressor_from_suffix (char *file, char **extptr)
 
   /* File has been processed by canonicalize_filename,
      so we don't need to consider backslashes on DOS_NT.  */
-  slash = etags_strrchr (file, '/');
-  suffix = etags_strrchr (file, '.');
+  slash = strrchr (file, '/');
+  suffix = strrchr (file, '.');
   if (suffix == NULL || suffix < slash)
     return NULL;
   if (extptr != NULL)
@@ -1435,7 +1420,7 @@ get_language_from_filename (char *file, int case_sensitive)
          return lang;
 
   /* If not found, try suffix after last dot. */
-  suffix = etags_strrchr (file, '.');
+  suffix = strrchr (file, '.');
   if (suffix == NULL)
     return NULL;
   suffix += 1;
@@ -1547,11 +1532,11 @@ process_file_name (char *file, language *lang)
   if (real_name == compressed_name)
     {
       char *cmd = concat (compr->command, " ", real_name);
-      inf = (FILE *) popen (cmd, "r");
+      inf = popen (cmd, "rb");
       free (cmd);
     }
   else
-    inf = fopen (real_name, "r");
+    inf = fopen (real_name, "rb");
   if (inf == NULL)
     {
       perror (real_name);
@@ -1712,7 +1697,7 @@ find_entries (FILE *inf)
       /* Set lp to point at the first char after the last slash in the
          line or, if no slashes, at the first nonblank.  Then set cp to
         the first successive blank and terminate the string. */
-      lp = etags_strrchr (lb.buffer+2, '/');
+      lp = strrchr (lb.buffer+2, '/');
       if (lp != NULL)
        lp += 1;
       else
@@ -1897,9 +1882,9 @@ pfnote (char *name, bool is_func, char *linestart, int linelen, int lno,
   /* If ctags mode, change name "main" to M<thisfilename>. */
   if (CTAGS && !cxref_style && streq (name, "main"))
     {
-      register char *fp = etags_strrchr (curfdp->taggedfname, '/');
+      char *fp = strrchr (curfdp->taggedfname, '/');
       np->name = concat ("M", fp == NULL ? curfdp->taggedfname : fp + 1, "");
-      fp = etags_strrchr (np->name, '.');
+      fp = strrchr (np->name, '.');
       if (fp != NULL && fp[1] != '\0' && fp[2] == '\0')
        fp[0] = '\0';
     }
@@ -4129,7 +4114,7 @@ Ada_funcs (FILE *inf)
          /* Skip a string i.e. "abcd". */
          if (inquote || (*dbp == '"'))
            {
-             dbp = etags_strchr (dbp + !inquote, '"');
+             dbp = strchr (dbp + !inquote, '"');
              if (dbp != NULL)
                {
                  inquote = false;
@@ -4287,7 +4272,7 @@ Perl_functions (FILE *inf)
            cp++;
          if (cp == sp)
            continue;           /* nothing found */
-         if ((pos = etags_strchr (sp, ':')) != NULL
+         if ((pos = strchr (sp, ':')) != NULL
              && pos < cp && pos[1] == ':')
            /* The name is already qualified. */
            make_tag (sp, cp - sp, true,
@@ -5042,7 +5027,7 @@ TEX_decode_env (const char *evarname, const char *defenv)
 
   /* Allocate a token table */
   for (len = 1, p = env; p;)
-    if ((p = etags_strchr (p, ':')) && *++p != '\0')
+    if ((p = strchr (p, ':')) && *++p != '\0')
       len++;
   TEX_toktab = xnew (len, linebuffer);
 
@@ -5050,7 +5035,7 @@ TEX_decode_env (const char *evarname, const char *defenv)
   /* zero-length strings (leading ':', "::" and trailing ':') */
   for (i = 0; *env != '\0';)
     {
-      p = etags_strchr (env, ':');
+      p = strchr (env, ':');
       if (!p)                  /* End of environment string. */
        p = env + strlen (env);
       if (p - env > 0)
@@ -5614,7 +5599,7 @@ analyse_regex (char *regex_arg)
        char *regexfile = regex_arg + 1;
 
        /* regexfile is a file containing regexps, one per line. */
-       regexfp = fopen (regexfile, "r");
+       regexfp = fopen (regexfile, "rb");
        if (regexfp == NULL)
          pfatal (regexfile);
        linebuffer_init (&regexbuf);
@@ -5780,9 +5765,9 @@ substitute (char *in, char *out, struct re_registers *regs)
   /* Pass 1: figure out how much to allocate by finding all \N strings. */
   if (out[size - 1] == '\\')
     fatal ("pattern error in \"%s\"", out);
-  for (t = etags_strchr (out, '\\');
+  for (t = strchr (out, '\\');
        t != NULL;
-       t = etags_strchr (t + 2, '\\'))
+       t = strchr (t + 2, '\\'))
     if (ISDIGIT (t[1]))
       {
        dig = t[1] - '0';
@@ -6064,7 +6049,7 @@ readline (linebuffer *lbp, FILE *stream)
            {
              char *endp = lbp->buffer + start;
 
-             while ((endp = etags_strchr (endp, '"')) != NULL
+             while ((endp = strchr (endp, '"')) != NULL
                     && endp[-1] == '\\')
                endp++;
              if (endp != NULL)
@@ -6249,43 +6234,6 @@ savenstr (const char *cp, int len)
   return memcpy (dp, cp, len);
 }
 
-/*
- * Return the ptr in sp at which the character c last
- * appears; NULL if not found
- *
- * Identical to POSIX strrchr, included for portability.
- */
-static char *
-etags_strrchr (register const char *sp, register int c)
-{
-  register const char *r;
-
-  r = NULL;
-  do
-    {
-      if (*sp == c)
-       r = sp;
-  } while (*sp++);
-  return (char *)r;
-}
-
-/*
- * Return the ptr in sp at which the character c first
- * appears; NULL if not found
- *
- * Identical to POSIX strchr, included for portability.
- */
-static char *
-etags_strchr (register const char *sp, register int c)
-{
-  do
-    {
-      if (*sp == c)
-       return (char *)sp;
-    } while (*sp++);
-  return NULL;
-}
-
 /* Skip spaces (end of string is not space), return new pointer. */
 static char *
 skip_spaces (char *cp)
@@ -6411,7 +6359,7 @@ relative_filename (char *file, char *dir)
 
   /* Build a sequence of "../" strings for the resulting relative file name. */
   i = 0;
-  while ((dp = etags_strchr (dp + 1, '/')) != NULL)
+  while ((dp = strchr (dp + 1, '/')) != NULL)
     i += 1;
   res = xnew (3*i + strlen (fp + 1) + 1, char);
   res[0] = '\0';
@@ -6444,7 +6392,7 @@ absolute_filename (char *file, char *dir)
     res = concat (dir, file, "");
 
   /* Delete the "/dirname/.." and "/." substrings. */
-  slashp = etags_strchr (res, '/');
+  slashp = strchr (res, '/');
   while (slashp != NULL && slashp[0] != '\0')
     {
       if (slashp[1] == '.')
@@ -6476,7 +6424,7 @@ absolute_filename (char *file, char *dir)
            }
        }
 
-      slashp = etags_strchr (slashp + 1, '/');
+      slashp = strchr (slashp + 1, '/');
     }
 
   if (res[0] == '\0')          /* just a safety net: should never happen */
@@ -6497,7 +6445,7 @@ absolute_dirname (char *file, char *dir)
   char *slashp, *res;
   char save;
 
-  slashp = etags_strrchr (file, '/');
+  slashp = strrchr (file, '/');
   if (slashp == NULL)
     return savestr (dir);
   save = slashp[1];
index 9e21ddf9de639aef1a0f0a7db83fdc1df0ca8d8f..51744ab08a2b2e552379f480fb504e7c9a80ac04 100644 (file)
@@ -24,15 +24,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <stdio.h>
 #include <ctype.h>
-#ifdef DOS_NT
-#include <fcntl.h>
-#if __DJGPP__ >= 2
-#include <io.h>
-#endif
-#endif
-#ifdef WINDOWSNT
-#include <io.h>
-#endif
+
+#include <binary-io.h>
 
 #define DEFAULT_GROUPING       0x01
 #define DEFAULT_BASE           16
@@ -155,20 +148,12 @@ main (int argc, char **argv)
 
       if (un_flag)
        {
-         char buf[18];
-
-#ifdef DOS_NT
-#if (__DJGPP__ >= 2) || (defined WINDOWSNT)
-          if (!isatty (fileno (stdout)))
-           setmode (fileno (stdout), O_BINARY);
-#else
-         (stdout)->_flag &= ~_IOTEXT; /* print binary */
-         _setmode (fileno (stdout), O_BINARY);
-#endif
-#endif
+         SET_BINARY (fileno (stdout));
+
          for (;;)
            {
-             register int i, c = 0, d;
+             int i, c = 0, d;
+             char buf[18];
 
 #define hexchar(x) (isdigit (x) ? x - '0' : x - 'a' + 10)
 
@@ -210,15 +195,7 @@ main (int argc, char **argv)
        }
       else
        {
-#ifdef DOS_NT
-#if (__DJGPP__ >= 2) || (defined WINDOWSNT)
-          if (!isatty (fileno (fp)))
-           setmode (fileno (fp), O_BINARY);
-#else
-         (fp)->_flag &= ~_IOTEXT; /* read binary */
-         _setmode (fileno (fp), O_BINARY);
-#endif
-#endif
+         SET_BINARY (fileno (fp));
          address = 0;
          string[0] = ' ';
          string[17] = '\0';
index 2eb2413815e695de2b300f41a0f6d5305f18424f..884b6c1001e42a0e2cdd7d2d97291d5521a54595 100644 (file)
@@ -38,17 +38,16 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <stdio.h>
 #include <stdlib.h>   /* config.h unconditionally includes this anyway */
-#ifdef MSDOS
-#include <fcntl.h>
-#endif /* MSDOS */
+
 #ifdef WINDOWSNT
 /* Defined to be sys_fopen in ms-w32.h, but only #ifdef emacs, so this
    is really just insurance.  */
 #undef fopen
-#include <fcntl.h>
 #include <direct.h>
 #endif /* WINDOWSNT */
 
+#include <binary-io.h>
+
 #ifdef DOS_NT
 /* Defined to be sys_chdir in ms-w32.h, but only #ifdef emacs, so this
    is really just insurance.
@@ -56,12 +55,8 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
    Similarly, msdos defines this as sys_chdir, but we're not linking with the
    file where that function is defined.  */
 #undef chdir
-#define READ_TEXT "rt"
-#define READ_BINARY "rb"
 #define IS_SLASH(c)  ((c) == '/' || (c) == '\\' || (c) == ':')
 #else  /* not DOS_NT */
-#define READ_TEXT "r"
-#define READ_BINARY "r"
 #define IS_SLASH(c)  ((c) == '/')
 #endif /* not DOS_NT */
 
@@ -73,9 +68,6 @@ static void write_globals (void);
 
 #include <unistd.h>
 
-/* Stdio stream for output to the DOC file.  */
-FILE *outfile;
-
 /* Name this program was invoked with.  */
 char *progname;
 
@@ -135,33 +127,24 @@ main (int argc, char **argv)
 
   progname = argv[0];
 
-  outfile = stdout;
-
-  /* Don't put CRs in the DOC file.  */
-#ifdef MSDOS
-  _fmode = O_BINARY;
-#if 0  /* Suspicion is that this causes hanging.
-         So instead we require people to use -o on MSDOS.  */
-  (stdout)->_flag &= ~_IOTEXT;
-  _setmode (fileno (stdout), O_BINARY);
-#endif
-  outfile = 0;
-#endif /* MSDOS */
-#ifdef WINDOWSNT
-  _fmode = O_BINARY;
-  _setmode (fileno (stdout), O_BINARY);
-#endif /* WINDOWSNT */
-
   /* If first two args are -o FILE, output to FILE.  */
   i = 1;
   if (argc > i + 1 && !strcmp (argv[i], "-o"))
     {
-      outfile = fopen (argv[i + 1], "w");
+      if (! freopen (argv[i + 1], "w", stdout))
+       {
+         perror (argv[i + 1]);
+         return EXIT_FAILURE;
+       }
       i += 2;
     }
   if (argc > i + 1 && !strcmp (argv[i], "-a"))
     {
-      outfile = fopen (argv[i + 1], "a");
+      if (! freopen (argv[i + 1], "a", stdout))
+       {
+         perror (argv[i + 1]);
+         return EXIT_FAILURE;
+       }
       i += 2;
     }
   if (argc > i + 1 && !strcmp (argv[i], "-d"))
@@ -179,8 +162,7 @@ main (int argc, char **argv)
       ++i;
     }
 
-  if (outfile == 0)
-    fatal ("No output file specified", "");
+  set_binary_mode (fileno (stdout), O_BINARY);
 
   if (generate_globals)
     start_globals ();
@@ -215,13 +197,11 @@ put_filename (char *filename)
        filename = tmp + 1;
     }
 
-  putc (037, outfile);
-  putc ('S', outfile);
-  fprintf (outfile, "%s\n", filename);
+  printf ("\037S%s\n", filename);
 }
 
-/* Read file FILENAME and output its doc strings to outfile.  */
-/* Return 1 if file is not found, 0 if it is found.  */
+/* Read file FILENAME and output its doc strings to stdout.
+   Return 1 if file is not found, 0 if it is found.  */
 
 static int
 scan_file (char *filename)
@@ -232,19 +212,19 @@ scan_file (char *filename)
   if (!generate_globals)
     put_filename (filename);
   if (len > 4 && !strcmp (filename + len - 4, ".elc"))
-    return scan_lisp_file (filename, READ_BINARY);
+    return scan_lisp_file (filename, "rb");
   else if (len > 3 && !strcmp (filename + len - 3, ".el"))
-    return scan_lisp_file (filename, READ_TEXT);
+    return scan_lisp_file (filename, "r");
   else
-    return scan_c_file (filename, READ_TEXT);
+    return scan_c_file (filename, "r");
 }
 
 static void
 start_globals (void)
 {
-  fprintf (outfile, "/* This file was auto-generated by make-docfile.  */\n");
-  fprintf (outfile, "/* DO NOT EDIT.  */\n");
-  fprintf (outfile, "struct emacs_globals {\n");
+  puts ("/* This file was auto-generated by make-docfile.  */");
+  puts ("/* DO NOT EDIT.  */");
+  puts ("struct emacs_globals {");
 }
 \f
 static char input_buffer[128];
@@ -373,7 +353,7 @@ scan_keyword_or_put_char (int ch, struct rcsoc_state *state)
 
 /* Skip a C string or C-style comment from INFILE, and return the
    character that follows.  COMMENT non-zero means skip a comment.  If
-   PRINTFLAG is positive, output string contents to outfile.  If it is
+   PRINTFLAG is positive, output string contents to stdout.  If it is
    negative, store contents in buf.  Convert escape sequences \n and
    \t to newline and tab; discard \ followed by newline.
    If SAW_USAGE is non-zero, then any occurrences of the string `usage:'
@@ -388,7 +368,7 @@ read_c_string_or_comment (FILE *infile, int printflag, int comment, int *saw_usa
 
   state.in_file = infile;
   state.buf_ptr = (printflag < 0 ? input_buffer : 0);
-  state.out_file = (printflag > 0 ? outfile : 0);
+  state.out_file = (printflag > 0 ? stdout : 0);
   state.pending_spaces = 0;
   state.pending_newlines = 0;
   state.keyword = (saw_usage ? "usage:" : 0);
@@ -465,18 +445,18 @@ read_c_string_or_comment (FILE *infile, int printflag, int comment, int *saw_usa
 
 
 \f
-/* Write to file OUT the argument names of function FUNC, whose text is in BUF.
+/* Write to stdout the argument names of function FUNC, whose text is in BUF.
    MINARGS and MAXARGS are the minimum and maximum number of arguments.  */
 
 static void
-write_c_args (FILE *out, char *func, char *buf, int minargs, int maxargs)
+write_c_args (char *func, char *buf, int minargs, int maxargs)
 {
   register char *p;
   int in_ident = 0;
   char *ident_start IF_LINT (= NULL);
   size_t ident_length = 0;
 
-  fprintf (out, "(fn");
+  fputs ("(fn", stdout);
 
   if (*buf == '(')
     ++buf;
@@ -517,10 +497,10 @@ write_c_args (FILE *out, char *func, char *buf, int minargs, int maxargs)
          if (strncmp (ident_start, "void", ident_length) == 0)
            continue;
 
-         putc (' ', out);
+         putchar (' ');
 
          if (minargs == 0 && maxargs > 0)
-           fprintf (out, "&optional ");
+           fputs ("&optional ", stdout);
 
          minargs--;
          maxargs--;
@@ -528,7 +508,7 @@ write_c_args (FILE *out, char *func, char *buf, int minargs, int maxargs)
          /* In C code, `default' is a reserved word, so we spell it
             `defalt'; demangle that here.  */
          if (ident_length == 6 && memcmp (ident_start, "defalt", 6) == 0)
-           fprintf (out, "DEFAULT");
+           fputs ("DEFAULT", stdout);
          else
            while (ident_length-- > 0)
              {
@@ -539,12 +519,12 @@ write_c_args (FILE *out, char *func, char *buf, int minargs, int maxargs)
                else if (c == '_')
                  /* Print underscore as hyphen.  */
                  c = '-';
-               putc (c, out);
+               putchar (c);
              }
        }
     }
 
-  putc (')', out);
+  putchar (')');
 }
 \f
 /* The types of globals.  These are sorted roughly in decreasing alignment
@@ -613,8 +593,8 @@ compare_globals (const void *a, const void *b)
 static void
 close_emacs_globals (void)
 {
-  fprintf (outfile, "};\n");
-  fprintf (outfile, "extern struct emacs_globals globals;\n");
+  puts ("};");
+  puts ("extern struct emacs_globals globals;");
 }
 
 static void
@@ -641,7 +621,7 @@ write_globals (void)
          if (!seen_defun)
            {
              close_emacs_globals ();
-             fprintf (outfile, "\n");
+             putchar ('\n');
              seen_defun = 1;
            }
          break;
@@ -651,9 +631,9 @@ write_globals (void)
 
       if (type)
        {
-         fprintf (outfile, "  %s f_%s;\n", type, globals[i].name);
-         fprintf (outfile, "#define %s globals.f_%s\n",
-                  globals[i].name, globals[i].name);
+         printf ("  %s f_%s;\n", type, globals[i].name);
+         printf ("#define %s globals.f_%s\n",
+                 globals[i].name, globals[i].name);
        }
       else
        {
@@ -664,15 +644,26 @@ write_globals (void)
              || strcmp (globals[i].name, "Fkill_emacs") == 0
              || strcmp (globals[i].name, "Fexit_recursive_edit") == 0
              || strcmp (globals[i].name, "Fabort_recursive_edit") == 0)
-           fprintf (outfile, "_Noreturn ");
-         fprintf (outfile, "EXFUN (%s, ", globals[i].name);
+           fputs ("_Noreturn ", stdout);
+
+         printf ("EXFUN (%s, ", globals[i].name);
          if (globals[i].value == -1)
-           fprintf (outfile, "MANY");
+           fputs ("MANY", stdout);
          else if (globals[i].value == -2)
-           fprintf (outfile, "UNEVALLED");
+           fputs ("UNEVALLED", stdout);
          else
-           fprintf (outfile, "%d", globals[i].value);
-         fprintf (outfile, ");\n");
+           printf ("%d", globals[i].value);
+         putchar (')');
+
+         /* It would be nice to have a cleaner way to deal with these
+            special hacks, too.  */
+         if (strcmp (globals[i].name, "Fbyteorder") == 0
+             || strcmp (globals[i].name, "Ftool_bar_height") == 0
+             || strcmp (globals[i].name, "Fmax_char") == 0
+             || strcmp (globals[i].name, "Fidentity") == 0)
+           fputs (" ATTRIBUTE_CONST", stdout);
+
+         puts (";");
        }
 
       while (i + 1 < num_globals
@@ -941,9 +932,7 @@ scan_c_file (char *filename, const char *mode)
          int comment = c != '"';
          int saw_usage;
 
-         putc (037, outfile);
-         putc (defvarflag ? 'V' : 'F', outfile);
-         fprintf (outfile, "%s\n", input_buffer);
+         printf ("\037%c%s\n", defvarflag ? 'V' : 'F', input_buffer);
 
          if (comment)
            getc (infile);      /* Skip past `*'.  */
@@ -985,8 +974,8 @@ scan_c_file (char *filename, const char *mode)
              while (c != ')');
              *p = '\0';
              /* Output them.  */
-             fprintf (outfile, "\n\n");
-             write_c_args (outfile, input_buffer, argbuf, minargs, maxargs);
+             fputs ("\n\n", stdout);
+             write_c_args (input_buffer, argbuf, minargs, maxargs);
            }
          else if (defunflag && maxargs == -1 && !saw_usage)
            /* The DOC should provide the usage form.  */
@@ -1422,12 +1411,10 @@ scan_lisp_file (const char *filename, const char *mode)
         In the latter case, the opening quote (and leading backslash-newline)
         have already been read.  */
 
-      putc (037, outfile);
-      putc (type, outfile);
-      fprintf (outfile, "%s\n", buffer);
+      printf ("\037%c%s\n", type, buffer);
       if (saved_string)
        {
-         fputs (saved_string, outfile);
+         fputs (saved_string, stdout);
          /* Don't use one dynamic doc string twice.  */
          free (saved_string);
          saved_string = 0;
index d0d00fcf4cc089c34cfd10442d88b527f9c15c9e..b0196b309d8b8efb2734a7783cb944f5d5873363 100644 (file)
@@ -191,11 +191,6 @@ main (int argc, char **argv)
   uid_t real_gid = getgid ();
   uid_t priv_gid = getegid ();
 
-#ifdef WINDOWSNT
-  /* Ensure all file i/o is in binary mode. */
-  _fmode = _O_BINARY;
-#endif
-
   delete_lockname = 0;
 
   while ((c = getopt (argc, argv, ARGSTR)) != EOF)
@@ -304,7 +299,7 @@ main (int argc, char **argv)
 
          memcpy (tempname, inname, inname_dirlen);
          strcpy (tempname + inname_dirlen, "EXXXXXX");
-         desc = mkostemp (tempname, 0);
+         desc = mkostemp (tempname, O_BINARY);
          if (desc < 0)
            {
              int mkostemp_errno = errno;
@@ -358,12 +353,12 @@ main (int argc, char **argv)
 
 #ifndef MAIL_USE_MMDF
 #ifdef MAIL_USE_SYSTEM_LOCK
-      indesc = open (inname, O_RDWR);
+      indesc = open (inname, O_RDWR | O_BINARY);
 #else  /* if not MAIL_USE_SYSTEM_LOCK */
-      indesc = open (inname, O_RDONLY);
+      indesc = open (inname, O_RDONLY | O_BINARY);
 #endif /* not MAIL_USE_SYSTEM_LOCK */
 #else  /* MAIL_USE_MMDF */
-      indesc = lk_open (inname, O_RDONLY, 0, 0, 10);
+      indesc = lk_open (inname, O_RDONLY | O_BINARY, 0, 0, 10);
 #endif /* MAIL_USE_MMDF */
 
       if (indesc < 0)
@@ -372,7 +367,7 @@ main (int argc, char **argv)
       /* Make sure the user can read the output file.  */
       umask (umask (0) & 0377);
 
-      outdesc = open (outname, O_WRONLY | O_CREAT | O_EXCL, 0666);
+      outdesc = open (outname, O_WRONLY | O_BINARY | O_CREAT | O_EXCL, 0666);
       if (outdesc < 0)
        pfatal_with_name (outname);
 
@@ -675,7 +670,7 @@ popmail (char *mailbox, char *outfile, int preserve, char *password, int reverse
       return EXIT_SUCCESS;
     }
 
-  mbfi = open (outfile, O_WRONLY | O_CREAT | O_EXCL, 0666);
+  mbfi = open (outfile, O_WRONLY | O_BINARY | O_CREAT | O_EXCL, 0666);
   if (mbfi < 0)
     {
       pop_close (server);
@@ -719,8 +714,8 @@ popmail (char *mailbox, char *outfile, int preserve, char *password, int reverse
 
   for (i = start; i * increment <= end * increment; i += increment)
     {
-      mbx_delimit_begin (mbf);
-      if (pop_retr (server, i, mbf) != OK)
+      if (mbx_delimit_begin (mbf) != OK
+         || pop_retr (server, i, mbf) != OK)
        {
          error ("%s", Errmsg, 0);
          close (mbfi);
@@ -837,15 +832,15 @@ mbx_write (char *line, int len, FILE *mbf)
 static int
 mbx_delimit_begin (FILE *mbf)
 {
-  time_t now;
-  struct tm *ltime;
-  char fromline[40] = "From movemail ";
-
-  now = time (NULL);
-  ltime = localtime (&now);
-
-  strcat (fromline, asctime (ltime));
-
+  time_t now = time (NULL);
+  struct tm *ltime = localtime (&now);
+  if (!ltime)
+    return NOTOK;
+
+  char fromline[100];
+  if (! strftime (fromline, sizeof fromline,
+                 "From movemail %a %b %e %T %Y\n", ltime))
+    return NOTOK;
   if (fputs (fromline, mbf) == EOF)
     return (NOTOK);
   return (OK);
index dbb0195a30b137eeb48464fd0d1c13bc17480626..40ef9fa982d4d054f27533f7ed80eb0184864530 100644 (file)
@@ -90,7 +90,6 @@ int mkostemp (char * template, int flags);
 #define locking   _locking
 #define logb      _logb
 #define _longjmp  longjmp
-#define lseek     _lseek
 #define popen     _popen
 #define pclose    _pclose
 #define umask    _umask
diff --git a/lib-src/test-distrib.c b/lib-src/test-distrib.c
deleted file mode 100644 (file)
index 88b95db..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/* test-distrib.c --- testing distribution of nonprinting chars
-
-Copyright (C) 1987, 1993-1995, 1999, 2001-2014 Free Software Foundation,
-Inc.
-
-This file is part of GNU Emacs.
-
-GNU Emacs is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-GNU Emacs is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
-
-
-#include <config.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-/* Break string in two parts to avoid buggy C compilers that ignore characters
-   after nulls in strings.  */
-
-static char string1[] = "Testing distribution of nonprinting chars:\n\
-Should be 0177: \177 Should be 0377: \377 Should be 0212: \212.\n\
-Should be 0000: ";
-
-static char string2[] = ".\n\
-This file is read by the `test-distribution' program.\n\
-If you change it, you will make that program fail.\n";
-
-/* Like `read' but keeps trying until it gets SIZE bytes or reaches eof.  */
-static int
-cool_read (int fd, char *buf, size_t size)
-{
-  ssize_t num;
-  ssize_t sofar = 0;
-
-  while (1)
-    {
-      if ((num = read (fd, buf + sofar, size - sofar)) == 0)
-       return sofar;
-      else if (num < 0)
-       return num;
-      sofar += num;
-    }
-}
-
-int
-main (int argc, char **argv)
-{
-  int fd;
-  char buf[300];
-
-  if (argc != 2)
-    {
-      fprintf (stderr, "Usage: %s testfile\n", argv[0]);
-      exit (EXIT_FAILURE);
-    }
-  fd = open (argv[1], O_RDONLY);
-  if (fd < 0)
-    {
-      perror (argv[1]);
-      exit (EXIT_FAILURE);
-    }
-  if (cool_read (fd, buf, sizeof string1) != sizeof string1 ||
-      strcmp (buf, string1) ||
-      cool_read (fd, buf, sizeof string2) != sizeof string2 - 1 ||
-      strncmp (buf, string2, sizeof string2 - 1))
-    {
-      fprintf (stderr, "Data in file `%s' has been damaged.\n\
-Most likely this means that many nonprinting characters\n\
-have been corrupted in the files of Emacs, and it will not work.\n",
-              argv[1]);
-      exit (EXIT_FAILURE);
-    }
-  close (fd);
-  return EXIT_SUCCESS;
-}
-
-
-/* test-distrib.c ends here */
diff --git a/lib-src/testfile b/lib-src/testfile
deleted file mode 100644 (file)
index 8230c35..0000000
Binary files a/lib-src/testfile and /dev/null differ
index cb6fdf7359034d876b2513d83ddd31e63c589508..7a64cd04f479da1f23ab807cb298266b69b2037d 100644 (file)
@@ -76,9 +76,8 @@ static int unlock_file (const char *filename, void *state);
 
 struct score_entry
 {
-  intmax_t score;
-  char *username;
-  char *data;
+  char *score;
+  char *user_data;
 };
 
 #define MAX_SCORES min (PTRDIFF_MAX, SIZE_MAX / sizeof (struct score_entry))
@@ -102,7 +101,8 @@ lose (const char *msg)
 static _Noreturn void
 lose_syserr (const char *msg)
 {
-  fprintf (stderr, "%s: %s\n", msg, strerror (errno));
+  fprintf (stderr, "%s: %s\n", msg,
+          errno ? strerror (errno) : "Invalid data in score file");
   exit (EXIT_FAILURE);
 }
 
@@ -137,6 +137,38 @@ get_prefix (bool running_suid, const char *user_prefix)
   return user_prefix;
 }
 
+static char *
+normalize_integer (char *num)
+{
+  bool neg;
+  char *p;
+  while (*num != '\n' && isspace (*num))
+    num++;
+  neg = *num == '-';
+  num += neg || *num == '-';
+
+  if (*num == '0')
+    {
+      while (*++num == '0')
+       continue;
+      neg &= !!*num;
+      num -= !*num;
+    }
+
+  for (p = num; '0' <= *p && *p <= '9'; p++)
+    continue;
+
+  if (*p || p == num)
+    {
+      errno = 0;
+      return 0;
+    }
+
+  if (neg)
+    *--num = '-';
+  return num;
+}
+
 int
 main (int argc, char **argv)
 {
@@ -144,9 +176,8 @@ main (int argc, char **argv)
   bool running_suid;
   void *lockstate;
   char *scorefile;
-  char *nl;
+  char *end, *nl, *user, *data;
   const char *prefix, *user_prefix = NULL;
-  struct stat buf;
   struct score_entry *scores;
   struct score_entry newscore;
   bool reverse = false;
@@ -169,8 +200,8 @@ main (int argc, char **argv)
        break;
       case 'm':
        {
-         intmax_t m = strtoimax (optarg, 0, 10);
-         if (m < 0)
+         intmax_t m = strtoimax (optarg, &end, 10);
+         if (optarg == end || *end || m < 0)
            usage (EXIT_FAILURE);
          max_scores = min (m, MAX_SCORES);
        }
@@ -194,21 +225,26 @@ main (int argc, char **argv)
   strcat (scorefile, "/");
   strcat (scorefile, argv[optind]);
 
-  newscore.score = strtoimax (argv[optind + 1], 0, 10);
+  newscore.score = normalize_integer (argv[optind + 1]);
+  if (! newscore.score)
+    {
+      fprintf (stderr, "%s: Invalid score\n", argv[optind + 1]);
+      return EXIT_FAILURE;
+    }
 
-  newscore.data = argv[optind + 2];
-  if (strlen (newscore.data) > MAX_DATA_LEN)
-    newscore.data[MAX_DATA_LEN] = '\0';
-  nl = strchr (newscore.data, '\n');
+  user = get_user_id ();
+  if (! user)
+    lose_syserr ("Couldn't determine user id");
+  data = argv[optind + 2];
+  if (strlen (data) > MAX_DATA_LEN)
+    data[MAX_DATA_LEN] = '\0';
+  nl = strchr (data, '\n');
   if (nl)
     *nl = '\0';
-
-  newscore.username = get_user_id ();
-  if (! newscore.username)
-    lose_syserr ("Couldn't determine user id");
-
-  if (stat (scorefile, &buf) < 0)
-    lose_syserr ("Failed to access scores file");
+  newscore.user_data = malloc (strlen (user) + 1 + strlen (data) + 1);
+  if (! newscore.user_data
+      || sprintf (newscore.user_data, "%s %s", user, data) < 0)
+    lose_syserr ("Memory exhausted");
 
   if (lock_file (scorefile, &lockstate) < 0)
     lose_syserr ("Failed to lock scores file");
@@ -244,137 +280,75 @@ main (int argc, char **argv)
   exit (EXIT_SUCCESS);
 }
 
-static int
-read_score (FILE *f, struct score_entry *score)
+static char *
+read_score (char *p, struct score_entry *score)
 {
-  int c;
-  if ((c = getc (f)) != EOF)
-    ungetc (c, f);
-  if (feof (f))
-    return 1;
-  for (score->score = 0; (c = getc (f)) != EOF && isdigit (c); )
-    {
-      if (INTMAX_MAX / 10 < score->score)
-       return -1;
-      score->score *= 10;
-      if (INTMAX_MAX - (c - '0') < score->score)
-       return -1;
-      score->score += c - '0';
-    }
-  while ((c = getc (f)) != EOF
-        && isspace (c))
-    ;
-  if (c == EOF)
-    return -1;
-  ungetc (c, f);
-#ifdef HAVE_GETDELIM
-  {
-    size_t count = 0;
-    score->username = 0;
-    if (getdelim (&score->username, &count, ' ', f) < 1
-       || score->username == NULL)
-      return -1;
-    /* Trim the space */
-    score->username[strlen (score->username)-1] = '\0';
-  }
-#else
-  {
-    ptrdiff_t unameread = 0;
-    ptrdiff_t unamelen = 30;
-    char *username = malloc (unamelen);
-    if (!username)
-      return -1;
-
-    while ((c = getc (f)) != EOF && c != ' ')
-      {
-       if (unameread >= unamelen - 1)
-         {
-           ptrdiff_t unamelen_max = min (PTRDIFF_MAX, SIZE_MAX);
-           if (unamelen <= unamelen_max / 2)
-             unamelen *= 2;
-           else if (unamelen < unamelen_max)
-             unamelen = unamelen_max;
-           else
-             {
-               errno = ENOMEM;
-               return -1;
-             }
-           username = realloc (username, unamelen);
-           if (!username)
-             return -1;
-         }
-       username[unameread] = c;
-       unameread++;
-      }
-    if (c == EOF)
-      return -1;
-    username[unameread] = '\0';
-    score->username = username;
-  }
-#endif
-#ifdef HAVE_GETLINE
-  score->data = NULL;
-  errno = 0;
-  {
-    size_t len;
-    if (getline (&score->data, &len, f) < 0)
-      return -1;
-    score->data[strlen (score->data)-1] = '\0';
-  }
-#else
-  {
-    ptrdiff_t cur = 0;
-    ptrdiff_t len = 16;
-    char *buf = malloc (len);
-    if (!buf)
-      return -1;
-    while ((c = getc (f)) != EOF
-          && c != '\n')
-      {
-       if (cur >= len-1)
-         {
-           if (min (PTRDIFF_MAX, SIZE_MAX) / 2 < len)
-             {
-               errno = ENOMEM;
-               return -1;
-             }
-           if (!(buf = realloc (buf, len *= 2)))
-             return -1;
-         }
-       buf[cur] = c;
-       cur++;
-      }
-    score->data = buf;
-    score->data[cur] = '\0';
-  }
-#endif
-  return 0;
+  score->score = p;
+  p = strchr (p, ' ');
+  if (!p)
+    return p;
+  *p++ = 0;
+  score->user_data = p;
+  p = strchr (p, '\n');
+  if (!p)
+    return p;
+  *p++ = 0;
+  return p;
 }
 
 static int
 read_scores (const char *filename, struct score_entry **scores,
             ptrdiff_t *count, ptrdiff_t *alloc)
 {
-  int readval = -1;
-  ptrdiff_t scorecount = 0;
-  ptrdiff_t cursize = 0;
-  struct score_entry *ret = 0;
-  struct score_entry entry;
+  char *p, *filedata;
+  ptrdiff_t filesize, nread;
+  struct stat st;
   FILE *f = fopen (filename, "r");
-  int retval = -1;
   if (!f)
     return -1;
-  while ((readval = read_score (f, &entry)) == 0)
-    if (push_score (&ret, &scorecount, &cursize, &entry) < 0)
+  if (fstat (fileno (f), &st) != 0)
+    return -1;
+  if (! (0 <= st.st_size && st.st_size < min (PTRDIFF_MAX, SIZE_MAX)))
+    {
+      errno = EOVERFLOW;
+      return -1;
+    }
+  filesize = st.st_size;
+  filedata = malloc (filesize + 1);
+  if (! filedata)
+    return -1;
+  nread = fread (filedata, 1, filesize + 1, f);
+  if (filesize < nread)
+    {
+      errno = 0;
       return -1;
-  if (readval > 0 && fclose (f) == 0)
+    }
+  if (nread < filesize)
+    filesize = nread;
+  if (ferror (f) || fclose (f) != 0)
+    return -1;
+  filedata[filesize] = 0;
+  if (strlen (filedata) != filesize)
     {
-      *count = scorecount;
-      *alloc = cursize;
-      *scores = ret;
-      retval = 0;
+      errno = 0;
+      return -1;
     }
-  return retval;
+
+  *scores = 0;
+  *count = *alloc = 0;
+  for (p = filedata; p < filedata + filesize; )
+    {
+      struct score_entry entry;
+      p = read_score (p, &entry);
+      if (!p)
+       {
+         errno = 0;
+         return -1;
+       }
+      if (push_score (scores, count, alloc, &entry) < 0)
+       return -1;
+    }
+  return 0;
 }
 
 static int
@@ -382,7 +356,25 @@ score_compare (const void *a, const void *b)
 {
   const struct score_entry *sa = (const struct score_entry *) a;
   const struct score_entry *sb = (const struct score_entry *) b;
-  return (sb->score > sa->score) - (sb->score < sa->score);
+  char *sca = sa->score;
+  char *scb = sb->score;
+  size_t lena, lenb;
+  bool nega = *sca == '-';
+  bool negb = *scb == '-';
+  int diff = nega - negb;
+  if (diff)
+    return diff;
+  if (nega)
+    {
+      char *tmp = sca;
+      sca = scb + 1;
+      scb = tmp + 1;
+    }
+  lena = strlen (sca);
+  lenb = strlen (scb);
+  if (lena != lenb)
+    return lenb < lena ? -1 : 1;
+  return strcmp (scb, sca);
 }
 
 static int
@@ -451,18 +443,12 @@ write_scores (const char *filename, const struct score_entry *scores,
   if (! f)
     return -1;
   for (i = 0; i < count; i++)
-    if (fprintf (f, "%"PRIdMAX" %s %s\n",
-                scores[i].score, scores[i].username, scores[i].data)
-       < 0)
+    if (fprintf (f, "%s %s\n", scores[i].score, scores[i].user_data) < 0)
       return -1;
   if (fclose (f) != 0)
     return -1;
   if (rename (tempfile, filename) != 0)
     return -1;
-#ifdef DOS_NT
-  if (chmod (filename, 0644) < 0)
-    return -1;
-#endif
   return 0;
 }
 
@@ -479,30 +465,27 @@ lock_file (const char *filename, void **state)
   strcpy (lockpath, filename);
   strcat (lockpath, lockext);
   *state = lockpath;
- trylock:
-  attempts++;
-  /* If the lock is over an hour old, delete it.  */
-  if (stat (lockpath, &buf) == 0
-      && 60 * 60 < time (0) - buf.st_ctime)
-    unlink (lockpath);
-  fd = open (lockpath, O_CREAT | O_EXCL, 0600);
-  if (fd < 0)
+
+  while ((fd = open (lockpath, O_CREAT | O_EXCL, 0600)) < 0)
     {
-      if (errno == EEXIST)
+      if (errno != EEXIST)
+       return -1;
+      attempts++;
+
+      /* Break the lock if it is over an hour old, or if we've tried
+        more than MAX_ATTEMPTS times.  We won't corrupt the file, but
+        we might lose some scores. */
+      if (MAX_ATTEMPTS < attempts
+         || (stat (lockpath, &buf) == 0 && 60 * 60 < time (0) - buf.st_ctime))
        {
-         /* Break the lock; we won't corrupt the file, but we might
-            lose some scores. */
-         if (attempts > MAX_ATTEMPTS)
-           {
-             unlink (lockpath);
-             attempts = 0;
-           }
-         sleep ((rand () % 2)+1);
-         goto trylock;
+         if (unlink (lockpath) != 0 && errno != ENOENT)
+           return -1;
+         attempts = 0;
        }
-      else
-       return -1;
+
+      sleep ((rand () & 1) + 1);
     }
+
   close (fd);
   return 0;
 }
index f76d0d3928d28261a3fed159f1ad37aa88947168..cda96811ebc587f95c10ab9fa7e388785a51dcfd 100644 (file)
@@ -16,3 +16,7 @@ include gnulib.mk
 
 libgnu_a_SOURCES += openat-die.c save-cwd.c
 endif
+
+.PHONY: bootstrap-clean
+
+bootstrap-clean: maintainer-clean
index fdffe6484901c735d7e47ad11e23a0d94ea5813b..b2380068de752600f4decfc8e04d08116100f003 100644 (file)
@@ -174,14 +174,14 @@ extern int acl_access_nontrivial (acl_t);
 
 /* Return 1 if the given ACL is non-trivial.
    Return 0 if it is trivial, i.e. equivalent to a simple stat() mode.  */
-extern int acl_nontrivial (int count, aclent_t *entries);
+extern int acl_nontrivial (int count, aclent_t *entries) _GL_ATTRIBUTE_PURE;
 
 #  ifdef ACE_GETACL /* Solaris 10 */
 
 /* Test an ACL retrieved with ACE_GETACL.
    Return 1 if the given ACL, consisting of COUNT entries, is non-trivial.
    Return 0 if it is trivial, i.e. equivalent to a simple stat() mode.  */
-extern int acl_ace_nontrivial (int count, ace_t *entries);
+extern int acl_ace_nontrivial (int count, ace_t *entries) _GL_ATTRIBUTE_PURE;
 
 /* Definitions for when the built executable is executed on Solaris 10
    (newer version) or Solaris 11.  */
index d024f74ba67021725c11d1017558cc7deccd3daf..f67e350df057450bde9a357323c3dfc1dc1bfab2 100644 (file)
--- a/lib/acl.h
+++ b/lib/acl.h
@@ -17,6 +17,9 @@
 
    Written by Paul Eggert.  */
 
+#ifndef _GL_ACL_H
+#define _GL_ACL_H 1
+
 #include <stdbool.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -28,3 +31,5 @@ int set_acl (char const *, int, mode_t);
 int qcopy_acl (char const *, int, char const *, int, mode_t);
 int copy_acl (char const *, int, char const *, int, mode_t);
 int chmod_or_fchmod (char const *, int, mode_t);
+
+#endif
index e23b4b2bcdd63fee5fe1d324652bc7dfb5a1387e..f63cd6a734c1911ac963e459de16a8cec9f5bf10 100644 (file)
@@ -34,7 +34,7 @@
    extern "C" { ... } block, which leads to errors in C++ mode with the
    overridden <sys/stat.h> from gnulib.  These errors are known to be gone
    with g++ version >= 4.3.  */
-#if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
+#if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && (defined __ICC || !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))))
 # include <sys/stat.h>
 #endif
 #@INCLUDE_NEXT@ @NEXT_FCNTL_H@
@@ -53,7 +53,7 @@
    extern "C" { ... } block, which leads to errors in C++ mode with the
    overridden <sys/stat.h> from gnulib.  These errors are known to be gone
    with g++ version >= 4.3.  */
-#if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
+#if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && (defined __ICC || !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))))
 # include <sys/stat.h>
 #endif
 /* The include_next requires a split double-inclusion guard.  */
index 946738cdb68ffdec74e10d38bd32420d3778956b..f0c62713a65270f02c5af2ff9399766289c64386 100644 (file)
@@ -104,4 +104,12 @@ rpl_getdtablesize(void)
   return getdtablesize ();
 }
 
+#elif defined _SC_OPEN_MAX
+
+int
+getdtablesize (void)
+{
+  return sysconf (_SC_OPEN_MAX);
+}
+
 #endif
index e219292aa3435683b35f1f88c62e8ae3b790406c..5ba7de10d0bcf2d6d15a9abacfca8e98910f34d4 100644 (file)
@@ -21,7 +21,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt byteswap c-ctype c-strcase careadlinkat close-stream count-one-bits count-trailing-zeros crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv update-copyright utimens warnings
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=stdarg --avoid=stdbool --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt binary-io byteswap c-ctype c-strcase careadlinkat close-stream count-one-bits count-trailing-zeros crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen stat-time stdalign stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv update-copyright utimens vla warnings
 
 
 MOSTLYCLEANFILES += core *.stackdump
@@ -900,57 +900,6 @@ EXTRA_DIST += stdalign.in.h
 
 ## end   gnulib module stdalign
 
-## begin gnulib module stdarg
-
-BUILT_SOURCES += $(STDARG_H)
-
-# We need the following in order to create <stdarg.h> when the system
-# doesn't have one that works with the given compiler.
-if GL_GENERATE_STDARG_H
-stdarg.h: stdarg.in.h $(top_builddir)/config.status
-       $(AM_V_GEN)rm -f $@-t $@ && \
-       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
-             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-             -e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \
-             < $(srcdir)/stdarg.in.h; \
-       } > $@-t && \
-       mv $@-t $@
-else
-stdarg.h: $(top_builddir)/config.status
-       rm -f $@
-endif
-MOSTLYCLEANFILES += stdarg.h stdarg.h-t
-
-EXTRA_DIST += stdarg.in.h
-
-## end   gnulib module stdarg
-
-## begin gnulib module stdbool
-
-BUILT_SOURCES += $(STDBOOL_H)
-
-# We need the following in order to create <stdbool.h> when the system
-# doesn't have one that works.
-if GL_GENERATE_STDBOOL_H
-stdbool.h: stdbool.in.h $(top_builddir)/config.status
-       $(AM_V_GEN)rm -f $@-t $@ && \
-       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \
-       } > $@-t && \
-       mv $@-t $@
-else
-stdbool.h: $(top_builddir)/config.status
-       rm -f $@
-endif
-MOSTLYCLEANFILES += stdbool.h stdbool.h-t
-
-EXTRA_DIST += stdbool.in.h
-
-## end   gnulib module stdbool
-
 ## begin gnulib module stddef
 
 BUILT_SOURCES += $(STDDEF_H)
@@ -1192,6 +1141,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
              -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
              -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \
              -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \
+             -e 's/@''GNULIB_QSORT_R''@/$(GNULIB_QSORT_R)/g' \
              -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \
              -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \
              -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \
@@ -1243,6 +1193,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
              -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \
              -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
              -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
+             -e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|g' \
              -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \
              -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \
              -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
@@ -1849,6 +1800,13 @@ EXTRA_DIST += verify.h
 
 ## end   gnulib module verify
 
+## begin gnulib module vla
+
+
+EXTRA_DIST += vla.h
+
+## end   gnulib module vla
+
 ## begin gnulib module xalloc-oversized
 
 if gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec
index 29438237760fa7067350dfc2270df52cad3da11c..48b3a40f9c73ee0c6f626f0278dba12ec86c4947 100644 (file)
@@ -38,7 +38,7 @@
 
 #include <string.h>            /* For the real memcpy prototype.  */
 
-#if DEBUG
+#if defined DEBUG && DEBUG
 # include <stdio.h>
 # include <stdlib.h>
 /* Make it work even if the system's libc has its own mktime routine.  */
@@ -600,7 +600,7 @@ libc_hidden_def (mktime)
 libc_hidden_weak (timelocal)
 #endif
 \f
-#if DEBUG
+#if defined DEBUG && DEBUG
 
 static int
 not_equal_tm (const struct tm *a, const struct tm *b)
index 6a4f6ad1cf1e36b4b5c798abe1c11fbd0ad1ba4f..7b40bb8f059a7c98071d1780e9b31e87c51bfa71 100644 (file)
 
 #include "intprops.h"
 
-/* The results of open() in this file are not used with fchdir,
-   and we do not leak fds to any single-threaded code that could use stdio,
-   therefore save some unnecessary work in fchdir.c.
-   FIXME - if the kernel ever adds support for multi-thread safety for
-   avoiding standard fds, then we should use open_safer.  */
-#undef open
-#undef close
-
 #define PROC_SELF_FD_FORMAT "/proc/self/fd/%d/%s"
 
 #define PROC_SELF_FD_NAME_SIZE_BOUND(len) \
diff --git a/lib/stdarg.in.h b/lib/stdarg.in.h
deleted file mode 100644 (file)
index 5b37dd3..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Substitute for and wrapper around <stdarg.h>.
-   Copyright (C) 2008-2014 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef _@GUARD_PREFIX@_STDARG_H
-
-#if __GNUC__ >= 3
-@PRAGMA_SYSTEM_HEADER@
-#endif
-@PRAGMA_COLUMNS@
-
-/* The include_next requires a split double-inclusion guard.  */
-#@INCLUDE_NEXT@ @NEXT_STDARG_H@
-
-#ifndef _@GUARD_PREFIX@_STDARG_H
-#define _@GUARD_PREFIX@_STDARG_H
-
-#ifndef va_copy
-# define va_copy(a,b) ((a) = (b))
-#endif
-
-#endif /* _@GUARD_PREFIX@_STDARG_H */
-#endif /* _@GUARD_PREFIX@_STDARG_H */
diff --git a/lib/stdbool.in.h b/lib/stdbool.in.h
deleted file mode 100644 (file)
index 651e8df..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/* Copyright (C) 2001-2003, 2006-2014 Free Software Foundation, Inc.
-   Written by Bruno Haible <haible@clisp.cons.org>, 2001.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef _GL_STDBOOL_H
-#define _GL_STDBOOL_H
-
-/* ISO C 99 <stdbool.h> for platforms that lack it.  */
-
-/* Usage suggestions:
-
-   Programs that use <stdbool.h> should be aware of some limitations
-   and standards compliance issues.
-
-   Standards compliance:
-
-       - <stdbool.h> must be #included before 'bool', 'false', 'true'
-         can be used.
-
-       - You cannot assume that sizeof (bool) == 1.
-
-       - Programs should not undefine the macros bool, true, and false,
-         as C99 lists that as an "obsolescent feature".
-
-   Limitations of this substitute, when used in a C89 environment:
-
-       - <stdbool.h> must be #included before the '_Bool' type can be used.
-
-       - You cannot assume that _Bool is a typedef; it might be a macro.
-
-       - Bit-fields of type 'bool' are not supported.  Portable code
-         should use 'unsigned int foo : 1;' rather than 'bool foo : 1;'.
-
-       - In C99, casts and automatic conversions to '_Bool' or 'bool' are
-         performed in such a way that every nonzero value gets converted
-         to 'true', and zero gets converted to 'false'.  This doesn't work
-         with this substitute.  With this substitute, only the values 0 and 1
-         give the expected result when converted to _Bool' or 'bool'.
-
-       - C99 allows the use of (_Bool)0.0 in constant expressions, but
-         this substitute cannot always provide this property.
-
-   Also, it is suggested that programs use 'bool' rather than '_Bool';
-   this isn't required, but 'bool' is more common.  */
-
-
-/* 7.16. Boolean type and values */
-
-/* BeOS <sys/socket.h> already #defines false 0, true 1.  We use the same
-   definitions below, but temporarily we have to #undef them.  */
-#if defined __BEOS__ && !defined __HAIKU__
-# include <OS.h> /* defines bool but not _Bool */
-# undef false
-# undef true
-#endif
-
-#ifdef __cplusplus
-# define _Bool bool
-# define bool bool
-#else
-# if defined __BEOS__ && !defined __HAIKU__
-  /* A compiler known to have 'bool'.  */
-  /* If the compiler already has both 'bool' and '_Bool', we can assume they
-     are the same types.  */
-#  if !@HAVE__BOOL@
-typedef bool _Bool;
-#  endif
-# else
-#  if !defined __GNUC__
-   /* If @HAVE__BOOL@:
-        Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when
-        the built-in _Bool type is used.  See
-          http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
-          http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
-          http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
-        Similar bugs are likely with other compilers as well; this file
-        wouldn't be used if <stdbool.h> was working.
-        So we override the _Bool type.
-      If !@HAVE__BOOL@:
-        Need to define _Bool ourselves. As 'signed char' or as an enum type?
-        Use of a typedef, with SunPRO C, leads to a stupid
-          "warning: _Bool is a keyword in ISO C99".
-        Use of an enum type, with IRIX cc, leads to a stupid
-          "warning(1185): enumerated type mixed with another type".
-        Even the existence of an enum type, without a typedef,
-          "Invalid enumerator. (badenum)" with HP-UX cc on Tru64.
-        The only benefit of the enum, debuggability, is not important
-        with these compilers.  So use 'signed char' and no enum.  */
-#   define _Bool signed char
-#  else
-   /* With this compiler, trust the _Bool type if the compiler has it.  */
-#   if !@HAVE__BOOL@
-   /* For the sake of symbolic names in gdb, define true and false as
-      enum constants, not only as macros.
-      It is tempting to write
-         typedef enum { false = 0, true = 1 } _Bool;
-      so that gdb prints values of type 'bool' symbolically.  But then
-      values of type '_Bool' might promote to 'int' or 'unsigned int'
-      (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int'
-      (see ISO C 99 6.3.1.1.(2)).  So add a negative value to the
-      enum; this ensures that '_Bool' promotes to 'int'.  */
-typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool;
-#   endif
-#  endif
-# endif
-# define bool _Bool
-#endif
-
-/* The other macros must be usable in preprocessor directives.  */
-#ifdef __cplusplus
-# define false false
-# define true true
-#else
-# define false 0
-# define true 1
-#endif
-
-#define __bool_true_false_are_defined 1
-
-#endif /* _GL_STDBOOL_H */
index 46e10dba972ff3e7c9dc0612c728f249d7f6da43..ee643247d85b6bad8b0ba282835eff82a1464656 100644 (file)
@@ -520,6 +520,29 @@ _GL_CXXALIAS_SYS (putenv, int, (char *string));
 _GL_CXXALIASWARN (putenv);
 #endif
 
+#if @GNULIB_QSORT_R@
+# if @REPLACE_QSORT_R@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef qsort_r
+#   define qsort_r rpl_qsort_r
+#  endif
+_GL_FUNCDECL_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size,
+                                  int (*compare) (void const *, void const *,
+                                                  void *),
+                                  void *arg) _GL_ARG_NONNULL ((1, 4)));
+_GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size,
+                                  int (*compare) (void const *, void const *,
+                                                  void *),
+                                  void *arg));
+# else
+_GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
+                                  int (*compare) (void const *, void const *,
+                                                  void *),
+                                  void *arg));
+# endif
+_GL_CXXALIASWARN (qsort_r);
+#endif
+
 
 #if @GNULIB_RANDOM_R@
 # if !@HAVE_RANDOM_R@
index a876b9caa3fc3db614c45c5f82f22483234d6e29..58508b0c5e5d626dd29b56b59538c936f3c0f5a1 100644 (file)
@@ -24,8 +24,8 @@
    On Cygwin, <sys/time.h> includes <sys/select.h>.
    Simply delegate to the system's header in this case.  */
 #if (@HAVE_SYS_SELECT_H@                                                \
+     && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H             \
      && ((defined __osf__ && defined _SYS_TYPES_H_                      \
-          && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H         \
           && defined _OSF_SOURCE)                                       \
          || (defined __sun && defined _SYS_TYPES_H                      \
              && (! (defined _XOPEN_SOURCE || defined _POSIX_C_SOURCE)   \
 
 #elif (@HAVE_SYS_SELECT_H@                                              \
        && (defined _CYGWIN_SYS_TIME_H                                   \
-           || (defined __osf__ && defined _SYS_TIME_H_                  \
-               && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H    \
-               && defined _OSF_SOURCE)                                  \
-           || (defined __sun && defined _SYS_TIME_H                     \
-               && (! (defined _XOPEN_SOURCE || defined _POSIX_C_SOURCE) \
-                   || defined __EXTENSIONS__))))
+           || (!defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H       \
+               && ((defined __osf__ && defined _SYS_TIME_H_             \
+                    && defined _OSF_SOURCE)                             \
+                   || (defined __sun && defined _SYS_TIME_H             \
+                       && (! (defined _XOPEN_SOURCE                     \
+                              || defined _POSIX_C_SOURCE)               \
+                           || defined __EXTENSIONS__))))))
 
 # define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H
 # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@
diff --git a/lib/vla.h b/lib/vla.h
new file mode 100644 (file)
index 0000000..05125a7
--- /dev/null
+++ b/lib/vla.h
@@ -0,0 +1,27 @@
+/* vla.h - variable length arrays
+
+   Copyright 2014 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+   Written by Paul Eggert.  */
+
+/* A function's argument must point to an array with at least N elements.
+   Example: 'int main (int argc, char *argv[VLA_ELEMS (argc)]);'.  */
+
+#ifdef __STDC_NO_VLA__
+# define VLA_ELEMS(n)
+#else
+# define VLA_ELEMS(n) static n
+#endif
index 7e09336183c9712c85d19230cf9d5d3d37c80ca4..80157c67704f9821c747a3e73b966f00adcb7d6b 100644 (file)
@@ -1,22 +1,20 @@
-2014-10-15  Stefan Monnier  <monnier@iro.umontreal.ca>
-
-       * emacs-lisp/lisp.el (lisp--local-variables-1): Handle `quote'.
-       Backported (bug#18688).
-
-2014-10-14  Eli Zaretskii  <eliz@gnu.org>
+2014-10-15  Eli Zaretskii  <eliz@gnu.org>
 
-       * emacs-lisp/tabulated-list.el (tabulated-list-mode):
-       Force bidi-paragraph-direction to 'left-to-right'.  This fixes
+       * emacs-lisp/tabulated-list.el (tabulated-list-mode): Force
+       bidi-paragraph-direction to 'left-to-right'.  This fixes
        buffer-menu display when the first buffer happens to start with
        R2L letter.
 
-2014-10-13  Glenn Morris  <rgm@gnu.org>
+2014-10-15  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * progmodes/elisp-mode.el (elisp--local-variables-1):
+       Handle quoted expressions (bug#18688).
 
-       * emacs-lisp/authors.el (authors-aliases, authors-fixed-case)
-       (authors-obsolete-files-regexps): Additions.
-       (authors-no-scan-regexps): New constant.
-       (authors-no-scan-file-p): New function.
-       (authors): Respect authors-no-scan-file-p.
+2014-10-14  Jérémy Compostella  <jeremy.compostella@intel.com>
+           Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
+       Reduce the amount of set environment variable commands.
 
 2014-10-12  Fabián Ezequiel Gallina  <fgallina@gnu.org>
 
        * progmodes/python.el (python-shell-completion-get-completions):
        Fix import case regexp.
 
-2014-10-10  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-10-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * progmodes/bat-mode.el (bat-font-lock-keywords): Fix \\<_ typo
        (bug#18622).  Reported by Arni Magnusson <arnima@hafro.is>.
        * progmodes/prolog.el (prolog-electric--underscore): Same.
 
+2014-10-12  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp-sh.el (tramp-get-remote-id): Check also for "gid".
+
+2014-10-11  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * cus-start.el (all): Add missing ns and boolean to
+       ns-use-fullscreen-animation.
+
+2014-10-11  Leo Liu  <sdl.web@gmail.com>
+
+       * progmodes/cfengine.el (cfengine3-defuns, cfengine3-vartypes):
+       Use strings.
+       (cfengine3-create-imenu-index): New function.
+       (cfengine3-mode): Use it for `imenu-create-index-function'.
+       (cfengine-auto-mode): Improve and prefer cfengine3-mode when
+       buffer is empty.
+
+2014-10-11  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * cus-start.el (all): Add ns-use-fullscreen-animation.
+
+2014-10-11  Glenn Morris  <rgm@gnu.org>
+
+       * calendar/diary-lib.el (diary-display-function):
+       Drop support for deprecated nil and list forms.
+       (diary-list-entries): Update for the above.
+       * calendar/cal-x.el (calendar-dedicate-diary): Simplify accordingly.
+
+2014-10-10  Leo Liu  <sdl.web@gmail.com>
+
+       * window.el (temp-buffer-window-show): Make BUFFER a required arg.
+       (Bug#18656)
+
+2014-10-10  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * select.el (gui-selection-exists-p-alist): New method.
+       * menu-bar.el (menu-bar-edit-menu, clipboard-yank):
+       * simple.el (deactivate-mark): Use it.
+       * term/x-win.el (gui-selection-exists-p):
+       * term/w32-win.el (gui-selection-exists-p):
+       * term/pc-win.el (gui-selection-exists-p):
+       * term/ns-win.el (gui-selection-exists-p): Provide a backend instance.
+
+2014-10-10  Glenn Morris  <rgm@gnu.org>
+
+       * info.el (Info-fontify-maximum-menu-size): Bump to 400k.  (Bug#16227)
+       Fix :type.  Allow t to mean no limit.
+       (Info-fontify-node): Handle Info-fontify-maximum-menu-size = t.
+
 2014-10-09  Glenn Morris  <rgm@gnu.org>
 
        * frame.el (display-monitor-attributes-list): Doc tweaks.
 
-2014-10-08  Eli Zaretskii  <eliz@gnu.org>
+2014-10-09  Eli Zaretskii  <eliz@gnu.org>
 
        * faces.el (display-grayscale-p): Mention in the doc string that
        the argument can be either a display name or a frame.
        be either a display name or a frame.  Improve the docs of the
        monitor attributes.  (Bug#18636)
 
-2014-10-06  Martin Rudalics  <rudalics@gmx.at>
+2014-10-09  Martin Rudalics  <rudalics@gmx.at>
 
        * term.el (term-window-width): Subtract 1 from the width when
        any fringe has zero width, not just the right fringe.  (Bug#18601)
 
+2014-10-09  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * frame.el (make-frame): Use t rather than nil for `w' (bug#18653).
+
+2014-10-08  Leo Liu  <sdl.web@gmail.com>
+
+       * emacs-lisp/cl-extra.el (cl-fresh-line): New function.
+
+2014-10-08  Glenn Morris  <rgm@gnu.org>
+
+       * calendar/cal-x.el (calendar-dedicate-diary):
+       Drop support for recently deleted aliases.
+
+2014-10-08  Leo Liu  <sdl.web@gmail.com>
+
+       * progmodes/cfengine.el (cfengine3-make-syntax-cache):
+       Always return a syntax.  Replace call-process-shell-command with
+       process-file.  Ensure cfengine-mode-syntax-functions-regex is
+       always set.  Ensure cache when cfengine-cf-promises fails.
+       (Bug#18620)
+
+2014-10-07  Glenn Morris  <rgm@gnu.org>
+
+       * font-lock.el (font-lock-fontify-buffer): Fix interactive-only markup.
+
+2014-10-07  Wilson Snyder  <wsnyder@wsnyder.org>
+
+       Sync with upstream verilog-mode revision c075a492.
+       * progmodes/verilog-mode.el (verilog-mode-version): Bump.
+       (verilog-menu): Add AUTOINSERTLAST.
+       (verilog-no-indent-begin-re): When `verilog-indent-begin-after-if'
+       is nil, fix indenting initial/final to match always statements, bug825.
+       Reported by Tim Clapp.
+       (verilog-extended-complete-re): Fix indentation of DPI-C imports,
+       bug557.  Reported by ZeDong Mao and Jason Forkey.
+       (verilog-read-decls): Fix parsing typed interfaces.
+       Fix AUTOINOUTMODPORT missing types.  Reported by Stephan Bourduas.
+       (verilog-auto-arg-ports): Fix verilog-auto-arg-format single.
+       (verilog-auto-output-every): Add regexp to AUTOOUTPUTEVERY, bug793.
+       Reported by Pierre-David Pfister.
+       (verilog-auto-insert-lisp): Doc fix.
+       (verilog-auto-insert-last, verilog-auto): Add AUTOINSERTLAST to
+       allow post-AUTO user fixups, bug826.  Reported by Dennis Muhlestein.
+       (verilog-sk-ovm-class, verilog-sk-uvm-object)
+       (verilog-sk-uvm-component): Fix missing string keyword in class
+       skeletons, bug824.  Reported by eldad faruhi.
+
+2014-10-06  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * term/w32-win.el: Move all code from 32-common-fns.el here.
+       (gui-select-text, gui-selection-value): Use w32 handlers in the w32
+       console as well (bug#18629).
+       * w32-common-fns.el: Remove.
+       * loadup.el: Don't load w32-common-fns.el.
+       * w32-fns.elc: Don't require w32-common-fns.
+
+       * icomplete.el: Move Iswitchb autoload here.  Much simpler.
+       * obsolete/iswitchb.el (iswitchb-mode): Use normal autoload cookie.
+       Remove redundant obsolescence thingy.
+       * loadup.el: Don't load obsolete/loaddefs.el.
+       * Makefile.in (obsolete-autoloads): Remove.
+       (AUTOGENEL): Remove obsolete/loaddefs.el.
+
+2014-10-06  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (obsolete-autoloads): Write to a separate file,
+       to workaround autoloads bug.  (Bug#17407)
+       (AUTOGENEL): Add obsolete/loaddefs.el.
+       * loadup.el: Load obsolete/loaddefs.el if present.
+       * subr.el (do-after-load-evaluation):
+       Don't warn about obsolete/loaddefs.el.
+
+       * menu-bar.el (menu-bar-games-menu): Remove landmark.
+       It has zero relationship to a game.
+
+2014-10-06  Leo Liu  <sdl.web@gmail.com>
+
+       * imenu.el (imenu): Re-write for clarity.
+
+2014-10-06  Glenn Morris  <rgm@gnu.org>
+
+       Remove calendar code obsolete since at least version 23.1.
+       * calendar/cal-bahai.el (calendar-absolute-from-bahai)
+       (calendar-print-bahai-date, calendar-bahai-prompt-for-date)
+       (calendar-goto-bahai-date, list-bahai-diary-entries)
+       (mark-bahai-calendar-date-pattern, mark-bahai-diary-entries)
+       (insert-bahai-diary-entry, insert-monthly-bahai-diary-entry)
+       (insert-yearly-bahai-diary-entry):
+       * calendar/cal-china.el (chinese-calendar-time-zone)
+       (chinese-calendar-location-name)
+       (chinese-calendar-daylight-time-offset)
+       (chinese-calendar-standard-time-zone-name)
+       (chinese-calendar-daylight-time-zone-name)
+       (chinese-calendar-daylight-savings-starts)
+       (chinese-calendar-daylight-savings-ends)
+       (chinese-calendar-daylight-savings-starts-time)
+       (chinese-calendar-daylight-savings-ends-time)
+       (chinese-calendar-celestial-stem)
+       (chinese-calendar-terrestrial-branch)
+       (calendar-absolute-from-chinese, calendar-print-chinese-date)
+       (calendar-goto-chinese-date):
+       * calendar/cal-coptic.el (calendar-absolute-from-coptic)
+       (calendar-print-coptic-date, coptic-prompt-for-date)
+       (calendar-goto-coptic-date, calendar-absolute-from-ethiopic)
+       (calendar-print-ethiopic-date, calendar-goto-ethiopic-date):
+       * calendar/cal-french.el (calendar-absolute-from-french)
+       (calendar-print-french-date, calendar-goto-french-date):
+       * calendar/cal-hebrew.el (diary-sabbath-candles-minutes)
+       (calendar-absolute-from-hebrew, calendar-print-hebrew-date)
+       (hebrew-calendar-yahrzeit, calendar-goto-hebrew-date)
+       (holiday-rosh-hashanah-etc, holiday-hanukkah)
+       (holiday-passover-etc, holiday-tisha-b-av-etc)
+       (list-hebrew-diary-entries, mark-hebrew-calendar-date-pattern)
+       (mark-hebrew-diary-entries, insert-hebrew-diary-entry)
+       (insert-monthly-hebrew-diary-entry)
+       (insert-yearly-hebrew-diary-entry, list-yahrzeit-dates)
+       (diary-omer, diary-yahrzeit, diary-rosh-hodesh, diary-parasha)
+       (diary-sabbath-candles):
+       * calendar/cal-islam.el (calendar-absolute-from-islamic)
+       (calendar-print-islamic-date, calendar-goto-islamic-date)
+       (list-islamic-diary-entries, mark-islamic-calendar-date-pattern)
+       (mark-islamic-diary-entries, insert-islamic-diary-entry)
+       (insert-monthly-islamic-diary-entry)
+       (insert-yearly-islamic-diary-entry):
+       * calendar/cal-iso.el (calendar-absolute-from-iso)
+       (calendar-print-iso-date, calendar-iso-read-args)
+       (calendar-goto-iso-date, calendar-goto-iso-week):
+       * calendar/cal-julian.el (calendar-absolute-from-julian)
+       (calendar-print-julian-date, calendar-goto-julian-date)
+       (calendar-absolute-from-astro, calendar-print-astro-day-number)
+       (calendar-goto-astro-day-number):
+       * calendar/cal-mayan.el (calendar-print-mayan-date)
+       (calendar-next-haab-date, calendar-previous-haab-date)
+       (calendar-next-tzolkin-date, calendar-previous-tzolkin-date)
+       (calendar-next-calendar-round-date)
+       (calendar-previous-calendar-round-date)
+       (calendar-absolute-from-mayan-long-count)
+       (calendar-goto-mayan-long-count-date):
+       * calendar/cal-move.el (scroll-calendar-left)
+       (scroll-calendar-right, scroll-calendar-left-three-months)
+       (scroll-calendar-right-three-months):
+       * calendar/cal-persia.el (calendar-absolute-from-persian)
+       (calendar-print-persian-date, persian-prompt-for-date)
+       (calendar-goto-persian-date):
+       * calendar/cal-x.el (calendar-after-frame-setup-hooks):
+       * calendar/calendar.el (view-diary-entries-initially)
+       (mark-diary-entries-in-calendar, calendar-today-face)
+       (diary-face, holiday-face, view-calendar-holidays-initially)
+       (mark-holidays-in-calendar, initial-calendar-window-hook)
+       (today-visible-calendar-hook, today-invisible-calendar-hook)
+       (hebrew-diary-entry-symbol, islamic-diary-entry-symbol)
+       (bahai-diary-entry-symbol, american-date-diary-pattern)
+       (european-date-diary-pattern, european-calendar-display-form)
+       (american-calendar-display-form, holidays-in-diary-buffer)
+       (all-hebrew-calendar-holidays, all-christian-calendar-holidays)
+       (all-islamic-calendar-holidays, all-bahai-calendar-holidays)
+       (fancy-diary-buffer, increment-calendar-month)
+       (extract-calendar-month, extract-calendar-day)
+       (extract-calendar-year, exit-calendar, calendar-date-is-legal-p)
+       (mark-visible-calendar-date, calendar-version):
+       * calendar/diary-lib.el (diary-button-face, sexp-diary-entry-symbol)
+       (diary-display-hook, list-diary-entries-hook)
+       (mark-diary-entries-hook, nongregorian-diary-listing-hook)
+       (nongregorian-diary-marking-hook, print-diary-entries-hook)
+       (abbreviated-calendar-year, number-of-diary-entries)
+       (view-other-diary-entries, add-to-diary-list)
+       (include-other-diary-files, simple-diary-display)
+       (fancy-diary-display, print-diary-entries, mark-diary-entries)
+       (mark-sexp-diary-entries, mark-included-diary-files)
+       (mark-calendar-days-named, mark-calendar-month)
+       (mark-calendar-date-pattern, sort-diary-entries)
+       (list-sexp-diary-entries, make-diary-entry, insert-diary-entry)
+       (insert-weekly-diary-entry, insert-monthly-diary-entry)
+       (insert-yearly-diary-entry, insert-anniversary-diary-entry)
+       (insert-block-diary-entry, insert-cyclic-diary-entry)
+       (fancy-diary-font-lock-keywords, fancy-diary-display-mode):
+       * calendar/holidays.el (general-holidays, oriental-holidays)
+       (local-holidays, other-holidays, hebrew-holidays)
+       (christian-holidays, islamic-holidays, bahai-holidays)
+       (solar-holidays, list-calendar-holidays)
+       (check-calendar-holidays, mark-calendar-holidays)
+       (filter-visible-calendar-holidays):
+       * calendar/lunar.el (calendar-phases-of-moon, phases-of-moon)
+       (diary-phases-of-moon): Remove obsolete aliases.
+       * calendar/cal-menu.el (cal-menu-load-hook): Remove obsolete hook.
+       * calendar/cal-x.el (calendar-one-frame-setup)
+       (calendar-only-one-frame-setup, calendar-two-frame-setup):
+       Remove obsolete functions.
+       (cal-x-load-hook): Remove obsolete hook.
+       * calendar/calendar.el (european-calendar-style):
+       Remove obsolete variable.
+       (calendar-date-style): No longer consult european-calendar-style.
+       * calendar/calendar.el (european-calendar, american-calendar):
+       Remove obsolete commands.
+       * calendar/calendar.el (calendar-for-loop): Remove obsolete macro.
+       * calendar/diary-lib.el (diary-face): Remove obsolete variable.
+       (diary-font-lock-date-forms, diary-fancy-font-lock-keywords):
+       Use the face `diary' instead of the variable `diary-face'.
+       * calendar/holidays.el (hebrew-holidays-1, hebrew-holidays-2)
+       (hebrew-holidays-3, hebrew-holidays-4): Remove obsolete variables.
+       * calendar/icalendar.el (icalendar--date-style): Remove function.
+       Replace all uses with calendar-date-style.
+       * textmodes/remember.el (calendar-date-style): Declare.
+       (remember-diary-convert-entry):
+       No longer consult european-calendar-style.
+
 2014-10-05  Leo Liu  <sdl.web@gmail.com>
 
        * imenu.el (imenu-default-goto-function): Fix typo.
 
+2014-10-04  Thomas Fitzsimmons  <fitzsim@fitzsim.org>
+
+       * net/ntlm.el (ntlm-build-auth-request):
+       Add NTLM2 Session support.  (Bug#15603)
+
+2014-10-04  Glenn Morris  <rgm@gnu.org>
+
+       * apropos.el (apropos-symbols-internal):
+       Avoid error with non-symbol properties.  (Bug#18337#16)
+
+       * startup.el (command-line):
+       Handle altered user-emacs-directory in load-path warning.  (Bug#18512)
+
+2014-10-04  Martin Rudalics  <rudalics@gmx.at>
+
+       * window.el (window-full-height-p): Make it behave correctly for
+       minibuffer window.
+       (window-current-scroll-bars): Fix code.
+       (fit-frame-to-buffer): Use window-scroll-bar-height instead of
+       window-scroll-bars.
+       * frame.el (frame-current-scroll-bars): Fix doc-string.
+       * scroll-bar.el (toggle-horizontal-scroll-bar): New command.
+
+2014-10-04  Mark Oteiza  <mvoteiza@udel.edu>  (tiny change)
+
+       * files.el (auto-mode-alist): Use sh-mode for .zsh files.  (Bug#18488)
+
 2014-10-04  Glenn Morris  <rgm@gnu.org>
 
        * frame.el (frame-monitor-attributes)
        (display-monitor-attributes-list): Doc fixes.
 
+2014-10-04  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       Merge trivially safe differences from standalone CC-mode.
+       * progmodes/cc-mode.el (c-initialize-cc-mode): Don't quote a symbol
+       just to then pass it to `symbol-value'.
+       (prog-mode): Provide fallback definition, if needed.
+       * progmodes/cc-langs.el: Always load `cl'.  Don't load `cl-lib'.
+       Remove "cl-" prefix accordingly.
+       * progmodes/cc-fonts.el (c-font-lock-invalid-string): Use integerp or
+       characterp depending on the type of characters.
+       (c-font-lock-enum-tail): Remove unused var `start'.
+       * progmodes/cc-engine.el: Load CL at compile-time.
+       (c-declare-lang-variables): Use mapcan.
+       (c-append-to-state-cache): Remove unused var `ce+1'.
+       (c-parse-state-state): Make buffer-local.
+       (c-ssb-lit-begin): Remove unused var `pps-end-pos'.
+       (c-just-after-func-arglist-p): Remove unused var `end'.
+       * progmodes/cc-defs.el: Load cc-fix if delete-dups is undefined.
+       (c-<-as-paren-syntax, c->-as-paren-syntax): Move definition earlier.
+       (c-make-keywords-re): Use delete-dups.
+       (c-get-current-file): Avoid file-name-base.
+       * progmodes/cc-cmds.el (c-electric-lt-gt): Remove unused var
+       `close-paren-inserted'.
+       * progmodes/cc-awk.el (c-forward-sws): Remove unused declaration.
+
+       * progmodes/python.el: Avoid building unneeded markers.
+       (python-font-lock-keywords, python-indent-dedent-line)
+       (python-fill-paren, python-shell-completion-complete-or-indent):
+       Prefer point over point-marker.
+       (inferior-python-mode): Remove redundant completion settings.
+
 2014-10-03  Dmitry Gutov  <dgutov@yandex.ru>
 
        * vc/vc-svn.el (vc-svn-ignore-completion-table): Implement.
        similarly to Rogers's 2010-06-16 change for the remote case
        (bug#18605).
 
-2014-10-01  Glenn Morris  <rgm@gnu.org>
+2014-10-03  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       New gui-selection-value consolidating x-selection-value.
+       * select.el (gui-selection-value-alist): New method.
+       (gui-selection-value): New function.
+       (x-selection-value): Make it an obsolete alias.
+       * simple.el (interprogram-paste-function): Default to
+       gui-selection-value.
+       * w32-common-fns.el (w32-get-selection-value): Simplify.
+       (x-selection-value): Remove alias.
+       (interprogram-paste-function): Don't set.
+       (gui-selection-value): Define for w32.
+       * term/x-win.el (gui-selection-value): Define for x.
+       (x--selection-value): Rename from x--selection-value.
+       (interprogram-paste-function): Don't set.
+       * term/pc-win.el (w16-get-selection-value): Simplify.
+       (msdos-initialize-window-system): Don't set
+       interprogram-paste-function.
+       (gui-selection-value): Define for pc.
+       * term/ns-win.el (x-selection-value): Remove.
+       (gui-selection-value): Define for ns, instead.
+       * term/common-win.el (x-setup-function-keys): Don't set
+       interprogram-paste-function.
+       * obsolete/mouse-sel.el (mouse-sel-get-selection-function):
+       Use gui-selection-value.
+
+2014-10-02  David Raynes  <rayners@gmail.com>  (tiny change)
+
+       * term/ns-win.el: Add functions to ns frame, not x frame (bug#18614).
+
+2014-10-02  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * obsolete/lucid.el (read-number): Remove, redundant.
+       * obsolete/cl-compat.el (cl-floor, cl-ceiling, cl-round, cl-truncate):
+       Remove, broken.
+
+2014-10-02  Glenn Morris  <rgm@gnu.org>
 
        * emacs-lisp/package.el (package-import-keyring):
        Create gnupg directory private.  (Bug#17625#155)
 
-2014-10-01  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-10-02  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * progmodes/python.el (python-shell-completion-get-completions):
        Use python-shell--prompt-calculated-input-regexp from the
        process buffer (bug#18582).
        Don't assume that `line' comes from the process buffer.
 
+2014-10-02  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * frame.el: Use lexical-binding (bug#18598).
+       (make-frame): Use t rather than nil for tty's window-system.
+       * startup.el (command-line): Use gui-method.
+
+       Consolidate management/ownership of selections.
+       * select.el (gui-get-selection-alist): New method.
+       (gui-get-selection): Use it.  Rename from x-get-selection.
+       (x-get-selection): Define as obsolete alias.
+       (x-get-clipboard): Mark obsolete.
+       (gui-get-primary-selection): New function.
+       (x-get-selection-value): Mark obsolete.
+       (gui-own-selection-alist, gui-disown-selection-alist)
+       (gui-selection-owner-p-alist): New methods.
+       (gui-set-selection): Use them.  Rename from x-set-selection.
+       (x-set-selection): Define as obsolete alias.
+       (gui--valid-simple-selection-p): Rename from
+       x-valid-simple-selection-p.
+       * w32-common-fns.el (gui-own-selection, gui-disown-selection)
+       (gui-selection-owner-p, gui-get-selection): Define for w32.
+       (w32-get-selection-value): Rename from x-get-selection-value.
+       Use the new gui-last-selected-text.
+       * term/x-win.el (x-get-selection-value): Remove.
+       (x-clipboard-yank): Declare obsolete.
+       (gui-own-selection, gui-disown-selection, gui-get-selection)
+       (gui-selection-owner-p): Define for x.
+       * term/w32-win.el (w32-win-suspend-error): Rename from
+       x-win-suspend-error.
+       * term/pc-win.el (w16-get-selection-value): Rename from
+       x-get-selection-value.
+       (w16-selection-owner-p): Rename from x-selection-owner-p.
+       (gui-own-selection, gui-disown-selection, gui-get-selection)
+       (gui-selection-owner-p): Define for pc.
+       (w16--select-text): New function.
+       * term/ns-win.el (gui-own-selection, gui-disown-selection)
+       (gui-get-selection, gui-selection-owner-p): Define for ns.
+       * term.el (term-mouse-paste):
+       * mouse.el (mouse-yank-primary): Use gui-get-primary-selection.
+
+2014-10-02  H. Dieter Wilhelm <dieter@duenenhof-wilhelm.de>  (tiny change)
+
+       * calc/calc-help.el (calc-describe-thing): Quote strings
+       which could look like regexps.
+
+2014-10-01  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       Consolidate x-select-text.
+       * frame.el (gui-method, gui-method-define, gui-method-declare)
+       (gui-call): New macros.
+       (gui-method--name): New function.
+       (frame-creation-function-alist): Use gui-method-declare.
+       (make-frame): Use gui-method.
+       * select.el (gui-select-enable-clipboard): Rename from
+       x-select-enable-clipboard and move here.
+       (x-select-enable-clipboard): Define as obsolete alias.
+       (gui-last-selected-text): New var, to replace x-last-selected-text.
+       (gui-select-text): New GUI method.
+       (gui-select-text): New function.
+       (x-select-text): Define as obsolete alias.
+       * term/common-win.el (x-select-enable-clipboard, x-select-text):
+       Move to select.el.
+       * simple.el (interprogram-cut-function): Change default to
+       x-select-text.
+       (interprogram-paste-function): Change default to `ignore'.
+       * w32-common-fns.el (interprogram-cut-function): Don't modify.
+       * term/x-win.el (interprogram-cut-function): Don't modify.
+       (gui-select-text): Add method for x.
+       * term/w32-win.el (gui-select-text): Add method for w32.
+       * term/pc-win.el (x-last-selected-text): Remove, use
+       gui-last-selected-text instead.
+       (msdos-initialize-window-system): Don't set interprogram-cut-function.
+       (gui-select-text): Add method for pc.
+       * term/ns-win.el (ns-last-selected-text): Remove, use
+       gui-last-selected-text instead.
+       (gui-select-text): Add method for ns.
+       (x-setup-function-keys): Don't change interprogram-cut-function.
+       * loadup.el ("startup"): Load after "frame".
+       * subr.el (package--builtin-versions, package--description-file):
+       Move from startup.el.
+       * startup.el (package--builtin-versions, package--description-file):
+       Move to subr.el.
+       (handle-args-function-alist, window-system-initialization-alist):
+       Use gui-method-declare.
+       (command-line): Use gui-method.
+
+2014-10-01  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * subr.el (alist-get): New accessor.
+       * emacs-lisp/gv.el (alist-get): Provide expander.
+       * winner.el (winner-remember):
+       * tempo.el (tempo-use-tag-list):
+       * progmodes/gud.el (minor-mode-map-alist):
+       * international/mule-cmds.el (define-char-code-property):
+       * frameset.el (frameset-filter-params):
+       * files.el (dir-locals-set-class-variables):
+       * register.el (get-register, set-register):
+       * calc/calc-yank.el (calc-set-register): Use it.
+       * ps-print.el (ps-get, ps-put, ps-del): Mark as obsolete.
+       * tooltip.el (tooltip-set-param): Mark as obsolete.
+       (tooltip-show): Use alist-get instead.
+       * ses.el (ses--alist-get): Remove.  Use alist-get instead.
+
+2014-10-01  Ulf Jasper  <ulf.jasper@web.de>
+
+       * net/newst-backend.el: Remove Time-stamp.  Rename variable
+       `newsticker--download-logos' to `newsticker-download-logos' and
+       make it customizable.
+       (newsticker--sentinel-work): Move xml-workarounds to function
+       `newsticker--do-xml-workarounds', call unless libxml-parser is
+       used.  Allow single quote in regexp for encoding.
+       Use libxml-parser if available, else fall back to `xml-parse-region'.
+       Take care of possibly missing namespace prefixes (like "RDF"
+       instead of "rdf:RDF") when checking xml nodes and attributes (as
+       libxml correctly removes the prefixes).  Always use Atom 1.0 as
+       fallback feed type.  Rename `newsticker--download-logos' to
+       `newsticker-download-logos'
+       (newsticker--unxml, newsticker--unxml-node)
+       (newsticker--unxml-attribute): New.
+       (newsticker--parse-atom-1.0): Call `unxml' in case that embedded
+       HTML code has become part of the xml parse tree.
+       (newsticker--parse-rss-1.0, newsticker--parse-rss-2.0): Take care
+       of possibly missing namespace prefixes.
+       (newsticker--parse-generic-items): Code formatting. Typo.
+       (newsticker--images-dir): Add trailing slash.
+       (newsticker--image-get): Fix error message.
+
+       * net/newst-plainview.el: Remove Time-stamp.
+
+       * net/newst-reader.el: Remove Time-stamp.
+       (newsticker-download-logos): Rename variable
+       `newsticker--download-logos' to `newsticker-download-logos' and
+       make it customizable.
+       (newsticker--print-extra-elements): Add optional parameter
+       'htmlish for using html markup.  Amend list of ignored elements.
+       (newsticker--do-print-extra-element): Add parameter 'htmlish for
+       using html markup.
+
+       * net/newst-ticker.el: Remove Time-stamp.
+
+       * net/newst-treeview.el (newsticker--treeview-item-show): Use html
+       for formatting extra elements.
+
+       * net/newsticker.el:  Remove Time-stamp, Version.
+       (newsticker-version): Make obsolete.
+
 2014-09-30  Leonardo Nobrega  <leonobr@gmail.com>  (tiny change)
 
        * progmodes/python.el (python-fill-paren): Don't inf-loop at EOB
        (bug#18462).
 
-2014-09-27  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-09-30  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/package.el (package-check-signature): Default to nil if
        GPG is not available.
        (package-refresh-contents): Don't mess with the keyring if we won't
        check the signatures anyway.
 
-2014-09-18  Kan-Ru Chen  <kanru@kanru.info>
+2014-09-30  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * ses.el (ses--row, ses--col): New dyn-scoped vars, to replace row&col.
+       (ses-center, ses-center-span): Use them.
+       (ses-print-cell): Bind them while calling the printer.
+       (row, col, maxrow, maxcol): Don't declare as dynamically scoped.
+       (ses-dorange): Revert last change.
+       (ses-calculate-cell): Don't bind row&col dynamically while evaluating
+       the formula.
+       (ses-set-cell): Avoid `eval'.
+       (ses--time-check): Rename it from ses-time-check and turn it into
+       a macro.
+
+       * ses.el (ses-setup): Don't assume modifying the iteration var of
+       dotimes affects the iteration (bug#18191).
+
+2014-09-30  Vincent Belaïche  <vincentb1@users.sourceforge.net>
+
+       * ses.el (ses-calculate-cell): Bind row and col dynamically to
+       their values with 'cl-progv'.
+       (ses-dorange): Bind row, col, maxrow and maxcol dynamically to
+       their values with 'cl-progv', also use non-interned symbols for
+       row, minrow, maxrow, mincol and maxcol.
+       (maxrow maxcol): New defvar, to make the compiler happy.
+
+2014-09-30  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * minibuffer.el (completion-at-point): Emit warning for ill-behaved
+       completion functions.
+
+2014-09-29  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * ses.el (ses--letref): Quote value before it gets re-evaluated.
+
+2014-09-28  Thien-Thi Nguyen  <ttn@gnu.org>
+
+       Font-lock `cl-flet*', too.
+       * emacs-lisp/lisp-mode.el (lisp-cl-font-lock-keywords-2):
+       Add "flet*" to intermediate var `cl-lib-kw'.
+
+2014-09-27  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * epg-config.el (epg-gpg-program): Use the plain program names rather
+       than their absolute file name.
+
+       * subr.el (track-mouse): New macro.
+       * emacs-lisp/cconv.el (cconv-convert, cconv-analyse-form):
+       Remove track-mouse case.
+       * emacs-lisp/bytecomp.el (byte-compile-track-mouse): Remove.
+
+2014-09-27  Leo Liu  <sdl.web@gmail.com>
+
+       * progmodes/elisp-mode.el (elisp--eldoc-last-data): Use defvar.
+
+       * emacs-lisp/eldoc.el (eldoc-mode): Fix thinko.
+
+2014-09-27  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * emacs-lisp/pcase.el (pcase--split-match, pcase--app-subst-match):
+       Handle the case where `match' is :pcase--succeed or :pcase--fail
+       (bug#18554).
+
+       Introduce global-eldoc-mode.  Move Elisp-specific code to elisp-mode.el.
+       * emacs-lisp/eldoc.el (global-eldoc-mode): New minor mode.
+       (eldoc-schedule-timer): Obey it.
+       (eldoc-documentation-function): Default to nil.
+       (eldoc-mode): Don't enable if eldoc-documentation-function is not set.
+       (eldoc-documentation-function-default, eldoc-get-fnsym-args-string)
+       (eldoc-highlight-function-argument, eldoc-get-var-docstring)
+       (eldoc-last-data-store, eldoc-docstring-first-line)
+       (eldoc-docstring-format-sym-doc, eldoc-fnsym-in-current-sexp)
+       (eldoc-beginning-of-sexp, eldoc-current-symbol)
+       (eldoc-function-argstring): Move to elisp-mode.el.
+       (eldoc-symbol-function): Remove, unused.
+       * progmodes/elisp-mode.el: New file.  Rename all "eldoc-*" to "elisp--*".
+       (elisp-completion-at-point): Rename from lisp-completion-at-point.
+       (elisp--preceding-sexp): Rename from preceding-sexp.
+       * loadup.el: Load new file progmodes/elisp-mode.
+       * ielm.el (inferior-emacs-lisp-mode): Set eldoc-documentation-function.
+       * emacs-lisp/lisp.el (lisp--local-variables-1, lisp--local-variables)
+       (lisp--local-variables-completion-table, lisp--expect-function-p)
+       (lisp--form-quoted-p, lisp--company-doc-buffer)
+       (lisp--company-doc-string, lisp--company-location)
+       (lisp-completion-at-point): Move to elisp-mode.el.
+       * emacs-lisp/lisp-mode.el (lisp--mode-syntax-table): New syntax-table,
+       extracted from emacs-lisp-mode-syntax-table.
+       (emacs-lisp-mode-abbrev-table, emacs-lisp-mode-syntax-table): Move to
+       elisp-mode.el.
+       (lisp-imenu-generic-expression): Add comments to document what comes
+       from which Lisp dialect.
+       (emacs-lisp-mode-map, emacs-lisp-byte-compile)
+       (emacs-lisp-byte-compile-and-load, emacs-lisp-mode-hook)
+       (emacs-lisp-mode, emacs-list-byte-code-comment-re)
+       (emacs-lisp-byte-code-comment)
+       (emacs-lisp-byte-code-syntax-propertize, emacs-lisp-byte-code-mode)
+       (lisp-interaction-mode-map, lisp-interaction-mode)
+       (eval-print-last-sexp, last-sexp-setup-props)
+       (last-sexp-toggle-display, prin1-char, preceding-sexp)
+       (eval-last-sexp-1, eval-last-sexp-print-value)
+       (eval-last-sexp-fake-value, eval-sexp-add-defvars, eval-last-sexp)
+       (eval-defun-1, eval-defun-2, eval-defun): Move to elisp-mode.el.
+
+2014-09-26  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * progmodes/grep.el (grep-regexp-alist): Use more-accurate regexp.
+       Do not match file names that end in '/', as they cannot be 'grep'
+       hits nowadays.  This prevents confusion when 'grep -r' reports a
+       match in a file whose basename is ':12345:'.  Conversely, do not
+       require exactly the same sequence of spaces and tabs after both
+       colons, and allow spaces or tabs before the second colon, as per
+       the POSIX spec for 'grep' output.
+
+2014-09-26  Leo Liu  <sdl.web@gmail.com>
+
+       Add cl-parse-integer based on parse-integer (Bug#18557)
+       * calendar/parse-time.el (parse-time-digits): Remove.
+       (digit-char-p, parse-integer) Moved to cl-lib.el.
+       (parse-time-tokenize, parse-time-rules, parse-time-string):
+       Use cl-parse-integer.
+
+       * emacs-lisp/cl-extra.el (cl-parse-integer): New function.
+
+       * emacs-lisp/cl-lib.el (cl-digit-char-table): New var.
+       (cl-digit-char-p): New function.
+
+2014-09-25  Juri Linkov  <juri@jurta.org>
+
+       * vc/add-log.el (change-log-next-buffer): Don't create an empty
+       buffer "ChangeLog" when the current buffer doesn't match ChangeLog.[0-9].
+       Return the current buffer if no files match the default pattern
+       ChangeLog.[0-9].  Signal "end of multi" when file is nil. (Bug#18547)
+
+2014-09-25  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * net/tramp-sh.el (tramp-sh-handle-vc-registered): Don't modify
+       the global vc-handled-backends (bug#18535).
+
+2014-09-24  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * find-cmd.el (find-cmd): Use grep's `find-program' (bug#18518).
+       Suggested by <lompik@voila.fr>.
+
+2014-09-24  Ulf Jasper  <ulf.jasper@web.de>
+
+       * net/newst-treeview.el (newsticker--treeview-do-get-node-by-id):
+       Rename from `newsticker--treeview-do-get-node'.
+       (newsticker--treeview-get-node-by-id):
+       Rename from `newsticker--treeview-get-node'.
+       (newsticker--treeview-buffer-init)
+       (newsticker--treeview-buffer-init): Disable buffer undo.
+       (newsticker--treeview-unfold-node): Adapt to modified
+       `newsticker--group-find-parent-group'.
+       (newsticker--group-do-find-group):
+       Rename from `newsticker--group-do-find-group-for-feed'.
+       Now works for both, groups and feeds.
+       (newsticker--group-find-parent-group):
+       Rename from `newsticker--group-find-group-for-feed'.
+       Now works for both, groups and feeds.
+       (newsticker--group-do-get-parent-group)
+       (newsticker--group-get-parent-group): Remove.
+       (newsticker-group-add-group): Change interactive prompts.
+       (newsticker-group-add-group): Finally jump to added group.
+       (newsticker-group-delete-group): Finally jump to current feed.
+       (newsticker--group-do-rename-group, newsticker-group-rename-group)
+       (newsticker--get-group-names, newsticker--group-names): New.
+       (newsticker-group-move-feed): Finally jump to moved feed.
+       (newsticker-group-shift-feed-down, newsticker-group-shift-feed-up)
+       (newsticker-group-shift-group-down)
+       (newsticker-group-shift-group-up, newsticker--group-shift): New.
+       (newsticker-treeview-mode-map): New keybindings for new shift commands.
+
+       * net/newst-backend.el (newsticker--item-list)
+       (newsticker--item-position, newsticker--prev-message)
+       (newsticker--scrollable-text): Move to newst-ticker.el.
+
+       * net/newst-ticker.el (newsticker--item-list)
+       (newsticker--item-position, newsticker--prev-message)
+       (newsticker--scrollable-text): Move from newst-backend.el.
+
+2014-09-22  Kan-Ru Chen  <kanru@kanru.info>
 
        * window.el (fit-window-to-buffer): When counting buffer width,
        count the whole visible buffer.  Correctly convert the body-height
        to pixel size for window-text-pixel-size (Bug#18498).
 
-2014-09-14  Glenn Morris  <rgm@gnu.org>
+2014-09-22  Sam Steingold  <sds@gnu.org>
+
+       * progmodes/sql.el (sql-product-alist): Improve the Vertica entry.
+       (sql-execute): Use `special-mode'.
+
+2014-09-22  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       Add pcase-defmacro, as well as `quote' and `app' patterns.
+       * loadup.el: Increase max-lisp-eval-depth when macroexpanding macroexp.
+       * emacs-lisp/pcase.el: Allow (F . ARGS) in `app' patterns.
+       (pcase--funcall, pcase--eval): New functions.
+       (pcase--u1): Use them for guard, pred, let, and app.
+       (\`): Use the new feature to generate better code for vector patterns.
+       * emacs-lisp/pcase.el: Use pcase-defmacro to handle backquote.
+       (pcase--upat): Remove.
+       (pcase--macroexpand): Don't hardcode handling of `.
+       (pcase--split-consp, pcase--split-vector): Remove.
+       (pcase--split-equal): Disregard ` since it's expanded away.
+       (pcase--split-member): Optimize for quote rather than for `.
+       (pcase--split-pred): Optimize for quote rather than for `.
+       (pcase--u1): Remove handling of ` (and of `or' and `and').
+       Quote non-selfquoting values when passing them to `eq'.
+       Drop `app's let-binding if the variable is not used.
+       (pcase--q1): Remove.
+       (`): Define as a pattern macro.
+       * emacs-lisp/pcase.el (pcase--match): New smart-constructor function.
+       (pcase--expand pcase--q1, pcase--app-subst-match): Use it.
+       (pcase--macroexpand): Handle self-quoting patterns here, expand them to
+       quote patterns.
+       (pcase--split-match): Don't hoist or/and here any more.
+       (pcase--split-equal): Optimize quote patterns as well as ` patterns.
+       (pcase--flip): New helper macro.
+       (pcase--u1): Optimize the memq case directly.
+       Don't handle neither self-quoting nor and/or patterns any more.
+       * emacs-lisp/pcase.el (pcase-defmacro): New macro.
+       (pcase--macroexpand): New function.
+       (pcase--expand): Use it.
+       * emacs-lisp/pcase.el (pcase--app-subst-match, pcase--app-subst-rest):
+       New optimization functions.
+       (pcase--u1): Add support for `quote' and `app'.
+       (pcase): Document them in the docstring.
+
+2014-09-22  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       Use lexical-bindin in Ibuffer.
+       * ibuffer.el (ibuffer-do-toggle-read-only): `arg' is unused.
+       (ibuffer-compile-format): Simplify.
+       (ibuffer-clear-summary-columns): Simplify.
+       * ibuf-ext.el (ibuffer-generate-filter-groups): Don't use the third
+       elem of dotimes when we don't refer to the iteration var from it.
+       (ibuffer-toggle-sorting-mode): Avoid add-to-list.
+       * ibuf-macs.el (define-ibuffer-column, define-ibuffer-op):
+       Silence byte-compiler.
+
+2014-09-22  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * font-lock.el (font-lock-compile-keyword): Don't confuse a lambda
+       expression for a list.
+
+       * emacs-lisp/bytecomp.el (byte-compile-lambda): Don't add fundoc usage
+       for functions with no arguments.
+
+       * mpc.el (mpc-data-directory): Use locate-user-emacs-file.
+       (mpc-volume-refresh): Make sure the corresponding header-line is updated.
+
+2014-09-17  Tom Willemse  <tom@ryuslash.org>  (tiny change)
+
+       * simple.el (clone-indirect-buffer): Mention the return value
+       (bug#18478).
+
+       * progmodes/prog-mode.el (prog-mode-hook): Replace reference to
+       Text mode in docstring (bug#18464).
+
+2014-09-21  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * progmodes/perl-mode.el (perl-syntax-propertize-function):
+       Accept underscores in identifiers after "sub" (bug#18502).
+
+2014-09-21  Tassilo Horn  <tsdh@gnu.org>
+
+       * textmodes/reftex-sel.el (reftex-select-label-mode)
+       (reftex-select-bib-mode, reftex-insert-docstruct): Derive modes
+       from special-mode (instead of fundamental-mode) and propertize
+       with font-lock-face instead of just face. (Bug#18496)
+
+       * textmodes/reftex-toc.el (reftex-toc-mode, reftex-toc): Ditto.
+
+2014-09-19  Dmitry Gutov  <dgutov@yandex.ru>
+
+       * emacs-lisp/lisp.el (lisp-completion-at-point): Only calculate
+       `table-etc' when `end' is non-nil.
+       (lisp-completion-at-point): Move `end' back if it's after quote.
+       If in comment or string, only complete when after backquote.
+       (Bug#18265)
+       (lisp-completion-at-point): Don't use
+       `lisp--local-variables-completion-table' in the
+       `lisp--form-quoted-p' case.
+
+2014-09-19  Dmitry Gutov  <dgutov@yandex.ru>
+
+       * emacs-lisp/lisp.el (lisp--expect-function-p)
+       (lisp--form-quoted-p): New functions.
+       (lisp-completion-at-point): Use them to see if we're completing a
+       variable reference, a function name, or just any symbol.
+       http://lists.gnu.org/archive/html/emacs-devel/2014-02/msg00229.html
+
+2014-09-18  Ivan Kanis  <ivan@kanis.fr>
+
+       * net/shr.el, net/eww.el: Don't override `shr-width', but
+       introduce a new variable `shr-internal-width'.  This allows users
+       to specify a width themselves.
+
+2014-09-18  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * image-mode.el (image-toggle-display-image): If we have a
+       `fit-width' or a `fit-height', don't limit the size of the image
+       to the window size, because that doesn't preserve the aspect ratio.
+       * image-mode.el: Move defvars earlier to avoid a byte-compilation
+       warning.
+
+2014-09-17  Reuben Thomas  <rrt@sc3d.org>
+
+       * progmodes/js.el: Add interpreter-mode-alist support for various
+       JavaScript interpreters.
+
+2014-09-17  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Don't assume 'grep' supports GREP_OPTIONS.
+       The GREP_OPTIONS environment variable is planned to be marked
+       obsolescent in GNU grep, due to problems in its use, so stop
+       relying on it.
+       * progmodes/grep.el (grep-highlight-matches): Document this.
+       (grep-process-setup): Do not set GREP_OPTIONS.
+       (grep-compute-defaults): Use an explicit --color option if supported.
+
+2014-09-16  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * msb.el (msb--make-keymap-menu, msb-menu-bar-update-buffers):
+       Don't add outdated key-shortcut cache (bug#18482).
+
+2014-09-15  Glenn Morris  <rgm@gnu.org>
 
        * image.el (image-multi-frame-p): Fix thinko - do not force
        a delay if none was specified.  (Bug#18334)
 
-2014-09-12  Kan-Ru Chen  <kanru@kanru.info>
+2014-09-15  Kan-Ru Chen  <kanru@kanru.info>
 
        * window.el (fit-window-to-buffer): Doc fix.
 
-2014-09-10  Ivan Shmakov  <ivan@siamics.net>  (tiny change)
+2014-09-15  Ivan Shmakov  <ivan@siamics.net>
 
        * desktop.el (desktop-create-buffer): Check that buffers are still live
        before burying them (bug#18373).
 
-2014-09-09  Glenn Morris  <rgm@gnu.org>
+2014-09-15  Glenn Morris  <rgm@gnu.org>
 
        * calendar/diary-lib.el (diary-list-entries):
        Restore 24.3 display behavior.  (Bug#18381)
 
-2014-09-09  Eli Zaretskii  <eliz@gnu.org>
+2014-09-15  Eli Zaretskii  <eliz@gnu.org>
 
        * mouse.el (mouse-drag-line): On text-mode frames, count the mode
        line and header line as 1 pixel.  This fixes the 1-"pixel" (row)
        avoids moving mode line up when the mouse click is on the modeline
        and no drag is attempted.
 
+2014-09-14  Daniel Colascione  <dancol@dancol.org>
+
+       * register.el (insert-register): Change default interactive
+       insertion mode.
+
+2014-09-14  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp-cache.el (tramp-flush-file-function): Simplify check.
+       Suppress debug messages.
+
+       * net/tramp.el (tramp-file-name-handler):
+       * net/tramp-gvfs.el (tramp-gvfs-url-file-name): Apply `cons' where
+       appropriate.
+
+2014-09-13  Christopher Schmidt  <ch@ristopher.com>
+
+       * calendar/calendar.el (calendar-update-mode-line):
+       Do not overwrite mode-line-format if calendar-mode-line-format is
+       nil.  (Bug#18467)
+
+2014-09-13  Leo Liu  <sdl.web@gmail.com>
+
+       * emacs-lisp/pcase.el (pcase--dontwarn-upats): New var.
+       (pcase--expand): Use it.
+       (pcase-exhaustive): New macro.  (Bug#16567)
+
+       * emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2):
+       Add pcase-exhaustive.
+
+2014-09-13  Eli Zaretskii  <eliz@gnu.org>
+
+       * mail/rmailmm.el (rmail-mime-insert-html): Decode the HTML part
+       using the specified transfer-encoding, if any, or 'undecided'.
+       (rmail-mime-render-html-shr): Bind shr-width to nil, so lines are
+       broken at the window margin.
+
+2013-12-27  Ken Olum  <kdo@cosmos.phy.tufts.edu>
+
+       Support rendering of HTML parts in Rmail (bug#4258).
+       * mail/rmailmm.el (rmail-mime-process): Handle text/html
+       separately from other text/ types.  Suppress tagline for
+       multipart body.
+       (rmail-mime-parse): Don't change visibility of tagline here.
+       (rmail-mime-set-bulk-data, rmail-mime-insert-bulk):
+       Handle text/html specially.
+       (rmail-mime-render-html-function,rmail-mime-prefer-html): New variables.
+       (rmail-mime-insert-html, rmail-mime-render-html-shr)
+       (rmail-mime-render-html-lynx): New functions.
+       (rmail-mime-fix-inserted-faces): New function.
+       (rmail-mime-process-multipart): Find the best part to show
+       following rmail-mime-prefer-html if set.
+       (rmail-mime-searching): New variable.
+       (rmail-search-mime-message): Bind rmail-mime-searching to
+       suppress rendering while searching.
+
+2014-09-12  Sam Steingold  <sds@gnu.org>
+
+       * progmodes/sql.el (sql-product-alist): Add vertica.
+       (sql-vertica-program, sql-vertica-options)
+       (sql-vertica-login-params, sql-comint-vertica, sql-vertica):
+       New functions and variables to support Vertica.
+       Inspired by code by Roman Scherer <roman@burningswell.com>.
+
+2014-09-11  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * ses.el (ses-file-format-extend-parameter-list): Rename from
+       ses-file-format-extend-paramter-list, to correct a misspelling.
+       All uses changed.
+
+2014-09-10  Alan Mackenzie  <acm@muc.de>
+
+       CC Mode: revert recent changes and fix bug 17463 (cc-langs.elc
+       gets loaded at run-time).
+       * progmodes/cc-langs.el (c-no-parens-syntax-table): Rename the
+       c-lang-const to c-make-no-parens-syntax-table and correct the
+       logic.
+       (c-no-parens-syntax-table): Correct the logic of the
+       c-lang-defvar.
+
+2014-09-10  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       CC-mode: Set open-paren-in-column-0-is-defun-start to nil;
+       plus misc cleanup.
+       * progmodes/cc-mode.el (c-basic-common-init):
+       Set open-paren-in-column-0-is-defun-start.
+       (adaptive-fill-first-line-regexp, font-lock-syntactic-keywords):
+       Remove declarations, unused.
+       (run-mode-hooks): Remove declaration.
+       (font-lock-defaults): Use plain `defvar' to declare.
+       (c-run-mode-hooks): Test existence of run-mode-hooks with fboundp.
+       * progmodes/cc-langs.el (c-filter-ops): Avoid `setq'.
+       (c-make-mode-syntax-table): Don't micro-optimize.
+       (c-keywords, c-keyword-member-alist): Simplify.
+       (c-kwds-lang-consts): Don't eval at compile-time.
+       (c-primary-expr-regexp): Comment out unused vars.
+       * progmodes/cc-fonts.el (c-font-lock-context): Declare at top-level.
+       (c-font-byte-compile): New var.
+       (c--compile): New function.  Use it instead of `byte-compile'.
+       (c-cpp-matchers): Quote the value returned by
+       `c-make-syntactic-matcher' in case it's not self-evaluating.
+       (c-basic-matchers-before): Avoid a plain MATCHER as keyword, wrap it in
+       parentheses instead (in case MATCHER happens to be a list).
+       (c-font-lock-enum-tail): Remove unused var `start'.
+       (c-font-lock-objc-methods): Silence byte-compiler warnings.
+       * progmodes/cc-engine.el (c-syntactic-re-search-forward): Sink an `if'
+       test into an argument.
+       * progmodes/cc-defs.el (c-point, c-major-mode-is, c-put-char-property)
+       (c-get-char-property): Don't use `eval' just to unquote a constant.
+       (c-use-extents): Remove.  Use (featurep 'xemacs), compiled
+       more efficiently.
+       (c-put-char-property-fun): Don't call `byte-compile' by hand.
+       (c-clear-char-property, c-clear-char-properties): Check that `property'
+       is a quoted constant.
+       (c-emacs-features): Remove `infodock', `syntax-properties', and
+       `pps-extended-state' (never used), `8-bit' and `1-bit' (use (featurep
+       'xemacs) instead).  Use `with-temp-buffer' and let-bind vars after
+       changing buffer, so we don't have to setq them again afterwards.
+       (c-lang-const): Remove redundant symbolp assertions.
+       (c-find-assignment-for-mode): Use `or'.
+       * Makefile.in (compile-one-process): Remove cc-mode dependency.
+
+2014-09-09  Sam Steingold  <sds@gnu.org>
+
+       * progmodes/sql.el (sql-default-directory): Fix type annotation.
+
+2014-09-09  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * progmodes/cc-awk.el: Remove unneeded cc-bytecomp use.
+       Change doc comments into docstrings.
+       * Makefile.in: Remove cc-awk dependency.
+
+2014-09-08  Sam Steingold  <sds@gnu.org>
+
+       * progmodes/sql.el (sql-send-line-and-next): New command,
+       bound to C-c C-n.
+       (sql-show-sqli-buffer): Display the buffer instead of its name and
+       bind the command to C-c C-z.
+       (sql-default-directory): New user option.
+       (sql-product-interactive): Bind `default-directory' to it to
+       enable remote connections using Tramp.
+       (sql-set-sqli-buffer): Call `sql-product-interactive' when no
+       suitable buffer is available.
+
 2014-09-08  Glenn Morris  <rgm@gnu.org>
 
+       * calendar/calendar.el (calendar-basic-setup):
+       Fix calendar-view-holidays-initially-flag and fancy display.
+       * calendar/diary-lib.el (diary-live-p): Doc fix.
+
        * calendar/calendar.el (calendar-basic-setup):
        Avoid clobbering calendar with diary.  (Bug#18381)
 
-2014-09-05  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-09-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * vc/vc-dir.el (vc-dir-update): Don't burp in corner case.
 
-2014-09-04  Lars Ljung  <lars@matholka.se>  (tiny change)
+2014-09-08  Lars Ljung  <lars@matholka.se>  (tiny change)
 
        * isearch.el (isearch-yank-word-or-char): Obey superword-mode
        as well (bug#18400).
 
-2014-09-04  Eli Zaretskii  <eliz@gnu.org>
+2014-09-08  Eli Zaretskii  <eliz@gnu.org>
 
        * subr.el (posn-actual-col-row): Doc fix.  (Bug#18385)
 
-2014-09-02  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-09-06  Leo Liu  <sdl.web@gmail.com>
+
+       * emacs-lisp/pcase.el (pcase): Doc fix.
+       (pcase--split-vector): New function.
+       (pcase--q1): Support vector qpattern.  (Bug#18327)
+
+2014-09-05  Sam Steingold  <sds@gnu.org>
+
+       * textmodes/tex-mode.el (tex-print-file-extension): New user
+       option.
+       (tex-print): Use it instead of the hard-coded string.
+
+2014-09-05  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp-sh.el (tramp-sh-handle-start-file-process):
+       Expand `default-directory'.
+
+2014-09-05  Martin Rudalics  <rudalics@gmx.at>
+
+       * scroll-bar.el (horizontal-scroll-bars-available-p):
+       New function.
+       (horizontal-scroll-bar-mode): Rewrite using
+       horizontal-scroll-bars-available-p.
+       * menu-bar.el (menu-bar-showhide-scroll-bar-menu): Rewrite using
+       horizontal-scroll-bars-available-p.
+
+2014-09-05  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * subr.el (call-process-shell-command, process-file-shell-command):
+       Make the `args' obsolete (bug#18409).
+       (start-process-shell-command, start-file-process-shell-command):
+       Use `declare'.
+
+2014-09-05  Jay Belanger  <jay.p.belanger@gmail.com>
+
+       * calc/calc-forms.el (math-normalize-hms): Do a better check for
+       "negative" hms forms.
+
+2014-09-04  Rasmus Pank Roulund  <emacs@pank.eu>
+
+       * vc/vc-git.el (vc-git-conflicted-files): Fix bug when git status
+       returns nil (bug#18391).
+
+2014-09-04  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * emacs-lisp/eldoc.el (eldoc-function-argstring): Don't strip
+       terminating paren (bug#18352).
+       (eldoc-last-data-store): Return cached data.
+       (eldoc-get-var-docstring): Avoid setq.
+       (eldoc-get-fnsym-args-string): Clarify data flow.
+
+2014-09-04  Thierry Volpiatto  <thierry.volpiatto@gmail.com>
+
+       * emacs-lisp/eldoc.el (eldoc-highlight-function-argument): Handle the
+       case where we're currently providing part of the &rest arg after some
+       &key args, as in define-ibuffer-op (bug#18048).
+
+2014-09-03  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * progmodes/which-func.el (which-func-ff-hook): Obey pre-existing
+       buffer-local setting of which-func-mode.
+       (which-func-mode): Use defvar-local.
+       (which-function-mode): Don't reset which-func-mode in each buffer since
+       it might have been set by someone else.
+       (which-func-update-ediff-windows): Check which-function-mode.
+
+2014-09-03  Martin Rudalics  <rudalics@gmx.at>
+
+       * frame.el (frame-initialize): Remove horizontal-scroll-bars
+       from frame-initial-frame-alist.
+       * scroll-bar.el (previous-horizontal-scroll-bar-mode)
+       (horizontal-scroll-bar-mode-explicit)
+       (set-horizontal-scroll-bar-mode, get-horizontal-scroll-bar-mode)
+       (toggle-horizontal-scroll-bar): Remove.
+       (horizontal-scroll-bar-mode): Remove defcustom.
+       (horizontal-scroll-bar-mode): Fix doc-string.
+       (scroll-bar-toolkit-scroll)
+       (scroll-bar-toolkit-horizontal-scroll): Add doc-strings stubs.
+
+2014-09-03  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/package.el (package-generate-description-file):
        Properly quote the arguments (bug#18332).  Change second arg.
        * progmodes/gud.el (gud-gdb-completion-at-point): Add hack (bug#18282).
        (gud-gdb-completions): Remove obsolete workaround.
 
-2014-09-02  Eli Zaretskii  <eliz@gnu.org>
+2014-09-03  Eli Zaretskii  <eliz@gnu.org>
 
        * subr.el (posn-col-row): Revert the change from commit
        2010-11-13T21:07:58Z!eliz@gnu.org, which
        introduced an off-by-one error in the reported row when there is a
        header line.  (Bug#18384)
 
-2014-09-01  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+2014-09-03  Fabián Ezequiel Gallina  <fgallina@gnu.org>
 
        * progmodes/python.el (python-indent-post-self-insert-function):
        Avoid electric colon at beginning-of-defun.  (Bug#18228)
 
-2014-09-01  Glenn Morris  <rgm@gnu.org>
+2014-09-03  Glenn Morris  <rgm@gnu.org>
 
        * tutorial.el (tutorial--display-changes):
-       Fix 2014-07-29 change.  (Bug#18382)
+       Fix 2014-08-01 change.  (Bug#18382)
 
-2014-08-29  Ken Brown  <kbrown@cornell.edu>
+2014-09-03  Ken Brown  <kbrown@cornell.edu>
 
        * startup.el (fancy-splash-frame): Extend the fix for Bug#16014 to
        the Cygwin-w32 build.  (Bug#18347)
 
-2014-08-28  Glenn Morris  <rgm@gnu.org>
+2014-09-03  Glenn Morris  <rgm@gnu.org>
 
        * tar-mode.el (tar--extract, tar-extract):
        Avoid permanently disabling undo in extracted buffers.  (Bug#18344)
 
-2014-08-27  Michael Albinus  <michael.albinus@gmx.de>
+2014-09-03  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * progmodes/sh-script.el (sh-font-lock-quoted-subshell): Try to better
+       handle multiline elements (bug#18380).
+
+2014-09-01  Eli Zaretskii  <eliz@gnu.org>
+
+       * ls-lisp.el (ls-lisp-use-string-collate)
+       (ls-lisp-UCA-like-collation): New defcustoms.
+       (ls-lisp-string-lessp): Use them to control sorting by file
+       names.  (Bug#18051)
+       (ls-lisp-version-lessp): New function.
+       (ls-lisp-handle-switches): Use it to implement the -v switch of
+       GNU ls.
+       (ls-lisp--insert-directory): Mention the -v switch in the doc string.
+
+2014-08-31  Christoph Scholtes  <cschol2112@gmail.com>
+
+       * ibuffer.el: Replace mode-specific quit function with
+       `quit-window' via `special-mode'.
+       (ibuffer-mode-map): Use keybindings from special-mode-map instead
+       of local overrides.
+       (ibuffer): Don't store previous windows configuration.
+       Let `quit-window' handle restoring.
+       (ibuffer-quit): Remove function. Use `quit-window' instead.
+       (ibuffer-restore-window-config-on-quit): Remove variable.
+       (ibuffer-prev-window-config): Remove variable.
+
+2014-08-29  Michael Heerdegen  <michael_heerdegen@web.de>
 
-       * emacs-lisp/authors.el (authors-aliases): Addition.
+       * emacs-lisp/easy-mmode.el (define-minor-mode): Use mode function
+       name instead of variable name in hook docstring.  (Bug#18349)
+
+2014-08-29  Martin Rudalics  <rudalics@gmx.at>
+
+       * window.el (display-buffer-at-bottom): Prefer bottom-left
+       window to other bottom windows.  Reuse a bottom window if it
+       shows the buffer already.  Suggested by Juri Linkov
+       <juri@jurta.org> in discussion of (Bug#18181).
+
+2014-08-29  Leo Liu  <sdl.web@gmail.com>
+
+       * files.el (minibuffer-with-setup-hook): Allow (:append FUN) to
+       append to minibuffer-setup-hook.  (Bug#18341)
+
+2014-08-28  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * progmodes/cc-defs.el: Expose c-lanf-defconst's expressions to the
+       byte-compiler.
+       (lookup-syntax-properties): Silence byte-compiler.
+       (c-lang-defconst): Quote the code with `lambda' rather than with
+       `quote'.
+       (c-lang-const): Avoid unneeded setq.
+       (c-lang-constants-under-evaluation): Add docstring.
+       (c-lang--novalue): New constant.
+       (c-find-assignment-for-mode): Use it instead of c-lang-constants.
+       (c-get-lang-constant): Same here.
+       Get the mode's value using `funcall' now that the code is quoted
+       with `lambda'.
+
+2014-08-28  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp.el (tramp-handle-shell-command): Use `display-buffer'.
+       (Bug#18326)
+
+2014-08-28  Martin Rudalics  <rudalics@gmx.at>
+
+       * scroll-bar.el (scroll-bar-horizontal-drag-1): Handle new
+       interpretation of `portion-whole'.
+
+2014-08-28  Michael Albinus  <michael.albinus@gmx.de>
 
        * net/tramp-adb.el: Spell author name correctly.
 
-2014-08-27  João Távora  <joaotavora@gmail.com>
+2014-08-28  João Távora  <joaotavora@gmail.com>
 
        * net/shr.el (shr-expand-url): Plain expand-file-name is not enough;
        use url-expand-file-name.  (Bug#18310)
 
-2014-08-25  Glenn Morris  <rgm@gnu.org>
+2014-08-28  Glenn Morris  <rgm@gnu.org>
 
        * emulation/cua-rect.el (cua--highlight-rectangle):
        Avoid error at point-min.  (Bug#18309)
 
-2014-08-18  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-08-28  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * progmodes/python.el (python-shell-prompt-detect): Remove redundant
        executable-find (bug#18244).
 
        * simple.el (self-insert-uses-region-functions): Defvar.
 
-2014-08-13  Leo Liu  <sdl.web@gmail.com>
+2014-08-28  Glenn Morris  <rgm@gnu.org>
+
+       * subr.el (remq): Revert 2014-08-25 doc change (not always true).
+
+2014-08-27  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * startup.el (normal-top-level): Now use internal--top-level-message.
+
+2014-08-26  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * startup.el (normal-top-level): Use top-level-message.
+
+2014-08-25  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * net/shr.el (shr-copy-url): Encode copied URL to avoid getting
+       URLs containing spaces and the like.
+
+2014-08-25  Christoph Scholtes  <cschol2112@gmail.com>
+
+       * subr.el (remq): Fix docstring (Bug#18253).
+
+2014-08-25  Christoph Scholtes  <cschol2112@gmail.com>
+
+       * replace.el (query-replace): Fix typo in docstring (Bug#18320).
+
+2014-08-24  Alan Mackenzie  <acm@muc.de>
+
+       Handle C++11's "auto" and "decltype" constructions.
+       * progmodes/cc-engine.el (c-forward-type): Enhance to recognise
+       and return 'decltype.
+       (c-forward-decl-or-cast-1): New let variables backup-kwd-sym,
+       prev-kwd-sym, new-style-auto.  Enhance to handle the new "auto"
+       keyword.
+       * progmodes/cc-fonts.el (c-font-lock-declarations): Handle the
+       "decltype" keyword.
+       (c-font-lock-c++-new): Handle "decltype" constructions.
+       * progmodes/cc-langs.el (c-auto-ops, c-auto-ops-re):
+       New c-lang-defconsts/defvars.
+       (c-haskell-op, c-haskell-op-re): New c-lang-defconsts/defvars.
+       (c-typeof-kwds, c-typeof-key): New c-lang-defconsts/defvars.
+       (c-typeless-decl-kwds): Append "auto" onto the C++ value.
+       (c-not-decl-init-keywords): Also exclude c-typeof-kwds from value.
+
+       Make ">>" act as double template ender in C++ Mode.
+       * progmodes/cc-langs.el (c->-op-cont-tokens): New lang-const split
+       off from c->-op-cont-re.
+       (c->-op-cont-tokens): Change to use the above.
+       (c->-op-without->-cont-regexp): New lang-const.
+       * progmodes/cc-engine.el (c-forward-<>-arglist-recur):
+       Use c->-op-without->-cont-regexp in place of c->-op-cont-tokens.
+
+
+2014-08-23  Alan Mackenzie  <acm@muc.de>
+
+       * progmodes/cc-fonts.el (c-font-lock-declarators): Fix infinite
+       loop, bug #18306.  The bug was introduced on 2014-08-02.
+
+2014-08-21  Eli Zaretskii  <eliz@gnu.org>
+
+       * textmodes/texnfo-upd.el (texinfo-specific-section-type):
+       Don't recognize a Top node if there are other sectioning commands
+       earlier in the Texinfo file.  This fixes a bug in
+       texinfo-make-menu and avoids inflooping in
+       texinfo-all-menus-update when they are invoked on texinfo.texi.
+
+2014-08-21  Martin Rudalics  <rudalics@gmx.at>
+
+       * window.el (window--side-window-p): New function.
+       (split-window, window-splittable-p): Use window--side-window-p to
+       determine whether WINDOW can be split (Bug#18304).
+       * calendar/calendar.el (calendar-basic-setup): Fix one call of
+       `window-splittable-p' and add another (Bug#18304).
+
+2014-08-20  Sam Steingold  <sds@gnu.org>
+
+       * progmodes/python.el (python-new-pythonpath): Extract from
+       `python-shell-calculate-process-environment'.
+
+2014-08-18  Thierry Volpiatto  <thierry.volpiatto@gmail.com>
+
+       * emacs-lisp/eldoc.el (eldoc-highlight-function-argument): Add support
+       for &key args (bug#18048).
+
+2014-08-18  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * emacs-lisp/eldoc.el (eldoc-argument-case): Obsolete and change default.
+       (eldoc-function-argstring-format): Remove.
+       (eldoc-function-argstring): Always return upcase args.
+       Use help-make-usage.  Don't add parens.
+       (eldoc-get-fnsym-args-string): Don't obey eldoc-argument-case since
+       it's too late to do it right (bug#18048).
+
+2014-08-18  Eli Zaretskii  <eliz@gnu.org>
+
+       * scroll-bar.el (scroll-bar-horizontal-drag-1)
+       (scroll-bar-toolkit-horizontal-scroll): When determining the
+       paragraph direction, use the buffer of the window designated in
+       the event.
+
+2014-08-16  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * vc/diff-mode.el (diff-fixup-modifs): Handle empty line in
+       context of unified diff.
+
+2014-08-16  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Add dependencies to fix loaddefs race during parallel builds.
+       Without this, for example, 'make -j bootstrap' can fail and report
+       "Opening input file: no such file or directory,
+       .../lisp/calendar/diary-loaddefs.el ... recipe for target
+       'calendar/hol-loaddefs.el' failed", where the hol-loaddefs.el rule
+       got confused because diary-loaddefs.el was being built in parallel.
+       * Makefile.in ($(CAL_DIR)/diary-loaddefs.el):
+       Depend on $(CAL_DIR)/cal-loaddefs.el.
+       ($(CAL_DIR)/hol-loaddefs.el): Depend on $(CAL_DIR)/diary-loaddefs.el.
+
+2014-08-16  Martin Rudalics  <rudalics@gmx.at>
+
+       * scroll-bar.el (scroll-bar-horizontal-drag-1): Use cdr of
+       portion-whole for scrolling right-to-left text.
+
+2014-08-15  Leo Liu  <sdl.web@gmail.com>
 
        * speedbar.el (speedbar-generic-list-tag-p): Allow special
        elements from imenu.
 
-2014-08-11  Glenn Morris  <rgm@gnu.org>
+2014-08-15  Glenn Morris  <rgm@gnu.org>
 
        * subr.el (with-output-to-temp-buffer): Doc fix; from elisp manual.
 
+2014-08-13  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+       * progmodes/compile.el (compilation-error-regexp-alist-alist):
+       Add Guile regexpses.
+
+2014-08-13  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+       * progmodes/gud.el (guiler): New function.  Starts the Guile REPL;
+       add Guile debugger support for GUD.
+
+2014-08-13  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * obsolete/mouse-sel.el (mouse-sel-mode): Use add/remove-function.
+       (mouse-sel--ignore): New function.
+       (mouse-sel-has-been-enabled, mouse-sel-original-bindings)
+       (mouse-sel-original-interprogram-cut-function)
+       (mouse-sel-original-interprogram-paste-function): Remove.
+
+2014-08-13  Eric S. Raymond  <esr@thyrsus.com>
+
+       * vc/vc-git.el (vc-git-resolve-when-done): New function.
+       Call "git add" when there are no longer conflict markers.
+
+2014-08-13  Rüdiger Sonderfeld  <ruediger@c-plusplus.de>
+
+       * vc/vc-git.el (vc-git-find-file-hook): New function.
+       Adds support for calling smerge (and resolve) on a conflicted file.
+       (vc-git-conflicted-files): New function.
+       Useful in itself and a step towards better smerge support.
+
+2014-08-12  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * mpc.el (mpc-reorder): Don't bother splitting the "active" elements
+       to the first part if they're the same as the selection.
+
+2014-08-12  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * image-mode.el (image-transform-reset): New command and menu item.
+       (image-mode-map): Rearrange the menu items to put presumably more
+       obscure items at the end.
+
+2014-08-12  Juri Linkov  <juri@jurta.org>
+
+       * vc/vc-annotate.el (vc-annotate-background-mode):
+       Use `with-demoted-errors' instead of `ignore-errors'.  (Bug#18189)
+
+2014-08-12  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * files.el (out-of-memory-warning-percentage): Turn it off by default.
+
+2014-08-11  Sam Steingold  <sds@gnu.org>
+
+       * textmodes/sgml-mode.el (sgml-validate-command): Set depending on
+       the presence of known validators (tidy, (o)nsgmls).
+
+2014-08-11  Ulf Jasper  <ulf.jasper@web.de>
+
+       Newsticker: introduce `newsticker-treeview-date-format'. (Bug#17227)
+
+       * net/newst-treeview.el (newsticker-treeview-date-format): New.
+       (newsticker--treeview-list-add-item): Use `newsticker-treeview-date-format'.
+
+2014-08-11  Glenn Morris  <rgm@gnu.org>
+
        * files.el (basic-save-buffer-2): Revert 2013-01-31 change, which
        chose coding system for writing before backing up, since it causes
        a more serious problem than the one it solves.  (Closes Bug#18141,
        reopens Bug#13522.)
 
-2014-08-10  Martin Rudalics  <rudalics@gmx.at>
+2014-08-11  Martin Rudalics  <rudalics@gmx.at>
+
+       * window.el (window-total-size): Make doc-string more self-contained.
+
+       * window.el (display-buffer-below-selected): Restore original
+       behavior if buffer is already displayed in the window below the
+       selected one (Bug#18181).
+
+2014-08-11  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * mouse.el (mouse--down-1-maybe-follows-link): Don't convert the down
+       event (bug#18212).
+
+2014-08-11  Eli Zaretskii  <eliz@gnu.org>
+
+       * info.el (info): Doc fix.
+
+2014-08-11  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * info.el (Info-mode-map): Override a global down-mouse-2 binding
+       (bug#18212).
+
+2014-08-11  Eli Zaretskii  <eliz@gnu.org>
+
+       * simple.el (default-line-height): A floating-point value of
+       line-spacing means a fraction of the default frame font's height,
+       not of the font currently used by the 'default' face.
+       Truncate the pixel value, like the display engine does.
+       (window-screen-lines): Use window-inside-pixel-edges for
+       determining the window height in pixels.  (Bug#18195)
+
+2014-08-11  Grégoire Jadi  <daimrod@gmail.com>
+
+       * leim/quail/latin-post.el: Transform " __" into " _".  (Bug#18023)
+
+2014-08-10  Ulf Jasper  <ulf.jasper@web.de>
+
+       Enumerate evaluated sexp diary entries (Bug#7911).
+       * calendar/icalendar.el (icalendar-export-sexp-enumerate-all)
+       (icalendar-export-sexp-enumeration-days): New.
+       (icalendar-export-region): Now `icalendar--convert-to-ical'
+       returns a cons cell or a list of cons cells.
+       (icalendar--convert-to-ical): Take care of
+       `icalendar-export-sexp-enumerate-all'.  Return (a list of) cons cells.
+       (icalendar--convert-ordinary-to-ical)
+       (icalendar--convert-weekly-to-ical, icalendar--convert-yearly-to-ical)
+       (icalendar--convert-block-to-ical, icalendar--convert-block-to-ical)
+       (icalendar--convert-float-to-ical, icalendar--convert-cyclic-to-ical)
+       (icalendar--convert-anniversary-to-ical): Return cons cell.
+       (icalendar--convert-sexp-to-ical): Enumerate evaluated sexp
+       entries.  Return (list of) cons cells.
+
+2014-08-09  Juri Linkov  <juri@jurta.org>
+
+       * vc/vc-annotate.el (vc-annotate-background-mode): Add :set
+       to reevaluate `vc-annotate-color-map'.  (Bug#18189)
+
+2014-08-09  Alan Mackenzie  <acm@muc.de>
+
+       * progmodes/cc-fonts.el (c-font-lock-declarators): Remove check
+       for top-level that can cause unacceptable slow-down in scrolling.
+       See email Subject: Huge {...} blocks in C/C++ again, from Dmitry
+       Antipov from 2013-10-14 in emacs-devel.
+
+2014-08-08  Rüdiger Sonderfeld  <ruediger@c-plusplus.de>
+
+       * ibuffer.el (ibuffer-mode-map): Use toggle button for
+       `ibuffer-auto-mode' menu entry.
+       (ibuffer-mode-hook): Add `ibuffer-auto-mode' customization option.
+
+2014-08-08  Matthias Meulien  <orontee@gmail.com>
+
+       * progmodes/prog-mode.el (prog-mode-hook): Make customizable.
+       (Bug#16394)
+
+2014-08-07  Martin Rudalics  <rudalics@gmx.at>
+
+       * window.el (window--min-size-1): Explicitly set WINDOW arg in
+       calls of window-min-pixel-height and window-min-pixel-width.
+
+2014-08-07  Reuben Thomas  <rrt@sc3d.org>
+
+       * progmodes/ada-mode.el:
+       * net/tramp.el (tramp-handle-file-symlink-p):
+       * net/tramp-ftp.el (tramp-ftp-file-name-handler): Remove a comment
+       about VMS, which we no longer support.
+       * progmodes/ada-xref.el (ada-xref-current): Remove mention of VMS,
+       and fix a FIXME, using convert-standard-filename in place of
+       removed ada-convert-file-name.
+
+2014-08-07  Eli Zaretskii  <eliz@gnu.org>
+
+       * files.el (auto-mode-alist): Remove support for VMS from a pattern.
+
+2014-08-07  Reuben Thomas  <rrt@sc3d.org>
+
+       Refer to MS-DOS using the same name everywhere.
+       * arc-mode.el, files.el, frame.el: ``MS-DOG'', ``MSDOG'' and
+       ``msdog'' become ``MS-DOS''.
+
+2014-08-07  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
+       Use cached "remote-copy-args" value, if available.  (Bug#18199)
+
+2014-08-07  Leo Liu  <sdl.web@gmail.com>
+
+       * help.el (temp-buffer-setup-hook,temp-buffer-show-hook):
+       Revert change on 2014-03-22.
+
+2014-08-06  Ulf Jasper  <ulf.jasper@web.de>
+
+       * calendar/icalendar.el (icalendar--diarytime-to-isotime)
+       (icalendar--convert-ordinary-to-ical): Allow for missing minutes
+       (Bug#13750).
+
+
+2014-08-05  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * image-mode.el (image-toggle-display-image): Always rescale images
+       to not be bigger than the current window.
+
+2014-08-05  Eric Brown  <brown@fastmail.fm>  (tiny change)
+
+       * net/eww.el (eww-bookmarks-directory): New variable.
+       (eww-write-bookmarks): Use it.
+       (eww-read-bookmarks): Ditto.
+
+2014-08-05  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * net/shr.el (shr-copy-url): Also copy the image URL.
+
+2014-08-05  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp-cache.el (tramp-flush-file-function): Suppress function
+       also for Tramp working buffers.
+
+2014-08-04  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+
+       * progmodes/python.el: Fix completions inside (i)pdb.
+       (python-shell-completion-pdb-string-code): Make obsolete.
+       (python-shell-completion-get-completions):
+       Use python-shell-completion-string-code resending setup code
+       continuously for (i)pdb.
+
+2014-08-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * rect.el (rectangle--default-line-number-format): Rename
+       from misspelled rectange--default-line-number-format (Bug#18045).
+       All uses changed.
+
+2014-08-03  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Don't mishandle year-9999 dates (Bug#18176).
+       * calendar/parse-time.el (parse-time-rules):
+       Allow years up to most-positive-fixnum.
+       * calendar/time-date.el (date-to-time):
+       Pass "Specified time is not representable" errors through.
+
+2014-08-02  Fabián Ezequiel Gallina  <fgallina@gnu.org>
 
-       * window.el (window-total-size): Make doc-string more
-       self-contained.
+       * progmodes/python.el: Completion code cleanups.
+       (python-shell-completion-get-completions): Detect and send import
+       statements directly to completion function.
+       (python-shell-completion-at-point): Simplify prompt calculation
+       and import vs input completion logic.
 
-2014-08-09  Martin Rudalics  <rudalics@gmx.at>
+2014-08-02  Alan Mackenzie  <acm@muc.de>
 
-       * window.el (display-buffer-below-selected): Restore original
-       behavior if buffer is already displayed in the window below the
-       selected one (Bug#18181).
+       Fix confusion in C++ file caused by comma in "= {1,2},".
+       Bug #17756.
+       * progmodes/cc-engine.el (c-beginning-of-statement-1): In checking
+       for a statement boundary marked by "}", check there's no "="
+       before the "{".
+       (c-guess-basic-syntax CASE 9B): Call c-beginning-of-statement with
+       non-nil `comma-delim' argument.
+       * progmodes/cc-fonts.el (c-font-lock-declarators): Parse an
+       initializer expression more accurately.
 
-2014-08-08  Stefan Monnier  <monnier@iro.umontreal.ca>
+       Correct loop termination condition in c-syntactic-skip-backward.
+       * progmodes/cc-engine.el (c-syntactic-skip-backward): Correct for
+       the situation where, after moving back out of a literal,
+       skip-chars-backward doesn't move further, yet checks have still to
+       be done.
 
-       * mouse.el (mouse--down-1-maybe-follows-link): Don't convert the down
-       event (bug#18212).
+2014-08-01  Eli Zaretskii  <eliz@gnu.org>
 
-2014-08-08  Eli Zaretskii  <eliz@gnu.org>
+       * tutorial.el (tutorial--display-changes): Accept punctuation
+       characters before the key binding.  (Bug#18146)
 
-       * info.el (info): Doc fix.
+2014-07-31  Fabián Ezequiel Gallina  <fgallina@gnu.org>
 
-2014-08-07  Stefan Monnier  <monnier@iro.umontreal.ca>
+       * progmodes/python.el: Shell output capture enhancements.
+       (python-shell-accept-process-output): New function.
+       (inferior-python-mode)
+       (python-shell-send-setup-code): Use it.
 
-       * info.el (Info-mode-map): Override a global down-mouse-2 binding
-       (bug#18212).
+2014-07-30  Christophe Deleuze  <christophe.deleuze@free.fr>  (tiny change)
 
-2014-08-05  Eli Zaretskii  <eliz@gnu.org>
+       * calendar/icalendar.el (icalendar--decode-isodatetime):
+       Use actual current-time-zone when converting to local time. (Bug#15408)
 
-       * simple.el (default-line-height): A floating-point value of
-       line-spacing means a fraction of the default frame font's height,
-       not of the font currently used by the 'default' face.
-       Truncate the pixel value, like the display engine does.
-       (window-screen-lines): Use window-inside-pixel-edges for
-       determining the window height in pixels.  (Bug#18195)
+2014-07-29  Martin Rudalics  <rudalics@gmx.at>
 
-2014-07-29  Eli Zaretskii  <eliz@gnu.org>
+       * window.el (window--state-put-2): Handle horizontal scroll
+       bars, if present.
 
-       * tutorial.el (tutorial--display-changes): Accept punctuation
-       characters before the key binding.  (Bug#18146)
+2014-07-29  Rüdiger Sonderfeld  <ruediger@c-plusplus.de>
 
-2014-07-28  Stephen Berman  <stephen.berman@gmx.net>
+       * menu-bar.el (menu-bar-update-buffers): Update item list format
+       in `buffers-menu' to confirm with changes to `get_keyelt'
+       (r117463).  (Bug#18016)
 
-       * doc-view.el (doc-view-open-text): Don't require that the
-       document is saved in a file (e.g., email attachment).
+2014-07-28  Fabián Ezequiel Gallina  <fgallina@gnu.org>
 
-2014-07-27  Eli Zaretskii  <eliz@gnu.org>
+       * progmodes/python.el (inferior-python-mode): Make input prompts
+       read-only.
+
+2014-07-28  Emilio C. Lopes  <eclig@gmx.net>
+
+       * net/tramp-sh.el (tramp-get-remote-python): Also search for
+       executables named "python2" or "python3".
+       (tramp-get-remote-uid-with-python): Use parentheses around
+       arguments to `print' to make it compatible with Python 3.
+       (tramp-get-remote-gid-with-python): Ditto.  (Bug#18118)
+
+2014-07-28  Eli Zaretskii  <eliz@gnu.org>
 
        * window.el (window--pixel-to-total): Use FRAME's root window, not
        that of the selected frame.  (Bug#18112, Bug#16674)
 
-2014-07-27  Andreas Schwab  <schwab@linux-m68k.org>
+2014-07-28  Andreas Schwab  <schwab@linux-m68k.org>
 
        * textmodes/tex-mode.el (tex-font-lock-verb): Doc fix.
        (Bug#18117)
 
-2014-07-27  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+2014-07-28  Fabián Ezequiel Gallina  <fgallina@gnu.org>
 
        * progmodes/python.el (inferior-python-mode): Doc fix.
 
-2014-07-25  Stephen Berman  <stephen.berman@gmx.net>
+2014-07-28  Stephen Berman  <stephen.berman@gmx.net>
 
        * calendar/todo-mode.el (todo-edit-item--next-key): If next key is
        not a character, ignore it instead of raising an error.
 
-2014-07-25  Stephen Berman  <stephen.berman@gmx.net>
-
        * calendar/todo-mode.el: Fix handling of marked items and make
        minor code improvements.
        (todo-edit-item): If there are marked items, ensure user can only
        (todo-edit-item--header, todo-edit-item--diary-inclusion)
        (todo-item-done): Use it.
 
-2014-07-25  Glenn Morris  <rgm@gnu.org>
+2014-07-28  Glenn Morris  <rgm@gnu.org>
 
        * files.el (toggle-read-only): Re-add basic doc-string.
        * vc/vc-hooks.el (vc-toggle-read-only): Tweak obsolescence mesage.
        Replace missing `switch-to-prolog' with `run-prolog'.
        (switch-to-prolog): Define as (obsolete) alias, as in 23.4.
 
-2014-07-22  Stephen Berman  <stephen.berman@gmx.net>
+2014-07-28  Stephen Berman  <stephen.berman@gmx.net>
 
        * calendar/todo-mode.el (todo-set-top-priorities): Fix overwriting
        of file-wide setting when changing category-wide setting.
 
+2014-07-28  Stephen Berman  <stephen.berman@gmx.net>
+
+       * doc-view.el (doc-view-open-text): Don't require that the
+       document is saved in a file (e.g., email attachment).
+
+2014-07-28  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+
+       Parse completion input in a iPython friendly way.  (Bug#18084)
+       * progmodes/python.el
+       (python-shell-completion-at-point): Rename from
+       python-shell-completion-complete-at-point.
+       (inferior-python-mode): Use it.
+       (python-completion-at-point): Rename from
+       python-completion-complete-at-point.  Parse input up to first
+       backward occurrence of whitespace, open-paren, close-paren or
+       string delimiter.
+       (python-mode): Use it.
+
+2014-07-28  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+
+       Prevent Python process shell buffer to pop twice.
+       * progmodes/python.el (python-shell-switch-to-shell): Do not call
+       pop-to-buffer.
+
+2014-07-28  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+
+       * progmodes/python.el
+       (python-shell-with-shell-buffer): New macro.
+       (python-shell-font-lock-get-or-create-buffer)
+       (python-shell-font-lock-kill-buffer)
+       (python-shell-font-lock-with-font-lock-buffer)
+       (python-shell-font-lock-cleanup-buffer)
+       (python-shell-font-lock-toggle): Use it.
+       (python-shell-font-lock-turn-on)
+       (python-shell-font-lock-turn-off): Use it.  Make command.
+
+2014-07-28  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+
+       Grab all Python process output before inferior-python-mode hooks.
+       * progmodes/python.el (inferior-python-mode):
+       Call accept-process-output and sit-for to ensure all output for process
+       has been received before running hooks.
+       (python-shell-internal-get-or-create-process):
+       Cleanup accept-process-output and sit-for calls.
+
+2014-07-28  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+
+       More robust shell startup and code setup.
+       * progmodes/python.el (python-shell-make-comint):
+       Remove accept-process-output call.
+       (python-shell-get-buffer): Return current buffer if major-mode is
+       inferior-python-mode.
+       (python-shell-get-or-create-process): Use it.
+       (python-shell-send-setup-code): Send all setup code in one string,
+       output success message and accept-process-output.
+
+2014-07-27  Eli Zaretskii  <eliz@gnu.org>
+
+       * scroll-bar.el (scroll-bar-toolkit-horizontal-scroll):
+       Add rudimentary support for bidirectional text.
+
+2014-07-27  Martin Rudalics  <rudalics@gmx.at>
+
+       * frame.el (frame-notice-user-settings): Rewrite using
+       frame-initial-frame-tool-bar-height.
+       * menu-bar.el (menu-bar-horizontal-scroll-bar)
+       (menu-bar-no-horizontal-scroll-bar): New functions.
+       (menu-bar-showhide-scroll-bar-menu): Add bindings for horizontal
+       scroll bars.
+       * scroll-bar.el (scroll-bar-lines)
+       (set-horizontal-scroll-bar-mode)
+       (get-horizontal-scroll-bar-mode, horizontal-scroll-bar-mode)
+       (scroll-bar-horizontal-drag-1, scroll-bar-horizontal-drag)
+       (scroll-bar-toolkit-horizontal-scroll): New functions.
+       (horizontal-scroll-bar-mode)
+       (previous-horizontal-scroll-bar-mode)
+       (horizontal-scroll-bar-mode-explicit): New variables.
+       (horizontal-scroll-bar-mode): New option.
+       (toggle-horizontal-scroll-bar): Do something.
+       (top-level): Bind horizontal-scroll-bar mouse-1.
+       * startup.el (tool-bar-originally-present): Remove variable.
+       (command-line): Don't set tool-bar-originally-present.
+       * window.el (window-min-height): Update doc-string.
+       (window--dump-frame): Dump horizontal scroll bar values.
+       (window--min-size-1): Handle minibuffer window separately.
+       Count in margins and horizontal scroll bar.  Return safe value
+       iff IGNORE equals 'safe.
+       (frame-windows-min-size): New function (used by frame resizing
+       routines).
+       (fit-frame-to-buffer, fit-window-to-buffer): Count in horizontal
+       scroll bars.
+       (window--sanitize-window-sizes): New function.
+       (window-split-min-size): Remove.
+       (split-window): Count divider-width.  Don't use
+       `window-split-min-size' any more.  Reword error messages.
+       Sanitize windows sizes after splitting.
+
+2014-07-27  Thien-Thi Nguyen  <ttn@gnu.org>
+
+       Use `defvar-local' more.
+       * progmodes/hideshow.el
+       (hs-c-start-regexp, hs-block-start-regexp)
+       (hs-block-start-mdata-select, hs-block-end-regexp)
+       (hs-forward-sexp-func, hs-adjust-block-beginning): ...here;
+       remove corresponding `make-variable-buffer-local' top-level calls.
+
+2014-07-27  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+
+       Cleanup error signals.  (Bug#18067)
+       * progmodes/python.el
+       (python-indent-shift-left): Use user-error instead.
+       (python-shell-prompt-detect): Use lwarn with python group.
+       (python-completion-complete-at-point)
+       (python-eldoc--get-doc-at-point): Don't signal error.
+
+2014-07-27  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+
+       Support for packages in Python shell.  (Bug#13570)
+       * progmodes/python.el (python-shell--package-depth): New var.
+       (python-shell-package-enable): New command.
+       (python-util-list-directories, python-util-list-files)
+       (python-util-list-packages): New functions.
+
+2014-07-27  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+
+       Faster comint output.  (Bug#16875)
+       * progmodes/python.el:
+       (python-comint-output-filter-function): Make obsolete.
+       (python-comint-postoutput-scroll-to-bottom): New function.
+       (inferior-python-mode): Set comint-output-filter-functions to a
+       minimum.
+
+2014-07-27  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+
+       * progmodes/python.el (python-shell-font-lock-post-command-hook):
+       Safeguard current point and undo history.
+
+2014-07-26  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+
+       Robust shell syntax highlighting.  (Bug#18084, Bug#16875)
+       * progmodes/python.el:
+       (python-shell-prompt-input-regexps): Add iPython block prompt.
+       (python-shell-output-syntax-table): Delete var.
+       (python-shell-font-lock-with-font-lock-buffer): New macro.
+       (python-shell-font-lock-get-or-create-buffer)
+       (python-shell-font-lock-kill-buffer)
+       (python-shell-font-lock-cleanup-buffer)
+       (python-shell-font-lock-post-command-hook)
+       (python-shell-font-lock-turn-off): New functions.
+       (python-shell-font-lock-turn-on): New function.
+       (inferior-python-mode): Use it.
+       (python-shell-font-lock-toggle): New command.
+       (python-shell-font-lock-enable): Rename from
+       python-shell-enable-font-lock.
+       (run-python-internal): Use it.
+       (python-shell-font-lock-comint-output-filter-function): New function.
+       (python-shell-comint-end-of-output-p): New function.
+       (python-shell-output-filter): Use it.
+       (python-util-comint-last-prompt): New function.
+       (python-util-text-properties-replace-name): New function.
+
+2014-07-25  Glenn Morris  <rgm@gnu.org>
+
+       * vc/ediff-init.el (ediff-toggle-read-only-function):
+       * vc/ediff-util.el (ediff-toggle-read-only):
+       Replace obsolete toggle-read-only with read-only-mode.
+
+2014-07-24  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp-cache.el (tramp-flush-file-function): Wrap the code
+       with `save-match-data'.  (Bug#18095)
+
+2014-07-21  Vincent Belaïche  <vincentb1@users.sourceforge.net>
+
+       * ses.el (ses-truncate-cell): Use cl-progv instead of eval in
+       order to ensure that row and col are lexically bound inside the
+       evaluated sexp.
+
 2014-07-21  Glenn Morris  <rgm@gnu.org>
 
        * progmodes/hideif.el (hide-ifdef-mode-submap):
        * progmodes/hideif.el (hide-ifdef-toggle-outside-read-only):
        Doc fixes re toggle-read-only.
 
-2014-07-20  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+2014-07-21  Fabián Ezequiel Gallina  <fgallina@gnu.org>
 
        * progmodes/python.el: Add comment about pipe buffering and
        solutions for missing/delayed output in inferior Python shells.
        (Bug#17304)
 
-2014-07-20  Fabián Ezequiel Gallina  <fgallina@gnu.org>
-
        * progmodes/python.el (python-mode): Don't set
        mode-require-final-newline.  (Bug#17990)
 
-2014-07-20  Fabián Ezequiel Gallina  <fgallina@gnu.org>
-
        Make python.el work with IPython automatically.  (Bug#15510)
        * progmodes/python.el:
        (python-shell-completion-setup-code): New value supporting iPython.
        (python-shell-prompt-output-regexps): Add safeguard for ipdb.
        (python-shell-output-filter): Fix comment typo.
 
-2014-07-19  Fabián Ezequiel Gallina  <fgallina@gnu.org>
-
        Fix Python shell prompts detection for remote hosts.
        * progmodes/python.el (python-shell-prompt-detect):
        Replace call-process with process-file and make it more robust.
 
-2014-07-17  Fabián Ezequiel Gallina  <fgallina@gnu.org>
-
        Autodetect Python shell prompts.  (Bug#17370)
        * progmodes/python.el:
        (python-shell-interpreter-interactive-arg)
        (python-shell-prompt-detect)
        (python-shell-prompt-validate-regexps): New functions.
        (python-shell-prompt-set-calculated-regexps): New function.
-       (inferior-python-mode): Use it.  Also honor overridden
+       (inferior-python-mode): Use it.  Also honor overriden
        python-shell-interpreter and python-shell-interpreter-args.
-       (python-shell-make-comint): Honor overridden
+       (python-shell-make-comint): Honor overriden
        python-shell-interpreter and python-shell-interpreter-args.
        (python-shell-get-or-create-process): Make it testable by allowing
        to call run-python non-interactively.
        (python-shell-prompt-output-regexp)
        (python-shell-prompt-pdb-regexp): Use it as defcustom :safe.
 
+2014-07-21  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * emacs-lisp/smie.el (smie-config--guess-1): Split from
+       smie-config--guess.
+       (smie-config--guess): Use it.
+
+       * emacs-lisp/edebug.el: Use nadvice.
+       (edebug-original-read): Remove.
+       (edebug--read): Rename from edebug-read and add `orig' arg.
+       (edebug-uninstall-read-eval-functions)
+       (edebug-install-read-eval-functions): Use nadvice.
+       (edebug-read-sexp, edebug-read-storing-offsets, edebug-read-symbol)
+       (edebug-read-and-maybe-wrap-form1, edebug-instrument-callee)
+       (edebug-read-string, edebug-read-function): Use just `read'.
+       (edebug-original-debug-on-entry): Remove.
+       (edebug--debug-on-entry): Rename from edebug-debug-on-entry and add
+       `orig' arg.
+       (debug-on-entry): Override with nadvice.
+
+       * mouse.el (tear-off-window): Rename from mouse-tear-off-window since
+       it also makes sense to bind it to a non-mouse event.
+
+       * vc/vc-bzr.el (vc-bzr-shelve): Make it operate on fileset.
+
+2014-07-19  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * xt-mouse.el (xterm-mouse-event): Don't assume last-click is non-nil
+       (bug#18015).
+
+       * rect.el (rectangle--string-preview): Don't assume there
+       a non-nil default (bug#17984).
+
 2014-07-16  Glenn Morris  <rgm@gnu.org>
 
        * desktop.el (after-init-hook): Disable startup frame restoration
        in non-graphical situations.  (Bug#17693)
 
-2014-07-14  Glenn Morris  <rgm@gnu.org>
-
        * vc/vc-dispatcher.el (vc-log-edit): Do set up the log buffer
        if it was "empty", or used for a different set of files.  (Bug#17884)
 
-2014-07-13  Eli Zaretskii  <eliz@gnu.org>
+2014-07-16  Eli Zaretskii  <eliz@gnu.org>
 
        * bindings.el (mode-line-remote): If default-directory is not a
        string, don't call file-remote-p on it; instead state in the
        help-echo that it is nil.  (Bug#17986)
 
+2014-07-14  Daniel Colascione  <dancol@dancol.org>
+
+       * progmodes/cc-langs.el: Change comments from `cl-macroexpand-all'
+       to `macroexpand-all'
+
+       * progmodes/cc-defs.el (c-lang-defconst-eval-immediately):
+       Use `macroexpand-all' instead of `cl-macroexpand-all'.
+
 2014-07-12  Paul Eggert  <eggert@cs.ucla.edu>
 
        Fix bug: C-x v v discarded existing log message (Bug#17884).
        * vc/vc-dispatcher.el (vc-log-edit):
        Don't clobber an already-existing log message.
 
-2014-07-10  Glenn Morris  <rgm@gnu.org>
+2014-07-12  Glenn Morris  <rgm@gnu.org>
 
        * vc/log-edit.el (log-edit-changelog-entries):
        Check for a visited-but-never-saved ChangeLog.
 
-2014-07-09  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-07-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * vc/log-edit.el (log-edit-changelog-entries): Don't both visiting
        a non-existing file (bug#17970).
        * faces.el (face-name): Undo last change.
        (x-resolve-font-name): Don't call face-name (bug#17956).
 
-2014-07-09  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+2014-07-12  Fabián Ezequiel Gallina  <fgallina@gnu.org>
 
        Fix dedenters and electric colon handling. (Bug#15163)
-
        * progmodes/python.el
        (python-rx-constituents): Add dedenter and block-ender.
        (python-indent-dedenters, python-indent-block-enders): Delete.
        (python-info-dedenter-opening-block-positions)
        (python-info-dedenter-statement-p): New functions.
 
-2014-07-08  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-07-11  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * files.el (out-of-memory-warning-percentage): New defcustom.
+       (warn-maybe-out-of-memory): Use it.
+
+2014-07-11  Michael Albinus  <michael.albinus@gmx.de>
+
+       * subr.el (read-passwd): Use `read-hide-char' if non-nil.  Bind it
+       when calling `read-string'.  (Bug#17839)
+
+2014-07-10  Eli Zaretskii  <eliz@gnu.org>
+
+       * files.el (warn-maybe-out-of-memory): Fix the wording of the
+       warning.
+
+2014-07-10  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * files.el (warn-maybe-out-of-memory): New function.
+       (find-file-noselect): Use it.
+
+2014-07-09  Sam Steingold  <sds@gnu.org>
+
+       * progmodes/cperl-mode.el (cperl-block-p): Treat the perl keyword
+       `constant' like `bless', `return' &c
+
+2014-07-09  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * rect.el (apply-on-rectangle): Check forward-line really moved to the
+       next line.
+
+2014-07-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * progmodes/sh-script.el (sh-smie-sh-rules): Don't align with a && in
        the middle of a line (bug#17896).
 
-2014-07-08  Juri Linkov  <juri@jurta.org>
+2014-07-09  Juri Linkov  <juri@jurta.org>
 
        * startup.el (command-line): Append displaying the warning about
        the errors in the init file to the end of `after-init-hook'.
        (Bug#17927)
 
-2014-07-08  Juri Linkov  <juri@jurta.org>
-
-       * faces.el (face-name): Return input arg `face' as is
+       * faces.el (face-name): Return input arg `face' as-is
        when it's not a symbol.
        (x-resolve-font-name): Don't check if the face is a symbol.
        (Bug#17956)
 
-2014-07-08  Juri Linkov  <juri@jurta.org>
-
        * facemenu.el (list-colors-print): In help-echo format use %.2f
        instead of %d because now HSV values are floating-point components
        between 0.0 and 1.0.
 
-2014-07-06  Glenn Morris  <rgm@gnu.org>
+2014-07-09  Glenn Morris  <rgm@gnu.org>
 
        * emulation/cua-rect.el (cua--activate-rectangle):
        Avoid setting cua--rectangle to nil.  (Bug#17877)
 
-2014-07-06  Stephen Berman  <stephen.berman@gmx.net>
+2014-07-09  Stephen Berman  <stephen.berman@gmx.net>
 
        * calendar/todo-mode.el: Fix wrong-type-argument error when
        marking multiple consecutive items.
        (todo-mark-category): Don't try to mark the empty line between the
        todo and done items sections.
 
-2014-07-05  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-07-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/edebug.el (edebug-eval-defun): Print result using
        proper Lisp quoting (bug#17934).
        * progmodes/ruby-mode.el (ruby-mode-variables): Don't meddle with
        require-final-newline since prog-mode already took care of it (bug#17947).
 
-2014-07-04  Stephen Berman  <stephen.berman@gmx.net>
+2014-07-09  Stephen Berman  <stephen.berman@gmx.net>
 
        * calendar/todo-mode.el: Fix two bugs.  Shorten Commentary and
        refer to the Todo mode Info manual.  Update the comment on
        (todo-filter-items): Reorder a let-bound variable to avoid a
        wrong-type-argument error on canceling the file choice dialog.
 
-2014-07-04  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-07-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * progmodes/octave.el (inferior-octave-mode):
        Set comint-input-ring-size to a number (bug#17912).
 
-2014-07-03  Juri Linkov  <juri@jurta.org>
+2014-07-09  Juri Linkov  <juri@jurta.org>
 
        * desktop.el (desktop-minor-mode-table): Add `defining-kbd-macro'
        and `isearch-mode' associated with nil.  (Bug#17849)
 
-2014-07-02  Juri Linkov  <juri@jurta.org>
+2014-07-08  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * linum.el (linum--face-height): New function (bug#17813).
+       (linum-update-window): Use it to adjust margin to linum's width.
+
+       * leim/quail/sisheng.el (sisheng-list): Don't bother with-case-table.
+       * eshell/em-smart.el (eshell-smart-scroll-window):
+       Use with-selected-window.
+
+       * xt-mouse.el (xterm-mouse-translate-1): Intern drag event (bug#17894).
+       Remove also pointless window&mark manipulation.
+
+       * progmodes/perl-mode.el: Use syntax-ppss; fix one indentation case.
+       (perl-indent-line): Use syntax-ppss to detect we're in a doc-section.
+       (perl-continuation-line-p): Don't skip over anything else than labels.
+       Return the previous char.
+       (perl-calculate-indent): Use syntax-ppss instead of parse-start
+       and update callers accordingly.  For continuation lines, check the
+       the case of array hashes.
+       (perl-backward-to-noncomment): Make it non-interactive.
+       (perl-backward-to-start-of-continued-exp): Rewrite.
+
+2014-07-08  Sam Steingold  <sds@gnu.org>
+
+       * progmodes/inf-lisp.el (lisp-eval-paragraph, lisp-eval-form-and-next):
+       New user commands.
+
+2014-07-08  Juri Linkov  <juri@jurta.org>
+
+       * vc/vc-annotate.el (vc-annotate-background-mode): New defcustom.
+       (vc-annotate-color-map): Use less saturated colors (20%) for
+       background-mode.
+       (vc-annotate-very-old-color): Add default value for background-mode.
+       (vc-annotate-background): Set default value to nil since now text on
+       the default backgrounds should be legible in light and dark modes.
+       (vc-annotate-lines): Use `vc-annotate-background-mode'.  Doc fix.
+       (Bug#17808)
+
+2014-07-08  Juri Linkov  <juri@jurta.org>
+
+       * simple.el (transpose-chars): Don't move point into read-only area.
+       (Bug#17829)
+
+2014-07-08  Juri Linkov  <juri@jurta.org>
+
+       * window.el (with-displayed-buffer-window): New macro.
+       (with-temp-buffer-window, with-current-buffer-window):
+       Use `macroexp-let2' to evaluate and bind variables
+       in the same order as macro arguments.
+       (display-buffer--action-function-custom-type):
+       Add `display-buffer-below-selected' and `display-buffer-at-bottom'.
+
+       * minibuffer.el (minibuffer-completion-help): Replace
+       `with-output-to-temp-buffer' with `with-displayed-buffer-window'
+       with actions that display *Completions* at-bottom when called
+       from the minibuffer, or below-selected in a normal buffer.
+       Associate `window-height' with `fit-window-to-buffer'.
+       Let-bind `pop-up-windows' to nil.
+
+       * dired.el (dired-mark-pop-up): Use `with-displayed-buffer-window'
+       instead of `with-current-buffer-window'.  (Bug#17809)
+
+2014-07-07  Luke Lee  <luke.yx.lee@gmail.com>
+
+       * progmodes/hideif.el (hide-ifdef-env): Change to global.
+       (hide-ifdef-env-backup): New variable.
+       (hide-ifdef-expand-reinclusion-protection, hide-ifdef-header-regexp):
+       New customizable variables.
+       (hif-clear-all-ifdef-defined): New defun.
+       (hif-merge-ifdef-region, hide-ifdef-region-internal, hide-ifdef-region)
+       (hif-show-ifdef-region): Merge hidden regions to prevent continuous "...".
+       (hif-tokenize): Fix for MS-DOS/Win EOL style.
+       (hif-endif-to-ifdef, hif-make-range, hif-find-range, hif-possibly-hide):
+       Fix bug to hide the correct #elif region(s).
+       (hif-range-elif): New defun.
+       (hif-recurse-level): New var.
+       (hif-evaluate-region, hif-evaluate-macro): New defun.
+       (hide-ifdef-guts): Prevent reinclusion protected C/C++ headers from
+       fully hidden.
+       (hide-ifdef-define, hide-ifdefs, hide-ifdef-block, show-ifdef-block):
+       Better interaction.
+
+2014-07-04  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/dbus.el (dbus-peer-handler): New defun.
+       (dbus-register-service): Register it.  (Bug#17858)
+       (dbus-managed-objects-handler): Fix docstring.
+
+2014-07-04  Phil Sainty  <psainty@orcon.net.nz>
+
+       * emacs-lisp/lisp.el (narrow-to-defun-include-comments): New var.
+       (narrow-to-defun): New arg include-comments, defaulting to it
+       (bug#16328).
+
+2014-07-03  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * rect.el (rectangle--highlight-for-redisplay): Don't pass `orig' with
+       different calling convention to rectangle--unhighlight-for-redisplay.
+
+2014-07-03  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp.el (tramp-call-process): Handle error strings.
+
+       * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'.
+
+       * net/tramp-sh.el (tramp-sh-handle-set-visited-file-modtime)
+       (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'.
+
+       * net/trampver.el: Update release number.
+
+2014-07-03  Juri Linkov  <juri@jurta.org>
 
        * desktop.el (desktop-save): Rename arg `auto-save' to
        `only-if-changed'.  Doc fix.  (Bug#17873)
 
-2014-07-02  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-07-03  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * mouse.el (mouse-yank-primary, mouse-yank-secondary):
        Use insert-for-yank (bug#17271).
 
-2014-07-02  Leo Liu  <sdl.web@gmail.com>
+2014-07-03  Leo Liu  <sdl.web@gmail.com>
 
        * emacs-lisp/pp.el (pp-eval-expression, pp-eval-last-sexp):
        Support lexical-binding.
 
-2014-07-01  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-07-03  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * vc/log-edit.el (log-edit-goto-eoh): New function.
        (log-edit--match-first-line): Use it (bug#17861).
 
-2014-07-01  Glenn Morris  <rgm@gnu.org>
+2014-07-03  Glenn Morris  <rgm@gnu.org>
 
        * vc/log-edit.el (log-edit-hook): Add missing :version.
 
-2014-07-01  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+2014-07-03  Fabián Ezequiel Gallina  <fgallina@gnu.org>
 
        * progmodes/python.el (python-indent-post-self-insert-function):
        Enhancements to electric indentation behavior inside
        parens. (Bug#17658)
 
-2014-07-01  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-07-03  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * ps-def.el (ps-generate-postscript-with-faces1): Don't mess with
        buffer-invisibility-spec (bug#17867).
 
-2014-06-29  Andreas Schwab  <schwab@linux-m68k.org>
+2014-07-03  Andreas Schwab  <schwab@linux-m68k.org>
 
        * vc/vc-git.el (vc-git-checkin): When operating on the whole tree
        pass "-a".
 
-2014-06-29  Glenn Morris  <rgm@gnu.org>
+2014-07-03  Glenn Morris  <rgm@gnu.org>
 
        * cus-edit.el (help):
        * finder.el (finder-known-keywords):
        * progmodes/idlwave.el (idlwave): Update url-link for custom group.
        (idlwave-mode): Doc URL update.
 
-2014-06-27  Stephen Berman  <stephen.berman@gmx.net>
+2014-07-01  Juri Linkov  <juri@jurta.org>
+
+       * man.el: Display man pages immediately and use process-filter
+       to format them asynchronously.
+       (Man-width): Doc fix.
+       (man): Doc fix.
+       (Man-start-calling): Use `with-selected-window' to get
+       `frame-width' and `window-width'.
+       (Man-getpage-in-background): Call `Man-notify-when-ready'
+       immediately after creating a new buffer.  Call `Man-mode' and set
+       `mode-line-process' in the created buffer.  Set process-filter to
+       `Man-bgproc-filter' in start-process branch.  In call-process branch
+       call either `Man-fontify-manpage' or `Man-cleanup-manpage'.
+       Use `Man-start-calling' inside `with-current-buffer'.
+       (Man-fontify-manpage): Don't print messages.  Fix boundary condition.
+       (Man-cleanup-manpage): Don't print messages.
+       (Man-bgproc-filter): New function.
+       (Man-bgproc-sentinel): Add `save-excursion' to keep point when
+       user moved it during asynchronous formatting.  Move calls of
+       `Man-fontify-manpage' and `Man-cleanup-manpage' to
+       `Man-bgproc-filter'.  Move the call of `Man-mode' to
+       `Man-getpage-in-background'.  Use `quit-restore-window'
+       instead of `kill-buffer'.  Use `message' instead of `error'
+       because errors are caught by process sentinel.
+       (Man-mode): Move calls of `Man-build-page-list',
+       `Man-strip-page-headers', `Man-unindent', `Man-goto-page' to
+       `Man-bgproc-sentinel'.  Doc fix.  (Bug#2588, bug#5054, bug#9084, bug#17831)
+
+       * man.el (Man-bgproc-sentinel): Use `Man-page-from-arguments'
+       for the message about the man page cleaned up.
+
+2014-07-01  Mario Lang  <mlang@delysid.org>
+
+       * net/gnutls.el (gnutls-negotiate): Prevent destructive modification of
+       cosutomization option `gnutls-verify-error'.
+
+2014-07-01  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * simple.el (deactivate-mark, set-mark-command, handle-shift-selection):
+       Don't keep transient-mark-mode buffer-local when not needed (bug#6316).
+
+       * xt-mouse.el (turn-on-xterm-mouse-tracking-on-terminal)
+       (turn-off-xterm-mouse-tracking-on-terminal): Don't burp if the terminal
+       is suspended (bug#17857).
+
+2014-07-01  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
+       Prefer utf-8 coding.  (Bug#17859)
+
+2014-06-30  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+
+       * emacs-lisp/subr-x.el (string-reverse): Define as obsolete alias
+       for `reverse'.
+
+2014-06-30  Glenn Morris  <rgm@gnu.org>
+
+       * emacs-lisp/autoload.el (autoload-ensure-writable): New variable.
+       (autoload-ensure-default-file): Maybe make existing output writable.
+       * Makefile.in (AUTOGEN_VCS): Remove.
+       (autoloads): Use autoload-ensure-writable rather than AUTOGEN_VCS.
+
+2014-06-30  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+
+       * emacs-lisp/subr-x.el (string-reverse): Use `reverse'.
+
+2014-06-30  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+
+       New if-let, when-let, thread-first and thread-last macros.
+
+       * emacs-lisp/subr-x.el
+       (internal--listify, internal--check-binding)
+       (internal--build-binding-value-form, internal--build-binding)
+       (internal--build-bindings): New functions.
+       (internal--thread-argument, thread-first, thread-last)
+       (if-let, when-let): New macros.
+
+2014-06-30  Grégoire Jadi  <daimrod@gmail.com>
+
+       * net/rcirc.el (rcirc-buffer-process): Restore previous
+       behaviour.  (Bug#17772)
+
+2014-06-29  Alan Mackenzie  <acm@muc.de>
+
+       Don't call c-parse-state when c++-template-syntax-table is active.
+       * progmodes/cc-engine.el (c-guess-continued-construct CASE G)
+       (c-guess-basic-syntax CASE 5D.3): Rearrange so that
+       c-syntactic-skip-backwards isn't called with the pertinent syntax table.
+
+2014-06-28  Stephen Berman  <stephen.berman@gmx.net>
 
        * calendar/todo-mode.el (todo-set-top-priorities): Fix logic to
        account for file-wide setting of todo-top-priorities-overrides.
        Make code a bit cleaner.
 
-2014-06-27  Leo Liu  <sdl.web@gmail.com>
-
-       * calc/calc.el (math-bignum): Handle most-negative-fixnum.  (Bug#17556)
-
-2014-06-27  Glenn Morris  <rgm@gnu.org>
+2014-06-28  Glenn Morris  <rgm@gnu.org>
 
        * net/eww.el (eww-mode) <eww-current-title>: Make local.  (Bug#17860)
 
-2014-06-26  Stephen Berman  <stephen.berman@gmx.net>
+2014-06-28  Stephen Berman  <stephen.berman@gmx.net>
 
        * calendar/todo-mode.el (todo-prefix-overlays): If there is no
        category-wide setting of todo-top-priorities-overrides, check for
        a file-wide setting and fontify accordingly.
 
-2014-06-26  Glenn Morris  <rgm@gnu.org>
+2014-06-28  Glenn Morris  <rgm@gnu.org>
 
        * subr.el (read-passwd): Warn about batch mode.  (Bug#17839)
 
+2014-06-28  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * progmodes/hideif.el: Use lexical-binding.  Fix up cl-lib usage.
+
+2014-06-28  K. Handa  <handa@gnu.org>
+
+       Fix Bug#17739.
+
+       * composite.el: Setup composition-function-table for dotted circle.
+       (compose-gstring-for-dotted-circle): New function.
+
+       * international/characters.el: Add category "^" to all
+       non-spacing characters.
+
+2014-06-28  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (doit): Remove force rule.
+       (custom-deps, finder-data, autoloads, update-subdirs)
+       (compile-one-process): PHONY targets do not need force rules.
+
+       * Makefile.in (compile-main, compile, compile-always):
+       No need to explicitly pass variables to ourself in recursive calls.
+
+2014-06-28  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * files.el (minibuffer-with-setup-hook): Evaluate the first arg eagerly.
+
+2014-06-26  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (update-authors): Update for moved authors.el.
+
+2014-06-26  Leo Liu  <sdl.web@gmail.com>
+
+       * skeleton.el (skeleton-end-hook): Default to nil and move the
+       work to skeleton-insert.  (Bug#17850)
+
+2014-06-26  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * calc/calc-alg.el (math-beforep):
+       * progmodes/cc-guess.el (c-guess-view-reorder-offsets-alist-in-style):
+       Simplify because string-lessp can accept symbols as args.
+
 2014-06-26  Daiki Ueno  <ueno@gnu.org>
 
        * emacs-lisp/package.el (package--check-signature):
        If package-check-signature is allow-unsigned, don't signal error when
        we can't verify signature because of missing public key
-       (backport for bug#17625).
+       (bug#17625).
 
 2014-06-26  Glenn Morris  <rgm@gnu.org>
 
        * emacs-lisp/authors.el (authors-valid-file-names)
        (authors-renamed-files-alist): Additions.
 
-2014-06-25  Leo Liu  <sdl.web@gmail.com>
+2014-06-26  Leo Liu  <sdl.web@gmail.com>
 
        * textmodes/picture.el (picture-set-tab-stops):
        * ruler-mode.el (ruler-mode-mouse-add-tab-stop)
 
        * indent.el (indent-accumulate-tab-stops): New function.
 
-2014-06-25  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-06-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/package.el (package-list-unsigned): New var (bug#17625).
        (package-desc-status): Obey it.
 
-2014-06-25  Stephen Berman  <stephen.berman@gmx.net>
+2014-06-26  Stephen Berman  <stephen.berman@gmx.net>
 
        * calendar/todo-mode.el: Fix two bugs.
        (todo-insert-item--basic): If user cancels item insertion to
        (todo-set-item-priority): After selecting category, instead of
        moving point to top, which extends an active region, restore it.
 
-2014-06-25  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-06-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * help-fns.el (describe-function-1): Check file-name is a string before
        calling help-fns--autoloaded-p (bug#17564).
 
-2014-06-24  Juri Linkov  <juri@jurta.org>
+2014-06-26  Juri Linkov  <juri@jurta.org>
 
        * desktop.el (desktop-auto-save-enable)
        (desktop-auto-save-disable): New functions.
        (desktop-read): Disable the autosave before loading the desktop,
        and enable afterwards.  (Bug#17351)
 
-2014-06-24  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-06-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        Fix some indentation problem with \; and pipes (bug#17842).
        * progmodes/sh-script.el (sh-mode-syntax-table): Set syntax of ;|&.
        (sh-smie-rc-forward-token, sh-smie-rc-backward-token): Use them.
        (sh-smie-sh-rules): Fix indentation of a pipe at BOL.
 
-2014-06-24  Eli Zaretskii  <eliz@gnu.org>
+2014-06-26  Glenn Morris  <rgm@gnu.org>
 
-       * international/fontset.el (script-representative-chars):
-       Add representative characters for scripts added in Unicode 7.0.
-       (otf-script-alist): Synchronize with the latest registry of OTF
-       script tags.
+       * emacs-lisp/find-func.el (find-function-C-source-directory):
+       Use file-accessible-directory-p.
+
+       * ps-samp.el: Make it slightly less awful.
+       (ps-rmail-mode-hook, ps-gnus-article-prepare-hook, ps-vm-mode-hook):
+       (ps-gnus-summary-setup, ps-info-mode-hook): Use [print] key.
+       Only set local values.
+       (ps-article-subject, ps-article-author): Use standard functions
+       like mail-fetch-field.
+       (ps-info-file, ps-info-node): Use match-string.
+       (ps-jts-ps-setup, ps-jack-setup): Remove, merging into...
+       (ps-samp-ps-setup): ... new function.
+
+       * progmodes/idlw-shell.el (idlwave-shell-make-temp-file):
+       Optimize away code unneeded on any modern Emacs.
+
+       * emacs-lisp/authors.el: Move to ../admin.
+
+       * emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit): New.
+
+2014-06-26  Luke Lee  <luke.yx.lee@gmail.com>
+
+       * progmodes/hideif.el (hif-string-to-number): Fix return value bug.
+       (hif-simple-token-only, hif-tokenize): Comment in detail mainly for
+       performance enhancements.
+       (hif-parse-if-exp): Rename to `hif-parse-exp'.  Enhance for macro
+       expansion.
+       (hif-factor, hif-string-concatenation, intern-safe): Support string
+       concatenation and argumented macro expansion.
+       (hif-if-valid-identifier-p, hif-define-operator, hif-flatten)
+       (hif-expand-token-list, hif-get-argument-list, hif-define-macro)
+       (hif-delimit, hif-macro-supply-arguments, hif-invoke, hif-canonicalize)
+       (hif-canonicalize-tokens, hif-place-macro-invocation)
+       (hif-parse-macro-arglist): Mostly new functions for supporting
+       argumented macro expansion.
+       (hif-string-concatenation, hif-stringify, hif-token-concat)
+       (hif-token-stringification, hif-token-concatenation):
+       Stringification and concatenation.
+       (hif-find-next-relevant): Fix comments.
+       (hif-ifdef-to-endif, hif-looking-at-elif, hif-hide-line): Bug fix for
+       some cases involving #elif.
+       (hif-find-define, hif-add-new-defines): New functions for automatically
+       scanning of defined symbols.
+       (hide-ifdef-guts): Fix for defined symbol auto scanning.
+       (hide-ifdef-undef): Fix behavior to match CPP.
+
+2014-06-25  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in ($(lisp)/progmodes/cc-defs.elc)
+       ($(lisp)/progmodes/cc-fonts.elc, $(lisp)/progmodes/cc-langs.elc)
+       ($(lisp)/progmodes/cc-vars.elc): Drop hand-written deps on non-cc
+       files.  They are not relevant to the original issue (bug#1004),
+       and cause unnecessary recompilation (bug#2151).
 
-       * international/characters.el (char-script-table): Update for
-       scripts added and codepoint ranges changed in Unicode 7.0.
+2014-06-25  Stefan Monnier  <monnier@iro.umontreal.ca>
 
-2014-06-23  Leo Liu  <sdl.web@gmail.com>
+       * play/landmark.el: Use lexical-binding and avoid `intangible'.
+       (landmark--last-pos): New var.
+       (landmark--intangible-chars): New const.
+       (landmark--intangible): New function.
+       (landmark-mode, landmark-move): Use it.
+       (landmark-mode): Remove properties.
+       (landmark-plot-square, landmark-point-square, landmark-goto-xy)
+       (landmark-cross-qtuple):
+       Don't worry about `intangible' any more.
+       (landmark-click, landmark-point-y): Same; and don't assume point-min==1.
+       (landmark-init-display): Don't set `intangible' and `point-entered'.
+       (square): Remove.  Inline it instead.
+       (landmark--distance): Rename from `distance'.
+       (landmark-calc-distance-of-robot-from): Rename from
+       calc-distance-of-robot-from.
+       (landmark-calc-smell-internal): Rename from calc-smell-internal.
+
+2014-06-25  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * files.el (dir-locals-find-file, file-relative-name):
+       * info.el (Info-complete-menu-item):
+       * minibuffer.el (completion-table-subvert): Prefer string-prefix-p
+       to compare-strings to avoid out-of-range errors.
+       * subr.el (string-prefix-p): Adjust to match strict range
+       checking in compare-strings.
+
+2014-06-24  Leonard Randall  <leonard.a.randall@gmail.com>  (tiny change)
+
+       * textmodes/reftex-parse.el (reftex-using-biblatex-p): Make search
+       for comment lines non-greedy and stopping at newlines to fix stack
+       overflows with large files.
+
+2014-06-24  Eli Barzilay  <eli@barzilay.org>
+
+       * calculator.el (calculator-last-input): Drop 'ascii-character property
+       lookup.
+
+2014-06-24  Leo Liu  <sdl.web@gmail.com>
 
        * align.el (align-adjust-col-for-rule): Unbreak due to defaulting
        tab-stop-list to nil.  (Bug#16381)
        (indent-rigidly-right-to-tab-stop, tab-to-tab-stop)
        (move-to-tab-stop): Change callers.
 
-2014-06-22  Eli Zaretskii  <eliz@gnu.org>
+2014-06-24  Eli Zaretskii  <eliz@gnu.org>
 
        * skeleton.el (skeleton-insert): Yet another fix of the doc string
        wrt behavior of \n as the first/last element of a skeleton.
 
-2014-06-22  Michael Albinus  <michael.albinus@gmx.de>
+2014-06-24  Michael Albinus  <michael.albinus@gmx.de>
 
        * net/tramp-adb.el (tramp-adb-handle-process-file):
        * net/tramp-sh.el (tramp-sh-handle-process-file):
        * net/tramp-smb.el (tramp-smb-handle-process-file): Do not raise
        the output buffer when DISPLAY is non-nil.  (Bug#17815)
 
-2014-06-21  Glenn Morris  <rgm@gnu.org>
+2014-06-24  Glenn Morris  <rgm@gnu.org>
 
        * play/landmark.el (landmark-move-down, landmark-move-up):
        Fix 2007-10-20 change - preserve horizontal position.
 
+2014-06-23  Sam Steingold  <sds@gnu.org>
+
+       * simple.el (kill-append): Remove undo boundary depending on ...
+       (kill-append-merge-undo): New user option.
+
+2014-06-23  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * simple.el (handle-shift-selection, exchange-point-and-mark)
+       (activate-mark): Set transient-mark-mode buffer-locally (bug#6316).
+       (transient-mark-mode): Use&set the global value.
+       * mouse.el (mouse-set-region-1, mouse-drag-track): Idem.
+       * emulation/edt.el (edt-emulation-off): Save&restore the global
+       transient-mark-mode setting.
+       * obsolete/pc-select.el (pc-selection-mode): Use the
+       transient-mark-mode function.
+
+2014-06-23  Eli Zaretskii  <eliz@gnu.org>
+
+       * international/fontset.el (script-representative-chars):
+       Add representative characters for scripts added in Unicode 7.0.
+       (otf-script-alist): Synchronize with the latest registry of OTF
+       script tags.
+
+       * international/characters.el (char-script-table): Update for
+       scripts added and codepoint ranges changed in Unicode 7.0.
+
+2014-06-23  Eli Barzilay  <eli@barzilay.org>
+
+       * calculator.el (calculator-standard-displayer): Fix bug in use of
+       `calculator-groupize-number'.
+       (calculator-funcall): Fix broken `cl-flet' use by moving it into the
+       `eval' code, so it works in v24.3.1 too.
+       (calculator-last-input): Comment to clarify purpose.
+
+2014-06-22  Mario Lang  <mlang@delysid.org>
+
+       * textmodes/rst.el (rst-comment-region): From from -> from.
+
+       * net/tramp-adb.el (tramp-adb-send-command-and-check): And and -> and.
+
+2013-06-22  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * electric.el (electric-layout-post-self-insert-function):
+       * emacs-lisp/ert.el (ert--insert-infos):
+       * obsolete/vi.el (vi-set-mark):
+       * term.el (term-handle-scroll):
+       * textmodes/bibtex.el (bibtex-fill-field, bibtex-fill-entry):
+       * wid-edit.el (widget-editable-list-value-create):
+       Prefer point-marker to copy-marker of point.
+
 2014-06-21  Fabián Ezequiel Gallina  <fgallina@gnu.org>
 
        Fix completion retrieval parsing (bug#17209).
 
        * skeleton.el (skeleton-insert): Doc fix.
 
-2014-06-20  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-06-21  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/smie.el (smie-config--guess): Fix typo.
        (smie-config-guess): Use smie-config-local so the rules are obeyed
        * mouse.el (mouse-drag-line): Don't re-add to unread-comment-events,
        since it's already done inside the loop (bug#17819).
 
-2014-06-20  Martin Rudalics  <rudalics@gmx.at>
+2014-06-21  Martin Rudalics  <rudalics@gmx.at>
 
        * mouse.el (mouse-drag-line): Re-remove code initially removed
        on 2013-03-09 and inadvertently reintroduced on 2013-11-30
        (Bug#17819).
 
-2014-06-20  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-06-21  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * progmodes/sh-script.el (sh-smie-sh-rules): For { after &&, don't
        align with the surrounding parent (bug#17721).
 
-2014-06-20  Eli Zaretskii  <eliz@gnu.org>
+2014-06-21  Eli Zaretskii  <eliz@gnu.org>
 
        * textmodes/texinfo.el (texinfo-mode): Set skeleton-end-newline
        locally to nil.
        local setting of skeleton-end-newline by adding an explicit \n to
        the skeletons where appropriate.  (Bug#17801)
 
-2014-06-20  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-06-21  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * emacs-lisp/smie.el (smie--hanging-eolp-function): New var.
+       (smie-indent--hanging-p): Use it.
+       * progmodes/sh-script.el (sh-set-shell): Set it (bug#17621).
+
+2014-06-21  Leo Liu  <sdl.web@gmail.com>
+
+       * simple.el (read-quoted-char): Don't let help chars pop up help
+       buffer.  (Bug#16617)
+
+2014-06-21  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * progmodes/sh-script.el (sh-smie-sh-rules): Use same rule for && as
+       for | (bug#17621).
+
+       * xt-mouse.el (xterm-mouse--read-event-sequence-1000):
+       Drop unknown events instead of burping.
+
+2014-06-21  Eli Zaretskii  <eliz@gnu.org>
+
+       * term/w32-win.el (dynamic-library-alist): Support giflib 5.1.0
+       and later.  (Bug#17790)
+
+2014-06-21  Juri Linkov  <juri@jurta.org>
+
+       * dired.el (dired-mark-pop-up): Let-bind display-buffer-mark-dedicated
+       to `soft'.  (Bug#17554)
+
+2014-06-21  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * delsel.el (electric-newline-and-maybe-indent): Mark it as well
+       (bug#17737).
+
+2014-06-21  Dmitry Gutov  <dgutov@yandex.ru>
+
+       * progmodes/ruby-mode.el (ruby-font-lock-keywords): Don't fontify
+       `!' in `!~' with `font-lock-negation-char-face'.  (Bug#17732)
+
+2014-06-21  Michael Albinus  <michael.albinus@gmx.de>
 
-       * emacs-lisp/smie.el (smie--hanging-eolp-function): New var.
-       (smie-indent--hanging-p): Use it.
-       * progmodes/sh-script.el (sh-set-shell): Set it (bug#17621).
+       * net/dbus.el (dbus-call-method): Push only non D-Bus events into
+       `unread-command-events'.
 
-2014-06-20  Leo Liu  <sdl.web@gmail.com>
+2014-06-19  William Xu  <william.xwl@gmail.com>
 
-       * simple.el (read-quoted-char): Don't let help chars pop up help
-       buffer.  (Bug#16617)
+       * progmodes/hideif.el (hif-string-to-number): Don't return float for
+       hex integer constants (bug#17807).
 
 2014-06-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 
-       * progmodes/sh-script.el (sh-smie-sh-rules): Use same rule for && as
-       for | (bug#17621).
+       * international/mule-util.el (truncate-string-ellipsis): New var.
+       (truncate-string-to-width): Use it.
+
+2014-06-19  Robert Brown  <robert.brown@gmail.com>  (tiny change)
+
+       * emacs-lisp/lisp-mode.el (lisp-string-after-doc-keyword-p): New fun.
+       (lisp-string-in-doc-position-p): New function, extracted from
+       lisp-font-lock-syntactic-face-function.
+       (lisp-font-lock-syntactic-face-function): Use them (bug#9130).
+
+2014-06-19  Grégoire Jadi  <daimrod@gmail.com>
+
+       * net/rcirc.el (rcirc-omit-mode): Fix recenter error.  (Bug#17769)
 
 2014-06-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 
-       * xt-mouse.el (xterm-mouse-translate-1): Fix last change (bug#17776).
-       (xterm-mouse--read-event-sequence-1000): Drop unknown events instead of
-       burping.
+       * play/bubbles.el (bubbles--initialize, bubbles--show-scores)
+       (bubbles--game-over): Don't add `intangible' properties since they
+       didn't work anyway.
 
-2014-06-18  Eli Zaretskii  <eliz@gnu.org>
+2014-06-18  Juri Linkov  <juri@jurta.org>
 
-       * term/w32-win.el (dynamic-library-alist): Support giflib 5.1.0
-       and later.  (Bug#17790)
+       * vc/ediff-init.el (ediff-current-diff-Ancestor)
+       (ediff-fine-diff-Ancestor, ediff-even-diff-A, ediff-even-diff-B)
+       (ediff-even-diff-C, ediff-even-diff-Ancestor, ediff-odd-diff-A)
+       (ediff-odd-diff-B, ediff-odd-diff-C, ediff-odd-diff-Ancestor):
+       Add `min-colors 88' version with removed black/white foregrounds.
+       (Bug#10181)
 
 2014-06-18  Juri Linkov  <juri@jurta.org>
 
-       * dired.el (dired-mark-pop-up): Let-bind display-buffer-mark-dedicated
-       to `soft'.  (Bug#17554)
+       * vc/diff-mode.el (diff-changed): Empty face definition to use
+       `diff-removed' and `diff-added' on tty as well.  (Bug#10181)
+       (diff-context): Use darker color on light background and
+       lighter color on dark background.
 
-2014-06-17  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-06-18  Juri Linkov  <juri@jurta.org>
 
-       * delsel.el (electric-newline-and-maybe-indent): Mark it as well
-       (bug#17737).
+       * vc/diff-mode.el (diff-refine-changed): Rename from
+       `diff-refine-change' for consistency with `diff-changed'.
+       (diff-refine-change): Add obsolete face alias.  (Bug#10181)
 
-2014-06-16  Dmitry Gutov  <dgutov@yandex.ru>
+       * vc/smerge-mode.el (smerge-refined-changed): Rename from
+       `smerge-refined-change'.
+       (smerge-refined-change): Add obsolete face alias.
 
-       * progmodes/ruby-mode.el (ruby-font-lock-keywords): Don't fontify
-       `!' in `!~' with `font-lock-negation-char-face'.  (Bug#17732)
+2014-06-17  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * rect.el (rectangle-preview): New custom.
+       (rectangle): New group.
+       (rectangle--pos-cols): Add `window' argument.
+       (rectangle--string-preview-state, rectangle--string-preview-window):
+       New vars.
+       (rectangle--string-flush-preview, rectangle--string-erase-preview)
+       (rectangle--space-to, rectangle--string-preview): New functions.
+       (string-rectangle): Use them.
+       (rectangle--inhibit-region-highlight): New var.
+       (rectangle--highlight-for-redisplay): Obey it.  Make sure
+       `apply-on-region' uses the point-crutches of the right window.
+       Use :align-to rather than multiple spaces.
+
+2014-06-16  Andrea Rossetti  <andrea.rossetti@gmail.com>  (tiny change)
+
+       * ruler-mode.el (ruler-mode-window-col)
+       (ruler-mode-mouse-set-left-margin)
+       (ruler-mode-mouse-set-right-margin): Fix calculation of column
+       from mouse position (Bug#17768).
+
+2014-06-16  Ron Schnell  <ronnie@driver-aces.com>
+
+       * play/dunnet.el (dun-doassign): Fix bug where UNIX variable assignment
+       without varname or rhs causes crash.
+       (dun-ftp): Fix bug where blank ftp password is allowed, making it
+       impossible to win endgame.
+       (dun-unix-verbs): Add ssh as alias to rlogin, because nobody knows what
+       rlogin is anymore.
+       (dun-help): Bump version number; update contact info.
+
+2014-06-15  Eli Barzilay  <eli@barzilay.org>
+
+       * calculator.el (calculator-prompt, calculator-remove-zeros)
+       (calculator-mode-hook, calculator-operators, calculator-stack)
+       (calculator-mode): Tweak docstring.
+       (calculator-user-operators): Tweak docstring, fix a bug in the last
+       example.
+       (calculator-displayer): `std' case has an optional boolean.
+       (calculator-displayers): Use the new boolean to group in decimal mode.
+       (calculator-mode-map, calculator, calculator-message)
+       (calculator-op-arity, calculator-add-operators)
+       (calculator-string-to-number, calculator-displayer-prev)
+       (calculator-displayer-next, calculator-remove-zeros)
+       (calculator-eng-display, calculator-number-to-string)
+       (calculator-update-display, calculator-last-input)
+       (calculator-clear-fragile, calculator-digit, calculator-decimal)
+       (calculator-exp, calculator-saved-move, calculator-clear)
+       (calculator-copy, calculator-put-value, calculator-help)
+       (calculator-expt, calculator-truncate): Minor code improvements.
+       (calculator-need-3-lines): New function pulling out code from
+       `calculator'.
+       (calculator-get-display): Rename from `calculator-get-prompt', and
+       improved.
+       (calculator-push-curnum): Rename from `calculator-curnum-value', and
+       extended for all uses of it.  All callers changed.
+       (calculator-groupize-number): New utility for splitting a number into
+       groups.
+       (calculator-standard-displayer): Improve code, new optional argument to
+       use comma-split groups, make second argument optional too to use with
+       'left/'right inputs.  All callers changed.
+       (calculator-reduce-stack-once): New utility, doing the meat of what
+       `calculator-reduce-stack' used to do, much improved (mostly using
+       `pcase' for conciseness and clarity).
+       (calculator-reduce-stack): Now doing just the reduction loop using
+       `calculator-reduce-stack-once'.
+       (calculator-funcall): Improve code, make it work in v24.3.1 too.
+       (calculator-last-input): Improve code, remove some old cruft.
+       (calculator-quit): Kill `calculator-buffer' in electric mode too.
+       (calculator-integer-p): Remove.
+       (calculator-fact): Improve code, make it work on non-integer values
+       too (using truncated numbers).
 
 2014-06-15  Michael Albinus  <michael.albinus@gmx.de>
 
-       * net/dbus.el (dbus-call-method): Push only non D-Bus events into
-       `unread-command-events'.
+       Sync with Tramp 2.2.10.
+
+       * net/tramp.el (tramp-methods): Tweak docstring.
+       (tramp-handle-file-accessible-directory-p): Check for
+       `file-readable-p' instead of `file-executable-p'.
+       (tramp-check-cached-permissions):
+       Use `tramp-compat-file-attributes'.
+       (tramp-call-process): Add new argument VEC.  Adapt callees in all
+       tramp*.el files.
+
+       * net/tramp-adb.el (tramp-adb-handle-write-region): Improve messages.
+       (tramp-adb-maybe-open-connection): Don't set
+       `tramp-current-*' variables.
+
+       * net/tramp-cache.el (tramp-flush-file-function): Do not flush
+       file properties of temporary buffers.
+
+       * net/tramp-ftp.el (top): Remove special handling for URL syntax.
+
+       * net/tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add.
+       (tramp-gvfs-handle-delete-file): Flush file
+       properties, not directory properties.
+       (tramp-gvfs-handle-file-attributes): Use `string-to-number' when
+       reading "unix::mode".
+       (tramp-gvfs-handle-file-name-all-completions):
+       Use "-h" option for "gvfs-ls".
+       (tramp-gvfs-url-file-name): `user' and `localname' could be nil.
+       (tramp-gvfs-send-command): Simplify traces.
+
+       * net/tramp-sh.el (vc-handled-backends, vc-bzr-program)
+       (vc-git-program, vc-hg-program): Declare.
+       (tramp-methods) <sftp>: Remove.  It has never worked satisfactorily.
+       (tramp-methods) <nc>: Add new method.
+       (tramp-methods) <telnet>: Redirect stderr to "/dev/null".
+       (tramp-methods) <plink, plinkx, pscp, psftp>: Improve
+       `tramp-login-args'.
+       (tramp-default-user-alist): Add "nc".
+       (top): Remove completion function for "sftp".  Add completion
+       functions for "nc" and "psftp".
+       (tramp-do-copy-or-rename-file-out-of-band): Tweak docstring.
+       Implement support for "nc" method.
+       (tramp-sh-handle-expand-file-name, tramp-local-coding-commands)
+       (tramp-remote-coding-commands, tramp-call-local-coding-command):
+       Tweak docstring.
+       (tramp-sh-handle-write-region): Tweak error message.
+       (tramp-sh-handle-vc-registered): Remove backends when the remote
+       binary does not exist.
+       (tramp-find-inline-encoding): Do not raise an error.
+       (tramp-make-copy-program-file-name): Tweak docstring.  Handle also
+       the "nc" case.  Quote result also locally.
+
+       * net/tramp-smb.el (tramp-smb-handle-copy-directory)
+       (tramp-smb-handle-set-file-acl): Use `start-process'.
+       (tramp-smb-handle-insert-directory): Use progress reporter.
+       (tramp-smb-handle-rename-file): Flush also file properties of
+       FILENAME.
+
+       * net/trampver.el: Update release number.
 
-2014-06-14  Glenn Morris  <rgm@gnu.org>
+2014-06-15  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * ses.el: Miscellaneous cleanups; use lexical-binding; avoid
+       add-to-list.
+       (ses-localvars): Remove ses--local-printer-list, unused.
+       (ses--metaprogramming): New macro.  Use it to defvar variables.
+       (ses-set-localvars): Simplify.
+       (ses--locprn, ses-cell): Use defstruct.  Change ses-cell's
+       property-list into an alist.
+       (ses-locprn-get-compiled, ses-locprn-compiled-aset)
+       (ses-locprn-get-def, ses-locprn-def-aset, ses-locprn-get-number):
+       Remove; use defstruct accessors/setters instead.
+       (ses-cell-formula-aset, ses-cell-printer-aset)
+       (ses-cell-references-aset): Remove, use setf instead.
+       (ses--alist-get): New function.
+       (ses-cell-property): Rename from ses-cell-property-get and rewrite.
+       Use an alist instead of a plist and don't do move-to-front since the
+       list is always short.
+       (ses-cell-property-get-fun, ses-cell-property-delq-fun)
+       (ses-cell-property-set-fun, ses-cell-property-set)
+       (ses-cell-property-pop-fun, ses-cell-property-get-handle)
+       (ses-cell-property-handle-car, ses-cell-property-handle-setcar): Remove.
+       (ses--letref): New macro.
+       (ses-cell-property-pop): Rewrite.
+       (ses--cell): Rename from ses-cell and make it into a function.
+       Make `formula' fallback on `value' if nil.
+       (ses--local-printer): Rename from ses-local-printer and make it into
+       a function.
+       (ses-set-cell): Turn it into a macro so finding the accessor from the
+       field name is done at compile time.
+       (ses-repair-cell-reference-all): Test presence of `sym' rather than
+       `ref' before adding `sym' to :ses-repair-reference.
+       (ses-calculate-cell): Use ses--letref rather than
+       ses-cell-property-get-handle.
+       (ses-write-cells): Use a single prin1-to-string.
+       (ses-setter-with-undo): New function.
+       (ses-aset-with-undo, ses-set-with-undo): Rewrite using it.
+       (ses-unset-with-undo): Remove.
+       (ses-load): Prefer apply' over `eval'.
+       (ses-read-printer, ses-set-column-width): Use standard "(default
+       foo)" format.
+
+2014-06-15  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (leim, semantic): Use `make -C' rather than `cd && make'.
 
        * progmodes/cc-langs.el: Require cl-lib.  (Bug#17463)
        Replace delete-duplicates and mapcan by cl- versions throughout.
        And cl-macroexpand-all by macroexpand-all.
        (delete-duplicates, mapcan, cl-macroexpand-all): No need to declare.
 
-2014-06-14  Eli Zaretskii  <eliz@gnu.org>
+2014-06-15  Eli Zaretskii  <eliz@gnu.org>
 
        * subr.el (posn-col-row): Doc fix.  (Bug#17768)
 
-2014-06-14  Juri Linkov  <juri@jurta.org>
+2014-06-15  Juri Linkov  <juri@jurta.org>
 
        * bindings.el: Put `ascii-character' property on keypad keys
        mapped to characters.  (Bug#17759)
 
-2014-06-13  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-06-15  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/smie.el (smie-next-sexp): Fix up "other-end" info when
        bumping forward into a closing paren (bug#17761).
        * term/xterm.el (xterm--version-handler): Work around for OSX
        Terminal.app (bug#17607).
 
+2014-06-14  Ron Schnell  <ronnie@driver-aces.com>
+
+       * play/dunnet.el (dun-describe-room, dun-mode):
+       If a lamp is in the room, you won't be eaten by a grue.
+
+2014-06-13  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in ($(lisp)/cus-load.el, $(lisp)/finder-inf.el)
+       (autoloads, $(lisp)/subdirs.el, compile-main, leim, semantic, compile)
+       (compile-always): GNU make automatically passes
+       command-line arguments to sub-makes.
+
+       * calendar/calendar.el (calendar-generate-window):
+       Remove pointless call to font-lock-fontify-buffer.
+
+2014-06-13  Matthias Meulien  <orontee@gmail.com>
+
+       * simple.el (completion-list-mode-map): Navigate with tab and backtab
+       (bug#17767).
+
+2014-06-13  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * simple.el (set-mark-command): Simplify a bit.
+
+2014-06-12  Nicolas Richard  <theonewiththeevillook@yahoo.fr>
+
+       * help.el (help--key-binding-keymap): New function.
+       (help--binding-locus): New function.
+       (describe-key): Mention the keymap in which the binding was
+       found. (bug#13948)
+
+2014-06-12  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * hippie-exp.el (he--all-buffers): New function.
+       (try-expand-line-all-buffers, try-expand-list-all-buffers)
+       (try-expand-dabbrev-all-buffers): Use it.
+
+2014-06-12  Emilio C. Lopes  <eclig@gmx.net>
+
+       * hippie-exp.el (try-expand-line-all-buffers)
+       (try-expand-list-all-buffers, try-expand-dabbrev-all-buffers):
+       Read hippie-expand-only-buffers and hippie-expand-ignore-buffers in the
+       original buffer, in case they're buffer-local.
+
+2014-06-12  Vincent Belaïche  <vincentb1@users.sourceforge.net>
+
+       * ses.el (ses-initial-global-parameters-re): New defconst, a
+       specific regexp is needed now that ses.el can handle both
+       file-format 2 --- ie. no local printers --- and 3 --- i.e. may have
+       local printers.
+       (ses-localvars): Add local variables needed for local printer handling.
+       (ses-set-localvars): Handle hashmap initialisation.
+       (ses-paramlines-plist): Add param-line for number of local printers.
+       (ses-paramfmt-plist): New defconst, needed for code factorization
+       between functions `ses-set-parameter' and
+       `ses-file-format-extend-paramter-list'
+       (ses-make-local-printer-info): New defsubst.
+       (ses-locprn-get-compiled, ses-locprn-compiled-aset)
+       (ses-locprn-get-def, ses-locprn-def-aset, ses-locprn-get-number)
+       (ses-cell-printer-aset): New defmacro.
+       (ses-local-printer-compile): New defun.
+       (ses-local-printer): New defmacro.
+       (ses-printer-validate, ses-call-printer): Add support for local
+       printer functions.
+       (ses-file-format-extend-paramter-list): New defun.
+       (ses-set-parameter): Use const `ses-paramfmt-plist' for code
+       factorization.
+       (ses-load): Add support for local printer functions.
+       (ses-read-printer): Update docstring and add support for local printer
+       functions.
+       (ses-refresh-local-printer, ses-define-local-printer): New defun.
+       (ses-safe-printer): Add support for local printer functions.
+
+2014-06-12  Ivan Andrus  <darthandrus@gmail.com>
+
+       * ffap.el (ffap-lax-url): New var (bug#17723).
+       (ffap-url-at-point): Use it.
+       (ffap-file-at-point): Avoid returning just "/".
+
+2014-06-12  Matthias Meulien  <orontee@gmail.com>
+
+       * progmodes/python.el (import skeleton): New skeleton (bug#17672).
+       (python-mode-map): Bind it.
+
+       * progmodes/python.el (class skeleton): Don't erase last char of class
+       name (bug#17683).
+
+2014-06-12  Cameron Desautels  <camdez@gmail.com>  (tiny change)
+
+       * help.el (where-is): Use `default' arg of completing-read (bug#17705).
+
+2014-06-12  Kevin Ryde  <user42_kevin@yahoo.com.au>
+
+       * files.el (auto-mode-alist): Map .ad files to xdefaults-mode
+       (bug#17745).
+
+2014-06-12  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * international/mule-cmds.el: Use lexical-binding.
+       (ucs-names): Simplify.
+
+2014-05-18  Eric Hanchrow  <eric.hanchrow@gmail.com>
+
+       * progmodes/python.el (run-python): Use read-shell-command.
+
+2014-06-11  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * rect.el: Make it possible to move bounds past EOL or into TABs.
+       (operate-on-rectangle): Use apply-on-rectangle.
+       (rectangle--mark-crutches): New var.
+       (rectangle--pos-cols, rectangle--col-pos, rectangle--point-col)
+       (rectangle--crutches, rectangle--reset-crutches): New functions.
+       (apply-on-rectangle): Obey crutches.  Avoid setq.
+       Fix missing final iteration if end is at EOB&BOL.
+       (rectangle-mark-mode-map): Add remap bindings for
+       exchange-point-and-mark and char/line movements.
+       (rectangle--*-char): New function.
+       (rectangle-exchange-point-and-mark, rectangle-right-char)
+       (rectangle-left-char, rectangle-forward-char)
+       (rectangle-backward-char, rectangle-next-line)
+       (rectangle-previous-line): New commands.
+       (rectangle--place-cursor): New function.
+       (rectangle--highlight-for-redisplay): Use it.  Use apply-on-rectangle.
+
 2014-06-08  Glenn Morris  <rgm@gnu.org>
 
        * startup.el (initial-buffer-choice): Doc fix.
        * bookmark.el (bookmark-load):
        * uniquify.el (uniquify-buffer-name-style): Doc fixes.
 
-2014-06-06  Juri Linkov  <juri@jurta.org>
+2014-06-08  Juri Linkov  <juri@jurta.org>
 
        * desktop.el: Activate auto-saving on window configuration changes.
        (desktop-save-mode, desktop-auto-save-timeout): Add/remove
-       `desktop-auto-save-set-timer' to/from `window-configuration-change-hook'.
+       `desktop-auto-save-set-timer' to/from
+       `window-configuration-change-hook'.
        (desktop-auto-save-set-timer): Change REPEAT arg of
        `run-with-idle-timer' from t to nil.
        http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00147.html
 
-2014-06-06  Santiago Payà i Miralta  <santiagopim@gmail.com>
+2014-06-08  Santiago Payà i Miralta  <santiagopim@gmail.com>
 
        * vc/vc-hg.el (vc-hg-working-revision): Use "hg parent" and
        vc-hg-command (bug#17570).
 
-2014-06-06  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-06-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * international/mule-cmds.el (ucs-names): Add special entry for BEL
        (bug#17702).
 
-2014-06-06  Glenn Morris  <rgm@gnu.org>
+2014-06-08  Glenn Morris  <rgm@gnu.org>
 
        * startup.el (window-setup-hook): Doc fix.
 
-2014-06-05  Glenn Morris  <rgm@gnu.org>
-
        * emacs-lisp/package.el (package-check-signature)
        (package-unsigned-archives): Doc fixes.
 
-2014-06-03  Martin Rudalics  <rudalics@gmx.at>
+2014-06-08  Martin Rudalics  <rudalics@gmx.at>
 
        * window.el (display-buffer-use-some-window): Don't make window
        used smaller than it was before (Bug#17671).
 
-2014-06-03  Eli Zaretskii  <eliz@gnu.org>
+2014-06-08  Eli Zaretskii  <eliz@gnu.org>
 
        * menu-bar.el (menu-bar-open): Fix last change: use the PC
        'redisplay' instead of '(sit-for 0)'.
 
-2014-06-03  Michael Albinus  <michael.albinus@gmx.de>
+2014-06-08  Michael Albinus  <michael.albinus@gmx.de>
 
-       * net/tramp.el (tramp-ssh-controlmaster-options): Improve search
-       regexp.  (Bug#17653)
+       * net/tramp.el (tramp-ssh-controlmaster-options):
+       Improve search regexp.  (Bug#17653)
 
-2014-06-03  Glenn Morris  <rgm@gnu.org>
+2014-06-08  Glenn Morris  <rgm@gnu.org>
 
        * emacs-lisp/package.el (package-pinned-packages): Doc fix.
 
-2014-06-02  Eli Zaretskii  <eliz@gnu.org>
+2014-06-08  Eli Zaretskii  <eliz@gnu.org>
 
        * menu-bar.el (menu-bar-open): Fix invocation via M-x.
 
-2014-06-01  Eli Zaretskii  <eliz@gnu.org>
+2014-06-06  Santiago Payà i Miralta  <santiagopim@gmail.com>
+
+       * vc/vc-hg.el (vc-hg-create-tag, vc-hg-retrieve-tag): New functions
+       (bug#17586).
+
+       * vc/vc-hg.el (vc-hg-log-graph): New var.
+       (vc-hg-print-log): Use it.
+       (vc-hg-root-log-format): Include branch name and bookmarks; ignore
+       graph output (bug#17515).
+
+2014-06-06  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * mouse.el (mouse-posn-property): Ignore buffer position info when the
+       even happened elsewhere.
+
+2014-06-06  Mario Lang  <mlang@delysid.org>
+
+       * emacs-lisp/tabulated-list.el (tabulated-list-print): Only call
+       `recenter' if `current-buffer' is equal to `window-buffer'.
+
+2014-06-05  Leo Liu  <sdl.web@gmail.com>
+
+       * emacs-lisp/cl-macs.el (cl-macrolet): Avoid excessive progn's.
+
+2014-06-05  Michal Nazarewicz  <mina86@mina86.com>
+
+       * textmodes/tildify.el (tildify-foreach-region-outside-env):
+       New function which calls a callback on portions of the buffer that are
+       outside of ignored environments.
+       (tildify-build-regexp): Remove function since it is now
+       incorporated in `tildify-foreach-region-outside-env' where it is
+       optimized and simplified by the use of `mapconcat'.
+       (tildify-tildify): Return number of substitutions made so that…
+       (tildify-count): …can be removed.
+       (tildify-find-env): Accept a new PAIRS argument which was
+       previously looked up in `tildify-ignored-environments-alist' each
+       time the function was called.  With this change, the lookup is
+       performed only once in `tildify-foreach-region-outside-env'.
+       (tildify-region): Greatly simplify the function since now most of
+       the work is done by `tildify-foreach-region-outside-env'.
+       (tildify-mode-alist): Simplify slightly by avoiding if and setq
+       and instead using or.
+
+       * textmodes/tildify.el (tildify-ignored-environments-alist):
+       Optimize environments regexes
+
+       Each time beginning of an environment to ignore is found,
+       `tildify-find-env' needs to identify regexp for the ending
+       of the environment.  This is done by trying all the opening
+       regexes on matched text in a loop, so to speed that up, this
+       loop should have fewer things to match, which can be done by
+       using alternatives in the opening regexes.
+
+       Coincidentally, this should make matching of the opening
+       regexp faster as well thanks to the use of `regexp-opt' and
+       having common prefix pulled from many regexes.
+
+       * textmodes/tildify.el (tildify-string-alist)
+       (tildify-ignored-environments-alist): Add `nxml-mode' to the list
+       of supported modes since `xml-mode' is no longer a thing but just
+       an alias to the former.  Also include comments and insides of tags
+       in `tildify-ignored-environments-alist' for XML modes.  Finally,
+       since XML does not define “&nbsp;”[1], use a numeric reference for
+       a no-break space (namely “&#160;”)
+
+       [1] XML specification defines only a handful of predefined entities.
+           The list is at <http://www.w3.org/TR/REC-xml/#sec-predefined-ent>
+           and includes only &lt;, &gt;, &amp;, &apos; and &quot; (meaning <,
+           >, &, ' and " respectively).  This is in contrast to HTML and even
+           XHTML which defined a whole bunch of entities including “&nbsp;”.
+
+       * textmodes/tildify.el (tildify-pattern-alist)
+       (tildify-string-alist, tildify-ignored-environments-alist):
+       Improve defcustom's types by adding more tags explaining what each
+       value means and replace “sexp” used in
+       `tildify-ignored-environments-alist' with a full type declaration.
+
+       * textmodes/tildify.el (tildify-find-env): Fix matched group
+       indexes in end-regex building
+
+       When looking for a start of an ignore-environment, the regex is built
+       by concatenating regexes of all the environments configured in
+       `tildify-ignored-environments-alist'.  So for example, the following
+       list could be used to match TeX's \verb and \verb* commands:
+
+           (("\\\\verb\\(.\\)" . (1))
+            ("\\\\verb\\*\\(.\\)" . (1)))
+
+       This would result in the following regex being used to find the start
+       of any of the variants of the \verb command:
+
+           \\\\verb\\(.\\)\\|\\\\verb\\*\\(.\\)
+
+       But now, if “\\\\verb\\*\\(.\\)” matches, the first capture group
+       won't match anything, and thus (match-string 1) will be nil, which
+       will cause building of the end-matching regex to fail.
+
+       Fix this by using capture groups from the time when the opening
+       regexes are matched individually.
+
+       * textmodes/tildify.el (tildify-find-env): Fix end-regex building
+       in `tildify-find-env'
+
+       The `tildify-ignored-environments-alist' allows the end-regex to
+       be provided not as a static string but mix of strings and indexes
+       of groups matched the begin-regex.  For example, the “\verb!…!”
+       TeX-command (where “!” is an arbitrary character) is handled
+       using:
+
+           ("\\\\verb\\*?\\(.\\)" . (1))
+
+       In the same way, the following should be supported as well:
+
+           ("open-\\(.\\)" . ("end-" 1))
+
+       However the tildify-find-env function fails at
+
+           (concat result
+                   (if (stringp (setq aux (car expression)))
+                        expression  ; BUG: expression is a list
+                      (regexp-quote (match-string aux))))
+
+       where the string part is handled incorrectly.
+
+       The most trivial fix would be to replace `expression' in the
+       true-part of the if-statement with `aux', but instead, this commit
+       optimizes `tildify-find-env' by changing it to use `mapconcat'
+       rather than open-coded while-loop.
+
+2014-06-05  Mario Lang  <mlang@delysid.org>
+
+       * woman.el (woman-mapcan): Remove.
+       (woman-parse-colon-path): Use cl-mapcan instead.
+
+2014-06-03  Rüdiger Sonderfeld  <ruediger@c-plusplus.de>
+
+       * register.el: Add link to Emacs manual in Commentary.
+
+2014-06-02  Sam Steingold  <sds@gnu.org>
+
+       * menu-bar.el (lookup-key-ignore-too-long): Extract from...
+       (popup-menu): ...here.
+       (menu-bar-open): Use it to avoid an error when `lookup-key'
+       returns a number.
+
+2014-06-02  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp.el (tramp-call-process): Add traces.
+       (tramp-handle-unhandled-file-name-directory): Return "/".
+
+2014-06-02  Wilson Snyder  <wsnyder@wsnyder.org>
+
+       Sync with upstream verilog-mode revision 3cd8144.
+       * progmodes/verilog-mode.el (verilog-mode-version): Bump.
+       (verilog-auto-arg-format): New option, to support newlines in AUTOARG.
+       (verilog-type-font-keywords): Add nor.
+       (verilog-batch-execute-func): Force reading of Local Variables.
+       Fix printing "no changes to be saved" with verilog-batch.
+       (verilog-auto-arg-ports): Doc fix.
+       Add verilog-auto-arg-format to support newlines in AUTOARG.
+       (verilog-auto-arg): Doc fix.
+
+2014-06-02  Glenn Morris  <rgm@gnu.org>
+
+       * emulation/crisp.el, emulation/tpu-edt.el, emulation/tpu-extras.el:
+       * emulation/tpu-mapper.el, emulation/vi.el, emulation/vip.el:
+       * emulation/ws-mode.el: Move to obsolete/.
+       * Makefile.in (AUTOGEN_VCS): Update for moved tpu-edu.el.
+
+2014-06-02  Eli Zaretskii  <eliz@gnu.org>
 
        * simple.el (keyboard-quit): Force update of mode lines, to remove
        the "Def" indicator, if we were defining a macro.  (Bug#17615)
 
-2014-06-01  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-06-02  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * minibuffer.el (minibuffer-force-complete-and-exit):
        Obey minibuffer-default (bug#17545).
        * progmodes/js.el (js-indent-line): Don't mix columns and chars
        (bug#17619).
 
-2014-05-31  Stefan Monnier  <monnier@iro.umontreal.ca>
-
        * subr.el (set-transient-map): Don't wait for some "nested"
        transient-map to finish if we're only supposed to be active for
        the next command (bug#17642).
 
-2014-05-31  Leo Liu  <sdl.web@gmail.com>
+2014-06-02  Leo Liu  <sdl.web@gmail.com>
 
        * emacs-lisp/gv.el (window-buffer, window-display-table)
        (window-dedicated-p, window-hscroll, window-point, window-start):
        Fix gv-expander.  (Bug#17630)
 
-2014-05-31  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-06-02  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * mouse.el (mouse-posn-property): Ignore posn-point for mode-line
        clicks (bug#17633).
        for the single comma, since ", " is *very* common in normal French text
        (bug#17643).
 
-2014-05-30  Glenn Morris  <rgm@gnu.org>
+2014-06-02  Glenn Morris  <rgm@gnu.org>
 
        * emacs-lisp/package.el (package-check-signature)
        (package-unsigned-archives): Fix :version.
 
-2014-05-29  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-06-02  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * subr.el (sit-for): Don't run input-methods (bug#15614).
 
-2014-05-28  Glenn Morris  <rgm@gnu.org>
+2014-06-02  Glenn Morris  <rgm@gnu.org>
 
        * cus-start.el: Fix some :version numbers.
 
-2014-05-27  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-06-02  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * simple.el (deactivate-mark): Set mark-active to nil even if
        deactivation is done via setting transient-mark-mode to nil,
        * emacs-lisp/byte-opt.el (byte-optimize-binary-predicate): Don't assume
        there can't be more than 2 arguments (bug#17584).
 
-2014-05-27  Glenn Morris  <rgm@gnu.org>
+2014-06-02  Glenn Morris  <rgm@gnu.org>
 
        * simple.el (filter-buffer-substring-functions)
        (filter-buffer-substring-function, buffer-substring-filters)
        * abbrev.el (abbrev-expand-functions, abbrev-expand-function)
        (expand-abbrev, abbrev--default-expand): Doc fixes.
 
-2014-05-26  Paul Eggert  <eggert@cs.ucla.edu>
+2014-06-02  Paul Eggert  <eggert@cs.ucla.edu>
 
        Include sources used to create macuvs.h.
        * international/README: Refer to the Unicode Terms of Use rather
        than copying it bodily here, as that simplifies maintenance.
 
-2014-05-25  Andreas Schwab  <schwab@linux-m68k.org>
+2014-06-01  Glenn Morris  <rgm@gnu.org>
+
+       * loadup.el (load-prefer-newer): Set non-nil when dumping.  (Bug#17629)
+
+2014-05-31  Glenn Morris  <rgm@gnu.org>
+
+       * files.el (locate-dominating-file): Expand file argument.  (Bug#17641)
+
+2014-05-30  Glenn Morris  <rgm@gnu.org>
+
+       * loadup.el: Treat `command-line-args' more flexibly.
+
+2014-05-30  Alan Mackenzie  <acm@muc.de>
+
+       Guard (looking-at "\\s!") from XEmacs.
+       * progmodes/cc-engine.el (c-state-pp-to-literal): Add guard form.
+
+2014-05-30    Ken Olum  <kdo@cosmos.phy.tufts.edu>
+
+       * mail/rmail.el (rmail-delete-forward, rmail-delete-backward):
+       The argument COUNT is now optional, to be more backward-compatible.
+       Doc fix.  (Bug#17560)
+
+2014-05-29  Reuben Thomas  <rrt@sc3d.org>
+
+       * whitespace.el (whitespace-report-region):
+       Simplify documentation.
+       (whitespace-report-region): Allow report-if-bogus to take the
+       value `never', for non-interactive use.
+       (whitespace-report): Refer to whitespace-report-region's
+       documentation.
+
+2014-05-29  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * whitespace.el: Use font-lock-flush.  Minimize refontifications.
+       Side benefit: it works without jit-lock.
+       (whitespace-point--used): New buffer-local var.
+       (whitespace-color-on): Initialize it and flush it.  Use font-lock-flush.
+       (whitespace-color-off): Use font-lock-flush.
+       (whitespace-point--used, whitespace-point--flush-used): New functions.
+       (whitespace-trailing-regexp, whitespace-empty-at-bob-regexp)
+       (whitespace-empty-at-eob-regexp): Use them.
+       (whitespace-post-command-hook): Rewrite.
+
+       * font-lock.el (font-lock-flush, font-lock-ensure): New functions.
+       (font-lock-fontify-buffer): Mark interactive-only.
+       (font-lock-multiline, font-lock-fontified, font-lock-set-defaults):
+       Make buffer-local.
+       (font-lock-specified-p): Remove redundant boundp check.
+       (font-lock-flush-function, font-lock-ensure-function): New vars.
+       (font-lock-turn-on-thing-lock): Set them.
+       (font-lock-default-fontify-buffer): Obey font-lock-dont-widen.
+       (font-lock-after-change-function): Make `old-len' optional.
+       (font-lock-set-defaults): Remove redundant `set' of font-lock-defaults.
+       Call font-lock-flush, just in case.
+       * progmodes/verilog-mode.el (verilog-preprocess): Disable workaround in
+       recent Emacsen.
+       * progmodes/vera-mode.el (vera-fontify-buffer): Declare obsolete.
+       (vera-mode-map, vera-mode-menu): Remove bindings to it.
+       * progmodes/idlw-help.el (idlwave-help-fontify): Use font-lock-ensure
+       and with-syntax-table.
+       * textmodes/conf-mode.el (conf-quote-normal):
+       * progmodes/sh-script.el (sh-set-shell):
+       * progmodes/prog-mode.el (prettify-symbols-mode):
+       * progmodes/f90.el (f90-font-lock-n):
+       * progmodes/cwarn.el (cwarn-mode):
+       * nxml/nxml-mode.el (nxml-toggle-char-ref-extra-display):
+       * progmodes/compile.el (compilation-setup, compilation--unsetup):
+       * hi-lock.el (hi-lock-mode, hi-lock-unface-buffer)
+       (hi-lock-set-pattern, hi-lock-set-file-patterns): Use font-lock-flush.
+       * mail/rmail.el (rmail-variables): Set font-lock-dont-widen instead of
+       font-lock-fontify-buffer-function and
+       font-lock-unfontify-buffer-function.
+       (rmail-unfontify-buffer-function, rmail-fontify-message):
+       Use with-silent-modifications.
+       * htmlfontify.el (hfy-force-fontification): Use jit-lock-fontify-now
+       and font-lock-ensure.
+       * bs.el (bs-show-in-buffer): Use font-lock-ensure.
+
+2014-05-28  Thien-Thi Nguyen  <ttn@gnu.org>
+
+       * emacs-lisp/package.el (package-generate-autoloads):
+       Inhibit backup files.
+
+2014-05-28  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * progmodes/hideshow.el (hs-hide-all): Call syntax-propertize
+       (bug#17608).
+
+2014-05-21  Michal Nazarewicz  <mina86@mina86.com>
+
+       * textmodes/tildify.el (tildify-buffer, tildify-region):
+       Add dont-ask option.
+
+2014-05-28  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * subr.el (zerop): Move from C.  Add compiler-macro (bug#17475).
+       * emacs-lisp/byte-opt.el (byte-optimize-zerop): Remove.
+
+       * subr.el (internal--funcall-interactively): New.
+       (internal--call-interactively): Remove.
+       (called-interactively-p): Detect funcall-interactively instead of
+       call-interactively.
+       * simple.el (repeat-complex-command): Use funcall-interactively.
+       (repeat-complex-command--called-interactively-skip): Remove.
+
+2014-05-27  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * register.el (register-read-with-preview): Don't burp on
+       frame switches (e.g. due to the frame we just popped).
+
+       * mouse.el (mouse-set-region): Handle spurious drag events (bug#17562).
+       (mouse-drag-track): Annotate `mouse-drag-start' so we know we moved.
+
+2014-05-26  Andreas Schwab  <schwab@linux-m68k.org>
 
        * cus-face.el (custom-face-attributes): Add :distant-foreground.
 
-2014-05-25  Martin Rudalics  <rudalics@gmx.at>
+2014-05-26  Martin Rudalics  <rudalics@gmx.at>
 
-       * window.el (window--dump-frame): Remove interactive
-       specification.
+       * window.el (window--dump-frame): Remove interactive specification.
 
-2014-05-23  Glenn Morris  <rgm@gnu.org>
+2014-05-26  Glenn Morris  <rgm@gnu.org>
 
        * hippie-exp.el (he-line-search-regexp):
        Handle comint-prompt-regexp containing subgroups.  (Bug#17529)
 
-2014-05-23  Stephen Berman  <stephen.berman@gmx.net>
+2014-05-26  Stephen Berman  <stephen.berman@gmx.net>
 
        * calendar/todo-mode.el: Remove dependence on auto-mode-alist,
        to avoid errors when trying to create or visit a file foo.todo
        (auto-mode-alist): Remove add-to-list calls making Todo file
        extensions unrestrictedly tied to Todo modes.
 
-2014-05-23  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-05-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/nadvice.el (advice--member-p): Change second arg.
        (advice-function-member-p): Tell it to check both names and functions
        (bug#17531).
        (advice--add-function): Adjust call accordingly.
 
-2014-05-23  Stephen Berman  <stephen.berman@gmx.net>
+2014-05-26  Stephen Berman  <stephen.berman@gmx.net>
 
        * calendar/todo-mode.el: Miscellaneous bug fixes.
        (todo-delete-file): When deleting an archive but not its todo
        (todo-reset-highlight-item): Also reset in filtered items files.
        Fix incorrect variable reference in document string.
 
-2014-05-22  Glenn Morris  <rgm@gnu.org>
+2014-05-26  Glenn Morris  <rgm@gnu.org>
 
        * window.el (window--dump-frame): Avoid error in --without-x builds.
 
-2014-05-21  Glenn Morris  <rgm@gnu.org>
+2014-05-26  Glenn Morris  <rgm@gnu.org>
 
        * nxml/nxml-mode.el (xml-mode): Only define this alias once.
 
-2014-05-21  Eli Zaretskii  <eliz@gnu.org>
+2014-05-26  Eli Zaretskii  <eliz@gnu.org>
 
        * frame.el (set-frame-font): Doc fix.
 
        * menu-bar.el (menu-set-font): Doc fix.  (Bug#17532)
 
-2014-05-21  Dmitry Gutov  <dgutov@yandex.ru>
+2014-05-26  Dmitry Gutov  <dgutov@yandex.ru>
 
        * emacs-lisp/package.el (package--download-one-archive):
        Use `write-region' instead of `save-buffer' to avoid running various
        (describe-package-1): Same.  Insert newline at the end of the
        buffer if appropriate.
 
-2014-05-20  Juri Linkov  <juri@jurta.org>
+2014-05-26  Juri Linkov  <juri@jurta.org>
 
        * avoid.el (mouse-avoidance-set-mouse-position): Don't raise frame.
        (mouse-avoidance-ignore-p): Remove `switch-frame', add `focus-out'.
        * avoid.el (mouse-avoidance-banish-position): Fix defcustom :options
        to allow changing its value with `set-variable'.
 
-2014-05-20  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-05-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * progmodes/scheme.el (scheme-mode-syntax-table): Remove hack for
        #; comments.
 
        * emacs-lisp/lisp.el (end-of-defun): Ensure we move (bug#17274).
 
-2014-05-18  Stefan Monnier  <monnier@iro.umontreal.ca>
-
        * emacs-lisp/timer.el (timer-event-handler): Don't run if canceled
        (bug#17392).
 
-2014-05-17  Michael Albinus  <michael.albinus@gmx.de>
+2014-05-26  Michael Albinus  <michael.albinus@gmx.de>
 
        * net/tramp-sh.el (tramp-find-inline-encoding): Do not match "%%t"
        for a temporary file name.
 
-2014-05-17  Eli Zaretskii  <eliz@gnu.org>
+2014-05-26  Eli Zaretskii  <eliz@gnu.org>
 
        * simple.el (line-move-ignore-invisible): Doc fix.  (Bug#17511)
 
-2014-05-16  Michael Albinus  <michael.albinus@gmx.de>
+2014-05-26  Michael Albinus  <michael.albinus@gmx.de>
 
        * net/dbus.el (dbus-init-bus, dbus-call-method)
        (dbus-call-method-asynchronously, dbus-send-signal)
        (dbus-method-return-internal, dbus-method-error-internal):
        Check, whether Emacs has been compiled with D-Bus support.  (Bug#17508)
 
-2014-05-14  Nicolas Richard  <theonewiththeevillook@yahoo.fr>
+2014-05-26  Nicolas Richard  <theonewiththeevillook@yahoo.fr>
 
        * emacs-lisp/eieio-opt.el (eieio-help-class): Correctly deal with
        methods which do not have a doc string.  (Bug#17490)
 
+2014-05-25  Tassilo Horn  <tsdh@gnu.org>
+
+       * textmodes/reftex-ref.el (reftex-format-special): Make it work
+       also for AMS Math's \eqref macro.
+
+2014-05-25  Thien-Thi Nguyen  <ttn@gnu.org>
+
+       Arrange to never byte-compile the generated -pkg.el file.
+
+       * emacs-lisp/package.el (package-generate-description-file):
+       Output first-line comment to set buffer-local var `no-byte-compile'.
+       Suggested by Dmitry Gutov:
+       <http://lists.gnu.org/archive/html/emacs-devel/2014-05/msg00401.html>.
+
+2014-05-25  Thien-Thi Nguyen  <ttn@gnu.org>
+
+       Fix bug: Properly quote args to generated -pkg.el `define-package'.
+
+       * emacs-lisp/package.el (package-generate-description-file):
+       Inline `package--alist-to-plist'; rewrite to selectively
+       quote alist values that are not self-quoting.
+       (package--alist-to-plist): Delete func.
+
+2014-05-25  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * term/xterm.el (xterm-function-map): Add mapping for shifted
+       keypad keys.
+
+2014-05-24  Daniel Colascione  <dancol@dancol.org>
+
+       * progmodes/subword.el (subword-find-word-boundary): Move point to
+       correct spot before search. (Bug#17580)
+
+       * emacs-lisp/nadvice.el (defun): Write in eval-and-compile to avoid
+       breaking the build.
+
+2014-05-24  Leo Liu  <sdl.web@gmail.com>
+
+       * calc/calc.el (math-bignum): Handle most-negative-fixnum.  (Bug#17556)
+
+2014-05-23  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * minibuffer.el (completion--sreverse): Remove.
+       (completion--common-suffix): Use `reverse' instead.
+       * emacs-lisp/regexp-opt.el (regexp-opt-group): Use `reverse' on strings.
+
+2014-05-22  Glenn Morris  <rgm@gnu.org>
+
+       * shell.el (shell-mode) <shell-dirstack-query>: Bypass bash aliases.
+
+2014-05-21  Daniel Colascione  <dancol@dancol.org>
+
+       * files.el (interpreter-mode-alist): Add mksh.
+
+       * progmodes/sh-script.el (sh-ancestor-alist): Add mksh, a pdksh
+       derivative.
+       (sh-alias-alist): Alias /system/bin/sh (Android's system shell) to
+       mksh. Improve custom spec; allow regular expressions.
+       (sh-shell): Delegate name splitting to `sh-canonicalize-shell'.
+       (sh-after-hack-local-variables): New function.
+       (sh-mode): Use it; respect file-local `sh-shell' variable. (bug#17333)
+       (sh-set-shell): Use `sh-canonicalize-shell' instead of open-coding
+       the normalization.
+       (sh-canonicalize-shell): Rewrite to support regexes.
+
+2014-05-21  Leo Liu  <sdl.web@gmail.com>
+
+       * emacs-lisp/cl-lib.el (cl-endp): Fix last change.
+
+2014-05-19  Leo Liu  <sdl.web@gmail.com>
+
+       * emacs-lisp/cl-lib.el (cl-endp): Conform to CL's semantics.
+
+2014-05-18  Glenn Morris  <rgm@gnu.org>
+
+       * loadup.el:
+       * play/gametree.el: `track-mouse' is always defined since 2012-11-24.
+
+2014-05-14  Sam Steingold  <sds@gnu.org>
+
+       * progmodes/python.el (python-shell-get-or-create-process):
+       Do not bind `current-prefix-arg' so that C-c C-z does not talk
+       back unless requested.
+
+2014-05-14  Glenn Morris  <rgm@gnu.org>
+
+       * subr.el (with-file-modes): New macro.
+       * printing.el (pr-save-file-modes): Make obsolete.
+       * eshell/esh-util.el (eshell-with-file-modes): Make obsolete.
+       * emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2):
+       Add with-file-modes.
+       * doc-view.el (doc-view-make-safe-dir):
+       * epg.el (epg--start):
+       * files.el (locate-user-emacs-file, make-temp-file)
+       (backup-buffer-copy, move-file-to-trash):
+       * printing.el (pr-despool-print, pr-call-process, pr-text2ps):
+       * eshell/esh-util.el (eshell-with-private-file-modes)
+       (eshell-make-private-directory):
+       * net/browse-url.el (browse-url-mosaic):
+       * obsolete/mailpost.el (post-mail-send-it):
+       * obsolete/pgg-pgp.el (pgg-pgp-verify-region):
+       * obsolete/pgg-pgp5.el (pgg-pgp5-verify-region):
+       Use with-file-modes.
+
+       * vc/emerge.el (emerge-make-temp-file): Simplify.
+
 2014-05-14  Stephen Berman <stephen.berman@gmx.net>
             Stefan Monnier  <monnier@iro.umontreal.ca>
 
        Make pointless option obsolete.
        (emerge-temp-file-mode): Make non-functional option obsolete.
 
-2014-05-13  Michael Albinus  <michael.albinus@gmx.de>
+2014-05-14  Michael Albinus  <michael.albinus@gmx.de>
 
        * net/browse-url.el (browse-url):
        Use `unhandled-file-name-directory' when setting `default-directory',
        in order to circumvent stalled remote connections.  (Bug#17425)
 
+2014-05-14  Glenn Morris  <rgm@gnu.org>
+
+       * printing.el (subst-char-in-string, make-temp-file, pr-get-symbol):
+       Optimize on Emacs, which has the relevant functions for ages.
+
+2014-05-13  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * simple.el (undo-make-selective-list): Obey undo-no-redo.
+
+2014-05-12  Sam Steingold  <sds@gnu.org>
+
+       * calendar/time-date.el (seconds-to-string): New function to
+       pretty print time delay in seconds.
+
 2014-05-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * mpc.el (mpc-format): Trim Date to the year.
+       (mpc-songs-hashcons): Shorten the Date field.
+
        * emacs-lisp/nadvice.el (advice--interactive-form): Don't get fooled
        into autoloading just because of a silly indirection.
 
-2014-05-11  Santiago Payà i Miralta  <santiagopim@gmail.com>  (tiny change)
+2014-05-12  Santiago Payà i Miralta  <santiagopim@gmail.com>
 
        * vc/vc-hg.el (vc-hg-unregister): New function.  (Bug#17454)
 
-2014-05-11  Glenn Morris  <rgm@gnu.org>
+2014-05-12  Glenn Morris  <rgm@gnu.org>
 
        * emacs-lisp/find-gc.el: Move to ../admin.
 
-2014-05-10  Glenn Morris  <rgm@gnu.org>
-
        * printing.el (pr-version):
        * ps-print.el (ps-print-version): Also mention bug-gnu-emacs.
 
        * net/browse-url.el (browse-url-mosaic):
        Create /tmp/Mosaic.PID as a private file.
 
-2014-05-10  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-05-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/nadvice.el: Support adding a given function multiple times.
        (advice--member-p): If name is given, only compare the name.
        (advice--add-function): Pass the name, if any, to
        advice--remove-function.
 
-2014-05-09  Philipp Rumpf  <prumpf@gmail.com>  (tiny change)
+2014-05-12  Philipp Rumpf  <prumpf@gmail.com>  (tiny change)
 
        * electric.el (electric-indent-post-self-insert-function): Don't use
        `pos' after modifying the buffer (bug#17449).
 
-2014-05-09  Stefan Monnier  <monnier@iro.umontreal.ca>
-
-       * subr.el (function-put): Add function.
-
-2014-05-09  Stephen Berman  <stephen.berman@gmx.net>
+2014-05-12  Stephen Berman  <stephen.berman@gmx.net>
 
        * calendar/todo-mode.el (todo-insert-item-from-calendar):
        Correct argument list to conform to todo-insert-item--basic.
 
-2014-05-09  Glenn Morris  <rgm@gnu.org>
+2014-05-12  Glenn Morris  <rgm@gnu.org>
 
        * files.el (cd-absolute): Test if directory is accessible
        rather than executable.  (Bug#17330)
        * progmodes/compile.el (recompile):
        Handle C-u M-x recompile from a non-compilation buffer.  (Bug#17444)
 
-2014-05-08  Juri Linkov  <juri@jurta.org>
-
-       * dired.el (dired-check-switches, dired-switches-recursive-p):
-       New functions.  (Bug#17218)
-       (dired-switches-escape-p, dired-move-to-end-of-filename):
-       Use `dired-check-switches'.
-       (dired-insert-old-subdirs, dired-build-subdir-alist)
-       (dired-sort-R-check): Use `dired-switches-recursive-p'.
-
-2014-05-08  Glenn Morris  <rgm@gnu.org>
-
        * net/browse-url.el (browse-url-mosaic):
        Be careful when writing /tmp/Mosaic.PID.  (Bug#17428)
        This is CVE-2014-3423.
 
+2014-05-11  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * mouse.el: Use the normal toplevel loop while dragging.
+       (mouse-set-point): Handle multi-clicks.
+       (mouse-set-region): Handle multi-clicks for drags.
+       (mouse-drag-region): Update call accordingly.
+       (mouse-drag-track): Remove `do-mouse-drag-region-post-process' hack.
+       Use the normal event loop instead of a local while/read-event loop.
+       (global-map): Remove redundant bindings for double/triple-mouse-1.
+       * xt-mouse.el (xterm-mouse-translate-1): Only process one event at a time.
+       Generate synthetic down events when the protocol only sends up events.
+       (xterm-mouse-last): Remove.
+       (xterm-mouse--read-event-sequence-1000): Use xterm-mouse-last-down
+       terminal parameter instead.
+       (xterm-mouse--set-click-count): New function.
+       (xterm-mouse-event): Detect/generate double/triple clicks.
+       * reveal.el (reveal-close-old-overlays): Don't close while dragging.
+
+       * info.el (Info-quoted): New face.
+       (Info-mode-font-lock-keywords): New var.
+       (Info-mode): Use it.
+
+       * emacs-lisp/lisp-mode.el (preceding-sexp): Exclude leading "," which
+       are a hindrance for C-x C-e.
+
+2014-05-11  Leo Liu  <sdl.web@gmail.com>
+
+       * net/rcirc.el (rcirc-sentinel): Fix last change.
+
+2014-05-08  Sam Steingold  <sds@gnu.org>
+
+       * net/rcirc.el (rcirc-reconnect-delay): New user option.
+       (rcirc-sentinel): Auto-reconnect to the server if
+       `rcirc-reconnect-delay' is non-0 (but not more often than its
+       value in case the host is off-line).
+
+2014-05-09  Eli Zaretskii  <eliz@gnu.org>
+
+       * progmodes/grep.el (lgrep): Fix a typo in last commit.
+
+2014-05-09  Glenn Morris  <rgm@gnu.org>
+
+       * files.el (file-expand-wildcards):
+       * man.el (Man-support-local-filenames):
+       * printing.el (pr-i-directory, pr-interface-directory):
+       * progmodes/grep.el (lgrep, rgrep):
+       * textmodes/ispell.el (ispell-call-process)
+       (ispell-call-process-region, ispell-start-process)
+       (ispell-init-process): Use file-accessible-directory-p.
+
 2014-05-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * xt-mouse.el: Drop spurious/oddly shaped events (bug#17378).
        (xterm-mouse-event): Propagate it.
        (xterm-mouse-translate-1): Handle it.
 
-2014-05-07  Stephen Berman  <stephen.berman@gmx.net>
+2014-05-08  Stephen Berman  <stephen.berman@gmx.net>
 
        * calendar/todo-mode.el (todo-insert-item--apply-args): When all
        four slots of the parameter list are filled, make sure to pass it
        to the argument list of todo-insert-item--basic.
 
-2014-05-06  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-05-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/package.el (package-compute-transaction): Topological sort.
        Add optional `seen' argument to detect and break infinite loops.
 
-2014-05-06  Eli Zaretskii  <eliz@gnu.org>
+2014-05-08  Eli Zaretskii  <eliz@gnu.org>
 
        * emacs-lisp/find-gc.el (find-gc-unsafe, find-unsafe-funcs)
        (trace-unsafe, trace-use-tree): Make parentheses style be
        according to Emacs style.
 
-2014-05-06  Michael Albinus  <michael.albinus@gmx.de>
+2014-05-08  Michael Albinus  <michael.albinus@gmx.de>
 
        * net/tramp-sh.el (tramp-remote-process-environment):
        Remove HISTFILE and HISTSIZE; it's too late to set them here.
        name.  (Bug#17415)
        This is CVE-2014-3424.
 
-2014-05-06  Glenn Morris  <rgm@gnu.org>
+2014-05-08  Glenn Morris  <rgm@gnu.org>
 
        * emacs-lisp/find-gc.el (find-gc-source-directory): Give it a value.
        (find-gc-source-files): Update some names.
        Avoid predictable temp-file names.  (http://bugs.debian.org/747100)
        This is CVE-2014-3422.
 
-2014-05-05  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-05-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * minibuffer.el (completion--try-word-completion): Revert fix for
        Bug#15980 (bug#17375).
        Don't burp is xterm-mouse-last is not set as expected.
        Never return negative indices.
 
-2014-05-05  Dmitry Gutov  <dgutov@yandex.ru>
+2014-05-08  Dmitry Gutov  <dgutov@yandex.ru>
 
        * progmodes/ruby-mode.el (ruby-syntax-propertize-function):
        Backtrack one char if the global/char-literal var matcher hits
        inside a string.  The next char could be the beginning of an
        expression expansion.
 
-2014-05-05  Glenn Morris  <rgm@gnu.org>
+2014-05-08  Glenn Morris  <rgm@gnu.org>
 
        * help-fns.el (describe-function-1): Test for an autoload before a
        macro, since `macrop' works on autoloads.  (Bug#17410)
 
-2014-05-05  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-05-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * electric.el (electric-indent-functions-without-reindent): Add yaml.
 
        * minibuffer.el (completion-table-with-quoting) <completion--unquote>:
        Make sure the new point we return is within the new string (bug#17239).
 
-2014-05-03  Eli Zaretskii  <eliz@gnu.org>
+2014-05-05  Daniel Colascione  <dancol@dancol.org>
+
+       * progmodes/compile.el (compilation-error-regexp-alist-alist):
+       Port `gnu' pattern to rx.
+
+2014-05-05  Jarek Czekalski  <jarekczek@poczta.onet.pl>
+
+       Remove unneeded prompt when closing a buffer with active
+       emacsclient ("Buffer ... still has clients"), #16548.
+       * server.el (server-start): Remove the only call to:
+       (server-kill-buffer-query-function): Remove.
+
+2014-05-04  Leo Liu  <sdl.web@gmail.com>
+
+       * calendar/diary-lib.el (calendar-chinese-month-name-array):
+       Defvar to pacify compiler.
+
+2014-05-04  Eli Zaretskii  <eliz@gnu.org>
 
        * mail/rmailsum.el (rmail-new-summary-1): Fix a typo in a comment.
 
-2014-05-03  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-05-04  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * vc/ediff-diff.el (ediff-set-fine-diff-properties-in-one-buffer):
        Use nil rather than `default' for the "default" appearance (bug#17388).
        * vc/ediff-init.el (ediff-set-overlay-face): Don't set help-echo if the
        overlay is not visible.
 
-2014-05-02  Stephen Berman  <stephen.berman@gmx.net>
+2014-05-04  Stephen Berman  <stephen.berman@gmx.net>
 
        * calendar/todo-mode.el (todo-edit-file): Use display-warning.
        (todo-menu): Uncomment and update.
 
-2014-05-02  Stephen Berman  <stephen.berman@gmx.net>
+2014-05-04  Stephen Berman  <stephen.berman@gmx.net>
 
        * calendar/todo-mode.el: Reimplement item editing to have the same
        basic user interface as item insertion, and make small UI and
        (todo-key-bindings-t): Bind "e" to todo-edit-item.
        Remove bindings of deleted commands.
 
-2014-05-02  Leo Liu  <sdl.web@gmail.com>
+2014-05-04  Leo Liu  <sdl.web@gmail.com>
 
        * emacs-lisp/cl-macs.el (cl-deftype): Fix indentation.
 
-2014-05-01  Glenn Morris  <rgm@gnu.org>
+2014-05-04  Glenn Morris  <rgm@gnu.org>
 
        * allout-widgets.el (allout-widgets-tally)
        (allout-decorate-item-guides):
        * textmodes/reftex-parse.el (reftex-using-biblatex-p):
        Doc fixes (replace `iff').
 
+2014-05-04  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * mpc.el (mpc-volume-mouse-set): Don't burp at the boundaries.
+
+2014-05-04  Leo Liu  <sdl.web@gmail.com>
+
+       Support Chinese diary entries in calendar and diary.  (Bug#17393)
+       * calendar/cal-china.el (calendar-chinese-month-name-array): New var.
+       (calendar-chinese-from-absolute-for-diary)
+       (calendar-chinese-to-absolute-for-diary)
+       (calendar-chinese-mark-date-pattern, diary-chinese-mark-entries)
+       (diary-chinese-list-entries): New functions to list and mark
+       Chinese diary entries in the calendar window.
+       (diary-chinese-anniversary)
+       (diary-chinese-insert-anniversary-entry)
+       (diary-chinese-insert-entry, diary-chinese-insert-monthly-entry)
+       (diary-chinese-insert-yearly-entry): New commands to insert
+       Chinese diary entries.
+
+       * calendar/diary-lib.el (diary-font-lock-keywords):
+       Support font-locking Chinese dates.
+
+       * calendar/cal-menu.el (cal-menu-diary-menu): Add entries for
+       inserting Chinese diary entries.
+
+       * calendar/calendar.el (diary-chinese-entry-symbol):
+       New customizable variable.
+       (calendar-mode-map): Add bindings for inserting Chinese diary
+       entries.
+
+2014-05-03  Juri Linkov  <juri@jurta.org>
+
+       * dired.el (dired-check-switches, dired-switches-recursive-p):
+       New functions.  (Bug#17218)
+       (dired-switches-escape-p, dired-move-to-end-of-filename):
+       Use `dired-check-switches'.
+       (dired-insert-old-subdirs, dired-build-subdir-alist)
+       (dired-sort-R-check): Use `dired-switches-recursive-p'.
+
+2014-05-01  Barry O'Reilly  <gundaetiapo@gmail.com>
+
+       * simple.el (undo-make-selective-list): New algorithm fixes
+       incorrectness of position adjustments when undoing in region.
+       (Bug#17235)
+       (undo-elt-crosses-region): Make obsolete.
+       (undo-adjust-elt, undo-adjust-beg-end, undo-adjust-pos):
+       New functions to adjust positions using undo-deltas.
+
 2014-05-01  Stefan Monnier  <monnier@iro.umontreal.ca>
 
-       * mpc.el (mpc-volume-mouse-set): Don't burp at the boundaries.
+       * emacs-lisp/lisp-mode.el (lisp--match-hidden-arg): Only highlight past
+       the last consecutive closing paren (bug#17345).
+
+2014-04-30  Reuben Thomas  <rrt@sc3d.org>
+
+       * dired.el (dired-mode): make terminology for eXpunge command
+       consistent.  (Bug#17276)
 
 2014-04-30  Eli Zaretskii  <eliz@gnu.org>
 
        * dired.el (dired-initial-position-hook, dired-initial-position):
        Doc string fixes.
 
-2014-04-29  Glenn Morris  <rgm@gnu.org>
+2014-04-30  Glenn Morris  <rgm@gnu.org>
 
        * mail/rmail.el (rmail-quit): Handle killed summaries.  (Bug#17283)
 
-2014-04-27  Matthias Dahl  <matthias.dahl@binary-island.eu>
+2014-04-30  Matthias Dahl  <matthias.dahl@binary-island.eu>
 
        * faces.el (face-spec-recalc): Apply X resources only after the
        defface spec has been applied. Thus, X resources are no longer
-       overridden by the defface spec which also fixes issues on win32 where
+       overriden by the defface spec which also fixes issues on win32 where
        the toolbar coloring was wrong because it is set through X resources
-       and was (wrongfully) overridden.  (Bug#16694)
+       and was (wrongfully) overriden.  (Bug#16694)
 
-2014-04-28  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-04-30  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * textmodes/rst.el (electric-pair-pairs): Declare.
        (rst-mode): Set it (bug#17131).
 
-2014-04-27  Juri Linkov  <juri@jurta.org>
+2014-04-30  Juri Linkov  <juri@jurta.org>
 
        * desktop.el (desktop-value-to-string): Let-bind `print-length'
        and `print-level' to nil.  (Bug#17351)
 
-2014-04-25  Nicolas Richard  <theonewiththeevillook@yahoo.fr>
+2014-04-30  Nicolas Richard  <theonewiththeevillook@yahoo.fr>
 
        * battery.el (battery-update): Handle the case where battery
        status is "N/A" (bug#17319).
 
-2014-04-24  Eli Zaretskii  <eliz@gnu.org>
+2014-04-28  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * progmodes/ps-mode.el: Use SMIE.  Move string and comment recognition
+       to syntax-propertize.
+       (ps-mode-auto-indent): Mark as obsolete.
+       (ps-mode-font-lock-keywords-1): Remove string-or-comment handling.
+       (ps-mode-font-lock-keywords-3): Use symbol regexp operators instead of
+       word regexp operators.
+       (ps-mode-map): Move initialization into declaration.  Remove binding
+       for TAB, RET, >, ], and }.
+       (ps-mode-syntax-table): Move initialization into declaration.
+       Don't give word syntax to non-word chars.
+       (ps-run-mode-map): Move initialization into declaration.
+       (ps-mode-menu-main): Remove auto-indent entry.
+       (ps-mode-smie-rules): New function.
+       (ps-mode): Setup smie, syntax-propertize, and electric-indent-mode.
+       (ps-mode-looking-at-nested, ps-mode-match-string-or-comment): Remove.
+       (ps-mode--string-syntax-table): New const.
+       (ps-mode--syntax-propertize-special, ps-mode-syntax-propertize):
+       New functions.
+       (ps-mode-newline, ps-mode-tabkey, ps-mode-r-brace, ps-mode-r-angle)
+       (ps-mode-r-gt, ps-mode-r-balance): Remove functions.
+
+2014-04-27  Daniel Colascione  <dancol@dancol.org>
+
+       * term/xterm.el (xterm-paste): Use large finite timeout when
+       reading event to avoid putting keys in this-command-keys.
+
+2014-04-25  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * progmodes/perl-mode.el (perl--syntax-exp-intro-regexp): New var.
+       (perl-syntax-propertize-function): Use it.  Extend handling of
+       here-docs to the unquoted case.
+
+2014-04-25  Eli Zaretskii  <eliz@gnu.org>
 
        * tooltip.el (tooltip-show-help-non-mode, tooltip-show-help):
        Use equal-including-properties to compare help-echo strings (bug#17331).
 
-2014-04-24  Leo Liu  <sdl.web@gmail.com>
+2014-04-25  Leo Liu  <sdl.web@gmail.com>
 
        * emacs-lisp/lisp-mode.el (emacs-lisp-mode-syntax-table):
        Fix syntax for @.  (Bug#17325)
 
-2014-04-24  Daniel Colascione  <dancol@dancol.org>
+2014-04-25  Daniel Colascione  <dancol@dancol.org>
 
        * emacs-lisp/cl.el (gv): Require gv early to break eager
        macro-expansion cycles.
 
-2014-04-23  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-04-25  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * simple.el (region-active-p): Check there's a mark (bug#17324).
 
        * progmodes/perl-mode.el (perl-syntax-propertize-function): Slash after
        &, |, +, - and * can't be a division (bug#17317).
 
-2014-04-22  Stefan Monnier  <monnier@iro.umontreal.ca>
-
        * term/xterm.el (xterm--version-handler): Don't use modern xterm
        features on gnome-terminal (bug#16988).
 
+2014-04-25  Thien-Thi Nguyen  <ttn@gnu.org>
+
+       Improve Scheme font-locking for (define ((foo ...) ...) ...).
+
+       * progmodes/scheme.el (scheme-font-lock-keywords-1): To find
+       the declared object, ignore zero or more parens, not zero or one.
+
+2014-04-24  Leo Liu  <sdl.web@gmail.com>
+
+       * progmodes/xscheme.el (xscheme-expressions-ring)
+       (xscheme-expressions-ring-yank-pointer, xscheme-running-p)
+       (xscheme-control-g-disabled-p, xscheme-process-filter-state)
+       (xscheme-allow-output-p, xscheme-prompt)
+       (xscheme-string-accumulator, xscheme-mode-string): Use defvar-local.
+
+       * progmodes/scheme.el (would-be-symbol, next-sexp-as-string):
+       Comment out unused functions.
+
+2014-04-24  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * info.el: Use lexical-binding and cl-lib.
+       Use defvar-local and setq-local instead of make-local-variable.
+       (Info-apropos-matches): Avoid add-to-list.
+       (Info-edit-mode-map): Fix obsolescence call to Info-edit-map.
+
+2014-04-24  Daniel Colascione  <dancol@dancol.org>
+
+       * progmodes/sh-script.el (sh-builtins): Add coproc to list of bash builtins.
+
+2014-04-23  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * emacs-lisp/cl-macs.el (cl--loop-let): Fix last merge.
+
 2014-04-22  Michael Heerdegen  <michael_heerdegen@web.de>
 
        * dired.el (dired-insert-set-properties): Do not consider
        (tramp-do-copy-or-rename-file-out-of-band): Do not quote `source'
        and `target' twice.
 
-2014-04-21  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-04-22  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * dframe.el (dframe-get-focus): Remove `hook' argument (bug#17311).
        * speedbar.el (speedbar-get-focus): Run the "hook" afterwards instead.
 
        * emacs-lisp/cl-macs.el (cl--loop-let): Avoid `nil' as var name.
 
-2014-04-21  Michael Albinus  <michael.albinus@gmx.de>
+2014-04-22  Michael Albinus  <michael.albinus@gmx.de>
 
        * net/tramp-sh.el (tramp-sh-handle-file-name-all-completions):
        Set "IFS=" when using read builtin, in order to preserve spaces in
        the file name.  Add test messages for hunting a bug on hydra.
        (tramp-get-ls-command): Undo using "-b" argument.  It doesn't help.
 
-2014-04-21  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-04-22  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * progmodes/prog-mode.el (prettify-symbols--compose-symbol):
        Don't prettify a word within a symbol.
 
-2014-04-20  Michael Albinus  <michael.albinus@gmx.de>
+2014-04-22  Michael Albinus  <michael.albinus@gmx.de>
 
        * net/tramp-sh.el (tramp-get-ls-command): Use "-b" argument if
        possible.
 
+2014-04-22  Daniel Colascione  <dancol@dancol.org>
+
+       * emacs-lisp/byte-run.el (function-put): Unbreak build: don't
+       use defun to define `function-put'.
+
+2014-04-22  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * emacs-lisp/lisp-mode.el (lisp--match-hidden-arg): New function.
+       (lisp-el-font-lock-keywords-2, lisp-cl-font-lock-keywords-2): Use it.
+       (lisp-mode-variables): Set font-lock-extra-managed-props.
+
+       * emacs-lisp/byte-run.el (function-put): New function.
+       (defun-declarations-alist): Use it.  Add `pure' and `side-effect-free'.
+       * emacs-lisp/cl-macs.el (cl-defstruct, cl-struct-sequence-type)
+       (cl-struct-slot-info, cl-struct-slot-offset, cl-struct-slot-value):
+       Use them.
+
+2014-04-22  Daniel Colascione  <dancol@dancol.org>
+
+       * emacs-lisp/macroexp.el (internal-macroexpand-for-load):
+       Add `full-p' parameter; when nil, call `macroexpand' instead of
+       `macroexpand-all'.
+
+       * emacs-lisp/byte-run.el (eval-when-compile, eval-and-compile):
+       Improve docstrings.
+
+       * emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment):
+       Use lambda function values, not quoted lambdas.
+       (byte-compile-recurse-toplevel): Remove extraneous &optional.
+
+       * emacs-lisp/cl-macs.el
+       (cl-struct-sequence-type, cl-struct-slot-info): Declare pure.
+       (cl-struct-slot-value): Conditionally use aref or nth so that the
+       compiler produces optimal code.
+
+2014-04-22  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * emacs-lisp/cl-macs.el (cl-struct-slot-offset): Mark as pure.
+       (inline): Don't inline cl--set-elt.
+       (cl-struct-slot-value): Remove explicit gv-setter and compiler-macro.
+       Define as inlinable instead.
+       (cl-struct-set-slot-value): Remove.
+
+       * emacs-lisp/cl-lib.el (cl--set-elt): Remove.
+       * emacs-lisp/cl-seq.el (cl-replace, cl-substitute, cl-nsubstitute):
+       Use setf instead.
+
+2014-04-21  Daniel Colascione  <dancol@dancol.org>
+
+       * emacs-lisp/cl-macs.el (cl--const-expr-val): We didn't need the
+       last two parameters after all.
+       (cl--expr-contains,cl--compiler-macro-typep,cl--compiler-macro-member)
+       (cl--compiler-macro-assoc,cl-struct-slot-value)
+       (cl-struct-set-slot-value): Stop using them.
+
+(2014-04-21  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * image-mode.el (image-mode-window-put): Don't assume there's a `t'
+       entry in image-mode-winprops-alist.
+
+2014-04-21  Daniel Colascione  <dancol@dancol.org>
+
+       * emacs-lisp/bytecomp.el (byte-compile-recurse-toplevel): New function.
+       (byte-compile-recurse-toplevel, byte-compile-initial-macro-environment)
+       (byte-compile-toplevel-file-form): Use it.
+
+       * emacs-lisp/cl-macs.el:
+       (cl--loop-let): Properly destructure `while' clauses.
+
+2014-04-20  Daniel Colascione  <dancol@dancol.org>
+
+       * vc/vc.el (vc-root-dir): New public autoloaded function for
+       generically finding the current VC root.
+       * vc/vc-hooks.el (vc-not-supported): New error.
+       (vc-call-backend): Signal `vc-not-supported' instead of generic error.
+
+2014-04-20  Daniel Colascione  <dancol@dancol.org>
+
+       * emacs-lisp/cl-macs.el (cl-the): Make `cl-the' assert its type
+       argument.
+       (cl--const-expr-val): cl--const-expr-val should macroexpand its
+       argument in case we're inside a symbol-macrolet.
+       (cl--do-arglist, cl--compiler-macro-typep)
+       (cl--compiler-macro-member, cl--compiler-macro-assoc): Pass macro
+       environment to `cl--const-expr-val'.
+       (cl-struct-sequence-type,cl-struct-slot-info)
+       (cl-struct-slot-offset, cl-struct-slot-value)
+       (cl-struct-set-slot-value): New functions.
+
 2014-04-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * progmodes/sh-script.el (sh-smie--sh-keyword-p): Handle variable
 
        * net/tramp-compat.el (tramp-unload-hook): Unload `tramp-loaddefs'.
 
-2014-04-16  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-04-17  Daniel Colascione  <dancol@dancol.org>
+
+       Add support for bracketed paste mode; add infrastructure for
+       managing terminal mode enabling and disabling automatically.
+
+       * xt-mouse.el:
+       (xterm-mouse-mode): Simplify.
+       (xterm-mouse-tracking-enable-sequence)
+       (xterm-mouse-tracking-disable-sequence): New constants.
+       (turn-on-xterm-mouse-tracking-on-terminal)
+       (turn-off-xterm-mouse-tracking-on-terminal):
+       Use tty-mode-set-strings and tty-mode-reset-strings terminal
+       parameters instead of random hooks.
+       (turn-on-xterm-mouse-tracking)
+       (turn-off-xterm-mouse-tracking): Delete.
+
+       * term/xterm.el (xterm-extra-capabilities): Fix bitrotted comment.
+       (xterm-paste-ending-sequence): New constant.
+       (xterm-paste): New command used for bracketed paste support.
+
+       (xterm-modify-other-keys-terminal-list): Delete obsolete variable.
+       (terminal-init-xterm-bracketed-paste-mode): New function.
+       (terminal-init-xterm): Call it.
+       (terminal-init-xterm-modify-other-keys): Use tty-mode-set-strings
+       and tty-mode-reset-strings instead of random hooks.
+       (xterm-turn-on-modify-other-keys)
+       (xterm-turn-off-modify-other-keys)
+       (xterm-remove-modify-other-keys): Delete obsolete functions.
+
+       * term/screen.el: Rewrite to just use the xterm code.
+       Add copyright notice.  Mention tmux.
+
+2014-04-17  Ian D  <dunni@gnu.org>  (tiny change)
+
+       * image-mode.el (image-mode-window-put): Also update the property of
+       the "default window".
+       * doc-view.el (doc-view-new-window-function): If no window
+       exists, move to the last known page.
 
-       * nxml/nxml-mode.el (nxml-fontify-matcher): Make sure propertization
-       was done (bug#17264).
-       * nxml/xmltok.el (xmltok-scan-after-comment-open): Extend unclosed
-       comment to EOB.
+2014-04-16  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * progmodes/perl-mode.el (perl-calculate-indent): Don't auto-indent in
        here-documents (bug#17262).
        * term/pc-win.el (x-list-fonts, x-get-selection-value):
        Provide doc strings, as required by snarf-documentation.
 
-2014-04-15  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-04-16  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * ps-def.el (ps-generate-postscript-with-faces1): Use the new `sorted'
        arg of overlays-at.  Use `invisible-p'.
        overlays-at.
        (hfy-fontify-buffer): Remove unused var `orig-ovls'.
 
-2014-04-14  João Távora  <joaotavora@gmail.com>
+2014-04-16  João Távora  <joaotavora@gmail.com>
 
        * net/shr.el (shr-expand-url): Use `expand-file-name' for relative
        links.  (Bug#17217).
 
-2014-04-14  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+2014-04-16  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
        * vc/ediff-diff.el (ediff-set-fine-diff-properties-in-one-buffer):
        Use mapc to loop over a vector.  (Bug#17257).
 
-2014-04-13  Michael Albinus  <michael.albinus@gmx.de>
+2014-04-16  Michael Albinus  <michael.albinus@gmx.de>
 
        * net/tramp-sh.el (tramp-sh-handle-file-truename): Revert previous
        patch, there are new problems with file names containing spaces.
        Get rid of backticks.  (Bug#17238)
 
-2014-04-13  João Távora  <joaotavora@gmail.com>
+2014-04-16  João Távora  <joaotavora@gmail.com>
 
        * elec-pair.el (electric-pair--syntax-ppss): Simplify and fix
        possible bug.
 
-2014-04-13  Eli Zaretskii  <eliz@gnu.org>
+2014-04-16  Eli Zaretskii  <eliz@gnu.org>
 
        * frame.el (blink-cursor-blinks, blink-cursor-blinks-done): Doc fixes.
        (blink-cursor-mode): Mention customization variables and the
        effect of 'blink-cursor-blinks'.
 
-2014-04-12  Barry O'Reilly  <gundaetiapo@gmail.com>
+2014-04-16  Barry O'Reilly  <gundaetiapo@gmail.com>
 
        * simple.el (undo): Prevent insertion of identity mapping into
        undo-equiv-table so as undo-only does not inf loop in the presence
        of consecutive nils in undo list.
 
-2014-04-12  Matthias Dahl  <matthias.dahl@binary-island.eu>
+2014-04-16  Matthias Dahl  <matthias.dahl@binary-island.eu>
 
        * faces.el (make-face): Deprecate optional argument as it is no
        longer needed/used since the conditional X resources handling
        has been pushed down to make-face-x-resource-internal itself.
        (make-empty-face): Don't pass optional argument to make-face.
 
+2014-04-16  Karl Fogel  <kfogel@red-bean.com>
+
+       * savehist.el (savehist-save): Remove workaround for a read-passwd
+       bug that was fixed before 24.3.  Thanks to Juanma Barranquero for
+       noticing that the shim was still present.
+
+2014-04-14  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * doc-view.el (doc-view-set-doc-type): Ignore file name case; add .pps.
+
+2014-04-14  Juanma Barranquero  <lekktu@gmail.com>
+
+       * faces.el (face-set-after-frame-default): Remove unused local variable.
+
+2014-04-12  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * progmodes/grep.el: Use lexical-binding.
+       (grep-expand-template): Pass explicit lexical env to `eval'.
+       (zrgrep): Let-bind grep-find-template explicitly.
+
+       * emacs-lisp/cl-lib.el (current-case-table): Remove setter.
+       * leim/quail/sisheng.el (sisheng-list): Use with-case-table.
+
 2014-04-12  Eli Zaretskii  <eliz@gnu.org>
 
        * international/characters.el <standard-case-table>: Add entries
 
 2014-04-12  Leo Liu  <sdl.web@gmail.com>
 
-       * progmodes/octave.el (completion-table-with-cache): Define if not
-       available.
-       (octave-goto-function-definition)
-       (octave-sync-function-file-names)
-       (octave-find-definition-default-filename): Backquote upattern for
-       compatibility.
+       * progmodes/octave.el (completion-table-with-cache):
+       Define if not available.
+       (octave-goto-function-definition, octave-sync-function-file-names)
+       (octave-find-definition-default-filename):
+       Backquote upattern for compatibility.
 
-2014-04-11  Michael Albinus  <michael.albinus@gmx.de>
+2014-04-12  Michael Albinus  <michael.albinus@gmx.de>
 
        * net/tramp-sh.el (tramp-sh-handle-file-truename): Quote the file
        name twice due to backticks.  (Bug#17238)
 
-2014-04-11  Glenn Morris  <rgm@gnu.org>
+2014-04-12  Glenn Morris  <rgm@gnu.org>
 
        * term/w32-win.el (x-win-suspend-error):
        * term/x-win.el (x-win-suspend-error): Sync docs.
 
-2014-04-10  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-04-12  Matthias Dahl  <matthias.dahl@binary-island.eu>
+
+       * faces.el (make-face): Remove deprecated optional argument.
+       The conditional application of X resources is handled directly by
+       make-face-x-resource-internal since Emacs 24.4.
+       (make-empty-face): Don't pass optional argument to make-face.
+
+2014-04-11  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (EMACSDATA, EMACSDOC, EMACSPATH): Unexport.  (Bug#16429)
+
+2014-04-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        Ediff's overlay priorities cause more trouble than they solve.
        * vc/ediff-init.el (ediff-shadow-overlay-priority): Remove variable.
        (ediff-set-fine-diff-properties-in-one-buffer): Don't mess with
        overlay priorities.
 
-2014-04-10  Feng Li  <fengli@gmail.com>  (tiny change)
+2014-04-11  Feng Li  <fengli@gmail.com>  (tiny change)
 
        * progmodes/pascal.el (pascal-font-lock-keywords): Fix incorrect format
        entry; use symbol boundaries to avoid mis-matches.
 
-2014-04-10  Michael Albinus  <michael.albinus@gmx.de>
+2014-04-11  Michael Albinus  <michael.albinus@gmx.de>
 
        * net/tramp.el (tramp-file-name-handler)
        (tramp-completion-file-name-handler): Avoid recursive loading.
        * net/tramp-sh.el (tramp-make-copy-program-file-name):
        Quote result also locally.
 
+2014-04-11  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * emulation/cua-base.el (<toplevel>, cua--pre-command-handler-1):
+       Remove left-over code.
+
+       * newcomment.el (comment-indent-new-line): Sink code where it's used.
+       Reuse the previous comment's indentation unconditionally if it's on its
+       own line.
+
+2014-04-09  Daniel Colascione  <dancol@dancol.org>
+
+       * emacs-lisp/lisp.el (backward-up-list): Add `escape-strings',
+       `no-syntax-crossing' arguments.  Forward to `up-list'.
+       (up-list): Add `escape-strings', `no-syntax-crossing' arguments.
+       Implement logic for escaping from strings.  Use narrowing to deal
+       with corner cases.
+
+2014-04-09  Leo Liu  <sdl.web@gmail.com>
+
+       * net/rcirc.el (rcirc-connection-info): New variable.
+       (rcirc-connect): Use it to store connection info.
+       (rcirc-buffer-process): Avoid get-buffer-process which returns nil
+       for killed process.
+       (rcirc-cmd-reconnect): New command.  (Bug#17045)
+       (rcirc-mode, set-rcirc-encode-coding-system)
+       (set-rcirc-decode-coding-system, rcirc-connect): Use setq-local.
+
+2014-04-09  Daniel Colascione  <dancol@dancol.org>
+
+       * emacs-lisp/cl-indent.el: Add comment claiming
+       facility is also good for elisp.
+       (lisp-indent-find-method): New function.
+       (common-lisp-indent-function): Recognize cl-loop.
+       (common-lisp-indent-function-1): Recognize cl constructs; use
+       `lisp-indent-find-method' instead of `get' directly.
+       (if): Use else-body style for elisp.
+
 2014-04-09  Dmitry Gutov  <dgutov@yandex.ru>
 
        * progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight more
        Module methods.  (Bug#17216)
 
-2014-04-08  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-04-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * help.el (describe-bindings): Fix buffer handling (bug#17210).
        (describe-bindings-internal): Mark obsolete.
 
+2014-04-09  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * subr.el (with-silent-modifications): Don't bind deactivate-mark,
+       buffer-file-name, and buffer-file-truename any more.
+
+2014-04-08  Leo Liu  <sdl.web@gmail.com>
+
+       Use lexical-binding and require cl-lib.
+       * net/rcirc.el (rcirc, rcirc-handler-ctcp-KEEPALIVE)
+       (rcirc-handler-generic, rcirc-fill-paragraph)
+       (rcirc-format-response-string, rcirc-target-buffer)
+       (rcirc-last-line, rcirc-record-activity, rcirc-split-activity)
+       (rcirc-activity-string, rcirc-make-trees, rcirc-cmd-ctcp)
+       (rcirc-ctcp-sender-PING, rcirc-browse-url)
+       (rcirc-markup-timestamp, rcirc-markup-attributes)
+       (rcirc-markup-my-nick, rcirc-markup-urls)
+       (rcirc-markup-bright-nicks, rcirc-markup-fill)
+       (rcirc-check-auth-status, rcirc-handler-WALLOPS)
+       (rcirc-handler-JOIN, rcirc-handler-PART-or-KICK)
+       (rcirc-handler-PART, rcirc-handler-KICK, rcirc-handler-QUIT)
+       (rcirc-handler-NICK, rcirc-handler-PING, rcirc-handler-PONG)
+       (rcirc-handler-TOPIC, rcirc-handler-301, rcirc-handler-317)
+       (rcirc-handler-332, rcirc-handler-333, rcirc-handler-477)
+       (rcirc-handler-MODE, rcirc-handler-353, rcirc-handler-366)
+       (rcirc-authenticate, rcirc-handler-INVITE, rcirc-handler-ERROR)
+       (rcirc-handler-ctcp-VERSION, rcirc-handler-ctcp-TIME)
+       (rcirc-handler-CTCP-response): Fix unused arguments warnings and
+       use cl-lib.
+
 2014-04-07  João Távora  <joaotavora@gmail.com>
 
-       * elec-pair.el:
-       (electric-pair--syntax-ppss): When inside comments parse from
-       comment beginning.
+       * elec-pair.el (electric-pair--syntax-ppss):
+       When inside comments parse from comment beginning.
        (electric-pair--balance-info): Fix typo in comment.
        (electric-pair--in-unterminated-string-p): Delete.
        (electric-pair--unbalanced-strings-p): New function.
        (electric-pair-inhibit-if-helps-balance): Decide quote pairing
        according to `electric-pair--in-unterminated-string-p'
 
-2014-04-07  João Távora  <joaotavora@gmail.com>
-
        * elec-pair.el (electric-pair-inhibit-if-helps-balance):
        Inhibit quote pairing if point-max is inside an unterminated string.
        (electric-pair--looking-at-unterminated-string-p): Delete.
        * shell.el (shell-directory-tracker):
        Go back to just ignoring failures.  (Bug#17159)
 
-2014-04-06  João Távora  <joaotavora@gmail.com>
+2014-04-07  João Távora  <joaotavora@gmail.com>
 
        Fix `electric-pair-delete-adjacent-pairs' in modes binding
        backspace. (bug#16981)
        a new `electric-pair-delete-pair' command.
        (electric-pair-delete-pair): New command.
 
-2014-04-06  João Távora  <joaotavora@gmail.com>
-
        * progmodes/python.el (python-electric-pair-string-delimiter):
        Fix triple-quoting electricity.  (Bug#17192)
 
-2014-04-06  João Távora  <joaotavora@gmail.com>
-
        * elec-pair.el (electric-pair-post-self-insert-function):
        Don't skip whitespace when `electric-pair-text-pairs' and
        `electric-pair-pairs' were used. syntax to
        electric-pair--skip-whitespace.  (Bug#17183)
 
-2014-04-06  Eli Zaretskii  <eliz@gnu.org>
+2014-04-07  Eli Zaretskii  <eliz@gnu.org>
 
        * leim/quail/ipa.el (ipa-x-sampa): Fix the character produced for
        "<F>".  (Bug#17199)
 
-2014-04-06  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-04-07  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * mpc.el (mpc--status-timer-run): Disable timer if not displayed.
        (mpc--status-idle-timer-run): Use mpc--status-timer-run.
 
-2014-04-05  Glenn Morris  <rgm@gnu.org>
+2014-04-07  Glenn Morris  <rgm@gnu.org>
 
        * help.el (view-lossage): Doc tweak.
 
-2014-04-05  Matthias Dahl  <matthias.dahl@binary-island.eu>
+2014-04-07  Matthias Dahl  <ml_emacs-lists@binary-island.eu>
 
        * faces.el (face-spec-recalc): Call make-face-x-resource-internal
        only when inhibit-x-resources is nil, and do that earlier in the
        (face-set-after-frame-default): Don't call
        make-face-x-resource-internal here.  (Bug#16434)
 
-2014-04-04  Tassilo Horn  <tsdh@gnu.org>
+2014-04-07  Tassilo Horn  <tsdh@gnu.org>
 
        * doc-view.el (doc-view-bookmark-jump):
        Use `bookmark-after-jump-hook' to jump to the right page after the
        buffer is shown in a window.  (bug#16090)
 
-2014-04-04  Eli Zaretskii  <eliz@gnu.org>
+2014-04-07  Eli Zaretskii  <eliz@gnu.org>
 
        * international/characters.el (mirroring): Fix last change:
        instead of loading uni-mirrored.el explicitly, do that implicitly
        by creating the 'mirroring' uniprop table.  This avoids announcing
        the loading of uni-mirrored.el.
 
-2014-04-04  Glenn Morris  <rgm@gnu.org>
+2014-04-07  Glenn Morris  <rgm@gnu.org>
 
        * files.el (buffer-stale--default-function)
        (buffer-stale-function, revert-buffer--default):
        * autorevert.el (auto-revert-buffers): Doc tweaks.
 
-2014-04-03  Eli Zaretskii  <eliz@gnu.org>
+2014-04-07  Eli Zaretskii  <eliz@gnu.org>
 
        * international/characters.el: Preload uni-mirrored.el.  (Bug#17169)
 
-2014-04-03  Glenn Morris  <rgm@gnu.org>
+2014-04-07  Glenn Morris  <rgm@gnu.org>
 
        * files.el (make-backup-file-name-function)
        (make-backup-file-name, make-backup-file-name--default-function)
        (make-backup-file-name-function): Bump :version.
        Restore nil as a valid but deprecated custom type.
 
-2014-04-03  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-04-07  Stefan Monnier  <monnier@iro.umontreal.ca>
 
-       * progmodes/perl-mode.el (perl-syntax-propertize-function): Handle $'
-       used as a variable (bug#17174).
-
-2014-04-02  Stefan Monnier  <monnier@iro.umontreal.ca>
+       * progmodes/perl-mode.el (perl-syntax-propertize-function):
+       Handle $' used as a variable (bug#17174).
 
        * progmodes/perl-mode.el (perl-indent-new-calculate):
        Handle forward-sexp failure (bug#16985).
        (perl-syntax-propertize-function): Add "foreach" and "for" statement
        modifiers introducing expressions (bug#17116).
 
+2014-04-06  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * dired-aux.el (dired-file-set-difference): Use lexical-scoping.
+
+2014-04-05  Leo Liu  <sdl.web@gmail.com>
+
+       * emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression):
+       Add define-compilation-mode.
+
+2014-04-04  João Távora  <joaotavora@gmail.com>
+
+       * elec-pair.el (electric-pair--syntax-ppss): When inside comments
+       parse from comment beginning.
+       (electric-pair--balance-info): Fix typo in comment.
+       (electric-pair--in-unterminated-string-p): Delete.
+       (electric-pair--unbalanced-strings-p): New function.
+       (electric-pair-string-bound-function): New var.
+       (electric-pair-inhibit-if-helps-balance): Decide quote pairing
+       according to `electric-pair--in-unterminated-string-p'.
+
+2014-04-04  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * textmodes/reftex-parse.el (reftex--index-tags): Rename `index-tags'.
+       Move declaration before first use.
+       (reftex-move-to-next-arg): Silence compiler warning.
+
+2014-04-04  Joost Kremers  <joostkremers@fastmail.fm>  (tiny change)
+
+       * textmodes/reftex-toc.el (reftex-toc, reftex-re-enlarge):
+       Use `window-total-width' instead of `window-width'.
+
+2014-04-03  Daniel Colascione  <dancol@dancol.org>
+
+       * subr.el (set-transient-map): Remove rms's workaround entirely;
+       use new `suspicious-object' subr to mark our lambda for closer
+       scrutiny during gc.
+
+2014-04-02  Richard Stallman  <rms@gnu.org>
+
+       * subr.el (set-transient-map): Comment out previous change.
+
 2014-04-02  Glenn Morris  <rgm@gnu.org>
 
        * menu-bar.el (menu-bar-file-menu):
 
        * simple.el (command-execute): Respect nil disabled-command-function.
 
-2014-04-01  Nicolas Richard  <theonewiththeevillook@yahoo.fr>
+2014-04-02  Nicolas Richard  <theonewiththeevillook@yahoo.fr>
 
        * simple.el (command-execute): Do not execute the command when it
        is disabled; fixes thinko in 2013-02-20 conversion from C.  (Bug#17151)
 
-2014-03-29  Juri Linkov  <juri@jurta.org>
+2014-04-02  Juri Linkov  <juri@jurta.org>
 
        * dired-aux.el (dired-compress-file): Don't use string-match-p
        because its match data is used afterwards.
 
-2014-03-28  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-04-02  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/package.el (package-built-in-p): Treat a min-version of
        0 like nil.
 
+2014-04-02  João Távora  <joaotavora@gmail.com>
+
+       * elec-pair.el (electric-pair-inhibit-if-helps-balance):
+       Inhibit quote pairing if point-max is inside an unterminated string.
+       (electric-pair--looking-at-unterminated-string-p):
+       Delete.
+       (electric-pair--in-unterminated-string-p): New function.
+
+2014-04-01  Daniel Colascione  <dancol@dancol.org>
+
+       * minibuffer.el (minibuffer-complete): Prevent assertion failure
+       when trying to complete the prompt.
+
+2014-03-31  Leo Liu  <sdl.web@gmail.com>
+
+       * emacs-lisp/eldoc.el (eldoc-print-current-symbol-info):
+       Refactor out eldoc-documentation-function-default.
+       (eldoc-documentation-function-default): New function.
+       (eldoc-documentation-function): Change value.
+
+2014-03-31  Glenn Morris  <rgm@gnu.org>
+
+       * simple.el (cycle-spacing--context, cycle-spacing): Doc tweaks.
+
+       * progmodes/vhdl-mode.el (vhdl-speedbar-select-mra)
+       (vhdl-compose-components-package, vhdl-compose-configuration):
+       Abbreviate default-directory (missing from some previous upstream sync).
+
+2014-03-31  Reto Zimmermann  <reto@gnu.org>
+
+       Sync with upstream vhdl mode v3.35.2.
+       * progmodes/vhdl-mode.el (vhdl-version, vhdl-time-stamp): Update.
+       (top-level): No longer require assoc.
+       (vhdl-asort, vhdl-anot-head-p, vhdl-aput, vhdl-adelete, vhdl-aget):
+       New functions.  Use throughout to replace aget etc.
+       (vhdl-aput-delete-if-nil): Rename from vhdl-aput.
+       (vhdl-update-file-contents): Update for vhdl-aput-delete-if-nil rename.
+       (vhdl-template-replace-header-keywords): Fix bug for "<title string>".
+       (vhdl-compile-init): Do not initialize regexps for Emacs 22+.
+       (vhdl-error-regexp-emacs-alist): Remove regexps from all compilers
+       except `vhdl-compiler'.
+       (vhdl-error-regexp-add-emacs): Remove all other compilers,
+       when appropriate.
+
+2014-03-31  Glenn Morris  <rgm@gnu.org>
+
+       * progmodes/vhdl-mode.el (vhdl-expand-abbrev, vhdl-expand-paren):
+       Revert 2014-03-26 merge goof; go back to using defalias.
+
+2014-03-30  Daniel Colascione  <dancol@dancol.org>
+
+       * comint.el (comint-send-input):
+       Deactivate completion-in-region-mode before we send comint input.
+       (Bug#17139).
+
+       * simple.el (keyboard-quit): Deactivate completion-in-region-mode
+       on keyboard-quit.
+
+2014-03-29  Glenn Morris  <rgm@gnu.org>
+
+       * textmodes/reftex.el: Manage most autoloads automatically.
+       * textmodes/reftex-auc.el, textmodes/reftex-cite.el:
+       * textmodes/reftex-dcr.el, textmodes/reftex-global.el:
+       * textmodes/reftex-index.el, textmodes/reftex-parse.el:
+       * textmodes/reftex-ref.el, textmodes/reftex-sel.el:
+       * textmodes/reftex-toc.el: Set generated-autoload-file,
+       and add autoload cookies for reftex.el.
+       * Makefile.in (AUTOGEN_VCS): Add textmodes/reftex.el.
+
+2014-03-28  Glenn Morris  <rgm@gnu.org>
+
+       * cus-start.el (report-emacs-bug-address): Set custom properties.
+       * mail/emacsbug.el (report-emacs-bug-address):
+       Variable is now defined in emacs.c.
+
+       * mail/emacsbug.el (report-emacs-bug):
+       Include system-configuration-features.
+
+2014-03-28  Michal Nazarewicz  <mina86@mina86.com>
+
+       * simple.el (cycle-spacing): Never delete spaces on first run by
+       default, but do so in a new 'fast mode and if there are already
+       N spaces (the previous behavior).
+       Compare N with its value in previous invocation so that changing
+       prefix argument restarts `cycle-spacing' sequence.
+       The idea is that with this change, binding M-SPC to
+       `cycle-spacing' should not introduce any changes in behavior of
+       the binding so long as users do not type M-SPC twice in a raw with
+       the same prefix argument or lack thereof.
+
+2014-03-28  Glenn Morris  <rgm@gnu.org>
+
+       * faces.el (term-file-aliases): New variable.
+       (tty-run-terminal-initialization): Respect term-file-aliases.
+       * term/apollo.el, term/vt102.el, term/vt125.el, term/vt201.el:
+       * term/vt220.el, term/vt240.el, term/vt300.el, term/vt320.el:
+       * term/vt400.el, term/vt420.el: Remove files, replaced by aliases.
+
+2014-03-27  Glenn Morris  <rgm@gnu.org>
+
+       * startup.el (inhibit-startup-hooks): Doc tweak.
+       (normal-top-level): Simplify running of hooks.
+       For window-setup-hook, respect inhibit-startup-hooks.
+       (command-line-1): Don't set window-setup-hook to nil.
+
+       Allow selective autoloading from obsolete/ directory.
+       * Makefile.in (obsolete-autoloads): New rule.
+       (autoloads): Run obsolete-autoloads.
+       * obsolete/iswitchb.el (iswitchb-mode): Use obsolete-autoload.
+       * simple.el (iswitchb-mode): Remove hand-written autoloads.
+
 2014-03-27  Dmitry Gutov  <dgutov@yandex.ru>
 
        * progmodes/ruby-mode.el (ruby-font-lock-keywords):
        * emacs-lisp/package-x.el (package--archive-contents-from-url):
        Use url-insert-file-contents; package-handle-response no longer exists.
 
+2014-03-26  Daniel Colascione  <dancol@dancol.org>
+
+       * simple.el (process-menu-mode-map): New variable.
+       (process-menu-delete-process): New command.
+
 2014-03-26  Juanma Barranquero  <lekktu@gmail.com>
 
        * emacs-lisp/package.el: Fix bug#16733 (again).
        dynamic binding of `buffer'.
        (describe-package-1): Do not decode readme-string.
 
-2014-03-25  Barry O'Reilly  <gundaetiapo@gmail.com>
-
-       * simple.el (primitive-undo): Correction to 2014-03-24 change.
-
-2014-03-25  Michael Albinus  <michael.albinus@gmx.de>
+2014-03-26  Michael Albinus  <michael.albinus@gmx.de>
 
        * net/tramp.el (tramp-methods, tramp-connection-timeout): Fix docstring.
 
        (tramp-do-copy-or-rename-file-directly): In the `rename' case,
        check whether source directory has set the sticky bit.
 
-2014-03-24  Barry O'Reilly  <gundaetiapo@gmail.com>
+2014-03-26  Barry O'Reilly  <gundaetiapo@gmail.com>
 
        * simple.el (primitive-undo): Only process marker adjustments
        validated against their corresponding (TEXT . POS).  Issue warning
        (undo-elt-in-region): Return nil when passed a marker adjustment
        and explain in function doc.
 
-2014-03-24  Dmitry Gutov  <dgutov@yandex.ru>
-
-       * emacs-lisp/package.el (package--add-to-archive-contents):
-       Include already installed and built-in packages in
-       `package-archive-contents'.
-       (package-install): Don't include already installed packages in the
-       options during interactive invocation.  (Bug#16762)
-
-2014-03-24  Daniel Colascione  <dancol@dancol.org>
-
-       * emacs-lisp/cl-macs.el (cl--do-arglist): Use `plist-member'
-       instead of cl-loop search function.
-
-2014-03-24  Juanma Barranquero  <lekktu@gmail.com>
-
-       * frameset.el (frameset--initial-params): Fix typo in parameter name.
-
-2014-03-24  Nicolas Richard  <theonewiththeevillook@yahoo.fr>
+2014-03-26  Nicolas Richard  <theonewiththeevillook@yahoo.fr>
 
        * align.el (align-region): Do not fail when end-mark is nil (bug#17088).
 
-2014-03-24  Dmitry Gutov  <dgutov@yandex.ru>
+2014-03-26  Dmitry Gutov  <dgutov@yandex.ru>
 
        * progmodes/ruby-mode.el (ruby-expression-expansion-re):
        Match special global variables without curlies, too.
        variables.  Don't require a non-word character after the variable.
        (Bug#17057)
 
-2014-03-23  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-03-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * simple.el (redisplay-highlight-region-function): Increase priority of
        overlay to make sure boundaries are visible (bug#15899).
 
-2014-03-23  Juanma Barranquero  <lekktu@gmail.com>
+2014-03-26  Juanma Barranquero  <lekktu@gmail.com>
 
-       * frameset.el (frameset-restore): Compare display strings with equal.
+       * frameset.el (frameset--initial-params): Fix typo in parameter name.
+       (frameset-restore): Compare display strings with equal.
 
        * frame.el (make-frame): Don't quote display name in error message,
        it is already a string.
 
-2014-03-23  Thierry Volpiatto  <thierry.volpiatto@gmail.com>
+2014-03-26  Thierry Volpiatto  <thierry.volpiatto@gmail.com>
 
        * net/tramp.el (tramp-read-passwd): Suspend the timers while reading
        the password.
 
-2014-03-23  Dmitry Gutov  <dgutov@yandex.ru>
+2014-03-26  Dmitry Gutov  <dgutov@yandex.ru>
 
-       * emacs-lisp/package.el (package-show-package-list): If the buffer
-       is already displayed in another window, switch to that window.
+       * emacs-lisp/package.el (package--add-to-archive-contents):
+       Include already installed and built-in packages in
+       `package-archive-contents'.
+       (package-install): Don't include already installed packages in the
+       options during interactive invocation.  (Bug#16762)
+       (package-show-package-list): If the buffer is already displayed in
+       another window, switch to that window.
+
+2014-03-26  Reto Zimmermann  <reto@gnu.org>
+
+       Sync with upstream vhdl mode v3.35.1.
+       * progmodes/vhdl-mode.el (vhdl-version, vhdl-time-stamp): Update.
+       (vhdl-compiler-alist): Doc fix.
+       (vhdl-goto-line): Remove.
+       (vhdl-mode-abbrev-table-init): Add XEmacs compat.
+       (vhdl-mode) <paragraph-start>: Fix value.
+       (vhdl-fix-statement-region): Not `for' in wait-statement.
+       (vhdl-beautify-region): Also (un)tabify.
+       (vhdl-get-visible-signals):
+       Scan declarative part of generate statements.
+       (vhdl-template-record): Fix indentation for record type declaration.
+       (vhdl-expand-abbrev, vhdl-expand-paren):
+       Revert to using fset again rather than defalias.
+       (vhdl-scan-directory-contents): Tweak.
+       (vhdl-speedbar-find-file, vhdl-speedbar-port-copy)
+       (vhdl-compose-components-package):
+       Replace vhdl-goto-line with forward-line.
+       (top-level): Tweak speedbar frame selection.
+       (vhdl-generate-makefile-1): Support for compilers with no
+       unit-to-file name mapping (create directory with dummy files).
+
+2014-03-26  Wilson Snyder  <wsnyder@wsnyder.org>
+
+       Sync with upstream verilog-mode revision 702457d.
+       * progmodes/verilog-mode.el (verilog-mode-version): Update.
+       (create-lockfiles): Declare.
+       (verilog-read-decls): Fix module header imports, bug709.
+       Reported by Victor Lau.
+       Fix parsing 'var' in AUTOs, msg1294.  Reported by Dominique Chen.
+       (verilog-auto-inout-module): Fix AUTOINOUTMODULE not inserting
+       interface-only modules, bug721.  Reported by Dean Hoyt.
 
-2014-03-21  Daniel Colascione  <dancol@dancol.org>
+2014-03-26  Glenn Morris  <rgm@gnu.org>
 
-       * mail/emacsbug.el (report-emacs-bug): Include memory usage
-       information in bug reports.
+       * obsolete/gulp.el: Move here from emacs-lisp/.
+
+       * files.el (lock-buffer, unlock-buffer, file-locked-p):
+       Remove fallback aliases, since they are always defined now.
+
+2014-03-24  Daniel Colascione  <dancol@dancol.org>
+
+       * emacs-lisp/cl-macs.el (cl--do-arglist): Use `plist-member'
+       instead of cl-loop search function.
+
+2014-03-23  Lars Ingebrigtsen  <larsi@gnus.org>
+
+       * calendar/parse-time.el (parse-time-iso8601-regexp)
+       (parse-iso8601-time-string): Copy from `url-dav' so that we can use
+       it more generally.
+
+2014-03-23  Lars Ingebrigtsen  <larsi@gnus.org>
+
+       * net/dns.el (network-interface-list): Define for XEmacs.
+
+2014-03-23  Magnus Henoch  <magnus.henoch@gmail.com>
+
+       * net/dns.el (dns-servers-up-to-date-p): New function to see whether
+       the network interfaces changed.
+       (dns-query): Use it to flush the data.
+
+2014-03-23  Juanma Barranquero  <lekktu@gmail.com>
+
+       * vc/vc.el (vc-rollback): Use set-buffer-modified-p.
+
+2014-03-23  Daniel Colascione  <dancol@dancol.org>
+
+       Change subword-mode to use `find-word-boundary-function-table' and
+       replace `capitalized-words-mode'.  Also, convert to lexical binding.
+       * progmodes/cap-words.el: Delete now-obsolete file.
+       * progmodes/subword.el: Reimplement using
+       `find-word-boundary-function-table'.
+       (subword-mode-map): Hollow out.
+       (capitalized-words-mode): Define as obsolete alias for
+       `subword-mode'.
+       (subword-mode, superword-mode): Tweak documentation to reflect new
+       implementation; call `subword-setup-buffer'.
+       (subword-forward, subword-capitalize): Add underscore to indicate
+       unused variable.
+       (subword-find-word-boundary-function-table): New constant.
+       (subword-empty-char-table): New constant.
+       (subword-setup-buffer): New function.
+       (subword-find-word-boundary): New function.
 
 2014-03-23  Daniel Colascione  <dancol@dancol.org>
 
        (Bug#3647) --- unfortunately, only for freshly-compiled code.
        Please make bootstrap.
 
-2014-03-23  Richard Stallman  <rms@gnu.org>
-
-       * battery.el (battery-linux-sysfs): Search for each field
-       from the beginning of the buffer.
+2014-03-22  Glenn Morris  <rgm@gnu.org>
+
+       * dired.el (dired-read-regexp): Make obsolete.
+       (dired-mark-files-regexp, dired-mark-files-containing-regexp)
+       (dired-flag-files-regexp):
+       * dired-aux.el (dired-mark-read-regexp):
+       * dired-x.el (dired-mark-unmarked-files): Use read-regexp directly.
+
+       * startup.el (fancy-startup-text):
+       * help.el (describe-gnu-project): Visit online info about GNU project.
+
+       * help-fns.el (help-fns--interactive-only): New function.
+       (help-fns-describe-function-functions): Add the above function.
+       * simple.el (beginning-of-buffer, end-of-buffer, insert-buffer)
+       (next-line, previous-line): Remove hand-written interactive-only
+       information from doc strings, it is auto-generated now.
+       * bookmark.el (bookmark-write):
+       * epa-mail.el (epa-mail-decrypt, epa-mail-verify, epa-mail-sign)
+       (epa-mail-import-keys): Mark interactive-only,
+       and remove hand-written interactive-only information from doc strings.
+       * epa.el (epa-decrypt-armor-in-region, epa-verify-region)
+       (epa-verify-cleartext-in-region, epa-sign-region, epa-encrypt-region):
+       * files.el (not-modified):
+       * simple.el (mark-whole-buffer): Mark interactive-only.
+
+       * emacs-lisp/byte-run.el (defun-declarations-alist):
+       Add interactive-only.  Doc tweak.
+       (macro-declarations-alist): Doc tweak.
+       * subr.el (declare): Doc tweak (add xref to manual).
+       * comint.el (comint-run):
+       * files.el (insert-file-literally, insert-file):
+       * replace.el (replace-string, replace-regexp):
+       * simple.el (beginning-of-buffer, end-of-buffer, delete-backward-char)
+       (delete-forward-char, goto-line, insert-buffer, next-line)
+       (previous-line): Set interactive-only via declare.
 
 2014-03-22  Dmitry Gutov  <dgutov@yandex.ru>
 
        * w32-common-fns.el (x-selection-owner-p): Add empty docstring for the
        benefit of doc.c; change parameter profile to match the X function.
 
+2014-03-22  Leo Liu  <sdl.web@gmail.com>
+
+       * help.el (temp-buffer-setup-hook): Remove help-mode-setup.
+       (temp-buffer-show-hook): Remove help-mode-finish.  (Bug#16038)
+
+2014-03-21  Richard Stallman  <rms@gnu.org>
+
+       * battery.el (battery-linux-sysfs): Search for each field
+       from the beginning of the buffer.
+
+       * subr.el (set-transient-map): Clear out function and value
+       of the temporary symbol when we're done with it.
+
+       * mail/rmailsum.el (rmail-summary-delete-forward):
+       Optimize case of reaching end and handling count.
+       (rmail-summary-mark-deleted): Optimize when N is current msg.
+       Don't create new summary line.
+       (rmail-summary-undelete): Pass arg to rmail-undelete-previous-message.
+       (rmail-summary-undelete-many): Rewrite for speed.
+       (rmail-summary-msg-number): New function.
+
+       * mail/rmail.el (rmail-delete-message): Update summary.
+       (rmail-undelete-previous-message): Handle repeat count arg.
+       (rmail-delete-backward, rmail-delete-forward): Likewise.
+
+2014-03-21  Daniel Colascione  <dancol@dancol.org>
+
+       * mail/emacsbug.el (report-emacs-bug): Include memory usage
+       information in bug reports.
+
 2014-03-21  Michael Albinus  <michael.albinus@gmx.de>
 
        * net/tramp.el (tramp-methods): Add docstring for `tramp-login-env'
        (tty-color-approximate, tty-color-by-index, tty-color-values)
        (tty-color-desc): Remove superfluous backslashes.
 
+2014-03-21  Glenn Morris  <rgm@gnu.org>
+
+       * cus-start.el (history-length): Bump :version.
+
+       * Makefile.in ($(MH_E_DIR)/mh-loaddefs.el)
+       ($(TRAMP_DIR)/tramp-loaddefs.el, $(CAL_DIR)/cal-loaddefs.el)
+       ($(CAL_DIR)/diary-loaddefs.el, $(CAL_DIR)/hol-loaddefs.el):
+       Don't set `make-backup-files'.
+
+       * info.el (info--prettify-description): New function,
+       to give info-finder descriptions consistent case, punctuation.
+       (Info-finder-find-node): Use it.  Sort packages.
+       Refer to "description" rather than "commentary".
+
+2014-03-21  Juanma Barranquero  <lekktu@gmail.com>
+
+       * frameset.el (frameset--print-register): New function.
+       (frameset-to-register): Use it.
+
+2014-03-20  Juanma Barranquero  <lekktu@gmail.com>
+
+       * progmodes/hideif.el (hif-string-to-number): New function.
+       (hif-tokenize): Use it to understand non-decimal floats.
+
+       * emacs-lisp/cl-extra.el (cl--map-overlays): Remove obsolete code.
+
+       * skeleton.el (skeleton-autowrap): Mark as obsolete.  Doc fix.
+
 2014-03-20  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * electric.el (electric-newline-and-maybe-indent): New command.
 2014-03-10  Michael Albinus  <michael.albinus@gmx.de>
 
        * net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
-       Do not add `nil' to the environment, when there's no remote `locale'.
+       Do not add nil to the environment, when there's no remote `locale'.
        (tramp-find-inline-encoding): Check, that the remote host has
        installed perl, before sending scripts.
 
        * help-at-pt.el (help-at-pt-string, help-at-pt-maybe-display):
        Also try to display local help from just before point.
 
-2014-02-02  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2014-02-02  Alan Mackenzie  <acm@muc.de>
 
        c-parse-state.  Don't "append-lower-brace-pair" in certain
        circumstances.  Also fix an obscure bug where "\\s!" shouldn't be
        COMMAND-alternatives variable, assign COMMAND as its definition
        name so that `describe-variable' can relocate it.
 
-2014-01-14  Matthew Leach  <matthew@mattleach.net>  (tiny change)
+2014-01-14  Matthew Leach  <matthew@mattleach.net>
 
        * font-lock.el (font-lock-keywords): Fix typo in docstring
        (bug#16307).
        Add option to delete file when done.  (Bug#15647)
        (python-shell-send-string, python-shell-send-region): Use it.
 
-2013-11-23  Ivan Shmakov  <ivan@siamics.net>  (tiny change)
+2013-11-23  Ivan Shmakov  <ivan@siamics.net>
 
        * vc/diff-mode.el (diff-mode): Only allow diff-default-read-only
        to set buffer-read-only to t, never to nil.  (Bug#15938)
 
        * rect.el (rectangle-mark-mode): Rename from rectangle-mark.
        Make it into a proper minor mode.
-       (rectangle--region): (implicitly) rename to rectangle-mark-mode.
+       (rectangle--region): (Implicitly) rename to rectangle-mark-mode.
        (rectangle-mark-mode-map): New keymap.
        (rectangle--highlight-for-redisplay): Fix some corner cases (bug#15796).
 
 
 2013-10-28  Daiki Ueno  <ueno@gnu.org>
 
-       * epa-file.el
-       (epa-file-cache-passphrase-for-symmetric-encryption):
+       * epa-file.el (epa-file-cache-passphrase-for-symmetric-encryption):
        Document that this option has no effect with GnuPG 2.0 (bug#15552).
 
 2013-10-27  Xue Fuqiao  <xfq.free@gmail.com>
 
 2013-06-04  Alan Mackenzie  <acm@muc.de>
 
-       Remove faulty optimisation from indentation calculation.
+       Remove faulty optimization from indentation calculation.
        * progmodes/cc-engine.el (c-guess-basic-syntax): Don't calculate
        search limit based on 2000 characters back from indent-point.
 
        * textmodes/reftex-vars.el (reftex-ref-style-alist):
        Add cleveref macros.
 
-       * textmodes/reftex-parse.el
-       (reftex-locate-bibliography-files): Accept options for
-       bibliography commands.
+       * textmodes/reftex-parse.el (reftex-locate-bibliography-files):
+       Accept options for bibliography commands.
        * textmodes/reftex-vars.el (reftex-bibliography-commands):
        Add addbibresource.  Basic Biblatex support.
 
 2013-04-19  Fabián Ezequiel Gallina  <fgallina@gnu.org>
 
        New faster Imenu implementation (bug#14058).
-       * progmodes/python.el:
-       (python-imenu-prev-index-position):
+       * progmodes/python.el (python-imenu-prev-index-position)
        (python-imenu-format-item-label-function)
        (python-imenu-format-parent-item-label-function)
        (python-imenu-format-parent-item-jump-label-function):
index dd5267725e5b3238427e2d875be053981411f6ed..bcd2dacd0f9be6aa327fa4db144169f020c8963d 100644 (file)
@@ -1,4 +1,4 @@
-2003-07-03  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-07-03  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-menus.el (cc-imenu-init): Do not set
        `imenu-create-index-function' if the second argument is left
@@ -9,7 +9,7 @@
        (c-lineup-arglist-close-under-paren): Fixes to cope with
        special brace lists in Pike.
 
-2003-07-03  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2003-07-03  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-mode.el (awk-mode): Call c-awk-after-change to
        ensure syntax-table props at loading.
@@ -21,7 +21,7 @@
        analyze AWK top-level forms properly (c-guess-basic-syntax
        CASE 5P), c-awk-backward-syntactic-ws.
 
-2003-07-03  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-07-03  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-fix.el: cc-mode-19.el has been renamed to
        progmodes/cc-fix.el since it now contains compatibility stuff
@@ -59,7 +59,7 @@
        * progmodes/cc-langs.el (comment-end): Put a space in front of
        the comment ender in C, as it was before the move from cc-mode.el.
 
-2003-07-03  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2003-07-03  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-fonts.el: Do not load progmodes/cc-awk.elc or
        awk-font-lock-keywords unless there is an AWK Mode buffer.
@@ -72,7 +72,7 @@
        * progmodes/cc-engine.el, progmodes/cc-fonts.el:
        Changes for the new AWK support.
 
-2003-07-03  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-07-03  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el, progmodes/cc-langs.el
        (c-decl-block-key, c-search-uplist-for-classkey): Check that
 
        This change is slightly incompatible.  Although the calling
        convention for line-up functions is strictly extended, the format
-       of the `c-syntactic-context' variable has changed slightly.  It's
-       believed that this incompatibility is minor, though; not a single
+       of the `c-syntactic-context' variable has changed slightly.
+       It's believed that this incompatibility is minor, though; not a single
        line-up function distributed with CC Mode needed to be changed,
        for instance.
 
        * dabbrev.el (dabbrev--goto-start-of-abbrev):
        Use minibuffer-prompt-end.
 
-       * comint.el (comint-move-point-for-output): Renamed from
+       * comint.el (comint-move-point-for-output): Rename from
        comint-scroll-to-bottom-on-output.  Old name is alias.
        All uses changed.  Doc fix.
        (comint-scroll-show-maximum-output): Doc fix.
 
 2003-05-09  Sam Steingold  <sds@gnu.org>
 
-       * pcvs.el (cvs-mode-find-file): Fixed the last patch's logic.
+       * pcvs.el (cvs-mode-find-file): Fix the last patch's logic.
 
 2003-05-09  Stefan Monnier  <monnier@cs.yale.edu>
 
 
 2003-05-03  Richard M. Stallman  <rms@gnu.org>
 
-       * emacs-lisp/autoload.el (update-directory-autoloads): Renamed from
+       * emacs-lisp/autoload.el (update-directory-autoloads): Rename from
        update-autoloads-from-directories.
 
        * progmodes/cperl-mode.el (cperl-nonoverridable-face): Doc fix.
        for both the argument and the value.
 
        * desktop.el (desktop-base-file-name):
-       Renamed from desktop-basefilename.  Add defvaralias.
+       Rename from desktop-basefilename.  Add defvaralias.
 
 2003-04-14  John Paul Wallington  <jpw@gnu.org>
 
        (describe-minor-mode-completion-table-for-symbol): New functions.
        minor-mode-list is used here.
        (describe-minor-mode-from-symbol):
-       Renamed from (old) describe-minor-mode.
+       Rename from (old) describe-minor-mode.
        Use describe-minor-mode-completion-table-for-symbol.
        Don't use eval.  Just use symbol-name.
        (describe-minor-mode-from-indicator): Document is updated.
        * international/mule.el:
        Don't set after-insert-file-adjust-coding-function.
        (after-insert-file-set-coding):
-       Renamed from after-insert-file-set-buffer-file-coding-system.
+       Rename from after-insert-file-set-buffer-file-coding-system.
 
 2003-04-11  Kenichi Handa  <handa@m17n.org>
 
        (quail-make-guidance-frame): Delete the arg BUF.  Fix position
        calculation.  Don't set the window buffer, just return the new frame.
        (quail-minibuffer-message): New function.
-       (quail-show-guidance): Renamed from quail-show-guidance-buf.
+       (quail-show-guidance): Rename from quail-show-guidance-buf.
        Use message and quail-minibuffer-message to display the guidance.
-       (quail-hide-guidance): Renamed from quail-hide-guidance-buf.
+       (quail-hide-guidance): Rename from quail-hide-guidance-buf.
        Only delete quail-guidance-frame.
        (quail-update-guidance): Just update quail-guidance-str, not
        display it.
-       (quail-get-translations): Renamed from quail-show-translations.
+       (quail-get-translations): Rename from quail-show-translations.
        Return a string instead of inserting it in quail-guidance-buf.
 
 2003-04-11  Kenichi Handa  <handa@m17n.org>
 
 2003-04-10  Juanma Barranquero  <lektu@terra.es>
 
-       * frame.el (modify-all-frames-parameters): Deleted.
+       * frame.el (modify-all-frames-parameters): Delete.
 
 2003-04-10  Sebastian Tennant  <seb@albert.vcisp.net>  (tiny change)
 
        (utf-16-le-with-signature, utf-16-be-with-signature)
        (utf-16): Aliases of the above coding systems.
 
-2003-04-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-04-08  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-langs.el (c-symbol-key): Use POSIX char classes
        to match symbols.  This makes CC Mode cope with the full range
 
 2003-04-06  Masatake YAMATO  <jet@gyve.org>
 
-       * progmodes/etags.el (tag-find-file-of-tag): Renamed from
+       * progmodes/etags.el (tag-find-file-of-tag): Rename from
        find-file-of-tag to avoid name space pollution.
        (tag-find-file-of-tag-noselect): Likewise.
        (etags-list-tags, etags-tags-apropos):
 
 2003-04-02  Masatake YAMATO  <jet@gyve.org>
 
-       * woman.el (woman-xref): Removed.
+       * woman.el (woman-xref): Remove.
        (woman-mode): Use `Man-highlight-references' instead of
        `WoMan-highlight-references'.
-       (WoMan-highlight-references): Removed.
+       (WoMan-highlight-references): Remove.
 
        * man.el (toplevel): Require button.
        (Man-header-file-path): New option.
        `button-buffer-map'.
        (Man-xref-man-page, Man-xref-header-file, Man-xref-normal-file):
        New buttons.  `Man-xref-man-page' comes from woman.el.
-       (man-follow-mouse): Removed.
+       (man-follow-mouse): Remove.
        (Man-fontify-manpage): Use `Man-highlight-references' instead of
        calling `add-text-properties' directly.
        (Man-highlight-references, Man-highlight-references0): New functions.
 
        * net/net-utils.el (dns-lookup-host): New function.
 
-2003-03-23  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-03-23  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-mode.el (c-parse-state): Add kludge to avoid
        an infinite loop when Emacs' open-paren-in-column-zero rule
 
        * ffap.el: Many doc fixes.
        (ffap-replace-file-component):
-       Renamed from ffap-replace-path-component.  Callers changed.
-       (ffap-host-to-filename): Renamed from ffap-host-to-path.  Callers chgd.
+       Rename from ffap-replace-path-component.  Callers changed.
+       (ffap-host-to-filename): Rename from ffap-host-to-path.  Callers chgd.
 
        * international/iso-ascii.el (iso-ascii-display-table): New variable.
        (iso-ascii-standard-display-table): New variable.
        * language/ind-util.el (indian-itrans-v5-table): Add entries for
        "E" and "O".
 
-2003-02-10  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-02-10  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-styles.el (c-set-offset): Don't find a default
        syntactic element through syntactic analysis if called outside
        a CC Mode buffer.
 
-2003-02-09  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-02-09  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-mode.el (c-basic-common-init):
        Install `c-fill-paragraph' on `fill-paragraph-function'.
        * term.el (term-raw-map): Set it up at load time.
        (term-char-mode): Don't set up term-raw-map here.
        (term-set-escape-char): Don't set up C-x subcommand.
-       (term-ansi-face-already-done): Renamed from
+       (term-ansi-face-already-done): Rename from
        term-ansi-face-alredy-done.
        (term-command-hook): Avoid error if STRING is empty.
        (term, term-mode): Doc fixes.
        (antlr-slow-syntactic-context): Use cache.
        (antlr-slow-cache-enabling-symbol): New internal variable.
        (antlr-slow-cache-diff-threshold): New variable.
-       (antlr-fast-invalidate-context-cache): Renamed from
+       (antlr-fast-invalidate-context-cache): Rename from
        antlr-xemacs-bug-workaround.
        (antlr-imenu-create-index-function): Search from beginning.
 
        (antlr-simple-read-shell-command): Define.
        (antlr-simple-with-displaying-help-buffer): Define.
        (antlr-simple-scan-sexps, antlr-simple-scan-lists):
-       Renamed from antlr-scan-{sexps,lists}-internal.
+       Rename from antlr-scan-{sexps,lists}-internal.
 
        Changes from 2002-02-28:
 
        * progmodes/antlr-mode.el: Version 2.2 is released.
 
-       * progmodes/antlr-mode.el (antlr): Moved to SourceForge.net
+       * progmodes/antlr-mode.el (antlr): Move to SourceForge.net
 
        * progmodes/antlr-mode.el: Minor bug fixes: insert options
        and indentation.
        * ibuf-ext.el (ibuffer-yank-filter-group): Move check for empty
        `ibuffer-filter-group-kill-ring' out of `interactive' declaration.
 
-2003-01-28  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-01-28  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-vars.el, progmodes/cc-mode.el
        (c-require-final-newline): Made this variable an alist to
 
        * progmodes/ebrowse.el (ebrowse-draw-tree-fn): Likewise.
 
-2003-01-26  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-01-26  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-vars.el, progmodes/cc-mode.el
        (c-require-final-newline): Add a variable to make the
 
 2003-01-08  Francesco Potortì  <pot@gnu.org>
 
-       * mail/undigest.el (unforward-rmail-message): Simplified.
+       * mail/undigest.el (unforward-rmail-message): Simplify.
        No functional change.
 
 2003-01-07  Markus Rost  <rost@math.ohio-state.edu>
        (makeinfo-compilation-sentinel-buffer, makeinfo-current-node):
        New functions.
        (makeinfo-compile): Add a sentinel parameter.
-       (makeinfo-compilation-sentinel-region): Renamed from
+       (makeinfo-compilation-sentinel-region): Rename from
        makeinfo-compilation-sentinel, and makeinfo-temp-file now never nil.
        (makeinfo-region): Use this.
        * info.el (Info-revert-find-node): New function.
 
 2002-12-20  Francesco Potortì  <pot@gnu.org>
 
-       * mail/undigest.el (rmail-mail-separator): Renamed from
+       * mail/undigest.el (rmail-mail-separator): Rename from
        rmail-digest-mail-separator.  All users changed.
        (unforward-rmail-message): Rewritten to be more robust and to
        additionally account for the common style of forwarding messages
 
 2002-12-10  Steven Tamm  <steventamm@mac.com>
 
-       * generic-x.el (javascript-generic-mode): Added C style block
+       * generic-x.el (javascript-generic-mode): Add C style block
        comments as used in ECMA-262 standard.
 
 2002-12-10  Kenichi Handa  <handa@m17n.org>
        * progmodes/sql.el: Added LINTER support.
        (sql-linter-program): New variable.
        (sql-linter-options): New variable.
-       (sql-mode-menu): Added Linter keywords.
+       (sql-mode-menu): Add Linter keywords.
        (sql-mode-linter-font-lock-keywords): New variable.
        (sql-highlight-linter-keywords): New function.
        (sql-linter): New function.
 
 2002-11-20  Markus Rost  <rost@math.ohio-state.edu>
 
-       * Makefile.in (setwins_almost): Renamed from finder_setwins.
+       * Makefile.in (setwins_almost): Rename from finder_setwins.
        (custom-deps): Use it.
        (finder-data): Adjust to that name change.
 
        diary-entries-list.
        (diary-mode, fancy-diary-display-mode): New derived modes, for
        diary file and fancy diary buffer respectively.
-       (fancy-diary-font-lock-keywords, diary-font-lock-keywords): New
-       variables.
-       (font-lock-diary-sexps, font-lock-diary-date-forms): New
-       functions, used in diary-font-lock-keywords.
+       (fancy-diary-font-lock-keywords, diary-font-lock-keywords):
+       New variables.
+       (font-lock-diary-sexps, font-lock-diary-date-forms):
+       New functions, used in diary-font-lock-keywords.
 
        * calendar/calendar.el (diary-face): New.
        (european-calendar-display-form, describe-calendar-mode)
        * international/codepage.el (cp866-decode-table): Fix the
        translation table.
 
-2002-11-16  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-11-16  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-bytecomp.el (cc-bytecomp-defun): Fixed bug that
+       * progmodes/cc-bytecomp.el (cc-bytecomp-defun): Fix bug that
        caused existing function definitions to be overridden by
        phonies when the bytecomp environment is restored.
 
        * files.el (mode-name): Mark it as risky-local-variable like the
        other mode-line elements (moved from bindings.el).
 
-       * bindings.el (mode-name): Moved mark as risky-local-variable to
+       * bindings.el (mode-name): Move mark as risky-local-variable to
        files.el.
 
 2002-11-14  Juanma Barranquero  <lektu@terra.es>
        don't defvar, and make permanent-local.
        (ucs-unify-8859, ucs-unify-8859, ucs-fragment-8859): Add/remove
        set-buffer-major-mode-hook, not quail-activate-hook.
-       (ucs-set-table-for-input): Renamed from ucs-quail-activate.
+       (ucs-set-table-for-input): Rename from ucs-quail-activate.
        (ucs-unify-8859, ucs-unify-8859, ucs-fragment-8859):
        Setup keyboard-translate-table, not translation-table-for-input.
        Modify set-buffer-major-mode-hook, not quail-activate-hook.
        (ucs-fragment-8859): Don't use translation-table-for-input coding
        system property.
-       (ucs-quail-activate): Deleted.
+       (ucs-quail-activate): Delete.
        (ucs-set-table-for-input): New.
        (ucs-minibuffer-setup): Use it.
 
 
 2002-11-06  Kim F. Storm  <storm@cua.dk>
 
-       * info.el (Info-fontify-node): Fixed hiding of *note references
+       * info.el (Info-fontify-node): Fix hiding of *note references
        with embedded file names like (xxx.yyy).
        Avoid making any lines visibly longer if hiding newlines inside
        note references by wrapping line after references if it contained
 
 2002-10-29  Kim F. Storm  <storm@cua.dk>
 
-       * ido.el (ido-wide-find-dirs-or-files): Fixed problem that caused
+       * ido.el (ido-wide-find-dirs-or-files): Fix problem that caused
        incomplete list of matches to be returned.
 
 2002-10-29  Masayuki Ataka  <ataka@milk.freemail.ne.jp>  (tiny change)
 
        * international/mule-diag.el (non-iso-charset-alist): Add koi8-u.
 
-       * international/code-pages.el (cp-make-translation-table): Use
-       ucs-mule-to-mule-unicode.
+       * international/code-pages.el (cp-make-translation-table):
+       Use ucs-mule-to-mule-unicode.
        (cp-fix-safe-chars): Fix typo.
        (non-iso-charset-alist): Don't define.
        (cp-make-coding-system): Use utf-8-translation-table-for-decode.
        Define translation-table-for-input.
        (cp866): Reinstate.
        (alternativnj): Don't define alias.
-       (koi8-u): Deleted.
+       (koi8-u): Delete.
 
        * language/european.el ("Slovenian"): Use slovenian input-method.
        (encode-mac-roman): Use ucs-mule-to-mule-unicode.
 
-       * language/cyrillic.el (cyrillic-alternativnyj-decode-table): Fix
-       the table.
+       * language/cyrillic.el (cyrillic-alternativnyj-decode-table):
+       Fix the table.
        (cyrillic-alternativnyj): Don't give it `mime-charset' property.
        (cp866): Delete this alias.
        ("Bulgarian"): Fix the value of `input-method'.
 
 2002-10-15  Kenichi Handa  <handa@m17n.org>
 
-       * mail/sendmail.el (sendmail-send-it): Call
-       select-message-coding-system before changing the current buffer to
+       * mail/sendmail.el (sendmail-send-it):
+       Call select-message-coding-system before changing the current buffer to
        " sendmail temp".
 
 2002-10-14  Andre Spiegel  <spiegel@gnu.org>
        * files.el (insert-directory): Handle //SUBDIRED// lines in
        recursive listings from ls --dired.
 
-       * vc.el (vc-dired-reformat-line): Simplified.  Handles text
+       * vc.el (vc-dired-reformat-line): Simplify.  Handles text
        properties correctly now.
 
 2002-10-14  Juanma Barranquero  <lektu@terra.es>
 
        * ediff-init.el (ediff-frame-char-height): Use frame-selected-window.
 
-       * ediff-util.el (ediff-file-checked-in-p): Changed progn with and.
+       * ediff-util.el (ediff-file-checked-in-p): Change progn with and.
 
        * ediff-wind.el (ediff-skip-unsuitable-frames): Distinguish selected
        frame from frame of selected window.
 2002-10-07  Kim F. Storm  <storm@cua.dk>
 
        * emulation/cua-base.el (cua-normal-cursor-color):
-       Fixed initialization to make "Erase Customization" work.
+       Fix initialization to make "Erase Customization" work.
 
 2002-10-07  Stefan Monnier  <monnier@cs.yale.edu>
 
        (widget-editable-list-entry-create): Update caller.
 
        * wid-edit.el (widget-types-copy): New function.
-       (default): Added :copy keyword.
+       (default): Add :copy keyword.
        (menu-choice): Ditto.
        (checklist): Ditto.
        (radio-button-choice): Ditto.
        * international/utf-8.el (ucs-mule-to-mule-unicode): Don't define
        this translation-table name here.
        (utf-translation-table-for-encode): New translation-table name.
-       (utf-fragmentation-table): Renamed from utf-8-fragmentation-table.
+       (utf-fragmentation-table): Rename from utf-8-fragmentation-table.
        (utf-defragmentation-table): New variable.
-       (ucs-mule-cjk-to-unicode): Renamed from utf-8-subst-rev-table.
+       (ucs-mule-cjk-to-unicode): Rename from utf-8-subst-rev-table.
        (utf-subst-table-for-encode): New translation-table name.
-       (ucs-unicode-to-mule-cjk): Renamed from utf-8-subst-table.
+       (ucs-unicode-to-mule-cjk): Rename from utf-8-subst-table.
        (utf-subst-table-for-decode): New translation-table name.
-       (utf-fragment-on-decoding): Renamed from
+       (utf-fragment-on-decoding): Rename from
        utf-8-fragment-on-decoding.  Correctly handle the case that
        unify-8859-on-encoding-mode is off.  Handle mule-utf-16-le and
        mule-utf-16-be too.
-       (utf-translate-cjk): Renamed from utf-8-translate-cjk.
+       (utf-translate-cjk): Rename from utf-8-translate-cjk.
        Handle mule-utf-16-le and mule-utf-16-be too.
        (ccl-decode-mule-utf-8): Refer to utf-translation-table-for-decode
        and utf-subst-table-for-decode.
        (gamegrid-display-type): Use Emacs' standard `display-.*-p'
        functions to check for display capabilities.  Fix the recognition
        of image-support in Emacs 21 by this way.
-       (gamegrid-hide-cursor): Removed.
+       (gamegrid-hide-cursor): Remove.
        (gamegrid-setup-default-font): Ported the code from XEmacs to
        Emacs: create a new face and assign the variable `gamegrid-face'
        to it.  Make sure that the face is not higher than the smallest
 
 2002-09-10  Michael Albinus  <Michael.Albinus@alcatel.de>
 
-       * net/tramp.el (tramp-handle-write-region): Added missing
+       * net/tramp.el (tramp-handle-write-region): Add missing
        `)'.  Hope it's the right place.
 
 2002-09-09  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
        something harmless, but the /bin/sh will display a dollar sign
        which confused the subsequent prompt recognition.
        (tramp-multi-action-password): More debugging output.
-       (tramp-encoding-shell): Renamed from tramp-sh-program.
+       (tramp-encoding-shell): Rename from tramp-sh-program.
        More documentation.  Default to cmd.exe on Windows NT.
        (tramp-encoding-command-switch): New variable.  Use instead of
        hard-wired "-c" which is only good for /bin/sh.
        (tramp-completion-handle-file-name-all-completions):
        Change function call for user/host completion according to definition
        in `tramp-completion-function-alist'.
-       (tramp-parse-passwd): Added exception handling for "root", because
+       (tramp-parse-passwd): Add exception handling for "root", because
        `tramp-get-completion-su' (the previous place for this stuff)
        doesn't exist any longer.
 
        (tramp-multi-file-name-hop-structure-unified)
        (tramp-multi-file-name-hop-structure-separate)
        (tramp-make-multi-tramp-file-format-unified)
-       (tramp-make-multi-tramp-file-format-separate): Removed.
+       (tramp-make-multi-tramp-file-format-separate): Remove.
        (tramp-make-tramp-file-name): Allow partial tramp file
        names.  Generate tramp file format on-the-fly depending on
        parameters.  Apply atomar format strings resp expressions.
        (tramp-completion-file-name-handler-alist): Add handler for
        `file-exists-p.
        (tramp-completion-handle-file-exists-p): New function.
-       (tramp-completion-handle-file-name-completion): Simplified.
+       (tramp-completion-handle-file-name-completion): Simplify.
        (tramp-completion-dissect-file-name): Regexp's reorganized.
        (tramp-completion-handle-file-name-all-completions):
        Call completion-function only if `user' or `host' is given.
 
        * viper-util.el (viper-chars-in-region): Simplification.
 
-       * viper.el (viper-emacs-state-mode-list): Added modes.
+       * viper.el (viper-emacs-state-mode-list): Add modes.
 
 2002-09-18  Jonathan Yavner  <jyavner@engineer.com>
 
        (nonincremental-search-forward, nonincremental-re-search-forward)
        (nonincremental-search-backward, nonincremental-re-search-backward):
        Set menu-bar-last-search-type to string or regexp.
-       (nonincremental-repeat-re-search-forward): Removed.
-       (nonincremental-repeat-re-search-backward): Removed.
+       (nonincremental-repeat-re-search-forward): Remove.
+       (nonincremental-repeat-re-search-backward): Remove.
        (menu-bar-replace-menu): New keymap for "Edit->Replace" submenu.
        (menu-bar-i-search-menu): New keymap for "Incremental Search" submenu.
-       (menu-bar-adv-search-menu): Removed.
+       (menu-bar-adv-search-menu): Remove.
        (menu-bar-search-menu): Reorganized.
-       (menu-bar-edit-menu): Added "Replace" submenu.
+       (menu-bar-edit-menu): Add "Replace" submenu.
 
 2002-09-15  Richard M. Stallman  <rms@gnu.org>
 
 
 2002-09-13  Kim F. Storm  <storm@cua.dk>
 
-       * kmacro.el (kmacro-keymap): Changed bindings:
+       * kmacro.el (kmacro-keymap): Change bindings:
        C-x C-k s to kmacro-start-macro, C-x C-k b to kmacro-bind-to-key.
 
 2002-09-12  Richard M. Stallman  <rms@gnu.org>
 
        * loadup.el ("simple.el"): Move to after loaddefs.el.
 
-       * subr.el (define-mail-user-agent): Moved from simple.el.
+       * subr.el (define-mail-user-agent): Move from simple.el.
 
 2002-09-10  Richard M. Stallman  <rms@gnu.org>
 
 
        * international/ucs-tables.el: Bind utf-8-translation-table-for-decode
        when setting up tables and remove useless optimize-char-table.
-       (ucs-mule-to-mule-unicode): Deleted.
+       (ucs-mule-to-mule-unicode): Delete.
        (ucs-unify-8859): Maybe optimize ucs-mule-to-mule-unicode.
 
        * international/utf-16.el (utf-16-le-pre-write-conversion)
-       (utf-16-be-pre-write-conversion): Deleted.
+       (utf-16-be-pre-write-conversion): Delete.
        (mule-utf-16-le, mule-utf-16-be): Register encoding translation table.
 
 2002-09-10  Richard M. Stallman  <rms@gnu.org>
 
        * vc-hooks.el: Require vc.el at compile-time.
        (vc-workfile-unchanged-p, vc-default-workfile-unchanged-p):
-       Moved here from vc.el.
+       Move here from vc.el.
 
        * vc.el (vc-workfile-unchanged-p, vc-default-workfile-unchanged-p):
-       Moved to vc-hooks.el.
+       Move to vc-hooks.el.
 
        * vc-rcs.el (vc-rcs-state): Don't require vc.el.
 
 
 2002-08-30  ARISAWA Akihiro  <ari@mbf.sphere.ne.jp>  (tiny change)
 
-       * ps-print.el (ps-lp-system): Fixed typo in `usg-unix-v'.
+       * ps-print.el (ps-lp-system): Fix typo in `usg-unix-v'.
 
 2002-08-30  Markus Rost  <rost@math.ohio-state.edu>
 
 
 2002-08-28  Juanma Barranquero  <lektu@terra.es>
 
-       * replace.el (occur-hook): Renamed from `occur-mode-hook'.
+       * replace.el (occur-hook): Rename from `occur-mode-hook'.
        (occur-mode): Remove call to `occur-mode-hook'.
        (occur-rename-buffer): Fix reference to `occur-mode-hook' in docstring.
        (occur-1): Add call to `occur-hook'.
        (reftex-section-number): Better handling of parts: No chapter
        counter resets.
 
-       * textmodes/reftex.el (reftex-highlight-overlays): Added a third
+       * textmodes/reftex.el (reftex-highlight-overlays): Add a third
        overlay.
-       (reftex-mode-menu): Added entry for `reftex-toc-recenter.
+       (reftex-mode-menu): Add entry for `reftex-toc-recenter.
        Also moved `reftex-reset-mode' to top level.
 
        * textmodes/reftex-toc.el (reftex-toc-recenter): New command.
 2002-08-25  Miles Bader  <miles@gnu.org>
 
        * rfn-eshadow.el (file-name-shadow-properties-custom-type):
-       Renamed from `read-file-name-electric-shadow-properties-custom-type'.
+       Rename from `read-file-name-electric-shadow-properties-custom-type'.
        Change name of face.
-       (file-name-shadow-properties): Renamed from
+       (file-name-shadow-properties): Rename from
        `read-file-name-electric-shadow-properties'.
-       (file-name-shadow-tty-properties): Renamed from
+       (file-name-shadow-tty-properties): Rename from
        `read-file-name-electric-shadow-tty-properties'.
-       (file-name-shadow): Renamed from `read-file-name-electric-shadow'.
+       (file-name-shadow): Rename from `read-file-name-electric-shadow'.
        (rfn-eshadow-setup-minibuffer): Update references to renamed variables.
-       (file-name-shadow-mode): Renamed from
+       (file-name-shadow-mode): Rename from
        `read-file-name-electric-shadow-mode'.  Update references to
        renamed variables.
 
        * files.el (ange-ftp-completion-hook-function): Add safe-magic prop.
 
        * subr.el (symbol-file-load-history-loaded)
-       (load-symbol-file-load-history): Deleted.
+       (load-symbol-file-load-history): Delete.
        (symbol-file): Don't call load-symbol-file-load-history.
 
 2002-08-23  Andre Spiegel  <spiegel@gnu.org>
 
 2002-08-21  Kim F. Storm  <storm@cua.dk>
 
-       * bindings.el (mode-line-format): Moved global-mode-string last.
-       (mode-line-position): Moved %p first.  Added padding to %l/%c to
+       * bindings.el (mode-line-format): Move global-mode-string last.
+       (mode-line-position): Move %p first.  Added padding to %l/%c to
        eliminate jumpiness in modeline.  Use (%l,%c) format if both
        line-number-mode and column-number-mode are enabled.
 
-2002-08-20  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-08-20  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-engine.el (c-forward-syntactic-ws): Fixed a bug
+       * progmodes/cc-engine.el (c-forward-syntactic-ws): Fix a bug
        that could cause an infinite loop if something that looks like
        a macro begins in the middle of a line.
 
-       * progmodes/cc-engine.el (c-parse-state): Fixed a bug that
+       * progmodes/cc-engine.el (c-parse-state): Fix a bug that
        could cause `c-state-cache' to contain two conses in sequence
        when there's an unbalanced open paren in a macro.
 
 
 2002-08-15  Carsten Dominik  <dominik@sand.science.uva.nl>
 
-       * textmodes/reftex.el (reftex-mode): Moved the creation of special
+       * textmodes/reftex.el (reftex-mode): Move the creation of special
        syntax tables to top-level.
 
 2002-08-15  David Kastrup  <David.Kastrup@t-online.de>
 
        * international/mule-cmds.el (search-unencodable-char): New function.
        (select-safe-coding-system): Show unencodable characters.
-       (unencodable-char-position): Deleted, and implemented in C in coding.c.
+       (unencodable-char-position): Delete, and implemented in C in coding.c.
 
 2002-04-09  John Wiegley  <johnw@gnu.org>
 
 
 2002-08-05  Alan Shutko  <ats@acm.org>
 
-       * ibuffer.el (ibuffer-mode-map): Added ibuffer-filter-by-used-mode.
-       (ibuffer-mode-map): Added ibuffer-filter-by-used-mode.
-       (ibuffer-mode): Added ibuffer-filter-by-used-mode to doc string.
+       * ibuffer.el (ibuffer-mode-map): Add ibuffer-filter-by-used-mode.
+       (ibuffer-mode-map): Add ibuffer-filter-by-used-mode.
+       (ibuffer-mode): Add ibuffer-filter-by-used-mode to doc string.
 
        * ibuf-ext.el (ibuffer-list-buffer-modes): New.
        (ibuffer-filter-by-used-mode): New.
 
 2002-07-31  Richard M. Stallman  <rms@gnu.org>
 
-       * makefile.w32-in (compile-after-backup): Renamed from `compile'.
+       * makefile.w32-in (compile-after-backup): Rename from `compile'.
        Use `compile-always'.
        (bootstrap): Use `compile', not `compile-files'.  Use `update-subdirs'.
-       (compile): Renamed from `compile-files'.
-       (compile-CMD, compile-SH): Renamed from `compile-files-*'.
+       (compile): Rename from `compile-files'.
+       (compile-CMD, compile-SH): Rename from `compile-files-*'.
 
        * emacs-lisp/bytecomp.el (byte-compile-find-cl-functions):
        Check that (car elt) is a string.
 2002-07-25  Carsten Dominik  <dominik@astro.uva.nl>
 
        * textmodes/reftex.el (reftex-compile-variables):
-       Simplified regular expression.
+       Simplify regular expression.
 
        * textmodes/reftex-parse.el (reftex-locate-bibliography-files):
-       Simplified the regexp.
+       Simplify the regexp.
 
        * textmodes/reftex-cite.el (reftex-get-bibkey-default): New function.
        (reftex-extract-bib-entries-from-thebibliography):
 
        * warnings.el (warning-levels): Add %s to the strings.
        (warning-group-format): New variable.
-       (warning-suppress-log-types): Renamed from warning-suppress-log.
-       (warning-suppress-types): Renamed from warning-suppress.
+       (warning-suppress-log-types): Rename from warning-suppress-log.
+       (warning-suppress-types): Rename from warning-suppress.
        (display-warning): Implement those changes.
 
 2002-07-23  Richard M. Stallman  <rms@gnu.org>
        (finder-inf.el): Remove.
        (update-authors): New target.
        (TAGS-LISP): Remove $(lispsource).
-       (compile-always): Renamed from `compile-files'.
+       (compile-always): Rename from `compile-files'.
        (compile): New target, adapted from `compile-files'.
        (compile-calc): New target.
        (recompile): Change `.' to $(lisp).
        * net/browse-url.el (browse-url-lynx-input-attempts): Use defcustom.
        (browse-url-lynx-input-delay): Add custom type and group.
 
-       * cus-start.el (double-click-fuzz): Added.
+       * cus-start.el (double-click-fuzz): Add.
 
 2002-07-22  Alan Shutko  <ats@acm.org>
 
        (reftex-toc-split-windows-horizontally): New option.
        (reftex-toc-split-windows-horizontally-fraction): New option.
        (reftex-include-file-commands): New option.
-       (reftex-cite-format-builtin): Added ?n for nocite.
+       (reftex-cite-format-builtin): Add ?n for nocite.
 
        * textmodes/reftex-index.el (reftex-query-index-phrase):
        Use `reftex-index-verify-function'.
 
        * textmodes/reftex.el (reftex-compile-variables):
        Use `reftex-include-file-commands'.
-       (reftex-type-query-prompt): Changed defconst to defvar.
+       (reftex-type-query-prompt): Change defconst to defvar.
        (reftex-type-query-help, reftex-typekey-to-format-alist)
        (reftex-typekey-to-prefix-alist, reftex-env-or-mac-alist)
        (reftex-special-env-parsers, reftex-label-mac-list)
        (ucs-mule-to-mule-unicode): New.
        (ucs-unify-8859): Use utf-8-fragment-on-decoding, set up Quail
        translation.
-       (ucs-fragment-8859): Modified consistent with ucs-unify-8859.
+       (ucs-fragment-8859): Modify consistent with ucs-unify-8859.
        (unify-8859-on-encoding-mode): Doc mod.  Fix custom version.
        (unify-8859-on-decoding-mode): Doc mod.  Change code.  Fix custom
        version.  Add custom dependencies.
 
 2002-07-13  Kim F. Storm  <storm@cua.dk>
 
-       * progmodes/compile.el (grep-tree): Fixed autoload.
+       * progmodes/compile.el (grep-tree): Fix autoload.
        Corrected use of undefined variable `match-files-aliases'.
 
 2002-07-12  Glenn Morris  <gmorris@ast.cam.ac.uk>
        (tramp-handle-file-name-directory): Don't return "/" when
        completing a remote root directory (where the filename looks like
        "/method:user@host:/").
-       (tramp-handle-ange-ftp): Deleted.
+       (tramp-handle-ange-ftp): Delete.
        (tramp-disable-ange-ftp): New function, called at toplevel,
        deletes Ange-FTP from file-name-handler-alist.
        (tramp-handle-make-symbolic-link): Implement.
        * files.el (after-find-file): Don't check for read-only status
        of files just created (and not yet saved on disk).
 
-       * ido.el (ido-completion-help): Changed XEmacs specific code to
+       * ido.el (ido-completion-help): Change XEmacs specific code to
        avoid byte compiler warning in GNU Emacs.
        (ido-set-matches1): Use regexp-quote instead of identity.
        (ido-complete-space): New function.
        (define-stroke, strokes-fix-button2-command, strokes-insinuated)
        (strokes-insinuate, global-set-stroke, describe-stroke)
        (load-user-strokes, save-strokes, strokes-bug-address)
-       (strokes-click-command): Deleted.
+       (strokes-click-command): Delete.
        (strokes-execute-stroke): Remove strokes-click-p case.
        (strokes-describe-stroke): Remove strokes-click-p stuff.
        (strokes-help): Fix.
        end-statement, specially with regards to nested subprograms.
        (comment-region advice): Initially disabled, for better compatibility
        with other modes.
-       (ada-fill-comment-paragraph): Fixed (no longer worked with Emacs 21).
+       (ada-fill-comment-paragraph): Fix (no longer worked with Emacs 21).
 
        * progmodes/ada-xref.el: Update copyright notice.
        (ada-xref-create-ali): The default is now not to create automatically
        (ada-find-references): New parameters arg and local-only.
        (ada-find-any-references): New parameters local-only and append.
        (ada-goto-declaration): Fix handling of predefined entities in xref.
-       (ada-get-all-references): Updated to the new xref format in GNAT 3.15,
+       (ada-get-all-references): Update to the new xref format in GNAT 3.15,
        still compatible with GNAT 3.14 of course.  Fix various calls to
        count-lines, that didn't work correctly when the buffer was narrowed.
 
 
        * simple.el (what-cursor-position): Use describe-char.
 
-       * descr-text.el (describe-char): Moved from mule-diag.el, renamed
+       * descr-text.el (describe-char): Move from mule-diag.el, renamed
        from describe-char-after.  Now calls describe-text-properties.
-       (describe-property-list): Renamed from describe-text-properties.
-       (describe-text-properties): Renamed from describe-text-at.
+       (describe-property-list): Rename from describe-text-properties.
+       (describe-text-properties): Rename from describe-text-at.
        New arg OUTPUT-BUFFER.
        (describe-text-properties-1):
        New subroutine, broken out from describe-text-properties.
        Output a newline before each section of the output.
 
        * international/mule-diag.el (describe-char-after):
-       Moved to descr-text.el.
+       Move to descr-text.el.
 
 2002-06-17  Eli Zaretskii  <eliz@is.elta.co.il>
 
        (eshell-sublist): Use copy-sequence.
        (eshell-copy-tree): Make it an alias for copy-tree.
 
-       * emacs-lisp/cl.el (copy-list): Moved back from subr.el.
+       * emacs-lisp/cl.el (copy-list): Move back from subr.el.
 
-       * subr.el (copy-list): Moved to cl.el.
+       * subr.el (copy-list): Move to cl.el.
        (copy-tree): Don't use copy-list or cl-pop.
 
 2002-06-10  Miles Bader  <miles@gnu.org>
        `tty-color-translate' and `tty-color-by-index'; this is now the
        main place to do it.
 
-2002-06-09  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-06-09  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-styles.el (c-set-style, c-set-style-1):
        Add another state for the `dont-override' flag where it only keeps
 
 2002-06-08  Colin Walters  <walters@verbum.org>
 
-       * subr.el (copy-list): Moved here from cl.el.
-       (copy-tree): Renamed here from `cl-copy-tree' in cl-extra.el.
+       * subr.el (copy-list): Move here from cl.el.
+       (copy-tree): Rename here from `cl-copy-tree' in cl-extra.el.
 
-       * emacs-lisp/cl-extra.el (cl-copy-tree): Moved to `copy-tree' in
+       * emacs-lisp/cl-extra.el (cl-copy-tree): Move to `copy-tree' in
        subr.el.  Add a defalias with the old name.
 
-       * emacs-lisp/cl.el (copy-list): Moved to subr.el.
+       * emacs-lisp/cl.el (copy-list): Move to subr.el.
 
        * replace.el (occur-mode): Don't set up categories.  Do set
        `font-lock-defaults', and be sure to set `font-lock-core-only'.
        (ibuffer-compile-format): Don't treat `name' category specially.
        (ibuffer-column name): Use `font-lock-face'.
        (filename-and-process): Ditto.
-       (ibuffer-buffer-name-category): Renamed to
+       (ibuffer-buffer-name-category): Rename to
        `ibuffer-buffer-name-face'.  Don't use categories.
        (ibuffer-update-title-and-summary): Use `font-lock-face'.
        (ibuffer-insert-filter-group): Ditto.
 
        * subr.el (open-network-stream, open-network-stream-nowait)
        (open-network-stream-server, process-kill-without-query):
-       Moved from simple.el.
+       Move from simple.el.
 
        * simple.el (open-network-stream, open-network-stream-nowait)
        (open-network-stream-server, process-kill-without-query):
-       Moved to subr.el.
+       Move to subr.el.
 
        * simple.el (byte-compiling-files-p): Function deleted.
 
-       * textmodes/ispell.el (ispell-library-directory): Renamed from
+       * textmodes/ispell.el (ispell-library-directory): Rename from
        ispell-library-path.  If Ispell is not installed, init to nil.
        (check-ispell-version): Doc fix.
        (ispell-menu-map): Get rid of byte-compiling-files-p hackery;
 
        * textmodes/sgml-mode.el (xml-mode): New alias for `sgml-mode'.
 
-       * emacs-lisp/bytecomp.el (byte-compile-last-line): Deleted.
+       * emacs-lisp/bytecomp.el (byte-compile-last-line): Delete.
        (byte-compile-delete-first): New function.
        (byte-compile-read-position): New variable.
        (byte-compile-last-position): New variable.
 
 2002-05-27  Kim F. Storm  <storm@cua.dk>
 
-       * simple.el (push-mark-command): Added optional NOMSG arg.
+       * simple.el (push-mark-command): Add optional NOMSG arg.
 
        * emulation/cua-base.el (cua-set-mark): Align pop to mark
        behavior with standard set-mark-command.
        * rot13.el (rot13-translate-table): New variable.
        (rot13, rot13-string, rot13-region): New functions.
 
-2002-05-25  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-05-25  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-add-stmt-syntax): Fix some cases
        of wrong anchoring, e.g. for else-if compounds.
        (apropos-command, apropos, apropos-value, apropos-documentation):
        Allow keywords in addition to regexp.  Added scoring.
        (apropos-documentation-check-doc-file)
-       (apropos-documentation-check-elc-file): Added scoring.
+       (apropos-documentation-check-elc-file): Add scoring.
        (apropos-print): Sort according to score.
 
 2002-05-22  Colin Walters  <walters@cis.ohio-state.edu>
        (ibuffer-compile-format): If the current column is a `name'
        column, figure out the appropriate category to put on it.
        (filename-and-process): Use category property.
-       (ibuffer-fontify-region-function): Deleted.
-       (ibuffer-unfontify-region-function): Deleted.
+       (ibuffer-fontify-region-function): Delete.
+       (ibuffer-unfontify-region-function): Delete.
        (ibuffer-update-title-and-summary): Use category properties.
        (ibuffer-insert-filter-group): Ditto.
        (ibuffer-mode): Set up category properties.
 
        * ibuffer.el (toplevel): Require font-lock, to get the face
        definitions.
-       (ibuffer-use-fontification): Deleted.
+       (ibuffer-use-fontification): Delete.
        (column filename-and-process): New column.
        (ibuffer-formats): Use it by default.
        (ibuffer-name-map, ibuffer-mode-name-map)
 
        * emacs-lisp/find-func.el (find-function-search-for-symbol):
        Add autoload cookie.
-       (find-function-regexp): Include
-       "\(quote " to match the defaliases in loaddefs.el.
+       (find-function-regexp):
+       Include "\(quote " to match the defaliases in loaddefs.el.
 
        * filesets.el (filesets-conditional-sort): Use copy-sequence,
        not copy-list.
 
 2002-05-03  John Wiegley  <johnw@gnu.org>
 
-       * eshell/esh-var.el (eshell-modify-global-environment): Added this
+       * eshell/esh-var.el (eshell-modify-global-environment): Add this
        customization variable, which will cause any "export" commands
        within any eshell buffer to modify the global Emacs environment.
        It defaults to nil, which means that such commands will only
        * align.el (align-region): Fix the fix to align-region, because
        the "name" argument was appearing twice.
 
-2002-05-01  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-05-01  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-beginning-of-decl-1): Better way
        to handle protection labels, one which doesn't get confused by
        * subr.el (remove-yank-excluded-properties): New helper function.
        (insert-for-yank, insert-buffer-substring-as-yank): Use it.
 
-       * simple.el (yank-excluded-properties): Added help-echo to list.
+       * simple.el (yank-excluded-properties): Add help-echo to list.
 
 2002-04-29  Glenn Morris  <gmorris@ast.cam.ac.uk>
 
        not a list.
 
        * replace.el (occur-revert-arguments):
-       Renamed from occur-revert-properties.  All uses changed.
+       Rename from occur-revert-properties.  All uses changed.
 
 2002-04-28  Pavel Janík  <Pavel@Janik.cz>
 
        (buffers-menu-show-status): New variables.
        (menu-bar-update-buffers-1): Use them.
 
-2002-04-24  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-24  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-mask-comment): More fixes when used
        from `c-do-auto-fill' and point is at or near the limit of the
        (occur-mode-display-occurrence): Handle buffer property.
        (list-matching-lines-face): Use defcustom.
        (list-matching-lines-buffer-name-face): New variable.
-       (occur-accumulate-lines): Renamed from `ibuffer-accumulate-lines',
+       (occur-accumulate-lines): Rename from `ibuffer-accumulate-lines',
        in ibuffer.el.
        (occur-read-primary-args): Move out of `occur'.
        (occur): Delete.  Now simply call `occur-1'.
        (multi-occur, multi-occur-by-filename-regexp): New functions.
        (occur-1): New function.
-       (occur-engine): Renamed from `ibuffer-occur-engine' to replace the
+       (occur-engine): Rename from `ibuffer-occur-engine' to replace the
        previous implementation of `occur'; taken from ibuf-ext.el.
        (occur-fontify-on-property): New function.
        (occur-fontify-region-function, occur-unfontify-region-function):
        New functions.
 
-       * ibuffer.el (ibuffer-accumulate-lines): Moved to replace.el.
+       * ibuffer.el (ibuffer-accumulate-lines): Move to replace.el.
 
        * ibuf-ext.el (ibuffer-depropertize-string): Delete.
        (ibuffer-occur-match-face): Delete.
        (ibuffer-occur-mouse-display-occurence): Delete.
        (ibuffer-occur-goto-occurence, ibuffer-occur-display-occurence)
        (ibuffer-do-occur-1, ibuffer-occur-revert-buffer-function): Delete.
-       (ibuffer-occur-engine): Moved to replace.el.
+       (ibuffer-occur-engine): Move to replace.el.
        (ibuffer-do-occur): Simply call `occur-1'.
 
        * play/gamegrid.el (gamegrid-add-score-with-update-game-score):
        * dired.el (dired-mouse-find-file-other-window):
        Handle events that move out of the window.
 
-2002-04-23  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-23  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-cmds.el (c-mask-comment): Fixed bug where point
+       * progmodes/cc-cmds.el (c-mask-comment): Fix bug where point
        was moved to the following line when it was at the first line
        of a block comment where comment-start-skip matched to eol.
 
        * diary-lib.el (include-other-diary-files): Allow modifying
        included buffer, to turn off selective display.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-mode.el (c-define-abbrev-table): New function to
        pass the SYSTEM-FLAG to `define-abbrev' in a way that works in
        emacsen that doesn't support it.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-align.el, progmodes/cc-engine.el,
        * progmodes/cc-styles.el, progmodes/cc-vars.el
        (c-opt-asm-stmt-key): New language variable to recognize the
        beginning of asm statements.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-guess-basic-syntax):
        Detect variable declarations after class and struct declarations
        correctly.  Fixed limit error when finding the anchor for
        template-args-cont and topmost-intro-cont.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-beginning-of-defun)
        (c-declaration-limits): Find the "line oriented" declaration
        start too, just like the "line oriented" end is found.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-vars.el (c-offsets-alist): A more sane default
        for `inexpr-statement'.  This is not compatible, though.
        I think the benefit of a good default style outweights that in
        this case.  Besides, `inexpr-statement' is not very common.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-electric-delete-forward):
        Fix silly bug that caused it to delete backwards in hungry delete
        list initializers correctly (but costly; it ought to be
        integrated into `c-beginning-of-statement-1').
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el, progmodes/cc-engine.el
        (c-beginning-of-defun, c-end-of-defun, c-mark-function):
        handles declarations that continue after the block.
 
        * progmodes/cc-engine.el (c-syntactic-re-search-forward):
-       Added an option to restrict matching to the top level of the
+       Add an option to restrict matching to the top level of the
        current paren sexp.
 
        * progmodes/cc-langs.el (c-opt-block-decls-with-vars-key):
 
        (c-syntactic-eol): New regexp to match a "syntactic" eol.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-engine.el (c-guess-basic-syntax): Fixed a bug
+       * progmodes/cc-engine.el (c-guess-basic-syntax): Fix a bug
        that often caused the backward limit to be lost at the top
        level.  This improves performance a bit.
 
        (c-beginning-of-decl-1): New function that put point at the
        beginning of the declaration.  It handles K&R argdecl blocks.
 
-       (c-guess-basic-syntax): Replaced the `knr-argdecl' recognition
+       (c-guess-basic-syntax): Replace the `knr-argdecl' recognition
        code with one that doesn't depend on the current indentation.
        The anchor position for `knr-argdecl' has also changed, but in
        a way that is unlikely to cause compatibility problems.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-defs.el, progmodes/cc-engine.el
        (c-forward-comment): `forward-comment' in XEmacs skips over
        setup of the language specific variables.  The regexp-opt
        mangling is also done at compile time now.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-indent-line-or-region):
        Call `c-indent-line' directly instead of through
        `indent-according-to-mode' so that this function always
        indents syntactically.
 
-       * progmodes/cc-engine.el (c-guess-basic-syntax): Fixed a bug
+       * progmodes/cc-engine.el (c-guess-basic-syntax): Fix a bug
        where a class beginning with a nested class could cause an
        infinite loop (the state outside the narrowed out class is
        never used now).
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-align.el, progmodes/cc-cmds.el,
        progmodes/cc-engine.el, progmodes/cc-vars.el: Fixes so that
        * progmodes/cc-align.el: Use the vector form in the return
        value in all cases where lineup functions return absolute columns.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-add-stmt-syntax)
        (c-guess-basic-syntax): Anchor `brace-list-intro' and
        (c-major-mode-is): Compare against the buffer local variable
        `c-buffer-is-cc-mode', which is faster than using `derived-mode-class'.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-forward-syntactic-ws)
        (c-backward-syntactic-ws, c-forward-token-1)
        That's signified by making their documentation into docstrings.
 
        (c-whack-state, c-hack-state, c-skip-case-statement-forward):
-       Removed these internal functions since they aren't used.
+       Remove these internal functions since they aren't used.
 
        (c-forward-to-cpp-expression): Classified this function as internal.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-langs.el (c-ObjC-class-key, c-Java-class-key):
-       Simplified these regexps; the class keywords they contain
+       Simplify these regexps; the class keywords they contain
        ought to be enough to avoid false matches, so checking for
        following identifiers etc is just unnecessary (and might also
        fail for oddly formatted code).
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el, progmodes/cc-cmds.el
        (c-forward-comment-lc): New function that behaves like
        normal label in a switch block as a case label, to get
        consistent lineup with the case labels.
 
-       * progmodes/cc-engine.el (c-backward-syntactic-ws): Fixed bug
+       * progmodes/cc-engine.el (c-backward-syntactic-ws): Fix bug
        in skipping over a macro that ends with an empty line.
 
        * progmodes/cc-styles.el: Require cc-align since styles added
        defined there, and so the `c-valid-offset' check might
        otherwise complain on them.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-align.el, progmodes/cc-mode.el:
        * progmodes/cc-vars.el: Added two new lineup functions:
        * progmodes/cc-langs.el (c-symbol-key): Made this variable
        mode specific, to handle Pike special symbols like `== better.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el, progmodes/cc-engine.el,
        progmodes/cc-vars.el (c-report-syntactic-errors): A new
        to off; since CC Mode ignores most syntactic errors it might
        as well ignore them all for the sake of consistency.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-looking-at-inexpr-block):
        Optimization.  Can give a noticeable speedup if there's a
        large preceding function or class body.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-align.el, progmodes/cc-cmds.el: Use more
        efficient and correct insertion functions in many places.
        * progmodes/cc-styles.el (c-read-offset): Unbind SPC in the
        completion to make it easier to enter lists.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-cmds.el (c-beginning-of-defun): Fixed bug where
+       * progmodes/cc-cmds.el (c-beginning-of-defun): Fix bug where
        c-state-cache was clobbered.
 
        * progmodes/cc-cmds.el, progmodes/cc-engine.el
-       (c-calculate-state): Moved from cc-cmds.el to cc-engine.el due
+       (c-calculate-state): Move from cc-cmds.el to cc-engine.el due
        to dependency.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-parse-state): Ignore unbalanced
        open parens in macros (if point isn't in the same one).
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-context-open-line): New function
        that is the `open-line' equivalent to `c-context-line-break'.
        for Emacs 21 since `indent-new-comment-line' has been changed
        to `comment-indent-new-line' there.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el, progmodes/cc-langs.el
        (c-stmt-delim-chars, c-stmt-delim-chars-with-comma):
        the set of statement delimiting characters, to allow it to be
        changed dynamically and per-mode.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-looking-at-bos)
        (c-looking-at-inexpr-block, c-add-stmt-syntax)
        Made arglist-cont anchor correctly in arglists that contain statements.
 
        * progmodes/cc-engine.el (c-guess-basic-syntax):
-       Fixed consistent anchoring of defun-block-intro in defuns in code
+       Fix consistent anchoring of defun-block-intro in defuns in code
        blocks (can only occur in Pike).
 
        * progmodes/cc-engine.el (c-looking-at-inexpr-block)
-       (c-looking-at-inexpr-block-backward): Changed the arguments to
+       (c-looking-at-inexpr-block-backward): Change the arguments to
        require containing sexps and paren state, for better efficiency.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el, progmodes/cc-engine.el,
        progmodes/cc-vars.el: Improved anchoring of statement and
        handling of labels in front of substatements.
 
        (c-guess-continued-construct, c-guess-basic-syntax):
-       Improved and unified anchoring at statements.  Statements beginning
+       Improve and unified anchoring at statements.  Statements beginning
        with comments or labels are now avoided, by going out of
        blocks and containing statements if necessary.  This nesting
        handling also fixes the case when there's a statement after a
        (c-electric-colon): Map the new `substatement-label' to
        `label' when consulting `c-hanging-colons-alist'.
 
-       (c-offsets-alist): Added substatement-label.  Updated the
+       (c-offsets-alist): Add substatement-label.  Updated the
        comments for the new anchoring positions at statements.
 
        * progmodes/cc-engine.el (c-guess-basic-syntax): Use more sane
        neutralized by a kludge in `c-get-syntactic-indentation' which
        ignored such anchor points.
 
-       (c-get-syntactic-indentation): Removed the kludge that was
+       (c-get-syntactic-indentation): Remove the kludge that was
        necessary due to buggy anchor points.
 
        * progmodes/cc-engine.el (c-guess-basic-syntax): Do not check
        recognized as normal arglist-cont if we're directly in a macro
        arglist, for consistency with other "bare" statements.
 
-       * progmodes/cc-engine.el (c-looking-at-bos): Added optional
+       * progmodes/cc-engine.el (c-looking-at-bos): Add optional
        limit arg for backward searches.
 
        * progmodes/cc-engine.el (c-looking-at-inexpr-block):
        in the list of syntactic symbols.  Only the first is used as
        the base for the offset calculation.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-indent-defun): Indent the current
        macro if inside one at the top level.  Do not throw an error
        * progmodes/cc-engine.el (c-least-enclosing-brace):
        Rewritten to not be destructive.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-context-line-break): Only do a macro
        line break when point is inside the content of it; if it's in
        * progmodes/cc-engine.el (c-guess-basic-syntax): Do not add
        cpp-macro-cont inside the argument list to a #define.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-defs.el (c-forward-comment): Implemented a
        kludge to avoid the problem most forward-comment incarnations
        have with `\' together with comment parsing.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-engine.el (c-check-state-cache): Fixed bug
+       * progmodes/cc-engine.el (c-check-state-cache): Fix bug
        which could cause the state returned by `c-parse-state' to
        lack a closed paren element.  That in turn could result in
        very long searches, since it's common that they start from the
        last preceding close brace.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-beginning-of-statement-1): Do not
        treat else-if as a single continuation, since that'd make it
        the starting if, but that doesn't affect the indentation for
        any reasonably sane style.  Also introduced a noerror flag.
 
-       (c-beginning-of-closest-statement): Removed;
+       (c-beginning-of-closest-statement): Remove;
        c-beginning-of-statement-1 now avoids the problem this one solved.
 
        * progmodes/cc-engine.el (c-guess-continued-construct)
        before the start of the statement.
 
        * progmodes/cc-engine.el (c-looking-at-inexpr-block):
-       Added flag to disable looking at the type of the surrounding paren
+       Add flag to disable looking at the type of the surrounding paren
        since that confuses c-beginning-of-statement-1 and a couple of
        other places.
 
        Avoid stepping to the previous statement in case 18.
        Improvements in recognition of statement blocks on the top level.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-beginning-of-statement-1)
        (c-crosses-statement-barrier-p): Rewritten to get a well
        in recognition of do-while constructs.
 
        (c-backward-to-start-of-do, c-backward-to-start-of-if):
-       Removed; use c-beginning-of-statement-1 instead.
+       Remove; use c-beginning-of-statement-1 instead.
 
        (c-guess-continued-construct, c-guess-basic-syntax):
        Various fixes to not depend on the bugs previously in
        use the new behavior of c-beginning-of-statement-1 better.
        Fixed recognition of catch blocks inside macros.
 
-       * progmodes/cc-engine.el (c-backward-syntactic-ws): Fixed bug
+       * progmodes/cc-engine.el (c-backward-syntactic-ws): Fix bug
        in skipping over a macro.
 
        * progmodes/cc-langs.el (c-label-kwds): New variable to
        contain the appropriate c-*-label-kwds value.
 
-       * progmodes/cc-vars.el (defcustom-c-stylevar): Fixed value
+       * progmodes/cc-vars.el (defcustom-c-stylevar): Fix value
        evaluation bug that caused the widget for
        c-block-comment-prefix to bug out.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-guess-basic-syntax):
-       Improved recognition of statements: They are now recognized in
+       Improve recognition of statements: They are now recognized in
        contexts where they normally can't occur, e.g. on the top level or
        in function call arguments.  This is mainly useful to recognize
        statements in macros at the top level, and in arguments to
        analysis in ObjC mode.
 
        * progmodes/cc-engine.el (c-beginning-of-statement-1):
-       Fixed bug in do-while statements where the body is not a block.
+       Fix bug in do-while statements where the body is not a block.
 
        * progmodes/cc-styles.el (c-set-style):
        Reset c-special-indent-hook to its global value if in override mode.
        * progmodes/cc-engine.el (c-evaluate-offset, c-get-offset):
        Use c-benign-error to report the c-strict-syntax-p error.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-align.el, progmodes/cc-defs.el:
        * progmodes/cc-cmds.el, progmodes/cc-engine.el, progmodes/cc-vars.el:
        default.  An extra flag argument is required to do that.
 
        (c-macro-start, c-query-macro-start)
-       (c-query-and-set-macro-start): Added a cache for the macro
+       (c-query-and-set-macro-start): Add a cache for the macro
        start position.
 
        (c-forward-syntactic-ws, c-backward-syntactic-ws): Fixes for
        in forward-comment in some emacsen when it hits a buffer limit
        with a large repeat count.
 
-       (c-lineup-macro-cont): Improved behavior when
+       (c-lineup-macro-cont): Improve behavior when
        c-syntactic-indentation-in-macros is nil.
 
        (c-syntactic-indentation-in-macros, c-backslash-max-column)
        (c-benign-error): New macro to report errors that doesn't need
        to interrupt the operation.
 
-       * progmodes/cc-defs.el (c-point): Added eonl and eopl positions.
+       * progmodes/cc-defs.el (c-point): Add eonl and eopl positions.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-electric-brace, c-indent-region):
-       Removed most of the c-state-cache fiddling, since the global
+       Remove most of the c-state-cache fiddling, since the global
        state cache now handles this.
 
-       * progmodes/cc-engine.el (c-guess-basic-syntax): Fixed bug
+       * progmodes/cc-engine.el (c-guess-basic-syntax): Fix bug
        when there's an open paren at the very first char of the
        visible buffer region.
 
 
        * progmodes/cc-engine.el (c-whack-state-after): Slight optimization.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el, progmodes/cc-langs.el,
        progmodes/cc-align.el: Improvements to syntactic analysis
        (c-block-stmt-1-kwds, c-block-stmt-2-kwds): New variables used
        by `c-guess-basic-syntax'.
 
-       (c-parse-state): Fixed bug with braces inside macros when
+       (c-parse-state): Fix bug with braces inside macros when
        using cached state info.
 
        (c-forward-to-cpp-expression): New function to aid in
        (c-offsets-alist): Made `c-lineup-macro-cont' the default for
        cpp-macro-cont.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-beginning-of-statement-1)
        (c-forward-syntactic-ws): Fixes to handle continued lines.
        (c-backward-to-start-of-if, c-guess-basic-syntax):
        Do syntactic analysis inside macros.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-indent-region): Did a speedup made
        possible by the more flexible state cache.
        * progmodes/cc-engine.el (c-parse-state, c-whack-state-before)
        (c-whack-state-after, c-hack-state)
        (c-narrow-out-enclosing-class, c-guess-basic-syntax):
-       Improved the state cache system.  It now can use partial info from
+       Improve the state cache system.  It now can use partial info from
        an old cached state to calculate a new one at a different
        position.  Removed some kludges to avoid the state cache.
        The new functions `c-whack-state-before' and `c-whack-state-after'
        replace the now obsolete `c-whack-state'.
 
        * progmodes/cc-engine.el (c-beginning-of-statement-1):
-       Optimized backing through a macro.  This can speed things up
+       Optimize backing through a macro.  This can speed things up
        quite a bit when there are long macros before point.
 
        (c-beginning-of-macro): Do not ignore the limit.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-electric-continued-statement):
-       Fixed a bug where the keyword wasn't reindented correctly if
+       Fix a bug where the keyword wasn't reindented correctly if
        followed by another keyword or identifier.
 
        * progmodes/cc-engine.el (c-parse-state): Ignore closed brace
        second of two "do { } while (0)" macros after each other
        indented differently.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-beginning-of-macro)
        (c-forward-syntactic-ws): Recognize "#!" as a preprocessor
        interpreter lines like "#!/usr/bin/pike" at the beginning of
        the file.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-looking-at-inexpr-block):
        Recognize brace blocks inside a parenthesis expression as
        inexpr-statement.  Useful when writing statements as macro arguments.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-fill-paragraph, c-do-auto-fill)
        (c-mask-comment): Broke out the comment masking code from
        able to do the same thing in `c-do-auto-fill'.  This should
        make auto-fill-mode behave better.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-electric-brace, c-electric-paren):
        Check `executing-macro' to avoid blinking parens when macros
        are executed.
 
        * progmodes/cc-mode.el, progmodes/cc-styles.el
-       (c-setup-filladapt): Moved from cc-mode.el to cc-styles.el for
+       (c-setup-filladapt): Move from cc-mode.el to cc-styles.el for
        consistency with `c-setup-paragraph-variables' (which was
        placed there due to the dependency from `c-set-style').
 
        there already is a style called "user" defined when CC Mode
        starts up for the first time.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el, progmodes/cc-vars.el
-       (c-comment-indent, c-indent-comment-alist): Added new variable
+       (c-comment-indent, c-indent-comment-alist): Add new variable
        `c-indent-comment-alist' to allow better control over
        `c-comment-indent'.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-align.el (c-lineup-C-comments): Try to match
        both `comment-start-skip' and the comment prefix on the
        `comment-start-skip' match whatever `c-comment-prefix-regexp' matches.
 
        * progmodes/cc-mode.el, progmodes/cc-styles.el (c-common-init)
-       (c-set-style-1, c-setup-paragraph-variables): Moved the
+       (c-set-style-1, c-setup-paragraph-variables): Move the
        variable initialization based on `c-comment-prefix-regexp' to
        a new function `c-setup-paragraph-variables', which is now
        used both at mode init and when a style that sets
        `c-comment-prefix-regexp' is activated.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-beginning-of-member-init-list):
        Better handling of C++ template args to avoid confusion with
        `<' and `>' used as operators in member init expressions.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-most-enclosing-brace)
-       (c-least-enclosing-brace): Added optional second arg to limit
+       (c-least-enclosing-brace): Add optional second arg to limit
        the search to before a certain point.
 
-       * progmodes/cc-engine.el (c-guess-basic-syntax): Fixed bug which
+       * progmodes/cc-engine.el (c-guess-basic-syntax): Fix bug which
        could cause incorrect analysis if a cached state is used (usually
        only happens when an electric key reindents a line).
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-defs.el (c-forward-comment): More idiosyncrasy
        insulation.  This time for XEmacs 21.
        the indentation of the current line.  Switched places on cases
        5D.3 and 5D.4 and made them use more syntactically correct methods.
 
-       (c-inher-key): Removed since the code in
+       (c-inher-key): Remove since the code in
        `c-guess-basic-syntax' now uses token-based search.
 
        * progmodes/cc-cmds.el, progmodes/cc-mode.el (c-mode-menu):
-       Added a submenu to access some toggles.
+       Add a submenu to access some toggles.
 
        (c-toggle-syntactic-indentation): New function to toggle the
        variable `c-syntactic-indentation'.
 
-       * progmodes/cc-styles.el (c-set-style): Improved the error
+       * progmodes/cc-styles.el (c-set-style): Improve the error
        message for incorrect offsets a bit.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-indent-exp): Don't require that the
        sexp follows point immediately, instead find the closest
        following open paren that ends on another line.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-align.el (c-lineup-cascaded-calls):
        New indentation function.
        * progmodes/cc-engine.el (c-beginning-of-macro): Bugfix for
        directives with whitespace between the '#' and the name.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-forward-syntactic-ws)
        (c-backward-syntactic-ws): Handle line continuations as
        whitespace.  Don't move past a macro if that'd take us past
        the limit.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-beginning-of-macro)
        (c-forward-syntactic-ws): Multiline strings begin with `#"' in
        Pike, and that shouldn't be confused with a preprocessor directive.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el: Extended the kludge to interoperate
        with the delsel and pending-del packages wrt to the new
        function `c-electric-delete-forward'.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-indent-exp): Keep the indentation of
        the block itself, i.e. only indent the contents in it.
        argument to completing-read instead of initial-contents, if
        the function is recent enough to support it.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-mode.el (c-mode-help-address):
-       Removed bug-gnu-emacs@gnu.org from the receiver list for bug reports.
+       Remove bug-gnu-emacs@gnu.org from the receiver list for bug reports.
        I've almost never seen a bug reported this way that should go
        to that list, but it's rather common that the reports concern
        the combination CC Mode and XEmacs instead.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-cmds.el (c-electric-paren): Fixed bug when both
+       * progmodes/cc-cmds.el (c-electric-paren): Fix bug when both
        brace-elseif-brace and brace-catch-brace are active and
        there's a "else if"-block before the catch block.
 
        * progmodes/cc-menus.el (cc-imenu-c++-generic-expression):
        Detect function headers that span lines.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-electric-brace)
        (c-electric-semi&comma, c-electric-colon, c-electric-paren):
        Check for last on line only for doing the auto-newline-mode
        stuff, not for the reindentation.
 
-       * progmodes/cc-cmds.el (c-electric-brace): Fixed bugs in the
+       * progmodes/cc-cmds.el (c-electric-brace): Fix bugs in the
        handling of c-syntactic-indentation: When it's nil, indent the
        new lines but don't reindent the current one.  Reindent the
        line only when the inserted brace comes first on it, instead
        of last.
 
        * progmodes/cc-cmds.el (c-electric-brace)
-       (c-electric-semi&comma): Fixed two places where
+       (c-electric-semi&comma): Fix two places where
        c-syntactic-indentation wasn't heeded.
 
        * progmodes/cc-cmds.el (c-electric-pound): Don't be electric
        is found.  Fixed case where an else following a do-while
        statement could be associated with an if inside the do-while.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-guess-fill-prefix): Tuned the dwim
        for the fallback to add a single space after the comment prefix.
        behavior in some special cases, especially for single-line comments.
        Avoid breaking up a comment starter or ender.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-outline-level): Applied patch from
        the Emacs sources to make this work in invisible text.
 
-       * progmodes/cc-langs.el (c-switch-label-key): Fixed regexp to
+       * progmodes/cc-langs.el (c-switch-label-key): Fix regexp to
        not be confused by a later ':' on the same line as the label.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el, progmodes/cc-mode.el
        (c-electric-delete, c-electric-delete-forward):
        `c-electric-delete-forward' is now bound to C-d to get the
        electric behavior on that key too.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-cmds.el (c-fill-paragraph): Fixed bogus direct
+       * progmodes/cc-cmds.el (c-fill-paragraph): Fix bogus direct
        use of c-comment-prefix-regexp, which caused an error when
        it's a list.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-mode.el, progmodes/cc-vars.el (c-common-init)
-       (c-default-style): Removed the hardcoded switch to "java" style
+       (c-default-style): Remove the hardcoded switch to "java" style
        in Java mode.  It's instead taken care of by the default value
        for c-default-style.
 
-2002-04-22  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2002-04-22  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-align.el (c-lineup-math): Fix bug where lineup
        was triggered by equal signs in string literals.
 2002-04-19  Miles Bader  <miles@gnu.org>
 
        * custom.el (customize-mark-to-save, customize-mark-as-set)
-       (custom-quote): Moved here from `cus-edit.el'.
+       (custom-quote): Move here from `cus-edit.el'.
        * cus-edit.el (customize-mark-to-save, customize-mark-as-set)
-       (custom-quote): Moved to `custom.el'.
+       (custom-quote): Move to `custom.el'.
 
 2002-04-18  Richard M. Stallman  <rms@gnu.org>
 
        (ediff-clone-buffer-for-region-comparison): More robust window
        arrangement while prompting for regions to compare.
        (ediff-make-cloned-buffer): Use generate-new-buffer-name.
-       (ediff-inferior-compare-regions): Deleted unused vars
+       (ediff-inferior-compare-regions): Delete unused vars
        ctl-buf and quit-now.
 
 2002-04-15  Richard M. Stallman  <rms@gnu.org>
        call `math-group-float'.
 
        * play/gamegrid.el (gamegrid-add-score-with-update-game-score):
-       Renamed from `gamegrid-add-score'.
+       Rename from `gamegrid-add-score'.
        (gamegrid-add-score-insecure): Restored from the old
        `gamegrid-add-score'.
        (gamegrid-add-score): Just dispatch on `system-type' to one of the
        (sgml-insert-end-tag): New funs taken from xml-lite.el.
        (sgml-calculate-indent): Use them.
        (sgml-slash-matching): Rename from sgml-slash.
-       (sgml-slash): Copied from xml-lite and changed to use
+       (sgml-slash): Copy from xml-lite and changed to use
        sgml-slash-matching and sgml-quick-keys.
 
        * international/mule-cmds.el (standard-keyboard-coding-systems):
 
        * info.el (info-tool-bar-map): Use tool-bar-local-item-from-menu.
 
-       * toolbar/tool-bar.el (tool-bar-local-item): Renamed from
+       * toolbar/tool-bar.el (tool-bar-local-item): Rename from
        tool-bar-add-item, and new arg MAP.
        (tool-bar-add-item): Now calls tool-bar-local-item.
-       (tool-bar-local-item-from-menu): Renamed from
+       (tool-bar-local-item-from-menu): Rename from
        tool-bar-add-item-from-menu, and new arg IN-MAP.
        (tool-bar-add-item-from-menu): Now calls tool-bar-local-item-from-menu.
 
 
 2002-03-29  Richard M. Stallman  <rms@gnu.org>
 
-       * subr.el (play-sound-file): Moved to simple.el.
+       * subr.el (play-sound-file): Move to simple.el.
 
-       * simple.el (play-sound-file): Moved from subr.el, made unconditional.
+       * simple.el (play-sound-file): Move from subr.el, made unconditional.
 
 2002-03-29  Colin Walters  <walters@verbum.org>
 
 
 2002-03-28  Richard M. Stallman  <rms@gnu.org>
 
-       * dired.el (dired-toggle-marks): Renamed from dired-do-toggle.
+       * dired.el (dired-toggle-marks): Rename from dired-do-toggle.
        Bindings changed.
 
        * progmodes/compile.el (compilation-handle-exit):
        * gud.el (gud-jdb-sourcepath): New variable, saves jdb -sourcepath
        parameter value.
        (gud-jdb-build-source-files-list): Comment clarification.
-       (gud-jdb-massage-args): Reworked into loop-based argument list
+       (gud-jdb-massage-args): Rework into loop-based argument list
        processing in order to support -classpath and -sourcepath argument
        processing.
        (gud-jdb-find-source-using-classpath): Prepend gud-jdb-sourcepath
        * ediff-util.el (ediff-toggle-hilit): Fix toggling of highlighting.
        (ediff-select-difference): Take highlighting style into account.
        (ediff-clone-buffer-for-region-comparison): New function.
-       (ediff-inferior-compare-regions): Added comparison of current diff
+       (ediff-inferior-compare-regions): Add comparison of current diff
        regions.
 
        * ediff.el (ediff-clone-buffer-for-region-comparison)
-       (ediff-clone-buffer-for-window-comparison): Moved to ediff-util.el.
+       (ediff-clone-buffer-for-window-comparison): Move to ediff-util.el.
 
 2002-03-19  Paul Reilly  <pmr-sav@hamm.pajato.com>
 
 
 2002-03-17  Stefan Monnier  <monnier@cs.yale.edu>
 
-       * textmodes/sgml-mode.el (sgml-xml-mode): Renamed from sgml-xml.
+       * textmodes/sgml-mode.el (sgml-xml-mode): Rename from sgml-xml.
        (sgml-xml-guess): Simplify.
        (sgml-mode-common): Remove (move into sgml-mode).
        (sgml-mode): Add code from sgml-mode-common.
 
 2002-03-16  Simon Marshall  <simon.marshall@misys.com>
 
-       * imenu.el (imenu-menubar-modified-tick): Renamed from
+       * imenu.el (imenu-menubar-modified-tick): Rename from
        imenu-update-menubar-modified-tick.
        (imenu-update-menubar): Update imenu-menubar-modified-tick
        whenever outer condition succeeds.
        (dired-internal-do-deletions): Use dired-fun-in-all-buffers
        and dired-delete-entry, to update this buffer (and others).
 
-       * dired-aux.el (dired-fun-in-all-buffers): Moved to dired.el.
+       * dired-aux.el (dired-fun-in-all-buffers): Move to dired.el.
 
        * facemenu.el (facemenu-add-new-face):
        Pass region args to facemenu-set-face, when there is a region.
        (lisp-loop-forms-indentation, lisp-simple-loop-indentation):
        New user options.
        (extended-loop-p, common-lisp-loop-part-indentation): New functions.
-       (common-lisp-indent-function-1): Renamed from
+       (common-lisp-indent-function-1): Rename from
        common-lisp-indent-function.
        (common-lisp-indent-function): Handle loop forms specially.
        (lisp-indent-defmethod): Use car/cdr instead of first/rest.
        (ibuffer-insert-buffer-line): Ditto.
        (ibuffer-map-lines): Ditto.
        (ibuffer-insert-buffers-and-marks): Ditto.
-       (ibuffer-update-title-and-summary): Renamed from
+       (ibuffer-update-title-and-summary): Rename from
        `ibuffer-update-title'.  Handle "summarizer" columns.
        (ibuffer-clear-summary-columns): New function.
 
        (hif-tokenize): Handle `?' and ':' as tokens.
        (hif-expr): Parse conditional expressions.
        (hif-or-expr): Parse `||' expressions.
-       (hif-and-expr): Renamed from hif-term.
+       (hif-and-expr): Rename from hif-term.
        (hif-conditional): New function to evaluate a conditional
        expression.
 
        * cus-start.el: Rename automatic-hscroll-step and
        automatic-hscroll-margin into hscroll-step and hscroll-margin.
 
-       * frame.el (auto-hscroll-mode): Renamed from automatic-hscrolling.
+       * frame.el (auto-hscroll-mode): Rename from automatic-hscrolling.
        (automatic-hscrolling): Now a defvaralias for auto-hscroll-mode.
 
        * mouse.el (mouse-region-delete-keys): Add deletechar.
 
 2002-03-03  Sam Steingold  <sds@gnu.org>
 
-       * play/snake.el (snake-score-file): Fixed parens (broken by the
+       * play/snake.el (snake-score-file): Fix parens (broken by the
        last patch).
        * play/tetris.el (tetris-score-file): Ditto.
 
        `winner-boring-buffers', will no longer be restored by `winner-undo'.
        (winner-sorted-window-list): Used to improve comparison between
        window configurations.
-       (winner-win-data): Simplified and moved.
-       (winner-conf): Simplified (now uses `winner-win-data').
+       (winner-win-data): Simplify and moved.
+       (winner-conf): Simplify (now uses `winner-win-data').
        (winner-change-fun, winner-save-old-configurations)
        (winner-save-(un)conditionally, winner-redo): Changes made while in
        the minibuffer will be ignored.  (Such changes are undone upon
        exit for the minibuffer, anyway.)
        (winner-set-conf): Preserve selected window whenever possible.
-       (winner-make-point-alist): Simplified.
+       (winner-make-point-alist): Simplify.
        (winner-mode, winner-save-unconditionally): Save current window
        configuration on entering minibuffer.
        (minor-mode-alist): Don't add winner-mode to `minor-mode-alist',
 
 2002-02-26  Eli Zaretskii  <eliz@is.elta.co.il>
 
-       * international/mule-conf.el (compound-text): Renamed back from
+       * international/mule-conf.el (compound-text): Rename back from
        compound-text-no-extensions.
        (ctext-no-compositions): Remove the mime-charset property.
-       (compound-text-with-extensions): Renamed from compound-text.
-       (x-ctext-with-extensions, ctext-with-extensions): Renamed aliases.
+       (compound-text-with-extensions): Rename from compound-text.
+       (x-ctext-with-extensions, ctext-with-extensions): Rename aliases.
 
 2002-02-26  Juanma Barranquero  <lektu@terra.es>
 
 
 2002-02-25  Per Abrahamsen  <abraham@dina.kvl.dk>
 
-       * ps-print.el (ps-print-printer): Added `lpr' customize group member.
+       * ps-print.el (ps-print-printer): Add `lpr' customize group member.
 
 2002-02-25  Juanma Barranquero  <lektu@terra.es>
 
        (snake-update-game, snake-move-left)
        (snake-move-right, snake-move-up, snake-move-down, snake-active-p)
        (snake-start-game): Use that queue.
-       (snake-use-glyphs-flag): Renamed from snake-use-glyphs.
+       (snake-use-glyphs-flag): Rename from snake-use-glyphs.
        (snake-use-color-flag): Likewise.
        (snake-mode): Rename uses of those variables.
 
 
        * international/mule-conf.el (ctext-no-compositions): New coding
        system.
-       (compound-text-no-extensions): Renamed from compound-text.
+       (compound-text-no-extensions): Rename from compound-text.
        (x-ctext-no-extensions, ctext-no-extensions): Aliases for
        compound-text-no-extensions.
        (compound-text): Redefined using post-read and pre-write conversions.
 
 2002-02-19  Per Abrahamsen  <abraham@dina.kvl.dk>
 
-       * facemenu.el (describe-text-mode-map): Removed bootstrap kludge.
+       * facemenu.el (describe-text-mode-map): Remove bootstrap kludge.
 
        * toolbar/tool-bar.el (tool-bar-mode): Made the standard value t.
        * menu-bar.el (menu-bar-mode): Ditto.
 
 2002-02-17  Per Abrahamsen  <abraham@dina.kvl.dk>
 
-       * menu-bar.el (menu-bar-showhide-menu): Added speedbar.
-       (menu-bar-tools-menu): Removed speedbar.
+       * menu-bar.el (menu-bar-showhide-menu): Add speedbar.
+       (menu-bar-tools-menu): Remove speedbar.
 
-       * textmodes/ispell.el (ispell-menu-map): Added `customize-ispell'
+       * textmodes/ispell.el (ispell-menu-map): Add `customize-ispell'
        and `flyspell-mode' entries.
 
        * textmodes/flyspell.el (flyspell): Add to ispell group.
 
 2002-02-16  John Wiegley  <johnw@gnu.org>
 
-       * eshell/esh-ext.el (eshell-external-command): Added a fix for
+       * eshell/esh-ext.el (eshell-external-command): Add a fix for
        XEmacs' new dired.el, which adds a global entry in the
        `file-name-handler-alist'.
 
 2002-02-16  John Wiegley  <johnw@gnu.org>
 
-       * align.el (align-region): Added a missing name argument.
+       * align.el (align-region): Add a missing name argument.
 
 2002-02-16  John Wiegley  <johnw@gnu.org>
 
 
 2002-02-12  Per Abrahamsen  <abraham@dina.kvl.dk>
 
-       * menu-bar.el (menu-bar-options-save): Removed `truncate-lines'.
+       * menu-bar.el (menu-bar-options-save): Remove `truncate-lines'.
        (menu-bar-options-menu): Don't set default value for `truncate-lines'.
 
 2002-02-12  Per Abrahamsen  <abraham@dina.kvl.dk>
 
 2002-02-11  Per Abrahamsen  <abraham@dina.kvl.dk>
 
-       * toolbar/tool-bar.el (tool-bar-mode): Removed standard value.
+       * toolbar/tool-bar.el (tool-bar-mode): Remove standard value.
        * menu-bar.el (menu-bar-mode): Ditto.
        * cus-edit.el (customize-mark-to-save): Always save variables
        without a standard value.
        table information.  Maybe report char-code-property-table info.
        Maybe report character's unicode.  Tweak printing of list info.
        (list-input-methods): Add xref buttons.
-       (dump-charsets, dump-codings): Deleted (obsolete).
+       (dump-charsets, dump-codings): Delete (obsolete).
        From Dave Love <fx@gnu.org>.
 
 2002-02-10  Pavel Janík  <Pavel@Janik.cz>
        (batch-byte-compile-if-not-done): New function.
 
        * Makefile.in (compile): New target.
-       (compile-always): Renamed from compile-files.
-       (compile-after-backup): Renamed from compile.
+       (compile-always): Rename from compile-files.
+       (compile-after-backup): Rename from compile.
        (bootstrap): Depend on compile-always, not compile-files.
 
        * emulation/pc-select.el (pc-select-save-and-set-mode):
 
 2002-01-16  Richard M. Stallman  <rms@gnu.org>
 
-       * mouse.el (mouse-drag-region-1): Renamed from mouse-drag-region,
+       * mouse.el (mouse-drag-region-1): Rename from mouse-drag-region,
        more or less.
        (mouse-drag-region): New function.  For a click in the echo area,
        show *Messages*.
        (eudc-pre-select-window-configuration, eudc-insertion-marker):
        Variables removed.
        (eudc-insert-selected): Function removed.
-       (eudc-select): Reimplemented.
+       (eudc-select): Reimplement.
        (eudc-expand-inline): Delete the strings only after its expansion
        is chosen not before.
 
 
        * viper-util.el: Use viper-cond-compile-for-xemacs-or-emacs.
        (viper-read-key-sequence, viper-set-unread-command-events)
-       (viper-char-symbol-sequence-p, viper-char-array-p): Moved here.
+       (viper-char-symbol-sequence-p, viper-char-array-p): Move here.
 
        * viper-ex.el: Use viper-cond-compile-for-xemacs-or-emacs.
 
        (ediff-convert-fine-diffs-to-overlays, ediff-empty-diff-region-p)
        (ediff-whitespace-diff-region-p, ediff-get-region-contents):
        Move to ediff-util.el.
-       (ediff-event-key): Moved here.
+       (ediff-event-key): Move here.
 
        * ediff-merge.el: Got rid of unreferenced variables.
 
        (ediff-unhighlight-diff, ediff-unhighlight-diffs-totally)
        (ediff-empty-diff-region-p, ediff-whitespace-diff-region-p)
        (ediff-get-region-contents, ediff-make-current-diff-overlay):
-       Moved here.
+       Move here.
        (ediff-format-bindings-of): New function by Hannu Koivisto
        <azure@iki.fi>.
        (ediff-setup): Make sure the merge buffer is always widened and
        (ediff-regions-internal): Get rid of the warning about comparing
        regions of the same buffer.
 
-       * ediff-diff.el (ediff-convert-fine-diffs-to-overlays): Moved here.
+       * ediff-diff.el (ediff-convert-fine-diffs-to-overlays): Move here.
        Plus the following fixes courtesy of Dave Love: Doc fixes.
        (ediff-word-1): Use word class and move - to the
        front per regexp documentation.
 2002-01-05  Andre Spiegel  <spiegel@gnu.org>
 
        * vc.el (vc-branch-part): Return nil if there's no `.'.
-       (vc-default-previous-version): Renamed from vc-previous-version.
+       (vc-default-previous-version): Rename from vc-previous-version.
        New args BACKEND and FILE.  Return nil for revision numbers
        without a `.'.
        (vc-version-diff): Call vc-BACKEND-previous-version.
        (vc-steal-lock): Steal lock before composing mail, so that no mail
        is sent when the stealing goes wrong.  And we'll actually see the
        error in that case now.
-       (vc-finish-steal): Removed.
+       (vc-finish-steal): Remove.
 
        * vc-rcs.el (vc-rcs-steal-lock): Do a real checkout after stealing
        the lock, so that we see expanded headers.
        (vc-rcs-trunk-p, vc-rcs-branch-part, vc-rcs-branch-p)
-       (vc-rcs-minor-part, vc-rcs-previous-version): Removed.  These are
+       (vc-rcs-minor-part, vc-rcs-previous-version): Remove.  These are
        available from vc.el.  Updated all callers.
 
 2002-01-05  Richard M. Stallman  <rms@gnu.org>
 
 2002-01-03  Per Abrahamsen  <abraham@dina.kvl.dk>
 
-       * custom.el (defcustom): Documented :tag, :link and :load.
+       * custom.el (defcustom): Document :tag, :link and :load.
 
 2002-01-03  Eli Zaretskii  <eliz@is.elta.co.il>
 
        (xscheme-send-string-1): Call xscheme-insert-expression to save
        expression in ring.
        (xscheme-yank-previous-send): Now an alias for xscheme-yank.
-       (xscheme-previous-send): Deleted variable.
+       (xscheme-previous-send): Delete variable.
 
        (xscheme-send-string-2, xscheme-send-char, xscheme-send-proceed)
        (xscheme-send-control-g-interrupt): Use process-send-string rather
        * viper-cmd.el (viper-change-state): Got rid of make-local-hook.
        (viper-special-read-and-insert-char): Make C-m work right in the r
        command.
-       (viper-buffer-search-enable): Fixed format string.
+       (viper-buffer-search-enable): Fix format string.
 
        * viper-ex.el (ex-token-alist): Use ex-set-visited-file-name
        instead of viper-info-on-file.
        (ex-set-visited-file-name): New function.
 
-       * viper.el (viper-emacs-state-mode-list): Added mail-mode.
+       * viper.el (viper-emacs-state-mode-list): Add mail-mode.
 
-       * ediff-mult.el (ediff-meta-mark-equal-files): Added optional
+       * ediff-mult.el (ediff-meta-mark-equal-files): Add optional
        action argument.
 
        * ediff-init.el: Fixed some doc strings.
        * emacs-lisp/elint.el (elint-unknown-builtin-args):
        Remove mocklisp entries.
 
-       * subr.el (insert-string): Moved from mocklisp.c, reimplemented in
+       * subr.el (insert-string): Move from mocklisp.c, reimplemented in
        Lisp.  Obsoleted.
 
        * emulation/mlconvert.el: File removed.
        (lm-crack-copyright): Cope with multi-line copyright `lines'.
 
        * simple.el (newline): Doc fix.
-       (eval-expression-print-level, eval-expression-print-length): Doc
-       fix.  Amend :type.
+       (eval-expression-print-level, eval-expression-print-length):
+       Doc fix.  Amend :type.
        (next-line, previous-line): Make arg optional.
        (newline): Doc fix.
 
 
 2001-12-16  Richard M. Stallman  <rms@gnu.org>
 
-       * dired.el (dired-copy-filename-as-kill): Moved from dired-x.el.
+       * dired.el (dired-copy-filename-as-kill): Move from dired-x.el.
        (dired-mode-map): Bind w to dired-copy-filename-as-kill.
 
-       * dired-x.el (dired-copy-filename-as-kill): Moved to dired.el.
+       * dired-x.el (dired-copy-filename-as-kill): Move to dired.el.
 
        * autoinsert.el (auto-insert-alist): Redo finding C and C++ headers.
        Add a DESCRIPTION for the makefile item.
 2001-12-15  Richard M. Stallman  <rms@gnu.org>
 
        * language/ind-util.el (range): Function deleted.
-       (indian-regexp-of-hashtbl-keys): Renamed from `regexp-of-hashtbl-keys'.
+       (indian-regexp-of-hashtbl-keys): Rename from `regexp-of-hashtbl-keys'.
        All calls changed.
 
-       * language/devan-util.el (devanagari-range): Renamed from `range'.
+       * language/devan-util.el (devanagari-range): Rename from `range'.
        All calls changed.
        (devanagari-regexp-of-hashtbl-keys):
-       Renamed from `regexp-of-hashtbl-keys'.  All calls changed.
+       Rename from `regexp-of-hashtbl-keys'.  All calls changed.
 
 2001-12-15  Dave Love  <fx@gnu.org>
 
        * language/ind-util.el: Don't require cl.
        (indian-glyph-char, indian-glyph-max-char)
-       (indian-char-glyph): Moved from indian.el.
+       (indian-char-glyph): Move from indian.el.
        (indian--puthash-char, mapthread): Don't quote lambda.
        (indian--map): New function.
        (indian--puthash-v, indian--puthash-c, indian--puthash-m)
        (indian--puthash-cv): Use it.
 
        * language/indian.el (indian-glyph-char, indian-glyph-max-char)
-       (indian-char-glyph): Moved to ind-util.el
+       (indian-char-glyph): Move to ind-util.el
 
        * language/devan-util.el (devanagari-post-read-conversion):
        New function.
 
        * derived.el (derived-mode-p): Function moved to subr.el.
 
-       * subr.el (derived-mode-p): Moved here from derived.el.
+       * subr.el (derived-mode-p): Move here from derived.el.
 
        * international/mule.el (set-auto-coding): Use set-auto-mode-1.
 
 2001-12-07  Miles Bader  <miles@gnu.org>
 
        * progmodes/compile.el (compilation-error-regexp-alist):
-       Added regexps for RXP.
+       Add regexps for RXP.
 
 2001-12-05  Eli Zaretskii  <eliz@is.elta.co.il>
 
 
        * menu-bar.el (menu-bar-apropos-menu): New variable.
        Moved all `apropos' bindings to this menu.
-       (menu-bar-help-menu): Added `menu-bar-apropos-menu'.
+       (menu-bar-help-menu): Add `menu-bar-apropos-menu'.
 
 2001-11-24  KAWABATA, Taichi  <batta@beige.ocn.ne.jp>
 
        (browse-url-galeon, browse-url-galeon-sentinel): New functions.
        (browse-url-default-browser): New function.
        (browse-url-process-environment): Use browse-url-browser-display.
-       (browse-url-browser-display): Renamed from browse-url-netscape-display.
+       (browse-url-browser-display): Rename from browse-url-netscape-display.
        (browse-url-mozilla-startup-arguments, browse-url-galeon-program)
        (browse-url-galeon-arguments, browse-url-galeon-startup-arguments)
        (browse-url-mozilla-program, browse-url-mozilla-arguments): New vars.
        (Math-integer-neg, Math-equal, Math-lessp, Math-primp)
        (Math-num-integerp, Math-bignum-test, Math-equal-int)
        (Math-natnum-lessp, math-format-radix-digit): Change to `defsubst'.
-       (calc-record-compilation-date-macro): Deleted.  Callers updated.
+       (calc-record-compilation-date-macro): Delete.  Callers updated.
        (math-format-radix-digit): Move to calc-bin.el.
 
        * calc/calc.el (calc-record-compilation-date): Remove.
        * calc/calc-keypd.el (toplevel): Bind mouse buttons.
        (calc-do-keypad): Don't attempt to use nonexistent global
        mouse-map, use calc-keypad-map.
-       (calc-keypad-x-left-click): Renamed to calc-keypad-left-click.
+       (calc-keypad-x-left-click): Rename to calc-keypad-left-click.
        (calc-keypad-left-click): Don't use mouse-map; update to new event
        interface.
        (calc-keypad-x-middle-click, calc-keypad-x-right-click): Ditto.
        * textmodes/flyspell.el (flyspell-correct-word/local-keymap):
        Function deleted.
        (flyspell-correct-word): Old definition deleted.
-       (flyspell-correct-word/mouse-keymap): Renamed to flyspell-correct-word.
+       (flyspell-correct-word/mouse-keymap): Rename to flyspell-correct-word.
        All references renamed too.
 
 2001-11-10  Gerd Moellmann  <gerd@gnu.org>
 
 2001-11-09  Per Abrahamsen  <abraham@dina.kvl.dk>
 
-       * wid-edit.el (checklist): Removed `:menu-tag'.
+       * wid-edit.el (checklist): Remove `:menu-tag'.
        (radio-button-choice): Ditto.
        (editable-list): Ditto.
 
 
 2001-10-28  Per Abrahamsen  <abraham@dina.kvl.dk>
 
-       * cus-start.el (recursive-load-depth-limit): Added.
+       * cus-start.el (recursive-load-depth-limit): Add.
 
 2001-10-28  Richard M. Stallman  <rms@gnu.org>
 
 
 2001-10-27  Sam Steingold  <sds@gnu.org>
 
-       * textmodes/sgml-mode.el (sgml-xml): Renamed from `html-xhtml'.
+       * textmodes/sgml-mode.el (sgml-xml): Rename from `html-xhtml'.
        (sgml-xml-guess): Extracted from `html-mode' and generalized.
        (sgml-mode-common): Call it.
        (sgml-mode, html-mode): Set `mode-name' based on `sgml-xml'.
 
 2001-10-24  Sam Steingold  <sds@gnu.org>
 
-       * mouse.el (mouse-buffer-menu-mode-groups): Added "Version
+       * mouse.el (mouse-buffer-menu-mode-groups): Add "Version
        Control" and "SGML" groups.
 
-2001-10-24  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2001-10-24  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-beginning-of-member-init-list):
        Better handling of C++ template args to avoid confusion with `<'
 
        * vc.el (vc-annotate-display-default): Accept colormap scaling
        ratio (now deprecated).
-       (vc-annotate-display-autoscale): Added.
+       (vc-annotate-display-autoscale): Add.
        (vc-annotate-add-menu): New autoscaling menu options "Span to
        Oldest" and "Span Oldest->Newest".  Easymenu support added for
        toggle menus driven by customize variable `vc-annotate-display-mode'.
-       (vc-annotate-display-select): Added.
-       (vc-annotate): Changed temp-buffer-show-function to
+       (vc-annotate-display-select): Add.
+       (vc-annotate): Change temp-buffer-show-function to
        `vc-annotate-display-select'.
-       (vc-annotate-display): Removed arguments BUFFER and BACKEND.
+       (vc-annotate-display): Remove arguments BUFFER and BACKEND.
        Added argument OFFSET.  Instead of backend function, calls now
        generic `vc-annotate-difference'.
-       (vc-annotate-difference): Added as generic function instead of
+       (vc-annotate-difference): Add as generic function instead of
        backend-specific function.  No longer takes argument POINT, but
        instead accepts a time OFFSET.
-       (vc-default-annotate-current-time): Added.
+       (vc-default-annotate-current-time): Add.
 
-       * vc-cvs.el (vc-cvs-annotate-difference): Removed to generic
+       * vc-cvs.el (vc-cvs-annotate-difference): Remove to generic
        version in vc.el.
-       (vc-cvs-annotate-current-time): Added, as override of default.
-       (vc-cvs-annotate-time): Added.  Taken mostly from the (now removed)
+       (vc-cvs-annotate-current-time): Add, as override of default.
+       (vc-cvs-annotate-time): Add.  Taken mostly from the (now removed)
        `vc-cvs-annotate-difference'.
 
 2001-10-22  Gerd Moellmann  <gerd@gnu.org>
index bbba11dd9be7402591016ac07f679d0cbddb66a3..eee8b91f70fc38fb88ad67ab894099ba9fcbc97c 100644 (file)
@@ -40,8 +40,8 @@
        * progmodes/fortran.el (fortran-mode): Use mode-require-final-newline.
        * progmodes/f90.el (f90-mode): Use mode-require-final-newline.
        * progmodes/cperl-mode.el (cperl-mode): Use mode-require-final-newline.
-       * progmodes/cfengine.el (cfengine-mode): Use
-       mode-require-final-newline.
+       * progmodes/cfengine.el (cfengine-mode):
+       Use mode-require-final-newline.
        * progmodes/ada-mode.el (ada-mode): Use mode-require-final-newline.
        * textmodes/text-mode.el (text-mode): Use mode-require-final-newline.
        * textmodes/texinfo.el (texinfo-mode): Use mode-require-final-newline.
 
        * net/tramp-smb.el (tramp-smb-advice-PC-do-completion): Make the
        advice less fragile.  Surround temporary redefinition of
-       `substitute-in-file-name' with `unwind-protect'.  Suggested by
-       Matt Hodges <MPHodges@member.fsf.org>.
+       `substitute-in-file-name' with `unwind-protect'.
+       Suggested by Matt Hodges <MPHodges@member.fsf.org>.
 
 2004-12-17  Juri Linkov  <juri@jurta.org>
 
 
 2004-11-24  Jay Belanger  <belanger@truman.edu>
 
-       * calc/calc.el (calc-embedded-active): Removed unnecessary
+       * calc/calc.el (calc-embedded-active): Remove unnecessary
        declaration.
-       (calc-show-banner): Removed redundant declaration.
+       (calc-show-banner): Remove redundant declaration.
 
        * calc/calc-graph.el (calc-gnuplot-default-device)
        (calc-gnuplot-default-output, calc-gnuplot-print-device)
        (math-nri-n): New variable.
        (math-nth-root-integer, math-nth-root-int-iter): Replace variable
        n by declared variable.
-       (calcFunc-log): Removed misplaced condition.
+       (calcFunc-log): Remove misplaced condition.
 
 2004-11-24  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 
 2004-10-24  Kai Grossjohann  <kai.grossjohann@gmx.net>
 
-       * simple.el (process-file): Accept nil for INFILE.  Reported by
-       Luc Teirlinck.
+       * simple.el (process-file): Accept nil for INFILE.
+       Reported by Luc Teirlinck.
 
 2004-10-24  Masatake YAMATO  <jet@gyve.org>
 
        * indent.el (set-left-margin, set-right-margin): Rename `lm' arg
        to `width' for consistency with docstring.  Doc fix.
 
-2004-10-01  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2004-10-01  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-langs.el: Load cl here since cc-defs doesn't do it.
        This is necessary for derived modes.
        (calc-mode): Compare `calc-settings-file' to `user-init-file' rather
        than "\\.emacs" to determine if it is the user-init-file.
 
-       * calc/calc-embed.el (calc-embedded-set-modes): Use
-       `calc-mode-var-list' correctly.
+       * calc/calc-embed.el (calc-embedded-set-modes):
+       Use `calc-mode-var-list' correctly.
 
 2004-09-15  Thien-Thi Nguyen  <ttn@gnu.org>
 
        (speedbar-directory): New image (unused pixmap already existed).
        (speedbar-expand-image-button-alist): Use it.
 
-2004-08-11  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2004-08-11  Martin Stjernholm  <mast@lysator.liu.se>
 
        CC Mode update to 5.30.9:
 
        Fix bug that could cause an error from `after-change-functions' when
        the changed region is at bob.
 
-2004-08-11  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2004-08-11  Alan Mackenzie  <acm@muc.de>
 
        CC Mode update to 5.30.9:
 
        since Emacs 22.1 only (XEmacs has it).  Implementation rewritten
        in order to avoid this function.
        (tramp-handle-write-region): Set current buffer.  If connection
-       wasn't open, `file-modes' has changed it accidentally.  Reported by
-       David Kastrup <dak@gnu.org>.
+       wasn't open, `file-modes' has changed it accidentally.
+       Reported by David Kastrup <dak@gnu.org>.
        (tramp-enter-password, tramp-read-passwd): New arguments USER and
        HOST.
        (tramp-action-password, tramp-multi-action-password): Apply it.
 
 2004-04-16  Dave Love  <fx@gnu.org>
 
-       * progmodes/python.el (python-compilation-line-number): Fix
-       braindamage.
+       * progmodes/python.el (python-compilation-line-number):
+       Fix braindamage.
        (python-load-file): Fix python-orig-start setting.
 
        * progmodes/compile.el: Doc fixes.
 
 2004-03-22  Luc Teirlinck  <teirllm@auburn.edu>
 
-       * autorevert.el (global-auto-revert-non-file-buffers): Expand
-       docstring.
+       * autorevert.el (global-auto-revert-non-file-buffers):
+       Expand docstring.
        (buffer-stale-function): New variable.
        (auto-revert-list-diff, auto-revert-dired-file-list)
        (auto-revert-dired-changed-p, auto-revert-buffer-p): Delete.
 
        * progmodes/ebnf-abn.el: New file, implements an ABNF parser.
 
-       * progmodes/ebnf2ps.el: Doc fix.  Accept ABNF (Augmented BNF).  New
-       arrow shapes: semi-up-hollow, semi-up-full, semi-down-hollow and
+       * progmodes/ebnf2ps.el: Doc fix.  Accept ABNF (Augmented BNF).
+       New arrow shapes: semi-up-hollow, semi-up-full, semi-down-hollow and
        semi-down-full.  Fix a bug on productions like test = {"test"}* | (
        "tt" ["test"] ).  Reported by Markus Dreyer
        <mdreyer@ix.urz.uni-heidelberg.de>.
        (ses-mode-map): Use them.
        (ses-read-number) New fun.  Duplicates code from interactive "N" spec.
 
-2004-02-14  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2004-02-14  Martin Stjernholm  <mast@lysator.liu.se>
 
        * Makefile.in: Fix the CC Mode recompile kludge so it works
        when building in a different directory.
        * tar-mode.el (tar-extract): Fix for the case that a file doesn't
        have end-of-line.
 
-2004-02-09  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2004-02-09  Martin Stjernholm  <mast@lysator.liu.se>
 
        * Makefile.in: Added extra dependencies in the recompile target
        needed to cope with the compile time macro expansions in CC Mode.
 
 2004-01-21  Jan Djärv  <jan.h.d@swipnet.se>
 
-       * term/x-win.el (x-clipboard-yank, menu-bar-edit-menu): Call
-       menu-bar-enable-clipboard and make Paste use clipboard first.
+       * term/x-win.el (x-clipboard-yank, menu-bar-edit-menu):
+       Call menu-bar-enable-clipboard and make Paste use clipboard first.
 
 2004-01-20  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 2003-11-30  Kai Grossjohann  <kai.grossjohann@gmx.net>
        Version 2.0.38 of Tramp released.
 
-       * net/tramp.el (tramp-chunksize): Extend docstring.  Suggested by
-       Charles Curley <charlescurley@charlescurley.com>.
+       * net/tramp.el (tramp-chunksize): Extend docstring.
+       Suggested by Charles Curley <charlescurley@charlescurley.com>.
        (tramp-multi-connection-function-alist): Add ssht entry which adds
        "-e none -t -t" to the list of ssh args.  Suggested by Adrian
        Aichner.
        by returning the original value of 8 in all cases, but 99% of the
        time this is a waste of whitespace).
 
-2003-11-16  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-11-16  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-guess-continued-construct)
        (c-guess-basic-syntax): Check a little more carefully if it's a
 
        * window.el (window-current-scroll-bars): New defun.
 
-2003-09-24  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-09-24  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-parse-state): Fix bug that could
        cause errors when the state cache contains info on parts that have
        been narrowed out.
 
-2003-09-24  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-09-24  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-vars.el (c-comment-prefix-regexp): Document that
        `c-setup-paragraph-variables' has to be used when this variable is
        * progmodes/cc-styles.el (c-setup-paragraph-variables):
        Make it interactive.
 
-2003-09-24  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-09-24  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-fonts.el (c-font-lock-declarations):
        Fix recognition of constructors and destructors for classes whose
        * progmodes/cc-langs.el (c-type-list-kwds): If "operator" is
        followed by an identifier in C++ then it's a type.
 
-2003-09-24  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-09-24  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-fonts.el (c-font-lock-invalid-string): Fix eob
        problem that primarily affected XEmacs.  Don't use faces to find
        unterminated strings since Emacs and XEmacs fontify strings
        differently - this function should now work better in XEmacs.
 
-2003-09-24  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-09-24  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-electric-brace): Fix a bug in the
        `expand-abbrev' workaround which caused braces to misbehave inside
        * progmodes/cc-engine.el (c-forward-keyword-clause): Fix error
        handling.  This bug could cause interactive font locking to bail out.
 
-2003-09-24  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-09-24  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-just-after-func-arglist-p):
        Handle paren-style types in Pike.  Also fixed some cases of
 
        * image.el (image-jpeg-p): Don't search beyond length of data.
 
-2003-08-26  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-08-26  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-electric-brace): Work around for a
        misfeature in `expand-abbrev' which caused electric keywords like
        "else" to disappear if an open brace was typed directly afterwards.
 
-2003-08-26  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-08-26  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-vars.el (c-extra-types-widget): The doc string is
        mandatory in `define-widget'.
 
        (c-assignment-op-regexp): New language var used by `c-lineup-math'.
 
-2003-08-26  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-08-26  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-just-after-func-arglist-p):
        Safeguard against unbalanced sexps.
 
        * textmodes/reftex.el (reftex-region-active-p): New function.
 
-       * textmodes/reftex-parse.el (reftex-locate-bibliography-files): Improved the
+       * textmodes/reftex-parse.el (reftex-locate-bibliography-files): Improve the
        regexp to find the \bibliography macro.
 
-       * textmodes/reftex-vars.el (reftex-section-levels): Removed subsubparagraph,
+       * textmodes/reftex-vars.el (reftex-section-levels): Remove subsubparagraph,
        which does not exist in LaTeX.
-       (reftex-cite-format-builtin): Added amsrefs support.
+       (reftex-cite-format-builtin): Add amsrefs support.
        (reftex-toc-confirm-promotion): New option
 
        * textmodes/reftex-toc.el
        (reftex-toc-promote-action, reftex-toc-extract-section-number)
        (reftex-toc-newhead-from-alist)
        (reftex-toc-load-all-files-for-promotion): New functions.
-       (reftex-toc-help): Added description of new keys.
+       (reftex-toc-help): Add description of new keys.
        (reftex-toc-split-windows-fraction): New option.
        (reftex-recenter-toc-when-idle): Search *toc* window on all
        visible frames.
        (reftex-toc-quit): Adapted to delete frame when called in
        dedicated frame.
 
-       * textmodes/reftex-index.el (reftex-index-phrase-match-is-indexed): Check
-       all enclosing macros.
+       * textmodes/reftex-index.el (reftex-index-phrase-match-is-indexed):
+       Check all enclosing macros.
 
 2003-08-08  Vinicius Jose Latorre  <viniciusjl@ig.com.br>
 
        * calendar/holidays.el, calendar/lunar.el, calendar/solar.el:
        (displayed-month, displayed-year): Define for compiler.
 
-2003-08-03  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-08-03  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-mode.el (c-init-language-vars-for): Add argument
        MODE.  Renamed from c-init-c-language-vars'.
        (pike-mode): Ditto.
        (awk-mode): Ditto.
 
-2003-08-03  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-08-03  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-end-of-current-token): Return whether
        or not the point moved.
        * simple.el (current-word): Don't include punctuation char when
        `really-word' arg is non-nil.
 
-2003-07-17  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-07-17  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/awk-mode.el: Obsoleted by the AWK support in CC Mode -
        moved to the directory obsolete.
        (syntax-ppss-after-change-function): New alias.  Update uses.
        (syntax-ppss): Catch the case where the buffer is narrowed.
 
-2003-07-16  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-07-16  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-defs.el (c-langelem-sym, c-langelem-pos)
        (c-langelem-2nd-pos): Add accessor functions for syntactic elements.
 
-2003-07-16  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-07-16  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-literal-faces): Declare as a variable
        since it might be modified.
 
 2003-07-10  Vinicius Jose Latorre  <viniciusjl@ig.com.br>
 
-       * ps-print.el: Print line number correctly in a region.  Reported by
-       Tim Allen <timallen@ls83.fsnet.co.uk>.
+       * ps-print.el: Print line number correctly in a region.
+       Reported by Tim Allen <timallen@ls83.fsnet.co.uk>.
        (ps-print-version): New version number (6.6.2).
        (ps-printing-region): Code fix.
 
 
        * dired.el (dired-move-to-filename-regexp): Allow quote in months.
 
-2003-07-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-07-08  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-guess-basic-syntax): Do not do hidden
        buffer changes; there's third party code that calls this function
        directly.
 
-2003-07-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-07-08  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-fonts.el (javadoc-font-lock-keywords)
        (autodoc-font-lock-keywords): Don't byte compile on font lock
        initialization when running from byte compiled files.
 
-2003-07-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2003-07-08  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-engine.el: Fix AWK mode indentation when previous
        statement ends with auto-increment "++".
 
-2003-07-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-07-08  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-langs.el, progmodes/cc-styles.el (c-style-alist)
        (c-lang-variable-inits, c-lang-variable-inits-tail): The values of
        * info.el (Info-menu-entry-name-re): Add `:' to second [] part.
        This should fix the infinite loop when extracting menu names.
 
-2003-07-05  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-07-05  Martin Stjernholm  <mast@lysator.liu.se>
 
        * files.el (auto-mode-alist, interpreter-mode-alist):
        Remove entries to CC Mode modes to avoid duplicates; they are now added
        with autoload directives in cc-mode.el.
 
-2003-07-05  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2003-07-05  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-langs.el, progmodes/cc-styles.el (c-style-alist)
        (c-lang-variable-inits, c-lang-variable-inits-tail): The values of
index 7d868b9db098e8af727125f4141c2334eaf21d15..5699c90cb80ab17d283527431bb36fe28964859e 100644 (file)
 
        * international/quail.el (quail-setup-completion-buf): Make the
        completion buffer read-only.
-       (quail-completion): Adjusted for the above change.  Leave the
+       (quail-completion): Adjust for the above change.  Leave the
        modified flag nil.
 
 2007-03-20  David Kastrup  <dak@gnu.org>
 2007-01-27  Eli Zaretskii  <eliz@gnu.org>
 
        * ls-lisp.el (ls-lisp-use-localized-time-format): New defcustom.
-       (ls-lisp-format-time-list): Doc fix.  Mention
-       ls-lisp-use-localized-time-format.
+       (ls-lisp-format-time-list): Doc fix.
+       Mention ls-lisp-use-localized-time-format.
        (ls-lisp-format-time): Use ls-lisp-format-time-list if
        ls-lisp-use-localized-time-format is non-nil, even if a valid
        locale is defined.
 
        * wdired.el (wdired-change-to-wdired-mode, wdired-finish-edit)
        (wdired-search-and-rename): Simplify code.
-       (wdired-preprocess-files, wdired-preprocess-perms): Make
-       read-only property of preceding character rear-nonsticky to
+       (wdired-preprocess-files, wdired-preprocess-perms):
+       Make read-only property of preceding character rear-nonsticky to
        avoid that it can be modified.  Put old-name and old-link
        properties on character preceding name and replace
        put-text-property by add-text-properties.
 2006-12-04  Michael Albinus  <michael.albinus@gmx.de>
 
        * net/tramp.el (tramp-methods): Add "ControlPath" and
-       "ControlMaster" to scp, scp1 and scp2 methods.  Suggested by
-       Andreas Schwab <schwab@suse.de>.
+       "ControlMaster" to scp, scp1 and scp2 methods.
+       Suggested by Andreas Schwab <schwab@suse.de>.
        (tramp-do-copy-or-rename-file-out-of-band)
        (tramp-open-connection-rsh): Compute format spec for ?t.
        (tramp-process-actions): Trace command parameters.
        * mail/feedmail.el (feedmail-buffer-to-sendmail): Look for
        sendmail in several common directories.
 
-       * mail/sendmail.el (sendmail-program): Moved here from paths.el.
+       * mail/sendmail.el (sendmail-program): Move here from paths.el.
 
-       * paths.el (sendmail-program): Removed.
+       * paths.el (sendmail-program): Remove.
 
 2006-09-04  Daiki Ueno  <ueno@unixuser.org>
 
 
        * net/rcirc.el (rcirc-keywords): New variable.
        (rcirc-bright-nicks, rcirc-dim-nicks): New variables.
-       (rcirc-bright-nick-regexp, rcirc-dim-nick-regexp): Remove
-       variables.
+       (rcirc-bright-nick-regexp, rcirc-dim-nick-regexp):
+       Remove variables.
        (rcirc-responses-no-activity): New function.
        (rcirc-handler-generic): Check for responses in above.
        (rcirc-process-command): Add ?: character to arguments of raw
 2006-08-31  Richard Stallman  <rms@gnu.org>
 
        * cus-edit.el (custom-save-variables): Slight cleanup.
-       (Custom-no-edit): Renamed from custom-no-edit.
-       (Custom-newline): Renamed from custom-newline.
+       (Custom-no-edit): Rename from custom-no-edit.
+       (Custom-newline): Rename from custom-newline.
        (custom-mode-map): Use new names.
 
        * emacs-lisp/easy-mmode.el (define-minor-mode): Reference manual
 
 2006-08-09  John Wiegley  <johnw@newartisans.com>
 
-       * calendar/timeclock.el (timeclock-use-elapsed): Added a new
+       * calendar/timeclock.el (timeclock-use-elapsed): Add a new
        variable, which causes timeclock to report elapsed time worked,
        instead of just work remaining.
 
        instead of retired `allout-resumptions'.  For hook functions, use
        `local' parameter so hook settings are created and removed as
        buffer-local settings.  Revise (resumptions) setting
-       auto-fill-function so it is set only if already active.  The
-       related fill-function settings are all made in either case, so
+       auto-fill-function so it is set only if already active.
+       The related fill-function settings are all made in either case, so
        that activating auto-fill-mode activity will have the custom
        allout-mode behaviors (hanging indent on topics, if configured for it).
        Remove all allout-exposure-category overlays on mode deactivation.
        * progmodes/idlw-shell.el (idlwave-shell-move-or-history):
        Remove spurious move to point-max (new comint behavior fixes).
 
-       * progmodes/idlwave.el (idlwave-push-mark): Removed obsolete
+       * progmodes/idlwave.el (idlwave-push-mark): Remove obsolete
        compatibility function (Emacs 18/19).
        (idlwave-is-continuation-line): Always return point at start of
        previous non-blank continuation line.
        `point'.
        (diff-hunk-text, diff-goto-source): Doc fix.
 
-       * startup.el (fancy-splash-screens, normal-splash-screen): Use
-       face `mode-line-buffer-id' for mode-line buffer face instead of
+       * startup.el (fancy-splash-screens, normal-splash-screen):
+       Use face `mode-line-buffer-id' for mode-line buffer face instead of
        hard-coded `(:weight bold)'.
 
-       * arc-mode.el (archive-set-buffer-as-visiting-file): Bind
-       buffer-undo-list to t (undo-ask is reproducible by visiting
+       * arc-mode.el (archive-set-buffer-as-visiting-file):
+       Bind buffer-undo-list to t (undo-ask is reproducible by visiting
        nested archives).
 
 2006-05-09  Kim F. Storm  <storm@cua.dk>
 
 2006-05-09  Masatake YAMATO  <jet@gyve.org>
 
-       * font-lock.el (cpp-font-lock-keywords-source-directives): Added
-       "warning" and "import".
-       (cpp-font-lock-keywords): Added "warning".
+       * font-lock.el (cpp-font-lock-keywords-source-directives):
+       Add "warning" and "import".
+       (cpp-font-lock-keywords): Add "warning".
 
 2006-05-08  Dan Nicolaescu  <dann@ics.uci.edu>
 
        * progmodes/etags.el (tags-completion-table): Do completion from
        all the tables in the current list, as documented in the manual.
 
-2006-02-24  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2006-02-24  Alan Mackenzie  <acm@muc.de>
 
        * CC Mode Update to 5.31.3.
 
-2006-02-24  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2006-02-24  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-mode.el (c-postprocess-file-styles):
        Bind inhibit-read-only to t, around the call to
        c-remove-any-local-eval-or-mode-variables, so that it works on a
        RO file.
 
-2006-02-24  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2006-02-24  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-awk.el: Correct a typo.
 
-2006-02-24  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2006-02-24  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-cmds.el, progmodes/cc-mode.el: Rename c-hungry-backspace to
        c-hungry-delete-backwards, at the request of RMS.  Leave the old
        name as an alias.
 
-2006-02-24  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2006-02-24  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-mode.el: Correct a typo.
 
-2006-02-24  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2006-02-24  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-defs.el: Update the version number to 5.31.3.
 
-2006-02-24  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2006-02-24  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-cmds.el (c-electric-brace): Fix clean-up
        brace-else-brace (error due to mbeg, mend being undefined).
 
-2006-02-24  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2006-02-24  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-mode.el: File Local variables: Solve the problem
        where both `mode' and c-file-offsets are specified: `mode' will
        c-tentative-buffer-change, to splat `mode' and `eval' before the
        second hack-local-variables.
 
-2006-02-24  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2006-02-24  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-mode.el:
        [Supersedes patch to cc-engine.el 2005-12-16T20:07:49Z!monnier@iro.umontreal.ca]
        with save-match-data.  It was being corrupted when Font Lock was
        not enabled.
 
-2006-02-24  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2006-02-24  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-langs.el (c-mode-menu): Add menu items for Electric
        Mode and Subword Mode.
        * progmodes/cc-cmds.el (c-electric-brace, c-electric-semi&comma)
        (c-electric-colon): Correct doc-strings: "/ln" -> "/la".
 
-2006-02-24  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2006-02-24  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-langs.el (c-make-init-lang-vars-fun): Improve the
        error message when there's an evaluation error to show whether
        (Info-isearch-push-state): Add quote before Info-current-file and
        Info-current-node.
        (Info-isearch-pop-state): Use `equal' instead of `string='.
-       (Info-extract-pointer, Info-following-node-name): Use
-       `match-string-no-properties' instead of `match-string'.
+       (Info-extract-pointer, Info-following-node-name):
+       Use `match-string-no-properties' instead of `match-string'.
        (Info-up): Check `old-file' for `stringp'.
        (Info-history): Use `equal' instead of `string-equal'.
        Check `file' for `stringp'.
        (rcirc-get-buffer-create): Fix bug with setting the target.
        (rcirc-any-buffer): Rename from rcirc-get-any-buffer, and include
        test for rcirc-always-use-server-buffer-flag here.
-       (rcirc-response-formats): Add %N, which is a facified nick.  %n
-       uses the default face.  Change the ACTION format string.  If the
+       (rcirc-response-formats): Add %N, which is a facified nick.
+       %n uses the default face.  Change the ACTION format string.  If the
        "nick" is the server, don't print anything for that field.
        Comment fixes.
        (rcirc-target-buffer): Don't test
        (allout-version): Incremented, corrected, revised, and refined
        module commentary.
 
-       (provide 'allout): Moved to the bottom, added a require of overlay.
+       (provide 'allout): Move to the bottom, added a require of overlay.
 
        (allout-encrypt-unencrypted-on-saves): Defaults to t instead of
        `except-current'.
        Clarify provision for various write-file hook var names.
        Adjusted for invisible-text overlays instead of selective-display.
 
-       (allout-depth): Really return 0 if not within any topic.  This
-       rectifies `allout-beginning-of-level' and sequence numbering
+       (allout-depth): Really return 0 if not within any topic.
+       This rectifies `allout-beginning-of-level' and sequence numbering
        errors that occur when cutting and pasting numbered topics.
        Changed from a in-line subst to a regular function, as well.
 
-       (allout-pre-next-prefix): Renamed from allout-pre-next-preface.
+       (allout-pre-next-prefix): Rename from allout-pre-next-preface.
 
        (allout-end-of-subtree, allout-end-of-subtree)
        (allout-end-of-entry, allout-end-of-current-heading)
        (allout-next-visible-heading, allout-open-topic, allout-show-entry)
        (allout-show-children, allout-show-to-offshoot)
-       (allout-hide-current-entry, allout-show-current-entry): Rectified
-       handling of trailing blank lines between items.
+       (allout-hide-current-entry, allout-show-current-entry):
+       Rectified handling of trailing blank lines between items.
 
        (allout-line-boundary-regexp, set-allout-regexp, allout-depth)
        (allout-current-depth, allout-unprotected, allout-hidden-p)
        (allout-hide-region-body, allout-toggle-subtree-encryption)
        (allout-encrypt-string, allout-encrypted-key-info)
        (allout-next-topic-pending-encryption, allout-encrypt-decrypted)
-       (allout-file-vars-section-data): Adjusted for use with
+       (allout-file-vars-section-data): Adjust for use with
        invisible-text overlays instead of selective-display.
 
        (allout-kill-line, allout-kill-topic, allout-yank-processing):
-       Reworked for use with invisible text overlays.
+       Rework for use with invisible text overlays.
 
        (allout-current-topic-collapsed-p): New function.
 
 
        (allout-overlay-insert-in-front-handler)
        (allout-overlay-interior-modification-handler)
-       (allout-before-change-handler, allout-isearch-end-handler): New
-       functions to handle extraordinary actions affecting concealed
+       (allout-before-change-handler, allout-isearch-end-handler):
+       New functions to handle extraordinary actions affecting concealed
        text.
 
        (allout-flag-region): Use overlays instead of selective-display
 
 2006-02-17  Agustín Martín  <agustin.martin@hispalinux.es>
 
-       * textmodes/ispell.el (ispell-change-dictionary): Call
-       ispell-buffer-local-dict instead of
+       * textmodes/ispell.el (ispell-change-dictionary):
+       Call ispell-buffer-local-dict instead of
        ispell-accept-buffer-local-defs.
        (ispell-local-dictionary-alist): Accept as valid any coding-system
        supported by Emacs.
        (hack-local-variables): Construct list of variable-value pairs,
        and apply or reject them in one go.  Ask for confirmation if
        variables are not known safe.
-       (hack-local-variables-confirm): Complete rewrite.  Support
-       `safe-local-variable-values'.
+       (hack-local-variables-confirm): Complete rewrite.
+       Support `safe-local-variable-values'.
        (enable-local-variables): Update docstring to reflect new
        behavior.
        (ignored-local-variables): Ignore ignored-local-variables and
 2006-02-12  Michael Albinus  <michael.albinus@gmx.de>
 
        * net/tramp.el (tramp-remote-path): Add "/usr/xpg4/bin" on top,
-       because on Solaris a POSIX compatible "id" is needed.  Reported by
-       Magnus Henoch <mange@freemail.hu>.
+       because on Solaris a POSIX compatible "id" is needed.
+       Reported by Magnus Henoch <mange@freemail.hu>.
 
 2006-02-12  Juri Linkov  <juri@jurta.org>
 
        * help.el (describe-key-briefly): Now a wrapper for
        describe-key-briefly-internal.  Bind enable-disabled-menus-and-buttons
        to t.  Populate yank-menu if empty.
-       (describe-key-briefly-internal): Renamed from describe-key-briefly.
+       (describe-key-briefly-internal): Rename from describe-key-briefly.
        (describe-key): Now a wrapper for describe-key-internal.  Bind
        enable-disabled-menus-and-buttons to t.  Populate yank-menu if empty.
-       (describe-key-internal): Renamed from describe-key.
+       (describe-key-internal): Rename from describe-key.
 
 2006-02-11  Milan Zamazal  <pdm@zamazal.org>
 
 
 2006-01-22  Kenichi Handa  <handa@m17n.org>
 
-       * international/mule.el (make-subsidiary-coding-system): Reset
-       `coding-system-define-form' property of subsidiaries to nil.
+       * international/mule.el (make-subsidiary-coding-system):
+       Reset `coding-system-define-form' property of subsidiaries to nil.
        Avoid duplicated entry in coding-system-alist.
        (make-coding-system): Avoid duplicated entry in
        coding-system-alist.
        (tramp-unload-file-name-handler-alist)
        (tramp-unload-tramp): New defuns.
        (tramp-advice-PC-expand-many-files): New defadvice.
-       (tramp-save-PC-expand-many-files, tramp-setup-complete): Defuns
-       removed.
+       (tramp-save-PC-expand-many-files, tramp-setup-complete):
+       Defuns removed.
        (tramp-handle-expand-file-name): Remove double slash.
        (tramp-handle-file-attributes-with-ls): Return t as 9th attribute.
        It doesn't matter, because it will be converted later on.
 
 2006-01-20  Carsten Dominik  <dominik@science.uva.nl>
 
-       * textmodes/org.el (org-open-at-point): Fixed bug with matching a
+       * textmodes/org.el (org-open-at-point): Fix bug with matching a
        link.  Fixed buggy argument sequence in call to `org-view-tags'.
        (org-compile-prefix-format): Set `org-prefix-has-tag'.
        (org-prefix-has-tag): New variable.
        images remain visible.
        (thumbs-file-alist): Construct list in thumbs-buffer and reverse
        order.
-       (thumbs-show-image-num): Get image from thumbs-file-alist.  Set
-       mode name.
+       (thumbs-show-image-num): Get image from thumbs-file-alist.
+       Set mode name.
        (thumbs-next-image, thumbs-previous-image): Make them work.
 
 2006-01-19  Luc Teirlinck  <teirllm@auburn.edu>
 
 2006-01-12  Masatake YAMATO  <jet@gyve.org>
 
-       * progmodes/ld-script.el (auto-mode-alist): Support
-       suffix conventions used in netbsd and eCos.
+       * progmodes/ld-script.el (auto-mode-alist):
+       Support suffix conventions used in netbsd and eCos.
 
 2006-01-11  Luc Teirlinck  <teirllm@auburn.edu>
 
 
        * hi-lock.el (hi-lock-mode): Rename from hi-lock-buffer-mode;
        react if global-hi-lock-mode seems intended.
-       (global-hi-lock-mode): Renamed from hi-lock-mode.
+       (global-hi-lock-mode): Rename from hi-lock-mode.
        (hi-lock-archaic-interface-message-used)
        (hi-lock-archaic-interface-deduce): New variables.
        (turn-on-hi-lock-if-enabled, hi-lock-line-face-buffer)
        No need to check gud-comint-buffer is bound.
        (gdb): Prevent multiple debugging when first session uses gdba.
 
-2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2005-12-08  Alan Mackenzie  <acm@muc.de>
 
        CC Mode update to 5.31.
 
        New macros c-sentence-end and c-default-value-sentence end, to cope
        with Emacs 22's new function `sentence-end'.
 
-2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2005-12-08  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-show-syntactic-information): Solve the
        compat issue using `c-put-overlay' and `c-delete-overlay'.
        * progmodes/cc-defs.el (c-put-overlay, c-delete-overlay):
        New compat macros to handle overlays/extents.
 
-2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2005-12-08  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-fix.el: Add definitions of the macros push and pop
        (for GNU Emacs 20.4).
        call to the new macro c-int-to-char.  This solves XEmacs's
        regarding characters as different from integers.
 
-2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2005-12-08  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-fonts.el (c-make-syntactic-matcher):
        New internal helper.
        * progmodes/cc-fonts.el (c-negation-char-face-name): New variable
        to map to `font-lock-negation-char-face' in emacsen where it exists.
 
-2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2005-12-08  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-mode.el: Bind c-subword-mode to C-c C-w.
 
        * progmodes/cc-mode.el: Added tty suitable bindings for C-c
        <delete> and C-c C-<delete>.  (To the c-hungry- delete functions).
 
-2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2005-12-08  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-mode.el: Added autoload directive for
        `c-subword-move-mode' for use in older emacsen.
 
-2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2005-12-08  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-mode.el:
        (i): Insert a binding for C-c C-backspace into
 
        * progmodes/cc-awk.el: Apply a tidy-up patch (from Stefan Monnier).
 
-2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2005-12-08  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-fonts.el, progmodes/cc-vars.el
        (gtkdoc-font-lock-doc-comments, gtkdoc-font-lock-doc-protection)
        <delete> key behavior in XEmacs according to `delete-forward-p'.
        C.f. `c-electric-delete'.
 
-2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2005-12-08  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-mode.el: Give c-hungry-backspace and
        c-hungry-delete-forward permanent key bindings.
        response to a report from Joseph Kiniry <kiniry@acm.org> that it
        was difficult to understand.
 
-2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2005-12-08  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-on-identifier): Fix bug when at the
        first char of an identifier.
        * progmodes/cc-engine.el (c-on-identifier): Handle the "operator
        +" syntax in C++.
 
-2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2005-12-08  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-cmds.el (c-mask-paragraph): Correct, so that
        auto-fill doesn't split a c-comment's last word from a hanging
        with blank comment-prefix, and a blank line as the comment's
        second line.
 
-2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2005-12-08  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-fonts.el (c-cpp-matchers, c-basic-matchers-before):
        Incorporate the patterns added in the Emacs development branch
        * progmodes/cc-engine.el (c-literal-faces):
        Add `font-lock-comment-delimiter-face' which is new in Emacs 22.
 
-2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2005-12-08  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-cmds.el: Make C-c C-a (`c-toggle-auto-newline')
        forcibly enable c-electric-flag.
        `comment-close-slash' on c-electric-slash: if enabled, typing `/' just
        after the comment-prefix of a C-style comment will close that comment.
 
-2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2005-12-08  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-fonts.el (c-basic-matchers-before)
        (c-complex-decl-matchers): Fix the "not-arrow-prefix" regexp used
        Enable heuristics below the point to cope with classes inside special
        brace lists in Pike.
 
-2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2005-12-08  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-cmds.el: Amend c-point-syntax to handle macros.
 
-2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2005-12-08  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-guess.el (cc-guess-install): New function to
        install an already guessed style in another buffer.
        sets `inhibit-read-only' - `c-save-buffer-state' should be used
        anyway if the change always is undone.
 
-2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2005-12-08  Alan Mackenzie  <acm@muc.de>
 
        Implement togglable electricity:
 
        (c-electric-semi&comma, c-electric-colon, c-electric-paren):
        restructure a bit.
 
-2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2005-12-08  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-show-syntactic-information): Show the
        anchor position(s) using faces.  Thanks to Masatake YAMATO for the idea.
        (c-subword-move-mode): Minor mode that replaces all the standard
        word handling functions with their subword equivalences.
 
-2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2005-12-08  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-vars.el (c-cleanup-list): Insert a customization
        entry for one-liner-defun.
        c-max-one-liner-length.  In c-default-style, set the default style
        for AWK to "awk".
 
-2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2005-12-08  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-forward-label): Fix fontification of
        macros inside labels.
        * progmodes/cc-engine.el (c-beginning-of-statement-1): Fix a
        macro related issue.
 
-2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2005-12-08  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-awk.el: Change the terminology of regexps: A char
        list is now [asdf], a char class [:alpha:].
        c-string-par-start, c-string-par-separate to be more like Text
        Mode than Fundamental Mode.
 
-2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2005-12-08  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-fonts.el (c-font-lock-declarations): Always narrow
        to the fontified region so that fontification doesn't occur
        outside it (could happen e.g. when fontifying a line with an
        unfinished declaration).
 
-2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2005-12-08  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-awk.el: Move regexps for analyzing AWK code to near the
        start of the file.  ^L now separate sections of the file.
        * progmodes/cc-mode.el: Fix what's almost a semantic ambiguity in
        a comment.
 
-2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2005-12-08  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-electric-brace): Clean up using
        `c-tentative-buffer-changes'.
        avoid some false alarms.
 
        * progmodes/cc-engine.el, progmodes/cc-langs.el (c-looking-at-inexpr-block):
-       Fixed a situation where an error could be thrown for unbalanced
+       Fix a situation where an error could be thrown for unbalanced
        parens.  Changed to make use of c-keyword-member' to avoid some
        repeated regexp matches.
 
 
        * progmodes/cc-defs.el (c-point): Add `bosws' and `eosws'.
 
-2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2005-12-08  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-cmds.el, progmodes/cc-styles.el:
        * progmodes/cc-vars.el: New variables
        * progmodes/cc-cmds.el (c-electric-brace): Don't delete a comment
        which precedes the newly inserted `{'.
 
-2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2005-12-08  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el, progmodes/cc-langs.el: Rewrote the recognition
        function for declaration level blocks.  It should now cope with
        when macros occur in obscure places.  Optimized the sexp movement
        a bit.
 
-2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2005-12-08  Alan Mackenzie  <acm@muc.de>
 
        Enhancements for c-beginning-of-statement to work in AWK Mode:
 
 
        * progmodes/cc-mode.el: Put M-a and M-e into awk-mode-map.
 
-2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2005-12-08  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el, progmodes/cc-fonts.el:
        * progmodes/cc-langs.el: Cleaned up the
 
        (c-lineup-math): Change to use `c-lineup-assignments'.
 
-2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2005-12-08  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-cmds.el: Fix some bugs in subfunctions of
        c-beginning-of-statement.  New subfunctions
        c-in-comment-line-prefix-p, c-narrow-to-comment-innards.
 
-2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2005-12-08  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-fonts.el, progmodes/cc-langs.el: Use `c-simple-ws' instead of
        hardcoded char classes wherever possible.  Changed a couple of
        in `regexp-opt' in Emacs 20 and XEmacs when strings contain
        newlines.  Allow and ignore nil elements in the list.
 
-2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2005-12-08  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-cmds.el: Comment out a (n almost certainly
        superfluous) check, (eq here (point-max)) in c-beginning-of-statement.
        c-beginning-of-statement, including new variable
        c-block-comment-start-regexp.
 
-2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2005-12-08  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-langs.el (c-known-type-key): Optimize simple
        symbols from `*-font-lock-extra-types' so that there's no need to
        * progmodes/cc-vars.el (c-emacs-features): Remove compatibility
        with older emacsen: We now require `pps-extended-state'.
 
-2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2005-12-08  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-cmds.el: New function c-beginning-of-sentence,
        which obviates the need to hack sentence-end.  This now handles
        * progmodes/cc-cmds.el: Restructure c-beginning-of-statement:
        Improve its doc-string.  Improve the handling of certain specific cases.
 
-2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2005-12-08  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el, progmodes/cc-fonts.el, progmodes/cc-langs.el
        (c-guess-basic-syntax): Change the way class-level labels are
        `template-args-cont' in nested template arglists.  There's still
        much to be desired in this area, though.
 
-2005-12-08  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2005-12-08  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-cmds.el, progmodes/cc-engine.el:
        * progmodes/cc-langs.el, progmodes/cc-vars.el:
        Make the "Text Filling and Line Breaking" commands work for AWK buffers.
 
-2005-12-08  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2005-12-08  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-defs.el, progmodes/cc-engine.el (c-mode-is-new-awk-p):
-       Removed; (c-major-mode-is 'awk-mode) can be used instead now.
+       Remove; (c-major-mode-is 'awk-mode) can be used instead now.
 
        * progmodes/cc-mode.el: Always set up AWK mode since emacsen where
        it doesn't work no longer are supported.
 
 2005-11-24  Chong Yidong  <cyd@stupidchicken.com>
 
-       * hi-lock.el (hi-lock-buffer-mode): Renamed from `hi-lock-mode'.
+       * hi-lock.el (hi-lock-buffer-mode): Rename from `hi-lock-mode'.
        Use define-minor-mode, and make it a local mode.  Turn on font-lock.
        (hi-lock-mode): New global minor mode.
        (turn-on-hi-lock-if-enabled): New function.
        New functions.
        (org-move-item-down, org-move-item-up): New commands.
        (org-export-as-html): New classes for CSS support.  Bug fix in
-       regular expression detecting fixed-width regions.  Respect
-       `org-local-list-ordered-item-terminator'.
+       regular expression detecting fixed-width regions.
+       Respect `org-local-list-ordered-item-terminator'.
        (org-set-autofill-regexps, org-adaptive-fill-function): "1)" is
        also a list item.
        (org-metaup, org-metadown, org-shiftmetaup, org-shiftmetadown):
        (gdb-var-update-handler): Find values for all variable objects.
        (gdb-info-frames-custom): Identify frames by leading "#".
 
-       * progmodes/gud.el (gud-speedbar-menu-items): Add
-       gdb-speedbar-auto-raise as radio button.
+       * progmodes/gud.el (gud-speedbar-menu-items):
+       Add gdb-speedbar-auto-raise as radio button.
        (gud-speedbar-buttons): Raise speedbar if requested.
        Don't match on "char **...".
        (gud-speedbar-buttons): Add (pointer) value for non-leaves.
 2005-10-17  Bill Wohler  <wohler@newt.com>
 
        Move all remaining images from lisp/toolbar to etc/images, move
-       lisp/toolbar/tool-bar to lisp and "delete" lisp/toolbar.  Place
-       the low resolution images in their own directory (low-color).
+       lisp/toolbar/tool-bar to lisp and "delete" lisp/toolbar.
+       Place the low resolution images in their own directory (low-color).
 
        * toolbar/attach.*, toolbar/cancel.*, toolbar/close.*
        * toolbar/copy.*, toolbar/cut.*, toolbar/diropen.*, toolbar/exit.*
 2005-10-13  Jan Djärv  <jan.h.d@swipnet.se>
 
        * toolbar/diropen.xpm, toolbar/diropen.pbm: New versions made from
-       Gnome file-manager.png.  Suggested by
-       Joachim Nilsson <joachim.nilsson@vmlinux.org>.
+       Gnome file-manager.png.
+       Suggested by Joachim Nilsson <joachim.nilsson@vmlinux.org>.
 
        * toolbar/README: Add diropen.xpm.
 
        trailing ":".  Reported by Kurt Steinkraus <kurt@steinkraus.us>.
        (tramp-chunksize): Improve docstring.
        (tramp-set-auto-save-file-modes): Octal integer code #o600 breaks
-       Emacs 20.  Use `tramp-octal-to-decimal' therefore.  Reported by
-       Christian Joergensen <bugs@razor.dk>.
+       Emacs 20.  Use `tramp-octal-to-decimal' therefore.
+       Reported by Christian Joergensen <bugs@razor.dk>.
 
 2005-10-07  Glenn Morris  <rgm@gnu.org>
 
 
        * emulation/viper-cmd.el (viper-normalize-minor-mode-map-alist)
        (viper-refresh-mode-line): Use make-local-variable to localize
-       some vars instead of make-variable-buffer-local.  Suggested by
-       Stefan Monnier.
+       some vars instead of make-variable-buffer-local.
+       Suggested by Stefan Monnier.
 
        * emulation/viper-init.el (viper-make-variable-buffer-local):
        Delete alias.
 
        Frame management code (including timer, and mouse click specifics)
        moved to dframe.el:
-       (speedbar-attached-frame): Removed.  Use dframe-attached-frame.
-       (speedbar-timer): Removed.  Use dframe-timer.
-       (speedbar-close-frame): Removed.  Use dframe-close-frame.
-       (speedbar-activity-change-focus-flag): Removed.  Use
-       dframe-activity-change-focus-flag.
-       (speedbar-update-speed, speedbar-navigating-speed): Obsolete.  Use
-       dframe-update-speed.
+       (speedbar-attached-frame): Remove.  Use dframe-attached-frame.
+       (speedbar-timer): Remove.  Use dframe-timer.
+       (speedbar-close-frame): Remove.  Use dframe-close-frame.
+       (speedbar-activity-change-focus-flag): Remove.
+       Use dframe-activity-change-focus-flag.
+       (speedbar-update-speed, speedbar-navigating-speed): Obsolete.
+       Use dframe-update-speed.
 
        (speedbar-current-frame): New macro.  Use this instead of the
        variable speedbar-frame.
 
        (speedbar-use-images, speedbar-expand-image-button-alist)
-       (speedbar-insert-image-button-maybe): Moved to sb-image.el.
+       (speedbar-insert-image-button-maybe): Move to sb-image.el.
 
-       (speedbar-find-image-on-load-path): Removed.  Replaced by
+       (speedbar-find-image-on-load-path): Remove.  Replaced by
        defezimage in ezimage.el.
-       (speedbar-expand-image-button-alist): Removed.  Replaced by
+       (speedbar-expand-image-button-alist): Remove.  Replaced by
        ezimage-expand-image-button-alist in ezimage.el.
 
        (speedbar-ignored-directory-regexp)
        (speedbar-ignored-directory-expressions)
        (speedbar-line-directory, speedbar-buffers-line-directory)
        (speedbar-directory-line, speedbar-buffers-line-directory):
-       Renamed, replacing `path' with `directory'.
+       Rename, replacing `path' with `directory'.
 
        (speedbar-create-directory, speedbar-expand-line-descendants)
        (speedbar-toggle-line-expansion)
 
 2005-09-17  Milan Zamazal  <pdm@zamazal.org>
 
-       * progmodes/glasses.el (glasses-make-readable): If
-       glasses-separator differs from underscore, put appropriate
+       * progmodes/glasses.el (glasses-make-readable):
+       If glasses-separator differs from underscore, put appropriate
        overlays over underscore characters.
        (glasses-convert-to-unreadable): If glasses-separator differs from
        underscore, try to convert glasses-separator characters to
        * custom.el (custom-known-themes): Clarify meaning of "standard".
        (custom-push-theme): Save old values in the standard theme.
        (disable-theme): Correct typo.
-       (custom-face-theme-value): Deleted unused function.
+       (custom-face-theme-value): Delete unused function.
        (custom-theme-recalc-face): Rewritten to treat enable/disable properly.
 
 2005-09-05  Stefan Monnier  <monnier@iro.umontreal.ca>
        (antlr-font-lock-default-face, antlr-font-lock-keyword-face)
        (antlr-font-lock-syntax-face, antlr-font-lock-ruledef-face)
        (antlr-font-lock-tokendef-face, antlr-font-lock-ruleref-face)
-       (antlr-font-lock-tokenref-face, antlr-font-lock-literal-face): New
-       backward-compatibility aliases for renamed faces.
+       (antlr-font-lock-tokenref-face, antlr-font-lock-literal-face):
+       New backward-compatibility aliases for renamed faces.
        (antlr-default-face, antlr-keyword-face, antlr-syntax-face)
        (antlr-ruledef-face, antlr-tokendef-face, antlr-ruleref-face)
        (antlr-tokenref-face, antlr-literal-face): Variables renamed to
        remove "font-lock-".  Use renamed antlr-mode faces.
-       (antlr-font-lock-additional-keywords): Use renamed faces.  Replace
-       literal face-names with face variable references.
+       (antlr-font-lock-additional-keywords): Use renamed faces.
+       Replace literal face-names with face variable references.
 
        * buff-menu.el (Buffer-menu-buffer): Remove "-face" suffix from
        face name.
 
        * emacs-lisp/cl.el (acons, pairlis): Add docstring.
 
-2005-05-23  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2005-05-23  Martin Stjernholm  <mast@lysator.liu.se>
 
        CC Mode update to 5.30.10:
 
        * progmodes/cc-engine.el (c-guess-basic-syntax): Fix anchoring in
        `objc-method-intro' and `objc-method-args-cont'.
 
-2005-05-23  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2005-05-23  Alan Mackenzie  <acm@muc.de>
 
        CC Mode update to 5.30.10:
 
 
 2005-05-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 
-       * files.el (executable-find): Move from executable.el.  Use
-       locate-file.
+       * files.el (executable-find): Move from executable.el.
+       Use locate-file.
        * progmodes/executable.el (executable-find): Move to files.el.
 
        * font-lock.el (font-lock-fontify-keywords-region): Use a marker
 
        * term/mac-win.el: Don't define or bind scroll bar functions if
        x-toolkit-scroll-bars is t.
-       (x-select-text, x-get-selection-value): Clear
-       x-last-selected-text-clipboard if x-select-enable-clipboard is
+       (x-select-text, x-get-selection-value):
+       Clear x-last-selected-text-clipboard if x-select-enable-clipboard is
        nil.
        (PRIMARY): Put mac-scrap-name property.
        (mac-select-convert-to-file-url): New function.
        Catch `dont-send' signal.
        (tramp-set-auto-save-file-modes): Set always permissions, because
        there might be an old auto-saved file belonging to another
-       original file.  This could be a security threat.  Reported by
-       Kjetil Kjernsmo <kjetil@kjernsmo.net>.
+       original file.  This could be a security threat.
+       Reported by Kjetil Kjernsmo <kjetil@kjernsmo.net>.
        Check for Emacs 21.3.50 removed.
 
        * net/tramp-smb.el (all): Remove debug construct for
 
 2005-03-07  Karl Chen  <quarl@cs.berkeley.edu>
 
-       * align.el (align-rules-list): Added an alignment rule for CSS
+       * align.el (align-rules-list): Add an alignment rule for CSS
        declarations (applies to css-mode and html-mode buffers).
 
 2005-03-07  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * net/tramp-vc.el (tramp-vc-do-command, tramp-vc-do-command-new)
        (tramp-vc-simple-command): Call `tramp-handle-shell-command' but
-       `shell-command', because it isn't magic in XEmacs.  Reported by
-       Adrian Aichner <adrian@xemacs.org>.
+       `shell-command', because it isn't magic in XEmacs.
+       Reported by Adrian Aichner <adrian@xemacs.org>.
 
        * net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add entry for
        `substitute-in-file-name'.
index 52612a7a7243737fa67b9342a1766a5a8eaf3fe2..3c2a7ff7ee3a280385a598d3784ec32ef0635707 100644 (file)
 
        * kmacro.el (kmacro-insert-counter): Doc fix.
 
-2008-11-21  Ivan Shmakov  <oneingray@gmail.com>  (tiny change)
+2008-11-21  Ivan Shmakov  <oneingray@gmail.com>
 
        * progmodes/tcl.el (tcl-filter): Don't forcibly move point.
 
index 6f71a6ade88497bdbe99ad7a7519e49d4f73afbe..9c793ff4615b12cedb61e929bc9b29bb2e2cda73 100644 (file)
        * tutorial.el (help-with-tutorial): Hack safe file-local variables
        after reading the tutorial.
 
-2010-08-06  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2010-08-06  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-cmds.el (c-mask-paragraph, c-fill-paragraph):
        Fix for the case that a C style comment has its delimiters alone on
        (sql-mode-menu): Add submenu to select connections.
        (sql-interactive-mode-menu): Add "Save Connection" item.
        (sql-add-product): Fix menu item.
-       (sql-get-product-feature): Improved error handling.
+       (sql-get-product-feature): Improve error handling.
        (sql--alt-buffer-part, sql--alt-if-not-empty): Remove.
-       (sql-make-alternate-buffer-name): Simplified.
+       (sql-make-alternate-buffer-name): Simplify.
        (sql-product-interactive): Handle missing product.
        (sql-connect): Support string keys, minor improvements.
        (sql-save-connection): New function.
        (sql-connection-alist): New variable.
        (sql-connect): New function.
        (sql--alt-buffer-part, sql--alt-if-not-empty)
-       (sql-make-alternate-buffer-name): Improved alternative buffer name.
+       (sql-make-alternate-buffer-name): Improve alternative buffer name.
 
 2010-07-17  Thierry Volpiatto  <thierry.volpiatto@gmail.com>
 
        `compose-mail-user-agent-warnings', instead of to the
        nonexistent `compose-mail-check-user-agent'.
 
-2010-06-21  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2010-06-21  Alan Mackenzie  <acm@muc.de>
 
        Fix an indentation bug:
 
        of existing values.
 
        * progmodes/cc-engine.el (c-clear-<-pair-props-if-match-after)
-       (c-clear->-pair-props-if-match-before): now return t when they've
+       (c-clear->-pair-props-if-match-before): Now return t when they've
        cleared properties, nil otherwise.
        (c-before-change-check-<>-operators): Set c-new-beg/end correctly
        by taking account of the existing value.
index 2e8c6df24a665fe52e9f1044e7efccdb1b745e78..b4c475aff10cda8142c40d7397a62ae129e788f0 100644 (file)
@@ -1,6 +1,6 @@
 2013-03-11  Glenn Morris  <rgm@gnu.org>
 
-        * Version 24.3 released.
+       * Version 24.3 released.
 
 2013-03-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        (w32-handle-dropped-file): Convert incoming dropped files from
        Windows paths to Cygwin ones before passing them on to the rest of
        Emacs.
-       (w32-drag-n-drop): New paramter new-frame.  Simplify logic.
+       (w32-drag-n-drop): New parameter new-frame.  Simplify logic.
        (w32-initialize-window-system): Assert we're not initialized twice.
 
        * term/x-win.el: Require cl-lib; add ourselves to display-format-alist.
        In doc-strings state whether the argument window has to denote a
        live, valid or any window.
 
-2012-08-16  Phil Sainty  <psainty@orcon.net.nz>  (tiny change)
+2012-08-16  Phil Sainty  <psainty@orcon.net.nz>
 
        * progmodes/subword.el (subword-forward-function)
        (subword-backward-function, subword-forward-regexp)
        * vc/ediff-init.el (ediff-toggle-read-only-function):
        Use toggle-read-only.
 
-2011-10-22  Alan Mackenzie  <bug-cc-mode@gnu.org>
+2011-10-22  Alan Mackenzie  <acm@muc.de>
 
        Fix bug #9560, sporadic wrong indentation; improve instrumentation
        of c-parse-state.
index 767b4dd46ab4a8689d6e7d7c461ef114db22ac3c..c9bd4e79c9adfd9f62eae1554538a510cf3eb285 100644 (file)
@@ -26,7 +26,7 @@
        (find-file-read-only-other-window): Likewise.
        (find-file-read-only-other-frame): Likewise.
 
-       * timer.el (cancel-function-timers): Renamed from spurious duplicate
+       * timer.el (cancel-function-timers): Rename from spurious duplicate
        definition of cancel-timer.
 
        * add-log.el (find-change-log): Use file-chase-links.
@@ -82,7 +82,7 @@
 
        * paths.el (Info-default-directory-list): Take out ../../info.
        Avoid duplication.
-       (manual-formatted-dirlist, manual-formatted-dir-prefix): Deleted.
+       (manual-formatted-dirlist, manual-formatted-dir-prefix): Delete.
 
        * subr.el (baud-rate): Doc fix.
 
        Delete the "local thinking machines" definitions at the end
        since they caused compilation failure.
 
-       * cl.el (cl-member): Renamed from member.
+       * cl.el (cl-member): Rename from member.
 
        * time.el (display-time-day-and-date): Use defvar, not defconst.
 
        (timezone-make-date-sortable): Make autoload for this.
        (rmail-sort-by-recipient): Downcase the strings for sorting.
        (rmail-sort-by-recipient): Likewise.
-       (rmail-sort-by-lines): Renamed from rmail-sort-by-size-lines.
+       (rmail-sort-by-lines): Rename from rmail-sort-by-size-lines.
        Use numbers to sort by.
        (rmail-summary-...): New functions.  Bind in rmail-summary-mode-map.
        (rmail-sort-from-summary): New function.
        Choose string< or < as predicate.
        Reorder messages by exchanging them, with inhibit-quit bound.
        (rmail-fetch-field): Start by widening.
-       (rmail-sortable-date-string): Deleted.
+       (rmail-sortable-date-string): Delete.
        (rmail-make-date-sortable): New function, used instead.
 
-       * paths.el (gnus-local-organization): Renamed from ...-your-...
+       * paths.el (gnus-local-organization): Rename from ...-your-...
        (gnus-local-domain): Likewise.
 
 1993-05-26  Jim Blandy  (jimb@wookumz.gnu.ai.mit.edu)
        (set-face-font): Only use x-resolve-font-name if FONT is a string.
        Copying a faces shouldn't resolve the font.
 
-       * paths.el (Info-default-directory-list): Add
-       configure-info-directory to this list.
+       * paths.el (Info-default-directory-list):
+       Add configure-info-directory to this list.
 
 1993-05-26  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
 
 1993-05-25  Jim Blandy  (jimb@wookumz.gnu.ai.mit.edu)
 
-       * term/x-win.el (command-switch-alist, x-switch-definitions): Treat
-       `-i' like `-itype', as in Emacs 18.
+       * term/x-win.el (command-switch-alist, x-switch-definitions):
+       Treat `-i' like `-itype', as in Emacs 18.
 
 1993-05-25  Jim Blandy  (jimb@wookumz.gnu.ai.mit.edu)
 
        * Version 19.8 released.
 
-       * startup.el (command-line-1): Don't handle `-i'.  We're
-       abandoning the `insert file' meaning in favor of the `use a
+       * startup.el (command-line-1): Don't handle `-i'.
+       We're abandoning the `insert file' meaning in favor of the `use a
        bitmapped icon' meaning.
 
        * faces.el (set-face-font): Call x-resolve-font-name on the font
        * iso-syntax.el: Make downcase into a proper case table before
        passing it to set-standard-case-table.
 
-       * disp-table.el (standard-display-european): Doc fix.  Make
-       it autoload.  Make it respond to prefix arg like a minor mode.
+       * disp-table.el (standard-display-european): Doc fix.
+       Make it autoload.  Make it respond to prefix arg like a minor mode.
 
 1993-05-24  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
 
 1993-05-22  Jim Blandy  (jimb@geech.gnu.ai.mit.edu)
 
-       * cl.el (cl-floor, cl-ceiling, cl-truncate, cl-round): Renamed
-       from floor, ceiling, truncate, and round; the old names conflict
+       * cl.el (cl-floor, cl-ceiling, cl-truncate, cl-round):
+       Rename from floor, ceiling, truncate, and round; the old names conflict
        with built-in functions.
 
 1993-05-22  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
 1993-05-16  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
-       * texinfo.el (texinfo-chapter-level-regexp): Copied here.
+       * texinfo.el (texinfo-chapter-level-regexp): Copy here.
 
 1993-05-17  Roland McGrath  (roland@geech.gnu.ai.mit.edu)
 
        * gnus.el, gnuspost.el, gnusmail.el, gnusmisc.el,
        * nntp.el, nnspool.el, mhspool.el: Version 3.15 from Umeda.
 
-       * frame.el (toggle-scroll-bar): Renamed from toggle-vertical-scroll...
+       * frame.el (toggle-scroll-bar): Rename from toggle-vertical-scroll...
 
 1993-05-16  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
        * menu-bar.el (menu-bar-mode): New command.  Use for initialization.
 
        * faces.el (make-face): Add interactive spec.
-       (set-default-font): Deleted.
+       (set-default-font): Delete.
 
        * isearch.el (isearch-mode-map): Handle any length vector in keymap.
        (isearch-char-to-string): Handle non-character events properly.
 
 1993-05-14  Jim Blandy  (jimb@geech.gnu.ai.mit.edu)
 
-       * subr.el (overlay-start, overlay-end, overlay-buffer): Removed.
+       * subr.el (overlay-start, overlay-end, overlay-buffer): Remove.
 
        * vc.el (vc-version-diff): Match parens.
 
 
        * emerge.el: Installed version 5 from drw.
        Merged in previous FSF changes, plus new changes:
-       (emerge-count-matches-string): Renamed from count-matches-string.
+       (emerge-count-matches-string): Rename from count-matches-string.
        (emerge-command-prefix): Now C-c C-c.
-       (emerge-shadow-key-definition): Deleted.
+       (emerge-shadow-key-definition): Delete.
        Callers use substitute-key-definition.
-       (emerge-recursively-substitute-key-definition): Deleted.
+       (emerge-recursively-substitute-key-definition): Delete.
        Callers use substitute-key-definition.
-       (emerge-unselect-hook): Renamed from emerge-unselect-hooks.
+       (emerge-unselect-hook): Rename from emerge-unselect-hooks.
        (emerge-files-internal): Use file-local-copy to handle remote files.
        (emerge-files-with-ancestor-internal): Likewise.
-       (emerge-remote-file-p): Deleted.
+       (emerge-remote-file-p): Delete.
        (emerge-abort): New command.
-       (describe-mode): Deleted.
-       (emerge-hash-string-into-string): Renamed from hash-string-into-string.
-       (emerge-unslashify-name): Renamed from unslashify-name.
+       (describe-mode): Delete.
+       (emerge-hash-string-into-string): Rename from hash-string-into-string.
+       (emerge-unslashify-name): Rename from unslashify-name.
        (emerge-write-and-delete): Don't write-file if file-out is nil.
        (emerge-setup-fixed-keymaps): Put emerge-abort on C-].
-       (emerge-find-difference-diff): Renamed from emerge-find-difference.
+       (emerge-find-difference-diff): Rename from emerge-find-difference.
        (emerge-find-difference): New command.  Now on `.'.
-       (emerge-diff-ok-lines-regexp): Renamed from emerge-diff-ok-lines.
-       (emerge-diff3-ok-lines-regexp): Renamed from emerge-diff3-ok-lines.
+       (emerge-diff-ok-lines-regexp): Rename from emerge-diff-ok-lines.
+       (emerge-diff3-ok-lines-regexp): Rename from emerge-diff3-ok-lines.
 
 1993-05-13  Paul Eggert  (eggert@twinsun.com)
 
 
        * comint.el (comint-previous-matching-input): New command, on M-r.
        (comint-next-matching-input): New command, on M-s.
-       (comint-previous-similar-input): Commented out.
+       (comint-previous-similar-input): Comment out.
        (comint-next-similar-input): Likewise.
-       (comint-previous-input-matching): Deleted.
+       (comint-previous-input-matching): Delete.
        (comint-last-input-match): Var commented out.
        (comint-mode): Don't make comint-last-input-match local.
 
 
        * help.el (help-for-help): Use lower case letters for help options.
 
-       * rect.el (string-rectangle): Renamed from fill-rectangle.
-       (string-rectangle-line): Renamed from fill-rectangle-line.
+       * rect.el (string-rectangle): Rename from fill-rectangle.
+       (string-rectangle-line): Rename from fill-rectangle-line.
 
 1993-05-01  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
        FORCE argument non-nil, so that we don't get an error if the mark
        isn't set yet.
 
-       * edebug.el (global-edebug-prefix, global-edebug-map): Add
-       autoload cookies for these, so they are present when Emacs starts
+       * edebug.el (global-edebug-prefix, global-edebug-map):
+       Add autoload cookies for these, so they are present when Emacs starts
        up.
 
        * edebug.el (global-edebug-map): Bind `C-x X d' to edebug-defun in
 
        * complete.el: New file.
 
-       * vc.el (vc-match-substring): Renamed from match-substring.
+       * vc.el (vc-match-substring): Rename from match-substring.
        (vc-parse-buffer): Use new name.
 
        * shell.el (shell-prompt-pattern): Undo last change.
        * files.el (file-truename): Redo esr's change.
 
        * loaddefs.el: Put arrow key bindings back to the ordinary Emacs cmds.
-       * simple.el (up-arrow, down-arrow, left-arrow, right-arrow): Deleted.
+       * simple.el (up-arrow, down-arrow, left-arrow, right-arrow): Delete.
 
        * simple.el (kill-line, next-line-add-newlines): Doc fix.
        (kill-whole-line): Doc fix.
 
        * gud.el: Set no-byte-compile local variable t to work around a
        byte-compiler bug.
-       (gud-def, global-map): Move C-x C-a commands to global map.  Restore
-       original C-x SPC global binding.
+       (gud-def, global-map): Move C-x C-a commands to global map.
+       Restore original C-x SPC global binding.
 
        * vc.el (vc-diff): Get proper error message when you run this with
        no prefix arg on an empty buffer.
        (vc-directory): Better directory format --- replace the user and
        group IDs with locking-user (if any).
-       (vc-finish-logentry, vc-next-comment, vc-previous-comment): Replace
-       *VC-comment-buffer* with a ring vector.
+       (vc-finish-logentry, vc-next-comment, vc-previous-comment):
+       Replace *VC-comment-buffer* with a ring vector.
 
 1993-04-25  Eric S. Raymond  (eric@mole.gnu.ai.mit.edu)
 
-       * simple.el (down-arrow): New function.  Uses
-       next-line-add-newlines to suppress addition of new lines at end of
+       * simple.el (down-arrow): New function.
+       Uses next-line-add-newlines to suppress addition of new lines at end of
        buffer.
        (up-arrow): Alias of previous-line, added for consistency.
        These changes complete terminal-type-independent support for arrow
        keys.
 
-       * tex-mode.el (tex-compilation-parse-errors): Added.  At the
+       * tex-mode.el (tex-compilation-parse-errors): Add.  At the
        moment, this would have to be applied manually.  It's not worth
        trying to integrate this with the rest of the mode more tightly
        until we decide whether and how compile's interface is going to
        change away from a closed subsystem.
 
-       * files.el (cd): Changed to use to resolve relative cd calls.
-       (cd-absolute): Added.  This is actually the old cd code with a
+       * files.el (cd): Change to use to resolve relative cd calls.
+       (cd-absolute): Add.  This is actually the old cd code with a
        changed doc string.
-       (parse-colon-path): Added. Path-to-string exploder --- may be
+       (parse-colon-path): Add. Path-to-string exploder --- may be
        useful elsewhere.
 
        * ring.el: Added and fixed documentation.
        (ring-rotate): Nuked.  It was (a) unused, and (b) totally broken (as
        in, any attempt to use it died with a type error, and when I patched
        it to fix that I found its algorithm was broken).
-       (ring-ref): Added doc string.
+       (ring-ref): Add doc string.
 
 1993-04-25  Jim Blandy  (jimb@totoro.cs.oberlin.edu)
 
 
 1993-04-23  Eric S. Raymond  (eric@mole.gnu.ai.mit.edu)
 
-       * bytecomp.el (define-function): Changed name back to defaliases
+       * bytecomp.el (define-function): Change name back to defaliases
        to get things in a known-good state.  The unload patch had been
        half-applied, leading to lossage.
 
 
        * telnet.el: Commentary added.
        (telnet): Doc fix.
-       (rsh): Added entry point for rsh to remote host, per suggestion by
+       (rsh): Add entry point for rsh to remote host, per suggestion by
        Michael McNamara <mac@ardent.com>.  No change to any other code.
 
        * info.el (Info-find-node, Info-insert-subfile): Do the right
        saving me lots of disk space.
 
        * simple.el: All fsets changed to defaliases.
-       (kill-forward-chars, kill-backward-chars): Deleted.  These were
+       (kill-forward-chars, kill-backward-chars): Delete.  These were
        internal subroutines used by delete-char and delete-backward-char
        before those functions were moved into the C kernel.  Now nothing
        uses them.
-       (kill-line): Added kill-whole-line variable.  Defaults to nil; a
+       (kill-line): Add kill-whole-line variable.  Defaults to nil; a
        non-nil value causes a kill-line at the beginning of a line to
        kill the newline as well as the line.  I find it very convenient.
        Emulates Unipress' &kill-lines-magic variable.
-       (next-line): Added next-line-add-newlines variable.  If nil,
+       (next-line): Add next-line-add-newlines variable.  If nil,
        next-line will not insert newlines when invoked at the end of a
        buffer.  This obviates three LCD packages.
        (left-arrow, right-arrow): New functions.  These do backward-char
        left or right as necessary to make sure point is visible.
 
        * loaddefs.el: All fsets changes to defaliases.
-       (global-map): Changed bindings of [left] and [right] to left-arrow and
+       (global-map): Change bindings of [left] and [right] to left-arrow and
        right-arrow respectively.
 
 1993-04-22  Roland McGrath  (roland@mole.gnu.ai.mit.edu)
 1993-04-16  Eric S. Raymond  (eric@mole.gnu.ai.mit.edu)
 
        * electric.el (shrink-window-if-larger-than-buffer):
-       Moved to window.el.
+       Move to window.el.
 
 1993-04-16  Jim Blandy  (jimb@totoro.cs.oberlin.edu)
 
 
 1993-04-14  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
-       * resume.el (resume-suspend-hook): Renamed from empty-args-file.
+       * resume.el (resume-suspend-hook): Rename from empty-args-file.
        Add autoload cookie.
-       (resume-emacs-args-buffer): Renamed.
-       (resume-write-buffer-to-file): Renamed.
+       (resume-emacs-args-buffer): Rename.
+       (resume-write-buffer-to-file): Rename.
 
-       * two-column.el (tc-dissociate): Renamed from tc-kill-association.
+       * two-column.el (tc-dissociate): Rename from tc-kill-association.
        Move binding to C-x 6 d.
 
 1993-04-14  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
        * gud.el (gud-mode): Created C-c synonym bindings in the GUD
        buffer's local map.
 
-       (gud-key-prefix): Changed to C-x C-a.
+       (gud-key-prefix): Change to C-x C-a.
 
 1993-04-14  Eric S. Raymond  (eric@mole.gnu.ai.mit.edu)
 
        ability to browse package commentary sections and a completely
        point-and-shoot interface similar to Dired's.
 
-       * window.el (shrink-window-if-larger-than-buffer): Moved from
+       * window.el (shrink-window-if-larger-than-buffer): Move from
        electric.el to windows.el, minor bug fix.  This is to avoid code
        duplication between vc.el, electric.el, and finder.el.
 
-       (ctl-x-map): Added C-x - and C-x + as experimental bindings for
+       (ctl-x-map): Add C-x - and C-x + as experimental bindings for
        shrink-window-if-larger-than-buffer and balance-windows
        respectively.  Since shrink-window-if-larger-than-buffer has to
        live here anyhow, let users use it to manage screen space.
 
 1993-04-10  Eric S. Raymond  (eric@mole.gnu.ai.mit.edu)
 
-       * gud.el (gdb, sdb, dbx): Improved prompting a la grep.
+       * gud.el (gdb, sdb, dbx): Improve prompting a la grep.
 
        * comint.el: Clean up cmu* uses in header comments.
 
 
 1993-04-09  Jim Blandy  (jimb@totoro.cs.oberlin.edu)
 
-       * subr.el (overlay-start, overlay-end, overlay-buffer): New
-       defsubsts.
+       * subr.el (overlay-start, overlay-end, overlay-buffer):
+       New defsubsts.
 
        * finder.el (finder-by-keyword): Build an alist to pass to
        completing-read, instead of building an invalid obarray.
        (compile-internal): Make it the process's filter.
 
        * compile.el (compilation-error-regexp-alist):
-       Fixed MIPS CC regexp to match file
+       Fix MIPS CC regexp to match file
        names longer than one char.
        (compilation-parse-errors): Error if compilation-error-regexp-alist is nil.
 
        * compile.el (compilation-filter): New function.
        (compile-internal): Make it the process's filter.
 
-       * compile.el (compilation-error-regexp-alist): Fixed MIPS CC
+       * compile.el (compilation-error-regexp-alist): Fix MIPS CC
        regexp to match file names longer than one char.
        (compilation-parse-errors): Error if
        compilation-error-regexp-alist is nil.
        (add-change-log-entry): FILE-NAME frobnicating code moved there;
        call it.
        * vc.el (vc-comment-to-change-log):
-       Renamed from vc-comment-to-changelog.
+       Rename from vc-comment-to-changelog.
        Take optional arg and pass it to find-change-log.
        Added docstring and interactive spec.
 
        Apollo cc regexp: make "s optional, and don't anchor to bol.
 
        * compile.el (compilation-error-regexp-alist):
-       Changed MIPS RISC CC regexp (last one) to
+       Change MIPS RISC CC regexp (last one) to
        be anchored at bol, and to never match multiple lines.
 
 1993-04-03  Eric S. Raymond  (eric@geech.gnu.ai.mit.edu)
 
        * mpuz.el (mpuz-try-letter): Use read-char to read digit.
        Use message directly also.  Use downcase.
-       (mpuz-read-map): Deleted.
+       (mpuz-read-map): Delete.
 
        * dired.el (dired-unmark-all-files): Read the arg as just a char.
 
 1993-03-29  Eric S. Raymond  (eric@geech.gnu.ai.mit.edu)
 
        * vc.el (vc-next-action, vc-print-log, vc-diff, vc-revert-buffer):
-       Improved logic for parent buffer finding.
+       Improve logic for parent buffer finding.
 
        (vc-cancel-version): Bug fix.
 
        * fill.el (fill-individual-paragraphs): When skipping mail headers,
        skip to a blank line.
 
-       * env.el (setenv): Renamed back from putenv.
+       * env.el (setenv): Rename back from putenv.
 
        * replace.el (regexp-history): New history list.
        (occur, flush-lines, keep-lines, how-many): Use it.
 1993-03-28  Noah Friedman  (friedman@splode.com)
 
        * setenv.el: Renamed to env.el.  Provide `env', not `setenv'.
-       (setenv): Renamed to `putenv', which is the more proper complement
+       (setenv): Rename to `putenv', which is the more proper complement
        of `getenv'.  `setenv' retained as an alias.
        Make VALUE parameter optional; if not set, remove VARIABLE from
        process-environment.
 
        * makefile.el: Added autoload cookie for entry point.
 
-       * files.el (auto-mode-alist): Added pairs for .ms, .man, .mk,
+       * files.el (auto-mode-alist): Add pairs for .ms, .man, .mk,
        [Mm]akefile, .lex.
 
-       * electric.el (shrink-window-if-larger-than-buffer): Added doc
+       * electric.el (shrink-window-if-larger-than-buffer): Add doc
        string.  Made argument optional, because window-buffer does the
        right thing with nil.
 
 
        * rlogin.el: Updated copyright year and added autoload cookies.
        (rlogin): Set process marker to beginning of buffer.
-       (rlogin-filter): Use unwind-protect to restore match-data.  Use
-       insert-before-markers instead of insert to keep input and output
+       (rlogin-filter): Use unwind-protect to restore match-data.
+       Use insert-before-markers instead of insert to keep input and output
        from getting garbled.  Delete spurious ?\C-m chars in output
        instead of replacing them with ?\ .
 
 
 1993-03-27  Eric S. Raymond  (eric@geech.gnu.ai.mit.edu)
 
-       * lpr.el (printify-buffer): Added, debugged from Roland McGrath's
+       * lpr.el (printify-buffer): Add, debugged from Roland McGrath's
        printify-buffer code in LCD.
 
-       * cookie.el (cookie): Enhanced it to handle both LINS files and
+       * cookie.el (cookie): Enhance it to handle both LINS files and
        UNIX fortune files.
 
-       * rect.el (fill-rectangle): Added.  Inspired by Lynn Slater's
+       * rect.el (fill-rectangle): Add.  Inspired by Lynn Slater's
        insert-box package in LCD, but the interface and implementation
        are different.
 
-       * loaddefs.el (ctl-x-map): Added binding for fill-rectangle.
+       * loaddefs.el (ctl-x-map): Add binding for fill-rectangle.
 
-       * buff-menu.el (Buffer-menu-toggle-read-only): Added, per Rob
+       * buff-menu.el (Buffer-menu-toggle-read-only): Add, per Rob
        Austein's suggestion in the LCD package bm-toggle.el.
 
-       * subr.el (add-hook): Added optional arg to cause hook to be
+       * subr.el (add-hook): Add optional arg to cause hook to be
        appended rather than prepended to the hook list.  This obviates
        the 23 different hook-bashing packages in LCD.
 
-       * subr.el (current-word): Added.  Lots of help and default-generator
+       * subr.el (current-word): Add.  Lots of help and default-generator
        functions in LCD use it, and it's remarkably difficult to get
        right, especially given the new syntax primitives.
 
 
 1993-03-26  Eric S. Raymond  (eric@geech.gnu.ai.mit.edu)
 
-       * yow.el (psychoanalyze-pinhead): Needed a prefrontal lobotomy.  I
-       gave it one.
+       * yow.el (psychoanalyze-pinhead): Needed a prefrontal lobotomy.
+       gave it one.
 
        * two-column.el: Added Commentary.
 
 
 1993-03-25  Eric S. Raymond  (eric@geech.gnu.ai.mit.edu)
 
-       * lisp-mnt.el (lm-last-modified-date): Fixed return bug.
+       * lisp-mnt.el (lm-last-modified-date): Fix return bug.
 
        (lm-author, lm-maintainer): These now return cons pairs, not strings.
 
        * shell.el: Brent Benson's patch to support `cd -'.
 
-       * mh-e.el (mh-unshar): Added.
+       * mh-e.el (mh-unshar): Add.
 
        * emacsbug.el: Added a (provide 'emacsbug); lisp-mnt.el needs this.
 
 
        * time.el (display-time): Doc fix.
 
-       * isearch.el (isearch-switch-frame-handler): Call
-       handle-switch-frame instead of select-frame; it has been renamed.
+       * isearch.el (isearch-switch-frame-handler):
+       Call handle-switch-frame instead of select-frame; it has been renamed.
 
        * simple.el (comment-indent-function): New variable, intended to
        replace comment-indent-hook.
 
 1993-03-18  Richard Stallman  (rms@geech.gnu.ai.mit.edu)
 
-       * frame.el (make-frame): Renamed from new-frame.
+       * frame.el (make-frame): Rename from new-frame.
        (new-frame): Alias for make-frame.
 
 1993-03-18  Edward M. Reingold  (reingold@emr.cs.uiuc.edu)
 
 1993-03-14  Jim Blandy  (jimb@wookumz.gnu.ai.mit.edu)
 
-       * sort.el (sort-float-fields, sort-numeric-fields): Use
-       string-to-number, not string-to-float or string-to-int.
+       * sort.el (sort-float-fields, sort-numeric-fields):
+       Use string-to-number, not string-to-float or string-to-int.
 
        * sort.el (sort-float-fields): Make this autoloaded.
 
 
 1993-03-12  Eric S. Raymond  (eric@mole.gnu.ai.mit.edu)
 
-       * loaddefs.el (global-map): Fixed a typo in the binding of
+       * loaddefs.el (global-map): Fix a typo in the binding of
        [kp-backtab].
 
        * term/x-win.el: Added library headers back in. Didn't touch
        and featureful interface across many different keyboard types.
 
        * loaddefs.el (global-map): Natural default keybindings set up for
-       almost all supported keysyms other than function keys.  All
-       other keysyms are now default-bound to a function which explains
+       almost all supported keysyms other than function keys.
+       All other keysyms are now default-bound to a function which explains
        that the key is not bound to anything, then raises an error.
 
        * term/README: Terminal package conventions and standard keysym
 
        * term/news.el: Cleaned up, headers added.
 
-       * term/sun.el: Headers added, [again] changed to [redo].  This
-       package is a hairball and should probably be scrapped if we
+       * term/sun.el: Headers added, [again] changed to [redo].
+       This package is a hairball and should probably be scrapped if we
        can find or built a better one.
 
        * term/tvi970.el: Headers added, [enter] changed to [kp-enter].
        * help.el: Added binding and menu line for new `P' package-finder
        command.  Won't actually take effect till the next Emacs build.
 
-       * vc.el (vc-backend-checkin): Fixed bizarre POM-dependent bug
+       * vc.el (vc-backend-checkin): Fix bizarre POM-dependent bug
        introduced into VC by a bad patch.  This was one for the
        books....badly corrupted vc-checkin code somehow mostly functioned
        for three days.  The Code That Would Not Die...
 1993-03-08  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
        * subr.el (posn-timestamp, posn-col-row, posn-point, posn-window)
-       (event-end, event-start, mouse-movement-p): Moved from mouse.el.
+       (event-end, event-start, mouse-movement-p): Move from mouse.el.
        * mouse.el: Functions moved to subr.el.
 
 1993-03-07  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 1993-03-05  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
        * disp-table.el: Add autoload comments.
-       (rope-to-vector): Deleted.
+       (rope-to-vector): Delete.
        (describe-display-table): Don't use rope-to-vector.
 
        * compare-w.el (compare-windows): Use compare-buffer-substrings.
        (rmail-undelete-previous-message, rmail-delete-forward)
        (rmail-get-new-mail, rmail-show-message): Update summary buffer if any.
        Call rmail-maybe-display-summary to put it back on screen.
-       (rmail-only-expunge): Renamed from rmail-expunge.
+       (rmail-only-expunge): Rename from rmail-expunge.
        (rmail-expunge): New function.
        (rmail-message-recipients-p, rmail-message-regexp-p): New functions.
        (rmail-summary-exists, rmail-summary-displayed): New functions.
 1993-03-01  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
        * frame.el: Doc fixes.
-       (set-pointer-color): Renamed to set-mouse-color.
+       (set-pointer-color): Rename to set-mouse-color.
        (set-border-color): New function.
 
        * info.el (Info-insert-dir): Make menu items in Top node
 
 1993-02-26  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
-       * frame.el (auto-raise-mode): Renamed from toggle-auto-raise.
-       (auto-lower-mode): Renamed from toggle-auto-lower.
+       * frame.el (auto-raise-mode): Rename from toggle-auto-raise.
+       (auto-lower-mode): Rename from toggle-auto-lower.
 
 1993-02-26  Jim Blandy  (jimb@totoro.cs.oberlin.edu)
 
 
        * gud.el (gud-break): With a prefix argument, set a temporary
        breakpoint.
-       (gud-apply-from-source): New argument ARGS, to pass to FUNC.  Now
-       it's really like `apply'.
+       (gud-apply-from-source): New argument ARGS, to pass to FUNC.
+       Now it's really like `apply'.
        (gud-set-break): Add another argument to this method.
        Document it in the section describing how the methods are supposed
        to be used.
 
        * frame.el (frame-initialize): Fix error syntax.
        (toggle-horizontal-scroll-bar): Likewise.
-       (toggle-horizontal-scroll-bar): Renamed from set-horizontal-bar.
+       (toggle-horizontal-scroll-bar): Rename from set-horizontal-bar.
        (toggle-vertical-scroll-bar): Likewise.
        (toggle-auto-lower, toggle-auto-raise): Likewise.
        (set-foreground-color, set-background-color):
-       Renamed from set-frame-{fore,back}ground.
+       Rename from set-frame-{fore,back}ground.
 
 1993-02-15  Jim Blandy  (jimb@wookumz.gnu.ai.mit.edu)
 
 
 1993-02-11  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
-       * flow-ctrl.el (enable-flow-control...): Renamed from evade...
+       * flow-ctrl.el (enable-flow-control...): Rename from evade...
        (enable-flow-control): Add autoload.
 
 1993-02-10  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
        * fortran.el (fortran-prepare-abbrev-list-buffer): Put quote in
        front of first argument to `insert-abbrev-table-description'.
 
-       * fortran.el (fortran-is-in-string-p): Fixed incorrect behavior
+       * fortran.el (fortran-is-in-string-p): Fix incorrect behavior
        when in first statement of a buffer.
 
 1993-02-08  Roland McGrath  (roland@geech.gnu.ai.mit.edu)
 
 1993-02-05  Roland McGrath  (roland@geech.gnu.ai.mit.edu)
 
-       * comint.el (make-comint): Added docstring.
+       * comint.el (make-comint): Add docstring.
 
 1993-02-05  Roland McGrath  (roland@geech.gnu.ai.mit.edu)
 
 1993-01-31  Roland McGrath  (roland@geech.gnu.ai.mit.edu)
 
        * mailabbrev.el (mail-abbrev-end-of-buffer):
-       Changed interactive spec from "P" to "p".
+       Change interactive spec from "P" to "p".
 
 1993-01-29  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
        x-own-selection has been renamed to x-set-selection, and the order
        of its arguments has been reversed, for consistency with other
        lisp functions like put and aset.
-       * term/x-win.el (x-select-text): Adjusted.
+       * term/x-win.el (x-select-text): Adjust.
        (x-cut-buffer-or-selection-value): Check the primary selection,
        using x-selection, instead of checking the cut buffer again.
 
        x-own-selection has been renamed to x-set-selection, and the order
        of its arguments has been reversed, for consistency with other
        lisp functions like put and aset.
-       * term/x-win.el (x-select-text): Adjusted.
+       * term/x-win.el (x-select-text): Adjust.
        (x-cut-buffer-or-selection-value): Check the primary selection,
        using x-selection, instead of checking the cut buffer again.
 
        * etags.el: Many comments added and docstrings fixed.
        (tags-table-list): Elt of nil is not special.
        (tags-expand-table-name): Value of nil is not special.
-       (tags-next-table): Removed arg RESET; no caller used it.
+       (tags-next-table): Remove arg RESET; no caller used it.
        (visit-tags-table-buffer): Don't need to do tags-expand-table-name
        in or form. When table is invalid, only set tags-file-name to nil
        globally if its global value contained the losing table file name.
        (find-tag-tag): Return a string, not a list.
        (find-tag-noselect, find-tag, find-tag-other-window)
-       (find-tag-other-frame): Changed callers.
+       (find-tag-other-frame): Change callers.
        (etags-recognize-tags-table): Call etags-verify-tags-table, rather than
        duplicating its functionality.
        (visit-tags-table-buffer): When CONT is 'same, set it to nil after the
 
 1992-12-09  Roland McGrath  (roland@wookumz.gnu.ai.mit.edu)
 
-       * info.el (Info-{first,second,third,fourth,fifth}-menu-item): Removed.
+       * info.el (Info-{first,second,third,fourth,fifth}-menu-item): Remove.
        (Info-nth-menu-item): New function; bound to 1..9.
 
 1992-12-08  Jim Blandy  (jimb@totoro.cs.oberlin.edu)
        Just that.
        * ls-lisp.el (insert-directory): Just that.
 
-       * ange-ftp.el (ange-ftp-unhandled-file-name-directory): New
-       function.  Set ange-ftp's `unhandled-file-name-property' to its
+       * ange-ftp.el (ange-ftp-unhandled-file-name-directory):
+       New function.  Set ange-ftp's `unhandled-file-name-property' to its
        name.
 
 1992-12-07  Jim Blandy  (jimb@totoro.cs.oberlin.edu)
        * paths.el (rmail-spool-directory): Add dgux-unix to the list of
        systems which put their mail in "/usr/mail".
 
-       * lpr.el (lpr-command, lpr-switches): Removed strings starting
+       * lpr.el (lpr-command, lpr-switches): Remove strings starting
        with \newline; this file is loaded in loaddefs.el, and doesn't
        need to follow that convention.
 
        * fortran.el: Version 1.28.7a.
        Cleaned up some doc strings.
 
-       (fortran-abbrev-help, fortran-prepare-abbrev-list-buffer): Use
-       `insert-abbrev-table-description' and make buffer in abbrevs-mode.
+       (fortran-abbrev-help, fortran-prepare-abbrev-list-buffer):
+       Use `insert-abbrev-table-description' and make buffer in abbrevs-mode.
 
        * fortran.el: Version 1.28.7.
        Many changes since version 1.28.3.  Added auto-fill-mode, support
        New functions to implement auto fill.
 
        (fortran-indent-line, fortran-reindent-then-newline-and-indent):
-       Added auto fill support.
+       Add auto fill support.
 
        (find-comment-start-skip, is-in-fortran-string-p): New functions.
 
        (fortran-indent-to-column): Use find-comment-start-skip instead of
        searching for `comment-start-skip'.
 
-       (fortran-mode, calculate-fortran-indent): Added indentation
+       (fortran-mode, calculate-fortran-indent): Add indentation
        for fortran 90 statements.
 
        (fortran-next-statement, fortran-previous-statement): Bug fixes.
 
 1992-10-31  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
-       * files.el (make-directory): Renamed from make-directory-path.
+       * files.el (make-directory): Rename from make-directory-path.
        Optional argument says whether to create parent dirs.
        Invoke file-name handler here.
        (after-find-file): Delete code that offers to create dir.
 
        * info.el: Rename buffer-flush-undo to buffer-disable-undo.
        (Info-goto-emacs-key-command-node): Fix typo.
-       (Info-menu-item-sequence): Commented out.
+       (Info-menu-item-sequence): Comment out.
        (Info-follow-nearest-node): Use new event format.
        Select the window clicked on.
 
 
        * mailabbrev.el: Delete version 18 compatibility stuff.
        (mail-abbrevs, build-mail-abbrevs, rebuild-mail-abbrevs)
-       (merge-mail-abbrevs): Renamed `mail-aliases' to `mail-abbrevs'.
-       (mail-abbrev-end-of-buffer): Renamed from abbrev-hacking-end-of-buffer.
-       (mail-abbrev-next-line): Renamed from abbrev-hacking-next-line.
+       (merge-mail-abbrevs): Rename `mail-aliases' to `mail-abbrevs'.
+       (mail-abbrev-end-of-buffer): Rename from abbrev-hacking-end-of-buffer.
+       (mail-abbrev-next-line): Rename from abbrev-hacking-next-line.
 
        * isearch-mode.el (isearch-mode-map): Use sparse keymaps.
        Start printing-char loop at SPC.
 
 1992-10-05  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
-       * ls-lisp.el (insert-directory): Renamed from dired-ls.
+       * ls-lisp.el (insert-directory): Rename from dired-ls.
        All other functions renamed to start with ls-lisp.
 
        * ls-lisp.el: New file from Kremer.
 
        * mouse.el: Begin adapting this to the new event format.
        (event-window, event-point, mouse-coords, mouse-timestamp):
-       Removed.
+       Remove.
        (event-start, event-end, posn-window, posn-point, posn-col-row)
        (posn-timestamp): New accessors; these are defsubsts.
        (mouse-delete-window, mouse-delete-other-windows)
 
 1992-09-30  Jim Blandy  (jimb@wookumz.gnu.ai.mit.edu)
 
-       * gud.el (gud-last-frame): Added defvar for this.
+       * gud.el (gud-last-frame): Add defvar for this.
 
 1992-09-29  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
        Use x-get-cut-buffer and x-set-cut-buffer, instead of expecting
        x-selection-value to manipulate the cut buffers.
 
-       * term/x-win.el (x-cut-buffer-or-selection-value): Treat
-       selections whose value is the empty string like unset selections.
+       * term/x-win.el (x-cut-buffer-or-selection-value):
+       Treat selections whose value is the empty string like unset selections.
        This allows us to truncate cut buffers to the empty string (if the
        text is too large, say) without causing
        interprogram-paste-function to wipe out the latest kill.
        latter doesn't exist.
        (gud-dbx-debugger-setup): Use the argument `f', not the variable
        `file', which happens to be bound in the caller.
-       (gud-filter-insert): The variable `start' is never used.  The
-       variable `moving' is unnecessary.  The variable `old-buffer' and
+       (gud-filter-insert): The variable `start' is never used.
+       The variable `moving' is unnecessary.  The variable `old-buffer' and
        the unwind-protect form are unneeded, since save-excursion can do
        their work.  The binding of output-after-point should be done after
        switching to the process's buffer, not in whatever random buffer
-       happens to be current when the process filter is called.  There's
-       no need to set the process mark if we've just inserted at its
+       happens to be current when the process filter is called.
+       There's no need to set the process mark if we've just inserted at its
        location using insert-before-markers.
        (gud-read-address): Don't bother setting the variable `result'; it
        is never used.
 
        * two-column.el (tc-window-width, tc-separator, tc-other):
        Add permanent-local property.
-       (tc-two-columns): Renamed from tc-split.
-       (tc-split): Renamed from tc-unmerge.  Put it on C-x 6 s.
+       (tc-two-columns): Rename from tc-split.
+       (tc-split): Rename from tc-unmerge.  Put it on C-x 6 s.
        Use make-local-variable on tc-separator.
 
        * spook.el (spook): Make it autoload.
        * gomoku.el (gomoku): Make it autoload.
 
        * mpuz.el: Fix setup of mpuz-read-map not to depend on keymap format.
-       (mpuz): Renamed from mult-puzzle.  Make it autoload.
+       (mpuz): Rename from mult-puzzle.  Make it autoload.
 
        * setenv.el (setenv): Doc fix.  Make it autoload.
 
 
        * texinfo.el (texinfo-mode): Capitalize the mode name string.
 
-       * mail-extr.el (mail-undo-backslash-quoting): Renamed from undo-...
-       (mail-safe-move-sexp): Renamed from safe-...
-       (mail-variant-method): Renamed from variant-method.
+       * mail-extr.el (mail-undo-backslash-quoting): Rename from undo-...
+       (mail-safe-move-sexp): Rename from safe-...
+       (mail-variant-method): Rename from variant-method.
 
        * tq.el: Doc fixes.  Make tq-create autoload.
 
 
        * prompt.el: File deleted.
 
-       * find-dired.el (start-process-shell-command): Deleted.
+       * find-dired.el (start-process-shell-command): Delete.
 
        * diff.el (diff-switches): Default is now -c.
        (diff-parse-differences): Use line beg as location of message.
        (search-last-string, search-last-regexp): Vars deleted.
        (search-highlight): No longer a user option.
 
-       * subr.el (baud-rate): Defined.
+       * subr.el (baud-rate): Define.
        (substitute-key-definition): Understand today's keymap format.
        New arg OLDMAP.  Operate recursively on prefix keys.
 
 
 1992-09-16  Joseph Arceneaux  (jla@churchy.gnu.ai.mit.edu)
 
-       * isearch-mode.el (isearch-ring-advance-edit): Added missing
+       * isearch-mode.el (isearch-ring-advance-edit): Add missing
        closing paren to end of this function.
 
 1992-09-16  Roland McGrath  (roland@geech.gnu.ai.mit.edu)
        * simple.el (previous-history-element): Doc fix.
 
        * isearch-mode.el (isearch-event-data-type):
-       Renamed from isearch-events-exist.
+       Rename from isearch-events-exist.
        (isearch-frames-exist): Set properly in Emacs 18.
        (isearch-mode): Use baud-rate as variable, not function.
        (isearch-abort): Use nil as 2nd arg to `signal'.
        Don't try using length of keymap.
        (isearch-update): Handle unread-command-char properly for Emacs 19.
        (isearch-switch-frame-handler): Use select-frame to switch frames.
-       (isearch-pre-command-hook): Commented out.
-       (search-upper-case): Renamed from search-caps-disable-folding.
+       (isearch-pre-command-hook): Comment out.
+       (search-upper-case): Rename from search-caps-disable-folding.
 
 1992-09-14  Roland McGrath  (roland@geech.gnu.ai.mit.edu)
 
        * dired-aux.el (dired-add-entry, dired-insert-subdir-doinsert):
        Use insert-directory.
        * dired.el (dired-readin-insert): Use insert-directory.
-       (dired-ls, dired-ls-program): Deleted.
+       (dired-ls, dired-ls-program): Delete.
 
 1992-09-12  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
 
        * term/x-win.el (scroll-bar-mode): New function (and variable too).
 
-       * dired.el (dired-next-subdir, dired-subdir-index): Moved here
+       * dired.el (dired-next-subdir, dired-subdir-index): Move here
        * dired-aux.el: From here.
        * dired.el (dired-build-subdir-alist): Don't print msg after each dir.
        Clarify final message.
 
 1992-09-08  Joseph Arceneaux  (jla@geech.gnu.ai.mit.edu)
 
-       * mailabbrev.el (sendmail-pre-abbrev-expand-hook): Changed the
+       * mailabbrev.el (sendmail-pre-abbrev-expand-hook): Change the
        structure of this function: don't check to call
        mail-resolve-all-aliases unless we are actually in a header field
        where an abbrev should be expanded.
 
 1992-09-02  Jim Blandy  (jimb@pogo.cs.oberlin.edu)
 
-       * c-mode.el (c-auto-newline): Added backslashed before quotes in
+       * c-mode.el (c-auto-newline): Add backslashed before quotes in
        docstring.
 
 1992-09-01  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
        (mail-signature-file): This, since this is the way all the
        other lisp packages do it, and it's how people always say they
        want it on the mailing lists.
-       (mail-setup, mail-signature): Adjusted accordingly.
+       (mail-setup, mail-signature): Adjust accordingly.
        (mail): Doc fix.
 
 1992-08-17  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
        * calendar.el (calendar-interval): Fix doc string.
 
-       * calendar.el (calendar): Changed use of prefix arg--now it causes
+       * calendar.el (calendar): Change use of prefix arg--now it causes
        prompting for the month and year.
-       (regenerate-calendar-window): Renamed generate-calendar-window.
+       (regenerate-calendar-window): Rename generate-calendar-window.
        Changed optional argument from an offset from the current month to
        a month, year pair.
        (redraw-calendar, calendar-current-month, scroll-calendar-left)
 
 1992-08-08  Jim Blandy  (jimb@pogo.cs.oberlin.edu)
 
-       * frame.el (set-screen-width, set-screen-height): Changed these
+       * frame.el (set-screen-width, set-screen-height): Change these
        from fset aliases to actual functions, since they aren't supposed
        to take a frame argument, while set-frame-{width,height} do.
 
 
        * appt.el (appt-issue-message, appt-message-warning-time)
        (appt-audible, appt-visible, appt-display-mode-line)
-       (appt-msg-window, appt-display-duration, appt-display-diary): Added
-       ;;;###autoload cookies for these variables, since they are options
+       (appt-msg-window, appt-display-duration, appt-display-diary):
+       Add ;;;###autoload cookies for these variables, since they are options
        for the user to set.
        * tex-mode.el (tex-shell-file-name, tex-directory, tex-offer-save)
        (tex-run-command, latex-run-command, latex-block-names)
        * add-log.el (add-log-current-defun): Use eq instead of = when one
        side might be nil.
 
-       * compile.el (compilation-mode-map): Change
-       compilation-previous/next-file bindings to M-{ and M-}.
+       * compile.el (compilation-mode-map):
+       Change compilation-previous/next-file bindings to M-{ and M-}.
 
 1992-08-05  Jim Blandy  (jimb@wookumz.gnu.ai.mit.edu)
 
        * cl.el (*cl-valid-named-list-accessors*, *cl-valid-nth-offsets*)
-       (byte-compile-named-accessors): Deleted.
+       (byte-compile-named-accessors): Delete.
        (first, second, ... tenth, rest): Define these with defsubst, to
        get the same effect.
-       (byte-compile-ca*d*r): Deleted.
+       (byte-compile-ca*d*r): Delete.
        (caar, cadr, ..., cddddr): Define these using defsubst.
 
        Installed changes from Zawinski-Furuseth 2.04 to 2.07:
        * byte-run.el (dont-compile): Doc fix.
        (make-obsolete-variable): New function.
-       * bytecomp.el (byte-compile-log-1): Added new optional argument,
+       * bytecomp.el (byte-compile-log-1): Add new optional argument,
        FILL; if it is non-nil, reformat the error message.
        (byte-compile-warn): Use that flag.
        (byte-recompile-directory): Offer to recompile subdirectories.
        If prefix argument is zero, create .elc files for those .el files
        which lack them, without asking.
-       (byte-compile-output-form, byte-compile-output-docform): Disable
-       print-gensym while writing the form.
+       (byte-compile-output-form, byte-compile-output-docform):
+       Disable print-gensym while writing the form.
        (byte-compile-form): Warn if t or nil are called as functions.
        (byte-compile-variable-ref): Check for, and warn about, obsolete
        variable uses.
 
        * inf-lisp.el (inferior-lisp-filter-regexp, inferior-lisp-program)
        (inferior-lisp-load-command, inferior-lisp-prompt)
-       (inferior-lisp-mode-hook, inferior-lisp): Added ;;;###autoload
+       (inferior-lisp-mode-hook, inferior-lisp): Add ;;;###autoload
        cookies for these.
 
        * bytecomp.el (byte-compile-warnings): When choosing the default
 
        * info.el (Info-mode): scroll-up, scroll-down now do the right
        thing for preorder browsing when the beginning/end of the node
-       is visible.  RET now goes to the next preorder node.  These
-       changes make sequential reading of info subtrees easier.
+       is visible.  RET now goes to the next preorder node.
+       These changes make sequential reading of info subtrees easier.
 
 1992-08-04  Jim Blandy  (jimb@wookumz.gnu.ai.mit.edu)
 
        * vc.el (vc-next-action, vc-register, vc-diff, vc-insert-headers)
        (vc-directory, vc-create-snapshot, vc-retrieve-snapshot)
        (vc-print-log, vc-revert-buffer, vc-cancel-version)
-       (vc-update-change-log): Added the ;;;###autoload cookies to these
+       (vc-update-change-log): Add the ;;;###autoload cookies to these
        functions, since they get bound to keys in the global keymap.
        * loadup.el: Load vc-hooks.el.
 
        (medit-zap-define-to-mdl): Change `medit-save-defun' to
        `medit-save-define'.
        (medit-save-region, medit-save-buffer, medit-zap-define-to-mdl):
-       Changed `medit-go-to-mdl' to `medit-goto-mdl'.  Did anyone ever
+       Change `medit-go-to-mdl' to `medit-goto-mdl'.  Did anyone ever
        try this code?
 
 1992-08-02  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
        (dired-create-files, dired-handle-overwrite):
        Rename overwrite-confirmed to dired-overwrite-confirmed.
        (dired-do-kill-lines): Handle prefix arg as number of lines to kill.
-       (dired-kill-line-or-subdir): Deleted.
+       (dired-kill-line-or-subdir): Delete.
 
 1992-08-01  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
 
-       * mailabbrev.el [from jwz] (mail-interactive-insert-alias): Do
-       mail-aliases-setup if necessary before completing for interactive.
-       (build-mail-aliases): Changed parsing regexp.
+       * mailabbrev.el [from jwz] (mail-interactive-insert-alias):
+       Do mail-aliases-setup if necessary before completing for interactive.
+       (build-mail-aliases): Change parsing regexp.
 
        * compile.el (compilation-parse-errors): Take 2nd arg FIND-AT-LEAST.
        If non-nil, stop after parsing that many new errors.
 
        * comint.el: ring-* functions deleted--get them from ring.el.
 
-       * ring.el (ring-mod): Renamed from comint-mod.
+       * ring.el (ring-mod): Rename from comint-mod.
        Provide `ring', not history'.
        (make-ring, ring-p): Add autoloads.
        * history.el: Link deleted.
        Use buffer-disable-undo instead of buffer-flush-undo; the latter
        is obsolete.
 
-       * lpr.el (print-region-new-buffer): Added arguments START and END;
+       * lpr.el (print-region-new-buffer): Add arguments START and END;
        this used to use dynamic scope, but it makes things less readable.
        (print-region-1): Always call this with two arguments, not
        sometimes two and sometimes none.
        * hideif.el (hif-endif-to-ifdef): Fix munged comment which was
        interfering with parsing.
 
-       * hexl.el (hexl-next-line): Fixed up malformed let binding.
+       * hexl.el (hexl-next-line): Fix up malformed let binding.
 
        * bytecomp.el (byte-compile-file): Catch errors that occur during
        compilation, and record them in the compilation log.  This allows
 
 1992-07-28  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
-       * files.el (backup-extract-version): Copied from Emacs 18.
+       * files.el (backup-extract-version): Copy from Emacs 18.
        (find-backup-file-name): Use that.
 
-       * dired-aux.el (dired-clean-directory): Moved here.
+       * dired-aux.el (dired-clean-directory): Move here.
        (dired-map-dired-file-lines, dired-collect-file-versions)
        (dired-trample-file-versions): Likewise.
        * dired.el: Moved from here.
 
        * compile.el (compile-goto-error): Doc fix.
 
-       * etags.el (find-tag): Fixed prompt.
+       * etags.el (find-tag): Fix prompt.
        (tag-exact-match-p): Rewritten (again).
 
        * startup.el (command-line): Load site-start here.
 
        * completion.el: Moved to external-lisp.
 
-       * diff.el (diff-rcs, diff-sccs): Deleted.
+       * diff.el (diff-rcs, diff-sccs): Delete.
 
 1992-07-27  Eric S. Raymond  (eric@mole.gnu.ai.mit.edu)
 
 1992-07-26  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
        * diff.el (diff-backup): New function.
-       (diff-last-backup-file): Renamed from dired-last-backup-file.
+       (diff-last-backup-file): Rename from dired-last-backup-file.
        * dired-aux.el (dired-backup-diff): Use diff-backup.
-       (dired-last-backup-file): Moved and renamed.
+       (dired-last-backup-file): Move and renamed.
        * dired.el, dired-aux.el (dired-diff, dired-backup-diff): Doc fixes.
 
        * help.el (command-apropos): Fix call to apropos for new arg.
        * replace.el (perform-replace): Fix typo: match-after => match-again.
        (map-query-replace-regexp): Delete duplicate definition.
 
-       * subr.el (defun-inline): Commented out.
+       * subr.el (defun-inline): Comment out.
 
-       * comint.el (comint-input-ring*): Renamed from input-ring*.
+       * comint.el (comint-input-ring*): Rename from input-ring*.
        (ring-remove, ring-rotate): Use setcar, not set-car.
        * co-isearch.el: input-ring* renamed to comint-input-ring*.
 
 1992-07-22  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
        * emerge.el (emerge-startup-hook, emerge-quit-hook):
-       Renamed from ...-hooks.
+       Rename from ...-hooks.
 
        * dired.el (dired-display-file): New command, on C-o.
 
        * c-mode.el (c-backslash-region): New command.
        (c-append-backslash, c-delete-backslash): New functions.
        * c++-mode.el (c++-macroize-region, backslashify-current-line):
-       Deleted.
-       (c++-comment-region, c++-uncomment-region): Deleted.
+       Delete.
+       (c++-comment-region, c++-uncomment-region): Delete.
        comment-region works just fine.
-       (c++-beginning-of-defun, c++-end-defun, c++-indent-defun): Deleted.
-       (c++-point-bol): Renamed from point-bol.
-       (c++-within-string-p): Renamed from within-string-p.
-       (c++-count-char-in-string): Renamed from count-char-in-string.
-       (fill-c++-comment): Renamed from fill-C-comment.
-       (c++-insert-header): Deleted.
+       (c++-beginning-of-defun, c++-end-defun, c++-indent-defun): Delete.
+       (c++-point-bol): Rename from point-bol.
+       (c++-within-string-p): Rename from within-string-p.
+       (c++-count-char-in-string): Rename from count-char-in-string.
+       (fill-c++-comment): Rename from fill-C-comment.
+       (c++-insert-header): Delete.
 
 1992-07-21  Jim Blandy  (jimb@wookumz.gnu.ai.mit.edu)
 
 
        * simple.el (end-of-buffer): If buffer end is on screen, don't scroll.
 
-       * c-mode.el (set-c-style): Deleted the first version of this function.
+       * c-mode.el (set-c-style): Delete the first version of this function.
        It was badly written.
        Modified the remaining version by adding new argument GLOBAL
        and setting the parameters locally if GLOBAL is nil.
 
 1992-07-21  Jim Blandy  (jimb@wookumz.gnu.ai.mit.edu)
 
-       * frame.el (get-frame): Renamed to get-other-frame; get-frame
+       * frame.el (get-frame): Rename to get-other-frame; get-frame
        sounds like a parallel to get-buffer or get-process.
 
        * c-mode.el (set-c-style): Remove the extraneous copy of this
        * c++-mode.el (within-string-p): Use `%', not `mod', as the name
        of the modulus function.
 
-       * frame.el (frame-height, frame-width): Fixed several confusions
+       * frame.el (frame-height, frame-width): Fix several confusions
        here.
 
        * blackbox.el: When building blackbox-mode-map, locally rebind all
        (visit-tags-file): If find-file-noselect changed the file name,
        propagate the change to tags-file-name and tags-table-list.
 
-       * startup.el (command-line): Fixed typo in comment.
+       * startup.el (command-line): Fix typo in comment.
 
 1992-07-20  Jim Blandy  (jimb@wookumz.gnu.ai.mit.edu)
 
        (frame-configuration-to-register): New function.
        * loaddefs.el: Put them on C-x r w, C-x r f.
        * window.el (window-config-to-register, register-to-window-config):
-       Deleted, along with keybindings C-x 6 and C-x 7.
+       Delete, along with keybindings C-x 6 and C-x 7.
 
 1992-07-19  Edward M. Reingold  (reingold@emr.cs.uiuc.edu)
 
        (calendar-mode-map): Put it on a key.
        (calendar-mode): Describe it.
 
-       * cal-french.el (diary-french-date): Moved from diary.el and fixed
+       * cal-french.el (diary-french-date): Move from diary.el and fixed
        accent.
        * diary.el: Move dairy-french-date to cal-french.el and autoload it.
 
 
        * files.el (auto-mode-alist): Recognize .texi.
 
-       * rmail.el (rmail-delete-forward): Removed the feature
+       * rmail.el (rmail-delete-forward): Remove the feature
        of moving back if there's nowhere to go forward.
 
 1992-07-17  Jim Blandy  (jimb@wookumz.gnu.ai.mit.edu)
        form so that it returns a list containing the filename and the
        prefix argument, not just the prefix argument by itself.
 
-       * bytecomp.el (byte-compile-file): Changed reference to
+       * bytecomp.el (byte-compile-file): Change reference to
        byte-compile-report-call-tree to use display-call-tree.
 
        * bytecomp.el (byte-recompile-directory, byte-compile-file)
        (batch-byte-compile, byte-compile, compile-defun)
-       (display-call-tree): Added autoload cookies for these functions.
+       (display-call-tree): Add autoload cookies for these functions.
 
 1992-07-16  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
 
 
 1992-07-16  Jim Blandy  (jimb@wookumz.gnu.ai.mit.edu)
 
-       * byte-run.el (defsubst): Removed extra closing paren at the end
+       * byte-run.el (defsubst): Remove extra closing paren at the end
        of this function.
 
 1992-07-16  Eric S. Raymond  (eric@mole.gnu.ai.mit.edu)
        * bytecomp.el: Deleted support for running compiler in Emacs 18.
        Spell "Emacs 18" properly.
        (byte-compile-version): FSF 2.1.
-       (byte-compiler-valid-options): Deleted.
+       (byte-compiler-valid-options): Delete.
        (byte-compile-single-version): Always return nil.
        (byte-compiler-version-cond): Always return the argument.
 
        * buff-menu.el, bg-mouse.el, appt.el, abbrevlist.el, term/x-win.el,
        * term/wyse50.el, term/vt200.el, term/vt100.el: All uses changed.
        * screen.el (screen-height, screen-width, set-screen-height)
-       (set-screen-width): Defined as aliases for frame-height,
+       (set-screen-width): Define as aliases for frame-height,
        frame-width, set-frame-height, and set-frame-width.
        (set-frame-height, set-frame-width): Functions deleted; they are
        defined in frame.c.
        * rmailsort.el: Change copyright to FSF; update permission notice.
 
        * byte-run.el: Delete compatibility definition of make-byte-code.
-       (byte-compiler-options): Commented out.
-       (proclaim-inline, proclaim-notinline): Commented out.
+       (byte-compiler-options): Comment out.
+       (proclaim-inline, proclaim-notinline): Comment out.
 
        * byte-opt.el: Change several doc strings to comments.
        They had the wrong format anyway.
        * disass.el: Require just bytecomp, not byte-opt.
 
        * bytecomp.el (emacs-lisp-file-regexp):
-       Renamed from elisp-source-file-re.  All uses changed.
+       Rename from elisp-source-file-re.  All uses changed.
        (byte-compile-dest-file): Don't use that var.
-       (compile-defun): Renamed from elisp-compile-defun.
+       (compile-defun): Rename from elisp-compile-defun.
        (byte-compile-report-ops): Define unconditionally.
        It's a bad idea to make function definitions of moderate size
        conditional on anything.
-       (byte-compile-and-load-file): Commented out.
+       (byte-compile-and-load-file): Comment out.
        (byte-compiler-valid-options):
-       Renamed from byte-compiler-legal-options.
+       Rename from byte-compiler-legal-options.
        (byte-compile-overwrite-file): Variable deleted.
        (byte-compile-file): Don't use that var.
        (byte-compile-compatibility):
-       Renamed from byte-compile-emacs18-compatibility.
+       Rename from byte-compile-emacs18-compatibility.
        (byte-compile-generate-emacs19-bytecodes): Variable deleted.
        Use byte-compile-compatibility instead.
-       (byte-compiler-options-handler): Deleted.
+       (byte-compiler-options-handler): Delete.
        (byte-compile-body-do-effect, byte-compile-form-do-effect):
        Use defsubst, not proclaim-inline.
 
        * disass.el: New version of the disassembler, to fit with the new
        compiler.
 
-       * mouse.el (mouse-select-buffer-line): Removed extraneous setting
+       * mouse.el (mouse-select-buffer-line): Remove extraneous setting
        of the variable `the-buffer'; it's never used elsewhere.
 
        * mouse.el (mouse-kill): Don't set the mark; pass point and the
 
 1992-07-09  Jim Blandy  (jimb@wookumz.gnu.ai.mit.edu)
 
-       * abbrev.el (write-abbrev-file): Removed extraneous interactive spec.
+       * abbrev.el (write-abbrev-file): Remove extraneous interactive spec.
 
        * screen.el (current-screen-configuration,
        set-screen-configuration): New functions.
        instead of `deiconify-screen'; the latter no longer exists.
 
        * files.el (find-backup-file-name): Replace the reference to
-       `backup-extract-version' with a literal `function' form.  This
-       eliminates the use of dynamic binding, and allows us to remove
+       `backup-extract-version' with a literal `function' form.
+       This eliminates the use of dynamic binding, and allows us to remove
        backup-extract-version, which doesn't really want to be its own
        function.
        (backup-extract-version): Function removed.
 
        * tex-mode.el: Require comint instead of oshell.
        (tex-start-shell): Use comint, not oshell.
-       (tex-filter): Deleted function; no filter is now longer needed.
+       (tex-filter): Delete function; no filter is now longer needed.
 
        * tex-mode.el (tex-run-command, latex-run-command, slitex-run-command)
        (tex-bibtex-run-command, tex-dvi-print-command)
 1992-06-28  Jim Blandy  (jimb@pogo.cs.oberlin.edu)
 
        * completion.el (completion-separator-self-insert-autofilling):
-       Changed references to `auto-fill-hook' to `auto-fill-function'.
+       Change references to `auto-fill-hook' to `auto-fill-function'.
        * mh-e.el (mh-letter-mode): Same thing.
        * texinfo-upd.el (texinfo-update-node,
        texinfo-sequential-node-update): Same thing.
        calendar-daylight-savings-starts, calendar-daylight-savings-ends.
        Add autoload of calendar-sunrise-sunset.
        (calendar-mode): Add description of sunrise/sunset capability.
-       (calendar-version): Changed to 5.
+       (calendar-version): Change to 5.
 
        * diary.el: Autoload diary-sunrise-sunset and diary-sabbath-candles.
 
        (all-christian-calendar-holidays, all-islamic-calendar-holidays)
        (list-diary-entries-hook, diary-display-hook)
        (nongregorian-diary-listing-hook, nongregorian-diary-marking-hook)
-       (diary-list-include-blanks): Added autoload cookie for these;
+       (diary-list-include-blanks): Add autoload cookie for these;
        Reingold's distribution suggests that these variables are ones
        that you are especially likely to want to customize.
-       * holiday.el (holidays): Added autoload cookie for this.
+       * holiday.el (holidays): Add autoload cookie for this.
 
 1992-06-25  Edward M. Reingold  (reingold@emr.cs.uiuc.edu)
 
        * dired.el: Complete rewrite, mostly by sk@thp.uni-koeln.de.
        * dired-aux.el: Other parts of dired.
 
-       * files.el (enable-local-eval): Renamed from `ignore-local-eval';
+       * files.el (enable-local-eval): Rename from `ignore-local-eval';
        now has values like `enable-local-variables'.
        (hack-local-variables): Test `enable-local-eval' properly.
 
 
 1992-06-21  Jim Blandy  (jimb@pogo.cs.oberlin.edu)
 
-       * screen.el (ctl-x-5-map): Removed declaration and initialization
+       * screen.el (ctl-x-5-map): Remove declaration and initialization
        of this here; it's done in subr.el, alongside ctl-x-4-map.
 
        * autoload.el (generate-file-autoloads): If FILE is in the same
 
 1992-06-18  Jim Blandy  (jimb@pogo.cs.oberlin.edu)
 
-       * edebug.el (edebug-debug): Added autoload cookie for this.
+       * edebug.el (edebug-debug): Add autoload cookie for this.
 
        * etags.el (find-tag-other-frame): New function.  Bind it to
        `C-x 5 .'.
        now the keymap `isearch-mode-map' controls special characters in
        isearch-mode.
 
-       * blackbox.el (blackbox): Added ;;;###autoload cookie.
+       * blackbox.el (blackbox): Add ;;;###autoload cookie.
 
        * add-log.el (change-log-mode): Integrated some code from the
        `change-log-mode' function in `text-mode.el'.  Docstring now
 
 1992-06-12  Joseph Arceneaux  (jla@churchy.gnu.ai.mit.edu)
 
-       * simple.el (current-kill): Fixed misnamed parameter and
+       * simple.el (current-kill): Fix misnamed parameter and
        reorganized code slightly.
 
 1992-06-11  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
 1992-06-08  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
-       * csharp.el (c-find-nesting): Renamed from csharp-find-nesting.
+       * csharp.el (c-find-nesting): Rename from csharp-find-nesting.
        Add autoload.
        All other functions in this file renamed to start with c-find-nesting.
 
 1992-06-02  Roland McGrath  (roland@geech.gnu.ai.mit.edu)
 
        * add-log.el: Fixed copyright years to not use a range.
-       (change-log-mode): Added docstring.
+       (change-log-mode): Add docstring.
        (add-change-log-entry): Put a space between the file name and
        "(function name):".  Put a colon after the file name if we have
        found no function name.
        * fill.el (fill-region-as-paragraph): Treat } like closeparen.
        If a fill prefix is specified globally, always use that one.
 
-       * flow-ctrl.el (evade-flow-control-memstr=): Renamed from memstr=.
+       * flow-ctrl.el (evade-flow-control-memstr=): Rename from memstr=.
 
 1992-05-31  Eric S. Raymond  (eric@mole.gnu.ai.mit.edu)
 
 
 1992-05-31  Noah Friedman  (friedman@splode.com)
 
-       * subr.el (lambda): Added docstring.
+       * subr.el (lambda): Add docstring.
 
 1992-05-31  Eric S. Raymond  (eric@mole.gnu.ai.mit.edu)
 
        of writing out its code.
 
        * comint.el: Merged with Olin Shivers' comint version 2.03.
-       (comint-version): Changed accordingly.
+       (comint-version): Change accordingly.
        (comint-previous-input-matching): Bind this to c-m-r, rather
        than c-c c-r.
        (comint-exec-hook): Make this variable buffer-local.
        to "Non-echoed text: ".  This conforms with the convention
        used by existing prompts, and gives more room to type stuff.
 
-       * comint.el (comint-last-input-start): New variable.  In
-       particular, this helps support subprocesses that insist on echoing
+       * comint.el (comint-last-input-start): New variable.
+       In particular, this helps support subprocesses that insist on echoing
        their input.  Added comments to porting guide indicating that
        this should probably not be used for implementing history stuff.
        (comint-mode): Create and initialize comint-last-input-start as a
 1992-05-24  Edward M. Reingold  (reingold@emr.cs.uiuc.edu)
 
        * calendar.el (list-yahrzeit-dates): New function.
-       (hebrew-calendar-yahrzeit): Moved from diary.el.
+       (hebrew-calendar-yahrzeit): Move from diary.el.
 
-       * diary.el (hebrew-calendar-yahrzeit): Moved to calendar.el.
+       * diary.el (hebrew-calendar-yahrzeit): Move to calendar.el.
        (diary-ordinal-suffix): Give correct suffix for 111, 112, 113, 211,
        212, 213, etc.
 
        below instead of manipulating the kill ring directly, since the
        functions correctly deal with interprogram cutting and pasting.
        (kill-new): New function.
-       (kill-append): Added doc string.  Be sure to call the
+       (kill-append): Add doc string.  Be sure to call the
        interprogram-cut-function on the new string.
        (current-kill): New function.
        (rotate-yank-pointer): New optional argument do-not-move, to
        how many characters were saved, and it's hard to interpret
        intuitively.
 
-       * screen.el (ctl-x-3-map): Renamed to ctl-x-5-map, and now bound
+       * screen.el (ctl-x-3-map): Rename to ctl-x-5-map, and now bound
        to C-x 5, not C-x 3.  This makes a nicer analogy with C-x 4.
        Moving split-window-horizontally to C-x 3 also makes a nicer
        analogy with C-x 2.
 
 1992-04-21  Jim Blandy  (jimb@pogo.cs.oberlin.edu)
 
-       * doctor.el (doctor-svo): Deleted second expression from top let
+       * doctor.el (doctor-svo): Delete second expression from top let
        binding; it used to read "(let ((foo <exp> sent)) ...)"; let
        bindings can only have one expression.
 
        * compile.el (compilation-mode-hook): New variable.
        (compilation-mode): Run it.
        (compilation-search-path): Made user variable, added autoload cookie.
-       (compilation-window-height): Added autoload cookie.
+       (compilation-window-height): Add autoload cookie.
 
 1992-02-27  Jim Blandy  (jimb@pogo.cs.oberlin.edu)
 
 
 1992-01-08  Jim Blandy  (jimb@occs.cs.oberlin.edu)
 
-       * simple.el (temporary-goal-column): Added missing closing paren.
+       * simple.el (temporary-goal-column): Add missing closing paren.
 
 1991-12-25  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
 
 1991-12-14  Eric S. Raymond  (eric@mole.gnu.ai.mit.edu)
 
-       * etags.el (find-tag-noselect): Fixed subtle bug due to
+       * etags.el (find-tag-noselect): Fix subtle bug due to
        save-excursion.
 
        (tags-tag-match): New function, made smarter about exact matches.
 1991-12-08  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
        * diff.el (diff-internal-diff): New subroutine.
-       (diff): Removed from here.
+       (diff): Remove from here.
        (diff-sccs, diff-rcs): New commands using diff-internal-diff.
        (diff-rcs-extension): New variable.
 
 1991-11-06  Jim Blandy  (jimb@pogo.gnu.ai.mit.edu)
 
        * screen.el (screen-initialize, screen-notice-user-settings):
-       Renamed global-minibuffer-screen to default-minibuffer-screen.
+       Rename global-minibuffer-screen to default-minibuffer-screen.
 
 1991-11-05  Edward M. Reingold  (reingold@emr.cs.uiuc.edu)
 
 
 1991-10-31  Richard Mlynarik  (mly@peduncle)
 
-       * ebuff-menu.el (electric-buffer-menu-mode-map): Define
-       < and > to scroll-left and scroll-right per user suggestion.
+       * ebuff-menu.el (electric-buffer-menu-mode-map):
+       Define < and > to scroll-left and scroll-right per user suggestion.
 
 1991-10-31  Jim Blandy  (jimb@pogo.gnu.ai.mit.edu)
 
 
        * cmushell.el: This is now the real shell.el.  Removed the "cmu"
        prefix from names.
-       (shell): Marked this to be autoloaded.
+       (shell): Mark this to be autoloaded.
 
 1991-10-29  Jim Blandy  (jimb@pogo.gnu.ai.mit.edu)
 
 1991-10-26  Jim Blandy  (jimb@pogo.gnu.ai.mit.edu)
 
        * disass.el (disassemble): Correctly distinguish functions with no
-       interactive spec and functions that are (interactive).  Correctly
-       extract components of explicit calls to byte-code (old-style
+       interactive spec and functions that are (interactive).
+       Correctly extract components of explicit calls to byte-code (old-style
        compiled functions).  Correctly pass byte code of function to
        disassemble-1.
        (disassemble-1): Use nth to extract components of explicit call to
 
 1991-10-15  Jim Blandy  (jimb@pogo.gnu.ai.mit.edu)
 
-       * info.el (Info-follow-nearest-node): Adjusted for new return
+       * info.el (Info-follow-nearest-node): Adjust for new return
        value format from coordinates-in-window-p.
 
 1991-10-08  Roland McGrath  (roland@albert.gnu.ai.mit.edu)
 
        * add-log.el (change-log-name): New fn.
-       (add-change-log-entry, add-change-log-entry-other-window): All
-       args optional.  FILE-NAME defaults to new var
+       (add-change-log-entry, add-change-log-entry-other-window):
+       All args optional.  FILE-NAME defaults to new var
        `change-log-default-name'.  Give this var a local value in the
        buffer we were run from, pointing to the file we found.
 
 
 1991-09-26  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
 
-       * map-ynp.el (map-y-or-n-p): Fixed for lists containing nil.
+       * map-ynp.el (map-y-or-n-p): Fix for lists containing nil.
 
 1991-09-10  Roland McGrath  (roland@wookumz.gnu.ai.mit.edu)
 
        * rmail.el (rmail-convert-to-babyl-format): Roland added the
        missing paren in the wrong place; fixed.
 
-       * screen.el (screen-initialize): Added missing `function' around
+       * screen.el (screen-initialize): Add missing `function' around
        lambda expression.
 
 1991-08-20  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
 1991-08-17  Roland McGrath  (roland@geech.gnu.ai.mit.edu)
 
        * doctor.el (doctor-strangelove): New fn.
-       (doctor-member): Removed.
+       (doctor-member): Remove.
        (doctor-doc): Use member instead of doctor-member.
        (doctor-rms): Restored.
 
 
 1991-08-15  Jim Blandy  (jimb@pogo.gnu.ai.mit.edu)
 
-       * screen.el (screen-create-initial-screen): Renamed to
+       * screen.el (screen-create-initial-screen): Rename to
        screen-initialize.  Arrange to cause errors if people try to
        create screens when no window system is running.
 
        * loaddefs.el (ctl-x-4-map): Move definition from here...
        * subr.el (ctl-x-4-map): To here.
        (ctl-x-3-map): New prefix.
-       (mouse-map): Deleted.
+       (mouse-map): Delete.
 
        * screen.el (new-screen-x-delta, new-screen-y-delta)
-       (new-screen-position): Removed.
-       (new-screen): Simplified.
-       (split-to-other-screen): Removed.
+       (new-screen-position): Remove.
+       (new-screen): Simplify.
+       (split-to-other-screen): Remove.
        (switch-to-buffer-other-screen, find-file-other-screen)
-       (find-file-read-only-other-screen, mail-other-screen): Moved, along
+       (find-file-read-only-other-screen, mail-other-screen): Move, along
        with their keybindings, to...
        * files.el (switch-to-buffer-other-screen, find-file-other-screen)
        (find-file-read-only-other-screen): Here...
 
        * screen.el, term/x-win.el: Renamed screen-default-alist to
        default-screen-alist.
-       (default-screen-alist): Moved declaration to screen.c; the
+       (default-screen-alist): Move declaration to screen.c; the
        screen creation subrs should consult this transparently.
 
-       * term/x-win.el (x-get-resources, x-pop-initial-window): Functions
-       deleted.  Don't call them at the bottom of the file anymore.
+       * term/x-win.el (x-get-resources, x-pop-initial-window):
+       Functions deleted.  Don't call them at the bottom of the file anymore.
 
 1991-08-12  Roland McGrath  (roland@geech.gnu.ai.mit.edu)
 
 1991-08-12  Jim Blandy  (jimb@pogo.gnu.ai.mit.edu)
 
        * window.el (split-window-keep-point): New user option.
-       (split-window-vertically): Modified to support it.
+       (split-window-vertically): Modify to support it.
        * startup.el (command-line): Choose a default value for
        split-window-keep-point according to the baud rate.
        * term/x-win.el: Set split-window-keep-point.
 
 1991-08-10  Jim Blandy  (jimb@pogo.gnu.ai.mit.edu)
 
-       * term/x-win.el (x-daemon-mode, x-establish-daemon-mode): Removed
-       these functions; we do this differently now.
+       * term/x-win.el (x-daemon-mode, x-establish-daemon-mode):
+       Remove these functions; we do this differently now.
 
 1991-08-07  Roland McGrath  (roland@geech.gnu.ai.mit.edu)
 
 
 1991-08-05  Jim Blandy  (jimb@pogo.gnu.ai.mit.edu)
 
-       * screen.el (screen-creation-func): Renamed to
+       * screen.el (screen-creation-func): Rename to
        screen-creation-function, as per the convention.
 
        * screen.el (screen-creation-func): Do not initialize this
        * startup.el (pre-init-hook): New variable.
        (window-setup-hook): Doc fix.
        (command-line): Call pre-init-hook.
-       (command-line-1): Updated copyright date.
+       (command-line-1): Update copyright date.
 
 1991-07-31  Jim Blandy  (jimb@pogo.gnu.ai.mit.edu)
 
 
 1991-07-31  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
 
-       * screen.el (auto-new-screen-function): Renamed to
+       * screen.el (auto-new-screen-function): Rename to
        pop-up-screen-function.
        (buffer-in-other-screen): Use pop-up-screens, not auto-new-screen.
 
 
        * view.el: (define-key "C-xv" 'view-file).
        (view-file-other-window, view-buffer-other-window): New functions.
-       (view-prev-buffer): Renamed to view-return-here.
+       (view-prev-buffer): Rename to view-return-here.
        (view-exit): If view-return-here is a buffer, switch to it;
        if it is a window configuration, apply it.
 
-       * subr.el (search-forward-regexp, search-backward-regexp): Added
-       alternate names.
+       * subr.el (search-forward-regexp, search-backward-regexp):
+       Add alternate names.
 
 1991-07-24  Jim Blandy  (jimb@pogo.gnu.ai.mit.edu)
 
        * isearch.el (isearch): If the user switches to a different
        screen, exit the isearch.
 
-       * isearch.el (isearch): Changed reference to `cmds' to use
+       * isearch.el (isearch): Change reference to `cmds' to use
        variable's new name `history'.
 
 1991-07-23  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
        * rmail.el (rmail-first-unseen-message): Make loop looking for
        unseen msgs not skip the first one.
 
-       * rmail.el (rmail-widen-to-current-msgbeg): Added missing close paren.
+       * rmail.el (rmail-widen-to-current-msgbeg): Add missing close paren.
 
 1991-07-21  Jim Blandy  (jimb@pogo.gnu.ai.mit.edu)
 
 
 1991-07-19  Roland McGrath  (roland@albert.gnu.ai.mit.edu)
 
-       * files.el (save-some-buffers): Added save-excursions around code
+       * files.el (save-some-buffers): Add save-excursions around code
        that does set-buffer.
 
 1991-07-15  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
        (find-tag-tag): Pass 'tags-completion-alist as TABLE to
        completing-read, so the table is built on demand.
 
-       * sendmail.el (mail-do-fcc): Added missing close paren.
+       * sendmail.el (mail-do-fcc): Add missing close paren.
 
 1991-07-15  Jim Blandy  (jimb@pogo.gnu.ai.mit.edu)
 
        * fortran.el version 1.28.3
        Now works in either mode when `tab-width' is not 8.
 
-       (fortran-electric-line-number, fortran-indent-to-column): Use
-       `fortran-minimum-statement-indent' instead of 8.
+       (fortran-electric-line-number, fortran-indent-to-column):
+       Use `fortran-minimum-statement-indent' instead of 8.
 
        (fortran-current-line-indentation): Now skips over line number
        and whitespace correctly when tab-width is not 8.
 
        * startup.el (command-line): Remove the arguments from
        command-line-args as we process them.
-       (command-line-1): Removed code to ignore the arguments processed
+       (command-line-1): Remove code to ignore the arguments processed
        in command-line, because they're all deleted now.
 
        * replace.el (occur): Set tem to the location of the match before
 
 1991-07-09  Roland McGrath  (roland@albert.gnu.ai.mit.edu)
 
-       * map-ynp.el (map-y-or-n-p): Fixed lossage on ? or random char.
+       * map-ynp.el (map-y-or-n-p): Fix lossage on ? or random char.
 
 1991-07-08  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
        * fortran.el: Added ;;;###autoload definition for
        fortran-tab-mode-default variable.
 
-       * fortran.el (fortran-numerical-continuation-char): Replace
-       (backward-line 1) with (forward-line -1) since backward-line is
+       * fortran.el (fortran-numerical-continuation-char):
+       Replace (backward-line 1) with (forward-line -1) since backward-line is
        defined only in edt.
        (fortran-previous-statement): Fix error in parens.
        (fortran-indent-to-column): Likewise.
 
        * files.el (save-some-buffers): Use map-y-or-n-p return value.
 
-       * map-ynp.el (map-y-or-n-p): Fixed bug that caused first elt on !
+       * map-ynp.el (map-y-or-n-p): Fix bug that caused first elt on !
        hit not get acted on.
 
 1991-07-04  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
 1991-07-01  Roland McGrath  (roland@churchy.gnu.ai.mit.edu)
 
-       * map-ynp.el (map-y-or-n-p): Fixed misplaced paren.
+       * map-ynp.el (map-y-or-n-p): Fix misplaced paren.
        Fixed list-eating bug.
 
 1991-07-01  Richard Stallman  (rms@mole.gnu.ai.mit.edu)
 
 1991-06-20  Jim Blandy  (jimb@wookumz.gnu.ai.mit.edu)
 
-       * subr.el (ignore): Added docstring for this; it appears as a key
+       * subr.el (ignore): Add docstring for this; it appears as a key
        binding, so it ought to be described.
 
 1991-06-19  Roland McGrath  (roland@albert.gnu.ai.mit.edu)
 
 1991-06-12  Roland McGrath  (roland@albert.gnu.ai.mit.edu)
 
-       * upd-copyr.el (update-copyright): Fixed typo in help text.
+       * upd-copyr.el (update-copyright): Fix typo in help text.
 
 1991-05-26  Roland McGrath  (roland@albert.gnu.ai.mit.edu)
 
-       * disass.el (disassemble-internal): Fixed typo string? -> stringp.
+       * disass.el (disassemble-internal): Fix typo string? -> stringp.
 
 1991-05-26  Edward M. Reingold  (reingold@emr.cs.uiuc.edu)
 
-       * holiday.el (calendar-holiday-function-passover-etc): Correct
-       date and spelling of Yom HaAtzma'ut.
+       * holiday.el (calendar-holiday-function-passover-etc):
+       Correct date and spelling of Yom HaAtzma'ut.
 
 1991-05-23  Jim Blandy  (jimb@pogo.gnu.ai.mit.edu)
 
        screen-default-alist alone; don't use x-switches-specified.
        (x-read-resources): New function to read the X defaults and put
        them in screen-default-alist.  Call this function at the bottom.
-       * screen.el (death-function): Removed, because this is now handled
+       * screen.el (death-function): Remove, because this is now handled
        better in startup.el.
        (pop-initial-screen): Don't do a condition-case to call
        death-function.
 
 1991-05-18  Jim Blandy  (jimb@pogo.gnu.ai.mit.edu)
 
-       * macros.el (apply-macro-to-region-lines): Added a save-excursion
+       * macros.el (apply-macro-to-region-lines): Add a save-excursion
        around the macro invocation, so that the macro doesn't need to
        stay on the same line.
 
 
        * find-dired.el (find-dired-filter): Don't search; use
        forward-line instead.
-       (find-dired-filter, find-dired-sentinel): Changed docstrings to
+       (find-dired-filter, find-dired-sentinel): Change docstrings to
        comments.
 
 1991-05-11  Roland McGrath  (roland@albert.gnu.ai.mit.edu)
        Now supports tab or fixed format style of continuation control and
        indentation.  In tab style, lines start with a tab, or a line
        number followed by a tab.  If the first character after the tab is
-       a digit from 1 to 9, the line is a continuation line.  When
-       entering fortran mode for a file, the first line that begins with
+       a digit from 1 to 9, the line is a continuation line.
+       When entering fortran mode for a file, the first line that begins with
        6 spaces or a tab is found.  The buffer is then set respectively
        to either fixed format or tab format style.  The mode may be
        toggled with the command fortran-tab-mode.
 
 1991-02-25  Paul Hilfinger  (hilfingr@hilfinger.cs.nyu.edu)
 
-       * fill.el (fill-individual-paragraphs): Changed response to mailp
+       * fill.el (fill-individual-paragraphs): Change response to mailp
        to effect only leading lines in a region (was getting confused
        about colons embedded in ordinary text).  Changed method of
        moving to next paragraph in the main loop to use forward-paragraph
 
 1991-02-23  Roland McGrath  (mcgrath@cygint.cygnus.com)
 
-       * compile.el (next-error): Fixed bug in rms's optimization.
+       * compile.el (next-error): Fix bug in rms's optimization.
 
 1991-02-23  Richard Stallman  (rms@mole.ai.mit.edu)
 
 
 1991-02-04  Jim Blandy  (jimb@gnu.ai.mit.edu)
 
-       * simple.el (eval-current-buffer): Removed, since it has been
+       * simple.el (eval-current-buffer): Remove, since it has been
        reintroduced to the C code.
 
 1991-02-02  Jim Blandy  (jimb@gnu.ai.mit.edu)
        * bibtex.el: Expanded the various bibtex-field-* patterns to
        allow fields like 'title = poft # "Fifth Triquaterly" # random-conf,'.
        Needs to have more work done to accept all cases.  Added code for
-       the bibtex 'crossref' command, which subsumes other options.  Made
-       field ordering different when this option on.  Also allow user to
+       the bibtex 'crossref' command, which subsumes other options.
+       Made field ordering different when this option on.  Also allow user to
        have a list of field to be added to all entries
        (bibtex-mode-user-optional-fields).  Merged in Bengt Martensson's
        changes.
 
 1991-01-08  Roland McGrath  (roland@albert.ai.mit.edu)
 
-       * compile.el (compilation-parse-errors): Fixed maintenance of
+       * compile.el (compilation-parse-errors): Fix maintenance of
        last-linenum, so dups are really found.
 
 1991-01-08  Jim Blandy  (jimb@pogo.ai.mit.edu)
 
-       * bytecomp.el (byte-compile-byte-code-maker): Since
-       byte-compile-lambda is free to return the original lambda
+       * bytecomp.el (byte-compile-byte-code-maker):
+       Since byte-compile-lambda is free to return the original lambda
        expression, we'd better be prepared to handle things that aren't
        bytecode objects.
 
 
 1990-12-20  Chris Hanson  (cph@kleph)
 
-       * texnfo-upd.el (texinfo-update-menu-region-beginning): Change
-       code that searches for "top" node so it returns the position of
+       * texnfo-upd.el (texinfo-update-menu-region-beginning):
+       Change code that searches for "top" node so it returns the position of
        the beginning of the node line.  Always search from the buffer's
        start when looking for that node.
        (texinfo-make-one-menu): Bump forward over the outer node line.
 
 1990-12-12  Roland McGrath  (roland@albert.ai.mit.edu)
 
-       * compile.el (compilation-error-buffer): Removed.
+       * compile.el (compilation-error-buffer): Remove.
        (compilation-last-buffer): Now last buffer in which any of: started
        compilation; C-x `; C-c C-c; was done.
        (compile-internal): Don't set compilation-error-buffer.
        error-message, and regexp-alist.
        (compile-internal): Do it here, after calling compilation-mode.
 
-       * compile.el (compilation-error-list): Changed elt format.
+       * compile.el (compilation-error-list): Change elt format.
        (compilation-parse-errors): Don't find files when parsing.
        Instead record ((DIR . FILE) . LINENO) structures to describe each
        error.
 
 1990-11-30  Mike Newton  (newton@gumby.cs.caltech.edu)
 
-       * bibtex.el (start comments): Added earlier comments of Bengt
+       * bibtex.el (start comments): Add earlier comments of Bengt
        Martensson.  Some of the changes listed below are originally
        his (including clean-entry, OPTkey and OPTannote, the function
        renaming and the preamble code).
 
-       * bibtex.el (bibtex-field-* patterns): Expanded to allow fields
+       * bibtex.el (bibtex-field-* patterns): Expand to allow fields
        like 'title = poft # "Fifth Triquaterly" # random-conf,'.
        Needs to have more work done to accept all cases.
 
-       * bibtex.el (bibtex-clean-entry-zap-empty-opts): Added.
+       * bibtex.el (bibtex-clean-entry-zap-empty-opts): Add.
 
-       * bibtex.el (bibtex-include-OPTcrossref): Added.  If set, changes
+       * bibtex.el (bibtex-include-OPTcrossref): Add.  If set, changes
        order of the lists presented to luser.
 
-       * bibtex.el (bibtex-include-OPTkey & bibtex-include-OPTannote): Added.
+       * bibtex.el (bibtex-include-OPTkey & bibtex-include-OPTannote): Add.
 
        * bibtex.el (bibtex-mode-user-optional-fields): Can be set to a list
        of field the user wants to add to entries.
 
-       * bibtex.el (bibtex-mode documentation string): Updated for new changes,
+       * bibtex.el (bibtex-mode documentation string): Update for new changes,
        DEAthesis added back in, bibtex-preamble call added.
 
        * bibtex.el (bibtex-entry): Add OPTkey/annote.  If OPTcrossref set
        then put it in.
 
-       * bibtex.el (bibtex-make-entry): Renamed bibtex-make-field.
+       * bibtex.el (bibtex-make-entry): Rename bibtex-make-field.
 
-       * bibtex.el (bibtex-make-optional-entry): Renamed
-       bibtex-make-optional-field.
+       * bibtex.el (bibtex-make-optional-entry):
+       Rename bibtex-make-optional-field.
 
        * bibtex.el (bibtex-Article): Change order of presentation
        if OPTcrossref is set.
        * bibtex.el (bibtex-InProceedings): Change order of presentation
        if OPTcrossref is set.
 
-       * bibtex.el (bibtex-MastersThesis): Added "note".
+       * bibtex.el (bibtex-MastersThesis): Add "note".
 
-       * bibtex.el (bibtex-preamble): Added.
+       * bibtex.el (bibtex-preamble): Add.
 
        * bibtex.el (bibtex-inside-field): Only go backwards if quote is there.
 
-       * bibtex.el (bibtex-clean-entry): Added call to
+       * bibtex.el (bibtex-clean-entry): Add call to
        bibtex-clean-entry-zap-empty-opts, OPT field testing for errors.
 
-       * bibtex.el (bibtex-x-help): Added options Conference and preamble,
+       * bibtex.el (bibtex-x-help): Add options Conference and preamble,
        restored DEAthesis.
 
 1990-11-30  Richard Stallman  (rms@mole.ai.mit.edu)
        (insert-hebrew-diary-entry, insert-monthly-hebrew-diary-entry)
        (insert-yearly-hebrew-diary-entry, insert-islamic-diary-entry)
        (insert-monthly-islamic-diary-entry)
-       (insert-yearly-islamic-diary-entry): Modified so that if a prefix arg
+       (insert-yearly-islamic-diary-entry): Modify so that if a prefix arg
        is supplied these make nonmarking diary entries; otherwise the entries
        made are marking.
        (insert-block-diary-entry, insert-anniversary-diary-entry)
 1990-11-06  Ed Reingold  (reingold@emr.cs.uiuc.edu)
 
        * calendar.el (sexp-diary-entry-symbol): New variable.
-       (cursor-to-iso-calendar-date): Simplified, slightly.
-       (cursor-to-calendar-day-of-year): Fixed punctuation.
-       (cursor-to-french-calendar-date): Moved French names to arrays.
+       (cursor-to-iso-calendar-date): Simplify, slightly.
+       (cursor-to-calendar-day-of-year): Fix punctuation.
+       (cursor-to-french-calendar-date): Move French names to arrays.
 
        * diary.el (list-sexp-diary-entries, diary-sexp-entry, diary-cyclic)
        (diary-hebrew-date, diary-iso-date, diary-day-of-year)
        (diary-float, diary-islamic-date, diary-anniversary, diary-block)
        (diary-french-date, diary-omer, diary-yahrzeit, diary-parasha)
        (diary-rosh-hodesh, hebrew-calendar-parasha-name): New functions.
-       (list-diary-entries): Added call to (list-sexp-diary-entries) and
+       (list-diary-entries): Add call to (list-sexp-diary-entries) and
        fixed an obscure error that caused a diary entry to be missed if it
        was preceded by an empty entry of the same style.
-       (list-hebrew-diary-entries, list-islamic-diary-entries): Fixed an
+       (list-hebrew-diary-entries, list-islamic-diary-entries): Fix an
        obscure error that caused a diary entry to be missed if it was
        preceded by an empty entry of the same style.
-       (mark-islamic-calendar-date-pattern): Renamed some local variables
+       (mark-islamic-calendar-date-pattern): Rename some local variables
        more appropriately.
 
 1990-11-05  Roland McGrath  (roland@geech.ai.mit.edu)
 
-       * compile.el (compilation-window-height): Added defconst for this,
+       * compile.el (compilation-window-height): Add defconst for this,
        since it somehow disappeared.
 
        * compile.el: Unoverhauled.  Restored from old 19 compile.el, plus
        called to generate a name for a compilation buffer.  Passed one arg,
        the name of the major mode of the buffer.  (compile-internal): Use it.
        [From tale's changes:]
-       (compile): Moved window enlarging to compile-internal.
+       (compile): Move window enlarging to compile-internal.
        (compile-internal): Don't use with-output-to-temp-buffer.
        Use display-buffer instead.
 
 
 1990-10-23  David Lawrence  (tale@pogo.ai.mit.edu)
 
-       * emerge.el (emerge-setup, emerge-setup-with-ancestor): Moved
-       insert-buffer calls back before call to emerge-extract-diffs where
+       * emerge.el (emerge-setup, emerge-setup-with-ancestor):
+       Move insert-buffer calls back before call to emerge-extract-diffs where
        the merge-buffer really needs to have something in it.
-       (emerge-extract-diffs,emerge-extract-diffs3): Moved errant
+       (emerge-extract-diffs,emerge-extract-diffs3): Move errant
        kill-buffer which interfered with return value of functions.
 
 1990-10-22  David Lawrence  (tale@pogo.ai.mit.edu)
        (texinfo-menu-locate-entry-p, texinfo-copy-menu-title)
        (texinfo-update-menu-region-beginning, texinfo-update-menu-region-end):
        Handle `@ifinfo' as well as comment line following node line.
-       (texinfo-multiple-files-update and aux. files): Added to handle
+       (texinfo-multiple-files-update and aux. files): Add to handle
        multi-file Texinfo sources.
 
 1990-10-18  Richard Stallman  (rms@mole.ai.mit.edu)
        * dired.el (dired-compress, dired-uncompress): Put output from
        subprocess in a buffer to display it.
 
-       * appt.el (fix-time): Deleted.
-       (appt-select-lowest-window): Renamed from select-lowest-window.
-       (appt-visible): Renamed from appt-visable.
+       * appt.el (fix-time): Delete.
+       (appt-select-lowest-window): Rename from select-lowest-window.
+       (appt-visible): Rename from appt-visable.
 
        * time.el (display-time-filter): Run display-time-hook.
 
 
 1990-10-08  Ed Reingold  (reingold@emr.cs.uiuc.edu)
 
-       * holiday.el (calendar-holiday-function-hebrew): Fixed minor problem
+       * holiday.el (calendar-holiday-function-hebrew): Fix minor problem
        with the code to short-circuit the calculations to save time.
 
-       * diary.el (mark-hebrew-calendar-date-pattern): Fixed minor problem
+       * diary.el (mark-hebrew-calendar-date-pattern): Fix minor problem
        with the code to short-circuit the calculations to save time.
 
 1990-10-08  Richard Stallman  (rms@mole.ai.mit.edu)
 
 1990-09-18  Richard Stallman  (rms@mole.ai.mit.edu)
 
-       * doctor.el (doctor-caddr, doctor-cadr, doctor-cddr): Renamed.
+       * doctor.el (doctor-caddr, doctor-cadr, doctor-cddr): Rename.
 
 1990-09-13  Richard Stallman  (rms@mole.ai.mit.edu)
 
 1990-09-10  Ed Reingold  (reingold@emr.cs.uiuc.edu)
 
        * diary.el (list-diary-entries, list-hebrew-diary-entries)
-       (list-islamic-diary-entries): Fixed to use add-to-diary-list.
+       (list-islamic-diary-entries): Fix to use add-to-diary-list.
 
 1990-09-10  Chris Hanson  (cph@kleph)
 
        * diary.el (mark-diary-entries, mark-islamic-diary-entries)
        (mark-hebrew-diary-entries): Eliminated use of constant alists for
        month and day names.
-       (prepare-fancy-diary-buffer): Fixed the way holidays are displayed
+       (prepare-fancy-diary-buffer): Fix the way holidays are displayed
        when there are no diary entries but lots of holidays.
        (ordinary-list-diary-hook, add-to-diary-list): New functions.
 
        Changed reference at beginning of file from the report to the
        published version of the paper.
        Changed all calls to `mod' to call `%' to avoid problem with cl.
-       (calendar-date-string): Added optional parameter `nodayname'.
-       (cursor-to-islamic-calendar-date): Fixed so that
+       (calendar-date-string): Add optional parameter `nodayname'.
+       (cursor-to-islamic-calendar-date): Fix so that
        calendar-date-string doesn't try find the day name.
-       (cursor-to-hebrew-calendar-date): Fixed so that
+       (cursor-to-hebrew-calendar-date): Fix so that
        calendar-date-string doesn't try find the day name.
        nongregorian-diary-marking-hook: Fixed typo in doc string.
-       (calendar-mode): Fixed a typo in doc string.
+       (calendar-mode): Fix a typo in doc string.
        (cursor-to-iso-calendar-date): Made message consistent with
        similar functions for Julian, Islamic, Hebrew, and French calendars.
-       (calendar-absolute-from-gregorian): Simplified calculation.
-       (calendar-mark-today): Changed today mark to `=' to avoid
+       (calendar-absolute-from-gregorian): Simplify calculation.
+       (calendar-mark-today): Change today mark to `=' to avoid
        confusion with the default holiday mark.
        (calendar-julian-from-absolute): Rewrote parallel to other functions.
        (calendar-islamic-from-absolute): Rewrote parallel to other functions.
-       (calendar-forward-day): Fixed movement when cursor is not on a date
+       (calendar-forward-day): Fix movement when cursor is not on a date
        and arg is negative.
        Added description of new `if' form to doc string for calendar-holidays.
 
 
        * holiday.el:
        Changed all calls to `mod' to call `%' to avoid problem with cl.
-       (calendar-holiday-function-rosh-hashanah-etc): Fixed grammatical
+       (calendar-holiday-function-rosh-hashanah-etc): Fix grammatical
        error in a comment.
-       (calendar-holiday-function-hebrew): Fixed typo in doc string.
-       (calendar-holiday-function-islamic): Fixed typo in doc string.
+       (calendar-holiday-function-hebrew): Fix typo in doc string.
+       (calendar-holiday-function-islamic): Fix typo in doc string.
        (calendar-holiday-function-if): New function.
 
 1990-09-06  Richard Stallman  (rms@mole.ai.mit.edu)
        * loaddefs.el:
        (gnus, gnus-post-news): Autoload gnus.
        (sendnews, postnews): fset to gnus-post-news instead of news-post-news.
-       (rnews, news-post-news): Removed autoloads.
+       (rnews, news-post-news): Remove autoloads.
 
        * gnus.el: New file.
-       (gnus-make-newsrc-file): Removed.
+       (gnus-make-newsrc-file): Remove.
        (gnus-read-newsrc-file): Work without above.
-       (gnus-Info-directory): Removed.
+       (gnus-Info-directory): Remove.
        (gnus-Info-find-node): Work without above.
        (lots of variables): Made non-interactive.  Some doc fixes.
 
        (fortran-current-line-indentation): Only skip over continuation
        char or line number for statements.  It was giving back wrong
        values for statements which started in columns 1-6.
-       (fortran-mode-version): Removed.
+       (fortran-mode-version): Remove.
 
 1990-08-28  David Lawrence  (tale@pogo.ai.mit.edu)
 
        copy-vector.  Calling copy-sequence does the job.
        (defsetf for point): Point's inverse is goto-char.  Of course,
        what do we do with the other basic types of Emacs Lisp?
-       (member): Another, perhaps counterproductive, speed hack.  When
-       test or testnot are symbols (hopefully, non-null), they are
+       (member): Another, perhaps counterproductive, speed hack.
+       When test or testnot are symbols (hopefully, non-null), they are
        replaced by their symbol-function slots.  This presumably reduces
        one indirection per each funcall in the inner loop.
        (byte-compile-named-list-accessors): Another byte-compile
        (with-keyword-args): Macro that simplifies most of the handling of
        klists.  The only neglected functionality is that no supplied-p
        forms exist (although that is true also of lambda lists in Emacs Lisp).
-       (cl-eval-print-last-sexp): Added half-hearted support for -, +,
+       (cl-eval-print-last-sexp): Add half-hearted support for -, +,
        ++, +++, *, **, ***, /, //, ///; and cleared the mvalues mechanism
        at every call.
        (declare, proclaim, the): Make some more CL codes easy to load.
        (byte-compile-ca*d*r): New function, used as a handler from
        byte-compile-form to eliminate the extra call to the c*r functions
        in compiled code.
-       (adjoin, map): Changed to use `memq' instead of `member', too.
+       (adjoin, map): Change to use `memq' instead of `member', too.
        (case, ecase): Via a change in case-clausify, these macros now
        generate tests using the primitive `memq', instead of the heavier
        `member'.
        functions.
        (build-klist): Better error messages.
        (psetf): Rewrote, patterned after the new psetq.
-       (psetq): Added early check for even number of arguments.  This
-       causes a better error message than previously.
+       (psetq): Add early check for even number of arguments.
+       This causes a better error message than previously.
        (defstruct, parse$defstruct$options): asp@CS.CMU.EDU (James
        Aspnes) reported that defstruct wasn't handling properly the use
        of accessors of an :included definition applied to instances of
        *Completions* not *Help*.
 
        * help.el (describe-mode): Use Dale Worley's version to also show
-       minor mode documentation if argument is given.  Fset
-       defining-keyboard-macro to start-keyboard-macro so its
+       minor mode documentation if argument is given.
+       Fset defining-keyboard-macro to start-keyboard-macro so its
        documentation can be found.  Currently does not work with
        auto-fill-mode because of the hook nature of its minor mode
        indicator variable.
 1990-07-26  David Lawrence  (tale@pogo.ai.mit.edu)
 
        * c-mode.el (c-auto-newline): Doc addition.
-       (electric-c-terminator): Removed bogus set-marker.
+       (electric-c-terminator): Remove bogus set-marker.
        (electric-c-sharp-sign): Make sure c-auto-newline is nil for call
        to electric-c-terminator.
 
        * compile.el (grep): Use `grep-command' to also hold args for
        grep, like compile-command.
 
-       * simple.el (kill-ring-save): Fixed to not reference free
+       * simple.el (kill-ring-save): Fix to not reference free
        variable `verbose' but to just unconditionally echo message.
        (shell-command): Use new `last-shell-command' interactively.
        (shell-command-on-region): Use new `last-shell-command-on-region'
 
 1990-06-23  Randall Smith  (randy@substantia-nigra)
 
-       * dired.el (dired-flag-regexp-files): Added function to flag all
+       * dired.el (dired-flag-regexp-files): Add function to flag all
        files matching a REGEXP for deletion.
        (): Bound this function to key "F" in dired-mode ("D" was already
        taken).
        * isearch.el (isearch): Do exit on meta keys.
        Also exit on function keys and mouse clicks.
        * loaddefs.el (search-exit-char): Change back to escape.
-       (search-ring-advance-char): Moved from isearch.el.
-       (search-ring-retreat-char): Renamed from ...-recline-char and moved.
+       (search-ring-advance-char): Move from isearch.el.
+       (search-ring-retreat-char): Rename from ...-recline-char and moved.
 
        * float.el: Provide 'float.
 
        updated all existing menus (very time consuming).
 
        (texinfo-all-menus-update, texinfo-every-node-update):
-       Added a save-excursion to each so that point does not move when
+       Add a save-excursion to each so that point does not move when
        you update the menus or nodes.
 
        * texinfmt.el (texinfo-format-parse-args): Expand arguments so
        * backquote.el (bq-splicequote): Correctly splice in elements
        when followed by constant elements; don't list the constant elements.
 
-       * add-log.el (add-change-log-entry): Fixed match test for full name.
+       * add-log.el (add-change-log-entry): Fix match test for full name.
 
-       * lpr.el (print-buffer): Removed an extra trailing parenthesis.
+       * lpr.el (print-buffer): Remove an extra trailing parenthesis.
 
 1990-05-30  David Lawrence  (tale@geech)
 
        * comint.el (comint-load-hook): Superseded by eval-after-load.
 
-       * inf-lisp.el (lisp-eval-region, lisp-compile-region): Use
-       temporary files instead of send-string to avoid problems with pty
+       * inf-lisp.el (lisp-eval-region, lisp-compile-region):
+       Use temporary files instead of send-string to avoid problems with pty
        buffering.
 
        * tex-mode.el (tex-close-latex-block): Allow whitespace after
 
        * informat.el (Info-tagify): Give status messages before and
        after tagifying.
-       (batch-info-validate): Removed status messages around Info-tagify.
+       (batch-info-validate): Remove status messages around Info-tagify.
 
        * rmailout.el (rmail-output): Check for From:, Really-From: and
        Sender: fields, in that order, and run mail-strip-quoted-names on
 
 1990-05-21  Richard Stallman  (rms@mole.ai.mit.edu)
 
-       * buff-menu.el (Buffer-menu-buffer): Simplified.
+       * buff-menu.el (Buffer-menu-buffer): Simplify.
        Set Buffer-menu-buffer-column initially.
 
 1990-05-18  Robert J. Chassell  (bob@apple-gunkies)
 
        * page-ext.el (pages-addresses-file-name):
-       Renamed from addresses-file-name.
+       Rename from addresses-file-name.
 
 1990-05-17  Robert J. Chassell  (bob@apple-gunkies)
 
        * screen.el (iconify-function, iconify-emacs, deiconify-function):
        New functions.
 
-       * files.el (save-some-buffers): Removed last parameter skip-list.
+       * files.el (save-some-buffers): Remove last parameter skip-list.
        Now this checks for buffer-local variable save-buffers-skip to
        determine whether or not to avoid asking to save the buffer.
-       * rmail.el (rmail-mode): Removed skip-list stuff.
+       * rmail.el (rmail-mode): Remove skip-list stuff.
        (rmail-variables): make-local-variable save-buffers-skip.
-       * compile.el (compile): Removed additional parameter to save-buffers.
+       * compile.el (compile): Remove additional parameter to save-buffers.
 
 1990-02-26  David Lawrence  (tale@pogo.ai.mit.edu)
 
        display-time-string.
        (rmail-pop-up): Default display-time-hook to automatically retrieve
        new mail if the variable rmail-pop-up is non-nil.
-       (add-clock-handler): Removed; superseded by timer.el.
+       (add-clock-handler): Remove; superseded by timer.el.
 
        * loaddefs.el: Removed add-clock-handler.
 
 1990-02-25  David Lawrence  (tale@pogo.ai.mit.edu)
 
        * c++-mode.el: New file.
-       (point-bol): Removed this function.
+       (point-bol): Remove this function.
 
        * loaddefs.el: Autoload C++-mode.
        (auto-mode-alist): c++-mode for .C and .cc files.
 
 1990-02-25  Joseph Arceneaux  (jla@gnu.ai.mit.edu)
 
-       * lisp-mode.el (indent-sexp): Changed opoint to last-point.
+       * lisp-mode.el (indent-sexp): Change opoint to last-point.
        Very strange, I thought I'd already fixed this.
 
        * screen.el: New file.
        * files.el (file-newest-backup): Return either the name of an
        existing backup file or nil if none exists.
 
-       * server.el (server-program): Renamed from "server" to "emacsserver".
+       * server.el (server-program): Rename from "server" to "emacsserver".
 
 1990-02-20  Joseph Arceneaux  (jla@gnu.ai.mit.edu)
 
-       * fill.el (fill-region-as-paragraph): Fixed regexp typo in call to
+       * fill.el (fill-region-as-paragraph): Fix regexp typo in call to
        re-search-forward.
 
 1990-02-19  David Lawrence  (tale@pogo.ai.mit.edu)
 
        * calendar.el (french-calendar-leap-year-p):
        Rewritten with corrected rule.
-       (calendar-absolute-from-french): Fixed comments.
+       (calendar-absolute-from-french): Fix comments.
        (calendar-french-from-absolute): Rewrote using calendar-sum.
-       (cursor-to-french-calendar-date): Simplified and corrected spelling.
+       (cursor-to-french-calendar-date): Simplify and corrected spelling.
 
 1990-02-06  Richard Stallman  (rms@mole.ai.mit.edu)
 
 
 1990-01-27  Ed Reingold  (reingold@emr.cs.uiuc.edu)
 
-       * calendar.el (scroll-calendar-left): Fixed so it works when the cursor
+       * calendar.el (scroll-calendar-left): Fix so it works when the cursor
        is not positioned on a day.
-       (cursor-to-calendar-day-of-year): Fixed so that "day" is properly
+       (cursor-to-calendar-day-of-year): Fix so that "day" is properly
        pluralized, depending how many days remain in the year.
        (french-calendar-leap-year-p): New function.
        (french-calendar-last-day-of-month): New function.
 
 1990-01-11  Ed Reingold  (reingold@emr.cs.uiuc.edu)
 
-       * diary.el (list-diary-entries): Deleted several lines of extraneous
+       * diary.el (list-diary-entries): Delete several lines of extraneous
        code and added `nongregorian-diary-listing-hook' to the list of hooks
        called@the end; this is for use in including Hebrew, Islamic,
        Julian, or ISO diary entries.  A similar
        `nongregorian-diary-marking-hook' was added to the list of hooks
        called at the end of mark-diary-entries for the same reason.
 
-       (diary-name-pattern): Fixed the documentation and added an optional
+       (diary-name-pattern): Fix the documentation and added an optional
        parameter FULLNAME which insists on the full spelling of the name;
        this is also for use in marking Hebrew or Islamic diary entries
        (those month names are not unique in the first three characters).
        (list-islamic-diary-entries): New function.
        (mark-islamic-calendar-date-pattern): New function.
 
-       (list-diary-entries): Added nongregorian-diary-listing-hook.
-       (mark-diary-entries): Added nongregorian-diary-marking-hook.
+       (list-diary-entries): Add nongregorian-diary-listing-hook.
+       (mark-diary-entries): Add nongregorian-diary-marking-hook.
 
        * calendar.el: Added documentation for the hooks described above.
 
 1990-01-08  Robert J. Chassell  (bob@apple-gunkies.ai.mit.edu)
 
        * texnfo-upd.el (texinfo-update-node, texinfo-sequential-node-update):
-       Fixed auto-fill-hook bug.
+       Fix auto-fill-hook bug.
 
 1990-01-08  Joseph Arceneaux  (jla@spiff)
 
 1990-01-08  Ed Reingold  (reingold@emr.cs.uiuc.edu)
 
        * calendar.el (calendar-date-is-visible-p):
-       Fixed so it does not switch to the calendar buffer.
+       Fix so it does not switch to the calendar buffer.
 
        * diary.el (prepare-fancy-diary-buffer): Compute the list of
        holidays only once for each three-month period, not once for each date
 1990-01-07  Ed Reingold  (reingold@emr.cs.uiuc.edu)
 
        * calendar.el: Fixed the value of list-diary-entries-hook.
-       (regenerate-calendar-window): Changed (update-display) to (sit-for 0).
+       (regenerate-calendar-window): Change (update-display) to (sit-for 0).
        Corrected several instances of "dairy" to "diary".
-       (describe-calendar-mode): Added this function to issue the message
+       (describe-calendar-mode): Add this function to issue the message
        "Preparing..." to `?' key in calendar-mode because it's so incredibly
        slow for describe-mode to prepare the help buffer.
-       (calendar-holidays): Fixed the examples in the doc-string.
+       (calendar-holidays): Fix the examples in the doc-string.
 
        * diary.el: Corrected several instances of "dairy" to "diary".
 
 
        (calendar-iso-from-absolute): New function.
        (calendar-absolute-from-iso): New function.
-       (cursor-to-iso-calendar-date): Added `D' calendar command to give
+       (cursor-to-iso-calendar-date): Add `D' calendar command to give
        the day number in the Gregorian year and number of days remaining.
        (mark-diary-entries): Made two-digit abbreviated years acceptable
        in diary entries.  Changed possible diary entry styles: DAY
        (all functions containing the word `hebrew').
        (list-diary-entries, mark-diary-entries)
        (include-other-diary-files, mark-included-diary-files):
-       Added the possibility of `shared diary files' with a recursive
+       Add the possibility of `shared diary files' with a recursive
        include mechanism like the C preprocessor.
        (list-calendar-holidays): Eliminated the 'special class of holidays,
        rewriting the entire mechanism to make it more general.
-       (calendar-holiday-function-float): Changed the 'float class of
+       (calendar-holiday-function-float): Change the 'float class of
        holidays so that negative values count backward from end of month: 5
        is no longer used for the last occurrence of a day in a month; -1 is
        used instead.
 
 1989-12-11  David Lawrence  (tale@cocoa-puffs)
 
-       * telnet.el: Converted to use comint.  Removed
-       delete-char-or-send-eof and telnet-copy-last-input.  Added
+       * telnet.el: Converted to use comint.
+       Removed delete-char-or-send-eof and telnet-copy-last-input.  Added
        telnet-mode-hook.  Modified telnet-filter to insert-before-markers
        at the process-mark.
 
        * prolog.el: Converted to use comint.  Replaced copy-keymap for
        copy-alist of comint-mode-map.
 
-       * kermit.el: Converted to use comint.  Replaced
-       kermit-clean-filter with a more efficient version.
+       * kermit.el: Converted to use comint.
+       Replaced kermit-clean-filter with a more efficient version.
 
        * comint.el: Added optional arguments ``terminator'' and
        ``delete'' to comint-send-input, for processes that want to see
 1989-12-05  David Lawrence  (tale@wheat-chex)
 
        * comint.el (new file):
-       Added FSF copyright.
+       Add FSF copyright.
        Moved bindings off of C-c LETTER.
        Cleaned up references to cmu* files.
        Made comint-send-input do unconditional end-of-line before processing.
 
        * x-mouse.el (x-paste-text): push-mark before inserting text.
        (x-insert-selection, x-select):
-       Moved these functions over from mouse.el.
+       Move these functions over from mouse.el.
 
 1989-10-12  Richard Stallman  (rms@mole.ai.mit.edu)
 
 1989-09-11  Robert J. Chassell  (bob@apple-gunkies.ai.mit.edu)
 
        * texinfo.el (texinfo-update-node, texinfo-make-menu)
-       (texinfo-master-menu, texinfo-sequential-node-update): Added functions
+       (texinfo-master-menu, texinfo-sequential-node-update): Add functions
        to insert or update the next, previous, and up node pointers in a
        Texinfo file, or alternatively to insert node pointers as a depth-first
        traversal---sequentially through the file, each pointing to the next
 
 1989-07-12  Joseph Arceneaux  (jla@spiff)
 
-       * lisp.el (insert-parentheses): Changed conditions for pre- and
+       * lisp.el (insert-parentheses): Change conditions for pre- and
        post- insertion of blanks.
 
        * bytecomp.el (byte-compile-file): If current buffer is in
 
 1989-06-08  Joseph Arceneaux  (jla@apple-gunkies.ai.mit.edu)
 
-       * term/x-win.el (new-screen): Added this function, which is the default
+       * term/x-win.el (new-screen): Add this function, which is the default
        auto-screen function.  It uses new variables new-screen-x-delta
        and new-screen-y-delta.
        (next-multiscreen-window, previous-multiscreen-window):
 
 1989-05-15  Joseph Arceneaux  (jla@apple-gunkies.ai.mit.edu)
 
-       * tags.el (next-file): Fixed typo: " *next-file*" --> "*next-file*"
+       * tags.el (next-file): Fix typo: " *next-file*" --> "*next-file*"
 
 1989-05-14  Richard Stallman  (rms@mole.ai.mit.edu)
 
        confusing and incompatible with xterm.
 
        * mouse.el (mouse-scroll, mouse-del-char, mouse-kill-line)
-       (narrow-window-to-region, mouse-window-to-region): Added these
+       (narrow-window-to-region, mouse-window-to-region): Add these
        new functions.
 
 1989-05-08  Richard Stallman  (rms@mole.ai.mit.edu)
        * replace.el (occur-mode-goto-occurrence): Insure arg to
        count-lines is@start of line.
 
-       * replace.el (occur): Removed an extraneous save-excursion.
+       * replace.el (occur): Remove an extraneous save-excursion.
 
        * replace.el (perform-replace): Make ! undo as a unit.
 
        (view-exit): Restore old mode from those local variables.
        Apply specified fn to buffer that was viewed.
        This is on C-c and q.
-       (view-command-loop): Deleted.
+       (view-command-loop): Delete.
        (view-window-size): Now applies to selected window.
 
        * startup.el (normal-top-level): Use PWD envvar to set default dir.
        (bibtex-enclosing-reference, bibtex-enclosing-regexp, bibtex-flash-entr)
        (bibtex-flash-head, bibtex-inside-field, bibtex-make-optional-entry)
        (bibtex-remove-OPT): New functions.
-       (bibtex-find-it, bibtex-make-OPT-entry, bibtex-next-position): Deleted.
-       (kill-current-line): Deleted.
+       (bibtex-find-it, bibtex-make-OPT-entry, bibtex-next-position): Delete.
+       (kill-current-line): Delete.
        (bibtex-mode-map): C-c keys to make entries moved to C-c C-e.
        (general): Use regexps instead of simple-minded cursor motion.
        New keys include C-c C-p, C-c C-n, C-c C-k, C-c C-d, C-c C-c, TAB, LF.
 
        * compile.el (grep): Use grep-command for program.
        * loaddefs.el (grep-command): New variable.
-       (compile-command): Moved to compile.el.
+       (compile-command): Move to compile.el.
 
        * c-mode.el (electric-c-terminator): Make insertpos a marker.
 
index a4f028759725813c26d57a92b60c3ea48751cdb3..093f467163ca80bc25016526615644df70e06412 100644 (file)
 
        * speedbar.el (speedbar-timer-fn): Disable updating if the frame
        is an icon, or if the user is using the minibuffer.
-       (speedbar-key-map): Added Q binding to destroy the frame.
-       (speedbar-easymenu-definition-trailer): Added Quit item.
+       (speedbar-key-map): Add Q binding to destroy the frame.
+       (speedbar-easymenu-definition-trailer): Add Quit item.
        (speedbar-frame-mode): Set the frame position at creation time.
-       (speedbar-file-unshown-regexp): Added .# lock files.
+       (speedbar-file-unshown-regexp): Add .# lock files.
 
 1998-08-18  Kenichi Handa  <handa@etl.go.jp>
 
@@ -56,8 +56,8 @@
 
 1998-08-17  Kenichi Handa  <handa@etl.go.jp>
 
-       * international/mule-cmds.el (set-language-environment): Reset
-       syntax and case table to the defaults if the value of
+       * international/mule-cmds.el (set-language-environment):
+       Reset syntax and case table to the defaults if the value of
        unibyte-syntax key is nil.
 
 1998-08-16  Richard Stallman  <rms@psilocin.ai.mit.edu>
@@ -86,8 +86,8 @@
 
        * international/mule-cmds.el (language-info-alist): Doc-string
        modified.
-       (set-language-info-alist): Fix typo in doc-string.  Update
-       setup-language-environment-map unconditionally.
+       (set-language-info-alist): Fix typo in doc-string.
+       Update setup-language-environment-map unconditionally.
        (mule-keymap): Key bindings for set-selection-coding-system and
        set-next-selection-coding-system.
        (set-coding-system-map): Add items of set-selection-coding-system
 
 1998-08-14  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
 
-       * international/mule-cmds.el (select-safe-coding-system): If
-       default-coding-system is no-conversion return that, it is always
+       * international/mule-cmds.el (select-safe-coding-system):
+       If default-coding-system is no-conversion return that, it is always
        safe.
 
 1998-08-13  Eric Ludlam  <zappo@mescaline.gnu.org>
 
-       * speedbar.el (speedbar-frame-parameters): Removed scroll-bar-width.
+       * speedbar.el (speedbar-frame-parameters): Remove scroll-bar-width.
 
 1998-08-13  Richard Stallman  <rms@psilocin.ai.mit.edu>
 
 
        * dired-aux.el (dired-do-rename-regexp): Doc fix.
 
-       * midnight.el (midnight-float-time): Renamed from float-time.
-       (midnight-time-float): Renamed from time-float.
-       (midnight-buffer-display-time): Renamed from buffer-display-time.
+       * midnight.el (midnight-float-time): Rename from float-time.
+       (midnight-time-float): Rename from time-float.
+       (midnight-buffer-display-time): Rename from buffer-display-time.
        (midnight-mode): Specify :initialize.  Use nil as default value.
 
        * complete.el (PC-do-completion): Exclude ./ and ../ from completion.
        (read-language-name): Handle the case that the arg KEY is nil.
        (describe-language-environment): Handle input-method property.
 
-       * international/quail.el (quail-start-translation): If
-       enable-multibyte-characters is nil, convert multibyte character to
+       * international/quail.el (quail-start-translation):
+       If enable-multibyte-characters is nil, convert multibyte character to
        unibyte.
        (quail-start-conversion): Likewise.
 
        * language/: All files under this directory modified as below.
-       (setup-XXX-environment): Just call set-language-environment.  If
-       they used to do some other jobs than what done by
+       (setup-XXX-environment): Just call set-language-environment.
+       If they used to do some other jobs than what done by
        set-language-environment, those jobs are done in
        setup-XXX-environment-internal now.
        ("LANGUAGE-ENVIRONMENT"): Delete property setup-function or change
 1998-08-08  Eric M. Ludlam  <zappo@ultranet.com>
 
        * speedbar.el (speedbar-edit-line, speedbar-buffer-kill-buffer)
-       (speedbar-buffer-revert-buffer): Updated buffer finding regex to
+       (speedbar-buffer-revert-buffer): Update buffer finding regex to
        handle the [?] tag.
        (speedbar-find-selected-file): New function.
        (speedbar-clear-current-file): Uses `speedbar-find-selected-file'.
        (quail-start-translation): Handle the case the arg KEY is nil.
        Bind echo-keystrokes and help-char.  Initialize quail-current-str
        to "".  If input-method-use-echo-area is non-nil, call
-       read-key-sequence with appropriate PROMPT arg.  Setup
-       last-command-event by local variable `keyseq'.  Generate an event
+       read-key-sequence with appropriate PROMPT arg.
+       Setup last-command-event by local variable `keyseq'.  Generate an event
        list form quail-current-str.  If input-method-exit-on-first-char
        is non-nil, return only the first event.
-       (quail-start-conversion): Likewise.  Initialize
-       quail-conversion-str to "".  Generate an event list form
+       (quail-start-conversion): Likewise.
+       Initialize quail-conversion-str to "".  Generate an event list form
        quail-conversion-str.
        (quail-update-translation): Expect that the function given by
        (quail-update-translation-function) returns a new control-flag.
-       Handle the case the length of quail-current-key is 1.  Use
-       string-as-unibyte if enable-multibyte-characters is nil.  Always
-       assures that quail-current-str is Lisp string.
+       Handle the case the length of quail-current-key is 1.
+       Use string-as-unibyte if enable-multibyte-characters is nil.
+       Always assures that quail-current-str is Lisp string.
        (quail-self-insert-command): Use `or' instead of `unless'.
        (quail-update-current-translations): Always assures that
        quail-current-str is Lisp string.
 
 1998-08-04  Eric Ludlam  <zappo@mescaline.gnu.org>
 
-       * speedbar.el (speedbar-refresh): Removed special code to remove
+       * speedbar.el (speedbar-refresh): Remove special code to remove
        the speedbar update message.  Not necessary here.
        (speedbar-timer-fn): Add code to remove the updating message and
        thus restore the minibuffer.
-       (speedbar-center-buffer-smartly): Fixed center error to handle
+       (speedbar-center-buffer-smartly): Fix center error to handle
        the whole buffer.
        (speedbar-delete-subblock): Rewrote to be more robust, less clever.
-       (speedbar-timer-fn): Removed short display time for messages.
+       (speedbar-timer-fn): Remove short display time for messages.
 
 1998-08-04  Dave Love  <d.love@dl.ac.uk>
 
 
 1998-08-04  Eli Zaretskii  <eliz@delysid.gnu.org>
 
-       * international/mule.el (find-new-buffer-file-coding-system): When
-       inhibit-eol-conversion is non-nil and the buffer didn't already
+       * international/mule.el (find-new-buffer-file-coding-system):
+       When inhibit-eol-conversion is non-nil and the buffer didn't already
        set a fully-qualified coding system, force -unix eol-type.
 
 1998-08-04  Richard Stallman  <rms@psilocin.ai.mit.edu>
 
 1998-08-03  Eric Ludlam  <zappo@mescaline.gnu.org>
 
-       * info.el (Info-speedbar-hierarchy-buttons): Improved the speedbar
+       * info.el (Info-speedbar-hierarchy-buttons): Improve the speedbar
        frame management.
 
-       * speedbar.el (speedbar-update-current-file): Added call to
+       * speedbar.el (speedbar-update-current-file): Add call to
        `speedbar-center-buffer-smartly' to improve the display.
        (speedbar-center-buffer-smartly) Fixed off-by-one error in window
        height calculation.
        (speedbar-hack-buffer-menu): New function.
-       (speedbar-frame-parameters): Removed scroll bar width.
+       (speedbar-frame-parameters): Remove scroll bar width.
        (speedbar-frame-mode): Change pointer shape for X
        and W32 window-systems only.  When window-system is pc, bind the
        speedbar frame name to "Speedbar", and select that frame so it is
        (speedbar-directory-buttons-follow): Support both upper- and
        lower-case drive letters.  Use directory-sep-char instead of a
        literal backslash.
-       (speedbar-reconfigure-keymaps): Call
-       `easy-menu-remove' before reconfiguring for a new menu bar.
+       (speedbar-reconfigure-keymaps):
+       Call `easy-menu-remove' before reconfiguring for a new menu bar.
        (speedbar-previous-menu): New Variable.
        (speedbar-frame-plist): Remove pointers.
        (speedbar-refresh): Prevent the mark from being deactivated.
 
        * international/kkc.el (kkc-lookup-cache): Initialize it to nil.
        (kkc-lookup-cache-tag): New constant.
-       (kkc-lookup-key): If kkc-lookup-cache is nil, initialize it.  Use
-       kkc-init-file-name.
+       (kkc-lookup-key): If kkc-lookup-cache is nil, initialize it.
+       Use kkc-init-file-name.
        (kkc-region): Fix previous change.  Call kkc-error on error.
        (kkc-shorter-conversion, kkc-longer-phrase): New functions.
        (kkc-keymap): Bind them to "I" and "O" respectively.
        * language/cyril-util.el (cyrillic-encode-koi8-r-char): New function.
        (cyrillic-encode-alternativnyj-char): New function.
 
-       * language/cyrillic.el (cyrillic-koi8-r-decode-table): New
-       variable.
+       * language/cyrillic.el (cyrillic-koi8-r-decode-table):
+       New variable.
        (cyrillic-koi8-r-encode-table): Likewise.
        (ccl-decode-koi8): Use cyrillic-koi8-r-decode-table.
        (ccl-encode-koi8): Use cyrillic-koi8-r-encode-table.
        charset-origin-alist properties.
        (cyrillic-alternativnyj-decode-table): New variable.
        (cyrillic-alternativnyj-encode-table): Likewise.
-       (ccl-decode-alternativnyj): Use
-       cyrillic-alternativnyj-decode-table.
-       (ccl-encode-alternativnyj): Use
-       cyrillic-alternativnyj-encode-table.
+       (ccl-decode-alternativnyj):
+       Use cyrillic-alternativnyj-decode-table.
+       (ccl-encode-alternativnyj):
+       Use cyrillic-alternativnyj-encode-table.
        (ccl-encode-alternativnyj-font): Likewise.
        (cyrillic-alternativnyj-nonascii-translation-table): New variable.
        ("Cyrillic-ALT"): Add nonascii-translation-table and
        * emacs-lisp/cl-indent.el (lisp-indent-defun-method): New variable.
        (common-lisp-indent-function): Use it.
        (lisp-indent-259): Uncomment the `&lambda' code.
-       (top-level let): Remove duplicate `catch' and `block'.  Use
-       `&lambda' when appropriate.  Now the lambda lists are indented
+       (top-level let): Remove duplicate `catch' and `block'.
+       Use `&lambda' when appropriate.  Now the lambda lists are indented
        appropriately.
 
 1998-07-30  Richard Stallman  <rms@psilocin.ai.mit.edu>
 1998-07-27  Richard Stallman  <rms@psilocin.ai.mit.edu>
 
        * textmodes/flyspell.el (flyspell-emacs-popup):
-       Renamed from flyspell-gnuemacs-popup.  Callers changed.
+       Rename from flyspell-gnuemacs-popup.  Callers changed.
        (push): Macro deleted.  Callers changed to do it explicitly.
        (flyspell-incorrect-face, flyspell-duplicate-face): Use defface.
        (flyspell-incorrect-color): Variable deleted.
        (flyspell-underline-p): Variable deleted.
        (flyspell-font-lock-make-face): Function deleted.
        (flyspell-mark-duplications-flag):
-       Renamed from flyspell-doublon-as-error-flag.
+       Rename from flyspell-doublon-as-error-flag.
        (flyspell-mode-on): Delete the debugging message.
        (flyspell-mode-off): Delete the debugging message.
        (flyspell-mode-on): Set flyspell-generic-check-word-p
 1998-07-25  Kenichi Handa  <handa@etl.go.jp>
 
        * international/mule.el (auto-coding-alist): New variable.
-       (set-auto-coding): Argument FILENAME is added.  Check
-       auto-coding-alist at first.
+       (set-auto-coding): Argument FILENAME is added.
+       Check auto-coding-alist at first.
 
        * international/kkc.el (kkc-region): Unwind-protect the conversion
        process.
        (kkc-show-conversion-list-update): Pay attention to the length of
        kkc-show-conversion-list-index-chars.
 
-       * international/mule-cmds.el (find-multibyte-characters): New
-       function.
+       * international/mule-cmds.el (find-multibyte-characters):
+       New function.
        (select-safe-coding-system): Highlight characters which can't be
        encoded.  Show list of such characters also in *Warning* buffer.
 
        (crisp-last-last-command): Doc fix.
        (mark-something): Function deleted.
        (crisp-mark-line): Avoid using mark-something.
-       (crisp-region-active): Renamed from region-active.
-       (crisp-set-clipboard): Renamed from copy-primary-selection.
-       (crisp-kill-region): Renamed from kill-primary-selection.
-       (crisp-yank-clipboard): Renamed from yank-clipboard-selection.
+       (crisp-region-active): Rename from region-active.
+       (crisp-set-clipboard): Rename from copy-primary-selection.
+       (crisp-kill-region): Rename from kill-primary-selection.
+       (crisp-yank-clipboard): Rename from yank-clipboard-selection.
 
        * files.el (basic-save-buffer-2): New function.
        (basic-save-buffer-1): Use basic-save-buffer-2,
 
 1998-07-23  Ken'ichi Handa  <handa@melange.gnu.org>
 
-       * international/quail.el (quail-start-translation): Call
-       this-single-command-raw-keys instead of this-single-command-keys.
+       * international/quail.el (quail-start-translation):
+       Call this-single-command-raw-keys instead of this-single-command-keys.
        (quail-start-conversion): Likewise.
 
 1998-07-23  Kenichi Handa  <handa@etl.go.jp>
        not isearch-printing-char, don't read multibyte chars from
        minibuffer, but just call isearch-process-search-char.
 
-       * international/quail.el (quail-start-translation): Use
-       this-single-command-keys to get raw events instead of
+       * international/quail.el (quail-start-translation):
+       Use this-single-command-keys to get raw events instead of
        listify-key-sequence.
        (quail-start-conversion): Likewise.
 
        (imenu-extract-index-name-function, imenu-default-goto-function)
        (imenu-sort-function, imenu-prev-index-position-function): Likewise.
 
-       * ange-ftp.el (ange-ftp-reread-dir): Renamed from `re-read'.
+       * ange-ftp.el (ange-ftp-reread-dir): Rename from `re-read'.
        Old name defined as alias.  Doc fix.
 
 1998-07-21  Kenichi Handa  <handa@etl.go.jp>
        (kkc-terminate): Update kkc-overlay-head correctly.
        (kkc-cancel): Don't call kkc-terminate, but set kkc-converting to nil.
 
-       * international/quail.el (quail-simple-translation-keymap): Typo
-       in doc-string fixed.
+       * international/quail.el (quail-simple-translation-keymap):
+       Typo in doc-string fixed.
        (quail-start-translation): Check start position of quail-overlay
        before calling quail-overlay-region-events.
        (quail-start-conversion): Likewise.
 
        * isearch.el (isearch-input-method-function): New variable.
        (isearch-input-method-local-p): New variable.
-       (isearch-mode): Setup the above two variable.  Set
-       input-method-function to nil locally.
+       (isearch-mode): Setup the above two variable.
+       Set input-method-function to nil locally.
        (isearch-done): Restore the previous value of
        input-method-function.
 
        * international/kkc.el (kkc-region): Fix the return value.
 
        * international/isearch-x.el
-       (isearch-toggle-specified-input-method): Adjusted for the change
+       (isearch-toggle-specified-input-method): Adjust for the change
        in isearch.el.
        (isearch-toggle-input-method): Likewise.
        (isearch-minibuffer-local-map): New variable.
        characters from minibuffer with the keymap
        isearch-minibuffer-local-map.
 
-       * international/mule-cmds.el (read-multilingual-string): Don't
-       activate an input method in the current buffer, but just bind
+       * international/mule-cmds.el (read-multilingual-string):
+       Don't activate an input method in the current buffer, but just bind
        current-input-method.
 
        * language/japan-util.el (japanese-replace-region): New function.
 
 1998-07-17  Simon Marshall  <simon@gnu.org>
 
-       * lazy-lock.el (lazy-lock-fontify-after-visage): Renamed from
+       * lazy-lock.el (lazy-lock-fontify-after-visage): Rename from
        lazy-lock-fontify-after-outline.
        (lazy-lock-install-hooks): Add it to hs-hide-hook too.
        (lazy-lock-unstall): Remove it from hs-hide-hook too.
 
        * international/kkc.el (kkc-show-conversion-list-index-chars):
        Default value changed.
-       (kkc-keymap): Renamed from kkc-mode-map.  Key binding for
+       (kkc-keymap): Rename from kkc-mode-map.  Key binding for
        kkc-non-kkc-command are deleted.
        (kkc-mode): This function deleted.
        (kkc-canceled): This variable deleted.
        (kkc-converting): New variable.
        (kkc-region): 3rd optional arg is deleted.  Completely rewritten
        to adjust for the change in quail.el.
-       (kkc-terminate, kkc-cancel): Adjusted for the change of
+       (kkc-terminate, kkc-cancel): Adjust for the change of
        kkc-region.
        (kkc-non-kkc-command): This function deleted.
        (kkc-select-from-list): Use last-input-event instead of
        (quail-current-str, quail-current-translations): Likewise.
        (quail-reset-conversion-region): This variable deleted.
        (quail-use-package): Call quail-activate at the tail.
-       (quail-translation-keymap, quail-simple-translation-keymap): Key
-       bindings for quail-execute-non-quail-command deleted.
+       (quail-translation-keymap, quail-simple-translation-keymap):
+       Key bindings for quail-execute-non-quail-command deleted.
        (quail-conversion-keymap): Likewise.  Add key bindings for
        quail-self-insert-command.
        (quail-delete-overlays): Check overlay-start for overlays before
        deleting them.
        (quail-mode): This function deleted.
        (quail-inactivate, quail-activate): New functions.
-       (quail-saved-current-map, quail-saved-current-buffer): These
-       variables deleted.
+       (quail-saved-current-map, quail-saved-current-buffer):
+       These variables deleted.
        (quail-toggle-mode-temporarily, quail-execute-non-quail-command):
        These functions deleted.
        (quail-exit-conversion-mode, quail-prefix-arg): These variables
        (quail-start-conversion): New function.
        (quail-terminate-translation): Just set quail-translating to nil.
        (quail-update-translation): Put some events back to
-       unread-input-method-events instead of unread-command-events.  Call
-       quail-error instead of error.
-       (quail-self-insert-command): Adjusted for the change of
+       unread-input-method-events instead of unread-command-events.
+       Call quail-error instead of error.
+       (quail-self-insert-command): Adjust for the change of
        quail-start-translation.
        (quail-next-translation): Don't call
        quail-execute-non-quail-command, instead, put an event back of
        (crisp-mode-map): Make this a sparse keymap parented from
        current-global-map.
        (crisp-mode-original-keymap): Don't copy the keymap.
-       (crisp-last-last-command): Renamed from last-last-command.  defvar it.
+       (crisp-last-last-command): Rename from last-last-command.  defvar it.
        (crisp-mode): Honor ARG.
 
        (crisp-kill-line, crisp-copy-line): When a region isn't highlighted,
 1998-07-12  Richard Stallman  <rms@psilocin.ai.mit.edu>
 
        * international/mule.el (set-selection-coding-system):
-       Renamed from set-clipboard-coding-system.
+       Rename from set-clipboard-coding-system.
        Set the variable's new name, selection-coding-system.
 
        * mail/rmailout.el (rmail-output-to-rmail-file):
 
        * speedbspec.el: Deleted; now integrated into speedbar.el.
        * speedbar.el: More commentary.
-       (speedbar-xemacsp): Moved definition.
-       (speedbar-initial-expansion-mode-list): Was
-       `speedbar-initial-expansion-list' and now has multiple modes.
+       (speedbar-xemacsp): Move definition.
+       (speedbar-initial-expansion-mode-list):
+       Was `speedbar-initial-expansion-list' and now has multiple modes.
        (speedbar-stealthy-function-list): Now has mode labels.
        (speedbar-initial-expansion-list-name)
        (speedbar-previously-used-expansion-list-name)
        (speedbar-tag-hierarchy-method, speedbar-tag-split-minimum-length)
        (speedbar-tag-regroup-maximum-length)
        (speedbar-hide-button-brackets-flag): New variables.
-       (speedbar-special-mode-expansion-list): Updated documentation.
+       (speedbar-special-mode-expansion-list): Update documentation.
        (speedbar-navigating-speed, speedbar-update-speed): Phasing out.
-       (speedbar-vc-indicator): Removed space from this var.
+       (speedbar-vc-indicator): Remove space from this var.
        (speedbar-indicator-separator, speedbar-obj-do-check)
        (speedbar-obj-to-do-point, speedbar-obj-indicator, speedbar-obj-alist)
        (speedbar-indicator-regex): New variables.
        (speedbar-directory-unshown-regexp): New variable.
-       (speedbar-supported-extension-expressions): Added more extensions.
+       (speedbar-supported-extension-expressions): Add more extensions.
        (speedbar-add-supported-extension)
        (speedbar-add-ignored-path-regexp): Made interactive.
        (speedbar-update-flag): Nil w/ no window system.
-       (speedbar-file-key-map): Moved some key bindings from
+       (speedbar-file-key-map): Move some key bindings from
        `speedbar-key-map' to this map.
        (speedbar-make-specialized-keymap): New function.
        (speedbar-file-key-map): New key map.
-       (speedbar-easymenu-definition-special): Updated to new functions.
-       (speedbar-easymenu-definition-trailer): Changed conditional part.
-       (speedbar-frame-mode): Removed commented code, fixed W32 cursor
+       (speedbar-easymenu-definition-special): Update to new functions.
+       (speedbar-easymenu-definition-trailer): Change conditional part.
+       (speedbar-frame-mode): Remove commented code, fixed W32 cursor
        bug, Updated to better handle terminal frames.
        (speedbar-switch-buffer-attached-frame): New function.
-       (speedbar-mode): Updated documentation, no local keymap,
+       (speedbar-mode): Update documentation, no local keymap,
        correct `temp-buffer-show-function' use, enable mouse-tracking.
        (speedbar-show-info-under-mouse): New function.
        (speedbar-reconfigure-keymaps): Was `speedbar-reconfigure-menubar'.
        (speedbar-restricted-move, speedbar-restricted-next)
        (speedbar-restricted-prev, speedbar-navigate-list)
        (speedbar-forward-list, speedbar-backward-list): New commands.
-       (speedbar-refresh): Updated message printing & verbosity.
-       (speedbar-item-load): Updated message.
-       (speedbar-item-byte-compile): Updated doc & reset scanners.
+       (speedbar-refresh): Update message printing & verbosity.
+       (speedbar-item-load): Update message.
+       (speedbar-item-byte-compile): Update doc & reset scanners.
        (speedbar-item-info): Overhauled with more details.
        (speedbar-item-copy): Update messages.
        (speedbar-generic-item-info): New function.
 
        * mail/rmail.el: No longer depends on speedbspec for byte compile.
        (rmail-speedbar-match-folder-regexp): New variable.
-       (rmail-speedbar-menu-items): Updated speedbar menu items.
+       (rmail-speedbar-menu-items): Update speedbar menu items.
        (rmail-speedbar-key-map): New keymap.
        (rmail-install-speedbar-variables): New function.
        Install speedbar keymap only when speedbar is loaded.
        * gud.el (gud-speedbar-key-map): New variable.
        (gud-install-speedbar-variables): New function
        Install speedbar keymap only when speedbar is loaded.
-       (gud-gdb-get-stackframe): Added ":" to regex for c++.
+       (gud-gdb-get-stackframe): Add ":" to regex for c++.
 
 1998-07-09  Sam Steingold  <sds@usa.net>
 
        * emacs-lisp/cl-indent.el: Indent `handler-case' correctly.
-       * font-lock.el (lisp-font-lock-keywords): Fontify
-       `handler-case', `ccase', `ctypecase', `assert', `error'.
+       * font-lock.el (lisp-font-lock-keywords):
+       Fontify `handler-case', `ccase', `ctypecase', `assert', `error'.
 
 1998-07-09  Andrew Innes  <andrewi@harlequin.co.uk>
 
 
 1998-07-05  Richard Stallman  <rms@psilocin.ai.mit.edu>
 
-       * mail/mail-utils.el (rmail-dont-reply-to): Understand
-       about doublequotes; don't be fooled by commas inside them.
+       * mail/mail-utils.el (rmail-dont-reply-to):
+       Understand about doublequotes; don't be fooled by commas inside them.
 
 1998-07-04  Richard Stallman  <rms@psilocin.ai.mit.edu>
 
 
 1998-07-03  Espen Skoglund  <espensk@stud.cs.uit.no>
 
-       * pascal.el (pascal-insert-block): Fixed space-deletion bug in
+       * pascal.el (pascal-insert-block): Fix space-deletion bug in
        front of the "begin" string.
        (pascal-beg-of-defun): Used to locate the beginning of a function
        incorrectly when a function contained several begin-end blocks.
        * dos-vars.el (dos-printer): Obsolete variable deleted.
        (dos-ps-printer): Likewise.
 
-       * dos-w32.el (direct-print-region-function): Renamed from
+       * dos-w32.el (direct-print-region-function): Rename from
        dos-print-region-function.  Added &rest keyword.
        (print-region-function): Set to direct-print-region-function.
        (lpr-headers-switches): Initialize.
 
 1998-07-03  Eric Ludlam  <zappo@mescaline.gnu.org>
 
-       * emacs-lisp/checkdoc.el (checkdoc): Updated commentary.
-       (checkdoc-autofix-flag): Updated doc.
-       (checkdoc-force-docstrings-flag): Updated doc.
+       * emacs-lisp/checkdoc.el (checkdoc): Update commentary.
+       (checkdoc-autofix-flag): Update doc.
+       (checkdoc-force-docstrings-flag): Update doc.
        (checkdoc-force-history-flag): New flag.
-       (checkdoc-triple-semi-comment-check-flag): Fixed name.
-       (checkdoc-spellcheck-documentation-flag): Fixed doc.
+       (checkdoc-triple-semi-comment-check-flag): Fix name.
+       (checkdoc-spellcheck-documentation-flag): Fix doc.
        (checkdoc-ispell-lisp-words): Update default value.
        (checkdoc-generate-compile-warnings-flag, checkdoc-proper-noun-list)
        (checkdoc-proper-noun-regexp, checkdoc-symbol-words): New variables.
        Cursor now sits next to the error, forcing scrolling if needed,
        and using a better centering algorithm, and much better error
        navigation after choosing "f"ix.
-       (checkdoc-next-error): Added parameter ENABLE-FIX.
+       (checkdoc-next-error): Add parameter ENABLE-FIX.
        (checkdoc-next-message-error, checkdoc-recursive-edit): New functions.
        (checkdoc-start): Was `checkdoc', uses new note taking system.
        (checkdoc-current-buffer, checkdoc-continue, checkdoc-comments):
-       Updated to use new note taking system.
+       Update to use new note taking system.
        (checkdoc-rogue-spaces, checkdoc-rogue-space-check-engine):
-       Added INTERACT parameter, uses new warnings functions.
+       Add INTERACT parameter, uses new warnings functions.
        (checkdoc-message-text, checkdoc-defun):
-       Updated to use new note taking system.
+       Update to use new note taking system.
        (checkdoc-ispell-current-buffer, checkdoc-ispell-interactive): Fix doc.
        (checkdoc-ispell-message-text, checkdoc-ispell-start): New function.
        (checkdoc-create-error, checkdoc-error-text, checkdoc-error-start)
        (checkdoc-error-end, checkdoc-error-unfixable): New functions.
-       (checkdoc-minor-keymap): Updated keybinds to new interactive functions,
+       (checkdoc-minor-keymap): Update keybinds to new interactive functions,
        completely re-arranged the minor-mode menu.
-       (checkdoc-this-string-valid): Moved no doc-string warning here,
+       (checkdoc-this-string-valid): Move no doc-string warning here,
        and added autofix if a comment already exists there.
        (checkdoc-this-string-valid-engine): Fix doc, robusted doc finder.
        All previously returned errors now call `checkdoc-create-error'.
        for history and commentary.  All previously returned errors now call
        `checkdoc-create-error'.  Message spelling and format.
        (checkdoc-message-text-search):
-       Moved parts to `checkdoc-message-text-next-string'.
+       Move parts to `checkdoc-message-text-next-string'.
        (checkdoc-message-text-next-string): New function.
        (checkdoc-message-text-engine): All previously returned errors
        now call `checkdoc-create-error'.  Can find/skip 'format' call
        (checkdoc-y-or-n-p): New function.
        (checkdoc-autofix-ask-replace): Update doc.  Protect match-data.
        Correctly handle `checkdoc-autofix-flag' of 'never.  New behavior
-       with `checkdoc-autofix-flag' of 'automatic-then-never.  Better
-       overlay handling.
-       (checkdoc-output-font-lock-keywords): Updated to new output format.
+       with `checkdoc-autofix-flag' of 'automatic-then-never.
+       Better overlay handling.
+       (checkdoc-output-font-lock-keywords): Update to new output format.
        (checkdoc-pending-errors): New variable.
-       (checkdoc-find-error): Updated to new output format.
-       (checkdoc-start-section, checkdoc-error): Improved the output.
+       (checkdoc-find-error): Update to new output format.
+       (checkdoc-start-section, checkdoc-error): Improve the output.
        (checkdoc-show-diagnostics): Smarter show algorithm.
 
 1998-07-03  Kenichi Handa  <handa@etl.go.jp>
 
        * derived.el (derived-mode-hooks-name): Use -hook, not -hooks,
        in mode hook name.
-       (derived-mode-hook-name): Renamed from ...-hooks; caller changed.
+       (derived-mode-hook-name): Rename from ...-hooks; caller changed.
 
 1998-07-01  Ken'ichi Handa  <handa@melange.gnu.org>
 
-       * international/mule.el (mule-version): Changed to 4.0.
-       (mule-version-date): Updated.
+       * international/mule.el (mule-version): Change to 4.0.
+       (mule-version-date): Update.
 
 1998-06-30  Richard Stallman  <rms@psilocin.ai.mit.edu>
 
        * language/korea-util.el (isearch-toggle-korean-input-method)
        (isearch-hangul-switch-symbol-ksc, isearch-hangul-switch-hanja):
        New functions.
-       (korean-key-bindings): Renamed from exit-korean-environment-data.
+       (korean-key-bindings): Rename from exit-korean-environment-data.
        Initialized appropriately.
        (setup-korean-environment): Setup key bindings according to
        korean-key-bindings.
        of `find-function-noselect'.
        (find-function-search-for-symbol): `regexp-quote' the symbol name:
        needed to find-function `mapcar*' for example.
-       (find-function-noselect): Improved docstring.  Don't include
+       (find-function-noselect): Improve docstring.  Don't include
        `library' in let.
        Use `symbol-file' instead of `describe-symbol-find-file'.
-       (find-function-read): Renamed from `find-function-read-function'.
+       (find-function-read): Rename from `find-function-read-function'.
        With optional arg now read a variable.
        (find-function-read): Separate `completing-read' calls for
        variables and functions.
        (find-variable-other-window): Remove most of docstring and add
        reference to `find-variable' instead.
        (find-variable-other-frame): Ditto.
-       (find-function-on-key): Simplified.  Removed stuff now taken care
+       (find-function-on-key): Simplify.  Removed stuff now taken care
        of by interactive "k".
        (find-function-at-point): New function.
        (find-variable-at-point): Ditto.
 
 1998-06-24  Andrew Innes  <andrewi@mescaline.gnu.org>
 
-       * dos-w32.el (null-device): Renamed from grep-null-device.
+       * dos-w32.el (null-device): Rename from grep-null-device.
 
 1998-06-24  Richard Stallman  <rms@psilocin.ai.mit.edu>
 
        (ange-ftp-generate-anonymous-password): Use `other' widget type.
        * autoinsert.el (auto-insert, auto-insert-query): Use `other'
        widget type.
-       * bookmark.el (bookmark-save-flag, bookmark-version-control): Use
-       `other' widget type.
+       * bookmark.el (bookmark-save-flag, bookmark-version-control):
+       Use `other' widget type.
        * comint.el (comint-input-autoexpand): Use `other' widget type.
        * complete.el (PC-first-char): Use `other' widget type.
        * cus-edit.el (custom-magic-show): Use `other' widget type.
 
 1998-06-23  Ken'ichi Handa  <handa@melange.gnu.org>
 
-       * international/fontset.el (x-style-funcs-alist): Remove
-       duplicated code.
+       * international/fontset.el (x-style-funcs-alist):
+       Remove duplicated code.
 
 1998-06-23  Richard Stallman  <rms@psilocin.ai.mit.edu>
 
        `composition'.  Add property `jisx0208' to Japanese hankaku characters.
        (japanese-kana-table): Add more data.
        (japanese-symbol-table): Change the order of elements.
-       (japanese-katakana-region): Adjusted for the above changes.  Check
-       character code properties directly here.
+       (japanese-katakana-region): Adjust for the above changes.
+       Check character code properties directly here.
        (japanese-hiragana-region): Likewise.
        (japanese-hankaku-region): Likewise.
        (japanese-zenkaku-region): Likewise.
 
 1998-06-20  Kenichi Handa  <handa@etl.go.jp>
 
-       * international/fontset.el (x-style-funcs-alist): If
-       x-make-font-demibold or x-make-font-bold return nil, don't try
+       * international/fontset.el (x-style-funcs-alist):
+       If x-make-font-demibold or x-make-font-bold return nil, don't try
        further style modification.
 
        * international/encoded-kb.el (encoded-kbd-self-insert-sjis):
        ethio-mode-map, and function ethio-mode.
        (exit-ethiopic-environment-data): New variable.
        (setup-ethiopic-environment): Recode information of changed key
-       bindings in exit-ethiopic-environment-data.  Add
-       ethio-select-a-translation to quail-mode-hook.
+       bindings in exit-ethiopic-environment-data.
+       Add ethio-select-a-translation to quail-mode-hook.
        (exit-ethiopic-environment): New function.
        (ethio-find-file): Don't check ethio-mode.
        (ethio-write-file): Likewise.
 
        * international/mule.el (set-auto-coding): Redo the previous change.
 
-       * tar-mode.el (tar-extract): Adjusted for the change of the spec
+       * tar-mode.el (tar-extract): Adjust for the change of the spec
        of set-auto-coding-function.
 
 1998-06-14  Richard Stallman  <rms@psilocin.ai.mit.edu>
        * faces.el (set-face-font): Pay attention to fontset.
        (set-face-font-auto): Call resolve-fontset-name.
 
-       * international/fontset.el (instantiate-fontset): Delete
-       duplicated call of x-complement-fontset-spec.  Call new-fontset
+       * international/fontset.el (instantiate-fontset):
+       Delete duplicated call of x-complement-fontset-spec.  Call new-fontset
        with a correct argument.
        (x-compose-font-name): Argument name adjusted for the doc-string.
        (x-complement-fontset-spec): Don't alter the contents of the
        (x-style-funcs-alist): The format changed.
        (x-modify-font-name): New function.
        (create-fontset-from-fontset-spec): The arg STYLE-VARIANT-P is
-       changed to STYLE-VARIANT, the format also changed.  Use
-       x-modify-font-name instead of calling functions in
+       changed to STYLE-VARIANT, the format also changed.
+       Use x-modify-font-name instead of calling functions in
        x-style-funcs-alist directly.
        (instantiate-fontset): Use x-modify-font-name instead of calling
        functions in x-style-funcs-alist directly.
 
 1998-06-09  Ed Reingold  <reingold@cs.uiuc.edu>
 
-       * calendar/cal-tex.el (cal-tex-list-diary-entries): Set
-       diary-display-hook correctly.
+       * calendar/cal-tex.el (cal-tex-list-diary-entries):
+       Set diary-display-hook correctly.
 
        * calendar/cal-menu.el (calendar-mouse-holidays)
        (calendar-mouse-view-diary-entries)
 
 1998-06-08  Andrew Innes  <andrewi@harlequin.co.uk>
 
-       * ange-ftp.el (ange-ftp-file-name-completion): Use
-       ange-ftp-this-dir instead of literal "/" when calling real
+       * ange-ftp.el (ange-ftp-file-name-completion):
+       Use ange-ftp-this-dir instead of literal "/" when calling real
        completion function.
 
 1998-06-08  Richard Stallman  <rms@psilocin.ai.mit.edu>
 
 1998-06-05  Andrew Innes  <andrewi@harlequin.co.uk>
 
-       * jka-compr.el (jka-compr-write-region): Ensure
-       `last-coding-system-used' is updated, so that basic-save-buffer
+       * jka-compr.el (jka-compr-write-region):
+       Ensure `last-coding-system-used' is updated, so that basic-save-buffer
        sees the right value.
 
 1998-06-05  Richard Stallman  <rms@gnu.org>
 
        * docref.el: Deleted in view of current approach to doc strings.
 
-       * startup.el (normal-top-level-add-subdirs-to-load-path): Ignore
-       CVS directories too.
+       * startup.el (normal-top-level-add-subdirs-to-load-path):
+       Ignore CVS directories too.
 
 1998-06-02  Richard Stallman  <rms@gnu.org>
 
 
 1998-06-01  Per Starbäck  <starback@update.uu.se>
 
-       * apropos.el (apropos-variable): Fixed argument to apropos-command.
+       * apropos.el (apropos-variable): Fix argument to apropos-command.
        (apropos-command): Let `var-predicate' have higher priority than
        `do-all'.
 
 1998-06-01  Dave Love  <fx@gnu.org>
 
        * textmodes/sgml-mode.el (sgml-font-lock-keywords-1): Add -. as
-       NMCHARs.  Elide upper case (see font-lock-defaults).  Generalize
-       comment declaration not to exclude markup.
+       NMCHARs.  Elide upper case (see font-lock-defaults).
+       Generalize comment declaration not to exclude markup.
 
 1998-05-31  Richard Stallman  <rms@gnu.org>
 
 
 1998-05-31  Alan Shutko  <shutkoa@ugsolutions.com>
 
-       * emacs-lisp/easy-mmode.el (easy-mmode-define-minor-mode): Add
-       missing format arg.
+       * emacs-lisp/easy-mmode.el (easy-mmode-define-minor-mode):
+       Add missing format arg.
 
 1998-05-30  Dave Love  <fx@gnu.org>
 
 1998-05-30  Michael Kifer  <kifer@cs.sunysb.edu>
 
        * ediff-mult.el (ediff-mark-for-hiding-at-pos)
-       (ediff-mark-for-operation-at-pos): Renamed from
+       (ediff-mark-for-operation-at-pos): Rename from
        ediff-mark-for-hiding, ediff-mark-for-operation.
        (ediff-mark-session-for-hiding, ediff-mark-session-for-operation)
-       (ediff-unmark-all-for-operation, ediff-unmark-all-for-hiding): New
-       functions.
-       (ediff-setup-meta-map): Changed bindings.
+       (ediff-unmark-all-for-operation, ediff-unmark-all-for-hiding):
+       New functions.
+       (ediff-setup-meta-map): Change bindings.
 
        * viper-cmd.el (viper-backward-Word, viper-skip-separators): Bugfix.
        (viper-switch-to-buffer, viper-switch-to-buffer-other-window): Bugfix.
        * viper-util.el (viper-skip-syntax): Bug fix for eob/bob cases.
-       * viper-mous.el (viper-surrounding-word): Added '_' to alpha modifiers.
+       * viper-mous.el (viper-surrounding-word): Add '_' to alpha modifiers.
 
 1998-05-30  Ralph Schleicher  <rs@purple.UL.BaWue.DE>
 
 
 1998-05-27  Ed Reingold  <reingold@cs.uiuc.edu>
 
-       * calendar/calendar.el (calendar-buffer-list): Add
-       other-calendars-buffer.
+       * calendar/calendar.el (calendar-buffer-list):
+       Add other-calendars-buffer.
        (calendar-mode): Use activate-menubar-hook only in a window system.
 
 1998-05-27  Dave Love  <fx@gnu.org>
        * emacs-lisp/byte-opt.el (byte-boolean-vars):
        Add print-escape-nonascii.
 
-       * emacs-lisp/autoload.el (generate-file-autoloads): Set
-       print-escape-nonascii when printing autoload form.
+       * emacs-lisp/autoload.el (generate-file-autoloads):
+       Set print-escape-nonascii when printing autoload form.
 
 1998-05-25  Kenichi HANDA  <handa@etl.go.jp>
 
-       * international/mule.el (set-coding-priority): Call
-       set-coding-priority-internal at the tail.
+       * international/mule.el (set-coding-priority):
+       Call set-coding-priority-internal at the tail.
 
 1998-05-24  Stephen Eglen  <stephen@cns.ed.ac.uk>
 
        Use translation-table, not character-translation-table,
        as char-table subtype.
        (define-translation-table):
-       Renamed from define-character-translation-table.
+       Rename from define-character-translation-table.
        * mule-util.el: Likewise.
        * mule-conf.el: Likewise.
        (standard-translation-table-for-decode)
        (standard-translation-table-for-encode):
-       Renamed from standard-character-translation-table-...
+       Rename from standard-character-translation-table-...
 
 1998-05-21  Richard Stallman  <rms@psilocin.ai.mit.edu>
 
 
 1998-05-21  Eli Zaretskii  <eliz@mescaline.gnu.org>
 
-       * arc-mode.el (archive-file-name-invalid-regexp): Remove.  All
-       users changed to use file-name-invalid-regexp instead.
+       * arc-mode.el (archive-file-name-invalid-regexp): Remove.
+       All users changed to use file-name-invalid-regexp instead.
        * files.el (file-name-invalid-regexp): New variable, moved here
        from arc-mode.el.
 
 1998-05-21  Richard Stallman  <rms@psilocin.ai.mit.edu>
 
        * progmodes/vhdl-mode.el (vhdl-customize-colors):
-       Renamed from vhdl-use-default-colors, and sense reversed.
+       Rename from vhdl-use-default-colors, and sense reversed.
        (vhdl-customize-faces):
-       Renamed from vhdl-use-default-faces, and sense reversed.
+       Rename from vhdl-use-default-faces, and sense reversed.
        (vhdl-font-lock-init, vhdl-ps-init): Implement those changes.
        (vhdl-submit-bug-report): Use new variable names.
 
        FONTLIST).
        (x-style-funcs-alist): New variable.
        (create-fontset-from-fontset-spec): 2nd optional arg is changed
-       from STYLE to STYLE-VARIANT-P.  The meaning also changed.  Delete
-       unused code.  Adjusted for the change of
+       from STYLE to STYLE-VARIANT-P.  The meaning also changed.
+       Delete unused code.  Adjusted for the change of
        uninstantiated-fontset-alist.
-       (instantiate-fontset): Adjusted for the change of
+       (instantiate-fontset): Adjust for the change of
        uninstantiated-fontset-alist.
 
        * international/mule.el (make-coding-system): If ISO2022 based
 
 1998-05-20  Kenichi Handa  <handa@etl.go.jp>
 
-       * international/fontset.el (x-font-name-charset-alist): New
-       variable.
+       * international/fontset.el (x-font-name-charset-alist):
+       New variable.
        (register-alternate-fontnames): Doc-string modified.
        (x-complement-fontset-spec): Likewise.
-       (x-complement-fontset-spec): Delete unused local variable.  Delete
-       ad hoc code for Latin-1, instead refer to
+       (x-complement-fontset-spec): Delete unused local variable.
+       Delete ad hoc code for Latin-1, instead refer to
        x-font-name-charset-alist.
        (uninstantiated-fontset-alist): Format changed (BASE-FONTSET ->
        FONTLIST).
        (x-style-funcs-alist): New variable.
        (create-fontset-from-fontset-spec): 2nd optional arg is changed
-       from STYLE to STYLE-VARIANT-P.  The meaning also changed.  Delete
-       unused code.  Adjusted for the change of
+       from STYLE to STYLE-VARIANT-P.  The meaning also changed.
+       Delete unused code.  Adjusted for the change of
        uninstantiated-fontset-alist.
-       (instantiate-fontset): Adjusted for the change of
+       (instantiate-fontset): Adjust for the change of
        uninstantiated-fontset-alist.
 
        * international/mule.el (make-coding-system): If ISO2022 based
        * international/mule-cmds.el: Several doc fixes.
        (get-language-info, set-language-info): Rename argument.
        (set-language-info-alist): Likewise.
-       (find-coding-systems-region-subset-p): Renamed from subset-p.
+       (find-coding-systems-region-subset-p): Rename from subset-p.
        (find-coding-systems-region): Use new name.
        (register-input-method): Rename argument.
        (activate-input-method): If INPUT-METHOD is nil, deactivate.
        (checkdoc-message-text-search, checkdoc-message-text-engine):
        New functions.
        (checkdoc-this-string-valid-engine):
-       Added ambiguous function/symbol checking.  Added new auto-fix
+       Add ambiguous function/symbol checking.  Added new auto-fix
        for missing parameters.
 
 1998-05-16  Richard Stallman  <rms@psilocin.ai.mit.edu>
 
        * international/mule-cmds.el (find-coding-systems-region-subset-p):
-       Renamed from subset-p.
+       Rename from subset-p.
        (find-coding-systems-for-charsets): Call changed.
 
 1998-05-16  Dan Nicolaescu  <done@ece.arizona.edu>
        Use expand-file-name on it.
 
        * files.el (temporary-file-directory):
-       Renamed from system-tmp-directory.
+       Rename from system-tmp-directory.
        Value is now a directory name, not a file name.
 
        * dired-aux.el (dired-mark-subdir-files): Doc fix.
        All callers changed.
        (archive-unique-fname): New function.
        (archive-maybe-copy): Use it.
-       (archive-maybe-copy, archive-write-file): Bind
-       coding-system-for-write to no-conversion.
-       (archive-maybe-update, archive-mode-revert): Bind
-       coding-system-for-read to no-conversion.
+       (archive-maybe-copy, archive-write-file):
+       Bind coding-system-for-write to no-conversion.
+       (archive-maybe-update, archive-mode-revert):
+       Bind coding-system-for-read to no-conversion.
        (archive-maybe-update): Remain at the same line in the archive
        listing, after updating the archive.  Print the buffer name of the
        archive to be saved.
        read-only.  Don't set buffer-file-type.  Remove the write-contents
        hook for remote archives.  Warn about read-only archives inside
        other archives.
-       (archive-write-file-member): Handle remote archives.  Restore
-       value of last-coding-system-used.
+       (archive-write-file-member): Handle remote archives.
+       Restore value of last-coding-system-used.
        (archive-*-write-file-member): Handle archives inside other
        archives.  Save the value of last-coding-system-used.
        (archive-write-file): New optional variable FILE: where to write
 
 1998-05-08  Richard Stallman  <rms@psilocin.gnu.org>
 
-       * ps-print.el (ps-alist-position): Renamed from ps-position.
+       * ps-print.el (ps-alist-position): Rename from ps-position.
        Look for ITEM as the car of an element.
        (ps-font-number): Use ps-alist-position.
-       (ps-font-alist): Renamed from ps-font-list.
+       (ps-font-alist): Rename from ps-font-list.
 
        * mail/reporter.el (reporter-bug-hook): Use rfc822-goto-eoh.
 
 
 1998-05-06  Sam Steingold  <sds@usa.net>
 
-       * window.el (quit-window): Fixed FRAME to be the frame and
+       * window.el (quit-window): Fix FRAME to be the frame and
        never window.
 
 1998-05-06  Michael Kifer  <kifer@cs.sunysb.edu>
 
        * ediff-init.el (ediff-highlight-all-diffs, ediff-use-faces):
-       Changed the defaults.
+       Change the defaults.
 
 1998-05-06  Richard Stallman  <rms@psilocin.gnu.org>
 
 
 1998-05-05  Simon Marshall  <simon@gnu.org>
 
-       * font-lock.el (lisp-font-lock-keywords-1): Fixed 1998-04-24 change;
+       * font-lock.el (lisp-font-lock-keywords-1): Fix 1998-04-24 change;
        moved defpackage to here from lisp-font-lock-keywords-2.
 
 1998-05-05  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
        Now checks for toolbar support before referring toolbars.
 
        * ediff-init.el (ediff-has-toolbar-support-p, ediff-use-toolbar-p):
-       Moved here from ???.
+       Move here from ???.
 
        * ediff-vers.el (cvs-run-ediff-on-file-descriptor):
        Set default-directory.
        * progmodes/compile.el (compilation-directory-stack): Doc fix.
        (compilation-mode): Accept optional parameter and initialize
        mode-name from it.
-       (compile-internal): Pass name-of-mode to compilation-mode.  Don't
-       set mode-name here.
+       (compile-internal): Pass name-of-mode to compilation-mode.
+       Don't set mode-name here.
        (compilation-minor-mode): Don't let mode-line-process change.
        (compilation-next-error-locus): Use forward-char instead of
        move-to-column.
 
 1998-05-02  Andre Spiegel  <spiegel@inf.fu-berlin.de>
 
-       * vc-hooks.el (vc-parse-cvs-status): Optimized.  Ignore
-       "Locally Removed" files.
+       * vc-hooks.el (vc-parse-cvs-status): Optimize.
+       Ignore "Locally Removed" files.
 
        * vc.el (vc-fetch-cvs-status): Don't specify DIR on the command line.
-       (vc-dired-hook): Optimized for CVS.
+       (vc-dired-hook): Optimize for CVS.
 
 1998-05-02  Richard Stallman  <rms@psilocin.gnu.org>
 
        (file-cache-add-directory): Checks to see if directory exists
        before adding it.  Non-existing directories are simply skipped.
 
-       * generic.el (generic): Added defgroup declaration.
+       * generic.el (generic): Add defgroup declaration.
        (generic-make-keywords-list): Uses regexp-opt.
        (generic-mode-set-font-lock): Uses regexp-opt.
 
-       * generic-x.el (generic-x): Added defgroup declaration.
+       * generic-x.el (generic-x): Add defgroup declaration.
 
-       * generic-x.el (generic-bat-mode-setup-function): Fixed comment-start
+       * generic-x.el (generic-bat-mode-setup-function): Fix comment-start
        variable.
 
-       * generic-x.el (generic-define-mswindows-modes): Enable
-       hosts-generic-mode and apache-generic-mode.
+       * generic-x.el (generic-define-mswindows-modes):
+       Enable hosts-generic-mode and apache-generic-mode.
        (generic-define-unix-modes): Enable alias-generic-mode.
-       (java-properties-generic-mode): Changed regexp to allow property
+       (java-properties-generic-mode): Change regexp to allow property
        and value to be separated by whitespace or an equal sign.
        (alias-generic-mode): Check generic-extras-enable-list before
        defining this mode.
        (universal-coding-system-argument): Use buffer-file-coding-system
        as default.
 
-       * international/quail.el (quail-show-translations): Show
-       followable keys in alphabetic order.
+       * international/quail.el (quail-show-translations):
+       Show followable keys in alphabetic order.
 
 1998-04-29  Richard Stallman  <rms@psilocin.gnu.org>
 
        (ispell-dictionary-alist): Now customizable.
        Fixed type of custom variables: ispell-help-in-bufferp.
        (ispell-use-framepop-p): New variable.
-       (ispell-dictionary-alist): Added dictionaries: castellano, castellano8
+       (ispell-dictionary-alist): Add dictionaries: castellano, castellano8
        czech, esperanto, esperanto-tex, norsk, russian.
        Capitalize XEmacs correctly, and change lucid to xemacs in code.
-       (ispell-menu-lucid): Renamed to ispell-menu-xemacs.
+       (ispell-menu-lucid): Rename to ispell-menu-xemacs.
        Changed string compares for version number to be correct for XEmacs.
        Fixed to work with string properties.
        (ispell-recursive-edit-marker): New marker saving return point.
 
 1998-04-28  Inge Frick  <inge@nada.kth.se>
 
-       * emacs-lisp/easymenu.el (easy-menu-define-key): Fixed bug with BEFORE
+       * emacs-lisp/easymenu.el (easy-menu-define-key): Fix bug with BEFORE
        argument.  Now it works also if you repeat an identical call to
        easy-menu-define-key.
 
 
        * emacs-lisp/cl-indent.el: Indent defpackage correctly.
 
-       * font-lock.el (lisp-font-lock-keywords-2): Added `defpackage'.
+       * font-lock.el (lisp-font-lock-keywords-2): Add `defpackage'.
 
 1998-04-23  Geoff Voelker  <voelker@cs.washington.edu>
 
        * easymenu.el: Use new menu item format.  Don't simulate button prefix.
        (easy-menu-create-menu): Understand also keywords :active,
        :label and :visible.  Don't worry about button prefix.
-       (easy-menu-button-prefix): Modified value.
+       (easy-menu-button-prefix): Modify value.
        (easy-menu-do-add-item): Extensive changes to use new menu item format.
        (easy-menu-define-key, easy-menu-always-true): New functions.
-       (easy-menu-make-symbol): Don't use indirection for symbols.  Property
-       `menu-alias' not set.
-       (easy-menu-filter, easy-menu-update-button): Deleted.
+       (easy-menu-make-symbol): Don't use indirection for symbols.
+       Property `menu-alias' not set.
+       (easy-menu-filter, easy-menu-update-button): Delete.
        (easy-menu-add-item): Don't worry about button prefix.
-       (easy-menu-remove-item): Don't worry about button prefix.  Use
-       `easy-menu-define-key'.
-       (easy-menu-is-button, easy-menu-have-button): Deleted.
-       (easy-menu-real-binding, easy-menu-change-prefix): Deleted.
+       (easy-menu-remove-item): Don't worry about button prefix.
+       Use `easy-menu-define-key'.
+       (easy-menu-is-button, easy-menu-have-button): Delete.
+       (easy-menu-real-binding, easy-menu-change-prefix): Delete.
 
 1998-04-23  Richard Stallman  <rms@psilocin.gnu.org>
 
 
 1998-04-22  Eli Zaretskii  <eliz@delysid.gnu.org>
 
-       * term/pc-win.el (x-select-text, x-get-selection-value): Replace
-       win16 with w16.
+       * term/pc-win.el (x-select-text, x-get-selection-value):
+       Replace win16 with w16.
 
 1998-04-22  Dave Love  <fx@gnu.org>
 
 
 1998-04-20  Piet van Oostrum  <piet@cs.ruu.nl>
 
-       * smtpmail.el (smtpmail-send-it): Deleted all code related
+       * smtpmail.el (smtpmail-send-it): Delete all code related
        to Resent-To: processing.
-       (smtpmail-deduce-address-list): Changed the search for
+       (smtpmail-deduce-address-list): Change the search for
        Resent-\(To\|Cc\|Bcc\) headers.
        (smtpmail-do-bcc): Delete Resent-Bcc: headers.
 
 
 1998-04-20  Kenichi Handa  <handa@etl.go.jp>
 
-       * international/ccl.el (ccl-compile-unify-character): Inhibit
-       unification tables specified by integer value.
+       * international/ccl.el (ccl-compile-unify-character):
+       Inhibit unification tables specified by integer value.
        (ccl-compile-translate-single-map): Likewise.
        (ccl-compile-multiple-map-function): Likewise.
-       (ccl-compile-translate-multiple-map): Modified for nested tables.
+       (ccl-compile-translate-multiple-map): Modify for nested tables.
        (ccl-dump-iterate-multiple-map): Handle the case that ID is not
        integer.
        (ccl-dump-translate-multiple-map): Likewise.
        * international/mule.el (make-coding-system): If TYPE is 4, FLAGS
        can be a cons of CCL-PROGRAM symbols.
 
-       * international/quail.el (quail-start-translation): Bind
-       prefix-arg to current-prefix-arg.
+       * international/quail.el (quail-start-translation):
+       Bind prefix-arg to current-prefix-arg.
        (quail-mode): Doc-string modified.
 
        * language/cyrillic.el: FLAGS arguments for make-coding-system
 
        * which-func.el (which-func): Add defgroup.
 
-       * emacs-lisp/checkdoc.el (checkdoc): Added :version.
+       * emacs-lisp/checkdoc.el (checkdoc): Add :version.
 
        * play/gametree.el (gametree): Likewise.
 
        (ange-ftp-file-name-all-completions): Handle Windows filenames.
        (file-name-handler-alist) [windows-nt]: Add patterns for name with
        drive letters.
-       (ange-ftp-dired-call-process, ange-ftp-call-chmod): Use
-       dired-chmod-program.
+       (ange-ftp-dired-call-process, ange-ftp-call-chmod):
+       Use dired-chmod-program.
        (ange-ftp-disable-netrc-security-check) [windows-nt]: Disable by
        default.
        (ange-ftp-real-expand-file-name-actual): New function.
        (cperl-beautify-levels): New command.
        (cperl-electric-keyword): Allow here-docs contain `=head1'
        and friends for keyword expansion.
-       Fix for broken `font-lock-unfontify-region-function'.  Should
-       preserve `syntax-table' properties even with `lazy-lock'.
+       Fix for broken `font-lock-unfontify-region-function'.
+       Should preserve `syntax-table' properties even with `lazy-lock'.
        (cperl-indent-region-fix-else): New command.
        (cperl-fix-line-spacing): New command.
        (cperl-invert-if-unless): New command (C-c C-t and in Menu).
        Workaround for another `font-lock's `syntax-table' text-property bug.
        `zerop' could be applied to nil.
        At last, may work with `font-lock' without setting `cperl-font-lock'.
-       (cperl-indent-region-fix-constructs): Renamed from
+       (cperl-indent-region-fix-constructs): Rename from
        `cperl-indent-region-fix-constructs'.
        (cperl-fix-line-spacing): Could be triggered inside strings, would not
        know what to do with BLOCKs of map/printf/etc.
        (cperl-set-style-back): Old value of style is memorized when
        choosing a new style, may be restored from the same menu.
        Mode-documentation added to micro-docs.
-       (cperl-praise): Updated.
+       (cperl-praise): Update.
        (cperl-toggle-construct-fix): New command.  Added on C-c C-w and menu.
-       (auto-fill-mode): Added on C-c C-f and menu.
+       (auto-fill-mode): Add on C-c C-f and menu.
        (cperl-style-alist): `PerlStyle' style added.
        (cperl-find-pods-heres): Message for termination of scan corrected.
        (cperl-speed): New variable with hints.
 
        * arc-mode.el (archive-extract-by-stdout): Don't use
        binary-process-output.  Bind coding-system-for-read `undecided',
-       so coding system is determined on the fly.  Bind
-       inherit-process-coding-system to t.
+       so coding system is determined on the fly.
+       Bind inherit-process-coding-system to t.
        (archive-dos-members): Remove.
        (archive-extract): Don't call archive-check-dos.  Handle pkunzip
        errors.
        * vc.el (vc-next-action-on-file): Don't check out after
        registering.  This is two steps instead of one, and the second
        does not make sense under CVS.
-       (vc-next-action): Changed doc string to reflect the above.
+       (vc-next-action): Change doc string to reflect the above.
 
 1998-04-14  Andreas Schwab  <schwab@mescaline.gnu.org>
 
 
 1998-04-09  Andre Spiegel  <spiegel@inf.fu-berlin.de>
 
-       * vc.el (vc-next-action): Fixed bug that prevented registering
+       * vc.el (vc-next-action): Fix bug that prevented registering
        files using C-x v v.
 
 1998-04-09  Stephen Eglen  <stephen@gnu.org>
 
        * gud.el (jdb): Do proper analysis of classes defined in a Java
        source.  This removes the restriction of one class per file.
-       (gud-jdb-package-of-file): Removed.  Replaced with parsing routines.
+       (gud-jdb-package-of-file): Remove.  Replaced with parsing routines.
        (gud-jdb-skip-whitespace): New function.
        (gud-jdb-skip-single-line-comment): New function.
        (gud-jdb-skip-traditional-or-documentation-comment): New function.
        (fortran-mode): Make `fill-column' buffer-local; set
        `fill-paragraph-function', `indent-region-function',
        `indent-line-function'.
-       (calculate-fortran-indent): Renamed to `fortran-calculate-indent'.
+       (calculate-fortran-indent): Rename to `fortran-calculate-indent'.
        (fortran-split-line): Simplify.
        (fortran-remove-continuation): New function.
        (fortran-join-line): Use it.
        * language/japanese.el: Set exit-function to
        exit-japanese-environment for Japanese environment.
 
-       * language/japan-util.el (setup-japanese-environment): Setup
-       sentence-end suitable for Japanese text.
+       * language/japan-util.el (setup-japanese-environment):
+       Setup sentence-end suitable for Japanese text.
        (exit-japanese-environment): New function.
 
-       * international/mule-cmds.el (subset-p): Renamed from
+       * international/mule-cmds.el (subset-p): Rename from
        find-safe-coding-system-list-subset-p.
-       (find-coding-systems-region, find-coding-systems-string): New
-       functions.
-       (find-coding-systems-for-charsets): Renamed from
+       (find-coding-systems-region, find-coding-systems-string):
+       New functions.
+       (find-coding-systems-for-charsets): Rename from
        find-safe-coding-system.  This is now a helper function of the
        above two.
-       (select-safe-coding-system): Adjusted for the above changes.
+       (select-safe-coding-system): Adjust for the above changes.
 
 1998-04-05  Per Abrahamsen  <abraham@dina.kvl.dk>
 
        hook, not a local variable.
 
        * vc.el (vc-merge, vc-backend-merge): New functions.
-       (vc-resolve-conflicts): Added optional parameters for buffer names.
+       (vc-resolve-conflicts): Add optional parameters for buffer names.
        (vc-branch-p): New function.
 
-       * vc-hooks.el (vc-prefix-map): Added "m" for vc-merge.
+       * vc-hooks.el (vc-prefix-map): Add "m" for vc-merge.
 
        * vc.el (vc-ensure-vc-buffer): New function.
-       (vc-registration-error): Replaced by the above.  Updated all callers.
-       (file-executable-p-18, file-regular-p-18): Removed.
+       (vc-registration-error): Replace by the above.  Updated all callers.
+       (file-executable-p-18, file-regular-p-18): Remove.
 
 1998-04-05  Richard Stallman  <rms@psilocin.gnu.org>
 
 1998-04-03  Andre Spiegel  <spiegel@inf.fu-berlin.de>
 
        * vc-hooks.el (vc-parse-cvs-status): New function.
-       (vc-fetch-master-properties): Moved cvs status retrieval to
+       (vc-fetch-master-properties): Move cvs status retrieval to
        the above.
        (vc-backend): If a file is not registered, remember that by setting
        the property to `none'.
        (vc-name): Use the mechanism of vc-backend to compute the value.
        (vc-after-save): Don't access vc-backend property directly.
 
-       * vc.el (vc-next-action-dired): Use dired-do-redisplay.  Handle
-       window configuration correctly.
+       * vc.el (vc-next-action-dired): Use dired-do-redisplay.
+       Handle window configuration correctly.
        (vc-next-action): Save window configuration for vc-next-action-dired.
        (vc-finish-logentry): Only kill log buffer if it does exist.
        (vc-dired-mode): Rewritten so that it works entirely through
        ordinary dired.
        (vc-dired-hook): New function.
        (vc-state-info, vc-dired-reformat-line): Adapted.
-       (vc-dired-update, vc-dired-update-line): Removed.
+       (vc-dired-update, vc-dired-update-line): Remove.
        (vc-directory): Rewritten.
-       (vc-directory-18): Removed.
+       (vc-directory-18): Remove.
        (vc-dired-mark-locked): New function, bound to "*l" in vc-dired-mode.
        (vc-do-command): Only compute vc-name if it is really needed.
        (vc-fetch-cvs-status): New function.
 
        * help.el: Make hyperlinks for cross-reference info intuited from
        *Help* buffer.
-       (help-font-lock-keywords): Removed.
+       (help-font-lock-keywords): Remove.
        (help-mode-map): Define keys for navigating hyperlinks.
        (help-xref-stack, help-xref-stack-item): New permanent-local
        variables.
        New variables.
        (help-setup-xref, help-make-xrefs, help-xref-button)
        (help-xref-interned, help-xref-mode, help-follow-mouse)
-       (help-xref-go-back, help-go-back, help-follow, help-next-ref): New
-       functions.
+       (help-xref-go-back, help-go-back, help-follow, help-next-ref):
+       New functions.
 
 1998-04-02  Richard Stallman  <rms@psilocin.gnu.org>
 
        (iswitchb-complete): Use iswitchb-common-match-string rather than
        recomputing the value.
        (iswitchb-toggle-ignore): Recompute list of buffers.
-       (iswitchb-init-XEmacs-trick): Renamed from iswitchb-init-Xemacs-trick.
+       (iswitchb-init-XEmacs-trick): Rename from iswitchb-init-Xemacs-trick.
 
 1998-03-31  Andre Spiegel  <spiegel@inf.fu-berlin.de>
 
 
 1998-03-25  Simon Marshall  <simon@gnu.org>
 
-       * font-lock.el (c-font-lock-keywords-2): Added "sizeof".
-       (c++-font-lock-keywords-2): Added "export" and "typename".
+       * font-lock.el (c-font-lock-keywords-2): Add "sizeof".
+       (c++-font-lock-keywords-2): Add "export" and "typename".
 
        * lazy-lock.el (lazy-lock-fontify-after-scroll)
        (lazy-lock-fontify-after-trigger): Use new window-end UPDATE arg
 
 1998-03-23  Andreas Schwab  <schwab@gnu.org>
 
-       * xt-mouse.el (xterm-mouse-translate, xterm-mouse-event): Replace
-       obsolete `concat with integer' by format.
+       * xt-mouse.el (xterm-mouse-translate, xterm-mouse-event):
+       Replace obsolete `concat with integer' by format.
 
        * rsz-mini.el (resize-minibuffer-mode): Make it a proper minor
        mode: toggle resize-minibuffer mode when called without argument.
 
 1998-03-22  Johan Vromans  <jvromans@squirrel.nl>
 
-       * complete.el (PC-expand-many-files): Apply
-       completion-ignored-extensions.
+       * complete.el (PC-expand-many-files):
+       Apply completion-ignored-extensions.
 
 1998-03-21  Richard Stallman  <rms@psilocin.gnu.org>
 
        when user tries to check-in, but file on disk has changed.
        (vc-do-command): Rewrote doc string.  Consider LAST argument
        only if FILE is non-nil.
-       (vc-add-triple, vc-record-rename, vc-lookup-file): Find
-       vc-name-assoc-file based on vc-name of FILE.
+       (vc-add-triple, vc-record-rename, vc-lookup-file):
+       Find vc-name-assoc-file based on vc-name of FILE.
        (vc-backend-admin, vc-rename-file): Handle the SCCS PROJECTDIR
        feature.
 
 
 1998-03-18  Dave Love  <fx@gnu.org>
 
-       * emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Adjust
-       paragraph-start in default filling case so that filling doc
+       * emacs-lisp/lisp-mode.el (lisp-fill-paragraph):
+       Adjust paragraph-start in default filling case so that filling doc
        strings works.
 
 1998-03-18  Andre Spiegel  <spiegel@inf.fu-berlin.de>
 1998-03-16  Peter Breton  <pbreton@ne.mediaone.net>
 
        * generic-x.el: Customize.
-       (fvwm-generic-mode): Added new keywords, and .fvwm2rc config file.
-       (ini-generic-mode): Changed regexps so that value can contain equal signs.
-       (java-manifest-generic-mode): Added new keywords.
+       (fvwm-generic-mode): Add new keywords, and .fvwm2rc config file.
+       (ini-generic-mode): Change regexps so that value can contain equal signs.
+       (java-manifest-generic-mode): Add new keywords.
 
 1998-03-16  Alfred Correira  <ACorreir@pervasive-sw.com>
 
        * locate.el (locate-current-line-number): No longer interactive.
 
        * dirtrack.el: Customized.
-       (dirtrack-forward-slash): Renamed from `forward-slash'.
-       (dirtrack-backward-slash): Renamed from `backward-slash'.
-       (dirtrack-replace-slash): Renamed from `replace-slash'.
+       (dirtrack-forward-slash): Rename from `forward-slash'.
+       (dirtrack-backward-slash): Rename from `backward-slash'.
+       (dirtrack-replace-slash): Rename from `replace-slash'.
 
        * emacs-lisp/elp.el (elp-version): Now 3.2.
 
        (undo-start): New args BEG and END.
        (undo): If arg or active region, pass args to undo-start.
 
-       * mouse.el (mouse-buffer-menu-maxlen): Renamed from
+       * mouse.el (mouse-buffer-menu-maxlen): Rename from
        mouse-menu-buffer-maxlen.
 
 1998-03-10  Eric M. Ludlam  <zappo@ultranet.com>
 
-       * checkdoc.el (checkdoc-continue): Removed check for doc string.
+       * checkdoc.el (checkdoc-continue): Remove check for doc string.
        (checkdoc-this-string-valid-engine): Smarter keycode check regexp.
 
 1998-03-10  Carsten Dominik  <cd@delysid.gnu.org>
 
-       * textmodes/reftex.el (reftex-mode-map): Added keybinding for
+       * textmodes/reftex.el (reftex-mode-map): Add keybinding for
        `reftex-mouse-view-crossref' to `S-mouse-2'.
 
 1998-03-09  Carsten Dominik  <cd@delysid.gnu.org>
 1998-03-08  Carsten Dominik  <cd@gnu.org>
 
        * textmodes/reftex.el (reftex-offer-label-menu)
-       (reftex-select-item): Removed match-everywhere interpretation.
+       (reftex-select-item): Remove match-everywhere interpretation.
 
 1998-03-08  Carsten Dominik  <cd@gnu.org>
 
        (vc-resynch-buffer): When operating on the current buffer, don't use
        save-excursion, because that would undo the effects of the above
        functions.
-       (vc-clear-headers): Fixed regexp.
-       (vc-resynch-window): Deleted code that removed vc-find-file-hook
+       (vc-clear-headers): Fix regexp.
+       (vc-resynch-window): Delete code that removed vc-find-file-hook
        temporarily.  This was unnecessary, because find-file-hooks are not
        called when the buffer is reverted.
 
 
 1998-03-07  Richard Stallman  <rms@psilocin.gnu.org>
 
-       * subr.el (read-passwd): Renamed from read-password.
+       * subr.el (read-passwd): Rename from read-password.
        New second arg CONFIRM.
 
        * wid-edit.el (widget-choice-value-create): If there is an
        * dos-fns.el, find-file.el, follow.el, ispell4.el, shadowfile.el:
        * tempo.el, tmm.el, vcursor.el, xscheme.el: Customize.
 
-1998-03-06  Barry A. Warsaw  <cc-mode-help@python.org>
+1998-03-06  Barry A. Warsaw  <bwarsaw@cnri.reston.va.us>
 
        * Release 5.21
 
        * progmodes/cc-engine.el (c-inside-bracelist-p): Fix for enum test.
 
        * progmodes/cc-mode.el (c-initialize-cc-mode):
-       Moved require's to top level.
+       Move require's to top level.
 
        * progmodes/cc-cmds.el (c-fill-paragraph):
        Bind fill-paragraph-function to nil when calling fill-paragraph,
        the same relative position.  Fill comment before point if there's
        nothing else on the same line.  Fill block comments after code a
        little better.  Try harder to find a good fill-prefix when point
-       is on a block comment ender line.  Use
-       c-Java-javadoc-paragraph-start in block comments in Java mode.
+       is on a block comment ender line.
+       Use c-Java-javadoc-paragraph-start in block comments in Java mode.
        Leave block comment ender alone when c-hanging-comment-ender-p is
        nil and point is on that line.  Detect paragraph-separate in
        multiparagraph comments.  Fix for bug that may strip the `*' off
        always bol.  It's always bol when on the top level, however.
        Changed cases: 5A.5, 5I, 14A.
 
-       * progmodes/cc-engine.el (c-forward-token-1, c-backward-token-1): New
-       functions to move by tokens.
+       * progmodes/cc-engine.el (c-forward-token-1, c-backward-token-1):
+       New functions to move by tokens.
        (c-guess-basic-syntax): Fixes for Java 1.1 array initialization
        brace lists.
 
 
 1998-03-06  Kenichi Handa  <handa@etl.go.jp>
 
-       * international/titdic-cnv.el (titdic-convert): Use
-       set-buffer-multibyte.
+       * international/titdic-cnv.el (titdic-convert):
+       Use set-buffer-multibyte.
 
        * international/quail.el (quail-defrule-internal): New arg REPLACE.
        (quail-defrule): Call quail-defrule-internal with REPLACE t.
 
 1998-03-05  Peter Breton  <pbreton@ne.mediaone.net>
 
-       * generic.el (generic-mode-ini-file-find-file-hook): Use
-       and-s instead of if-s.
-       (generic-use-find-file-hook): Changed from defvar to defcustom.
-       (generic-lines-to-scan): Changed from defvar to defcustom.
-       (generic-find-file-regexp): Changed from defvar to defcustom.
+       * generic.el (generic-mode-ini-file-find-file-hook):
+       Use and-s instead of if-s.
+       (generic-use-find-file-hook): Change from defvar to defcustom.
+       (generic-lines-to-scan): Change from defvar to defcustom.
+       (generic-find-file-regexp): Change from defvar to defcustom.
 
 1998-03-05  Ivar Rummelhoff  <ivarr@ifi.uio.no>
 
        configuration if the same command (changing the window
        configuration) is applied several times in a row.
 
-       * winner.el (winner-switch): Removed the command
+       * winner.el (winner-switch): Remove the command
        `winner-switch' (and the variables connected to it), since
        because of the change above, any "switching package" may now
        be used without disturbing winner-mode too much.
 
        * winner.el: Use list syntax for key definitions.
 
-       * winner.el (winner-change-fun): Removed the pushnew
+       * winner.el (winner-change-fun): Remove the pushnew
        command, so that `cl' will not have to be loaded.
 
        * winner.el (winner-set-conf): Introduced "wrapper" around
 
        * subr.el (sref): Typo in doc-string fixed.
 
-       * international/mule-cmds.el (set-default-coding-systems): Set
-       default-file-name-coding-system.  Doc-string modified.
+       * international/mule-cmds.el (set-default-coding-systems):
+       Set default-file-name-coding-system.  Doc-string modified.
        (prefer-coding-system): Doc-string modified.
 
-       * language/japan-util.el (setup-japanese-environment): Set
-       default-file-name-coding-system to japanese-iso-8bit.
+       * language/japan-util.el (setup-japanese-environment):
+       Set default-file-name-coding-system to japanese-iso-8bit.
 
 1998-03-02  Richard Stallman  <rms@psilocin.gnu.org>
 
 1998-03-01  Peter Breton  <pbreton@ne.mediaone.net>
 
        * locate.el (locate-update): New function.
-       (locate-current-line-number): Renamed from `current-line'.
+       (locate-current-line-number): Rename from `current-line'.
        (locate-default-make-command-line): Use list, not cons.
-       (locate): Added a `save-window-excursion' form.
+       (locate): Add a `save-window-excursion' form.
        (locate): Used an `apply' form for the start-process call.
        (locate-mode): Now has a `revert-buffer-function'.
        (locate-do-setup): Now longer deletes window.
        (locate-header-face): Use underline, not region.
        (locate-update-command): New option.
-       (locate-command): Changed from defvar to defcustom.
-       (locate-make-command-line): Changed from defvar to defcustom.
-       (locate-fcodes-file): Changed from defvar to defcustom.
-       (locate-mouse-face): Changed from defvar to defcustom.
+       (locate-command): Change from defvar to defcustom.
+       (locate-make-command-line): Change from defvar to defcustom.
+       (locate-fcodes-file): Change from defvar to defcustom.
+       (locate-mouse-face): Change from defvar to defcustom.
 
 1998-02-28  Richard Stallman  <rms@psilocin.gnu.org>
 
 1998-02-27  Karl Heuer  <kwzh@gnu.org>
 
        * dired-x.el (dired-do-toggle): Function moved to dired.el.
-       * dired.el (dired-do-toggle): Moved here from dired-x.el.
-       (dired-mode-map): Changed dired-do-toggle from "T" to "t".
+       * dired.el (dired-do-toggle): Move here from dired-x.el.
+       (dired-mode-map): Change dired-do-toggle from "T" to "t".
 
 1998-02-27  Carsten Dominik  <dominik@strw.LeidenUniv.nl>
 
        (custom-save-delete): Use it.
        (custom-save-all): Use it.
 
-       * shell.el (shell-dirtrack-mode): Renamed from shell-dirtrack-toggle.
-       (dirtrack-mode, shell-dirtrack-toggle): Defined as aliases.
+       * shell.el (shell-dirtrack-mode): Rename from shell-dirtrack-toggle.
+       (dirtrack-mode, shell-dirtrack-toggle): Define as aliases.
 
 1998-02-25  Carsten Dominik  <dominik@strw.LeidenUniv.nl>
 
        * textmodes/reftex.el (reftex-toc-mode, reftex-select-label-mode)
        (reftex-select-bib-mode): New major modes for RefTeX's special buffers.
        (reftex-offer-label-menu): Put selection buffer into
-       `reftex-select-label-mode'.  Make selection buffer read-only.  Use
-       `reftex-erase-buffer'.
+       `reftex-select-label-mode'.  Make selection buffer read-only.
+       Use `reftex-erase-buffer'.
        (reftex-do-citation): Put selection buffer into
-       `reftex-select-bib-mode'.  Make selection buffer read-only.  Use
-       `reftex-erase-buffer'.  Set `reftex-select-return-marker'.
-       (reftex-toc): Put *toc* buffer into reftex-toc-mode.  Add
-       mouse-face property.
+       `reftex-select-bib-mode'.  Make selection buffer read-only.
+       Use `reftex-erase-buffer'.  Set `reftex-select-return-marker'.
+       (reftex-toc): Put *toc* buffer into reftex-toc-mode.
+       Add mouse-face property.
        (reftex-select-item): Use recursive edit instead of selfmade
        command loop.  Removed unnecessary local bindings.  Changed the
        tag for catch, to avoid problems with `exit' tag in
        (reftex-select-search-backward, reftex-select-search)
        (reftex-select-scroll-up, reftex-select-scroll-down)
        (reftex-scroll-other-window, reftex-scroll-other-window-down)
-       (reftex-empty-toc-buffer): Removed obsolete functions.
-       (reftex-highlight-overlays): Removed obsolete 3rd overlay.
-       (reftex-select-label-map, reftex-select-bib-map): Removed obsolete
+       (reftex-empty-toc-buffer): Remove obsolete functions.
+       (reftex-highlight-overlays): Remove obsolete 3rd overlay.
+       (reftex-select-label-map, reftex-select-bib-map): Remove obsolete
        bindings, added mouse bindings, `digit-argument',
        `negative-argument', `reftex-select-show-insertion-point'.
        (reftex-erase-buffer): BUFFER now defaults to current buffer.
-       (reftex-label-alist-builtin): Added sidecap packages support.
+       (reftex-label-alist-builtin): Add sidecap packages support.
        (reftex-last-follow-point, reftex-select-return-marker): New variables.
        (reftex-toc, reftex-select-item): Set `reftex-last-follow-point'.
        (reftex-toc-post-command-hook): Use `reftex-last-follow-point'.
 
        * font-lock.el (font-lock-constant-face): Variable and face renamed
        from font-lock-reference-face.
-       (font-lock-reference-face): Changed value to font-lock-constant-face.
+       (font-lock-reference-face): Change value to font-lock-constant-face.
 
        * add-log.el:
        * dired.el:
 1998-02-19  Kenichi Handa  <handa@etl.go.jp>
 
        * international/mule.el
-       (after-insert-file-set-buffer-file-coding-system): Call
-       set-buffer-multibyte instead of directly setting
+       (after-insert-file-set-buffer-file-coding-system):
+       Call set-buffer-multibyte instead of directly setting
        enable-multibyte-characters to nil.
 
-       * language/china-util.el (setup-chinese-cns-environment): Correct
-       the setting of default-input-method.
+       * language/china-util.el (setup-chinese-cns-environment):
+       Correct the setting of default-input-method.
 
        * international/mule-cmds.el (select-safe-coding-system): Kill the
        warning buffer before returning.
        * info-look.el (info-complete): Rewrite minibuffer completion code.
 
        * info-look.el (info-lookup-minor-mode, turn-on-info-lookup):
-       Added minor mode interface.
+       Add minor mode interface.
        (info-lookup-minor-mode-string): New variable.
        (info-lookup-minor-mode-map): New variable.
 
        (info-lookup-highlight-face): Variables customized.
 
        * info-look.el (info-lookup-alist): No longer customizable.
-       (info-lookup-add-help, info-lookup-maybe-add-help): Interface
-       functions for adding new modes.
+       (info-lookup-add-help, info-lookup-maybe-add-help):
+       Interface functions for adding new modes.
        (info-lookup-add-help*): New function.
        (info-lookup-symbol-alist, info-lookup-file-alist): Variables deleted.
        This info is specified now by calling info-lookup-maybe-add-help
        `parse-partial-sexp' contains the starting pos of the last
        literal.
 
-1998-02-16  Barry A. Warsaw  <cc-mode-help@python.org>
+1998-02-16  Barry A. Warsaw  <bwarsaw@cnri.reston.va.us>
 
-       * progmodes/cc-mode.el (c-mode, c++-mode, objc-mode, java-mode): Set
-       imenu-case-fold-search to nil.
+       * progmodes/cc-mode.el (c-mode, c++-mode, objc-mode, java-mode):
+       Set imenu-case-fold-search to nil.
 
        * progmodes/cc-langs.el (c-postprocess-file-styles): If a file
        style or file offsets are set, make the variables local to the
        * progmodes/cc-defs.el (c-point): In XEmacs, use scan-lists +
        buffer-syntactic-context-depth.
 
-       * progmodes/cc-vars.el (c-enable-xemacs-performance-kludge-p): New
-       variable.
+       * progmodes/cc-vars.el (c-enable-xemacs-performance-kludge-p):
+       New variable.
 
        * progmodes/cc-cmds.el, progmodes/cc-engine.el (c-beginning-of-defun)
        (c-indent-defun, c-parse-state): Use (c-point 'bod) instead of
        * progmodes/cc-align.el (c-semi&comma-no-newlines-before-nonblanks)
        (c-semi&comma-no-newlines-for-oneline-inliners): New functions.
 
-       * progmodes/cc-engine.el (c-guess-basic-syntax): Fixed a few byte
+       * progmodes/cc-engine.el (c-guess-basic-syntax): Fix a few byte
        compiler warnings.
 
        * progmodes/cc-cmds.el (c-beginning-of-defun, c-end-of-defun):
 
        * progmodes/cc-langs.el (c-java-method-key): Variable deleted.
 
-       * progmodes/cc-mode.el (java-mode): Set c-method-key to nil.  I
-       don't think this is necessary for Java, and besides, the old value
+       * progmodes/cc-mode.el (java-mode): Set c-method-key to nil.
+       don't think this is necessary for Java, and besides, the old value
        was inherited from Objective-C which was clearly not right.
 
        * progmodes/cc-cmds.el (c-electric-colon): Don't insert newlines
        * progmodes/cc-cmds.el (c-electric-brace): namespace-open and
        namespace-close braces can hang.
 
-       * progmodes/cc-defs.el (c-emacs-features): Added autoload cookie.
+       * progmodes/cc-defs.el (c-emacs-features): Add autoload cookie.
 
-       * progmodes/cc-engine.el (c-search-uplist-for-classkey): When
-       searching up for a class key, instead of hardcoding the extended
+       * progmodes/cc-engine.el (c-search-uplist-for-classkey):
+       When searching up for a class key, instead of hardcoding the extended
        search for "extern", use the new variable c-extra-toplevel-key,
        which is language dependent.  For C++, this variable includes the
        keyword "namespace" which will match C++ namespace introducing
 
        CASE 3: we can now determine whether we're at the beginning of a
        cpp macro definition, or inside the middle of one.  Set syntax to
-       'cpp-macro in the former case, 'cpp-macro-cont in the latter.  In
-       both cases, the relpos is the beginning of the macro.
+       'cpp-macro in the former case, 'cpp-macro-cont in the latter.
+       In both cases, the relpos is the beginning of the macro.
 
-       (c-forward-syntactic-ws): Added code that skips forward over
+       (c-forward-syntactic-ws): Add code that skips forward over
        multi-line cpp macros.
 
-       (c-beginning-of-macro): Moved, and made into a defsubst.  This
-       function can now actually find the beginning of a multi-line C
+       (c-beginning-of-macro): Move, and made into a defsubst.
+       This function can now actually find the beginning of a multi-line C
        preprocessor macro.
 
        (c-backward-syntactic-ws): Use c-beginning-of-macro to skip
        (c-initialize-on-load): New variable, *not* customized.
 
        * progmodes/cc-styles.el (c-offsets-alist): Three new syntactic
-       symbols: innamespace, namespace-open, namespace-close.  These
-       support C++ namespace blocks.
+       symbols: innamespace, namespace-open, namespace-close.
+       These support C++ namespace blocks.
        Also, new syntactic symbol cpp-macro-cont, by default bound to
        c-lineup-dont-change.  This symbol is assigned to subsequent lines
        of a multi-line C preprocess macro definition.
        Introduce the new default style "user" which contains all user
        customizations.
 
-       * progmodes/cc-vars.el (c-default-style): Renamed from
+       * progmodes/cc-vars.el (c-default-style): Rename from
        c-site-default-style.
 
 1998-02-15  Aki Vehtari  <Aki.Vehtari@hut.fi>
        `bibtex-autokey-before-presentation-function' as it is not hook.
        (bibtex-autokey-get-namefield): Remove newlines unconditionally.
 
-       * bibtex.el (bibtex-autokey): Fixed prefix.
+       * bibtex.el (bibtex-autokey): Fix prefix.
        (bibtex-user-optional-fields): Better `:type'.
        (bibtex-autokey-names): Better `:type' and doc-fix.
        (bibtex-mark-active): New function, taking care of Emacs variants.
        (bibtex-run-with-idle-timer): Ditto.
        (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'.
-       (bibtex-autokey-get-yearfield): Changed to accept year when year
+       (bibtex-autokey-get-yearfield): Change to accept year when year
        field has field-delimiters.  This is quick fix, there might
        be better solution.
        (bibtex-mode): Don't call idle timer with 0 seconds.
 
 1998-02-15  Dirk Herrmann  <D.Herrmann@tu-bs.de>
 
-       * bibtex.el (bibtex-autokey-get-yearfield): Fixed problem with
+       * bibtex.el (bibtex-autokey-get-yearfield): Fix problem with
        parsing the year field.
 
        * bibtex.el (bibtex-comment-start): Font locking for comments added.
        * bibtex.el (bibtex-autokey-get-titles): Non capitalized title words
        are used for key generation as well.
        (bibtex-member-of-regexp): Case is honored for matches now.
-       (bibtex-autokey-titleword-ignore): Added entries provide compatibility
+       (bibtex-autokey-titleword-ignore): Add entries provide compatibility
        to former behavior.
 
        * bibtex.el (bibtex-autokey-titleword-ignore): Title words found in
        (info-look-completion): New variable.
 
        * info-look.el (info-lookup-symbol-alist):
-       Added support for latex-mode, perl-mode, awk-mode, emacs-lisp-mode.
+       Add support for latex-mode, perl-mode, awk-mode, emacs-lisp-mode.
 
 1998-02-13  Richard Stallman  <rms@psilocin.gnu.org>
 
 
 1998-02-12  Dave Love  <fx@gnu.org>
 
-       * progmodes/scheme.el (scheme-imenu-generic-expression): Simplify
-       regexps.
+       * progmodes/scheme.el (scheme-imenu-generic-expression):
+       Simplify regexps.
        (dsssl-imenu-generic-expression): Likewise.
        (scheme-mode-variables): Set imenu-syntax-alist.
-       (dsssl-mode): Remove `!' from font-lock-defaults.  Set
-       imenu-syntax-alist.
+       (dsssl-mode): Remove `!' from font-lock-defaults.
+       Set imenu-syntax-alist.
 
 1998-02-11  Richard Stallman  <rms@psilocin.gnu.org>
 
 
        * international/kinsoku.el: Use aref instead of sref.
 
-       * international/mule-cmds.el (find-safe-coding-system): Return
-       undecided if FROM == TO.
+       * international/mule-cmds.el (find-safe-coding-system):
+       Return undecided if FROM == TO.
        (select-safe-coding-system): Doc-string modified.
 
-       * international/mule-util.el (compose-chars-component): Return
-       result as unibyte string.
+       * international/mule-util.el (compose-chars-component):
+       Return result as unibyte string.
        (decompose-composite-char): Doc-string modified.
 
        * international/titdic-cnv.el: Many codes re-written to adjust for
 
 1998-02-02  Dan Nicolaescu  <done@ece.arizona.edu>
 
-       * progmodes/hideshow.el (hs-special-modes-alist): Enhanced java
+       * progmodes/hideshow.el (hs-special-modes-alist): Enhance java
        regexp.
 
 1998-02-02  Richard Stallman  <rms@psilocin.gnu.org>
 
 1998-02-01  Richard Stallman  <rms@psilocin.gnu.org>
 
-       * emacs-lisp/easy-mmode.el (easy-mmode-define-minor-mode): Fix
-       the doc strings used for the mode flag variable and the keymap.
+       * emacs-lisp/easy-mmode.el (easy-mmode-define-minor-mode):
+       Fix the doc strings used for the mode flag variable and the keymap.
        Delete duplicate &optional's.
 
        * emacs-lisp/edebug.el: Doc fixes.
 
 1998-02-01  Dan Nicolaescu  <done@ece.arizona.edu>
 
-       * hideshow.el (hs-special-modes-alist): Improved the regexp for java.
+       * hideshow.el (hs-special-modes-alist): Improve the regexp for java.
 
        * isearch.el (isearch-range-invisible): Avoid infinite loop when
        search-invisible is nil.
        * fortran.el: Various docstring and commentary fixes, including
        note of current maintainer.
        (fortran-mode): Use imenu-syntax-alist.
-       (fortran-imenu-generic-expression): Use
-       fortran-continuation-string, not always `+'.
+       (fortran-imenu-generic-expression):
+       Use fortran-continuation-string, not always `+'.
        (fortran-font-lock-keywords-1): Include symbol syntax as well as
        word, following syntax table changes.
        (fortran-imenu-generic-expression): Likewise.
        (fortran-mode-version, fortran-startup-message): Delete misleading
        variables.
        (fortran-mode): Don't use them.
-       (fortran-column-ruler-fixed, fortran-column-ruler-tab): Fix
-       leading \ which made `0' into null.
+       (fortran-column-ruler-fixed, fortran-column-ruler-tab):
+       Fix leading \ which made `0' into null.
        (fortran-join-line): New function and key binding.
        (fortran-narrow-to-subprogram): New function and key binding.
        (fortran-mode-syntax-table): Make ?., ?_, ?$ symbol, not word.
 
 1998-01-29  Carsten Dominik  <dominik@strw.LeidenUniv.nl>
 
-       * textmodes/reftex.el (reftex-toc): Fixed bug with split-window.  Using
-       split-window instead of split-window-vertically.
-       (reftex-reset-mode): Removed obsolete buffer from kill list.
-       (reftex-make-and-insert-label-list, reftex-do-citation): Delete
-       other windows before displaying selection.
-       (reftex-cite-format-builtin): Fixed bug in Chicago format.
+       * textmodes/reftex.el (reftex-toc): Fix bug with split-window.
+       Using split-window instead of split-window-vertically.
+       (reftex-reset-mode): Remove obsolete buffer from kill list.
+       (reftex-make-and-insert-label-list, reftex-do-citation):
+       Delete other windows before displaying selection.
+       (reftex-cite-format-builtin): Fix bug in Chicago format.
        (reftex-enlarge-to-fit): New function.
-       (reftex-nicify-text): Cut context-string at \item,\\.  Changed
-       match sequence for efficiency reasons.
+       (reftex-nicify-text): Cut context-string at \item,\\.
+       Changed match sequence for efficiency reasons.
        (reftex-parse-from-file): Include files can be ignored with
        `reftex-no-include-regexps'.
        (reftex-no-include-regexps): New option.
        (reftex-where-am-I): Interpret appendix match.
        (reftex-init-section-numbers): New arg: appendix.
        (reftex-section-number): Treat appendix enumeration.
-       (reftex-toc-external): Improved message.
+       (reftex-toc-external): Improve message.
        (reftex-compute-ref-cite-tables): Regular expression extended for
        appendix.
-       (reftex-toc-rescan): Renamed from reftex-toc-redo.
-       (reftex-toc-Rescan): Renamed from reftex-toc-Redo.
+       (reftex-toc-rescan): Rename from reftex-toc-redo.
+       (reftex-toc-Rescan): Rename from reftex-toc-Redo.
        (reftex-toc-revert): New function.
        (reftex-select-external-document): Completion on label prefixes.
-       (reftex-find-file-on-path): Added an extra call to
+       (reftex-find-file-on-path): Add an extra call to
        expand-file-name for the directory.
-       (reftex-locate-bibliography-files): Added expand-file-name call.
+       (reftex-locate-bibliography-files): Add expand-file-name call.
        (reftex-guess-label-type): New function.
        (reftex-word-before-point): Function removed.
        (reftex-reference): Uses reftex-guess-label-type.  Changed meaning
        (reftex-select-label-maps): Default bindings for TAB, up, down, RET.
        (reftex-select-read-string): Now uses completion.
        (reftex-make-and-insert-label-list): Prepare for completion.
-       (reftex-where-am-I): Fixed bug with input files.
+       (reftex-where-am-I): Fix bug with input files.
        (reftex-save-all-document-buffers): New command.
        (reftex-select-next-heading): New function.
        (reftex-select-previous-heading): New function.
        (reftex-select-read-string): New function.
        (reftex-offer-label-menu): Handle string value from reftex-select-item.
-       (reftex-reference): Fixed bug (missing save-excursion).
-       (reftex-toc-map): Added binding for ?n and ?p.
-       (reftex-do-citation): Changed to use reftex-default-bibliography.
+       (reftex-reference): Fix bug (missing save-excursion).
+       (reftex-toc-map): Add binding for ?n and ?p.
+       (reftex-do-citation): Change to use reftex-default-bibliography.
        (reftex-default-bibliography): New option.
        (reftex-find-tex-file): Check for file-name-absolute-p first.
        (reftex-format-label-function, reftex-format-ref-function)
        (reftex-format-cite-function): New hooks.
        (reftex-info): New function.
-       (reftex-compute-ref-cite-tables): Removed interactive form.
-       (reftex-where-am-I): Removed interactive form.
-       (reftex-format-names): Removed interactive form.
+       (reftex-compute-ref-cite-tables): Remove interactive form.
+       (reftex-where-am-I): Remove interactive form.
+       (reftex-format-names): Remove interactive form.
        (reftex-vref-is-default): New customization variable.
        (reftex-mode-menu): Capitalize citation options.
        (reftex-last-cnt): Variable removed.
        (reftex-last-data, reftex-last-line): New variables.
        (reftex-select-toggle-varioref): New function.
-       (reftex-offer-label-menu): Changed mode-line-format for varioref.
+       (reftex-offer-label-menu): Change mode-line-format for varioref.
        (reftex-select-label-help): Help string updated.
-       (reftex-do-parse): Fixed bug with empty xr list.
+       (reftex-do-parse): Fix bug with empty xr list.
        (reftex-view-crossref): Prefix argument interpretation changed.
        (reftex-get-offset): New function.
        (reftex-label): Remove selection buffer to force update.
        (reftex-access-scan-info): Remove selection buffers.
-       (reftex-select-external-document): Fixed bug with highest index.
+       (reftex-select-external-document): Fix bug with highest index.
        (reftex-label-index-list, reftex-found-list): Variables removed.
        (reftex-offer-label-menu, reftex-make-and-insert-label-list)
        (reftex-select-item, reftex-citation, reftex-select-label-callback)
-       (reftex-bibtex-selection-callback, reftex-select-callback): Changed
-       to put the scan data directly into the text property :data,
+       (reftex-bibtex-selection-callback, reftex-select-callback):
+       Change to put the scan data directly into the text property :data,
        instead of doing this indirectly with an index-list.
        (reftex-make-selection-buffer-name): New function.
        (reftex-tie-multifile-symbols): Store master-index-as-property.
        (reftex-access-parse-file): `Restore' action now throws an
        exception when the file is not found.
        (reftex-create-customize-menu): New function.
-       (reftex-label): Fixed bug which made naked labels in \footnotes.
+       (reftex-label): Fix bug which made naked labels in \footnotes.
        (reftex-select-label-map, reftex-select-bib-map): New keymaps for
        the RefTeX Select buffer.
        (reftex-select-next, reftex-select-previous, reftex-select-scroll-down)
        (reftex-extract-bib-entries-from-thebibliography): New function.
        (reftex-format-bibitem): New function.
        (reftex-parse-bibitem): New function.
-       (reftex-make-desparate-section-regexp): Changed name to
+       (reftex-make-desparate-section-regexp): Change name to
        reftex-make-desperate-section-regexp.
        (reftex-do-parse, reftex-locate-bibliography-files)
        (reftex-string-to-label, reftex-select-external-document)
        (reftex-select-search-minibuffer-map, reftex-access-search-path)
        (reftex-compute-ref-cite-tables, reftex-recursive-directory-list):
        All lambda expressions now quoted with `function'.
-       (reftex-view-crossref, reftex-mouse-view-crossref): Fixed bug with
+       (reftex-view-crossref, reftex-mouse-view-crossref): Fix bug with
        multiple calls.
        (reftex-get-buffer-visiting): Error message changed.
        (reftex-select-external-document, reftex-query-label-type)
        * progmodes/etags.el (find-tag-marker-ring-length): New variable.
        (find-tag-marker-ring): New variable.
        (tags-location-ring): New variable replacing tags-location-ring.
-       (tags-location-stack): Deleted.
+       (tags-location-stack): Delete.
        (tags-table-format-hooks): Doc fix.
        (initialize-new-tags-table): Init find-tag-marker-ring,
        tags-location-ring.
 
        * international/mule-cmds.el (toggle-enable-multibyte-characters):
        Use set-buffer-multibyte.
-       (find-safe-coding-system-list-subset-p): Renamed from list-subset-p.
+       (find-safe-coding-system-list-subset-p): Rename from list-subset-p.
        The call changed also.
 
 1998-01-28  Kenichi Handa  <handa@etl.go.jp>
 
-       * international/titdic-cnv.el (titdic-convert): Set
-       enable-multibyte-characters to t after inserting TIT file by
+       * international/titdic-cnv.el (titdic-convert):
+       Set enable-multibyte-characters to t after inserting TIT file by
        no-conversion.
        (tit-process-body): Do not bind enable-multibyte-characters to
        nil.
        instead of (` and (,.  Implement :filter.  Doc fix.
        (easy-menu-do-define): Call `easy-menu-create-menu' instead of
        `easy-menu-create-keymaps'.
-       (easy-menu-create-keymaps): Replaced by `easy-menu-create-menu'.
-       (easy-menu-create-menu): New public function.  Replaces
-       `easy-menu-create-keymaps', but with large changes.
+       (easy-menu-create-keymaps): Replace by `easy-menu-create-menu'.
+       (easy-menu-create-menu): New public function.
+       Replaces `easy-menu-create-keymaps', but with large changes.
        (easy-menu-button-prefix): New constant.
        (easy-menu-do-add-item, easy-menu-make-symbol): New functions.
        (easy-menu-update-button): Doc fix.
 
        * mail/emacsbug.el (emacsbug): Customized.
        (report-emacs-bug-no-confirmation):
-       Renamed from report-emacs-bug-run-tersely.
+       Rename from report-emacs-bug-run-tersely.
        (report-emacs-bug-no-explanations): New option.
        (report-emacs-bug): Handle that option.
 
 1998-01-22  Eric Ludlam  <zappo@mescaline.gnu.org>
 
-       * mail/rmail.el (rmail-speedbar-buttons): Added speedbar support
+       * mail/rmail.el (rmail-speedbar-buttons): Add speedbar support
        for Rmail, including rmail-speedbar-button,
        rmail-speedbar-find-file, rmail-move-message-to-folder-on-line,
        rmail-speedbar-move-message, and support variables.
 
-       * info.el (Info-speedbar-buttons): Added speedbar support for Info
+       * info.el (Info-speedbar-buttons): Add speedbar support for Info
        mode, including Info-speedbar-button, Info-speedbar-menu, and
        support variables.
 
-       * gud.el (gud-speedbar-buttons): Added speedbar support for GUD in
+       * gud.el (gud-speedbar-buttons): Add speedbar support for GUD in
        general, and for GDB specifically, including
        gud-gdb-goto-stackframe, gud-gdb-get-stackframe,
        gud-gdb-run-command-fetch-lines, gud-gdb-speedbar-stack-filter,
 
 1998-01-21  Kenichi Handa  <handa@etl.go.jp>
 
-       * international/mule-cmds.el (prefer-coding-system): Call
-       update-iso-coding-systems.
+       * international/mule-cmds.el (prefer-coding-system):
+       Call update-iso-coding-systems.
 
-       * international/mule-util.el (string-to-sequence): Adjusted for
+       * international/mule-util.el (string-to-sequence): Adjust for
        the change of multibyte-form handling (byte-base to char-base).
        (store-substring): Likewise.
        (truncate-string-to-width): Likewise.
        (set-language-environment-coding-systems): New function.
 
        * international/mule-conf.el: Adjusted for the change of the
-       format of make-coding-system's 6th argument.  Initialize
-       coding-category-iso-7-tight to iso-2022-jp.
+       format of make-coding-system's 6th argument.
+       Initialize coding-category-iso-7-tight to iso-2022-jp.
 
        * international/mule-diag.el (describe-coding-system): Change the
        format of showing safe charsets.
 
-       * international/mule-util.el (find-safe-coding-system): Moved to
+       * international/mule-util.el (find-safe-coding-system): Move to
        mule-cmds.el.
        (detect-coding-with-priority): New macro.
        (detect-coding-with-language-environment): New function.
 
        * language/japanese.el, language/korean.el, language/lao.el,
        * language/thai.el, language/tibetan.el, language/vietnamese.el:
-       Adjusted for the change of make-coding-system.  Register
-       coding-priority key in
+       Adjusted for the change of make-coding-system.
+       Register coding-priority key in
 
        * language/china-util.el, language/japan-util.el,
        * language/korea-util.el, language/tibet-util.el,
        (ccl-dump-translate-multiple-map, ccl-dump-translate-single-map):
        New functions.
 
-       * international/mule.el (define-character-unification-table): New
-       function.
+       * international/mule.el (define-character-unification-table):
+       New function.
 
-       * international/mule-conf.el (oldjis-newjis-jisroman-ascii): New
-       character unification table.
+       * international/mule-conf.el (oldjis-newjis-jisroman-ascii):
+       New character unification table.
        (standard-character-unification-table-for-decode): Initialize to
        `unification-table' property of `oldjis-newjis-jisroman-ascii'.
 
 
 1998-01-17  Karl Heuer  <kwzh@gnu.org>
 
-       * register.el (number-to-register, increment-register): Args
-       renamed to match doc.
+       * register.el (number-to-register, increment-register):
+       Args renamed to match doc.
 
 1998-01-17  Dave Love  <d.love@dl.ac.uk>
 
 
 1998-01-04  Richard Stallman  <rms@psilocin.gnu.org>
 
-       * subr.el (sref): Defined.
+       * subr.el (sref): Define.
 
 1998-01-03  Stephen Eglen  <stephen@cns.ed.ac.uk>
 
 
 1997-12-22  Kevin Rodgers  <kevinr@ihs.com>  (tiny change)
 
-       * simple.el (previous-matching-history-element): Bind
-       case-fold-search to nil if REGEXP contains an uppercase letter.
+       * simple.el (previous-matching-history-element):
+       Bind case-fold-search to nil if REGEXP contains an uppercase letter.
        (previous-matching-history-element, next-matching-history-element):
        Doc fixes.
 
 
 1997-12-21  Richard Stallman  <rms@psilocin.gnu.org>
 
-       * msb.el (msb--home-dir): Renamed from msb--home-path.
-       (msb--strip-dir): Renamed from msb--strip-path.
+       * msb.el (msb--home-dir): Rename from msb--home-path.
+       (msb--strip-dir): Rename from msb--strip-path.
 
 1997-12-21  Lars Lindberg  <Lars.G.Lindberg@capgemini.se>
 
        (ps-generate): Replace (if A B) by (and A B).
        (ps-do-despool): Dynamic evaluation for ps-lpr-switches.
        Replace (if A B) by (and A B).
-       (color-instance-rgb-components, ps-color-values): Replace
-       pixel-components by color-instance-rgb-components.
+       (color-instance-rgb-components, ps-color-values):
+       Replace pixel-components by color-instance-rgb-components.
        (ps-xemacs-face-kind-p): Replace face-font by face-font-instance,
        replace x-font-properties by font-instance-properties.
 
        * progmodes/scheme.el: Define indentation in normal dialect for
        let-syntax, letrec-syntax, syntax-rules, call-with-values,
        dynamic-wind.
-       (scheme-mode-map): Remove lisp-complete-symbol.  Add
-       uncomment-region menu item.
+       (scheme-mode-map): Remove lisp-complete-symbol.
+       Add uncomment-region menu item.
        (scheme-mode-hook, dsssl-mode-hook): Declare customized.
        (dsssl-sgml-declaration): Fix customization.
 
        * cus-edit.el (customize-changed-options): New function.
        (customize-version-lessp): New function.
 
-       * facemenu.el (facemenu-remove-face-props): Renamed from
+       * facemenu.el (facemenu-remove-face-props): Rename from
        facemenu-remove-props.  Remove only face and mouse-face.
        (facemenu-menu): Update menu item for facemenu-remove-face-props.
 
        (debugger-mode): Now runs hook `debugger-mode-hook'.
 
        * add-log.el (change-log-add-make-room): New function.
-       (change-log-get-method-definition-1): Renamed get-method-definition-1.
-       (change-log-get-method-definition): Renamed from get-method-definition.
+       (change-log-get-method-definition-1): Rename get-method-definition-1.
+       (change-log-get-method-definition): Rename from get-method-definition.
        (add-log-keep-changes-together): New user variable.
-       (add-change-log-entry): Added missing WHOAMI explanation.
+       (add-change-log-entry): Add missing WHOAMI explanation.
        Added new functionality according to variable
        `add-log-keep-changes-together'.
 
 
        * progmodes/cc-menus.el: Require imenu.
 
-       * calendar/cal-french.el (french-calendar-special-days-array): New
-       function.
+       * calendar/cal-french.el (french-calendar-special-days-array):
+       New function.
        (calendar-french-date-string, calendar-goto-french-date): Use that
        function instead of the variable.
 
 
 1997-12-01  Eli Zaretskii  <eliz@is.elta.co.il>
 
-       * frame.el (make-frame-names-alist, select-frame-by-name): New
-       functions, support frame selection with completion and history.
+       * frame.el (make-frame-names-alist, select-frame-by-name):
+       New functions, support frame selection with completion and history.
        (frame-name-history, frame-names-alist): New variables.
 
 1997-11-30  Dave Love  <d.love@dl.ac.uk>
 
 1997-11-24  Michael Kifer  <kifer@cs.sunysb.edu>
 
-       * ediff-vers.el (cvs-run-ediff-on-file-descriptor): Set
-       default-directory.
+       * ediff-vers.el (cvs-run-ediff-on-file-descriptor):
+       Set default-directory.
        (cvs-run-ediff-on-file-descriptor): Use ediff-buffers when
        type=MODIFIED.
        * ediff-init.el: Commented out ediff-set-face-pixmap.
 
 1997-11-24  Simon Marshall  <simon@gnu.org>
 
-       * menu-bar.el (menu-bar-describe-menu): Fixed duplicate KEYs.
+       * menu-bar.el (menu-bar-describe-menu): Fix duplicate KEYs.
 
 1997-11-24  Richard Stallman  <rms@psilocin.ai.mit.edu>
 
 
 1997-11-20  Karl Heuer  <kwzh@gnu.org>
 
-       * international/mule-cmds.el (set-input-method): Renamed from
+       * international/mule-cmds.el (set-input-method): Rename from
        select-input-method.
 
 1997-11-20  Eli Zaretskii  <eliz@is.elta.co.il>
        * gnus/gnus-mule.el (gnus-mule-initialize): Do not set
        nntp-coding-system-for-read and nntp-coding-system-for-write.
 
-       * gnus/gnus-start.el (gnus-read-descriptions-file): Decode
-       description if necessary.
+       * gnus/gnus-start.el (gnus-read-descriptions-file):
+       Decode description if necessary.
 
        * gnus/nntp.el (nntp-coding-system-for-read): Set default value to
        binary.
        (nntp-coding-system-for-write): Likewise.
 
-       * international/mule-cmds.el (set-language-environment): Run
-       exit-language-environment-hook before calling `exit-function'
+       * international/mule-cmds.el (set-language-environment):
+       Run exit-language-environment-hook before calling `exit-function'
        which is specified for the language environment.
 
        * language/european.el: Add "Upper Sorbian" and "Lower Sorbian" in
        (ediff-update-markers-in-dir-meta-buffer): New, for fast redisplay
        of meta buffer.
        (ediff-update-meta-buffer, ediff-redraw-directory-group-buffer)
-       (ediff-previous-meta-overlay-start, ediff-next-meta-item): Changed to
+       (ediff-previous-meta-overlay-start, ediff-next-meta-item): Change to
        support the above.
        (ediff-insert-session-info-in-meta-buffer)
        (diff-replace-session-status-in-meta-buffer)
 
 1997-10-31  Dave Love  <d.love@dl.ac.uk>
 
-       * progmodes/fortran.el (fortran-imenu-generic-expression): New
-       variable.
+       * progmodes/fortran.el (fortran-imenu-generic-expression):
+       New variable.
        (fortran-mode): Use it.
 
 1997-10-31  Richard Stallman  <rms@gnu.org>
 1997-10-28  Simon Marshall  <simon@gnu.org>
 
        * font-lock.el (font-lock-keywords): Doc fix.
-       (font-lock-match-c++-style-declaration-item-and-skip-to-next): Allow
-       any number of ::foo suffixes in declarative items.
+       (font-lock-match-c++-style-declaration-item-and-skip-to-next):
+       Allow any number of ::foo suffixes in declarative items.
 
        * lazy-lock.el (lazy-lock-fontify-after-defer): Check each buffer to
        make sure it still (a) exists and (b) has Lazy Lock mode turned on.
        (octave-comment-indent): Handle magic comments correctly.
        (calculate-octave-indent): Handle magic comments correctly.
 
-       * progmodes/octave-mod.el (octave-abbrev-table): Added abbrevs for
+       * progmodes/octave-mod.el (octave-abbrev-table): Add abbrevs for
        switch, case, otherwise, and endswitch.
-       (octave-begin-keywords): Added switch.
-       (octave-else-keywords): Added case and otherwise.
-       (octave-end-keywords): Added endswitch.
-       (octave-block-match-alist): Added an entry for switch syntax.
-       (calculate-octave-indent): Added support for switch syntax.
+       (octave-begin-keywords): Add switch.
+       (octave-else-keywords): Add case and otherwise.
+       (octave-end-keywords): Add endswitch.
+       (octave-block-match-alist): Add an entry for switch syntax.
+       (calculate-octave-indent): Add support for switch syntax.
        (octave-block-end-offset): New function.
        (octave-comment-indent): Fix a typo.
 
-       * progmodes/octave-mod.el (octave-block-match-alist): Move
-       `otherwise' to right after `case' to have octave-close-block()
+       * progmodes/octave-mod.el (octave-block-match-alist):
+       Move `otherwise' to right after `case' to have octave-close-block()
        correctly close a `switch' block by `endswitch'.
 
 1997-10-24  Carsten Dominik  <dominik@strw.LeidenUniv.nl>
        * reftex.el: The menu now used toggle and radio for some items.
        (reftex-default-context-regexps): `caption' now prefers the
        optional short caption.
-       (reftex-offer-label-menu): Fixed bug which could kill master
+       (reftex-offer-label-menu): Fix bug which could kill master
        buffer of external document.
-       (reftex-select-item, reftex-get-buffer-visiting): Compatibility
-       code works now the other way round.
+       (reftex-select-item, reftex-get-buffer-visiting):
+       Compatibility code works now the other way round.
        (reftex-select-external-document): Now gives a message when no
        external documents are available.
        (reftex-find-duplicate-labels): Single key strokes to exit or to
        do a query replace.  Made more user friendly in general.
-       (reftex-section-levels, reftex-default-context-regexps): Move
-       definition of these variables to configuration section.
+       (reftex-section-levels, reftex-default-context-regexps):
+       Move definition of these variables to configuration section.
 
 1997-10-24  Richard Stallman  <rms@gnu.org>
 
 
        * international/mule-util.el (find-safe-coding-system): New function.
 
-       * international/mule.el (load-with-code-conversion): Update
-       preloaded-file-list, bind load-file-name and
+       * international/mule.el (load-with-code-conversion):
+       Update preloaded-file-list, bind load-file-name and
        inhibit-frame-unsplittable properly.
        (make-char): Make it a function.  Set it byte-compile property to
        optimize byte-compiled codes.
        (make-coding-system): New optional arg charsets.  Set property
        `safe-charsets' of the coding system to it.
 
-       * international/quail.el (quail-require-guidance-buf): Adjusted
-       for the change of input-method-verbose-flag.
+       * international/quail.el (quail-require-guidance-buf):
+       Adjust for the change of input-method-verbose-flag.
 
        * language/chinese.el: Give proper SAFE-CHARSET argument in each
        call of make-coding-system.
        * language/korean.el: Give proper SAFE-CHARSET argument in each
        call of make-coding-system.  Set exit-function for language
        environment "Korean" to exit-korean-environment.
-       (setup-korean-environment): Moved to korean.el.
+       (setup-korean-environment): Move to korean.el.
 
        * language/lao.el: Give proper SAFE-CHARSET argument in each call
        of make-coding-system.
 
        * man.el (Man-getpage-in-background): Bind inhibit-eol-conversion
        to t before calling start-process or call-process.
-       (Man-softhyphen-to-minus): New function.  If
-       enable-multibyte-characters is non-nil, convert the code 0255 only
+       (Man-softhyphen-to-minus): New function.
+       If enable-multibyte-characters is non-nil, convert the code 0255 only
        when it is not a part of a multibyte characters.
        (Man-fontify-manpage): Call Man-softhyphen-to-minus.
        (Man-cleanup-manpage): Likewise.
        (lm-insert-at-column): Use FORCE arg of move-to-column.
        * emulation/tpu-edt.el (tpu-arrange-rectangle): Likewise.
 
-1997-10-23  Barry A. Warsaw  <cc-mode-help@python.org>
+1997-10-23  Barry A. Warsaw  <bwarsaw@cnri.reston.va.us>
 
        Merge in Release 5.19 of cc-mode.
 
        comment-column and there is non-whitespace preceding this on the
        current line.
 
-       * progmodes/cc-mode.el (c-submit-bug-report): Remove
-       c-recognize-knr-p.  Add c-comment-continuation-stars.
+       * progmodes/cc-mode.el (c-submit-bug-report):
+       Remove c-recognize-knr-p.  Add c-comment-continuation-stars.
 
        * progmodes/cc-styles.el (c-initialize-builtin-style):
        Only use copy-tree if it is funcall-able.  This is the right patch, and
        was given by Erik Naggum <erik@naggum.no>
 
-1997-10-23  Barry A. Warsaw  <cc-mode-help@python.org>
+1997-10-23  Barry A. Warsaw  <bwarsaw@cnri.reston.va.us>
 
        * progmodes/cc-menus.el (cc-imenu-c-prototype-macro-regexp): New var.
 
        Given by jan.dubois@ibm.net (Jan Dubois).
 
        * progmodes/cc-menus.el (cc-imenu-java-generic-expression):
-       Removed test for declaration
+       Remove test for declaration
        statements.  Patch given by Ake Stenhoff <etxaksf@aom.ericsson.se>, as
        forwarded to me by RMS.
 
        to cc-imenu-objc-function to enable Imenu support for Objective-C.
        Contributed by Masatake (jet) YAMATO.
 
-1997-10-23  Barry A. Warsaw  <cc-mode-help@python.org>
+1997-10-23  Barry A. Warsaw  <bwarsaw@cnri.reston.va.us>
 
        * progmodes/cc-styles.el (c-initialize-builtin-style):
        Use existing copy-tree if it's defined.
        c-offsets-alist must be copied recursively.  Use copy-tree solution
        given by Simon Marshall <simon@gnu.org>.
 
-1997-10-23  Barry A. Warsaw  <cc-mode-help@python.org>
+1997-10-23  Barry A. Warsaw  <bwarsaw@cnri.reston.va.us>
 
        * progmodes/cc-cmds.el (c-beginning-of-statement):
        Fixes in sentence movement to properly
 
 1997-10-22  Kenichi Handa  <handa@etl.go.jp>
 
-       * gnus/gnus-art.el (gnus-show-traditional-method): Call
-       gnus-mule-decode-article only when enable-multibyte-characters is
+       * gnus/gnus-art.el (gnus-show-traditional-method):
+       Call gnus-mule-decode-article only when enable-multibyte-characters is
        non-nil.
 
        * gnus/gnus-ems.el (gnus-ems-redefine): Require `gnus-mule' only
 
 1997-10-21  Kenichi Handa  <handa@etl.go.jp>
 
-       * international/mule-diag.el (describe-coding-system): Print
-       information about coding system properties, post-read-conversion
+       * international/mule-diag.el (describe-coding-system):
+       Print information about coding system properties, post-read-conversion
        and pre-write-conversion.
-       (print-coding-system-briefly): Adjusted for the change in mule.el.
+       (print-coding-system-briefly): Adjust for the change in mule.el.
        (describe-current-coding-system): Likewise.
        (print-coding-system): Likewise.
 
        (2) Properties of a coding system (except for `coding-system' and
        `eol-type') is embedded in PLIST slot of coding-spec vector.
        (coding-spec-plist-idx): Initialize to 3.
-       (coding-system-spec-ref): Deleted.
-       (coding-system-spec): Moved from src/coding.c.
-       (coding-system-type): Adjusted for the above change.
+       (coding-system-spec-ref): Delete.
+       (coding-system-spec): Move from src/coding.c.
+       (coding-system-type): Adjust for the above change.
        (coding-system-mnemonic): Likewise.
        (coding-system-doc-string): Likewise.
        (coding-system-flags): Likewise.
        (coding-system-category): Likewise.
        (coding-system-get, coding-system-put, coding-system-category):
        New functions.
-       (coding-system-base): Moved from mule-util.el and adjusted for the
+       (coding-system-base): Move from mule-util.el and adjusted for the
        above change.
        (coding-system-parent): Make it obsolete alias of
        coding-system-base.
-       (make-subsidiary-coding-system): Adjusted for the above change.
+       (make-subsidiary-coding-system): Adjust for the above change.
        Update coding-system-list and coding-system-alist.
        (make-coding-system): Likewise.
        (define-coding-system-alias): Likewise.
        (set-buffer-file-coding-system): Typo in doc-string fixed.
-       (after-insert-file-set-buffer-file-coding-system): Change
-       enable-multibyte-characters only when
+       (after-insert-file-set-buffer-file-coding-system):
+       Change enable-multibyte-characters only when
        find-new-buffer-file-coding-system returns non-nil value.
-       (find-new-buffer-file-coding-system): Adjusted for the above change.
+       (find-new-buffer-file-coding-system): Adjust for the above change.
 
-       * international/mule-cmds.el (read-multilingual-string): Use
-       current-input-method prior to default-input-method.  Don't bind
+       * international/mule-cmds.el (read-multilingual-string):
+       Use current-input-method prior to default-input-method.  Don't bind
        current-input-method by `let', instead, activate the specified
        input method in the current buffer temporarily.
 
        * international/mule-conf.el: Change the way of making coding
        systems no-conversion and undecided.
 
-       * international/mule-util.el (coding-system-base): Moved to
+       * international/mule-util.el (coding-system-base): Move to
        mule.el.
        (coding-system-post-read-conversion):
        Use the new function coding-system-get.
        (coding-system-pre-write-conversion): Likewise.
        (coding-system-unification-table-for-decode): Likewise.
        (coding-system-unification-table-for-encode): Likewise.
-       (coding-system-list): Adjusted for the change in mule.el.
-       (coding-system-plist): Deleted.
+       (coding-system-list): Adjust for the change in mule.el.
+       (coding-system-plist): Delete.
        (coding-system-equal): Do not use coding-system-plist.
 
        * language/chinese.el: Use coding-system-put to set coding system
        * language/thai.el: Use coding-system-put to set coding system
        properties, post-read-conversion and pre-write-conversion.
 
-       * language/tibet-util.el (tibetan-post-read-conversion): Return
-       the length of converted region.
+       * language/tibet-util.el (tibetan-post-read-conversion):
+       Return the length of converted region.
 
        * language/tibetan.el: Use coding-system-put to set coding system
        properties, post-read-conversion and pre-write-conversion.
 
 1997-10-21  Tomohiko Morioka  <morioka@jaist.ac.jp>
 
-       * gnus/nnfolder.el (nnfolder-request-list): Bind
-       file-name-coding-system to binary.
+       * gnus/nnfolder.el (nnfolder-request-list):
+       Bind file-name-coding-system to binary.
        (nnfolder-possibly-change-group): Likewise.
 
        * gnus/nnml.el (nnml-retrieve-headers): Likewise.
        gnus-mule-initialize and setting coding system for nntp.
        (gnus-mule-select-coding-system): Get a coding system of the
        current newsgroup from gnus-summary-buffer.
-       (gnus-mule-decode-summary): Deleted.
+       (gnus-mule-decode-summary): Delete.
        (gnus-mule-initialize): Add-hook gnus-mule-select-coding-system to
        gnus-parse-headers-hook.  Don't add-hook gnus-mule-decode-summary
        and gnus-mule-decode-article.  Don't set process coding system for
        nntp stream to 'no-conversion, instead set
-       nntp-coding-system-for-read to 'binary.  Set
-       nnheader-file-coding-system and nnmail-file-coding-system to
+       nntp-coding-system-for-read to 'binary.
+       Set nnheader-file-coding-system and nnmail-file-coding-system to
        'binary.
 
 1997-10-21  Lars Magne Ingebrigtsen  <larsi@menja.ifi.uio.no>
 
        * nnml.el (nnml-directory): Doc fix.
 
-       * gnus-topic.el (gnus-topic-make-menu-bar): Added
-       gnus-topic-edit-parameters.
+       * gnus-topic.el (gnus-topic-make-menu-bar):
+       Add gnus-topic-edit-parameters.
 
 1997-10-21  Jay Sachs  <sachs@interactive.net>
 
 
 1997-10-21  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
 
-       * gnus-start.el (gnus-gnus-to-quick-newsrc-format): Escape
-       newlines.
+       * gnus-start.el (gnus-gnus-to-quick-newsrc-format):
+       Escape newlines.
 
 1997-10-21  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
 
 1997-10-21  Danny Siu  <dsiu@adobe.com>
 
        * smiley.el (smiley-buffer): Make smiley case sensitive.
-       (smiley-deformed-regexp-alist): Added more regexp for happy smiley.
+       (smiley-deformed-regexp-alist): Add more regexp for happy smiley.
        (smiley-nosey-regexp-alist): Same as above.
 
 1997-10-21  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
 
 1997-10-21  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
 
-       * nntp.el (nntp-nov-gap): Changed default.
+       * nntp.el (nntp-nov-gap): Change default.
 
-       * gnus-nocem.el (gnus-nocem-issuers): Fixed names.
+       * gnus-nocem.el (gnus-nocem-issuers): Fix names.
 
 1997-10-21  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
 
 
        * gnus.el (gnus-simplify-mode-line): Use varying formats.
 
-       * gnus-xmas.el (gnus-xmas-group-remove-excess-properties): Removed.
-       (gnus-xmas-topic-remove-excess-properties): Removed.
+       * gnus-xmas.el (gnus-xmas-group-remove-excess-properties): Remove.
+       (gnus-xmas-topic-remove-excess-properties): Remove.
 
 1997-10-21  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
 
 
 1997-10-21  Michael R. Cook  <mcook@cognex.com>
 
-       * gnus-topic.el (gnus-topic-toggle-display-empty-topics): List
-       groups.
+       * gnus-topic.el (gnus-topic-toggle-display-empty-topics):
+       List groups.
 
 1997-10-21  Per Abrahamsen  <abraham@dina.kvl.dk>
 
        * gnus-start.el (gnus-check-first-time-used): Force reading the
        active file the first time Gnus is used.
 
-       * gnus-group.el (gnus-group-set-mode-line): Conditionalize
-       modified.
+       * gnus-group.el (gnus-group-set-mode-line):
+       Conditionalize modified.
 
        * gnus-ems.el (gnus-mode-line-modified): New variable.
 
 
        * message.el (message-clone-locals): Made into own function.
 
-       * gnus.el (gnus-select-method): Changed default.
+       * gnus.el (gnus-select-method): Change default.
 
-       * gnus-start.el (gnus-read-active-file): Changed default to
+       * gnus-start.el (gnus-read-active-file): Change default to
        `some'.
 
 1997-10-21  Lars Magne Ingebrigtsen  <larsi@menja.ifi.uio.no>
 
 1997-10-21  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
 
-       * gnus-sum.el (t): Moved pop article keystroke.
+       * gnus-sum.el (t): Move pop article keystroke.
 
 1997-10-21  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
 
-       * nnmail.el (nnmail-search-unix-mail-delim-backward): Allow
-       several "From "'s.
+       * nnmail.el (nnmail-search-unix-mail-delim-backward):
+       Allow several "From "'s.
        (nnmail-search-unix-mail-delim): Ditto.
 
 1997-10-21  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
 
 1997-10-21  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
 
-       * gnus-sum.el (gnus-summary-limit-children): Typo.  Wouldn't
-       marked NoCeM'ed out messages as read.
+       * gnus-sum.el (gnus-summary-limit-children): Typo.
+       Wouldn't marked NoCeM'ed out messages as read.
 
 1997-10-21  Darren Stalder  <torin@daft.com>
 
 
 1997-10-21  Danny Siu  <dsiu@adobe.com>
 
-       * gnus-picon.el (gnus-group-display-picons): Use
-       gnus-group-real-name so that picons for foreign groups display
+       * gnus-picon.el (gnus-group-display-picons):
+       Use gnus-group-real-name so that picons for foreign groups display
        correctly.
 
 1997-10-21  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
 
 1997-10-21  Per Abrahamsen  <abraham@dina.kvl.dk>
 
-       * gnus-cite.el (gnus-cite-attribution-prefix): Recognize
-       Microsoft/Agent style attribution lines.
+       * gnus-cite.el (gnus-cite-attribution-prefix):
+       Recognize Microsoft/Agent style attribution lines.
        (gnus-cite-attribution-suffix): Ditto.
 
 1997-10-21  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
        (gnus-cache-possibly-alter-active): Test statement removed.
        (gnus-cache-articles-in-group): Would destroy hashtb.
 
-       * gnus-sum.el (gnus-summary-limit-mark-excluded-as-read): Don't
-       mark everything as read.
+       * gnus-sum.el (gnus-summary-limit-mark-excluded-as-read):
+       Don't mark everything as read.
 
        * gnus-cite.el (gnus-article-fill-cited-article): Nix out
        gnus-cite-article.
 
        * nnml.el (nnml-update-file-alist): Allow forcing.
 
-       * nnheaderxm.el (nnheader-xmas-find-file-noselect): Removed.
-       (nnheader-xmas-cancel-timer): Removed.
-       (nnheader-xmas-cancel-function-timers): Removed.
+       * nnheaderxm.el (nnheader-xmas-find-file-noselect): Remove.
+       (nnheader-xmas-cancel-timer): Remove.
+       (nnheader-xmas-cancel-function-timers): Remove.
 
 1997-10-21  Lars Magne Ingebrigtsen  <larsi@menja.ifi.uio.no>
 
        * message.el (message-set-auto-save-file-name): Create unique auto
        save file names.
 
-       * gnus-topic.el (gnus-topic-tallied-groups): Removed.
+       * gnus-topic.el (gnus-topic-tallied-groups): Remove.
        (gnus-topic-prepare-topic): Output right number of articles in
        each sub-topic.
 
        need be displayed.
        (gnus-picons-lock): Function deleted.
        (gnus-picons-remove): Don't use it.  New way of locking.
-       (gnus-picons-next-job-internal): New way of locking.  Handle
-       new tag 'bar.
+       (gnus-picons-next-job-internal): New way of locking.
+       Handle new tag 'bar.
        (gnus-picons-next-job): New way of locking.
        (gnus-picons-buffer): Variable deleted.
-       (gnus-picons-remove-all): Modified accordingly.
+       (gnus-picons-remove-all): Modify accordingly.
        (gnus-group-annotations-lock): Variable deleted.
        (gnus-article-annotations-lock): Variable deleted.
        (gnus-x-face-annotations-lock): Variable deleted.
-       (gnus-picons-news-directories): Renamed, was
+       (gnus-picons-news-directories): Rename, was
        gnus-picons-news-directory.
        (gnus-picons-url-retrieve): Do not change url-show-status.
        (gnus-picons-clear-cache): Also clear gnus-picons-url-alist.
 
 1997-10-21  Michael R. Cook  <mcook@cognex.com>
 
-       * gnus-topic.el (gnus-topic-toggle-display-empty-topics): New
-       function.
+       * gnus-topic.el (gnus-topic-toggle-display-empty-topics):
+       New function.
 
 1997-10-21  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
 
 
 1997-10-21  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
 
-       * gnus-topic.el (gnus-topic-create-topic): Added doc.
+       * gnus-topic.el (gnus-topic-create-topic): Add doc.
 
        * gnus-sum.el (gnus-summary-refer-article): Insert sparse
        non-displayed articles properly.
        (gnus-article-display-picons): Use the job queue if using the network.
        (gnus-group-display-picons): Ditto.
        (gnus-picons-make-path): Function deleted.
-       (gnus-picons-lookup-internal): Modified accordingly.
+       (gnus-picons-lookup-internal): Modify accordingly.
        (gnus-picons-lookup-user-internal): Take the LETs out of the loops.
        (gnus-picons-lookup-pairs): Take constant calculation outside of loop.
        (gnus-picons-display-picon-or-name): Use COND instead of nested IFs.
        (gnus-picons-users-image-alist): New variable.
        (gnus-picons-retrieve-user-callback): Use it.
        Added support for network retrieval of picons.
-       (gnus-picons-map): Removed.
-       (gnus-picons-remove): Removed case to handle processes.
+       (gnus-picons-map): Remove.
+       (gnus-picons-remove): Remove case to handle processes.
        (gnus-picons-processes-alist): New variable.
-       (gnus-picons-x-face-sentinel): Simplified.  Use processes alist.
+       (gnus-picons-x-face-sentinel): Simplify.  Use processes alist.
        (gnus-picons-display-x-face): Explicitly request an xface image.
        Always call gnus-picons-prepare-for-annotations.  Use processes alist.
        (gnus-picons-lookup-internal): New function.
        (gnus-picons-lookup): Use it.
        (gnus-picons-lookup-user-internal): Ditto.
        (gnus-picons-display-picon-or-name): No more xface-p argument.
-       (gnus-picons-try-suffixes): Removed.
+       (gnus-picons-try-suffixes): Remove.
        (gnus-picons-try-face): New function.  Does the caching in
        gnus-picons-glyph-alist.
        (gnus-picons-try-to-find-face): Take a glyph argument instead of a
        path.  No more xface-p argument.  Only use one annotation even if
        gnus-picons-display-as-address.
-       (gnus-picons-toggle-extent): Changed into an annotation action.
+       (gnus-picons-toggle-extent): Change into an annotation action.
 
 1997-10-21  Lars Magne Ingebrigtsen  <larsi@menja.ifi.uio.no>
 
 
 1997-10-21  Kim-Minh Kaplan  <kimminh.kaplan@utopia.eunet.fr>
 
-       * gnus-picon.el (gnus-picons-prepare-for-annotations): New
-       function, and many changes.
+       * gnus-picon.el (gnus-picons-prepare-for-annotations):
+       New function, and many changes.
 
 1997-10-21  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
 
        * gnus-cache.el (gnus-cache-move-cache): Allow entering directory
        name.
 
-       * nntp.el (nntp-telnet-command, nntp-telnet-switches): New
-       variables.
+       * nntp.el (nntp-telnet-command, nntp-telnet-switches):
+       New variables.
 
        * gnus-score.el (gnus-summary-increase-score): Refuse illegal
        match types.
 
 1997-10-21  Per Abrahamsen  <abraham@dina.kvl.dk>
 
-       * gnus-ems.el (gnus-article-x-face-command): Removed bogus
+       * gnus-ems.el (gnus-article-x-face-command): Remove bogus
        declaration.
 
 1997-10-21  Paul Franklin  <paul@cs.washington.edu>
        * message.el (message-cancel-news): Only say we cancel if we
        cancel.
 
-       * gnus-msg.el (gnus-summary-mail-crosspost-complaint): Deactivate
-       mark.
+       * gnus-msg.el (gnus-summary-mail-crosspost-complaint):
+       Deactivate mark.
 
 1997-10-21  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
 
        (reftex-make-master-buffer-hook): Hook removed.
        (reftex-insert-buffer-or-file): Function removed.
        (reftex-parse-document): Function adapted to new parser.
-       (reftex-access-scan-info): Changed to fit new parser.  Now detects
+       (reftex-access-scan-info): Change to fit new parser.  Now detects
        changes in label-alist related variables automatically.
        (reftex-parse-one, reftex-parse-all): New functions.
        (reftex-all-document-files): New function.
        (reftex-find-nearby-label): Function removed.
        (reftex-scan-buffer-for-labels): Function removed.
        (reftex-section-info): New function.
-       (reftex-nth-parens-substring): Renamed to reftex-nth-arg.  Return
-       nil when not enough args are present.
+       (reftex-nth-parens-substring): Rename to reftex-nth-arg.
+       Return nil when not enough args are present.
        (reftex-move-over-touching-args): New function.
        (reftex-where-am-I): New function.
        (reftex-nth-arg-wrapper): New function.
        several backup methods.
        (reftex-citation): Recursive edit moved to `e' key.
        (reftex-scan-buffer): Function removed.
-       (reftex-get-bibfile-list): Changed to work with chapterbib
+       (reftex-get-bibfile-list): Change to work with chapterbib
        package.
        (reftex-find-tex-file): New function.
        (reftex-find-files-on-path): Now first looks for file with
        reftex-do-citation.
        (reftex-do-citation): Recursive edit now on `e' key.
        (reftex-what-macro): Allow white space between macro arguments.
-       (reftex-allow-for-ctrl-m): Renamed to
+       (reftex-allow-for-ctrl-m): Rename to
        `reftex-make-regexp-allow-for-ctrl-m'.
        (reftex-nearest-match): New function.
        (reftex-auto-mode-alist): New function.
        (reftex-parse-args): New function.
        (easy-menu-define): Menu extended.  Some parts are now computed.
        from the user options.
-       (reftex-move-to-next-arg, reftex-move-to-previous-arg): New
-       functions.  Now we can parse macros with distributed arguments.
+       (reftex-move-to-next-arg, reftex-move-to-previous-arg):
+       New functions.  Now we can parse macros with distributed arguments.
        (reftex-goto-label): Function removed.
        (reftex-position-cursor): Function removed.
        (reftex-item): Function removed.
 
        * iso-insert.el: Add autoloads for `8859-1-map'.
 
-       * cus-edit.el (custom-group-value-create): Use
-       `custom-group-visibility' instead of `group-visibility'.
+       * cus-edit.el (custom-group-value-create):
+       Use `custom-group-visibility' instead of `group-visibility'.
 
 1997-10-19  Richard Stallman  <rms@gnu.org>
 
        (double-map): Add customize support.
        (double-prefix-only): Ditto.
 
-       * textmodes/nroff-mode.el (nroff): Moved from `editing' to `wp'.
+       * textmodes/nroff-mode.el (nroff): Move from `editing' to `wp'.
 
        * wid-edit.el (variable-link): New widget.
        (widget-variable-link-action): New function.
        (view-highlight-face, view-scroll-auto-exit)
        (view-try-extend-at-buffer-end)
        (view-remove-frame-by-deleting, view-mode-hook):
-       Defined by defcustom instead of by defvar.
+       Define by defcustom instead of by defvar.
        (view-mode-enter): Install exit-action also when view-mode is
        already on.  Small rewrite using unless.
        (view-mode, view-mode-exit, view-scroll-lines, view-really-at-end)
        * comint.el (comint-regexp-arg): Likewise.
        * term.el (term-regexp-arg): Likewise.
 
-       * simple.el (repeat-complex-command): Bind
-       minibuffer-history-sexp-flag to the minibuffer depth.
+       * simple.el (repeat-complex-command):
+       Bind minibuffer-history-sexp-flag to the minibuffer depth.
        (next-history-element): Compare minibuffer-history-sexp-flag
        against the current minibuffer depth to verify its validity.
        (previous-matching-history-element): Likewise.
        * finder.el (finder-mode-map): Bind [mouse-2].
        (finder-compile-keywords): Match compressed file names, but don't
        put compression extension in the output.
-       (finder-find-library): Deleted.
+       (finder-find-library): Delete.
        (finder-commentary): Use locate-library, not finder-find-library.
        (finder-mouse-select): New function.
        (finder-summary): Mention mouse binding.
 
 1997-09-30  Andre Spiegel  <spiegel@inf.fu-berlin.de>
 
-       * vc-hooks.el (vc-find-cvs-master): Added missing `throw' for
+       * vc-hooks.el (vc-find-cvs-master): Add missing `throw' for
        the case when TIMESTAMP is arbitrary text.
 
 1997-09-30  Hrvoje Niksic  <hniksic@srce.hr>
 
        * ediff-init.el: Added documentation to face-variables.
 
-       * ediff-util.el (ediff-next-difference, ediff-previous-difference): Use
-       ediff-merge-region-is-non-clash and don't compute fine diffs when
+       * ediff-util.el (ediff-next-difference, ediff-previous-difference):
+       Use ediff-merge-region-is-non-clash and don't compute fine diffs when
        skipping non-clash regions.
 
        * ediff-merg.el (ediff-merge-region-is-non-clash): New function.
 
 1997-09-15  Ken'ichi Handa  <handa@psilocin.gnu.ai.mit.edu>
 
-       * mule.el (find-new-buffer-file-coding-system): Reflect
-       text coding part of default-buffer-file-coding-system to
+       * mule.el (find-new-buffer-file-coding-system):
+       Reflect text coding part of default-buffer-file-coding-system to
        buffer-file-coding-system when buffer-file-coding-system is
        not locally set and ASCII only text is read.
 
-1997-09-15  Barry A. Warsaw  <cc-mode-help@python.org>
+1997-09-15  Barry A. Warsaw  <bwarsaw@cnri.reston.va.us>
 
        * progmodes/cc-styles.el (c-initialize-builtin-style):
        Copy the whole tree instead of just copy-sequence.
 
 1997-09-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
 
-       * international/quail.el (quail-completion-list-translations): Fix
-       and simplify generation of translation list.
+       * international/quail.el (quail-completion-list-translations):
+       Fix and simplify generation of translation list.
 
-       * international/titdic-cnv.el (tit-process-header): Convert
-       argument of KEYPROMPT if it contains an escape.
+       * international/titdic-cnv.el (tit-process-header):
+       Convert argument of KEYPROMPT if it contains an escape.
        (tit-process-body): Handle trailing whitespace and multiple spaces
        between phrases.
 
 
 1997-09-12  Michael Kifer  <kifer@cs.sunysb.edu>
 
-       * viper-keym.el (viper-want-ctl-h-help): Updated doc string.
+       * viper-keym.el (viper-want-ctl-h-help): Update doc string.
        (viper-vi-basic-map, viper-insert-basic-map, viper-replace-map):
-       Added binding for backspace.
-       * viper-cmd.el (viper-adjust-keys-for): Separated backspace and C-h.
+       Add binding for backspace.
+       * viper-cmd.el (viper-adjust-keys-for): Separate backspace and C-h.
 
 1997-09-12  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
 
 
 1997-09-12  Inge Frick  <inge@nada.kth.se>
 
-       * compile.el (compilation-parse-errors): Fixed two bugs that
+       * compile.el (compilation-parse-errors): Fix two bugs that
        could make compilation-parse-errors loop infinitely.  Each round
        of the parsing loop now either moves point ahead at least a line
        or sets `found-desired' to true to stop the loop.
 
 1997-09-11  Eli Zaretskii  <eliz@is.elta.co.il>
 
-       * international/mule-diag.el (describe-coding-system): Describe
-       coding systems of type 5, raw-text.
+       * international/mule-diag.el (describe-coding-system):
+       Describe coding systems of type 5, raw-text.
 
        * hexl.el (hexlify-buffer): Bind coding-system-for-write to
        raw-text with eol-type derived from the buffer-file-coding-system.
 
 1997-09-10  Michael Ernst  <mernst@cs.washington.edu>
 
-       * uniquify.el (uniquify-ignore-buffers-re): Added.
+       * uniquify.el (uniquify-ignore-buffers-re): Add.
 
 1997-09-10  Michael Kifer  <kifer@cs.sunysb.edu>
 
-       * viper-keym.el (viper-help-modifier-map): Deleted; help mode map is
+       * viper-keym.el (viper-help-modifier-map): Delete; help mode map is
        no longer modified.
        * viper.el (viper-set-hooks): Make help buffers come up in emacs state.
 
        (ethio-fidel-to-sera-mail-or-marker): New function.
        (ethio-find-file): Do nothing if not in ethio-mode.
        (ethio-write-file): Likewise.
-       (ethio-prefer-ascii-space): Moved from leim/quail/ethiopic.el.
+       (ethio-prefer-ascii-space): Move from leim/quail/ethiopic.el.
        (ethio-toggle-space): Likewise.
        (ethio-insert-space): Likewise.
        (ethio-insert-ethio-space): Likewise.
 
 1997-09-10  Kenichi Handa  <handa@etl.go.jp>
 
-       * language/japan-util.el (setup-japanese-environment): Give
-       iso-2022-jp to set-default-coding-system if not running on DOS.
+       * language/japan-util.el (setup-japanese-environment):
+       Give iso-2022-jp to set-default-coding-system if not running on DOS.
        (read-hiragana-string): Use input method "japanese-hiragana".
 
        * gnus/gnus-mule.el: Add coding system specification for several
 
 1997-09-08  Per Abrahamsen  <abraham@dina.kvl.dk>
 
-       * cus-edit.el (custom-variable-save): Fixed doc string.
+       * cus-edit.el (custom-variable-save): Fix doc string.
 
        * cus-edit.el (custom-variable-menu): Make it clear that `Lisp
        mode' edit the initial lisp expression.
 
 1997-09-08  Eli Zaretskii  <eliz@is.elta.co.il>
 
-       * info.el (info-insert-file-contents): Bind
-       coding-system-for-write to no-conversion.
+       * info.el (info-insert-file-contents):
+       Bind coding-system-for-write to no-conversion.
 
 1997-09-08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
 
 
        * telnet.el (telnet-initial-filter): Temporarily go to proper buffer.
 
-1997-09-07  Barry A. Warsaw  <cc-mode-help@python.org>
+1997-09-07  Barry A. Warsaw  <bwarsaw@cnri.reston.va.us>
 
-       * progmodes/cc-mode.el (c-version): Updated.
+       * progmodes/cc-mode.el (c-version): Update.
 
        * progmodes/cc-cmds.el (c-beginning-of-statement):
        Fixes in sentence movement to properly
 
 1997-09-05  Ken'ichi Handa  <handa@psilocin.gnu.ai.mit.edu>
 
-       * language/japan-util.el (setup-japanese-environment): Set
-       coding-category-iso-8-else to japanese-iso-8bit.
+       * language/japan-util.el (setup-japanese-environment):
+       Set coding-category-iso-8-else to japanese-iso-8bit.
 
 1997-09-05  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
 
 1997-09-05  Michael Kifer  <kifer@cs.sunysb.edu>
 
        * viper-init.el (viper-replace-region-start-delimiter):
-       Improved the default.
+       Improve the default.
        * viper-mous.el (viper-mouse-click-search-word)
        (viper-mouse-click-insert-word):
-       Fixed to not react when click is not over a text area.
+       Fix to not react when click is not over a text area.
        * viper.el (read-file-name): Unadvised.
        * viper-cmd.el (viper-insert-state-post-command-sentinel)
        (viper-save-last-insertion):
 1997-09-02  Geoff Voelker  <voelker@cs.washington.edu>
 
        * w32-fns.el: Update doc strings.
-       (w32-startup): Deleted function.
+       (w32-startup): Delete function.
        (w32-check-shell-configuration, w32-init-info): New functions.
-       (w32-system-shell-p): Renamed from w32-using-system-shell-p.
+       (w32-system-shell-p): Rename from w32-using-system-shell-p.
        Added shell name argument.
 
 1997-09-02  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
 
 1997-08-31  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
 
-       * emacs-lisp/bytecomp.el (byte-compile-output-file-form): Handle
-       custom-declare-variable.
+       * emacs-lisp/bytecomp.el (byte-compile-output-file-form):
+       Handle custom-declare-variable.
 
-       * international/mule-diag.el (describe-current-coding-system): Add
-       missing newline in output.
+       * international/mule-diag.el (describe-current-coding-system):
+       Add missing newline in output.
 
 1997-08-31  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
 
 
 1997-08-29  Carsten Dominik  <dominik@strw.LeidenUniv.nl>
 
-       * reftex.el (reftex-customize): Added call to customize browse.
+       * reftex.el (reftex-customize): Add call to customize browse.
        (reftex-show-commentary): New function.
        (reftex-label-alist): Prefix may contain % escapes.  Nth macro
        argument may be context.  May give two different context methods.
        (reftex-default-label-alist-entries): Customization type changed.
        (reftex-label-menu-flags): Extra flag for searches.
-       (reftex-cite-format): Changed completely, % escapes are now used.
+       (reftex-cite-format): Change completely, % escapes are now used.
        (reftex-comment-citations): New variable.
        (reftex-cite-comment-format): New variable.
        (reftex-cite-punctuation): New variable.
-       (reftex-make-master-buffer): Changed name of master buffer,
+       (reftex-make-master-buffer): Change name of master buffer,
        removed interactive.  Runs a hook on the buffer.  Interpret
        TEXINPUTS environment variable.  Allow naked argument for \input.
        Master buffer is now in fundamental mode.
 
        * international/mule.el (make-coding-system): Make TYPE 5 means
        raw-text.
-       (after-insert-file-set-buffer-file-coding-system): Set
-       enable-multibyte-characters to nil if we read a file with
+       (after-insert-file-set-buffer-file-coding-system):
+       Set enable-multibyte-characters to nil if we read a file with
        no-conversion or raw-text-XXXX.
 
-       * international/mule-conf.el (raw-text): New coding system.  Set
-       coding-category-raw-text to raw-text.
+       * international/mule-conf.el (raw-text): New coding system.
+       Set coding-category-raw-text to raw-text.
 
-       * language/english.el (setup-english-environment): Set
-       coding-category-raw-text to raw-text.
+       * language/english.el (setup-english-environment):
+       Set coding-category-raw-text to raw-text.
 
-       * language/viet-util.el (setup-vietnamese-environment): Set
-       coding-category-raw-text to vietnamese-viscii.
+       * language/viet-util.el (setup-vietnamese-environment):
+       Set coding-category-raw-text to vietnamese-viscii.
 
        * language/cyril-util.el (setup-cyrillic-alternativnyj-environment):
        Set coding-category-raw-text to cyrillic-alternativnyj.
 
        * international/mule-cmds.el (update-leim-list-file): Make it
        handle multiple directories.
-       (update-all-leim-list-files): Deleted.
+       (update-all-leim-list-files): Delete.
 
        * international/quail.el (quail-update-leim-list-file): Make it
        handle multiple directories.
 
        * nnfolder.el (nnfolder-request-list): Override
        'nnmail-file-coding-system' by 'nnmail-active-file-coding-system'.
-       (nnfolder-request-list, nnfolder-possibly-change-group): Protect
-       from conversion by `pathname-coding-system' for XEmacs/mule.
+       (nnfolder-request-list, nnfolder-possibly-change-group):
+       Protect from conversion by `pathname-coding-system' for XEmacs/mule.
        (nnfolder-group-pathname): Encode pathname for Emacs 20.
 
        * nnmh.el (nnmh-request-list, nnmh-active-number): Protect from
 
        * gnus-sum.el (gnus-structured-field-decoder): New variable.
        (gnus-unstructured-field-decoder): New variable.
-       (gnus-get-newsgroup-headers, gnus-nov-parse-line): Use
-       `gnus-structured-field-decoder' and
+       (gnus-get-newsgroup-headers, gnus-nov-parse-line):
+       Use `gnus-structured-field-decoder' and
        `gnus-unstructured-field-decoder' for Subject field.
 
 1997-08-28  Miyashita Hisashi  <himi@etl.go.jp>
        * files.el (revert-buffer): Read a file without any code
        conversion if we are reverting from an auto-saved file.
 
-       * language/japanese.el (set-language-info-alist): Change
-       iso-2022-7bit to iso-2022-jp.
+       * language/japanese.el (set-language-info-alist):
+       Change iso-2022-7bit to iso-2022-jp.
 
        * replace.el (query-replace-read-args): Locally bind
        minibuffer-inherit-input-method to t to make a minibuffer inherit
        and changed into defsubsts.
        (last): New function.
 
-       * emacs-lisp/cl.el (caar, cadr, cdar, cddr): Moved to subr.el.
+       * emacs-lisp/cl.el (caar, cadr, cdar, cddr): Move to subr.el.
        (last): Function renamed to last*.
        * emacs-lisp/cl-macs.el (cl-loop-let): Use last*.
 
        * time.el (display-time-hook): Minor doc fix.
 
-       * ps-print.el (ps-zebra-stripes): Renamed from ps-zebra-stripe.
-       (ps-zebra-stripe-height): Renamed from ps-number-of-zebra.
+       * ps-print.el (ps-zebra-stripes): Rename from ps-zebra-stripe.
+       (ps-zebra-stripe-height): Rename from ps-number-of-zebra.
 
        * vc.el (vc-version-diff): Mention that default file is visited file.
 
        (bookmark-bmenu-check-position): Return a meaningful value --
        callers have apparently been assuming this anyway.
        (bookmark-build-xemacs-menu): Unused function deleted.
-       (bookmark-version): Removed this variable; the Emacs version suffices.
+       (bookmark-version): Remove this variable; the Emacs version suffices.
 
 1997-08-22  Simon Marshall  <simon@gnu.ai.mit.edu>
 
        * viper-cmd.el (viper-replace-char-subr, viper-word-*)
        (viper-separator-skipback-special): Made to work with mule and syntax
        tables.
-       (viper-change-state): Moved iso-accents-mode handling here from
+       (viper-change-state): Move iso-accents-mode handling here from
        viper-change-state-to-vi/insert/etc.  Also now toggles MULE.
 
 1997-08-21  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
 
 1997-08-21  Kenichi HANDA  <handa@etl.go.jp>
 
-       * language/cyril-util.el (setup-cyrillic-environment): Deleted.
+       * language/cyril-util.el (setup-cyrillic-environment): Delete.
        (setup-cyrillic-iso-environment): New function.
        (setup-cyrillic-koi8-environment): New function.
        (setup-cyrillic-alternativnyj-environment): New function.
        (auto-file-coding-system-function): Set this variable to
        `auto-file-coding-system'.
 
-       * international/quail.el (quail-terminate-translation): Run
-       input-method-after-insert-chunk-hook only when the current input
+       * international/quail.el (quail-terminate-translation):
+       Run input-method-after-insert-chunk-hook only when the current input
        method doesn't require conversion.
        (quail-no-conversion): Run input-method-after-insert-chunk-hook.
 
        * international/mule-util.el (coding-system-unification-table):
-       Deleted.
+       Delete.
        (coding-system-unification-table-for-decode): New function.
        (coding-system-unification-table-for-encode): New function.
 
        * international/mule.el (make-coding-system): Doc-string fixed.
 
-       * international/fontset.el (register-alternate-fontnames): New
-       function.
+       * international/fontset.el (register-alternate-fontnames):
+       New function.
        (x-complement-fontset-spec): Register alternate fontnames by
        calling register-alternate-fontnames.
        (instanciate-fontset): Likewise.
        (ps-background-image, ps-background, ps-header-height)
        (ps-get-face): New internal functions.
        (ps-control-character): Handle control characters.
-       (ps-gnus-print-article-from-summary): Updated for Gnus 5.
+       (ps-gnus-print-article-from-summary): Update for Gnus 5.
        (ps-jack-setup): Replace 'nil by nil, 't by t.
 
 1997-08-19  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
 
        * files.el (append-to-file): Doc-string fixed.
 
-       * international/quail.el (quail-exit-from-minibuffer): Call
-       inactivate-input-method instead of (quail-mode -1).
+       * international/quail.el (quail-exit-from-minibuffer):
+       Call inactivate-input-method instead of (quail-mode -1).
        (quail-kill-guidance-buf): New function.
        (quail-mode): Doc-string and comments modified.  Make this
        function non-interactive.  Add quail-kill-guidance-buf to
        (quail-define-package): Indentation fixed.
        (quail-setup-overlays): New arg conversion-mode.  Pay attention to
        input-method-highlight-flag.
-       (quail-mode-line-format): Deleted.
-       (quail-generate-mode-line-format): Deleted.
+       (quail-mode-line-format): Delete.
+       (quail-generate-mode-line-format): Delete.
        (quail-mode): Don't handle input-method-inactivate-hook and
        input-method-activate-hook here.  Delete code setting
        quail-mode-line-format.
        (quail-saved-current-map): Name changed from
        quail-saved-overriding-local-map.
        (quail-toggle-mode-temporarily): Completely re-written.
-       (quail-execute-non-quail-command): Use
-       quail-toggle-mode-temporarily.
-       (quail-conv-overlay-modification-hook): Deleted.
-       (quail-suppress-conversion): Deleted.
+       (quail-execute-non-quail-command):
+       Use quail-toggle-mode-temporarily.
+       (quail-conv-overlay-modification-hook): Delete.
+       (quail-suppress-conversion): Delete.
        (quail-start-translation): Completely re-written.
        (quail-start-translation-in-conversion-mode): Likewise.
        (quail-delete-region): Check if quail-overlay is active.
-       (quail-get-current-str): Don't call throw.  Set
-       overriding-terminal-local-map correctly.
+       (quail-get-current-str): Don't call throw.
+       Set overriding-terminal-local-map correctly.
        (quail-update-translation): Run hooks in
        input-method-after-insert-chunk-hook.
        (quail-self-insert-command): Catch 'quail-tag here.
-       (quail-conversion-delete-char): Don't call throw.  Set
-       overriding-terminal-local-map to nil.
+       (quail-conversion-delete-char): Don't call throw.
+       Set overriding-terminal-local-map to nil.
        (quail-conversion-backward-delete-char): Likewise.
        (quail-no-conversion): Likewise.
-       (quail-help-insert-keymap-description): Bind
-       overriding-terminal-local-map instead of overriding-local-map.
+       (quail-help-insert-keymap-description):
+       Bind overriding-terminal-local-map instead of overriding-local-map.
 
-       * international/mule-cmds.el (previous-input-method): This
-       variable deleted.
+       * international/mule-cmds.el (previous-input-method):
+       This variable deleted.
        (input-method-history): New variable.
        (read-input-method-name): Bind minibuffer-history to
        input-method-history.
        previous-input-method.  Run hooks in input-method-activate-hook.
        (inactivate-input-method): Update input-method-history.  Run hooks
        in input-method-inactivate-hook.
-       (select-input-method): Doc-string modified.  Use
-       input-method-history instead of previous-input-method.  Set
-       default-input-method to input-method.
-       (toggle-input-method): Doc-string modified.  Use
-       input-method-history instead of previous-input-method.
+       (select-input-method): Doc-string modified.
+       Use input-method-history instead of previous-input-method.
+       Set default-input-method to input-method.
+       (toggle-input-method): Doc-string modified.
+       Use input-method-history instead of previous-input-method.
        (read-multilingual-string): Bind minibuffer-setup-hook correctly.
        (input-method-exit-on-invalid-key): New variable.
 
-       * isearch.el (isearch-multibyte-characters-flag): Deleted.
+       * isearch.el (isearch-multibyte-characters-flag): Delete.
        (isearch-mode): Do not bind isearch-multibyte-characters-flag and
        isearch-input-method.
        (isearch-printing-char): Use current-input-method instead of
        isearch-input-method.
        (isearch-message-prefix): Likewise.
 
-       * international/isearch-x.el (isearch-input-method): Deleted.
-       (isearch-input-method-title): Deleted.
+       * international/isearch-x.el (isearch-input-method): Delete.
+       (isearch-input-method-title): Delete.
        (isearch-toggle-specified-input-method): Call toggle-input-method.
        (isearch-toggle-input-method): Likewise.
-       (isearch-process-search-multibyte-characters): Use
-       current-input-method instead of isearch-input-method.
+       (isearch-process-search-multibyte-characters):
+       Use current-input-method instead of isearch-input-method.
 
 1997-08-17  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
 
        For writing, use buffer-file-coding-system if set, otherwise
        buffer-file-type.
        (find-file-not-found-set-buffer-file-coding-system):
-       Renamed from find-file-not-found-set-buffer-file-type.
+       Rename from find-file-not-found-set-buffer-file-type.
        Set buffer-file-coding-system as well as buffer-file-type.
 
 1997-08-16  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
        * international/isearch-x.el (isearch-process-search-multibyte-characters):
        Bind input-method-verbose-flag, not input-method-tersely-flag.
 
-       * international/mule-cmds.el (input-method-verbose-flag): Renamed
-       from input-method-tersely-flag and sense inverted.
+       * international/mule-cmds.el (input-method-verbose-flag):
+       Rename from input-method-tersely-flag and sense inverted.
        (input-method-highlight-flag): New variable.
        (toggle-input-method): Pass missing arg to read-input-method-name.
 
 
 1997-08-16  Kenichi Handa  <handa@etl.go.jp>
 
-       * language/china-util.el (setup-chinese-gb-environment): Delete
-       a code setting default value of default-input-method.
+       * language/china-util.el (setup-chinese-gb-environment):
+       Delete a code setting default value of default-input-method.
        (setup-chinese-big5-environment): Likewise.
        (setup-chinese-cns-environment): Likewise.
 
        * loadup.el (loaddefs.el): Load that file much later, almost last.
        Delete most calls to garbage-collect.
 
-1997-08-15  Barry A. Warsaw  <cc-mode-help@python.org>
+1997-08-15  Barry A. Warsaw  <bwarsaw@cnri.reston.va.us>
 
        * progmodes/cc-styles.el (c-style-alist):
        "python" style requires c-comment-continuation-stars be "".
        * dos-fns.el (dos-print-region-function): Force EOL conversion to
        DOS CR-LF pairs.
 
-1997-08-10  Barry A. Warsaw  <cc-mode-help@python.org>
+1997-08-10  Barry A. Warsaw  <bwarsaw@cnri.reston.va.us>
 
        * Release 5.15
 
        (c-enable-//-in-c-mode): Obsolete.
 
        * progmodes/cc-langs.el (c++-mode-syntax-table, java-mode-syntax-table)
-       (objc-mode-syntax-table, idl-mode-syntax-table): Added autoload
+       (objc-mode-syntax-table, idl-mode-syntax-table): Add autoload
        cookies.  c-mode-syntax-table already has one.  Use the new syntax
        table initialization idioms.
 
        lines are now analyzed as template-args-cont.
 
        * progmodes/cc-styles.el (c-offsets-alist):
-       Added template-args-cont syntactic symbol.
+       Add template-args-cont syntactic symbol.
 
        * progmodes/cc-styles.el (c-styles-alist):
        In "java" style, set c-hanging-comment-starter-p to
        * international/mule.el (make-coding-system): Add a new FLAGS
        elements SAFE.  Use it for terminal coding system if some other
        coding system is specified explicitly.
-       (ignore-relative-composition): Initialize
-       ignore-relative-composition.
+       (ignore-relative-composition):
+       Initialize ignore-relative-composition.
 
-       * international/mule-util.el(prefer-coding-system): Moved to
+       * international/mule-util.el(prefer-coding-system): Move to
        mule-util.el.
 
        * international/mule-cmds.el (set-default-coding-systems):
        Doc-string modified.
-       (prefer-coding-system): Moved from mule-util.el.  Call
-       set-default-coding-systems.
+       (prefer-coding-system): Move from mule-util.el.
+       Call set-default-coding-systems.
 
        * international/mule-conf.el (iso-safe): New coding system.
 
 
        * help.el (describe-key): Don't put a colon after the command name.
 
-1997-08-09  Barry A. Warsaw  <cc-mode-help@python.org>
+1997-08-09  Barry A. Warsaw  <bwarsaw@cnri.reston.va.us>
 
        * progmodes/cc-engine.el (c-beginning-of-statement-1):
        When checking for bare semi, don't match
        c-hanging-comment-starter-p to nil to preserve Javadoc starter lines.
 
        * progmodes/cc-styles.el (c-set-style-2):
-       Fixed broken implementation of inherited styles.
+       Fix broken implementation of inherited styles.
 
        * progmodes/cc-styles.el (c-set-style):
        Call c-initialize-builtin-style.
 1997-08-04  Espen Skoglund  <espensk@odslab5.cs.uit.no>
 
        * pascal.el (pascal-mode-syntax-table): _ is now a symbol constituent.
-       (pascal-indent-case): Removed unnecessary calls to marker-position.
+       (pascal-indent-case): Remove unnecessary calls to marker-position.
        (pascal-indent-declaration): Editing a parameterlist at the end of
        a buffer does not hang.  Removed unnecessary call to marker-position.
-       (pascal-get-lineup-indent): Removed unused variable.
+       (pascal-get-lineup-indent): Remove unused variable.
        Indent parameterlist correctly.
-       (pascal-completion-response): Removed unused variable.
+       (pascal-completion-response): Remove unused variable.
 
 1997-08-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
 
        * isearch.el (isearch-quote-char): Fix handling of control
        characters, copied from quoted-insert.
 
-       * emacs-lisp/pp.el (pp-to-string): Use
-       emacs-lisp-mode-syntax-table.
+       * emacs-lisp/pp.el (pp-to-string):
+       Use emacs-lisp-mode-syntax-table.
 
        * international/quail.el (quail-update-leim-list-file): Go to the
        beginning of the package file, in case it was already visited.
 
 1997-08-04  Kenichi Handa  <handa@etl.go.jp>
 
-       * language/english.el (setup-english-environment): Call
-       set-default-coding-systems.
+       * language/english.el (setup-english-environment):
+       Call set-default-coding-systems.
 
        * language/china-util.el (setup-chinese-gb-environment): Do not
        call set-terminal-coding-system and set-keyboard-coding-system,
 
        * language/korean.el (setup-korean-environment): Likewise.
 
-       * international/mule-cmds.el (set-default-coding-systems): New
-       function.
+       * international/mule-cmds.el (set-default-coding-systems):
+       New function.
 
        * international/mule.el (default-terminal-coding-system): New var.
        (set-terminal-coding-system):
 
        * term/x-win.el: Fix previous change.
 
-       * international/quail.el (quail-next-translation): Call
-       quail-execute-non-quail-command when no current translations.
+       * international/quail.el (quail-next-translation):
+       Call quail-execute-non-quail-command when no current translations.
        (quail-prev-translation): Likewise.
        (quail-next-translation-block): Likewise.
        (quail-prev-translation-block): Likewise.
 
-       * language/china-util.el (setup-chinese-gb-environment): Set
-       default value of default-input-method.
+       * language/china-util.el (setup-chinese-gb-environment):
+       Set default value of default-input-method.
        (setup-chinese-big5-environment): Likewise.
        (setup-chinese-cns-environment): Likewise.  Correct input method
        name.
 
-       * language/ethio-util.el (setup-ethiopic-environment): Bind
-       correct commands in global-map, rmail-mode-map, and mail-mode-map.
+       * language/ethio-util.el (setup-ethiopic-environment):
+       Bind correct commands in global-map, rmail-mode-map, and mail-mode-map.
 
        * language/ethiopic.el (ccl-encode-ethio-font): Fix typo in
        doc-string.  Set default value of default-input-method.
 
        * international/fontset.el (fontset-name-p): New function.
        (uninstanciated-fontset-alist): New variable.
-       (create-fontset-from-fontset-spec): Delete arg STYLE.  Register
-       style-variants of FONTSET in uninstanciated-fontset-alist.
-       (create-fontset-from-x-resource): Call
-       create-fontset-from-fontset-spec correctly.
+       (create-fontset-from-fontset-spec): Delete arg STYLE.
+       Register style-variants of FONTSET in uninstanciated-fontset-alist.
+       (create-fontset-from-x-resource):
+       Call create-fontset-from-fontset-spec correctly.
 
        * international/mule-util.el (reference-point-alist): Doc-string
        modified.
 
-       * term/x-win.el: Do not create style-variants of fontset.  They
-       are just registered in uninstanciated-fontset-alist.
+       * term/x-win.el: Do not create style-variants of fontset.
+       They are just registered in uninstanciated-fontset-alist.
 
 1997-07-31  Michael Kifer  <kifer@cs.sunysb.edu>
 
-       * ediff*.el (ediff-eval-in-buffer): Changed macro and renamed
+       * ediff*.el (ediff-eval-in-buffer): Change macro and renamed
        ediff-with-current-buffer.
        Eliminated inefficient calls to `intern'.
-       * ediff-diff.el (ediff-exec-process): Changed to work with buffers
+       * ediff-diff.el (ediff-exec-process): Change to work with buffers
        whose names have spaces.
        (ediff-wordify): Use buffer-substring-no-properties.
 
 
 1997-07-25  Ken'ichi Handa  <handa@psilocin.gnu.ai.mit.edu>
 
-       * international/quail.el (quail-update-leim-list-file): Call
-       find-file-noselect with t for arguments NOWARN and RAWFILE.
+       * international/quail.el (quail-update-leim-list-file):
+       Call find-file-noselect with t for arguments NOWARN and RAWFILE.
 
        * international/mule-cmds.el (leim-list-entry-regexp): Make this
        match only at beginning of line.
        * language/tibet-util.el (setup-tibetan-environment): Correct
        coding system names.  Set default-input-method to "tibetan-wylie".
 
-       * language/viet-util.el (setup-vietnamese-environment): Add
-       autoload cookie.
+       * language/viet-util.el (setup-vietnamese-environment):
+       Add autoload cookie.
 
 1997-07-25  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
 
 1997-07-24  Michael Kifer  <kifer@cs.sunysb.edu>
 
        * viper.el (viper-non-vi-major-modes): New variable.
-       (vip-set-hooks): Changed so it'll update viper-non-vi-major-modes.
+       (vip-set-hooks): Change so it'll update viper-non-vi-major-modes.
        (viper-mode): Now checks viper-non-vi-major-modes.
 
 1997-07-24  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
 
        * cus-face.el (custom-declare-face): Use [set-]face-documentation.
 
-       * faces.el (face-documentation): Renamed from face-doc-string.
-       (set-face-documentation): Renamed from set-face-doc-string.
+       * faces.el (face-documentation): Rename from face-doc-string.
+       (set-face-documentation): Rename from set-face-doc-string.
        (face-doc-string): Make this an alias.
 
-       * term/bg-mouse.el (bg-yank-or-pop): Changed eql to eq.
+       * term/bg-mouse.el (bg-yank-or-pop): Change eql to eq.
 
        * international/mule-cmds.el (read-input-method-name): Fix error msg.
 
        Use undecided-dos for dos-text file names.
        Use undecided for non-existing untranslated file names.
 
-       * international/mule.el (modify-coding-system-alist): Added.
-       international/mule-util.el (modify-coding-system-alist): Removed.
+       * international/mule.el (modify-coding-system-alist): Add.
+       international/mule-util.el (modify-coding-system-alist): Remove.
 
        * loadup.el [windows-nt, ms-dos]: Undo loading
        of international/mule-utils.
        (occur-mode-find-occurrence): Use `occur' text property to find
        marker for locus of the occurrence.
        (occur-next, occur-prev): New commands.
-       (occur): Fixed bug preventing line number being displayed if line
+       (occur): Fix bug preventing line number being displayed if line
        number is less than the number of lines of context.
 
 1997-07-18  Andre Spiegel  <spiegel@inf.fu-berlin.de>
 
        * paren.el (show-paren-match-face): Use gray on all non-color screens.
 
-1997-07-17  Barry A. Warsaw  <cc-mode-help@python.org>
+1997-07-17  Barry A. Warsaw  <bwarsaw@cnri.reston.va.us>
 
        * progmodes/cc-mode.el (c-initialize-cc-mode): New function.
        (c-mode, c++-mode, objc-mode, java-mode): Call it.
        * progmodes/cc-langs.el: Require 'cc-defs for the definition of
        c-emacs-features.
 
-       * progmodes/cc-langs.el (c-mode-menu): Added uncomment region and
+       * progmodes/cc-langs.el (c-mode-menu): Add uncomment region and
        slight rearrangement of items.
 
        * progmodes/cc-cmds.el: Require cc-defs for the c-add-syntax macro.
 
        * progmodes/cc-engine.el (c-maybe-labelp): Add defvar.
 
-       * progmodes/cc-styles.el (c-initialize-builtin-style): Use
-       copy-sequence instead of c-copy-tree.
+       * progmodes/cc-styles.el (c-initialize-builtin-style):
+       Use copy-sequence instead of c-copy-tree.
 
        * progmodes/cc-defs.el (c-load-all): Function deleted.
 
 
        * international/quail.el (quail-translate-key): Fix previous change.
 
-       * international/mule.el (make-coding-system): Distinguish
-       coding-category-iso-7-else and coding-category-iso-8-else.
+       * international/mule.el (make-coding-system):
+       Distinguish coding-category-iso-7-else and coding-category-iso-8-else.
 
-       * international/mule-conf.el (coding-category-emacs-mule): Replace
-       coding-category-iso-else with coding-category-iso-7-else and
+       * international/mule-conf.el (coding-category-emacs-mule):
+       Replace coding-category-iso-else with coding-category-iso-7-else and
        coding-category-iso-8-else.
 
-       * international/mule-diag.el (describe-current-coding-system): Use
-       coding-category-iso-7-else instead of coding-category-iso-else.
+       * international/mule-diag.el (describe-current-coding-system):
+       Use coding-category-iso-7-else instead of coding-category-iso-else.
 
-       * language/china-util.el (setup-chinese-gb-environment): Adjusted
+       * language/china-util.el (setup-chinese-gb-environment): Adjust
        for the change of coding category names.  Set default-input-method
        to chinese-py-punct.
        (setup-chinese-big5-environment): Set default-input-method to
        (setup-chinese-cns-environment): Set default-input-method
        correctly.
 
-       * language/english.el (setup-english-environment): Adjusted for
+       * language/english.el (setup-english-environment): Adjust for
        the change of coding category names.
 
-       * language/japan-util.el (setup-japanese-environment): Adjusted
+       * language/japan-util.el (setup-japanese-environment): Adjust
        for the change of coding category names.  Set default-input-method
        correctly.
 
-       * language/ethio-util.el (setup-ethiopic-environment): Set
-       default-input-method correctly.
+       * language/ethio-util.el (setup-ethiopic-environment):
+       Set default-input-method correctly.
 
-       * language/korean.el (setup-korean-environment): Set
-       default-input-method correctly.
+       * language/korean.el (setup-korean-environment):
+       Set default-input-method correctly.
 
        * language/tibet-util.el (setup-tibetan-environment: Set
        default-input-method correctly.
        for iswitchb-kill-buffer and iswitchb-find-file.
        (iswitchb): When no text typed in, show all buffers.
        (iswitchb-complete): Use equal rather than eq.
-       (iswitchb-next-match, iswitchb-prev-match): Use
-       iswitchb-chop to handle reordering the buffer list.
+       (iswitchb-next-match, iswitchb-prev-match):
+       Use iswitchb-chop to handle reordering the buffer list.
        (iswitchb-chop): New function.
        (iswitchb-make-buflist): Rewritten for efficiency.
        (iswitchb-to-end): Operate on a list of buffers, not just one.
 
 1997-07-10  Kenichi Handa  <handa@etl.go.jp>
 
-       * international/fontset.el (create-fontset-from-fontset-spec): Add
-       optional arg NOERROR.
+       * international/fontset.el (create-fontset-from-fontset-spec):
+       Add optional arg NOERROR.
        (create-fontset-from-x-resource): Give t as arg NOERROR to
        create-fontset-from-fontset-spec.
 
        (isearch-input-method-title): New variable.
        (isearch-toggle-specified-input-method): Set the above variables.
        (isearch-toggle-input-method): Likewise.
-       (isearch-process-search-multibyte-characters): Give
-       isearch-input-method as arg to read-multilingual-string.
+       (isearch-process-search-multibyte-characters):
+       Give isearch-input-method as arg to read-multilingual-string.
 
-       * international/mule-cmds.el (read-multilingual-string): Adjusted
-       for the previous change of variables related to input methods.
+       * international/mule-cmds.el (read-multilingual-string):
+       Adjust for the previous change of variables related to input methods.
 
        * isearch.el (isearch-message-prefix): Likewise.
 
        * progmodes/cc-*.el: New files, totally reorganized.
 
        * dunnet.el: Undo an earlier change:
-       (dun-piss): Renamed from dunnet-urinate.
+       (dun-piss): Rename from dunnet-urinate.
        (dun-verblist): Indecent word added back.
        (dunnet): Delete "censored" message.
 
        * browse-url.el: Require thingatpt when compiling.
        (browse-url-url-at-point): Use `thing-at-point' (with URL code
        moved from here).
-       (browse-url-looking-at): Moved to thingatpt.el, renamed and changed.
+       (browse-url-looking-at): Move to thingatpt.el, renamed and changed.
 
        * thingatpt.el (thing-at-point): Use `thing-at-point' property, if any.
        (bounds-of-thing-at-point): Use `bounds-of-thing-at-point' property.
        (widget-default-delete): Ditto.
 
        * wid-edit.el (color): Make it an editable field.
-       (widget-color-value-create): Deleted.
-       (widget-color-value-get): Deleted.
-       (widget-color-value-set): Deleted.
-       (color-item): Deleted.
-       (widget-color-item-button-face-get): Renamed to
+       (widget-color-value-create): Delete.
+       (widget-color-value-get): Delete.
+       (widget-color-value-set): Delete.
+       (color-item): Delete.
+       (widget-color-item-button-face-get): Rename to
        `widget-color-sample-face-get'.
        (color-sample): Delete.
        (editable-color): Delete.
        (custom-browse-visibility-action, custom-browse-group-tag)
        (custom-browse-group-tag-action, custom-browse-variable-tag-action)
        (custom-browse-face-tag, custom-browse-face-tag-action)
-       (custom-browse-face-tag-action, custom-browse-alist): Changed
-       prefix from `custom-tree' to `custom-browse'.
+       (custom-browse-face-tag-action, custom-browse-alist):
+       Change prefix from `custom-tree' to `custom-browse'.
        (custom-variable-value-create, custom-face-value-create)
-       (custom-group-value-create): Updated caller.
+       (custom-group-value-create): Update caller.
 
        * cus-edit.el (custom-browse-only-groups): New option.
        (custom-group-value-create): Use it.  Omit non-groups if non-nil.
 
-       * cus-edit.el (custom-help-menu): Renamed "Variable" to "Option".
+       * cus-edit.el (custom-help-menu): Rename "Variable" to "Option".
        Remove "..." from non-prompting entries.
 
        * wid-edit.el (widget-single-line-field-face): New face.
 
        * language/european.el (setup-8-bit-environment): New argument
        LANGUAGE.
-       (setup-latin1-environment): Adjusted for the above change.
+       (setup-latin1-environment): Adjust for the above change.
        (setup-latin2-environment): Likewise.
        (setup-latin3-environment): Likewise.
        (setup-latin4-environment): Likewise.
 
        * language/hebrew.el (setup-hebrew-environment): Likewise.
 
-       * language/cyril-util.el (setup-cyrillic-environment): Adjusted
-       for the change of an input method name.
+       * language/cyril-util.el (setup-cyrillic-environment):
+       Adjust for the change of an input method name.
 
        * language/devan-util.el (setup-devanagari-environment): Likewise.
 
        (quail-defrule): Doc-string modified.
        (quail-defrule-internal): Document it.
        (quail-get-translation): Change the format of DEF part.
-       (quail-lookup-key): Make the second argument LEN optional.  Reset
-       quail-current-translations to nil.
+       (quail-lookup-key): Make the second argument LEN optional.
+       Reset quail-current-translations to nil.
        (quail-map-definition): New function.
        (quail-get-current-str): New function.
        (quail-guidance-translations-starting-column): New variable.
        (quail-update-current-translations): New function.
-       (quail-translate-key): Adjusted for the change of DEF format.
+       (quail-translate-key): Adjust for the change of DEF format.
        Call quail-update-current-translations.
        (quail-next-translation): Call quail-update-current-translations.
        (quail-prev-translation): Likewise.
        (quail-next-translation-block): Likewise.
        (quail-prev-translation-block): Likewise.
-       (quail-select-translation): Deleted.
+       (quail-select-translation): Delete.
        (quail-make-guidance-frame): New function.
        (quail-show-guidance-buf): Handle the case that minibuffer is in a
        separate frame.
        (quail-hide-guidance-buf): Likewise.
-       (quail-show-translations): Call
-       quail-update-current-translations.  Check width of a frame to be
+       (quail-show-translations):
+       Call quail-update-current-translations.  Check width of a frame to be
        used.
        (quail-completion): Do not supply LEN argument to
        quail-lookup-key.
        (charset-chars, charset-width, charset-direction)
        (charset-iso-final-char, charset-iso-graphic-plane)
        (charset-reverse-charset, charset-short-name, charset-long-name)
-       (charset-description, charset-plit, set-charset-plist): Document
-       them.
+       (charset-description, charset-plit, set-charset-plist):
+       Document them.
        (make-char, charset-list): Doc-string modified.
        (find-new-buffer-file-coding-system): Fix bug of handling the
        coding system undecided.
        (updates): Reject subdirs whose names start with =.
        (custom-deps, finder-data, autoloads, update-subdirs): Likewise.
 
-       * scroll-bar.el (toggle-scroll-bar): Moved from frame.el.
+       * scroll-bar.el (toggle-scroll-bar): Move from frame.el.
        Use scroll-bar-mode to determine which side; if it's nil, use left.
        (set-scroll-bar-mode): New subroutine, taken from scroll-bar-mode.
        (scroll-bar-mode): Use the variable set-scroll-bar-mode.
        (scroll-bar-mode): New variable.  Extra defvar to avoid warning.
-       (toggle-horizontal-scroll-bar): Moved from frame.el.
+       (toggle-horizontal-scroll-bar): Move from frame.el.
 
        * frame.el (scroll-bar-side): Variable deleted.
        (toggle-scroll-bar, toggle-horizontal-scroll-bar):
-       Moved to scroll-bar.el.
+       Move to scroll-bar.el.
 
        * files.el (file-chase-links): When handling .., make newname absolute.
        Simplify several places.
        * wid-edit.el (widget-button-click): Steal up event if key is not
        bound in `widget-global-map'.
 
-       * cus-edit.el (custom-tree-insert-prefix): Renamed from
+       * cus-edit.el (custom-tree-insert-prefix): Rename from
        `custom-tree-insert'.
        (custom-group-value-create): Use it.
 
        (custom-button-face): New defface.
        (custom widget-type): Use custom-button-face for buttons.
        (custom-group-tag-faces): Initial value is nil.
-       (custom-variable-tag-face): Renamed from custom-variable-sample-face.
+       (custom-variable-tag-face): Rename from custom-variable-sample-face.
        Initialize it like custom-group-tag-face.
        (custom-group-tag-faces): Initialize to nil.
        (custom-state-face): New defface.
        only if the item is modified.  Take widget as arg.
        (custom-mode): Use widget-edit-functions.
 
-       * wid-edit.el (widget-edit-functions): Renamed from widget-edit-hook.
+       * wid-edit.el (widget-edit-functions): Rename from widget-edit-hook.
        (widget-field-action): Pass the widget as an arg when running hook.
 
-       * cus-edit.el (Custom-set): Renamed from custom-set.
-       (Custom-save): Renamed from custom-save.
+       * cus-edit.el (Custom-set): Rename from custom-set.
+       (Custom-save): Rename from custom-save.
        (custom-browse-sort-predicate): Defalias deleted.
        (custom-group-value-create): Don't sort, in tree mode.
-       (Custom-mode-menu): Renamed from custom-mode-menu.
-       (Custom-reset-current): Renamed from custom-reset-current.
-       (Custom-reset-saved): Renamed from custom-reset-saved.
-       (Custom-reset-standard): Renamed from custom-reset-standard.
-       (Custom-menu-update): Renamed from custom-menu-update.
-       (customize-set-value): Renamed from custom-set-value.
-       (customize-set-variable): Renamed from custom-set-variable.
-       (customize-save-customized): Renamed from custom-save-customized.
+       (Custom-mode-menu): Rename from custom-mode-menu.
+       (Custom-reset-current): Rename from custom-reset-current.
+       (Custom-reset-saved): Rename from custom-reset-saved.
+       (Custom-reset-standard): Rename from custom-reset-standard.
+       (Custom-menu-update): Rename from custom-menu-update.
+       (customize-set-value): Rename from custom-set-value.
+       (customize-set-variable): Rename from custom-set-variable.
+       (customize-save-customized): Rename from custom-save-customized.
 
        * cus-start.el (double-click-time): Use restricted-sexp.
        (load-path): Make [Current dir?] itself the active button.
        instead of displaying an echo area message.
        (widget-toggle-action): Likewise.
        (group-visibility, widget-group-visibility-create):
-       Moved to cus-edit.el and renamed.
+       Move to cus-edit.el and renamed.
 
 1997-06-23  Dan Nicolaescu  <done@ece.arizona.edu>
 
 1997-06-22  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
 
        * decipher.el (decipher-copy-cons):
-       Renamed from decipher-get-undo-copy.  Calls changed.
+       Rename from decipher-get-undo-copy.  Calls changed.
 
        * emacs-lisp/lmenu.el (popup-menu): Redefine as macro.
        (popup-menu-popup, popup-menu-internal): New function.
        (custom-variable-value-create): Use it.
        (custom-face-value-create): Use it.
        (custom-group-value-create): Use it.
-       (custom-buffer-groups-last): Changed default.
+       (custom-buffer-groups-last): Change default.
 
-       * wid-edit.el (group-visibility): Deleted.
+       * wid-edit.el (group-visibility): Delete.
        (widget-group-visibility-create): Ditto.
-       (group-link): Deleted.
+       (group-link): Delete.
        (widget-group-link-create): Ditto.
        (widget-group-link-action): Ditto.
 
        (custom-group-link-action): New function.
        (custom-group-value-create): Use `custom-group-link'.
 
-       * wid-edit.el (widget-before-change): Fixed comment and debug string.
+       * wid-edit.el (widget-before-change): Fix comment and debug string.
 
-       * cus-edit.el (custom-mode-customize-menu): Deleted.
+       * cus-edit.el (custom-mode-customize-menu): Delete.
        (custom-mode-menu): Define here.
        (custom-mode): Don't add here.
-       (custom-format-handler): Deleted.
+       (custom-format-handler): Delete.
        (custom): Don't add here.
 
        * cus-edit.el (custom-browse-sort-predicate): New alias.
        (custom-group): Ditto.
        (custom-group-value-create): Ditto.
 
-       * cus-edit.el (face): Fixed format.
+       * cus-edit.el (face): Fix format.
        (custom-face-value-create): Browse face, not option.
 
        * cus-edit.el (custom-group-value-create): Rewrote to replace
        (custom-variable): Ditto.
        (custom-face): Delete :format and :format-handler.
        (custom): Add :format.
-       (custom-format-handler): Removed unnecessary code.
-       (custom-face-format-handler): Deleted.
+       (custom-format-handler): Remove unnecessary code.
+       (custom-face-format-handler): Delete.
        (custom-add-see-also): New function.
        (custom-buffer-style): New option.
        (widget-face-value-create): Use it here instead of :format.
        (custom-menu-sort-predicate): Use them.
        (custom-menu-create): Use it.
        (custom-buffer-sort-predicate, custom-buffer-order-predicate)
-       (custom-menu-sort-predicate, custom-menu-order-predicate): Deleted.
+       (custom-menu-sort-predicate, custom-menu-order-predicate): Delete.
 
        * wid-edit.el (widget-leave-text): Don't delete nil overlays.
 
        * wid-edit.el (widget-get-indirect): New function.
        (widget-default-create): Use it.
-       (widget-button-insert-indirect): Deleted.
+       (widget-button-insert-indirect): Delete.
 
        * wid-edit.el (widget-inactive-face): Use dim gray instead of dark
        gray.
 
 1997-06-18  Ken'ichi Handa  <handa@psilocin.gnu.ai.mit.edu>
 
-       * mule-util.el (coding-system-parent): Moved to mule.el.
+       * mule-util.el (coding-system-parent): Move to mule.el.
 
-       * mule.el (coding-system-parent): Moved from mule-util.el.
+       * mule.el (coding-system-parent): Move from mule-util.el.
 
 1997-06-18  Kenichi Handa  <handa@etl.go.jp>
 
        * subdirs.el: Add "language" in the argument of
        normal-top-level-add-to-load-path.
 
-       * rmail.el (rmail-enable-decoding-message): Deleted.
+       * rmail.el (rmail-enable-decoding-message): Delete.
        (rmail-revert): Bind enable-multibyte-characters to nil before
        calling rmail-convert-file.
        (rmail-convert-to-babyl-format): If enable-multibyte-characters is
        (coding-system-list): Sort coding systems by coding-system-lessp.
        An element of returned list is always coding system, never be a
        cons.
-       (modify-coding-system-alist): Renamed from
+       (modify-coding-system-alist): Rename from
        set-coding-system-alist.
        (prefer-coding-system): New function.
        (compose-chars-component): But fix for handling a composite
        not a valid KEY argument now.
        (leim-list-file-name, leim-list-header, leim-list-entry-regexp):
        New variables.
-       (update-leim-list-file, update-all-leim-list-files): New
-       functions.
+       (update-leim-list-file, update-all-leim-list-files):
+       New functions.
        (current-input-method): Doc-string modified because the value is
        now input method name.
        (default-input-method, previous-input-method): Likewise.
        (input-method-alist): New variable.
        (register-input-method): Register input method in
        input-method-alist.
-       (read-language-and-input-method-name): Deleted.
+       (read-language-and-input-method-name): Delete.
        (read-input-method-name): New function.
        (activate-input-method, select-input-method, toggle-input-method):
-       Modified for the above change.
+       Modify for the above change.
        (read-multilingual-string): Likewise.
-       (describe-current-input-method): Renamed from
+       (describe-current-input-method): Rename from
        describe-input-method.
        (describe-input-method): New function.
        (describe-language-environment): Don't put a vacant line at the
 
        * language/cyril-util.el (setup-cyrillic-iso-environment)
        (setup-cyrillic-koi8-environment)
-       (setup-cyrillic-alternativnyj-environment): Deleted.
+       (setup-cyrillic-alternativnyj-environment): Delete.
        (setup-cyrillic-environment): New function.
 
        * language/cyrillic.el: Don't make the keymap
        * tar-mode.el (tar-extract): Use second argument of
        view-buffer instead of setting view-exit-action.
 
-       * files.el (view-read-only): New option variable.  If
-       non-nil then buffers visiting files read-only, do it in view mode.
+       * files.el (view-read-only): New option variable.
+       If non-nil then buffers visiting files read-only, do it in view mode.
        (find-file-read-only, find-file-read-only-other-window)
        (find-file-read-only-other-frame): Call toggle-read-only
        instead of setting buffer-read-only explicitly.
-       (toggle-read-only, after-find-file): Changed to be aware
+       (toggle-read-only, after-find-file): Change to be aware
        of view-read-only.
        (save-some-buffers): Use second argument of view-buffer
        instead of setting view-exit-action.
        * icon.el (icon-indent-line): A comment ends at the end of the
        line, delete call to nonexistent function.
 
-       * icon.el (icon-font-lock-keywords-1): Improved regexp.
+       * icon.el (icon-font-lock-keywords-1): Improve regexp.
        (icon-font-lock-keywords-2): Likewise.
 
 1997-06-16  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
 
 1997-06-16  Simon Marshall  <simon@gnu.ai.mit.edu>
 
-       * icon.el (icon-imenu-generic-expression): Improved regexp.
-       (icon-font-lock-keywords-1): Improved regexps.
+       * icon.el (icon-imenu-generic-expression): Improve regexp.
+       (icon-font-lock-keywords-1): Improve regexps.
        (icon-font-lock-keywords-2): Likewise.
        (icon-mode): Don't set font-lock-comment-start-regexp via
        font-lock-defaults; it is not needed anymore.
 
 1996-06-16  Dan Nicolaescu  <done@ece.arizona.edu>
 
-       * icon.el (icon-imenu-generic-expression): Improved regexp.
+       * icon.el (icon-imenu-generic-expression): Improve regexp.
        (icon-mode): Don't use pushnew.
 
 1997-06-16  Michelangelo Grigni  <mic@mathcs.emory.edu>
        * ffap.el (ffap-soft-value): Make this a function again; the macro
        version does intern-soft too early.  Deleted XEmacs-specific code.
 
-       (ffap-string-at-point-mode-alist): Added "=" and
+       (ffap-string-at-point-mode-alist): Add "=" and
        "&" to the url syntax, as suggested by SJE.
-       (ffap-read-file-or-url): Fixed the HIST argument to
+       (ffap-read-file-or-url): Fix the HIST argument to
        completing-read (only visible in XEmacs?), as reported by
        Christoph Wedler <wedler@fmi.uni-passau.de>.
        (ffap-kpathsea-expand-path): New func, replaces ffap-add-subdirs,
        Added mouse-track support (but no binding), as
        suggested by MDB.  Moved Emacs mouse bindings from
        "down-mouse" events to ordinary mouse events.
-       (ffap-alist): Added ffap-fortran-mode, as requested by MDB.
+       (ffap-alist): Add ffap-fortran-mode, as requested by MDB.
        Rewrote and merged XEmacs support, eliminating file
        ffap-xe.el.  Modified ffap-other-frame to work in dedicated
        frames, fixing a bug reported by JENS.
        (ffap-read-file-or-url): For XEmacs, give extra HACK-HOMEDIR arg
        to `abbreviate-file-name'.
        (ffap-file-at-point): Suppress errors from `ffap-alist'.
-       (ffap-url-at-point): Modified regexp to accept
+       (ffap-url-at-point): Modify regexp to accept
        mail hostnames ending with a digit.  Fixes bug report of SJE.
        (ffap-url-at-point): Use higher level function
        (w3-view-this-url t) suggested by wmperry, instead of
        w3-zone-at/w3-zone-data or widget-at/widget-get.
-       (ffap-url-at-point): Modified to work with
+       (ffap-url-at-point): Modify to work with
        w3-version "WWW 2.3.64 1996/06/02 06:20:23" alpha, which
        uses the 'widget package rather than the old w3-zone-at.
        Bug was reported by JENS.
        Adapted comments and doc strings to Emacs coding
        conventions.  Reorganized.  Retired v18 support.
        (ffap-bindings): Offers a default installation.
-       (ffap-string-at-point): Modified arguments.
-       (ffap-gnus-hook): Updated for Gnus 5.
+       (ffap-string-at-point): Modify arguments.
+       (ffap-gnus-hook): Update for Gnus 5.
        (ffap-tex-init): Delayed initialization of `ffap-tex-path'.
        (ffap-dired): New entry in `ffap-alist'.
        (ffap-menu-rescan): May fontify the choices in buffer.
        * cus-edit.el (widget-glyph-insert-glyph): Make the invisible
        extent open ended.
 
-       * cus-edit.el (custom-format-handler): Added :echo-help to
+       * cus-edit.el (custom-format-handler): Add :echo-help to
        visibility widget.
        (custom-variable-value-create): Ditto, also for tag.
        * wid-edit.el (widget-documentation-string-value-create): Ditto.
 
        * wid-edit.el (widget-tabable-at): New function.
        (widget-move): Use it.
-       * wid-edit.el (widget-after-change): Reimplemented :secret.
+       * wid-edit.el (widget-after-change): Reimplement :secret.
 
        * wid-edit.el (widget-field-add-space): New option.
        (widget-specify-field): Use it.
        view-mode-enter or view-mode-exit.
        (view-buffer, view-buffer-other-window): New argument exit-action.
        (view-file, view-file-other-window, view-buffer-other-window)
-       (view-buffer, view-mode-enter): Changed method used to restore
+       (view-buffer, view-mode-enter): Change method used to restore
        windows when leaving view mode.
        (view-mode-exit): New function.
        (view-return-to-alist): New variable.
        (widget-documentation-string-value-create): Also use documentation
        properties on single line documentation strings.
 
-       * wid-browse.el (widget-minor-mode): Fixed mistake in
+       * wid-browse.el (widget-minor-mode): Fix mistake in
        widget-minor-mode - it had semantics of non-interactive calling
        reversed.
 
        * add-log.el (add-log-time-format): New variable.
        (add-log-iso8601-time-string): New function.
        (add-change-log-entry): Use add-log-time-format.
-       (add-log-iso8601-time-zone): Renamed from iso8601-time-zone.
+       (add-log-iso8601-time-zone): Rename from iso8601-time-zone.
 
 1997-06-13  Dan Nicolaescu  <done@ece.arizona.edu>
 
        (isearch-close-unecessary-overlays): New function.
        (isearch-range-invisible): Use them.
 
-       * isearch.el (search-invisible): Changed the semantics,
+       * isearch.el (search-invisible): Change the semantics,
        the default value and updated the doc string.
        (isearch-opened-overlays): New variable.
        (isearch-mode): Initialize it.
        opened, open them, add them to isearch-opened-overlays and say
        that the range is visible.
 
-       * hideshow.el (hideshow): Added a :prefix.
+       * hideshow.el (hideshow): Add a :prefix.
        (hs-isearch-open): New variable.
        (hs-flag-region): Use that variable.
        Changed the semantics of the FLAG parameter and updated the docs.
        Fix error messages.
 
        * text-mode.el (paragraph-indent-text-mode):
-       Renamed from spaced-text-mode.
+       Rename from spaced-text-mode.
        (text-mode-map): Bind TAB to indent-relative.
        (indented-text-mode-map): Variable deleted.
        (indented-text-mode): Now an alias for text-mode.
        * bibtex.el (bibtex-delete-whitespace, bibtex-current-line)
        (bibtex-assoc-of-regexp, bibtex-skip-to-valid-entry)
        (bibtex-map-entries):
-       Renamed from delete-whitespace, current-line, assoc-of-regexp,
+       Rename from delete-whitespace, current-line, assoc-of-regexp,
        skip-to-valid-bibtex-entry, and map-bibtex-entries, respectively.
 
 1997-06-11  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
        (reftex-label-alist-builtin): New default environment subfigure.
        (reftex-find-duplicate-labels): Temporary buffer is now
        "*Duplicate Labels*" instead of "*Help*".
-       (reftex-bibtex-selection-callback): Renamed variable found-list.
-       (reftex-found-list): Added defvar for this variable.
-       (TeX-master): Added defvar for this variable.
+       (reftex-bibtex-selection-callback): Rename variable found-list.
+       (reftex-found-list): Add defvar for this variable.
+       (TeX-master): Add defvar for this variable.
        (reftex-reset-mode): Kill temporary buffers associated with RefTeX.
 
 1997-06-10  Ken'ichi Handa  <handa@psilocin.gnu.ai.mit.edu>
 
-       * mule-cmds.el (view-hello-file): Adjusted for the changes of
+       * mule-cmds.el (view-hello-file): Adjust for the changes of
        coding system names.
 
 1997-06-10  Terrence Brannon  <brannon@sand.usc.edu>
 
 1997-06-10  Stefan Schoef  <schoef@OFFIS.Uni-Oldenburg.DE>
 
-       * bibtex.el (bibtex-mode-map): Changed the binding of the C-TAB
+       * bibtex.el (bibtex-mode-map): Change the binding of the C-TAB
        key, such that XEmacs will understand it, too.
 
        * bibtex.el (bibtex-format-entry, bibtex-end-of-entry): Give specific
        error message if not on valid BibTeX entry.
 
-       * bibtex.el (bibtex-field-string-quoted): Small bug fix.  Allow
-       backslash followed by newline.
+       * bibtex.el (bibtex-field-string-quoted): Small bug fix.
+       Allow backslash followed by newline.
 
        * bibtex.el (bibtex-reposition-window, bibtex-mark-entry): Two new
        functions, bound to M-C-l and M-C-h, respectively.
        of ---.
        (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as
        comments.
-       (bibtex-entry): Fixed parameter list.  This function is not
+       (bibtex-entry): Fix parameter list.  This function is not
        intended to be called with required and optional fields as
        optional arguments anymore.
 
        * bibtex.el (bibtex-submit-bug-report): Report all variables.
 
        * bibtex.el (bibtex-contline-indentation): New user option.
-       (bibtex-entry-offset): Renamed from bibtex-entry-indentation.
+       (bibtex-entry-offset): Rename from bibtex-entry-indentation.
 
        * bibtex.el (bibtex-entry-field-alist): Used different order for
        some fields (as documented in btxdoc.tex).  Changed one of the
        * bibtex.el (bibtex-reference-key): Reincluded parentheses.
        Parentheses should be disallowed only in field constants.
 
-       * bibtex.el (bibtex-autokey-transcriptions): Fixed bug (two
+       * bibtex.el (bibtex-autokey-transcriptions): Fix bug (two
        entries for `\o' while `\oe' entry was missing).
 
        * bibtex.el (bibtex-entry-indentation): New variable to determine
        (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead
        of `re-search-forward'.
        (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry):
-       Renamed from beginning-of-first-bibtex-entry and
+       Rename from beginning-of-first-bibtex-entry and
        beginning-of-last-bibtex-entry.  Go to beginning of line, return point.
        (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry)
        (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'.
        (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head'
        instead of a fixed string.
 
-       * bibtex.el (bibtex-beginning-of-entry, bibtex-end-of-entry): Now
-       return point if called from a program.
+       * bibtex.el (bibtex-beginning-of-entry, bibtex-end-of-entry):
+       Now return point if called from a program.
        (bibtex-enclosing-field, bibtex-format-entry)
        (bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode)
        (bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer)
 
        * bibtex.el (bibtex-entry-delimiters): New variable to determine
        if entries shall be delimited by braces or parentheses.
-       (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New
-       helper functions.
-       (bibtex-entry, bibtex-String, bibtex-Preamble): Respect
-       `bibtex-entry-delimiters'.
+       (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter):
+       New helper functions.
+       (bibtex-entry, bibtex-String, bibtex-Preamble):
+       Respect `bibtex-entry-delimiters'.
        (bibtex-entry-format): Doc fix.
-       (bibtex-reference-key, bibtex-field-const): Removed parentheses
+       (bibtex-reference-key, bibtex-field-const): Remove parentheses
        from allowed characters.
        (bibtex-end-of-entry): Better handling of incorrect preambles.
 
        (current-line): New helper function to calculate current
        linenumber.  Something like this should really be defined somewhere
        else in Emacs.
-       (bibtex-validate): Changed to show all errors in buffer in a
+       (bibtex-validate): Change to show all errors in buffer in a
        `compilation mode' buffer.  If there are syntax errors, it aborts
        after the syntax check, since higher-level check functions rely on
        the syntactical correctness of buffer.  If called from another lisp
        (twice as high) than `lazy-lock-stealth-time'.
        (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes.
 
-       * bibtex.el (bibtex-buffer-last-parsed-tick): Renamed from
+       * bibtex.el (bibtex-buffer-last-parsed-tick): Rename from
        bibtex-buffer-last-parsed-for-keys-tick and made it really
        buffer-local (bug fix).
        (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick.
        if it has been aborted.
        (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily.
 
-       * bibtex.el (bibtex-generate-autokey): Changed the name part
+       * bibtex.el (bibtex-generate-autokey): Change the name part
        generation (bugfix).  This function handles now correctly all three
        forms of BibTeX names, "First von Last", "von Last, First", "von
        Last, Jr, First".  In every case the "Last" part is correctly
        the first is used.  Name fields spread over more than one line are
        no problem anymore.
 
-       * bibtex.el (bibtex-entry-format): Changed default value to
+       * bibtex.el (bibtex-entry-format): Change default value to
        exclude 'page-dashes.  Modified documentation.
        (bibtex-autokey-name-change-strings)
        (bibtex-autokey-titleword-abbrevs)
        (bibtex-autokey-titleword-change-strings, bibtex-entry)
        (bibtex-validate): Doc fixes.
        (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract.
-       (bibtex-generate-autokey): Changed documentation.  Small
-       modification in calculating title field.
+       (bibtex-generate-autokey): Change documentation.
+       Small modification in calculating title field.
        (bibtex-mode): Included bibtex-ispell-entry into the list of
        `interesting' functions.
        (bibtex-kill-field): Bug fix (killing of first field in entry
 
        * bibtex.el (bibtex-mode-map): bibtex-complete-key wasn't bound
        correctly.
-       (bibtex-complete): Fixed bug (used string entries defined in
+       (bibtex-complete): Fix bug (used string entries defined in
        buffer as object to completion).
 
        * bibtex.el (Menu): Use easymenu.  More menu items for
        (bibtex-kill-field): Use new variable bibtex-field-kill-ring.
        (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring.
 
-       * bibtex.el (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New
-       internal variables like kill-ring and kill-ring-yank-pointer, but
+       * bibtex.el (bibtex-kill-ring, bibtex-kill-ring-yank-pointer):
+       New internal variables like kill-ring and kill-ring-yank-pointer, but
        bibtex-kill-ring holds fields or complete reference entries
        instead of raw strings.
        (bibtex-kill-ring-max): New user option similar to kill-ring-max.
-       (bibtex-kill-field): Renamed from bibtex-delete-field again.  It
-       now supports the new variable bibtex-kill-ring.
+       (bibtex-kill-field): Rename from bibtex-delete-field again.
+       It now supports the new variable bibtex-kill-ring.
        (bibtex-copy-field-as-kill, bibtex-kill-entry)
-       (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New
-       interactive functions, which work on the bibtex-kill-ring
+       (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop):
+       New interactive functions, which work on the bibtex-kill-ring
        variable.
        (bibtex-insert-current-kill): New helper function to insert
        contents of bibtex-kill-ring in an appropriate way.
        generation, if year field of current entry is absent.
        (bibtex-generate-autokey): Use this new variable.
 
-       * bibtex.el (bibtex-include-OPTannote): Deleted (is set in
+       * bibtex.el (bibtex-include-OPTannote): Delete (is set in
        bibtex-user-optional-fields).
-       (bibtex-entry, bibtex-print-help-message): Removed support for
+       (bibtex-entry, bibtex-print-help-message): Remove support for
        bibtex-include-OPTannote.
 
        * bibtex.el (bibtex-entry-format): New constant
        * bibtex.el (bibtex-mode): Set value for
        font-lock-mark-block-function.
 
-       * bibtex.el (bibtex-font-lock-keywords): Changed to distinguish
+       * bibtex.el (bibtex-font-lock-keywords): Change to distinguish
        optional from ordinary fields.
        (bibtex-format-entry, bibtex-print-help-message)
        (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps.
 
-       * bibtex.el (bibtex-delete-field): Changed from
+       * bibtex.el (bibtex-delete-field): Change from
        bibtex-delete-optional-or-alternative-field.  Deletes now mandatory
        fields as well.
-       (bibtex-mode): Changed documentation.
+       (bibtex-mode): Change documentation.
 
-       * bibtex.el (bibtex-entry-type-history, bibtex-key-history): New
-       variables to use own histories in BibTeX buffers.
+       * bibtex.el (bibtex-entry-type-history, bibtex-key-history):
+       New variables to use own histories in BibTeX buffers.
        (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new
        variables.
 
        * bibtex.el (bibtex-entry, bibtex-make-field): A function can now
        be used to generate a fields init string.
        (bibtex-include-OPTkey, bibtex-include-OPTannote)
-       (bibtex-entry-field-alist): Changed documentation accordingly.
+       (bibtex-entry-field-alist): Change documentation accordingly.
 
        * bibtex.el (bibtex-mode): bibtex-parse-keys on start of mode is
        now abortable, too.
        * bibtex.el (bibtex-find-entry-location): Bug fix: Insertion into
        completely empty buffer didn't work.
 
-       * bibtex.el (bibtex-user-optional-fields): Renamed from
+       * bibtex.el (bibtex-user-optional-fields): Rename from
        bibtex-mode-user-optional-fields.
        (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message):
        Use bibtex-user-optional-fields.
        delimiting braces and not those inside fields.
 
        * bibtex.el (skip-to-valid-bibtex-entry, bibtex-parse-keys)
-       (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate
-       complex regexps outside of loops.
-       (bibtex-mode): Changed documentation on how to convert third party
+       (bibtex-end-of-entry, bibtex-validate, bibtex-reformat):
+       Calculate complex regexps outside of loops.
+       (bibtex-mode): Change documentation on how to convert third party
        buffers.
 
        * bibtex.el (bibtex-convert-alien): New function to convert a
        call of bibtex-parse-keys.  This avoids unnecessary double call if
        Font Lock mode is chosen for buffer at startup.
 
-       * bibtex.el (bibtex-String, bibtex-Preamble): Renamed from
+       * bibtex.el (bibtex-String, bibtex-Preamble): Rename from
        bibtex-string and bibtex-preamble.
        (bibtex-String): If bibtex-maintain-sorted-entries and
        bibtex-sort-ignore-string-entries are both non-nil, read string
        location (as for normal entries).
 
        * bibtex.el (bibtex-autokey-titleword-first-ignore)
-       (bibtex-autokey-titleword-abbrevs): Changed documentation: case of
+       (bibtex-autokey-titleword-abbrevs): Change documentation: case of
        regexps doesn't matter anymore.
-       (bibtex-field-const, bibtex-reference-key): Simplified to not
+       (bibtex-field-const, bibtex-reference-key): Simplify to not
        contain uppercase letters.
        (member-of-regexp, assoc-of-regexp): Ignore case of regexp.
        (map-bibtex-entries): Call function not for every syntactical correct
        (bibtex-end-of-entry): Only report an "unknown entry" message if
        called interactively.
 
-       * bibtex.el (bibtex-sort-ignore-string-entries): Renamed back from
+       * bibtex.el (bibtex-sort-ignore-string-entries): Rename back from
        bibtex-sort-ignore-string-and-preamble.  Of course, preambles are
        always ignored, since they have no key at all.
        (bibtex-string): Slightly less complex regexp.
        (skip-to-valid-bibtex-entry): New helper function to skip forward
        (or backward) to beginning of next syntactical correct known
-       BibTeX entry, if not already there.  Respects
-       bibtex-sort-ignore-string-entries.
+       BibTeX entry, if not already there.
+       Respects bibtex-sort-ignore-string-entries.
        (map-bibtex-entries): Bug fix: It wasn't called for string entries
        even if bibtex-sort-ignore-string-entries was nil.
        (beginning-of-last-bibtex-entry): New helper function to go to
        last entry in buffer.
        (bibtex-end-of-entry): Bug fix: Now works with string and preamble
        entries as well.
-       (bibtex-sort-buffer): Renamed from bibtex-sort-entries.  Simplified
+       (bibtex-sort-buffer): Rename from bibtex-sort-entries.  Simplified
        by using new function skip-to-valid-bibtex-entry.  Now only known
        entries are checked.
-       (bibtex-find-entry-location): Simplified by using new functions
+       (bibtex-find-entry-location): Simplify by using new functions
        skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry.
        Only known entries are used to determine location.
        (bibtex-validate): Now checks string entries, too.
        bibtex-end-of-entry.
 
        * bibtex.el (bibtex-end-of-entry): Don't use forward-sexp anymore,
-       since this fails on entries with non-escaped double-quotes.  Use
-       search-bibtex-reference instead (though it is slower, it is more
+       since this fails on entries with non-escaped double-quotes.
+       Use search-bibtex-reference instead (though it is slower, it is more
        reliable).
        (bibtex-ispell-abstract): Use normal regexps created by
        bibtex-cfield instead of special ones.
        work, since due to a bug all entries were simply skipped.
 
        * bibtex.el (bibtex-mode): Doc fix.
-       (bibtex-delete-optional-or-alternative-field): Renamed from
+       (bibtex-delete-optional-or-alternative-field): Rename from
        bibtex-kill-optional-or-alternative-field.
        (bibtex-delete-optional-or-alternative-field, bibtex-empty-field):
        Use delete-region, not kill-region.
        buffer, died on entries with `@' in other than first column).
        (beginning-of-first-bibtex-entry, bibtex-format-entry)
        (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry):
-       Changed to allow BibTeX entries to start in a column different
+       Change to allow BibTeX entries to start in a column different
        from 1 (but still for speed reasons only whitespace is allowed
        prior to the `@' on the same line.
 
        (bibtex-find-entry-location): A bug had been introduced by using
        search-bibtex-reference instead of re-search-forward (fixed).
 
-       * bibtex.el (bibtex-field-delimiters): Renamed from
+       * bibtex.el (bibtex-field-delimiters): Rename from
        bibtex-field-delimiter.
        (bibtex-entry-format): Constant empty-opts renamed to
        empty-opts-or-alts.
-       (bibtex-remove-delimiters): Renamed from
+       (bibtex-remove-delimiters): Rename from
        bibtex-remove-double-quotes-or-braces.
        (bibtex-reformat): New function.
 
        * bibtex.el (bibtex-fill-entry): New function to refill entry.
-       (bibtex-mode-map): Defined key for bibtex-fill-entry.
+       (bibtex-mode-map): Define key for bibtex-fill-entry.
 
        * bibtex.el (bibtex-field-delimiter): Substitutes variables
        bibtex-field-left-delimiter and bibtex-field-right-delimiter.
-       (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New
-       helper functions.
+       (bibtex-field-left-delimiter, bibtex-field-right-delimiter):
+       New helper functions.
        (bibtex-make-field, bibtex-pop): Use new variable
        bibtex-field-delimiter.
        (bibtex-empty-field, bibtex-string): Use new functions
        (bibtex-mode): Don't set fill-prefix anymore, but use new function
        bibtex-do-auto-fill.
 
-       * bibtex.el (bibtex-find-entry-location): Fixed bug (when
+       * bibtex.el (bibtex-find-entry-location): Fix bug (when
        bibtex-maintain-sorted-entries was non-nil, an entry with a key
        greater than all other keys wasn't inserted in the correct place).
 
        * bibtex.el (bibtex-mode): Don't use bibtex-auto-fill-function
        anymore, but use directly variable fill-prefix.
 
-       * bibtex.el (bibtex-find-entry-location): Fixed bug (on duplicate
+       * bibtex.el (bibtex-find-entry-location): Fix bug (on duplicate
        keys, point must move to beginning of entry, so that bibtex-entry
        works correctly).
 
-       * bibtex.el (bibtex-complete): Fixed bug (parameter string-list
+       * bibtex.el (bibtex-complete): Fix bug (parameter string-list
        was mistakenly altered by the function itself).
 
        * bibtex.el (bibtex-mode-map): Bind bibtex-complete-key to C-TAB.
 
-       * bibtex.el (bibtex-validate): Renamed from bibtex-validate-buffer
+       * bibtex.el (bibtex-validate): Rename from bibtex-validate-buffer
        since it can acts on region if active.  Use search-bibtex-reference.
        (search-bibtex-reference): New function to be used in places where
        prior a re-search-{forward|backward} for bibtex-reference or
        bibtex-enclosing-reference-maybe-empty-head.
        (bibtex-reference-infix, bibtex-reference-postfix): New constants
        necessary due to splitting bibtex-reference.
-       (bibtex-reference): Deleted.
-       (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted.
+       (bibtex-reference): Delete.
+       (bibtex-type-in-reference, skip-whitespace-and-comments): Delete.
 
        * bibtex.el (bibtex-mode): Don't turn auto-fill-mode on.  Use new
        variable normal-auto-fill-function.
 
-       * bibtex.el (bibtex-field-string): Simplified.
+       * bibtex.el (bibtex-field-string): Simplify.
 
-       * bibtex.el (bibtex-mode-syntax-table): Changed syntax of
+       * bibtex.el (bibtex-mode-syntax-table): Change syntax of
        double-quote back to quote syntax.
 
        * bibtex.el (bibtex-complete): New generic function for interface
        functions bibtex-complete-string and bibtex-complete-key.
        (bibtex-complete-key): New function.
 
-       * bibtex.el (bibtex-sort-ignore-string-and-preamble): Renamed from
+       * bibtex.el (bibtex-sort-ignore-string-and-preamble): Rename from
        bibtex-sort-ignore-string-entries.
        (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble
        and ignore preamble entries as well.
        mark is active.  With optional argument checks if required fields
        are missing, too.
 
-       * bibtex.el (bibtex-mode): Added support for imenu.
+       * bibtex.el (bibtex-mode): Add support for imenu.
 
        * bibtex.el (bibtex-entry-field-alist)
-       (bibtex-mode-user-optional-fields): Modified syntax to allow
+       (bibtex-mode-user-optional-fields): Modify syntax to allow
        preinitialization of fields.
        (bibtex-make-field, bibtex-make-optional-field):
        Support preinitialization of fields.
        (bibtex-generate-autokey): Use new variables.
 
        * bibtex.el (bibtex-field-const, bibtex-reference-type)
-       (bibtex-reference-key): Changed to match the (according to Oren
+       (bibtex-reference-key): Change to match the (according to Oren
        Patashnik) allowed characters.
 
-       * bibtex.el (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed
-       from bibtex-clean-entry-zap-empty-opts.
+       * bibtex.el (bibtex-clean-entry-zap-empty-opts-or-alts):
+       Rename from bibtex-clean-entry-zap-empty-opts.
        (bibtex-entry-field-alist): Slightly modified syntax to support
        alternative fields needed for Book and InBook references.
        (bibtex-font-lock-keywords, bibtex-print-help-message)
        (bibtex-make-field, bibtex-pop, bibtex-clean-entry):
        Support ALT prefixed entries.
-       (bibtex-mode): Documented new ALT prefixed fields.
-       (bibtex-make-optional-field): Modified to give only field name as
+       (bibtex-mode): Document new ALT prefixed fields.
+       (bibtex-make-optional-field): Modify to give only field name as
        arg to bibtex-make-field.
        (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field):
-       Renamed from bibtex-remove-OPT and bibtex-kill-optional-field,
+       Rename from bibtex-remove-OPT and bibtex-kill-optional-field,
        respectively.  Modified to support ALT prefixes.
 
        * bibtex.el (bibtex-enclosing-field, bibtex-print-help-message):
 
 1997-06-09  Kenichi Handa  <handa@etl.go.jp>
 
-       * mule.el: Delete declaration for buffer-file-coding-system.  It
-       is done in buffer.c now.  In the comment, change coding-system to
+       * mule.el: Delete declaration for buffer-file-coding-system.
+       It is done in buffer.c now.  In the comment, change coding-system to
        coding system.  The name coding-vector is changed to coding-spec.
        (coding-vector-type, coding-vector-mnemonic)
-       (coding-vector-docstring, coding-vector-flags): Deleted.
+       (coding-vector-docstring, coding-vector-flags): Delete.
        (coding-system-spec-ref): New function.
        (coding-system-type, coding-system-mnemonic, coding-system-flags):
        Use coding-system-spec-ref.
-       (coding-system-doc-string): Renamed from coding-system-docstring.
-       (coding-system-eol-type): Renamed from coding-system-eoltype.
-       (coding-system-eol-type-mnemonic): Moved to mule-util.el.
+       (coding-system-doc-string): Rename from coding-system-docstring.
+       (coding-system-eol-type): Rename from coding-system-eoltype.
+       (coding-system-eol-type-mnemonic): Move to mule-util.el.
        (coding-system-post-read-conversion): Likewise.
        (coding-system-pre-write-conversion): Likewise.
-       (default-process-coding-system): Deleted.  Now declared in
+       (default-process-coding-system): Delete.  Now declared in
        buffer.c.
        (make-subsidiary-coding-system): New function.
        (make-coding-system): Check arguments more strictly.  Do not make
        -unix, -dos, -mac variants for TYPE 4.
        (define-coding-system-alias): Call make-subsidiary-coding-system.
-       (set-buffer-file-coding-system): Adjusted for the function name
+       (set-buffer-file-coding-system): Adjust for the function name
        changes.
        (find-new-buffer-file-coding-system): Likewise.
-       (default-process-coding-system): Deleted.  Now defined in coding.c.
+       (default-process-coding-system): Delete.  Now defined in coding.c.
 
        * mule-conf.el: Coding system names changed.
 
        (print-coding-system): Likewise.
        (list-coding-systems): Likewise.  Make it interactive.
 
-       * mule-util.el (set-coding-system-alist): Deleted.
+       * mule-util.el (set-coding-system-alist): Delete.
        (string-to-sequence): Doc string modified.
        (coding-system-list): Add optional arg BASE-ONLY.
        (coding-system-base): New function.
 
 1997-06-07  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
 
-       * files.el (file-name-non-special): Handle
-       file-name-completion and file-name-all-completions.
+       * files.el (file-name-non-special):
+       Handle file-name-completion and file-name-all-completions.
 
        * mailalias.el: Customize.  Doc fixes.
        Mark some risky local variables.
 
        * dired.el (dired-unmark-all-marks):
-       Renamed from dired-unmark-all-files-no-query.
+       Rename from dired-unmark-all-files-no-query.
 
        * language/european.el (setup-8-bit-environment):
        Load the file with load, not require, so that we reload it if nec.
        * language/english.el ("English"): Improve doc string.
 
        * language/indian.el (describe-indian-environment-map):
-       Renamed from describe-indian-support-map.
+       Rename from describe-indian-support-map.
        * language/devanagari.el: Corresponding changes.
 
        * language/european.el (describe-european-environment-map):
-       Renamed from describe-european-support-map.
+       Rename from describe-european-support-map.
 
        * language/cyrillic.el (describe-cyrillic-environment-map):
-       Renamed from describe-cyrillic-support-map.
+       Rename from describe-cyrillic-support-map.
 
        * language/chinese.el (describe-chinese-environment-map):
-       Renamed from describe-chinese-support-map.
+       Rename from describe-chinese-support-map.
 
        * mule-cmds.el (describe-language-environment):
-       Renamed from describe-language-support.
+       Rename from describe-language-support.
        Do the real work here; don't call describe-specified-language-support.
        Print the mnemonics when mentioning coding systems.
        Improve style of output.
        (describe-specified-language-environment):
-       Renamed from describe-specified-language-support.
+       Rename from describe-specified-language-support.
        Don't do the work here; call describe-language-environment.
        (describe-language-environment-map):
-       Renamed from describe-language-support-map.
+       Rename from describe-language-support-map.
 
        * language/european.el (setup-8-bit-environment):
        Do not set set-case-syntax-offset.
 
 1997-06-04  Per Abrahamsen  <abraham@dina.kvl.dk>
 
-       * wid-edit.el (widget-kill-line): Fixed for overlays.
+       * wid-edit.el (widget-kill-line): Fix for overlays.
 
        * cus-edit.el (custom-buffer-create-internal): Show full
        documentation string in buffers with only a single item.
        (widget-field-end): Workaround for local-map at
        end of overlay.
        (widget-specify-field): Ditto.
-       (widget-move): Fixed but with single button buffers.
+       (widget-move): Fix but with single button buffers.
 
-       * cus-edit.el (custom-buffer-create-internal): Improved help
+       * cus-edit.el (custom-buffer-create-internal): Improve help
        strings for reset buttons.
 
        * wid-edit.el (widget-move): Restored support for
        (widget-documentation-string-value-create): Restore support for
        `widget-documentation--face'.
 
-       * cus-edit.el (customize-variable-other-window): Added defalias.
+       * cus-edit.el (customize-variable-other-window): Add defalias.
 
        * widget.el (:complete): New keyword.
        (:complete-function): New keyword.
 
 1997-06-02  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
 
-       * text-mode.el (spaced-text-mode): Renamed from text-mode.
+       * text-mode.el (spaced-text-mode): Rename from text-mode.
        But change the mode name and hooks.
        (text-mode): Put the guts of indented-text-mode here.
        But don't define text-mode-abbrev-table, just use it.
 
 1997-06-02  Michael Kifer  <kifer@cs.sunysb.edu>
 
-       * ediff-util.el (ediff-toggle-multiframe): Improved.
-       (ediff-setup, ediff-inferior-compare-regions): Modified.
+       * ediff-util.el (ediff-toggle-multiframe): Improve.
+       (ediff-setup, ediff-inferior-compare-regions): Modify.
        (ediff-setup): Bug fixed.
        * ediff-init.el (ediff-file-attributes): Use ediff-file-remote-p.
        * ediff-wind.el (ediff-setup-windows-multiframe-merge)
-       (ediff-setup-windows-multiframe-compare): Improved window placement.
+       (ediff-setup-windows-multiframe-compare): Improve window placement.
        * ediff-diff.el (ediff-make-fine-diffs):
-       Fixed messages about whitespace regions.
+       Fix messages about whitespace regions.
        * ediff-wind.el, ediff-ptch.el, ediff-mult.el, ediff-merg.el:
        custom.el'ed.
 
        * viper-init.el (vip-parse-sexp-ignore-comments): New variable.
        * viper-cmd.el (vip-paren-match): Parsing comments is now controlled
        with vip-parse-sexp-ignore-comments.
-       * viper-cmd.el (vip-goto-col): Fixed.
+       * viper-cmd.el (vip-goto-col): Fix.
        * viper-cmd.el (vip-autoindent): Now expands abbrevs.
        (vip-adjust-keys-for): Unbinds vip-autoindent, if vip-auto-indent
        is nil.
-       * viper-cmd.el (vip-prefix-arg-value): Fixed computation of integer
+       * viper-cmd.el (vip-prefix-arg-value): Fix computation of integer
        prefix args.
        * viper-cmd.el, viper-init.el: New files.
 
 
 1997-06-01  Dan Nicolaescu  <done@ece.arizona.edu>
 
-       * hideshow.el (hs-show-hidden-short-form): Updated doc string.
+       * hideshow.el (hs-show-hidden-short-form): Update doc string.
        (hs-adjust-block-beginning): Likewise.
        (hs-special-modes-alist): C and C++ should also use
        hs-c-like-adjust-block-beginning.
        (hs-find-block-beginning): If hs-adjust-block-beginning is t and
        we apply hs-adjust-block-beginning and we reach the point means
        that we found the block beginning.
-       (hs-c-like-adjust-block-beginning): Renamed from
+       (hs-c-like-adjust-block-beginning): Rename from
        java-hs-adjust-block-beginning.
 
 1997-06-01  Simon Leinen  <simon@switch.ch>
        getting read-only bob and eob in XEmacs.
        * wid-browse.el (widget-browse-at): Use `get-char-property'
        instead of `get-text-property'.
-       * widget.el (:value-from :value-to): Deleted.
+       * widget.el (:value-from :value-to): Delete.
        * widget.el (:button-overlay, :field-overlay): New keywords.
        * wid-edit.el (widget-default-delete): Delete overlays.
        (widget-field-value-delete): Delete overlay.
 
 1997-06-01  Per Abrahamsen  <abraham@dina.kvl.dk>
 
-       * cus-edit.el (custom-format-handler): Changed look of group
+       * cus-edit.el (custom-format-handler): Change look of group
        indicators.
 
        * wid-edit.el (widget-kill-line): Use forward-line instead of
 
        * cus-edit.el (custom-variable-prompt):
        Handle variable-at-point returning 0.
-       (customize-option): Renamed from custom-variable.
+       (customize-option): Rename from custom-variable.
        (customize-variable): Add it as an alias.
        (customize-option-other-window):
-       Renamed from customize-variable-other-window.
+       Rename from customize-variable-other-window.
        (custom-load-symbol): Search for both short and absolute
        names of the library, when avoiding duplicate loading.
 
        * cus-edit.el (custom-format-handler): New %e and %- escapes.
        (custom-group): Use them.
 
-       * widget.el (:widget-doc): Removed keyword.
-       * wid-edit.el (widget-help): Removed widget.
-       (widget-help-action): Removed function.
+       * widget.el (:widget-doc): Remove keyword.
+       * wid-edit.el (widget-help): Remove widget.
+       (widget-help-action): Remove function.
 
        * widget.el (:documentation-shown): New keyword.
        * wid-edit.el (documentation-string): New widget.
        * mule-cmds.el (set-language-environment): Add autoload cookie.
        Renamed from setup-language-environment.
 
-       * startup.el (iso-8859-n-locale-regexp): Renamed from
+       * startup.el (iso-8859-n-locale-regexp): Rename from
        iso-8859-1-locale-regexp.
 
        * loadup.el: Always load faces.el.
        * icomplete.el: Integrated Emacs 19.34 and XEmacs 19.15 corrections
        (typos, style, command revisions, etc).
 
-       * icomplete.el: Integrated immediate keybindings display.  See
-       `icomplete-show-key-bindings', `icomplete-get-keys', and
+       * icomplete.el: Integrated immediate keybindings display.
+       See `icomplete-show-key-bindings', `icomplete-get-keys', and
        `icomplete-completions'.
 
        * icomplete.el (icomplete-get-keys): Return keys bound in prior
 
        * cus-edit.el (custom-magic-alist): Shortened message.
 
-       * cus-edit.el (custom-help-menu): Updated names.
+       * cus-edit.el (custom-help-menu): Update names.
 
        * cus-edit.el: Say `invoke' instead of `activate'.
        * wid-edit.el: Ditto.
        (widget-glyph-insert-glyph): No tag here.
        (widget-push-button-value-create): But here.
 
-       * wid-edit.el (widget-field-face): Changed to dim gray.
+       * wid-edit.el (widget-field-face): Change to dim gray.
 
        * wid-edit.el (widget-push-button-prefix): New option.
        (widget-push-button-suffix): New option.
        (widget-button): New group.
 
-       * widget.el (:text-format): Removed.
+       * widget.el (:text-format): Remove.
        (:button-suffix): New keyword.
        (:button-prefix): New keyword.
 
        * cus-edit.el (custom-magic-alist): Use `invoke' instead of
        `push'.
 
-       * cus-edit.el (custom-magic-alist): Changed rogue state message.
+       * cus-edit.el (custom-magic-alist): Change rogue state message.
 
        * custom.el (defface): Doc fix.
 
        * cus-edit.el, custom.el: Renamed `factory' to `standard'
        everywhere.
 
-       * cus-edit.el (custom-magic-show-button): Changed default to
+       * cus-edit.el (custom-magic-show-button): Change default to
        `nil'.
-       (custom): Removed `:format'.
-       (custom-variable): Removed level button.
+       (custom): Remove `:format'.
+       (custom-variable): Remove level button.
        (custom-face): Ditto.
-       (custom-level): Deleted.
-       (custom-level-action): Deleted.
+       (custom-level): Delete.
+       (custom-level-action): Delete.
        (custom-format-handler): Update caller.
        (custom-group-magic-alist): Merged into `custom-magic-alist'.
        (custom-magic-value-create): Use merged `custom-magic-alist'.
 
        * icomplete.el: Integrated Emacs 19.34 and XEmacs 19.15
        corrections (typos, style, command revisions, etc).
-       Integrated hacked up XEmacs immediate keybindings display.  See
-       `icomplete-show-key-bindings', `icomplete-get-keys', and
+       Integrated hacked up XEmacs immediate keybindings display.
+       See `icomplete-show-key-bindings', `icomplete-get-keys', and
        `icomplete-completions'.  Doesn't work with mainline GNU
        Emacs 19.34 (because the cmdloop doesn't set owindow, and the
        current-local-map doesn't take optional buffer arg), so feature
        SYNTACTIC-PROPERTIES.  Eval font-lock-syntactic-keywords with
        font-lock-eval-keywords.  Compile and compare all keywords.
        (fast-lock-get-syntactic-properties): New function.
-       (fast-lock-add-properties): Renamed from fast-lock-set-face-properties.
+       (fast-lock-add-properties): Rename from fast-lock-set-face-properties.
        Take new arg SYNTACTIC-PROPERTIES and add syntax-table text properties.
        Now fast-lock.el saves a buffer's value of font-lock-syntactic-keywords
        and syntax-table text properties as added by font-lock.el.
        set-current-process-coding-system.
 
        * encoded-kb.el (encoded-kbd-mode): Fix typo in doc-string.
-       (encoded-kbd-set-coding-system): Deleted.
+       (encoded-kbd-set-coding-system): Delete.
 
        * case-table.el (describe-buffer-case-table): Use aref instead of
        set-char-table-range.
        (describe-specified-language-support): New function.
        (describe-language-support): Call the above function.
        (universal-coding-system-argument): New function.
-       (read-language-and-input-method-name): Doc-string fixed.  If
-       default-input-method is nil, use previous-input-method as the
+       (read-language-and-input-method-name): Doc-string fixed.
+       If default-input-method is nil, use previous-input-method as the
        default value.
-       (set-default-input-method): Deleted.
+       (set-default-input-method): Delete.
 
        * language/*.el: Most of setup-LANGUAGE-environment functions are
        moved form LANGUAGE.el to LANG-util.el.  These functions now at
        also accept a subdir with a file called `index'.
 
        * texinfmt.el (texinfo-extra-inter-column-width):
-       Renamed from extra-inter-column-width.  Doc fix.
+       Rename from extra-inter-column-width.  Doc fix.
        (texinfo-multitable-buffer-name):
        Variable renamed from multitable-temp-buffer-name.
        (texinfo-multitable-rectangle-name):
        read-only data someday.
        (eldoc-docstring-message): If truncating symbol name, show ending
        of name rather than beginning.  The former is generally more unique.
-       (eldoc-function-argstring-from-docstring-method-table): Handle
-       pathological `save-restriction' case.
+       (eldoc-function-argstring-from-docstring-method-table):
+       Handle pathological `save-restriction' case.
        [top level]: Add `indent-for-tab-command' to eldoc-message-commands.
 
 1997-05-21  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
        (ada-font-lock-keywords-1): Move "task" before "task (body|type)" to
        correct highlighting (regexp depends on order).
 
-       * ada-mode.el (ada-in-char-const-p): Renamed from `ada-after-char-p'.
+       * ada-mode.el (ada-in-char-const-p): Rename from `ada-after-char-p'.
        Also test following character.
        (ada-adjust-case): Use better function `ada-in-char-const-p'.
        (ada-in-string-or-comment-p): Test for being in a char constant.
-       (ada-clean-buffer-before-saving): Changed default to t.
+       (ada-clean-buffer-before-saving): Change default to t.
        (ada-mode): Set `font-lock-defaults' for Emacs only, use properties
        for XEmacs.
 
-       * ada-mode.el (ada-indent-newline-indent): Simplified by just calling
+       * ada-mode.el (ada-indent-newline-indent): Simplify by just calling
        `ada-indent-current'.
 
-       * ada-mode.el (ada-end-stmt-re): Added word delimiters in regexp.
+       * ada-mode.el (ada-end-stmt-re): Add word delimiters in regexp.
        Removed `interactive' statements which were needed only for debugging.
 
        * ada-mode.el:
        (ada-goto-next-word): Generalized old `ada-goto-previous-word' for
        both directions.
 
-       * ada-mode.el (ada-indent-function): Removed unnecessary `package' case.
+       * ada-mode.el (ada-indent-function): Remove unnecessary `package' case.
        (ada-get-indent-case): Before testing for `=>', be sure there is
        an `is'.
        (ada-search-prev-end-stmt): Test for `separate' keyword on the
 
        * ada-mode.el: Doc fixes.
        (ada-mode): Support new font-lock-mode.
-       (ada-format-paramlist): Changed all `accept' to `access'.
-       (ada-insert-paramlist): Changed all `accept' to `access'.
+       (ada-format-paramlist): Change all `accept' to `access'.
+       (ada-insert-paramlist): Change all `accept' to `access'.
        (ada-in-comment-p): Use standard Emacs way `parse-partial-sexp'.
        (ada-font-lock-keywords-1): Regexps in not byte-compiled code behave
        different than byte-compiled regexps.
 
 1997-05-20  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
 
-       * word-help.el (set-word-help-file): Renamed from set-help-file.
+       * word-help.el (set-word-help-file): Rename from set-help-file.
 
        * crisp.el (crisp-mode): Add autoload cookie.
 
        * dos-w32.el (add-untranslated-filesystem)
        (remove-untranslated-filesystem): Add interactive spec.
 
-       * crisp.el (crisp-last-last-command): Renamed from last-last-command
+       * crisp.el (crisp-last-last-command): Rename from last-last-command
        and defvar added.
 
        * levents.el (event-closest-point): Fix paren error.
        (compilation-revert-buffer): New function.
        (compilation-mode): Set revert-buffer-function.
 
-       * files.el (revert-without-query): Renamed from
+       * files.el (revert-without-query): Rename from
        find-file-revert-without-query.
        (find-file-noselect): Use new option.
        (revert-buffer): Check the option here too.
 
-       * cus-face.el (custom-facep): Defined (once again).
+       * cus-face.el (custom-facep): Define (once again).
 
        * simple.el (do-auto-fill): Check enable-kinsoku and
        enable-multibyte-characters.
 
 1997-05-16  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
 
-       * autoload.el (update-autoloads-from-directories): Renamed from
+       * autoload.el (update-autoloads-from-directories): Rename from
        update-autoloads-from-directory.  Take multiple directories as args.
        Use locate-library to find loaddefs.el and the top level Lisp dir.
        (batch-update-autoloads): Call update-autoloads-from-directories.
 
        * mule-cmds.el (set-language-info): Change the special treatment
        of key 'describe-function to 'documentation.
-       (describe-specified-language-support): Renamed from
+       (describe-specified-language-support): Rename from
        describe-language-support-internal.  Get language name from
        last-command-event.
-       (describe-language-support): Call
-       describe-specified-language-support.
+       (describe-language-support):
+       Call describe-specified-language-support.
 
        * language/chinese.el: Delete functions describe-LANGUAGE-support.
        Delete 'describe-function entries and change 'documentation
        (default): Use `:mouse-down-action'.
        (menu-choice): Ditto.
        (widget-choice-mouse-down-action): New function.
-       (widget-info-link-action): Removed kludge to steal up event.
+       (widget-info-link-action): Remove kludge to steal up event.
        * cus-edit.el (widget-magic-mouse-down-action): New function.
        (custom-magic-value-create): Use it.
-       (custom-buffer-create-internal): Removed kludge to steal up event.
+       (custom-buffer-create-internal): Remove kludge to steal up event.
 
-       * widget.el (:glyph-up, :glyph-down, :glyph-inactive): New
-       keywords.
+       * widget.el (:glyph-up, :glyph-down, :glyph-inactive):
+       New keywords.
        * wid-edit.el (widget-glyph-insert-glyph): Support optional `down'
        and `inactive' glyphs.
        (widget-push-button-value-create): Ditto.
        (customize-variable-other-window, customize-face)
        (customize-face-other-window, customize-customized)
        (customize-saved, customize-apropos, custom-face-menu-create)
-       (custom-variable-menu-create, boolean, custom-menu-create): Updated
-       caller.
+       (custom-variable-menu-create, boolean, custom-menu-create):
+       Update caller.
 
        * cus-edit.el (custom-variable-action): Reset magic state.
        (custom-variable-menu): Allow `Reset to Current' on `changed'
        (choice, radio): Use it.
        (widget-prompt-value): Prepend widget type to prompt.
 
-       * wid-edit.el (widget-parent-action): Renamed from
+       * wid-edit.el (widget-parent-action): Rename from
        `widget-choice-item-action'.
-       (choice-item): Updated widget.
+       (choice-item): Update widget.
        * cus-edit.el (custom-magic): Ditto.
 
-       * wid-edit.el (widget-children-validate): Renamed from
+       * wid-edit.el (widget-children-validate): Rename from
        `widget-editable-list-validate'.
-       (editable-list, group): Updated widgets.
+       (editable-list, group): Update widgets.
        * cus-edit.el (custom, face): Ditto.
 
-       * wid-edit.el (widget-value-value-get): Renamed from
+       * wid-edit.el (widget-value-value-get): Rename from
        `widget-item-value-get'.
-       (item): Updated widget.
+       (item): Update widget.
        * cus-edit.el (face, custom): Ditto.
 
-       * wid-edit.el (widget-value-convert-widget): Renamed from
+       * wid-edit.el (widget-value-convert-widget): Rename from
        `widget-item-convert-widget'.
-       (item, editable-field): Updated widgets.
+       (item, editable-field): Update widgets.
        * cus-edit.el (face): Ditto.
 
 1997-05-14  Simon Marshall  <simon@wombat.gnu.ai.mit.edu>
 
        * gnus-mule.el: Moved to `gnus' subdirectory.
 
-       * gnus/gnus-mule.el (gnus-mule-message-send-news-function): New
-       function to encode text before sending by news.
+       * gnus/gnus-mule.el (gnus-mule-message-send-news-function):
+       New function to encode text before sending by news.
        (gnus-mule-message-send-mail-function): New function to encode
        text before sending by mail.
        (gnus-mule-initialize): Add gnus-mule-message-send-news-function
-       to the hook message-send-news-hook.  Add
-       gnus-mule-message-send-mail-function to the hook
+       to the hook message-send-news-hook.
+       Add gnus-mule-message-send-mail-function to the hook
        message-send-mail-hook.
 
        * help.el (help-with-tutorial): Fix a bug of handling non-English
        Setting of syntax and category for Devanagari characters are moved
        to characters.el.
 
-       * language/english.el (setup-english-environment): Set
-       sendmail-coding-system and rmail-file-coding-system to nil.
+       * language/english.el (setup-english-environment):
+       Set sendmail-coding-system and rmail-file-coding-system to nil.
 
        * language/ethio-util.el (fidel-to-tex-map): Name changed to
        ethio-fidel-to-tex-map.
 
        * language/european.el: Typo in comment fixed.
 
-       * language/japanese.el (setup-japanese-environment): Set
-       sendmail-coding-system and rmail-file-coding-system to
+       * language/japanese.el (setup-japanese-environment):
+       Set sendmail-coding-system and rmail-file-coding-system to
        'iso-2022-jp.
 
        * language/korean.el: Bug fixed in making coding system
        (rmail-convert-file): Comment fixed.
        (rmail-revert): Don't decode RMAIL file again because the backup
        file is saved in Emacs' internal format.
-       (rmail-convert-to-babyl-format): Check
-       rmail-enable-decoding-message.
+       (rmail-convert-to-babyl-format):
+       Check rmail-enable-decoding-message.
 
        * term/x-win.el: Create bold, italic, and bold-italic variants of
        default fontset.  Name a fontset created from user-specified ASCII
        * simple.el (assoc-ignore-case): Downcase KEY as well as element cars.
 
        * bibtex.el (assoc-ignore-case): Function deleted.
-       (bibtex-member-of-regexp): Renamed from member-of-regexp.
+       (bibtex-member-of-regexp): Rename from member-of-regexp.
        Call changed.
 
        * timer.el (timer-event-handler): Take timer as arg directly.
        (compilation-shell-minor-mode-map, compilation-shell-minor-mode):
        New variables.
        (compile-auto-highlight): Doc fix.
-       (compilation-error-regexp-alist): Removed unnecessary line break
+       (compilation-error-regexp-alist): Remove unnecessary line break
        in first regexp.  Replaced \\(\\|.* on \\) by \\(.* on \\)? in
        regexp for Absoft FORTRAN 77 Compiler 3.1.3.  Added regexp for
        SPARCcompiler Pascal.  Divided long line in regexp for Cray C
        (compilation-leave-directory-regexp-alist): New variables.
        (compilation-file-regexp-alist)
        (compilation-nomessage-regexp-alist): New variables.
-       (grep-regexp-alist): Removed unnecessary ^ at beginning of regexp.
+       (grep-regexp-alist): Remove unnecessary ^ at beginning of regexp.
        (compilation-enter-directory-regexp)
        (compilation-leave-directory-regexp): Variables deleted.
        Replaced by compilation-enter-directory-regexp-alist and
 
        * cus-edit.el (custom-group-magic-alist): New variable.
        (custom-group-state-update): Use custom-group-magic-alist.
-       (customize-group): Renamed from `customize',
+       (customize-group): Rename from `customize',
        and rename argument to GROUP.
        (customize): New function.
 
        * time-stamp.el (time-stamp-old-format-warn): Fix a tag string.
        (time-stamp-format): Use %Y not %y in default value.
 
-       * crisp.el (crisp-load-scroll-all): Renamed from ...-lock.
+       * crisp.el (crisp-load-scroll-all): Rename from ...-lock.
        (crisp-mode): Use scroll-all... not scroll-lock...
 
        * scroll-all.el: Renamed from scroll-lock.el.
        * ange-ftp.el (ange-ftp-file-entry-p): If ange-ftp-get-files returns
        nil, don't try ange-ftp-hash-entry-exists-p, just give up.
 
-       * comint.el (comint-input-face): Deleted.
+       * comint.el (comint-input-face): Delete.
 
        * compile.el (compilation-error-regexp-alist): Add regexp for Perl -w.
 
        "In" or "Out" command tells you if you are already on or off the bus.
 
        * dunnet.el (dun-sauna-heat):
-       Changed "begin to sweat" to "are perspiring"
+       Change "begin to sweat" to "are perspiring"
        so that it makes sense whether you are heating up or cooling down.
 
        * dunnet.el (dun-help):
-       Changed author e-mail address, added web page.
+       Change author e-mail address, added web page.
        Added hint for batch mode.
 
        * dunnet.el (*global*):
-       Fixed spelling of Presely in global object list.
+       Fix spelling of Presely in global object list.
 
        * dunnet.el (*global*):
-       Added coconuts, tank, and lake as objects that are recognized.
+       Add coconuts, tank, and lake as objects that are recognized.
 
        * dunnet.el (*global*):
-       Added `slip' as another way of describing the paper,
+       Add `slip' as another way of describing the paper,
        and `chip' as another way of describing the CPU.
 
        * dunnet.el (*global*):
        Upcase  abbreviations of directions in room descriptions.
 
        * dunnet.el (dun-login):
-       Fixed erroneous login message to better-describe ftp limitations.
+       Fix erroneous login message to better-describe ftp limitations.
 
        * dunnet.el (dun-rlogin):
-       Added error message if user tries to rlogin back to pokey.
+       Add error message if user tries to rlogin back to pokey.
 
        * dunnet.el (dun-load-d):
-       Fixed so that if restore file isn't found which in non-batch mode,
+       Fix so that if restore file isn't found which in non-batch mode,
        window will switch back to game.
 
 1997-04-27  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
 
 1997-04-26  Edward M Reingold  <emr@silver.wisdom.weizmann.ac.il>
 
-       * cal-french.el (calendar-print-french-date): Label
-       French date in echo area.
+       * cal-french.el (calendar-print-french-date):
+       Label French date in echo area.
 
-       * cal-coptic.el (calendar-print-coptic-date): Label
-       Coptic/Ethiopic date in echo area.
+       * cal-coptic.el (calendar-print-coptic-date):
+       Label Coptic/Ethiopic date in echo area.
 
 1997-04-25  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
 
 
        * cus-edit.el (custom-set-value): New command.
        (custom-set-variable): New command.
-       (customize-saved): Renamed from `customize-customized'.
+       (customize-saved): Rename from `customize-customized'.
        (customize-customized): New command.
        (custom-save-customized): New command.
 
        * cus-edit.el (custom-display-unselected-match): Matched too many
        displays.
 
-       * wid-edit.el (widget-field-face): Changed default background
+       * wid-edit.el (widget-field-face): Change default background
        color.
 
        * custom.el (custom-declare-variable): Set `custom-get' the right
 
        * sh-script.el (sh-case): Make this a simple define-skeleton
        as it was originally.  Don't add a menu-enable property.
-       (sh-assignment-regexp): Renamed from sh-assignment-prefix
+       (sh-assignment-regexp): Rename from sh-assignment-prefix
        undoing a renaming made by mistake.
 
        * sgml-mode.el (sgml-transformation): Fix previous change.
 
        * cus-start.el: Add support for face documentation.
 
-       * cus-dep.el (custom-make-dependencies): Fixed generation of
+       * cus-dep.el (custom-make-dependencies): Fix generation of
        parens.
        Fixed message.
 
 
 1997-04-14  Steven L Baur  <steve@altair.xemacs.org>
 
-       * edebug.el (edebug-read-and-maybe-wrap-form): Protect
-       against pathological recursive calls.
+       * edebug.el (edebug-read-and-maybe-wrap-form):
+       Protect against pathological recursive calls.
 
 1997-04-14  Karl Heuer  <kwzh@gnu.ai.mit.edu>
 
        variable instead.  buffer-substring with 3 arguments is non-portable.
 
        * elp.el (elp-instrument-function, elp-instrument-list):
-       Handle function symbols that have already been instrumented.  Do
-       not instrument them twice.
+       Handle function symbols that have already been instrumented.
+       Do not instrument them twice.
 
        * elp.el (elp-recycle-buffers-p): New variable.
 
        * cus-edit.el (customize-menu-create): New function.
        (custom-mode-customize-menu): Use it.
 
-       * cus-edit.el (custom-make-dependencies): Deleted function.
+       * cus-edit.el (custom-make-dependencies): Delete function.
 
        * cus-edit.el (customize-face): Sort faces.
 
        * cus-edit.el (custom-faces): New group.
-       (custom-magic-alist): Added.
-       (custom-variable-sample-face): Added.
-       (custom-variable-button-face): Added.
-       (custom-face-tag-face): Added.
-       (custom-group-tag-faces): Added.
-       (custom-group-tag-face): Added.
-       (customize): Removed from faces group.
+       (custom-magic-alist): Add.
+       (custom-variable-sample-face): Add.
+       (custom-variable-button-face): Add.
+       (custom-face-tag-face): Add.
+       (custom-group-tag-faces): Add.
+       (custom-group-tag-face): Add.
+       (customize): Remove from faces group.
 
        * cus-edit.el (custom-load-recursion): New variable.
        (custom-load-symbol): Use it.
        `custom-buffer-create'.
        (custom-buffer-create-other-window): New function.
 
-       * cus-edit.el (custom-guess-name-alist): Renamed from
+       * cus-edit.el (custom-guess-name-alist): Rename from
        `custom-guess-type-alist'.
        (custom-guess-doc-alist): New option.
        (custom-guess-type): Use them.
 
-       * cus-face.el (set-face-stipple): Removed Kyle Jones code.
+       * cus-face.el (set-face-stipple): Remove Kyle Jones code.
 
-       * cus-face.el (face-doc-string): Changed property name to
+       * cus-face.el (face-doc-string): Change property name to
        `face-documentation'.
        (set-face-doc-string): Ditto.
 
        unbound.
        (custom-menu-nesting): Don't define for XEmacs.
 
-       * cus-face.el (after-make-frame-hook): Removed
-       `custom-initialize-frame', as this is now in `frame.el'.
+       * cus-face.el (after-make-frame-hook):
+       Remove `custom-initialize-frame', as this is now in `frame.el'.
 
        * cus-edit.el (custom-guess-type-alist): New option.
        (custom-guess-type): New function.
        (custom-variable-type): New function.
        (custom-variable-value-create): Use it.
 
-       * cus-face.el (custom-face-attributes): Moved :family to the
+       * cus-face.el (custom-face-attributes): Move :family to the
        beginning of the list.
-       (custom-face-attributes): Added :strikethru attribute.
+       (custom-face-attributes): Add :strikethru attribute.
 
        * custom.el (custom-set-variables): If variable is already set,
        overwrite it here.
        (scheme-comment-indent, scheme-indent-offset)
        (scheme-indent-function, scheme-indent-line)
        (calculate-scheme-indent, scheme-indent-specform)
-       (scheme-indent-defform, scheme-indent-sexp): Removed; use lisp-mode
+       (scheme-indent-defform, scheme-indent-sexp): Remove; use lisp-mode
        equivalents.
        (scheme-imenu-generic-expression): New variable.
        (dsssl-imenu-generic-expression): New variable.
 
 1997-03-30  Dan Nicolaescu  <done@ece.arizona.edu>
 
-       * icon.el (icon-mode-map): Added menus.
+       * icon.el (icon-mode-map): Add menus.
        (icon-imenu-generic-expression): New variable to be used for imenu.
-       (icon-mode): Added font-lock, imenu and hideshow support.
+       (icon-mode): Add font-lock, imenu and hideshow support.
        (icon-font-lock-keywords-1, icon-font-lock-keywords-2):
        New constants for different level of font-lock fontification.
        (icon-font-lock-keywords): New variable.  Default expression to be
        * sh-script.el (sh-mode): If file has no #! line,
        set the syntax table based on the default shell.
 
-1997-03-29  Barry A. Warsaw  <cc-mode-help@python.org>
+1997-03-29  Barry A. Warsaw  <bwarsaw@cnri.reston.va.us>
 
        * Public Release 4.389.
 
        * term.el: Added a lot of new faces, they all start with
        term- and follow a simple lexicographical convention.  Note that
        each change is commented: just search for -mm in the source.
-       (term-char-mode): Added all the "gray-keys" to term-raw-map.
+       (term-char-mode): Add all the "gray-keys" to term-raw-map.
        (term-send-up): Similar, decided to go for the more xterm-like
        \eOA bindings in place of the previous \e[A.
        (term-buffer-maximum-size): New variable.
-       (term-mode): Added some make-local: now term-buffer-maximum-size,
+       (term-mode): Add some make-local: now term-buffer-maximum-size,
        ange-ftp-default-user/password/an-pwd.
        (term-emulate-terminal): Quite some modifications to allow
        multiple outstanding ANSI style commands: notably all the
        -previous-parameter stuff.  Call term-handle-ansi-terminal-messages.
-       (term-emulate-terminal): Added simple trimming function: at the
+       (term-emulate-terminal): Add simple trimming function: at the
        end we simply check if the buffer is > term-buffer-maximum-size
        and cut it accordingly.
        (term-handle-colors-array): New function.
        (term-handle-ansi-terminal-messages): New function.
-       (term-handle-ansi-escape): Modified to allow ANSI coloring.
-       (ansi-term): New function that creates multiple terminals.  Put
-       in the standard C-x map too: I'm quite used to C-x C-f and C-c C-f
+       (term-handle-ansi-escape): Modify to allow ANSI coloring.
+       (ansi-term): New function that creates multiple terminals.
+       Put in the standard C-x map too: I'm quite used to C-x C-f and C-c C-f
        was too awkward.
 
 1997-03-29  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
        * hideshow.el: Use overlays for hiding instead of selective display.
        Commented out the support for XEmacs because it doesn't support
        overlays.
-       (hs-special-modes-alist): Added support for java-mode.
+       (hs-special-modes-alist): Add support for java-mode.
        (hs-minor-mode-hook): New variable.
        (hs-c-start-regexp, hs-c-end-regexp, hs-forward-sexp-func)
        (hs-block-start-regexp, hs-block-end-regexp)
        (hs-hide-block-at-point, hs-hide-initial-comment-block)
        (java-hs-forward-sexp, hs-mouse-toggle-hiding): New functions.
        (hs-inside-comment-p, hs-hide-block)
-       (hs-show-block): Added support for single line comments.
-       (hs-hide-all): Added support for hiding comments.
+       (hs-show-block): Add support for single line comments.
+       (hs-hide-all): Add support for hiding comments.
 
 1997-03-28  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
 
 1997-03-20  Dan Nicolaescu  <done@ece.arizona.edu>
 
        * imenu.el (imenu-scanning-message): Support for bigger numbers.
-       (imenu--generic-function): Fixed probably a typo: named appeared
+       (imenu--generic-function): Fix probably a typo: named appeared
        twice in an item.  Put function after name and beg in a special
        item because a normal item has name and beg (for orthogonality).
        (imenu-add-to-menubar): First test to see if the mode supports
 
 1997-03-18  Kenichi Handa  <handa@etl.go.jp>
 
-       * fontset.el (x-complement-fontset-spec): Setup
-       alternative-fontname-alist while complementing fontnames.
+       * fontset.el (x-complement-fontset-spec):
+       Setup alternative-fontname-alist while complementing fontnames.
 
 1997-03-18  Naoto TAKAHASHI  <ntakahas@etl.go.jp>
 
        (quail-keyboard-layout): Docstring changed to reflect the above
        change.
        (quail-keyboard-layout-len): Increased for the above change.
-       (quail-keyboard-layout-alist): Modified for the above change.
+       (quail-keyboard-layout-alist): Modify for the above change.
 
 1997-03-18  Kenichi Handa  <handa@etl.go.jp>
 
-       * mule.el (make-char): Documented.
+       * mule.el (make-char): Document.
        (charset-plist): Return quoted list even if CHARSET is
        supplied by symbol.
 
 
        * language/viet-util.el (viet-decode-viqr-region): Supply correct
        argumnents to rassoc.
-       (viqr-post-read-conversion, viqr-pre-write-conversion): New
-       functions.
+       (viqr-post-read-conversion, viqr-pre-write-conversion):
+       New functions.
 
        * language/vietnamese.el: Set the above functions to the coding
        system viqr.
        * mailalias.el (mail-passwd-files): New variable.
        (mail-get-names): Use mail-passwd-files instead of always /etc/passwd.
 
-1997-03-12  Barry A. Warsaw  <cc-mode-help@python.org>
+1997-03-12  Barry A. Warsaw  <bwarsaw@cnri.reston.va.us>
 
        * cc-mode.el (c-lineup-C-comments): Handle more cases, especially
        when comment lines aren't prefixed with stars.
        map them into inher-intro, inher-cont, and func-decl-cont
        syntactic symbols.  Do the indentation as of Java inheritance
        lines better.
-       (c-offsets-alist): Changed the syntactic symbol ansi-funcdecl-cont
+       (c-offsets-alist): Change the syntactic symbol ansi-funcdecl-cont
        to func-decl-cont.  This symbol is useful in Java throws
        declarations.
        (c-lineup-java-inher): New function for lining up "implements"
 
        * make-mode.el (makefile-dependency-regex): Disallow "=" in name,
        so that "flags=-o:1" is treated as an assignment, not a dependency.
-       (makefile-dependency-regex, makefile-macroassign-regex): Disallow
-       spaces in symbol name.
+       (makefile-dependency-regex, makefile-macroassign-regex):
+       Disallow spaces in symbol name.
 
 1997-03-11  Dan Nicolaescu  <done@ece.arizona.edu>
 
 
 1997-03-12  Richard Stallman  <rms@whiz-bang.gnu.ai.mit.edu>
 
-       * dired-aux.el (dired-fun-in-all-buffers): New arg FILE.  Don't
-       operate on buffers whose wildcard pattern does not accept FILE.
+       * dired-aux.el (dired-fun-in-all-buffers): New arg FILE.
+       Don't operate on buffers whose wildcard pattern does not accept FILE.
        All callers changed.
 
        * dired.el (dired-glob-regexp): New function.
        (rmail-show-mime-function, rmail-mime-feature): New variables to
        control MIME feature.
        (rmail-file-coding-system): Default value is nil.
-       (rmail, rmail-convert-file, rmail-insert-inbox-text): Check
-       rmail-enable-mime.  Read a file without any code conversion.
+       (rmail, rmail-convert-file, rmail-insert-inbox-text):
+       Check rmail-enable-mime.  Read a file without any code conversion.
        (rmail-variables): Setup local variables rmail-buffer and
        rmail-view-buffer.
-       (rmail-decode-babyl-format, rmail-convert-babyl-format): Perform
-       code conversion of RMAIL file if rmail-enable-mime is nil.
-       (rmail-show-message): Make sure to be in rmail-buffer.  If
-       rmail-enable-mime is t, call appropriate function to decode MIME
+       (rmail-decode-babyl-format, rmail-convert-babyl-format):
+       Perform code conversion of RMAIL file if rmail-enable-mime is nil.
+       (rmail-show-message): Make sure to be in rmail-buffer.
+       If rmail-enable-mime is t, call appropriate function to decode MIME
        format.
        (rmail-mail, rmail-reply): Call rmail-start-mail with argument
        rmail-view-buffer.
        rmail-summary-line-decoder.
        (rmail-summary-next-msg): Display rmail-view-buffer.
        (rmail-summary-mode): Make rmail-view-buffer buffer local.
-       (rmail-summary-rmail-update, rmail-summary-scroll-msg-up): Use
-       rmail-view-buffer instead of rmail-buffer.
+       (rmail-summary-rmail-update, rmail-summary-scroll-msg-up):
+       Use rmail-view-buffer instead of rmail-buffer.
 
        * mule-cmds.el (mule-keymap): Re-arranged.
        (set-language-info): Typo fixed in docstring.
        (turn-on-font-lock): Test font-lock-mode.
        Added commented out menu code.
 
-       * compile.el (compilation-mode-font-lock-keywords): Variable
-       definition deleted.  New function.
+       * compile.el (compilation-mode-font-lock-keywords):
+       Variable definition deleted.  New function.
        (compilation-mode-map): Add `...' to Compile menu entry.
 
 1997-02-20  Yutaka NIIBE  <gniibe@mri.co.jp>
        * help.el (help-with-tutorial): Prefix argument to specify a
        language interactively.
 
-       * isearch.el (isearch-mode-map): Define
-       isearch-toggle-input-method and
+       * isearch.el (isearch-mode-map):
+       Define isearch-toggle-input-method and
        isearch-toggle-specified-input-method in the map.
        (isearch-multibyte-characters-flag): New variable.
        (isearch-mode): Initialize it to nil.
        (sendmail-send-it): Perform code conversion on sending mail
        according to sendmail-coding-system.
 
-       * simple.el (kill-forward-chars, kill-backward-chars): Pay
-       attention to multibyte characters.
+       * simple.el (kill-forward-chars, kill-backward-chars):
+       Pay attention to multibyte characters.
        (what-cursor-position): With a prefix argument, print detailed
        info of a character on cursor position.
        (transpose-subr-1): Pay attention to multibyte characters.
        * diff.el (diff-process-setup): New function, sets up the
        compilation-exit-message-function so that it works with both
        asynchronous and synchronous sub-processes.
-       (diff): Bind compilation-exit-message-function.  Run
-       compilation-finish-function when compile-internal returns if async
+       (diff): Bind compilation-exit-message-function.
+       Run compilation-finish-function when compile-internal returns if async
        processes aren't supported.
 
 1997-02-08  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
        * iso-acc.el (iso-accents-compose):
        Handle case where unread-command-events is already nonempty.
 
-       * frame.el (set-frame-font): Renamed from set-default-font.
+       * frame.el (set-frame-font): Rename from set-default-font.
 
 1997-02-01  Tom Tromey  <tromey@cygnus.com>
 
        * compile.el (compilation-enter-directory-regexp)
        (compilation-leave-directory-regexp): Add .* at beginning.
 
-1997-01-30  Barry A. Warsaw  <cc-mode-help@python.org>
+1997-01-30  Barry A. Warsaw  <bwarsaw@cnri.reston.va.us>
 
        * cc-mode.el: Public Release 4.353.
 
        * cc-mode.el (c-Java-access-key): Set to nil since Java doesn't
        have C++-like access labels.
 
-       * cc-mode.el (c-style-alist): Added "python" style.
+       * cc-mode.el (c-style-alist): Add "python" style.
 
        * cc-mode.el (c-mode-menu): New function.
        (c-popup-menu, c-common-init): Use c-mode-menu.
        * cc-mode.el (c-emacs-features): Detect Infodock.
        (c-common-init, c-mode-map): Don't install menus for Infodock.
 
-       * cc-mode.el (c-indent-exp): Fixed infinite loop when multi-line C
+       * cc-mode.el (c-indent-exp): Fix infinite loop when multi-line C
        comment is last thing in buffer.
-       (c-guess-basic-offset): Fixed error when K&R C-like macro is first
+       (c-guess-basic-offset): Fix error when K&R C-like macro is first
        non-syntactic whitespace in file.
 
        * cc-mode.el (c-C++-comment-start-regexp):
 
 1997-01-09  Simon Marshall  <simon@wombat.gnu.ai.mit.edu>
 
-       * font-lock.el (font-lock-unique): Deleted.
+       * font-lock.el (font-lock-unique): Delete.
        (font-lock-prepend-text-property, font-lock-append-text-property):
        Don't call it; behave as to-be-written builtins.  Declare as defuns.
        (font-lock-fillin-text-property): Declare as a defun.
        (expand-mode-hook, expand-mode-name): Variables deleted.
        (expand-load-hook): Variable renamed from expand-mode-load-hook.
        (expand-map): Variable deleted.
-       (expand-jump-to-next-slot): Renamed from expand-jump-to-next-mark.
+       (expand-jump-to-next-slot): Rename from expand-jump-to-next-mark.
        Add autoload.
        (expand-jump-to-previous-slot): Add autoload.
        Renamed from expand-jump-to-previous-mark.
 1997-01-02  Jens Toivo Berger Thielemann  <jensthi@ifi.uio.no>
 
        * word-help.el (word-help-mode-alist, reset-word-help)
-       (word-help-switch-help-file): Added support for completion.
+       (word-help-switch-help-file): Add support for completion.
        (word-help-complete, word-help-complete-list)
        (word-help-complete-index, word-help-extract-matches)
        (word-help-make-complete): New functions/variables for completion.
-       (word-help-mode-alist): Enhanced search regexps.
+       (word-help-mode-alist): Enhance search regexps.
        (word-help-index-mapper): Defaults now to extracting the first word.
        (word-help-mode-alist, word-help-index-mapper)
        (word-help-main-index, word-help-main-obarray)
 
 1996-12-31  Richard Stallman  <rms@ethanol.gnu.ai.mit.edu>
 
-       * simple.el (repeat-complex-command): Bind
-       minibuffer-history-position and minibuffer-history-sexp-flag
+       * simple.el (repeat-complex-command):
+       Bind minibuffer-history-position and minibuffer-history-sexp-flag
        only for the read-from-minibuffer call.
 
 1996-12-30  Richard Stallman  <rms@ethanol.gnu.ai.mit.edu>
 
        * expand.el: New file.
 
-       * skeleton.el (skeleton-positions): Renamed from skeleton-marks.
+       * skeleton.el (skeleton-positions): Rename from skeleton-marks.
 
        * skeleton.el (skeleton-marks): New variable.
        (skeleton-insert, skeleton-internal-1): Set skeleton-marks.
        (vip-convert-standard-file-name): New function.
 
        * ediff-util.el (ediff-file-under-version-control): New function.
-       (ediff-inferior-compare-regions): Improved interface.
+       (ediff-inferior-compare-regions): Improve interface.
        (ediff-maybe-checkout): New function.
        (ediff-maybe-save-and-delete-merge): New function.
        (ediff-setup): Now uses convert-standard-filename.
        subordinate Ediff sessions.
        * ediff-ptch.el (ediff-patch-file-internal):
        Now calls ediff-maybe-checkout.
-       (ediff-context-diff-label-regexp): Fixed regexp.
-       (ediff-map-patch-buffer): Fixed beg/end patch boundaries.
+       (ediff-context-diff-label-regexp): Fix regexp.
+       (ediff-map-patch-buffer): Fix beg/end patch boundaries.
        * ediff.el: Now supports autostore for merge jobs.
 
 1996-12-27  Richard Stallman  <rms@ethanol.gnu.ai.mit.edu>
 
        * vc-hooks.el (vc-user-login-name): New function.
        (vc-fetch-master-properties, vc-lock-from-permissions, vc-file-owner)
-       (vc-fetch-properties, vc-after-save, vc-mode-line, vc-status): Use
-       `vc-user-login-name' instead of `user-login-name'.
+       (vc-fetch-properties, vc-after-save, vc-mode-line, vc-status):
+       Use `vc-user-login-name' instead of `user-login-name'.
 
        * vc.el (vc-next-action-on-file, vc-update-change-log)
        (vc-backend-checkout, vc-backend-steal): Use `vc-user-login-name'
        instead of `user-login-name'.
        (vc-update-change-log): If `user-full-name' is nil, try
        `user-login-name'.  Failing that, use uid as a string.
-       (vc-make-buffer-writable-hook): Removed (was unused).
+       (vc-make-buffer-writable-hook): Remove (was unused).
 
 1996-12-20  Richard Stallman  <rms@ethanol.gnu.ai.mit.edu>
 
 
        * thingatpt.el: Downcase arguments as Lisp symbols.
        Fix many doc strings.
-       (thing-at-point-file-name-chars): Renamed from file-name-chars.
+       (thing-at-point-file-name-chars): Rename from file-name-chars.
        Allow a colon.
        (thing-at-point-url-chars): New variable.
        (url): Define new kind of "thing".
        Two new arguments.
        (rmail-forward): Always call rmail-start-mail, never `mail'.
 
-       * sendmail.el (mail-reply-action): Renamed from mail-reply-buffer.
+       * sendmail.el (mail-reply-action): Rename from mail-reply-buffer.
        (mail-yank-original): Handle either an action or a buffer
        in mail-reply-action.
        (mail): Doc fix.
        (font-lock-face-attributes): Doc fix.
        (font-lock-match-c-style-declaration-item-and-skip-to-next): New
        function.  Match just identifiers.  Use it for C, Objective-C and Java.
-       (font-lock-match-c++-style-declaration-item-and-skip-to-next): Match
-       templates too.
+       (font-lock-match-c++-style-declaration-item-and-skip-to-next):
+       Match templates too.
        (c-font-lock-extra-types, c++-font-lock-extra-types)
        (objc-font-lock-extra-types, java-font-lock-extra-types): Use these
        variables in EVAL forms, i.e., do not eval when font-lock.el is loaded.
        (fast-lock-get-face-properties): Rewrite for face lists.  Use it.
 
        * lazy-lock.el (lazy-lock-submit-bug-report): Function deleted.
-       (lazy-lock-defer-on-scrolling): Renamed from lazy-lock-defer-driven.
+       (lazy-lock-defer-on-scrolling): Rename from lazy-lock-defer-driven.
        (lazy-lock-defer-on-the-fly): New variable from lazy-lock-defer-time.
        (lazy-lock-install): Use it.
        (lazy-lock-defer-time): Doc fix.  Add top-level code to detect use of
        (lazy-lock-stealth-load): New variable.
        (lazy-lock-fontify-after-idle): Use it.
        (lazy-lock-mode): Doc fix.
-       (lazy-lock-defer-line-after-change): Renamed from
+       (lazy-lock-defer-line-after-change): Rename from
        lazy-lock-defer-after-change.
        (lazy-lock-defer-rest-after-change)
        (lazy-lock-fontify-line-after-change)
        (lazy-lock-fontify-rest-after-change): New functions.
        (lazy-lock-install-hooks): Add one depending on deferral variables.
        (lazy-lock-unstall): Remove them.  Fontify if Font Lock mode still on.
-       (lazy-lock-fontify-window, lazy-lock-fontify-conservatively): Use
-       with-current-buffer rather than save-excursion.
+       (lazy-lock-fontify-window, lazy-lock-fontify-conservatively):
+       Use with-current-buffer rather than save-excursion.
        (lazy-lock-percent-fontified): Cast size to float before multiplying.
 
 1996-11-14  Karl Heuer  <kwzh@gnu.ai.mit.edu>
        * comint.el (comint-output-filter): Run comint-output-filter-functions
        directly, not via comint-output-filter.
 
-       * compile.el (compile-auto-highlight): Renamed from
+       * compile.el (compile-auto-highlight): Rename from
        compile-highlight-display-limit.
 
        * time-stamp.el (time-stamp-dd/mm/yyyy): New function.
 1996-11-02  Henry Guillaume  <henry@qbd.com.au>
 
        * find-file.el (general): Enabled commentary for Finder.
-       (ff-search-directories): Changed /usr/include/* to /usr/include.
+       (ff-search-directories): Change /usr/include/* to /usr/include.
        (ff-get-file-name): Improve behavior when file is found in a buffer.
 
 1996-11-02  Richard Stallman  <rms@ethanol.gnu.ai.mit.edu>
 
 1996-10-24  Dave Gillespie  <daveg@synaptics.com>
 
-       * cl-macs.el (lexical-let): Fixed a bug involving nested
+       * cl-macs.el (lexical-let): Fix a bug involving nested
        lexical contexts and macros.
 
 1996-10-23  Simon Marshall  <simon@wombat.gnu.ai.mit.edu>
 
 1996-10-20  Kevin Rodgers  <kevinr@ihs.com>
 
-       * compile.el (compilation-skip-to-next-location): Defined.
+       * compile.el (compilation-skip-to-next-location): Define.
        (compilation-next-error-locus, compilation-parse-errors): Respect it.
 
 1996-10-17  Andre Spiegel  <spiegel@berlin.informatik.uni-stuttgart.de>
 
 1996-10-14  Torbjorn Einarsson  <T.Einarsson@clab.ericsson.se>
 
-       * f90.el (f90-no-block-limit): Fixed bug for indentation of
+       * f90.el (f90-no-block-limit): Fix bug for indentation of
        elsewhere and elseif.
        (f90-looking-at-where-or-forall): Now allows for labeled forall
        and where statements.
        (f90-font-lock-keywords-2): New highlighting for labeled where
        and forall.  Fixed small bug with else highlighting.
-       (f90-fill-region): Moved indentation to f90-break-line.
+       (f90-fill-region): Move indentation to f90-break-line.
        (f90-break-line): Will now always indent the second line.
        (f90-indent-line): Simpler test for auto-fill.
-       (f90-auto-fill-mode): Removed.
-       (f90-electric-insert): Added for possibility of auto-filling of
+       (f90-auto-fill-mode): Remove.
+       (f90-electric-insert): Add for possibility of auto-filling of
        lines without spaces, as well as early updating of line.
-       (f90-mode-map): Added bindings of operators to f90-electric-insert.
+       (f90-mode-map): Add bindings of operators to f90-electric-insert.
        (f90-do-auto-fill): Now also updates line (changes case).
 
 1996-10-12  Richard Stallman  <rms@ethanol.gnu.ai.mit.edu>
 
        * browse-url.el (browse-url): New function.
        (browse-url-CCI-host): New variable.
-       (browse-url-at-mouse): Added event-buffer and event-point
+       (browse-url-at-mouse): Add event-buffer and event-point
        functions for XEmacs compatibility.
        (browse-url-file-url): Check for EFS after alist, URL-encode
        special chars.
        (browse-url-grail): New function.
        (browse-url-interactive-arg): Add new-window logic.
-       (browse-url-looking-at): Fixed.
+       (browse-url-looking-at): Fix.
        (browse-url-lynx-xterm): New function.
        (browse-url-lynx-emacs): Use term.el instead of terminal.el.
        (browse-url-netscape): Contact/start Netscape in the
-       background.  Multi-display support.  Renamed
-       browse-url-netscape-send.  URL-encode comma.
+       background.  Multi-display support.
+       Renamed browse-url-netscape-send.  URL-encode comma.
        (browse-url-netscape-command): New variable.
        (browse-url-netscape-startup-arguments): New variable.
-       (browse-url-url-at-point): Improved matching to supply missing
+       (browse-url-url-at-point): Improve matching to supply missing
        "http://".
        Other fixes for byte-compilation.
 
        * rmail.el (rmail-mode-2): Don't run rmail-mode-hook here.
        (rmail-mode, rmail): Run it here.
 
-1996-10-08  Barry A. Warsaw  <cc-mode-help@python.org>
+1996-10-08  Barry A. Warsaw  <bwarsaw@cnri.reston.va.us>
 
        * cc-mode.el (c-mode-map):
        Install FSF mode menu into menubar using the name
        additional FSF menu.
 
        * cc-mode.el:
-       Removed the following variables from the built-in "cc-mode" style:
+       Remove the following variables from the built-in "cc-mode" style:
        c-echo-syntactic-information-p
        c-string-syntax-p
        c-tab-always-indent
 
        * cc-mode.el (c-indent-command): Doc fix.
 
-       * cc-mode.el (c-style-alist): Added "linux" style.
+       * cc-mode.el (c-style-alist): Add "linux" style.
 
        * cc-mode.el (c-lineup-comment): Preserve comment-column.
 
        functions inside a nested class since they will twice add the
        indentation of the inner class to the running total.
 
-       The solution is to not give one of the two symbols a relpos.  The
-       decision was made to omit the relpos of the 'inline-open symbol.
+       The solution is to not give one of the two symbols a relpos.
+       The decision was made to omit the relpos of the 'inline-open symbol.
 
-       (c-mode-help-address): Added cc-mode-help@python.org.
+       (c-mode-help-address): Add cc-mode-help@python.org.
 
        (c-recognize-knr-p): No longer a user variable.
        (c++-mode, java-mode): Set c-recognize-knr-p to nil.
        (sgml-font-lock-keywords): Add an element for comments.
 
        * rmailsum.el (rmail-summary-line-count-flag):
-       Renamed from rmail-summary-line-count-p.
+       Rename from rmail-summary-line-count-p.
 
        * rmailsum.el (rmail-summary-line-count-p): New variable.
        (rmail-make-basic-summary-line): Optionally exclude the line count.
        (ps-print-prologue-1, ps-print-prologue-2): New variables.
        Major rewrite of the PostScript code to handle landscape mode,
        multiple columns and new font management.
-       (ps-landscape-mode, ps-number-of-columns, ps-inter-column): New
-       variables.
+       (ps-landscape-mode, ps-number-of-columns, ps-inter-column):
+       New variables.
        Add landscape mode and multiple columns with interspacing.
        (ps-font-info-database, ps-font-family, ps-font-size)
        (ps-header-font-family, ps-header-font-size, ps-header-title-font)
        (/ReportAllFontInfo): New PostScript function to get all the font
        families of the printer.
        (ps-setup): New function.
-       (ps-line-lengths, ps-nb-pages-buffer, ps-nb-pages-region): New
-       utility functions.
-       (ps-page-dimensions-get-width, ps-page-dimensions-get-height): New
-       macros.
+       (ps-line-lengths, ps-nb-pages-buffer, ps-nb-pages-region):
+       New utility functions.
+       (ps-page-dimensions-get-width, ps-page-dimensions-get-height):
+       New macros.
        (/HeaderOffset): Fix bug with /PrintStartY.
        (/SetHeaderLines): Fix bug.
 
 
        * tex-mode.el (tex-main-file): Add missing initial value.
        (tex-file): Set tex-print-file to source-file always.
-       (tex-last-file-texed): Renamed from tex-last-buffer-texed
+       (tex-last-file-texed): Rename from tex-last-buffer-texed
        and now holds a file name.
        (tex-region): Test and set tex-last-file-texed.
 
        * ffap.el (path-separator): Duplicate definition deleted.
        (ffap-what-domain): Don't define mail-extr-all-top-level-domains here.
 
-       * refbib.el (r2b-capitalize-title-stop-words): Renamed from capit...
-       (r2b-capitalize-title-stop-regexp): Renamed from capit...
-       (r2b-capitalize-title-region): Renamed from capitalize...
-       (r2b-capitalize-title): Renamed from capitalize...
+       * refbib.el (r2b-capitalize-title-stop-words): Rename from capit...
+       (r2b-capitalize-title-stop-regexp): Rename from capit...
+       (r2b-capitalize-title-region): Rename from capitalize...
+       (r2b-capitalize-title): Rename from capitalize...
 
-       * bib-mode.el (bib-capitalize-title-stop-words): Renamed from capit...
-       (bib-capitalize-title-stop-regexp): Renamed from capit...
-       (bib-capitalize-title-region): Renamed from capitalize...
-       (bib-capitalize-title): Renamed from capitalize...
+       * bib-mode.el (bib-capitalize-title-stop-words): Rename from capit...
+       (bib-capitalize-title-stop-regexp): Rename from capit...
+       (bib-capitalize-title-region): Rename from capitalize...
+       (bib-capitalize-title): Rename from capitalize...
 
        * edmacro.el (insert-kbd-macro): Duplicate definition deleted.
 
        New variables.
        (ediff-convert-standard-file-name): New function.
        Added on-line help, moved some functions to and from ediff-util.el.
-       (ediff-file-remote-p): Modified.
+       (ediff-file-remote-p): Modify.
        (ediff-set-face-pixmap): New function.
        (ediff-odd-diff-pixmap, ediff-even-diff-pixmap, ediff-fine-diff-pixmap):
        New variables.
-       * ediff-ptch.el (ediff-context-diff-label-regexp): Fixed regexp.
-       (ediff-map-patch-buffer): Fixed beg/end patch boundaries.
+       * ediff-ptch.el (ediff-context-diff-label-regexp): Fix regexp.
+       (ediff-map-patch-buffer): Fix beg/end patch boundaries.
        Now checks for the return code from the patch program.
        Fixed ediff-patch-options, ediff-backup-extension, ediff-backup-specs.
        * ediff-merg.el, ediff-diff.el, ediff-init.el:
        * ediff-hook.el: Changed ediff-meta to ediff-mult.
        * ediff-ptch.el (ediff-backup-specs): New variable.
-       * ediff.el (ediff-documentation): Modified.
+       * ediff.el (ediff-documentation): Modify.
        * ediff-help.el: New file.
        * ediff-mult.el (ediff-intersect-directories)
        (ediff-meta-insert-file-info): Functions modified.
        * vc.el (vc-print-log): Set the display window so that it shows
        the current log entry completely.
 
-       * vc-hooks.el (vc-find-cvs-master): Fixed handling of "locally
+       * vc-hooks.el (vc-find-cvs-master): Fix handling of "locally
        added" files.
 
 1996-09-16  Erik Naggum  <erik@naggum.no>
        * bindings.el: New file, split out from loaddefs.el.
        * loadup.el: Load bindings.el.
 
-       * gud.el (gud-find-c-expr): Renamed from find-c-expr.
+       * gud.el (gud-find-c-expr): Rename from find-c-expr.
        Don't get fooled by if and while statements.
-       (gud-expr-compound): Renamed from expr-compound.
-       (gud-expr-compound-sep): Renamed from expr-compound-sep.
-       (gud-next-expr): Renamed from expr-next.
-       (gud-prev-expr): Renamed from expr-prev.
-       (gud-forward-sexp): Renamed from expr-forward-sexp.
-       (gud-backward-sexp): Renamed from expr-backward-sexp.
-       (gud-innermost-expr): Renamed from expr-cur.
+       (gud-expr-compound): Rename from expr-compound.
+       (gud-expr-compound-sep): Rename from expr-compound-sep.
+       (gud-next-expr): Rename from expr-next.
+       (gud-prev-expr): Rename from expr-prev.
+       (gud-forward-sexp): Rename from expr-forward-sexp.
+       (gud-backward-sexp): Rename from expr-backward-sexp.
+       (gud-innermost-expr): Rename from expr-cur.
 
 1996-09-10  Per Abrahamsen  <abraham@dina.kvl.dk>
 
 1996-09-05  Michael Kifer  <kifer@cs.sunysb.edu>
 
        * viper-keym.el, viper.el (vip-scroll):
-       Changed to vip-scroll-screen, other modifications.
-       (vip-alternate-ESC): Changed to vip-alternate-Meta-key.
+       Change to vip-scroll-screen, other modifications.
+       (vip-alternate-ESC): Change to vip-alternate-Meta-key.
        * viper.el (vip-escape-to-vi, vip-prefix-arg-value)
        (vip-prefix-arg-value): Now work with prefix arguments and also
        will work with 2dw and d2d style commands.
        (vip-paren-match): Go to closing paren first.
        (vip-find-char-forward, vip-find-char-backward, vip-goto-char-forward)
        (vip-goto-char-backward): Functions modified.
-       (vip-set-hooks): Added viper to fortran-mode.
+       (vip-set-hooks): Add viper to fortran-mode.
        (viper-mode): Don't delete the startup message.
        * viper-keym.el: C-\ is now the meta key.
        C-z in insert mode now escapes to Vi.
        * viper-util.el, viper.el: Added pixmaps to replace-region and
        search faces.
        (vip-get-filenames-from-buffer): The argument is now optional.
-       (vip-ex-nontrivial-find-file-unix): Added the -d option to ls command.
+       (vip-ex-nontrivial-find-file-unix): Add the -d option to ls command.
        (vip-read-key): Inhibit quit added.
-       (vip-get-cursor-color): Fixed to work with XEmacs.
+       (vip-get-cursor-color): Fix to work with XEmacs.
        * viper-ex.el (ex-edit): Don't change to vi in dired mode.
 
 1996-09-04  Richard Stallman  <rms@ethanol.gnu.ai.mit.edu>
        (grep-regexp-alist, file-name-buffer-file-type-alist)
        (find-buffer-file-type, find-file-not-found-set-buffer-file-type)
        (find-file-binary, find-file-text, mode-line-format):
-       Moved to dos-nt.el.
+       Move to dos-nt.el.
 
        * winnt.el (save-to-unix-hook, revert-from-unix-hook)
        (using-unix-filesystems): Functions removed.
index 8a6431f2bac61ff78ce9be8fc7846cba09f4ed37..f10939e946fb8fae536d03bf0ec749ae741905b9 100644 (file)
@@ -3,13 +3,13 @@
        * echistory.el (electric-command-history): Call Command-history-setup
        and command-history-mode using their new conventions.
 
-       * chistory.el (Command-history-setup): Don't switch buffers.  Take
-       no args, and do not set major-mode, mode-name or the local map.
+       * chistory.el (Command-history-setup): Don't switch buffers.
+       Take no args, and do not set major-mode, mode-name or the local map.
        (command-history-mode): New function, does some of those things
        Command-history-setup used to do.
        (list-command-history): Call command-history-mode, not
        Command-history-setup.
-       (command-history): Renamed from command-history-mode.
+       (command-history): Rename from command-history-mode.
 
 1999-12-31  Richard M. Stallman  <rms@gnu.org>
 
@@ -91,9 +91,9 @@
 
 1999-12-27  Jari Aalto  <jari.aalto@poboxes.com>
 
-       * add-log.el (change-log-version-number-regexp-list): Added tag
+       * add-log.el (change-log-version-number-regexp-list): Add tag
        :version 20.6.
-       (change-log-version-info-enabled): Added tag :version 20.6.
+       (change-log-version-info-enabled): Add tag :version 20.6.
 
 1999-12-27  Jari Aalto  <jari.aalto@poboxes.com>
 
        (change-log-find-version): Rewritten.  Use user-configurable
        version numbering regexp list
        change-log-version-number-regexp-list.
-       (change-log-find-version): Renamed to
+       (change-log-find-version): Rename to
        change-log-version-number-search.
        (add-log-file-name-function): New.
-       (change-log-search-vc-number): Added END parameter.  Added doc
+       (change-log-search-vc-number): Add END parameter.  Added doc
        string to function.
-       (change-log-version-rcs): Renamed.  Was
-       change-log-search-vc-number.
+       (change-log-version-rcs): Rename.
+       Was change-log-search-vc-number.
 
 1999-12-26  Thien-Thi Nguyen  <ttn@delysid.gnu.org>
 
        (hs-hide-block, hs-show-block, hs-show-region, hs-hide-level)
        (hs-mouse-toggle-hiding, hs-minor-mode): Rewrite.
 
-       (hs-isearch-show): Renamed from `hs-isearch-open-invisible'.
+       (hs-isearch-show): Rename from `hs-isearch-open-invisible'.
        (hs-isearch-show-temporary): New funcs.
 
        (hs-show-block-at-point, java-hs-forward-sexp): Delete funcs.
 
        * progmodes/antlr-mode.el: Minor syntax highlighting changes.
        (antlr-font-lock-default-face): Deletia.
-       (antlr-font-lock-tokendef-face): Changed color.
-       (antlr-font-lock-tokenref-face): Changed color.
-       (antlr-font-lock-literal-face): Changed color.
+       (antlr-font-lock-tokendef-face): Change color.
+       (antlr-font-lock-tokenref-face): Change color.
+       (antlr-font-lock-literal-face): Change color.
        (antlr-font-lock-additional-keywords): Minor changes.
 
 1999-12-20  Carsten Dominik  <cd@gnu.org>
        (reftex-index-phrases-sort-prefers-entry)
        (reftex-index-phrases-sort-in-blocks): New options.
        (reftex-index-macros): Option structure changed.
-       (reftex-index-macros-builtin): Added `repeat' item to each entry.
+       (reftex-index-macros-builtin): Add `repeat' item to each entry.
        (reftex-label-alist): Additional item in each entry to specify if
        the environment should be listed in the TOC.
        (eval-when-compile (require 'cl)) added.
        Additional argument FORMAT-KEY to preselect a citation format;
        (eval-when-compile (require 'cl)) added.
 
-       * textmodes/reftex-parse.el (reftex-context-substring): Optional
-       parameter to-end.
+       * textmodes/reftex-parse.el (reftex-context-substring):
+       Optional parameter to-end.
        (reftex-section-info): Deal with environment matches;
        (eval-when-compile (require 'cl)) added.
 
        (ps-mule-plot-composition): New function.
        (ps-mule-prepare-font-for-components): New function.
        (ps-mule-plot-components): New function.
-       (ps-mule-composition-prologue-generated): Renamed from
+       (ps-mule-composition-prologue-generated): Rename from
        ps-mule-cmpchar-prologue-generated.
        (ps-mule-composition-prologue): New named from
        ps-mule-cmpchar-prologue.  Modified for new composition.
        (ps-mule-plot-rule-cmpchar, ps-mule-plot-cmpchar)
-       (ps-mule-prepare-cmpchar-font): Deleted.
+       (ps-mule-prepare-cmpchar-font): Delete.
        (ps-mule-string-encoding): New arg NO-SETFONT.
        (ps-mule-bitmap-prologue): In PostScript code of BuildGlyphCommon,
        check Composing, not Cmpchar.
        * international/fontset.el (vertical-centering-font-regexp):
        New variable.
 
-       * international/mule.el (mule-version): Updated to 5.0 (AOI).
-       (mule-version-date): Updated to 1999.12.7.
+       * international/mule.el (mule-version): Update to 5.0 (AOI).
+       (mule-version-date): Update to 1999.12.7.
        (with-category-table): New macro.
 
        * international/mule-cmds.el (encode-coding-char): Don't check
        * international/mule-util.el (set-nested-alist): Set BRANCHES (if
        non-nil) at the tail of ALIST.
        (compose-region, decompose-region, decompose-string)
-       (reference-point-alist, compose-chars): Moved to composite.el.
+       (reference-point-alist, compose-chars): Move to composite.el.
        (compose-chars-component, compose-chars-rule, decompose-composite-char):
-       Deleted.
+       Delete.
 
        * international/quail.el (quail-install-map): New optional arg NAME.
        (quail-get-translation): If DEF is a symbol but not a function,
        * language/thai-util.el (thai-category-table): Make it by
        make-category-table.
        (thai-composition-pattern): New variable.
-       (thai-compose-region, thai-compose-string): Use
-       with-category-table.
+       (thai-compose-region, thai-compose-string):
+       Use with-category-table.
        (thai-post-read-conversion): Just call thai-compose-region.
-       (thai-pre-write-conversion): Deleted.
+       (thai-pre-write-conversion): Delete.
        (thai-composition-function): New function.
 
        * language/tibet-util.el: Most functions rewritten.
-       (tibetan-char-p): Renamed from tibetan-char-examin.
+       (tibetan-char-p): Rename from tibetan-char-examin.
        (tibetan-composable-examin, tibetan-complete-char-examin)
-       (tibetan-vertical-stacking, tibetan-composition): Deleted.
+       (tibetan-vertical-stacking, tibetan-composition): Delete.
        (tibetan-add-components): New function.
        (tibetan-composition-function): New function.
 
 
 1999-12-14  Gerd Moellmann  <gerd@gnu.org>
 
-       * international/mule-cmds.el (default-input-method): Specify
-       that it should be set after current-language-environment.
+       * international/mule-cmds.el (default-input-method):
+       Specify that it should be set after current-language-environment.
 
        * custom.el (custom-handle-keyword): Add :set-after.
        (custom-add-dependencies): New function.
 
        * progmodes/cc-make.el: Removed.
 
-1999-12-12  Martin Stjernholm  <bug-cc-mode@gnu.org>
+1999-12-12  Martin Stjernholm  <mast@lysator.liu.se>
 
        * Release of cc-mode 5.26
 
-1999-12-12  Martin Stjernholm  <bug-cc-mode@gnu.org>
+1999-12-12  Martin Stjernholm  <mast@lysator.liu.se>
 
        * cc-cmds.el (c-forward-conditional): Handle an arbitrary
        target depth.  Optionally count #else lines as clause limits,
        (c-down-conditional-with-else): New commands that uses the
        added functionality in `c-forward-conditional'.
 
-1999-12-12  Martin Stjernholm  <bug-cc-mode@gnu.org>
+1999-12-12  Martin Stjernholm  <mast@lysator.liu.se>
 
        * cc-align.el (c-lineup-comment): Preserve the alignment with
        a comment on the previous line instead of preserving the
        comment-column.
 
-1999-12-12  Martin Stjernholm  <bug-cc-mode@gnu.org>
+1999-12-12  Martin Stjernholm  <mast@lysator.liu.se>
 
        Fixes to IDL mode after input from Eric Eide <eeide@cs.utah.edu>:
-       * cc-engine.el (c-beginning-of-statement-1): Allow
-       `c-conditional-key' to be nil, for the benefit of IDL mode.
+       * cc-engine.el (c-beginning-of-statement-1):
+       Allow `c-conditional-key' to be nil, for the benefit of IDL mode.
        * cc-engine.el (c-guess-basic-syntax): Ditto.
-       cc-langs.el (C-IDL-class-key): Fixed.  Don't match `class'
+       cc-langs.el (C-IDL-class-key): Fix.  Don't match `class'
        but do match CORBA 2.3 `valuetype'.
        * cc-langs.el (c-IDL-access-key): New defconst.  Should be nil
        for IDL.
-       * cc-langs.el (c-IDL-conditional-key): New defconst.  Should
-       be nil for IDL.
+       * cc-langs.el (c-IDL-conditional-key): New defconst.
+       Should be nil for IDL.
        * cc-langs.el (c-IDL-comment-start-regexp): New defconst.
        Like C++.
        * cc-mode.el (idl-mode): Use new `c-IDL-*' defconsts.  Also,
        set `c-method-key' and `c-baseclass-key' to nil.
 
-1999-12-12  Martin Stjernholm  <bug-cc-mode@gnu.org>
+1999-12-12  Martin Stjernholm  <mast@lysator.liu.se>
 
        * cc-menus.el (cc-imenu-c++-generic-expression): Match classes
        with nonhanging open braces.
 
-1999-12-12  Martin Stjernholm  <bug-cc-mode@gnu.org>
+1999-12-12  Martin Stjernholm  <mast@lysator.liu.se>
 
        * cc-align.el: Added docstrings to all lineup functions.
 
        comments.  Use c-comment-prefix-regexp and comment-start-skip
        instead of hardcoded regexps.
 
-1999-12-12  Martin Stjernholm  <bug-cc-mode@gnu.org>
+1999-12-12  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * cc-cmds.el (c-beginning-of-defun, c-end-of-defun): Fixed eob
+       * cc-cmds.el (c-beginning-of-defun, c-end-of-defun): Fix eob
        behavior and return value as documented.
 
-1999-12-12  Martin Stjernholm  <bug-cc-mode@gnu.org>
+1999-12-12  Martin Stjernholm  <mast@lysator.liu.se>
 
        Changes for new style variable init system:
        * cc-langs.el (c-common-init): Dito.
        the throws clause that might follow the function prototype in
        C++.
 
-1999-12-12  Martin Stjernholm  <bug-cc-mode@gnu.org>
+1999-12-12  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * cc-defs.el (c-beginning-of-macro): Fixed bug where point
+       * cc-defs.el (c-beginning-of-macro): Fix bug where point
        could move forward for macros that doesn't start in column 0.
 
-1999-12-12  Martin Stjernholm  <bug-cc-mode@gnu.org>
+1999-12-12  Martin Stjernholm  <mast@lysator.liu.se>
 
        * cc-align.el (c-indent-multi-line-block)
        (c-lineup-whitesmith-in-block): Two new lineup functions for
        style.  It should now handle all different braces uniformly in
        both hanging and non-hanging cases.
 
-1999-12-12  Martin Stjernholm  <bug-cc-mode@gnu.org>
+1999-12-12  Martin Stjernholm  <mast@lysator.liu.se>
 
        * cc-cmds.el (c-indent-exp): Use a marker to save point to
        make it stay in the same position relative to the surrounding
        <seanl@cs.umd.edu>.  Also extended the bsd and whitesmith
        styles with consistent brace placement for all constructs.
 
-1999-12-12  Martin Stjernholm  <bug-cc-mode@gnu.org>
+1999-12-12  Martin Stjernholm  <mast@lysator.liu.se>
 
        * cc-cmds.el (c-context-line-break): Continue C++ comments too
        when point is in the middle of them.
        `normal-auto-fill-function' to implement the
        `c-ignore-auto-fill' variable.
 
-       * cc-cmds.el (c-beginning-of-statement): Use
-       `c-comment-prefix-regexp' to avoid ending up inside the
+       * cc-cmds.el (c-beginning-of-statement):
+       Use `c-comment-prefix-regexp' to avoid ending up inside the
        comment prefix.  Better handling of comment starters and
        enders. Catch comments better when traversing code.  Stop at
        preprocessor directives.
        * cc-defs.el (c-forward-comment): New subst to hide platform
        dependent quirks in `forward-comment'.
 
-       * cc-engine.el (c-literal-limits): Added NOT-IN-DELIMITER
+       * cc-engine.el (c-literal-limits): Add NOT-IN-DELIMITER
        argument.
        (c-literal-limits-fast): Implemented NEAR and NOT-IN-DELIMITER
        arguments. Activate this function by default when
        arguments.
 
        * cc-align.el (c-lineup-C-comments): Fixes to handle the
-       changed anchor position in the `c' syntactic symbol.  Handle
-       more than stars in the comment prefix; use the new variable
+       changed anchor position in the `c' syntactic symbol.
+       Handle more than stars in the comment prefix; use the new variable
        `c-comment-prefix-regexp'.  Don't indent text not preceded by
        a comment prefix to the right of the comment opener if it's
        long.
 
        * cc-langs.el: Fixes to mode initialization for new line
        breaking and paragraph filling method.  Adaptive fill mode is
-       now activated at startup instead of deactivated.  The
-       variables used for adaptive filling and paragraph movement are
+       now activated at startup instead of deactivated.
+       The variables used for adaptive filling and paragraph movement are
        also changed to incorporate the value of
        `c-comment-prefix-regexp'.  `substitute-key-definition' is
        used to override some functions in the global map instead of
        javadoc markup at mode init.
 
        * cc-mode.el (c-setup-filladapt): A new convenience function
-       to configure Kyle E. Jones' Filladapt mode for CC Mode.  This
-       function is intended to be used explicitly by the end user
+       to configure Kyle E. Jones' Filladapt mode for CC Mode.
+       This function is intended to be used explicitly by the end user
        only.
 
        * cc-vars.el (c-comment-prefix-regexp): New variable used to
        recognize the comment fill prefix inside comments.
        (c-block-comment-prefix): New name for
-       `c-comment-continuation-stars', which is now obsolete.  It's
-       generalized to handle any character sequence.
+       `c-comment-continuation-stars', which is now obsolete.
+       It's generalized to handle any character sequence.
        (c-ignore-auto-fill): New variable used to selectively disable
        Auto Fill mode in specific contexts.
 
-1999-12-12  Martin Stjernholm  <bug-cc-mode@gnu.org>
+1999-12-12  Martin Stjernholm  <mast@lysator.liu.se>
 
        * cc-cmds.el (c-comment-indent): Leave at least one space
        between the comment and the last nonblank character in the
        case where we look at the indentation of the comment on the
        previous line (case 4).
 
-       * cc-engine.el (c-beginning-of-statement-1): Added ``' to the
+       * cc-engine.el (c-beginning-of-statement-1): Add ``' to the
        list of characters that may start a statement (it's a sort of
        prefix operator in Pike, and isn't used at all in any of the
        other languages).
 
-1999-12-12  Martin Stjernholm  <bug-cc-mode@gnu.org>
+1999-12-12  Martin Stjernholm  <mast@lysator.liu.se>
 
        * cc-engine.el (c-guess-basic-syntax): Report brace list opens
        inside continued statements as statement-cont instead of
        context.  Case 10B.2 changed.  Also changed (the somewhat
        esoteric) case 9A to cope with this.
 
-1999-12-12  Martin Stjernholm  <bug-cc-mode@gnu.org>
+1999-12-12  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * cc-cmds.el (c-electric-brace): Added electric handling of
+       * cc-cmds.el (c-electric-brace): Add electric handling of
        the open brace for brace-elseif-brace.
 
-1999-12-12  Martin Stjernholm  <bug-cc-mode@gnu.org>
+1999-12-12  Martin Stjernholm  <mast@lysator.liu.se>
 
        * cc-defs.el (c-with-syntax-table): New macro to easily switch
        syntax tables temporarily.
        member init argument lists split over several lines.  Case 5D
        changed.
 
-       * cc-langs.el (c-Java-javadoc-paragraph-start): Added new tag
+       * cc-langs.el (c-Java-javadoc-paragraph-start): Add new tag
        @throws introduced in Javadoc 1.2.
 
-       * cc-menus.el (cc-imenu-java-generic-expression): Applied
-       patch from RMS to avoid infinite backtracking.
+       * cc-menus.el (cc-imenu-java-generic-expression):
+       Applied patch from RMS to avoid infinite backtracking.
 
-1999-12-12  Martin Stjernholm  <bug-cc-mode@gnu.org>
+1999-12-12  Martin Stjernholm  <mast@lysator.liu.se>
 
        * cc-align.el (c-lineup-arglist): Handle "arglists" surrounded
        by [ ].
 
-1999-12-12  Martin Stjernholm  <bug-cc-mode@gnu.org>
+1999-12-12  Martin Stjernholm  <mast@lysator.liu.se>
 
        * cc-align.el (c-lineup-dont-change): Compensate properly for
        the column in langelem.
 
-       * cc-engine.el (c-syntactic-information-on-region): New
-       function to help debugging the syntactic analysis.
+       * cc-engine.el (c-syntactic-information-on-region):
+       New function to help debugging the syntactic analysis.
 
-1999-12-12  Martin Stjernholm  <bug-cc-mode@gnu.org>
+1999-12-12  Martin Stjernholm  <mast@lysator.liu.se>
 
        * cc-align.el (c-lineup-template-args): Handle nested template
        arglists.
        * cc-styles.el (c-offsets-alist): Use `c-lineup-template-args'
        by default.
 
-1999-12-12  Martin Stjernholm  <bug-cc-mode@gnu.org>
+1999-12-12  Martin Stjernholm  <mast@lysator.liu.se>
 
        * cc-engine.el (c-guess-basic-syntax): Pike allows a comma
        immediately before the closing paren in an arglist, so don't
        check that in Pike mode.  Case 7A changed.
 
-1999-12-12  Martin Stjernholm  <bug-cc-mode@gnu.org>
+1999-12-12  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * cc-cmds.el (c-indent-region): Fixed bug where comment-only
+       * cc-cmds.el (c-indent-region): Fix bug where comment-only
        lines were ignored under certain conditions.
 
-1999-12-12  Martin Stjernholm  <bug-cc-mode@gnu.org>
+1999-12-12  Martin Stjernholm  <mast@lysator.liu.se>
 
        * cc-align.el (c-lineup-template-args): New function for
        aligning continued template argument lists.
        lists containing function arglists split over several lines.
        Case 5D.1 changed.
 
-       * cc-engine.el (c-guess-basic-syntax): Fixed bug where
+       * cc-engine.el (c-guess-basic-syntax): Fix bug where
        template-args-cont didn't get recognized when the first
-       arglist opener line doesn't contain a template argument.  New
-       case 5K.
+       arglist opener line doesn't contain a template argument.
+       New case 5K.
 
-1999-12-12  Martin Stjernholm  <bug-cc-mode@gnu.org>
+1999-12-12  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * cc-defs.el (c-point): Changed from subst to macro for
+       * cc-defs.el (c-point): Change from subst to macro for
        efficiency.
-       (c-beginning-of-defun-1, c-end-of-defun-1): New
-       beginning-of-defun/end-of-defun wrappers separated from
+       (c-beginning-of-defun-1, c-end-of-defun-1):
+       New beginning-of-defun/end-of-defun wrappers separated from
        c-point.
 
        * cc-menus.el (imenu-generic-expression)
-       (imenu-case-fold-search, imenu-progress-message): Dummy
-       definitions to avoid compiler warnings if imenu can't be
+       (imenu-case-fold-search, imenu-progress-message):
+       Dummy definitions to avoid compiler warnings if imenu can't be
        loaded.
        * cc-menus.el (cc-imenu-init): New function called at mode
        init.
-       * cc-mode.el (c-mode, c++-mode, objc-mode, java-mode): Moved
-       imenu initializations to cc-imenu-init.
+       * cc-mode.el (c-mode, c++-mode, objc-mode, java-mode):
+       Move imenu initializations to cc-imenu-init.
 
-1999-12-12  Martin Stjernholm  <bug-cc-mode@gnu.org>
+1999-12-12  Martin Stjernholm  <mast@lysator.liu.se>
 
        * cc-engine.el (c-guess-basic-syntax): Slightly better check
        for lambda-intro-cont in Pike mode.  Case 6 changed.
 
-       * cc-engine.el (c-looking-at-inexpr-block): Fixed bug where
+       * cc-engine.el (c-looking-at-inexpr-block): Fix bug where
        anything following "new Foo()" was considered an anonymous
        class body in Java mode.
 
-1999-12-12  Barry A. Warsaw  <bug-cc-mode@gnu.org>
+1999-12-12  Barry A. Warsaw  <bwarsaw@cnri.reston.va.us>
 
        * cc-cmds.el (c-comment-line-break-function): When breaking in
        a string, don't insert a new line.
 
-1999-12-12  Barry A. Warsaw  <bug-cc-mode@gnu.org>
+1999-12-12  Barry A. Warsaw  <bwarsaw@cnri.reston.va.us>
 
        * cc-engine.el (c-at-toplevel-p): New interface function which
        returns information useful to add-on authors.  It tells you
        whether you're at a toplevel statement or not.
 
-1999-12-12  Barry A. Warsaw  <bug-cc-mode@gnu.org>
+1999-12-12  Barry A. Warsaw  <bwarsaw@cnri.reston.va.us>
 
        * cc-cmds.el (c-comment-line-break-function): It is possible
        that forward-line does not land us at the bol, say if we're on
        the last line in a file.  In that case, do a
        back-to-indentation instead of a forward-comment -1.
 
-1999-12-12  Martin Stjernholm  <bug-cc-mode@gnu.org>
+1999-12-12  Martin Stjernholm  <mast@lysator.liu.se>
 
        * cc-engine.el (c-beginning-of-statement-1): Don't catch
        "default:" as normal label in case 4.
 
-1999-12-12  Martin Stjernholm  <bug-cc-mode@gnu.org>
+1999-12-12  Martin Stjernholm  <mast@lysator.liu.se>
 
        * cc-engine.el (c-guess-basic-syntax): Use c-bitfield-key to
        recognize continued bitfield declarations.  Case 5D.1 changed.
        * cc-langs.el: New variable c-bitfield-key.
        * cc-mode.el: New variable c-bitfield-key.
 
-1999-12-12  Martin Stjernholm  <bug-cc-mode@gnu.org>
+1999-12-12  Martin Stjernholm  <mast@lysator.liu.se>
 
        * cc-engine.el (c-inside-bracelist-p): Tighter test for Java
        anonymous array expressions (i.e. "new Foo[] {.. bracelist
        keymap and minor-mode-alist stuff.  Don't set zmacs-region-stays.
        (footnote-insert-text-marker, Footnote-insert-pointer-marker):
        Avoid `acons'.
-       (footnote-mode-line-string, Footnote-add-footnote): Remove
-       autoload cookie.
+       (footnote-mode-line-string, Footnote-add-footnote):
+       Remove autoload cookie.
 
 1999-12-12  Richard Sharman  <rsharman@pobox.com>
 
        * files.el (after-find-file): Use auto-save-visited-file-name if
        set.
 
-       * mail/feedmail.el (feedmail-find-eoh): Take
-       feedmail-queue-alternative-mail-header-separator into account.
+       * mail/feedmail.el (feedmail-find-eoh):
+       Take feedmail-queue-alternative-mail-header-separator into account.
 
 1999-12-09  Stefan Monnier  <monnier@cs.yale.edu>
 
 
        * font-lock.el (font-lock-multiline): New variable.
        (font-lock-add-keywords): Rename `major-mode' into `mode'.
-       (font-lock-remove-keywords): Added a dummy `mode' argument for
+       (font-lock-remove-keywords): Add a dummy `mode' argument for
        potential future support.
        (font-lock-fontify-anchored-keywords)
        (font-lock-fontify-keywords-region): Only handle multiline strings
        (x-defined-colors, face-color-supported-p, face-color-gray-p):
        Remove.
 
-       * facemenu.el (facemenu-read-color, list-colors-display): Use
-       defined-colors for all frame types.
+       * facemenu.el (facemenu-read-color, list-colors-display):
+       Use defined-colors for all frame types.
        (facemenu-color-equal): Use color-values for all frame types.
 
        * faces.el (read-face-attribute): For :foreground and :background
        types other than x and w32, but only if the terminal supports
        colors.  Call tty-color-define instead of face-register-tty-color.
 
-       * term/x-win.el (xw-defined-colors): Renamed from
+       * term/x-win.el (xw-defined-colors): Rename from
        x-defined-colors.
        * term/w32-win.el (xw-defined-colors): Likewise.
 
 
 1999-12-06  Inge Frick  <inge@nada.kth.se>
 
-       * dired-aux.el (dired-do-shell-command): Changed documentation.
+       * dired-aux.el (dired-do-shell-command): Change documentation.
        (dired-shell-stuff-it): A `?' in COMMAND has now the same
        meaning as `*'.
 
 
 1999-12-06  Sam Steingold  <sds@goems.com>
 
-       * progmodes/etags.el (etags-tags-completion-table): Modified the
+       * progmodes/etags.el (etags-tags-completion-table): Modify the
        regexp to allow for the CL symbols starting with `+*'.
        (tags-completion-table): Doc fix (it's an obarray, not an alist).
-       (tags-completion-table, tags-recognize-empty-tags-table): Remove
-       `function' quoting lambda.
+       (tags-completion-table, tags-recognize-empty-tags-table):
+       Remove `function' quoting lambda.
        (tags-with-face): New macro.
        (list-tags, tags-apropos): Use it.
        (tags-apropos-additional-actions): New user option.
        (tags-apropos-verbose): New user option.
        (etags-tags-apropos): Use it.
        (visit-tags-table-buffer, next-file): Use `unless'.
-       (recognize-empty-tags-table): Renamed to
+       (recognize-empty-tags-table): Rename to
        tags-recognize-empty-tags-table.
        (complete-tag): Call tags-complete-tag bypassing try-completion.
 
 1999-12-06  Kenichi Handa  <handa@etl.go.jp>
 
-       * international/mule.el (set-buffer-file-coding-system): Docstring
-       modified.
+       * international/mule.el (set-buffer-file-coding-system):
+       Docstring modified.
 
 1999-12-05  Dirk Herrmann  <D.Herrmann@tu-bs.de>
 
-       * textmodes/bibtex.el (bibtex-hs-forward-sexp): Added to support
+       * textmodes/bibtex.el (bibtex-hs-forward-sexp): Add to support
        using the hideshow package.
-       (hs-special-modes-alist): Added entry for bibtex to allow the use
+       (hs-special-modes-alist): Add entry for bibtex to allow the use
        of the hideshow package.
-       (bibtex-hide-entry-bodies): Deleted as hiding of entry bodies is
+       (bibtex-hide-entry-bodies): Delete as hiding of entry bodies is
        not longer provided by bibtex.el directly.  Instead the hideshow
        package should be used.
-       (bibtex-mode-map, bibtex-edit-menu, bibtex-mode): Delete
-       references to bibtex-hide-entry-bodies.
+       (bibtex-mode-map, bibtex-edit-menu, bibtex-mode):
+       Delete references to bibtex-hide-entry-bodies.
 
 1999-12-05  Dirk Herrmann  <D.Herrmann@tu-bs.de>
 
-       * textmodes/bibtex.el: Copyright notice is up to date.  Moved
-       maintainer information closer to the beginning of the bibtex.el
+       * textmodes/bibtex.el: Copyright notice is up to date.
+       Moved maintainer information closer to the beginning of the bibtex.el
        file.
        (bibtex-maintainer-salutation): New constant.
        (bibtex-version): New constant.
        bibtex-maintainer-salutation.
        (bibtex-entry-field-alist): Made booktitle field optional for
        @inproceedings entries when crossreferenced.
-       (bibtex-entry-field-alist): Added booktitle field to proceedings
+       (bibtex-entry-field-alist): Add booktitle field to proceedings
        entry type (for cross referencing). Thanks to Wagner Toledo Correa
        for the suggestion.
-       (bibtex-string-file-path): Fixed typo.
+       (bibtex-string-file-path): Fix typo.
 
 1999-12-05  Carsten Dominik  <dominik@strw.leidenuniv.nl>
 
        * textmodes/bibtex.el (bibtex-mode-map): Reserved the key `C-c &'
        for reftex.el.
-       (bibtex-edit-menu): Added `reftex-view-crossref-from-bibtex' to menu.
+       (bibtex-edit-menu): Add `reftex-view-crossref-from-bibtex' to menu.
 
 1999-12-04  Dave Love  <fx@gnu.org>
 
 
 1999-12-04  Michael Kifer  <kifer@cs.sunysb.edu>
 
-       * viper-cmd.el (viper-change-state): Use
-       viper-ESC-moves-cursor-back to decide whether to move the cursor
+       * viper-cmd.el (viper-change-state):
+       Use viper-ESC-moves-cursor-back to decide whether to move the cursor
        back.
 
 1999-12-03  Kenichi Handa  <handa@mule.m17n.org>
 
-       * international/mule-util.el (truncate-string-to-width): Docstring
-       fixed.
+       * international/mule-util.el (truncate-string-to-width):
+       Docstring fixed.
 
 1999-12-02  Stefan Monnier  <monnier@cs.yale.edu>
 
        * vc.el (vc-update-change-log): Look for rcs2log under
        exec-directory.
 
-       * emacs-lisp/lisp-mode.el (lisp-mode-variables): Change
-       outline-regexp, add outline-level.
+       * emacs-lisp/lisp-mode.el (lisp-mode-variables):
+       Change outline-regexp, add outline-level.
        (lisp-outline-level): New.
 
        * calendar/appt.el (appt-convert-time): Handle "12:MMam",
        * cus-start.el: Add use-dialog-box.
 
        * add-log.el (change-log-mode-hook): Customize.
-       (add-log-current-defun): Use
-       fortran-{beginning,end}-of-subprogram.
+       (add-log-current-defun):
+       Use fortran-{beginning,end}-of-subprogram.
 
 1999-11-26  Richard M. Stallman  <rms@gnu.org>
 
 
        * ediff-merge.el (ediff-looks-like-combined-merge)
        (ediff-get-combined-region):
-       Changed to support the new format for ediff-combination-pattern.
+       Change to support the new format for ediff-combination-pattern.
 
        * ediff-diff.el (ediff-set-fine-overlays-in-one-buffer):
-       Changed to support the new format for ediff-combination-pattern.
+       Change to support the new format for ediff-combination-pattern.
 
 1999-11-24  Dave Love  <fx@gnu.org>
 
        imenu-generic-expression.
 
        * sql.el (sql-mode): Use ?_ and ?. instead of 95 and 46 when
-       setting font-lock-defaults' SYNTAX-ALIST.  Set
-       imenu-generic-expression, imenu-case-fold-search, and
+       setting font-lock-defaults' SYNTAX-ALIST.
+       Set imenu-generic-expression, imenu-case-fold-search, and
        imenu-syntax-alist.
 
        * sql.el (sql-interactive-mode): Use ?_ and ?. instead of 95
 
 1999-11-23  Dave Love  <fx@gnu.org>
 
-       * progmodes/fortran.el (fortran-comment-line-start): Renamed from
+       * progmodes/fortran.el (fortran-comment-line-start): Rename from
        comment-line-start.
-       (fortran-comment-line-start-skip): Renamed from
+       (fortran-comment-line-start-skip): Rename from
        comment-line-start-skip.
        (fortran-mode-map): Use renamed functions.  Add manual and custom
        entries to menu.
        (fortran-mode-hook): Customize.
-       (fortran-comment-indent-function): Renamed from
+       (fortran-comment-indent-function): Rename from
        fortran-comment-hook.
        (delete-horizontal-regexp): Function deleted.
-       (fortran-electric-line-number): Simplified.
-       (fortran-beginning-of-subprogram): Renamed from
+       (fortran-electric-line-number): Simplify.
+       (fortran-beginning-of-subprogram): Rename from
        beginning-of-fortran-subprogram.
-       (fortran-end-of-subprogram): Renamed from
+       (fortran-end-of-subprogram): Rename from
        end-of-fortran-subprogram.
-       (fortran-mark-subprogram): Renamed from mark-fortran-subprogram.
-       (fortran-previous-statement, fortran-next-statement): Simplified.
+       (fortran-mark-subprogram): Rename from mark-fortran-subprogram.
+       (fortran-previous-statement, fortran-next-statement): Simplify.
        (fortran-blink-match): New function.
        (fortran-blink-matching-if, fortran-blink-matching-do): Use it.
        (fortran-indent-to-column): Don't use delete-horizontal-regexp.
-       (fortran-find-comment-start-skip, fortran-is-in-string-p): Use
-       line-end-position.
+       (fortran-find-comment-start-skip, fortran-is-in-string-p):
+       Use line-end-position.
        (fortran-fill): No longer interactive.  Simplified.
-       (fortran-break-line): Simplified.
+       (fortran-break-line): Simplify.
        (fortran-analyze-file-format): Use char-after, not looking-at.
 
        * emacs-lisp/find-func.el (find-function-regexp):
        * emacs-lisp/easy-mmode.el: Changed maintainer.
        (easy-mmode-define-toggle): New BODY arg; Never append `-mode';
        Use defcustom for the hooks; Improve the auto-generated docstrings.
-       (easy-mmode-define-minor-mode): Renamed `define-minor-mode'.
+       (easy-mmode-define-minor-mode): Rename `define-minor-mode'.
        (define-minor-mode): Add BODY arg; Only declare the keymap if
        provided; Improve the auto-generated docstrings.
 
        * speedbar.el: Clean up comment at the start of the file.
        Remove RCS id.
 
-       * progmodes/compile.el (compilation-parse-errors): Use
-       compilation-buffer-p instead of testing major-mode.
+       * progmodes/compile.el (compilation-parse-errors):
+       Use compilation-buffer-p instead of testing major-mode.
 
 1999-11-18  Dave Pearson  <davep@hagbard.demon.co.uk>
 
 
        * goto-addr.el (goto-address-at-mouse)
        (goto-address-find-address-at-point): Use compose-mail.
-       (goto-address-mail-method): Removed variable.
+       (goto-address-mail-method): Remove variable.
        (goto-address-send-using-mh-e, goto-address-send-using-mhe)
-       (goto-address-send-using-mail): Removed functions.
+       (goto-address-send-using-mail): Remove functions.
 
 1998-11-15  Sam Steingold  <sds@goems.com>
 
 
 1999-11-14  Alex Schroeder  <alex@gnu.org>
 
-       * ansi-color.el (ansi-color-apply): Updated regexps to include
+       * ansi-color.el (ansi-color-apply): Update regexps to include
        highlighted face.
 
 1999-01-14  Johan Vromans  <jvromans@squirrel.nl>
 
 1999-11-13  Peter Breton  <pbreton@ne.mediaone.net>
 
-       * net-utils.el (run-network-program, net-utils-run-program): Use
-       the new backquote syntax.
+       * net-utils.el (run-network-program, net-utils-run-program):
+       Use the new backquote syntax.
        (smbclient-program, smbclient-program-options)
-       (smbclient-prompt-regexp, smbclient-font-lock-keywords): New
-       variables.
+       (smbclient-prompt-regexp, smbclient-font-lock-keywords):
+       New variables.
        (smbclient, smbclient-list-shares): New functions
 
 1999-11-12  Sam Steingold  <sds@ksp.com>
 
 1999-11-12  Peter Kleiweg  <kleiweg@let.rug.nl>
 
-       * progmodes/ps-mode.el (ps-mode-submit-bug-report): Added list
+       * progmodes/ps-mode.el (ps-mode-submit-bug-report): Add list
        of customizable variables to bug report message. Added
        system-type to package name in bug report.
 
 
 1999-11-10  Peter Kleiweg  <kleiweg@let.rug.nl>
 
-       * progmodes/ps-mode.el (ps-mode-maintainer-address): New
-       constant.
+       * progmodes/ps-mode.el (ps-mode-maintainer-address):
+       New constant.
        (ps-mode-submit-bug-report): New function. Entry added to menu.
 
 1999-11-10  William M. Perry  <wmperry@aventail.com>
 
 1999-11-08  Peter Kleiweg  <kleiweg@let.rug.nl>
 
-       * progmodes/ps-mode.el (ps-mode-print-function): Changed default
+       * progmodes/ps-mode.el (ps-mode-print-function): Change default
        lpr-command to "lp" for some system-types. (copied from lpr.el
        Emacs version 20.2.1).
 
        * isearch.el (isearch-complete-edit, isearch-ring-advance-edit):
        Use erase-field instead of erase-buffer.
 
-       * frame.el (blink-cursor-mode, blink-cursor-end): Use
-       internal-show-cursor with new interface.
+       * frame.el (blink-cursor-mode, blink-cursor-end):
+       Use internal-show-cursor with new interface.
        (blink-cursor-timer-function): New.
        (blink-cursor-start): Use blink-cursor-timer-function.
 
 
 1999-11-01  Markus Rost  <rost@ias.edu>
 
-       * dired-x.el (dired-smart-shell-command): Use
-       shell-command-history as in shell-command.
+       * dired-x.el (dired-smart-shell-command):
+       Use shell-command-history as in shell-command.
 
 1999-11-01  Richard M. Stallman  <rms@gnu.org>
 
        of show-cursor.
        (blink-cursor-start, blink-cursor-end): Ditto.
 
-       * textmodes/tex-mode.el (tex-default-mode): Changed to latex-mode.
+       * textmodes/tex-mode.el (tex-default-mode): Change to latex-mode.
 
 1999-11-01  Richard M. Stallman  <rms@gnu.org>
 
 
        * ediff.el: Version change.
 
-       * ediff-util.el (ediff-cleanup-mess): Fixed the case of dead windows.
+       * ediff-util.el (ediff-cleanup-mess): Fix the case of dead windows.
        make sure you are in a good frame before deleting other
        windows.
        (ediff-file-checked-in-p): Don't consider CVS
 
        * viper-keym.el: Fixed calls to viper-ex, change key C-c g to C-c C-g.
 
-       * viper-util.el (viper-nontrivial-find-file-function): Deleted.
+       * viper-util.el (viper-nontrivial-find-file-function): Delete.
        (viper-glob-unix-files, viper-glob-mswindows-files): New functions.
        (viper-save-cursor-color, viper-restore-cursor-color):
-       Improved cursor color handling.
+       Improve cursor color handling.
        (viper-get-saved-cursor-color-in-replace-mode)
        (viper-get-saved-cursor-color-in-insert-mode): New functions for
        better cursor color handling.
        `whitespace-check-<whitespace-type>' to nil.
        (whitespace-unchecked-whitespaces): New function to return the
        list of whitespaces for whom checks have been suppressed.
-       (whitespace-display-unchecked-whitespaces): Renamed to
+       (whitespace-display-unchecked-whitespaces): Rename to
        `whitespace-update-modeline' to reflect its functionality.
 
 1999-10-30  Gerd Moellmann  <gerd@gnu.org>
        * progmodes/ada-stmt.el, progmodes/ada-xref.el: Doc-string and
        comment fixes.
 
-       * progmodes/compile.el (compilation-error-regexp-alist): Recognize
-       MIPS Pro 7.3 compiler error message syntax.
+       * progmodes/compile.el (compilation-error-regexp-alist):
+       Recognize MIPS Pro 7.3 compiler error message syntax.
 
 1999-10-27  Dave Love  <fx@gnu.org>
 
 1999-10-27  Dave Love  <fx@gnu.org>
 
        * emacs-lisp/advice.el: Doc fixes.
-       (ad-lemacs-p): Removed.
+       (ad-lemacs-p): Remove.
        (advice): Add :link to defgroup.
 
 1999-10-27  Kenichi Handa  <handa@etl.go.jp>
 
 1999-10-27  Richard M. Stallman  <rms@gnu.org>
 
-       * emacs-lisp/advice.el (ad-activate-internal): Renamed from
+       * emacs-lisp/advice.el (ad-activate-internal): Rename from
        ad-activate.  All callers changed, including those in data.c.
-       (ad-activate-internal-off): Renamed from ad-activate-off.
+       (ad-activate-internal-off): Rename from ad-activate-off.
        All uses changed.
-       (ad-activate): Renamed from ad-activate-on.  All uses changed.
+       (ad-activate): Rename from ad-activate-on.  All uses changed.
        (ad-start-advice, ad-stop-advice, ad-recover-normality):
        Alter the definition of ad-activate-internal, not ad-activate.
 
 
 1999-10-25  Sam Steingold  <sds@ksp.com>
 
-       * Makefile (compile-files): Fixed the "tr" strings.
+       * Makefile (compile-files): Fix the "tr" strings.
        (EMACS): Set to ../src/emacs.
 
 1999-10-25  Gerd Moellmann  <gerd@gnu.org>
 
        * ps-print-def.el: New file: common definitions for all parts of
        ps-print.
-       (ps-multibyte-buffer): Moved from ps-mule.
+       (ps-multibyte-buffer): Move from ps-mule.
 
        * ps-mule.el: File dependence fix.
-       (ps-multibyte-buffer): Moved to ps-print-def.
+       (ps-multibyte-buffer): Move to ps-print-def.
 
        * ps-print.el: Doc fix, better customization.
        (ps-print-region-function, ps-number-of-columns, ps-spool-tumble)
 
        * ps-print.el: Doc fix, n-up printing.
        (ps-print-version): New version number (5.0).
-       (ps-page-dimensions-database): Added document media.
+       (ps-page-dimensions-database): Add document media.
        (ps-n-up-printing, ps-n-up-margin, ps-n-up-border-p, ps-n-up-filling)
        (ps-page-order, ps-printing-region-p): New vars.
        (ps-n-up-printing, ps-n-up-filling, ps-header-sheet, ps-end-job):
        (ps-setup, ps-begin-file, ps-get-buffer-name, ps-begin-job)
        (ps-end-file, ps-dummy-page, ps-generate): Fix funs.
        (ps-print-prologue-1): Adjust PostScript programming for n-up printing.
-       (ps-count-lines): Changed to defun.
-       (ps-header-page): Changed to defsubst, fix fun.
+       (ps-count-lines): Change to defun.
+       (ps-header-page): Change to defsubst, fix fun.
        (ps-printing-region): Doc fix, adjust programming code.
        (ps-output-boolean, ps-background-pages, ps-background-text)
        (ps-background-image, ps-background, ps-get-boundingbox):
        * ps-print.el: Doc fix, duplex and setpagedevice configuration.
        (ps-print-version): New version number (4.2).
        (ps-spool-config, ps-spool-tumble): New vars.
-       (ps-print-prologue-1): Changed to defconst, adjust PostScript
+       (ps-print-prologue-1): Change to defconst, adjust PostScript
        programming, new PostScript procedure to handle errors.
-       (ps-print-prologue-2): Changed to defconst.
+       (ps-print-prologue-2): Change to defconst.
        (ps-print-duplex-feature): New const: duplex and tumble setting.
        (ps-setup, ps-begin-file): Fix funs.
        (ps-boolean-capitalized): New fun.
 1999-10-19  Stefan Monnier  <monnier@cs.yale.edu>
 
        * Makefile (dontcompilefiles): Obsoleted.
-       (DONTCOMPILE): Added emacs-lisp/cl-specs.el.
+       (DONTCOMPILE): Add emacs-lisp/cl-specs.el.
        (EL): Unused.
-       (temacs): Removed (unused).
+       (temacs): Remove (unused).
        (cus-load.el, finder-inf.el, loaddefs.el): New targets to build a dummy
        version of the file (necessary for the update to work properly).
        (autoloads): Force the use of `pwd`/loaddefs.el.
        value: \"lpr\" changed to "lpr".
        (ps-mode-version): New constant.
        (ps-mode-show-version): New function, added key in ps-mode-map.
-       (ps-run-messages): Removed.
+       (ps-run-messages): Remove.
        (ps-run-font-lock-keywords-2): New defcustom variable replacing
        ps-run-messages.  These keywords now include the value of
        ps-run-prompt, making its fontification customizable.
-       (ps-run-init): Removed \\n from docstring, it is now added when
+       (ps-run-init): Remove \\n from docstring, it is now added when
        the value is used.
-       (ps-run-font-lock-keywords-1): Added checking for initial ^ in
+       (ps-run-font-lock-keywords-1): Add checking for initial ^ in
        ps-run-prompt.
-       (ps-mode): Added ps-run-font-lock-keywords-2 to list of
+       (ps-mode): Add ps-run-font-lock-keywords-2 to list of
        customizable variables in doc-string (its equivalent
        ps-run-messages was missing in previous version of the doc-string).
-       (ps-run-mode): Simplified assignment to font-lock-defaults, using
+       (ps-run-mode): Simplify assignment to font-lock-defaults, using
        symbols only.
 
 1999-10-19  Alex Schroeder  <alex@gnu.org>
        (set-display-table-and-terminal-coding-system): New function,
        containing code migrated out of set-language-environment.
        (set-language-environment, set-locale-environment): Use it.
-       (locale-translation-file-name): Moved here from startup.el.
+       (locale-translation-file-name): Move here from startup.el.
        (locale-language-names, locale-preferred-coding-systems):
        New vars.
        (locale-name-match, set-locale-environment): New functions.
 
 1999-10-17  Sam Steingold  <sds@ksp.com>
 
-       * bindings.el (completion-ignored-extensions): Added ".sparcf"
+       * bindings.el (completion-ignored-extensions): Add ".sparcf"
        for CMUCL on sparc and ".ufsl" for LispWorks.
        (bound-and-true-p): Bugfix: free variable `v'.
 
 
 1999-10-12  Stefan Monnier  <monnier@cs.yale.edu>
 
-       * simple.el (shell-command, shell-command-on-region): Use
-       make-temp-file.
+       * simple.el (shell-command, shell-command-on-region):
+       Use make-temp-file.
        (clone-buffer, clone-process, clone-buffer-hook): New functions.
 
        * subr.el (with-current-buffer): Don't use backquotes to avoid
 1999-10-12  Richard Sharman  <rsharman@pobox.com>
 
        * sh-script.el: Added support for indenting existing scripts.
-       (sh-mode-map): Added new bindings.
-       (sh-mode): Updated mode doc-string for new commands, added
+       (sh-mode-map): Add new bindings.
+       (sh-mode): Update mode doc-string for new commands, added
        make-local-variable calls, initialize mode-specific variables.
-       (sh-indent-line): Renamed to sh-basic-indent-line; sh-indent-line
+       (sh-indent-line): Rename to sh-basic-indent-line; sh-indent-line
        is now a different function.
-       (sh-header-marker): Changed docstring.
+       (sh-header-marker): Change docstring.
        (sh-set-shell): Initialize mode-specific variables.
        (sh-case, sh-for, sh-if, sh-indexed-loop, sh-repeat, sh-select)
        (sh-tmp-file, sh-until, sh-until, sh-while, sh-while-getopts):
-       Changed these define-skeleton calls to work with user-specified
+       Change these define-skeleton calls to work with user-specified
        indentation settings.
        (sh-basic-indent-line, sh-blink, sh-calculate-indent)
        (sh-check-paren-in-case, sh-check-rule, sh-do-nothing)
        (isearch-yank-x-selection, isearch-ring-advance-edit): Doc fix.
        (isearch-ring-retreat-edit): Doc fix.
        (isearch-mouse-yank): New command.
-       (isearch-last-command-char): Removed.  Callers changed to use
+       (isearch-last-command-char): Remove.  Callers changed to use
        last-command-char.
-       (isearch-char-to-string): Removed.  Callers changed to use
+       (isearch-char-to-string): Remove.  Callers changed to use
        char-to-string.
 
 1999-09-26  Oleg S. Tihonov  <tihonov@ffke-campus.mipt.ru>
        * textmodes/reftex-parse.el (reftex-parse-from-file): Scan for
        multiple thebibliography environments.
 
-       * textmodes/reftex-cite.el (reftex-pop-to-bibtex-entry): Fixed bug
+       * textmodes/reftex-cite.el (reftex-pop-to-bibtex-entry): Fix bug
        with recentering window.
        (reftex-extract-bib-entries-from-thebibliography)
        (reftex-offer-bib-menu, reftex-bibtex-selection-callback):
        `copy-file'.
        (dired-copy-file-recursive): New function.  Copy directories
        recursively.
-       (dired-do-create-files): Added support for generalized directory
+       (dired-do-create-files): Add support for generalized directory
        target.  How-to function may now return a function.  New fluid
        variable `dired-one-file'.
        (dired-copy-how-to-fn): New variable.
        * whitespace.el (whitespace-modes): Add `change-log-mode' to the
        list of modes to be checked for bogus whitespaces.
 
-       * whitespace.el (whitespace-rescan-timer-time): Update
-       documentation.
+       * whitespace.el (whitespace-rescan-timer-time):
+       Update documentation.
 
        * whitespace.el (whitespace-display-unchecked-whitespaces):
        New function to update modeline with untested whitespaces.
        (widget-button-pressed-face): New variable.
        (widget-button-click): Use it.
        (widget-documentation-link-add): Specify mouse and button faces.
-       (widget-echo-help-mouse, widget-stop-mouse-tracking): Functions
-       removed now the functionality is built in.
+       (widget-echo-help-mouse, widget-stop-mouse-tracking):
+       Functions removed now the functionality is built in.
 
        * cus-edit.el: Don't define-widget-keywords.
        (multimedia): New group.
        (custom-variable-set, custom-variable-save, custom-face-state-set)
        (custom-variable-reset-saved, custom-variable-reset-standard)
        (custom-face-set, custom-face-save, custom-face-reset-saved)
-       (custom-face-reset-standard, customize-save-customized): Handle
-       custom comments.
+       (custom-face-reset-standard, customize-save-customized):
+       Handle custom comments.
        (custom-comment-face, custom-comment-tag-face): New face.
        (custom-comment): New widget.
        (custom-comment-create, custom-comment-delete)
 
        * emacs-lisp/byte-opt.el (byte-optimize-backward-char):
        (byte-optimize-backward-word): New optimizations.
-       (side-effect-free-fns, side-effect-and-error-free-fns): Add
-       entries.
+       (side-effect-free-fns, side-effect-and-error-free-fns):
+       Add entries.
 
 1999-09-09  Gerd Moellmann  <gerd@gnu.org>
 
 
 1999-09-08  Peter Breton  <pbreton@ne.mediaone.net>
 
-       * generic-x.el (generic-define-unix-modes): Added new modes:
+       * generic-x.el (generic-define-unix-modes): Add new modes:
        inetd-conf-generic-mode, etc-services-generic-mode,
        etc-passwd-generic-mode.  These are all defined for Unix by default.
        (apache-generic-mode): Use an imenu-generic-expression to list
        font-lock-defaults setting.
        (java-properties-generic-mode): Supports both ! and # as comment
        characters.
-       (java-properties-generic-mode): Added an imenu-generic-expression.
-       (java-properties-generic-mode): Reworked to support the various
+       (java-properties-generic-mode): Add an imenu-generic-expression.
+       (java-properties-generic-mode): Rework to support the various
        different ways to separate name and value (viz, '=', ':' and
        whitespace).
-       (show-tabs-generic-mode): Added this new generic-mode.
+       (show-tabs-generic-mode): Add this new generic-mode.
 
 1999-09-08  Richard Stallman  <rms@gnu.org>
 
 
 1999-09-07  Dave Pearson  <davep@hagbard.demon.co.uk>
 
-       * quickurl.el (quickurl-list-focused-line): Removed.
+       * quickurl.el (quickurl-list-focused-line): Remove.
        (quickurl-list-insert): Now works out the focused line using
        `count-lines' instead of using `quickurl-list-focused-line'.
 
 
        * isearch.el (isearch-mode-map): Add mouse-2.
 
-       * mail/rmail.el (rmail-read-password): Deleted.
+       * mail/rmail.el (rmail-read-password): Delete.
        (rmail-get-pop-password): Use read-password.
 
        * quickurl.el: Don't conditionally define caddr.
 
 1999-09-06  Stephen Eglen  <stephen@gnu.org>
 
-       * progmodes/octave-inf.el (inferior-octave-startup-args): Add
-       --no-line-editing so that TABs in source files are not interpreted
+       * progmodes/octave-inf.el (inferior-octave-startup-args):
+       Add --no-line-editing so that TABs in source files are not interpreted
        as completion requests.
 
 1999-09-06  Gerd Moellmann  <gerd@gnu.org>
 
 1999-09-06  Dave Love  <fx@gnu.org>
 
-       * emacs-lisp/byte-opt.el (byte-boolean-vars): Removed.  (Now primitive.)
+       * emacs-lisp/byte-opt.el (byte-boolean-vars): Remove.  (Now primitive.)
 
 1999-09-05  Richard Stallman  <rms@gnu.org>
 
 
 1999-09-05  Gerd Moellmann  <gerd@gnu.org>
 
-       * faces.el (header-line): Renamed from `top-line'.
+       * faces.el (header-line): Rename from `top-line'.
 
 1999-09-05  Gerd Moellmann  <gerd@gnu.org>
 
        * startup.el (command-line): Compute the value of
        small-temporary-file-directory.
 
-       * ediff-init.el (ediff-temp-file-prefix): Use
-       small-temporary-file-directory if non-nil.
+       * ediff-init.el (ediff-temp-file-prefix):
+       Use small-temporary-file-directory if non-nil.
 
        * vc.el (vc-update-change-log): Likewise.
 
        * progmodes/cmacexp.el (c-macro-expansion): Likewise.
 
-       * simple.el (shell-command, shell-command-on-region): Use
-       make-temp-name properly.  Use small-temporary-file-directory if
+       * simple.el (shell-command, shell-command-on-region):
+       Use make-temp-name properly.  Use small-temporary-file-directory if
        non-nil, otherwise temporary-file-directory, to generate temporary
        files.
 
-       * dos-w32.el (direct-print-region-helper): Use
-       temporary-file-directory.  (From Stefan Monnier.)
+       * dos-w32.el (direct-print-region-helper):
+       Use temporary-file-directory.  (From Stefan Monnier.)
 
 1999-09-02  Richard Stallman  <rms@gnu.org>
 
        * progmodes/compile.el (compilation-error-regexp-alist):
        New item for SGI IRIX MipsPro compilers.
 
-       * speedbar.el (speedbar-directory-buttons): Recognize
-       device names when checking for file names.
+       * speedbar.el (speedbar-directory-buttons):
+       Recognize device names when checking for file names.
 
        * array.el (array-reconfigure-rows): Use generate-new-buffer.
 
        * comint.el (comint-input-ring-separator): New variable.
        (comint-read-input-ring): Doc change; use
        comint-input-ring-separator when reading file.
-       (comint-write-input-ring): Use
-       comint-input-ring-separator when writing file.
+       (comint-write-input-ring):
+       Use comint-input-ring-separator when writing file.
 
 1999-08-29  Marc Girod  <girod@shire.ntc.nokia.com>
 
 
        * calendar/cal-move.el: Call the new hook in every movement function.
 
-       * calendar/calendar.el (calendar-goto-astro-day-number): Autoload
-       the right function name.
+       * calendar/calendar.el (calendar-goto-astro-day-number):
+       Autoload the right function name.
 
 1999-08-26  Stephen Gildea  <gildea@stop.mail-abuse.org>
 
        (time-stamp): Support multi-line patterns.
        (time-stamp-inserts-lines): New variable.
        (time-stamp-count): New variable.
-       (time-stamp-string-preprocess): Fixed bug where "%%a" becomes
+       (time-stamp-string-preprocess): Fix bug where "%%a" becomes
        "Thu" instead of "%a".
 
 1999-08-25  Gerd Moellmann  <gerd@gnu.org>
 
 1999-08-24  Gerd Moellmann  <gerd@gnu.org>
 
-       * faces.el (margin): Renamed from bitmap-area.
+       * faces.el (margin): Rename from bitmap-area.
 
 1999-08-24  Alex Schroeder  <alex@gnu.org>
 
 
 1999-08-16  Karl Heuer  <kwzh@gnu.org>
 
-       * subr.el (assoc-ignore-case, assoc-ignore-representation): Moved
-       here from simple.el.
+       * subr.el (assoc-ignore-case, assoc-ignore-representation):
+       Move here from simple.el.
 
 1999-08-16  Dave Love  <fx@gnu.org>
 
 
 1999-08-16  Carsten Dominik  <cd@gnu.org>
 
-       * textmodes/reftex.el (reftex-pop-to-bibtex-entry): Fixed
-       conflict with pop-up-frames.
+       * textmodes/reftex.el (reftex-pop-to-bibtex-entry):
+       Fix conflict with pop-up-frames.
        (reftex-special-environment-parsers): New constant.
        (reftex-label-alist): car of an entry can also be a function.
        (reftex-what-special-env): Cew function.
        (reftex-label-location): Call `reftex-what-special-env'.
        (reftex-compile-variables): Check for symbol in `reftex-label-alist'.
-       (reftex-what-environment): Fixed bug with stacked environments of
+       (reftex-what-environment): Fix bug with stacked environments of
        same kind (e.g. enumerate).
        (reftex-process-string): Preserve default directory.
-       (reftex-label-alist-builtin): Changed prefixes of endnote and footnote.
+       (reftex-label-alist-builtin): Change prefixes of endnote and footnote.
        Also the magic words.
        (reftex-reference): Interpret new option `reftex-fref-is-default'.
        (reftex-replace-prefix-escapes): Interpret new `%S' format.
        boundaries has been moved to `F'.
        (reftex-select-label-map): Toggling display of file boundaries is
        now on the `F' key, for consistency with `reftex-toc-map'.
-       (reftex-erase-all-selection-and-index-buffers): Renamed from
+       (reftex-erase-all-selection-and-index-buffers): Rename from
        `reftex-erase-all-selection-buffer'.  Now also kills the index
        buffers.
        (reftex-viewing-cross-references): Customization group renamed
        be the same size when necessary to fit all the rings in the
        window; and poles can be oriented horizontally.  Face support is
        thrown in gratuitously.
-       (hanoi): Changed default number of rings back to 3.
+       (hanoi): Change default number of rings back to 3.
        (hanoi-unix, hanoi-unix-64): New commands.
        (hanoi-horizontal-flag, hanoi-move-period, hanoi-use-faces)
        (hanoi-pole-face, hanoi-base-face, hanoi-even-ring-face)
        (hanoi-internal, hanoi-current-time-float, hanoi-put-face)
        (hanoi-n, hanoi-insert-ring, hanoi-goto-char, hanoi-sit-for)
        (hanoi-ring-to-pos, hanoi-pos-on-tower-p): New functions.
-       (hanoi-0): Renamed from hanoi0, for symmetry with hanoi-n.
-       (hanoi-topos, hanoi-draw-ring): Removed.
+       (hanoi-0): Rename from hanoi0, for symmetry with hanoi-n.
+       (hanoi-topos, hanoi-draw-ring): Remove.
 
 1999-08-12  Gerd Moellmann  <gerd@gnu.org>
 
        * faces.el (face-valid-attribute-values): Return an alist for
        families on ttys.
-       (face-read-integer): Handle unspecified face attributes.  Add
-       completion for `unspecified'.
+       (face-read-integer): Handle unspecified face attributes.
+       Add completion for `unspecified'.
        (read-face-attribute): Handle unspecified font attributes.
        (face-valid-attribute-values): Add `unspecified' to lists so that
        it can be chosen via completion.
        (easy-menu-change): Doc fix.
 
        * info-look.el (info-lookup-guess-c-symbol): Use skip-syntax-backward.
-       (info-lookup-guess-default): Simplified and cleaned up.
+       (info-lookup-guess-default): Simplify and cleaned up.
        (info-lookup-guess-default*): Preserve point.
 
        * view.el (view-mode-disable): If buffer-read-only is nil,
 
 1999-08-10  Alex Schroeder  <asc@bsiag.com>
 
-       * ansi-color.el (ansi-color-to-text-properties): Added New state 5
+       * ansi-color.el (ansi-color-to-text-properties): Add New state 5
        to prevent m-eating-bug.
 
 1999-08-10  Eli Zaretskii  <eliz@gnu.org>
 
-       * term/pc-win.el (msdos-bg-mode): Remove.  Call
-       frame-set-background-mode instead.  All callers changed.
+       * term/pc-win.el (msdos-bg-mode): Remove.
+       Call frame-set-background-mode instead.  All callers changed.
        (msdos-face-setup): Don't force color display parameter, it is set
        by frame-set-background-mode.
        (make-msdos-frame): Call x-handle-reverse-video and
 
 1999-08-10  Dave Love  <fx@melange.gnu.org>
 
-       * emacs-lisp/advice.el (ad-make-single-advice-docstring): Treat
-       case with no docstring specially.
+       * emacs-lisp/advice.el (ad-make-single-advice-docstring):
+       Treat case with no docstring specially.
 
 1999-08-09  Eli Zaretskii  <eliz@gnu.org>
 
 
 1999-08-07  Dave Love  <fx@gnu.org>
 
-       * man.el (Man-softhyphen-to-minus): Revert previous change.  Avoid
-       unibyte to multibyte conversion of search-forward (from Handa),
+       * man.el (Man-softhyphen-to-minus): Revert previous change.
+       Avoid unibyte to multibyte conversion of search-forward (from Handa),
        but avoid the replacement if the language is Latin-N.
 
 1999-08-06  Richard Stallman  <rms@gnu.org>
        (apply-on-rectangle): New function, mostly replaces
        `operate-on-rectangle'.  All callers changed.
        (move-to-column-force): Pass new second argument to `move-to-column'.
-       (kill-rectangle): Added optional prefix arg to fill lines.
+       (kill-rectangle): Add optional prefix arg to fill lines.
        (delete-rectangle): Ditto.
        (delete-whitespace-rectangle): Ditto.
        (delete-extract-rectangle): Ditto.
        (open-rectangle): Ditto.
        (clear-rectangle): Ditto.
        (delete-whitespace-rectangle-line): New function.
-       (delete-rectangle-line): Added third arg FILL.
+       (delete-rectangle-line): Add third arg FILL.
        (delete-extract-rectangle-line): Ditto.
        (open-rectangle-line): Ditto.
        (clear-rectangle-line): Ditto.
        frame-delete-all.
 
        * frame.el: Change comments to doc strings and other doc fixes.
-       (frame-delete-all): Moved to subr.el as `assoc-delete-all'.
+       (frame-delete-all): Move to subr.el as `assoc-delete-all'.
        Callers changed.
        (set-background-color, set-foreground-color, set-cursor-color)
        (set-mouse-color, set-border-color): Offer completion of colors.
        * mouse.el (x-fixed-font-alist): Add lucidasanstypewriter.
 
        * msb.el: Require cl only when compiling.
-       (msb--home-dir): Deleted.
+       (msb--home-dir): Delete.
        (msb--format-title): Use abbreviate-file-name.
        (msb--choose-file-menu): Simplify string comparison.
 
 1999-07-26  Kenichi Handa  <handa@etl.go.jp>
 
        * international/ccl.el (ccl-embed-symbol): New function.
-       (ccl-program-p): Deleted.  Now it's implemented in C code.
+       (ccl-program-p): Delete.  Now it's implemented in C code.
        (ccl-compile-call): Use ccl-embed-symbol to embed a symbol.
        (ccl-compile-translate-character): Likewise.
        (ccl-compile-map-single): Likewise.
 
        * fortran.el (fortran-mode-syntax-table): Change `\' to `\'
        syntax.
-       (fortran-fontify-string, fortran-match-!-comment): Deleted.
+       (fortran-fontify-string, fortran-match-!-comment): Delete.
        (fortran-font-lock-syntactic-keywords): New variable.
        (fortran-mode): Use it.
        (fortran-font-lock-keywords-1): Don't do comments.
-       (beginning-of-fortran-subprogram, end-of-fortran-subprogram): Save
-       match data.
+       (beginning-of-fortran-subprogram, end-of-fortran-subprogram):
+       Save match data.
 
        * textmodes/sgml-mode.el (sgml-validate-command): Use nsgmls.
 
-       * msb.el (msb-menu-bar-update-buffers): Renamed from
+       * msb.el (msb-menu-bar-update-buffers): Rename from
        menu-bar-update-buffers.
-       (msb-custom-set, msb--toggle-menu-type): Call
-       msb-menu-bar-update-buffers.
+       (msb-custom-set, msb--toggle-menu-type):
+       Call msb-menu-bar-update-buffers.
        (msb-mode): Revise the hook setting.
 
        * font-lock.el (turn-on-font-lock): Use tty-display-color-p.
 
 1999-07-21  Gerd Moellmann  <gerd@gnu.org>
 
-       * cl-extra.el (cl-make-hash-table): Renamed from make-hash-table.
-       (cl-hash-table-p): Renamed from hash-table-p.
-       (cl-hash-table-count): Renamed from hash-table-count.
+       * cl-extra.el (cl-make-hash-table): Rename from make-hash-table.
+       (cl-hash-table-p): Rename from hash-table-p.
+       (cl-hash-table-count): Rename from hash-table-count.
        (maphash): Alias to cl-maphash removed.
        (gethash): Likewise.
        (puthash): Likewise.
 
 1999-07-21  Gerd Moellmann  <gerd@gnu.org>
 
-       * faces.el (face-underline): Removed.
+       * faces.el (face-underline): Remove.
        (face-underline-color): Ditto.
 
 1999-07-21  Gerd Moellmann  <gerd@gnu.org>
 
        * bindings.el (make-mode-line-mouse-sensitive): Use down-mouse-3
        instead of mouse-3 to pop up menus.
-       (mode-line-kill-buffer): Removed.
+       (mode-line-kill-buffer): Remove.
        (make-mode-line-mouse-sensitive): Pop mouse buffer menu over
        buffer name.
-       (mode-line-buffer-menu-1): Removed.
+       (mode-line-buffer-menu-1): Remove.
 
        * startup.el (command-line-1): Call make-mode-line-mouse-sensitive.
 
 
 1999-07-21  Gerd Moellmann  <gerd@gnu.org>
 
-       * faces.el (frame-update-faces): Copied from 20.2.
+       * faces.el (frame-update-faces): Copy from 20.2.
        (frame-update-face-colors): Ditto.  Code removed that isn't
        applicable in the new face implementation.
 
 
 1999-07-21  Gerd Moellmann  <gerd@gnu.org>
 
-       * faces.el (face-charset-registries): Removed since fontset.el
+       * faces.el (face-charset-registries): Remove since fontset.el
        is no always loaded.
 
 1999-07-21  Gerd Moellmann  <gerd@gnu.org>
 
-       * faces.el (internal-get-face): Added as obsolete function for
+       * faces.el (internal-get-face): Add as obsolete function for
        compatibility.
 
 1999-07-21  Gerd Moellmann  <gerd@gnu.org>
 
        * faces.el (face-id): Return the ID of a realized face for ASCII.
 
-       * fontset.el (x-charset-registries): Removed.  Now in faces.el.
+       * fontset.el (x-charset-registries): Remove.  Now in faces.el.
        (x-complement-fontset-spec): Use face-charset-registries.
 
        * faces.el (face-font-selection-order): Set font selection order
        * cus-face.el (custom-face-attributes): Add :bold and :italic
        for compatibility with old code.
 
-       * faces.el (set-face-attributes-from-resources): Additional
-       frame parameter.
+       * faces.el (set-face-attributes-from-resources):
+       Additional frame parameter.
        (make-face-x-resource-internal): Set attributes from resources
        for a given frame or all frames.
 
 1999-07-21  Gerd Moellmann  <gerd@gnu.org>
 
-       * faces.el (all-faces): Removed.
+       * faces.el (all-faces): Remove.
 
        * custom.el (defface): Add new face attributes to function
        comment.
 
        * cus-face.el (custom-face-attributes): Use new face attributes.
 
-       * faces.el (set-face-attribute-from-resource): Initialize
-       from resources only for X and W32.
+       * faces.el (set-face-attribute-from-resource):
+       Initialize from resources only for X and W32.
 
        * cus-face.el (custom-declare-face): Don't make frame-local
        faces.
        * faces.el (eval-when-compile): Add set-face-shadow-thickness.
        (internal-facep): Increase vector size.
        (make-face): Ditto.
-       (face-shadow-thickness): Added.
-       (set-face-shadow-thickness): Added.
+       (face-shadow-thickness): Add.
+       (set-face-shadow-thickness): Add.
        (modify-face): Add optional shadow-thickness parameter.
        (make-face-x-resource-internal): Add shadows.
        (copy-face): Ditto.
        * fill.el (canonically-space-region, justify-current-line): Add *
        to interactive spec.
        (fill-region-as-paragraph, fill-paragraph, fill-region)
-       (fill-nonuniform-paragraphs, fill-individual-paragraphs): Check
-       readonly buffer in interactive spec.
+       (fill-nonuniform-paragraphs, fill-individual-paragraphs):
+       Check readonly buffer in interactive spec.
 
        * paragraphs.el (kill-paragraph, backward-kill-paragraph)
        (backward-kill-sentence, kill-sentence): Add * to interactive spec.
 
 1999-07-19  John Wiegley  <jwiegley@borland.com>
 
-       * term.el (ansi-term-fg-faces-vector): Added support for ANSI
+       * term.el (ansi-term-fg-faces-vector): Add support for ANSI
        color codes 39 and 49, which by the way lynx uses them seem to
        mean "foreground reset" and "background reset".
 
 
 1999-07-08  Espen Skoglund  <espensk@stud.cs.uit.no>
 
-       * pascal.el (pascal-calculate-indent): Fixed a bug occurring when
+       * pascal.el (pascal-calculate-indent): Fix a bug occurring when
        the `end' keyword was in the very beginning of the buffer.
 
 1999-07-08  Richard Stallman  <rms@gnu.org>
 
        * isearch.el (isearch-process-search-char): Write octal 200 correctly.
 
-       * startup.el (normal-top-level-add-subdirs-to-load-path): Avoid
-       doing a `stat' when it isn't necessary because that can cause
+       * startup.el (normal-top-level-add-subdirs-to-load-path):
+       Avoid doing a `stat' when it isn't necessary because that can cause
        trouble when an NFS server is down.
 
 1999-07-04  Richard Stallman  <rms@gnu.org>
 
 1999-06-18  Andrew Innes  <andrewi@gnu.org>
 
-       * mail/smtpmail.el (smtpmail-send-it): Use
-       convert-standard-filename to make file names for queued mail safe
+       * mail/smtpmail.el (smtpmail-send-it):
+       Use convert-standard-filename to make file names for queued mail safe
        on Windows (`:' is invalid in file names on Windows).
 
 1999-06-17  Kenichi Handa  <handa@etl.go.jp>
 
 1999-06-15  Markus Rost  <markus.rost@mathematik.uni-regensburg.de>
 
-       * mail/rmailsum.el (rmail-summary-output-to-rmail-file): Avoid
-       multiple output of the last message.
+       * mail/rmailsum.el (rmail-summary-output-to-rmail-file):
+       Avoid multiple output of the last message.
 
 1999-06-14  Eli Zaretskii  <eliz@gnu.org>
 
 
 1999-06-09  Dave Love  <fx@gnu.org>
 
-       * progmodes/compile.el (compilation-error-regexp-alist): Allow
-       digits in program name in first pattern.
+       * progmodes/compile.el (compilation-error-regexp-alist):
+       Allow digits in program name in first pattern.
 
 1999-06-09  Andre Spiegel  <spiegel@inf.fu-berlin.de>
 
 
 1999-06-05  Stephen Eglen  <stephen@gnu.org>
 
-       * iswitchb.el (iswitchb-default-keybindings): Add
-       iswitchb-minibuffer-setup to minibuffer-setup-hook here rather
+       * iswitchb.el (iswitchb-default-keybindings):
+       Add iswitchb-minibuffer-setup to minibuffer-setup-hook here rather
        than when package is loaded.
 
 1999-06-04  Richard M. Stallman  <rms@gnu.org>
 
 1999-06-04  Eric M. Ludlam  <zappo@ultranet.com>
 
-       * speedbar.el (speedbar-hack-buffer-menu): Fixed so if the user
+       * speedbar.el (speedbar-hack-buffer-menu): Fix so if the user
        does not select a buffer from the buffers menu, then the attached
        frame is not switched to anything.
 
 
 1999-05-25  Ken'ichi Handa  <handa@gnu.org>
 
-       * mail/smtpmail.el (smtpmail-send-it): Bind
-       smtpmail-code-conv-from properly.
+       * mail/smtpmail.el (smtpmail-send-it):
+       Bind smtpmail-code-conv-from properly.
        (smtpmail-send-data-1): If DATA is a multibyte string, encode it
        by smtpmail-code-conv-from.
 
 
 1995-05-11  Joel N. Weber II  <devnull@melange.gnu.org>
 
-       * comint.el (comint-password-prompt-regexp): Modified to match the
+       * comint.el (comint-password-prompt-regexp): Modify to match the
        output of ksu and ssh-add.
 
 1999-05-11  Kenichi HANDA  <handa@etl.go.jp>
 
        * language/korea-util.el (isearch-toggle-korean-input-method):
-       Adjusted for the change of input method handling in isearch.el.
+       Adjust for the change of input method handling in isearch.el.
        (isearch-hangul-switch-symbol-ksc): Likewise.
        (isearch-hangul-switch-hanja): Likewise.
 
 
 1999-05-09  Ken'ichi Handa  <handa@gnu.org>
 
-       * ps-print.el (ps-control-character): Call
-       ps-mule-prepare-ascii-font to setup ASCII fonts.
+       * ps-print.el (ps-control-character):
+       Call ps-mule-prepare-ascii-font to setup ASCII fonts.
 
        * ps-mule.el (ps-mule-begin-job): Redo this change "if
        ps-multibyte-buffer is nil, use
        * ispell.el (ispell-local-dictionary-alist): New variable for
        customizing local dictionaries not accessible by everyone.
        (ispell-dictionary-alist): Loads `ispell-local-dictionary-alist'.
-       (ispell-required-version): Changed format `(major minor
+       (ispell-required-version): Change format `(major minor
        revision)' to support general pattern matching.
        (ispell-tex-skip-alists): AMS Tex block comment and `\author'
        skip region commented out due to incorrect skip potential in std latex.
-       (ispell-word): Removed `when' macro.  Fixed bug of not restoring
+       (ispell-word): Remove `when' macro.  Fixed bug of not restoring
        cursor point on small words for calls from `ispell-minor-mode'.
        (check-ispell-version): Tests and accepts versions major.minor
        and above, with adjustments for interactions in 3.1.0-3.1.11.
        (ispell-get-line): No longer skips ispell process special characters.
-       (ispell-comments-and-strings): Removed `when' macro call.
+       (ispell-comments-and-strings): Remove `when' macro call.
        (ispell-minor-check): Requires ispell-word to restore cursor point.
        (ispell-buffer-local-parsing): Supports checking comments only.
 
 
 1999-05-07  Joel N. Weber II  <devnull@melange.gnu.org>
 
-       * comint.el (comint-password-prompt-regexp): Modified so that it
+       * comint.el (comint-password-prompt-regexp): Modify so that it
        matches the output of kinit.
 
 1999-05-06  Greg Stark  <gsstark@mit.edu>
 
 1999-04-26  John Wiegley  <johnw@borland.com>
 
-       * progmodes/compile.el (compilation-error-regexp-alist): Recognize
-       C++Builder 4.0 error message syntax.
+       * progmodes/compile.el (compilation-error-regexp-alist):
+       Recognize C++Builder 4.0 error message syntax.
 
 1999-04-26  Mark Diekhans  <markd@Grizzly.COM>
 
 
 1999-04-26  Yoshiki Hayashi  <g740685@komaba.ecc.u-tokyo.ac.jp>
 
-       * textmodes/texinfmt.el (texinfo-format-buffer): Bind
-       coding-system-for-write, to avoid hanging when non-interactive.
+       * textmodes/texinfmt.el (texinfo-format-buffer):
+       Bind coding-system-for-write, to avoid hanging when non-interactive.
 
 1999-04-26  Dirk Herrmann  <D.Herrmann@tu-bs.de>
 
 
 1999-03-25  Andrew Innes  <andrewi@gnu.org>
 
-       * w32-fns.el (set-default-process-coding-system): Copied from
+       * w32-fns.el (set-default-process-coding-system): Copy from
        dos-w32.el, but modified to use Unix line endings for process
        input, and to add a suitable entry to process-coding-system-alist
        for DOS shells.
 
-       * dos-fns.el (set-default-process-coding-system): Copied from
+       * dos-fns.el (set-default-process-coding-system): Copy from
        dos-w32.el.
 
        * dos-w32.el (set-default-process-coding-system): Move function to
 
 1999-03-18  Simon Marshall  <simon@gnu.org>
 
-       * font-lock.el (c-font-lock-keywords-2): Added "complex" type.
-       (java-font-lock-keywords-2): Added "strictfp" keyword.
+       * font-lock.el (c-font-lock-keywords-2): Add "complex" type.
+       (java-font-lock-keywords-2): Add "strictfp" keyword.
 
 1999-03-17  Jason Rumney  <jasonr@altavista.net>
 
 
 1999-03-17  Eli Zaretskii  <eliz@gnu.org>
 
-       * international/mule-cmds.el (set-language-environment): Fix
-       previous change: don't use dos-codepage when unbound.
+       * international/mule-cmds.el (set-language-environment):
+       Fix previous change: don't use dos-codepage when unbound.
 
 1999-03-17  Karl Heuer  <kwzh@gnu.org>
 
 
 1999-03-15  Simon Marshall  <simon@gnu.org>
 
-       * font-lock.el (c-font-lock-keywords-2): Added "restrict" keyword.
+       * font-lock.el (c-font-lock-keywords-2): Add "restrict" keyword.
 
 1999-03-14  Milan Zamazal  <pdm@pvt.net>
 
        * speedbar.el: Added commentary about stealthy functions.
        (speedbar-message): New function.
        (speedbar-y-or-n-p): New function.
-       (speedbar-with-attached-buffer): Moved macro before reference.
+       (speedbar-with-attached-buffer): Move macro before reference.
        Now uses `save-selected-window'.
        (speedbar-mouse-hscroll, speedbar-track-mouse, speedbar-refresh)
        (speedbar-generic-item-info, speedbar-item-info-file-helper)
 
 1999-03-09  Dave Love  <fx@gnu.org>
 
-       * textmodes/sgml-mode.el (html-mode): Use
-       sentence-end-double-space when setting sentence-end.
+       * textmodes/sgml-mode.el (html-mode):
+       Use sentence-end-double-space when setting sentence-end.
 
 1999-03-09  Ken'ichi Handa  <handa@gnu.org>
 
 
 1999-03-06  Dave Love  <fx@gnu.org>
 
-       * progmodes/cc-cmds.el (c-outline-level): Bind
-       buffer-invisibility-spec.
+       * progmodes/cc-cmds.el (c-outline-level):
+       Bind buffer-invisibility-spec.
 
        * progmodes/c-mode.el (c-outline-level): Likewise.
 
 1999-03-03  Dave Love  <fx@gnu.org>
 
        * options.el (edit-options): Doc fix.
-       (list-options): Don't lose with unbound symbols.  Maintain
-       Edit-options-mode.
+       (list-options): Don't lose with unbound symbols.
+       Maintain Edit-options-mode.
 
 1999-03-01  Dave Love  <fx@gnu.org>
 
        (ispell-dictionary-alist): Don't setq it,
        if ispell-dictionary-alist-override is set.
 
-       * simple.el (shell-command-default-error-buffer): Renamed from
+       * simple.el (shell-command-default-error-buffer): Rename from
        shell-command-on-region-default-error-buffer.
        (shell-command-on-region): Mention in echo area when there
        is some error output.  Mention success or failure, too.
        (ps-font-size, ps-header-font-size, ps-header-title-font-size):
        Specifies landscape and portrait sizes.
        (ps-setup, ps-print-quote, ps-line-lengths-internal, ps-nb-pages)
-       (ps-get-page-dimensions, ps-begin-file, ps-begin-job, ps-generate): Fun
-       fix.
+       (ps-get-page-dimensions, ps-begin-file, ps-begin-job, ps-generate):
+       Fun fix.
        (ps-get-font-size): New fun.
        (ps-font-size-internal, ps-header-font-size-internal)
        (ps-header-title-font-size-internal): New vars.
 
 1999-02-23  Ken'ichi Handa  <handa@gnu.org>
 
-       * international/encoded-kb.el (encoded-kbd-handle-8bit): Allow
-       inputting ?\240.
+       * international/encoded-kb.el (encoded-kbd-handle-8bit):
+       Allow inputting ?\240.
 
 1999-02-23  Karl Heuer  <kwzh@gnu.org>
 
 
 1999-02-22  Eli Zaretskii  <eliz@gnu.org>
 
-       * arc-mode.el (archive-set-buffer-as-visiting-file): Save
-       excursion while calling set-auto-coding-function.
+       * arc-mode.el (archive-set-buffer-as-visiting-file):
+       Save excursion while calling set-auto-coding-function.
 
        * play/handwrite.el (handwrite): Require ps-print, and use
        ps-printer-name and ps-lpr-command.  Call ps-print-region-function
 
 1999-02-22  Kenichi Handa  <handa@etl.go.jp>
 
-       * international/codepage.el (cp-coding-system-for-codepage-1): Put
-       charset-origin-alist property to a coding system for the codepage.
+       * international/codepage.el (cp-coding-system-for-codepage-1):
+       Put charset-origin-alist property to a coding system for the codepage.
 
        * international/mule.el: Modify comment for charset-origin-alist
        property of a coding system.
 
 1999-02-21  Peter Breton  <pbreton@ne.mediaone.net>
 
-       * dirtrack.el (dirtrack): Added docstring.  Now returns input.
+       * dirtrack.el (dirtrack): Add docstring.  Now returns input.
 
 1999-02-18  Peter Breton  <pbreton@ne.mediaone.net>
 
        (sql-stop): Use sql-input-ring-separator and sql-input-ring-file-name.
        (sql-input-ring-file-name): New variable with customization.
        (sql-input-ring-separator): New variable with customization.
-       (sql-set-sqli-buffer): Renamed from sql-change-sqli-buffer.
+       (sql-set-sqli-buffer): Rename from sql-change-sqli-buffer.
        Callers changed.
        (sql-show-sqli-buffer): The message for "sql-buffer is not set"
        now includes the name of the current buffer.
 
 1999-02-18  Ken'ichi Handa  <handa@gnu.org>
 
-       * international/mule.el (coding-system-list): Moved here from
+       * international/mule.el (coding-system-list): Move here from
        mule-util.el to avoid autoloading mule-util by the call of
        select-safe-coding-system.
 
 
 1999-02-17  Peter Breton  <pbreton@ne.mediaone.net>
 
-       * filecache.el (file-cache-filter-regexps): Added .class.
+       * filecache.el (file-cache-filter-regexps): Add .class.
 
 1999-02-17  Ken'ichi Handa  <handa@gnu.org>
 
-       * international/mule-util.el (decompose-region): Use
-       insert-buffer-substring instead of insert-buffer to avoid putting
+       * international/mule-util.el (decompose-region):
+       Use insert-buffer-substring instead of insert-buffer to avoid putting
        mark.
 
 1999-02-17  Andreas Schwab  <schwab@gnu.org>
 
 1999-02-16  Ken'ichi Handa  <handa@gnu.org>
 
-       * language/japanese.el (japanese-shift-jis): Add
-       charset-origin-alist property.
+       * language/japanese.el (japanese-shift-jis):
+       Add charset-origin-alist property.
 
 1999-02-15  Richard Stallman  <rms@gnu.org>
 
 1999-02-14  Richard Stallman  <rms@gnu.org>
 
        * international/iso-transl.el:
-       (iso-transl-ae): Renamed from iso-transl-e-slash.
-       (iso-transl-a-ring): Renamed from iso-transl-a-slash.
-       (iso-transl-AE): Renamed from iso-transl-E-slash.
-       (iso-transl-A-ring): Renamed from iso-transl-A-slash.
+       (iso-transl-ae): Rename from iso-transl-e-slash.
+       (iso-transl-a-ring): Rename from iso-transl-a-slash.
+       (iso-transl-AE): Rename from iso-transl-E-slash.
+       (iso-transl-A-ring): Rename from iso-transl-A-slash.
        (iso-transl-char-map): Related changes.
 
        * format.el (format-replace-strings): Fix value of TO in REVERSE case.
 1999-02-12  Alex Schroeder  <a.schroeder@bsiag.ch>
 
        * sql.el: Set version to 1.3.2.
-       (sql-solid-program): Added support for solid.
+       (sql-solid-program): Add support for solid.
        (sql-help): Doc mentions sql-solid.
        (sql-solid): Entry function for Solid.
        (sql-buffer): Doc explains the use of the variable and how to
        (sql-change-sqli-buffer): New function to change sql-buffer.
        (sql-mode): Doc explains how to change sql-buffer.
        (sql-send-paragraph): New function to send a paragraph.
-       (sql-mode-map): Added keybinding for sql-send-paragraph.
+       (sql-mode-map): Add keybinding for sql-send-paragraph.
        (sql-mysql): Doc corrected.
        (sql-ms): Doc corrected.
 
        * sql.el (sql-server): Doc fix.
-       (sql-mysql): Added the use of sql-server to specify the host,
+       (sql-mysql): Add the use of sql-server to specify the host,
        sql-database now specifies database instead of host.
        (sql-mode-menu): Send... menu items are only active if sql-buffer
        is non-nil.
-       (sql-help): Changed tag of entry functions a bit.
+       (sql-help): Change tag of entry functions a bit.
 
        * sql.el: Added keywords from `finder-by-keyword'.
        (sql-mode): Made sql-buffer a local variable, changed the
        sql-user and sql-password used during login.
        (sql-sybase): Quoted *SQL* in doc string, added comma.
        (sql-oracle): Likewise.
-       (sql-interactive-mode): Added extensive documentation for having
+       (sql-interactive-mode): Add extensive documentation for having
        multiple SQL buffers sending their stuff to different SQLi
        buffers, each running a different process.
-       (sql-buffer): Changed doc from *SQL* to SQLi.
+       (sql-buffer): Change doc from *SQL* to SQLi.
        (sql-get-login): Doc fix.
 
 1999-02-12  Ken'ichi Handa  <handa@gnu.org>
 
 1999-02-12  Ken'ichi Handa  <handa@gnu.org>
 
-       * international/quail.el (quail-show-kbd-layout): Bind
-       blink-matching-paren to nil.
+       * international/quail.el (quail-show-kbd-layout):
+       Bind blink-matching-paren to nil.
 
        * ps-mule.el (ps-mule-font-info-database-bdf): Fix ENCODING field
        for ASCII and Latin-1.
 
 1999-02-12  Kenichi Handa  <handa@etl.go.jp>
 
-       * international/mule-cmds.el (language-info-alist): Remove
-       description about charset-origin-alist.
+       * international/mule-cmds.el (language-info-alist):
+       Remove description about charset-origin-alist.
 
        * international/mule.el: Comment added for a new coding system
        property `charset-origin-alist'.
        ("Cyrillic-KOI8"): Remove charset-origin-alist property.
        ("Cyrillic-ALT"): Likewise.
 
-       * language/vietnamese.el (vietnamese-viqr): Add
-       charset-origin-alist property.
+       * language/vietnamese.el (vietnamese-viqr):
+       Add charset-origin-alist property.
        ("Vietnamese"): Remove charset-origin-alist property.
 
        * simple.el (what-cursor-position): Don't use the variable
 
 1999-02-08  Eli Zaretskii  <eliz@gnu.org>
 
-       * international/codepage.el (cp-coding-system-for-codepage-1): On
-       MS-DOS, use dos-unsupported-char-glyph for characters not
+       * international/codepage.el (cp-coding-system-for-codepage-1):
+       On MS-DOS, use dos-unsupported-char-glyph for characters not
        supported by the codepage.
        (cp-make-coding-systems-for-codepage): Likewise.
 
        * international/mule-util.el (coding-system-list): Don't sort
        coding-system-list here.
 
-       * international/mule.el (coding-system-lessp): Moved here from
+       * international/mule.el (coding-system-lessp): Move here from
        mule-util.el.
        (add-to-coding-system-list): New function.
        (make-subsidiary-coding-system, make-coding-system)
 1999-02-05  Alex Schroeder  <asc@bsiag.com>
 
        * progmodes/sql.el: Changed version to 1.2.1.
-       (sql-pop-to-buffer-after-send-region): Improved documentation.
-       (sql-mysql-program): Added MySQL support.
+       (sql-pop-to-buffer-after-send-region): Improve documentation.
+       (sql-mysql-program): Add MySQL support.
        (sql-prompt-length): Made prompt-length configurable.
        (sql-mode-syntax-table): Made apostrophe (') be a string delimiter.
-       (sql-help): Added MySQL support, changed documentation.
+       (sql-help): Add MySQL support, changed documentation.
        (sql-send-region): A message is displayed if something is sent.
-       (sql-mode): Added buffer-local comment-start.
+       (sql-mode): Add buffer-local comment-start.
        (sql-interactive-mode): Use sql-prompt-length to set left-margin.
-       (sql-interactive-mode): Added buffer-local comment-start.
+       (sql-interactive-mode): Add buffer-local comment-start.
        (sql-oracle): Set sql-prompt-length.
        (sql-sybase): Set sql-prompt-length.
-       (sql-mysql): Added MySQL support.
+       (sql-mysql): Add MySQL support.
        (sql-ingres): Set sql-prompt-length.
        (sql-ms): Set sql-prompt-length.
        (sql-postgres): Set sql-prompt-length.
 
 1999-02-01  Ken'ichi Handa  <handa@gnu.org>
 
-       * international/mule-util.el (compose-chars-component): Add
-       autoload cookie.
+       * international/mule-util.el (compose-chars-component):
+       Add autoload cookie.
 
 1999-01-31  Ken'ichi Handa  <handa@gnu.org>
 
 
 1999-01-31  Markus Rost  <markus.rost@mathematik.uni-regensburg.de>
 
-       * progmodes/compile.el (compilation-next-error-locus): Don't
-       decrease argument FIND-AT-LEAST of compilation-next-error-locus.
+       * progmodes/compile.el (compilation-next-error-locus):
+       Don't decrease argument FIND-AT-LEAST of compilation-next-error-locus.
 
 1999-01-31  Eli Zaretskii  <eliz@gnu.org>
 
        * tex-mode.el (tex-mode-map): Replace validate-tex-buffer by
        tex-validate-buffer.
        (plain-tex-mode, latex-mode, slitex-mode): Likewise.
-       (tex-validate-buffer): Renamed from validate-tex-buffer.  Works
-       now with recent occur-mode.
+       (tex-validate-buffer): Rename from validate-tex-buffer.
+       Works now with recent occur-mode.
        (tex-validate-region): Really walk through all Sexps.
        (tex-region): Bind shell-dirtrack-verbose.
        (tex-file, tex-bibtex-file): Likewise.
 
 1999-01-25  Edward M. Reingold  <reingold@emr.cs.uiuc.edu>
 
-       * calendar/diary-lib.el (mark-diary-entries): Use
-       assoc-ignore-case and do not capitalize when matching month and
+       * calendar/diary-lib.el (mark-diary-entries):
+       Use assoc-ignore-case and do not capitalize when matching month and
        day names.
 
        * calendar/calendar.el (calendar-read-date): Ditto.
 
 1999-01-23  Ken'ichi Handa  <handa@gnu.org>
 
-       * international/fontset.el (create-fontset-from-x-resource): Make
-       style variants.
+       * international/fontset.el (create-fontset-from-x-resource):
+       Make style variants.
 
 1999-01-22  Dave Love  <fx@gnu.org>
 
 
 1999-01-22  Jason Rumney  <jasonr@altavista.net>
 
-       * term/w32-win.el (w32-standard-fontset-spec): Simplified.
+       * term/w32-win.el (w32-standard-fontset-spec): Simplify.
 
 1999-01-22  Felix Lee  <flee@cygnus.com>
 
 
 1999-01-19  Jason Rumney  <jasonr@altavista.net>
 
-       * term/w32-win.el (w32-standard-fontspec-spec): Change
-       iso8859-5 to koi8-r.  Add iso8859-9.
+       * term/w32-win.el (w32-standard-fontspec-spec):
+       Change iso8859-5 to koi8-r.  Add iso8859-9.
 
 1999-01-19  Dave Love  <fx@gnu.org>
 
        * textmodes/tex-mode.el (tex-define-common-keys):
        Remove key binding of tex-feed-input.
        (tex-mode-map): Bind tex-feed-input here.
-       (tex-start-shell): Use compilation-shell-minor-mode.  Set
-       comint-input-filter-functions before running tex-shell-hook.
+       (tex-start-shell): Use compilation-shell-minor-mode.
+       Set comint-input-filter-functions before running tex-shell-hook.
        (tex-start-tex): Forget compilation errors.
        (tex-compilation-parse-errors): Rewritten to work also with
        compile-mouse-goto-error and compile-goto-error.  Adjusted to
 
 1999-01-18  Ken'ichi Handa  <handa@gnu.org>
 
-       * international/ccl.el (ccl-compile-translate-character): Handle
-       the case that a translation table is CCL register correctly.
+       * international/ccl.el (ccl-compile-translate-character):
+       Handle the case that a translation table is CCL register correctly.
 
        * international/mule-cmds.el (select-safe-coding-system):
        Highlight at most 256 characters.
 
 1999-01-17  Andrew Innes  <andrewi@gnu.org>
 
-       * dos-w32.el (find-buffer-file-type-coding-system): Use
-       default-buffer-file-coding-system when file doesn't exist (and
+       * dos-w32.el (find-buffer-file-type-coding-system):
+       Use default-buffer-file-coding-system when file doesn't exist (and
        isn't covered by a special case) instead of forcing undecided-dos
        against the user's wishes.
 
        * lpr.el (printer-name): Update docstring about usage on MS-DOS
        and MS-Windows.
        (lpr-command) [ms-dos, windows-nt]: Initialize to empty string on
-       DOS and Windows platforms, to indicate direct printing.  Update
-       the docstring accordingly.
+       DOS and Windows platforms, to indicate direct printing.
+       Update the docstring accordingly.
 
        * ps-print.el (ps-printer-name): Update docstring about usage on
        MS-DOS and MS-Windows.
 
 1999-01-16  Dave Love  <fx@gnu.org>
 
-       * help.el (temp-buffer-setup-hook, temp-buffer-show-hook): Revert
-       last change.
+       * help.el (temp-buffer-setup-hook, temp-buffer-show-hook):
+       Revert last change.
 
 1999-01-15  Dave Love  <fx@gnu.org>
 
 1999-01-13  Eli Zaretskii  <eliz@gnu.org>
 
        * international/codepage.el (cp850-decode-table): Replace nil
-       entries with codes of similary looking glyphs.  (Suggested by
-       Jason Rumney <jasonr@altavista.net>.)
+       entries with codes of similary looking glyphs.  (
+       Suggested by Jason Rumney <jasonr@altavista.net>.)
 
 1999-01-13  Dave Love  <fx@gnu.org>
 
 
        * cus-start.el: Add inhibit-eol-conversion.
 
-       * help.el (temp-buffer-setup-hook, temp-buffer-show-hook): Swap
-       the values round.
+       * help.el (temp-buffer-setup-hook, temp-buffer-show-hook):
+       Swap the values round.
 
 1999-01-11  Richard Stallman  <rms@psilocin.ai.mit.edu>
 
-       * help.el (help-mode-finish): Renamed from help-mode-maybe.
+       * help.el (help-mode-finish): Rename from help-mode-maybe.
        Don't switch to Help mode here.
        (temp-buffer-setup-hook): Use help-mode-finish.
        (help-mode-setup): New function.
 
 1999-01-06  Eli Zaretskii  <eliz@gnu.org>
 
-       * international/codepage.el (cp-coding-system-for-codepage-1): Add
-       the valid-codes property.
+       * international/codepage.el (cp-coding-system-for-codepage-1):
+       Add the valid-codes property.
 
-       * international/mule-cmds.el (prefer-coding-system): Call
-       set-coding-priority, so that the internal array of priorities is
+       * international/mule-cmds.el (prefer-coding-system):
+       Call set-coding-priority, so that the internal array of priorities is
        also updated.
 
        * international/mule-util.el
        * emacs-lisp/debug.el (debug): Leave recursive minibuffer enabled
        if it was enabled before.
 
-       * view.el (View-revert-buffer-scroll-page-forward): Bind
-       view-scroll-auto-exit instead of obsolete view-mode-auto-exit.
+       * view.el (View-revert-buffer-scroll-page-forward):
+       Bind view-scroll-auto-exit instead of obsolete view-mode-auto-exit.
 
        * files.el (recover-session): Preserve point when inserting
        explanation.
        (cperl-syntaxify-by-font-lock): Set to t, should be safe now.
        Better default, customizes to `message' too, off in text-mode.
 
-       (cperl-array-face): Renamed from `font-lock-emphasized-face',
+       (cperl-array-face): Rename from `font-lock-emphasized-face',
        `defface'd.
-       (cperl-hash-face): Renamed from `font-lock-other-emphasized-face'.
+       (cperl-hash-face): Rename from `font-lock-other-emphasized-face'.
        `defface'd.
        (cperl-emacs-can-parse): New state variable.
        (cperl-indent-line): Corrected to use global state.
        inside of POD too.
        (cperl-backward-to-noncomment): Better treatment of PODs and HEREs.
        (cperl-clobber-mode-lists): New configuration variable.
-       (cperl-not-bad-style-regexp): Updated.
+       (cperl-not-bad-style-regexp): Update.
        Init: `cperl-is-face' was busted.
        (cperl-make-face): New macros.
        (cperl-force-face): New macros.
        (cperl-tags-hier-init): Gross hack to pretend we work (are we?).
        Another try to work around XEmacs problems.  Better progress messages.
        (toplevel): Require custom unprotected => failure on 19.28.
-       (cperl-xemacs-p): Defined when compile too.
+       (cperl-xemacs-p): Define when compile too.
        (cperl-find-tags): Was writing line/pos in a wrong order,
        pos off by 1 and not at beg-of-line.
        (cperl-etags-snarf-tag): New macro.
        (speedbar-this-file-in-vc) Fix SCCS to use s. not p. files.
        (speedbar-tag-group-name-minimum-length): New variable.
        (speedbar-frame-parameter): New compatibility function.
-       (speedbar-frame-mode): Updated to use speedbar-frame-parameter.
-       (speedbar-apply-one-tag-hierarchy-method): Fixed up taging sub
+       (speedbar-frame-mode): Update to use speedbar-frame-parameter.
+       (speedbar-apply-one-tag-hierarchy-method): Fix up taging sub
        groups to keep things in the right order, and to help with some
        naming conventions.
        (speedbar-create-tag-hierarchy): Enable buffer local version of
        (ps-mule-plot-string): Set ps-mule-current-charset.
        (ps-mule-initialize): Add autoload cookie.  Don't set
        ps-mule-font-info-database here.
-       (ps-mule-begin-job): Renamed from ps-mule-begin.  Update
-       ps-mule-font-info-database and ps-control-or-escape-regexp.
+       (ps-mule-begin-job): Rename from ps-mule-begin.
+       Update ps-mule-font-info-database and ps-control-or-escape-regexp.
        (ps-mule-begin-page): New fun.
 
        * ps-print.el: Mule related code moved to ps-mule.el.
 
        * ps-print.el (ps-mule-font-info-database): Doc-string modified.
        (ps-mule-external-libraries): New element FEATURE.
-       (ps-mule-init-external-library): Adjusted for the above change.
+       (ps-mule-init-external-library): Adjust for the above change.
        (ps-mule-generate-font): Likewise.
        (ps-mule-generate-glyphs): Likewise.
        (ps-mule-prepare-font): Likewise.
        Handle the case of unknown charset.
        (find-multibyte-characters): If invalid multibyte characters are
        found, return the corresponding strings instead of character codes.
-       (find-multibyte-characters): Adjusted for the above change.
+       (find-multibyte-characters): Adjust for the above change.
        (select-safe-coding-system): For a unibyte buffer, always returns
        DEFAULT-CODING-SYSTEM.
        (get-charset-property): Fix previous change.  Make it a function.
 
 1998-12-14  Andreas Schwab  <schwab@delysid.gnu.org>
 
-       * textmodes/texinfo.el (texinfo-tex-buffer): Bind
-       tex-start-options-string to empty string.
+       * textmodes/texinfo.el (texinfo-tex-buffer):
+       Bind tex-start-options-string to empty string.
        (texinfo-tex-region): Use texinfo-tex-trailer as documented.
 
 1998-12-14  Andrew Innes  <andrewi@delysid.gnu.org>
 
        * help.el (symbol-file-load-history-loaded): Variable renamed,
        and defvar moved from loadhist.el.
-       (symbol-file): Renamed from describe-function-find-file.
+       (symbol-file): Rename from describe-function-find-file.
        Load fns-VERSION.el here.
        (describe-variable, describe-function-1): Use symbol-file.
 
 
        * vc.el (vc-dired-window-configuration, vc-ediff-windows)
        (vc-ediff-result, vc-dired-switches, vc-dired-terse-mode):
-       Added defvars to suppress compilation warnings.
+       Add defvars to suppress compilation warnings.
 
 1998-11-30  Ken Stevens  <k.stevens@ieee.org>
 
        ispell-message-text-end, ispell-add-per-file-word-list.
        (ispell-dictionary-alist-1, ispell-dictionary-alist2): A coding
        system is now required for all languages.  Casechars improved for
-       castellano, castellano8, and norsk dictionaries.  Dictionary
-       norsk7-tex added.  Dictionary polish added.
+       castellano, castellano8, and norsk dictionaries.
+       Dictionary norsk7-tex added.  Dictionary polish added.
        (ispell-dictionary-alist): Redefined at load-time to support
        dictionary changes.
        (ispell-menu-map): Redefined at load-time to support menu changes.
        (ispell-check-version): New alias for `check-ispell-version'.
-       (ispell-parse-output): Fixed matching for ispell error messages.
+       (ispell-parse-output): Fix matching for ispell error messages.
        Correctly returns spelling suggestions in order generated by ispell
        process.
        (check-ispell-version): Ensure `case-fold-search' doesn't get
        (ispell-kill-ispell): Ensures ispell process has terminated before
        starting new process.  This can otherwise confuse process filters
        and hang the ispell process.
-       (ispell-begin-skip-region-regexp, ispell-skip-region): Improved
-       skipping support for sgml.
+       (ispell-begin-skip-region-regexp, ispell-skip-region):
+       Improve skipping support for sgml.
        (ispell-minor-check): Support sgml labels.  Fix mapping ^M to \r
        which could cause `ispell-complete-word' to hang.
-       (ispell-message): Improved message reference matching.  Ensure
-       `case-fold-search' doesn't get redefined.
+       (ispell-message): Improve message reference matching.
+       Ensure `case-fold-search' doesn't get redefined.
        (ispell-buffer-local-parsing): Ensure `case-fold-search' doesn't
        get redefined.  Fixed bug in returning to nroff mode from tex mode.
        (ispell-add-per-file-word-list): Ensure `case-fold-search' doesn't
 
 1998-11-22  Andrew Innes  <andrewi@delysid.gnu.org>
 
-       * mail/rmail.el (rmail-set-message-counters-counter): Detect
-       messages that have been added with DOS line endings and convert
+       * mail/rmail.el (rmail-set-message-counters-counter):
+       Detect messages that have been added with DOS line endings and convert
        the line endings for such messages.
 
 1998-11-22  Emilio Lopes  <Emilio.Lopes@Physik.TU-Muenchen.DE>
 
 1998-11-21  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * message.el (message-ignored-supersedes-headers): Remove
-       NNTP-Posting-Date.
+       * message.el (message-ignored-supersedes-headers):
+       Remove NNTP-Posting-Date.
 
 1998-11-21  Richard Stallman  <rms@psilocin.ai.mit.edu>
 
        (tar-extract): Avoid multibyte<->unibyte conversion in
        insert-buffer-substring by setting both buffers unibyte
        temporarily.
-       (tar-copy): Set the buffer unibyte while doing a work.  Write
-       without code conversion.
+       (tar-copy): Set the buffer unibyte while doing a work.
+       Write without code conversion.
        (tar-expunge): Set the buffer unibyte while doing a work.
        (tar-alter-one-field): Likewise.
        (tar-clear-modification-flags): Compare byte position with
 1998-11-15  Dave Love  <fx@gnu.org>
 
        * progmodes/fortran.el: Fix previous change:
-       (fortran-end-prog-re1): Changed.
+       (fortran-end-prog-re1): Change.
        (fortran-check-end-prog-re): New function.
        (beginning-of-fortran-subprogram, end-of-fortran-subprogram): Use it.
 
        New options.
        (reftex-use-text-after-label-as-context): Option removed.
        (reftex-extract-bib-entries): Protect use in non-latex buffers.
-       (reftex-toc-visit-location): Renamed from `reftex-toc-visit-line'.
+       (reftex-toc-visit-location): Rename from `reftex-toc-visit-line'.
        (reftex-latin1-to-ascii): Works now with and without Mule.
-       (reftex-truncate): Removed special stuff for Emacs 20.2.
+       (reftex-truncate): Remove special stuff for Emacs 20.2.
        (reftex-get-offset): Made more general.
-       (reftex-show-label-location): Renamed from
+       (reftex-show-label-location): Rename from
        `reftex-select-label-callback'.
        (reftex-pop-to-label): Function removed (using
        `reftex-show-label-location' instead.
-       (reftex-insert-docstruct): Renamed from
+       (reftex-insert-docstruct): Rename from
        `reftex-make-and-insert-label-list'.  Function args changed.
        (reftex-toc): Now uses `reftex-insert-docstruct' and
        `reftex-find-start-point'.
 
 1998-11-11  Per Starbäck  <starback@update.uu.se>
 
-       * ispell.el (ispell-dictionary-alist-2): Removed svenska, renamed
+       * ispell.el (ispell-dictionary-alist-2): Remove svenska, renamed
        svenska8 to svenska, and fixed and extended CASECHARS for it.
 
 1998-11-11  Andrew Innes  <andrewi@delysid.gnu.org>
 
 1998-11-11  Kenichi Handa  <handa@etl.go.jp>
 
-       * international/mule-util.el (compose-chars-component): Signal
-       error if CH is a rule-based composition character.
+       * international/mule-util.el (compose-chars-component):
+       Signal error if CH is a rule-based composition character.
        (compose-chars): Signal error if an already composed character is
        going to be composed by rule-base.
 
 
 1998-11-04  Kenichi Handa  <handa@etl.go.jp>
 
-       * international/quail.el (quail-show-guidance-buf): Call
-       set-minibuffer-window to set minibuffer window of the current
+       * international/quail.el (quail-show-guidance-buf):
+       Call set-minibuffer-window to set minibuffer window of the current
        frame correctly.
 
 1998-11-03  Theodore Jump  <tjump@tertius.com>
 
 1998-10-30  Kenichi Handa  <handa@etl.go.jp>
 
-       * international/quail.el (quail-start-translation): Handle
-       switching of the frame in read-key-sequence.
+       * international/quail.el (quail-start-translation):
+       Handle switching of the frame in read-key-sequence.
        (quail-start-conversion): Likewise.
        (quail-show-guidance-buf): Detach quail-guidance-buf from any
        windows before setting an appropriate window for it.
-       (quail-hide-guidance-buf): Use window-minibuffer-p.  Set
-       quail-guidance-win to nil.
+       (quail-hide-guidance-buf): Use window-minibuffer-p.
+       Set quail-guidance-win to nil.
        (quail-update-guidance): If quail-guidance-buf is not in the
        selected frame, call quail-show-guidance-buf again.
 
 
        * emacs-lisp/eldoc.el (eldoc-argument-case): Fix customize type.
 
-       * emacs-lisp/lisp-mnt.el (lm-report-bug): Use
-       report-emacs-bug-address instead of undefined bug-gnu-emacs.
+       * emacs-lisp/lisp-mnt.el (lm-report-bug):
+       Use report-emacs-bug-address instead of undefined bug-gnu-emacs.
 
-       * international/mule-cmds.el (select-message-coding-system): Doc
-       fix.
+       * international/mule-cmds.el (select-message-coding-system):
+       Doc fix.
 
-       * international/mule-diag.el (describe-coding-system): Describe
-       all flags.
+       * international/mule-diag.el (describe-coding-system):
+       Describe all flags.
 
        * mail/sendmail.el (sendmail-coding-system)
        (default-sendmail-coding-system): Doc fix.
        * simple.el (shell-command-on-region): Doc fix.
 
        * loadup.el: Write fns-*.el in current directory instead of
-       data-directory since no installation directory exists yet.  Mark
-       buffer unmodified afterwards.
+       data-directory since no installation directory exists yet.
+       Mark buffer unmodified afterwards.
 
        * loadhist.el (symbol-file): Load fns-*.el from exec-directory
        instead of data-directory since it is architecture dependent.
 
 1998-10-27  Richard Stallman  <rms@psilocin.ai.mit.edu>
 
-       * progmodes/tcl-mode.el (tcl-font-lock-keywords): Added itcl and
+       * progmodes/tcl-mode.el (tcl-font-lock-keywords): Add itcl and
        namespace related keywords such as `class', `body', `private',
        `variable', `namespace eval', etc.
        (tcl-imenu-generic-expression): Handle itcl body and class definitions.
-       (tcl-mode): Added ":" as a word constituent to the syntax-alist of
+       (tcl-mode): Add ":" as a word constituent to the syntax-alist of
        imenu and font-lock so that searches for \sw would find words
        containing colons.
 
        (profile-functions): Simplify.
        (profile-print): Use float.  Make output include space separators.
        (profile-add-time): New helper function.
-       (profile-function-prolog): Renamed from profile-start-function.
+       (profile-function-prolog): Rename from profile-start-function.
        Handle profile-distinct.
-       (profile-function-epilog): Renamed from profile-update-function.
+       (profile-function-epilog): Rename from profile-update-function.
        Handle profile-distinct.
        (profile-a-function): If the function to be profiled is an
        autoload form, load it.  If it's lazy-loaded, fetch it.
 
 1998-10-14  Emilio Lopes  <Emilio.Lopes@Physik.TU-Muenchen.DE>
 
-       * progmodes/fortran.el (fortran-join-line): Use
-       `delete-indentation' instead of issuing an error message if not on
+       * progmodes/fortran.el (fortran-join-line):
+       Use `delete-indentation' instead of issuing an error message if not on
        a continuation line.  Provide for joining several lines using
        prefix arg.
 
 1998-10-13  Geoff Voelker  <voelker@cs.washington.edu>
 
        * ls-lisp.el (ls-lisp-use-insert-directory-program): New variable.
-       (ls-lisp-insert-directory): Renamed from insert-directory.
+       (ls-lisp-insert-directory): Rename from insert-directory.
        (insert-directory): New function.
 
 1998-10-13  Richard Stallman  <rms@psilocin.ai.mit.edu>
 
 1998-10-06  Peter Breton  <pbreton@ne.mediaone.net>
 
-       * generic.el (generic-mode-with-type): Added hooks for generic-modes.
+       * generic.el (generic-mode-with-type): Add hooks for generic-modes.
 
        * net-utils.el (ftp, nslookup): Require comint.
        (network-service-connection): Likewise.
        (whois-get-tld): New function.
 
        * dirtrack.el: Mentioned dirtrack-debug-toggle in the docs.
-       (dirtrack-debug-toggle): Added this function.
+       (dirtrack-debug-toggle): Add this function.
 
 1998-10-06  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * arc-mode.el (archive-mode-revert): Arg no-auto-save renamed from
        no-autosave.
        * tar-mode.el (tar-mode-revert): Likewise.
-       * ediff-util.el (ediff-arrange-auto-save-in-merge-jobs): Renamed
-       from ediff-arrange-autosave-in-merge-jobs.  Callers changed.
-       * gnus/message.el (message-auto-save-directory): Renamed from
+       * ediff-util.el (ediff-arrange-auto-save-in-merge-jobs):
+       Rename from ediff-arrange-autosave-in-merge-jobs.  Callers changed.
+       * gnus/message.el (message-auto-save-directory): Rename from
        message-autosave-directory.  All references changed.
 
 1998-10-06  Jonathan I. Kamens  <jik@kamens.brookline.ma.us>
        * replace.el (perform-replace): Position point properly
        before and after the recursive edit of C-r.
 
-       * progmodes/etags.el (tags-reset-tags-tables): Properly
-       find the markers in the old rings that are being discarded.
+       * progmodes/etags.el (tags-reset-tags-tables):
+       Properly find the markers in the old rings that are being discarded.
 
 1998-10-06  Markus Rost  <markus.rost@mathematik.uni-regensburg.de>
 
        * apropos.el (apropos-print): Control invalid characters.
 
        * play/landmark.el (lm-font-lock-face-O, lm-font-lock-face-X):
-       Renamed from lm-font-lock-O-face, lm-font-lock-X-face to avoid
+       Rename from lm-font-lock-O-face, lm-font-lock-X-face to avoid
        confusing customize.
 
 1998-10-06  Eli Zaretskii  <eliz@mescaline.gnu.org>
 
 1998-10-05  Simon Marshall  <simon@gnu.org>
 
-       * menu-bar.el (menu-bar-tools-menu): Added entry for Speedbar.
+       * menu-bar.el (menu-bar-tools-menu): Add entry for Speedbar.
 
 1998-10-04  Eric Ludlam  <zappo@gnu.org>
 
-       * speedbar.el (speedbar-initial-expansion-list-name): Remove
-       customization since it is not useful in this case.
+       * speedbar.el (speedbar-initial-expansion-list-name):
+       Remove customization since it is not useful in this case.
        (speedbar-frame-mode): Check if cfx or cfy is a list, and make
        sure it gets evalled to a number.  Also verify that set-frame-name
        fn exists before calling it.
 
 1998-10-02  Dave Love  <fx@gnu.org>
 
-       * outline.el (hide-region-body): Bind
-       outline-view-change-hook to nil while making repeated calls to
+       * outline.el (hide-region-body):
+       Bind outline-view-change-hook to nil while making repeated calls to
        outline-flag-region.  Run it once at the end.
        (hide-other, hide-sublevels, show-children): Likewise.
 
        * textmodes/texinfo.el (texinfo-show-structure):
        Bind inhibit-read-only.
 
-       * isearch.el (isearch-search-and-update): Properly
-       handle upper case letters in the reverse-search special case.
+       * isearch.el (isearch-search-and-update):
+       Properly handle upper case letters in the reverse-search special case.
 
 1998-09-25  Markus Rost  <markus.rost@mathematik.uni-regensburg.de>
 
        whenever appt-mode-string has changed.
        (appt-add, appt-delete): Add autoload cookies.
        (appt-check): Catch errors from calling `diary'.
-       (appt-max-time): Renamed from max-time.
+       (appt-max-time): Rename from max-time.
        (appt-now-displayed, appt-display-count): New variables.
        (appt-timer): Don't create one if we already have one.
 
        * textmodes/tex-mode.el (tex-compilation-parse-errors):
        More general code to use the source buffer instead of the zap file.
 
-       * hilit-chg.el (highlight-compare-with-file): Renamed from
+       * hilit-chg.el (highlight-compare-with-file): Rename from
        compare-with-file.
 
        * loadhist.el (load-history-loaded): New variable.
        * emacs-lisp/eldoc.el (eldoc-message): Check for 1-arg case, and
        store string in eldoc-last-message without consing a new string.
        Rearrange logic from nested if's into cond's.
-       (eldoc-print-fnsym-args): Renamed to eldoc-get-fnsym-args-string.
+       (eldoc-print-fnsym-args): Rename to eldoc-get-fnsym-args-string.
        Do not print message; just return string.
-       (eldoc-get-var-docstring): Renamed from eldoc-print-var-docstring.
+       (eldoc-get-var-docstring): Rename from eldoc-print-var-docstring.
        Do not print message; just return string.
        Cache that string in eldoc-last-data.
        (eldoc-last-data): Make into a vector.
 
        * progmodes/vhdl-mode.el (vhdl-header-file): Fix customize type.
 
-       * progmodes/cpp.el (cpp-face-light-list, cpp-face-dark-list): Fix
-       customize type.
+       * progmodes/cpp.el (cpp-face-light-list, cpp-face-dark-list):
+       Fix customize type.
 
        * progmodes/cperl-mode.el (cperl-lazy-help-time): Fix customize
        type.
 
-       * progmodes/compile.el (compilation-error-screen-columns): New
-       variable.
+       * progmodes/compile.el (compilation-error-screen-columns):
+       New variable.
        (compilation-next-error-locus): Use it to decide whether to use
        forward-char or move-to-column.
 
 
        * startup.el (site-run-file): Fix customize type.
 
-       * speedbar.el (speedbar-initial-expansion-list-name): Fix
-       customize type.
+       * speedbar.el (speedbar-initial-expansion-list-name):
+       Fix customize type.
 
        * shell.el (shell-input-autoexpand): Fix customize type.
 
 
 1998-09-16  Kenichi Handa  <handa@etl.go.jp>
 
-       * international/mule-cmds.el (reset-language-environment): Call
-       update-coding-systems-internal.
+       * international/mule-cmds.el (reset-language-environment):
+       Call update-coding-systems-internal.
 
        * international/mule-conf.el: Call update-coding-systems-internal
        at the tail.
 
 1998-09-14  Dave Love  <fx@gnu.org>
 
-       * vc-hooks.el (vc-menu-map): Change the vc-directory label.  Don't
-       use the menu-enable properties, pending doing it correctly and
+       * vc-hooks.el (vc-menu-map): Change the vc-directory label.
+       Don't use the menu-enable properties, pending doing it correctly and
        acceptably fast.
 
        * map-ynp.el (map-y-or-n-p): Mention RET, `q' in the help text.
 
 1998-09-13  Dave Love  <d.love@dl.ac.uk>
 
-       * progmodes/hideshow.el (hs-grok-mode-type): Check
-       comment-{start,end} non-nil as well as bound.  Report an error if
+       * progmodes/hideshow.el (hs-grok-mode-type):
+       Check comment-{start,end} non-nil as well as bound.  Report an error if
        we can't grok the mode.
 
 1998-09-13  Richard Stallman  <rms@gnu.org>
        (reftex-label-illegal-re): Default changed, removed Latin1.
        (reftex-latin1-to-ascii): New function.
        (reftex-what-environment): Check for section regexp before use.
-       (reftex-find-tex-file, reftex-find-bib-file): Fixed bug with
+       (reftex-find-tex-file, reftex-find-bib-file): Fix bug with
        absolute path names.
-       (reftex-TeX-master-file): Changed sequence of file checks.
+       (reftex-TeX-master-file): Change sequence of file checks.
        (reftex-do-citation): Bibview cache only with RefTeX mode on.
 
 1998-09-06  Richard Stallman  <rms@gnu.org>
 
 1998-09-04  Peter Breton  <pbreton@ne.mediaone.net>
 
-       * net-utils.el (netstat-program-options): Changed from nil to "-a"
+       * net-utils.el (netstat-program-options): Change from nil to "-a"
        so that by default netstat shows all network connections.
 
 1998-09-04  Bob Weiner  <weiner@altrasoft.com>
 
 1998-09-03  Bill Richter  <richter@brouwer.math.nwu.edu>
 
-       * international/quail.el (quail-choose-completion-string): Store
-       completion `choice' in `quail-current-str'; don't insert it.
+       * international/quail.el (quail-choose-completion-string):
+       Store completion `choice' in `quail-current-str'; don't insert it.
 
 1998-09-02  Kenichi Handa  <handa@etl.go.jp>
 
 
 1998-09-01  Dave Love  <fx@gnu.org>
 
-       * international/mule-cmds.el (current-language-environment): Fix
-       setter function.
+       * international/mule-cmds.el (current-language-environment):
+       Fix setter function.
 
 1998-09-01  Simon Marshall  <simon@gnu.org>
 
        * ange-ftp.el (ange-ftp-allow-child-lookup): Reinstate checking
        dired-local-variables-file for dired-x.
 
-       * emacs-lisp/find-func.el (find-function-search-for-symbol): Look
-       for compressed library files too.
+       * emacs-lisp/find-func.el (find-function-search-for-symbol):
+       Look for compressed library files too.
 
 1998-08-26  Kenichi Handa  <handa@etl.go.jp>
 
 
 1998-08-26  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * gnus/gnus-start.el (gnus-save-newsrc-file): Bind
-       coding-system-for-write before saving.
+       * gnus/gnus-start.el (gnus-save-newsrc-file):
+       Bind coding-system-for-write before saving.
 
 1998-08-26  Kevin Rodgers  <kevinr@ihs.com>  (tiny change)
 
        * repeat.el (repeat): Doc fix.
        [From rms:]
        (repeat-previous-repeated-command): New variable.
-       (repeat): Check for real-last-command being null or repeat.  Set
-       repeat-previous-repeated-command.
+       (repeat): Check for real-last-command being null or repeat.
+       Set repeat-previous-repeated-command.
 
        * browse-url.el (browse-url-netscape): Fix format for hex escapes.
 
 1998-08-25  Kenichi Handa  <handa@etl.go.jp>
 
-       * gnus/message.el (message-send-mail-with-sendmail): Bind
-       coding-system-for-write by the return value of
+       * gnus/message.el (message-send-mail-with-sendmail):
+       Bind coding-system-for-write by the return value of
        select-message-coding-system.
        (message-send-mail-with-qmail): Likewise.
 
 
        * ps-print.el: Add codes to make ps-print.el work also on Emacs
        20.2 and the earlier version.
-       (ps-mule-encode-7bit, ps-mule-encode-8bit): Modified for 20.2.
+       (ps-mule-encode-7bit, ps-mule-encode-8bit): Modify for 20.2.
        (ccl-encode-ethio-unicode, ps-mule-encode-ethiopic): Likewise.
        (ps-mule-find-wrappoint): Likewise.
        (ps-mule-generate-font): Change `X' to `x' in format control-string.
        New vars.
        (ps-mule-plot-rule-cmpchar, ps-mule-plot-cmpchar)
        (ps-mule-prepare-cmpchar-font): New funs.
-       (ps-mule-bitmap-prologue-generated, ps-mule-bitmap-prologue): New
-       vars.
+       (ps-mule-bitmap-prologue-generated, ps-mule-bitmap-prologue):
+       New vars.
        (ps-mule-generate-bitmap-prologue, ps-mule-generate-bitmap-font)
        (ps-mule-generate-bitmap-glyph): New funs.
        (ps-mule-initialize, ps-mule-begin): New funs.
 
 1998-08-23  Kenichi HANDA  <handa@etl.go.jp>
 
-       * international/mule-cmds.el (select-message-coding-system): New
-       function.
-       (set-language-environment-coding-systems): Set
-       default-sendmail-coding-system.
+       * international/mule-cmds.el (select-message-coding-system):
+       New function.
+       (set-language-environment-coding-systems):
+       Set default-sendmail-coding-system.
 
        * mail/sendmail.el (sendmail-coding-system): Doc-string modified.
        (default-sendmail-coding-system): New variable.
index 1d4fa7f40139ade022f2fa7dd30a36aa5717e3f7..5832e6e7c83677581359069dda17f1dcc1ad85b4 100644 (file)
@@ -49,7 +49,7 @@
        This avoids a call to eshell-file-attributes, which can be
        expensive in some situations.
 
-       * eshell/em-ls.el (eshell-ls-dired-initial-args): Added an extra
+       * eshell/em-ls.el (eshell-ls-dired-initial-args): Add an extra
        customization variable, to differentiate ls-in-dired from regular
        uses of ls.
 
        tcl-end-of-defun, tcl-submit-bug-report.
        (tcl-xemacs-menu): Fix up and pass it directly to easymenu.
        (tcl-add-emacs-menu): Remove.
-       (tcl-fill-mode-map, tcl-fill-inferior-map): Moved into the defvar.
+       (tcl-fill-mode-map, tcl-fill-inferior-map): Move into the defvar.
        (tcl-keyword-list): Add `chain'.
        (tcl-font-lock-syntactic-keywords): New variable.
        (tcl-pps-has-arg-6): Remove.
        (tcl-mode): Use define-derived-mode.  Simplify.
        Set comment-indent-function.
        (tcl-indent-command): Use line-beginning-position and comment-indent.
-       (tcl-calculate-indent): Renamed from calculate-tcl-indent.
+       (tcl-calculate-indent): Rename from calculate-tcl-indent.
        (tcl-indent-line): Use tcl-calculate-indent.
-       (tcl-indent-exp): Renamed from indent-tcl-exp.  Use new names.
-       (tcl-add-log-defun): Renamed from add-log-tcl-defun.  Use match-string.
+       (tcl-indent-exp): Rename from indent-tcl-exp.  Use new names.
+       (tcl-add-log-defun): Rename from add-log-tcl-defun.  Use match-string.
        (tcl-filter): Use with-current-buffer, simplify.
        (inferior-tcl-mode): Use define-derived-mode.
-       (tcl-hairy-in-comment): Renamed tcl-in-comment.
-       (tcl-simple-in-comment, tcl-in-comment): Removed.
+       (tcl-hairy-in-comment): Rename tcl-in-comment.
+       (tcl-simple-in-comment, tcl-in-comment): Remove.
        (tcl-files-alist): New function.
        (tcl-help-snarf-commands): Use it and return the result directly
        rather than through a global variable.
        (view-lossage): Call `help-setup-xref' instead of doing it manually.
 
        * subr.el (symbol-file-load-history-loaded)
-       (load-symbol-file-load-history, symbol-file): Moved from `help.el'.
+       (load-symbol-file-load-history, symbol-file): Move from `help.el'.
 
        * loadup.el ("button"): Load removed.
 
        * woman.el (woman-mode-map): Copy button-buffer-map instead of
        making a new keymap.  Don't bind mouse-2.  Bind M-mouse-2 to
        `woman-follow-word' instead of `woman-mouse-2'.
-       (woman-follow-word): Renamed from `woman-mouse-2'.
+       (woman-follow-word): Rename from `woman-mouse-2'.
        Follow current unconditionally, since this function is now only
        bound to M-mouse-2.  Use accessor functions.
        (WoMan-highlight-references): Use `make-text-button'.
 
        * calculator.el (calculator-copy-displayer): New user-option.
        (calculator-displayer-prev, calculator-displayer-next):
-       Renamed from calculator-displayed-{left,right}.
+       Rename from calculator-displayed-{left,right}.
        (calculator, calculator-standard-displayer)
        (calculator-num-to-string, calculator-update-display)
        (calculator-copy, calculator-put-value): Bug and display fixes.
        Use make-keymap instead of copy-keymap, since copying the global
        keymap messes up the menu bar.
 
-       * info.el (Info-goto-node, Info-menu): Doc fix.  Suggested by
-       Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>.
+       * info.el (Info-goto-node, Info-menu): Doc fix.
+       Suggested by Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>.
 
 2001-09-21  Eli Zaretskii  <eliz@is.elta.co.il>
 
        * mail/rmail.el (top-level): Require mule-utils when compiling.
        (rmail-decode-babyl-format): Use detect-coding-with-priority
        instead of detect-coding-region, to favor detection of emacs-mule
-       encoded Babyl files written by rmailout.el etc.  Suggested by
-       Kenichi Handa <handa@etl.go.jp>.
+       encoded Babyl files written by rmailout.el etc.
+       Suggested by Kenichi Handa <handa@etl.go.jp>.
 
 2001-09-14  Eli Zaretskii  <eliz@is.elta.co.il>
 
 2001-09-07  Gerd Moellmann  <gerd@gnu.org>
 
        * isearch.el (isearch-intersects-p): New function.
-       (isearch-close-unnecessary-overlays): Renamed from *unecessary*,
+       (isearch-close-unnecessary-overlays): Rename from *unecessary*,
        use isearch-intersects-p, and clean up.
 
 2001-09-07  Eli Zaretskii  <eliz@is.elta.co.il>
        * emacs-lisp/edebug.el (edebug-window-live-p):
        Use get-window-with-predicate.
 
-       * window.el (get-window-with-predicate): Renamed from some-window.
+       * window.el (get-window-with-predicate): Rename from some-window.
        (some-window): Make it an alias.
 
 2001-09-06  Gerd Moellmann  <gerd@gnu.org>
 
 2001-08-31  Gerd Moellmann  <gerd@gnu.org>
 
-       * isearch.el (isearch-mouse-2): Renamed from isearch-mouse-yank.
+       * isearch.el (isearch-mouse-2): Rename from isearch-mouse-yank.
        Instead of running mouse-yank-at-click, see what the event is
        bound to outside Isearch and run that.
 
 
 2001-08-20  Gerd Moellmann  <gerd@gnu.org>
 
-       * textmodes/texnfo-upd.el (texinfo-every-node-update): Remove
-       some spaces from a message.  From Pavel Janík  <Pavel@Janik.cz>.
+       * textmodes/texnfo-upd.el (texinfo-every-node-update):
+       Remove some spaces from a message.  From Pavel Janík  <Pavel@Janik.cz>.
 
        * whitespace.el (whitespace-global-mode): Add autoload cookie.
 
 
        * Makefile.in (DONTCOMPILE): Remove sc.el.
 
-       * Makefile.in (finder_setwins): Renamed from nonobsolete_setwins.
+       * Makefile.in (finder_setwins): Rename from nonobsolete_setwins.
        Don't include term/.
 
        * mail/sc.el: Moved to obsolete/.
        * calendar/calendar.el (calendar-mode-line-format):
        Use make-mode-line-mouse-map instead of make-mode-line-mouse2-map.
 
-       * bindings.el (make-mode-line-mouse-map): Renamed from
+       * bindings.el (make-mode-line-mouse-map): Rename from
        make-mode-line-mouse2-map.  Take additional arg MOUSE.
        (mode-line-modified): Use mouse-3 instead of mouse-2.
        (mode-line-buffer-identification-keymap): Bind keys differently.
        * uniquify.el (uniquify-ref-base, uniquify-ref-filename)
        (uniquify-ref-buffer, uniquify-ref-proposed): New functions.
        (uniquify-fix-item-base, uniquify-fix-item-filename)
-       (uniquify-fix-item-buffer, uniquify-fix-item-proposed): Deleted.
+       (uniquify-fix-item-buffer, uniquify-fix-item-proposed): Delete.
        Callers changed.
-       (uniquify-set-proposed): Changed to work with a vector item.
+       (uniquify-set-proposed): Change to work with a vector item.
        (uniquify-rationalize-file-buffer-names): Use a list of arrays for
        the fix list, and a list of strings for the non-file buffer
        names.  Both changes reduce consing.
 
        * uniquify.el: These changes correct a corner case that the old
        code managed correctly.
-       (uniquify-fix-item-proposed): Renamed from
+       (uniquify-fix-item-proposed): Rename from
        uniquify-fix-item-min-proposed.
        (uniquify-set-proposed): New function.
        (uniquify-rationalize-file-buffer-names): Code reshuffled for
 2001-07-27  Gerd Moellmann  <gerd@gnu.org>
 
        * emacs-lisp/lisp-mode.el (last-sexp-setup-props): New function.
-       (last-sexp-toggle-display): Renamed from last-sexp-print.
+       (last-sexp-toggle-display): Rename from last-sexp-print.
        (last-sexp-toggle-display, eval-last-sexp-1):
        Use last-sexp-setup-props.
 
 
        * emacs-lisp/lisp-mode.el (eval-print-last-sexp, eval-defun):
        Mention the effect of eval-expression-print-length and
-       eval-expression-print-level in the doc strings.  Suggested by
-       Kevin Gallagher <kevingal@onramp.net>.
+       eval-expression-print-level in the doc strings.
+       Suggested by Kevin Gallagher <kevingal@onramp.net>.
 
 2001-07-25  Gerd Moellmann  <gerd@gnu.org>
 
 
        * uniquify.el: Overall speedup changes when using many buffers.
        (uniquify-fix-item-base, uniquify-fix-item-filename)
-       (uniquify-fix-item-buffer): Changed defmacro to defalias (cosmetic).
+       (uniquify-fix-item-buffer): Change defmacro to defalias (cosmetic).
        (uniquify-fix-item-unrationalized-buffer): Deleted: was the fourth
        place in the item, but was never used.
        (uniquify-fix-item-min-proposed): New defalias: the fourth place
        of buffer whose name was changed, but that return value was never used.
        (uniquify-item-lessp): Replaces uniquify-filename-lessp, works on
        the cached proposed name, does much less consing and is quicker.
-       (uniquify-filename-lessp): Deleted.
+       (uniquify-filename-lessp): Delete.
        (uniquify-rationalize-a-list): Use dolist (cosmetic change).
        Do not bind locally the uniquify-possibly-resolvable flag.  Use the
        cached proposed name is possible.
        with-syntax-table.
        (ediff-coding-system-for-read): From ediff-diff.el.
        (ediff-coding-system-for-write): New variable.
-       (ediff-highest-priority): Fixed the bug having to do with disappearing
+       (ediff-highest-priority): Fix the bug having to do with disappearing
        overlays.
        (ediff-file-remote-p): Use file-remote-p, if available.
        (ediff-listable-file): New function.
        Use ediff-coding-system-for-read.
        (ediff-patch-file-internal): Use ediff-coding-system-for-write.
 
-       * ediff-diff.el (ediff-coding-system-for-read): Moved to ediff-init.el.
-       (ediff-match-diff3-line, ediff-get-diff3-group): Improved pattern.
+       * ediff-diff.el (ediff-coding-system-for-read): Move to ediff-init.el.
+       (ediff-match-diff3-line, ediff-get-diff3-group): Improve pattern.
 
        * ediff.el: Date of last update, copyright years.
 
        of Scott Bronson.
        (ex-cmd-assoc, ex-compile, ex-cmd-one-letr): New functions.
        (viper-check-sub, viper-get-ex-command, viper-execute-ex-command):
-       Deleted functions.
-       (viper-get-ex-com-subr, viper-ex, ex-mark): Changed to use the new
+       Delete functions.
+       (viper-get-ex-com-subr, viper-ex, ex-mark): Change to use the new
        ex-token-list.
        (viper-get-ex-address-subr): Convert registers to char data type.
 
        (viper-read-key): Use viper-read-key-sequence.
 
        * viper.el (viper-major-mode-modifier-list):
-       Added inferior-emacs-lisp-mode.
+       Add inferior-emacs-lisp-mode.
        (this-major-mode-requires-vi-state): New function that uses simple
        heuristics to decide if vi state is appropriate.
        (set-viper-state-in-major-mode): Use this-major-mode-requires-vi-state.
        * progmodes/tcl.el (tcl-fill-mode-map): Use tcl-indent-exp.
        (tcl-mode): Use tcl-add-log-defun.
        (tcl-indent-line): Use tcl-calculate-indent.
-       (tcl-calculate-indent): Renamed from calculate-tcl-indent.
-       (tcl-indent-exp): Renamed from indent-tcl-exp.
-       (tcl-add-log-defun): Renamed from add-log-tcl-defun.
+       (tcl-calculate-indent): Rename from calculate-tcl-indent.
+       (tcl-indent-exp): Rename from indent-tcl-exp.
+       (tcl-add-log-defun): Rename from add-log-tcl-defun.
        (tcl-indent-for-comment): Call comment-indent-function properly
        and handle the case where it returns nil.
 
        * mouse-sel.el (mouse-sel-bindings): Instead of unbinding
        mouse-1 etc., bind them to `ignore'.
 
-       * eshell/esh-mode.el (eshell-send-invisible): Renamed from
+       * eshell/esh-mode.el (eshell-send-invisible): Rename from
        send-invisible, which is already defined in Comint.
        (eshell-watch-for-password-prompt): Use it.
 
 
 2001-07-11  Stefan Monnier  <monnier@cs.yale.edu>
 
-       * vc.el (vc-prefix-map): Moved back to vc-hooks.el.
+       * vc.el (vc-prefix-map): Move back to vc-hooks.el.
        (vc-dired-mode-map): Fix the madness.
 
        * vc-hooks.el (vc-mode): Dummy function for doc purposes.
-       (vc-prefix-map): Moved back from vc.el.
+       (vc-prefix-map): Move back from vc.el.
 
 2001-07-11  Gerd Moellmann  <gerd@gnu.org>
 
        * startup.el (normal-top-level): Don't operate on the initial
        frame if we failed to create one.
 
-2001-07-10  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2001-07-10  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-indent-exp): Keep the indentation of the block
        itself, i.e. only indent the contents in it.
        * toolbar/*.pbm: Cleaned up.
        From Luis Fernandes <elf@ee.ryerson.ca>.
 
-2001-07-09  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2001-07-09  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el: Extended the kludge to interoperate with the
        delsel and pending-del packages wrt to the new function
 
 2001-05-28  Miles Bader  <miles@gnu.org>
 
-       * comint.el (comint-carriage-motion): Renamed from
+       * comint.el (comint-carriage-motion): Rename from
        `comint-cr-magic'.  Operate on the buffer instead of the string
        (for use as a comint post-output filter, instead of as a
        pre-output filter).  Handle backspaces too.  Add to the
 2001-05-21  Stefan Monnier  <monnier@cs.yale.edu>
 
        * diff-mode.el (diff-jump-to-old-file, diff-update-on-the-fly):
-       Renamed by removing the silly `-flag' suffix.
+       Rename by removing the silly `-flag' suffix.
        (diff-mode, diff-minor-mode, diff-find-source-location): Update.
 
 2001-05-20  Stefan Monnier  <monnier@cs.yale.edu>
 
 2001-05-18  Simon Josefsson  <simon@josefsson.org>
 
-       * mail/smtpmail.el (maybe-append-domain): Renamed to
+       * mail/smtpmail.el (maybe-append-domain): Rename to
        `smtpmail-maybe-append-domain'.
        (smtpmail-via-smtp): Use the new name.
 
 2001-05-08  John Wiegley  <johnw@gnu.org>
 
        * calendar/timeclock.el (timeclock-workday-remaining):
-       Changed logic for determining how much time is remaining.
+       Change logic for determining how much time is remaining.
        (timeclock-workday-elapsed): Don't accept a "relative" argument
        for the current day's elapsed time.  What could that have meant?
        (timeclock-workday-elapsed-string): No "relative" argument anymore.
-       (timeclock-when-to-leave): Changed logic, similarly to what was
+       (timeclock-when-to-leave): Change logic, similarly to what was
        done for `timeclock-workday-remaining'.
-       (timeclock-find-discrep): Removed "today-only" argument, which had
+       (timeclock-find-discrep): Remove "today-only" argument, which had
        no meaning.  Fixed some more math problems.  The function now
        returns a three member list: (TOTAL-TIME-DISCREPANCY
        TODAYS-TIME-DISCREPANCY TODAYS-ELAPSED-TIME).
        * mail/rmail.el (rmail-mode-map): Use rmail-sort-by-labels
        instead of rmail-sort-by-keywords.
 
-       * mail/rmailsort.el (rmail-sort-by-labels): Renamed from
+       * mail/rmailsort.el (rmail-sort-by-labels): Rename from
        rmail-sort-by-keywords.
 
-       * mail/rmailsum.el (rmail-summary-sort-by-labels): Renamed from
+       * mail/rmailsum.el (rmail-summary-sort-by-labels): Rename from
        rmail-summary-sort-by-keywords.  Doc fix.
        (rmail-summary-mode): Doc fix.
 
 
        * progmodes/cperl-mode.el (cperl-font-lock-keywords)
        (cperl-font-lock-keywords-1, cperl-font-lock-keywords-2):
-       Renamed from perl-font-lock-keywords to avoid clashes.
+       Rename from perl-font-lock-keywords to avoid clashes.
        (cperl-mode, cperl-load-font-lock-keywords, cperl-init-faces)
        (cperl-load-font-lock-keywords-1, cperl-load-font-lock-keywords-2):
-       Updated correspondingly.
+       Update correspondingly.
 
        * diff-mode.el (diff-nonexistent-face, diff-font-lock-keywords):
        Typo `nonexistant' -> `nonexistent'.
 
-2001-05-04  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2001-05-04  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-electric-delete, c-electric-delete-forward):
        Split `c-electric-delete' into two functions where
 
        * progmodes/cc-mode.el: `c-electric-delete-forward' is now bound
        to C-d to get the electric behavior on that key too.
-       (c-fill-paragraph): Fixed bogus direct use of
+       (c-fill-paragraph): Fix bogus direct use of
        c-comment-prefix-regexp, which caused an error when it's a list.
 
 2001-05-03  Eli Zaretskii  <eliz@is.elta.co.il>
 
 2001-04-23  John Wiegley  <johnw@gnu.org>
 
-       * eshell/em-unix.el (eshell/diff): Fixed problems that were
+       * eshell/em-unix.el (eshell/diff): Fix problems that were
        occurring with Emacs 21's diff.el/compile.el interaction layer.
 
 2001-04-23  Colin Walters  <walters@cis.ohio-state.edu>
 
 2001-04-23  John Wiegley  <johnw@gnu.org>
 
-       * eshell/em-smart.el (eshell-smart-redisplay): Added some safety
+       * eshell/em-smart.el (eshell-smart-redisplay): Add some safety
        code to work around a redisplay problem I've been having.
 
 2001-04-23  John Wiegley  <johnw@gnu.org>
 
        * calendar/timeclock.el (timeclock-day-required): If the time
        required for a particular day is not set, use `timeclock-workday'.
-       (timeclock-find-discrep): Added some sample code in a comment.
+       (timeclock-find-discrep): Add some sample code in a comment.
 
        * eshell/eshell.el (eshell-command): Made a few changes so that
        `eshell-command' could be called programmatically.
 
-       * eshell/esh-mode.el (eshell-non-interactive-p): Moved to eshell.el.
+       * eshell/esh-mode.el (eshell-non-interactive-p): Move to eshell.el.
 
-       * eshell/eshell.el (eshell-non-interactive-p): Moved from esh-mode.el.
+       * eshell/eshell.el (eshell-non-interactive-p): Move from esh-mode.el.
 
 2001-04-23  John Wiegley  <johnw@gnu.org>
 
        * calendar/timeclock.el: Updated copyright.
        (timeclock-generate-report): Don't report the daily or two-week
        total, if no time has been worked in that period.
-       (timeclock-find-discrep): Moved call to `file-readable-p'; removed
+       (timeclock-find-discrep): Move call to `file-readable-p'; removed
        final computational form, which was unnecessary; corrected a
        parsing problem when timeclock-relative was nil.
 
 
 2001-04-20  Alex Schroeder  <alex@gnu.org>
 
-       * sql.el (sql-mode-menu): Added highlighting entries.
+       * sql.el (sql-mode-menu): Add highlighting entries.
        (sql-highlight-oracle-keywords): New function.
        (sql-highlight-postgres-keywords): New function.
        (sql-highlight-ansi-keywords): New function.
 
 2001-04-19  Karl Fogel  <kfogel@collab.net>
 
-       * saveplace.el (save-place-alist-to-file): Removed no-effect code
+       * saveplace.el (save-place-alist-to-file): Remove no-effect code
        that inserted file content only to delete it immediately.
        Probably a cut-and-paste bug.  Thanks to Juanma Barranquero
        <lektu@terra.es> for the patch.
 
        * language/slovak.el ("Slovak"): Add tutorial entry.
 
-       * net/browse-url.el (browse-url-new-window-flag): Renamed from
+       * net/browse-url.el (browse-url-new-window-flag): Rename from
        browse-url-new-window-p.
 
 2001-04-17  Eli Zaretskii  <eliz@is.elta.co.il>
 2001-04-17  Eli Zaretskii  <eliz@is.elta.co.il>
 
        * vc-cvs.el (vc-cvs-print-log, vc-cvs-diff): Don't invoke CVS as
-       an async subprocess if start-process is unavailable.  Suggested by
-       Tim Van Holder <tim.van.holder@pandora.be>.
+       an async subprocess if start-process is unavailable.
+       Suggested by Tim Van Holder <tim.van.holder@pandora.be>.
 
 2001-04-15  Eli Zaretskii  <eliz@is.elta.co.il>
 
-       * info.el (Info-additional-directory-list): Doc fix.  Suggested by
-       Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>.
+       * info.el (Info-additional-directory-list): Doc fix.
+       Suggested by Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>.
 
 2001-04-14  Eli Zaretskii  <eliz@is.elta.co.il>
 
 
 2001-04-10  John Wiegley  <johnw@gnu.org>
 
-       * calendar/timeclock.el (timeclock-generate-report): Added a
+       * calendar/timeclock.el (timeclock-generate-report): Add a
        missing insert of the project name.
 
 2001-04-09  Gerd Moellmann  <gerd@gnu.org>
        * mail/sendmail.el (sendmail-send-it): Don't parse Resent-*
        headers.  Always invoke sendmail with option -t.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
        * Release of cc-mode 5.28.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-mode.el, progmodes/cc-vars.el (c-common-init)
        (c-default-style):
-       Removed the hardcoded switch to "java" style in Java mode.
+       Remove the hardcoded switch to "java" style in Java mode.
        It's instead taken care of by the default value for c-default-style.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-align.el (c-lineup-math): Fix bug where lineup was
        triggered by equal signs in string literals.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-cmds.el (c-fill-paragraph): Fixed bug in the paragraph
+       * progmodes/cc-cmds.el (c-fill-paragraph): Fix bug in the paragraph
        limit detection when at the ends of the buffer.
 
-       * progmodes/cc-engine.el (c-guess-basic-syntax): Removed bogus check for
+       * progmodes/cc-engine.el (c-guess-basic-syntax): Remove bogus check for
        "for" statement clause in case 7F; a better one is done
        earlier in case 7D anyway.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-cmds.el (c-guess-fill-prefix): Improved the heuristics
+       * progmodes/cc-cmds.el (c-guess-fill-prefix): Improve the heuristics
        somewhat more and did a small optimization.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-beginning-of-statement, c-end-of-statement):
        Use the limit argument only to limit the syntactic context
        fixes to the paragraph and comment prefix recognition, block
        comment ender handling etc.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-fill-paragraph): Take more care to preserve
        the relative position of the point.
        this doesn't apply to idl-mode, since IDL afaik doesn't have
        statements at all.)
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-inside-bracelist-p): Fix for handling
        bracelists where the declaration contains template arguments.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-comment-indent):
        Use `c-get-syntactic-indentation' to correctly calculate the
        indentation sum calculation from `c-indent-line' to a separate
        function.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-beginning-of-statement, c-comment-indent):
-       Fixed places where it was assumed that preprocessor directives
+       Fix places where it was assumed that preprocessor directives
        have to start in column zero.
 
        * progmodes/cc-engine.el (c-beginning-of-member-init-list): Handle C++
        they'll get indented consistently with the same type of
        expression in a normal block.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-fill-paragraph): The kludge that checks
        whether the adaptive filling package fails to keep the comment
        * progmodes/cc-cmds.el (c-fill-paragraph): Made the way the paragraph
        around point is recognized more robust.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el, progmodes/cc-engine.el:
        * progmodes/cc-lobotomy.el (c-state-cache)
        (c-in-literal-cache, c-auto-fill-prefix, c-lit-limits)
-       (c-lit-type): Fixed all internal variables used dynamically so
+       (c-lit-type): Fix all internal variables used dynamically so
        that they are always bound.
 
        * progmodes/cc-cmds.el, progmodes/cc-engine.el:
        Improve recovery of syntactic errors:
 
-       (c-indent-region): Fixed reporting of syntactic errors so that
+       (c-indent-region): Fix reporting of syntactic errors so that
        the region is fully reindented even when an error occurs.
        The last syntactic error is printed afterwards.  Also cleanup up a
        whole lot of code that tried to optimize indentation of whole
 
        (c-indent-sexp): Use c-indent-region.
 
-       (c-parsing-error): Changed this variable to hold the message
+       (c-parsing-error): Change this variable to hold the message
        for any syntactic error that is discovered.
 
        (c-parse-state): Search backward from point instead of the bod
        dangling "else" clauses instead of throwing an error, and fall
        back to a reasonable position.
 
-       (c-indent-line): Added argument to avoid reporting syntactic errors.
+       (c-indent-line): Add argument to avoid reporting syntactic errors.
 
        (c-show-syntactic-information): Don't report any syntactic errors.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-cmds.el (c-beginning-of-statement): Fixed bugs with
+       * progmodes/cc-cmds.el (c-beginning-of-statement): Fix bugs with
        paragraph recognition when moving by sentence in literals.
 
-       * progmodes/cc-langs.el (c-Java-javadoc-paragraph-start): Modified
+       * progmodes/cc-langs.el (c-Java-javadoc-paragraph-start): Modify
        paragraph start regexp for javadoc to recognize javadoc markup in
        general instead of a specific set of keywords, to be more future-safe.
 
        (c-current-comment-prefix): New variable containing the actual
        regexp from c-comment-prefix-regexp for the current buffer.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-cmds.el (c-electric-brace): Fixed check for special brace
+       * progmodes/cc-cmds.el (c-electric-brace): Fix check for special brace
        lists: We can't look at the syntax, since a brace list can get
        recognized as a plain statement-cont.
 
-       * progmodes/cc-engine.el (c-guess-basic-syntax): Fixed bug where a
+       * progmodes/cc-engine.el (c-guess-basic-syntax): Fix bug where a
        special brace list opener broken over two lines got recognized
        as a statement on the second line.  Case 9A changed.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-cmds.el (c-electric-brace): Fixed bug in c-state-cache
+       * progmodes/cc-cmds.el (c-electric-brace): Fix bug in c-state-cache
        adjustment after line is reindented.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-defs.el (c-point): Added optional argument for position
+       * progmodes/cc-defs.el (c-point): Add optional argument for position
        to use instead of the current point.
 
        * progmodes/cc-defs.el, progmodes/cc-engine.el (c-add-class-syntax):
        starts at boi, to avoid the extra level of indentation in that case.
        Cases 4, 16A and 17E affected.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el: Use `indent-according-to-mode' instead of direct
        calls to `c-indent-line', to adhere better to Emacs conventions.
        * progmodes/cc-engine.el (c-indent-line): Use the syntax already bound
        to `c-syntactic-context', if there is any.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-engine.el (c-get-offset): Fixed bug where the indentation
+       * progmodes/cc-engine.el (c-get-offset): Fix bug where the indentation
        wasn't added up correctly when a lineup function returned nil.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-engine.el (c-collect-line-comments): Fixed bug where
+       * progmodes/cc-engine.el (c-collect-line-comments): Fix bug where
        empty lines were ignored when collecting line comments backwards.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-align.el (c-lineup-dont-change): Return an absolute
        indentation column to work correctly in the case when several
        * progmodes/cc-engine.el, progmodes/cc-styles.el:
        * progmodes/cc-vars.el (c-evaluate-offset)
        (c-get-offset, c-indent-line, c-valid-offset, c-read-offset)
-       (c-set-offset): Added absolute indentation column settings by
+       (c-set-offset): Add absolute indentation column settings by
        using the vector type.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el, progmodes/cc-vars.el
        (c-electric-paren, c-cleanup-list):
        Implemented two new cleanups `space-before-funcall' and
        `compact-empty-funcall'.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-defs.el (c-paren-re, c-identifier-re): Two new macros for
        helping building regexps.
        complete keyword lists.  `c-keywords' is set to a regexp matching
        all keywords in the current language.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-engine.el (c-beginning-of-statement-1): Added '#' to the
+       * progmodes/cc-engine.el (c-beginning-of-statement-1): Add '#' to the
        list of characters to skip backwards over at the beginning of
        a statement, since it can precede string literals in Pike.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-cmds.el (c-guess-fill-prefix): Fixed bug with prefix
+       * progmodes/cc-cmds.el (c-guess-fill-prefix): Fix bug with prefix
        recognition when standing on the last line in a C++ comment
        with nothing but whitespace after the prefix.
 
-       * progmodes/cc-engine.el (c-backward-to-start-of-if): Fixed bug when
+       * progmodes/cc-engine.el (c-backward-to-start-of-if): Fix bug when
        given no limit argument.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-engine.el (c-inside-bracelist-p): Fixed brace list
+       * progmodes/cc-engine.el (c-inside-bracelist-p): Fix brace list
        recognition for the `[]= operator symbol in Pike.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-bytecomp.el (cc-eval-when-compile): New macro that works
        around a bug in `eval-when-compile' in the byte compiler.
 
-       * progmodes/cc-engine.el (c-forward-token-1): Fixed bug with return
+       * progmodes/cc-engine.el (c-forward-token-1): Fix bug with return
        value when count is zero and there's no token start within the limit.
 
        (c-guess-basic-syntax): Don't add 'comment-intro to lines with
        * progmodes/cc-mode-19.el: Fixes so that checks that must be done at
        compile time also are done then.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-defs.el: Make sure cc-mode-19 is loaded both at compile
        time and at runtime, and only when it's needed.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
        Major cleanup for less error prone and more warning free
        compilation, including some fixes for bugs due to different
 
        README: Updated installation instructions.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el, progmodes/cc-langs.el, progmodes/cc-mode.el:
        Moved around things to improve the modularity:
        the various variables for configuring the language syntax.
 
        * progmodes/cc-engine.el, progmodes/cc-styles.el (c-evaluate-offset)
-       (c-get-offset): Moved from cc-styles to cc-engine since file
+       (c-get-offset): Move from cc-styles to cc-engine since file
        dependency analysis suggests they belong there (which also
        makes more sense).  Thanks to Martin Buchholz for doing the analysis.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-fn-region-is-active-p): New function that
        wraps the corresponding macro, for use in places that aren't
        * progmodes/cc-mode.el (c-prepare-bug-report-hooks): Hook variable to
        add things to the bug report.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-cmds.el (c-guess-fill-prefix): Fixed bug where the
+       * progmodes/cc-cmds.el (c-guess-fill-prefix): Fix bug where the
        returned prefix could contain a newline when the search for a
        good prefix line failed.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-toggle-auto-state, c-toggle-hungry-state)
        (c-toggle-auto-hungry-state): Made the argument optional, as
        the documentation says it is.
 
-2000-03-21  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-03-21  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-guess-basic-syntax): Don't treat the Pike
        multiline string syntax, #"...", as a cpp macro.
        of Scott Bronson.
        (ex-cmd-assoc, ex-cmd-one-letr): New functions.
        (viper-check-sub, viper-get-ex-command, viper-execute-ex-command):
-       Deleted functions.
-       (viper-get-ex-com-subr, viper-ex, ex-mark): Changed to use the new
+       Delete functions.
+       (viper-get-ex-com-subr, viper-ex, ex-mark): Change to use the new
        ex-token-list.
 
        * viper-util.el: Spaces, indentation.
 
 2001-03-16  John Wiegley  <johnw@gnu.org>
 
-       * calendar/timeclock.el (timeclock-reread-log): Fixed problem with
+       * calendar/timeclock.el (timeclock-reread-log): Fix problem with
        first-time checkins.
-       (timeclock-log-data): Fixed problem with reading timelog log file.
+       (timeclock-log-data): Fix problem with reading timelog log file.
        Resulting data in the "day list" was incorrect.
        (timeclock-find-discrep): Check if `timeclock-file' is readable
        before opening it.
 
 2001-03-09  Gerd Moellmann  <gerd@gnu.org>
 
-       * help.el (string-key-binding): Renamed from
+       * help.el (string-key-binding): Rename from
        mode-line-key-binding.  Handle any event on a string.
        Check for `keymap' properties as well as `local-map' properties.
 
 2001-03-07  Stefan Monnier  <monnier@cs.yale.edu>
 
        * log-edit.el (log-edit-common-indent): New var.
-       (log-edit-set-common-indentation): Renamed from
+       (log-edit-set-common-indentation): Rename from
        log-edit-delete-common-indentation.  Use the new var.
        (log-edit-insert-changelog, log-edit-done-hook): Use the new name.
 
        * startup.el (fancy-splash-screens): Use display-hourglass
        instead of display-busy-cursor.
 
-       * frame.el (display-hourglass): Renamed from busy-cursor.
-       (hourglass-delay): Renamed from busy-cursor-delay-seconds.
+       * frame.el (display-hourglass): Rename from busy-cursor.
+       (hourglass-delay): Rename from busy-cursor-delay-seconds.
        (show-cursor-in-non-selected-windows): Doc fix.
 
 2001-02-20  Dave Love  <fx@gnu.org>
 
 2001-02-12  Michael Kifer  <kifer@cs.sunysb.edu>
 
-       * ediff-diff.el (ediff-make-diff2-buffer): Removed bogus checks
+       * ediff-diff.el (ediff-make-diff2-buffer): Remove bogus checks
        for remote files.
-       (ediff-coding-system-for-read): Replaced the no-conversion default
+       (ediff-coding-system-for-read): Replace the no-conversion default
        with raw-text.
 
        * ediff-init.el: Removed :version from defcustom vars.
 
 2001-02-06  Gerd Moellmann  <gerd@gnu.org>
 
-       * dabbrev.el (dabbrev-ignored-buffer-regexps): Renamed from
+       * dabbrev.el (dabbrev-ignored-buffer-regexps): Rename from
        dabbrev-ignored-regexps.
 
 2001-02-06  Eli Zaretskii  <eliz@is.elta.co.il>
 
 2001-01-25  John Wiegley  <johnw@gnu.org>
 
-       * eshell/esh-util.el (eshell-ange-ls-uids): Changed use of `alist'
+       * eshell/esh-util.el (eshell-ange-ls-uids): Change use of `alist'
        to `repeat' in the :type field.
 
-       * pcomplete.el (pcomplete-file-ignore): Changed a :type field to
+       * pcomplete.el (pcomplete-file-ignore): Change a :type field to
        allow a choice of regexp or nil.
        (pcomplete-dir-ignore): Same.
 
-       * eshell/em-unix.el (eshell/occur): Fixed bug causing `occur' (as
+       * eshell/em-unix.el (eshell/occur): Fix bug causing `occur' (as
        a command) to always fail.
 
 2001-01-25  Gerd Moellmann  <gerd@gnu.org>
 
 2001-01-24  Sam Steingold  <sds@gnu.org>
 
-       * dired.el (dired-replace-in-string): Removed.
+       * dired.el (dired-replace-in-string): Remove.
        (dired-sort-toggle): Use `replace-regexps-in-string'
        instead of `dired-replace-in-string'.
 
        * dired-aux.el (dired-shell-stuff-it, dired-rename-subdir)
        (dired-rename-subdir-2, dired-insert-subdir-doinsert): Ditto.
 
-       * gs.el (gs-replace-in-string): Removed.
+       * gs.el (gs-replace-in-string): Remove.
        (gs-options): Use `replace-regexps-in-string'
        instead of `gs-replace-in-string'.
 
 
 2001-01-19  Michael Kifer  <kifer@cs.sunysb.edu>
 
-       * ediff-hook.el (ediff-xemacs-init-menus): Fixed add-menu-button.
+       * ediff-hook.el (ediff-xemacs-init-menus): Fix add-menu-button.
 
        * ediff-init.el (subst-char-in-string): Define and use it, unless
        it's already defined.
        overlay priorities should make it unnecessary, right?
        (isearch-highlight): Face suppressing behavior removed.
        (isearch-dehighlight): Face suppressing behavior removed.
-       (isearch-set-lazy-highlight-faces-at): Removed.
+       (isearch-set-lazy-highlight-faces-at): Remove.
 
 2001-01-17  Kenichi Handa  <handa@etl.go.jp>
 
 
 2000-01-09  Alex Schroeder  <alex@gnu.org>
 
-       * ansi-color.el (ansi-color-process): Removed, Emacs and XEmacs
+       * ansi-color.el (ansi-color-process): Remove, Emacs and XEmacs
        both use ansi-color-process-output, now.
        (ansi-color-process-output): Doesn't return string anymore.  It is
        installed in comint-output-filter-functions for both Emacs and
        XEmacs, now.
-       (ansi-color-unfontify-region): Simplified code removing variables
+       (ansi-color-unfontify-region): Simplify code removing variables
        pos and start-ansi.
        (ansi-color-apply): Put text-property ansi-color before putting
        text-property face because ansi-color-unfontify-region is called
        immediately after the call to put-text-property.
        (ansi-color-context-region): Doc change.
-       (ansi-color-filter-region): Simplified code.
-       (ansi-color-apply-on-region): Changed start to start-marker, using
+       (ansi-color-filter-region): Simplify code.
+       (ansi-color-apply-on-region): Change start to start-marker, using
        a marker explicitly.  Put text-property ansi-color before putting
        text-property face because ansi-color-unfontify-region is called
        immediately after the call to put-text-property.
 2000-01-09  Alex Schroeder  <alex@gnu.org>
 
        * ansi-color.el (ansi-color-faces-vector): Doc change.
-       (ansi-color-for-comint-mode): Changed :type property to choice.
-       (ansi-color-last-context): Removed.
+       (ansi-color-for-comint-mode): Change :type property to choice.
+       (ansi-color-last-context): Remove.
        (ansi-color-process-output): Don't use ansi-color-last-context, as
        the main functions will store their context now.
        (ansi-color-context): Doc change.
        (ansi-color-filter-apply): Rewrote it based on ansi-color-apply.
        Uses ansi-color-context such that repeated calls will strip
        partial escape sequences, too.
-       (ansi-color-apply): Simplified code.  Colorize end of string if
+       (ansi-color-apply): Simplify code.  Colorize end of string if
        face is not null.  Store context in new (FACE STRING) format, such
        that repeated calls will strip partial escape sequences, too.
        Append faces to face property using ansi-color-apply-sequence such
        (ansi-color-filter-region): Rewrote it based on
        ansi-color-apply-on-region.  Uses ansi-color-context-region such
        that repeated calls will strip partial escape sequences, too.
-       (ansi-color-apply-on-region): Simplified code.  Colorize end of
+       (ansi-color-apply-on-region): Simplify code.  Colorize end of
        region if face is not null.  Store context in new (FACE POS)
        format, such that repeated calls will strip partial escape
        sequences, too.  Append faces to face property using
        decide what to do.  This function is added to
        comint-preoutput-filter-functions when the package is loaded.
 
-       (ansi-color-for-shell-mode-set): Removed.
-       (ansi-color-for-shell-mode): Removed.
+       (ansi-color-for-shell-mode-set): Remove.
+       (ansi-color-for-shell-mode): Remove.
 
 2000-01-09  Alex Schroeder  <alex@gnu.org>
 
        * vc.el (vc-default-latest-on-branch-p): New function, replaces
        constant implementations in backends.
 
-       * vc-cvs.el (vc-cvs-latest-on-branch-p): Removed.
-       (vc-cvs-checkout): Renamed arg WRITABLE to EDITABLE.
+       * vc-cvs.el (vc-cvs-latest-on-branch-p): Remove.
+       (vc-cvs-checkout): Rename arg WRITABLE to EDITABLE.
 
-       * vc-rcs.el (vc-rcs-checkout, vc-rcs-cancel-version): Renamed arg
+       * vc-rcs.el (vc-rcs-checkout, vc-rcs-cancel-version): Rename arg
        WRITABLE to EDITABLE.
 
-       * vc-sccs.el (vc-sccs-latest-on-branch-p): Removed.
-       (vc-sccs-checkout, vc-sccs-cancel-version): Renamed arg WRITABLE
+       * vc-sccs.el (vc-sccs-latest-on-branch-p): Remove.
+       (vc-sccs-checkout, vc-sccs-cancel-version): Rename arg WRITABLE
        to EDITABLE.
 
 2001-01-08  Eli Zaretskii  <eliz@is.elta.co.il>
 
 2001-01-08  Gerd Moellmann  <gerd@gnu.org>
 
-       * isearch.el (isearch-old-signal-hook): Removed.
+       * isearch.el (isearch-old-signal-hook): Remove.
        (isearch-mode): Add isearch-done to kbd-macro-termination-hook
        instead of setting signal-hook-function.
        (isearch-done): Remove isearch-done from kbd-macro-termination-hook.
 2001-01-04  Gerd Moellmann  <gerd@gnu.org>
 
        * tooltip.el (tooltip-cancel-delayed-tip)
-       (tooltip-start-delayed-tip): Renamed from tooltip-disable-timeout
+       (tooltip-start-delayed-tip): Rename from tooltip-disable-timeout
        and tooltip-add-timeout.
        (tooltip-show): Set border color from faces's foreground.
        (tooltip-show-help-function): If called with the same help string
        (dired-guess-shell-alist-default): Don't use xloadimage for PNG.
        (dired-guess-shell-alist-user): Customize.
        (dired-x-help-address): Set to bug-gnu-emacs.
-       (dired-x-maintainer, dired-x-file, dired-x-version): Deleted.
-       (dired-default-directory): Renamed from default-directory.
+       (dired-x-maintainer, dired-x-file, dired-x-version): Delete.
+       (dired-default-directory): Rename from default-directory.
 
        * hl-line.el (hl-line): Doc fix.
 
        * international/fontset.el (x-complement-fontset-spec):
        Resolve ASCII font name so that the same family name is used for fonts
        registered in x-font-name-charset-alist.
-       (create-fontset-from-fontset-spec): Adjusted for the above change.
+       (create-fontset-from-fontset-spec): Adjust for the above change.
        The name of fontset alias should be a unresolved ASCII font name.
 
 2000-12-28  Gerd Moellmann  <gerd@gnu.org>
 
 2000-12-28  Kenichi Handa  <handa@etl.go.jp>
 
-       * textmodes/artist.el (artist-butlast): Deleted.
+       * textmodes/artist.el (artist-butlast): Delete.
        (artist-ellipse-mirror-quadrant): Use butlast instead of
        artist-butlast.
 
-       * subr.el (butlast, nbutlast): Moved from cl.el to here.
+       * subr.el (butlast, nbutlast): Move from cl.el to here.
 
-       * emacs-lisp/cl.el (butlast, nbutlast): Moved to subr.el.
+       * emacs-lisp/cl.el (butlast, nbutlast): Move to subr.el.
 
 2000-12-27  Eli Zaretskii  <eliz@is.elta.co.il>
 
 
 2000-12-25  Michael Kifer  <kifer@cs.sunysb.edu>
 
-       * viper-init.el (viper-restore-cursor-type): Added condition-case guard.
+       * viper-init.el (viper-restore-cursor-type): Add condition-case guard.
 
        * ediff-init.el (ediff-quit-hook, ediff-suspend-hook):
-       Changed initialization; use add-hook.
+       Change initialization; use add-hook.
        (ediff-file-remote-p): Use file-local-copy.
 
-       * ediff-ptch.el (ediff-prompt-for-patch-buffer): Improved defaults.
+       * ediff-ptch.el (ediff-prompt-for-patch-buffer): Improve defaults.
 
        * ediff.el (ediff-patch-buffer): Bug fix.
        (ediff-revision): Allow selection of the file at the prompt.
 
 2000-08-22  Emmanuel Briot  <briot@gnat.com>
 
-       * xml.el (top level comment): Updated to reflect the fact that
+       * xml.el (top level comment): Update to reflect the fact that
        white spaces are relevant in the XML file.
        (xml-parse-file): Do not kill an existing Emacs buffer if the file
        to parse was already edited. This allows for on-the-fly analysis
 
        * progmodes/idlwave.el: Fixed copyright notice.
 
-       * textmodes/reftex-dcr.el (reftex-view-crossref): Added SPACE and
+       * textmodes/reftex-dcr.el (reftex-view-crossref): Add SPACE and
        TAB as key separators.
 
 2000-12-19  Alex Schroeder  <alex@gnu.org>
        * sql.el (sql-sybase-options): New option.
        (sql-sybase): Use it.  Add sql-database to the list of parameters
        provided for login.  The options -w 2048 -n are not used any more.
-       (sql-postgres-options): Changed default from "--pset" to "-P".
+       (sql-postgres-options): Change default from "--pset" to "-P".
        (sql-mysql-options): Doc change.
        (sql-stop): Doc change.
 
 2000-12-18  Dave Love  <fx@gnu.org>
 
        * simple.el (mail-user-agent): Doc fix.
-       (input-mode-8-bit): Removed.
+       (input-mode-8-bit): Remove.
 
        * international/mule.el (set-keyboard-coding-system): Doc fix.
        (keyboard-coding-system): New option.
        * international/characters.el: Fix cases and syntaxes for
        mule-unicode-0100-24ff.
 
-       * dired.el (dired-move-to-filename-regexp): Fixed for the case
+       * dired.el (dired-move-to-filename-regexp): Fix for the case
        that a Japanese character is not appended after day and year.
 
        * info.el (Info-suffix-list): Change format for a command that
        requires arguments.
-       (info-insert-file-contents): Adjusted for the above change.
+       (info-insert-file-contents): Adjust for the above change.
 
 2000-12-12  Andreas Schwab  <schwab@suse.de>
 
        * textmodes/reftex.el (reftex-scanning-info-available-p): New function.
        (reftex-TeX-master-file): Check for `tex-main-file' early enough.
 
-       * textmodes/reftex-global.el (reftex-create-tags-file): Fixed bug
+       * textmodes/reftex-global.el (reftex-create-tags-file): Fix bug
        when master file is not open.
 
 2000-12-09  Stefan Monnier  <monnier@cs.yale.edu>
 
 2000-12-05  Rob Riepel  <riepel@Stanford.EDU>
 
-       * emulation/tpu-edt.el (tpu-help): Fixed previous screen logic.
-       (tpu-search-highlight): Fixed comparison of overlay end positions.
+       * emulation/tpu-edt.el (tpu-help): Fix previous screen logic.
+       (tpu-search-highlight): Fix comparison of overlay end positions.
        (tpu-trim-line-ends): Implemented trimming logic locally.
 
        * emulation/tpu-extras.el (tpu-write-file-hook)
-       (tpu-set-cursor-bound): Replaced picture-clean with tpu-trim-line-ends.
+       (tpu-set-cursor-bound): Replace picture-clean with tpu-trim-line-ends.
 
 2000-12-05  Kenichi Handa  <handa@etl.go.jp>
 
        for the menu and would make command `imenu' awkward to use.
        (antlr-skip-file-prelude): With ANTLR-2.7+, you can specify named
        header actions and more than one.
-       (antlr-font-lock-tokendef-face): Changed color.
-       (antlr-font-lock-tokenref-face): Changed color.
+       (antlr-font-lock-tokendef-face): Change color.
+       (antlr-font-lock-tokenref-face): Change color.
        (antlr-font-lock-additional-keywords): Also highlight lowercase.
        (antlr-mode-syntax-table): New variable.
        (antlr-mode): Populate and use it instead `java-mode-syntax-table'.
 
        * ediff-init.el (ediff-abbrev-jobname): Use capitalize.
 
-       * ediff-wind.el (ediff-skip-unsuitable-frames): Deleted the
+       * ediff-wind.el (ediff-skip-unsuitable-frames): Delete the
        redundant skip-small-frames test.
 
        * viper-cmd.el (viper-change-state-to-vi): Disable overwrite mode.
 
        * progmodes/ada-mode.el (ada-mode): Use it instead of
        `ada-remove-trailing-spaces'.
-       (ada-remove-trailing-spaces): Removed.
+       (ada-remove-trailing-spaces): Remove.
 
        * textmodes/two-column.el (2C-merge): Recommend it in the doc.
 
-       * textmodes/picture.el (picture-clean): Removed.
+       * textmodes/picture.el (picture-clean): Remove.
        (picture-mode-exit): Call it instead of `picture-clean'.
 
 2000-11-22  Gerd Moellmann  <gerd@gnu.org>
        (string-rectangle): Check delete-selection-mode.
 
        * emacs-lisp/edebug.el (edebug-version)
-       (edebug-maintainer-address): Deleted.
+       (edebug-maintainer-address): Delete.
        (edebug-submit-bug-report): Just alias to report-emacs-bug.
        (edebug-read-function): Account for other `'#' read forms.
        (edebug-mode-menus): Make some items toggles.
 
        * recentf.el (recentf-menu-items-for-commands)
        (recentf-make-menu-items, recentf-make-menu-item)
-       (recentf-filter-changer): Added :help and :active menu-item properties.
+       (recentf-filter-changer): Add :help and :active menu-item properties.
 
        (recentf-build-dir-rules, recentf-dump-variable)
        (recentf-edit-list, recentf-open-files-item)
-       (recentf-open-files): Replaced unnecessary `mapcar' with new
+       (recentf-open-files): Replace unnecessary `mapcar' with new
        built-in `mapc'.
 
 2000-11-23  Miles Bader  <miles@gnu.org>
        since this function is only concerned with master state.
 
        * vc-hooks.el (vc-workfile-unchanged-p)
-       (vc-default-workfile-unchanged-p): Moved here from vc.el.
+       (vc-default-workfile-unchanged-p): Move here from vc.el.
 
        * vc.el (vc-workfile-unchanged-p)
        (vc-default-workfile-unchanged-p): See above.
        (vc-cvs-print-log, vc-cvs-diff): Use asynchronous mode only for
        remote repositories.
 
-       * vc.el (vc-annotate): Changed handling of prefix arg; now asks
+       * vc.el (vc-annotate): Change handling of prefix arg; now asks
        for both version and ratio in the minibuffer.
 
        * vc-cvs.el (vc-cvs-annotate-command): New optional arg VERSION.
 
 2000-11-15  Eli Zaretskii  <eliz@is.elta.co.il>
 
-       * textmodes/texinfo.el (texinfo-insert-@uref): Renamed from
+       * textmodes/texinfo.el (texinfo-insert-@uref): Rename from
        texinfo-insert-@url.
        (texinfo-insert-@url): A defalias for texinfo-insert-@uref.
        (texinfo-mode-map): Bind "C-c C-c u" to texinfo-insert-@uref.
 
 2000-11-06  Miles Bader  <miles@lsi.nec.co.jp>
 
-       * mwheel.el (mouse-wheel-scroll-amount): Renamed from
+       * mwheel.el (mouse-wheel-scroll-amount): Rename from
        `mwheel-scroll-amount'.
-       (mouse-wheel-follow-mouse): Renamed from `mwheel-follow-mouse'.
+       (mouse-wheel-follow-mouse): Rename from `mwheel-follow-mouse'.
        (mouse-wheel-mode): Use (featurep 'xemacs) instead of
        string-matching against the version string.
 
        * international/mule-conf.el (compound-text): Define this coding
        system here.  Make x-ctext and ctext aliases of it.
 
-       * language/european.el (compound-text, ctext): Moved to
+       * language/european.el (compound-text, ctext): Move to
        international/mule-conf.el.
 
 2000-11-05  Andrew Innes  <andrewi@gnu.org>
        (ps-color-device): Use `color-values' to determine if device
        supports color.
        (ps-color-values): Try to use `x-color-values' when using XEmacs.
-       (ps-print-page-p): Changed from defsubst to defun.
-       (ps-page-number): Changed from defmacro to defun.
+       (ps-print-page-p): Change from defsubst to defun.
+       (ps-page-number): Change from defmacro to defun.
        (ps-header-sheet, ps-header-page): Fix bug on selected pages for
        printing.
        (ps-print-ensure-fontified): Ensure fontification when jit-lock is on.
        (ps-end-file, ps-dummy-page): Funs eliminated.
-       (ps-print-color-scale): Changed default value.
+       (ps-print-color-scale): Change default value.
        (ps-page-n-up, ps-print-page-p): New internal vars.
        (ps-print-preprint, ps-output, ps-begin-file, ps-begin-page)
        (ps-plot-region, ps-generate, ps-end-job): Code fix.
 2000-10-31  Kenichi Handa  <handa@etl.go.jp>
 
        * term/mac-win.el (decode-mac-roman, encode-mac-roman, mac-roman):
-       Moved to european.el.
-       (ccl-encode-mac-roman-font, fontset-mac): Modified for
+       Move to european.el.
+       (ccl-encode-mac-roman-font, fontset-mac): Modify for
        mule-unicode-2500-33ff and mule-unicode-e000-ffff.
        (mac-roman-kbd-insert, mac-roman-kbd-mode): These functions deleted.
        (mac-roman-kbd-mode, mac-roman-kbd-mode-map): These variables deleted.
        * international/mule-cmds.el (encode-coding-char): Check property
        safe-chars instead of safe-charsets.
 
-       * international/fontset.el (fontset-default): Modified for
+       * international/fontset.el (fontset-default): Modify for
        mule-unicode-2500-33ff and mule-unicode-e000-ffff.
        (x-font-name-charset-alist): Likewise.
        (ccl-encode-unicode-font): New CCL program.  Record it in
 
        * eshell/esh-mode.el (window-height test): Make certain that
        `eshell-stringify-t' is non-nil.
-       (eshell-password-prompt-regexp): Changed to a much simpler
+       (eshell-password-prompt-regexp): Change to a much simpler
        password regexp.
        (eshell-send-input): If `eshell-invoke-directly' returns t,
        directly invoke the parsed command using `eval'.  This improves
        (eshell-rewrite-if-command): Use `eshell-protect' to wrap the call
        bodies.
        (eshell-separate-commands): Whitespace fix.
-       (eshell-complex-commands): Added a new list of names, for
+       (eshell-complex-commands): Add a new list of names, for
        determining whether a given command is as simple as it looks.
        (eshell-invoke-directly): New function.  Returns t if a command
        should be invoked directly (using `eval'), rather than indirectly
        * eshell/em-unix.el (eshell-default-target-is-dot): New variable,
        which provides an emulation of the DOS shell behavior of assuming
        that cp/mv/ln should copy/move/link to the current directory.
-       (eshell-remove-entries): Added a doc string.
-       (eshell-shuffle-files): Removed the check for `target' being null.
-       (eshell-mvcp-template, eshell-mvcpln-template): Renamed
-       `eshell-mvcp-template' to `eshell-mvcpln-template', and extended
+       (eshell-remove-entries): Add a doc string.
+       (eshell-shuffle-files): Remove the check for `target' being null.
+       (eshell-mvcp-template, eshell-mvcpln-template):
+       Rename `eshell-mvcp-template' to `eshell-mvcpln-template', and extended
        it to do a smarter check of whether a destination was provided.
        (eshell/mv, eshell/cp): Enable `:preserve-args'.
        (eshell/ln): Enable `:preserve-args', and use
        (eshell/du, eshell/diff, eshell/locate): Stringify the argument
        list after flattening it.  This makes it possible to cat files
        with numerical names.
-       (eshell-unix-initialize): Added several names to
+       (eshell-unix-initialize): Add several names to
        `eshell-complex-commands.
        (eshell-unix-command-complex-p): Return t if a given command name
        may result in external processes being invoked.
        (eshell-refresh-windows): Use `if' instead of `when'.
        (eshell-smart-scroll-window): Calling `save-current-buffer' was
        not necessary.
-       (eshell-currently-handling-window): Added a missing global variable.
+       (eshell-currently-handling-window): Add a missing global variable.
 
        * eshell/em-ls.el (eshell-do-ls): Code simplification.
        (eshell-ls-sort-entries, eshell-ls-entries, eshell-ls-dir):
        Whitespace fix.
-       (eshell-ls-exclude-hidden): Added this variable in addition to
+       (eshell-ls-exclude-hidden): Add this variable in addition to
        `eshell-ls-exclude-regexp'.  This one prevents files beginning
        with . from even being read, which can improve memory consumption
        quite a bit.
        read file entries beginning with a dot.  In home directories with
        lots of hidden files, fully two-thirds of the time spent in ls is
        used to read directory entries that are immediately thrown away.
-       (eshell-ls-initial-args): Added back this configuration variable,
+       (eshell-ls-initial-args): Add back this configuration variable,
        for specifying default initial arguments to every call to ls.
        Much faster than using an alias to do the same thing.
        (eshell-do-ls): Use `eshell-ls-initial-args', if set.
        * eshell/em-dirs.el (eshell/pwd): Small code simplification.
 
        * eshell/esh-util.el: Don't require `ange-ftp' if it's not available.
-       (eshell-stringify-t): Added a customization variable, to indicate
+       (eshell-stringify-t): Add a customization variable, to indicate
        whether `t' should be rendered as a string at all.  If not, one
        can still determine if the result of an expression is true using
        "file-exists-p FILE && echo true".
        * eshell/esh-module.el: Whitespace fix.
 
        * eshell/em-alias.el (eshell-alias-initialize):
-       Added `eshell-command-aliased-p' to `eshell-complex-commands'.
+       Add `eshell-command-aliased-p' to `eshell-complex-commands'.
        (eshell-command-aliased-p): New function that returns t if a
        command name names an aliased.
 
        characters.
        * viper-util.el (viper-memq-char, viper=): New functions for
        working with characters.
-       (viper-change-cursor-color): Fixed buglet.
+       (viper-change-cursor-color): Fix buglet.
        Many functions changed to use viper= instead of = when comparing
        characters.
-       * viper.el (viper-insert-state-mode-list): Added eshell.
+       * viper.el (viper-insert-state-mode-list): Add eshell.
 
        * ediff-init.el (ediff-before-setup-hook): New hook.
        Several typos fixed in various docstrings.
        (delimit-columns-end): New vars.
        (delimit-columns-customize, delimit-columns-format): New funs.
        (delimit-columns-region, delimit-columns-rectangle)
-       (delimit-columns-rectangle-line): Modified to support column
+       (delimit-columns-rectangle-line): Modify to support column
        formatting.
 
 2000-10-24  Dave Love  <fx@gnu.org>
 
        * woman.el (woman-italic-face, woman-bold-face)
        (woman-unknown-face): Add dark-background variants.
-       (woman-default-faces): Renamed from `woman-colour-faces'.
+       (woman-default-faces): Rename from `woman-colour-faces'.
        Set using the stored defaults, rather than using hard-wired colors.
-       (woman-monochrome-faces): Renamed from `woman-black-faces'.
+       (woman-monochrome-faces): Rename from `woman-black-faces'.
        Just make the foreground `unspecified' rather than "black".
        (woman-menu): Rename menu entries accordingly.
 
        (vc-delete-automatic-version-backups, vc-make-version-backup):
        New functions.
        (vc-before-save): Use the latter.
-       (vc-default-make-version-backups-p): Added `-p' suffix to avoid
+       (vc-default-make-version-backups-p): Add `-p' suffix to avoid
        confusion.
 
-       * vc-cvs.el (vc-cvs-make-version-backups-p): Added `-p' suffix as
+       * vc-cvs.el (vc-cvs-make-version-backups-p): Add `-p' suffix as
        expected by vc[-hooks].el.
 
-       * vc.el (vc-checkout): Added `-p' suffix in call to
+       * vc.el (vc-checkout): Add `-p' suffix in call to
        vc-make-version-backups-p; use vc-make-version-backup to actually
        make the backup.
        (vc-version-other-window, vc-version-backup-file): Handle both
 2000-10-22  Miles Bader  <miles@gnu.org>
 
        * comint.el (comint-highlight-input, comint-highlight-prompt):
-       Renamed, `-face' at end removed.
+       Rename, `-face' at end removed.
        (comint-send-input, comint-output-filter): Use renamed faces.
 
        * window.el (fit-window-to-buffer): Change defaulting of
 
        * dirtrack.el (dirtrack): Fix call to run-hooks.
 
-       * cmuscheme.el (cmuscheme-program-name): Renamed from
+       * cmuscheme.el (cmuscheme-program-name): Rename from
        scheme-program-name because xscheme.el contains a defcustom with
        the same name.  As a consequence, customizing group `cmuscheme'
        loaded `xscheme' which redefined run-scheme.
 
 2000-10-18  Miles Bader  <miles@gnu.org>
 
-       * comint.el (comint-delete-output): Renamed from `comint-kill-output'.
-       (comint-kill-output): Changed into an alias for `comint-delete-output',
+       * comint.el (comint-delete-output): Rename from `comint-kill-output'.
+       (comint-kill-output): Change into an alias for `comint-delete-output',
        and made obsolete.
        (comint-mode-map): Rename references to comint-kill-output.
 
 
        * diff-mode.el (diff-header-face, diff-file-header-face):
        Add specific setting for dark background.
-       (diff-context-face): Renamed from diff-comment-face.
+       (diff-context-face): Rename from diff-comment-face.
        Set explicitly rather than inheriting from font-lock-comment-face.
 
 2000-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
 
        * whitespace.el: Doc fixes.
        (top-level): Don't add hooks here.
-       (whitespace-running-emacs): Deleted.
+       (whitespace-running-emacs): Delete.
        (timer): Don't require.
        (whitespace): Add back :version conditional on xemacs test.
        (whitespace-spacetab-regexp, whitespace-indent-regexp)
 
 2000-10-13  John Wiegley  <johnw@gnu.org>
 
-       * eshell/esh-util.el (require): Added a missing `require' form,
+       * eshell/esh-util.el (require): Add a missing `require' form,
        needed when compiling (for an ange-ftp macro definition).
 
 2000-10-13  Dave Love  <fx@gnu.org>
 
 2000-10-13  Stephen Gildea  <gildea@stop.mail-abuse.org>
 
-       * time-stamp.el (time-stamp): Fixed bug in new multi-line code
+       * time-stamp.el (time-stamp): Fix bug in new multi-line code
        that breaks with old list format timestamps.
        (time-stamp-warn-inactive, time-stamp-old-format-warn)
-       (time-stamp-count, time-stamp-conversion-warn): Improved doc strings.
+       (time-stamp-count, time-stamp-conversion-warn): Improve doc strings.
 
 2000-10-13  John Wiegley  <johnw@gnu.org>
 
 
 2000-10-13  John Wiegley  <johnw@gnu.org>
 
-       * desktop.el (desktop-buffer-modes-to-save): Added a global for
+       * desktop.el (desktop-buffer-modes-to-save): Add a global for
        specifying what "other" kinds of buffers should be saved.
        This used to be hard-coded.
        (desktop-buffer-misc-functions): A global for specifying how
        (desktop-buffer-info-misc-data): Aux function for determining Info
        buffer auxiliary info.
        (desktop-buffer-dired-misc-data): Likewise, but for dired buffers.
-       (desktop-buffer-info): Changed this function to use the info
+       (desktop-buffer-info): Change this function to use the info
        gathered above.
        (desktop-create-buffer): Be a little more careful about what
        `minor-mode' means before calling it.  This is important for some
        (eshell-ls-annotate): Use `eshell-file-attributes'.
        (eshell-ls-file): Made the user-id printing code a bit smarter.
 
-       * eshell/esh-util.el (eshell-ange-ls-uids): Added variable, to
+       * eshell/esh-util.el (eshell-ange-ls-uids): Add variable, to
        allow identification of alias user ids in remote directories.
        It's manual, but there's no other way to know when the current user
        on the local machine, is also the owning user on the remote machine.
        full-fledged FTP client, with much more manipulation ability than
        most other clients.
 
-       * eshell/em-unix.el (eshell-du-prefer-over-ange): Added a new
+       * eshell/em-unix.el (eshell-du-prefer-over-ange): Add a new
        variable, which means that Eshell's du should always be preferred
        in remote directories.
        (eshell-shuffle-files): Use `eshell-file-attributes', rather than
        when reading remote directories.  This is an Eshell-specific
        variable (not part of ange-ftp).
        (eshell/ln): Bind `ange-cache'.
-       (eshell/du): Added some extra logic for determining when to use
+       (eshell/du): Add some extra logic for determining when to use
        Eshell's du (which is slow), and when to use the external version
        (which may or may not exist).
 
        `get-buffer-process', since backgrounded processes don't count in
        the context of this function's logic.
 
-       * eshell/esh-arg.el (eshell-parse-double-quote): Moved a call to
+       * eshell/esh-arg.el (eshell-parse-double-quote): Move a call to
        `forward-char', so that null strings are parsed correctly.
 
 2000-09-13  John Wiegley  <johnw@gnu.org>
 2000-10-12  Gerd Moellmann  <gerd@gnu.org>
 
        * startup.el (fancy-splash-screens): Don't add a pre-command hook.
-       (fancy-splash-pre-command, fancy-splash-pending-command): Removed.
+       (fancy-splash-pre-command, fancy-splash-pending-command): Remove.
        (command-line-1): Don't use fancy-splash-pending-command.
        (fancy-splash-screens-1): Goto point-min after inserting text.
 
        * progmodes/etags.el: Docstring fixes.  Maintainer line updated.
        (initialize-new-tags-table): Use run-hook-with-args-until-success.
        (find-tag): Use pop-to-buffer if switch-to-buffer failed.
-       (tags-table-format-functions): Renamed from tags-table-format-hooks.
+       (tags-table-format-functions): Rename from tags-table-format-hooks.
 
        * vc.el (vc-version-diff): diff-switches can be a list.
        Use relative filenames for prettier output.
        (jit-lock-unregister): Don't bother handling complex hooks any more.
        (jit-lock-refontify): New function.
        (jit-lock-fontify-buffer): Use it.
-       (jit-lock-function-1): Replaced by jit-lock-fontify-now.
-       (jit-lock-fontify-now): Renamed from jit-lock-function-1.
+       (jit-lock-function-1): Replace by jit-lock-fontify-now.
+       (jit-lock-fontify-now): Rename from jit-lock-function-1.
        Add optional args START and END.
        Never call font-lock-fontify-region directly.
        (jit-lock-function, jit-lock-stealth-fontify): Use it.
        * play/spook.el (spook-phrases-file): Use expand-file-name, not
        concat.
 
-       * emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression): Don't
-       insist on symbols starting with word syntax.
-       (lisp-mode-shared-map): Renamed from shared-lisp-mode-map.
+       * emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression):
+       Don't insist on symbols starting with word syntax.
+       (lisp-mode-shared-map): Rename from shared-lisp-mode-map.
        (eval-defun-1): Doc fix.
        (indent-sexp): Use nconc to build up indent-stack.
 
 
 2000-10-08  Eli Zaretskii  <eliz@is.elta.co.il>
 
-       * international/titdic-cnv.el (quail-cxterm-package-ext-info): Fix
-       typos in doc strings.
+       * international/titdic-cnv.el (quail-cxterm-package-ext-info):
+       Fix typos in doc strings.
 
        * font-lock.el (font-lock-mode, global-font-lock-mode): Mention in
        the doc strings how to customize Font Lock faces.
 
        * net/net-utils.el (nslookup-prompt-regexp, ftp-prompt-regexp)
        (smbclient-prompt-regexp): Add usage note to doc string.
-       (ftp-font-lock-keywords, smbclient-font-lock-keywords): Removed.
+       (ftp-font-lock-keywords, smbclient-font-lock-keywords): Remove.
        (ftp-mode, smbclient-mode): Don't set `font-lock-defaults'.
        Use add-hook for adding the comint filter function, and only do so
        if it's not already in the global hook list.
        (ftp-font-lock-keywords, smbclient-font-lock-keywords):
        Only set if window-system is non-nil.
        (net-utils-run-program): Returns buffer.
-       (network-connection-reconnect): Added this function.
+       (network-connection-reconnect): Add this function.
 
        * generic.el:
        Incorporates extensive cleanup and docfixes by
        (generic-mode-name, generic-comment-list)
        (generic-keywords-list, generic-font-lock-expressions)
        (generic-mode-function-list, generic-mode-syntax-table):
-       Removed variables.
-       (generic-mode-alist): Renamed to generic-mode-list.
+       Remove variables.
+       (generic-mode-alist): Rename to generic-mode-list.
        (generic-find-file-regexp): Default changed to "^#".
        (generic-read-type): Uses completing read on generic-mode-list.
-       (generic-mode-sanity-check): Removed this function.
-       (generic-add-to-auto-mode): Removed this function.
+       (generic-mode-sanity-check): Remove this function.
+       (generic-add-to-auto-mode): Remove this function.
        (generic-mode-internal): Bind mode-specific definitions
        into function instead of putting them in alist.
-       (generic-mode-set-comments): Reworked extensively.
-       (generic-mode-find-file-hook): Simplified regexp searching.
+       (generic-mode-set-comments): Rework extensively.
+       (generic-mode-find-file-hook): Simplify regexp searching.
        (generic-make-keywords-list): Omit extra pair of parens.
 
        * find-lisp.el (find-lisp-find-files-internal):
 
        * generic-x.el (apache-conf-generic-mode):
        Regexp now allows leading whitespace.
-       (rc-generic-mode): Added eval-when-compile
+       (rc-generic-mode): Add eval-when-compile
        around generic-make-keywords-list.
        Deleted duplicate regexp.
-       (rul-generic-mode): Added eval-when-compile
+       (rul-generic-mode): Add eval-when-compile
        around generic-make-keywords-list.
        (etc-fstab-generic-mode): New generic mode.
-       (rul-generic-mode): Removed one eval-when-compile
+       (rul-generic-mode): Remove one eval-when-compile
        which caused a max-specpdl-size exceeded error.
 
 2000-10-04  Miles Bader  <miles@gnu.org>
 
        * isearch.el (isearch-faces): New custom group.
        (isearch): New defface; was already tested for in the code.
-       (isearch-lazy-highlight-face): Changed to defface from defcustom.
+       (isearch-lazy-highlight-face): Change to defface from defcustom.
        (isearch-highlight): Always use face `isearch'.
 
 2000-10-02  Dave Love  <fx@gnu.org>
        is visited.
        (vc-start-entry): New argument initial-contents.  Don't visit the file
        if it isn't already visited.  Brought documentation up-to-date.
-       (vc-next-action, vc-register): Updated calls to vc-start-entry.
+       (vc-next-action, vc-register): Update calls to vc-start-entry.
        (vc-checkin): New optional arg initial-contents, which is passed to
        vc-start-entry.
        (vc-finish-logentry): Make sure to bury log buffer only if there
        really is one.  Call `vc-resynch-buffer' on log-file, not
        buffer-file-name.
        (vc-default-comment-history, vc-default-wash-log): New functions.
-       (vc-index-of): Removed.
+       (vc-index-of): Remove.
        (vc-transfer-file): Make do without the above.
        (vc-default-receive-file): Call comment-history unconditionally.  Pass
        the resulting string to vc-checkin, instead of inserting it into the
 
 2000-10-01  Miles Bader  <miles@gnu.org>
 
-       * emacs-lisp/easy-mmode.el (easy-mmode-define-navigation): Call
-       `recenter' with an arg to prevent redrawing the display.
+       * emacs-lisp/easy-mmode.el (easy-mmode-define-navigation):
+       Call `recenter' with an arg to prevent redrawing the display.
 
 2000-09-30  Stefan Monnier  <monnier@cs.yale.edu>
 
        (latex-imenu-create-index): Use it.
        Move the regexp construction outside loops (and use push).
        (tex-font-lock-keywords-1, tex-font-lock-keywords-2)
-       (tex-font-lock-keywords): Moved from font-lock.el.
+       (tex-font-lock-keywords): Move from font-lock.el.
        (tex-comment-indent): Remove.
        (tex-common-initialization): Don't set comment-indent-function.
        (latex-block-default): New var.
 2000-09-29  Miles Bader  <miles@gnu.org>
 
        * image-file.el (image-file-name-extensions): New variable.
-       (image-file-name-regexps): Renamed from `image-file-regexps'.
+       (image-file-name-regexps): Rename from `image-file-regexps'.
        New default value is nil.  Call `auto-image-file-mode'.
        (image-file-name-regexp): New function.
        (auto-image-file-mode): New minor mode.
        type.
        (cperl-mode): Set normal-auto-fill-function and don't zap
        auto-fill-function.
-       (cperl-imenu--function-name-regexp-perl): Renamed from
+       (cperl-imenu--function-name-regexp-perl): Rename from
        imenu-example--function-name-regexp-perl.
-       (cperl-imenu--create-perl-index): Renamed from
+       (cperl-imenu--create-perl-index): Rename from
        imenu-example--create-perl-index.
        (cperl-xsub-scan): Don't require cl.
 
 2000-09-20  Dave Love  <fx@gnu.org>
 
        * iswitchb.el: Some doc fixes.
-       (iswitchb-mode-map): Define completely initially.  Inherit
-       minibuffer-local-map.
+       (iswitchb-mode-map): Define completely initially.
+       Inherit minibuffer-local-map.
        (iswitchb-completion-help) <!iswitchb-xemacs>: Use
        fundamental-mode.
        (iswitchb-global-map): New variable.
        * toolbar/tool-bar.el: Renamed from toolbar.el.
        Change `toolbar' to `tool-bar' generally in symbols.
        Make some items invisible in `special' major modes.
-       (tool-bar-add-item-from-menu): Renamed from toolbar-like-menu-item.
+       (tool-bar-add-item-from-menu): Rename from toolbar-like-menu-item.
        Add arg PROPS.
 
        * startup.el (fancy-splash-screen) <defgroup>: Fix syntax.
        * strokes.el: Sync with maintainer's current version with changes
        for Emacs, but avoid runtime cl and levents.
        (toplevel): Change autoloads and compilation requires.
-       (strokes-version, strokes-bug-address, strokes-lift): Values
-       changed.
+       (strokes-version, strokes-bug-address, strokes-lift):
+       Values changed.
        (strokes-xpm-header, strokes-insinuated): New variable.
        (strokes): Add :link.
        (strokes-mode): Customized.
        (strokes-xpm-encode-length-as-string, strokes-xpm-decode-char)
        (strokes-xpm-to-compressed-string, strokes-decode-buffer)
        (strokes-encode-buffer, strokes-xpm-for-compressed-string)
-       (strokes-compose-complex-stroke, strokes-alphabetic-lessp): New
-       functions.
+       (strokes-compose-complex-stroke, strokes-alphabetic-lessp):
+       New functions.
 
 2000-09-15  Gerd Moellmann  <gerd@gnu.org>
 
 2000-09-14  Alex Schroeder  <alex@gnu.org>
 
        * ansi-color.el (ansi-colors): Doc change.
-       (ansi-color-get-face): Simplified regexp.
-       (ansi-color-faces-vector): Added more faces, doc change.
+       (ansi-color-get-face): Simplify regexp.
+       (ansi-color-faces-vector): Add more faces, doc change.
        (ansi-color-names-vector): Doc change.
-       (ansi-color-regexp): Simplified regexp.
+       (ansi-color-regexp): Simplify regexp.
        (ansi-color-parameter-regexp): New regexp.
        (ansi-color-filter-apply): Doc change.
        (ansi-color-filter-region): Doc change.
        deal with zero length parameters.
        (ansi-color-apply-on-region): Doc change.
        (ansi-color-map): Doc change.
-       (ansi-color-map-update): Removed debugging message.
-       (ansi-color-get-face-1): Added condition-case to trap
+       (ansi-color-map-update): Remove debugging message.
+       (ansi-color-get-face-1): Add condition-case to trap
        args-out-of-range errors.
        (ansi-color-get-face): Doc change.
-       (ansi-color-make-face): Removed.
+       (ansi-color-make-face): Remove.
        (ansi-color-for-shell-mode): New option.
 
 2000-09-13  Kenichi Handa  <handa@etl.go.jp>
 
 2000-09-12  Kenichi Handa  <handa@etl.go.jp>
 
-       * international/quail.el (quail-define-package): Docstring
-       modified.
+       * international/quail.el (quail-define-package):
+       Docstring modified.
 
 2000-09-12  Kenichi Handa  <handa@etl.go.jp>
 
-       * international/titdic-cnv.el (quail-cxterm-package-ext-info): Add
-       extra docstrings for "chinese-ccdospy", "chinese-ecdict",
+       * international/titdic-cnv.el (quail-cxterm-package-ext-info):
+       Add extra docstrings for "chinese-ccdospy", "chinese-ecdict",
        "chinese-etzy", "chinese-sw", and "chinese-ziranma".  Modify the
        docstring of "chinese-py".
 
-       * international/quail.el (quail-translation-docstring): New
-       variable.
+       * international/quail.el (quail-translation-docstring):
+       New variable.
        (quail-show-keyboard-layout): Docstring modified.
        (quail-select-current): Likewise.
        (quail-build-decode-map): Change arg MAP to MAP-LIST to avoid
        infinite recursive call.
        (quail-help): Check quail-translation-docstring.  Format of the
        output changed.
-       (quail-help-insert-keymap-description): Adjusted for the above
+       (quail-help-insert-keymap-description): Adjust for the above
        change.
 
 2000-09-11  Gerd Moellmann  <gerd@gnu.org>
 
 2000-09-07  Kenichi Handa  <handa@etl.go.jp>
 
-       * help.el (help-make-xrefs): Adjusted for the change of
+       * help.el (help-make-xrefs): Adjust for the change of
        help-xref-mule-regexp.
        (help-insert-xref-button): New function.
 
        (vc-merge): Use RET for first version to trigger merge-news, not
        prefix arg.
        (vc-annotate): Handle backends that do not support annotation.
-       (vc-default-merge-news): Removed.  The existence of a merge-news
+       (vc-default-merge-news): Remove.  The existence of a merge-news
        implementation is now checked on caller sites.
 
-       * vc-hooks.el (vc-default-mode-line-string): Removed CVS special
+       * vc-hooks.el (vc-default-mode-line-string): Remove CVS special
        case.
 
        * vc-cvs.el (vc-cvs-mode-line-string): New function, handles the
        (vc-after-save): Call `vc-dired-resynch-file' only if vc is loaded.
 
        * vc.el: Require dired-aux during compilation.
-       (vc-name-assoc-file): Moved to vc-sccs.el.
+       (vc-name-assoc-file): Move to vc-sccs.el.
        (with-vc-properties): New macro.
        (vc-checkin, vc-checkout, vc-revert, vc-cancel-version)
        (vc-finish-steal): Use it.
-       (vc-cancel-version): Moved RCS-specific code to vc-rcs.el.  The call
+       (vc-cancel-version): Move RCS-specific code to vc-rcs.el.  The call
        to the backend-specific function is now supposed to do the checkout,
        too.
        (vc-log-edit): Handle FILE being nil and added a FIXME for log-edit.
        * vc-cvs.el (vc-cvs-checkin, vc-cvs-checkout): Don't bother to
        set file properties; that gets done in the generic code now.
 
-       * vc-rcs.el (vc-rcs-uncheck): Renamed to `vc-rcs-cancel-version'.
+       * vc-rcs.el (vc-rcs-uncheck): Rename to `vc-rcs-cancel-version'.
        Changed parameter list, added code from vc.el that does the
        checkout, possibly with a double-take.
 
-       * vc-sccs.el (vc-sccs-name-assoc-file): Moved here from vc.el.
-       (vc-sccs-add-triple, vc-sccs-rename-file, vc-sccs-lookup-triple): Use
-       the above under the new name.
-       (vc-sccs-uncheck): Renamed to `vc-sccs-cancel-version'.  Changed
-       parameter list, added checkout command.
+       * vc-sccs.el (vc-sccs-name-assoc-file): Move here from vc.el.
+       (vc-sccs-add-triple, vc-sccs-rename-file, vc-sccs-lookup-triple):
+       Use the above under the new name.
+       (vc-sccs-uncheck): Rename to `vc-sccs-cancel-version'.
+       Changed parameter list, added checkout command.
        (vc-sccs-checkin, vc-sccs-checkout): Don't bother to set file
        properties; that gets done in the generic code now.
 
 
        * sql.el (sql-mode-menu): Work around missing variable mark-active
        in XEmacs.
-       (sql-mode): Added call to easy-menu-add for XEmacs compatibility.
-       (sql-interactive-mode): Added call to easy-menu-add for XEmacs
+       (sql-mode): Add call to easy-menu-add for XEmacs compatibility.
+       (sql-interactive-mode): Add call to easy-menu-add for XEmacs
        compatibility.
 
 2000-09-04  Gerd Moellmann  <gerd@gnu.org>
        (vc-default-could-register): New function.
        (vc-dired-buffers-for-dir, vc-dired-resynch-file): New functions.
        (vc-resynch-buffer): Call vc-dired-resynch-file.
-       (vc-start-entry, vc-finish-logentry, vc-revert-buffer): Use
-       vc-resynch-buffer instead of vc-resynch-window.
+       (vc-start-entry, vc-finish-logentry, vc-revert-buffer):
+       Use vc-resynch-buffer instead of vc-resynch-window.
        (vc-next-action-dired): Don't redisplay here, that gets done as a
        result of the individual file operations.
        (vc-retrieve-snapshot): Corrected prompt order.
 
        * vc-cvs.el (vc-cvs-stay-local): Allow it to be a hostname regexp
        as well.
-       (vc-cvs-remote-p): Renamed to vc-cvs-stay-local-p.  Handle
-       hostname regexps.  Updated all callers.
+       (vc-cvs-remote-p): Rename to vc-cvs-stay-local-p.
+       Handle hostname regexps.  Updated all callers.
        (vc-cvs-responsible-p): Handle directories as well.
        (vc-cvs-could-register): New function.
        (vc-cvs-retrieve-snapshot): Parse "cvs update" output, keep file
        (vc-dired-mode-map): Inherit from dired-mode-map.
        (vc-dired-mode): Local value of dired-move-to-filename-regexp
        simplified.
-       (vc-dired-state-info): Removed, updated caller.
+       (vc-dired-state-info): Remove, updated caller.
        (vc-default-dired-state-info): Use parentheses instead of hyphens.
        (vc-dired-hook): Use vc-BACKEND-dir-state, if available.
        (vc-dired-listing-switches): New variable.
        * vc.el (vc-next-action-on-file): Corrected several messages.
        (vc-merge): Add prefix arg `merge-news'; handle it.
 
-       * vc-cvs.el (vc-cvs-workfile-version): Removed comment that this
+       * vc-cvs.el (vc-cvs-workfile-version): Remove comment that this
        is not reached.  It is.
        (vc-cvs-merge): Set state to 'edited after merge.
        (vc-cvs-merge-news): Set workfile version to nil if not known.
        (vc-new-comment-index): New function.
        (vc-previous-comment): Use it.  Make the minibuffer message
        slightly less terse.
-       (vc-comment-search-reverse): Make it work forward as well.  Don't
-       set vc-comment-ring-index if no match is found.  Use
-       vc-new-comment-index.
+       (vc-comment-search-reverse): Make it work forward as well.
+       Don't set vc-comment-ring-index if no match is found.
+       Use vc-new-comment-index.
        (vc-comment-search-forward): Use vc-comment-search-reverse.
        (vc-dired-mode-map): Don't inherit from dired-mode-map since
        define-derived-mode will do it for us.  Bind `v' to a keymap that
        (vc-cvs-stay-local): Default to t.
        (vc-cvs-remote-p): New function and property.
        (vc-cvs-state): Stay local only if the above is t.
-       (vc-handle-cvs): Removed.
+       (vc-handle-cvs): Remove.
        (vc-cvs-registered): Don't check vc-handle-cvs -- it should all be
        done via vc-handled-backends now.
        (vc-cvs-header): Escape Id.
        * vc.el (vc-exec-after): Fix disassembly of previous sentinel.
        (vc-print-log): Search current revision from beginning of buffer.
        (vc-revert-buffer): Clear echo area after the diff is finished.
-       (vc-prefix-map): Removed definition of "t" for terse display in vc
+       (vc-prefix-map): Remove definition of "t" for terse display in vc
        dired.
-       (vc-dired-mode-map): Inherit from dired-mode-map.  Added
-       definition of "vt" for terse display.
+       (vc-dired-mode-map): Inherit from dired-mode-map.
+       Added definition of "vt" for terse display.
        (vc-dired-mode): Fix dired-move-to-filename-regexp.
 
 2000-09-04  Stefan Monnier  <monnier@cs.yale.edu>
        (vc-print-log): Use vc-exec-after and use log-view-goto-rev if
        present.
 
-       * vc-sccs.el (vc-sccs-state-heuristic): Use
-       file-ownership-preserved-p.
+       * vc-sccs.el (vc-sccs-state-heuristic):
+       Use file-ownership-preserved-p.
 
-       * vc-rcs.el (vc-rcs-state-heuristic): Use
-       file-ownership-preserved-p.
+       * vc-rcs.el (vc-rcs-state-heuristic):
+       Use file-ownership-preserved-p.
        (vc-rcs-checkout): Remove the error-handling for missing-rcs.
 
 2000-09-04  Andre Spiegel  <spiegel@gnu.org>
        current buffer without any fuss'.
        (vc-version-diff): Change the `diff' backend operation to just put
        the diff in the current buffer without erasing it.  Always use
-       *vc-diff* even for directory-diffs.  Use vc-setup-buffer.  Protect
-       shrink-window-if-larger-than-buffer.
+       *vc-diff* even for directory-diffs.  Use vc-setup-buffer.
+       Protect shrink-window-if-larger-than-buffer.
        (vc-print-log): Change the `print-log' backend operation to just
-       put the log in the current buffer without erasing it.  Protect
-       shrink-window-if-larger-than-buffer.
+       put the log in the current buffer without erasing it.
+       Protect shrink-window-if-larger-than-buffer.
        (vc-update-change-log): Fix setd typo.
 
        * vc-sccs.el (vc-sccs-workfile-unchanged-p): Fix parenthesis.
        (vc-rcs-diff): Insert in the current buffer and remove unused arg
        CMP.
 
-       * vc-cvs.el (vc-cvs-state, vc-cvs-fetch-status): Use
-       with-temp-file.  Use the new BUFFER=t argument to vc-do-command.
+       * vc-cvs.el (vc-cvs-state, vc-cvs-fetch-status):
+       Use with-temp-file.  Use the new BUFFER=t argument to vc-do-command.
        (vc-cvs-print-log, vc-cvs-diff): Insert in the current buffer.
 
 2000-09-04  Andre Spiegel  <spiegel@gnu.org>
        (vc-default-workfile-unchanged-p): New function.  Delegates to a
        full vc-BACKEND-diff.
 
-       * vc-hooks.el (vc-simple-command): Removed.
+       * vc-hooks.el (vc-simple-command): Remove.
 
        * vc-rcs.el (vc-rcs-workfile-unchanged-p): Use vc-do-command
        instead of vc-simple-command.
-       (vc-rcs-fetch-master-state): Removed check for unlocked-changes to
+       (vc-rcs-fetch-master-state): Remove check for unlocked-changes to
        avoid doing a diff when opening a file.
-       (vc-rcs-state): Added check for unlocked-changes.
+       (vc-rcs-state): Add check for unlocked-changes.
        (vc-rcs-header): Escape Id.
        (vc-rcs-workfile-unchanged-p): Remove optional arg VERSION.
        (vc-rcs-state): Call vc-workfile-unchanged-p, not the RCS-specific
 
 2000-09-04  Stefan Monnier  <monnier@cs.yale.edu>
 
-       * vc.el (vc-editable-p): Renamed from vc-writable-p.
+       * vc.el (vc-editable-p): Rename from vc-writable-p.
        (with-vc-file, vc-merge): Use vc-editable-p.
        (vc-do-command): Remove unused var vc-file and fix the
        doubly-defined `status' var.  Add a user message when starting an
        way the function itself works.
        (vc-file-owner): Remove.
 
-       * vc-cvs.el (vc-cvs-registered): Use with-temp-buffer.  Reorder
-       extraction of fields and call to file-attributes because of a
+       * vc-cvs.el (vc-cvs-registered): Use with-temp-buffer.
+       Reorder extraction of fields and call to file-attributes because of a
        temporary bug in rcp.el.
        (vc-cvs-fetch-status): Use with-current-buffer.
 
        * vc-rcs.el (vc-rcs-exists): Remove.
        (vc-rcs-header): New var.
 
-       * vc-sccs.el (vc-sccs-responsible-p, vc-sccs-register): Use
-       `vc-sccs-search-project-dir' instead of `vc-sccs-project-dir'.
+       * vc-sccs.el (vc-sccs-responsible-p, vc-sccs-register):
+       Use `vc-sccs-search-project-dir' instead of `vc-sccs-project-dir'.
        (vc-sccs-header): New var.
 
        * vc.el (vc-do-command): Get rid of the `last' argument.
        (vc-cancel-version): prettify error message with \\[...].
        (vc-rename-master): New function.
        (vc-rename-file): Use vc-BACKEND-rename-file (which might in turn
-       use vc-rename-master) instead of vc-BACKEND-record-rename.  Make
-       the CVS special case generic.
+       use vc-rename-master) instead of vc-BACKEND-record-rename.
+       Make the CVS special case generic.
        (vc-default-record-rename): Remove.
        (vc-file-tree-walk-internal): Only call FUNC for files that are
        under control of some VC backend and replace `concat' with
        (vc-version-diff, vc-snapshot-precondition, vc-create-snapshot)
        (vc-retrieve-snapshot): Update call to vc-file-tree-walk.
 
-       * vc-sccs.el (vc-sccs-rename-file): Renamed from
+       * vc-sccs.el (vc-sccs-rename-file): Rename from
        vc-sccs-record-rename.  Use `find-file-noselect' rather than
        `find-file' and call `vc-rename-master' to do the actual move.
        (vc-sccs-diff): Remove unused `backend' variable.
 
 2000-09-04  Stefan Monnier  <monnier@cs.yale.edu>
 
-       * vc.el (vc-locking-user): Moved from vc-hooks.el.
+       * vc.el (vc-locking-user): Move from vc-hooks.el.
 
 2000-09-04  Stefan Monnier  <monnier@cs.yale.edu>
 
        using the default function.
        (vc-call-backend): If calling the default function, pass it the
        backend as first argument.  Update the docstring accordingly.
-       (vc-default-state-heuristic, vc-default-mode-line-string): Update
-       for the new backend argument.
-       (vc-make-backend-sym): Renamed from vc-make-backend-function.
+       (vc-default-state-heuristic, vc-default-mode-line-string):
+       Update for the new backend argument.
+       (vc-make-backend-sym): Rename from vc-make-backend-function.
        (vc-find-backend-function): Use the new name.
        (vc-default-registered): New function.
 
 
 2000-09-04  Andre Spiegel  <spiegel@gnu.org>
 
-       * vc.el (vc-file-clear-masterprops): Removed.
-       (vc-checkin, vc-revert-buffer): Removed calls to the above.
+       * vc.el (vc-file-clear-masterprops): Remove.
+       (vc-checkin, vc-revert-buffer): Remove calls to the above.
        (vc-version-diff): Use buffer-size without argument.
        (vc-register): Heed vc-initial-comment.
 
 
        * vc-rcs.el (vc-rcs-register): Parse command output to find master
        file name and workfile version.
-       (vc-rcs-checkout): Removed call to vc-file-clear-masterprops.
+       (vc-rcs-checkout): Remove call to vc-file-clear-masterprops.
 
-       * vc-cvs.el (vc-cvs-merge-news, vc-cvs-checkout): Removed call to
+       * vc-cvs.el (vc-cvs-merge-news, vc-cvs-checkout): Remove call to
        vc-file-clear-masterprops.
 
-       * vc-sccs.el (vc-sccs-checkout): Removed call to
+       * vc-sccs.el (vc-sccs-checkout): Remove call to
        vc-file-clear-masterprops.  If writable, set vc-state to 'edited
        rather than user login name.
 
 2000-09-04  Andre Spiegel  <spiegel@gnu.org>
 
        * vc.el (with-vc-file, vc-next-action, vc-version-diff)
-       (vc-dired-mark-locked): Replaced usage of vc-locking-user with
+       (vc-dired-mark-locked): Replace usage of vc-locking-user with
        vc-state or vc-up-to-date-p.
        (vc-merge): Use vc-backend-defines to check whether merging is
        possible.  Set state to 'edited after successful merge.
        * vc-cvs.el (vc-cvs-print-log, vc-cvs-diff): Run cvs asynchronously.
 
        * vc.el (vc-do-command): kill-all-local-variables, to reset any
-       major-mode in which the buffer might have been put earlier.  Use
-       `remove' and `when'.  Allow `okstatus' to be `async' and use
+       major-mode in which the buffer might have been put earlier.
+       Use `remove' and `when'.  Allow `okstatus' to be `async' and use
        `start-process' in this case.
        (vc-version-diff): Handle the case where the diff looks empty
        because of the use of an async process.
 
 2000-09-04  Andre Spiegel  <spiegel@gnu.org>
 
-       * vc.el (vc-next-action-on-file): Removed optional parameter
+       * vc.el (vc-next-action-on-file): Remove optional parameter
        `simple'.  Recompute state unconditionally.
-       (vc-default-toggle-read-only): Removed.
+       (vc-default-toggle-read-only): Remove.
 
-       * vc-hooks.el (vc-backend-functions): Removed vc-toggle-read-only.
+       * vc-hooks.el (vc-backend-functions): Remove vc-toggle-read-only.
        (vc-toggle-read-only): Undid prev change.
 
-       * vc-cvs.el (vc-cvs-stay-local): Renamed from
+       * vc-cvs.el (vc-cvs-stay-local): Rename from
        vc-cvs-simple-toggle.  Redocumented.
        (vc-cvs-state): If locality is wanted, use vc-cvs-state-heuristic.
-       (vc-cvs-toggle-read-only): Removed.
+       (vc-cvs-toggle-read-only): Remove.
 
 2000-09-04  Stefan Monnier  <monnier@cs.yale.edu>
 
        (vc-dired-mode-map): Properly defvar it.
        (vc-print-log): Call log-view-mode if available.
        (small-temporary-file-directory): defvar instead of use boundp.
-       (vc-merge-news): Moved to vc-cvs.el.
+       (vc-merge-news): Move to vc-cvs.el.
        (vc-default-merge-news): New function.
 
        * vc-sccs.el: Require 'vc and 'vc-sccs-hooks.
        call to vc-rcs-latest-on-branch-p.  Hopefully that was the right one.
 
        * vc-rcs-hooks.el: Provide 'vc-rcs-hooks.
-       (vc-rcs-trunk-p, vc-rcs-branch-part): Moved from vc-rcs.el.
+       (vc-rcs-trunk-p, vc-rcs-branch-part): Move from vc-rcs.el.
        (vc-rcs-latest-on-branch-p): Use the `version' argument rather
        than the apparently unbound `workfile-version'.
 
        * vc-cvs.el (vc-cvs-checkout): Docstring fix.  Added a `(if
        workfile' that got lost when the code was extracted from vc.el.
        And merged the tail with the rest of the code (not possible in the
-       old vc.el where the tail was shared among all backends).  And
-       explicitly set the state to 'edited if `writable' is set.
+       old vc.el where the tail was shared among all backends).
+       And explicitly set the state to 'edited if `writable' is set.
 
        * vc-cvs-hooks.el (vc-cvs-registered): Use expand-file-name.
        (vc-cvs-state): Be careful to return the value from
        workfile was nil).
 
        * vc.el: Removed those pesky unnecessary `(function' quotes.
-       (vc-annotate-mode-map, vc-annotate-mode-syntax-table): Initialize
-       directly in the defvar.
+       (vc-annotate-mode-map, vc-annotate-mode-syntax-table):
+       Initialize directly in the defvar.
        (vc-do-command): Bind inhibit-read-only so as to properly handle
        the case where the destination buffer has been made read-only.
        (vc-diff): Delegate to vc-version-diff in all cases.
        (vc-version-diff): Setup the *vc-diff* buffer as was done in vc-diff.
-       (vc-annotate-mode-variables): Removed (code moved partly to
+       (vc-annotate-mode-variables): Remove (code moved partly to
        defvars and partly to vc-annotate-add-menu).
        (vc-annotate-mode): Turned into a derived-mode.
-       (vc-annotate-add-menu): Moved in code in
+       (vc-annotate-add-menu): Move in code in
        vc-annotate-mode-variables.
        (vc-update-change-log): Use make-temp-file if available.
 
 
 2000-09-04  Andre Spiegel  <spiegel@inf.fu-berlin.de>
 
-       * vc.el (vc-next-action-on-file): Added handling of state
+       * vc.el (vc-next-action-on-file): Add handling of state
        `unlocked-changes'.
        (vc-checkout-carefully): Is now practically obsolete, unless the
        above is too slow to be enabled unconditionally.
-       (vc-update-change-log): Fixed typo.
+       (vc-update-change-log): Fix typo.
 
-       * vc-sccs.el (vc-sccs-steal-lock): Renamed from `vc-sccs-steal'.
+       * vc-sccs.el (vc-sccs-steal-lock): Rename from `vc-sccs-steal'.
 
        * vc-sccs-hooks.el (vc-sccs-state): Somewhat rewritten.
        Now handles state `unlocked-changes'.
        (vc-sccs-workfile-unchanged-p): New function, to support the above.
 
-       * vc-rcs.el (vc-rcs-steal-lock): Renamed from `vc-rcs-steal'.
+       * vc-rcs.el (vc-rcs-steal-lock): Rename from `vc-rcs-steal'.
 
-       * vc-rcs-hooks.el (vc-rcs-state): Fixed typo.
+       * vc-rcs-hooks.el (vc-rcs-state): Fix typo.
        (vc-rcs-fetch-master-state): Bug fixes.  Recognize state
        `unlocked-changes'.
-       (vc-rcs-workfile-unchanged-p): Renamed from
+       (vc-rcs-workfile-unchanged-p): Rename from
        `vc-rcs-workfile-unchanged'.  This is not a real backend-specific
        function yet, but supposed to become one soon.
 
-       * vc-hooks.el (vc-backend-functions): Renamed `vc-steal' to
+       * vc-hooks.el (vc-backend-functions): Rename `vc-steal' to
        `vc-steal-lock'.
-       (vc-call-backend): Changed error message.
-       (vc-state): Added description of state `unlocked-changes'.
+       (vc-call-backend): Change error message.
+       (vc-state): Add description of state `unlocked-changes'.
 
 2000-09-04  Andre Spiegel  <spiegel@inf.fu-berlin.de>
 
-       * vc-cvs-hooks.el (vc-cvs-registered): Fixed bug that caused it to
+       * vc-cvs-hooks.el (vc-cvs-registered): Fix bug that caused it to
        always return t in CVS-controlled directories.
 
        * vc.el (vc-responsible-backend): New function.
        (vc-register): Largely rewritten.
-       (vc-admin): Removed (implementation moved into vc-register).
+       (vc-admin): Remove (implementation moved into vc-register).
        (vc-checkin): Redocumented.
        (vc-finish-logentry): If no backend defined yet (because we are in
        the process of registering), use the responsible backend.
 
        * vc-hooks.el (vc-backend-hook-functions, vc-backend-functions):
-       Updated function lists.
-       (vc-call-backend): Fixed typo.
+       Update function lists.
+       (vc-call-backend): Fix typo.
 
        * vc-sccs.el, vc-rcs.el, vc-cvs.el (vc-BACKEND-responsible-p):
        New functions.
-       (vc-BACKEND-register): Renamed from `vc-BACKEND-admin'.
+       (vc-BACKEND-register): Rename from `vc-BACKEND-admin'.
        Removed query option.  Redocumented.
 
 2000-09-04  Andre Spiegel  <spiegel@inf.fu-berlin.de>
 
 2000-09-04  Martin Lorentzson  <martinl@gnu.org>
 
-       * vc-rcs.el (vc-rcs-backend-release-p): function added.  other
-       stuff updated to reference this function instead of the old
+       * vc-rcs.el (vc-rcs-backend-release-p): function added.
+       other stuff updated to reference this function instead of the old
        `vc-backend-release-p'.
 
 2000-09-04  Andre Spiegel  <spiegel@inf.fu-berlin.de>
 
-       * vc-sccs-hooks.el (vc-uses-locking): Renamed to
+       * vc-sccs-hooks.el (vc-uses-locking): Rename to
        vc-checkout-model.  Return appropriate values.  Updated callers.
 
 2000-09-04  Martin Lorentzson  <martinl@gnu.org>
 
-       * vc.el (vc-backend-release, vc-backend-release-p): Moved to vc-rcs.el.
+       * vc.el (vc-backend-release, vc-backend-release-p): Move to vc-rcs.el.
        (vc-backend-revert): Function moved into `vc-revert';
        `vc-next-action' must be updated to accommodate this change.
        (vc-backend-steal): Function moved into `vc-finish-steal'.
 2000-09-04  Andre Spiegel  <spiegel@inf.fu-berlin.de>
 
        * vc.el (vc-next-action-on-file): Rewritten for the new state model.
-       (vc-backend-merge-news): Renamed to `vc-merge-news'.  (Specific parts
+       (vc-backend-merge-news): Rename to `vc-merge-news'.  (Specific parts
        still need to be split, and implemented for RCS).
 
 2000-09-04  Martin Lorentzson  <martinl@gnu.org>
 
        * vc-sccs-hooks.el (vc-sccs-state-heuristic): Bug found and fixed.
 
-       * vc-sccs.el (vc-sccs-admin): Added the query-only option as
+       * vc-sccs.el (vc-sccs-admin): Add the query-only option as
        required by the vc.el file.
 
-       * vc-rcs.el (vc-rcs-admin): Added the query-only option as
+       * vc-rcs.el (vc-rcs-admin): Add the query-only option as
        required by the vc.el file.
        (vc-rcs-exists): Function added.
 
-       * vc-cvs.el (vc-cvs-admin): Added the query-only option as
+       * vc-cvs.el (vc-cvs-admin): Add the query-only option as
        required by the vc.el file.
 
-       * vc.el (vc-admin): Updated to handle selection of appropriate
+       * vc.el (vc-admin): Update to handle selection of appropriate
        backend.  Current implementation is crufty and need re-thinking.
 
        * vc-hooks.el (vc-parse-buffer): Bug found and fixed.
 
 2000-09-04  Martin Lorentzson  <martinl@gnu.org>
 
-       * vc-cvs.el (vc-cvs-annotate-difference): Updated to handle
+       * vc-cvs.el (vc-cvs-annotate-difference): Update to handle
        beginning of annotate buffers correctly.
 
        * vc.el (vc-annotate-get-backend, vc-annotate-display-default)
 
 2000-09-04  Martin Lorentzson  <martinl@gnu.org>
 
-       * vc-sccs-hooks.el (vc-sccs-registered): Updated.
+       * vc-sccs-hooks.el (vc-sccs-registered): Update.
 
-       * vc-rcs-hooks.el (vc-rcs-registered): Updated.
+       * vc-rcs-hooks.el (vc-rcs-registered): Update.
 
-       * vc-cvs-hooks.el (vc-cvs-registered): Updated.
+       * vc-cvs-hooks.el (vc-cvs-registered): Update.
 
 2000-09-04  Martin Lorentzson  <martinl@gnu.org>
 
        * vc-hooks.el (vc-master-templates): Is really obsolete.
        Comment out the definition for now.  What is the right procedure
        to get rid of it?
-       (vc-registered, vc-backend, vc-buffer-backend, vc-name): Largely
-       rewritten.
+       (vc-registered, vc-backend, vc-buffer-backend, vc-name):
+       Largely rewritten.
        (vc-default-registered): Remove.
        (vc-check-master-templates): New function; does mostly what the
        above did before.
        * vc.el (vc-backend-checkout): Function removed and replaced in
        the vc-backend.el files.
 
-       * vc-sccs.el (vc-sccs-checkout): Added function `vc-sccs-checkout'.
+       * vc-sccs.el (vc-sccs-checkout): Add function `vc-sccs-checkout'.
 
-       * vc.el (vc-backend-admin): Removed and replaced in the
+       * vc.el (vc-backend-admin): Remove and replaced in the
        vc-backend.el files.
 
-       * vc.el (Martin): Removed all the annotate functionality since it
+       * vc.el (Martin): Remove all the annotate functionality since it
        is CVS backend specific.
 
 2000-09-04  Andre Spiegel  <spiegel@inf.fu-berlin.de>
        (vc-logentry-check-hook): New option.
        (vc-steal-lock): Use compose-mail.
        (vc-dired-mode-map): Defvar when compiling.
-       (vc-add-triple, vc-record-rename, vc-lookup-triple): Moved to
+       (vc-add-triple, vc-record-rename, vc-lookup-triple): Move to
        vc-sccs.el and renamed.  Callers changed.
        (vc-backend-checkout, vc-backend-logentry-check)
        (vc-backend-merge-news): Doc fix.
        (vc-rcs-checkin): New functions (code from vc.el).
        (vc-rcs-previous-version, vc-rcs-system-release, vc-rcs-checkout):
        Doc fix.
-       (vc-rcs-release): Deleted.  (Duplicated vc-rcs-system-release).
+       (vc-rcs-release): Delete.  (Duplicated vc-rcs-system-release).
 
        * vc-sccs.el: Require vc when compiling.
        (vc-sccs-print-log, vc-sccs-assign-name, vc-sccs-merge)
        (vc-sccs-checkin, vc-sccs-logentry-check): New functions (code
        from vc.el).
        (vc-sccs-add-triple, vc-sccs-record-rename)
-       (vc-sccs-lookup-triple): Moved from vc.el and renamed.
+       (vc-sccs-lookup-triple): Move from vc.el and renamed.
        (vc-sccs-admin): Doc fix.
 
 2000-09-04  Martin Lorentzson  <martinl@gnu.org>
        (vc-rcs-release-p, vc-rcs-admin, vc-rcs-checkout): New functions
        from vc.el.
 
-       * vc-sccs.el (vc-admin-sccs): Added from vc.el
+       * vc-sccs.el (vc-admin-sccs): Add from vc.el
 
        * vc-cvs.el: Moved the annotate functionality from vc.el.
-       (vc-cvs-admin, vc-cvs-fetch-status): Added from vc.el.
+       (vc-cvs-admin, vc-cvs-fetch-status): Add from vc.el.
 
 2000-09-04  Dave Love  <fx@gnu.org>
 
        * vc.el (vc-backend-release): Call vc-system-release.
 
        * vc-sccs.el (vc-sccs-system-release):
-       Renamed from vc-sccs-backend-release.
+       Rename from vc-sccs-backend-release.
 
        * vc-rcs.el (vc-rcs-system-release):
-       Renamed from vc-rcs-backend-release.
+       Rename from vc-rcs-backend-release.
 
        * vc-cvs.el (vc-cvs-system-release):
-       Renamed from vc-cvs-backend-release.
+       Rename from vc-cvs-backend-release.
 
 2000-09-04  Dave Love  <fx@gnu.org>
 
-       * vc.el (vc-rcs-release, vc-cvs-release, vc-sccs-release): Moved to
+       * vc.el (vc-rcs-release, vc-cvs-release, vc-sccs-release): Move to
        backend files.
        (vc-backend-release): Dispatch to backend functions.
        (vc-backend-release-p): Don't mention CVS, RCS.  [The SCCS case
        probably needs attention.]
 
-       * vc-sccs.el, vc-rcs.el (vc-sccs-release): Moved from vc.el.
+       * vc-sccs.el, vc-rcs.el (vc-sccs-release): Move from vc.el.
        (vc-sccs-backend-release): New function.
 
-       * vc-cvs.el (vc-cvs-release): Moved from vc.el.
+       * vc-cvs.el (vc-cvs-release): Move from vc.el.
        (vc-cvs-backend-release): New function.
 
        * vc.el (vc-dired-mode, vc-dired-reformat-line, vc-dired-purge):
        Doc fix.
-       (vc-fetch-cvs-status): Moved to vc-cvs.el and renamed.
+       (vc-fetch-cvs-status): Move to vc-cvs.el and renamed.
        (vc-default-dired-state-info): New function.
        (vc-dired-state-info): Dispatch to backends.
        (vc-dired-hook): Doc fix.  Simplify, pending removal of CVS specifics.
 
-       * vc-cvs.el (vc-cvs-dired-state-info, vc-cvs-fetch-status): Moved
-       from vc.el and renamed.
+       * vc-cvs.el (vc-cvs-dired-state-info, vc-cvs-fetch-status):
+       Move from vc.el and renamed.
 
 2000-09-04  Andre Spiegel  <spiegel@inf.fu-berlin.de>
 
        * vc.el (vc-file-clear-masterprops, vc-latest-on-branch-p)
-       (vc-version-other-window, vc-backend-assign-name): Removed
-       references to vc-latest-version; sometimes changed into
+       (vc-version-other-window, vc-backend-assign-name):
+       Remove references to vc-latest-version; sometimes changed into
        vc-workfile-version.
 
-       * vc-rcs-hooks.el (vc-master-workfile-version): Renamed to
+       * vc-rcs-hooks.el (vc-master-workfile-version): Rename to
        vc-rcs-master-workfile-version.
        (vc-rcs-workfile-version): Use the above.  Don't call
        vc-latest-version (that was unreachable code, anyway).
        (vc-rcs-fetch-master-properties): Doc fix.
 
-       * vc-hooks.el (vc-latest-version, vc-your-latest-version): Removed.
-       (vc-backend-hook-functions): Removed them from this list, too.
-       (vc-fetch-properties): Removed.
+       * vc-hooks.el (vc-latest-version, vc-your-latest-version): Remove.
+       (vc-backend-hook-functions): Remove them from this list, too.
+       (vc-fetch-properties): Remove.
        (vc-workfile-version): Doc fix.
 
        * vc-rcs-hooks.el (vc-rcs-consult-headers): New function.
        (vc-rcs-uses-locking): Use it.
 
        * vc-hooks.el (vc-consult-rcs-headers):
-       Moved into vc-rcs-hooks.el, under the name
+       Move into vc-rcs-hooks.el, under the name
        vc-rcs-consult-headers.
 
        * vc-cvs-hooks.el (vc-cvs-workfile-version): Don't consult RCS
        New functions.
 
        * vc-hooks.el (vc-master-locks, vc-master-locking-user):
-       Moved into both
+       Move into both
        vc-rcs-hooks.el and vc-sccs-hooks.el.  These properties and access
        functions are implementation details of those two backends.
 
        * vc-cvs-hooks.el (vc-cvs-fetch-master-properties): CVS-specific
        code moved here from vc-hooks.
 
-       * vc-hooks.el (vc-parse-locks, vc-fetch-master-properties): Split
-       into back-end specific parts and removed.  Callers not updated
+       * vc-hooks.el (vc-parse-locks, vc-fetch-master-properties):
+       Split into back-end specific parts and removed.  Callers not updated
        yet; because I guess these callers will disappear into back-end
        specific files anyway.
 
 2000-09-04  Andre Spiegel  <spiegel@inf.fu-berlin.de>
 
        * vc.el (with-vc-file, vc-next-action-on-file, vc-merge)
-       (vc-backend-checkout): Changed calls to `vc-checkout-model' to
+       (vc-backend-checkout): Change calls to `vc-checkout-model' to
        `vc-uses-locking'.
 
-       * vc-hooks.el (vc-checkout-model): Renamed to vc-uses-locking.
+       * vc-hooks.el (vc-checkout-model): Rename to vc-uses-locking.
        Store yes/no in the property, and return t/nil.  Updated all
        callers.
 
-       * vc-sccs-hooks.el (vc-sccs-checkout-model): Renamed to
+       * vc-sccs-hooks.el (vc-sccs-checkout-model): Rename to
        vc-sccs-uses-locking.  Don't set property.
        (vc-sccs-locking-user): Don't set property.
 
-       * vc-cvs-hooks.el (vc-cvs-checkout-model): Renamed to
+       * vc-cvs-hooks.el (vc-cvs-checkout-model): Rename to
        vc-cvs-uses-locking.  Don't set property here; leave that to
        vc-hooks.
        (vc-cvs-locking-user): Reflect above change.  Streamlined.
 
-       * vc-rcs-hooks.el (vc-rcs-checkout-model): Renamed to
+       * vc-rcs-hooks.el (vc-rcs-checkout-model): Rename to
        vc-rcs-uses-locking.
        (vc-rcs-locking-user): Reflect above change.
 
 2000-09-04  Dave Love  <fx@gnu.org>
 
        * vc-hooks.el (vc-rcsdiff-knows-brief, vc-rcs-lock-from-diff)
-       (vc-master-workfile-version): Moved from vc-hooks.
+       (vc-master-workfile-version): Move from vc-hooks.
 
        * vc-rcs-hooks.el: Fix duplicate code in last change.
 
        * vc-rcs-hooks.el: Require vc-hooks when compiling.
        (vc-rcs-master-templates): Improve :type.
        (vc-rcsdiff-knows-brief, vc-rcs-lock-from-diff)
-       (vc-master-workfile-version): Moved from vc-hooks.
+       (vc-master-workfile-version): Move from vc-hooks.
 
        * vc-sccs-hooks.el: Require vc-hooks when compiling.
        (vc-sccs-master-templates): Improve :type.
        (vc-sccs-lock-file): Moved/renamed from vc-hooks.el vc-lock-file.
 
-       * vc-hooks.el (vc-lock-file): Moved to vc-sccs-hooks and renamed.
+       * vc-hooks.el (vc-lock-file): Move to vc-sccs-hooks and renamed.
 
        * vc-cvs-hooks.el: Require vc-hooks when compiling.
-       (vc-cvs-master-templates): Improve :type.  Use
-       vc-cvs-find-cvs-master.
-       (vc-handle-cvs, vc-cvs-parse-status, vc-cvs-status): Moved here
+       (vc-cvs-master-templates): Improve :type.
+       Use vc-cvs-find-cvs-master.
+       (vc-handle-cvs, vc-cvs-parse-status, vc-cvs-status): Move here
        from vc-hooks.
-       (vc-vc-find-cvs-master): Renamed to vc-cvs-find-cvs-master.
+       (vc-vc-find-cvs-master): Rename to vc-cvs-find-cvs-master.
 
        * vc-hooks.el (vc-handle-cvs, vc-cvs-parse-status, vc-cvs-status):
-       Moved to vc-cvs-hooks.
+       Move to vc-cvs-hooks.
 
        * vc-hooks.el: Add doc strings in various places.  Simplify the
        minor mode setup.
        (vc-handled-backends): New user variable.
-       (vc-parse-buffer, vc-insert-file, vc-default-registered): Minor
-       simplification.
+       (vc-parse-buffer, vc-insert-file, vc-default-registered):
+       Minor simplification.
 
 2000-09-04  Dave Love  <fx@gnu.org>
 
 
 2000-09-04  Dave Love  <fx@gnu.org>
 
-       * mouse.el (mouse-major-mode-menu, mouse-popup-menubar): Run
-       menu-bar-update-hook.
+       * mouse.el (mouse-major-mode-menu, mouse-popup-menubar):
+       Run menu-bar-update-hook.
 
-       * help.el (help-manyarg-func-alist): Add
-       find-operation-coding-system.
+       * help.el (help-manyarg-func-alist):
+       Add find-operation-coding-system.
 
        * wid-edit.el (widget-sexp-validate): Fix garbled code.
 
 
 2000-09-01  John Wiegley  <johnw@gnu.org>
 
-       * pcomplete.el (pcomplete-dirs-or-entries): Added a missing
+       * pcomplete.el (pcomplete-dirs-or-entries): Add a missing
        predicate, which caused entries in the completion list to be
        doubled.
 
 
 2000-08-28  John Wiegley  <johnw@gnu.org>
 
-       * eshell/esh-var.el (pcomplete/eshell-mode/unset): Added
-       completion function for Eshell's implementation of `unset'.
+       * eshell/esh-var.el (pcomplete/eshell-mode/unset):
+       Add completion function for Eshell's implementation of `unset'.
 
 2000-09-02  Eli Zaretskii  <eliz@is.elta.co.il>
 
 2000-08-30  Andrew Innes  <andrewi@gnu.org>
 
        * timer.el (run-with-idle-timer): Undo last change, so that timer
-       is not activated immediately if Emacs is already idle.  Some
-       existing code relies on this behavior.
+       is not activated immediately if Emacs is already idle.
+       Some existing code relies on this behavior.
 
 2000-08-30  Miles Bader  <miles@gnu.org>
 
        * help.el (help-xref-mule-regexp): New variable.
        (help-make-xrefs): Handle help-xref-mule-regexp.
 
-       * international/mule-cmds.el (help-xref-mule-regexp-template): New
-       variable.
+       * international/mule-cmds.el (help-xref-mule-regexp-template):
+       New variable.
        (describe-input-method): Temporarily activate the specified input
        method to display the information.
        (describe-language-environment): Hyperlinks to mule related items.
 
-       * international/mule-diag.el (charset-multibyte-form-string): New
-       function.
+       * international/mule-diag.el (charset-multibyte-form-string):
+       New function.
        (list-character-sets-1): Use charset-multibyte-form-string.
        (describe-character-set): New function.
        (describe-coding-system): Hyperlinks to safe character sets.
 
        * international/quail.el (quail-help): New arg PACKAGE.
        Hyperlinks to mule related items.
-       (quail-help-insert-keymap-description): Use
-       substitute-command-keys instead of describe-bindings.
+       (quail-help-insert-keymap-description):
+       Use substitute-command-keys instead of describe-bindings.
        (quail-translation-help): Hyperlinks to mule related items.
 
 2000-08-28  John Wiegley  <johnw@gnu.org>
        have a defsubst call itself.  Made `eshell-flatten-list' back into
        a function again.
 
-       * eshell/em-smart.el (eshell-smart-redisplay): Added a safety
+       * eshell/em-smart.el (eshell-smart-redisplay): Add a safety
        catch, in case re-centering point at bottom messes up the display.
        This happens frequently in Emacs 21, due I believe to variable
        line heights.
        (eshell-copy-handles): Created a new macro for duplicating the
        current set of open handles.  This is needed by the looping
        functions.
-       (eshell-do-eval): Fixed while and if, so that the eshell-test-body
+       (eshell-do-eval): Fix while and if, so that the eshell-test-body
        is not incorrectly stomped on.
 
-       * eshell/em-cmpl.el (eshell-cmpl-use-paring): Mirror
-       declaration for pcomplete-use-paring.
+       * eshell/em-cmpl.el (eshell-cmpl-use-paring):
+       Mirror declaration for pcomplete-use-paring.
        (eshell-cmpl-initialize): Set pcomplete-use-paring based on the
        value of eshell-cmpl-use-paring.
        * pcomplete.el (pcomplete-use-paring): New config variable, to
        (pcomplete-do-complete): If pcomplete-use-paring is t, pare out
        completion alternatives that have already been used.
 
-       * eshell/esh-mode.el (eshell-repeat-argument): Added function,
+       * eshell/esh-mode.el (eshell-repeat-argument): Add function,
        bound to C-c C-y, which will repeat the previous N arguments
        (based on prefix argument).
        (eshell-mode): Bind C-c C-y to eshell-repeat-argument.
        name to delete is.
 
        * eshell/esh-util.el (eshell-read-passwd-file): Only keep the
-       first entry that correlates to a passwd/group number.  Later
-       entries (used for group/user name aliasing to multiple IDs) are
+       first entry that correlates to a passwd/group number.
+       Later entries (used for group/user name aliasing to multiple IDs) are
        ignored.
 
        * eshell/em-xtra.el (eshell/expr):
        * eshell/em-dirs.el (eshell-dirs-substitute-cd): Flatten the
        argument list, before passing it to the system command.
 
-       * eshell/esh-mode.el (eshell-find-tag): Added a special version of
+       * eshell/esh-mode.el (eshell-find-tag): Add a special version of
        `find-tag' for use at final position in Eshell buffers (which
        otherwise triggers an error on Emacs 21).
        (eshell-mode): Bind M-. to `eshell-find-tag' with the Eshell
        types RET after an open delimiter (like "), display a message
        indicating that Eshell is waiting for the closing delimiter.
 
-       * eshell/esh-var.el (eshell/unset): Added a command for unsetting
+       * eshell/esh-var.el (eshell/unset): Add a command for unsetting
        environment variables.
 
-       * eshell/em-unix.el (eshell/diff): Added logic to fail more
+       * eshell/em-unix.el (eshell/diff): Add logic to fail more
        gracefully if the user enters incorrect arguments.
 
        * eshell/esh-mode.el (eshell-mode): Disable auto-fill-function in
        * eshell/em-ls.el (eshell-ls-decorated-name): Use /= instead of
        (not (= ...)).
 
-       * eshell/em-unix.el (eshell-shuffle-files): Added use of `apply',
+       * eshell/em-unix.el (eshell-shuffle-files): Add use of `apply',
        to ensure the `preserve' flag gets propagated when doing recursive
        directory copies.
 
 
 2000-08-28  Eli Zaretskii  <eliz@is.elta.co.il>
 
-       * eshell/esh-util.el (eshell-processp): Added to relieve constant
+       * eshell/esh-util.el (eshell-processp): Add to relieve constant
        testing of `fboundp' on `processp'.
 
        * eshell/esh-proc.el (eshell/kill): Use eshell-processp.
        (eshell/jobs): Don't call process-list if it is not bound.
        (eshell-gather-process-output): Support systems where async
        subprocesses aren't supported.
-       (eshell-scratch-buffer, eshell-last-sync-output-start): New
-       variables.
+       (eshell-scratch-buffer, eshell-last-sync-output-start):
+       New variables.
 
        * eshell/esh-cmd.el (eshell-resume-eval): Handle the case when
        eshell-do-eval returns t.
 
        * eshell/esh-io.el (eshell-virtual-targets): Doc fix.
        (eshell-close-target, eshell-get-target): Use eshell-processp.
-       (eshell-print, eshell-error, eshell-errorn, eshell-printn): Doc
-       fix.
+       (eshell-print, eshell-error, eshell-errorn, eshell-printn):
+       Doc fix.
        (eshell-get-target, eshell-create-handles): Doc fix.
 
 2000-08-28  Miles Bader  <miles@lsi.nec.co.jp>
 
 2000-08-25  Kenichi Handa  <handa@etl.go.jp>
 
-       * terminal.el (terminal-emulator): Fix args to `concat'.  Now
-       concat doesn't accept integer.
+       * terminal.el (terminal-emulator): Fix args to `concat'.
+       Now concat doesn't accept integer.
 
-       * international/kkc.el: Remove SKK from Keywords.  Require
-       ja-dic-utl instead of skkdic-utl.
+       * international/kkc.el: Remove SKK from Keywords.
+       Require ja-dic-utl instead of skkdic-utl.
 
        * international/ja-dic-cnv.el: Renamed from skkdic-cnv.el.
        Provide ja-dic-cnv instead of skkdic-cnv.
-       (ja-dic-filename): Renamed from skkdic-filename.  Referrers changed.
+       (ja-dic-filename): Rename from skkdic-filename.  Referrers changed.
        (iso-2022-7bit-short): Add safe-charsets property.
        (skkdic-convert-postfix): Search Japanese chou-on character in
        addition to Hiragana character.
 
 2000-08-24  Kenichi Handa  <handa@etl.go.jp>
 
-       * international/mule-cmds.el (reset-language-environment): Set
-       default-process-coding-system to '(undecided . iso-latin-1), which
+       * international/mule-cmds.el (reset-language-environment):
+       Set default-process-coding-system to '(undecided . iso-latin-1), which
        makes process I/O almost consistent with file I/O.   Call this
        function when mule-cmds.el[c] is loaded.
 
        * comint.el (comint-output-filter): Save the point with a marker,
        not just a buffer position.
 
-       * international/mule.el (set-buffer-process-coding-system): Make
-       interactive prompt less confusing.
+       * international/mule.el (set-buffer-process-coding-system):
+       Make interactive prompt less confusing.
 
 2000-08-19  Gerd Moellmann  <gerd@gnu.org>
 
 
 2000-08-18  Gerd Moellmann  <gerd@gnu.org>
 
-       * textmodes/ispell.el (ispell-dictionary-alist-6): Add
-       `portugues'.
+       * textmodes/ispell.el (ispell-dictionary-alist-6):
+       Add `portugues'.
 
        * bindings.el (esc-map): Bind `C-delete' and `C-backspace' to
        backward-kill-sexp, analogous to kill-sexp.
        * ispell.el: Set to standard author/maintainer/keyword fields.
        Fine tuning to menu map appearance and operation, and added help.
        Remove `start' and `end' error messages when compiling.
-       (ispell-choices-win-default-height): Fixed comment string.
-       (ispell-dictionary-alist-1): Fixed regexp in castellano and
+       (ispell-choices-win-default-height): Fix comment string.
+       (ispell-dictionary-alist-1): Fix regexp in castellano and
        castellano8 dictionaries.
-       (ispell-dictionary-alist-3): Fixed regexp in francais dictionary.
-       (ispell-dictionary-alist-4): Fixed regexp in francais-tex
+       (ispell-dictionary-alist-3): Fix regexp in francais dictionary.
+       (ispell-dictionary-alist-4): Fix regexp in francais-tex
        dictionary, added italiano dictionary.
-       (ispell-skip-region-alist): Removed regexp thrashing when `-' is a
+       (ispell-skip-region-alist): Remove regexp thrashing when `-' is a
        word character.
-       (ispell-tex-skip-alists): Added psfig support.
-       (ispell-skip-html): Renamed from ispell-skip-sgml.
+       (ispell-tex-skip-alists): Add psfig support.
+       (ispell-skip-html): Rename from ispell-skip-sgml.
        (ispell-begin-skip-region-regexp, ispell-skip-region)
-       (ispell-minor-check): Improved html skipping support to skip across
+       (ispell-minor-check): Improve html skipping support to skip across
        code, and recognize `&' commands without proper `;' syntax.
        (ispell-process-line): Fix alignment error when manually
        correcting spelling.
        shell-command-on-region as in format-decode-run-method because
        shell-command-on-region can display a buffer with error output.
        (format-decode): Don't record undo information for the decoding.
-       (format-annotate-function): Add parameter FORMAT-COUNT.  Make
-       that number part of the temporary buffer name so that more than
+       (format-annotate-function): Add parameter FORMAT-COUNT.
+       Make that number part of the temporary buffer name so that more than
        one decoding using a temporary buffer can happen safely.
 
        * enriched.el (enriched-annotation-regexp): Use `A-Z' instead
 2000-08-15  Miles Bader  <miles@gnu.org>
 
        * textmodes/ispell.el (ispell-graphic-p): New constant.
-       (ispell-choices-win-default-height, ispell-help): Use
-       `ispell-graphic-p' instead of `xemacsp'.
+       (ispell-choices-win-default-height, ispell-help):
+       Use `ispell-graphic-p' instead of `xemacsp'.
 
 2000-08-15  Dave Love  <fx@gnu.org>
 
        * simple.el: Autoload widget-convert when compiling.
        (mail-user-agent): Doc fix.
 
-       * help.el (function-called-at-point, variable-at-point): Use
-       with-syntax-table.
+       * help.el (function-called-at-point, variable-at-point):
+       Use with-syntax-table.
        (help-manyarg-func-alist): Add insert-and-inherit.
 
        * thingatpt.el (thing-at-point-url-regexp): Prepend `\<'.
 
        * find-file.el: Doc fixes.  Move provide to end.
        (ff) <defgroup>: Add :link.
-       (ff-goto-click): Deleted.
+       (ff-goto-click): Delete.
        (ff-mouse-find-other-file, ff-mouse-find-other-file-other-window):
        Use mouse-set-point.
 
        Doze and Dog.
        (browse-url): Use dolist, not mapcar.
        (browse-url-at-point): Check for null url.
-       (browse-url-event-buffer, browse-url-event-point): Functions
-       deleted.
+       (browse-url-event-buffer, browse-url-event-point):
+       Functions deleted.
        (browse-url-at-mouse, browse-url-netscape): Simplify.
 
        * msb.el (msb--few-menus, msb--very-many-menus): Use current Gnus
        (comint-snapshot-last-prompt): New function.
        (comint-send-input): Snapshot the last prompt.
        Use comint-highlight-input-face.
-       (comint-highlight-input-face): Renamed from `comint-highlight-face'.
+       (comint-highlight-input-face): Rename from `comint-highlight-face'.
        Use defface instead of defcustom.
        (send-invisible, comint-send-eof): Snapshot the last prompt.
        (comint-delchar-or-maybe-eof): Use comint-send-eof.
        * emacs-lisp/lisp-mode.el (eval-last-sexp-1): Handle `#N='
        labels.
 
-       * help.el (print-help-return-message): When
-       display-buffer-reuse-frames is set, let the help window been quit,
+       * help.el (print-help-return-message):
+       When display-buffer-reuse-frames is set, let the help window been quit,
        instead of deleting it, which might delete a reused frame.
 
 2000-08-08  Eli Zaretskii  <eliz@is.elta.co.il>
 
        * emacs-lisp/cl-indent.el (toplevel): Indent `defclass',
        `defconst', `define-condition', `with-slots'.
-       * font-lock.el (lisp-font-lock-keywords-2): Added `with-' and `do-'.
+       * font-lock.el (lisp-font-lock-keywords-2): Add `with-' and `do-'.
 
 2000-08-03  Miles Bader  <miles@gnu.org>
 
        properties if comint-use-prompt-regexp-instead-of-fields is nil.
        (comint-line-beginning-position): New function.
        (comint-bol): Use comint-line-beginning-position.  Make ARG optional.
-       (comint-replace-by-expanded-history-before-point): Use
-       comint-line-beginning-position and line-end-position.
+       (comint-replace-by-expanded-history-before-point):
+       Use comint-line-beginning-position and line-end-position.
        (comint-last-output-overlay): New variable.
        (comint-mode): Make `comint-last-output-overlay' buffer-local.
 
        * shell.el (shell-prompt-pattern): Doc change.
        (shell-backward-command): Use line-beginning-position.
 
-       * gud.el (gud-gdb-complete-command): Use
-       comint-line-beginning-position.
+       * gud.el (gud-gdb-complete-command):
+       Use comint-line-beginning-position.
 
        * ielm.el (ielm-indent-line): Detect a "prompt" line by seeing if
        comint-bol doesn't actually go to the beginning of the line.
        (sql-copy-column): Use comint-line-beginning-position instead of
        explicitly matching comint-prompt-regexp.
 
-       * progmodes/octave-inf.el (inferior-octave-complete): Use
-       comint-line-beginning-position.
+       * progmodes/octave-inf.el (inferior-octave-complete):
+       Use comint-line-beginning-position.
 
        * progmodes/inf-lisp.el (inferior-lisp-prompt): Doc change.
 
-       * progmodes/idlw-shell.el (idlwave-shell-send-command): When
-       looking for a prompt, use `forward-line 0' instead of
+       * progmodes/idlw-shell.el (idlwave-shell-send-command):
+       When looking for a prompt, use `forward-line 0' instead of
        `beginning-of-line', to avoid getting caught by an input field.
 
 2000-08-07  Gerd Moellmann  <gerd@gnu.org>
 
 2000-08-03  Eli Zaretskii  <eliz@is.elta.co.il>
 
-       * international/mule-cmds.el (select-safe-coding-system): Make
-       the message text about selecting a safe coding system more clear.
+       * international/mule-cmds.el (select-safe-coding-system):
+       Make the message text about selecting a safe coding system more clear.
 
 2000-08-02  Gerd Moellmann  <gerd@gnu.org>
 
 
 2000-08-02  Eli Zaretskii  <eliz@is.elta.co.il>
 
-       * progmodes/ebrowse.el (ebrowse-tree-mode-map): Use
-       display-mouse-p instead of window-system.
+       * progmodes/ebrowse.el (ebrowse-tree-mode-map):
+       Use display-mouse-p instead of window-system.
        (ebrowse-member-mode-map): Ditto.
 
 2000-08-01  Vinicius Jose Latorre  <vinicius@cpqd.com.br>
        font lock support on window-system.
        (ftp-font-lock-keywords, smbclient-font-lock-keywords): Likewise.
 
-       * textmodes/ispell.el (ispell-highlight-spelling-error): Use
-       display-color-p, if fboundp, instead of window-system.
+       * textmodes/ispell.el (ispell-highlight-spelling-error):
+       Use display-color-p, if fboundp, instead of window-system.
 
 2000-07-31  Eli Zaretskii  <eliz@is.elta.co.il>
 
 
        * subr.el (remove, remq): New functions.
 
-       * midnight.el (clean-buffer-list-kill-never-regexps): Correctly
-       escape `*' in regexps.
+       * midnight.el (clean-buffer-list-kill-never-regexps):
+       Correctly escape `*' in regexps.
        (midnight-find): Reverse order of arguments in the funcall of
        TEST.
 
 
 2000-07-27  Alex Schroeder  <alex@gnu.org>
 
-       * sql.el (sql-ms): Added autoload cookie.
+       * sql.el (sql-ms): Add autoload cookie.
        (sql-ingres, sql-solid, sql-mysql, sql-informix, sql-sybase)
        (sql-oracle): Ditto.
        (sql-help): Doc change.
 
-       (sql-mode-oracle-font-lock-keywords): Added PL/SQL keywords, data
+       (sql-mode-oracle-font-lock-keywords): Add PL/SQL keywords, data
        types and exceptions.
 
 2000-07-27  Alex Schroeder  <alex@gnu.org>
        (find-coding-systems-region-subset-p): This function deleted.
        (sort-coding-systems-predicate): New variable.
        (sort-coding-systems): New function.
-       (find-coding-systems-region): Use
-       find-coding-systems-region-internal.
+       (find-coding-systems-region):
+       Use find-coding-systems-region-internal.
        (find-coding-systems-string): Use find-coding-systems-region.
-       (find-coding-systems-for-charsets): Check
-       char-coding-system-table.
+       (find-coding-systems-for-charsets):
+       Check char-coding-system-table.
        (select-safe-coding-system-accept-default-p): New variable.
        (select-safe-coding-system): Mostly rewritten.  New argument
        ACCEPT-DEFAULT-P.
        * net/ange-ftp.el (ange-ftp-file-newer-than-file-p): New function.
        (ange-ftp-real-file-newer-than-file-p): New function.
        (ange-ftp-verify-visited-file-modtime): Use `float-time'.
-       (ange-ftp-dot-to-slash): Removed (use `subst-char-in-string').
+       (ange-ftp-dot-to-slash): Remove (use `subst-char-in-string').
 
-       * tooltip.el (tooltip-float-time): Removed (use `float-time').
+       * tooltip.el (tooltip-float-time): Remove (use `float-time').
        * midnight.el (midnight-float-time): Ditto.
 
 2000-07-26  Andreas Schwab  <schwab@suse.de>
 
-       * files.el (normal-backup-enable-predicate): Correct
-       interpretation of the return value of compare-strings.
+       * files.el (normal-backup-enable-predicate):
+       Correct interpretation of the return value of compare-strings.
 
 2000-07-26  Gerd Moellmann  <gerd@gnu.org>
 
        * isearch.el (isearch-resume): New function.
        (isearch-done): Add something to command-history to resume
        the search.
-       (isearch-yank-line, isearch-yank-word): Use
-       buffer-substring-no-properties instead of buffer-substring.
+       (isearch-yank-line, isearch-yank-word):
+       Use buffer-substring-no-properties instead of buffer-substring.
 
        * textmodes/flyspell.el (flyspell-mouse-map): Use `map' instead
        of flyspell-mouse-map.
 
-       * progmodes/make-mode.el (makefile-mode-abbrev-table): Remove
-       duplicate definition.
+       * progmodes/make-mode.el (makefile-mode-abbrev-table):
+       Remove duplicate definition.
        (makefile-mode): Remove duplicate setting of local-abbrev-table.
 
        * progmodes/m4-mode.el (m4-mode-abbrev-table): New variable.
        (ange-ftp-dot-to-slash): New function.
        (ange-ftp-fix-name-for-vms): Use it.
 
-       * midnight.el (midnight-buffer-display-time): Use
-       `with-current-buffer'.
+       * midnight.el (midnight-buffer-display-time):
+       Use `with-current-buffer'.
 
 2000-07-25  Gerd Moellmann  <gerd@gnu.org>
 
 
 2000-07-24  Francis Wright  <fjw@maths.qmw.ac.uk>
 
-       * dired.el (dired-sort-R-check): Added to allow recursive listing
+       * dired.el (dired-sort-R-check): Add to allow recursive listing
        to be undone.
        (dired-sort-other): Use it.
 
-2000-07-24  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-07-24  Martin Stjernholm  <mast@lysator.liu.se>
 
        * Release of cc-mode 5.27
 
-2000-07-24  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-07-24  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-engine.el (c-looking-at-inexpr-block): Replaced a call to
+       * progmodes/cc-engine.el (c-looking-at-inexpr-block): Replace a call to
        c-beginning-of-statement-1 that caused a bad case of recursion
        which could consume a lot of CPU in large classes in languages
        that have in-expression classes (i.e. Java and Pike).
        before case 5 and is now case 4) to catch in-expression
        classes in top level expressions correctly.
 
-2000-07-24  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-07-24  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-guess-basic-syntax): Less naive handling of
        objc-method-intro. Case 4 removed and case 5I added.
        * progmodes/cc-mode.el (java-mode): Use c-append-paragraph-start to
        initialize paragraph-start for javadoc markup.
 
-       * progmodes/cc-vars.el (c-style-variables-are-local-p): Incompatible
-       change by defaulting this to t.  It's motivated by the
+       * progmodes/cc-vars.el (c-style-variables-are-local-p):
+       Incompatible change by defaulting this to t.  It's motivated by the
        confusing behavior that otherwise arise from the style system
        when editing both java and non-java files at the same time
        (see the comments about style setting in c-common-init).
 
-2000-07-24  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-07-24  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-cmds.el (c-indent-new-comment-line): Added a kludge
+       * progmodes/cc-cmds.el (c-indent-new-comment-line): Add a kludge
        similar to the one in c-fill-paragraph to check the fill
        prefix from the adaptive fill function for sanity.
 
-2000-07-24  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-07-24  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-defs.el (c-end-of-defun-1): Fixed forward scanning into
+       * progmodes/cc-defs.el (c-end-of-defun-1): Fix forward scanning into
        defun block.
 
-2000-07-24  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-07-24  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-align.el (c-lineup-multi-inher): Handle lines with
        leading comma nicely. Extended to handle member initializers
        too.
 
        * progmodes/cc-engine.el (c-beginning-of-inheritance-list)
-       (c-guess-basic-syntax): Fixed recognition of inheritance lists
+       (c-guess-basic-syntax): Fix recognition of inheritance lists
        when the lines begins with a comma.
 
-       * progmodes/cc-vars.el (c-offsets-alist): Changed default for
+       * progmodes/cc-vars.el (c-offsets-alist): Change default for
        member-init-cont to c-lineup-multi-inher since it now handles
        member initializers and indents better for leading commas.
 
-2000-07-24  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-07-24  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-cmds.el (c-electric-brace): Fixed some bugs in the state
+       * progmodes/cc-cmds.el (c-electric-brace): Fix some bugs in the state
        handling that caused class open lines to be recognized as
        statement-conts in some cases.
 
        guessed by the adaptive fill function unless point is on the
        first line of a block comment.
 
-       * progmodes/cc-engine.el (c-forward-syntactic-ws): Fixed an infloop bug
+       * progmodes/cc-engine.el (c-forward-syntactic-ws): Fix an infloop bug
        when the buffer ends with a macro continuation char.
 
-       * progmodes/cc-engine.el (c-guess-basic-syntax): Added support for
+       * progmodes/cc-engine.el (c-guess-basic-syntax): Add support for
        function definitions as statements in Pike.  The first
        statement in a lambda block is now labeled defun-block-intro
        instead of statement-block-intro.
        so that the class surrounding point is selected, not the one
        innermost in the state.
 
-       * progmodes/cc-engine.el (c-guess-basic-syntax): Fixed bug in
+       * progmodes/cc-engine.el (c-guess-basic-syntax): Fix bug in
        recognition of switch labels having hanging multiline
        statements.
 
        * progmodes/cc-engine.el (c-beginning-of-member-init-list): Broke out
        some code in c-guess-basic-syntax to a separate function.
-       * progmodes/cc-engine.el (c-just-after-func-arglist-p): Fixed
-       recognition of member inits with multiple line arglists.
+       * progmodes/cc-engine.el (c-just-after-func-arglist-p):
+       Fix recognition of member inits with multiple line arglists.
        * progmodes/cc-engine.el (c-guess-basic-syntax): New case 5B.3 to detect
        member-init-cont when the commas are in funny places.
 
-2000-07-24  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-07-24  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-defs.el (c-auto-newline): Removed this macro since it's
+       * progmodes/cc-defs.el (c-auto-newline): Remove this macro since it's
        not used anymore.
 
        * progmodes/cc-engine.el (c-looking-at-bos): New helper function.
        * progmodes/cc-engine.el (c-looking-at-inexpr-block): More tests to tell
        inexpr and toplevel classes apart in Pike.
 
-       * progmodes/cc-engine.el (c-guess-basic-syntax): Fixed bogus recognition
+       * progmodes/cc-engine.el (c-guess-basic-syntax): Fix bogus recognition
        of case 9A.
 
        * progmodes/cc-langs.el, progmodes/cc-mode.el
        (c-Pike-inexpr-class-key): New constant, since "class" can
        introduce an in-expression class in Pike nowadays.
 
-2000-07-24  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-07-24  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-align.el (c-gnu-impose-minimum): Don't impose minimum
        indentation on cpp-macro lines.
 
        * progmodes/cc-engine.el (c-guess-basic-syntax): Made the cpp-macro
        a syntax modifier like comment-intro, to make it possible to
-       get syntactic indentation for preprocessor directives.  It's
-       incompatible wrt to lineup functions on cpp-macro, but it has
+       get syntactic indentation for preprocessor directives.
+       It's incompatible wrt to lineup functions on cpp-macro, but it has
        no observable effect in the 99.9% common case where cpp-macro
        is set to -1000.
 
-2000-07-24  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-07-24  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-engine.el (c-guess-basic-syntax): Fixed bug with missed
+       * progmodes/cc-engine.el (c-guess-basic-syntax): Fix bug with missed
        member-init-cont when the preceding arglist is several lines.
 
-2000-07-24  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-07-24  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-styles.el (c-style-alist): The basic offset for the BSD
        style corrected to 8.
 
-2000-07-24  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-07-24  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-styles.el (c-style-alist): Adjusted the indentation of
+       * progmodes/cc-styles.el (c-style-alist): Adjust the indentation of
        brace list openers in the gnu style.
 
-2000-07-24  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-07-24  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-indent-command): Obey c-syntactic-indentation.
 
        (c-electric-lt-gt, c-electric-paren): Don't reindent old lines
        when c-syntactic-indentation is nil.
 
-       * progmodes/cc-engine.el (c-beginning-of-statement-1): Fixed bug where
+       * progmodes/cc-engine.el (c-beginning-of-statement-1): Fix bug where
        we were left at comments preceding the first statement when
        reaching the beginning of the buffer.
 
        * progmodes/cc-vars.el (c-syntactic-indentation): New variable to turn
        off all syntactic indentation.
 
-2000-07-24  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-07-24  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-fill-paragraph): Keep one or two spaces
        between the text and the block comment ender when it hangs,
        depending on how many there are before the fill.
 
-2000-07-24  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-07-24  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-engine.el (c-beginning-of-closest-statement): New helper
        function to go back to the closest preceding statement start,
        which could be inside a conditional statement.
-       * progmodes/cc-engine.el (c-guess-basic-syntax): Use
-       c-beginning-of-closest-statement in cases 10B.2, 17B and 17C.
+       * progmodes/cc-engine.el (c-guess-basic-syntax):
+       Use c-beginning-of-closest-statement in cases 10B.2, 17B and 17C.
 
        * progmodes/cc-engine.el (c-guess-basic-syntax): Better handling of
        arglist-intro, arglist-cont-nonempty and arglist-close when
        the arglist is nested inside parens.  Cases 7A, 7C and 7F
        changed.
 
-       * progmodes/cc-langs.el (c-Java-javadoc-paragraph-start): Brought
-       up-to-date with javadoc 1.2.
+       * progmodes/cc-langs.el (c-Java-javadoc-paragraph-start):
+       Brought up-to-date with javadoc 1.2.
 
-2000-07-24  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-07-24  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-engine.el (c-beginning-of-statement-1): Fixed handling of
+       * progmodes/cc-engine.el (c-beginning-of-statement-1): Fix handling of
        multiline Pike type decls.
 
-2000-07-24  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-07-24  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-indent-new-comment-line): Always break
        multiline comments in multiline mode, regardless of
        comment-multi-line.
 
-2000-07-24  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-07-24  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-engine.el (c-guess-basic-syntax): Fixed bug with
+       * progmodes/cc-engine.el (c-guess-basic-syntax): Fix bug with
        fully::qualified::names in C++ member init lists.  Preamble in
        case 5D changed.
 
-2000-07-24  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-07-24  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-langs.el (c-common-init): Handling of obsolete variables
        moved to c-initialize-cc-mode.  More compatible style override
        that duplicate entries in styles have the same effect
        regardless of DONT-OVERRIDE.
 
-       * progmodes/cc-styles.el (c-set-style-2): Fixed bug where the
+       * progmodes/cc-styles.el (c-set-style-2): Fix bug where the
        initialization of inheriting styles failed when the
        dont-override flag is set.
 
        * progmodes/cc-vars.el (c-special-indent-hook): Don't use set-from-style
        on this.
 
-2000-07-24  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-07-24  Martin Stjernholm  <mast@lysator.liu.se>
 
-       * progmodes/cc-defs.el (c-forward-comment): Removed the workaround
+       * progmodes/cc-defs.el (c-forward-comment): Remove the workaround
        introduced in 5.38 since it had worse side-effects.  If a line
        contains the string "//\"", it regarded the // as a comment
        start since the \ temporarily doesn't have escape syntax.
        paragraphs on the first or last line of a file.
        (ada-format-paramlist): Fix handling of default parameter values.
        (ada-get-body-name): New function.
-       (ada-get-current-indent): Optimized by searching directly for an
-       existing generic part or a statement outside of it.  Handle
-       ada-indent-align-comments when indenting comments Replaced some
+       (ada-get-current-indent): Optimize by searching directly for an
+       existing generic part or a statement outside of it.
+       Handle ada-indent-align-comments when indenting comments Replaced some
        regexps by testing directly the next character. This results in a
        huge speedup on some files.  New indentation scheme for renames
        statements.  Stop looking for the 'while' or 'for' associated with
        (ada-add-ada-menu): Remove the map and name parameters.  Add the Ada
        Reference Manual to the menu.
        (ada-check-current): Rewritten as a call to ada-compile-current.
-       (ada-compile): Removed.
+       (ada-compile): Remove.
        (ada-compile-application, ada-compile-current, ada-check-current):
        Set the compilation-search-path so that compile.el automatically
        finds the sources in src_dir.  Automatic scrolling of the
        (ada-find-file-in-dir): New function.
        (ada-find-references): Set the environment variables for gnatfind.
        (ada-find-src-file-in-dir): New function.
-       (ada-first-non-nil): Removed.
+       (ada-first-non-nil): Remove.
        (ada-gdb-application): Add support for jdb, the java debugger.
        (ada-get-ada-file-name): Load the original-file first if not done
        yet.
        compilation-search-path,...  Add the standard runtime library to
        the search path for find-file.
        (ada-prj-default-debugger): Was missing an opening '{'.
-       (ada-prj-default-bind-opt, ada-prj-default-link-opt): New
-       variables.
+       (ada-prj-default-bind-opt, ada-prj-default-link-opt):
+       New variables.
        (ada-prj-default-gnatmake-opt): New variable.
        (ada-prj-find-prj-file): Handles non-file buffers For non-Ada
        buffers, the project file is the default one Save the windows
        configuration before displaying the menu.
-       (ada-prj-src-dir, ada-prj-obj-dir, ada-prj-comp-opt,...): Removed.
+       (ada-prj-src-dir, ada-prj-obj-dir, ada-prj-comp-opt,...): Remove.
        (ada-read-identifier): Fix xrefs on operators (for "mod", "and",
        ...)  regexp-quote identifiers names to support operators +,
        -,... in regexps.
        (ada-remote): New function.
        (ada-run-application): Erase the output buffer before starting the
-       run Support remote execution of the application.  Use
-       call-process, or the arguments are incorrectly parsed.
+       run Support remote execution of the application.
+       Use call-process, or the arguments are incorrectly parsed.
        (ada-set-default-project-file): Reread the content of the active
        project file, not the one from the current buffer When a project
        file is set as the default project, all directories are
 
        * net/goto-addr.el: Change maintainer to FSF.
 
-       * info.el (Info-title-face-alist): Removed.
+       * info.el (Info-title-face-alist): Remove.
 
 2000-07-18  David Ponce  <david@dponce.com>
 
 
        * align.el (align-newline-and-indent): Adding new function,
        for auto-aligning blocks of code on RET.
-       (align-region): Fixed badly formatted minibuffer message.
+       (align-region): Fix badly formatted minibuffer message.
 
 2000-07-17  Kenichi Handa  <handa@etl.go.jp>
 
        * international/kkc.el (kkc-show-conversion-list-count): Customize it.
-       (kkc-region): Update kkc-next-count and kkc-prev-count here.  Show
-       the conversion list at first if appropriate.
+       (kkc-region): Update kkc-next-count and kkc-prev-count here.
+       Show the conversion list at first if appropriate.
        (kkc-next): Don't update kkc-next-count here.
        (kkc-prev): Don't update kkc-prev-count here.
        (kkc-show-conversion-list-update): Fix setting up of conversion
        * cus-edit.el (custom-buffer-create-internal): Use a help-echo
        function to be more specific.
 
-       * wid-edit.el (widget-specify-field, widget-specify-button): Allow
-       non-string help-echo.
+       * wid-edit.el (widget-specify-field, widget-specify-button):
+       Allow non-string help-echo.
        (widget-types-convert-widget): Defsubst it.
        (widget-echo-help): Try to cope with a help-echo function of two
        possible sorts.
        Use fortran-comment-indent, not fortran-comment-indent-function.
        (fortran-comment-region, fortran-electric-line-number): Simplify.
        (fortran-auto-fill): New function.
-       (fortran-do-auto-fill): Deleted.
+       (fortran-do-auto-fill): Delete.
        (fortran-find-comment-start-skip):
        Check for non-null comment-start-skip.
        (fortran-auto-fill-mode, fortran-fill-statement):
 
 2000-07-11  Eli Zaretskii  <eliz@is.elta.co.il>
 
-       * eshell/esh-module.el (toplevel): Reference
-       byte-compile-current-file only if it is bound.
+       * eshell/esh-module.el (toplevel):
+       Reference byte-compile-current-file only if it is bound.
 
 2000-07-10  Gerd Moellmann  <gerd@gnu.org>
 
 
 2000-07-10  Kenichi Handa  <handa@etl.go.jp>
 
-       * international/mule-diag.el (describe-font): Adjusted for the
+       * international/mule-diag.el (describe-font): Adjust for the
        change of fontset-info.
        (print-fontset): Likewise.
 
 
 2000-07-01  Francesco Potortì  <pot@gnu.org>
 
-       * rmail.el (mail-unsent-separator): Changed "the" to "\\w+", as
+       * rmail.el (mail-unsent-separator): Change "the" to "\\w+", as
        exim can use "your message" instead of "the message".
 
 2000-07-06  Stefan Monnier  <monnier@cs.yale.edu>
 2000-07-05  Michael Kifer  <kifer@cs.sunysb.edu>
 
        * ediff-diff.el (ediff-wordify): Use syntax table.
-       * ediff-init.el (ediff-has-face-support-p): Use
-       ediff-color-display-p.
+       * ediff-init.el (ediff-has-face-support-p):
+       Use ediff-color-display-p.
        (ediff-color-display-p): Use display-color-p, changed to defun
        from defsubst.
        Got rid of special cases for NeXT and OS/2.
        * Makefile.in (DONTCOMPILE): Add comment that the name may
        not be changed without changing the make-dist script.
 
-       * emacs-lisp/cl-extra.el (cl-old-mapc): Removed; don't defalias mapc.
+       * emacs-lisp/cl-extra.el (cl-old-mapc): Remove; don't defalias mapc.
        (cl-mapc): Use mapc instead of cl-old-mapc.
 
 2000-07-05  Andrew Innes  <andrewi@gnu.org>
        * mouse.el (mouse-show-mark, mouse-save-then-kill): Don't use
        window-system.
 
-       * man.el (Man-notify-when-ready): Don't use window-system.  If
-       Man-notify-method is newframe, and the display is not
+       * man.el (Man-notify-when-ready): Don't use window-system.
+       If Man-notify-method is newframe, and the display is not
        multi-frame, select the frame created for the man page.
        (Man-init-defvars): Doc fix.
 
        (sql-find-sqli-buffer): Make sure the default-value of sql-buffer
        is used.
 
-       (sql-informix): Added command line parameter "-" to force
+       (sql-informix): Add command line parameter "-" to force
        sql-informix-program to use stdout.
 
 2000-06-25  Eli Zaretskii  <eliz@is.elta.co.il>
 2000-06-23  Dave Love  <fx@gnu.org>
 
        * font-lock.el (font-lock-support-mode) <defgroup>: Add :version.
-       (font-lock-fontify-anchored-keywords): Use
-       line-beginning-position.
+       (font-lock-fontify-anchored-keywords):
+       Use line-beginning-position.
        (global-font-lock-mode): Use mapc.
 
 2000-06-23  Stefan Monnier  <monnier@cs.yale.edu>
 2000-06-22  Vinicius Jose Latorre  <vinicius@cpqd.com.br>
 
        * ps-print.el: Fix bug: if ^L is the very first buffer character,
-       ps-print crashes.  New feature: page selection for printing.  Create
-       raw-text-unix coding system for XEmacs.  Doc fix.
+       ps-print crashes.  New feature: page selection for printing.
+       Create raw-text-unix coding system for XEmacs.  Doc fix.
        (ps-print-version): New version number (5.2.3).
        (ps-plot-region): Bug fix.
        (ps-setup, ps-init-output-queue, ps-output, ps-begin-job, ps-end-file)
        (ps-header-sheet, ps-generate, ps-end-job): Code fix.
-       (ps-restore-selected-pages, ps-selected-pages, ps-print-page-p): New
-       funs.
+       (ps-restore-selected-pages, ps-selected-pages, ps-print-page-p):
+       New funs.
        (ps-selected-pages, ps-last-selected-pages, ps-first-page)
        (ps-last-page): New vars.
 
 
 2000-06-21  Kenichi Handa  <handa@etl.go.jp>
 
-       * international/mule-cmds.el (set-language-info-alist): Docstring
-       fixed.
+       * international/mule-cmds.el (set-language-info-alist):
+       Docstring fixed.
 
 2000-06-20  Gerd Moellmann  <gerd@gnu.org>
 
 2000-06-20  Stefan Monnier  <monnier@cs.yale.edu>
 
        * jit-lock.el (with-buffer-prepared-for-jit-lock):
-       Renamed from with-buffer-prepared-for-font-lock and use
+       Rename from with-buffer-prepared-for-font-lock and use
        inhibit-modification-hooks rather than setting *-change-functions.
        Update all functions to use the new name.
        (jit-lock-first-unfontify-pos): New semantics (and doc).
 
 2000-06-20  Sam Steingold  <sds@gnu.org>
 
-       * emacs-lisp/cl-indent.el (toplevel): Indent
-       `print-unreadable-object' properly.  Untabify.
+       * emacs-lisp/cl-indent.el (toplevel):
+       Indent `print-unreadable-object' properly.  Untabify.
 
 2000-06-14  Carsten Dominik  <dominik@strw.leidenuniv.nl>
 
        * textmodes/reftex.el (reftex-find-citation-regexp-format):
        Support for bibentry.
-       (reftex-compile-variables): Fixed problem with end of section-re.
+       (reftex-compile-variables): Fix problem with end of section-re.
 
        * textmodes/reftex-dcr.el (reftex-view-crossref)
        (reftex-view-crossref-from-bibtex):
        Deal with changed `reftex-find-citation-regexp-format'.
        (reftex-view-regexp-match, reftex-view-crossref-from-bibtex):
-       Replaced `remprop' with `put'.
+       Replace `remprop' with `put'.
        (reftex-view-crossref, reftex-view-crossref-when-idle):
        Support for bibentry.
 
        (isearch-minibuffer-input-method-function): These variables
        deleted.
        (isearch-with-input-method): Don't use the above variables.
-       (isearch-process-search-multibyte-characters): Likewise.  Call
-       read-string with the arg INHERIT-INPUT-METHOD t.
+       (isearch-process-search-multibyte-characters): Likewise.
+       Call read-string with the arg INHERIT-INPUT-METHOD t.
 
 2000-06-17  Stefan Monnier  <monnier@cs.yale.edu>
 
 2000-06-15  Gerd Moellmann  <gerd@gnu.org>
 
        * info.el (Info-find-in-tag-table-1, Info-find-in-tag-table)
-       (Info-find-node-in-buffer-1, Info-find-node-in-buffer): New
-       functions.
+       (Info-find-node-in-buffer-1, Info-find-node-in-buffer):
+       New functions.
        (Info-find-node-2): Try a case-sensitive search first, then
        do a case-insensitive search.
 
 
 2000-06-15  Kenichi Handa  <handa@etl.go.jp>
 
-       * international/mule.el (set-buffer-file-coding-system): Almost
-       rewritten to handle `undecided' as no-op.
+       * international/mule.el (set-buffer-file-coding-system):
+       Almost rewritten to handle `undecided' as no-op.
 
 2000-06-14  Gerd Moellmann  <gerd@gnu.org>
 
        (tar-subfile-save-buffer): Likewise.
 
        * international/mule.el
-       (after-insert-file-set-buffer-file-coding-system): Call
-       set-buffer-file-coding-system with the arg FORCE t.
+       (after-insert-file-set-buffer-file-coding-system):
+       Call set-buffer-file-coding-system with the arg FORCE t.
 
 2000-06-13  Gerd Moellmann  <gerd@gnu.org>
 
 
 2000-06-13  Eli Zaretskii  <eliz@is.elta.co.il>
 
-       * frame.el (display-multi-frame-p, display-multi-font-p): New
-       defaliases for display-graphic-p.
+       * frame.el (display-multi-frame-p, display-multi-font-p):
+       New defaliases for display-graphic-p.
 
        * hl-line.el: Fixed a typo in commentary.
 
 2000-06-13  Kenichi Handa  <handa@etl.go.jp>
 
-       * language/tibet-util.el (tibetan-tibetan-to-transcription): Typo
-       fixed.
+       * language/tibet-util.el (tibetan-tibetan-to-transcription):
+       Typo fixed.
 
 2000-06-12  Dave Love  <fx@gnu.org>
 
 
 2000-06-12  Kenichi Handa  <handa@etl.go.jp>
 
-       * international/mule.el (set-buffer-file-coding-system): If
-       CODING-SYSTEM is nil, set buffer-file-coding-system to nil
+       * international/mule.el (set-buffer-file-coding-system):
+       If CODING-SYSTEM is nil, set buffer-file-coding-system to nil
        unconditionally.
 
 2000-06-12  Dave Love  <fx@gnu.org>
        * progmodes/executable.el: Byte compile dynamic.
        (executable-insert): Change custom type.
        (executable-find): Add autoload cookie.
-       (executable-make-buffer-file-executable-if-script-p): New
-       function.  After Noah Friedman.
+       (executable-make-buffer-file-executable-if-script-p):
+       New function.  After Noah Friedman.
 
        * files.el (after-save-hook): Customize, with
        executable-make-buffer-file-executable-if-script-p as an option.
 
 2000-06-08  Dave Love  <fx@gnu.org>
 
-       * international/mule-cmds.el (select-safe-coding-system): If
-       DEFAULT-CODING-SYSTEM is not specified, also check the most
+       * international/mule-cmds.el (select-safe-coding-system):
+       If DEFAULT-CODING-SYSTEM is not specified, also check the most
        preferred coding-system if buffer-file-coding-system is
        `undecided'.  From Handa.
 
        (ccl-encode-alternativnyj, ccl-encode-alternativnyj-font):
        Likewise.
 
-       * international/mule-diag.el (non-iso-charset-alist): Specify
-       translation table symbol instead of translation table itself.
+       * international/mule-diag.el (non-iso-charset-alist):
+       Specify translation table symbol instead of translation table itself.
        (list-block-of-chars): CHARSET may be a translation table symbol.
 
        * international/mule.el (make-coding-system): If CODING-SYSTEM
        * international/fontset.el: Use family `proportional' for Tibetan
        fonts.
 
-       * international/ccl.el (ccl-compile-translate-character): Don't
-       check if Rrr has property translation-table.
-       (ccl-compile-map-multiple): Modified to avoid compiler warning.
+       * international/ccl.el (ccl-compile-translate-character):
+       Don't check if Rrr has property translation-table.
+       (ccl-compile-map-multiple): Modify to avoid compiler warning.
 
 2000-06-05  Gerd Moellmann  <gerd@gnu.org>
 
        (sh-help-string-for-variable, sh-guess-basic-offset):
        Don't quote lambdas.
        (sh-electric-rparen, sh-electric-hash, sh-search-word): Docstring typo.
-       (sh-regexp-for-done, sh-kw-alist, sh-kw): Moved to before their use.
+       (sh-regexp-for-done, sh-kw-alist, sh-kw): Move to before their use.
 
        * mail/mh-comp.el (mh-send-sub): Check mh-etc is bound before using it.
        (mh-letter-mode): Derive from text-mode.
 2000-06-02  Dave Love  <fx@gnu.org>
 
        * wid-edit.el: byte-compile-dynamic since we typically don't use
-       all the widgets.  Don't require cl or widget.  Remove
-       eval-and-compile.  Don't autoload finder-commentary.  Doc fixes.
-       (widget-read-event): Removed.  Callers changed to use read-event.
-       (widget-button-release-event-p): Renamed from
+       all the widgets.  Don't require cl or widget.
+       Remove eval-and-compile.  Don't autoload finder-commentary.  Doc fixes.
+       (widget-read-event): Remove.  Callers changed to use read-event.
+       (widget-button-release-event-p): Rename from
        button-release-event-p.
        (widget-field-add-space, widget-field-use-before-change):
        Uncustomize.
        (widget-specify-field): Use keymap property, not local-map.
        (widget-specify-button): Obey :suppress-face.
        (widget-specify-insert): Use modern backquote syntax.
-       (widget-image-directory): Renamed from widget-glyph-directory.
-       (widget-image-enable): Renamed from widget-glyph-enable.
+       (widget-image-directory): Rename from widget-glyph-directory.
+       (widget-image-enable): Rename from widget-glyph-enable.
        (widget-image-find): Replaces widget-glyph-find.
        (widget-button-pressed-face): Move defvar.
        (widget-image-insert): Replaces widget-glyph-insert.
        (widget-sexp-prompt-value, widget-echo-help): Simplify.
        (widget-default-create): Use widget-image-insert; some rewriting.
        (widget-visibility-value-create)
-       (widget-push-button-value-create, widget-toggle-value-create): Use
-       widget-image-insert.
+       (widget-push-button-value-create, widget-toggle-value-create):
+       Use widget-image-insert.
        (checkbox): Create on and off images dynamically.
        (documentation-link): Change :help-echo.
        (widget-documentation-link-echo-help): Remove.
        (tibetan-composition-function): Fix args to
        tibetan-compose-string.
 
-       * language/tibetan.el (tibetan-composable-pattern): More
-       characters included.
+       * language/tibetan.el (tibetan-composable-pattern):
+       More characters included.
        (tibetan-consonant-transcription-alist): Rule for "R" added.
        (tibetan-subjoined-transcription-alist): Rules for "+W", "+Y", and
        "+R" added.
 
 2000-05-31  Dave Love  <fx@gnu.org>
 
-       * loadhist.el (loadhist-hook-functions): Remove
-       before-change-function, after-change-function.
+       * loadhist.el (loadhist-hook-functions):
+       Remove before-change-function, after-change-function.
        (unload-feature): Deal with symbols which are both bound and
        fbound.
 
        * progmodes/antlr-mode.el: New commands: hide/unhide actions,
        upcase/downcase literals.
        (antlr-tiny-action-length): New user option.
-       (antlr-hide-actions): New command.  Suggested by
-       Bjoern Mielenhausen <Bjoern.Mielenhausen@sap.com>.
+       (antlr-hide-actions): New command.
+       Suggested by Bjoern Mielenhausen <Bjoern.Mielenhausen@sap.com>.
        (antlr-mode-map): New binding [C-c C-v].
        (antlr-mode-menu): New entries.
        (antlr-downcase-literals): New command.
        * progmodes/antlr-mode.el: XEmacs bug workaround, XEmacs hint.
        (antlr-font-lock-additional-keywords): Workaround for intentional
        bug in XEmacs version of font-lock.
-       (antlr-mode): Set symbol property `mode-name' to "Antlr".  Could
-       be used by a smarter version of `buffers-menu-grouping-function'.
+       (antlr-mode): Set symbol property `mode-name' to "Antlr".
+       Could be used by a smarter version of `buffers-menu-grouping-function'.
 
 2000-05-29  Gerd Moellmann  <gerd@gnu.org>
 
 
 2000-05-28  Eli Zaretskii  <eliz@is.elta.co.il>
 
-       * international/codepage.el (cp-coding-system-for-codepage-1): Add
-       eight-bit-graphic and eight-bit-control to safe charsets for cpNNN
+       * international/codepage.el (cp-coding-system-for-codepage-1):
+       Add eight-bit-graphic and eight-bit-control to safe charsets for cpNNN
        coding systems.
 
 2000-05-26  Dave Love  <fx@gnu.org>
        internal-find-face.
 
        * mail/reporter.el: Maintainer change.  Doc fixes.
-       (reporter-version): Deleted.
+       (reporter-version): Delete.
 
        * emacs-lisp/elp.el: Maintainer change.
-       (elp-help-address, elp-submit-bug-report, elp-version): Deleted.
+       (elp-help-address, elp-submit-bug-report, elp-version): Delete.
 
 2000-05-26  Stefan Monnier  <monnier@cs.yale.edu>
 
        * loadhist.el (unload-feature): Fix interactive spec [from
        lijnzaad@ebi.ac.uk].
 
-       * emacs-lisp/bytecomp.el (byte-compile-callargs-warn): Use
-       subr-arity to check primitives.
+       * emacs-lisp/bytecomp.el (byte-compile-callargs-warn):
+       Use subr-arity to check primitives.
        (byte-compile-flush-pending, byte-compile-file-form-progn)
        (byte-compile-normal-call, byte-compile-list, byte-compile-concat)
        (byte-compile-insert, byte-compile-funcall): Use mapc instead of
        window-system.
        (ffap-highlight): Always default to t.
 
-       * emacs-lisp/edebug.el (edebug-emacs-19-specific): Call
-       display-popup-menus-p instead of looking at window-system.
+       * emacs-lisp/edebug.el (edebug-emacs-19-specific):
+       Call display-popup-menus-p instead of looking at window-system.
 
        * disp-table.el (standard-display-g1, standard-display-graphic):
        Only refuse to use string glyphs on X and MS-Windows.
 
 2000-05-25  Eli Zaretskii  <eliz@is.elta.co.il>
 
-       * international/mule-diag.el (describe-char-after): Use
-       display-graphic-p instead of window-system, so that this function
+       * international/mule-diag.el (describe-char-after):
+       Use display-graphic-p instead of window-system, so that this function
        works on MS-DOS.
 
 2000-05-25  Eli Zaretskii  <eliz@is.elta.co.il>
 
 2000-05-24  Eric M. Ludlam  <zappo@ultranet.com>
 
-       * rmailout.el (rmail-output-to-rmail-file): Added optional param
+       * rmailout.el (rmail-output-to-rmail-file): Add optional param
        STAY.
 
        * rmail.el (rmail-automatic-folder-directives): New user variable.
        * ediff-init.el (ediff-merge-filename-prefix): New customizable
        variable.
 
-       * ediff-mult.el (ediff-filegroup-action): Use
-       ediff-merge-filename-prefix.
+       * ediff-mult.el (ediff-filegroup-action):
+       Use ediff-merge-filename-prefix.
 
 2000-05-24  Michael Kifer  <kifer@cs.sunysb.edu>
 
 
        * speedbar.el (speedbar-easymenu-definition-base): Image toggle fix.
        (speedbar-insert-button): Invisible text property fix.
-       (speedbar-directory-plus): Renamed from speedbar-directory-+.
-       (speedbar-directory-minus): Renamed from speedbar-directory--.
-       (speedbar-page-plus): Renamed from speedbar-file-+.
-       (speedbar-page-minus): Renamed from speedbar-file--.
-       (speedbar-page): Renamed from speedbar-file-.
-       (speedbar-tag): Renamed from speedbar-tag-.
-       (speedbar-tag-plus): Renamed from speedbar-tag-+.
-       (speedbar-tag-minus): Renamed from speedbar-tag--.
+       (speedbar-directory-plus): Rename from speedbar-directory-+.
+       (speedbar-directory-minus): Rename from speedbar-directory--.
+       (speedbar-page-plus): Rename from speedbar-file-+.
+       (speedbar-page-minus): Rename from speedbar-file--.
+       (speedbar-page): Rename from speedbar-file-.
+       (speedbar-tag): Rename from speedbar-tag-.
+       (speedbar-tag-plus): Rename from speedbar-tag-+.
+       (speedbar-tag-minus): Rename from speedbar-tag--.
        (speedbar-expand-image-button-alist): Use above renames.
 
        * sb-dir-plus.xpm: Renamed from sb-dir+.xpm
 
 2000-05-24  Kenichi Handa  <handa@etl.go.jp>
 
-       * international/quail.el (quail-show-guidance-buf): Set
-       current-input-method of the guidance buffer to the name of the
+       * international/quail.el (quail-show-guidance-buf):
+       Set current-input-method of the guidance buffer to the name of the
        current input method.
 
 2000-05-23  Stefan Monnier  <monnier@cs.yale.edu>
 
 2000-05-22  Dave Love  <fx@gnu.org>
 
-       * loadhist.el (feature-symbols, file-provides, file-requires): Use
-       mapc.
+       * loadhist.el (feature-symbols, file-provides, file-requires):
+       Use mapc.
        (feature-file): Avoid calling symbol-name.  Doc fix.
        (file-set-intersect, file-dependents): Use dolist, not mapcar.
        (loadhist-hook-functions): Add mouse-position-function.
 
 2000-05-22  Sam Steingold  <sds@gnu.org>
 
-       * info.el (Info-fontify-node): Fixed the call to
+       * info.el (Info-fontify-node): Fix the call to
        `add-text-properties' (bug introduced on 2000-05-18).
 
 2000-05-22  Dave Love  <fx@gnu.org>
        * progmodes/etags.el: Add to debug-ignored-errors.
        (visit-tags-table-buffer): Clear out buffers holding old tables
        when making a new list.
-       (etags-recognize-tags-table, tags-recognize-empty-tags-table): Use
-       mapc.
+       (etags-recognize-tags-table, tags-recognize-empty-tags-table):
+       Use mapc.
 
-       * completion.el: Doc fixes.  Add to debug-ignored-errors.  Don't
-       quote keywords.
+       * completion.el: Doc fixes.  Add to debug-ignored-errors.
+       Don't quote keywords.
        (cmpl-string-case-type): Use character classes.
 
        * comint.el:
 
 2000-05-22  Kenichi Handa  <handa@etl.go.jp>
 
-       * international/quail.el (quail-simple-translation-keymap): Map
-       128..255 to quail-self-insert-command.
+       * international/quail.el (quail-simple-translation-keymap):
+       Map 128..255 to quail-self-insert-command.
        (quail-keyboard-layout-alist): Add definition for "pc102-de".
 
 2000-05-22  Stefan Monnier  <monnier@cs.yale.edu>
        * edmacro.el (edmacro-parse-keys): Return vector if any elements
        are invalid characters.
 
-       * international/mule-util.el (detect-coding-with-priority): Use
-       mapc.  Remove redundant lambda.
+       * international/mule-util.el (detect-coding-with-priority):
+       Use mapc.  Remove redundant lambda.
 
        * international/mule-diag.el (list-non-iso-charset-chars)
        (describe-fontset): Remove redundant lambda.
        * mail/rmail.el (rmail-decode-quoted-printable): Use delete-region
        and insert, not subst-char-in-region.
 
-       * international/mule-diag.el (list-character-sets-1): Handle
-       charsets eight-bit-control and eight-bit-graphic.
+       * international/mule-diag.el (list-character-sets-1):
+       Handle charsets eight-bit-control and eight-bit-graphic.
        (list-iso-charset-chars): Likewise.
        (list-block-of-chars): If CHARSET is not char-table, insert 8-bit
        characters as is.  Use indent-to to align characters.
 
-       * international/mule-cmds.el (find-multibyte-characters): Never
-       exclude charsets eight-bit-control and eight-bit-graphic.
+       * international/mule-cmds.el (find-multibyte-characters):
+       Never exclude charsets eight-bit-control and eight-bit-graphic.
 
 2000-05-19  Stefan Monnier  <monnier@cs.yale.edu>
 
        * ps-print.el: Compatibility, customization and doc fix.
        (ps-printer-name-option): Replace defconst by defvar.
        (ps-postscript-code-directory): XEmacs compatibility.
-       (ps-header-sheet, ps-setup, ps-begin-file, ps-begin-job): Code
-       fix.
+       (ps-header-sheet, ps-setup, ps-begin-file, ps-begin-job):
+       Code fix.
        (ps-user-defined-prologue, ps-print-prologue-header)
-       (ps-xemacs-face-kind-p, ps-face-bold-p, ps-face-italic-p): XEmacs
-       compatibility and code fix.
+       (ps-xemacs-face-kind-p, ps-face-bold-p, ps-face-italic-p):
+       XEmacs compatibility and code fix.
        (ps-print-background-image, ps-print-background-text):
        Customization fix.
        (ps-line-number-start, ps-n-up-on): New vars.
 
 2000-05-18  Espen Skoglund  <esk@ira.uka.de>
 
-       * pascal.el (pascal-indent-alist, pascal-indent-comment): Changed
+       * pascal.el (pascal-indent-alist, pascal-indent-comment): Change
        the indent-comment function to just return the appropriate indent.
 
 2000-05-18  Eric M. Ludlam  <zappo@ultranet.com>
 
 2000-05-18  Kenichi Handa  <handa@etl.go.jp>
 
-       * international/mule-diag.el (describe-char-after): Call
-       internal-char-font, not char-font.  If internal-char-font returns
+       * international/mule-diag.el (describe-char-after):
+       Call internal-char-font, not char-font.  If internal-char-font returns
        nil, display "-- none --".
 
 2000-05-17  Eli Zaretskii  <eliz@is.elta.co.il>
 
        * help.el (view-emacs-FAQ): Change `emacs-faq' to `efaq'.
 
-       * progmodes/compile.el (compilation-parse-errors): Collect
-       `nomessage' regexps last.
+       * progmodes/compile.el (compilation-parse-errors):
+       Collect `nomessage' regexps last.
 
        * dired.el (dired-mode-map): Use dired-do-query-replace-regexp.
 
        (help-xref-following): New variable.
        (help-make-xrefs): Use it.
        (help-xref-go-back): Use position information from stack element.
-       (help-follow): Make position in stack element a pair.  Use
-       help-xref-following.
+       (help-follow): Make position in stack element a pair.
+       Use help-xref-following.
 
        * autoarg.el: New file.
 
        (speedbar-easymenu-definition-special): Add flush cache & expand.
        (speedbar-visiting-tag-hook): Set new defaults.  Added options.
        (speedbar-reconfigure-keymaps-hook): New variable.
-       (speedbar-frame-parameters): Updated documentation.
-       (speedbar-use-imenu-flag): Updated custom tag.
+       (speedbar-frame-parameters): Update documentation.
+       (speedbar-use-imenu-flag): Update custom tag.
        (speedbar-dynamic-tags-function-list): New variable.
-       (speedbar-tag-hierarchy-method): Updated doc & custom.
+       (speedbar-tag-hierarchy-method): Update doc & custom.
        (speedbar-indentation-width, speedbar-indentation-width) New
        variables.
        (speedbar-hide-button-brackets-flag): Customizable.
        (speedbar-vc-indicator): Doc update.
-       (speedbar-ignored-path-expressions): Updated default value.
-       (speedbar-supported-extension-expressions): Updated default value.
+       (speedbar-ignored-path-expressions): Update default value.
+       (speedbar-supported-extension-expressions): Update default value.
        (speedbar-syntax-table): Remove {} paren status.
        (speedbar-file-key-map, speedbar-buffers-key-map): Add "=" to act
        as "+".  Added overlay aliases.
        (speedbar-reconfigure-keymaps): Run configure keymap hooks.
        (speedbar-item-info-tag-helper): Revamped to handle a wider range
        of arbitrary text, and new helper functions.
-       (speedbar-item-copy, speedbar-item-rename): Fixed trailing \ in
+       (speedbar-item-copy, speedbar-item-rename): Fix trailing \ in
        filename finder.
        (speedbar-make-button): Call `speedbar-insert-image-button-maybe'.
        (speedbar-directory-buttons): Update path search/expansion.
        (speedbar-make-tag-line): Pay attention to
        `speedbar-indentation-width'.  Use more care w/ invisible
        properties.
-       (speedbar-change-expand-button-char): Call
-       `speedbar-insert-image-button-maybe'.
-       (speedbar-apply-one-tag-hierarchy-method): Deleted (and replaced).
+       (speedbar-change-expand-button-char):
+       Call `speedbar-insert-image-button-maybe'.
+       (speedbar-apply-one-tag-hierarchy-method): Delete (and replaced).
        (speedbar-sort-tag-hierarchy, speedbar-prefix-group-tag-hierarchy)
        (speedbar-trim-words-tag-hierarchy)
        (speedbar-simple-group-tag-hierarchy): New functions.
        (speedbar-create-tag-hierarchy): Update doc, use new tag hooks.
-       (speedbar-insert-imenu-list, speedbar-insert-etags-list): New
-       functions.
+       (speedbar-insert-imenu-list, speedbar-insert-etags-list):
+       New functions.
        (speedbar-mouse-set-point): New function.
-       (speedbar-power-click): Updated documentation.
+       (speedbar-power-click): Update documentation.
        (speedbar-line-token, speedbar-goto-this-file): Handle more types
        of tag prefix text.
        (speedbar-expand-line, speedbar-contract-line): Make more robust
        (speedbar-tag-file): Use new `speedbar-fetch-dynamic-tags' fn.
        Use new generator insertion method.
        (speedbar-fetch-dynamic-tags): New function.
-       (speedbar-fetch-dynamic-imenu): Removed code now handled in
+       (speedbar-fetch-dynamic-imenu): Remove code now handled in
        `speedbar-fetch-dynamic-imenu'.
        (speedbar-fetch-dynamic-etags): Fix current buffer problem.
-       (speedbar-buffer-easymenu-definition): Added "Kill Buffer", and
+       (speedbar-buffer-easymenu-definition): Add "Kill Buffer", and
        "Revert Buffer" menu items.
        (speedbar-buffer-buttons-engine): Be smarter when creating a
        filename tag (for expansion purposes.).
        of character sets.
 
        * international/mule-diag.el (describe-char-after): New function.
-       (describe-font-internal): Adjusted for the change of font-info.
+       (describe-font-internal): Adjust for the change of font-info.
        (describe-font): Likewise.
        (print-fontset): Rewritten for the new fontset implementation.
        (describe-fontset): Include fontset alias names in completion.
-       (list-fontsets): Adjusted for the change of print-fontset.
+       (list-fontsets): Adjust for the change of print-fontset.
 
        * simple.el (what-cursor-position): If DETAIL is non-nil, call
        describe-char-after instead of displaying the detail in the echo
        area.
        (syntax-code-table): Format changed.
-       (string-to-syntax): Adjusted for the above change.
+       (string-to-syntax): Adjust for the above change.
 
 2000-05-12  Stefan Monnier  <monnier@cs.yale.edu>
 
        (help-xref-symbol-regexp): Add `face'.
        (help-make-xrefs): Check for quoted face names and adapt regexp
        submatch numbers to cope.
-       (help-xref-interned): Maybe insert face doc too.  Separate
-       sections with a line of hyphens.
+       (help-xref-interned): Maybe insert face doc too.
+       Separate sections with a line of hyphens.
 
        * faces.el: Some doc fixes.  Declare some functions obsolete.
        (describe-face): Add customize button.  Return the help
        simulations for greek-iso8859-7, add latin-iso8859-14 and
        latin-iso8859-15.
 
-       * international/mule-cmds.el (set-language-info-alist): Call
-       define-prefix-command with 3 arguments, to make the map suitable
+       * international/mule-cmds.el (set-language-info-alist):
+       Call define-prefix-command with 3 arguments, to make the map suitable
        for a menu.
 
 2000-05-07  Dave Love  <fx@gnu.org>
 
 2000-05-04  Milan Zamazal  <pdm@freesoft.cz>
 
-       * progmodes/glasses.el (glasses-convert-to-unreadable): Use
-       `glasses-separator' instead of the hard-wired "_".
+       * progmodes/glasses.el (glasses-convert-to-unreadable):
+       Use `glasses-separator' instead of the hard-wired "_".
        (glasses-mode): Call `glasses-make-unreadable' only in a single
        place.
 
        * subr.el (add-minor-mode): Handle AFTER for keymaps. Don't
        set TOGGLE's value.
 
-       * mailabbrev.el (mail-abbrev-insert-alias): Renamed from
+       * mailabbrev.el (mail-abbrev-insert-alias): Rename from
        mail-interactive-insert-alias.
        (mail-abbrev-complete-alias): New command.
        (mail-mode-map): Bind it to `M-TAB'.
 
 2000-05-02  Eli Zaretskii  <eliz@is.elta.co.il>
 
-       * international/mule-cmds.el (set-language-environment): Don't
-       concat an integer (dos-codepage), use format instead.
+       * international/mule-cmds.el (set-language-environment):
+       Don't concat an integer (dos-codepage), use format instead.
 
 2000-05-02  Dave Love  <fx@gnu.org>
 
 
 2000-04-28  Kenichi Handa  <handa@etl.go.jp>
 
-       * mail/sendmail.el (sendmail-send-it): Set
-       buffer-file-coding-system to the selected coding system for MIME
+       * mail/sendmail.el (sendmail-send-it):
+       Set buffer-file-coding-system to the selected coding system for MIME
        header.
 
 2000-04-27  Gerd Moellmann  <gerd@gnu.org>
        * image.el (find-image): New function.
        (defimage): Rewritten to find image at load time.
 
-       * startup.el (normal-top-level-add-to-load-path): Handle
-       case that the default directory is not in load-path.
+       * startup.el (normal-top-level-add-to-load-path):
+       Handle case that the default directory is not in load-path.
 
        * help.el: Old patch from Stefan Monnier.
        (help-xref-on-pp): New function.
 
 2000-04-25  Gerd Moellmann  <gerd@gnu.org>
 
-       * replace.el (perform-replace): Add parameters START and END.  Use
-       them instead of the check for a region in Transient Mark mode.
+       * replace.el (perform-replace): Add parameters START and END.
+       Use them instead of the check for a region in Transient Mark mode.
        (query-replace-read-args): Return two more list elements for the
        start and end of the region in Transient Mark mode.
        (query-replace, query-replace-regexp, query-replace-regexp-eval)
-       (map-query-replace-regexp, replace-string, replace-regexp): Add
-       optional last arguments START and END and pass them to
+       (map-query-replace-regexp, replace-string, replace-regexp):
+       Add optional last arguments START and END and pass them to
        perform-replace.
 
        * progmodes/ebrowse.el (ebrowse-tags-query-replace): Construct a
 
        * progmodes/inf-lisp.el (inferior-lisp-mode): Don't set
        non-existing variable comint-input-sentinel.
-       (inferior-lisp-args-to-list): Removed.
+       (inferior-lisp-args-to-list): Remove.
        (inferior-lisp): Use split-string instead of
        inferior-lisp-args-to-list.
 
        accept-process-output with ispell-accept-output.
        (ispell-init-process): Call ispell-process-status instead of
        process-status with.
-       (ispell-init-process): Call ispell-start-process.  Call
-       ispell-accept-output and ispell-send-string.  Don't call
+       (ispell-init-process): Call ispell-start-process.
+       Call ispell-accept-output and ispell-send-string.  Don't call
        process-kill-without-query and kill-process if they are unbound.
        (ispell-async-processp): New function.
 
 
        * menu-bar.el (menu-bar-options-menu): Make `mule' always visible.
        Modify `truncate-lines'.  Make `describe-language-environment'
-       always visible and add help.  Modify `describe-key' help.  Invoke
-       Info-directory from `info'.  New entry `emacs-manual'.
+       always visible and add help.  Modify `describe-key' help.
+       Invoke Info-directory from `info'.  New entry `emacs-manual'.
 
 2000-04-10  Gerd Moellmann  <gerd@gnu.org>
 
        * progmodes/ebrowse.el (ebrowse-tree-mode):
        Use propertized-buffer-identification.
        (ebrowse-update-member-buffer-mode-line): Likewise.
-       (ebrowse--mode-strings): Removed.
-       (ebrowse--mode-line-props): Removed.
+       (ebrowse--mode-strings): Remove.
+       (ebrowse--mode-line-props): Remove.
 
        * files.el (auto-mode-alist): Add `EBROWSE'.
 
        * progmodes/ebrowse.el (ebrowse-read): Skip forward over white
        space before testing for end of buffer.
-       (ebrowse-load): Removed.
+       (ebrowse-load): Remove.
        (ebrowse-revert-tree-buffer-from-file): Rewritten.
        (ebrowse-create-tree-buffer): Rewritten.
        (ebrowse-tree-mode): Read tree from buffer.
        * progmodes/ebrowse-ffh.el: New file.
 
        * progmodes/ebrowse.el (ebrowse-find-file-hook-fn):
-       Moved to ebrowse-ffh.el.
+       Move to ebrowse-ffh.el.
        (ebrowse-load): Add autoload.
 
        * finder.el (finder-commentary): Add autoload cookie.
        (network-connection-mode-setup): New function, saves host and
        service information in local variables.
 
-       * locate.el (locate-word-at-point): Added this function.
+       * locate.el (locate-word-at-point): Add this function.
        (locate): Default to using locate-word-at-point as input
        Run dired-mode-hook
 
        text of the URL was passed. Now the whole URL structure is passed
        and the function is responsible for extracting the parts it requires.
        Changed the default of `quickurl-format-function' accordingly.
-       (quickurl-insert): Changed the `funcall' of
+       (quickurl-insert): Change the `funcall' of
        `quickurl-format-function' to match the above change.
-       (quickurl-list-insert): Changed the `url' case so that it makes
+       (quickurl-list-insert): Change the `url' case so that it makes
        use of `quickurl-format-function', previous to this the format was
        hard wired.
 
        * international/mule-diag.el (describe-font): Don't refer to
        global-fontset-alist, instead call font-list.
        (describe-fontset, list-fontsets, mule-diag): Likewise.
-       (print-fontset): Adjusted for the change of fontset implementation.
+       (print-fontset): Adjust for the change of fontset implementation.
 
        * international/fontset.el (x-charset-registries): Variable removed,
        instead the corresponding data is stored in the default fontset.
 
 2000-03-14  Dave Love  <fx@gnu.org>
 
-       * subr.el (replace-regexp-in-string): Renamed from
+       * subr.el (replace-regexp-in-string): Rename from
        replace-regexps-in-string.  Doc fix.
 
 2000-03-12  Dave Love  <fx@gnu.org>
        builtin operators, use `font-lock-builtin-face' for Emacs and
        `font-lock-preprocessor-face' otherwise.
 
-       * font-lock.el (lisp-font-lock-keywords-1): Highlight
-       `(defun (setf foo)' differently.
+       * font-lock.el (lisp-font-lock-keywords-1):
+       Highlight `(defun (setf foo)' differently.
 
 2000-03-08  Stefan Monnier  <monnier@cs.yale.edu>
 
        both cases close together.  Also apply a more generic algorithm
        for suffixes (the mirror image of the algorithm used for
        prefixes).  Use shy-groups.  Use nreverse rather than reverse.
-       (regexp-opt-try-suffix): Removed.
+       (regexp-opt-try-suffix): Remove.
 
        * cmuscheme.el (inferior-scheme-mode-map): Define it independently
        from comint-mode-map, so we can just inherit from it.  Also, move
 
 2000-03-01  David Ponce  <david.ponce@wanadoo.fr>
 
-       * recentf.el (recentf): Added version tag to the defgroup of recentf.
+       * recentf.el (recentf): Add version tag to the defgroup of recentf.
 
 2000-03-01  David Ponce  <david.ponce@wanadoo.fr>
 
-       * recentf.el (recentf-cleanup): Changed to remove excluded file too.
+       * recentf.el (recentf-cleanup): Change to remove excluded file too.
        (recentf-edit-list-action): `recentf-edit-list' checkbox widget
        action to select/unselect a file.
        (recentf-edit-list): Code cleanup and improvement.
        (recentf-open-more-files-action): `recentf-open-more-files' button
        widget action to open a file.
        (recentf-open-more-files): No more use standard completion but widgets.
-       (recentf-more-collection): Deleted.
-       (recentf-more-history): Deleted.
-       (recentf-setup-more-completion): Deleted.
+       (recentf-more-collection): Delete.
+       (recentf-more-history): Delete.
+       (recentf-setup-more-completion): Delete.
 
 2000-03-01  David Ponce  <david.ponce@wanadoo.fr>
 
        (recentf-edit-selected-items): New global variable, used by
        `recentf-edit-list' to hold the list of files to be removed from
        the recent list.
-       (recentf-make-menu-items): Updated to display a "Edit list..."
+       (recentf-make-menu-items): Update to display a "Edit list..."
        menu item.  Minor code cleanup.
 
 2000-03-01  David Ponce  <david.ponce@wanadoo.fr>
        used by `recentf-open-more-files' completion.
        (recentf-setup-more-completion): New function to setup completion for
        `recentf-open-more-files'.
-       (recentf-make-menu-items): Updated to display a "More..." menu item.
+       (recentf-make-menu-items): Update to display a "More..." menu item.
 
 2000-03-01  David Ponce  <david.ponce@wanadoo.fr>
 
        (recentf-make-menu-items): New menu filter handling.
        (recentf-make-menu-item): New helper function.
        (recentf-menu-elements): New menu handling function.
-       (recentf-sort-ascending): Updated to new menu filter handling.
-       (recentf-sort-descending): Updated to new menu filter handling.
+       (recentf-sort-ascending): Update to new menu filter handling.
+       (recentf-sort-descending): Update to new menu filter handling.
        (recentf-sort-basenames-ascending): New menu filter function.
        (recentf-sort-basenames-descending): New menu filter function.
        (recentf-show-basenames): New menu filter function.
        instead of assoc-delete-all.
        (frame-notice-user-settings): Ditto.
 
-       * subr.el (assq-delete-all): Renamed from assoc-delete-all.
+       * subr.el (assq-delete-all): Rename from assoc-delete-all.
        Don't copy alist.
 
 2000-02-28  Eli Barzilay  <eli@cs.cornell.edu>
 
        * calculator.el (calculator-use-menu): New option.
-       (calculator-initial-bindings): Changed some bindings to work as macros.
-       (calculator-forced-input): Removed.
+       (calculator-initial-bindings): Change some bindings to work as macros.
+       (calculator-forced-input): Remove.
        (calculator-restart-other-mode): New variable.
        (calculator-mode-map): Set up menu.
 
 2000-02-28  Jari Aalto  <jari.aalto@poboxes.com>
 
-       * font-lock.el (java-keywords): Added missing java 1.2.2 Javadoc tags.
+       * font-lock.el (java-keywords): Add missing java 1.2.2 Javadoc tags.
 
 2000-02-28  Michael Kifer  <kifer@cs.sunysb.edu>
 
        (footnote-latin-regexp): New variable.
        (Footnote-latin): New function.
        (footnote-style-alist): Add element for latin style.
-       (footnote-style): Moved.
+       (footnote-style): Move.
        (Footnote-goto-footnote): Use eq to test arg.
 
        * mouse.el (mouse-drag-mode-line-1): Remove `growth =' message.
 
 2000-02-15  Dirk Herrmann  <D.Herrmann@tu-bs.de>
 
-       * textmodes/bibtex.el (bibtex-mode): Replaced manual splitting of path
+       * textmodes/bibtex.el (bibtex-mode): Replace manual splitting of path
        at ':' characters by call to split-string.
 
 2000-02-15  Dirk Herrmann  <D.Herrmann@tu-bs.de>
        * textmodes/bibtex.el: Some temporary comments removed.
        (bibtex-field-name, bibtex-entry-type): Made the relationship explicit.
        (bibtex-field-const): Allow capital letters.
-       (bibtex-start-of-string): Deleted because unused.
+       (bibtex-start-of-string): Delete because unused.
 
        * textmodes/bibtex.el: Unified some nomenclature.  We no longer
        use the term 'reference' to describe a bibtex entry as a whole.
        Further, reference keys are no longer called 'labels'.
-       (bibtex-keys): Renamed to bibtex-reference-keys.
-       (bibtex-reformat-previous-labels): Renamed to
+       (bibtex-keys): Rename to bibtex-reference-keys.
+       (bibtex-reformat-previous-labels): Rename to
        bibtex-reformat-previous-reference-keys.
-       (bibtex-reference-type): Renamed to bibtex-entry-type.
-       (bibtex-reference-head): Renamed to bibtex-entry-head.
-       (bibtex-reference-maybe-empty-head): Renamed to
+       (bibtex-reference-type): Rename to bibtex-entry-type.
+       (bibtex-reference-head): Rename to bibtex-entry-head.
+       (bibtex-reference-maybe-empty-head): Rename to
        bibtex-entry-maybe-empty-head.
-       (bibtex-key-in-reference): Renamed to bibtex-key-in-entry.
-       (bibtex-search-reference): Renamed to bibtex-search-entry.
-       (bibtex-enclosing-reference-maybe-empty-head): Renamed to
+       (bibtex-key-in-reference): Rename to bibtex-key-in-entry.
+       (bibtex-search-reference): Rename to bibtex-search-entry.
+       (bibtex-enclosing-reference-maybe-empty-head): Rename to
        bibtex-enclosing-entry-maybe-empty-head.
        (bibtex-entry-field-alist, bibtex-entry-head)
        (bibtex-font-lock-keywords, bibtex-skip-to-valid-entry)
 
 2000-02-15  Dirk Herrmann  <D.Herrmann@tu-bs.de>
 
-       * textmodes/bibtex.el (bibtex-strings, bibtex-keys): Removed redundant
+       * textmodes/bibtex.el (bibtex-strings, bibtex-keys): Remove redundant
        comment.
        (bibtex-format-field-delimiters): New function, functionality
        extracted from bibtex-format-entry.
        (bibtex-field-string-or-const, bibtex-field-text, bibtex-field)
        (bibtex-name-in-field, bibtex-text-in-field, bibtex-reference-infix)
        (bibtex-string, bibtex-key-in-string, bibtex-text-in-string):
-       Deleted as parsing is now performed by the following functions.
+       Delete as parsing is now performed by the following functions.
        (bibtex-parse-nested-braces, bibtex-parse-field-string-braced)
        (bibtex-parse-quoted-string, bibtex-parse-field-string-quoted)
        (bibtex-parse-field-string, bibtex-search-forward-field-string)
        entries.  Instead of reporting the results of the parsing by
        match-beginning or match-end, these functions return data structures
        that hold the corresponding positions.
-       (bibtex-enclosing-field): Changed to also report field boundaries by
+       (bibtex-enclosing-field): Change to also report field boundaries by
        return values rather than by match-beginning or match-end.
        The following functions have been adapted to use the new
        parsing functions.
        * bibtex.el: Hiding of entry bodies is not longer provided by
        bibtex.el directly.  Instead the hideshow package can be used.
        Added a special bibtex entry to hs-special-modes-alist.
-       (bibtex-hs-forward-sexp): Added for hideshow.el.
+       (bibtex-hs-forward-sexp): Add for hideshow.el.
 
 2000-02-15  Dirk Herrmann  <D.Herrmann@tu-bs.de>
 
-       * bibtex.el (bibtex-entry-field-alist): Added booktitle field to
+       * bibtex.el (bibtex-entry-field-alist): Add booktitle field to
        proceedings entry type (for cross referencing). Thanks to Wagner
        Toledo Correa for the suggestion.
 
 2000-02-12  Gerd Moellmann  <gerd@gnu.org>
 
        * uniquify.el (toplevel): Require CL at compile time.
-       (uniquify-push): Removed.
+       (uniquify-push): Remove.
 
-       * shadowfile.el (shadow-when): Removed.
+       * shadowfile.el (shadow-when): Remove.
 
-       * tempo.el (tempo-dolist, tempo-mapc): Removed.
+       * tempo.el (tempo-dolist, tempo-mapc): Remove.
        (tempo-process-and-insert-string): Use dolist instead of tempo-dolist.
 
        * textmodes/sgml-mode.el (sgml-mode-common): Remove `$' from
 
        * wid-edit.el (widgets) [defgroup]: Remove url link.
        (widget-color-choice-list, widget-color-history, widget-mouse-help):
-       Deleted.
+       Delete.
        (widget-specify-field, widget-specify-button): Don't use
        widget-mouse-help as help-echo property.
        (default): Use #'ignore for :validate and :mouse-down-action.
        (widget-color-complete): Use facemenu-color-alist.
        (widget-color-action): Use facemenu-read-color.
 
-       * emacs-lisp/cl-macs.el: Don't bother testing for defalias.  Don't
-       set up `caar' &c that we now have.
+       * emacs-lisp/cl-macs.el: Don't bother testing for defalias.
+       Don't set up `caar' &c that we now have.
 
 2000-02-09  Ray Blaak  <blaak@gnu.org>
 
        * bindings.el (mode-line-input-method-map): New variable.
        (mode-line-mule-info): Use it; fix last change.
        (mode-line-mode-menu): Move definition.
-       (mode-line-mouse-sensitive-p): Deleted.
+       (mode-line-mouse-sensitive-p): Delete.
        (mode-line-mode-name): Don't use mode-line-mouse-sensitive-p.
-       (make-mode-line-mouse-sensitive): Deleted.  Body moved to top level.
+       (make-mode-line-mouse-sensitive): Delete.  Body moved to top level.
 
        * startup.el (command-line-1): Don't call
        make-mode-line-mouse-sensitive.
        (font-lock-add-keywords): Make it work even if font-lock-mode is nil,
        so that it can be used more easily in <foo>-mode-hook.  Also make sure
        to avoid duplicate entries.
-       (font-lock-update-removed-keyword-alist): Renamed `major-mode'->`mode'.
+       (font-lock-update-removed-keyword-alist): Rename `major-mode'->`mode'.
        (font-lock-remove-keywords): Just as was done for `add', allow it to
        work even if font-lock-mode is nil.  Also make sure we don't modify
        any pre-existing list by forcing a copy-sequence.  Finally rename
        (idlwave-if, idlwave-procedure, idlwave-function, idlwave-repeat)
        (idlwave-while): Respect `idlwave-reserved-word-upcase'.
        (idlwave-rw-case): New function.
-       (idlwave-statement-match): Fixed problem with assignment regexp.
-       (idlwave-font-lock-keywords): Improved regexp for keyword parameters.
+       (idlwave-statement-match): Fix problem with assignment regexp.
+       (idlwave-font-lock-keywords): Improve regexp for keyword parameters.
        (idlwave-surround): New argument LENGTH to support padding of
        operators longer than 1 char.
 
-       * progmodes/idlw-shell.el (idlwave-shell-print): Fixed bug with
+       * progmodes/idlw-shell.el (idlwave-shell-print): Fix bug with
        idlwave-shell-expression-overlay.  Implemented printing of
        expressions on higher levels of the calling stack.
        (idlwave-shell-display-level-in-calling-stack): Restore stack level.
        negative level numbers.
        (idlwave-shell-mode): Set `modeline-format'.
        (idlwave-shell-display-line): Set `idlwave-shell-mode-line-info'.
-       (idlwave-shell-make-new-bp-overlay): Fixed glyph display for Emacs 21.
+       (idlwave-shell-make-new-bp-overlay): Fix glyph display for Emacs 21.
        (idlwave-shell-print-expression-function): New option.
 
        * progmodes/idlw-toolbar.el (idlwave-toolbar-add-everywhere)
        end position.
        (jit-lock-stealth-chunk-start): Rewritten.
 
-       * info.el (Info-title-face-alist): Removed.
+       * info.el (Info-title-face-alist): Remove.
        (Info-title-1-face, Info-title-2-face, Info-title-3-face): New faces.
        (Info-fontify-node): Use these faces.
 
 
 2000-01-28  Gerd Moellmann  <gerd@gnu.org>
 
-       * emacs-lisp/cl-macs.el (cl-parse-loop-clause): Recognize
-       `collecting' as synonym for `collect'.
+       * emacs-lisp/cl-macs.el (cl-parse-loop-clause):
+       Recognize `collecting' as synonym for `collect'.
 
        * ange-ftp.el (ange-ftp-copy-file-internal): Quote new name
        for the case it contains spaces.
        Do not call make-variable-buffer-local.
        (end-of-defun): Use new variable name; doc fix.
 
-       * subr.el (dolist, dotimes): Copied from cl-macs.el
+       * subr.el (dolist, dotimes): Copy from cl-macs.el
        and made to work.
 
        * mail/undigest.el (rmail-digest-end-regexps):
 
 2000-01-14  Gerd Moellmann  <gerd@gnu.org>
 
-       * emacs-lisp/copyright.el (copyright-update): Removed the
+       * emacs-lisp/copyright.el (copyright-update): Remove the
        requirement for a trailing space from `copyright-regexp', to
        support copyrights with owner specified on a separate line..
 
 
        * net: New directory.
 
-       * emacs-lisp/lisp-mode.el (eval-last-sexp-1): Renamed from
+       * emacs-lisp/lisp-mode.el (eval-last-sexp-1): Rename from
        eval-last-sexp.  Don't bind debug-on-error here.
        (eval-last-sexp): New function.  Bind debug-on-error if
        eval-expression-debug-on-error is non-nil.
        * emacs-lisp/lisp-mode.el (with-syntax-table):
        Set up lisp-indent-function property.
 
-       * subr.el (with-syntax-table): Moved from simple.el.
+       * subr.el (with-syntax-table): Move from simple.el.
 
-       * simple.el (with-syntax-table): Moved to subr.el.
+       * simple.el (with-syntax-table): Move to subr.el.
 
 2000-01-11  Gerd Moellmann  <gerd@gnu.org>
 
 
 2000-01-10  John Wiegley  <johnw@gnu.org>
 
-       * allout.el (isearch-done/outline-provisions): Added `edit'
+       * allout.el (isearch-done/outline-provisions): Add `edit'
        argument to correspond with the current definition of `isearch-done'.
 
 2000-01-10  Dave Love  <fx@gnu.org>
        (version20p): New variable.
        (xemacsp): New variable.
        (ispell-choices-win-default-height): Fix for XEmacs visibility.
-       (ispell-dictionary-alist1): Added Brasileiro dictionary.
+       (ispell-dictionary-alist1): Add Brasileiro dictionary.
        (ispell-dictionary-alist6): Russian command lines no longer accept
        run-together words.
        (ispell-local-dictionary-alist): Add koi8-r to customize definition.
        (ispell-dictionary-alist): Add koi8-r to customize definition.
-       (check-ispell-version): Added documentation string.  Return library
+       (check-ispell-version): Add documentation string.  Return library
        path when called non-interactively.
        (ispell-menu-map-needed): Uses new variables.
        (ispell-library-path): New variable.
        (ispell-decode-string): XEmacs fix for bogus variable bindings.
-       (ispell-word): Improved documentation string.  Test for valid
+       (ispell-word): Improve documentation string.  Test for valid
        character mappings.  Correctly check typed in word changes that can
        result in single words split into multiple words.
        Return replacement word.
 
 2000-01-07  Dave Love  <fx@gnu.org>
 
-       * add-log.el (add-log-debugging): Deleted.
+       * add-log.el (add-log-debugging): Delete.
        (add-change-log-entry): Treat a backup FILE-NAME as its parent
        file.  Remove debugging code.
        (change-log-get-method-definition, change-log-name): Add doc.
        M-C-e, M-C-h, C-j, C-xnd, TAB.
        (fortran-mode): Set beginning-of-defun, end-of-defun.
        (fortran-column-ruler): Simplify.
-       (fortran-mark-subprogram, fortran-narrow-to-subprogram): Deleted.
+       (fortran-mark-subprogram, fortran-narrow-to-subprogram): Delete.
        (fortran-with-subprogram-narrowing): Likewise.
        (fortran-indent-subprogram): Call mark-defun.
        (fortran-check-for-matching-do): Change narrowing.
        * faces.el (face-read-integer, read-face-attribute)
        (color-defined-p, color-values): Unspecified-{f,b}g are now strings.
 
-2000-01-03  Martin Stjernholm  <bug-cc-mode@gnu.org>
+2000-01-03  Martin Stjernholm  <mast@lysator.liu.se>
 
        * progmodes/cc-cmds.el (c-fill-paragraph): Count number of spaces
        at comment end, and re-insert them after filling.
        (display-color-p, frame-set-background-mode): Pass the frame to
        tty-display-color-p.
 
-       * term/tty-colors.el (tty-defined-color-alist): Renamed from
+       * term/tty-colors.el (tty-defined-color-alist): Rename from
        tty-color-alist.
        (tty-color-alist, tty-modify-color-alist): New functions.
        (tty-color-define, tty-color-clear, tty-color-approximate)
index a1cd6d19ce87885513393052f11e72915c50ff66..6f87c6da31210943f8fbca1d19528418f19732a2 100644 (file)
@@ -70,17 +70,6 @@ AUTOGENEL = loaddefs.el \
        cedet/srecode/loaddefs.el \
        org/org-loaddefs.el
 
-# Versioned files that are the value of someone's `generated-autoload-file'.
-# Note that update_loaddefs parses this.
-AUTOGEN_VCS = \
-       ps-print.el \
-       emulation/tpu-edt.el \
-       mail/rmail.el \
-       dired.el \
-       ibuffer.el \
-       htmlfontify.el \
-       emacs-lisp/eieio.el
-
 # Value of max-lisp-eval-depth when compiling initially.
 # During bootstrapping the byte-compiler is run interpreted when compiling
 # itself, and uses more stack than usual.
@@ -106,6 +95,9 @@ COMPILE_FIRST = \
        $(lisp)/emacs-lisp/bytecomp.elc \
        $(lisp)/emacs-lisp/autoload.elc
 
+# Prevent any settings in the user environment causing problems.
+unexport EMACSDATA EMACSDOC EMACSPATH
+
 # The actual Emacs command run in the targets below.
 # Prevent any setting of EMACSLOADPATH in user environment causing problems.
 emacs = EMACSLOADPATH= '$(EMACS)' $(EMACSOPT)
@@ -145,9 +137,7 @@ setwins_for_subdirs=for file in `find ${srcdir} -type d -print`; do \
 # we add them here to make sure they get built.
 all: compile-main $(lisp)/cus-load.el $(lisp)/finder-inf.el
 
-doit:
-
-.PHONY: all doit custom-deps finder-data autoloads update-subdirs
+.PHONY: all custom-deps finder-data autoloads update-subdirs
 
 # custom-deps and finder-data both used to scan _all_ the *.el files.
 # This could lead to problems in parallel builds if automatically
@@ -164,8 +154,8 @@ doit:
 # since they will never contain any useful information
 # (see finder-no-scan-regexp and custom-dependencies-no-scan-regexp).
 $(lisp)/cus-load.el:
-       $(MAKE) $(MFLAGS) custom-deps
-custom-deps: doit
+       $(MAKE) custom-deps
+custom-deps:
        $(setwins_almost); \
        echo Directories: $$wins; \
        $(emacs) -l cus-dep \
@@ -173,26 +163,25 @@ custom-deps: doit
          -f custom-make-dependencies $$wins
 
 $(lisp)/finder-inf.el:
-       $(MAKE) $(MFLAGS) finder-data
-finder-data: doit
+       $(MAKE) finder-data
+finder-data:
        $(setwins_finder); \
        echo Directories: $$wins; \
        $(emacs) -l finder \
          --eval '(setq generated-finder-keywords-file (unmsys--file-name "$(srcdir)/finder-inf.el"))' \
          -f finder-compile-keywords-make-dist $$wins
 
-# The chmod +w is to handle env var CVSREAD=1.
 # Use expand-file-name rather than $abs_scrdir so that Emacs does not
 # get confused when it compares file-names for equality.
 #
 # Note that we set no-update-autoloads in _generated_ leim files.
 # If you want to allow autoloads in such files, remove that,
 # and make this depend on leim.
-autoloads: $(LOADDEFS) doit
-       cd $(lisp) && chmod +w $(AUTOGEN_VCS)
+autoloads: $(LOADDEFS)
        $(setwins_almost); \
        echo Directories: $$wins; \
        $(emacs) -l autoload \
+           --eval '(setq autoload-ensure-writable t)' \
            --eval '(setq autoload-builtin-package-versions t)' \
            --eval '(setq generated-autoload-file (expand-file-name (unmsys--file-name "$(srcdir)/loaddefs.el")))' \
            -f batch-update-autoloads $$wins
@@ -200,8 +189,8 @@ autoloads: $(LOADDEFS) doit
 # This is required by the bootstrap-emacs target in ../src/Makefile, so
 # we know that if we have an emacs executable, we also have a subdirs.el.
 $(lisp)/subdirs.el:
-       $(MAKE) $(MFLAGS) update-subdirs
-update-subdirs: doit
+       $(MAKE) update-subdirs
+update-subdirs:
        $(setwins_for_subdirs); \
        for file in $$wins; do \
           $(srcdir)/../build-aux/update-subdirs $$file; \
@@ -223,7 +212,8 @@ bzr-update: compile finder-data custom-deps
 # Update the AUTHORS file.
 
 update-authors:
-       $(emacs) -l authors -f batch-update-authors $(top_srcdir)/etc/AUTHORS $(top_srcdir)
+       $(emacs) -L "$(top_srcdir)/admin" -l authors \
+         -f batch-update-authors "$(top_srcdir)/etc/AUTHORS" "$(top_srcdir)"
 
 
 ETAGS = ../lib-src/etags
@@ -292,7 +282,7 @@ compile-onefile:
 compile-first: $(COMPILE_FIRST)
 
 # In `compile-main' we could directly do
-#    ... | xargs $(MAKE) $(MFLAGS) EMACS="$(EMACS)"
+#    ... | xargs $(MAKE)
 # and it works, but it generates a lot of messages like
 #    make[2]: gnus/gnus-mlspl.elc is up to date.
 # so instead, we use "xargs echo" to split the list of file into manageable
@@ -316,7 +306,7 @@ compile-main: leim semantic compile-clean
          echo "$${el}c"; \
        done | xargs $(XARGS_LIMIT) echo) | \
        while read chunk; do \
-         $(MAKE) $(MFLAGS) compile-targets EMACS="$(EMACS)" TARGETS="$$chunk"; \
+         $(MAKE) compile-targets TARGETS="$$chunk"; \
        done
 
 .PHONY: compile-clean
@@ -333,7 +323,7 @@ compile-clean:
 
 .PHONY: leim semantic
 leim:
-       cd ../leim && $(MAKE) $(MFLAGS) all EMACS="$(EMACS)"
+       $(MAKE) -C ../leim all EMACS="$(EMACS)"
 
 # FIXME.  Yuck.
 semantic:
@@ -341,23 +331,21 @@ semantic:
          .*) EMACS="../${EMACS}" ;; \
           *) EMACS="${EMACS}" ;; \
        esac; \
-       cd ../admin/grammars && $(MAKE) $(MFLAGS) all EMACS="$${EMACS}"
+       $(MAKE) -C ../admin/grammars all EMACS="$${EMACS}"
 
 # Compile all Lisp files, but don't recompile those that are up to
 # date.  Some .el files don't get compiled because they set the
 # local variable no-byte-compile.
 # Calling make recursively because suffix rule cannot have prerequisites.
-# Explicitly pass EMACS (sometimes ../src/bootstrap-emacs) to those
-# sub-makes that run rules that use it, for the sake of some non-GNU makes.
 compile: $(LOADDEFS) autoloads compile-first
-       $(MAKE) $(MFLAGS) compile-main EMACS="$(EMACS)"
+       $(MAKE) compile-main
 
 # Compile all Lisp files.  This is like `compile' but compiles files
 # unconditionally.  Some files don't actually get compiled because they
 # set the local variable no-byte-compile.
-compile-always: doit
+compile-always:
        cd $(lisp) && rm -f *.elc */*.elc */*/*.elc */*/*/*.elc
-       $(MAKE) $(MFLAGS) compile EMACS="$(EMACS)"
+       $(MAKE) compile
 
 .PHONY: backup-compiled-files compile-after-backup
 
@@ -388,7 +376,7 @@ compile-after-backup: backup-compiled-files compile-always
 # There is no reason to use this rule unless you only have a single
 # core and CPU time is an issue.
 .PHONY: compile-one-process
-compile-one-process: doit $(LOADDEFS) compile-first $(lisp)/progmodes/cc-mode.elc
+compile-one-process: $(LOADDEFS) compile-first
        $(emacs) $(BYTE_COMPILE_FLAGS) \
            --eval "(batch-byte-recompile-directory 0)" $(lisp)
 
@@ -416,7 +404,6 @@ $(MH_E_DIR)/mh-loaddefs.el: $(MH_E_SRC)
        $(emacs) -l autoload \
           --eval "(setq generate-autoload-cookie \";;;###mh-autoload\")" \
           --eval "(setq generated-autoload-file (expand-file-name (unmsys--file-name \"$@\")))" \
-          --eval "(setq make-backup-files nil)" \
           -f batch-update-autoloads $(MH_E_DIR)
 
 # Update TRAMP internal autoloads. Maybe we could move tramp*.el into
@@ -434,7 +421,6 @@ $(TRAMP_DIR)/tramp-loaddefs.el: $(TRAMP_SRC)
        $(emacs) -l autoload \
           --eval "(setq generate-autoload-cookie \";;;###tramp-autoload\")" \
           --eval "(setq generated-autoload-file (expand-file-name (unmsys--file-name \"$@\")))" \
-          --eval "(setq make-backup-files nil)" \
           -f batch-update-autoloads $(TRAMP_DIR)
 
 CAL_DIR = $(lisp)/calendar
@@ -456,21 +442,18 @@ $(CAL_DIR)/cal-loaddefs.el: $(CAL_SRC)
        $(emacs) -l autoload \
           --eval "(setq generate-autoload-cookie \";;;###cal-autoload\")" \
           --eval "(setq generated-autoload-file (expand-file-name (unmsys--file-name \"$@\")))" \
-          --eval "(setq make-backup-files nil)" \
           -f batch-update-autoloads $(CAL_DIR)
 
-$(CAL_DIR)/diary-loaddefs.el: $(CAL_SRC)
+$(CAL_DIR)/diary-loaddefs.el: $(CAL_SRC) $(CAL_DIR)/cal-loaddefs.el
        $(emacs) -l autoload \
           --eval "(setq generate-autoload-cookie \";;;###diary-autoload\")" \
           --eval "(setq generated-autoload-file (expand-file-name (unmsys--file-name \"$@\")))" \
-          --eval "(setq make-backup-files nil)" \
           -f batch-update-autoloads $(CAL_DIR)
 
-$(CAL_DIR)/hol-loaddefs.el: $(CAL_SRC)
+$(CAL_DIR)/hol-loaddefs.el: $(CAL_SRC) $(CAL_DIR)/diary-loaddefs.el
        $(emacs) -l autoload \
           --eval "(setq generate-autoload-cookie \";;;###holiday-autoload\")" \
           --eval "(setq generated-autoload-file (expand-file-name (unmsys--file-name \"$@\")))" \
-          --eval "(setq make-backup-files nil)" \
           -f batch-update-autoloads $(CAL_DIR)
 
 .PHONY: bootstrap-clean distclean maintainer-clean
@@ -501,7 +484,7 @@ check-declare:
 # CC Mode uses a compile time macro system which causes a compile time
 # dependency in cc-*.elc files on the macros in other cc-*.el and the
 # version string in cc-defs.el.
-$(lisp)/progmodes/cc-align.elc $(lisp)/progmodes/cc-awk.elc\
+$(lisp)/progmodes/cc-align.elc\
  $(lisp)/progmodes/cc-cmds.elc $(lisp)/progmodes/cc-compat.elc\
  $(lisp)/progmodes/cc-engine.elc $(lisp)/progmodes/cc-fonts.elc\
  $(lisp)/progmodes/cc-langs.elc $(lisp)/progmodes/cc-menus.elc\
@@ -509,28 +492,22 @@ $(lisp)/progmodes/cc-align.elc $(lisp)/progmodes/cc-awk.elc\
  $(lisp)/progmodes/cc-vars.elc: \
    $(lisp)/progmodes/cc-bytecomp.elc $(lisp)/progmodes/cc-defs.elc
 
-$(lisp)/progmodes/cc-align.elc: \
-   $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc
-
-$(lisp)/progmodes/cc-cmds.elc: \
+$(lisp)/progmodes/cc-align.elc $(lisp)/progmodes/cc-cmds.elc: \
    $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc
 
 $(lisp)/progmodes/cc-compat.elc: \
    $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-styles.elc \
    $(lisp)/progmodes/cc-engine.elc
 
-$(lisp)/progmodes/cc-defs.elc: $(lisp)/progmodes/cc-bytecomp.elc \
-   $(lisp)/emacs-lisp/cl.elc $(lisp)/emacs-lisp/regexp-opt.elc
+$(lisp)/progmodes/cc-defs.elc: $(lisp)/progmodes/cc-bytecomp.elc
 
 $(lisp)/progmodes/cc-engine.elc: $(lisp)/progmodes/cc-langs.elc \
    $(lisp)/progmodes/cc-vars.elc
 
 $(lisp)/progmodes/cc-fonts.elc: $(lisp)/progmodes/cc-langs.elc \
-   $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc \
-   $(lisp)/font-lock.elc
+   $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc
 
-$(lisp)/progmodes/cc-langs.elc: $(lisp)/progmodes/cc-vars.elc \
-   $(lisp)/emacs-lisp/cl.elc
+$(lisp)/progmodes/cc-langs.elc: $(lisp)/progmodes/cc-vars.elc
 
 $(lisp)/progmodes/cc-mode.elc: $(lisp)/progmodes/cc-langs.elc \
    $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc \
@@ -540,6 +517,4 @@ $(lisp)/progmodes/cc-mode.elc: $(lisp)/progmodes/cc-langs.elc \
 $(lisp)/progmodes/cc-styles.elc: $(lisp)/progmodes/cc-vars.elc \
    $(lisp)/progmodes/cc-align.elc
 
-$(lisp)/progmodes/cc-vars.elc: $(lisp)/custom.elc $(lisp)/widget.elc
-
 # Makefile ends here.
index 2cba65e95598281ecf4321299f2b02285b871f6e..ac76ce26b41ae2f8d158740867188d5ace9bb8a1 100644 (file)
@@ -718,7 +718,7 @@ the output includes key-bindings of commands."
                 (setq doc (list (car properties)))
                 (while (setq properties (cdr (cdr properties)))
                   (setq doc (cons (car properties) doc)))
-                (mapconcat #'symbol-name (nreverse doc) " "))
+                (mapconcat (lambda (p) (format "%s" p)) (nreverse doc) " "))
               (when (get symbol 'widget-type)
                 (apropos-documentation-property
                  symbol 'widget-documentation t))
index 37ddf87cfbfc71927aafa783fe0192655d09949c..ef155ee2b99c02ec8afabcc548e92dc0a58a9160 100644 (file)
@@ -4,7 +4,7 @@
 ;; Inc.
 
 ;; Author: Morten Welinder <terra@gnu.org>
-;; Keywords: files archives msdog editing major-mode
+;; Keywords: files archives ms-dos editing major-mode
 ;; Favorite-brand-of-beer: None, I hate beer.
 
 ;; This file is part of GNU Emacs.
@@ -31,7 +31,7 @@
 ;; understand the directory level of the archives.  For this reason,
 ;; you should expect this code to need more fiddling than tar-mode.el
 ;; (although it at present has fewer bugs :-)  In particular, I have
-;; not tested this under Ms-Dog myself.
+;; not tested this under MS-DOS myself.
 ;; -------------------------------------
 ;; INTERACTION: arc-mode.el should play together with
 ;;
index eab2ea7144fba55f4d33617f2a26d8c14962624f..7ea54a8e2b4d3fc84d6475fb4d0f8c9ebaa51394 100644 (file)
@@ -1298,8 +1298,8 @@ is greater than `bookmark-alist-modification-count'."
 
 ;;;###autoload
 (defun bookmark-write ()
-  "Write bookmarks to a file (reading the file name with the minibuffer).
-Don't use this in Lisp programs; use `bookmark-save' instead."
+  "Write bookmarks to a file (reading the file name with the minibuffer)."
+  (declare (interactive-only bookmark-save))
   (interactive)
   (bookmark-maybe-load-default-file)
   (bookmark-save t))
index 0348b95a1ef9542e84d71ae0f880517fe6c53ae0..5e9c6908f28b792e6051d6f0582a252cf457a69f 100644 (file)
@@ -1143,7 +1143,7 @@ and move point to current buffer."
     (delete-char -1)
     (bs--set-window-height)
     (bs--goto-current-buffer)
-    (font-lock-fontify-buffer)
+    (font-lock-ensure)
     (bs-apply-sort-faces)
     (set-buffer-modified-p nil)))
 
index 4bd37a4982df2455bd2c19ce4e53bfe693115800..c26b007bb96c17f81944b27686e03cc006f8d6e5 100644 (file)
         (Math-objectp a))
        ((eq (car a) 'var)
         (if (eq (car b) 'var)
-            (string-lessp (symbol-name (nth 1 a)) (symbol-name (nth 1 b)))
+            (string-lessp (nth 1 a) (nth 1 b))
           (not (Math-numberp b))))
        ((eq (car b) 'var) (Math-numberp a))
        ((eq (car a) (car b))
         (and b
              (or (null a)
                  (math-beforep (car a) (car b)))))
-       (t (string-lessp (symbol-name (car a)) (symbol-name (car b))))))
+       (t (string-lessp (car a) (car b)))))
 
 
 (defsubst math-simplify-extended (a)
index dbde4cd0c418b315fc743e31aa8938c55320c729..a48075cce91041ed1d8c200264cbf01899944588 100644 (file)
        (m (math-normalize (nth 2 a)))
        (s (let ((calc-internal-prec (max (- calc-internal-prec 4) 3)))
             (math-normalize (nth 3 a)))))
-    (if (math-negp h)
+    (if (or 
+         (math-negp h)
+         (and (= h 0) (math-negp m))
+         (and (= h 0) (= m 0) (math-negp s)))
        (progn
          (if (math-posp s)
              (setq s (math-add s -60)
index be04e5a12c0f7b8f57e653ae7d359ae6255f7f97..dfd29230fe5b616e8cfd7897ed6d2a7ed891dcb9 100644 (file)
@@ -366,9 +366,9 @@ C-w  Describe how there is no warranty for Calc."
       (Info-goto-node (buffer-substring (match-beginning 1) (match-end 1))))
     (or (let ((case-fold-search nil))
          (or (re-search-forward (format "\\[`%s'\\]\\|(`%s')\\|\\<The[ \n]`%s'"
-                                         (or target thing)
-                                         (or target thing)
-                                         (or target thing)) nil t)
+                                         (or target (regexp-quote thing))
+                                         (or target (regexp-quote thing))
+                                         (or target (regexp-quote thing))) nil t)
              (and not-quoted
                   (let ((case-fold-search t))
                     (search-forward (or target thing) nil t)))
@@ -376,9 +376,9 @@ C-w  Describe how there is no warranty for Calc."
              (search-forward (or target thing) nil t)))
        (let ((case-fold-search t))
          (or (re-search-forward (format "\\[`%s'\\]\\|(`%s')\\|\\<The[ \n]`%s'"
-                                         (or target thing)
-                                         (or target thing)
-                                         (or target thing)) nil t)
+                                         (or target (regexp-quote thing))
+                                         (or target (regexp-quote thing))
+                                         (or target (regexp-quote thing))) nil t)
              (search-forward (format "`%s'" (or target thing)) nil t)
              (search-forward (or target thing) nil t))))
     (beginning-of-line)
index 30a06a2aa00db642f775fb2141617590f2d7e1bd..156bf4cd0dbb8df4ef24fed08a020c7890fcc6d2 100644 (file)
                                         "calc-"))))
       (let* ((kmap (calc-user-key-map))
             (old (assq key kmap)))
+        ;; FIXME: Why not (define-key kmap (vector key) func)?
        (if old
            (setcdr old func)
          (setcdr kmap (cons (cons key func) (cdr kmap))))))))
      (if key
         (let* ((kmap (calc-user-key-map))
                (old (assq key kmap)))
+           ;; FIXME: Why not (define-key kmap (vector key) cmd)?
           (if old
               (setcdr old cmd)
             (setcdr kmap (cons (cons key cmd) (cdr kmap)))))))
                              (format "z%c" key)))))
       (let* ((kmap (calc-user-key-map))
             (old (assq key kmap)))
+        ;; FIXME: Why not (define-key kmap (vector key) func)?
        (if old
            (setcdr old cmd)
          (setcdr kmap (cons (cons key cmd) (cdr kmap))))))))
index 8d182372cfb2357e30cd2ebed9e91ff4b718f108..9781d4174f5e50223604b547bc4e038c7d95b8fa 100644 (file)
@@ -143,10 +143,7 @@ TEXT and CALCVAL are the TEXT and internal structure of stack entries.")
   "Set the contents of the Calc register REGISTER to (TEXT . CALCVAL),
 as well as set the contents of the Emacs register REGISTER to TEXT."
   (set-register register text)
-  (let ((aelt (assq register calc-register-alist)))
-    (if aelt
-        (setcdr aelt (cons text calcval))
-      (push (cons register (cons text calcval)) calc-register-alist))))
+  (setf (alist-get register calc-register-alist) (cons text calcval)))
 
 (defun calc-get-register (reg)
   "Return the CALCVAL portion of the contents of the Calc register REG,
index d6eb892f7fb2cf3dec56e212ae2062212bcabf96..ad7a7f4c92a3beeefcf48e6cddd37e00a6df5a10 100644 (file)
@@ -1,4 +1,4 @@
-;;; calculator.el --- a [not so] simple calculator for Emacs  -*- lexical-binding: t -*-
+;;; calculator.el --- a calculator for Emacs  -*- lexical-binding: t -*-
 
 ;; Copyright (C) 1998, 2000-2014 Free Software Foundation, Inc.
 
 ;;     "Run the Emacs calculator." t)
 ;;   (global-set-key [(control return)] 'calculator)
 ;;
-;; Written by Eli Barzilay: Maze is Life!  eli@barzilay.org
-;;                                         http://www.barzilay.org/
+;; Written by Eli Barzilay, eli@barzilay.org
 ;;
-;; For latest version, check
-;;     http://www.barzilay.org/misc/calculator.el
-;;
-
-;;; History:
-;; I hate history.
 
 ;;;=====================================================================
 ;;; Customization:
@@ -79,7 +72,7 @@ This determines the default behavior of unary operators."
 
 (defcustom calculator-prompt "Calc=%s> "
   "The prompt used by the Emacs calculator.
-It should contain a \"%s\" somewhere that will indicate the i/o radices;
+It should contain a \"%s\" somewhere that will indicate the i/o radixes;
 this will be a two-character string as described in the documentation
 for `calculator-mode'."
   :type  'string
@@ -115,8 +108,8 @@ See `calculator-radix-grouping-mode'."
 
 (defcustom calculator-remove-zeros t
   "Non-nil value means delete all redundant zero decimal digits.
-If this value is not t, and not nil, redundant zeros are removed except
-for one and if it is nil, nothing is removed.
+If this value is not t and not nil, redundant zeros are removed except
+for one.
 Used by the `calculator-remove-zeros' function."
   :type  '(choice (const t) (const leave-decimal) (const nil))
   :group 'calculator)
@@ -136,23 +129,27 @@ should be able to handle special symbol arguments, currently `left' and
 associated with the displayer function (for example to change the number
 of digits displayed).
 
-An exception to the above is the case of the list (std C) where C is a
-character, in this case the `calculator-standard-displayer' function
-will be used with this character for a format string."
-  :type '(choice (function) (string) (list (const std) character) (sexp))
+An exception to the above is the case of the list (std C [G]) where C is
+a character and G is an optional boolean, in this case the
+`calculator-standard-displayer' function will be used with these as
+arguments."
+  :type '(choice (function) (string) (sexp)
+                 (list (const std) character)
+                 (list (const std) character boolean))
   :group 'calculator)
 
 (defcustom calculator-displayers
   '(((std ?n) "Standard display, decimal point or scientific")
     (calculator-eng-display "Eng display")
-    ((std ?f) "Standard display, decimal point")
+    ((std ?f t) "Standard display, decimal point with grouping")
     ((std ?e) "Standard display, scientific")
     ("%S"     "Emacs printer"))
   "A list of displayers.
 Each element is a list of a displayer and a description string.  The
-first element is the one which is currently used, this is for the display
-of result values not values in expressions.  A displayer specification
-is the same as the values that can be stored in `calculator-displayer'.
+first element is the one which is currently used, this is for the
+display of result values not values in expressions.  A displayer
+specification is the same as the values that can be stored in
+`calculator-displayer'.
 
 `calculator-rotate-displayer' rotates this list."
   :type  'sexp
@@ -182,7 +179,7 @@ Otherwise show as a negative number."
 (defcustom calculator-mode-hook nil
   "List of hook functions for `calculator-mode' to run.
 Note: if `calculator-electric-mode' is on, then this hook will get
-activated in the minibuffer - in that case it should not do much more
+activated in the minibuffer -- in that case it should not do much more
 than local key settings and other effects that will change things
 outside the scope of calculator related code."
   :type  'hook
@@ -224,15 +221,14 @@ Examples:
           (\"tF\" mt-to-ft (/ X 0.3048)         1)
           (\"tM\" ft-to-mt (* X 0.3048)         1)))
 
-* Using a function-like form is very simple, X for an argument (Y the
-  second in case of a binary operator), TX is a truncated version of X
-  and F does a recursive call, Here is a [very inefficient] Fibonacci
-  number calculation:
+* Using a function-like form is very simple: use `X' for the argument
+  (`Y' for the second in case of a binary operator), `TX' is a truncated
+  version of `X' and `F' for a recursive call.  Here is a [very
+  inefficient] Fibonacci number calculation:
 
   (add-to-list 'calculator-user-operators
-               '(\"F\" fib (if (<= TX 1)
-                         1
-                         (+ (F (- TX 1)) (F (- TX 2)))) 0))
+               '(\"F\" fib
+                 (if (<= TX 1) 1 (+ (F (- TX 1)) (F (- TX 2))))))
 
   Note that this will be either postfix or prefix, according to
   `calculator-unary-style'."
@@ -248,7 +244,7 @@ Examples:
 ;;; Variables
 
 (defvar calculator-initial-operators
-  '(;; "+"/"-" have keybindings of themselves, not calculator-ops
+  '(;; "+"/"-" have keybindings of their own, not calculator-ops
     ("=" =     identity        1 -1)
     (nobind "+" +  +           2  4)
     (nobind "-" -  -           2  4)
@@ -303,26 +299,27 @@ user-defined operators, use `calculator-user-operators' instead.")
    versions), `DX' (converted to radians if degrees mode is on), `D'
    (function for converting radians to degrees if deg mode is on), `L'
    (list of saved values), `F' (function for recursive iteration calls)
-   and evaluates to the function value - these variables are capital;
+   and evaluates to the function value -- these variables are capital;
 
 4. The function's arity, optional, one of: 2 => binary, -1 => prefix
-   unary, +1 => postfix unary, 0 => a 0-arg operator func, non-number =>
-   postfix/prefix as determined by `calculator-unary-style' (the
-   default);
+   unary, +1 => postfix unary, 0 => a 0-arg operator func (note that
+   using such a function replaces the currently entered number, if any),
+   non-number (the default) => postfix or prefix as determined by
+   `calculator-unary-style';
 
-5. The function's precedence - should be in the range of 1 (lowest) to
+5. The function's precedence -- should be in the range of 1 (lowest) to
    9 (highest) (optional, defaults to 1);
 
 It it possible have a unary prefix version of a binary operator if it
 comes later in this list.  If the list begins with the symbol 'nobind,
-then no key binding will take place - this is only useful for predefined
+then no key binding will take place -- this is only useful for predefined
 keys.
 
 Use `calculator-user-operators' to add operators to this list, see its
 documentation for an example.")
 
 (defvar calculator-stack nil
-  "Stack contents - operations and operands.")
+  "Stack contents -- operations and operands.")
 
 (defvar calculator-curnum nil
   "Current number being entered (as a string).")
@@ -427,9 +424,9 @@ Used for repeating operations in calculator-repR/L.")
              (calculator-backspace     [backspace])
              )))
       (while p
-        ;; reverse the keys so first defs come last - makes the more
-        ;; sensible bindings visible in the menu
-        (let ((func (car (car p))) (keys (reverse (cdr (car p)))))
+        ;; reverse the keys so earlier definitions come last -- makes
+        ;; the more sensible bindings visible in the menu
+        (let ((func (caar p)) (keys (reverse (cdar p))))
           (while keys
             (define-key map (car keys) func)
             (setq keys (cdr keys))))
@@ -441,7 +438,7 @@ Used for repeating operations in calculator-repR/L.")
     ;; make C-h work in text-mode
     (or window-system (define-key map [?\C-h] 'calculator-backspace))
     ;; set up a menu
-    (if (and calculator-use-menu (not (boundp 'calculator-menu)))
+    (when (and calculator-use-menu (not (boundp 'calculator-menu)))
       (let ((radix-selectors
              (mapcar (lambda (x)
                        `([,(nth 0 x)
@@ -580,7 +577,7 @@ Used for repeating operations in calculator-repR/L.")
   "A [not so] simple calculator for Emacs.
 
 This calculator is used in the same way as other popular calculators
-like xcalc or calc.exe - but using an Emacs interface.
+like xcalc or calc.exe -- but using an Emacs interface.
 
 Expressions are entered using normal infix notation, parens are used as
 normal.  Unary functions are usually postfix, but some depends on the
@@ -589,8 +586,7 @@ specified, then it is fixed, otherwise it depends on this variable).
 `+' and `-' can be used as either binary operators or prefix unary
 operators.  Numbers can be entered with exponential notation using `e',
 except when using a non-decimal radix mode for input (in this case `e'
-will be the hexadecimal digit).  If the result of a calculation is too
-large (out of range for Emacs), the value of \"inf\" is returned.
+will be the hexadecimal digit).
 
 Here are the editing keys:
 * `RET' `='      evaluate the current expression
@@ -609,8 +605,8 @@ These operators are pre-defined:
 * `_' `;'         postfix unary negation and reciprocal
 * `^' `L'         binary operators for x^y and log(x) in base y
 * `Q' `!'         unary square root and factorial
-* `S' `C' `T'     unary trigonometric operators - sin, cos and tan
-* `|' `#' `&' `~' bitwise operators - or, xor, and, not
+* `S' `C' `T'     unary trigonometric operators: sin, cos and tan
+* `|' `#' `&' `~' bitwise operators: or, xor, and, not
 
 The trigonometric functions can be inverted if prefixed with an `I', see
 below for the way to use degrees instead of the default radians.
@@ -636,9 +632,9 @@ The prompt indicates the current modes:
 
 Also, the quote key can be used to switch display modes for decimal
 numbers (double-quote rotates back), and the two brace characters
-\(\"{\" and \"}\" change display parameters that these displayers use (if
-they handle such).  If output is using any radix mode, then these keys
-toggle digit grouping mode and the chunk size.
+\(\"{\" and \"}\" change display parameters that these displayers use,
+if they handle such).  If output is using any radix mode, then these
+keys toggle digit grouping mode and the chunk size.
 
 Values can be saved for future reference in either a list of saved
 values, or in registers.
@@ -680,19 +676,21 @@ more information.
   "Run the Emacs calculator.
 See the documentation for `calculator-mode' for more information."
   (interactive)
-  (if calculator-restart-other-mode
+  (when calculator-restart-other-mode
     (setq calculator-electric-mode (not calculator-electric-mode)))
-  (if calculator-initial-operators
-    (progn (calculator-add-operators calculator-initial-operators)
-           (setq calculator-initial-operators nil)
-           ;; don't change this since it is a customization variable,
-           ;; its set function will add any new operators
-           (calculator-add-operators calculator-user-operators)))
+  (when calculator-initial-operators
+    (calculator-add-operators calculator-initial-operators)
+    (setq calculator-initial-operators nil)
+    ;; don't change this since it is a customization variable,
+    ;; its set function will add any new operators
+    (calculator-add-operators calculator-user-operators))
   (setq calculator-buffer (get-buffer-create "*calculator*"))
   (if calculator-electric-mode
     (save-window-excursion
-      (progn (require 'electric) (message nil)) ; hide load message
-      (let (old-g-map old-l-map (echo-keystrokes 0)
+      (require 'electric) (message nil) ; hide load message
+      (let (old-g-map old-l-map
+            (old-buf (window-buffer (minibuffer-window)))
+            (echo-keystrokes 0)
             (garbage-collection-messages nil)) ; no gc msg when electric
         (set-window-buffer (minibuffer-window) calculator-buffer)
         (select-window (minibuffer-window))
@@ -712,8 +710,8 @@ See the documentation for `calculator-mode' for more information."
                (lambda () 'noprompt)
                nil
                (lambda (_x _y) (calculator-update-display))))
-          (and calculator-buffer
-               (catch 'calculator-done (calculator-quit)))
+          (set-window-buffer (minibuffer-window) old-buf)
+          (kill-buffer calculator-buffer)
           (use-local-map old-l-map)
           (use-global-map old-g-map))))
     (progn
@@ -722,45 +720,8 @@ See the documentation for `calculator-mode' for more information."
          (let ((window-min-height 2))
            ;; maybe leave two lines for our window because of the
            ;; normal `raised' mode line
-           (select-window
-            (split-window-below
-             ;; If the mode line might interfere with the calculator
-             ;; buffer, use 3 lines instead.
-             (if (and (fboundp 'face-attr-construct)
-                      (let* ((dh (plist-get (face-attr-construct 'default) :height))
-                             (mf (face-attr-construct 'mode-line))
-                             (mh (plist-get mf :height)))
-                        ;; If the mode line is shorter than the default,
-                        ;; stick with 2 lines.  (It may be necessary to
-                        ;; check how much shorter.)
-                        (and
-                         (not
-                          (or (and (integerp dh)
-                                   (integerp mh)
-                                   (< mh dh))
-                              (and (numberp mh)
-                                   (not (integerp mh))
-                                   (< mh 1))))
-                         (or
-                          ;; If the mode line is taller than the default,
-                          ;; use 3 lines.
-                          (and (integerp dh)
-                               (integerp mh)
-                               (> mh dh))
-                          (and (numberp mh)
-                               (not (integerp mh))
-                               (> mh 1))
-                          ;; If the mode line has a box with non-negative line-width,
-                          ;; use 3 lines.
-                          (let* ((bx (plist-get mf :box))
-                                 (lh (plist-get bx :line-width)))
-                            (and bx
-                                 (or
-                                  (not lh)
-                                  (> lh 0))))
-                          ;; If the mode line has an overline, use 3 lines.
-                          (plist-get (face-attr-construct 'mode-line) :overline)))))
-               -3 -2)))
+           (select-window (split-window-below
+                           (if (calculator-need-3-lines) -3 -2)))
            (switch-to-buffer calculator-buffer)))
         ((not (eq (current-buffer) calculator-buffer))
          (select-window (get-buffer-window calculator-buffer))))
@@ -768,24 +729,46 @@ See the documentation for `calculator-mode' for more information."
       (setq buffer-read-only t)
       (calculator-reset)
       (message "Hit `?' For a quick help screen.")))
-  (if (and calculator-restart-other-mode calculator-electric-mode)
+  (when (and calculator-restart-other-mode calculator-electric-mode)
     (calculator)))
 
+(defun calculator-need-3-lines ()
+  ;; If the mode line might interfere with the calculator buffer, use 3
+  ;; lines instead.
+  (let* ((dh (face-attribute 'default :height))
+         (mh (face-attribute 'mode-line :height)))
+    ;; if the mode line is shorter than the default, stick with 2 lines
+    ;; (it may be necessary to check how much shorter)
+    (and (not (or (and (integerp dh) (integerp mh) (< mh dh))
+                  (and (numberp mh) (not (integerp mh)) (< mh 1))))
+         (or ;; if the mode line is taller than the default, use 3 lines
+             (and (integerp dh) (integerp mh) (> mh dh))
+             (and (numberp mh) (not (integerp mh)) (> mh 1))
+             ;; if the mode line has a box with non-negative line-width,
+             ;; use 3 lines
+             (let* ((bx (face-attribute 'mode-line :box))
+                    (lh (plist-get bx :line-width)))
+               (and bx (or (not lh) (> lh 0))))
+             ;; if the mode line has an overline, use 3 lines
+             (not (memq (face-attribute 'mode-line :overline)
+                        '(nil unspecified)))))))
+
 (defun calculator-message (string &rest arguments)
-  "Same as `message', but special handle of electric mode."
+  "Same as `message', but also handle electric mode."
   (apply 'message string arguments)
-  (if calculator-electric-mode
-    (progn (sit-for 1) (message nil))))
+  (when calculator-electric-mode (sit-for 1) (message nil)))
 
 ;;;---------------------------------------------------------------------
 ;;; Operators
 
 (defun calculator-op-arity (op)
-  "Return OP's arity, 2, +1 or -1."
-  (let ((arity (or (nth 3 op) 'x)))
-    (if (numberp arity)
-      arity
-      (if (eq calculator-unary-style 'postfix) +1 -1))))
+  "Return OP's arity.
+Current results are one of 2 (binary), +1 (postfix), -1 (prefix), or
+0 (nullary)."
+  (let ((arity (nth 3 op)))
+    (cond ((numberp arity)                      arity)
+          ((eq calculator-unary-style 'postfix) +1)
+          (t                                    -1))))
 
 (defun calculator-op-prec (op)
   "Return OP's precedence for reducing when inserting into the stack.
@@ -798,8 +781,8 @@ Adds MORE-OPS to `calculator-operator', called initially to handle
 `calculator-initial-operators' and `calculator-user-operators'."
   (let ((added-ops nil))
     (while more-ops
-      (or (eq (car (car more-ops)) 'nobind)
-          (let ((i -1) (key (car (car more-ops))))
+      (or (eq (caar more-ops) 'nobind)
+          (let ((i -1) (key (caar more-ops)))
             ;; make sure the key is undefined, so it's easy to define
             ;; prefix keys
             (while (< (setq i (1+ i)) (length key))
@@ -811,8 +794,8 @@ Adds MORE-OPS to `calculator-operator', called initially to handle
                       calculator-mode-map (substring key 0 (1+ i)) nil)
                     (setq i (length key)))))
             (define-key calculator-mode-map key 'calculator-op)))
-      (setq added-ops (cons (if (eq (car (car more-ops)) 'nobind)
-                              (cdr (car more-ops))
+      (setq added-ops (cons (if (eq (caar more-ops) 'nobind)
+                              (cdar more-ops)
                               (car more-ops))
                             added-ops))
       (setq more-ops (cdr more-ops)))
@@ -833,50 +816,37 @@ Adds MORE-OPS to `calculator-operator', called initially to handle
   (setq calculator-restart-other-mode nil)
   (calculator-update-display))
 
-(defun calculator-get-prompt ()
+(defun calculator-get-display ()
   "Return a string to display.
-The string is set not to exceed the screen width."
-  (let* ((calculator-prompt
-          (format calculator-prompt
+The result should not exceed the screen width."
+  (let* ((in-r  (and calculator-input-radix
+                     (char-to-string
+                      (car (rassq calculator-input-radix
+                                  calculator-char-radix)))))
+         (out-r (and calculator-output-radix
+                     (char-to-string
+                      (car (rassq calculator-output-radix
+                                  calculator-char-radix)))))
+         (prompt (format calculator-prompt
+                         (cond ((or in-r out-r)
+                                (concat (or in-r "=")
+                                        (if (equal in-r out-r) "="
+                                            (or out-r "="))))
+                               (calculator-deg "D=")
+                               (t "=="))))
+         (expr
+          (concat (cdr calculator-stack-display)
                   (cond
-                    ((or calculator-output-radix calculator-input-radix)
-                     (if (eq calculator-output-radix
-                             calculator-input-radix)
-                       (concat
-                        (char-to-string
-                         (car (rassq calculator-output-radix
-                                     calculator-char-radix)))
-                        "=")
-                       (concat
-                        (if calculator-input-radix
-                          (char-to-string
-                           (car (rassq calculator-input-radix
-                                       calculator-char-radix)))
-                          "=")
-                        (char-to-string
-                         (car (rassq calculator-output-radix
-                                     calculator-char-radix))))))
-                    (calculator-deg "D=")
-                    (t "=="))))
-         (prompt
-          (concat calculator-prompt
-                  (cdr calculator-stack-display)
-                  (cond (calculator-curnum
-                         ;; number being typed
-                         (concat calculator-curnum "_"))
-                        ((and (= 1 (length calculator-stack))
-                              calculator-display-fragile)
-                         ;; only the result is shown, next number will
-                         ;; restart
-                         nil)
-                        (t
-                         ;; waiting for a number or an operator
-                         "?"))))
-         (trim (- (length prompt) (1- (window-width)))))
-    (if (<= trim 0)
-      prompt
-      (concat calculator-prompt
-              (substring prompt (+ trim (length calculator-prompt)))))))
+                    ;; entering a number
+                    (calculator-curnum (concat calculator-curnum "_"))
+                    ;; showing a result
+                    ((and (= 1 (length calculator-stack))
+                          calculator-display-fragile)
+                     nil)
+                    ;; waiting for a number or an operator
+                    (t "?"))))
+         (trim (+ (length expr) (length prompt) 1 (- (window-width)))))
+    (concat prompt (if (<= trim 0) expr (substring expr trim)))))
 
 (defun calculator-string-to-number (str)
   "Convert the given STR to a number, according to the value of
@@ -902,7 +872,7 @@ The string is set not to exceed the screen width."
                      "Warning: Ignoring bad input character `%c'." ch)
                     (sit-for 1)
                     value))))
-        (if (if (< new-value 0) (> value 0) (< value 0))
+        (when (if (< new-value 0) (> value 0) (< value 0))
           (calculator-message "Warning: Overflow in input."))
         (setq value new-value))
       value)
@@ -916,9 +886,12 @@ The string is set not to exceed the screen width."
                 ((stringp str) (concat str ".0"))
                 (t "0.0"))))))
 
-(defun calculator-curnum-value ()
-  "Get the numeric value of the displayed number string as a float."
-  (calculator-string-to-number calculator-curnum))
+(defun calculator-push-curnum ()
+  "Push the numeric value of the displayed number to the stack."
+  (when calculator-curnum
+    (push (calculator-string-to-number calculator-curnum)
+          calculator-stack)
+    (setq calculator-curnum nil)))
 
 (defun calculator-rotate-displayer (&optional new-disp)
   "Switch to the next displayer on the `calculator-displayers' list.
@@ -956,7 +929,7 @@ If radix output mode is active, toggle digit grouping."
   (calculator-rotate-displayer (car (last calculator-displayers))))
 
 (defun calculator-displayer-prev ()
-  "Send the current displayer function a 'left argument.
+  "Send the current displayer function a `left' argument.
 This is used to modify display arguments (if the current displayer
 function supports this).
 If radix output mode is active, increase the grouping size."
@@ -967,13 +940,12 @@ If radix output mode is active, increase the grouping size."
            (calculator-enter))
     (and (car calculator-displayers)
          (let ((disp (caar calculator-displayers)))
-           (cond
-             ((symbolp disp) (funcall disp 'left))
-             ((and (consp disp) (eq 'std (car disp)))
-              (calculator-standard-displayer 'left (cadr disp))))))))
+           (cond ((symbolp disp) (funcall disp 'left))
+                 ((and (consp disp) (eq 'std (car disp)))
+                  (calculator-standard-displayer 'left)))))))
 
 (defun calculator-displayer-next ()
-  "Send the current displayer function a 'right argument.
+  "Send the current displayer function a `right' argument.
 This is used to modify display arguments (if the current displayer
 function supports this).
 If radix output mode is active, decrease the grouping size."
@@ -984,44 +956,51 @@ If radix output mode is active, decrease the grouping size."
            (calculator-enter))
     (and (car calculator-displayers)
          (let ((disp (caar calculator-displayers)))
-           (cond
-             ((symbolp disp) (funcall disp 'right))
-             ((and (consp disp) (eq 'std (car disp)))
-              (calculator-standard-displayer 'right (cadr disp))))))))
+           (cond ((symbolp disp) (funcall disp 'right))
+                 ((and (consp disp) (eq 'std (car disp)))
+                  (calculator-standard-displayer 'right)))))))
 
 (defun calculator-remove-zeros (numstr)
   "Get a number string NUMSTR and remove unnecessary zeros.
 The behavior of this function is controlled by
 `calculator-remove-zeros'."
-  (cond ((and (eq calculator-remove-zeros t)
-              (string-match "\\.0+\\([eE][+-]?[0-9]*\\)?$" numstr))
-         ;; remove all redundant zeros leaving an integer
-         (if (match-beginning 1)
-           (concat (substring numstr 0 (match-beginning 0))
-                   (match-string 1 numstr))
-           (substring numstr 0 (match-beginning 0))))
-        ((and calculator-remove-zeros
-              (string-match
-               "\\..\\([0-9]*[1-9]\\)?\\(0+\\)\\([eE][+-]?[0-9]*\\)?$"
-               numstr))
-         ;; remove zeros, except for first after the "."
-         (if (match-beginning 3)
-           (concat (substring numstr 0 (match-beginning 2))
-                   (match-string 3 numstr))
-           (substring numstr 0 (match-beginning 2))))
-        (t numstr)))
-
-(defun calculator-standard-displayer (num char)
+  (let* ((s (if (not (eq calculator-remove-zeros t)) numstr
+                ;; remove all redundant zeros leaving an integer
+                (replace-regexp-in-string
+                 "\\.0+\\([eE].*\\)?$" "\\1" numstr)))
+         (s (if (not calculator-remove-zeros) s
+                ;; remove zeros, except for first after the "."
+                (replace-regexp-in-string
+                 "\\(\\..[0-9]*?\\)0+\\([eE].*\\)?$" "\\1\\2" s))))
+    s))
+
+(defun calculator-groupize-number (str n sep &optional fromleft)
+  "Return the input string STR with occurrences of SEP that separate
+every N characters starting from the right, or from the left if
+FROMLEFT is true."
+  (let* ((len (length str)) (i (/ len n)) (j (% len n))
+         (r (if (or (not fromleft) (= j 0)) '()
+                (list (substring str (- len j))))))
+    (while (> i 0)
+      (let* ((e (* i n)) (e (if fromleft e (+ e j))))
+        (push (substring str (- e n) e) r))
+      (setq i (1- i)))
+    (when (and (not fromleft) (> j 0))
+      (push (substring str 0 j) r))
+    (mapconcat 'identity r sep)))
+
+(defun calculator-standard-displayer (num &optional char group-p)
   "Standard display function, used to display NUM.
 Its behavior is determined by `calculator-number-digits' and the given
 CHAR argument (both will be used to compose a format string).  If the
 char is \"n\" then this function will choose one between %f or %e, this
 is a work around %g jumping to exponential notation too fast.
 
-The special 'left and 'right symbols will make it change the current
-number of digits displayed (`calculator-number-digits').
+It will also split digit sequences into comma-separated groups
+and/or remove redundant zeros.
 
-It will also remove redundant zeros from the result."
+The special `left' and `right' symbols will make it change the current
+number of digits displayed (`calculator-number-digits')."
   (if (symbolp num)
     (cond ((eq num 'left)
            (and (> calculator-number-digits 0)
@@ -1032,56 +1011,51 @@ It will also remove redundant zeros from the result."
            (setq calculator-number-digits
                  (1+ calculator-number-digits))
            (calculator-enter)))
-    (let ((str (if (zerop num)
-                 "0"
-                 (format
-                  (concat "%."
-                          (number-to-string calculator-number-digits)
-                          (if (eq char ?n)
-                            (let ((n (abs num)))
-                              (if (or (< n 0.001) (> n 1e8)) "e" "f"))
-                            (string char)))
-                  num))))
-      (calculator-remove-zeros str))))
+    (let* ((s (if (eq char ?n)
+                (let ((n (abs num)))
+                  (if (or (and (< 0 n) (< n 0.001)) (< 1e8 n)) ?e ?f))
+                char))
+           (s (format "%%.%s%c" calculator-number-digits s))
+           (s (calculator-remove-zeros (format s num)))
+           (s (if (or (not group-p) (string-match-p "[eE]" s)) s
+                  (replace-regexp-in-string
+                   "\\([0-9]+\\)\\(?:\\..*\\|$\\)"
+                   (lambda (_) (calculator-groupize-number
+                                (match-string 1 s) 3 ","))
+                   s nil nil 1))))
+      s)))
 
 (defun calculator-eng-display (num)
   "Display NUM in engineering notation.
 The number of decimal digits used is controlled by
 `calculator-number-digits', so to change it at runtime you have to use
-the 'left or 'right when one of the standard modes is used."
+the `left' or `right' when one of the standard modes is used."
   (if (symbolp num)
     (cond ((eq num 'left)
            (setq calculator-eng-extra
-                 (if calculator-eng-extra
-                   (1+ calculator-eng-extra)
-                   1))
+                 (if calculator-eng-extra (1+ calculator-eng-extra) 1))
            (let ((calculator-eng-tmp-show t)) (calculator-enter)))
           ((eq num 'right)
            (setq calculator-eng-extra
-                 (if calculator-eng-extra
-                   (1- calculator-eng-extra)
-                   -1))
+                 (if calculator-eng-extra (1- calculator-eng-extra) -1))
            (let ((calculator-eng-tmp-show t)) (calculator-enter))))
     (let ((exp 0))
-      (and (not (= 0 num))
-           (progn
-             (while (< (abs num) 1.0)
-               (setq num (* num 1000.0)) (setq exp (- exp 3)))
-             (while (> (abs num) 999.0)
-               (setq num (/ num 1000.0)) (setq exp (+ exp 3)))
-             (and calculator-eng-tmp-show
-                  (not (= 0 calculator-eng-extra))
-                  (let ((i calculator-eng-extra))
-                    (while (> i 0)
-                      (setq num (* num 1000.0)) (setq exp (- exp 3))
-                      (setq i (1- i)))
-                    (while (< i 0)
-                      (setq num (/ num 1000.0)) (setq exp (+ exp 3))
-                      (setq i (1+ i)))))))
+      (unless (= 0 num)
+        (while (< (abs num) 1.0)
+          (setq num (* num 1000.0)) (setq exp (- exp 3)))
+        (while (> (abs num) 999.0)
+          (setq num (/ num 1000.0)) (setq exp (+ exp 3)))
+        (when (and calculator-eng-tmp-show
+                   (not (= 0 calculator-eng-extra)))
+          (let ((i calculator-eng-extra))
+            (while (> i 0)
+              (setq num (* num 1000.0)) (setq exp (- exp 3))
+              (setq i (1- i)))
+            (while (< i 0)
+              (setq num (/ num 1000.0)) (setq exp (+ exp 3))
+              (setq i (1+ i))))))
       (or calculator-eng-tmp-show (setq calculator-eng-extra nil))
-      (let ((str (format (concat "%." (number-to-string
-                                       calculator-number-digits)
-                                 "f")
+      (let ((str (format (format "%%.%sf" calculator-number-digits)
                          num)))
         (concat (let ((calculator-remove-zeros
                        ;; make sure we don't leave integers
@@ -1092,56 +1066,48 @@ the 'left or 'right when one of the standard modes is used."
 (defun calculator-number-to-string (num)
   "Convert NUM to a displayable string."
   (cond
-    ((and (numberp num) calculator-output-radix)
-     ;; print with radix - for binary I convert the octal number
-     (let ((str (format (if (eq calculator-output-radix 'hex) "%x" "%o")
-                        (calculator-truncate
-                         (if calculator-2s-complement num (abs num))))))
-       (if (eq calculator-output-radix 'bin)
-         (let ((i -1) (s ""))
-           (while (< (setq i (1+ i)) (length str))
-             (setq s
-                   (concat s
-                           (cdr (assq (aref str i)
-                                      '((?0 . "000") (?1 . "001")
-                                        (?2 . "010") (?3 . "011")
-                                        (?4 . "100") (?5 . "101")
-                                        (?6 . "110") (?7 . "111")))))))
-           (string-match "^0*\\(.+\\)" s)
-           (setq str (match-string 1 s))))
-       (if calculator-radix-grouping-mode
-         (let ((d (/ (length str) calculator-radix-grouping-digits))
-               (r (% (length str) calculator-radix-grouping-digits)))
-           (while (>= (setq d (1- d)) (if (zerop r) 1 0))
-             (let ((i (+ r (* d calculator-radix-grouping-digits))))
-               (setq str (concat (substring str 0 i)
-                                 calculator-radix-grouping-separator
-                                 (substring str i)))))))
-       (upcase
-        (if (and (not calculator-2s-complement) (< num 0))
-          (concat "-" str)
-          str))))
-    ((and (numberp num) calculator-displayer)
-     (cond
-       ((stringp calculator-displayer)
-        (format calculator-displayer num))
-       ((symbolp calculator-displayer)
-        (funcall calculator-displayer num))
-       ((eq 'std (car-safe calculator-displayer))
-        (calculator-standard-displayer num (cadr calculator-displayer)))
-       ((listp calculator-displayer)
-        (eval calculator-displayer `((num. ,num))))
-       (t (prin1-to-string num t))))
-    ;; operators are printed here
-    (t (prin1-to-string (nth 1 num) t))))
+    ;; operators are printed here, the rest is for numbers
+    ((not (numberp num)) (prin1-to-string (nth 1 num) t))
+    ;; %f/%e handle these, but avoid them in radix or in user displayers
+    ((and (floatp num) (isnan num)) "NaN")
+    ((<= 1.0e+INF num) "Inf")
+    ((<= num -1.0e+INF) "-Inf")
+    (calculator-output-radix
+     ;; print with radix -- for binary, convert the octal number
+     (let* ((fmt (if (eq calculator-output-radix 'hex) "%x" "%o"))
+            (str (if calculator-2s-complement num (abs num)))
+            (str (format fmt (calculator-truncate str)))
+            (bins '((?0 "000") (?1 "001") (?2 "010") (?3 "011")
+                    (?4 "100") (?5 "101") (?6 "110") (?7 "111")))
+            (str (if (not (eq calculator-output-radix 'bin)) str
+                     (replace-regexp-in-string
+                      "^0+\\(.\\)" "\\1"
+                      (apply 'concat (mapcar (lambda (c)
+                                               (cadr (assq c bins)))
+                                     str)))))
+            (str (if (not calculator-radix-grouping-mode) str
+                     (calculator-groupize-number
+                      str calculator-radix-grouping-digits
+                      calculator-radix-grouping-separator))))
+       (upcase (if (or calculator-2s-complement (>= num 0)) str
+                   (concat "-" str)))))
+    ((stringp calculator-displayer) (format calculator-displayer num))
+    ((symbolp calculator-displayer) (funcall calculator-displayer num))
+    ((eq 'std (car-safe calculator-displayer))
+     (apply 'calculator-standard-displayer
+            num (cdr calculator-displayer)))
+    ((listp calculator-displayer)
+     (eval `(let ((num ',num)) ,calculator-displayer) t))
+    ;; nil (or bad) displayer
+    (t (prin1-to-string num t))))
 
 (defun calculator-update-display (&optional force)
   "Update the display.
 If optional argument FORCE is non-nil, don't use the cached string."
   (set-buffer calculator-buffer)
   ;; update calculator-stack-display
-  (if (or force
-          (not (eq (car calculator-stack-display) calculator-stack)))
+  (when (or force (not (eq (car calculator-stack-display)
+                           calculator-stack)))
     (setq calculator-stack-display
           (cons calculator-stack
                 (if calculator-stack
@@ -1170,165 +1136,99 @@ If optional argument FORCE is non-nil, don't use the cached string."
                   ""))))
   (let ((inhibit-read-only t))
     (erase-buffer)
-    (insert (calculator-get-prompt)))
+    (insert (calculator-get-display)))
   (set-buffer-modified-p nil)
-  (if calculator-display-fragile
-    (goto-char (1+ (length calculator-prompt)))
-    (goto-char (1- (point)))))
+  (goto-char (if calculator-display-fragile
+               (1+ (length calculator-prompt))
+               (1- (point)))))
 
 ;;;---------------------------------------------------------------------
 ;;; Stack computations
 
+(defun calculator-reduce-stack-once (prec)
+  "Worker for `calculator-reduce-stack'."
+  (cl-flet ((check (ar op)        (and (listp op)
+                                       (<= prec (calculator-op-prec op))
+                                       (= ar (calculator-op-arity op))))
+            (call (op &rest args) (apply 'calculator-funcall
+                                         (nth 2 op) args)))
+    (pcase calculator-stack
+      ;; reduce "... ( x )" --> "... x"
+      (`((,_ \) . ,_) ,(and X (pred numberp)) (,_ \( . ,_) . ,rest)
+       (cons X rest))
+      ;; reduce "... x op y" --> "... r", r is the result
+      (`(,(and Y (pred numberp))
+         ,(and O (pred (check 2)))
+         ,(and X (pred numberp))
+         . ,rest)
+       (cons (call O X Y) rest))
+      ;; reduce "... op x" --> "... r" for prefix op
+      (`(,(and X (pred numberp)) ,(and O (pred (check -1))) . ,rest)
+       (cons (call O X) rest))
+      ;; reduce "... x op" --> "... r" for postfix op
+      (`(,(and O (pred (check +1))) ,(and X (pred numberp)) . ,rest)
+       (cons (call O X) rest))
+      ;; reduce "... op" --> "... r" for 0-ary op
+      (`(,(and O (pred (check 0))) . ,rest)
+       (cons (call O) rest))
+      ;; reduce "... y x" --> "... x"
+      ;; (needed for 0-ary ops: replace current number with result)
+      (`(,(and X (pred numberp)) ,(and _Y (pred numberp)) . ,rest)
+       (cons X rest))
+      (_ nil)))) ; nil = done
+
 (defun calculator-reduce-stack (prec)
-  "Reduce the stack using top operator.
-PREC is a precedence - reduce everything with higher precedence."
-  (while
-      (cond
-        ((and (cdr (cdr calculator-stack))         ; have three values
-              (consp   (nth 0 calculator-stack))   ; two operators & num
-              (numberp (nth 1 calculator-stack))
-              (consp   (nth 2 calculator-stack))
-              (eq '\) (nth 1 (nth 0 calculator-stack)))
-              (eq '\( (nth 1 (nth 2 calculator-stack))))
-         ;; reduce "... ( x )" --> "... x"
-         (setq calculator-stack
-               (cons (nth 1 calculator-stack)
-                     (nthcdr 3 calculator-stack)))
-         ;; another iteration
-         t)
-        ((and (cdr (cdr calculator-stack))         ; have three values
-              (numberp (nth 0 calculator-stack))   ; two nums & operator
-              (consp   (nth 1 calculator-stack))
-              (numberp (nth 2 calculator-stack))
-              (= 2 (calculator-op-arity            ; binary operator
-                    (nth 1 calculator-stack)))
-              (<= prec                             ; with higher prec.
-                  (calculator-op-prec (nth 1 calculator-stack))))
-         ;; reduce "... x op y" --> "... r", r is the result
-         (setq calculator-stack
-               (cons (calculator-funcall
-                      (nth 2 (nth 1 calculator-stack))
-                      (nth 2 calculator-stack)
-                      (nth 0 calculator-stack))
-                     (nthcdr 3 calculator-stack)))
-         ;; another iteration
-         t)
-        ((and (>= (length calculator-stack) 2)     ; have two values
-              (numberp (nth 0 calculator-stack))   ; number & operator
-              (consp   (nth 1 calculator-stack))
-              (= -1 (calculator-op-arity           ; prefix-unary op
-                     (nth 1 calculator-stack)))
-              (<= prec                             ; with higher prec.
-                  (calculator-op-prec (nth 1 calculator-stack))))
-         ;; reduce "... op x" --> "... r" for prefix op
-         (setq calculator-stack
-               (cons (calculator-funcall
-                      (nth 2 (nth 1 calculator-stack))
-                      (nth 0 calculator-stack))
-                     (nthcdr 2 calculator-stack)))
-         ;; another iteration
-         t)
-        ((and (cdr calculator-stack)               ; have two values
-              (consp   (nth 0 calculator-stack))   ; operator & number
-              (numberp (nth 1 calculator-stack))
-              (= +1 (calculator-op-arity           ; postfix-unary op
-                     (nth 0 calculator-stack)))
-              (<= prec                             ; with higher prec.
-                  (calculator-op-prec (nth 0 calculator-stack))))
-         ;; reduce "... x op" --> "... r" for postfix op
-         (setq calculator-stack
-               (cons (calculator-funcall
-                      (nth 2 (nth 0 calculator-stack))
-                      (nth 1 calculator-stack))
-                     (nthcdr 2 calculator-stack)))
-         ;; another iteration
-         t)
-        ((and calculator-stack                     ; have one value
-              (consp (nth 0 calculator-stack))     ; an operator
-              (= 0 (calculator-op-arity            ; 0-ary op
-                    (nth 0 calculator-stack))))
-         ;; reduce "... op" --> "... r" for 0-ary op
-         (setq calculator-stack
-               (cons (calculator-funcall
-                      (nth 2 (nth 0 calculator-stack)))
-                     (nthcdr 1 calculator-stack)))
-         ;; another iteration
-         t)
-        ((and (cdr calculator-stack)               ; have two values
-              (numberp (nth 0 calculator-stack))   ; both numbers
-              (numberp (nth 1 calculator-stack)))
-         ;; get rid of redundant numbers:
-         ;;   reduce "... y x" --> "... x"
-         ;; needed for 0-ary ops that puts more values
-         (setcdr calculator-stack (cdr (cdr calculator-stack))))
-        (t ;; no more iterations
-           nil))))
+  "Reduce the stack using top operators as long as possible.
+PREC is a precedence -- reduce everything with higher precedence."
+  (let ((new nil))
+    (while (setq new (calculator-reduce-stack-once prec))
+      (setq calculator-stack new))))
 
 (defun calculator-funcall (f &optional X Y)
   "If F is a symbol, evaluate (F X Y).
 Otherwise, it should be a list, evaluate it with X, Y bound to the
 arguments."
   ;; remember binary ops for calculator-repR/L
-  (if Y (setq calculator-last-opXY (list f X Y)))
-  (condition-case nil
-      ;; there used to be code here that returns 0 if the result was
-      ;; smaller than calculator-epsilon (1e-15).  I don't think this is
-      ;; necessary now.
-      (if (symbolp f)
-          (cond ((and X Y) (funcall f X Y))
-                (X         (funcall f X))
-                (t         (funcall f)))
-        ;; f is an expression
-        (let* ((TX (calculator-truncate X))
-               (TY (and Y (calculator-truncate Y)))
-               (DX (if calculator-deg (/ (* X pi) 180) X))
-               (L  calculator-saved-list))
-          (cl-letf (((symbol-function 'F)
-                     (lambda (&optional x y) (calculator-funcall f x y)))
-                    ((symbol-function 'D)
-                     (lambda (x) (if calculator-deg (/ (* x 180) float-pi) x))))
-            (eval f `((X . ,X)
-                      (Y . ,Y)
-                      (TX . ,TX)
-                      (TY . ,TY)
-                      (DX . ,DX)
-                      (L . ,L))))))
-    (error 0)))
+  (when Y (setq calculator-last-opXY (list f X Y)))
+  (if (symbolp f)
+    (cond ((and X Y) (funcall f X Y))
+          (X         (funcall f X))
+          (t         (funcall f)))
+    ;; f is an expression
+    (let ((TX (and X (calculator-truncate X)))
+          (TY (and Y (calculator-truncate Y)))
+          (DX (if (and X calculator-deg) (/ (* X pi) 180) X))
+          (L  calculator-saved-list)
+          (fF `(calculator-funcall ',f x y))
+          (fD `(if calculator-deg (/ (* x 180) float-pi) x)))
+      (eval `(cl-flet ((F (&optional x y) ,fF) (D (x) ,fD))
+               (let ((X ,X) (Y ,Y) (DX ,DX) (TX ,TX) (TY ,TY) (L ',L))
+                 ,f))
+            t))))
 
 ;;;---------------------------------------------------------------------
 ;;; Input interaction
 
 (defun calculator-last-input (&optional keys)
   "Last char (or event or event sequence) that was read.
-Optional string argument KEYS will force using it as the keys entered."
+Use KEYS if given, otherwise use `this-command-keys'."
   (let ((inp (or keys (this-command-keys))))
     (if (or (stringp inp) (not (arrayp inp)))
       inp
-      ;; this translates kp-x to x and [tries to] create a string to
-      ;; lookup operators
-      (let* ((i -1) (converted-str (make-string (length inp) ? )) k)
-        ;; converts an array to a string the ops lookup with keypad
-        ;; input
-        (while (< (setq i (1+ i)) (length inp))
-          (setq k (aref inp i))
-          ;; if Emacs will someday have a event-key, then this would
-          ;; probably be modified anyway
-          (and (if (fboundp 'key-press-event-p) (key-press-event-p k))
-              (if (fboundp 'event-key)
-                  (and (event-key k) (setq k (event-key k)))))
-          ;; assume all symbols are translatable with an ascii-character
-          (and (symbolp k)
-               (setq k (or (get k 'ascii-character) ? )))
-          (aset converted-str i k))
-        converted-str))))
+      ;; Translates kp-x to x and [tries to] create a string to lookup
+      ;; operators; assume all symbols are translatable via
+      ;; `function-key-map'.  This is needed because we have key
+      ;; bindings for kp-* (which might be the wrong thing to do) so
+      ;; they don't get translated in `this-command-keys'.
+      (concat (mapcar (lambda (k)
+                        (if (numberp k) k (error "??bad key?? (%S)" k)))
+                      (or (lookup-key function-key-map inp) inp))))))
 
 (defun calculator-clear-fragile (&optional op)
   "Clear the fragile flag if it was set, then maybe reset all.
 OP is the operator (if any) that caused this call."
-  (if (and calculator-display-fragile
-           (or (not op)
-               (= -1 (calculator-op-arity op))
-               (= 0 (calculator-op-arity op))))
+  (when (and calculator-display-fragile
+             (or (not op) (memq (calculator-op-arity op) '(-1 0))))
     ;; reset if last calc finished, and now get a num or prefix or 0-ary
     ;; op
     (calculator-reset))
@@ -1338,53 +1238,44 @@ OP is the operator (if any) that caused this call."
   "Enter a single digit."
   (interactive)
   (let ((inp (aref (calculator-last-input) 0)))
-    (if (and (or calculator-display-fragile
-                 (not (numberp (car calculator-stack))))
-             (cond
-               ((not calculator-input-radix)     (<= inp ?9))
-               ((eq calculator-input-radix 'bin) (<= inp ?1))
-               ((eq calculator-input-radix 'oct) (<= inp ?7))
-               (t t)))
-      ;; enter digit if starting a new computation or have an op on the
-      ;; stack
-      (progn
-        (calculator-clear-fragile)
-        (let ((digit (upcase (char-to-string inp))))
-          (if (equal calculator-curnum "0")
-            (setq calculator-curnum nil))
-          (setq calculator-curnum
-                (concat (or calculator-curnum "") digit)))
-        (calculator-update-display)))))
+    (when (and (or calculator-display-fragile
+                   (not (numberp (car calculator-stack))))
+               (<= inp (pcase calculator-input-radix
+                         (`nil ?9) (`bin ?1) (`oct ?7) (_ 999))))
+      (calculator-clear-fragile)
+      (setq calculator-curnum
+            (concat (if (equal calculator-curnum "0") ""
+                        calculator-curnum)
+                    (list (upcase inp))))
+      (calculator-update-display))))
 
 (defun calculator-decimal ()
   "Enter a decimal period."
   (interactive)
-  (if (and (not calculator-input-radix)
-           (or calculator-display-fragile
-               (not (numberp (car calculator-stack))))
-           (not (and calculator-curnum
-                     (string-match-p "[.eE]" calculator-curnum))))
+  (when (and (not calculator-input-radix)
+             (or calculator-display-fragile
+                 (not (numberp (car calculator-stack))))
+             (not (and calculator-curnum
+                       (string-match-p "[.eE]" calculator-curnum))))
     ;; enter the period on the same condition as a digit, only if no
     ;; period or exponent entered yet
-    (progn
-      (calculator-clear-fragile)
-      (setq calculator-curnum (concat (or calculator-curnum "0") "."))
-      (calculator-update-display))))
+    (calculator-clear-fragile)
+    (setq calculator-curnum (concat (or calculator-curnum "0") "."))
+    (calculator-update-display)))
 
 (defun calculator-exp ()
   "Enter an `E' exponent character, or a digit in hex input mode."
   (interactive)
-  (if calculator-input-radix
-    (calculator-digit)
-    (if (and (or calculator-display-fragile
-                 (not (numberp (car calculator-stack))))
-             (not (and calculator-curnum
-                       (string-match-p "[eE]" calculator-curnum))))
-      ;; same condition as above, also no E so far
-      (progn
-        (calculator-clear-fragile)
-        (setq calculator-curnum (concat (or calculator-curnum "1") "e"))
-        (calculator-update-display)))))
+  (cond
+    (calculator-input-radix (calculator-digit))
+    ((and (or calculator-display-fragile
+              (not (numberp (car calculator-stack))))
+          (not (and calculator-curnum
+                    (string-match-p "[eE]" calculator-curnum))))
+     ;; same condition as above, also no E so far
+     (calculator-clear-fragile)
+     (setq calculator-curnum (concat (or calculator-curnum "1") "e"))
+     (calculator-update-display))))
 
 (defun calculator-op (&optional keys)
   "Enter an operator on the stack, doing all necessary reductions.
@@ -1394,42 +1285,29 @@ Optional string argument KEYS will force using it as the keys entered."
     (let* ((last-inp (calculator-last-input keys))
            (op (assoc last-inp calculator-operators)))
       (calculator-clear-fragile op)
-      (if (and calculator-curnum (/= (calculator-op-arity op) 0))
-        (setq calculator-stack
-              (cons (calculator-curnum-value) calculator-stack)))
-      (setq calculator-curnum nil)
-      (if (and (= 2 (calculator-op-arity op))
-               (not (and calculator-stack
-                         (numberp (nth 0 calculator-stack)))))
-        ;; we have a binary operator but no number - search for a prefix
-        ;; version
-        (let ((rest-ops calculator-operators))
-          (while (not (equal last-inp (car (car rest-ops))))
-            (setq rest-ops (cdr rest-ops)))
-          (setq op (assoc last-inp (cdr rest-ops)))
-          (if (not (and op (= -1 (calculator-op-arity op))))
-            ;;(error "Binary operator without a first operand")
-            (progn
-              (calculator-message
-               "Binary operator without a first operand")
-              (throw 'op-error nil)))))
+      (calculator-push-curnum)
+      (when (and (= 2 (calculator-op-arity op))
+                 (not (numberp (car calculator-stack))))
+        ;; we have a binary operator but no number -- search for a
+        ;; prefix version
+        (setq op (assoc last-inp (cdr (memq op calculator-operators))))
+        (unless (and op (= -1 (calculator-op-arity op)))
+          (calculator-message "Binary operator without a first operand")
+          (throw 'op-error nil)))
       (calculator-reduce-stack
        (cond ((eq (nth 1 op) '\() 10)
              ((eq (nth 1 op) '\)) 0)
              (t (calculator-op-prec op))))
-      (if (or (and (= -1 (calculator-op-arity op))
-                   (numberp (car calculator-stack)))
-              (and (/= (calculator-op-arity op) -1)
-                   (/= (calculator-op-arity op) 0)
-                   (not (numberp (car calculator-stack)))))
-        ;;(error "Unterminated expression")
-        (progn
-          (calculator-message "Unterminated expression")
-          (throw 'op-error nil)))
-      (setq calculator-stack (cons op calculator-stack))
+      (when (let ((hasnum (numberp (car calculator-stack))))
+              (pcase (calculator-op-arity op)
+                (-1 hasnum)
+                ((or 1 2) (not hasnum))))
+        (calculator-message "Incomplete expression")
+        (throw 'op-error nil))
+      (push op calculator-stack)
       (calculator-reduce-stack (calculator-op-prec op))
       (and (= (length calculator-stack) 1)
-           (numberp (nth 0 calculator-stack))
+           (numberp (car calculator-stack))
            ;; the display is fragile if it contains only one number
            (setq calculator-display-fragile t)
            ;; add number to the saved-list
@@ -1445,7 +1323,8 @@ Optional string argument KEYS will force using it as the keys entered."
 (defun calculator-op-or-exp ()
   "Either enter an operator or a digit.
 Used with +/- for entering them as digits in numbers like 1e-3 (there is
-no need for negative numbers since these are handled by unary operators)."
+no need for negative numbers since these are handled by unary
+operators)."
   (interactive)
   (if (and (not calculator-display-fragile)
            calculator-curnum
@@ -1459,14 +1338,11 @@ no need for negative numbers since these are handled by unary operators)."
 (defun calculator-dec/deg-mode ()
   "Set decimal mode for display & input, if decimal, toggle deg mode."
   (interactive)
-  (if calculator-curnum
-    (setq calculator-stack
-          (cons (calculator-curnum-value) calculator-stack)))
-  (setq calculator-curnum nil)
+  (calculator-push-curnum)
   (if (or calculator-input-radix calculator-output-radix)
     (progn (setq calculator-input-radix nil)
            (setq calculator-output-radix nil))
-    ;; already decimal - toggle degrees mode
+    ;; already decimal -- toggle degrees mode
     (setq calculator-deg (not calculator-deg)))
   (calculator-update-display t))
 
@@ -1481,10 +1357,7 @@ Optional string argument KEYS will force using it as the keys entered."
   "Set input radix modes.
 Optional string argument KEYS will force using it as the keys entered."
   (interactive)
-  (if calculator-curnum
-    (setq calculator-stack
-          (cons (calculator-curnum-value) calculator-stack)))
-  (setq calculator-curnum nil)
+  (calculator-push-curnum)
   (setq calculator-input-radix
         (let ((inp (calculator-last-input keys)))
           (cdr (assq (upcase (aref inp (1- (length inp))))
@@ -1495,10 +1368,7 @@ Optional string argument KEYS will force using it as the keys entered."
   "Set display radix modes.
 Optional string argument KEYS will force using it as the keys entered."
   (interactive)
-  (if calculator-curnum
-    (setq calculator-stack
-          (cons (calculator-curnum-value) calculator-stack)))
-  (setq calculator-curnum nil)
+  (calculator-push-curnum)
   (setq calculator-output-radix
         (let ((inp (calculator-last-input keys)))
           (cdr (assq (upcase (aref inp (1- (length inp))))
@@ -1524,19 +1394,18 @@ Optional string argument KEYS will force using it as the keys entered."
 (defun calculator-saved-move (n)
   "Go N elements up the list of saved values."
   (interactive)
-  (and calculator-saved-list
-       (or (null calculator-stack) calculator-display-fragile)
-       (progn
-         (setq calculator-saved-ptr
-               (max (min (+ n calculator-saved-ptr)
-                         (length calculator-saved-list))
-                    0))
-         (if (nth calculator-saved-ptr calculator-saved-list)
-           (setq calculator-stack
-                 (list (nth calculator-saved-ptr calculator-saved-list))
-                 calculator-display-fragile t)
-           (calculator-reset))
-         (calculator-update-display))))
+  (when (and calculator-saved-list
+             (or (null calculator-stack) calculator-display-fragile))
+    (setq calculator-saved-ptr
+          (max (min (+ n calculator-saved-ptr)
+                    (length calculator-saved-list))
+               0))
+    (if (nth calculator-saved-ptr calculator-saved-list)
+      (setq calculator-stack (list (nth calculator-saved-ptr
+                                        calculator-saved-list))
+            calculator-display-fragile t)
+      (calculator-reset))
+    (calculator-update-display)))
 
 (defun calculator-saved-up ()
   "Go up the list of saved values."
@@ -1583,7 +1452,7 @@ Optional string argument KEYS will force using it as the keys entered."
   (interactive)
   (setq calculator-curnum nil)
   (cond
-    ;; if the current number is from the saved-list remove it
+    ;; if the current number is from the saved-list remove it
     ((and calculator-display-fragile
           calculator-saved-list
           (= (car calculator-stack)
@@ -1592,7 +1461,7 @@ Optional string argument KEYS will force using it as the keys entered."
        (setq calculator-saved-list (cdr calculator-saved-list))
        (let ((p (nthcdr (1- calculator-saved-ptr)
                         calculator-saved-list)))
-         (setcdr p (cdr (cdr p)))
+         (setcdr p (cddr p))
          (setq calculator-saved-ptr (1- calculator-saved-ptr))))
      (if calculator-saved-list
        (setq calculator-stack
@@ -1613,15 +1482,16 @@ Optional string argument KEYS will force using it as the keys entered."
     (calculator-enter)
     ;; remove trailing spaces and an index
     (let ((s (cdr calculator-stack-display)))
-      (and s
-           (if (string-match "^\\([^ ]+\\) *\\(\\[[0-9/]+\\]\\)? *$" s)
-             (setq s (match-string 1 s)))
-           (kill-new s)))))
+      (when s
+        (kill-new (replace-regexp-in-string
+                   "^\\([^ ]+\\) *\\(\\[[0-9/]+\\]\\)? *$" "\\1" s))))))
 
-;; FIXME this should use register-read-with-preview, but it
-;; uses calculator-registers rather than register-alist.
 (defun calculator-set-register (reg)
   "Set a register value for REG."
+  ;; FIXME: this should use `register-read-with-preview', but it uses
+  ;; calculator-registers rather than `register-alist'.  (Maybe
+  ;; dynamically rebinding it will get blessed?)  Also in to
+  ;; `calculator-get-register'.
   (interactive "cRegister to store into: ")
   (let* ((as  (assq reg calculator-registers))
          (val (progn (calculator-enter) (car calculator-stack))))
@@ -1634,15 +1504,14 @@ Optional string argument KEYS will force using it as the keys entered."
 (defun calculator-put-value (val)
   "Paste VAL as if entered.
 Used by `calculator-paste' and `get-register'."
-  (if (and (numberp val)
-           ;; (not calculator-curnum)
-           (or calculator-display-fragile
-               (not (numberp (car calculator-stack)))))
-    (progn
-      (calculator-clear-fragile)
-      (setq calculator-curnum (let ((calculator-displayer "%S"))
-                                (calculator-number-to-string val)))
-      (calculator-update-display))))
+  (when (and (numberp val)
+             ;; (not calculator-curnum)
+             (or calculator-display-fragile
+                 (not (numberp (car calculator-stack)))))
+    (calculator-clear-fragile)
+    (setq calculator-curnum (let ((calculator-displayer "%S"))
+                              (calculator-number-to-string val)))
+    (calculator-update-display)))
 
 (defun calculator-paste ()
   "Paste a value from the `kill-ring'."
@@ -1662,8 +1531,6 @@ Used by `calculator-paste' and `get-register'."
                             (or (match-string 3 str) ""))))
      (ignore-errors (calculator-string-to-number str)))))
 
-;; FIXME this should use register-read-with-preview, but it
-;; uses calculator-registers rather than register-alist.
 (defun calculator-get-register (reg)
   "Get a value from a register REG."
   (interactive "cRegister to get value from: ")
@@ -1696,16 +1563,13 @@ Used by `calculator-paste' and `get-register'."
           (g-map (current-global-map))
           (win (selected-window)))
       (require 'ehelp)
-      (if calculator-electric-mode
+      (when calculator-electric-mode
         (use-global-map calculator-saved-global-map))
-      (if (or (not calculator-electric-mode)
-              ;; XEmacs has a problem with electric-describe-mode
-              (featurep 'xemacs))
-          (describe-mode)
-        (electric-describe-mode))
       (if calculator-electric-mode
-        (use-global-map g-map))
-      (select-window win) ; these are for XEmacs (also below)
+        (electric-describe-mode)
+        (describe-mode))
+      (when calculator-electric-mode (use-global-map g-map))
+      (select-window win)
       (message nil))
     (let ((one (one-window-p t))
           (win (selected-window))
@@ -1713,12 +1577,11 @@ Used by `calculator-paste' and `get-register'."
       (save-window-excursion
         (with-output-to-temp-buffer "*Help*"
           (princ (documentation 'calculator-help)))
-        (if one
-          (shrink-window-if-larger-than-buffer
-           (get-buffer-window help-buf)))
-        (message
-         "`%s' again for more help, any other key continues normally."
-         (calculator-last-input))
+        (when one (shrink-window-if-larger-than-buffer
+                   (get-buffer-window help-buf)))
+        (message "`%s' again for more help, %s."
+                 (calculator-last-input)
+                 "any other key continues normally")
         (select-window win)
         (sit-for 360))
       (select-window win))))
@@ -1731,11 +1594,12 @@ Used by `calculator-paste' and `get-register'."
   (unless calculator-electric-mode
     (ignore-errors
       (while (get-buffer-window calculator-buffer)
-       (delete-window (get-buffer-window calculator-buffer))))
-    (kill-buffer calculator-buffer))
-  (setq calculator-buffer nil)
+        (delete-window (get-buffer-window calculator-buffer)))))
+  (kill-buffer calculator-buffer)
   (message "Calculator done.")
-  (if calculator-electric-mode (throw 'calculator-done nil)))
+  (if calculator-electric-mode
+    (throw 'calculator-done nil) ; will kill the buffer
+    (setq calculator-buffer nil)))
 
 (defun calculator-save-and-quit ()
   "Quit the calculator, saving the result on the `kill-ring'."
@@ -1764,58 +1628,47 @@ To use this, apply a binary operator (evaluate it), then call this."
        (car calculator-last-opXY) (nth 1 calculator-last-opXY) x))
     x))
 
-(defun calculator-integer-p (x)
-  "Non-nil if X is equal to an integer."
-  (ignore-errors (= x (ftruncate x))))
-
 (defun calculator-expt (x y)
   "Compute X^Y, dealing with errors appropriately."
   (condition-case nil
       (expt x y)
     (domain-error 0.0e+NaN)
     (range-error
-     (cond
-      ((and (< x 1.0) (> x -1.0))
-       ;; For small x, the range error comes from large y.
-       0.0)
-      ((and (> x 0.0) (< y 0.0))
-       ;; For large positive x and negative y, the range error
-       ;; comes from large negative y.
-       0.0)
-      ((and (> x 0.0) (> y 0.0))
-       ;; For large positive x and positive y, the range error
-       ;; comes from large y.
-       1.0e+INF)
-      ;; For the rest, x must be large and negative.
-      ;; The range errors come from large integer y.
-      ((< y 0.0)
-       0.0)
-      ((eq (logand (truncate y) 1) 1)   ; expansion of cl `oddp'
-       ;; If y is odd
-       -1.0e+INF)
-      (t
-       ;;
-       1.0e+INF)))
+     (cond ((and (< x 1.0) (> x -1.0))
+            ;; For small x, the range error comes from large y.
+            0.0)
+           ((and (> x 0.0) (< y 0.0))
+            ;; For large positive x and negative y, the range error
+            ;; comes from large negative y.
+            0.0)
+           ((and (> x 0.0) (> y 0.0))
+            ;; For large positive x and positive y, the range error
+            ;; comes from large y.
+            1.0e+INF)
+           ;; For the rest, x must be large and negative.
+           ;; The range errors come from large integer y.
+           ((< y 0.0)
+            0.0)
+           ((eq (logand (truncate y) 1) 1)   ; expansion of cl `oddp'
+            ;; If y is odd
+            -1.0e+INF)
+           (t
+            ;;
+            1.0e+INF)))
     (error 0.0e+NaN)))
 
 (defun calculator-fact (x)
   "Simple factorial of X."
-  (if (and (>= x 0)
-           (calculator-integer-p x))
-      (if (= (calculator-expt (/ x 3.0) x) 1.0e+INF)
-          1.0e+INF
-        (let ((r (if (<= x 10) 1 1.0)))
-          (while (> x 0)
-            (setq r (* r (truncate x)))
-            (setq x (1- x)))
-          (+ 0.0 r)))
-    (if (= x 1.0e+INF)
-        x
-      0.0e+NaN)))
+  (cond ((>= x 1.0e+INF) x)
+        ((or (and (floatp x) (isnan x)) (< x 0)) 0.0e+NaN)
+        ((>= (calculator-expt (/ x 3.0) x) 1.0e+INF) 1.0e+INF)
+        (t (let ((x (truncate x)) (r 1.0))
+             (while (> x 0) (setq r (* r x) x (1- x)))
+             r))))
 
 (defun calculator-truncate (n)
   "Truncate N, return 0 in case of overflow."
-  (condition-case nil (truncate n) (error 0)))
+  (condition-case nil (truncate n) (range-error 0)))
 
 
 (provide 'calculator)
index f7723b9aa7b3bb913ea3feeea14dd2c478332d3c..8e828074ea496d6d26577e513705349aee901dcb 100644 (file)
@@ -94,9 +94,6 @@ Gregorian date Sunday, December 31, 1 BC."
          0)
        day)))                           ; days so far this month
 
-(define-obsolete-function-alias 'calendar-absolute-from-bahai
-  'calendar-bahai-to-absolute "23.1")
-
 (defun calendar-bahai-from-absolute (date)
   "Bahá'í date (month day year) corresponding to the absolute DATE."
   (if (< date calendar-bahai-epoch)
@@ -152,9 +149,6 @@ Defaults to today's date if DATE is not given."
        (message "Date is pre-Bahá'í")
      (message "Bahá'í date: %s" s))))
 
-(define-obsolete-function-alias
-  'calendar-print-bahai-date 'calendar-bahai-print-date "23.1")
-
 (defun calendar-bahai-read-date ()
  "Interactively read the arguments for a Bahá'í date command.
 Reads a year, month and day."
@@ -179,9 +173,6 @@ Reads a year, month and day."
                              (lambda (x) (and (< 0 x) (<= x 19))))))
     (list (list month day year))))
 
-(define-obsolete-function-alias
-  'calendar-bahai-prompt-for-date 'calendar-bahai-read-date "23.1")
-
 ;;;###cal-autoload
 (defun calendar-bahai-goto-date (date &optional noecho)
   "Move cursor to Bahá'í date DATE; echo Bahá'í date unless NOECHO is non-nil."
@@ -190,9 +181,6 @@ Reads a year, month and day."
                        (calendar-bahai-to-absolute date)))
   (or noecho (calendar-bahai-print-date)))
 
-(define-obsolete-function-alias
-  'calendar-goto-bahai-date 'calendar-bahai-goto-date "23.1")
-
 (defvar displayed-month)
 (defvar displayed-year)
 
@@ -270,9 +258,6 @@ will not be marked in the calendar.  This function is provided for use with
   (diary-list-entries-1 calendar-bahai-month-name-array
                         diary-bahai-entry-symbol
                         'calendar-bahai-from-absolute))
-(define-obsolete-function-alias
-  'list-bahai-diary-entries 'diary-bahai-list-entries "23.1")
-
 
 (autoload 'calendar-mark-1 "diary-lib")
 
@@ -284,10 +269,6 @@ passed to `calendar-mark-visible-date' as MARK."
   (calendar-mark-1 month day year 'calendar-bahai-from-absolute
                    'calendar-bahai-to-absolute color))
 
-(define-obsolete-function-alias
-  'mark-bahai-calendar-date-pattern 'calendar-bahai-mark-date-pattern "23.1")
-
-
 (autoload 'diary-mark-entries-1 "diary-lib")
 
 ;;;###diary-autoload
@@ -300,10 +281,6 @@ window.  See `diary-bahai-list-entries' for more information."
                         diary-bahai-entry-symbol
                         'calendar-bahai-from-absolute))
 
-(define-obsolete-function-alias
-  'mark-bahai-diary-entries 'diary-bahai-mark-entries "23.1")
-
-
 (autoload 'diary-insert-entry-1 "diary-lib")
 
 ;;;###cal-autoload
@@ -316,9 +293,6 @@ Prefix argument ARG makes the entry nonmarking."
                         diary-bahai-entry-symbol
                         'calendar-bahai-from-absolute))
 
-(define-obsolete-function-alias
-  'insert-bahai-diary-entry 'diary-bahai-insert-entry "23.1")
-
 ;;;###cal-autoload
 (defun diary-bahai-insert-monthly-entry (arg)
   "Insert a monthly diary entry.
@@ -329,9 +303,6 @@ Prefix argument ARG makes the entry nonmarking."
                         diary-bahai-entry-symbol
                         'calendar-bahai-from-absolute))
 
-(define-obsolete-function-alias
-  'insert-monthly-bahai-diary-entry 'diary-bahai-insert-monthly-entry "23.1")
-
 ;;;###cal-autoload
 (defun diary-bahai-insert-yearly-entry (arg)
   "Insert an annual diary entry.
@@ -342,9 +313,6 @@ Prefix argument ARG will make the entry nonmarking."
                         diary-bahai-entry-symbol
                         'calendar-bahai-from-absolute))
 
-(define-obsolete-function-alias
-  'insert-yearly-bahai-diary-entry 'diary-bahai-insert-yearly-entry "23.1")
-
 (defvar date)
 
 ;; To be called from diary-list-sexp-entries, where DATE is bound.
index 538d2320b30b18a713480412fafa1a871e4f8d2f..c5860653a3e60c73e0a7c81398ebd38311c41edd 100644 (file)
@@ -58,9 +58,6 @@
   :prefix "calendar-chinese-"
   :group 'calendar)
 
-(define-obsolete-variable-alias 'chinese-calendar-time-zone
-  'calendar-chinese-time-zone "23.1")
-
 (defcustom calendar-chinese-time-zone
   '(if (< year 1928)
        (+ 465 (/ 40.0 60.0))
@@ -78,18 +75,12 @@ Default is for Beijing.  This is an expression in `year' since it changed at
 (put 'chinese-calendar-time-zone 'risky-local-variable t)
 
 
-(define-obsolete-variable-alias 'chinese-calendar-location-name
-  'calendar-chinese-location-name "23.1")
-
 ;; FIXME unused.
 (defcustom calendar-chinese-location-name "Beijing"
   "Name of location used for calculation of Chinese calendar."
   :type 'string
   :group 'calendar-chinese)
 
-(define-obsolete-variable-alias 'chinese-calendar-daylight-time-offset
-  'calendar-chinese-daylight-time-offset "23.1")
-
 (defcustom calendar-chinese-daylight-time-offset 0
 ;; The correct value is as follows, but the Chinese calendrical
 ;; authorities do NOT use DST in determining astronomical events:
@@ -99,9 +90,6 @@ Default is for no daylight saving time."
   :type 'integer
   :group 'calendar-chinese)
 
-(define-obsolete-variable-alias 'chinese-calendar-standard-time-zone-name
-  'calendar-chinese-standard-time-zone-name "23.1")
-
 (defcustom calendar-chinese-standard-time-zone-name
   '(if (< year 1928)
        "PMT"
@@ -112,17 +100,11 @@ at 1928-01-01 00:00:00 from `PMT' to `CST'."
   :type 'sexp
   :group 'calendar-chinese)
 
-(define-obsolete-variable-alias 'chinese-calendar-daylight-time-zone-name
-  'calendar-chinese-daylight-time-zone-name "23.1")
-
 (defcustom calendar-chinese-daylight-time-zone-name "CDT"
   "Abbreviated name of daylight saving time zone used for Chinese calendar."
   :type 'string
   :group 'calendar-chinese)
 
-(define-obsolete-variable-alias 'chinese-calendar-daylight-savings-starts
-  'calendar-chinese-daylight-saving-start "23.1")
-
 (defcustom calendar-chinese-daylight-saving-start nil
 ;; The correct value is as follows, but the Chinese calendrical
 ;; authorities do NOT use DST in determining astronomical events:
@@ -135,9 +117,6 @@ Default is for no daylight saving time.  See documentation of
   :type 'sexp
   :group 'calendar-chinese)
 
-(define-obsolete-variable-alias 'chinese-calendar-daylight-savings-ends
-  'calendar-chinese-daylight-saving-end "23.1")
-
 (defcustom calendar-chinese-daylight-saving-end nil
 ;; The correct value is as follows, but the Chinese calendrical
 ;; authorities do NOT use DST in determining astronomical events:
@@ -148,27 +127,18 @@ Default is for no daylight saving time.  See documentation of
   :type 'sexp
   :group 'calendar-chinese)
 
-(define-obsolete-variable-alias 'chinese-calendar-daylight-savings-starts-time
-  'calendar-chinese-daylight-saving-start-time "23.1")
-
 (defcustom calendar-chinese-daylight-saving-start-time 0
   "Number of minutes after midnight that daylight saving time starts.
 Default is for no daylight saving time."
   :type 'integer
   :group 'calendar-chinese)
 
-(define-obsolete-variable-alias 'chinese-calendar-daylight-savings-ends-time
-  'calendar-chinese-daylight-saving-end-time "23.1")
-
 (defcustom calendar-chinese-daylight-saving-end-time 0
   "Number of minutes after midnight that daylight saving time ends.
 Default is for no daylight saving time."
   :type 'integer
   :group 'calendar-chinese)
 
-(define-obsolete-variable-alias 'chinese-calendar-celestial-stem
-  'calendar-chinese-celestial-stem "23.1")
-
 (defcustom calendar-chinese-celestial-stem
   ["Jia" "Yi" "Bing" "Ding" "Wu" "Ji" "Geng" "Xin" "Ren" "Gui"]
   "Prefixes used by `calendar-chinese-sexagesimal-name'."
@@ -184,9 +154,6 @@ Default is for no daylight saving time."
                  (string :tag "Ren")
                  (string :tag "Gui")))
 
-(define-obsolete-variable-alias 'chinese-calendar-terrestrial-branch
-  'calendar-chinese-terrestrial-branch "23.1")
-
 (defcustom calendar-chinese-terrestrial-branch
   ["Zi" "Chou" "Yin" "Mao" "Chen" "Si" "Wu" "Wei" "Shen" "You" "Xu" "Hai"]
   "Suffixes used by `calendar-chinese-sexagesimal-name'."
@@ -432,9 +399,6 @@ Sunday, December 31, 1 BC is imaginary."
                                    (calendar-chinese-year g-year))
                              (calendar-chinese-year (1+ g-year))))))))
 
-(define-obsolete-function-alias 'calendar-absolute-from-chinese
-  'calendar-chinese-to-absolute "23.1")
-
 (defun calendar-chinese-from-absolute (date)
   "Compute Chinese date (cycle year month day) corresponding to absolute DATE.
 The absolute date is the number of days elapsed since the (imaginary)
@@ -599,9 +563,6 @@ Defaults to today's date if DATE is not given."
   (message "Chinese date: %s"
            (calendar-chinese-date-string (calendar-cursor-to-date t))))
 
-(define-obsolete-function-alias 'calendar-print-chinese-date
-  'calendar-chinese-print-date "23.1")
-
 (defun calendar-chinese-months-to-alist (l)
   "Make list of months L into an assoc list."
   (and l (car l)
@@ -671,9 +632,6 @@ Echo Chinese date unless NOECHO is non-nil."
                        (calendar-chinese-to-absolute date)))
   (or noecho (calendar-chinese-print-date)))
 
-(define-obsolete-function-alias 'calendar-goto-chinese-date
-  'calendar-chinese-goto-date "23.1")
-
 (defvar date)
 
 ;; To be called from diary-list-sexp-entries, where DATE is bound.
@@ -682,6 +640,124 @@ Echo Chinese date unless NOECHO is non-nil."
   "Chinese calendar equivalent of date diary entry."
   (format "Chinese date: %s" (calendar-chinese-date-string date)))
 
+;;;; diary support
+
+(autoload 'calendar-mark-1         "diary-lib")
+(autoload 'diary-mark-entries-1    "diary-lib")
+(autoload 'diary-list-entries-1    "diary-lib")
+(autoload 'diary-insert-entry-1    "diary-lib")
+(autoload 'diary-date-display-form "diary-lib")
+(autoload 'diary-make-date         "diary-lib")
+(autoload 'diary-ordinal-suffix    "diary-lib")
+(defvar diary-sexp-entry-symbol)
+(defvar entry)                    ;used by `diary-chinese-anniversary'
+
+(defvar calendar-chinese-month-name-array
+  ["正月" "二月" "三月" "四月" "五月" "六月"
+   "七月" "八月" "九月" "十月" "冬月" "臘月"])
+
+;;; NOTE: In the diary the cycle and year of a Chinese date is
+;;; combined using this formula: (+ (* cycle 100) year).
+;;;
+;;; These two functions convert to and back from this representation.
+(defun calendar-chinese-from-absolute-for-diary (date)
+  (pcase-let ((`(,c ,y ,m ,d) (calendar-chinese-from-absolute date)))
+    (list m d (+ (* c 100) y))))
+
+(defun calendar-chinese-to-absolute-for-diary (date)
+  (pcase-let ((`(,m ,d ,y) date))
+    (calendar-chinese-to-absolute
+     (list (floor y 100) (mod y 100) m d))))
+
+(defun calendar-chinese-mark-date-pattern (month day year &optional color)
+  (calendar-mark-1 month day year
+                   #'calendar-chinese-from-absolute-for-diary
+                   #'calendar-chinese-to-absolute-for-diary
+                   color))
+
+;;;###cal-autoload
+(defun diary-chinese-mark-entries ()
+  "Mark days in the calendar window that have Chinese date diary entries.
+Marks each entry in `diary-file' (or included files) visible in the calendar
+window.  See `diary-chinese-list-entries' for more information.
+
+This function is provided for use with `diary-nongregorian-marking-hook'."
+  (diary-mark-entries-1 #'calendar-chinese-mark-date-pattern
+                        calendar-chinese-month-name-array
+                        diary-chinese-entry-symbol
+                        #'calendar-chinese-from-absolute-for-diary))
+
+;;;###cal-autoload
+(defun diary-chinese-list-entries ()
+  "Add any Chinese date entries from the diary file to `diary-entries-list'.
+Chinese date diary entries must be prefixed by `diary-chinese-entry-symbol'
+\(normally a `C').  The same `diary-date-forms' govern the style
+of the Chinese calendar entries.  If a Chinese date diary entry begins with
+`diary-nonmarking-symbol', the entry will appear in the diary listing,
+but will not be marked in the calendar.
+
+This function is provided for use with `diary-nongregorian-listing-hook'."
+  (diary-list-entries-1 calendar-chinese-month-name-array
+                        diary-chinese-entry-symbol
+                        #'calendar-chinese-from-absolute-for-diary))
+
+;;;###cal-autoload
+(defun diary-chinese-anniversary (month day &optional year mark)
+  "Like `diary-anniversary' (which see) but accepts Chinese date."
+  (pcase-let* ((ddate (diary-make-date month day year))
+               (`(,dc ,dy ,dm ,dd)      ;diary chinese date
+                (if year
+                    (calendar-chinese-from-absolute
+                     (calendar-chinese-to-absolute-for-diary ddate))
+                  (list nil nil (calendar-extract-month ddate)
+                        (calendar-extract-day ddate))))
+               (`(,cc ,cy ,cm ,cd)      ;current chinese date
+                (calendar-chinese-from-absolute
+                 (calendar-absolute-from-gregorian date)))
+               (diff (if (and dc dy)
+                         (+ (* 60 (- cc dc)) (- cy dy))
+                       100)))
+    (and (> diff 0) (= dm cm) (= dd cd)
+         (cons mark (format entry diff (diary-ordinal-suffix diff))))))
+
+;;;###cal-autoload
+(defun diary-chinese-insert-anniversary-entry (&optional arg)
+  "Insert an anniversary diary entry for the Chinese date at point.
+Prefix argument ARG makes the entry nonmarking."
+  (interactive "P")
+  (let ((calendar-date-display-form (diary-date-display-form)))
+    (diary-make-entry
+     (format "%s(diary-chinese-anniversary %s)"
+             diary-sexp-entry-symbol
+             (calendar-date-string
+              (calendar-chinese-from-absolute-for-diary
+               (calendar-absolute-from-gregorian (calendar-cursor-to-date t)))))
+     arg)))
+
+;;;###cal-autoload
+(defun diary-chinese-insert-entry (&optional arg)
+  "Insert a diary entry for the Chinese date at point."
+  (interactive "P")
+  (diary-insert-entry-1 nil arg calendar-chinese-month-name-array
+                        diary-chinese-entry-symbol
+                        #'calendar-chinese-from-absolute-for-diary))
+
+;;;###cal-autoload
+(defun diary-chinese-insert-monthly-entry (&optional arg)
+  "Insert a monthly diary entry for the Chinese date at point."
+  (interactive "P")
+  (diary-insert-entry-1 'monthly arg calendar-chinese-month-name-array
+                        diary-chinese-entry-symbol
+                        #'calendar-chinese-from-absolute-for-diary))
+
+;;;###cal-autoload
+(defun diary-chinese-insert-yearly-entry (&optional arg)
+  "Insert a yearly diary entry for the Chinese date at point."
+  (interactive "P")
+  (diary-insert-entry-1 'yearly arg calendar-chinese-month-name-array
+                        diary-chinese-entry-symbol
+                        #'calendar-chinese-from-absolute-for-diary))
+
 (provide 'cal-china)
 
 ;;; cal-china.el ends here
index 2472d295123eace91254c2f5d9ff00a097ed189a..54a1fe9bff5840348f985e9bb0eb0017badc3d5d 100644 (file)
@@ -75,9 +75,6 @@ Gregorian date Sunday, December 31, 1 BC."
        (* 30 (1- month))              ; days in prior months this year
        day)))                         ; days so far this month
 
-(define-obsolete-function-alias 'calendar-absolute-from-coptic
-  'calendar-coptic-to-absolute "23.1")
-
 (defun calendar-coptic-from-absolute (date)
   "Compute the Coptic equivalent for absolute date DATE.
 The result is a list of the form (MONTH DAY YEAR).
@@ -135,9 +132,6 @@ Defaults to today's date if DATE is not given."
         (message "Date is pre-%s calendar" calendar-coptic-name)
       (message "%s date: %s" calendar-coptic-name f))))
 
-(define-obsolete-function-alias 'calendar-print-coptic-date
-  'calendar-coptic-print-date "23.1")
-
 (defun calendar-coptic-read-date ()
   "Interactively read the arguments for a Coptic date command.
 Reads a year, month, and day."
@@ -164,9 +158,6 @@ Reads a year, month, and day."
                (lambda (x) (and (< 0 x) (<= x last))))))
     (list (list month day year))))
 
-(define-obsolete-function-alias 'coptic-prompt-for-date
-  'calendar-coptic-read-date "23.1")
-
 ;;;###cal-autoload
 (defun calendar-coptic-goto-date (date &optional noecho)
   "Move cursor to Coptic date DATE.
@@ -176,8 +167,6 @@ Echo Coptic date unless NOECHO is t."
                        (calendar-coptic-to-absolute date)))
   (or noecho (calendar-coptic-print-date)))
 
-(define-obsolete-function-alias 'calendar-goto-coptic-date
-  'calendar-coptic-goto-date "23.1")
 
 (defvar date)
 
@@ -208,9 +197,6 @@ Gregorian date Sunday, December 31, 1 BC."
   (let ((calendar-coptic-epoch calendar-ethiopic-epoch))
     (calendar-coptic-to-absolute date)))
 
-(define-obsolete-function-alias 'calendar-absolute-from-ethiopic
-  'calendar-ethiopic-to-absolute "23.1")
-
 (defun calendar-ethiopic-from-absolute (date)
   "Compute the Ethiopic equivalent for absolute date DATE.
 The result is a list of the form (MONTH DAY YEAR).
@@ -238,9 +224,6 @@ Defaults to today's date if DATE is not given."
         (calendar-coptic-month-name-array calendar-ethiopic-month-name-array))
     (call-interactively 'calendar-coptic-print-date)))
 
-(define-obsolete-function-alias 'calendar-print-ethiopic-date
-  'calendar-ethiopic-print-date "23.1")
-
 ;;;###cal-autoload
 (defun calendar-ethiopic-goto-date (date &optional noecho)
   "Move cursor to Ethiopic date DATE.
@@ -254,9 +237,6 @@ Echo Ethiopic date unless NOECHO is t."
                        (calendar-ethiopic-to-absolute date)))
   (or noecho (calendar-ethiopic-print-date)))
 
-(define-obsolete-function-alias 'calendar-goto-ethiopic-date
-  'calendar-ethiopic-goto-date "23.1")
-
 ;; To be called from diary-list-sexp-entries, where DATE is bound.
 ;;;###diary-autoload
 (defun diary-ethiopic-date ()
index cbcd231cca3828e375b9539f77bea77479707676..36318702d067fbb373f90fcf833e298b1310b5c1 100644 (file)
@@ -1,7 +1,7 @@
 ;;; cal-french.el --- calendar functions for the French Revolutionary calendar
 
-;; Copyright (C) 1988-1989, 1992, 1994-1995, 1997, 2001-2014 Free
-;; Software Foundation, Inc.
+;; Copyright (C) 1988-1989, 1992, 1994-1995, 1997, 2001-2014
+;;   Free Software Foundation, Inc.
 
 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
 ;; Maintainer: Glenn Morris <rgm@gnu.org>
@@ -129,9 +129,6 @@ Gregorian date Sunday, December 31, 1 BC."
        day                            ; days so far this month
        (1- calendar-french-epoch))))  ; days before start of calendar
 
-(define-obsolete-function-alias 'calendar-absolute-from-french
-  'calendar-french-to-absolute "23.1")
-
 (defun calendar-french-from-absolute (date)
   "Compute the French Revolutionary equivalent for absolute date DATE.
 The result is a list of the form (MONTH DAY YEAR).
@@ -196,9 +193,6 @@ Defaults to today's date if DATE is not given."
         (message "Date is pre-French Revolution")
       (message "French Revolutionary date: %s" f))))
 
-(define-obsolete-function-alias 'calendar-print-french-date
-  'calendar-french-print-date "23.1")
-
 ;;;###cal-autoload
 (defun calendar-french-goto-date (date &optional noecho)
   "Move cursor to French Revolutionary date DATE.
@@ -249,9 +243,6 @@ Echo French Revolutionary date unless NOECHO is non-nil."
                        (calendar-french-to-absolute date)))
   (or noecho (calendar-french-print-date)))
 
-(define-obsolete-function-alias 'calendar-goto-french-date
-  'calendar-french-goto-date "23.1")
-
 (defvar date)
 
 ;; To be called from diary-list-sexp-entries, where DATE is bound.
index 4d20b1fa23076ab8848122a50b7d731a45fbd06a..93ac3b722b533f66aedebc7e14c7b7961e050a3c 100644 (file)
@@ -32,9 +32,6 @@
 
 (require 'calendar)
 
-(define-obsolete-variable-alias 'diary-sabbath-candles-minutes
-  'diary-hebrew-sabbath-candles-minutes "23.1")
-
 (defcustom diary-hebrew-sabbath-candles-minutes 18
   "Number of minutes before sunset for sabbath candle lighting.
 Used by `diary-hebrew-sabbath-candles'."
@@ -136,9 +133,6 @@ Gregorian date Sunday, December 31, 1 BC."
        (calendar-hebrew-elapsed-days year) ; days in prior years
        -1373429)))               ; days elapsed before absolute date 1
 
-(define-obsolete-function-alias 'calendar-absolute-from-hebrew
-  'calendar-hebrew-to-absolute "23.1")
-
 (defun calendar-hebrew-from-absolute (date)
   "Compute the Hebrew date (month day year) corresponding to absolute DATE.
 The absolute date is the number of days elapsed since the (imaginary)
@@ -194,9 +188,6 @@ Driven by the variable `calendar-date-display-form'."
   (message "Hebrew date (until sunset): %s"
            (calendar-hebrew-date-string (calendar-cursor-to-date t))))
 
-(define-obsolete-function-alias 'calendar-print-hebrew-date
-  'calendar-hebrew-print-date "23.1")
-
 (defun calendar-hebrew-yahrzeit (death-date year)
   "Absolute date of the anniversary of Hebrew DEATH-DATE in Hebrew YEAR."
   (let ((death-day (calendar-extract-day death-date))
@@ -230,9 +221,6 @@ Driven by the variable `calendar-date-display-form'."
      (t (calendar-hebrew-to-absolute
          (list death-month death-day year))))))
 
-(define-obsolete-function-alias 'hebrew-calendar-yahrzeit
-  'calendar-hebrew-yahrzeit "23.1")
-
 (defun calendar-hebrew-read-date ()
   "Interactively read the arguments for a Hebrew date command.
 Reads a year, month, and day."
@@ -284,9 +272,6 @@ Reads a year, month, and day."
                        (calendar-hebrew-to-absolute date)))
   (or noecho (calendar-hebrew-print-date)))
 
-(define-obsolete-function-alias 'calendar-goto-hebrew-date
-  'calendar-hebrew-goto-date "23.1")
-
 (defvar displayed-month)                ; from calendar-generate
 
 (defun calendar-hebrew-date-is-visible-p (month day)
@@ -397,10 +382,6 @@ or ALL is non-nil."
            (list (calendar-gregorian-from-absolute (+ abs-r-h 20))
                    "Hoshanah Rabbah"))))))))
 
-;;;###holiday-autoload
-(define-obsolete-function-alias 'holiday-rosh-hashanah-etc
-  'holiday-hebrew-rosh-hashanah "23.1")
-
 ;;;###holiday-autoload
 (defun holiday-hebrew-hanukkah (&optional all)
   "List of dates related to Hanukkah, as visible in calendar window.
@@ -433,10 +414,6 @@ is non-nil."
                     han)))
          (list (list (calendar-gregorian-from-absolute abs-h) "Hanukkah")))))))
 
-;;;###holiday-autoload
-(define-obsolete-function-alias 'holiday-hanukkah
-  'holiday-hebrew-hanukkah "23.1")
-
 ;;;###holiday-autoload
 (defun holiday-hebrew-passover (&optional all)
   "List of dates related to Passover, as visible in calendar window.
@@ -519,10 +496,6 @@ or ALL is non-nil."
              (list (calendar-gregorian-from-absolute (+ abs-p 51))
                    "Shavuot (second day)")))))))))
 
-;;;###holiday-autoload
-(define-obsolete-function-alias 'holiday-passover-etc
-  'holiday-hebrew-passover "23.1")
-
 ;;;###holiday-autoload
 (defun holiday-hebrew-tisha-b-av ()
   "List of dates around Tisha B'Av, as visible in calendar window."
@@ -545,10 +518,6 @@ or ALL is non-nil."
                (calendar-dayname-on-or-before 6 (+ abs-t-a 7)))
               "Shabbat Nahamu"))))))
 
-;;;###holiday-autoload
-(define-obsolete-function-alias 'holiday-tisha-b-av-etc
-  'holiday-hebrew-tisha-b-av "23.1")
-
 (autoload 'holiday-julian "cal-julian")
 
 ;;;###holiday-autoload
@@ -634,9 +603,6 @@ is provided for use with `diary-nongregorian-listing-hook'."
   (diary-list-entries-1 calendar-hebrew-month-name-array-leap-year
                         diary-hebrew-entry-symbol
                         'calendar-hebrew-from-absolute))
-;;;###diary-autoload
-(define-obsolete-function-alias 'list-hebrew-diary-entries
-  'diary-hebrew-list-entries "23.1")
 
 (autoload 'calendar-mark-complex "diary-lib")
 
@@ -662,10 +628,6 @@ passed to `calendar-mark-visible-date' as MARK."
       (calendar-mark-complex month day year
                              'calendar-hebrew-from-absolute color))))
 
-;;;###diary-autoload
-(define-obsolete-function-alias 'mark-hebrew-calendar-date-pattern
-  'calendar-hebrew-mark-date-pattern "23.1")
-
 (autoload 'diary-mark-entries-1 "diary-lib")
 
 ;;;###diary-autoload
@@ -678,10 +640,6 @@ window.  See `list-hebrew-diary-entries' for more information."
                         diary-hebrew-entry-symbol
                         'calendar-hebrew-from-absolute))
 
-;;;###diary-autoload
-(define-obsolete-function-alias 'mark-hebrew-diary-entries
-  'diary-hebrew-mark-entries "23.1")
-
 (autoload 'diary-insert-entry-1 "diary-lib")
 
 ;;;###cal-autoload
@@ -693,10 +651,6 @@ Prefix argument ARG makes the entry nonmarking."
                         diary-hebrew-entry-symbol
                         'calendar-hebrew-from-absolute))
 
-;;;###diary-autoload
-(define-obsolete-function-alias 'insert-hebrew-diary-entry
-  'diary-hebrew-insert-entry "23.1")
-
 ;;;###cal-autoload
 (defun diary-hebrew-insert-monthly-entry (arg)
   "Insert a monthly diary entry.
@@ -706,9 +660,6 @@ Prefix argument ARG makes the entry nonmarking."
   (diary-insert-entry-1 'monthly arg calendar-hebrew-month-name-array-leap-year
                         diary-hebrew-entry-symbol
                         'calendar-hebrew-from-absolute))
-;;;###diary-autoload
-(define-obsolete-function-alias 'insert-monthly-hebrew-diary-entry
-  'diary-hebrew-insert-monthly-entry "23.1")
 
 ;;;###cal-autoload
 (defun diary-hebrew-insert-yearly-entry (arg)
@@ -719,9 +670,6 @@ Prefix argument ARG makes the entry nonmarking."
   (diary-insert-entry-1 'yearly arg calendar-hebrew-month-name-array-leap-year
                         diary-hebrew-entry-symbol
                         'calendar-hebrew-from-absolute))
-;;;###diary-autoload
-(define-obsolete-function-alias 'insert-yearly-hebrew-diary-entry
-  'diary-hebrew-insert-yearly-entry "23.1")
 
 ;;;###autoload
 (defun calendar-hebrew-list-yahrzeits (death-date start-year end-year)
@@ -786,10 +734,6 @@ from the cursor position."
               (calendar-absolute-from-gregorian (list 1 1 i))))))) "\n"))))
   (message "Computing Yahrzeits...done"))
 
-;;;###autoload
-(define-obsolete-function-alias 'list-yahrzeit-dates
-  'calendar-hebrew-list-yahrzeits "23.1")
-
 (defun calendar-hebrew-birthday (date year)
   "Absolute date of the anniversary of Hebrew birth DATE, in Hebrew YEAR."
   (let ((b-day (calendar-extract-day date))
@@ -869,8 +813,6 @@ use when highlighting the day in the calendar."
                                     ""
                                   (format " and %d day%s"
                                           day (if (= day 1) "" "s"))))))))))
-;;;###diary-autoload
-(define-obsolete-function-alias 'diary-omer 'diary-hebrew-omer "23.1")
 
 (autoload 'diary-make-date "diary-lib")
 
@@ -911,9 +853,6 @@ use when highlighting the day in the calendar."
                       diff
                       (diary-ordinal-suffix diff))))))
 
-;;;###diary-autoload
-(define-obsolete-function-alias 'diary-yahrzeit 'diary-hebrew-yahrzeit "23.1")
-
 ;;;###diary-autoload
 (defun diary-hebrew-rosh-hodesh (&optional mark)
   "Rosh Hodesh diary entry.
@@ -976,9 +915,6 @@ use when highlighting the day in the calendar."
                                        (calendar-hebrew-last-month-of-year
                                         h-year))
                                     0 h-month)))))))))
-;;;###diary-autoload
-(define-obsolete-function-alias 'diary-rosh-hodesh
-  'diary-hebrew-rosh-hodesh "23.1")
 
 (defconst calendar-hebrew-parashiot-names
   ["Bereshith"   "Noah"      "Lech L'cha" "Vayera"    "Hayei Sarah" "Toledoth"
@@ -1166,8 +1102,6 @@ use when highlighting the day in the calendar."
                                     (cdr parasha))))
                        (calendar-hebrew-parasha-name parasha)))))))))
 
-(define-obsolete-function-alias 'diary-parasha 'diary-hebrew-parasha "23.1")
-
 
 (declare-function solar-setup "solar" ())
 (declare-function solar-sunrise-sunset "solar" (date))
@@ -1199,10 +1133,6 @@ use when highlighting the day in the calendar."
                                            60.0))
                                      (cdr sunset)))))))))
 
-;;;###diary-autoload
-(define-obsolete-function-alias 'diary-sabbath-candles
-  'diary-hebrew-sabbath-candles "23.1")
-
 
 (provide 'cal-hebrew)
 
index 50034755d6f10743e3493a7577f90a2a43ead0f5..00e54658fb249e5b6491a1f65d169447cb40651a 100644 (file)
@@ -87,9 +87,6 @@ Gregorian date Sunday, December 31, 1 BC."
        leap-years-in-cycle            ; leap days this cycle
        (1- calendar-islamic-epoch)))) ; days before start of calendar
 
-(define-obsolete-function-alias 'calendar-absolute-from-islamic
-  'calendar-islamic-to-absolute "23.1")
-
 (defun calendar-islamic-from-absolute (date)
   "Compute the Islamic date (month day year) corresponding to absolute DATE.
 The absolute date is the number of days elapsed since the (imaginary)
@@ -141,9 +138,6 @@ Driven by the variable `calendar-date-display-form'."
         (message "Date is pre-Islamic")
       (message "Islamic date (until sunset): %s" i))))
 
-(define-obsolete-function-alias 'calendar-print-islamic-date
-  'calendar-islamic-print-date "23.1")
-
 (defun calendar-islamic-read-date ()
   "Interactively read the arguments for an Islamic date command.
 Reads a year, month, and day."
@@ -177,9 +171,6 @@ Reads a year, month, and day."
                        (calendar-islamic-to-absolute date)))
   (or noecho (calendar-islamic-print-date)))
 
-(define-obsolete-function-alias 'calendar-goto-islamic-date
-  'calendar-islamic-goto-date "23.1")
-
 (defvar displayed-month)                ; from calendar-generate
 (defvar displayed-year)
 
@@ -260,9 +251,6 @@ marked in the calendar.  This function is provided for use with
                         diary-islamic-entry-symbol
                         'calendar-islamic-from-absolute))
 
-(define-obsolete-function-alias 'list-islamic-diary-entries
-  'diary-islamic-list-entries "23.1")
-
 (autoload 'calendar-mark-1 "diary-lib")
 
 ;;;###diary-autoload
@@ -273,9 +261,6 @@ passed to `calendar-mark-visible-date' as MARK."
   (calendar-mark-1 month day year 'calendar-islamic-from-absolute
                    'calendar-islamic-to-absolute color))
 
-(define-obsolete-function-alias 'mark-islamic-calendar-date-pattern
-  'calendar-islamic-mark-date-pattern "23.1")
-
 (autoload 'diary-mark-entries-1 "diary-lib")
 
 ;;;###diary-autoload
@@ -288,9 +273,6 @@ window.  See `diary-islamic-list-entries' for more information."
                         diary-islamic-entry-symbol
                         'calendar-islamic-from-absolute))
 
-(define-obsolete-function-alias
-  'mark-islamic-diary-entries 'diary-islamic-mark-entries "23.1")
-
 (autoload 'diary-insert-entry-1 "diary-lib")
 
 ;;;###cal-autoload
@@ -303,9 +285,6 @@ Prefix argument ARG makes the entry nonmarking."
                         diary-islamic-entry-symbol
                         'calendar-islamic-from-absolute))
 
-(define-obsolete-function-alias 'insert-islamic-diary-entry
-  'diary-islamic-insert-entry "23.1")
-
 ;;;###cal-autoload
 (defun diary-islamic-insert-monthly-entry (arg)
   "Insert a monthly diary entry.
@@ -316,9 +295,6 @@ Prefix argument ARG makes the entry nonmarking."
                         diary-islamic-entry-symbol
                         'calendar-islamic-from-absolute))
 
-(define-obsolete-function-alias 'insert-monthly-islamic-diary-entry
-  'diary-islamic-insert-monthly-entry "23.1")
-
 ;;;###cal-autoload
 (defun diary-islamic-insert-yearly-entry (arg)
   "Insert an annual diary entry.
@@ -328,8 +304,6 @@ Prefix argument ARG makes the entry nonmarking."
   (diary-insert-entry-1 'yearly arg calendar-islamic-month-name-array
                         diary-islamic-entry-symbol
                         'calendar-islamic-from-absolute))
-(define-obsolete-function-alias
-  'insert-yearly-islamic-diary-entry 'diary-islamic-insert-yearly-entry "23.1")
 
 (defvar date)
 
index 31626e4c02c109d37b913ddefa98f573cccf0ce8..88527cf68cc4e643155731d048cfcc195e1dc4ac 100644 (file)
@@ -47,9 +47,6 @@ Sunday).  The Gregorian date Sunday, December 31, 1 BC is imaginary."
        (* 7 (1- (calendar-extract-month date)))
        (if (zerop day) 6 (1- day)))))
 
-(define-obsolete-function-alias 'calendar-absolute-from-iso
-  'calendar-iso-to-absolute "23.1")
-
 ;;;###cal-autoload
 (defun calendar-iso-from-absolute (date)
   "Compute the `ISO commercial date' corresponding to the absolute DATE.
@@ -91,9 +88,6 @@ date Sunday, December 31, 1 BC."
   (message "ISO date: %s"
            (calendar-iso-date-string (calendar-cursor-to-date t))))
 
-(define-obsolete-function-alias 'calendar-print-iso-date
-  'calendar-iso-print-date "23.1")
-
 (defun calendar-iso-read-date (&optional dayflag)
   "Interactively read the arguments for an ISO date command.
 Reads a year and week, and if DAYFLAG is non-nil a day (otherwise
@@ -118,9 +112,6 @@ taken to be 1)."
                 1)))
     (list (list week day year))))
 
-(define-obsolete-function-alias 'calendar-iso-read-args
-  'calendar-iso-read-date "23.1")
-
 ;;;###cal-autoload
 (defun calendar-iso-goto-date (date &optional noecho)
   "Move cursor to ISO DATE; echo ISO date unless NOECHO is non-nil."
@@ -129,9 +120,6 @@ taken to be 1)."
                        (calendar-iso-to-absolute date)))
   (or noecho (calendar-iso-print-date)))
 
-(define-obsolete-function-alias 'calendar-goto-iso-date
-  'calendar-iso-goto-date "23.1")
-
 ;;;###cal-autoload
 (defun calendar-iso-goto-week (date &optional noecho)
   "Move cursor to ISO DATE; echo ISO date unless NOECHO is non-nil.
@@ -141,9 +129,6 @@ Interactively, goes to the first day of the specified week."
                        (calendar-iso-to-absolute date)))
   (or noecho (calendar-iso-print-date)))
 
-(define-obsolete-function-alias 'calendar-goto-iso-week
-  'calendar-iso-goto-week "23.1")
-
 (defvar date)
 
 ;; To be called from diary-list-sexp-entries, where DATE is bound.
index 2953b1b7a8440b0dd01e062e253a074ebd7122a8..481f987b29b90ef20fd3d9cf64332f6608b4d78a 100644 (file)
@@ -45,9 +45,6 @@ The Gregorian date Sunday, December 31, 1 BC is imaginary."
        (/ (1- year) 4)
        -2)))
 
-(define-obsolete-function-alias 'calendar-absolute-from-julian
-  'calendar-julian-to-absolute "23.1")
-
 ;;;###cal-autoload
 (defun calendar-julian-from-absolute (date)
   "Compute the Julian (month day year) corresponding to the absolute DATE.
@@ -93,9 +90,6 @@ Driven by the variable `calendar-date-display-form'."
   (message "Julian date: %s"
            (calendar-julian-date-string (calendar-cursor-to-date t))))
 
-(define-obsolete-function-alias 'calendar-print-julian-date
-  'calendar-julian-print-date "23.1")
-
 ;;;###cal-autoload
 (defun calendar-julian-goto-date (date &optional noecho)
   "Move cursor to Julian DATE; echo Julian date unless NOECHO is non-nil."
@@ -132,9 +126,6 @@ Driven by the variable `calendar-date-display-form'."
                        (calendar-julian-to-absolute date)))
   (or noecho (calendar-julian-print-date)))
 
-(define-obsolete-function-alias 'calendar-goto-julian-date
-  'calendar-julian-goto-date "23.1")
-
 ;;;###holiday-autoload
 (defun holiday-julian (month day string)
   "Holiday on MONTH, DAY (Julian) called STRING.
@@ -156,9 +147,6 @@ nil if it is not visible in the current calendar window."
   "Absolute date of astronomical (Julian) day number D."
   (- d 1721424.5))
 
-(define-obsolete-function-alias 'calendar-absolute-from-astro
-  'calendar-astro-to-absolute "23.1")
-
 ;;;###cal-autoload
 (defun calendar-astro-from-absolute (d)
   "Astronomical (Julian) day number of absolute date D."
@@ -181,9 +169,6 @@ Defaults to today's date if DATE is not given."
    "Astronomical (Julian) day number (at noon UTC): %s.0"
    (calendar-astro-date-string (calendar-cursor-to-date t))))
 
-(define-obsolete-function-alias 'calendar-print-astro-day-number
-  'calendar-astro-print-day-number "23.1")
-
 ;;;###cal-autoload
 (defun calendar-astro-goto-day-number (daynumber &optional noecho)
   "Move cursor to astronomical (Julian) DAYNUMBER.
@@ -197,8 +182,6 @@ Echo astronomical (Julian) day number unless NOECHO is non-nil."
      (calendar-astro-to-absolute daynumber))))
   (or noecho (calendar-astro-print-day-number)))
 
-(define-obsolete-function-alias 'calendar-goto-astro-day-number
-  'calendar-astro-goto-day-number "23.1")
 
 (defvar date)
 
index 81b71d5b3adf0d29e298f3218f7a98e529bc85a0..17a016562203e9801ae97e5384b91721ef33b811 100644 (file)
@@ -132,9 +132,6 @@ but some use 1137140.  Using 1232041 gives you Spinden's correlation; using
   (message "Mayan date: %s"
            (calendar-mayan-date-string (calendar-cursor-to-date t))))
 
-(define-obsolete-function-alias 'calendar-print-mayan-date
-  'calendar-mayan-print-date "23.1")
-
 (defun calendar-mayan-read-haab-date ()
   "Prompt for a Mayan haab date."
   (let* ((completion-ignore-case t)
@@ -179,9 +176,6 @@ Echo Mayan date unless NOECHO is non-nil."
         (calendar-absolute-from-gregorian (calendar-cursor-to-date))))))
   (or noecho (calendar-mayan-print-date)))
 
-(define-obsolete-function-alias 'calendar-next-haab-date
-  'calendar-mayan-next-haab-date "23.1")
-
 ;;;###cal-autoload
 (defun calendar-mayan-previous-haab-date (haab-date &optional noecho)
   "Move cursor to previous instance of Mayan HAAB-DATE.
@@ -194,9 +188,6 @@ Echo Mayan date unless NOECHO is non-nil."
      (1- (calendar-absolute-from-gregorian (calendar-cursor-to-date))))))
   (or noecho (calendar-mayan-print-date)))
 
-(define-obsolete-function-alias 'calendar-previous-haab-date
-  'calendar-mayan-previous-haab-date "23.1")
-
 (defun calendar-mayan-haab-to-string (haab)
   "Convert Mayan HAAB date (a pair) into its traditional written form."
   (let ((month (cdr haab)))
@@ -247,9 +238,6 @@ Echo Mayan date unless NOECHO is non-nil."
         (calendar-absolute-from-gregorian (calendar-cursor-to-date))))))
   (or noecho (calendar-mayan-print-date)))
 
-(define-obsolete-function-alias 'calendar-next-tzolkin-date
-  'calendar-mayan-next-tzolkin-date "23.1")
-
 ;;;###cal-autoload
 (defun calendar-mayan-previous-tzolkin-date (tzolkin-date &optional noecho)
   "Move cursor to previous instance of Mayan TZOLKIN-DATE.
@@ -262,9 +250,6 @@ Echo Mayan date unless NOECHO is non-nil."
      (1- (calendar-absolute-from-gregorian (calendar-cursor-to-date))))))
   (or noecho (calendar-mayan-print-date)))
 
-(define-obsolete-function-alias 'calendar-previous-tzolkin-date
-  'calendar-mayan-previous-tzolkin-date "23.1")
-
 (defun calendar-mayan-tzolkin-to-string (tzolkin)
   "Convert Mayan TZOLKIN date (a pair) into its traditional written form."
   (format "%d %s"
@@ -309,9 +294,6 @@ Echo Mayan date unless NOECHO is non-nil."
       (calendar-goto-date (calendar-gregorian-from-absolute date))
       (or noecho (calendar-mayan-print-date)))))
 
-(define-obsolete-function-alias 'calendar-next-calendar-round-date
-  'calendar-mayan-next-round-date "23.1")
-
 ;;;###cal-autoload
 (defun calendar-mayan-previous-round-date
   (tzolkin-date haab-date &optional noecho)
@@ -330,9 +312,6 @@ Echo Mayan date unless NOECHO is non-nil."
       (calendar-goto-date (calendar-gregorian-from-absolute date))
       (or noecho (calendar-mayan-print-date)))))
 
-(define-obsolete-function-alias 'calendar-previous-calendar-round-date
-  'calendar-mayan-previous-round-date "23.1")
-
 (defun calendar-mayan-long-count-to-absolute (c)
   "Compute the absolute date corresponding to the Mayan Long Count C.
 Long count is a list (baktun katun tun uinal kin)"
@@ -344,9 +323,6 @@ Long count is a list (baktun katun tun uinal kin)"
      ;; Days before absolute date 0.
      (- calendar-mayan-days-before-absolute-zero)))
 
-(define-obsolete-function-alias 'calendar-absolute-from-mayan-long-count
-  'calendar-mayan-long-count-to-absolute "23.1")
-
 (defun calendar-mayan-long-count-common-era (lc)
   "Return non-nil if long count LC represents a date in the Common Era."
   (let ((base (calendar-mayan-long-count-from-absolute 1)))
@@ -377,9 +353,6 @@ Echo Mayan date unless NOECHO is non-nil."
     (calendar-mayan-long-count-to-absolute date)))
   (or noecho (calendar-mayan-print-date)))
 
-(define-obsolete-function-alias 'calendar-goto-mayan-long-count-date
-  'calendar-mayan-goto-long-count-date "23.1")
-
 (defvar date)
 
 ;; To be called from diary-list-sexp-entries, where DATE is bound.
index e71fccf19bca192747c1401b679e54634436426c..df16646cc26cf2ac672f8a7367fd690bd5b27f2b 100644 (file)
      ["One time" diary-bahai-insert-entry]
      ["Monthly" diary-bahai-insert-monthly-entry]
      ["Yearly" diary-bahai-insert-yearly-entry])
+    ("Insert Chinese"
+     ["One time" diary-chinese-insert-entry]
+     ["Monthly" diary-chinese-insert-monthly-entry]
+     ["Yearly" diary-chinese-insert-yearly-entry]
+     ["Anniversary" diary-chinese-insert-anniversary-entry])
     ("Insert Islamic"
      ["One time" diary-islamic-insert-entry]
      ["Monthly" diary-islamic-insert-monthly-entry]
@@ -273,14 +278,6 @@ is non-nil."
     ["Show diary" diary-show-all-entries]
     ["Exit calendar" calendar-exit]))
 
-;; Undocumented and probably useless.
-(defvar cal-menu-load-hook nil
-  "Hook run on loading of the `cal-menu' package.")
-(make-obsolete-variable 'cal-menu-load-hook
-                        "it will be removed in future." "23.1")
-
-(run-hooks 'cal-menu-load-hook)
-
 (provide 'cal-menu)
 
 ;; Local Variables:
index 5410ff79ff47d25dfc4029af725f41cbafdddf0b..a72f188f37e8d1b884ade37f79a446a4433a7cdf 100644 (file)
@@ -175,9 +175,6 @@ EVENT is an event like `last-nonmenu-event'."
           (t (list month 1 year))))))
     (run-hooks 'calendar-move-hook)))
 
-(define-obsolete-function-alias
-  'scroll-calendar-left 'calendar-scroll-left "23.1")
-
 ;;;###cal-autoload
 (defun calendar-scroll-right (&optional arg event)
   "Scroll the displayed calendar window right by ARG months.
@@ -188,9 +185,6 @@ EVENT is an event like `last-nonmenu-event'."
                      last-nonmenu-event))
   (calendar-scroll-left (- (or arg 1)) event))
 
-(define-obsolete-function-alias
-  'scroll-calendar-right 'calendar-scroll-right "23.1")
-
 ;;;###cal-autoload
 (defun calendar-scroll-left-three-months (arg &optional event)
   "Scroll the displayed calendar window left by 3*ARG months.
@@ -201,9 +195,6 @@ EVENT is an event like `last-nonmenu-event'."
                      last-nonmenu-event))
   (calendar-scroll-left (* 3 arg) event))
 
-(define-obsolete-function-alias 'scroll-calendar-left-three-months
-  'calendar-scroll-left-three-months "23.1")
-
 ;; cf scroll-bar-toolkit-scroll
 ;;;###cal-autoload
 (defun calendar-scroll-toolkit-scroll (event)
@@ -226,9 +217,6 @@ EVENT is an event like `last-nonmenu-event'."
                      last-nonmenu-event))
   (calendar-scroll-left (* -3 arg) event))
 
-(define-obsolete-function-alias 'scroll-calendar-right-three-months
-  'calendar-scroll-right-three-months "23.1")
-
 ;;;###cal-autoload
 (defun calendar-forward-day (arg)
   "Move the cursor forward ARG days.
index c79c3f94420ff234bf63d89b7fdb66f729dbbbac..1a69ade82daaae0b932ed70d54d3a92b7298f6ab 100644 (file)
@@ -87,9 +87,6 @@ Gregorian date Sunday, December 31, 1 BC."
           (calendar-persian-last-day-of-month m year))
          day))))                        ; days so far this month
 
-(define-obsolete-function-alias 'calendar-absolute-from-persian
-  'calendar-persian-to-absolute "23.1")
-
 (defun calendar-persian-year-from-absolute (date)
   "Persian year corresponding to the absolute DATE."
   (let* ((d0                   ; prior days since start of 2820 cycles
@@ -163,9 +160,6 @@ Gregorian date Sunday, December 31, 1 BC."
   (message "Persian date: %s"
            (calendar-persian-date-string (calendar-cursor-to-date t))))
 
-(define-obsolete-function-alias 'calendar-print-persian-date
-  'calendar-persian-print-date "23.1")
-
 (defun calendar-persian-read-date ()
   "Interactively read the arguments for a Persian date command.
 Reads a year, month, and day."
@@ -192,9 +186,6 @@ Reads a year, month, and day."
                (lambda (x) (and (< 0 x) (<= x last))))))
     (list (list month day year))))
 
-(define-obsolete-function-alias 'persian-prompt-for-date
-  'calendar-persian-read-date "23.1")
-
 ;;;###cal-autoload
 (defun calendar-persian-goto-date (date &optional noecho)
   "Move cursor to Persian date DATE.
@@ -204,8 +195,6 @@ Echo Persian date unless NOECHO is non-nil."
                        (calendar-persian-to-absolute date)))
   (or noecho (calendar-persian-print-date)))
 
-(define-obsolete-function-alias 'calendar-goto-persian-date
-  'calendar-persian-goto-date "23.1")
 
 (defvar date)
 
index 6c03a774d0adc8d77f232cb3773832645df1c2c1..1ed2fa4bbb06eb31e79a2fb2b78b8382a6d287f4 100644 (file)
@@ -65,9 +65,6 @@ Relevant if `calendar-setup' has the value `one-frame'."
              (vertical-scroll-bars boolean))
   :group 'calendar)
 
-(define-obsolete-variable-alias 'calendar-after-frame-setup-hooks
-  'calendar-after-frame-setup-hook "23.1")
-
 (defcustom calendar-after-frame-setup-hook nil
   "List of functions to be run after creating a calendar and/or diary frame."
   :type 'hook
@@ -96,13 +93,9 @@ Runs `calendar-after-frame-setup-hook', selects frame, iconifies if needed."
   "Display and dedicate the window associated with the diary buffer."
   (set-window-dedicated-p
    (display-buffer
-    (if (if (listp diary-display-function)
-            (or (memq 'diary-fancy-display diary-display-function)
-                (memq 'fancy-diary-display diary-display-function))
-          (memq diary-display-function '(diary-fancy-display
-                                         fancy-diary-display)))
+    (if (eq diary-display-function 'diary-fancy-display)
         (progn
-          ;; If there are no diary entries, there won't be a fancy-diary
+          ;; If there are no diary entries, there won't be a buffer
           ;; to dedicate, so make a basic one.
           (or (get-buffer diary-fancy-buffer)
               (calendar-in-read-only-buffer diary-fancy-buffer
@@ -150,36 +143,6 @@ If PROMPT is non-nil, prompt for the month and year to use."
         (if (eq config 'one-frame)
             (calendar-dedicate-diary))))))
 
-
-;;;###cal-autoload
-(defun calendar-one-frame-setup (&optional prompt)
-  "Display calendar and diary in a single dedicated frame.
-See `calendar-frame-setup' for more information."
-  (declare (obsolete calendar-frame-setup "23.1"))
-  (calendar-frame-setup 'one-frame prompt))
-
-;;;###cal-autoload
-(defun calendar-only-one-frame-setup (&optional prompt)
-  "Display calendar in a dedicated frame.
-See `calendar-frame-setup' for more information."
-  (declare (obsolete calendar-frame-setup "23.1"))
-  (calendar-frame-setup 'calendar-only prompt))
-
-;;;###cal-autoload
-(defun calendar-two-frame-setup (&optional prompt)
-  "Display calendar and diary in separate, dedicated frames.
-See `calendar-frame-setup' for more information."
-  (declare (obsolete calendar-frame-setup "23.1"))
-  (calendar-frame-setup 'two-frames prompt))
-
-;; Undocumented and probably useless.
-(defvar cal-x-load-hook nil
-  "Hook run on loading of the `cal-x' package.")
-(make-obsolete-variable 'cal-x-load-hook "it will be removed in future." "23.1")
-
-(run-hooks 'cal-x-load-hook)
-
-
 (provide 'cal-x)
 
 ;;; cal-x.el ends here
index 3fb984525790f9a04e5f4a9021aeed2a7c1ff67a..b4df4b3117658559c85493e60f1b3c533749ea98 100644 (file)
@@ -189,9 +189,6 @@ movement commands will not work correctly."
          (calendar-redraw))
   :group 'calendar)
 
-(define-obsolete-variable-alias 'view-diary-entries-initially
-  'calendar-view-diary-initially-flag "23.1")
-
 (defcustom calendar-view-diary-initially-flag nil
   "Non-nil means display current date's diary entries on entry to calendar.
 The diary is displayed in another window when the calendar is first displayed,
@@ -201,9 +198,6 @@ be overridden by the value of `calendar-setup'."
   :type 'boolean
   :group 'diary)
 
-(define-obsolete-variable-alias 'mark-diary-entries-in-calendar
-  'calendar-mark-diary-entries-flag "23.1")
-
 ;; FIXME :set
 (defcustom calendar-mark-diary-entries-flag nil
   "Non-nil means mark dates with diary entries, in the calendar window.
@@ -225,8 +219,6 @@ If nil, make an icon of the frame.  If non-nil, delete the frame."
 See the variable `calendar-today-marker'."
   :group 'calendar-faces)
 
-(define-obsolete-face-alias 'calendar-today-face 'calendar-today "22.1")
-
 (defface diary
   '((((min-colors 88) (class color) (background light))
      :foreground "red1")
@@ -243,8 +235,6 @@ Used to mark diary entries in the calendar (see `diary-entry-marker'),
 and to highlight the date header in the fancy diary."
   :group 'calendar-faces)
 
-(define-obsolete-face-alias 'diary-face 'diary "22.1")
-
 (defface holiday
   '((((class color) (background light))
      :background "pink")
@@ -256,8 +246,6 @@ and to highlight the date header in the fancy diary."
 See `calendar-holiday-marker'."
   :group 'calendar-faces)
 
-(define-obsolete-face-alias 'holiday-face 'holiday "22.1")
-
 (defface calendar-weekday-header '((t :inherit font-lock-constant-face))
   "Face used for weekday column headers in the calendar.
 See also the face `calendar-weekend-header'."
@@ -307,9 +295,6 @@ The value can be either a single-character string (e.g. \"*\") or a face."
   :group 'holidays
   :version "23.1")
 
-(define-obsolete-variable-alias 'view-calendar-holidays-initially
-  'calendar-view-holidays-initially-flag "23.1")
-
 (defcustom calendar-view-holidays-initially-flag nil
   "Non-nil means display holidays for current three month period on entry.
 The holidays are displayed in another window when the calendar is first
@@ -317,9 +302,6 @@ displayed."
   :type 'boolean
   :group 'holidays)
 
-(define-obsolete-variable-alias 'mark-holidays-in-calendar
-  'calendar-mark-holidays-flag "23.1")
-
 ;; FIXME :set
 (defcustom calendar-mark-holidays-flag nil
   "Non-nil means mark dates of holidays in the calendar window.
@@ -338,9 +320,6 @@ This is the place to add key bindings to `calendar-mode-map'."
   :type 'hook
   :group 'calendar-hooks)
 
-(define-obsolete-variable-alias 'initial-calendar-window-hook
-  'calendar-initial-window-hook "23.1")
-
 (defcustom calendar-initial-window-hook nil
   "List of functions to be called when the calendar window is created.
 Quitting the calendar and re-entering it will cause these functions
@@ -348,9 +327,6 @@ to be called again."
   :type 'hook
   :group 'calendar-hooks)
 
-(define-obsolete-variable-alias 'today-visible-calendar-hook
-  'calendar-today-visible-hook "23.1")
-
 (defcustom calendar-today-visible-hook nil
   "List of functions called whenever the current date is visible.
 To mark today's date, add the function `calendar-mark-today'.
@@ -363,9 +339,6 @@ since it may cause the movement commands to fail."
   :options '(calendar-mark-today calendar-star-date)
   :group 'calendar-hooks)
 
-(define-obsolete-variable-alias 'today-invisible-calendar-hook
-  'calendar-today-invisible-hook "23.1")
-
 (defcustom calendar-today-invisible-hook nil
   "List of functions called whenever the current date is not visible.
 See also `calendar-today-visible-hook'."
@@ -688,54 +661,28 @@ details, see the documentation for the variable `diary-list-entries-hook'."
   :type 'string
   :group 'diary)
 
-(define-obsolete-variable-alias 'hebrew-diary-entry-symbol
-  'diary-hebrew-entry-symbol "23.1")
+(defcustom diary-chinese-entry-symbol "C"
+  "Symbol indicating a diary entry according to the Chinese calendar."
+  :type 'string
+  :group 'diary
+  :version "25.1")
 
 (defcustom diary-hebrew-entry-symbol "H"
   "Symbol indicating a diary entry according to the Hebrew calendar."
   :type 'string
   :group 'diary)
 
-(define-obsolete-variable-alias 'islamic-diary-entry-symbol
-  'diary-islamic-entry-symbol "23.1")
-
 (defcustom diary-islamic-entry-symbol "I"
   "Symbol indicating a diary entry according to the Islamic calendar."
   :type 'string
   :group 'diary)
 
-(define-obsolete-variable-alias 'bahai-diary-entry-symbol
-  'diary-bahai-entry-symbol "23.1")
-
 (defcustom diary-bahai-entry-symbol "B"
   "Symbol indicating a diary entry according to the Bahá'í calendar."
   :type 'string
   :group 'diary)
 
-(defcustom european-calendar-style nil
-  "Non-nil means use the European style of dates in the diary and display.
-In this case, a date like 1/2/1990 would be interpreted as
-February 1, 1990.  See `diary-european-date-forms' for the
-default European diary date styles.
-
-Setting this variable directly does not take effect (if the
-calendar package is already loaded).  Rather, use either
-\\[customize] or the function `calendar-set-date-style'."
-  :type 'boolean
-  ;; Without :initialize (require 'calendar) throws an error because
-  ;; calendar-set-date-style is undefined at this point.
-  :initialize 'custom-initialize-default
-  :set (lambda (symbol value)
-         (if value
-             (calendar-set-date-style 'european)
-           (calendar-set-date-style 'american)))
-  :group 'calendar)
-
-(make-obsolete-variable 'european-calendar-style 'calendar-date-style "23.1")
-
-;; If this is autoloaded, c-d-s gets set before any customization of e-c-s.
-(defcustom calendar-date-style (if european-calendar-style 'european
-                                 'american)
+(defcustom calendar-date-style 'american
   "Your preferred style for writing dates.
 The options are:
 `american' - month/day/year
@@ -784,9 +731,6 @@ but `diary-date-forms' (which see)."
                                        (choice symbol regexp)))))
     :group 'diary)
 
-(define-obsolete-variable-alias 'american-date-diary-pattern
-  'diary-american-date-forms "23.1")
-
 (defcustom diary-american-date-forms
   '((month "/" day "[^/0-9]")
     (month "/" day "/" year "[^0-9]")
@@ -808,9 +752,6 @@ but `diary-date-forms' (which see)."
                                        (choice symbol regexp)))))
   :group 'diary)
 
-(define-obsolete-variable-alias 'european-date-diary-pattern
-  'diary-european-date-forms "23.1")
-
 (defcustom diary-european-date-forms
   '((day "/" month "[^/0-9]")
     (day "/" month "/" year "[^0-9]")
@@ -900,9 +841,6 @@ Normally you should not customize this, but `calendar-date-display-form'
   :version "23.1"
   :group 'calendar)
 
-(define-obsolete-variable-alias 'european-calendar-display-form
-  'calendar-european-date-display-form "23.1")
-
 (defcustom calendar-european-date-display-form
   '((if dayname (concat dayname ", ")) day " " monthname " " year)
   "Pseudo-pattern governing the way a date appears in the European style.
@@ -911,9 +849,6 @@ Normally you should not customize this, but `calendar-date-display-form'
   :type 'sexp
   :group 'calendar)
 
-(define-obsolete-variable-alias 'american-calendar-display-form
-  'calendar-american-date-display-form "23.1")
-
 (defcustom calendar-american-date-display-form
   '((if dayname (concat dayname ", ")) monthname " " day ", " year)
   "Pseudo-pattern governing the way a date appears in the American style.
@@ -1028,21 +963,6 @@ The valid styles are described in the documentation of `calendar-date-style'."
   (calendar-redraw)
   (calendar-update-mode-line))
 
-(defun european-calendar ()
-  "Set the interpretation and display of dates to the European style."
-  (declare (obsolete calendar-set-date-style "23.1"))
-  (interactive)
-  (calendar-set-date-style 'european))
-
-(defun american-calendar ()
-  "Set the interpretation and display of dates to the American style."
-  (declare (obsolete calendar-set-date-style "23.1"))
-  (interactive)
-  (calendar-set-date-style 'american))
-
-(define-obsolete-variable-alias 'holidays-in-diary-buffer
-  'diary-show-holidays-flag "23.1")
-
 (defcustom diary-show-holidays-flag t
   "Non-nil means include holidays in the diary display.
 The holidays appear in the mode line of the diary buffer, or in the
@@ -1056,9 +976,6 @@ somewhat; setting it to nil makes the diary display faster."
   :type 'boolean
   :group 'calendar)
 
-(define-obsolete-variable-alias 'all-hebrew-calendar-holidays
-  'calendar-hebrew-all-holidays-flag "23.1")
-
 (defcustom calendar-hebrew-all-holidays-flag nil
   "If nil, show only major holidays from the Hebrew calendar.
 This means only those Jewish holidays that appear on secular calendars.
@@ -1067,9 +984,6 @@ calendar."
   :type 'boolean
   :group 'holidays)
 
-(define-obsolete-variable-alias 'all-christian-calendar-holidays
-  'calendar-christian-all-holidays-flag "23.1")
-
 (defcustom calendar-christian-all-holidays-flag nil
   "If nil, show only major holidays from the Christian calendar.
 This means only those Christian holidays that appear on secular calendars.
@@ -1078,9 +992,6 @@ calendar."
   :type 'boolean
   :group 'holidays)
 
-(define-obsolete-variable-alias 'all-islamic-calendar-holidays
-  'calendar-islamic-all-holidays-flag "23.1")
-
 (defcustom calendar-islamic-all-holidays-flag nil
   "If nil, show only major holidays from the Islamic calendar.
 This means only those Islamic holidays that appear on secular calendars.
@@ -1089,9 +1000,6 @@ calendar."
   :type 'boolean
   :group 'holidays)
 
-(define-obsolete-variable-alias 'all-bahai-calendar-holidays
-  'calendar-bahai-all-holidays-flag "23.1")
-
 (defcustom calendar-bahai-all-holidays-flag nil
   "If nil, show only major holidays from the Bahá'í calendar.
 These are the days on which work and school must be suspended.
@@ -1122,8 +1030,6 @@ calendar."
 (defconst diary-fancy-buffer "*Fancy Diary Entries*"
   "Name of the buffer used for the optional fancy display of the diary.")
 
-(define-obsolete-variable-alias 'fancy-diary-buffer 'diary-fancy-buffer "23.1")
-
 (defconst calendar-other-calendars-buffer "*Other Calendars*"
   "Name of the buffer used for the display of date on other calendars.")
 
@@ -1156,9 +1062,6 @@ Optional NMONTHS is the number of months per year (default 12)."
      (and (< macro-y 0) (> ,mon 1) (setq ,yr (1- ,yr)))
      (if (< ,yr 1) (setq ,yr (1- ,yr))))) ; 0 AD -> -1 BC, etc
 
-(define-obsolete-function-alias 'increment-calendar-month
-  'calendar-increment-month "23.1")
-
 (defvar displayed-month)
 (defvar displayed-year)
 
@@ -1171,17 +1074,6 @@ MON defaults to `displayed-month'.  YR defaults to `displayed-year'."
   (calendar-increment-month mon yr n)
   (cons mon yr))
 
-(defmacro calendar-for-loop (var from init to final do &rest body)
-  "Execute a for loop.
-Evaluate BODY with VAR bound to successive integers from INIT to FINAL,
-inclusive.  The standard macro `dotimes' is preferable in most cases."
-  (declare (obsolete "use `dotimes' or `while' instead." "23.1")
-          (debug (symbolp "from" form "to" form "do" body))
-           (indent defun))
-  `(let ((,var (1- ,init)))
-    (while (>= ,final (setq ,var (1+ ,var)))
-      ,@body)))
-
 (defmacro calendar-sum (index initial condition expression)
   "For INDEX = INITIAL, +1, ... (as long as CONDITION holds), sum EXPRESSION."
   (declare (debug (symbolp form form form)))
@@ -1241,25 +1133,16 @@ with disabled undo.  Leaves point at point-min, displays BUFFER."
   "Extract the month part of DATE which has the form (month day year)."
   (car date))
 
-(define-obsolete-function-alias 'extract-calendar-month
-  'calendar-extract-month "23.1")
-
 ;; Note gives wrong answer for result of (calendar-read-date 'noday),
 ;; but that is only used by `calendar-other-month'.
 (defsubst calendar-extract-day (date)
   "Extract the day part of DATE which has the form (month day year)."
   (cadr date))
 
-(define-obsolete-function-alias 'extract-calendar-day
-  'calendar-extract-day "23.1")
-
 (defsubst calendar-extract-year (date)
   "Extract the year part of DATE which has the form (month day year)."
   (nth 2 date))
 
-(define-obsolete-function-alias 'extract-calendar-year
-  'calendar-extract-year "23.1")
-
 (defsubst calendar-leap-year-p (year)
   "Return t if YEAR is a Gregorian leap year.
 A negative year is interpreted as BC; -1 being 1 BC, and so on."
@@ -1417,10 +1300,16 @@ display the generated calendar."
         ;; the right thing in that case.
         ;;
         ;; Is this a wide frame?  If so, split it horizontally.
-        (if (window-splittable-p t) (split-window-right))
+
+       ;; The following doesn't sound useful: If we split horizontally
+       ;; here, the subsequent `pop-to-buffer' will likely split again
+       ;; horizontally and we end up with three side-by-side windows.
+        (when (window-splittable-p (selected-window) t)
+         (split-window-right))
         (pop-to-buffer calendar-buffer)
         ;; Has the window already been split vertically?
         (when (and (not (window-dedicated-p))
+                  (window-splittable-p (selected-window))
                    (window-full-height-p))
           (let ((win (split-window-below)))
             ;; In the upper window, show whatever was visible before.
@@ -1438,7 +1327,7 @@ display the generated calendar."
                  '(nil . ((inhibit-same-window . t)))))
             (diary-view-entries)))))
   (if calendar-view-holidays-initially-flag
-      (let* ((diary-buffer (get-file-buffer diary-file))
+      (let* ((diary-buffer (diary-live-p))
              (diary-window (if diary-buffer (get-buffer-window diary-buffer)))
              (split-height-threshold (if diary-window 2 1000)))
         ;; FIXME display buffer?
@@ -1472,17 +1361,15 @@ Optional integers MON and YR are used instead of today's date."
        ;; combined don't fit height to that of its buffer.
        (set-window-vscroll nil 0))
       (sit-for 0))
-    (and (bound-and-true-p font-lock-mode)
-         (font-lock-fontify-buffer))
     (and calendar-mark-holidays-flag
-;;;         (calendar-date-is-valid-p today) ; useful for BC dates
+         ;; (calendar-date-is-valid-p today) ; useful for BC dates
          (calendar-mark-holidays)
          (and in-calendar-window (sit-for 0)))
     (unwind-protect
         (if calendar-mark-diary-entries-flag (diary-mark-entries))
-      (if today-visible
-          (run-hooks 'calendar-today-visible-hook)
-        (run-hooks 'calendar-today-invisible-hook)))))
+      (run-hooks (if today-visible
+                     'calendar-today-visible-hook
+                   'calendar-today-invisible-hook)))))
 
 (defun calendar-generate (month year)
   "Generate a three-month Gregorian calendar centered around MONTH, YEAR."
@@ -1713,6 +1600,10 @@ line."
     (define-key map "iBd" 'diary-bahai-insert-entry)
     (define-key map "iBm" 'diary-bahai-insert-monthly-entry)
     (define-key map "iBy" 'diary-bahai-insert-yearly-entry)
+    (define-key map "iCd" 'diary-chinese-insert-entry)
+    (define-key map "iCm" 'diary-chinese-insert-monthly-entry)
+    (define-key map "iCy" 'diary-chinese-insert-yearly-entry)
+    (define-key map "iCa" 'diary-chinese-insert-anniversary-entry)
     (define-key map "?"   'calendar-goto-info-node)
     (define-key map "Hm" 'cal-html-cursor-month)
     (define-key map "Hy" 'cal-html-cursor-year)
@@ -1790,14 +1681,18 @@ is COMMAND's keybinding, STRING describes the binding."
                               nil "today"))
    '(calendar-date-string (calendar-current-date) t)
    (calendar-mode-line-entry 'calendar-scroll-left "next month" ">"))
-  "The mode line of the calendar buffer.
+  "If non-nil, the mode line of the calendar buffer.
 This is a list of items that evaluate to strings.  The elements
 are evaluated and concatenated, evenly separated by blanks.
 During evaluation, the variable `date' is available as the date
 nearest the cursor (or today's date if that fails).  To update
-the mode-line as the cursor moves, add `calendar-update-mode-line'
-to `calendar-move-hook'.  Here is an example that has the Hebrew date,
-the day number/days remaining in the year, and the ISO week/year numbers:
+the mode-line as the cursor moves, add
+`calendar-update-mode-line' to `calendar-move-hook'.
+
+If nil, do not modify the mode line at all.
+
+Here is an example that has the Hebrew date, the day number/days
+remaining in the year, and the ISO week/year numbers:
 
   (list
    \"\"
@@ -1875,7 +1770,8 @@ the STRINGS are just concatenated and the result truncated."
 
 (defun calendar-update-mode-line ()
   "Update the calendar mode line with the current date and date style."
-  (if (bufferp (get-buffer calendar-buffer))
+  (if (and calendar-mode-line-format
+           (bufferp (get-buffer calendar-buffer)))
       (with-current-buffer calendar-buffer
         (let ((start (- calendar-left-margin 2))
               (date (condition-case nil
@@ -1923,8 +1819,6 @@ the STRINGS are just concatenated and the result truncated."
         (dolist (b calendar-buffers)
           (quit-windows-on b kill))))))
 
-(define-obsolete-function-alias 'exit-calendar 'calendar-exit "23.1")
-
 (defun calendar-current-date (&optional offset)
   "Return the current date in a list (month day year).
 Optional integer OFFSET is a number of days from the current date."
@@ -2477,9 +2371,6 @@ Returns the corresponding Gregorian date."
          ;; Note there are side effects on calendar navigation.
          (<= 1 year))))
 
-(define-obsolete-function-alias 'calendar-date-is-legal-p
-    'calendar-date-is-valid-p "23.1")
-
 (defun calendar-date-equal (date1 date2)
   "Return t if the DATE1 and DATE2 are the same."
   (and
@@ -2552,9 +2443,6 @@ MARK defaults to `diary-entry-marker'."
              (make-overlay (1- (point)) (1+ (point))) 'face
              (calendar-make-temp-face mark))))))))
 
-(define-obsolete-function-alias 'mark-visible-calendar-date
-  'calendar-mark-visible-date "23.1")
-
 (defun calendar-star-date ()
   "Replace the date under the cursor in the calendar window with asterisks.
 You might want to add this function to `calendar-today-visible-hook'."
@@ -2729,8 +2617,6 @@ If called by a mouse-event, pops up a menu with the result."
                 "---")
             (calendar-string-spread (list str) ?- width)))))
 
-(define-obsolete-function-alias 'calendar-version 'emacs-version "23.1")
-
 (run-hooks 'calendar-load-hook)
 
 (provide 'calendar)
index 7b07f4f6814d4782ae50e2e2812735b47dca8e00..39ba6f4617e4c4ae52e34302153c63812f7f6cc1 100644 (file)
@@ -48,13 +48,6 @@ are holidays."
   :type 'boolean
   :group 'diary)
 
-(defcustom diary-face 'diary
-  "Face name to use for diary entries."
-  :type 'face
-  :group 'calendar-faces)
-(make-obsolete-variable 'diary-face "customize the face `diary' instead."
-                        "23.1")
-
 (defface diary-anniversary '((t :inherit font-lock-keyword-face))
   "Face used for anniversaries in the fancy diary display."
   :version "22.1"
@@ -71,8 +64,6 @@ are holidays."
   :version "22.1"
   :group 'calendar-faces)
 
-(define-obsolete-face-alias 'diary-button-face 'diary-button "22.1")
-
 ;; Face markup of calendar and diary displays: Any entry line that
 ;; ends with [foo:value] where foo is a face attribute (except :box
 ;; :stipple) or with [face:blah] tags, will have these values applied
@@ -132,9 +123,6 @@ are: `string', `symbol', `int', `tnil', `stringtnil.'"
   :type 'function
   :group 'diary)
 
-(define-obsolete-variable-alias 'sexp-diary-entry-symbol
-  'diary-sexp-entry-symbol "23.1")
-
 (defcustom diary-sexp-entry-symbol "%%"
   "The string used to indicate a sexp diary entry in `diary-file'.
 See the documentation for the function `diary-list-sexp-entries'."
@@ -167,18 +155,10 @@ Used for example by the appointment package - see `appt-activate'."
   :type 'hook
   :group 'diary)
 
-(define-obsolete-variable-alias 'diary-display-hook 'diary-display-function
-  "23.1")
-
 (defcustom diary-display-function 'diary-fancy-display
   "Function used to display the diary.
 The two standard options are `diary-fancy-display' and `diary-simple-display'.
 
-For historical reasons, `nil' is the same as `diary-simple-display'
-\(so you must use `ignore' for no display).  Also for historical
-reasons, this variable can be a list of functions to run.  These
-uses are not recommended and may be removed at some point.
-
 When this function is called, the variable `diary-entries-list'
 is a list, in order by date, of all relevant diary entries in the
 form of ((MONTH DAY YEAR) STRING), where string is the diary
@@ -187,17 +167,13 @@ produce a different buffer for display (perhaps combined with
 holidays), or hard copy output."
   :type '(choice (const diary-fancy-display :tag "Fancy display")
                  (const diary-simple-display :tag "Basic display")
-                 (const ignore :tag "No display")
-                 (const nil :tag "Obsolete way to choose basic display")
-                 (hook :tag "Obsolete form with list of display functions"))
+                 (const :tag "No display" ignore)
+                 (function :tag "User-specified function"))
   :initialize 'custom-initialize-default
   :set 'diary-set-maybe-redraw
   :version "23.2"                       ; simple->fancy
   :group 'diary)
 
-(define-obsolete-variable-alias 'list-diary-entries-hook
-  'diary-list-entries-hook "23.1")
-
 (defcustom diary-list-entries-hook nil
   "Hook run after diary file is culled for relevant entries.
 
@@ -226,9 +202,6 @@ the main file and all included files, you would use the nongregorian hook."
   :options '(diary-include-other-diary-files diary-sort-entries)
   :group 'diary)
 
-(define-obsolete-variable-alias 'mark-diary-entries-hook
-  'diary-mark-entries-hook "23.1")
-
 (defcustom diary-mark-entries-hook nil
   "List of functions called after marking diary entries in the calendar.
 You might wish to add `diary-mark-included-diary-files', in which case
@@ -243,9 +216,6 @@ differ only if you are using included diary files.  In that case,
   :options '(diary-mark-included-diary-files)
   :group 'diary)
 
-(define-obsolete-variable-alias 'nongregorian-diary-listing-hook
-  'diary-nongregorian-listing-hook "23.1")
-
 (defcustom diary-nongregorian-listing-hook nil
   "List of functions called for listing diary file and included files.
 As the files are processed for diary entries, these functions are used
@@ -263,9 +233,6 @@ use `diary-list-entries-hook', which runs only for the main diary file."
              diary-islamic-list-entries)
   :group 'diary)
 
-(define-obsolete-variable-alias 'nongregorian-diary-marking-hook
-  'diary-nongregorian-marking-hook "23.1")
-
 (defcustom diary-nongregorian-marking-hook nil
   "List of functions called for marking diary file and included files.
 As the files are processed for diary entries, these functions are used
@@ -283,9 +250,6 @@ use `diary-mark-entries-hook', which runs only for the main diary file."
              diary-islamic-mark-entries)
   :group 'diary)
 
-(define-obsolete-variable-alias 'print-diary-entries-hook
-  'diary-print-entries-hook "23.1")
-
 (defcustom diary-print-entries-hook 'lpr-buffer
   "Run by `diary-print-entries' after preparing a temporary diary buffer.
 The buffer shows only the diary entries currently visible in the
@@ -333,9 +297,6 @@ expressions that can involve the keywords `days' (a number), `date'
   :type 'sexp
   :group 'diary)
 
-(define-obsolete-variable-alias 'abbreviated-calendar-year
-  'diary-abbreviated-year-flag "23.1")
-
 (defcustom diary-abbreviated-year-flag t
   "Interpret a two-digit year DD in a diary entry as either 19DD or 20DD.
 This applies to the Gregorian, Hebrew, Islamic, and Bahá'í calendars.
@@ -467,7 +428,8 @@ Only used if `diary-header-line-flag' is non-nil."
 ;; just visiting the diary-file. This is i) unlikely, and ii) no great loss.
 ;;;###cal-autoload
 (defun diary-live-p ()
-  "Return non-nil if the diary is being displayed."
+  "Return non-nil if the diary is being displayed.
+The actual return value is a diary buffer."
   (or (get-buffer diary-fancy-buffer)
       (and diary-file (find-buffer-visiting diary-file))))
 
@@ -483,9 +445,6 @@ just visiting the `diary-file'), and SYMBOL's value is to be changed."
          ;; Note this assumes diary was called without prefix arg.
          (diary))))
 
-(define-obsolete-variable-alias 'number-of-diary-entries
-  'diary-number-of-entries "23.1")
-
 (defcustom diary-number-of-entries 1
   "Specifies how many days of diary entries are to be displayed initially.
 This variable affects the diary display when the command \\[diary] is
@@ -561,10 +520,6 @@ DFILE specifies the file to use as the diary file."
   (let ((diary-file dfile))
     (diary-view-entries arg)))
 
-;;;###cal-autoload
-(define-obsolete-function-alias 'view-other-diary-entries
-  'diary-view-other-diary-entries "23.1")
-
 (defvar diary-syntax-table
   (let ((st (copy-syntax-table (standard-syntax-table))))
     (modify-syntax-entry ?* "w" st)
@@ -683,8 +638,6 @@ Also removes the region between `diary-comment-start' and
                                 (list marker dfile literal)
                                 globcolor)))))))
 
-(define-obsolete-function-alias 'add-to-diary-list 'diary-add-to-list "23.1")
-
 (defun diary-list-entries-2 (date mark globattr list-only
                                   &optional months symbol gdate)
   "Internal subroutine of `diary-list-entries'.
@@ -908,12 +861,7 @@ LIST-ONLY is non-nil, in which case it just returns the list."
                                   'display-buffer-in-previous-window
                                   (copy-sequence
                                    (car display-buffer-fallback-action))))))
-                      (if (and diary-display-function
-                               (listp diary-display-function))
-                          ;; Backwards compatibility.
-                          (run-hooks 'diary-display-function)
-                        (funcall (or diary-display-function
-                                     'diary-simple-display)))))
+                      (funcall diary-display-function)))
                   (run-hooks 'diary-hook)))))
         (and temp-buff (buffer-name temp-buff) (kill-buffer temp-buff)))
       (or d-incp (message "Preparing diary...done"))
@@ -974,9 +922,6 @@ For details, see `diary-include-files'.
 See also `diary-mark-included-diary-files'."
   (diary-include-files))
 
-(define-obsolete-function-alias 'include-other-diary-files
-  'diary-include-other-diary-files "23.1")
-
 (defvar date-string)                    ; bound in diary-list-entries
 
 (defun diary-display-no-entries ()
@@ -1035,9 +980,6 @@ in the mode line.  This is an option for `diary-display-function'."
           (set-window-point window diary-saved-point)
           (set-window-start window (point-min)))))))
 
-(define-obsolete-function-alias 'simple-diary-display
-  'diary-simple-display "23.1")
-
 (defvar diary-goto-entry-function 'diary-goto-entry
   "Function called to jump to a diary entry.
 Modes that require special handling of the included file
@@ -1164,9 +1106,6 @@ This is an option for `diary-display-function'."
         (diary-fancy-display-mode))
       (calendar-set-mode-line date-string))))
 
-(define-obsolete-function-alias 'fancy-diary-display
-  'diary-fancy-display "23.1")
-
 ;; FIXME modernize?
 (defun diary-print-entries ()
   "Print a hard copy of the diary display.
@@ -1211,9 +1150,6 @@ the actual printing."
       (run-hooks 'diary-print-entries-hook)
       (kill-buffer temp-buffer))))
 
-(define-obsolete-function-alias 'print-diary-entries
-  'diary-print-entries "23.1")
-
 ;;;###cal-autoload
 (defun diary-show-all-entries ()
   "Show all of the diary entries in the diary file.
@@ -1461,9 +1397,6 @@ marks.  This is intended to deal with deleted diary entries."
       (and temp-buff (buffer-name temp-buff) (kill-buffer temp-buff)))
     (or d-incp (message "Marking diary entries...done"))))
 
-;;;###cal-autoload
-(define-obsolete-function-alias 'mark-diary-entries 'diary-mark-entries "23.1")
-
 (defun diary-sexp-entry (sexp entry date)
   "Process a SEXP diary ENTRY for DATE."
   (let ((result (if calendar-debug-sexp
@@ -1541,9 +1474,6 @@ is marked.  See the documentation for the function `diary-list-sexp-entries'."
            (or (cadr (diary-pull-attrs entry file-glob-attrs))
                (if (consp mark) (car mark)))))))))
 
-(define-obsolete-function-alias 'mark-sexp-diary-entries
-  'diary-mark-sexp-entries "23.1")
-
 (defun diary-mark-included-diary-files ()
   "Mark diary entries from included diary files.
 To use, add this function to `diary-mark-entries-hook'.
@@ -1551,9 +1481,6 @@ For details, see `diary-include-files'.
 See also `diary-include-other-diary-files'."
   (diary-include-files t))
 
-(define-obsolete-function-alias 'mark-included-diary-files
-  'diary-mark-included-diary-files "23.1")
-
 (defun calendar-mark-days-named (dayname &optional color)
   "Mark all dates in the calendar window that are day DAYNAME of the week.
 0 means all Sundays, 1 means all Mondays, and so on.
@@ -1576,9 +1503,6 @@ Optional argument COLOR is passed to `calendar-mark-visible-date' as MARK."
                                     color)
         (setq day (+ day 7))))))
 
-(define-obsolete-function-alias 'mark-calendar-days-named
-  'calendar-mark-days-named "23.1")
-
 (defun calendar-mark-month (month year p-month p-day p-year &optional color)
   "Mark dates in the MONTH/YEAR that conform to pattern P-MONTH/P-DAY/P-YEAR.
 A value of 0 in any position of the pattern is a wildcard.
@@ -1592,9 +1516,6 @@ Optional argument COLOR is passed to `calendar-mark-visible-date' as MARK."
             (calendar-mark-visible-date (list month (1+ i) year) color))
         (calendar-mark-visible-date (list month p-day year) color))))
 
-(define-obsolete-function-alias 'mark-calendar-month
-  'calendar-mark-month "23.1")
-
 (defun calendar-mark-date-pattern (month day year &optional color)
   "Mark all dates in the calendar window that conform to MONTH/DAY/YEAR.
 A value of 0 in any position is a wildcard.  Optional argument COLOR is
@@ -1607,9 +1528,6 @@ passed to `calendar-mark-visible-date' as MARK."
         (calendar-mark-month m y month day year color)
         (calendar-increment-month m y 1)))))
 
-(define-obsolete-function-alias 'mark-calendar-date-pattern
-  'calendar-mark-date-pattern "23.1")
-
 ;; Bahai, Hebrew, Islamic.
 (defun calendar-mark-complex (month day year fromabs &optional color)
   "Mark dates in the calendar conforming to MONTH DAY YEAR of some system.
@@ -1716,8 +1634,6 @@ be the last item in the hook, in case earlier items add diary
 entries, or change the order."
   (setq diary-entries-list (sort diary-entries-list 'diary-entry-compare)))
 
-(define-obsolete-function-alias 'sort-diary-entries 'diary-sort-entries "23.1")
-
 
 (defun diary-list-sexp-entries (date)
   "Add sexp entries for DATE from the diary file to `diary-entries-list'.
@@ -1876,9 +1792,6 @@ best if they are non-marking."
       (setq entry-found (or entry-found diary-entry)))
     entry-found))
 
-(define-obsolete-function-alias 'list-sexp-diary-entries
-  'diary-list-sexp-entries "23.1")
-
 (defun diary-make-date (a b c)
   "Convert A B C into the internal calendar date form.
 The expected order of the inputs depends on `calendar-date-style',
@@ -2139,9 +2052,6 @@ If omitted, NONMARKING defaults to nil and FILE defaults to
    (if nonmarking diary-nonmarking-symbol "")
    string " "))
 
-;;;###cal-autoload
-(define-obsolete-function-alias 'make-diary-entry 'diary-make-entry "23.1")
-
 ;;;###cal-autoload
 (defun diary-insert-entry (arg &optional event)
   "Insert a diary entry for the date indicated by point.
@@ -2151,9 +2061,6 @@ Prefix argument ARG makes the entry nonmarking."
   (diary-make-entry (calendar-date-string (calendar-cursor-to-date t event) t t)
                     arg))
 
-;;;###cal-autoload
-(define-obsolete-function-alias 'insert-diary-entry 'diary-insert-entry "23.1")
-
 ;;;###cal-autoload
 (defun diary-insert-weekly-entry (arg)
   "Insert a weekly diary entry for the day of the week indicated by point.
@@ -2162,10 +2069,6 @@ Prefix argument ARG makes the entry nonmarking."
   (diary-make-entry (calendar-day-name (calendar-cursor-to-date t))
                     arg))
 
-;;;###cal-autoload
-(define-obsolete-function-alias 'insert-weekly-diary-entry
-  'diary-insert-weekly-entry "23.1")
-
 (defun diary-date-display-form (&optional type)
   "Return value for `calendar-date-display-form' using `calendar-date-style'.
 Optional symbol TYPE is either `monthly' or `yearly'."
@@ -2220,10 +2123,6 @@ Prefix argument ARG makes the entry nonmarking."
   (interactive "P")
   (diary-insert-entry-1 'monthly arg))
 
-;;;###cal-autoload
-(define-obsolete-function-alias 'insert-monthly-diary-entry
-  'diary-insert-monthly-entry "23.1")
-
 ;;;###cal-autoload
 (defun diary-insert-yearly-entry (arg)
   "Insert an annual diary entry for the day of the year indicated by point.
@@ -2231,10 +2130,6 @@ Prefix argument ARG makes the entry nonmarking."
   (interactive "P")
   (diary-insert-entry-1 'yearly arg))
 
-;;;###cal-autoload
-(define-obsolete-function-alias 'insert-yearly-diary-entry
-  'diary-insert-yearly-entry "23.1")
-
 ;;;###cal-autoload
 (defun diary-insert-anniversary-entry (arg)
   "Insert an anniversary diary entry for the date given by point.
@@ -2247,10 +2142,6 @@ Prefix argument ARG makes the entry nonmarking."
              (calendar-date-string (calendar-cursor-to-date t) nil t))
      arg)))
 
-;;;###cal-autoload
-(define-obsolete-function-alias 'insert-anniversary-diary-entry
-  'diary-insert-anniversary-entry "23.1")
-
 ;;;###cal-autoload
 (defun diary-insert-block-entry (arg)
   "Insert a block diary entry for the days between the point and marked date.
@@ -2274,10 +2165,6 @@ Prefix argument ARG makes the entry nonmarking."
              (calendar-date-string end nil t))
      arg)))
 
-;;;###cal-autoload
-(define-obsolete-function-alias 'insert-block-diary-entry
-  'diary-insert-block-entry "23.1")
-
 ;;;###cal-autoload
 (defun diary-insert-cyclic-entry (arg)
   "Insert a cyclic diary entry starting at the date given by point.
@@ -2292,10 +2179,6 @@ Prefix argument ARG makes the entry nonmarking."
              (calendar-date-string (calendar-cursor-to-date t) nil t))
      arg)))
 
-;;;###cal-autoload
-(define-obsolete-function-alias 'insert-cyclic-diary-entry
-  'diary-insert-cyclic-entry "23.1")
-
 ;;; Diary mode.
 
 (defun diary-redraw-calendar ()
@@ -2356,7 +2239,7 @@ full month names."
                        (if (equal (car x) 'backup)
                            (concat "\\)" (eval (car (reverse x))))
                          "\\)"))
-               '(1 diary-face)))
+               '(1 'diary)))
             diary-date-forms)))
 
 (defmacro diary-font-lock-keywords-1 (markfunc listfunc feature months symbol)
@@ -2381,6 +2264,7 @@ return a font-lock pattern matching array of MONTHS and marking SYMBOL."
 (defvar calendar-hebrew-month-name-array-leap-year)
 (defvar calendar-islamic-month-name-array)
 (defvar calendar-bahai-month-name-array)
+(defvar calendar-chinese-month-name-array)
 
 ;;;###cal-autoload
 (defun diary-font-lock-keywords ()
@@ -2403,6 +2287,11 @@ return a font-lock pattern matching array of MONTHS and marking SYMBOL."
                                cal-bahai
                                calendar-bahai-month-name-array
                                diary-bahai-entry-symbol)
+   (diary-font-lock-keywords-1 diary-chinese-mark-entries
+                               diary-chinese-list-entries
+                               cal-china
+                               calendar-chinese-month-name-array
+                               diary-chinese-entry-symbol)
    (list
     (cons
      (format "^%s.*$" (regexp-quote diary-include-string))
@@ -2419,7 +2308,8 @@ return a font-lock pattern matching array of MONTHS and marking SYMBOL."
              (regexp-opt (mapcar 'regexp-quote
                                  (list diary-hebrew-entry-symbol
                                        diary-islamic-entry-symbol
-                                       diary-bahai-entry-symbol))
+                                       diary-bahai-entry-symbol
+                                       diary-chinese-entry-symbol))
                          t))
      '(1 font-lock-constant-face))
     '(diary-font-lock-sexps . font-lock-keyword-face)
@@ -2486,11 +2376,8 @@ This depends on the calendar date style."
     (put-text-property (match-beginning 0) (match-end 0) 'font-lock-multiline t)
     t))
 
-(define-obsolete-variable-alias 'fancy-diary-font-lock-keywords
-  'diary-fancy-font-lock-keywords "23.1")
-
 (defvar diary-fancy-font-lock-keywords
-  `((diary-fancy-date-matcher . diary-face)
+  `((diary-fancy-date-matcher . 'diary)
     ("^.*\\([aA]nniversary\\|[bB]irthday\\).*$" . 'diary-anniversary)
     ("^.*Yahrzeit.*$" . font-lock-constant-face)
     ("^\\(Erev \\)?Rosh Hodesh.*" . font-lock-function-name-face)
@@ -2537,9 +2424,6 @@ Fontify the region between BEG and END, quietly unless VERBOSE is non-nil."
        (list (cons t diary-fancy-overriding-map)))
   (view-mode 1))
 
-(define-obsolete-function-alias 'fancy-diary-display-mode
-  'diary-fancy-display-mode "23.1")
-
 ;; Following code from Dave Love <fx@gnu.org>.
 ;; Import Outlook-format appointments from mail messages in Gnus or
 ;; Rmail using command `diary-from-outlook'.  This, or the specialized
index 488f8cda8f6fd368412e4e660d86fd99feb1b716..d36764a74ce8568771073a1d964c8b70d15b69d9 100644 (file)
@@ -1,7 +1,7 @@
 ;;; holidays.el --- holiday functions for the calendar package
 
-;; Copyright (C) 1989-1990, 1992-1994, 1997, 2001-2014 Free Software
-;; Foundation, Inc.
+;; Copyright (C) 1989-1990, 1992-1994, 1997, 2001-2014
+;;   Free Software Foundation, Inc.
 
 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
 ;; Maintainer: Glenn Morris <rgm@gnu.org>
@@ -42,9 +42,6 @@
 ;; are used to using them to set calendar-holidays without having to
 ;; explicitly load this file.
 
-;;;###autoload
-(define-obsolete-variable-alias 'general-holidays
-  'holiday-general-holidays "23.1")
 ;;;###autoload
 (defcustom holiday-general-holidays
   (mapcar 'purecopy
@@ -72,9 +69,6 @@ See the documentation for `calendar-holidays' for details."
 ;;;###autoload
 (put 'holiday-general-holidays 'risky-local-variable t)
 
-;;;###autoload
-(define-obsolete-variable-alias 'oriental-holidays
-  'holiday-oriental-holidays "23.1")
 ;;;###autoload
 (defcustom holiday-oriental-holidays
   (mapcar 'purecopy
@@ -97,8 +91,6 @@ See the documentation for `calendar-holidays' for details."
 ;;;###autoload
 (put 'holiday-oriental-holidays 'risky-local-variable t)
 
-;;;###autoload
-(define-obsolete-variable-alias 'local-holidays 'holiday-local-holidays "23.1")
 ;;;###autoload
 (defcustom holiday-local-holidays nil
   "Local holidays.
@@ -108,8 +100,6 @@ See the documentation for `calendar-holidays' for details."
 ;;;###autoload
 (put 'holiday-local-holidays 'risky-local-variable t)
 
-;;;###autoload
-(define-obsolete-variable-alias 'other-holidays 'holiday-other-holidays "23.1")
 ;;;###autoload
 (defcustom holiday-other-holidays nil
   "User defined holidays.
@@ -119,108 +109,6 @@ See the documentation for `calendar-holidays' for details."
 ;;;###autoload
 (put 'holiday-other-holidays 'risky-local-variable t)
 
-;;;###autoload
-(defvar hebrew-holidays-1
-  (mapcar 'purecopy
-  '((holiday-hebrew-rosh-hashanah)
-    (if calendar-hebrew-all-holidays-flag
-        (holiday-julian
-         11
-         (let ((m displayed-month)
-               (y displayed-year)
-               year)
-           (calendar-increment-month m y -1)
-           (setq year (calendar-extract-year
-                       (calendar-julian-from-absolute
-                        (calendar-absolute-from-gregorian (list m 1 y)))))
-           (if (zerop (% (1+ year) 4))
-               22
-             21)) "\"Tal Umatar\" (evening)"))))
-  "Component of the old default value of `holiday-hebrew-holidays'.")
-;;;###autoload
-(put 'hebrew-holidays-1 'risky-local-variable t)
-(make-obsolete-variable 'hebrew-holidays-1 'hebrew-holidays "23.1")
-
-;;;###autoload
-(defvar hebrew-holidays-2
-  (mapcar 'purecopy
-  '((holiday-hebrew-hanukkah) ; respects calendar-hebrew-all-holidays-flag
-    (if calendar-hebrew-all-holidays-flag
-      (holiday-hebrew
-       10
-       (let ((h-year (calendar-extract-year
-                      (calendar-hebrew-from-absolute
-                       (calendar-absolute-from-gregorian
-                        (list displayed-month 28 displayed-year))))))
-         (if (= 6 (% (calendar-hebrew-to-absolute (list 10 10 h-year))
-                     7))
-             11 10))
-       "Tzom Teveth"))
-    (if calendar-hebrew-all-holidays-flag
-        (holiday-hebrew 11 15 "Tu B'Shevat"))))
-  "Component of the old default value of `holiday-hebrew-holidays'.")
-;;;###autoload
-(put 'hebrew-holidays-2 'risky-local-variable t)
-(make-obsolete-variable 'hebrew-holidays-2 'hebrew-holidays "23.1")
-
-;;;###autoload
-(defvar hebrew-holidays-3
-  (mapcar 'purecopy
-  '((if calendar-hebrew-all-holidays-flag
-        (holiday-hebrew
-         11
-         (let* ((m displayed-month)
-                (y displayed-year)
-                (h-year (progn
-                          (calendar-increment-month m y 1)
-                          (calendar-extract-year
-                           (calendar-hebrew-from-absolute
-                            (calendar-absolute-from-gregorian
-                             (list m (calendar-last-day-of-month m y) y))))))
-                (s-s
-                 (calendar-hebrew-from-absolute
-                  (if (= 6
-                         (% (calendar-hebrew-to-absolute
-                             (list 7 1 h-year))
-                            7))
-                      (calendar-dayname-on-or-before
-                       6 (calendar-hebrew-to-absolute
-                          (list 11 17 h-year)))
-                    (calendar-dayname-on-or-before
-                     6 (calendar-hebrew-to-absolute
-                        (list 11 16 h-year))))))
-                (day (calendar-extract-day s-s)))
-           day)
-         "Shabbat Shirah"))))
-  "Component of the old default value of `holiday-hebrew-holidays'.")
-;;;###autoload
-(put 'hebrew-holidays-3 'risky-local-variable t)
-(make-obsolete-variable 'hebrew-holidays-3 'hebrew-holidays "23.1")
-
-;;;###autoload
-(defvar hebrew-holidays-4
-  (mapcar 'purecopy
-  '((holiday-hebrew-passover)
-    (and calendar-hebrew-all-holidays-flag
-         (let* ((m displayed-month)
-                (y displayed-year)
-                (year (progn
-                        (calendar-increment-month m y -1)
-                        (calendar-extract-year
-                         (calendar-julian-from-absolute
-                          (calendar-absolute-from-gregorian (list m 1 y)))))))
-           (= 21 (% year 28)))
-         (holiday-julian 3 26 "Kiddush HaHamah"))
-    (if calendar-hebrew-all-holidays-flag
-        (holiday-hebrew-tisha-b-av))))
-    "Component of the old default value of `holiday-hebrew-holidays'.")
-;;;###autoload
-(put 'hebrew-holidays-4 'risky-local-variable t)
-(make-obsolete-variable 'hebrew-holidays-4 'hebrew-holidays "23.1")
-
-;;;###autoload
-(define-obsolete-variable-alias 'hebrew-holidays
-  'holiday-hebrew-holidays "23.1")
 ;;;###autoload
 (defcustom holiday-hebrew-holidays
   (mapcar 'purecopy
@@ -239,9 +127,6 @@ See the documentation for `calendar-holidays' for details."
 ;;;###autoload
 (put 'holiday-hebrew-holidays 'risky-local-variable t)
 
-;;;###autoload
-(define-obsolete-variable-alias 'christian-holidays
-  'holiday-christian-holidays "23.1")
 ;;;###autoload
 (defcustom holiday-christian-holidays
   (mapcar 'purecopy
@@ -261,9 +146,6 @@ See the documentation for `calendar-holidays' for details."
 ;;;###autoload
 (put 'holiday-christian-holidays 'risky-local-variable t)
 
-;;;###autoload
-(define-obsolete-variable-alias 'islamic-holidays
-  'holiday-islamic-holidays "23.1")
 ;;;###autoload
 (defcustom holiday-islamic-holidays
   (mapcar 'purecopy
@@ -285,8 +167,6 @@ See the documentation for `calendar-holidays' for details."
 ;;;###autoload
 (put 'holiday-islamic-holidays 'risky-local-variable t)
 
-;;;###autoload
-(define-obsolete-variable-alias 'bahai-holidays 'holiday-bahai-holidays "23.1")
 ;;;###autoload
 (defcustom holiday-bahai-holidays
   (mapcar 'purecopy
@@ -308,8 +188,6 @@ See the documentation for `calendar-holidays' for details."
 ;;;###autoload
 (put 'holiday-bahai-holidays 'risky-local-variable t)
 
-;;;###autoload
-(define-obsolete-variable-alias 'solar-holidays 'holiday-solar-holidays "23.1")
 ;;;###autoload
 (defcustom holiday-solar-holidays
   (mapcar 'purecopy
@@ -516,9 +394,6 @@ use instead of point."
         (message "Looking up holidays...done"))
       holiday-list)))
 
-(define-obsolete-function-alias
-  'list-calendar-holidays 'calendar-list-holidays "23.1")
-
 ;;;###autoload
 (defun holidays (&optional arg)
   "Display the holidays for last month, this month, and next month.
@@ -645,9 +520,6 @@ strings describing those holidays that apply on DATE, or nil if none do."
       (if (calendar-date-equal date (car h))
           (setq holiday-list (append holiday-list (cdr h)))))))
 
-(define-obsolete-function-alias
-  'check-calendar-holidays 'calendar-check-holidays "23.1")
-
 
 ;; Formerly cal-tex-list-holidays.
 (defun holiday-in-range (d1 d2)
@@ -724,9 +596,6 @@ use instead of point."
       (calendar-mark-visible-date (car holiday) calendar-holiday-marker))
     (message "Marking holidays...done")))
 
-(define-obsolete-function-alias
-  'mark-calendar-holidays 'calendar-mark-holidays "23.1")
-
 ;; Below are the functions that calculate the dates of holidays; these
 ;; are eval'ed in the function calendar-holiday-list.  If you
 ;; write other such functions, be sure to imitate the style used below.
@@ -813,9 +682,6 @@ HLIST is a list of elements of the form (DATE) TEXT."
                       (and (car p) (calendar-date-is-visible-p (car p)) p))
                     hlist)))
 
-(define-obsolete-function-alias
-  'filter-visible-calendar-holidays 'holiday-filter-visible-calendar "23.1")
-
 (defun holiday-sexp (sexp string)
   "Sexp holiday for dates in the calendar window.
 SEXP is an expression in variable `year' that is evaluated to
index 4ba4869d78854beec82bb9454658c919b4b76943..43610036861bb5c739d86f0be754015b3592ed01 100644 (file)
@@ -240,6 +240,33 @@ code for the event, and your personal domain name."
   :type 'string
   :group 'icalendar)
 
+(defcustom icalendar-export-sexp-enumeration-days
+  14
+  "Number of days over which a sexp diary entry is enumerated.
+In general sexp entries cannot be translated to icalendar format.
+They are therefore enumerated, i.e. explicitly evaluated for a
+certain number of days, and then exported.  The enumeration starts
+on the current day and continues for the number of days given here.
+
+See `icalendar-export-sexp-enumerate-all' for a list of sexp
+entries which by default are NOT enumerated."
+  :version "25.1"
+  :type 'integer
+  :group 'icalendar)
+
+(defcustom icalendar-export-sexp-enumerate-all
+  nil
+  "Determines whether ALL sexp diary entries are enumerated.
+If non-nil all sexp diary entries are enumerated for
+`icalendar-export-sexp-enumeration-days' days instead of
+translating into an icalendar equivalent.  This affects the
+following sexp diary entries: `diary-anniversary',
+`diary-cyclic', `diary-date', `diary-float',`diary-block'.  All
+other sexp entries are enumerated in any case."
+  :version "25.1"
+  :type 'boolean
+  :group 'icalendar)
+
 (defvar icalendar-debug nil
   "Enable icalendar debug messages.")
 
@@ -563,7 +590,12 @@ FIXME: multiple comma-separated values should be allowed!"
                    ;; UTC specifier present
                    (char-equal ?Z (aref isodatetimestring 15)))
           ;; if not UTC add current-time-zone offset
-          (setq second (+ (car (current-time-zone)) second)))
+          ;; current-time-zone should be called with actual UTC time
+          ;; (daylight saving at that time may differ to current one)
+          (setq second (+ (car (current-time-zone
+                                (encode-time second minute hour day month year
+                                             0)))
+                          second)))
         ;; shift if necessary
         (if day-shift
             (let ((mdy (calendar-gregorian-from-absolute
@@ -708,16 +740,6 @@ ISO format: (year month day)."
     ;; datetime == nil
     nil))
 
-(defun icalendar--date-style ()
-  "Return current calendar date style.
-Convenience function to handle transition from old
-`european-calendar-style' to new `calendar-date-style'."
-  (if (boundp 'calendar-date-style)
-      calendar-date-style
-    (if (with-no-warnings european-calendar-style)
-        'european
-      'american)))
-
 (defun icalendar--datetime-to-diary-date (datetime &optional separator)
   "Convert the decoded DATETIME to diary format.
 Optional argument SEPARATOR gives the separator between month,
@@ -725,7 +747,7 @@ day, and year.  If nil a blank character is used as separator.
 Call icalendar--datetime-to-*-date according to the current
 calendar date style."
   (funcall (intern-soft (format "icalendar--datetime-to-%s-date"
-                                (icalendar--date-style)))
+                                calendar-date-style))
            datetime separator))
 
 (defun icalendar--datetime-to-colontime (datetime)
@@ -835,7 +857,7 @@ is not possible it uses the current calendar date style."
                                           (match-end 2))))
              (setq year (read (substring datestring (match-beginning 3)
                                          (match-end 3))))
-             (if (eq (icalendar--date-style) 'american)
+             (if (eq calendar-date-style 'american)
                  (let ((x month))
                    (setq month day)
                    (setq day x))))
@@ -891,10 +913,16 @@ is not possible it uses the current calendar date style."
 
 (defun icalendar--diarytime-to-isotime (timestring ampmstring)
   "Convert a time like 9:30pm to an iso-conform string like T213000.
-In this example the TIMESTRING would be \"9:30\" and the AMPMSTRING
-would be \"pm\"."
+In this example the TIMESTRING would be \"9:30\" and the
+AMPMSTRING would be \"pm\".  The minutes may be missing as long
+as the colon is missing as well, i.e. \"9\" is allowed as
+TIMESTRING and has the same result as \"9:00\"."
   (if timestring
-      (let ((starttimenum (read (icalendar--rris ":" "" timestring))))
+      (let* ((parts (save-match-data (split-string timestring ":")))
+             (h (car parts))
+             (m (if (cdr parts) (cadr parts)
+                  (if (> (length h) 2) "" "00")))
+             (starttimenum (read (concat h m))))
         ;; take care of am/pm style
         ;; Be sure *not* to convert 12:00pm - 12:59pm to 2400-2459
         (if (and ampmstring (string= "pm" ampmstring) (< starttimenum 1200))
@@ -1016,40 +1044,48 @@ FExport diary data into iCalendar file: ")
 
         (condition-case error-val
             (progn
-              (setq contents-n-summary
+              (setq cns-cons-or-list
                     (icalendar--convert-to-ical nonmarker entry-main))
               (setq other-elements (icalendar--parse-summary-and-rest
                                    entry-full))
-              (setq contents (concat (car contents-n-summary)
-                                     "\nSUMMARY:" (cadr contents-n-summary)))
-              (let ((cla (cdr (assoc 'cla other-elements)))
-                    (des (cdr (assoc 'des other-elements)))
-                    (loc (cdr (assoc 'loc other-elements)))
-                    (org (cdr (assoc 'org other-elements)))
-                    (sta (cdr (assoc 'sta other-elements)))
-                    (sum (cdr (assoc 'sum other-elements)))
-                    (url (cdr (assoc 'url other-elements)))
-                    (uid (cdr (assoc 'uid other-elements))))
-                (if cla
-                    (setq contents (concat contents "\nCLASS:" cla)))
-                (if des
-                    (setq contents (concat contents "\nDESCRIPTION:" des)))
-                (if loc
-                    (setq contents (concat contents "\nLOCATION:" loc)))
-                (if org
-                    (setq contents (concat contents "\nORGANIZER:" org)))
-                (if sta
-                    (setq contents (concat contents "\nSTATUS:" sta)))
-                ;;(if sum
-                ;;    (setq contents (concat contents "\nSUMMARY:" sum)))
-                (if url
-                    (setq contents (concat contents "\nURL:" url)))
-
-                (setq header (concat "\nBEGIN:VEVENT\nUID:"
-                                     (or uid
-                                         (icalendar--create-uid entry-full 
-                                                                contents)))))
-              (setq result (concat result header contents "\nEND:VEVENT")))
+              (mapc (lambda (contents-n-summary)
+                      (setq contents (concat (car contents-n-summary)
+                                             "\nSUMMARY:"
+                                             (cdr contents-n-summary)))
+                      (let ((cla (cdr (assoc 'cla other-elements)))
+                            (des (cdr (assoc 'des other-elements)))
+                            (loc (cdr (assoc 'loc other-elements)))
+                            (org (cdr (assoc 'org other-elements)))
+                            (sta (cdr (assoc 'sta other-elements)))
+                            (sum (cdr (assoc 'sum other-elements)))
+                            (url (cdr (assoc 'url other-elements)))
+                            (uid (cdr (assoc 'uid other-elements))))
+                        (if cla
+                            (setq contents (concat contents "\nCLASS:" cla)))
+                        (if des
+                            (setq contents (concat contents "\nDESCRIPTION:"
+                                                   des)))
+                        (if loc
+                            (setq contents (concat contents "\nLOCATION:" loc)))
+                        (if org
+                            (setq contents (concat contents "\nORGANIZER:"
+                                                   org)))
+                        (if sta
+                            (setq contents (concat contents "\nSTATUS:" sta)))
+                        ;;(if sum
+                        ;;    (setq contents (concat contents "\nSUMMARY:" sum)))
+                        (if url
+                            (setq contents (concat contents "\nURL:" url)))
+
+                        (setq header (concat "\nBEGIN:VEVENT\nUID:"
+                                             (or uid
+                                                 (icalendar--create-uid
+                                                  entry-full contents)))))
+                      (setq result (concat result header contents
+                                           "\nEND:VEVENT")))
+                    (if (consp cns-cons-or-list)
+                        (list cns-cons-or-list)
+                      cns-cons-or-list)))
           ;; handle errors
           (error
            (setq found-error t)
@@ -1081,16 +1117,18 @@ FExport diary data into iCalendar file: ")
 NONMARKER is a regular expression matching the start of non-marking
 entries.  ENTRY-MAIN is the first line of the diary entry."
   (or
-   ;; anniversaries -- %%(diary-anniversary ...)
-   (icalendar--convert-anniversary-to-ical nonmarker entry-main)
-   ;; cyclic events -- %%(diary-cyclic ...)
-   (icalendar--convert-cyclic-to-ical nonmarker entry-main)
-   ;; diary-date -- %%(diary-date ...)
-   (icalendar--convert-date-to-ical nonmarker entry-main)
-   ;; float events -- %%(diary-float ...)
-   (icalendar--convert-float-to-ical nonmarker entry-main)
-   ;; block events -- %%(diary-block ...)
-   (icalendar--convert-block-to-ical nonmarker entry-main)
+   (unless icalendar-export-sexp-enumerate-all
+     (or
+      ;; anniversaries -- %%(diary-anniversary ...)
+      (icalendar--convert-anniversary-to-ical nonmarker entry-main)
+      ;; cyclic events -- %%(diary-cyclic ...)
+      (icalendar--convert-cyclic-to-ical nonmarker entry-main)
+      ;; diary-date -- %%(diary-date ...)
+      (icalendar--convert-date-to-ical nonmarker entry-main)
+      ;; float events -- %%(diary-float ...)
+      (icalendar--convert-float-to-ical nonmarker entry-main)
+      ;; block events -- %%(diary-block ...)
+      (icalendar--convert-block-to-ical nonmarker entry-main)))
    ;; other sexp diary entries
    (icalendar--convert-sexp-to-ical nonmarker entry-main)
    ;; weekly by day -- Monday 8:30 Team meeting
@@ -1226,9 +1264,9 @@ entries.  ENTRY-MAIN is the first line of the diary entry."
   (if (string-match
        (concat nonmarker
                "\\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\)\\s-*" ; date
-               "\\(\\([0-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" ; start time
+               "\\(\\([0-9][0-9]?\\(:[0-9][0-9]\\)?\\)\\([ap]m\\)?" ; start time
                "\\("
-               "-\\([0-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" ; end time
+               "-\\([0-9][0-9]?\\(:[0-9][0-9]\\)?\\)\\([ap]m\\)?\\)?" ; end time
                "\\)?"
                "\\s-*\\(.*?\\) ?$")
        entry-main)
@@ -1245,25 +1283,25 @@ entries.  ENTRY-MAIN is the first line of the diary entry."
                                               (match-beginning 3)
                                               (match-end 3))
                                  nil)
-                               (if (match-beginning 4)
+                               (if (match-beginning 5)
                                    (substring entry-main
-                                              (match-beginning 4)
-                                              (match-end 4))
+                                              (match-beginning 5)
+                                              (match-end 5))
                                  nil)))
              (endtimestring (icalendar--diarytime-to-isotime
-                             (if (match-beginning 6)
-                                 (substring entry-main
-                                            (match-beginning 6)
-                                            (match-end 6))
-                               nil)
                              (if (match-beginning 7)
                                  (substring entry-main
                                             (match-beginning 7)
                                             (match-end 7))
+                               nil)
+                             (if (match-beginning 9)
+                                 (substring entry-main
+                                            (match-beginning 9)
+                                            (match-end 9))
                                nil)))
              (summary (icalendar--convert-string-for-export
-                       (substring entry-main (match-beginning 8)
-                                  (match-end 8)))))
+                       (substring entry-main (match-beginning 10)
+                                  (match-end 10)))))
         (icalendar--dmsg "ordinary %s" entry-main)
 
         (unless startisostring
@@ -1289,7 +1327,7 @@ entries.  ENTRY-MAIN is the first line of the diary entry."
                                               (- time 230000)))
                 (setq endisostring1 endisostring)) )))
 
-        (list (concat "\nDTSTART;"
+        (cons (concat "\nDTSTART;"
                       (if starttimestring "VALUE=DATE-TIME:"
                         "VALUE=DATE:")
                       startisostring
@@ -1370,7 +1408,7 @@ entries.  ENTRY-MAIN is the first line of the diary entry."
                                           starttimestring))))
               (setq endtimestring (format "T%06d"
                                           (+ 10000 time))))))
-        (list (concat "\nDTSTART;"
+        (cons (concat "\nDTSTART;"
                       (if starttimestring
                           "VALUE=DATE-TIME:"
                         "VALUE=DATE:")
@@ -1403,7 +1441,7 @@ entries.  ENTRY-MAIN is the first line of the diary entry."
 NONMARKER is a regular expression matching the start of non-marking
 entries.  ENTRY-MAIN is the first line of the diary entry."
   (if (string-match (concat nonmarker
-                            (if (eq (icalendar--date-style) 'european)
+                            (if (eq calendar-date-style 'european)
                                 "\\([0-9]+[0-9]?\\)\\s-+\\([a-z]+\\)\\s-+"
                               "\\([a-z]+\\)\\s-+\\([0-9]+[0-9]?\\)\\s-+")
                             "\\*?\\s-*"
@@ -1414,8 +1452,8 @@ entries.  ENTRY-MAIN is the first line of the diary entry."
                             "\\s-*\\([^0-9]+.*?\\) ?$" ; must not match years
                             )
                     entry-main)
-      (let* ((daypos (if (eq (icalendar--date-style) 'european) 1 2))
-             (monpos (if (eq (icalendar--date-style) 'european) 2 1))
+      (let* ((daypos (if (eq calendar-date-style 'european) 1 2))
+             (monpos (if (eq calendar-date-style 'european) 2 1))
              (day (read (substring entry-main
                                    (match-beginning daypos)
                                    (match-end daypos))))
@@ -1457,7 +1495,7 @@ entries.  ENTRY-MAIN is the first line of the diary entry."
                                           starttimestring))))
               (setq endtimestring (format "T%06d"
                                           (+ 10000 time))))))
-        (list (concat "\nDTSTART;"
+        (cons (concat "\nDTSTART;"
                       (if starttimestring "VALUE=DATE-TIME:"
                         "VALUE=DATE:")
                       (format "1900%02d%02d" month day)
@@ -1478,13 +1516,16 @@ entries.  ENTRY-MAIN is the first line of the diary entry."
     ;; no match
     nil))
 
-(defun icalendar--convert-sexp-to-ical (nonmarker entry-main)
-  "Convert complex sexp diary entry to iCalendar format -- unsupported!
-
-FIXME!
+(defun icalendar--convert-sexp-to-ical (nonmarker entry-main &optional start)
+  "Convert sexp diary entry to iCalendar format.
+Enumerate the evaluated sexp entry for the next
+`icalendar-export-sexp-enumeration-days' days.  NONMARKER is a
+regular expression matching the start of non-marking entries.
+ENTRY-MAIN is the first line of the diary entry.
 
-NONMARKER is a regular expression matching the start of non-marking
-entries.  ENTRY-MAIN is the first line of the diary entry."
+Optional argument START determines the first day of the
+enumeration, given as a time value, in same format as returned by
+`current-time' -- used for test purposes."
   (cond ((string-match (concat nonmarker
                                "%%(and \\(([^)]+)\\))\\(\\s-*.*?\\) ?$")
                        entry-main)
@@ -1497,10 +1538,37 @@ entries.  ENTRY-MAIN is the first line of the diary entry."
                   (substring entry-main (match-beginning 1) (match-end 1))
                   (substring entry-main (match-beginning 2) (match-end 2)))))
         ((string-match (concat nonmarker
-                               "%%([^)]+)\\s-*.*")
+                               "%%\\(([^)]+)\\)\\s-*\\(.*\\)")
                        entry-main)
+         ;; regular sexp entry
          (icalendar--dmsg "diary-sexp %s" entry-main)
-         (error "Sexp-entries are not supported yet"))
+         (let ((p1 (substring entry-main (match-beginning 1) (match-end 1)))
+               (p2 (substring entry-main (match-beginning 2) (match-end 2)))
+               (now (or start (current-time))))
+           (delete nil
+                   (mapcar
+                    (lambda (offset)
+                      (let* ((day (decode-time (time-add now
+                                                         (seconds-to-time
+                                                          (* offset 60 60 24)))))
+                             (d (nth 3 day))
+                             (m (nth 4 day))
+                             (y (nth 5 day))
+                             (se (diary-sexp-entry p1 p2 (list m d y)))
+                             (see (cond ((stringp se) se)
+                                        ((consp se) (cdr se))
+                                        (t nil))))
+                        (cond ((null see)
+                               nil)
+                              ((stringp see)
+                               (let ((calendar-date-style 'iso))
+                                 (icalendar--convert-ordinary-to-ical
+                                  nonmarker (format "%4d/%02d/%02d %s" y m d see))))
+                             (;TODO:
+                              (error (format "Unsupported Sexp-entry: %s"
+                                             entry-main))))))
+                    (number-sequence
+                     0 (- icalendar-export-sexp-enumeration-days 1))))))
         (t
          ;; no match
          nil)))
@@ -1565,7 +1633,7 @@ entries.  ENTRY-MAIN is the first line of the diary entry."
                                           (+ 10000 time))))))
         (if starttimestring
             ;; with time -> write rrule
-            (list (concat "\nDTSTART;VALUE=DATE-TIME:"
+            (cons (concat "\nDTSTART;VALUE=DATE-TIME:"
                           startisostring
                           starttimestring
                           "\nDTEND;VALUE=DATE-TIME:"
@@ -1575,7 +1643,7 @@ entries.  ENTRY-MAIN is the first line of the diary entry."
                           endisostring)
                   summary)
           ;; no time -> write long event
-          (list (concat "\nDTSTART;VALUE=DATE:" startisostring
+          (cons (concat "\nDTSTART;VALUE=DATE:" startisostring
                         "\nDTEND;VALUE=DATE:" endisostring+1)
                 summary)))
     ;; no match
@@ -1611,7 +1679,7 @@ entries.  ENTRY-MAIN is the first line of the diary entry."
               (icalendar--dmsg "diary-float %s" entry-main)
               (error "Don't know if or how to implement day in `diary-float'")))
 
-          (list (concat
+          (cons (concat
                  ;;Start today (yes this is an arbitrary choice):
                  "\nDTSTART;VALUE=DATE:"
                  (format-time-string "%Y%m%d" (current-time))
@@ -1716,7 +1784,7 @@ entries.  ENTRY-MAIN is the first line of the diary entry."
                                           starttimestring))))
               (setq endtimestring (format "T%06d"
                                           (+ 10000 time))))))
-        (list (concat "\nDTSTART;"
+        (cons (concat "\nDTSTART;"
                       (if starttimestring "VALUE=DATE-TIME:"
                         "VALUE=DATE:")
                       startisostring
@@ -1785,7 +1853,7 @@ entries.  ENTRY-MAIN is the first line of the diary entry."
                                           starttimestring))))
               (setq endtimestring (format "T%06d"
                                           (+ 10000 time))))))
-        (list (concat "\nDTSTART;"
+        (cons (concat "\nDTSTART;"
                       (if starttimestring "VALUE=DATE-TIME:"
                         "VALUE=DATE:")
                       startisostring
@@ -2222,11 +2290,11 @@ END-T is the event's end time in diary format."
                (let ((day (nth 3 dtstart-dec))
                      (month (nth 4 dtstart-dec)))
                  (setq result (concat "%%(and (diary-date "
-                                      (cond ((eq (icalendar--date-style) 'iso)
+                                      (cond ((eq calendar-date-style 'iso)
                                              (format "t %d %d" month day))
-                                            ((eq (icalendar--date-style) 'european)
+                                            ((eq calendar-date-style 'european)
                                              (format "%d %d t" day month))
-                                            ((eq (icalendar--date-style) 'american)
+                                            ((eq calendar-date-style 'american)
                                              (format "%d %d t" month day)))
                                       ") (diary-block "
                                       dtstart-conv
@@ -2248,16 +2316,16 @@ END-T is the event's end time in diary format."
                  (format
                   "%%%%(and (diary-date %s) (diary-block %s %s)) %s%s%s"
                   (let ((day (nth 3 dtstart-dec)))
-                    (cond ((eq (icalendar--date-style) 'iso)
+                    (cond ((eq calendar-date-style 'iso)
                            (format "t t %d" day))
-                          ((eq (icalendar--date-style) 'european)
+                          ((eq calendar-date-style 'european)
                            (format "%d t t" day))
-                          ((eq (icalendar--date-style) 'american)
+                          ((eq calendar-date-style 'american)
                            (format "t %d t" day))))
                   dtstart-conv
                   (if until
                       until-conv
-                    (if (eq (icalendar--date-style) 'iso) "9999 1 1" "1 1 9999")) ;; FIXME: should be unlimited
+                    (if (eq calendar-date-style 'iso) "9999 1 1" "1 1 9999")) ;; FIXME: should be unlimited
                   (or start-t "")
                   (if end-t "-" "") (or end-t ""))))
           ;; daily
index e429bb03d15ab28ed24219f71e618613352c2c58..0b20006f953d4f11015a2b60dfe7f86eb61702a3 100644 (file)
@@ -1,7 +1,6 @@
 ;;; lunar.el --- calendar functions for phases of the moon
 
-;; Copyright (C) 1992-1993, 1995, 1997, 2001-2014 Free Software
-;; Foundation, Inc.
+;; Copyright (C) 1992-1993, 1995, 1997, 2001-2014 Free Software Foundation, Inc.
 
 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
 ;; Maintainer: Glenn Morris <rgm@gnu.org>
@@ -228,10 +227,6 @@ use instead of point."
           (lunar-phase-list m1 y1) "\n")))
       (message "Computing phases of the moon...done"))))
 
-;;;###cal-autoload
-(define-obsolete-function-alias 'calendar-phases-of-moon
-  'calendar-lunar-phases "23.1")
-
 ;;;###autoload
 (defun lunar-phases (&optional arg)
   "Display the quarters of the moon for last month, this month, and next month.
@@ -245,9 +240,6 @@ This function is suitable for execution in an init file."
            (displayed-year (calendar-extract-year date)))
       (calendar-lunar-phases))))
 
-;;;###autoload
-(define-obsolete-function-alias 'phases-of-moon 'lunar-phases "23.1")
-
 (defvar date)
 
 ;; To be called from diary-list-sexp-entries, where DATE is bound.
@@ -266,10 +258,6 @@ use when highlighting the day in the calendar."
         (cons mark (concat (lunar-phase-name (nth 2 phase)) " "
                            (cadr phase))))))
 
-;;;###diary-autoload
-(define-obsolete-function-alias 'diary-phases-of-moon
-  'diary-lunar-phases "23.1")
-
 ;; For the Chinese calendar the calculations for the new moon need to be more
 ;; accurate than those above, so we use more terms in the approximation.
 (defun lunar-new-moon-time (k)
index 79569f2142c7193ce5a79505bf1ec41251bfb36e..142e69ecfe6c7058784de7a8e437076edb0e850e 100644 (file)
 
 ;;; Code:
 
-(eval-when-compile (require 'cl-lib))
-
-(defvar parse-time-digits (make-vector 256 nil))
+(require 'cl-lib)
 
 ;; Byte-compiler warnings
 (defvar parse-time-elt)
 (defvar parse-time-val)
 
-(unless (aref parse-time-digits ?0)
-  (cl-loop for i from ?0 to ?9
-           do (aset parse-time-digits i (- i ?0))))
-
-(defsubst digit-char-p (char)
-  (aref parse-time-digits char))
-
 (defsubst parse-time-string-chars (char)
   (save-match-data
     (let (case-fold-search str)
            ((string-match "[[:lower:]]" str) ?a)
            ((string-match "[[:digit:]]" str) ?0)))))
 
-(put 'parse-error 'error-conditions '(parse-error error))
-(put 'parse-error 'error-message "Parsing error")
-
-(defsubst parse-integer (string &optional start end)
-  "[CL] Parse and return the integer in STRING, or nil if none."
-  (let ((integer 0)
-       (digit 0)
-       (index (or start 0))
-       (end (or end (length string))))
-    (when (< index end)
-      (let ((sign (aref string index)))
-       (if (or (eq sign ?+) (eq sign ?-))
-           (setq sign (parse-time-string-chars sign)
-                 index (1+ index))
-         (setq sign 1))
-       (while (and (< index end)
-                   (setq digit (digit-char-p (aref string index))))
-         (setq integer (+ (* integer 10) digit)
-               index (1+ index)))
-       (if (/= index end)
-           (signal 'parse-error `("not an integer"
-                                  ,(substring string (or start 0) end)))
-         (* sign integer))))))
-
 (defun parse-time-tokenize (string)
   "Tokenize STRING into substrings."
   (let ((start nil)
                  (setq c (parse-time-string-chars (aref string index))))
        (setq all-digits (and all-digits (eq c ?0))))
       (if (<= index end)
-         (push (if all-digits (parse-integer string start index)
+         (push (if all-digits (cl-parse-integer string :start start :end index)
                  (substring string start index))
                list)))
     (nreverse list)))
   `(((6) parse-time-weekdays)
     ((3) (1 31))
     ((4) parse-time-months)
-    ((5) (100 4038))
+    ((5) (100 ,most-positive-fixnum))
     ((2 1 0)
      ,#'(lambda () (and (stringp parse-time-elt)
                        (= (length parse-time-elt) 8)
               (= 5 (length parse-time-elt))
               (or (= (aref parse-time-elt 0) ?+)
                   (= (aref parse-time-elt 0) ?-))))
-     ,#'(lambda () (* 60 (+ (parse-integer parse-time-elt 3 5)
-                           (* 60 (parse-integer parse-time-elt 1 3)))
+     ,#'(lambda () (* 60 (+ (cl-parse-integer parse-time-elt :start 3 :end 5)
+                           (* 60 (cl-parse-integer parse-time-elt :start 1 :end 3)))
                      (if (= (aref parse-time-elt 0) ?-) -1 1))))
     ((5 4 3)
      ,#'(lambda () (and (stringp parse-time-elt)
@@ -210,14 +177,77 @@ unknown are returned as nil."
                (let ((new-val (if rule
                                   (let ((this (pop rule)))
                                     (if (vectorp this)
-                                        (parse-integer
+                                        (cl-parse-integer
                                          parse-time-elt
-                                         (aref this 0) (aref this 1))
+                                         :start (aref this 0)
+                                         :end (aref this 1))
                                       (funcall this)))
                                 parse-time-val)))
                  (rplaca (nthcdr (pop slots) time) new-val))))))))
     time))
 
+(defconst parse-time-iso8601-regexp
+  (let* ((dash "-?")
+        (colon ":?")
+        (4digit "\\([0-9][0-9][0-9][0-9]\\)")
+        (2digit "\\([0-9][0-9]\\)")
+        (date-fullyear 4digit)
+        (date-month 2digit)
+        (date-mday 2digit)
+        (time-hour 2digit)
+        (time-minute 2digit)
+        (time-second 2digit)
+        (time-secfrac "\\(\\.[0-9]+\\)?")
+        (time-numoffset (concat "[-+]\\(" time-hour "\\):" time-minute))
+        (time-offset (concat "Z" time-numoffset))
+        (partial-time (concat time-hour colon time-minute colon time-second
+                              time-secfrac))
+        (full-date (concat date-fullyear dash date-month dash date-mday))
+        (full-time (concat partial-time time-offset))
+        (date-time (concat full-date "T" full-time)))
+    (list (concat "^" full-date)
+         (concat "T" partial-time)
+         (concat "Z" time-numoffset)))
+  "List of regular expressions matching ISO 8601 dates.
+1st regular expression matches the date.
+2nd regular expression matches the time.
+3rd regular expression matches the (optional) timezone specification.")
+
+(defun parse-iso8601-time-string (date-string)
+  (let* ((date-re (nth 0 parse-time-iso8601-regexp))
+        (time-re (nth 1 parse-time-iso8601-regexp))
+        (tz-re (nth 2 parse-time-iso8601-regexp))
+        re-start
+        time seconds minute hour fractional-seconds
+        day month year day-of-week dst tz)
+    ;; We need to populate 'time' with
+    ;; (SEC MIN HOUR DAY MON YEAR DOW DST TZ)
+
+    ;; Nobody else handles iso8601 correctly, let's do it ourselves.
+    (when (string-match date-re date-string re-start)
+      (setq year (string-to-number (match-string 1 date-string))
+           month (string-to-number (match-string 2 date-string))
+           day (string-to-number (match-string 3 date-string))
+           re-start (match-end 0))
+      (when (string-match time-re date-string re-start)
+       (setq hour (string-to-number (match-string 1 date-string))
+             minute (string-to-number (match-string 2 date-string))
+             seconds (string-to-number (match-string 3 date-string))
+             fractional-seconds (string-to-number (or
+                                                    (match-string 4 date-string)
+                                                    "0"))
+             re-start (match-end 0))
+       (when (string-match tz-re date-string re-start)
+         (setq tz (match-string 1 date-string)))
+       (setq time (list seconds minute hour day month year day-of-week dst tz))))
+
+    ;; Fall back to having Gnus do fancy things for us.
+    (when (not time)
+      (setq time (parse-time-string date-string)))
+
+    (and time
+        (apply 'encode-time time))))
+
 (provide 'parse-time)
 
 ;;; parse-time.el ends here
index 3d62c5d789a1f1cc5a4e56b3f89b8b121fc64ce2..48fe2294354a1468be3f085641cc67ff5b3e60f3 100644 (file)
@@ -119,13 +119,20 @@ it is assumed that PICO was omitted and should be treated as zero."
 (defun date-to-time (date)
   "Parse a string DATE that represents a date-time and return a time value.
 If DATE lacks timezone information, GMT is assumed."
-  (condition-case ()
+  (condition-case err
       (apply 'encode-time (parse-time-string date))
-    (error (condition-case ()
-              (apply 'encode-time
-                     (parse-time-string
-                      (timezone-make-date-arpa-standard date)))
-            (error (error "Invalid date: %s" date))))))
+    (error
+     (let ((overflow-error '(error "Specified time is not representable")))
+       (if (equal err overflow-error)
+          (apply 'signal err)
+        (condition-case err
+            (apply 'encode-time
+                   (parse-time-string
+                    (timezone-make-date-arpa-standard date)))
+          (error
+           (if (equal err overflow-error)
+               (apply 'signal err)
+             (error "Invalid date: %s" date)))))))))
 
 ;; Bit of a mess.  Emacs has float-time since at least 21.1.
 ;; This file is synced to Gnus, and XEmacs packages may have been written
@@ -388,6 +395,23 @@ This function does not work for SECONDS greater than `most-positive-fixnum'."
                  t t string))))))
   (replace-regexp-in-string "%%" "%" string))
 
+(defvar seconds-to-string
+  (list (list 1 "ms" 0.001)
+        (list 100 "s" 1)
+        (list (* 60 100) "m" 60.0)
+        (list (* 3600 30) "h" 3600.0)
+        (list (* 3600 24 400) "d" (* 3600.0 24.0))
+        (list nil "y" (* 365.25 24 3600)))
+  "Formatting used by the function `seconds-to-string'.")
+;;;###autoload
+(defun seconds-to-string (delay)
+  "Convert the time interval in seconds to a short string."
+  (cond ((> 0 delay) (concat "-" (seconds-to-string (- delay))))
+        ((= 0 delay) "0s")
+        (t (let ((sts seconds-to-string) here)
+             (while (and (car (setq here (pop sts)))
+                         (<= (car here) delay)))
+             (concat (format "%.2f" (/ delay (car (cddr here)))) (cadr here))))))
 
 (provide 'time-date)
 
index 05bd95a50cccbab30c30e48ef881f1752e2fd169..9aabc9c9e0de6fec55ee3a06c499498784af8086 100644 (file)
@@ -1,9 +1,15 @@
-2014-09-18  David Engster  <deng@randomsample.de>
+2014-09-22  David Engster  <deng@randomsample.de>
 
        * ede/emacs.el (ede-emacs-version): Do not call 'egrep' to
        determine Emacs version (it was dead code anyway).  Make sure that
        configure.ac or configure.in exist.  (Bug#18476)
 
+2014-06-19  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * semantic/ia.el (semantic-ia-complete-symbol-menu): Use posn-at-point
+       instead of senator-completion-menu-point-as-event; un-comment, tho keep
+       the "no smart completion" fallback commented since it still doesn't work.
+
 2014-05-01  Glenn Morris  <rgm@gnu.org>
 
        * ede.el (ede-project-directories, ede-check-project-directory):
 
        * ede/emacs.el (ede-emacs-version): Update AC_INIT regexp.  (Bug#17160)
 
+2014-03-29  Glenn Morris  <rgm@gnu.org>
+
+       * ede/dired.el (ede-dired-minor-mode): Add autoload cookie.
+       (generated-autoload-file, generated-autoload-load-name):
+       Set file-local values.
+       * ede.el: Load ede/loaddefs at compile time too.
+       (ede-dired-minor-mode): Remove hand-written autoload.
+
 2014-03-04  Glenn Morris  <rgm@gnu.org>
 
        * semantic/util.el (semantic-complete-symbol):
index cbcc20f50397aa7ce47fa4f595b8709c6f9e6eb7..a9a53d776e2f851bcb3895aeecee029f7d5f6e87 100644 (file)
@@ -46,7 +46,8 @@
 (require 'ede/base)
 (require 'ede/auto)
 
-(load "ede/loaddefs" nil 'nomessage)
+(eval-and-compile
+  (load "ede/loaddefs" nil 'nomessage))
 
 (declare-function ede-commit-project "ede/custom")
 (declare-function ede-convert-path "ede/files")
@@ -450,8 +451,6 @@ If optional argument CURRENT is non-nil, return sub-menu code."
 \f
 ;;; Mode Declarations
 ;;
-(eval-and-compile
-  (autoload 'ede-dired-minor-mode "ede/dired" "EDE commands for dired" t))
 
 (defun ede-apply-target-options ()
   "Apply options to the current buffer for the active project/target."
index ee17dc95fbcf093a6ddf41a4e4306b9195cfce65..4c17a91a9847f8b9877af8eeef698b0749e4a26d 100644 (file)
@@ -55,6 +55,7 @@
     map)
   "Keymap used for ede dired minor mode.")
 
+;;;###autoload
 (define-minor-mode ede-dired-minor-mode
   "A minor mode that should only be activated in DIRED buffers.
 If ARG is nil or a positive number, force on, if
@@ -83,4 +84,9 @@ negative, force off."
 
 (provide 'ede/dired)
 
+;; Local variables:
+;; generated-autoload-file: "loaddefs.el"
+;; generated-autoload-load-name: "ede/dired"
+;; End:
+
 ;;; ede/dired.el ends here
index 10e84880ab62bdf560b2aba73add1edd1c818d26..8a5cbac41293b15d3b4ca1e82869b646dbf19393 100644 (file)
@@ -150,45 +150,47 @@ Completion options are calculated with `semantic-analyze-possible-completions'."
   :group 'semantic
   :type semantic-format-tag-custom-list)
 
-;; Disabled - see http://debbugs.gnu.org/14522
-;; ;;;###autoload
-;; (defun semantic-ia-complete-symbol-menu (point)
-;;   "Complete the current symbol via a menu based at POINT.
-;; Completion options are calculated with `semantic-analyze-possible-completions'."
-;;   (interactive "d")
-;;   (require 'imenu)
-;;   (let* ((a (semantic-analyze-current-context point))
-;;      (syms (semantic-analyze-possible-completions a))
-;;      )
-;;     ;; Complete this symbol.
-;;     (if (not syms)
-;;     (progn
-;;       (message "No smart completions found.  Trying Senator.")
-;;       (when (semantic-analyze-context-p a)
-;;         ;; This is a quick way of getting a nice completion list
-;;         ;; in the menu if the regular context mechanism fails.
-;;         (senator-completion-menu-popup)))
-;;
-;;       (let* ((menu
-;;           (mapcar
-;;            (lambda (tag)
-;;              (cons
-;;               (funcall semantic-ia-completion-menu-format-tag-function tag)
-;;               (vector tag)))
-;;            syms))
-;;          (ans
-;;           (imenu--mouse-menu
-;;            ;; XEmacs needs that the menu has at least 2 items.  So,
-;;            ;; include a nil item that will be ignored by imenu.
-;;            (cons nil menu)
-;;            (senator-completion-menu-point-as-event)
-;;            "Completions")))
-;;     (when ans
-;;       (if (not (semantic-tag-p ans))
-;;           (setq ans (aref (cdr ans) 0)))
-;;       (delete-region (car (oref a bounds)) (cdr (oref a bounds)))
-;;       (semantic-ia-insert-tag ans))
-;;     ))))
+;;;###autoload
+(defun semantic-ia-complete-symbol-menu (point)
+  "Complete the current symbol via a menu based at POINT.
+Completion options are calculated with `semantic-analyze-possible-completions'."
+  (interactive "d")
+  (require 'imenu)
+  (let* ((a (semantic-analyze-current-context point))
+        (syms (semantic-analyze-possible-completions a))
+        )
+    ;; Complete this symbol.
+    (if (not syms)
+       (progn
+         (message "No smart completions found.")
+          ;; Disabled - see http://debbugs.gnu.org/14522
+         ;; (message "No smart completions found.  Trying Senator.")
+         ;; (when (semantic-analyze-context-p a)
+         ;;   ;; This is a quick way of getting a nice completion list
+         ;;   ;; in the menu if the regular context mechanism fails.
+         ;;   (senator-completion-menu-popup))
+          )
+
+      (let* ((menu
+             (mapcar
+              (lambda (tag)
+                (cons
+                 (funcall semantic-ia-completion-menu-format-tag-function tag)
+                 (vector tag)))
+              syms))
+            (ans
+             (imenu--mouse-menu
+              ;; XEmacs needs that the menu has at least 2 items.  So,
+              ;; include a nil item that will be ignored by imenu.
+              (cons nil menu)
+              `(down-mouse-1 ,(posn-at-point))
+              "Completions")))
+       (when ans
+         (if (not (semantic-tag-p ans))
+             (setq ans (aref (cdr ans) 0)))
+         (delete-region (car (oref a bounds)) (cdr (oref a bounds)))
+         (semantic-ia-insert-tag ans))
+       ))))
 
 ;;; Completions Tip
 ;;
index 00e193d642e5512a5b6e65c138a9047bf9b5390a..da3782717c03c10fb9dad924d18cbcba613c633e 100644 (file)
@@ -746,11 +746,11 @@ The buffer name is made by surrounding the file name of PROGRAM with `*'s.
 The file name is used to make a symbol name, such as `comint-sh-hook', and any
 hooks on this symbol are run in the buffer.
 See `make-comint' and `comint-exec'."
+  (declare (interactive-only make-comint))
   (interactive "sRun program: ")
   (let ((name (file-name-nondirectory program)))
     (switch-to-buffer (make-comint name program))
     (run-hooks (intern-soft (concat "comint-" name "-hook")))))
-(put 'comint-run 'interactive-only 'make-comint)
 
 (defun comint-exec (buffer name command startfile switches)
   "Start up a process named NAME in buffer BUFFER for Comint modes.
@@ -1769,6 +1769,12 @@ If the Comint is Lucid Common Lisp,
 
 Similarly for Soar, Scheme, etc."
   (interactive)
+  ;; If we're currently completing, stop.  We're definitely done
+  ;; completing, and by sending the input, we might cause side effects
+  ;; that will confuse the code running in the completion
+  ;; post-command-hook.
+  (when completion-in-region-mode
+    (completion-in-region-mode -1))
   ;; Note that the input string does not include its terminal newline.
   (let ((proc (get-buffer-process (current-buffer))))
     (if (not proc) (user-error "Current buffer has no process")
index b46d41a0aa452969fed9cbaa7134a4b7bcb541ae..ca38c39cd6fb4393f30f939610cd4714d2daf9db 100644 (file)
@@ -671,6 +671,49 @@ All non-spacing characters have this function in
              (setq i (1+ i))))
          gstring))))))
 
+(defun compose-gstring-for-dotted-circle (gstring)
+  (let* ((dc (lgstring-glyph gstring 0)) ; glyph of dotted-circle
+        (dc-id (lglyph-code dc))
+        (fc (lgstring-glyph gstring 1)) ; glyph of the following char
+        (fc-id (lglyph-code fc))
+        (gstr (and nil (font-shape-gstring gstring))))
+    (if (and gstr
+            (or (= (lgstring-glyph-len gstr) 1)
+                (and (= (lgstring-glyph-len gstr) 2)
+                     (= (lglyph-to (lgstring-glyph gstr 0))
+                        (lglyph-to (lgstring-glyph gstr 1))))))
+       ;; It seems that font-shape-gstring has composed glyphs.
+       gstr
+      ;; Artificially compose the following glyph with the preceding
+      ;; dotted-circle.
+      (setq dc (lgstring-glyph gstring 0)
+           fc (lgstring-glyph gstring 1))
+      (let ((dc-width (lglyph-width dc))
+           (fc-width (- (lglyph-rbearing fc) (lglyph-lbearing fc)))
+           (from (lglyph-from dc))
+           (to (lglyph-to fc))
+           (xoff 0) (yoff 0) (width 0))
+       (if (and (< (lglyph-descent fc) 0)
+                (> (lglyph-ascent dc) (- (lglyph-descent fc))))
+           ;; Set YOFF so that the following glyph is put on top of
+           ;; the dotted-circle.
+           (setq yoff (- (- (lglyph-descent fc)) (lglyph-ascent dc))))
+       (if (> (lglyph-width fc) 0)
+           (setq xoff (- (lglyph-rbearing fc))))
+       (if (< dc-width fc-width)
+           ;; The following glyph is wider, but we don't know how to
+           ;; align both glyphs.  So, try the easiest method;
+           ;; i.e. align left edges of the glyphs.
+           (setq xoff (- xoff (- dc-width) (- (lglyph-lbearing fc )))
+                 width (- fc-width dc-width)))
+       (if (or (/= xoff 0) (/= yoff 0) (/= width 0) (/= (lglyph-width fc) 0))
+           (lglyph-set-adjustment fc xoff yoff width))
+       (lglyph-set-from-to dc from to)
+       (lglyph-set-from-to fc from to))
+      (if (> (lgstring-glyph-len gstring) 2)
+         (lgstring-set-glyph gstring 2 nil))
+      gstring)))
+
 ;; Allow for bootstrapping without uni-*.el.
 (when unicode-category-table
   (let ((elt `([,(purecopy "\\c.\\c^+") 1 compose-gstring-for-graphic]
@@ -679,7 +722,10 @@ All non-spacing characters have this function in
      #'(lambda (key val)
         (if (memq val '(Mn Mc Me))
             (set-char-table-range composition-function-table key elt)))
-     unicode-category-table)))
+     unicode-category-table))
+  ;; for dotted-circle
+  (aset composition-function-table #x25CC
+       `([,(purecopy ".\\c^") 0 compose-gstring-for-dotted-circle])))
 
 (defun compose-gstring-for-terminal (gstring)
   "Compose glyph-string GSTRING for terminal display.
index 2da67112bd3deced694ee5af16b9cb6bdf8801e7..d4795bfe6a5e138c4db5a7d230a088b644ed2faf 100644 (file)
@@ -198,6 +198,8 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
 
             ;; editfns.c
             (user-full-name mail string)
+            ;; emacs.c
+            (report-emacs-bug-address emacsbug string)
             ;; eval.c
             (max-specpdl-size limits integer)
             (max-lisp-eval-depth limits integer)
@@ -317,7 +319,7 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
             (enable-recursive-minibuffers minibuffer boolean)
             (history-length minibuffer
                             (choice (const :tag "Infinite" t) integer)
-                            "22.1")
+                            "24.5")    ; 30 -> 100
             (history-delete-duplicates minibuffer boolean "22.1")
             (read-buffer-completion-ignore-case minibuffer boolean "23.1")
 
@@ -402,7 +404,8 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
             (ns-antialias-text ns boolean "23.1")
             (ns-auto-hide-menu-bar ns boolean "24.1")
             (ns-use-native-fullscreen ns boolean "24.4")
-            (ns-use-srgb-colorspace ns boolean "24.4")
+             (ns-use-fullscreen-animation ns boolean "25.1")
+             (ns-use-srgb-colorspace ns boolean "24.4")
             ;; process.c
             (delete-exited-processes processes-basics boolean)
             ;; syntax.c
index b1d5f4e53b09b1e2cbd8cf806f53f2b055ed2302..bb93cce6500a04df4fcaf094e2c5076af7dc5ea7 100644 (file)
@@ -1,7 +1,7 @@
 ;;; dired-aux.el --- less commonly used parts of dired
 
-;; Copyright (C) 1985-1986, 1992, 1994, 1998, 2000-2014 Free Software
-;; Foundation, Inc.
+;; Copyright (C) 1985-1986, 1992, 1994, 1998, 2000-2014
+;;   Free Software Foundation, Inc.
 
 ;; Author: Sebastian Kremer <sk@thp.uni-koeln.de>.
 ;; Maintainer: emacs-devel@gnu.org
@@ -215,19 +215,24 @@ condition.  Two file items are considered to match if they are equal
       (dolist (file1 list1)
        (unless (let ((list list2))
                  (while (and list
-                             (not (let* ((file2 (car list))
-                                         (fa1 (car (cddr file1)))
-                                         (fa2 (car (cddr file2)))
-                                         (size1 (nth 7 fa1))
-                                         (size2 (nth 7 fa2))
-                                         (mtime1 (float-time (nth 5 fa1)))
-                                         (mtime2 (float-time (nth 5 fa2))))
-                                    (and
-                                     (equal (car file1) (car file2))
-                                     (not (eval predicate))))))
+                             (let* ((file2 (car list))
+                                     (fa1 (car (cddr file1)))
+                                     (fa2 (car (cddr file2))))
+                                (or
+                                 (not (equal (car file1) (car file2)))
+                                 (eval predicate
+                                       `((fa1 . ,fa1)
+                                         (fa2 . ,fa2)
+                                         (size1 . ,(nth 7 fa1))
+                                         (size2 . ,(nth 7 fa2))
+                                         (mtime1
+                                          . ,(float-time (nth 5 fa1)))
+                                         (mtime2
+                                          . ,(float-time (nth 5 fa2)))
+                                         )))))
                    (setq list (cdr list)))
                  list)
-         (setq res (cons file1 res))))
+         (push file1 res)))
       (nreverse res))))
 
 (defun dired-files-attributes (dir)
@@ -1921,8 +1926,9 @@ Type SPC or `y' to %s one match, DEL or `n' to skip to next,
         (arg
          (if whole-name nil current-prefix-arg))
         (regexp
-         (dired-read-regexp
-          (concat (if whole-name "Abs. " "") operation " from (regexp): ")))
+         (read-regexp
+          (concat (if whole-name "Abs. " "") operation " from (regexp): ")
+          nil 'dired-regexp-history))
         (newname
          (read-string
           (concat (if whole-name "Abs. " "") operation " " regexp " to: "))))
index 947de7cd9f8d7ba5310404b3be312db488b48991..25c6f8b69af534f308259a0cfe315fa4fbd4b811 100644 (file)
@@ -1,7 +1,6 @@
 ;;; dired-x.el --- extra Dired functionality  -*- lexical-binding:t -*-
 
-;; Copyright (C) 1993-1994, 1997, 2001-2014 Free Software Foundation,
-;; Inc.
+;; Copyright (C) 1993-1994, 1997, 2001-2014 Free Software Foundation, Inc.
 
 ;; Author: Sebastian Kremer <sk@thp.uni-koeln.de>
 ;;     Lawrence R. Dodd <dodd@roebling.poly.edu>
@@ -556,8 +555,9 @@ interactively, prompt for REGEXP.
 With prefix argument, unflag all those files.
 Optional fourth argument LOCALP is as in `dired-get-filename'."
   (interactive
-   (list (dired-read-regexp
-         "Mark unmarked files matching regexp (default all): ")
+   (list (read-regexp
+         "Mark unmarked files matching regexp (default all): "
+          nil 'dired-regexp-history)
         nil current-prefix-arg nil))
   (let ((dired-marker-char (if unflag-p ?\s dired-marker-char)))
     (dired-mark-if
index 60f8c1e9dfc6414c4c1efb12401de658a29878c9..4cc252c7492c45c8d559b62ff079bc853c0a1da7 100644 (file)
@@ -1,7 +1,7 @@
 ;;; dired.el --- directory-browsing commands -*- lexical-binding: t -*-
 
-;; Copyright (C) 1985-1986, 1992-1997, 2000-2014 Free Software
-;; Foundation, Inc.
+;; Copyright (C) 1985-1986, 1992-1997, 2000-2014
+;;   Free Software Foundation, Inc.
 
 ;; Author: Sebastian Kremer <sk@thp.uni-koeln.de>
 ;; Maintainer: emacs-devel@gnu.org
@@ -1912,7 +1912,7 @@ Type \\[dired-mark] to Mark a file or subdirectory for later commands.
   to see why something went wrong.
 Type \\[dired-unmark] to Unmark a file or all files of an inserted subdirectory.
 Type \\[dired-unmark-backward] to back up one line and unmark or unflag.
-Type \\[dired-do-flagged-delete] to delete (eXecute) the files flagged `D'.
+Type \\[dired-do-flagged-delete] to delete (eXpunge) the files flagged `D'.
 Type \\[dired-find-file] to Find the current line's file
   (or dired it in another buffer, if it is a directory).
 Type \\[dired-find-file-other-window] to find file or Dired directory in Other window.
@@ -3103,20 +3103,20 @@ argument or confirmation)."
          ;; Mark *Marked Files* window as softly-dedicated, to prevent
          ;; other buffers e.g. *Completions* from reusing it (bug#17554).
          (display-buffer-mark-dedicated 'soft))
-      (with-current-buffer buffer
-       (with-current-buffer-window
-        buffer
-        (cons 'display-buffer-below-selected
-              '((window-height . fit-window-to-buffer)))
-        #'(lambda (window _value)
-            (with-selected-window window
-              (unwind-protect
-                  (apply function args)
-                (when (window-live-p window)
-                  (quit-restore-window window 'kill)))))
-        ;; Handle (t FILE) just like (FILE), here.  That value is
-        ;; used (only in some cases), to mean just one file that was
-        ;; marked, rather than the current line file.
+      (with-displayed-buffer-window
+       buffer
+       (cons 'display-buffer-below-selected
+            '((window-height . fit-window-to-buffer)))
+       #'(lambda (window _value)
+          (with-selected-window window
+            (unwind-protect
+                (apply function args)
+              (when (window-live-p window)
+                (quit-restore-window window 'kill)))))
+       ;; Handle (t FILE) just like (FILE), here.  That value is
+       ;; used (only in some cases), to mean just one file that was
+       ;; marked, rather than the current line file.
+       (with-current-buffer buffer
         (dired-format-columns-of-files
          (if (eq (car files) t) (cdr files) files))
         (remove-text-properties (point-min) (point-max)
@@ -3302,6 +3302,7 @@ As always, hidden subdirs are not affected."
 
 (defun dired-read-regexp (prompt &optional default history)
   "Read a regexp using `read-regexp'."
+  (declare (obsolete read-regexp "24.5"))
   (read-regexp prompt default (or history 'dired-regexp-history)))
 
 (defun dired-mark-files-regexp (regexp &optional marker-char)
@@ -3312,8 +3313,9 @@ A prefix argument means to unmark them instead.
 REGEXP is an Emacs regexp, not a shell wildcard.  Thus, use `\\.o$' for
 object files--just `.o' will mark more than you might think."
   (interactive
-   (list (dired-read-regexp (concat (if current-prefix-arg "Unmark" "Mark")
-                                   " files (regexp): "))
+   (list (read-regexp (concat (if current-prefix-arg "Unmark" "Mark")
+                              " files (regexp): ")
+                      nil 'dired-regexp-history)
         (if current-prefix-arg ?\040)))
   (let ((dired-marker-char (or marker-char dired-marker-char)))
     (dired-mark-if
@@ -3328,8 +3330,9 @@ object files--just `.o' will mark more than you might think."
 A prefix argument means to unmark them instead.
 `.' and `..' are never marked."
   (interactive
-   (list (dired-read-regexp (concat (if current-prefix-arg "Unmark" "Mark")
-                                   " files containing (regexp): "))
+   (list (read-regexp (concat (if current-prefix-arg "Unmark" "Mark")
+                              " files containing (regexp): ")
+                      nil 'dired-regexp-history)
         (if current-prefix-arg ?\040)))
   (let ((dired-marker-char (or marker-char dired-marker-char)))
     (dired-mark-if
@@ -3359,7 +3362,8 @@ A prefix argument means to unmark them instead.
 The match is against the non-directory part of the filename.  Use `^'
   and `$' to anchor matches.  Exclude subdirs by hiding them.
 `.' and `..' are never flagged."
-  (interactive (list (dired-read-regexp "Flag for deletion (regexp): ")))
+  (interactive (list (read-regexp "Flag for deletion (regexp): "
+                                  nil 'dired-regexp-history)))
   (dired-mark-files-regexp regexp dired-del-marker))
 
 (defun dired-mark-symlinks (unflag-p)
@@ -3879,7 +3883,7 @@ Ask means pop up a menu for the user to select one of copy, move or link."
 \f
 ;;; Start of automatically extracted autoloads.
 \f
-;;;### (autoloads nil "dired-aux" "dired-aux.el" "1a8e2a4a9117ab3a2586aa001358d3fb")
+;;;### (autoloads nil "dired-aux" "dired-aux.el" "1448837b5f3e2b9ad63f723361f1e32e")
 ;;; Generated autoloads from dired-aux.el
 
 (autoload 'dired-diff "dired-aux" "\
@@ -4382,7 +4386,7 @@ instead.
 
 ;;;***
 \f
-;;;### (autoloads nil "dired-x" "dired-x.el" "291bc6e869bf72c900604c45d40f45ed")
+;;;### (autoloads nil "dired-x" "dired-x.el" "994b5d9fc38059ab641ec271c728e56f")
 ;;; Generated autoloads from dired-x.el
 
 (autoload 'dired-jump "dired-x" "\
index 7d5f1e771d59535f32d86bffad2ab68666dd6a6a..9458cace74ec9d59e606dc16388b2457d6759b13 100644 (file)
@@ -336,7 +336,7 @@ of the page moves to the previous page."
       ;; Don't do it if there's a conversion is running, since in that case, it
       ;; will be done later.
       (with-selected-window (car winprops)
-        (doc-view-goto-page 1)))))
+        (doc-view-goto-page (image-mode-window-get 'page t))))))
 
 (defvar-local doc-view--current-files nil
   "Only used internally.")
@@ -654,16 +654,10 @@ at the top edge of the page moves to the previous page."
 
 (defun doc-view-make-safe-dir (dir)
   (condition-case nil
-      (let ((umask (default-file-modes)))
-       (unwind-protect
-           (progn
-             ;; Create temp files with strict access rights.  It's easy to
-             ;; loosen them later, whereas it's impossible to close the
-             ;; time-window of loose permissions otherwise.
-             (set-default-file-modes #o0700)
-             (make-directory dir))
-         ;; Reset the umask.
-         (set-default-file-modes umask)))
+      ;; Create temp files with strict access rights.  It's easy to
+      ;; loosen them later, whereas it's impossible to close the
+      ;; time-window of loose permissions otherwise.
+      (with-file-modes #o0700 (make-directory dir))
     (file-already-exists
      (when (file-symlink-p dir)
        (error "Danger: %s points to a symbolic link" dir))
@@ -1622,24 +1616,25 @@ If BACKWARD is non-nil, jump to the previous match."
   "Figure out the current document type (`doc-view-doc-type')."
   (let ((name-types
         (when buffer-file-name
-          (cdr (assoc (file-name-extension buffer-file-name)
-                      '(
-                        ;; DVI
-                        ("dvi" dvi)
-                        ;; PDF
-                        ("pdf" pdf) ("epdf" pdf)
-                        ;; PostScript
-                        ("ps" ps) ("eps" ps)
-                        ;; DjVu
-                        ("djvu" djvu)
-                        ;; OpenDocument formats
-                        ("odt" odf) ("ods" odf) ("odp" odf) ("odg" odf)
-                        ("odc" odf) ("odi" odf) ("odm" odf) ("ott" odf)
-                        ("ots" odf) ("otp" odf) ("otg" odf)
-                        ;; Microsoft Office formats (also handled
-                        ;; by the odf conversion chain)
-                        ("doc" odf) ("docx" odf) ("xls" odf) ("xlsx" odf)
-                        ("ppt" odf) ("pptx" odf))))))
+          (cdr (assoc-ignore-case
+                 (file-name-extension buffer-file-name)
+                 '(
+                   ;; DVI
+                   ("dvi" dvi)
+                   ;; PDF
+                   ("pdf" pdf) ("epdf" pdf)
+                   ;; PostScript
+                   ("ps" ps) ("eps" ps)
+                   ;; DjVu
+                   ("djvu" djvu)
+                   ;; OpenDocument formats.
+                   ("odt" odf) ("ods" odf) ("odp" odf) ("odg" odf)
+                   ("odc" odf) ("odi" odf) ("odm" odf) ("ott" odf)
+                   ("ots" odf) ("otp" odf) ("otg" odf)
+                   ;; Microsoft Office formats (also handled by the odf
+                   ;; conversion chain).
+                   ("doc" odf) ("docx" odf) ("xls" odf) ("xlsx" odf)
+                   ("ppt" odf) ("pps" odf) ("pptx" odf))))))
        (content-types
         (save-excursion
           (goto-char (point-min))
index bf73dbb256ffed59aab58a051cd792e5133a4d0f..4bf5963e17517208a9b9cba8164f7f9cdf6810cb 100644 (file)
@@ -368,7 +368,7 @@ newline after CHAR but stay in the same place.")
                (setq pos (electric--after-char-pos))
                ;; Not in a string or comment.
                (not (nth 8 (save-excursion (syntax-ppss pos)))))
-      (let ((end (copy-marker (point)))
+      (let ((end (point-marker))
             (sym (if (functionp rule) (funcall rule) rule)))
         (set-marker-insertion-type end (not (eq sym 'after-stay)))
         (goto-char pos)
index 361e8fa7c6827f397ba8b2cd9197f606105dd15b..38956df66de4d2148ab3d7e3cfcba2657b7cd76a 100644 (file)
@@ -351,9 +351,26 @@ not be relied upon."
            ";;; " basename
            " ends here\n")))
 
+(defvar autoload-ensure-writable nil
+  "Non-nil means `autoload-ensure-default-file' makes existing file writable.")
+;; Just in case someone tries to get you to overwrite a file that you
+;; don't want to.
+;;;###autoload
+(put 'autoload-ensure-writable 'risky-local-variable t)
+
 (defun autoload-ensure-default-file (file)
-  "Make sure that the autoload file FILE exists and if not create it."
-  (unless (file-exists-p file)
+  "Make sure that the autoload file FILE exists, creating it if needed.
+If the file already exists and `autoload-ensure-writable' is non-nil,
+make it writable."
+  (if (file-exists-p file)
+      ;; Probably pointless, but replaces the old AUTOGEN_VCS in lisp/Makefile,
+      ;; which was designed to handle CVSREAD=1 and equivalent.
+      (and autoload-ensure-writable
+          (let ((modes (file-modes file)))
+            (if (zerop (logand modes #o0200))
+                ;; Ignore any errors here, and let subsequent attempts
+                ;; to write the file raise any real error.
+                (ignore-errors (set-file-modes file (logior modes #o0200))))))
     (write-region (autoload-rubric file) nil file))
   file)
 
index fe6640cc51ee34d8129a11d4dfa9eb5880b7fbf7..ee0a5a11c7b69591d304c0838af8c2fab616e5e7 100644 (file)
       form
     (nth 1 form)))
 
-(defun byte-optimize-zerop (form)
-  (cond ((numberp (nth 1 form))
-        (eval form))
-       (byte-compile-delete-errors
-        (list '= (nth 1 form) 0))
-       (form)))
-
-(put 'zerop 'byte-optimizer 'byte-optimize-zerop)
-
 (defun byte-optimize-and (form)
   ;; Simplify if less than 2 args.
   ;; if there is a literal nil in the args to `and', throw it and following
index 4b9e6d8fd231c3bf6f62495c67d0948c13fce64b..0edcf6197b4e72613b3ae8333deaa36d59edbc53 100644 (file)
 
 ;;; Code:
 
+(defalias 'function-put
+  ;; We don't want people to just use `put' because we can't conveniently
+  ;; hook into `put' to remap old properties to new ones.  But for now, there's
+  ;; no such remapping, so we just call `put'.
+  #'(lambda (f prop value) (put f prop value))
+  "Set function F's property PROP to VALUE.
+The namespace for PROP is shared with symbols.
+So far, F can only be a symbol, not a lambda expression.")
+(function-put 'defmacro 'doc-string-elt 3)
+(function-put 'defmacro 'lisp-indent-function 2)
+
 ;; `macro-declaration-function' are both obsolete (as marked at the end of this
 ;; file) but used in many .elc files.
 
@@ -69,6 +80,7 @@ The return value of this function is not used."
 ;; handle declarations in macro definitions and this is the first file
 ;; loaded by loadup.el that uses declarations in macros.
 
+;; Add any new entries to info node `(elisp)Declare Form'.
 (defvar defun-declarations-alist
   (list
    ;; We can only use backquotes inside the lambdas and not for those
@@ -81,27 +93,47 @@ The return value of this function is not used."
          #'(lambda (f _args new-name when)
              (list 'make-obsolete
                    (list 'quote f) (list 'quote new-name) (list 'quote when))))
+   (list 'interactive-only
+         #'(lambda (f _args instead)
+             (list 'function-put (list 'quote f)
+                   ''interactive-only (list 'quote instead))))
+   ;; FIXME: Merge `pure' and `side-effect-free'.
+   (list 'pure
+         #'(lambda (f _args val)
+             (list 'function-put (list 'quote f)
+                   ''pure (list 'quote val)))
+         "If non-nil, the compiler can replace calls with their return value.
+This may shift errors from run-time to compile-time.")
+   (list 'side-effect-free
+         #'(lambda (f _args val)
+             (list 'function-put (list 'quote f)
+                   ''side-effect-free (list 'quote val)))
+         "If non-nil, calls can be ignored if their value is unused.
+If `error-free', drop calls even if `byte-compile-delete-errors' is nil.")
    (list 'compiler-macro
          #'(lambda (f args compiler-function)
              `(eval-and-compile
-                (put ',f 'compiler-macro
-                     ,(if (eq (car-safe compiler-function) 'lambda)
-                          `(lambda ,(append (cadr compiler-function) args)
-                             ,@(cddr compiler-function))
-                        `#',compiler-function)))))
+                (function-put ',f 'compiler-macro
+                              ,(if (eq (car-safe compiler-function) 'lambda)
+                                   `(lambda ,(append (cadr compiler-function) args)
+                                      ,@(cddr compiler-function))
+                                 `#',compiler-function)))))
    (list 'doc-string
          #'(lambda (f _args pos)
-             (list 'put (list 'quote f) ''doc-string-elt (list 'quote pos))))
+             (list 'function-put (list 'quote f)
+                   ''doc-string-elt (list 'quote pos))))
    (list 'indent
          #'(lambda (f _args val)
-             (list 'put (list 'quote f)
+             (list 'function-put (list 'quote f)
                    ''lisp-indent-function (list 'quote val)))))
   "List associating function properties to their macro expansion.
 Each element of the list takes the form (PROP FUN) where FUN is
 a function.  For each (PROP . VALUES) in a function's declaration,
 the FUN corresponding to PROP is called with the function name,
 the function's arglist, and the VALUES and should return the code to use
-to set this property.")
+to set this property.
+
+This is used by `declare'.")
 
 (defvar macro-declarations-alist
   (cons
@@ -115,10 +147,10 @@ to set this property.")
 Each element of the list takes the form (PROP FUN) where FUN is a function.
 For each (PROP . VALUES) in a macro's declaration, the FUN corresponding
 to PROP is called with the macro name, the macro's arglist, and the VALUES
-and should return the code to use to set this property.")
+and should return the code to use to set this property.
+
+This is used by `declare'.")
 
-(put 'defmacro 'doc-string-elt 3)
-(put 'defmacro 'lisp-indent-function 2)
 (defalias 'defmacro
   (cons
    'macro
@@ -218,7 +250,8 @@ The return value is undefined.
                                  (cons arglist body))))))
       (if declarations
           (cons 'prog1 (cons def declarations))
-        def))))
+          def))))
+
 \f
 ;; Redefined in byte-optimize.el.
 ;; This is not documented--it's not clear that we should promote it.
@@ -389,13 +422,20 @@ If you think you need this, you're probably making a mistake somewhere."
 
 (defmacro eval-when-compile (&rest body)
   "Like `progn', but evaluates the body at compile time if you're compiling.
-Thus, the result of the body appears to the compiler as a quoted constant.
-In interpreted code, this is entirely equivalent to `progn'."
+Thus, the result of the body appears to the compiler as a quoted
+constant.  In interpreted code, this is entirely equivalent to
+`progn', except that the value of the expression may be (but is
+not necessarily) computed at load time if eager macro expansion
+is enabled."
   (declare (debug (&rest def-form)) (indent 0))
   (list 'quote (eval (cons 'progn body) lexical-binding)))
 
 (defmacro eval-and-compile (&rest body)
-  "Like `progn', but evaluates the body at compile time and at load time."
+  "Like `progn', but evaluates the body at compile time and at
+load time.  In interpreted code, this is entirely equivalent to
+`progn', except that the value of the expression may be (but is
+not necessarily) computed at load time if eager macro expansion
+is enabled."
   (declare (debug t) (indent 0))
   ;; When the byte-compiler expands code, this macro is not used, so we're
   ;; either about to run `body' (plain interpretation) or we're doing eager
index e5f8a8cc22ab4ec2e8a058358191e240e08f0946..0e96ba93f442ab7cb56abcd2c111c9ce69a20f72 100644 (file)
@@ -421,31 +421,46 @@ Filled in `cconv-analyse-form' but initialized and consulted here.")
 
 (defvar byte-compiler-error-flag)
 
+(defun byte-compile-recurse-toplevel (form non-toplevel-case)
+  "Implement `eval-when-compile' and `eval-and-compile'.
+Return the compile-time value of FORM."
+  ;; Macroexpand (not macroexpand-all!) form at toplevel in case it
+  ;; expands into a toplevel-equivalent `progn'.  See CLHS section
+  ;; 3.2.3.1, "Processing of Top Level Forms".  The semantics are very
+  ;; subtle: see test/automated/bytecomp-tests.el for interesting
+  ;; cases.
+  (setf form (macroexpand form byte-compile-macro-environment))
+  (if (eq (car-safe form) 'progn)
+      (cons 'progn
+            (mapcar (lambda (subform)
+                      (byte-compile-recurse-toplevel
+                       subform non-toplevel-case))
+                    (cdr form)))
+    (funcall non-toplevel-case form)))
+
 (defconst byte-compile-initial-macro-environment
-  '(
+  `(
     ;; (byte-compiler-options . (lambda (&rest forms)
     ;;                        (apply 'byte-compiler-options-handler forms)))
     (declare-function . byte-compile-macroexpand-declare-function)
-    (eval-when-compile . (lambda (&rest body)
-                          (list
-                           'quote
-                           (byte-compile-eval
-                             (byte-compile-top-level
-                              (byte-compile-preprocess (cons 'progn body)))))))
-    (eval-and-compile . (lambda (&rest body)
-                          ;; Byte compile before running it.  Do it piece by
-                          ;; piece, in case further expressions need earlier
-                          ;; ones to be evaluated already, as is the case in
-                          ;; eieio.el.
-                          `(progn
-                             ,@(mapcar (lambda (exp)
-                                         (let ((cexp
-                                                (byte-compile-top-level
-                                                 (byte-compile-preprocess
-                                                  exp))))
-                                           (eval cexp)
-                                           cexp))
-                                       body)))))
+    (eval-when-compile . ,(lambda (&rest body)
+                                  (let ((result nil))
+                                    (byte-compile-recurse-toplevel
+                                     (cons 'progn body)
+                                     (lambda (form)
+                                       (setf result
+                                             (byte-compile-eval
+                                              (byte-compile-top-level
+                                               (byte-compile-preprocess form))))))
+                                    (list 'quote result))))
+    (eval-and-compile . ,(lambda (&rest body)
+                                 (byte-compile-recurse-toplevel
+                                  (cons 'progn body)
+                                  (lambda (form)
+                                    (let ((compiled (byte-compile-top-level
+                                                     (byte-compile-preprocess form))))
+                                      (eval compiled lexical-binding)
+                                      compiled))))))
   "The default macro-environment passed to macroexpand by the compiler.
 Placing a macro here will cause a macro to have different semantics when
 expanded by the compiler as when expanded by the interpreter.")
@@ -2198,9 +2213,12 @@ list that represents a doc string reference.
    (t form)))
 
 ;; byte-hunk-handlers cannot call this!
-(defun byte-compile-toplevel-file-form (form)
-  (let ((byte-compile-current-form nil))       ; close over this for warnings.
-    (byte-compile-file-form (byte-compile-preprocess form t))))
+(defun byte-compile-toplevel-file-form (top-level-form)
+  (byte-compile-recurse-toplevel
+   top-level-form
+   (lambda (form)
+     (let ((byte-compile-current-form nil)) ; close over this for warnings.
+       (byte-compile-file-form (byte-compile-preprocess form t))))))
 
 ;; byte-hunk-handlers can call this.
 (defun byte-compile-file-form (form)
@@ -2503,7 +2521,8 @@ If QUOTED is non-nil, print with quoting; otherwise, print without quoting."
   "Return an expression which will evaluate to a function value FUN.
 FUN should be either a `lambda' value or a `closure' value."
   (pcase-let* (((or (and `(lambda ,args . ,body) (let env nil))
-                    `(closure ,env ,args . ,body)) fun)
+                    `(closure ,env ,args . ,body))
+                fun)
                (renv ()))
     ;; Turn the function's closed vars (if any) into local let bindings.
     (dolist (binding env)
@@ -2705,7 +2724,9 @@ for symbols generated by the byte compiler itself."
               ;; byte-string, constants-vector, stack depth
               (cdr compiled)
               ;; optionally, the doc string.
-              (cond (lexical-binding
+              (cond ((and lexical-binding arglist)
+                     ;; byte-compile-make-args-desc lost the args's names,
+                     ;; so preserve them in the docstring.
                      (list (help-add-fundoc-usage doc arglist)))
                     ((or doc int)
                      (list doc)))
@@ -2942,8 +2963,11 @@ for symbols generated by the byte compiler itself."
                                            interactive-only))
                                   (t "."))))
         (if (eq (car-safe (symbol-function (car form))) 'macro)
-            (byte-compile-log-warning
-             (format "Forgot to expand macro %s" (car form)) nil :error))
+            (progn
+              (debug)
+              (byte-compile-log-warning
+               (format "Forgot to expand macro %s in %S" (car form) form)
+               nil :error)))
         (if (and handler
                  ;; Make sure that function exists.
                  (and (functionp handler)
@@ -4048,7 +4072,6 @@ binding slots have been popped."
 (byte-defop-compiler-1 save-restriction)
 ;; (byte-defop-compiler-1 save-window-excursion)      ;Obsolete: now a macro.
 ;; (byte-defop-compiler-1 with-output-to-temp-buffer) ;Obsolete: now a macro.
-(byte-defop-compiler-1 track-mouse)
 
 (defvar byte-compile--use-old-handlers t
   "If nil, use new byte codes introduced in Emacs-24.4.")
@@ -4083,12 +4106,6 @@ binding slots have been popped."
   (byte-compile-form-do-effect (car (cdr form)))
   (byte-compile-out 'byte-unbind 1))
 
-(defun byte-compile-track-mouse (form)
-  (byte-compile-form
-   (pcase form
-     (`(,_ :fun-body ,f) `(eval (list 'track-mouse (list 'funcall ,f))))
-     (_ `(eval '(track-mouse ,@(byte-compile-top-level-body (cdr form))))))))
-
 (defun byte-compile-condition-case (form)
   (if byte-compile--use-old-handlers
       (byte-compile-condition-case--old form)
index 40f1531e0f70a115aeccdb2f8a23270838ba4e9b..98eef11a6584b9abc4b5de4f476a6cfe15bb1b17 100644 (file)
@@ -462,10 +462,6 @@ places where they originally did not directly appear."
      `(,head ,(cconv-convert form env extend)
         :fun-body ,(cconv--convert-function () body env form)))
 
-    (`(track-mouse . ,body)
-     `(track-mouse
-        :fun-body ,(cconv--convert-function () body env form)))
-
     (`(setq . ,forms)                   ; setq special form
      (let ((prognlist ()))
        (while forms
@@ -701,11 +697,6 @@ and updates the data stored in ENV."
      (cconv-analyse-form form env)
      (cconv--analyse-function () body env form))
 
-    ;; FIXME: The lack of bytecode for track-mouse forces us to wrap the body.
-    ;; `track-mouse' really should be made into a macro.
-    (`(track-mouse . ,body)
-     (cconv--analyse-function () body env form))
-
     (`(defvar ,var) (push var byte-compile-bound-variables))
     (`(,(or `defconst `defvar) ,var ,value . ,_)
      (push var byte-compile-bound-variables)
index 9b28289e0b92aee5d21f9e9af436f05ad27543b3..a7970261608c2a2fb352dee8ad231cefba83066e 100644 (file)
@@ -269,43 +269,20 @@ If so, return the true (non-nil) value returned by PREDICATE.
 ;;;###autoload
 (defun cl--map-overlays (cl-func &optional cl-buffer cl-start cl-end cl-arg)
   (or cl-buffer (setq cl-buffer (current-buffer)))
-  (if (fboundp 'overlay-lists)
-
-      ;; This is the preferred algorithm, though overlay-lists is undocumented.
-      (let (cl-ovl)
-       (with-current-buffer cl-buffer
-         (setq cl-ovl (overlay-lists))
-         (if cl-start (setq cl-start (copy-marker cl-start)))
-         (if cl-end (setq cl-end (copy-marker cl-end))))
-       (setq cl-ovl (nconc (car cl-ovl) (cdr cl-ovl)))
-       (while (and cl-ovl
-                   (or (not (overlay-start (car cl-ovl)))
-                       (and cl-end (>= (overlay-start (car cl-ovl)) cl-end))
-                       (and cl-start (<= (overlay-end (car cl-ovl)) cl-start))
-                       (not (funcall cl-func (car cl-ovl) cl-arg))))
-         (setq cl-ovl (cdr cl-ovl)))
-       (if cl-start (set-marker cl-start nil))
-       (if cl-end (set-marker cl-end nil)))
-
-    ;; This alternate algorithm fails to find zero-length overlays.
-    (let ((cl-mark (with-current-buffer cl-buffer
-                    (copy-marker (or cl-start (point-min)))))
-         (cl-mark2 (and cl-end (with-current-buffer cl-buffer
-                                 (copy-marker cl-end))))
-         cl-pos cl-ovl)
-      (while (save-excursion
-              (and (setq cl-pos (marker-position cl-mark))
-                   (< cl-pos (or cl-mark2 (point-max)))
-                   (progn
-                     (set-buffer cl-buffer)
-                     (setq cl-ovl (overlays-at cl-pos))
-                     (set-marker cl-mark (next-overlay-change cl-pos)))))
-       (while (and cl-ovl
-                   (or (/= (overlay-start (car cl-ovl)) cl-pos)
-                       (not (and (funcall cl-func (car cl-ovl) cl-arg)
-                                 (set-marker cl-mark nil)))))
-         (setq cl-ovl (cdr cl-ovl))))
-      (set-marker cl-mark nil) (if cl-mark2 (set-marker cl-mark2 nil)))))
+  (let (cl-ovl)
+    (with-current-buffer cl-buffer
+      (setq cl-ovl (overlay-lists))
+      (if cl-start (setq cl-start (copy-marker cl-start)))
+      (if cl-end (setq cl-end (copy-marker cl-end))))
+    (setq cl-ovl (nconc (car cl-ovl) (cdr cl-ovl)))
+    (while (and cl-ovl
+               (or (not (overlay-start (car cl-ovl)))
+                   (and cl-end (>= (overlay-start (car cl-ovl)) cl-end))
+                   (and cl-start (<= (overlay-end (car cl-ovl)) cl-start))
+                   (not (funcall cl-func (car cl-ovl) cl-arg))))
+      (setq cl-ovl (cdr cl-ovl)))
+    (if cl-start (set-marker cl-start nil))
+    (if cl-end (set-marker cl-end nil))))
 
 ;;; Support for `setf'.
 ;;;###autoload
@@ -406,6 +383,42 @@ With two arguments, return rounding and remainder of their quotient."
   "Return 1 if X is positive, -1 if negative, 0 if zero."
   (cond ((> x 0) 1) ((< x 0) -1) (t 0)))
 
+;;;###autoload
+(cl-defun cl-parse-integer (string &key start end radix junk-allowed)
+  "Parse integer from the substring of STRING from START to END.
+STRING may be surrounded by whitespace chars (chars with syntax ` ').
+Other non-digit chars are considered junk.
+RADIX is an integer between 2 and 36, the default is 10.  Signal
+an error if the substring between START and END cannot be parsed
+as an integer unless JUNK-ALLOWED is non-nil."
+  (cl-check-type string string)
+  (let* ((start (or start 0))
+        (len   (length string))
+        (end   (or end len))
+        (radix (or radix 10)))
+    (or (<= start end len)
+       (error "Bad interval: [%d, %d)" start end))
+    (cl-flet ((skip-whitespace ()
+               (while (and (< start end)
+                           (= 32 (char-syntax (aref string start))))
+                 (setq start (1+ start)))))
+      (skip-whitespace)
+      (let ((sign (cl-case (and (< start end) (aref string start))
+                   (?+ (cl-incf start) +1)
+                   (?- (cl-incf start) -1)
+                   (t  +1)))
+           digit sum)
+       (while (and (< start end)
+                   (setq digit (cl-digit-char-p (aref string start) radix)))
+         (setq sum (+ (* (or sum 0) radix) digit)
+               start (1+ start)))
+       (skip-whitespace)
+       (cond ((and junk-allowed (null sum)) sum)
+             (junk-allowed (* sign sum))
+             ((or (/= start end) (null sum))
+              (error "Not an integer string: `%s'" string))
+             (t (* sign sum)))))))
+
 
 ;; Random numbers.
 
@@ -634,6 +647,13 @@ PROPLIST is a list of the sort returned by `symbol-plist'.
        (progn (setplist sym (cdr (cdr plist))) t)
       (cl--do-remf plist tag))))
 
+;;; Streams.
+
+;;;###autoload
+(defun cl-fresh-line (&optional stream)
+  "Output a newline unless already at the beginning of a line."
+  (terpri stream 'ensure))
+
 ;;; Some debugging aids.
 
 (defun cl-prettyprint (form)
index 6c62ce5c8309b9c10ae34d5b2140c4ac2e6cceae..2d8a1c4c1c25b2ece44309709f2fd3638e99839d 100644 (file)
@@ -27,6 +27,8 @@
 
 ;; This package supplies a single entry point, common-lisp-indent-function,
 ;; which performs indentation in the preferred style for Common Lisp code.
+;; It is also a suitable function for indenting Emacs lisp code.
+;;
 ;; To enable it:
 ;;
 ;; (setq lisp-indent-function 'common-lisp-indent-function)
@@ -154,6 +156,15 @@ is set to `defun'.")
        (looking-at "\\sw"))
     (error t)))
 
+(defun lisp-indent-find-method (symbol &optional no-compat)
+  "Find the lisp indentation function for SYMBOL.
+If NO-COMPAT is non-nil, do not retrieve indenters intended for
+the standard lisp indent package."
+  (or (and (derived-mode-p 'emacs-lisp-mode)
+           (get symbol 'common-lisp-indent-function-for-elisp))
+      (get symbol 'common-lisp-indent-function)
+      (and (not no-compat)
+           (get symbol 'lisp-indent-function))))
 
 (defun common-lisp-loop-part-indentation (indent-point state)
   "Compute the indentation of loop form constituents."
@@ -245,9 +256,17 @@ For example, the function `case' has an indent property
   * indent the first argument by 4.
   * arguments after the first should be lists, and there may be any number
     of them.  The first list element has an offset of 2, all the rest
-    have an offset of 2+1=3."
+    have an offset of 2+1=3.
+
+If the current mode is actually `emacs-lisp-mode', look for a
+`common-lisp-indent-function-for-elisp' property before looking
+at `common-lisp-indent-function' and, if set, use its value
+instead."
+  ;; FIXME: why do we need to special-case loop?
   (if (save-excursion (goto-char (elt state 1))
-                     (looking-at "([Ll][Oo][Oo][Pp]"))
+                     (looking-at (if (derived-mode-p 'emacs-lisp-mode)
+                                      "(\\(cl-\\)?[Ll][Oo][Oo][Pp]"
+                                    "([Ll][Oo][Oo][Pp]")))
       (common-lisp-loop-part-indentation indent-point state)
     (common-lisp-indent-function-1 indent-point state)))
 
@@ -291,18 +310,29 @@ For example, the function `case' has an indent property
               (setq function (downcase (buffer-substring-no-properties
                                         tem (point))))
               (goto-char tem)
+              ;; Elisp generally provides CL functionality with a CL
+              ;; prefix, so if we have a special indenter for the
+              ;; unprefixed version, prefer it over whatever's defined
+              ;; for the cl- version.  Users can override this
+              ;; heuristic by defining a
+              ;; common-lisp-indent-function-for-elisp property on the
+              ;; cl- version.
+              (when (and (derived-mode-p 'emacs-lisp-mode)
+                         (not (lisp-indent-find-method
+                               (intern-soft function) t))
+                         (string-match "\\`cl-" function)
+                         (setf tem (intern-soft
+                                    (substring function (match-end 0))))
+                         (lisp-indent-find-method tem t))
+                (setf function (symbol-name tem)))
               (setq tem (intern-soft function)
-                    method (get tem 'common-lisp-indent-function))
-              (cond ((and (null method)
-                          (string-match ":[^:]+" function))
-                     ;; The pleblisp package feature
-                     (setq function (substring function
-                                               (1+ (match-beginning 0)))
-                           method (get (intern-soft function)
-                                       'common-lisp-indent-function)))
-                    ((and (null method))
-                     ;; backwards compatibility
-                     (setq method (get tem 'lisp-indent-function)))))
+                    method (lisp-indent-find-method tem))
+              ;; The pleblisp package feature
+              (when (and (null tem)
+                         (string-match ":[^:]+" function))
+                (setq function (substring function (1+ (match-beginning 0)))
+                      tem (intern-soft function)
+                      method (lisp-indent-find-method tem))))
             (let ((n 0))
               ;; How far into the containing form is the current form?
               (if (< (point) indent-point)
@@ -764,7 +794,11 @@ optional\\|rest\\|key\\|allow-other-keys\\|aux\\|whole\\|body\\|environment\
     (put (car el) 'common-lisp-indent-function
          (if (symbolp (cdr el))
              (get (cdr el) 'common-lisp-indent-function)
-             (car (cdr el))))))
+           (car (cdr el))))))
+
+;; In elisp, the else part of `if' is in an implicit progn, so indent
+;; it more.
+(put 'if 'common-lisp-indent-function-for-elisp 2)
 
 \f
 ;(defun foo (x)
index 219d76f85d1493a7a7a6cdf71384c6c0c0f6f306..c7d21c76fc186fad0ceedf0b913d693b3e0aa290 100644 (file)
@@ -152,9 +152,6 @@ an element already on the list.
        `(setq ,place (cl-adjoin ,x ,place ,@keys)))
     `(cl-callf2 cl-adjoin ,x ,place ,@keys)))
 
-(defun cl--set-elt (seq n val)
-  (if (listp seq) (setcar (nthcdr n seq) val) (aset seq n val)))
-
 (defun cl--set-buffer-substring (start end val)
   (save-excursion (delete-region start end)
                  (goto-char start)
@@ -282,6 +279,25 @@ so that they are registered at compile-time as well as run-time."
   "Return t if INTEGER is even."
   (eq (logand integer 1) 0))
 
+(defconst cl-digit-char-table
+  (let* ((digits (make-vector 256 nil))
+         (populate (lambda (start end base)
+                     (mapc (lambda (i)
+                             (aset digits i (+ base (- i start))))
+                           (number-sequence start end)))))
+    (funcall populate ?0 ?9 0)
+    (funcall populate ?A ?Z 10)
+    (funcall populate ?a ?z 10)
+    digits))
+
+(defun cl-digit-char-p (char &optional radix)
+  "Test if CHAR is a digit in the specified RADIX (default 10).
+If true return the decimal value of digit CHAR in RADIX."
+  (or (<= 2 (or radix 10) 36)
+      (signal 'args-out-of-range (list 'radix radix '(2 36))))
+  (let ((n (aref cl-digit-char-table char)))
+    (and n (< n (or radix 10)) n)))
+
 (defvar cl--random-state
   (vector 'cl--random-state-tag -1 30 (cl--random-time)))
 
@@ -361,7 +377,13 @@ SEQ, this is like `mapcar'.  With several, it is like the Common Lisp
 (cl--defalias 'cl-first 'car)
 (cl--defalias 'cl-second 'cadr)
 (cl--defalias 'cl-rest 'cdr)
-(cl--defalias 'cl-endp 'null)
+
+(defun cl-endp (x)
+  "Return true if X is the empty list; false if it is a cons.
+Signal an error if X is not a list."
+  (if (listp x)
+      (null x)
+    (signal 'wrong-type-argument (list 'listp x 'x))))
 
 (cl--defalias 'cl-third 'cl-caddr "Return the third element of the list X.")
 (cl--defalias 'cl-fourth 'cl-cadddr "Return the fourth element of the list X.")
@@ -625,7 +647,6 @@ If ALIST is non-nil, the new pairs are prepended to it."
   `(insert (prog1 ,store (erase-buffer))))
 (gv-define-simple-setter buffer-substring cl--set-buffer-substring)
 (gv-define-simple-setter current-buffer set-buffer)
-(gv-define-simple-setter current-case-table set-case-table)
 (gv-define-simple-setter current-column move-to-column t)
 (gv-define-simple-setter current-global-map use-global-map t)
 (gv-define-setter current-input-mode (store)
@@ -680,7 +701,6 @@ If ALIST is non-nil, the new pairs are prepended to it."
 (gv-define-setter window-width (store)
   `(progn (enlarge-window (- ,store (window-width)) t) ,store))
 (gv-define-simple-setter x-get-secondary-selection x-own-secondary-selection t)
-(gv-define-simple-setter x-get-selection x-own-selection t)
 
 ;; More complex setf-methods.
 
index e45efa328ee82c4330ecaa5e862e04ed0802f3db..e4a73d1a4de2071587fa0dca2f9f892d2ffcd875 100644 (file)
        (t t)))
 
 (defun cl--const-expr-val (x)
-  (and (macroexp-const-p x) (if (consp x) (nth 1 x) x)))
+  "Return the value of X known at compile-time.
+If X is not known at compile time, return nil.  Before testing
+whether X is known at compile time, macroexpand it completely in
+`macroexpand-all-environment'."
+  (let ((x (macroexpand-all x macroexpand-all-environment)))
+    (if (macroexp-const-p x)
+        (if (consp x) (nth 1 x) x))))
 
 (defun cl--expr-contains (x y)
   "Count number of times X refers to Y.  Return nil for 0 times."
@@ -1540,7 +1546,7 @@ If BODY is `setq', then use SPECS for assignments rather than for bindings."
               (if (and (cl--unused-var-p temp) (null expr))
                   nil ;; Don't bother declaring/setting `temp' since it won't
                      ;; be used when `expr' is nil, anyway.
-                (when (or (null temp)
+               (when (or (null temp)
                           (and (eq body 'setq) (cl--unused-var-p temp)))
                   ;; Prefer a fresh uninterned symbol over "_to", to avoid
                   ;; warnings that we set an unused variable.
@@ -1878,13 +1884,13 @@ This is like `cl-flet', but for macros instead of functions.
              cl-declarations body)))
   (if (cdr bindings)
       `(cl-macrolet (,(car bindings)) (cl-macrolet ,(cdr bindings) ,@body))
-    (if (null bindings) (cons 'progn body)
+    (if (null bindings) (macroexp-progn body)
       (let* ((name (caar bindings))
             (res (cl--transform-lambda (cdar bindings) name)))
        (eval (car res))
-       (macroexpand-all (cons 'progn body)
-                         (cons (cons name `(lambda ,@(cdr res)))
-                               macroexpand-all-environment))))))
+       (macroexpand-all (macroexp-progn body)
+                        (cons (cons name `(lambda ,@(cdr res)))
+                              macroexpand-all-environment))))))
 
 (defconst cl--old-macroexpand
   (if (and (boundp 'cl--old-macroexpand)
@@ -2057,10 +2063,21 @@ values.  For compatibility, (cl-values A B C) is a synonym for (list A B C).
   (declare (debug t))
   (cons 'progn body))
 ;;;###autoload
-(defmacro cl-the (_type form)
-  "At present this ignores TYPE and is simply equivalent to FORM."
+(defmacro cl-the (type form)
+  "Return FORM.  If type-checking is enabled, assert that it is of TYPE."
   (declare (indent 1) (debug (cl-type-spec form)))
-  form)
+  (if (not (or (not (cl--compiling-file))
+               (< cl--optimize-speed 3)
+               (= cl--optimize-safety 3)))
+      form
+    (let* ((temp (if (cl--simple-expr-p form 3)
+                     form (make-symbol "--cl-var--")))
+           (body `(progn (unless ,(cl--make-type-test temp type)
+                           (signal 'wrong-type-argument
+                                   (list ',type ,temp ',form)))
+                         ,temp)))
+      (if (eq temp form) body
+        `(let ((,temp ,form)) ,body)))))
 
 (defvar cl--proclaim-history t)    ; for future compilers
 (defvar cl--declare-stack t)       ; for future compilers
@@ -2497,7 +2514,8 @@ non-nil value, that slot cannot be set via `setf'.
                                                 ',accessor ',name))))
                        ,(if (eq type 'vector) `(aref cl-x ,pos)
                           (if (= pos 0) '(car cl-x)
-                            `(nth ,pos cl-x)))) forms)
+                            `(nth ,pos cl-x))))
+                    forms)
              (push (cons accessor t) side-eff)
               (if (cadr (memq :read-only (cddr desc)))
                   (push `(gv-define-expander ,accessor
@@ -2572,21 +2590,38 @@ non-nil value, that slot cannot be set via `setf'.
              (put ',name 'cl-struct-include ',include)
              (put ',name 'cl-struct-print ,print-auto)
              ,@(mapcar (lambda (x)
-                         `(put ',(car x) 'side-effect-free ',(cdr x)))
+                         `(function-put ',(car x) 'side-effect-free ',(cdr x)))
                        side-eff))
           forms)
     `(progn ,@(nreverse (cons `',name forms)))))
 
-;;; Types and assertions.
-
-;;;###autoload
-(defmacro cl-deftype (name arglist &rest body)
-  "Define NAME as a new data type.
-The type name can then be used in `cl-typecase', `cl-check-type', etc."
-  (declare (debug cl-defmacro) (doc-string 3) (indent 2))
-  `(cl-eval-when (compile load eval)
-     (put ',name 'cl-deftype-handler
-          (cl-function (lambda (&cl-defs '('*) ,@arglist) ,@body)))))
+(defun cl-struct-sequence-type (struct-type)
+  "Return the sequence used to build STRUCT-TYPE.
+STRUCT-TYPE is a symbol naming a struct type.  Return 'vector or
+'list, or nil if STRUCT-TYPE is not a struct type. "
+  (declare (side-effect-free t) (pure t))
+  (car (get struct-type 'cl-struct-type)))
+
+(defun cl-struct-slot-info (struct-type)
+  "Return a list of slot names of struct STRUCT-TYPE.
+Each entry is a list (SLOT-NAME . OPTS), where SLOT-NAME is a
+slot name symbol and OPTS is a list of slot options given to
+`cl-defstruct'.  Dummy slots that represent the struct name and
+slots skipped by :initial-offset may appear in the list."
+  (declare (side-effect-free t) (pure t))
+  (get struct-type 'cl-struct-slots))
+
+(defun cl-struct-slot-offset (struct-type slot-name)
+  "Return the offset of slot SLOT-NAME in STRUCT-TYPE.
+The returned zero-based slot index is relative to the start of
+the structure data type and is adjusted for any structure name
+and :initial-offset slots.  Signal error if struct STRUCT-TYPE
+does not contain SLOT-NAME."
+  (declare (side-effect-free t) (pure t))
+  (or (cl-position slot-name
+                   (cl-struct-slot-info struct-type)
+                   :key #'car :test #'eq)
+      (error "struct %s has no slot %s" struct-type slot-name)))
 
 (defvar byte-compile-function-environment)
 (defvar byte-compile-macro-environment)
@@ -2873,19 +2908,47 @@ The function's arguments should be treated as immutable.
 
 ;;; Things that are inline.
 (cl-proclaim '(inline cl-acons cl-map cl-concatenate cl-notany
-               cl-notevery cl--set-elt cl-revappend cl-nreconc gethash))
+               cl-notevery cl-revappend cl-nreconc gethash))
 
 ;;; Things that are side-effect-free.
-(mapc (lambda (x) (put x 'side-effect-free t))
+(mapc (lambda (x) (function-put x 'side-effect-free t))
       '(cl-oddp cl-evenp cl-signum last butlast cl-ldiff cl-pairlis cl-gcd
         cl-lcm cl-isqrt cl-floor cl-ceiling cl-truncate cl-round cl-mod cl-rem
         cl-subseq cl-list-length cl-get cl-getf))
 
 ;;; Things that are side-effect-and-error-free.
-(mapc (lambda (x) (put x 'side-effect-free 'error-free))
+(mapc (lambda (x) (function-put x 'side-effect-free 'error-free))
       '(eql cl-list* cl-subst cl-acons cl-equalp
         cl-random-state-p copy-tree cl-sublis))
 
+;;; Types and assertions.
+
+;;;###autoload
+(defmacro cl-deftype (name arglist &rest body)
+  "Define NAME as a new data type.
+The type name can then be used in `cl-typecase', `cl-check-type', etc."
+  (declare (debug cl-defmacro) (doc-string 3) (indent 2))
+  `(cl-eval-when (compile load eval)
+     (put ',name 'cl-deftype-handler
+          (cl-function (lambda (&cl-defs '('*) ,@arglist) ,@body)))))
+
+;;; Additional functions that we can now define because we've defined
+;;; `cl-defsubst' and `cl-typep'.
+
+(cl-defsubst cl-struct-slot-value (struct-type slot-name inst)
+  ;; The use of `cl-defsubst' here gives us both a compiler-macro
+  ;; and a gv-expander "for free".
+  "Return the value of slot SLOT-NAME in INST of STRUCT-TYPE.
+STRUCT and SLOT-NAME are symbols.  INST is a structure instance."
+  (declare (side-effect-free t))
+  (unless (cl-typep inst struct-type)
+    (signal 'wrong-type-argument (list struct-type inst)))
+  ;; We could use `elt', but since the byte compiler will resolve the
+  ;; branch below at compile time, it's more efficient to use the
+  ;; type-specific accessor.
+  (if (eq (cl-struct-sequence-type struct-type) 'vector)
+      (aref inst (cl-struct-slot-offset struct-type slot-name))
+    (nth (cl-struct-slot-offset struct-type slot-name) inst)))
 
 (run-hooks 'cl-macs-load-hook)
 
index aa88264c4abeff3c23d9ab12252b41f6c57c4817..a707832874851ca96d1136772cff11bb76937829 100644 (file)
@@ -166,7 +166,7 @@ SEQ1 is destructively modified, then returned.
                   (cl-n (min (- (or cl-end1 cl-len) cl-start1)
                              (- (or cl-end2 cl-len) cl-start2))))
              (while (>= (setq cl-n (1- cl-n)) 0)
-               (cl--set-elt cl-seq1 (+ cl-start1 cl-n)
+               (setf (elt cl-seq1 (+ cl-start1 cl-n))
                            (elt cl-seq2 (+ cl-start2 cl-n))))))
       (if (listp cl-seq1)
          (let ((cl-p1 (nthcdr cl-start1 cl-seq1))
@@ -392,7 +392,7 @@ to avoid corrupting the original SEQ.
            cl-seq
          (setq cl-seq (copy-sequence cl-seq))
          (or cl-from-end
-             (progn (cl--set-elt cl-seq cl-i cl-new)
+             (progn (setf (elt cl-seq cl-i) cl-new)
                     (setq cl-i (1+ cl-i) cl-count (1- cl-count))))
          (apply 'cl-nsubstitute cl-new cl-old cl-seq :count cl-count
                 :start cl-i cl-keys))))))
@@ -439,7 +439,7 @@ This is a destructive function; it reuses the storage of SEQ whenever possible.
                (setq cl-end (1- cl-end))
                (if (cl--check-test cl-old (elt cl-seq cl-end))
                    (progn
-                     (cl--set-elt cl-seq cl-end cl-new)
+                     (setf (elt cl-seq cl-end) cl-new)
                      (setq cl-count (1- cl-count)))))
            (while (and (< cl-start cl-end) (> cl-count 0))
              (if (cl--check-test cl-old (aref cl-seq cl-start))
index b5b6566cf665745539b6a59cc2e454f563b64040..9a17a75e48b7fbf37be50e4b4cbfdec896fcff37 100644 (file)
@@ -300,7 +300,7 @@ the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'.
          ,(format "Hook run after entering or leaving `%s'.
 No problems result if this variable is not bound.
 `add-hook' automatically binds it.  (This is true for all hook variables.)"
-                  mode))
+                 modefun))
 
        ;; Define the minor-mode keymap.
        ,(unless (symbolp keymap)       ;nil is also a symbol.
index 892fa7f2d372608c961f69d3bba20774839628d7..785050896b87f520bebe24b28b6eaab36be4e067 100644 (file)
@@ -410,12 +410,7 @@ Return the result of the last expression in BODY."
 ;; read is redefined to maybe instrument forms.
 ;; eval-defun is redefined to check edebug-all-forms and edebug-all-defs.
 
-;; Save the original read function
-(defalias 'edebug-original-read
-  (symbol-function (if (fboundp 'edebug-original-read)
-                       'edebug-original-read 'read)))
-
-(defun edebug-read (&optional stream)
+(defun edebug--read (orig &optional stream)
   "Read one Lisp expression as text from STREAM, return as Lisp object.
 If STREAM is nil, use the value of `standard-input' (which see).
 STREAM or the value of `standard-input' may be:
@@ -433,10 +428,7 @@ the option `edebug-all-forms'."
   (or stream (setq stream standard-input))
   (if (eq stream (current-buffer))
       (edebug-read-and-maybe-wrap-form)
-    (edebug-original-read stream)))
-
-(or (fboundp 'edebug-original-eval-defun)
-    (defalias 'edebug-original-eval-defun (symbol-function 'eval-defun)))
+    (funcall (or orig #'read) stream)))
 
 (defvar edebug-result) ; The result of the function call returned by body.
 
@@ -567,16 +559,13 @@ already is one.)"
 
 (defun edebug-install-read-eval-functions ()
   (interactive)
-  ;; Don't install if already installed.
-  (unless load-read-function
-    (setq load-read-function 'edebug-read)
-    (defalias 'eval-defun 'edebug-eval-defun)))
+  (add-function :around load-read-function #'edebug--read)
+  (advice-add 'eval-defun :override 'edebug-eval-defun))
 
 (defun edebug-uninstall-read-eval-functions ()
   (interactive)
-  (setq load-read-function nil)
-  (defalias 'eval-defun (symbol-function 'edebug-original-eval-defun)))
-
+  (remove-function load-read-function #'edebug--read)
+  (advice-remove 'eval-defun 'edebug-eval-defun))
 
 ;;; Edebug internal data
 
@@ -721,8 +710,8 @@ Maybe clear the markers and delete the symbol's edebug property?"
     (cond
      ;; read goes one too far if a (possibly quoted) string or symbol
      ;; is immediately followed by non-whitespace.
-     ((eq class 'symbol) (edebug-original-read (current-buffer)))
-     ((eq class 'string) (edebug-original-read (current-buffer)))
+     ((eq class 'symbol) (read (current-buffer)))
+     ((eq class 'string) (read (current-buffer)))
      ((eq class 'quote) (forward-char 1)
       (list 'quote (edebug-read-sexp)))
      ((eq class 'backquote)
@@ -730,7 +719,7 @@ Maybe clear the markers and delete the symbol's edebug property?"
      ((eq class 'comma)
       (list '\, (edebug-read-sexp)))
      (t ; anything else, just read it.
-      (edebug-original-read (current-buffer))))))
+      (read (current-buffer))))))
 
 ;;; Offsets for reader
 
@@ -826,14 +815,11 @@ Maybe clear the markers and delete the symbol's edebug property?"
       (funcall
        (or (cdr (assq (edebug-next-token-class) edebug-read-alist))
           ;; anything else, just read it.
-          'edebug-original-read)
+          #'read)
        stream))))
 
-(defun edebug-read-symbol (stream)
-  (edebug-original-read stream))
-
-(defun edebug-read-string (stream)
-  (edebug-original-read stream))
+(defalias 'edebug-read-symbol #'read)
+(defalias 'edebug-read-string #'read)
 
 (defun edebug-read-quote (stream)
   ;; Turn 'thing into (quote thing)
@@ -877,7 +863,7 @@ Maybe clear the markers and delete the symbol's edebug property?"
        ((memq (following-char) '(?: ?B ?O ?X ?b ?o ?x ?1 ?2 ?3 ?4 ?5 ?6
                                  ?7 ?8 ?9 ?0))
         (backward-char 1)
-        (edebug-original-read stream))
+        (read stream))
        (t (edebug-syntax-error "Bad char after #"))))
 
 (defun edebug-read-list (stream)
@@ -1048,16 +1034,15 @@ Maybe clear the markers and delete the symbol's edebug property?"
        edebug-gate
        edebug-best-error
        edebug-error-point
-       no-match
        ;; Do this once here instead of several times.
        (max-lisp-eval-depth (+ 800 max-lisp-eval-depth))
        (max-specpdl-size (+ 2000 max-specpdl-size)))
-    (setq no-match
-         (catch 'no-match
-           (setq result (edebug-read-and-maybe-wrap-form1))
-           nil))
-    (if no-match
-       (apply 'edebug-syntax-error no-match))
+    (let ((no-match
+           (catch 'no-match
+             (setq result (edebug-read-and-maybe-wrap-form1))
+             nil)))
+      (if no-match
+          (apply 'edebug-syntax-error no-match)))
     result))
 
 
@@ -1076,7 +1061,7 @@ Maybe clear the markers and delete the symbol's edebug property?"
       (if (and (eq 'lparen (edebug-next-token-class))
               (eq 'symbol (progn (forward-char 1) (edebug-next-token-class))))
          ;; Find out if this is a defining form from first symbol
-         (setq def-kind (edebug-original-read (current-buffer))
+         (setq def-kind (read (current-buffer))
                spec (and (symbolp def-kind) (get-edebug-spec def-kind))
                defining-form-p (and (listp spec)
                                     (eq '&define (car spec)))
@@ -1084,7 +1069,7 @@ Maybe clear the markers and delete the symbol's edebug property?"
                def-name (if (and defining-form-p
                                  (eq 'name (car (cdr spec)))
                                  (eq 'symbol (edebug-next-token-class)))
-                            (edebug-original-read (current-buffer))))))
+                            (read (current-buffer))))))
 ;;;(message "all defs: %s   all forms: %s"  edebug-all-defs edebug-all-forms)
     (cond
      (defining-form-p
@@ -3209,7 +3194,7 @@ function or macro is called, Edebug will be called there as well."
             (if (looking-at "\(")
                 (edebug--form-data-name
                  (edebug-get-form-data-entry (point)))
-              (edebug-original-read (current-buffer))))))
+              (read (current-buffer))))))
       (edebug-instrument-function func))))
 
 
@@ -3237,25 +3222,14 @@ canceled the first time the function is entered."
   (put function 'edebug-on-entry nil))
 
 
-(if (not (fboundp 'edebug-original-debug-on-entry))
-    (fset 'edebug-original-debug-on-entry (symbol-function 'debug-on-entry)))
-'(fset 'debug-on-entry 'edebug-debug-on-entry)  ;; Should we do this?
+'(advice-add 'debug-on-entry :around 'edebug--debug-on-entry)  ;; Should we do this?
 ;; Also need edebug-cancel-debug-on-entry
 
-'(defun edebug-debug-on-entry (function)
-  "Request FUNCTION to invoke debugger each time it is called.
-If the user continues, FUNCTION's execution proceeds.
-Works by modifying the definition of FUNCTION,
-which must be written in Lisp, not predefined.
-Use `cancel-debug-on-entry' to cancel the effect of this command.
-Redefining FUNCTION also does that.
-
-This version is from Edebug.  If the function is instrumented for
-Edebug, it calls `edebug-on-entry'."
-  (interactive "aDebug on entry (to function): ")
+'(defun edebug--debug-on-entry (orig function)
+  "If the function is instrumented for Edebug, call `edebug-on-entry'."
   (let ((func-data (get function 'edebug)))
     (if (or (null func-data) (markerp func-data))
-       (edebug-original-debug-on-entry function)
+       (funcall orig function)
       (edebug-on-entry function))))
 
 
@@ -4136,9 +4110,8 @@ With prefix argument, make it a temporary breakpoint."
                'edebug--called-interactively-skip)
   (remove-hook 'cl-read-load-hooks 'edebug--require-cl-read)
   (edebug-uninstall-read-eval-functions)
-  ;; continue standard unloading
+  ;; Continue standard unloading.
   nil)
 
 (provide 'edebug)
-
 ;;; edebug.el ends here
index c64ec52decb5341c0cb9aa2abe186ea14112ff66..7245989c4b02b9f817dc84262a06a85dbc822f2c 100644 (file)
@@ -1,4 +1,4 @@
-;;; eldoc.el --- show function arglist or variable docstring in echo area  -*- lexical-binding: t; -*-
+;;; eldoc.el --- Show function arglist or variable docstring in echo area  -*- lexical-binding:t; -*-
 
 ;; Copyright (C) 1996-2014 Free Software Foundation, Inc.
 
@@ -48,6 +48,7 @@
 ;;; Code:
 
 (require 'help-fns)                   ;For fundoc-usage handling functions.
+(require 'cl-lib)
 
 (defgroup eldoc nil
   "Show function arglist or variable docstring in echo area."
@@ -75,7 +76,7 @@ Changing the value requires toggling `eldoc-mode'."
   :type '(choice string (const :tag "None" nil))
   :group 'eldoc)
 
-(defcustom eldoc-argument-case 'upcase
+(defcustom eldoc-argument-case #'identity
   "Case to display argument names of functions, as a symbol.
 This has two preferred values: `upcase' or `downcase'.
 Actually, any name of a function which takes a string as an argument and
@@ -87,6 +88,7 @@ has no effect, unless the function handles it explicitly."
                (function-item downcase)
                 function)
   :group 'eldoc)
+(make-obsolete-variable 'eldoc-argument-case nil "25.1")
 
 (defcustom eldoc-echo-area-use-multiline-p 'truncate-sym-name-if-fit
   "Allow long ElDoc messages to resize echo area display.
@@ -114,8 +116,8 @@ has no effect, unless the function handles it explicitly."
 (defface eldoc-highlight-function-argument
   '((t (:inherit bold)))
   "Face used for the argument at point in a function's argument list.
-Note that if `eldoc-documentation-function' is non-nil, this face
-has no effect, unless the function handles it explicitly."
+Note that this face has no effect unless the `eldoc-documentation-function'
+handles it explicitly."
   :group 'eldoc)
 
 ;;; No user options below here.
@@ -183,15 +185,34 @@ it displays the argument list of the function called in the
 expression point is on."
   :group 'eldoc :lighter eldoc-minor-mode-string
   (setq eldoc-last-message nil)
-  (if eldoc-mode
+  (cond
+   ((not eldoc-documentation-function)
+    (message "There is no ElDoc support in this buffer")
+    (setq eldoc-mode nil))
+   (eldoc-mode
+    (when eldoc-print-after-edit
+      (setq-local eldoc-message-commands (eldoc-edit-message-commands)))
+    (add-hook 'post-command-hook 'eldoc-schedule-timer nil t)
+    (add-hook 'pre-command-hook 'eldoc-pre-command-refresh-echo-area nil t))
+   (t
+    (kill-local-variable 'eldoc-message-commands)
+    (remove-hook 'post-command-hook 'eldoc-schedule-timer t)
+    (remove-hook 'pre-command-hook 'eldoc-pre-command-refresh-echo-area t))))
+
+;;;###autoload
+(define-minor-mode global-eldoc-mode
+  "Enable `eldoc-mode' in all buffers where it's applicable."
+  :group 'eldoc :global t
+  (setq eldoc-last-message nil)
+  (if global-eldoc-mode
       (progn
        (when eldoc-print-after-edit
          (setq-local eldoc-message-commands (eldoc-edit-message-commands)))
-       (add-hook 'post-command-hook 'eldoc-schedule-timer nil t)
-       (add-hook 'pre-command-hook 'eldoc-pre-command-refresh-echo-area nil t))
+       (add-hook 'post-command-hook #'eldoc-schedule-timer)
+       (add-hook 'pre-command-hook #'eldoc-pre-command-refresh-echo-area))
     (kill-local-variable 'eldoc-message-commands)
-    (remove-hook 'post-command-hook 'eldoc-schedule-timer t)
-    (remove-hook 'pre-command-hook 'eldoc-pre-command-refresh-echo-area t)))
+    (remove-hook 'post-command-hook #'eldoc-schedule-timer)
+    (remove-hook 'pre-command-hook #'eldoc-pre-command-refresh-echo-area)))
 
 ;;;###autoload
 (define-obsolete-function-alias 'turn-on-eldoc-mode 'eldoc-mode "24.4")
@@ -199,11 +220,14 @@ expression point is on."
 \f
 (defun eldoc-schedule-timer ()
   (or (and eldoc-timer
-           (memq eldoc-timer timer-idle-list))
+           (memq eldoc-timer timer-idle-list)) ;FIXME: Why?
       (setq eldoc-timer
             (run-with-idle-timer
             eldoc-idle-delay t
-            (lambda () (and eldoc-mode (eldoc-print-current-symbol-info))))))
+            (lambda ()
+               (when (or eldoc-mode
+                         (and global-eldoc-mode eldoc-documentation-function))
+                 (eldoc-print-current-symbol-info))))))
 
   ;; If user has changed the idle delay, update the timer.
   (cond ((not (= eldoc-idle-delay eldoc-current-idle-delay))
@@ -299,7 +323,7 @@ Otherwise work like `message'."
 \f
 ;;;###autoload
 (defvar eldoc-documentation-function nil
-  "If non-nil, function to call to return doc string.
+  "Function to call to return doc string.
 The function of no args should return a one-line string for displaying
 doc about a function etc. appropriate to the context around point.
 It should return nil if there's no doc appropriate for the context.
@@ -311,8 +335,7 @@ the variables `eldoc-argument-case' and `eldoc-echo-area-use-multiline-p',
 and the face `eldoc-highlight-function-argument', if they are to have any
 effect.
 
-This variable is expected to be made buffer-local by modes (other than
-Emacs Lisp mode) that support ElDoc.")
+This variable is expected to be set buffer-locally by modes that support ElDoc.")
 
 (defun eldoc-print-current-symbol-info ()
   ;; This is run from post-command-hook or some idle timer thing,
@@ -323,240 +346,7 @@ Emacs Lisp mode) that support ElDoc.")
              (when eldoc-last-message
                (eldoc-message nil)
                nil))
-        (if eldoc-documentation-function
-            (eldoc-message (funcall eldoc-documentation-function))
-          (let* ((current-symbol (eldoc-current-symbol))
-                 (current-fnsym  (eldoc-fnsym-in-current-sexp))
-                 (doc (cond
-                       ((null current-fnsym)
-                        nil)
-                       ((eq current-symbol (car current-fnsym))
-                        (or (apply 'eldoc-get-fnsym-args-string
-                                   current-fnsym)
-                            (eldoc-get-var-docstring current-symbol)))
-                       (t
-                        (or (eldoc-get-var-docstring current-symbol)
-                            (apply 'eldoc-get-fnsym-args-string
-                                   current-fnsym))))))
-            (eldoc-message doc))))))
-
-(defun eldoc-get-fnsym-args-string (sym &optional index)
-  "Return a string containing the parameter list of the function SYM.
-If SYM is a subr and no arglist is obtainable from the docstring
-or elsewhere, return a 1-line docstring.  Calls the functions
-`eldoc-function-argstring-format' and
-`eldoc-highlight-function-argument' to format the result.  The
-former calls `eldoc-argument-case'; the latter gives the
-function name `font-lock-function-name-face', and optionally
-highlights argument number INDEX."
-  (let (args doc advertised)
-    (cond ((not (and sym (symbolp sym) (fboundp sym))))
-         ((and (eq sym (aref eldoc-last-data 0))
-               (eq 'function (aref eldoc-last-data 2)))
-          (setq doc (aref eldoc-last-data 1)))
-         ((listp (setq advertised (gethash (indirect-function sym)
-                                           advertised-signature-table t)))
-          (setq args advertised))
-         ((setq doc (help-split-fundoc (documentation sym t) sym))
-          (setq args (car doc))
-          ;; Remove any enclosing (), since e-function-argstring adds them.
-          (string-match "\\`[^ )]* ?" args)
-          (setq args (substring args (match-end 0)))
-          (if (string-match-p ")\\'" args)
-              (setq args (substring args 0 -1))))
-         (t
-          (setq args (help-function-arglist sym))))
-    (if args
-       ;; Stringify, and store before highlighting, downcasing, etc.
-       ;; FIXME should truncate before storing.
-       (eldoc-last-data-store sym (setq args (eldoc-function-argstring args))
-                              'function)
-      (setq args doc))           ; use stored value
-    ;; Change case, highlight, truncate.
-    (if args
-       (eldoc-highlight-function-argument
-        sym (eldoc-function-argstring-format args) index))))
-
-(defun eldoc-highlight-function-argument (sym args index)
-  "Highlight argument INDEX in ARGS list for function SYM.
-In the absence of INDEX, just call `eldoc-docstring-format-sym-doc'."
-  (let ((start          nil)
-       (end            0)
-       (argument-face  'eldoc-highlight-function-argument))
-    ;; Find the current argument in the argument string.  We need to
-    ;; handle `&rest' and informal `...' properly.
-    ;;
-    ;; FIXME: What to do with optional arguments, like in
-    ;;        (defun NAME ARGLIST [DOCSTRING] BODY...) case?
-    ;;        The problem is there is no robust way to determine if
-    ;;        the current argument is indeed a docstring.
-    (while (and index (>= index 1))
-      (if (string-match "[^ ()]+" args end)
-         (progn
-           (setq start (match-beginning 0)
-                 end   (match-end 0))
-           (let ((argument (match-string 0 args)))
-             (cond ((string= argument "&rest")
-                    ;; All the rest arguments are the same.
-                    (setq index 1))
-                   ((string= argument "&optional"))
-                   ((string-match-p "\\.\\.\\.$" argument)
-                    (setq index 0))
-                   (t
-                    (setq index (1- index))))))
-       (setq end           (length args)
-             start         (1- end)
-             argument-face 'font-lock-warning-face
-             index         0)))
-    (let ((doc args))
-      (when start
-       (setq doc (copy-sequence args))
-       (add-text-properties start end (list 'face argument-face) doc))
-      (setq doc (eldoc-docstring-format-sym-doc
-                sym doc (if (functionp sym) 'font-lock-function-name-face
-                           'font-lock-keyword-face)))
-      doc)))
-
-;; Return a string containing a brief (one-line) documentation string for
-;; the variable.
-(defun eldoc-get-var-docstring (sym)
-  (when sym
-    (cond ((and (eq sym (aref eldoc-last-data 0))
-               (eq 'variable (aref eldoc-last-data 2)))
-          (aref eldoc-last-data 1))
-         (t
-          (let ((doc (documentation-property sym 'variable-documentation t)))
-            (cond (doc
-                   (setq doc (eldoc-docstring-format-sym-doc
-                              sym (eldoc-docstring-first-line doc)
-                              'font-lock-variable-name-face))
-                   (eldoc-last-data-store sym doc 'variable)))
-            doc)))))
-
-(defun eldoc-last-data-store (symbol doc type)
-  (aset eldoc-last-data 0 symbol)
-  (aset eldoc-last-data 1 doc)
-  (aset eldoc-last-data 2 type))
-
-;; Note that any leading `*' in the docstring (which indicates the variable
-;; is a user option) is removed.
-(defun eldoc-docstring-first-line (doc)
-  (and (stringp doc)
-       (substitute-command-keys
-        (save-match-data
-         ;; Don't use "^" in the regexp below since it may match
-         ;; anywhere in the doc-string.
-         (let ((start (if (string-match "\\`\\*" doc) (match-end 0) 0)))
-            (cond ((string-match "\n" doc)
-                   (substring doc start (match-beginning 0)))
-                  ((zerop start) doc)
-                  (t (substring doc start))))))))
-
-;; If the entire line cannot fit in the echo area, the symbol name may be
-;; truncated or eliminated entirely from the output to make room for the
-;; description.
-(defun eldoc-docstring-format-sym-doc (sym doc face)
-  (save-match-data
-    (let* ((name (symbol-name sym))
-           (ea-multi eldoc-echo-area-use-multiline-p)
-           ;; Subtract 1 from window width since emacs will not write
-           ;; any chars to the last column, or in later versions, will
-           ;; cause a wraparound and resize of the echo area.
-           (ea-width (1- (window-width (minibuffer-window))))
-           (strip (- (+ (length name) (length ": ") (length doc)) ea-width)))
-      (cond ((or (<= strip 0)
-                 (eq ea-multi t)
-                 (and ea-multi (> (length doc) ea-width)))
-             (format "%s: %s" (propertize name 'face face) doc))
-            ((> (length doc) ea-width)
-             (substring (format "%s" doc) 0 ea-width))
-            ((>= strip (length name))
-             (format "%s" doc))
-            (t
-             ;; Show the end of the partial symbol name, rather
-             ;; than the beginning, since the former is more likely
-             ;; to be unique given package namespace conventions.
-             (setq name (substring name strip))
-             (format "%s: %s" (propertize name 'face face) doc))))))
-
-\f
-;; Return a list of current function name and argument index.
-(defun eldoc-fnsym-in-current-sexp ()
-  (save-excursion
-    (let ((argument-index (1- (eldoc-beginning-of-sexp))))
-      ;; If we are at the beginning of function name, this will be -1.
-      (when (< argument-index 0)
-       (setq argument-index 0))
-      ;; Don't do anything if current word is inside a string.
-      (if (= (or (char-after (1- (point))) 0) ?\")
-         nil
-       (list (eldoc-current-symbol) argument-index)))))
-
-;; Move to the beginning of current sexp.  Return the number of nested
-;; sexp the point was over or after.
-(defun eldoc-beginning-of-sexp ()
-  (let ((parse-sexp-ignore-comments t)
-       (num-skipped-sexps 0))
-    (condition-case _
-       (progn
-         ;; First account for the case the point is directly over a
-         ;; beginning of a nested sexp.
-         (condition-case _
-             (let ((p (point)))
-               (forward-sexp -1)
-               (forward-sexp 1)
-               (when (< (point) p)
-                 (setq num-skipped-sexps 1)))
-           (error))
-         (while
-             (let ((p (point)))
-               (forward-sexp -1)
-               (when (< (point) p)
-                 (setq num-skipped-sexps (1+ num-skipped-sexps))))))
-      (error))
-    num-skipped-sexps))
-
-;; returns nil unless current word is an interned symbol.
-(defun eldoc-current-symbol ()
-  (let ((c (char-after (point))))
-    (and c
-         (memq (char-syntax c) '(?w ?_))
-         (intern-soft (current-word)))))
-
-;; Do indirect function resolution if possible.
-(defun eldoc-symbol-function (fsym)
-  (let ((defn (symbol-function fsym)))
-    (and (symbolp defn)
-         (condition-case _
-             (setq defn (indirect-function fsym))
-           (error (setq defn nil))))
-    defn))
-
-(defun eldoc-function-argstring (arglist)
-  "Return ARGLIST as a string enclosed by ().
-ARGLIST is either a string, or a list of strings or symbols."
-  (cond ((stringp arglist))
-       ((not (listp arglist))
-        (setq arglist nil))
-       ((symbolp (car arglist))
-        (setq arglist
-              (mapconcat (lambda (s) (symbol-name s))
-                         arglist " ")))
-       ((stringp (car arglist))
-        (setq arglist
-              (mapconcat (lambda (s) s)
-                         arglist " "))))
-  (if arglist
-      (format "(%s)" arglist)))
-
-(defun eldoc-function-argstring-format (argstring)
-  "Apply `eldoc-argument-case' to each word in ARGSTRING.
-The words \"&rest\", \"&optional\" are returned unchanged."
-  (mapconcat (lambda (s)
-              (if (string-match-p "\\`(?&\\(?:optional\\|rest\\))?\\'" s)
-                  s
-                (funcall eldoc-argument-case s)))
-            (split-string argstring) " "))
+        (eldoc-message (funcall eldoc-documentation-function)))))
 
 \f
 ;; When point is in a sexp, the function args are not reprinted in the echo
@@ -573,7 +363,7 @@ The words \"&rest\", \"&optional\" are returned unchanged."
 
 (defun eldoc-add-command-completions (&rest names)
   (dolist (name names)
-    (apply 'eldoc-add-command (all-completions name obarray 'commandp))))
+    (apply #'eldoc-add-command (all-completions name obarray 'commandp))))
 
 (defun eldoc-remove-command (&rest cmds)
   (dolist (name cmds)
@@ -583,7 +373,7 @@ The words \"&rest\", \"&optional\" are returned unchanged."
 
 (defun eldoc-remove-command-completions (&rest names)
   (dolist (name names)
-    (apply 'eldoc-remove-command
+    (apply #'eldoc-remove-command
            (all-completions name eldoc-message-commands))))
 
 \f
index 34041aab9a8ca37e29a9a62d78ab172cbaeaee33..024110b93e037fd92932d8d34c809a1d38defd46 100644 (file)
@@ -1320,7 +1320,7 @@ RESULT must be an `ert-test-result-with-condition'."
         (unwind-protect
             (progn
               (insert message "\n")
-              (setq end (copy-marker (point)))
+              (setq end (point-marker))
               (goto-char begin)
               (insert "    " prefix)
               (forward-line 1)
@@ -1463,6 +1463,65 @@ the tests)."
       (kill-emacs 2))))
 
 
+(defun ert-summarize-tests-batch-and-exit ()
+  "Summarize the results of testing.
+Expects to be called in batch mode, with logfiles as command-line arguments.
+The logfiles should have the `ert-run-tests-batch' format.  When finished,
+this exits Emacs, with status as per `ert-run-tests-batch-and-exit'."
+  (or noninteractive
+      (user-error "This function is only for use in batch mode"))
+  (let ((nlogs (length command-line-args-left))
+        (ntests 0) (nrun 0) (nexpected 0) (nunexpected 0) (nskipped 0)
+        nnotrun logfile notests badtests unexpected)
+    (with-temp-buffer
+      (while (setq logfile (pop command-line-args-left))
+        (erase-buffer)
+        (insert-file-contents logfile)
+        (if (not (re-search-forward "^Running \\([0-9]+\\) tests" nil t))
+            (push logfile notests)
+          (setq ntests (+ ntests (string-to-number (match-string 1))))
+          (if (not (re-search-forward "^\\(Aborted: \\)?\
+Ran \\([0-9]+\\) tests, \\([0-9]+\\) results as expected\
+\\(?:, \\([0-9]+\\) unexpected\\)?\
+\\(?:, \\([0-9]+\\) skipped\\)?" nil t))
+              (push logfile badtests)
+            (if (match-string 1) (push logfile badtests))
+            (setq nrun (+ nrun (string-to-number (match-string 2)))
+                  nexpected (+ nexpected (string-to-number (match-string 3))))
+            (when (match-string 4)
+              (push logfile unexpected)
+              (setq nunexpected (+ nunexpected
+                                   (string-to-number (match-string 4)))))
+            (if (match-string 5)
+                (setq nskipped (+ nskipped
+                                  (string-to-number (match-string 5)))))))))
+    (setq nnotrun (- ntests nrun))
+    (message "\nSUMMARY OF TEST RESULTS")
+    (message "-----------------------")
+    (message "Files examined: %d" nlogs)
+    (message "Ran %d tests%s, %d results as expected%s%s"
+             nrun
+             (if (zerop nnotrun) "" (format ", %d failed to run" nnotrun))
+             nexpected
+             (if (zerop nunexpected)
+                 ""
+               (format ", %d unexpected" nunexpected))
+             (if (zerop nskipped)
+                 ""
+               (format ", %d skipped" nskipped)))
+    (when notests
+      (message "%d files did not contain any tests:" (length notests))
+      (mapc (lambda (l) (message "  %s" l)) notests))
+    (when badtests
+      (message "%d files did not finish:" (length badtests))
+      (mapc (lambda (l) (message "  %s" l)) badtests))
+    (when unexpected
+      (message "%d files contained unexpected results:" (length unexpected))
+      (mapc (lambda (l) (message "  %s" l)) unexpected))
+    (kill-emacs (cond ((or notests badtests (not (zerop nnotrun))) 2)
+                      (unexpected 1)
+                      (t 0)))))
+
 ;;; Utility functions for load/unload actions.
 
 (defun ert--activate-font-lock-keywords ()
index 5c404ce04684fe85768fb0139131f5a86e38fa60..c372117b1043772353f5544f2d4cd6f9785b139e 100644 (file)
@@ -178,8 +178,7 @@ LIBRARY should be a string (the name of the library)."
 
 (defvar find-function-C-source-directory
   (let ((dir (expand-file-name "src" source-directory)))
-    (when (and (file-directory-p dir) (file-readable-p dir))
-      dir))
+    (if (file-accessible-directory-p dir) dir))
   "Directory where the C source files of Emacs can be found.
 If nil, do not try to find the source code of functions and variables
 defined in C.")
index 692b76e8a36d0b319cc67be78d8734b084ea526e..229ad275bf5cf7019928898e41ce9c5381ccf42d 100644 (file)
@@ -357,6 +357,34 @@ The return value is the last VAL in the list.
   (macroexp-let2 nil v val
     `(with-current-buffer ,buf (set (make-local-variable ,var) ,v))))
 
+(gv-define-expander alist-get
+  (lambda (do key alist &optional default remove)
+    (macroexp-let2 macroexp-copyable-p k key
+      (gv-letplace (getter setter) alist
+        (macroexp-let2 nil p `(assq ,k ,getter)
+          (funcall do (if (null default) `(cdr ,p)
+                        `(if ,p (cdr ,p) ,default))
+                   (lambda (v)
+                     (macroexp-let2 nil v v
+                       (let ((set-exp
+                              `(if ,p (setcdr ,p ,v)
+                                 ,(funcall setter
+                                           `(cons (setq ,p (cons ,k ,v))
+                                                  ,getter)))))
+                         (cond
+                          ((null remove) set-exp)
+                          ((or (eql v default)
+                               (and (eq (car-safe v) 'quote)
+                                    (eq (car-safe default) 'quote)
+                                    (eql (cadr v) (cadr default))))
+                           `(if ,p ,(funcall setter `(delq ,p ,getter))))
+                          (t
+                           `(cond
+                             ((not (eql ,default ,v)) ,set-exp)
+                             (,p ,(funcall setter
+                                           `(delq ,p ,getter)))))))))))))))
+
+
 ;;; Some occasionally handy extensions.
 
 ;; While several of the "places" below are not terribly useful for direct use,
@@ -479,22 +507,13 @@ REF must have been previously obtained with `gv-ref'."
 ;;  … => (load "gv.el") => (macroexpand-all (defsubst gv-deref …)) => (macroexpand (defun …)) => (load "gv.el")
 (gv-define-setter gv-deref (v ref) `(funcall (cdr ,ref) ,v))
 
-;;; Vaguely related definitions that should be moved elsewhere.
-
-;; (defun alist-get (key alist)
-;;   "Get the value associated to KEY in ALIST."
-;;   (declare
-;;    (gv-expander
-;;     (lambda (do)
-;;       (macroexp-let2 macroexp-copyable-p k key
-;;         (gv-letplace (getter setter) alist
-;;           (macroexp-let2 nil p `(assoc ,k ,getter)
-;;             (funcall do `(cdr ,p)
-;;                      (lambda (v)
-;;                        `(if ,p (setcdr ,p ,v)
-;;                           ,(funcall setter
-;;                                     `(cons (cons ,k ,v) ,getter)))))))))))
-;;   (cdr (assoc key alist)))
+;; (defmacro gv-letref (vars place &rest body)
+;;   (declare (indent 2) (debug (sexp form &rest body)))
+;;   (require 'cl-lib) ;Can't require cl-lib at top-level for bootstrap reasons!
+;;   (gv-letplace (getter setter) place
+;;     `(cl-macrolet ((,(nth 0 vars) () ',getter)
+;;                    (,(nth 1 vars) (v) (funcall ',setter v)))
+;;        ,@body)))
 
 (provide 'gv)
 ;;; gv.el ends here
index 1cdba5b371af1b276d351999d6fec61f86e8f4f3..a13baf0ee22d0cfef8222197f0e47f4494bd26e8 100644 (file)
 (defvar font-lock-keywords-case-fold-search)
 (defvar font-lock-string-face)
 
-(defvar lisp-mode-abbrev-table nil)
 (define-abbrev-table 'lisp-mode-abbrev-table ()
   "Abbrev table for Lisp mode.")
 
-(defvar emacs-lisp-mode-abbrev-table nil)
-(define-abbrev-table 'emacs-lisp-mode-abbrev-table ()
-  "Abbrev table for Emacs Lisp mode.
-It has `lisp-mode-abbrev-table' as its parent."
-  :parents (list lisp-mode-abbrev-table))
-
-(defvar emacs-lisp-mode-syntax-table
+(defvar lisp--mode-syntax-table
   (let ((table (make-syntax-table))
         (i 0))
     (while (< i ?0)
@@ -82,13 +75,11 @@ It has `lisp-mode-abbrev-table' as its parent."
     (modify-syntax-entry ?\\ "\\   " table)
     (modify-syntax-entry ?\( "()  " table)
     (modify-syntax-entry ?\) ")(  " table)
-    (modify-syntax-entry ?\[ "(]  " table)
-    (modify-syntax-entry ?\] ")[  " table)
     table)
-  "Syntax table used in `emacs-lisp-mode'.")
+  "Parent syntax table used in Lisp modes.")
 
 (defvar lisp-mode-syntax-table
-  (let ((table (copy-syntax-table emacs-lisp-mode-syntax-table)))
+  (let ((table (make-syntax-table lisp--mode-syntax-table)))
     (modify-syntax-entry ?\[ "_   " table)
     (modify-syntax-entry ?\] "_   " table)
     (modify-syntax-entry ?# "' 14" table)
@@ -102,25 +93,35 @@ It has `lisp-mode-abbrev-table' as its parent."
         (purecopy (concat "^\\s-*("
                           (eval-when-compile
                             (regexp-opt
-                             '("defun" "defun*" "defsubst" "defmacro"
+                             '("defun" "defmacro"
+                                ;; Elisp.
+                                "defun*" "defsubst"
                                "defadvice" "define-skeleton"
-                               "define-minor-mode" "define-global-minor-mode"
+                               "define-compilation-mode" "define-minor-mode"
+                               "define-global-minor-mode"
                                "define-globalized-minor-mode"
                                "define-derived-mode" "define-generic-mode"
+                               "cl-defun" "cl-defsubst" "cl-defmacro"
+                               "cl-define-compiler-macro"
+                                ;; CL.
                                "define-compiler-macro" "define-modify-macro"
                                "defsetf" "define-setf-expander"
                                "define-method-combination"
-                               "defgeneric" "defmethod"
-                               "cl-defun" "cl-defsubst" "cl-defmacro"
-                               "cl-define-compiler-macro") t))
+                                ;; CLOS and EIEIO
+                               "defgeneric" "defmethod")
+                              t))
                           "\\s-+\\(\\(\\sw\\|\\s_\\)+\\)"))
         2)
    (list (purecopy "Variables")
         (purecopy (concat "^\\s-*("
                           (eval-when-compile
                             (regexp-opt
-                             '("defconst" "defconstant" "defcustom"
-                               "defparameter" "define-symbol-macro") t))
+                             '(;; Elisp
+                                "defconst" "defcustom"
+                                ;; CL
+                                "defconstant"
+                               "defparameter" "define-symbol-macro")
+                              t))
                           "\\s-+\\(\\(\\sw\\|\\s_\\)+\\)"))
         2)
    ;; For `defvar', we ignore (defvar FOO) constructs.
@@ -132,10 +133,16 @@ It has `lisp-mode-abbrev-table' as its parent."
         (purecopy (concat "^\\s-*("
                           (eval-when-compile
                             (regexp-opt
-                             '("defgroup" "deftheme" "deftype" "defstruct"
-                               "defclass" "define-condition" "define-widget"
-                               "defface" "defpackage" "cl-deftype"
-                               "cl-defstruct") t))
+                             '(;; Elisp
+                                "defgroup" "deftheme"
+                                "define-widget" "define-error"
+                               "defface" "cl-deftype" "cl-defstruct"
+                                ;; CL
+                                "deftype" "defstruct"
+                               "define-condition" "defpackage"
+                                ;; CLOS and EIEIO
+                                "defclass")
+                              t))
                           "\\s-+'?\\(\\(\\sw\\|\\s_\\)+\\)"))
         2))
 
@@ -156,6 +163,24 @@ It has `lisp-mode-abbrev-table' as its parent."
 
 ;;;; Font-lock support.
 
+(defun lisp--match-hidden-arg (limit)
+  (let ((res nil))
+    (while
+        (let ((ppss (parse-partial-sexp (line-beginning-position)
+                                        (line-end-position)
+                                        -1)))
+          (skip-syntax-forward " )")
+          (if (or (>= (car ppss) 0)
+                  (looking-at ";\\|$"))
+              (progn
+                (forward-line 1)
+                (< (point) limit))
+            (looking-at ".*")           ;Set the match-data.
+           (forward-line 1)
+            (setq res (point))
+            nil)))
+    res))
+
 (pcase-let
     ((`(,vdefs ,tdefs
         ,el-defs-re ,cl-defs-re
@@ -178,9 +203,9 @@ It has `lisp-mode-abbrev-table' as its parent."
               (el-vdefs '("defconst" "defcustom" "defvaralias" "defvar-local"
                           "defface"))
               (el-tdefs '("defgroup" "deftheme"))
-              (el-kw '("while-no-input" "letrec" "pcase" "pcase-let"
-                       "pcase-let*" "save-restriction" "save-excursion"
-                       "save-selected-window"
+              (el-kw '("while-no-input" "letrec" "pcase" "pcase-exhaustive"
+                       "pcase-let" "pcase-let*" "save-restriction"
+                       "save-excursion" "save-selected-window"
                        ;; "eval-after-load" "eval-next-after-load"
                        "save-window-excursion" "save-current-buffer"
                        "save-match-data" "combine-after-change-calls"
@@ -189,6 +214,7 @@ It has `lisp-mode-abbrev-table' as its parent."
                        "with-category-table" "with-coding-priority"
                        "with-current-buffer" "with-demoted-errors"
                        "with-electric-help" "with-eval-after-load"
+                       "with-file-modes"
                        "with-local-quit" "with-no-warnings"
                        "with-output-to-temp-buffer" "with-selected-window"
                        "with-selected-frame" "with-silent-modifications"
@@ -207,7 +233,7 @@ It has `lisp-mode-abbrev-table' as its parent."
                            "etypecase" "ccase" "ctypecase" "loop" "do" "do*"
                            "the" "locally" "proclaim" "declaim" "letf" "go"
                            ;; "lexical-let" "lexical-let*"
-                           "symbol-macrolet" "flet" "destructuring-bind"
+                           "symbol-macrolet" "flet" "flet*" "destructuring-bind"
                            "labels" "macrolet" "tagbody" "multiple-value-bind"
                            "block" "return" "return-from"))
               (cl-lib-errs '("assert" "check-type"))
@@ -347,6 +373,9 @@ It has `lisp-mode-abbrev-table' as its parent."
        ;; and that they get the wrong color.
        ;; ;; CL `with-' and `do-' constructs
        ;;("(\\(\\(do-\\|with-\\)\\(\\s_\\|\\w\\)*\\)" 1 font-lock-keyword-face)
+       (lisp--match-hidden-arg
+        (0 '(face font-lock-warning-face
+             help-echo "Hidden behind deeper element; move to another line?")))
        ))
     "Gaudy level highlighting for Emacs Lisp mode.")
 
@@ -377,6 +406,9 @@ It has `lisp-mode-abbrev-table' as its parent."
        ;; and that they get the wrong color.
        ;; ;; CL `with-' and `do-' constructs
        ;;("(\\(\\(do-\\|with-\\)\\(\\s_\\|\\w\\)*\\)" 1 font-lock-keyword-face)
+       (lisp--match-hidden-arg
+        (0 '(face font-lock-warning-face
+             help-echo "Hidden behind deeper element; move to another line?")))
        ))
     "Gaudy level highlighting for Lisp modes."))
 
@@ -387,6 +419,41 @@ It has `lisp-mode-abbrev-table' as its parent."
 (defvar lisp-cl-font-lock-keywords lisp-cl-font-lock-keywords-1
   "Default expressions to highlight in Lisp modes.")
 
+(defun lisp-string-in-doc-position-p (listbeg startpos)
+  (let* ((firstsym (and listbeg
+                        (save-excursion
+                          (goto-char listbeg)
+                          (and (looking-at "([ \t\n]*\\(\\(\\sw\\|\\s_\\)+\\)")
+                               (match-string 1)))))
+         (docelt (and firstsym
+                      (function-get (intern-soft firstsym)
+                                    lisp-doc-string-elt-property))))
+    (and docelt
+         ;; It's a string in a form that can have a docstring.
+         ;; Check whether it's in docstring position.
+         (save-excursion
+           (when (functionp docelt)
+             (goto-char (match-end 1))
+             (setq docelt (funcall docelt)))
+           (goto-char listbeg)
+           (forward-char 1)
+           (condition-case nil
+               (while (and (> docelt 0) (< (point) startpos)
+                           (progn (forward-sexp 1) t))
+                 (setq docelt (1- docelt)))
+             (error nil))
+           (and (zerop docelt) (<= (point) startpos)
+                (progn (forward-comment (point-max)) t)
+                (= (point) startpos))))))
+
+(defun lisp-string-after-doc-keyword-p (listbeg startpos)
+  (and listbeg                          ; We are inside a Lisp form.
+       (save-excursion
+         (goto-char startpos)
+         (ignore-errors
+           (progn (backward-sexp 1)
+                  (looking-at ":documentation\\_>"))))))
+
 (defun lisp-font-lock-syntactic-face-function (state)
   (if (nth 3 state)
       ;; This might be a (doc)string or a |...| symbol.
@@ -394,32 +461,9 @@ It has `lisp-mode-abbrev-table' as its parent."
         (if (eq (char-after startpos) ?|)
             ;; This is not a string, but a |...| symbol.
             nil
-          (let* ((listbeg (nth 1 state))
-                 (firstsym (and listbeg
-                                (save-excursion
-                                  (goto-char listbeg)
-                                  (and (looking-at "([ \t\n]*\\(\\(\\sw\\|\\s_\\)+\\)")
-                                       (match-string 1)))))
-                 (docelt (and firstsym
-                              (function-get (intern-soft firstsym)
-                                            lisp-doc-string-elt-property))))
-            (if (and docelt
-                     ;; It's a string in a form that can have a docstring.
-                     ;; Check whether it's in docstring position.
-                     (save-excursion
-                       (when (functionp docelt)
-                         (goto-char (match-end 1))
-                         (setq docelt (funcall docelt)))
-                       (goto-char listbeg)
-                       (forward-char 1)
-                       (condition-case nil
-                           (while (and (> docelt 0) (< (point) startpos)
-                                       (progn (forward-sexp 1) t))
-                             (setq docelt (1- docelt)))
-                         (error nil))
-                       (and (zerop docelt) (<= (point) startpos)
-                            (progn (forward-comment (point-max)) t)
-                            (= (point) (nth 8 state)))))
+          (let ((listbeg (nth 1 state)))
+            (if (or (lisp-string-in-doc-position-p listbeg startpos)
+                    (lisp-string-after-doc-keyword-p listbeg startpos))
                 font-lock-doc-face
               font-lock-string-face))))
     font-lock-comment-face))
@@ -465,10 +509,10 @@ font-lock keywords will not be case sensitive."
                lisp-cl-font-lock-keywords-2))
          nil ,keywords-case-insensitive nil nil
          (font-lock-mark-block-function . mark-defun)
+          (font-lock-extra-managed-props help-echo)
          (font-lock-syntactic-face-function
           . lisp-font-lock-syntactic-face-function)))
   (setq-local prettify-symbols-alist lisp--prettify-symbols-alist)
-  ;; electric
   (when elisp
     (setq-local electric-pair-text-pairs
                 (cons '(?\` . ?\') electric-pair-text-pairs)))
@@ -520,166 +564,6 @@ font-lock keywords will not be case sensitive."
     map)
   "Keymap for commands shared by all sorts of Lisp modes.")
 
-(defvar emacs-lisp-mode-map
-  (let ((map (make-sparse-keymap "Emacs-Lisp"))
-       (menu-map (make-sparse-keymap "Emacs-Lisp"))
-       (lint-map (make-sparse-keymap))
-       (prof-map (make-sparse-keymap))
-       (tracing-map (make-sparse-keymap)))
-    (set-keymap-parent map lisp-mode-shared-map)
-    (define-key map "\e\t" 'completion-at-point)
-    (define-key map "\e\C-x" 'eval-defun)
-    (define-key map "\e\C-q" 'indent-pp-sexp)
-    (bindings--define-key map [menu-bar emacs-lisp]
-      (cons "Emacs-Lisp" menu-map))
-    (bindings--define-key menu-map [eldoc]
-      '(menu-item "Auto-Display Documentation Strings" eldoc-mode
-                 :button (:toggle . (bound-and-true-p eldoc-mode))
-                 :help "Display the documentation string for the item under cursor"))
-    (bindings--define-key menu-map [checkdoc]
-      '(menu-item "Check Documentation Strings" checkdoc
-                 :help "Check documentation strings for style requirements"))
-    (bindings--define-key menu-map [re-builder]
-      '(menu-item "Construct Regexp" re-builder
-                 :help "Construct a regexp interactively"))
-    (bindings--define-key menu-map [tracing] (cons "Tracing" tracing-map))
-    (bindings--define-key tracing-map [tr-a]
-      '(menu-item "Untrace All" untrace-all
-                 :help "Untrace all currently traced functions"))
-    (bindings--define-key tracing-map [tr-uf]
-      '(menu-item "Untrace Function..." untrace-function
-                 :help "Untrace function, and possibly activate all remaining advice"))
-    (bindings--define-key tracing-map [tr-sep] menu-bar-separator)
-    (bindings--define-key tracing-map [tr-q]
-      '(menu-item "Trace Function Quietly..." trace-function-background
-                 :help "Trace the function with trace output going quietly to a buffer"))
-    (bindings--define-key tracing-map [tr-f]
-      '(menu-item "Trace Function..." trace-function
-                 :help "Trace the function given as an argument"))
-    (bindings--define-key menu-map [profiling] (cons "Profiling" prof-map))
-    (bindings--define-key prof-map [prof-restall]
-      '(menu-item "Remove Instrumentation for All Functions" elp-restore-all
-                 :help "Restore the original definitions of all functions being profiled"))
-    (bindings--define-key prof-map [prof-restfunc]
-      '(menu-item "Remove Instrumentation for Function..." elp-restore-function
-                 :help "Restore an instrumented function to its original definition"))
-
-    (bindings--define-key prof-map [sep-rem] menu-bar-separator)
-    (bindings--define-key prof-map [prof-resall]
-      '(menu-item "Reset Counters for All Functions" elp-reset-all
-                 :help "Reset the profiling information for all functions being profiled"))
-    (bindings--define-key prof-map [prof-resfunc]
-      '(menu-item "Reset Counters for Function..." elp-reset-function
-                 :help "Reset the profiling information for a function"))
-    (bindings--define-key prof-map [prof-res]
-      '(menu-item "Show Profiling Results" elp-results
-                 :help "Display current profiling results"))
-    (bindings--define-key prof-map [prof-pack]
-      '(menu-item "Instrument Package..." elp-instrument-package
-                 :help "Instrument for profiling all function that start with a prefix"))
-    (bindings--define-key prof-map [prof-func]
-      '(menu-item "Instrument Function..." elp-instrument-function
-                 :help "Instrument a function for profiling"))
-    ;; Maybe this should be in a separate submenu from the ELP stuff?
-    (bindings--define-key prof-map [sep-natprof] menu-bar-separator)
-    (bindings--define-key prof-map [prof-natprof-stop]
-      '(menu-item "Stop Native Profiler" profiler-stop
-                 :help "Stop recording profiling information"
-                 :enable (and (featurep 'profiler)
-                              (profiler-running-p))))
-    (bindings--define-key prof-map [prof-natprof-report]
-      '(menu-item "Show Profiler Report" profiler-report
-                 :help "Show the current profiler report"
-                 :enable (and (featurep 'profiler)
-                              (profiler-running-p))))
-    (bindings--define-key prof-map [prof-natprof-start]
-      '(menu-item "Start Native Profiler..." profiler-start
-                 :help "Start recording profiling information"))
-
-    (bindings--define-key menu-map [lint] (cons "Linting" lint-map))
-    (bindings--define-key lint-map [lint-di]
-      '(menu-item "Lint Directory..." elint-directory
-                 :help "Lint a directory"))
-    (bindings--define-key lint-map [lint-f]
-      '(menu-item "Lint File..." elint-file
-                 :help "Lint a file"))
-    (bindings--define-key lint-map [lint-b]
-      '(menu-item "Lint Buffer" elint-current-buffer
-                 :help "Lint the current buffer"))
-    (bindings--define-key lint-map [lint-d]
-      '(menu-item "Lint Defun" elint-defun
-                 :help "Lint the function at point"))
-    (bindings--define-key menu-map [edebug-defun]
-      '(menu-item "Instrument Function for Debugging" edebug-defun
-                 :help "Evaluate the top level form point is in, stepping through with Edebug"
-                 :keys "C-u C-M-x"))
-    (bindings--define-key menu-map [separator-byte] menu-bar-separator)
-    (bindings--define-key menu-map [disas]
-      '(menu-item "Disassemble Byte Compiled Object..." disassemble
-                 :help "Print disassembled code for OBJECT in a buffer"))
-    (bindings--define-key menu-map [byte-recompile]
-      '(menu-item "Byte-recompile Directory..." byte-recompile-directory
-                 :help "Recompile every `.el' file in DIRECTORY that needs recompilation"))
-    (bindings--define-key menu-map [emacs-byte-compile-and-load]
-      '(menu-item "Byte-compile and Load" emacs-lisp-byte-compile-and-load
-                 :help "Byte-compile the current file (if it has changed), then load compiled code"))
-    (bindings--define-key menu-map [byte-compile]
-      '(menu-item "Byte-compile This File" emacs-lisp-byte-compile
-                 :help "Byte compile the file containing the current buffer"))
-    (bindings--define-key menu-map [separator-eval] menu-bar-separator)
-    (bindings--define-key menu-map [ielm]
-      '(menu-item "Interactive Expression Evaluation" ielm
-                 :help "Interactively evaluate Emacs Lisp expressions"))
-    (bindings--define-key menu-map [eval-buffer]
-      '(menu-item "Evaluate Buffer" eval-buffer
-                 :help "Execute the current buffer as Lisp code"))
-    (bindings--define-key menu-map [eval-region]
-      '(menu-item "Evaluate Region" eval-region
-                 :help "Execute the region as Lisp code"
-                 :enable mark-active))
-    (bindings--define-key menu-map [eval-sexp]
-      '(menu-item "Evaluate Last S-expression" eval-last-sexp
-                 :help "Evaluate sexp before point; print value in echo area"))
-    (bindings--define-key menu-map [separator-format] menu-bar-separator)
-    (bindings--define-key menu-map [comment-region]
-      '(menu-item "Comment Out Region" comment-region
-                 :help "Comment or uncomment each line in the region"
-                 :enable mark-active))
-    (bindings--define-key menu-map [indent-region]
-      '(menu-item "Indent Region" indent-region
-                 :help "Indent each nonblank line in the region"
-                 :enable mark-active))
-    (bindings--define-key menu-map [indent-line]
-      '(menu-item "Indent Line" lisp-indent-line))
-    map)
-  "Keymap for Emacs Lisp mode.
-All commands in `lisp-mode-shared-map' are inherited by this map.")
-
-(defun emacs-lisp-byte-compile ()
-  "Byte compile the file containing the current buffer."
-  (interactive)
-  (if buffer-file-name
-      (byte-compile-file buffer-file-name)
-    (error "The buffer must be saved in a file first")))
-
-(defun emacs-lisp-byte-compile-and-load ()
-  "Byte-compile the current file (if it has changed), then load compiled code."
-  (interactive)
-  (or buffer-file-name
-      (error "The buffer must be saved in a file first"))
-  (require 'bytecomp)
-  ;; Recompile if file or buffer has changed since last compilation.
-  (if (and (buffer-modified-p)
-          (y-or-n-p (format "Save buffer %s first? " (buffer-name))))
-      (save-buffer))
-  (byte-recompile-file buffer-file-name nil 0 t))
-
-(defcustom emacs-lisp-mode-hook nil
-  "Hook run when entering Emacs Lisp mode."
-  :options '(eldoc-mode imenu-add-menubar-index checkdoc-minor-mode)
-  :type 'hook
-  :group 'lisp)
-
 (defcustom lisp-mode-hook nil
   "Hook run when entering Lisp mode."
   :options '(imenu-add-menubar-index)
@@ -695,72 +579,6 @@ All commands in `lisp-mode-shared-map' are inherited by this map.")
 (defconst lisp--prettify-symbols-alist
   '(("lambda"  . ?λ)))
 
-(define-derived-mode emacs-lisp-mode prog-mode "Emacs-Lisp"
-  "Major mode for editing Lisp code to run in Emacs.
-Commands:
-Delete converts tabs to spaces as it moves back.
-Blank lines separate paragraphs.  Semicolons start comments.
-
-\\{emacs-lisp-mode-map}"
-  :group 'lisp
-  (lisp-mode-variables nil nil 'elisp)
-  (setq imenu-case-fold-search nil)
-  (add-hook 'completion-at-point-functions
-            'lisp-completion-at-point nil 'local))
-
-;;; Emacs Lisp Byte-Code mode
-
-(eval-and-compile
-  (defconst emacs-list-byte-code-comment-re
-    (concat "\\(#\\)@\\([0-9]+\\) "
-            ;; Make sure it's a docstring and not a lazy-loaded byte-code.
-            "\\(?:[^(]\\|([^\"]\\)")))
-
-(defun emacs-lisp-byte-code-comment (end &optional _point)
-  "Try to syntactically mark the #@NNN ....^_ docstrings in byte-code files."
-  (let ((ppss (syntax-ppss)))
-    (when (and (nth 4 ppss)
-               (eq (char-after (nth 8 ppss)) ?#))
-      (let* ((n (save-excursion
-                  (goto-char (nth 8 ppss))
-                  (when (looking-at emacs-list-byte-code-comment-re)
-                    (string-to-number (match-string 2)))))
-             ;; `maxdiff' tries to make sure the loop below terminates.
-             (maxdiff n))
-        (when n
-          (let* ((bchar (match-end 2))
-                 (b (position-bytes bchar)))
-            (goto-char (+ b n))
-            (while (let ((diff (- (position-bytes (point)) b n)))
-                     (unless (zerop diff)
-                       (when (> diff maxdiff) (setq diff maxdiff))
-                       (forward-char (- diff))
-                       (setq maxdiff (if (> diff 0) diff
-                                       (max (1- maxdiff) 1)))
-                       t))))
-          (if (<= (point) end)
-              (put-text-property (1- (point)) (point)
-                                 'syntax-table
-                                 (string-to-syntax "> b"))
-            (goto-char end)))))))
-
-(defun emacs-lisp-byte-code-syntax-propertize (start end)
-  (emacs-lisp-byte-code-comment end (point))
-  (funcall
-   (syntax-propertize-rules
-    (emacs-list-byte-code-comment-re
-     (1 (prog1 "< b" (emacs-lisp-byte-code-comment end (point))))))
-   start end))
-
-(add-to-list 'auto-mode-alist '("\\.elc\\'" . emacs-lisp-byte-code-mode))
-(define-derived-mode emacs-lisp-byte-code-mode emacs-lisp-mode
-  "Elisp-Byte-Code"
-  "Major mode for *.elc files."
-  ;; TODO: Add way to disassemble byte-code under point.
-  (setq-local open-paren-in-column-0-is-defun-start nil)
-  (setq-local syntax-propertize-function
-              #'emacs-lisp-byte-code-syntax-propertize))
-
 ;;; Generic Lisp mode.
 
 (defvar lisp-mode-map
@@ -814,421 +632,6 @@ or to switch back to an existing one."
   (interactive)
   (error "Process lisp does not exist"))
 
-(defvar lisp-interaction-mode-map
-  (let ((map (make-sparse-keymap))
-       (menu-map (make-sparse-keymap "Lisp-Interaction")))
-    (set-keymap-parent map lisp-mode-shared-map)
-    (define-key map "\e\C-x" 'eval-defun)
-    (define-key map "\e\C-q" 'indent-pp-sexp)
-    (define-key map "\e\t" 'completion-at-point)
-    (define-key map "\n" 'eval-print-last-sexp)
-    (bindings--define-key map [menu-bar lisp-interaction]
-      (cons "Lisp-Interaction" menu-map))
-    (bindings--define-key menu-map [eval-defun]
-      '(menu-item "Evaluate Defun" eval-defun
-                 :help "Evaluate the top-level form containing point, or after point"))
-    (bindings--define-key menu-map [eval-print-last-sexp]
-      '(menu-item "Evaluate and Print" eval-print-last-sexp
-                 :help "Evaluate sexp before point; print value into current buffer"))
-    (bindings--define-key menu-map [edebug-defun-lisp-interaction]
-      '(menu-item "Instrument Function for Debugging" edebug-defun
-                 :help "Evaluate the top level form point is in, stepping through with Edebug"
-                 :keys "C-u C-M-x"))
-    (bindings--define-key menu-map [indent-pp-sexp]
-      '(menu-item "Indent or Pretty-Print" indent-pp-sexp
-                 :help "Indent each line of the list starting just after point, or prettyprint it"))
-    (bindings--define-key menu-map [complete-symbol]
-      '(menu-item "Complete Lisp Symbol" completion-at-point
-                 :help "Perform completion on Lisp symbol preceding point"))
-    map)
-  "Keymap for Lisp Interaction mode.
-All commands in `lisp-mode-shared-map' are inherited by this map.")
-
-(define-derived-mode lisp-interaction-mode emacs-lisp-mode "Lisp Interaction"
-  "Major mode for typing and evaluating Lisp forms.
-Like Lisp mode except that \\[eval-print-last-sexp] evals the Lisp expression
-before point, and prints its value into the buffer, advancing point.
-Note that printing is controlled by `eval-expression-print-length'
-and `eval-expression-print-level'.
-
-Commands:
-Delete converts tabs to spaces as it moves back.
-Paragraphs are separated only by blank lines.
-Semicolons start comments.
-
-\\{lisp-interaction-mode-map}"
-  :abbrev-table nil)
-
-(defun eval-print-last-sexp (&optional eval-last-sexp-arg-internal)
-  "Evaluate sexp before point; print value into current buffer.
-
-Normally, this function truncates long output according to the value
-of the variables `eval-expression-print-length' and
-`eval-expression-print-level'.  With a prefix argument of zero,
-however, there is no such truncation.  Such a prefix argument
-also causes integers to be printed in several additional formats
-\(octal, hexadecimal, and character).
-
-If `eval-expression-debug-on-error' is non-nil, which is the default,
-this command arranges for all errors to enter the debugger."
-  (interactive "P")
-  (let ((standard-output (current-buffer)))
-    (terpri)
-    (eval-last-sexp (or eval-last-sexp-arg-internal t))
-    (terpri)))
-
-
-(defun last-sexp-setup-props (beg end value alt1 alt2)
-  "Set up text properties for the output of `eval-last-sexp-1'.
-BEG and END are the start and end of the output in current-buffer.
-VALUE is the Lisp value printed, ALT1 and ALT2 are strings for the
-alternative printed representations that can be displayed."
-  (let ((map (make-sparse-keymap)))
-    (define-key map "\C-m" 'last-sexp-toggle-display)
-    (define-key map [down-mouse-2] 'mouse-set-point)
-    (define-key map [mouse-2] 'last-sexp-toggle-display)
-    (add-text-properties
-     beg end
-     `(printed-value (,value ,alt1 ,alt2)
-                    mouse-face highlight
-                    keymap ,map
-                    help-echo "RET, mouse-2: toggle abbreviated display"
-                    rear-nonsticky (mouse-face keymap help-echo
-                                               printed-value)))))
-
-
-(defun last-sexp-toggle-display (&optional _arg)
-  "Toggle between abbreviated and unabbreviated printed representations."
-  (interactive "P")
-  (save-restriction
-    (widen)
-    (let ((value (get-text-property (point) 'printed-value)))
-      (when value
-       (let ((beg (or (previous-single-property-change (min (point-max) (1+ (point)))
-                                                       'printed-value)
-                      (point)))
-             (end (or (next-single-char-property-change (point) 'printed-value) (point)))
-             (standard-output (current-buffer))
-             (point (point)))
-         (delete-region beg end)
-         (insert (nth 1 value))
-         (or (= beg point)
-             (setq point (1- (point))))
-         (last-sexp-setup-props beg (point)
-                                (nth 0 value)
-                                (nth 2 value)
-                                (nth 1 value))
-         (goto-char (min (point-max) point)))))))
-
-(defun prin1-char (char)
-  "Return a string representing CHAR as a character rather than as an integer.
-If CHAR is not a character, return nil."
-  (and (integerp char)
-       (eventp char)
-       (let ((c (event-basic-type char))
-            (mods (event-modifiers char))
-            string)
-        ;; Prevent ?A from turning into ?\S-a.
-        (if (and (memq 'shift mods)
-                 (zerop (logand char ?\S-\^@))
-                 (not (let ((case-fold-search nil))
-                        (char-equal c (upcase c)))))
-            (setq c (upcase c) mods nil))
-        ;; What string are we considering using?
-        (condition-case nil
-            (setq string
-                  (concat
-                   "?"
-                   (mapconcat
-                    (lambda (modif)
-                      (cond ((eq modif 'super) "\\s-")
-                            (t (string ?\\ (upcase (aref (symbol-name modif) 0)) ?-))))
-                    mods "")
-                   (cond
-                    ((memq c '(?\; ?\( ?\) ?\{ ?\} ?\[ ?\] ?\" ?\' ?\\)) (string ?\\ c))
-                    ((eq c 127) "\\C-?")
-                    (t
-                     (string c)))))
-          (error nil))
-        ;; Verify the string reads a CHAR, not to some other character.
-        ;; If it doesn't, return nil instead.
-        (and string
-             (= (car (read-from-string string)) char)
-             string))))
-
-
-(defun preceding-sexp ()
-  "Return sexp before the point."
-  (let ((opoint (point))
-       ignore-quotes
-       expr)
-    (save-excursion
-      (with-syntax-table emacs-lisp-mode-syntax-table
-       ;; If this sexp appears to be enclosed in `...'
-       ;; then ignore the surrounding quotes.
-       (setq ignore-quotes
-             (or (eq (following-char) ?\')
-                 (eq (preceding-char) ?\')))
-       (forward-sexp -1)
-       ;; If we were after `?\e' (or similar case),
-       ;; use the whole thing, not just the `e'.
-       (when (eq (preceding-char) ?\\)
-         (forward-char -1)
-         (when (eq (preceding-char) ??)
-           (forward-char -1)))
-
-       ;; Skip over hash table read syntax.
-       (and (> (point) (1+ (point-min)))
-            (looking-back "#s" (- (point) 2))
-            (forward-char -2))
-
-       ;; Skip over `#N='s.
-       (when (eq (preceding-char) ?=)
-         (let (labeled-p)
-           (save-excursion
-             (skip-chars-backward "0-9#=")
-             (setq labeled-p (looking-at "\\(#[0-9]+=\\)+")))
-           (when labeled-p
-             (forward-sexp -1))))
-
-       (save-restriction
-         ;; vladimir@cs.ualberta.ca 30-Jul-1997: skip ` in
-         ;; `variable' so that the value is returned, not the
-         ;; name
-         (if (and ignore-quotes
-                  (eq (following-char) ?`))
-             (forward-char))
-         (narrow-to-region (point-min) opoint)
-         (setq expr (read (current-buffer)))
-         ;; If it's an (interactive ...) form, it's more
-         ;; useful to show how an interactive call would
-         ;; use it.
-         (and (consp expr)
-              (eq (car expr) 'interactive)
-              (setq expr
-                    (list 'call-interactively
-                          (list 'quote
-                                (list 'lambda
-                                      '(&rest args)
-                                      expr
-                                      'args)))))
-         expr)))))
-
-
-(defun eval-last-sexp-1 (eval-last-sexp-arg-internal)
-  "Evaluate sexp before point; print value in the echo area.
-With argument, print output into current buffer.
-With a zero prefix arg, print output with no limit on the length
-and level of lists, and include additional formats for integers
-\(octal, hexadecimal, and character)."
-  (let ((standard-output (if eval-last-sexp-arg-internal (current-buffer) t)))
-    ;; Setup the lexical environment if lexical-binding is enabled.
-    (eval-last-sexp-print-value
-     (eval (eval-sexp-add-defvars (preceding-sexp)) lexical-binding)
-     eval-last-sexp-arg-internal)))
-
-
-(defun eval-last-sexp-print-value (value &optional eval-last-sexp-arg-internal)
-  (let ((unabbreviated (let ((print-length nil) (print-level nil))
-                        (prin1-to-string value)))
-       (print-length (and (not (zerop (prefix-numeric-value
-                                       eval-last-sexp-arg-internal)))
-                          eval-expression-print-length))
-       (print-level (and (not (zerop (prefix-numeric-value
-                                      eval-last-sexp-arg-internal)))
-                         eval-expression-print-level))
-       (beg (point))
-       end)
-    (prog1
-       (prin1 value)
-      (let ((str (eval-expression-print-format value)))
-       (if str (princ str)))
-      (setq end (point))
-      (when (and (bufferp standard-output)
-                (or (not (null print-length))
-                    (not (null print-level)))
-                (not (string= unabbreviated
-                              (buffer-substring-no-properties beg end))))
-       (last-sexp-setup-props beg end value
-                              unabbreviated
-                              (buffer-substring-no-properties beg end))
-       ))))
-
-
-(defvar eval-last-sexp-fake-value (make-symbol "t"))
-
-(defun eval-sexp-add-defvars (exp &optional pos)
-  "Prepend EXP with all the `defvar's that precede it in the buffer.
-POS specifies the starting position where EXP was found and defaults to point."
-  (setq exp (macroexpand-all exp))      ;Eager macro-expansion.
-  (if (not lexical-binding)
-      exp
-    (save-excursion
-      (unless pos (setq pos (point)))
-      (let ((vars ()))
-        (goto-char (point-min))
-        (while (re-search-forward
-                "(def\\(?:var\\|const\\|custom\\)[ \t\n]+\\([^; '()\n\t]+\\)"
-                pos t)
-          (let ((var (intern (match-string 1))))
-            (and (not (special-variable-p var))
-                 (save-excursion
-                   (zerop (car (syntax-ppss (match-beginning 0)))))
-              (push var vars))))
-        `(progn ,@(mapcar (lambda (v) `(defvar ,v)) vars) ,exp)))))
-
-(defun eval-last-sexp (eval-last-sexp-arg-internal)
-  "Evaluate sexp before point; print value in the echo area.
-Interactively, with prefix argument, print output into current buffer.
-
-Normally, this function truncates long output according to the value
-of the variables `eval-expression-print-length' and
-`eval-expression-print-level'.  With a prefix argument of zero,
-however, there is no such truncation.  Such a prefix argument
-also causes integers to be printed in several additional formats
-\(octal, hexadecimal, and character).
-
-If `eval-expression-debug-on-error' is non-nil, which is the default,
-this command arranges for all errors to enter the debugger."
-  (interactive "P")
-  (if (null eval-expression-debug-on-error)
-      (eval-last-sexp-1 eval-last-sexp-arg-internal)
-    (let ((value
-          (let ((debug-on-error eval-last-sexp-fake-value))
-            (cons (eval-last-sexp-1 eval-last-sexp-arg-internal)
-                  debug-on-error))))
-      (unless (eq (cdr value) eval-last-sexp-fake-value)
-       (setq debug-on-error (cdr value)))
-      (car value))))
-
-(defun eval-defun-1 (form)
-  "Treat some expressions specially.
-Reset the `defvar' and `defcustom' variables to the initial value.
-\(For `defcustom', use the :set function if there is one.)
-Reinitialize the face according to the `defface' specification."
-  ;; The code in edebug-defun should be consistent with this, but not
-  ;; the same, since this gets a macroexpanded form.
-  (cond ((not (listp form))
-        form)
-       ((and (eq (car form) 'defvar)
-             (cdr-safe (cdr-safe form))
-             (boundp (cadr form)))
-        ;; Force variable to be re-set.
-        `(progn (defvar ,(nth 1 form) nil ,@(nthcdr 3 form))
-                (setq-default ,(nth 1 form) ,(nth 2 form))))
-       ;; `defcustom' is now macroexpanded to
-       ;; `custom-declare-variable' with a quoted value arg.
-       ((and (eq (car form) 'custom-declare-variable)
-             (default-boundp (eval (nth 1 form) lexical-binding)))
-        ;; Force variable to be bound, using :set function if specified.
-        (let ((setfunc (memq :set form)))
-          (when setfunc
-            (setq setfunc (car-safe (cdr-safe setfunc)))
-            (or (functionp setfunc) (setq setfunc nil)))
-          (funcall (or setfunc 'set-default)
-                   (eval (nth 1 form) lexical-binding)
-                   ;; The second arg is an expression that evaluates to
-                   ;; an expression.  The second evaluation is the one
-                   ;; normally performed not by normal execution but by
-                   ;; custom-initialize-set (for example), which does not
-                   ;; use lexical-binding.
-                   (eval (eval (nth 2 form) lexical-binding))))
-        form)
-       ;; `defface' is macroexpanded to `custom-declare-face'.
-       ((eq (car form) 'custom-declare-face)
-        ;; Reset the face.
-        (let ((face-symbol (eval (nth 1 form) lexical-binding)))
-          (setq face-new-frame-defaults
-                (assq-delete-all face-symbol face-new-frame-defaults))
-          (put face-symbol 'face-defface-spec nil)
-          (put face-symbol 'face-override-spec nil))
-        form)
-       ((eq (car form) 'progn)
-        (cons 'progn (mapcar 'eval-defun-1 (cdr form))))
-       (t form)))
-
-(defun eval-defun-2 ()
-  "Evaluate defun that point is in or before.
-The value is displayed in the echo area.
-If the current defun is actually a call to `defvar',
-then reset the variable using the initial value expression
-even if the variable already has some other value.
-\(Normally `defvar' does not change the variable's value
-if it already has a value.\)
-
-Return the result of evaluation."
-  ;; FIXME: the print-length/level bindings should only be applied while
-  ;; printing, not while evaluating.
-  (let ((debug-on-error eval-expression-debug-on-error)
-       (print-length eval-expression-print-length)
-       (print-level eval-expression-print-level))
-    (save-excursion
-      ;; Arrange for eval-region to "read" the (possibly) altered form.
-      ;; eval-region handles recording which file defines a function or
-      ;; variable.
-      (let ((standard-output t)
-            beg end form)
-        ;; Read the form from the buffer, and record where it ends.
-        (save-excursion
-          (end-of-defun)
-          (beginning-of-defun)
-          (setq beg (point))
-          (setq form (read (current-buffer)))
-          (setq end (point)))
-        ;; Alter the form if necessary.
-        (let ((form (eval-sexp-add-defvars
-                     (eval-defun-1 (macroexpand form)))))
-          (eval-region beg end standard-output
-                       (lambda (_ignore)
-                         ;; Skipping to the end of the specified region
-                         ;; will make eval-region return.
-                         (goto-char end)
-                         form))))))
-  (let ((str (eval-expression-print-format (car values))))
-    (if str (princ str)))
-  ;; The result of evaluation has been put onto VALUES.  So return it.
-  (car values))
-
-(defun eval-defun (edebug-it)
-  "Evaluate the top-level form containing point, or after point.
-
-If the current defun is actually a call to `defvar' or `defcustom',
-evaluating it this way resets the variable using its initial value
-expression (using the defcustom's :set function if there is one), even
-if the variable already has some other value.  \(Normally `defvar' and
-`defcustom' do not alter the value if there already is one.)  In an
-analogous way, evaluating a `defface' overrides any customizations of
-the face, so that it becomes defined exactly as the `defface' expression
-says.
-
-If `eval-expression-debug-on-error' is non-nil, which is the default,
-this command arranges for all errors to enter the debugger.
-
-With a prefix argument, instrument the code for Edebug.
-
-If acting on a `defun' for FUNCTION, and the function was
-instrumented, `Edebug: FUNCTION' is printed in the echo area.  If not
-instrumented, just FUNCTION is printed.
-
-If not acting on a `defun', the result of evaluation is displayed in
-the echo area.  This display is controlled by the variables
-`eval-expression-print-length' and `eval-expression-print-level',
-which see."
-  (interactive "P")
-  (cond (edebug-it
-        (require 'edebug)
-        (eval-defun (not edebug-all-defs)))
-       (t
-        (if (null eval-expression-debug-on-error)
-            (eval-defun-2)
-          (let ((old-value (make-symbol "t")) new-value value)
-            (let ((debug-on-error old-value))
-              (setq value (eval-defun-2))
-              (setq new-value debug-on-error))
-            (unless (eq old-value new-value)
-              (setq debug-on-error new-value))
-            value)))))
-
 ;; May still be used by some external Lisp-mode variant.
 (define-obsolete-function-alias 'lisp-comment-indent
     'comment-indent-default "22.1")
@@ -1551,19 +954,21 @@ Lisp function does not specify a special indentation."
 ;; like defun if the first form is placed on the next line, otherwise
 ;; it is indented like any other form (i.e. forms line up under first).
 
-(put 'autoload 'lisp-indent-function 'defun)
+(put 'autoload 'lisp-indent-function 'defun) ;Elisp
 (put 'progn 'lisp-indent-function 0)
 (put 'prog1 'lisp-indent-function 1)
 (put 'prog2 'lisp-indent-function 2)
-(put 'save-excursion 'lisp-indent-function 0)
-(put 'save-restriction 'lisp-indent-function 0)
-(put 'save-current-buffer 'lisp-indent-function 0)
+(put 'save-excursion 'lisp-indent-function 0)      ;Elisp
+(put 'save-restriction 'lisp-indent-function 0)    ;Elisp
+(put 'save-current-buffer 'lisp-indent-function 0) ;Elisp
 (put 'let 'lisp-indent-function 1)
 (put 'let* 'lisp-indent-function 1)
 (put 'while 'lisp-indent-function 1)
 (put 'if 'lisp-indent-function 2)
 (put 'catch 'lisp-indent-function 1)
 (put 'condition-case 'lisp-indent-function 2)
+(put 'handler-case 'lisp-indent-function 1) ;CL
+(put 'handler-bind 'lisp-indent-function 1) ;CL
 (put 'unwind-protect 'lisp-indent-function 1)
 (put 'with-output-to-temp-buffer 'lisp-indent-function 1)
 
index a7de1bd255e77384e32f9e770e4185ac8262052a..31682d036bf9adf6b216aa7445f05e13376a4668 100644 (file)
@@ -57,10 +57,14 @@ Should take the same arguments and behave similarly to `forward-sexp'.")
 
 (defun forward-sexp (&optional arg)
   "Move forward across one balanced expression (sexp).
-With ARG, do it that many times.  Negative arg -N means
-move backward across N balanced expressions.
-This command assumes point is not in a string or comment.
-Calls `forward-sexp-function' to do the work, if that is non-nil."
+With ARG, do it that many times.  Negative arg -N means move
+backward across N balanced expressions.  This command assumes
+point is not in a string or comment.  Calls
+`forward-sexp-function' to do the work, if that is non-nil.  If
+unable to move over a sexp, signal `scan-error' with three
+arguments: a message, the start of the obstacle (usually a
+parenthesis or list marker of some kind), and end of the
+obstacle."
   (interactive "^p")
   (or arg (setq arg 1))
   (if forward-sexp-function
@@ -140,38 +144,92 @@ This command assumes point is not in a string or comment."
       (goto-char (or (scan-lists (point) inc -1) (buffer-end arg)))
       (setq arg (- arg inc)))))
 
-(defun backward-up-list (&optional arg)
+(defun backward-up-list (&optional arg escape-strings no-syntax-crossing)
   "Move backward out of one level of parentheses.
 This command will also work on other parentheses-like expressions
-defined by the current language mode.
-With ARG, do this that many times.
-A negative argument means move forward but still to a less deep spot.
-This command assumes point is not in a string or comment."
-  (interactive "^p")
-  (up-list (- (or arg 1))))
-
-(defun up-list (&optional arg)
+defined by the current language mode.  With ARG, do this that
+many times.  A negative argument means move forward but still to
+a less deep spot.  If ESCAPE-STRINGS is non-nil (as it is
+interactively), move out of enclosing strings as well.  If
+NO-SYNTAX-CROSSING is non-nil (as it is interactively), prefer to
+break out of any enclosing string instead of moving to the start
+of a list broken across multiple strings.  On error, location of
+point is unspecified."
+  (interactive "^p\nd\nd")
+  (up-list (- (or arg 1)) escape-strings no-syntax-crossing))
+
+(defun up-list (&optional arg escape-strings no-syntax-crossing)
   "Move forward out of one level of parentheses.
 This command will also work on other parentheses-like expressions
-defined by the current language mode.
-With ARG, do this that many times.
-A negative argument means move backward but still to a less deep spot.
-This command assumes point is not in a string or comment."
-  (interactive "^p")
+defined by the current language mode.  With ARG, do this that
+many times.  A negative argument means move backward but still to
+a less deep spot.  If ESCAPE-STRINGS is non-nil (as it is
+interactively), move out of enclosing strings as well. If
+NO-SYNTAX-CROSSING is non-nil (as it is interactively), prefer to
+break out of any enclosing string instead of moving to the start
+of a list broken across multiple strings.  On error, location of
+point is unspecified."
+  (interactive "^p\nd\nd")
   (or arg (setq arg 1))
   (let ((inc (if (> arg 0) 1 -1))
-        pos)
+        (pos nil))
     (while (/= arg 0)
-      (if (null forward-sexp-function)
-          (goto-char (or (scan-lists (point) inc 1) (buffer-end arg)))
-       (condition-case err
-           (while (progn (setq pos (point))
-                         (forward-sexp inc)
-                         (/= (point) pos)))
-         (scan-error (goto-char (nth (if (> arg 0) 3 2) err))))
-       (if (= (point) pos)
-            (signal 'scan-error
-                    (list "Unbalanced parentheses" (point) (point)))))
+      (condition-case err
+          (save-restriction
+            ;; If we've been asked not to cross string boundaries
+            ;; and we're inside a string, narrow to that string so
+            ;; that scan-lists doesn't find a match in a different
+            ;; string.
+            (when no-syntax-crossing
+              (let* ((syntax (syntax-ppss))
+                     (string-comment-start (nth 8 syntax)))
+                (when string-comment-start
+                  (save-excursion
+                    (goto-char string-comment-start)
+                    (narrow-to-region
+                     (point)
+                     (if (nth 3 syntax) ; in string
+                         (condition-case nil
+                             (progn (forward-sexp) (point))
+                           (scan-error (point-max)))
+                       (forward-comment 1)
+                       (point)))))))
+            (if (null forward-sexp-function)
+                (goto-char (or (scan-lists (point) inc 1)
+                               (buffer-end arg)))
+              (condition-case err
+                  (while (progn (setq pos (point))
+                                (forward-sexp inc)
+                                (/= (point) pos)))
+                (scan-error (goto-char (nth (if (> arg 0) 3 2) err))))
+              (if (= (point) pos)
+                  (signal 'scan-error
+                          (list "Unbalanced parentheses" (point) (point))))))
+        (scan-error
+         (let ((syntax nil))
+           (or
+            ;; If we bumped up against the end of a list, see whether
+            ;; we're inside a string: if so, just go to the beginning
+            ;; or end of that string.
+            (and escape-strings
+                 (or syntax (setf syntax (syntax-ppss)))
+                 (nth 3 syntax)
+                 (goto-char (nth 8 syntax))
+                 (progn (when (> inc 0)
+                          (forward-sexp))
+                        t))
+            ;; If we narrowed to a comment above and failed to escape
+            ;; it, the error might be our fault, not an indication
+            ;; that we're out of syntax.  Try again from beginning or
+            ;; end of the comment.
+            (and no-syntax-crossing
+                 (or syntax (setf syntax (syntax-ppss)))
+                 (nth 4 syntax)
+                 (goto-char (nth 8 syntax))
+                 (or (< inc 0)
+                     (forward-comment 1))
+                 (setf arg (+ arg inc)))
+            (signal (car err) (cdr err))))))
       (setq arg (- arg inc)))))
 
 (defun kill-sexp (&optional arg)
@@ -464,11 +522,15 @@ it marks the next defun after the ones already marked."
             (beginning-of-defun))
           (re-search-backward "^\n" (- (point) 1) t)))))
 
-(defun narrow-to-defun (&optional _arg)
+(defvar narrow-to-defun-include-comments nil
+  "If non-nil, `narrow-to-defun' will also show comments preceding the defun.")
+
+(defun narrow-to-defun (&optional include-comments)
   "Make text outside current defun invisible.
-The defun visible is the one that contains point or follows point.
-Optional ARG is ignored."
-  (interactive)
+The current defun is the one that contains point or follows point.
+Preceding comments are included if INCLUDE-COMMENTS is non-nil.
+Interactively, the behavior depends on `narrow-to-defun-include-comments'."
+  (interactive (list narrow-to-defun-include-comments))
   (save-excursion
     (widen)
     (let ((opoint (point))
@@ -504,6 +566,18 @@ Optional ARG is ignored."
        (setq end (point))
        (beginning-of-defun)
        (setq beg (point)))
+      (when include-comments
+       (goto-char beg)
+       ;; Move back past all preceding comments (and whitespace).
+       (when (forward-comment -1)
+         (while (forward-comment -1))
+         ;; Move forwards past any page breaks within these comments.
+         (when (and page-delimiter (not (string= page-delimiter "")))
+           (while (re-search-forward page-delimiter beg t)))
+         ;; Lastly, move past any empty lines.
+         (skip-chars-forward "[:space:]\n")
+         (beginning-of-line)
+         (setq beg (point))))
       (goto-char end)
       (re-search-backward "^\n" (- (point) 1) t)
       (narrow-to-region beg end))))
@@ -684,248 +758,4 @@ considered."
         (completion-in-region (nth 0 data) (nth 1 data) (nth 2 data)
                               (plist-get plist :predicate))))))
 
-(defun lisp--local-variables-1 (vars sexp)
-  "Return the vars locally bound around the witness, or nil if not found."
-  (let (res)
-    (while
-        (unless
-            (setq res
-                  (pcase sexp
-                    (`(,(or `let `let*) ,bindings)
-                     (let ((vars vars))
-                       (when (eq 'let* (car sexp))
-                         (dolist (binding (cdr (reverse bindings)))
-                           (push (or (car-safe binding) binding) vars)))
-                       (lisp--local-variables-1
-                        vars (car (cdr-safe (car (last bindings)))))))
-                    (`(,(or `let `let*) ,bindings . ,body)
-                     (let ((vars vars))
-                       (dolist (binding bindings)
-                         (push (or (car-safe binding) binding) vars))
-                       (lisp--local-variables-1 vars (car (last body)))))
-                    (`(lambda ,_) (setq sexp nil))
-                    (`(lambda ,args . ,body)
-                     (lisp--local-variables-1
-                      (append args vars) (car (last body))))
-                    (`(condition-case ,_ ,e) (lisp--local-variables-1 vars e))
-                    (`(condition-case ,v ,_ . ,catches)
-                     (lisp--local-variables-1
-                      (cons v vars) (cdr (car (last catches)))))
-                    (`(quote . ,_) (setq sexp nil))
-                    (`(,_ . ,_)
-                     (lisp--local-variables-1 vars (car (last sexp))))
-                    (`lisp--witness--lisp (or vars '(nil)))
-                    (_ nil)))
-          (setq sexp (ignore-errors (butlast sexp)))))
-    res))
-
-(defun lisp--local-variables ()
-  "Return a list of locally let-bound variables at point."
-  (save-excursion
-    (skip-syntax-backward "w_")
-    (let* ((ppss (syntax-ppss))
-           (txt (buffer-substring-no-properties (or (car (nth 9 ppss)) (point))
-                                                (or (nth 8 ppss) (point))))
-           (closer ()))
-      (dolist (p (nth 9 ppss))
-        (push (cdr (syntax-after p)) closer))
-      (setq closer (apply #'string closer))
-      (let* ((sexp (condition-case nil
-                       (car (read-from-string
-                             (concat txt "lisp--witness--lisp" closer)))
-                     (end-of-file nil)))
-             (macroexpand-advice (lambda (expander form &rest args)
-                                   (condition-case nil
-                                       (apply expander form args)
-                                     (error form))))
-             (sexp
-              (unwind-protect
-                  (progn
-                    (advice-add 'macroexpand :around macroexpand-advice)
-                    (macroexpand-all sexp))
-                (advice-remove 'macroexpand macroexpand-advice)))
-             (vars (lisp--local-variables-1 nil sexp)))
-        (delq nil
-              (mapcar (lambda (var)
-                        (and (symbolp var)
-                             (not (string-match (symbol-name var) "\\`[&_]"))
-                             ;; Eliminate uninterned vars.
-                             (intern-soft var)
-                             var))
-                      vars))))))
-
-(defvar lisp--local-variables-completion-table
-  ;; Use `defvar' rather than `defconst' since defconst would purecopy this
-  ;; value, which would doubly fail: it would fail because purecopy can't
-  ;; handle the recursive bytecode object, and it would fail because it would
-  ;; move `lastpos' and `lastvars' to pure space where they'd be immutable!
-  (let ((lastpos nil) (lastvars nil))
-    (letrec ((hookfun (lambda ()
-                        (setq lastpos nil)
-                        (remove-hook 'post-command-hook hookfun))))
-      (completion-table-dynamic
-       (lambda (_string)
-         (save-excursion
-           (skip-syntax-backward "_w")
-           (let ((newpos (cons (point) (current-buffer))))
-             (unless (equal lastpos newpos)
-               (add-hook 'post-command-hook hookfun)
-               (setq lastpos newpos)
-               (setq lastvars
-                     (mapcar #'symbol-name (lisp--local-variables))))))
-         lastvars)))))
-
-;; FIXME: Support for Company brings in features which straddle eldoc.
-;; We should consolidate this, so that major modes can provide all that
-;; data all at once:
-;; - a function to extract "the reference at point" (may be more complex
-;;     than a mere string, to distinguish various namespaces).
-;; - a function to jump to such a reference.
-;; - a function to show the signature/interface of such a reference.
-;; - a function to build a help-buffer about that reference.
-;; FIXME: Those functions should also be used by the normal completion code in
-;; the *Completions* buffer.
-
-(defun lisp--company-doc-buffer (str)
-  (let ((symbol (intern-soft str)))
-    ;; FIXME: we really don't want to "display-buffer and then undo it".
-    (save-window-excursion
-      ;; Make sure we don't display it in another frame, otherwise
-      ;; save-window-excursion won't be able to undo it.
-      (let ((display-buffer-overriding-action
-             '(nil . ((inhibit-switch-frame . t)))))
-        (ignore-errors
-          (cond
-           ((fboundp symbol) (describe-function symbol))
-           ((boundp symbol) (describe-variable symbol))
-           ((featurep symbol) (describe-package symbol))
-           ((facep symbol) (describe-face symbol))
-           (t (signal 'user-error nil)))
-          (help-buffer))))))
-
-(defun lisp--company-doc-string (str)
-  (let* ((symbol (intern-soft str))
-         (doc (if (fboundp symbol)
-                  (documentation symbol t)
-                (documentation-property symbol 'variable-documentation t))))
-    (and (stringp doc)
-         (string-match ".*$" doc)
-         (match-string 0 doc))))
-
-(declare-function find-library-name "find-func" (library))
-
-(defun lisp--company-location (str)
-  (let ((sym (intern-soft str)))
-    (cond
-     ((fboundp sym) (find-definition-noselect sym nil))
-     ((boundp sym) (find-definition-noselect sym 'defvar))
-     ((featurep sym)
-      (require 'find-func)
-      (cons (find-file-noselect (find-library-name
-                                 (symbol-name sym)))
-            0))
-     ((facep sym) (find-definition-noselect sym 'defface)))))
-
-(defun lisp-completion-at-point (&optional _predicate)
-  "Function used for `completion-at-point-functions' in `emacs-lisp-mode'."
-  (with-syntax-table emacs-lisp-mode-syntax-table
-    (let* ((pos (point))
-          (beg (condition-case nil
-                   (save-excursion
-                     (backward-sexp 1)
-                     (skip-syntax-forward "'")
-                     (point))
-                 (scan-error pos)))
-          (end
-           (unless (or (eq beg (point-max))
-                       (member (char-syntax (char-after beg))
-                                '(?\s ?\" ?\( ?\))))
-             (condition-case nil
-                 (save-excursion
-                   (goto-char beg)
-                   (forward-sexp 1)
-                   (when (>= (point) pos)
-                     (point)))
-               (scan-error pos))))
-           (funpos (eq (char-before beg) ?\()) ;t if in function position.
-           (table-etc
-            (if (not funpos)
-                ;; FIXME: We could look at the first element of the list and
-                ;; use it to provide a more specific completion table in some
-                ;; cases.  E.g. filter out keywords that are not understood by
-                ;; the macro/function being called.
-                (list nil (completion-table-merge
-                           lisp--local-variables-completion-table
-                           (apply-partially #'completion-table-with-predicate
-                                            obarray
-                                            ;; Don't include all symbols
-                                            ;; (bug#16646).
-                                            (lambda (sym)
-                                              (or (boundp sym)
-                                                  (fboundp sym)
-                                                  (symbol-plist sym)))
-                                            'strict))
-                      :annotation-function
-                      (lambda (str) (if (fboundp (intern-soft str)) " <f>"))
-                      :company-doc-buffer #'lisp--company-doc-buffer
-                      :company-docsig #'lisp--company-doc-string
-                      :company-location #'lisp--company-location)
-              ;; Looks like a funcall position.  Let's double check.
-              (save-excursion
-                (goto-char (1- beg))
-                (let ((parent
-                       (condition-case nil
-                           (progn (up-list -1) (forward-char 1)
-                                  (let ((c (char-after)))
-                                    (if (eq c ?\() ?\(
-                                      (if (memq (char-syntax c) '(?w ?_))
-                                          (read (current-buffer))))))
-                         (error nil))))
-                  (pcase parent
-                    ;; FIXME: Rather than hardcode special cases here,
-                    ;; we should use something like a symbol-property.
-                    (`declare
-                     (list t (mapcar (lambda (x) (symbol-name (car x)))
-                                     (delete-dups
-                                      ;; FIXME: We should include some
-                                      ;; docstring with each entry.
-                                      (append
-                                       macro-declarations-alist
-                                       defun-declarations-alist)))))
-                    ((and (or `condition-case `condition-case-unless-debug)
-                          (guard (save-excursion
-                                   (ignore-errors
-                                     (forward-sexp 2)
-                                     (< (point) beg)))))
-                     (list t obarray
-                           :predicate (lambda (sym) (get sym 'error-conditions))))
-                   ((and ?\(
-                         (guard (save-excursion
-                                  (goto-char (1- beg))
-                                  (up-list -1)
-                                  (forward-symbol -1)
-                                  (looking-at "\\_<let\\*?\\_>"))))
-                    (list t obarray
-                          :predicate #'boundp
-                          :company-doc-buffer #'lisp--company-doc-buffer
-                          :company-docsig #'lisp--company-doc-string
-                          :company-location #'lisp--company-location))
-                    (_ (list nil obarray
-                             :predicate #'fboundp
-                             :company-doc-buffer #'lisp--company-doc-buffer
-                             :company-docsig #'lisp--company-doc-string
-                             :company-location #'lisp--company-location
-                             ))))))))
-      (when end
-        (let ((tail (if (null (car table-etc))
-                        (cdr table-etc)
-                      (cons
-                       (if (memq (char-syntax (or (char-after end) ?\s))
-                                 '(?\s ?>))
-                           (cadr table-etc)
-                         (apply-partially 'completion-table-with-terminator
-                                          " " (cadr table-etc)))
-                       (cddr table-etc)))))
-          `(,beg ,end ,@tail))))))
-
 ;;; lisp.el ends here
index e3a746fa69ee1c7169b44255aa0e8470bd1e8126..44727daf76ae21df6943669aa1e271343b04a978 100644 (file)
@@ -97,7 +97,10 @@ each clause."
 (defun macroexp--compiler-macro (handler form)
   (condition-case err
       (apply handler form (cdr form))
-    (error (message "Compiler-macro error for %S: %S" (car form) err)
+    (error
+     (message "--------------------------------------------------")
+     (backtrace)
+     (message "Compiler-macro error for %S: %S" (car form) err)
            form)))
 
 (defun macroexp--funcall-if-compiled (_form)
@@ -402,7 +405,7 @@ symbol itself."
 (defvar macroexp--pending-eager-loads nil
   "Stack of files currently undergoing eager macro-expansion.")
 
-(defun internal-macroexpand-for-load (form)
+(defun internal-macroexpand-for-load (form full-p)
   ;; Called from the eager-macroexpansion in readevalloop.
   (cond
    ;; Don't repeat the same warning for every top-level element.
@@ -425,7 +428,9 @@ symbol itself."
     (condition-case err
         (let ((macroexp--pending-eager-loads
                (cons load-file-name macroexp--pending-eager-loads)))
-          (macroexpand-all form))
+          (if full-p
+              (macroexpand-all form)
+            (macroexpand form)))
       (error
        ;; Hopefully this shouldn't happen thanks to the cycle detection,
        ;; but in case it does happen, let's catch the error and give the
index 1c8641249cfb9a525608b9acb0c16cf5323a3a35..bfd939d69e267a3f633ab4808a4912f3b5f5480d 100644 (file)
@@ -236,11 +236,12 @@ different, but `function-equal' will hopefully ignore those differences.")
           ;; This function acts like the t special value in buffer-local hooks.
           (lambda (&rest args) (apply (default-value var) args)))))
 
-(defun advice--normalize-place (place)
-  (cond ((eq 'local (car-safe place)) `(advice--buffer-local ,@(cdr place)))
-        ((eq 'var (car-safe place))   (nth 1 place))
-        ((symbolp place)              `(default-value ',place))
-        (t place)))
+(eval-and-compile
+  (defun advice--normalize-place (place)
+    (cond ((eq 'local (car-safe place)) `(advice--buffer-local ,@(cdr place)))
+          ((eq 'var (car-safe place))   (nth 1 place))
+          ((symbolp place)              `(default-value ',place))
+          (t place))))
 
 ;;;###autoload
 (defmacro add-function (where place function &optional props)
index 823ba365e62e0124edbe9f1a7badc3ca2cffd1da..10944f8153480f18610470221a1c98aae0bb660e 100644 (file)
@@ -289,6 +289,8 @@ contrast, `package-user-dir' contains packages for personal use."
   :group 'package
   :version "24.1")
 
+(defvar epg-gpg-program)
+
 (defcustom package-check-signature
   (if (progn (require 'epg-config) (executable-find epg-gpg-program))
       'allow-unsigned)
@@ -659,6 +661,7 @@ EXTRA-PROPERTIES is currently unused."
   (let* ((auto-name (format "%s-autoloads.el" name))
         ;;(ignore-name (concat name "-pkg.el"))
         (generated-autoload-file (expand-file-name auto-name pkg-dir))
+         (backup-inhibited t)
         (version-control 'never))
     (package-autoload-ensure-default-file generated-autoload-file)
     (update-directory-autoloads pkg-dir)
@@ -698,6 +701,7 @@ untar into a directory named DIR; otherwise, signal an error."
           (print-length nil))
       (write-region
        (concat
+        ";;; -*- no-byte-compile: t -*-\n"
         (prin1-to-string
          (nconc
           (list 'define-package
@@ -726,7 +730,6 @@ untar into a directory named DIR; otherwise, signal an error."
                 x `',x))
           (apply #'nconc
                  (mapcar (lambda (pair) (list (car pair) (cdr pair))) alist))))
-
 (defun package-unpack (pkg-desc)
   "Install the contents of the current buffer as a package."
   (let* ((name (package-desc-name pkg-desc))
@@ -1298,13 +1301,8 @@ similar to an entry in `package-alist'.  Save the cached copy to
   (setq file (expand-file-name file))
   (let ((context (epg-make-context 'OpenPGP))
        (homedir (expand-file-name "gnupg" package-user-dir)))
-    ;; FIXME Use `with-file-modes' when merged to trunk.
-    (let ((umask (default-file-modes)))
-      (unwind-protect
-          (progn
-            (set-default-file-modes 448)
-            (make-directory homedir t))
-        (set-default-file-modes umask)))
+    (with-file-modes 448
+      (make-directory homedir t))
     (epg-context-set-home-directory context homedir)
     (message "Importing %s..." (file-name-nondirectory file))
     (epg-import-keys-from-file context file)
index 2cdb7b4987e14642fb469f8605eb19c4308780b8..753cd3005e637d2c1b9ec3be52d044f63a32b3e7 100644 (file)
@@ -68,6 +68,8 @@
 
 (defconst pcase--dontcare-upats '(t _ pcase--dontcare))
 
+(defvar pcase--dontwarn-upats '(pcase--dontcare))
+
 (def-edebug-spec
   pcase-UPAT
   (&or symbolp
@@ -100,26 +102,31 @@ UPatterns can take the following forms:
   SYMBOL       matches anything and binds it to SYMBOL.
   (or UPAT...) matches if any of the patterns matches.
   (and UPAT...)        matches if all the patterns match.
+  'VAL         matches if the object is `equal' to VAL
   `QPAT                matches if the QPattern QPAT matches.
-  (pred PRED)  matches if PRED applied to the object returns non-nil.
+  (pred FUN)   matches if FUN applied to the object returns non-nil.
   (guard BOOLEXP)      matches if BOOLEXP evaluates to non-nil.
   (let UPAT EXP)       matches if EXP matches UPAT.
+  (app FUN UPAT)       matches if FUN applied to the object matches UPAT.
 If a SYMBOL is used twice in the same pattern (i.e. the pattern is
 \"non-linear\"), then the second occurrence is turned into an `eq'uality test.
 
 QPatterns can take the following forms:
-  (QPAT1 . QPAT2)      matches if QPAT1 matches the car and QPAT2 the cdr.
-  ,UPAT                        matches if the UPattern UPAT matches.
-  STRING               matches if the object is `equal' to STRING.
-  ATOM                 matches if the object is `eq' to ATOM.
-QPatterns for vectors are not implemented yet.
-
-PRED can take the form
-  FUNCTION          in which case it gets called with one argument.
-  (FUN ARG1 .. ARGN) in which case it gets called with an N+1'th argument
+  (QPAT1 . QPAT2)       matches if QPAT1 matches the car and QPAT2 the cdr.
+  [QPAT1 QPAT2..QPATn]  matches a vector of length n and QPAT1..QPATn match
+                           its 0..(n-1)th elements, respectively.
+  ,UPAT                 matches if the UPattern UPAT matches.
+  STRING                matches if the object is `equal' to STRING.
+  ATOM                  matches if the object is `eq' to ATOM.
+
+FUN can take the form
+  SYMBOL or (lambda ARGS BODY)  in which case it's called with one argument.
+  (F ARG1 .. ARGn) in which case F gets called with an n+1'th argument
                         which is the value being matched.
-A PRED of the form FUNCTION is equivalent to one of the form (FUNCTION).
-PRED patterns can refer to variables bound earlier in the pattern.
+So a FUN of the form SYMBOL is equivalent to one of the form (FUN).
+FUN can refer to variables bound earlier in the pattern.
+FUN is assumed to be pure, i.e. it can be dropped if its result is not used,
+and two identical calls can be merged into one.
 E.g. you can match pairs where the cdr is larger than the car with a pattern
 like `(,a . ,(pred (< a))) or, with more checks:
 `(,(and a (pred numberp)) . ,(and (pred numberp) (pred (< a))))"
@@ -147,6 +154,16 @@ like `(,a . ,(pred (< a))) or, with more checks:
         ;; (puthash (car cases) `(,exp ,cases ,@expansion) pcase--memoize-2)
         expansion))))
 
+;;;###autoload
+(defmacro pcase-exhaustive (exp &rest cases)
+  "The exhaustive version of `pcase' (which see)."
+  (declare (indent 1) (debug pcase))
+  (let* ((x (make-symbol "x"))
+         (pcase--dontwarn-upats (cons x pcase--dontwarn-upats)))
+    (pcase--expand
+     ;; FIXME: Could we add the FILE:LINE data in the error message?
+     exp (append cases `((,x (error "No clause matching `%S'" ,x)))))))
+
 (defun pcase--let* (bindings body)
   (cond
    ((null bindings) (macroexp-progn body))
@@ -265,7 +282,7 @@ of the form (UPAT EXP)."
            (main
             (pcase--u
              (mapcar (lambda (case)
-                       `((match ,val . ,(car case))
+                       `(,(pcase--match val (pcase--macroexpand (car case)))
                          ,(lambda (vars)
                             (unless (memq case used-cases)
                               ;; Keep track of the cases that are used.
@@ -279,10 +296,50 @@ of the form (UPAT EXP)."
                              vars))))
                      cases))))
       (dolist (case cases)
-        (unless (or (memq case used-cases) (eq (car case) 'pcase--dontcare))
+        (unless (or (memq case used-cases)
+                    (memq (car case) pcase--dontwarn-upats))
           (message "Redundant pcase pattern: %S" (car case))))
       (macroexp-let* defs main))))
 
+(defun pcase--macroexpand (pat)
+  "Expands all macro-patterns in PAT."
+  (let ((head (car-safe pat)))
+    (cond
+     ((null head)
+      (if (pcase--self-quoting-p pat) `',pat pat))
+     ((memq head '(pred guard quote)) pat)
+     ((memq head '(or and)) `(,head ,@(mapcar #'pcase--macroexpand (cdr pat))))
+     ((eq head 'let) `(let ,(pcase--macroexpand (cadr pat)) ,@(cddr pat)))
+     ((eq head 'app) `(app ,(nth 1 pat) ,(pcase--macroexpand (nth 2 pat))))
+     (t
+      (let* ((expander (get head 'pcase-macroexpander))
+             (npat (if expander (apply expander (cdr pat)))))
+        (if (null npat)
+            (error (if expander
+                       "Unexpandable %s pattern: %S"
+                     "Unknown %s pattern: %S")
+                   head pat)
+          (pcase--macroexpand npat)))))))
+
+;;;###autoload
+(defmacro pcase-defmacro (name args &rest body)
+  "Define a pcase UPattern macro."
+  (declare (indent 2) (debug (def-name sexp def-body)) (doc-string 3))
+  `(put ',name 'pcase-macroexpander
+        (lambda ,args ,@body)))
+
+(defun pcase--match (val upat)
+  "Build a MATCH structure, hoisting all `or's and `and's outside."
+  (cond
+   ;; Hoist or/and patterns into or/and matches.
+   ((memq (car-safe upat) '(or and))
+    `(,(car upat)
+      ,@(mapcar (lambda (upat)
+                  (pcase--match val upat))
+                (cdr upat))))
+   (t
+    `(match ,val . ,upat))))
+
 (defun pcase-codegen (code vars)
   ;; Don't use let*, otherwise macroexp-let* may merge it with some surrounding
   ;; let* which might prevent the setcar/setcdr in pcase--expand's fancy
@@ -306,11 +363,6 @@ of the form (UPAT EXP)."
    ((eq then :pcase--dontcare) (debug) else) ;Can/should this ever happen?
    (t (macroexp-if test then else))))
 
-(defun pcase--upat (qpattern)
-  (cond
-   ((eq (car-safe qpattern) '\,) (cadr qpattern))
-   (t (list '\` qpattern))))
-
 ;; Note about MATCH:
 ;; When we have patterns like `(PAT1 . PAT2), after performing the `consp'
 ;; check, we want to turn all the similar patterns into ones of the form
@@ -383,21 +435,12 @@ MATCH is the pattern that needs to be matched, of the form:
 
 (defun pcase--split-match (sym splitter match)
   (cond
-    ((eq (car match) 'match)
+    ((eq (car-safe match) 'match)
      (if (not (eq sym (cadr match)))
          (cons match match)
-       (let ((pat (cddr match)))
-         (cond
-          ;; Hoist `or' and `and' patterns to `or' and `and' matches.
-          ((memq (car-safe pat) '(or and))
-           (pcase--split-match sym splitter
-                               (cons (car pat)
-                                     (mapcar (lambda (alt)
-                                               `(match ,sym . ,alt))
-                                             (cdr pat)))))
-          (t (let ((res (funcall splitter (cddr match))))
-               (cons (or (car res) match) (or (cdr res) match))))))))
-    ((memq (car match) '(or and))
+       (let ((res (funcall splitter (cddr match))))
+         (cons (or (car res) match) (or (cdr res) match)))))
+    ((memq (car-safe match) '(or and))
      (let ((then-alts '())
            (else-alts '())
            (neutral-elem (if (eq 'or (car match))
@@ -417,6 +460,7 @@ MATCH is the pattern that needs to be matched, of the form:
                    ((null else-alts) neutral-elem)
                    ((null (cdr else-alts)) (car else-alts))
                    (t (cons (car match) (nreverse else-alts)))))))
+    ((memq match '(:pcase--succeed :pcase--fail)) (cons match match))
     (t (error "Uknown MATCH %s" match))))
 
 (defun pcase--split-rest (sym splitter rest)
@@ -433,27 +477,13 @@ MATCH is the pattern that needs to be matched, of the form:
           (push (cons (cdr split) code&vars) else-rest))))
     (cons (nreverse then-rest) (nreverse else-rest))))
 
-(defun pcase--split-consp (syma symd pat)
-  (cond
-   ;; A QPattern for a cons, can only go the `then' side.
-   ((and (eq (car-safe pat) '\`) (consp (cadr pat)))
-    (let ((qpat (cadr pat)))
-      (cons `(and (match ,syma . ,(pcase--upat (car qpat)))
-                  (match ,symd . ,(pcase--upat (cdr qpat))))
-            :pcase--fail)))
-   ;; A QPattern but not for a cons, can only go to the `else' side.
-   ((eq (car-safe pat) '\`) '(:pcase--fail . nil))
-   ((and (eq (car-safe pat) 'pred)
-         (pcase--mutually-exclusive-p #'consp (cadr pat)))
-    '(:pcase--fail . nil))))
-
 (defun pcase--split-equal (elem pat)
   (cond
    ;; The same match will give the same result.
-   ((and (eq (car-safe pat) '\`) (equal (cadr pat) elem))
+   ((and (eq (car-safe pat) 'quote) (equal (cadr pat) elem))
     '(:pcase--succeed . :pcase--fail))
    ;; A different match will fail if this one succeeds.
-   ((and (eq (car-safe pat) '\`)
+   ((and (eq (car-safe pat) 'quote)
          ;; (or (integerp (cadr pat)) (symbolp (cadr pat))
          ;;     (consp (cadr pat)))
          )
@@ -467,6 +497,7 @@ MATCH is the pattern that needs to be matched, of the form:
        '(:pcase--fail . nil))))))
 
 (defun pcase--split-member (elems pat)
+  ;; FIXME: The new pred-based member code doesn't do these optimizations!
   ;; Based on pcase--split-equal.
   (cond
    ;; The same match (or a match of membership in a superset) will
@@ -474,10 +505,10 @@ MATCH is the pattern that needs to be matched, of the form:
    ;; (???
    ;;  '(:pcase--succeed . nil))
    ;; A match for one of the elements may succeed or fail.
-   ((and (eq (car-safe pat) '\`) (member (cadr pat) elems))
+   ((and (eq (car-safe pat) 'quote) (member (cadr pat) elems))
     nil)
    ;; A different match will fail if this one succeeds.
-   ((and (eq (car-safe pat) '\`)
+   ((and (eq (car-safe pat) 'quote)
          ;; (or (integerp (cadr pat)) (symbolp (cadr pat))
          ;;     (consp (cadr pat)))
          )
@@ -508,7 +539,7 @@ MATCH is the pattern that needs to be matched, of the form:
      ((and (eq 'pred (car upat))
            (let ((otherpred
                   (cond ((eq 'pred (car-safe pat)) (cadr pat))
-                        ((not (eq '\` (car-safe pat))) nil)
+                        ((not (eq 'quote (car-safe pat))) nil)
                         ((consp (cadr pat)) #'consp)
                         ((vectorp (cadr pat)) #'vectorp)
                         ((byte-code-function-p (cadr pat))
@@ -516,7 +547,7 @@ MATCH is the pattern that needs to be matched, of the form:
              (pcase--mutually-exclusive-p (cadr upat) otherpred)))
       '(:pcase--fail . nil))
      ((and (eq 'pred (car upat))
-           (eq '\` (car-safe pat))
+           (eq 'quote (car-safe pat))
            (symbolp (cadr upat))
            (or (symbolp (cadr pat)) (stringp (cadr pat)) (numberp (cadr pat)))
            (get (cadr upat) 'side-effect-free)
@@ -538,10 +569,71 @@ MATCH is the pattern that needs to be matched, of the form:
 (defun pcase--self-quoting-p (upat)
   (or (keywordp upat) (numberp upat) (stringp upat)))
 
+(defun pcase--app-subst-match (match sym fun nsym)
+  (cond
+   ((eq (car-safe match) 'match)
+    (if (and (eq sym (cadr match))
+             (eq 'app (car-safe (cddr match)))
+             (equal fun (nth 1 (cddr match))))
+        (pcase--match nsym (nth 2 (cddr match)))
+      match))
+   ((memq (car-safe match) '(or and))
+    `(,(car match)
+      ,@(mapcar (lambda (match)
+                  (pcase--app-subst-match match sym fun nsym))
+                (cdr match))))
+   ((memq match '(:pcase--succeed :pcase--fail)) match)
+   (t (error "Uknown MATCH %s" match))))
+
+(defun pcase--app-subst-rest (rest sym fun nsym)
+  (mapcar (lambda (branch)
+            `(,(pcase--app-subst-match (car branch) sym fun nsym)
+              ,@(cdr branch)))
+          rest))
+
 (defsubst pcase--mark-used (sym)
   ;; Exceptionally, `sym' may be a constant expression rather than a symbol.
   (if (symbolp sym) (put sym 'pcase-used t)))
 
+(defmacro pcase--flip (fun arg1 arg2)
+  "Helper function, used internally to avoid (funcall (lambda ...) ...)."
+  (declare (debug (sexp body)))
+  `(,fun ,arg2 ,arg1))
+
+(defun pcase--funcall (fun arg vars)
+  "Build a function call to FUN with arg ARG."
+  (if (symbolp fun)
+      `(,fun ,arg)
+    (let* (;; `vs' is an upper bound on the vars we need.
+           (vs (pcase--fgrep (mapcar #'car vars) fun))
+           (env (mapcar (lambda (var)
+                          (list var (cdr (assq var vars))))
+                        vs))
+           (call (progn
+                   (when (memq arg vs)
+                     ;; `arg' is shadowed by `env'.
+                     (let ((newsym (make-symbol "x")))
+                       (push (list newsym arg) env)
+                       (setq arg newsym)))
+                   (if (functionp fun)
+                       `(funcall #',fun ,arg)
+                     `(,@fun ,arg)))))
+      (if (null vs)
+          call
+        ;; Let's not replace `vars' in `fun' since it's
+        ;; too difficult to do it right, instead just
+        ;; let-bind `vars' around `fun'.
+        `(let* ,env ,call)))))
+
+(defun pcase--eval (exp vars)
+  "Build an expression that will evaluate EXP."
+  (let* ((found (assq exp vars)))
+    (if found (cdr found)
+      (let* ((vs (pcase--fgrep (mapcar #'car vars) exp))
+             (env (mapcar (lambda (v) (list v (cdr (assq v vars))))
+                          vs)))
+        (if env (macroexp-let* env exp) exp)))))
+
 ;; It's very tempting to use `pcase' below, tho obviously, it'd create
 ;; bootstrapping problems.
 (defun pcase--u1 (matches code vars rest)
@@ -563,22 +655,26 @@ Otherwise, it defers to REST which is a list of branches of the form
    ((eq 'or (caar matches))
     (let* ((alts (cdar matches))
            (var (if (eq (caar alts) 'match) (cadr (car alts))))
-           (simples '()) (others '()))
+           (simples '()) (others '()) (memq-ok t))
       (when var
         (dolist (alt alts)
           (if (and (eq (car alt) 'match) (eq var (cadr alt))
                    (let ((upat (cddr alt)))
-                     (and (eq (car-safe upat) '\`)
-                          (or (integerp (cadr upat)) (symbolp (cadr upat))
-                              (stringp (cadr upat))))))
-              (push (cddr alt) simples)
+                     (eq (car-safe upat) 'quote)))
+              (let ((val (cadr (cddr alt))))
+                (unless (or (integerp val) (symbolp val))
+                  (setq memq-ok nil))
+                (push (cadr (cddr alt)) simples))
             (push alt others))))
       (cond
        ((null alts) (error "Please avoid it") (pcase--u rest))
+       ;; Yes, we can use `memq' (or `member')!
        ((> (length simples) 1)
-        ;; De-hoist the `or' MATCH into an `or' pattern that will be
-        ;; turned into a `memq' below.
-        (pcase--u1 (cons `(match ,var or . ,(nreverse simples)) (cdr matches))
+        (pcase--u1 (cons `(match ,var
+                                 . (pred (pcase--flip
+                                          ,(if memq-ok #'memq #'member)
+                                          ',simples)))
+                         (cdr matches))
                    code vars
                    (if (null others) rest
                      (cons (cons
@@ -612,35 +708,11 @@ Otherwise, it defers to REST which is a list of branches of the form
                  sym (lambda (pat) (pcase--split-pred vars upat pat)) rest))
                (then-rest (car splitrest))
                (else-rest (cdr splitrest)))
-          (pcase--if (if (and (eq (car upat) 'pred) (symbolp (cadr upat)))
-                         `(,(cadr upat) ,sym)
-                       (let* ((exp (cadr upat))
-                              ;; `vs' is an upper bound on the vars we need.
-                              (vs (pcase--fgrep (mapcar #'car vars) exp))
-                              (env (mapcar (lambda (var)
-                                             (list var (cdr (assq var vars))))
-                                           vs))
-                              (call (if (eq 'guard (car upat))
-                                        exp
-                                      (when (memq sym vs)
-                                        ;; `sym' is shadowed by `env'.
-                                        (let ((newsym (make-symbol "x")))
-                                          (push (list newsym sym) env)
-                                          (setq sym newsym)))
-                                      (if (functionp exp)
-                                          `(funcall #',exp ,sym)
-                                        `(,@exp ,sym)))))
-                         (if (null vs)
-                             call
-                           ;; Let's not replace `vars' in `exp' since it's
-                           ;; too difficult to do it right, instead just
-                           ;; let-bind `vars' around `exp'.
-                           `(let* ,env ,call))))
+          (pcase--if (if (eq (car upat) 'pred)
+                         (pcase--funcall (cadr upat) sym vars)
+                       (pcase--eval (cadr upat) vars))
                      (pcase--u1 matches code vars then-rest)
                      (pcase--u else-rest))))
-       ((pcase--self-quoting-p upat)
-        (pcase--mark-used sym)
-        (pcase--q1 sym upat matches code vars rest))
        ((symbolp upat)
         (pcase--mark-used sym)
         (if (not (assq upat vars))
@@ -655,57 +727,41 @@ Otherwise, it defers to REST which is a list of branches of the form
         ;;            (cons (cons (nth 1 upat) (nth 2 upat)) vars) rest)
         (macroexp-let2
             macroexp-copyable-p sym
-            (let* ((exp (nth 2 upat))
-                   (found (assq exp vars)))
-              (if found (cdr found)
-                (let* ((vs (pcase--fgrep (mapcar #'car vars) exp))
-                       (env (mapcar (lambda (v) (list v (cdr (assq v vars))))
-                                    vs)))
-                  (if env (macroexp-let* env exp) exp))))
-          (pcase--u1 (cons `(match ,sym . ,(nth 1 upat)) matches)
+            (pcase--eval (nth 2 upat) vars)
+          (pcase--u1 (cons (pcase--match sym (nth 1 upat)) matches)
                      code vars rest)))
-       ((eq (car-safe upat) '\`)
+       ((eq (car-safe upat) 'app)
+        ;; A upat of the form (app FUN UPAT)
         (pcase--mark-used sym)
-        (pcase--q1 sym (cadr upat) matches code vars rest))
-       ((eq (car-safe upat) 'or)
-        (let ((all (> (length (cdr upat)) 1))
-              (memq-fine t))
-          (when all
-            (dolist (alt (cdr upat))
-              (unless (if (pcase--self-quoting-p alt)
-                          (progn
-                            (unless (or (symbolp alt) (integerp alt))
-                              (setq memq-fine nil))
-                            t)
-                        (and (eq (car-safe alt) '\`)
-                             (or (symbolp (cadr alt)) (integerp (cadr alt))
-                                 (setq memq-fine nil)
-                                 (stringp (cadr alt)))))
-                (setq all nil))))
-          (if all
-              ;; Use memq for (or `a `b `c `d) rather than a big tree.
-              (let* ((elems (mapcar (lambda (x) (if (consp x) (cadr x) x))
-                                    (cdr upat)))
-                     (splitrest
-                      (pcase--split-rest
-                       sym (lambda (pat) (pcase--split-member elems pat)) rest))
-                     (then-rest (car splitrest))
-                     (else-rest (cdr splitrest)))
-                (pcase--mark-used sym)
-                (pcase--if `(,(if memq-fine #'memq #'member) ,sym ',elems)
-                           (pcase--u1 matches code vars then-rest)
-                           (pcase--u else-rest)))
-            (pcase--u1 (cons `(match ,sym ,@(cadr upat)) matches) code vars
-                       (append (mapcar (lambda (upat)
-                                         `((and (match ,sym . ,upat) ,@matches)
-                                           ,code ,@vars))
-                                       (cddr upat))
-                               rest)))))
-       ((eq (car-safe upat) 'and)
-        (pcase--u1 (append (mapcar (lambda (upat) `(match ,sym ,@upat))
-                                   (cdr upat))
-                           matches)
-                   code vars rest))
+        (let* ((fun (nth 1 upat))
+               (nsym (make-symbol "x"))
+               (body
+                ;; We don't change `matches' to reuse the newly computed value,
+                ;; because we assume there shouldn't be such redundancy in there.
+                (pcase--u1 (cons (pcase--match nsym (nth 2 upat)) matches)
+                           code vars
+                           (pcase--app-subst-rest rest sym fun nsym))))
+          (if (not (get nsym 'pcase-used))
+              body
+            (macroexp-let*
+             `((,nsym ,(pcase--funcall fun sym vars)))
+             body))))
+       ((eq (car-safe upat) 'quote)
+        (pcase--mark-used sym)
+        (let* ((val (cadr upat))
+               (splitrest (pcase--split-rest
+                           sym (lambda (pat) (pcase--split-equal val pat)) rest))
+               (then-rest (car splitrest))
+               (else-rest (cdr splitrest)))
+          (pcase--if (cond
+                      ((null val) `(null ,sym))
+                      ((or (integerp val) (symbolp val))
+                       (if (pcase--self-quoting-p val)
+                           `(eq ,sym ,val)
+                         `(eq ,sym ',val)))
+                      (t `(equal ,sym ',val)))
+                     (pcase--u1 matches code vars then-rest)
+                     (pcase--u else-rest))))
        ((eq (car-safe upat) 'not)
         ;; FIXME: The implementation below is naive and results in
         ;; inefficient code.
@@ -727,57 +783,25 @@ Otherwise, it defers to REST which is a list of branches of the form
                      (pcase--u rest))
                    vars
                    (list `((and . ,matches) ,code . ,vars))))
-       (t (error "Unknown upattern `%s'" upat)))))
-   (t (error "Incorrect MATCH %s" (car matches)))))
+       (t (error "Unknown internal pattern `%S'" upat)))))
+   (t (error "Incorrect MATCH %S" (car matches)))))
 
-(defun pcase--q1 (sym qpat matches code vars rest)
-  "Return code that runs CODE if SYM matches QPAT and if MATCHES match.
-Otherwise, it defers to REST which is a list of branches of the form
-\(OTHER_MATCH OTHER-CODE . OTHER-VARS)."
+(pcase-defmacro \` (qpat)
   (cond
-   ((eq (car-safe qpat) '\,) (error "Can't use `,UPATTERN"))
-   ((floatp qpat) (error "Floating point patterns not supported"))
+   ((eq (car-safe qpat) '\,) (cadr qpat))
    ((vectorp qpat)
-    ;; FIXME.
-    (error "Vector QPatterns not implemented yet"))
+    `(and (pred vectorp)
+          (app length ,(length qpat))
+          ,@(let ((upats nil))
+              (dotimes (i (length qpat))
+                (push `(app (pcase--flip aref ,i) ,(list '\` (aref qpat i)))
+                      upats))
+              (nreverse upats))))
    ((consp qpat)
-    (let* ((syma (make-symbol "xcar"))
-           (symd (make-symbol "xcdr"))
-           (splitrest (pcase--split-rest
-                       sym
-                       (lambda (pat) (pcase--split-consp syma symd pat))
-                       rest))
-           (then-rest (car splitrest))
-           (else-rest (cdr splitrest))
-           (then-body (pcase--u1 `((match ,syma . ,(pcase--upat (car qpat)))
-                                   (match ,symd . ,(pcase--upat (cdr qpat)))
-                                   ,@matches)
-                                 code vars then-rest)))
-      (pcase--if
-       `(consp ,sym)
-       ;; We want to be careful to only add bindings that are used.
-       ;; The byte-compiler could do that for us, but it would have to pay
-       ;; attention to the `consp' test in order to figure out that car/cdr
-       ;; can't signal errors and our byte-compiler is not that clever.
-       ;; FIXME: Some of those let bindings occur too early (they are used in
-       ;; `then-body', but only within some sub-branch).
-       (macroexp-let*
-        `(,@(if (get syma 'pcase-used) `((,syma (car ,sym))))
-          ,@(if (get symd 'pcase-used) `((,symd (cdr ,sym)))))
-        then-body)
-       (pcase--u else-rest))))
-   ((or (integerp qpat) (symbolp qpat) (stringp qpat))
-    (let* ((splitrest (pcase--split-rest
-                       sym (lambda (pat) (pcase--split-equal qpat pat)) rest))
-           (then-rest (car splitrest))
-           (else-rest (cdr splitrest)))
-      (pcase--if (cond
-                  ((stringp qpat) `(equal ,sym ,qpat))
-                  ((null qpat) `(null ,sym))
-                  (t `(eq ,sym ',qpat)))
-                 (pcase--u1 matches code vars then-rest)
-                 (pcase--u else-rest))))
-   (t (error "Unknown QPattern %s" qpat))))
+    `(and (pred consp)
+          (app car ,(list '\` (car qpat)))
+          (app cdr ,(list '\` (cdr qpat)))))
+   ((or (stringp qpat) (integerp qpat) (symbolp qpat)) `',qpat)))
 
 
 (provide 'pcase)
index b2d4f2b71dd50cc3a26c9ea9a164db183c53efed..ff9388171a6b3dd5decf947fecb32a4d03c163f3 100644 (file)
@@ -205,9 +205,7 @@ Merges keywords to avoid backtracking in Emacs's regexp matcher."
                      (regexp-opt-group suffixes t t)
                      close-group))
 
-         (let* ((sgnirts (mapcar (lambda (s)
-                                   (concat (nreverse (string-to-list s))))
-                                 strings))
+         (let* ((sgnirts (mapcar #'reverse strings))
                 (xiffus (try-completion "" sgnirts)))
            (if (> (length xiffus) 0)
                ;; common suffix: take it and recurse on the prefixes.
@@ -218,8 +216,7 @@ Merges keywords to avoid backtracking in Emacs's regexp matcher."
                              'string-lessp)))
                  (concat open-group
                          (regexp-opt-group prefixes t t)
-                         (regexp-quote
-                          (concat (nreverse (string-to-list xiffus))))
+                         (regexp-quote (nreverse xiffus))
                          close-group))
 
              ;; Otherwise, divide the list into those that start with a
index 1819daa3df0118adf4beaa8b76d1dd5516a5cdfa..ab51e13afcd02484c0656ec318d79a49bab10da8 100644 (file)
@@ -632,14 +632,14 @@ e.g. a LEFT-LEVEL of nil means this is a token that behaves somewhat like
 an open-paren, whereas a RIGHT-LEVEL of nil would correspond to something
 like a close-paren.")
 
-(defvar smie-forward-token-function 'smie-default-forward-token
+(defvar smie-forward-token-function #'smie-default-forward-token
   "Function to scan forward for the next token.
 Called with no argument should return a token and move to its end.
 If no token is found, return nil or the empty string.
 It can return nil when bumping into a parenthesis, which lets SMIE
 use syntax-tables to handle them in efficient C code.")
 
-(defvar smie-backward-token-function 'smie-default-backward-token
+(defvar smie-backward-token-function #'smie-default-backward-token
   "Function to scan backward the previous token.
 Same calling convention as `smie-forward-token-function' except
 it should move backward to the beginning of the previous token.")
@@ -806,9 +806,9 @@ Possible return values:
   nil: we skipped over an identifier, matched parentheses, ..."
   (smie-next-sexp
    (indirect-function smie-backward-token-function)
-   (indirect-function 'backward-sexp)
-   (indirect-function 'smie-op-left)
-   (indirect-function 'smie-op-right)
+   (indirect-function #'backward-sexp)
+   (indirect-function #'smie-op-left)
+   (indirect-function #'smie-op-right)
    halfsexp))
 
 (defun smie-forward-sexp (&optional halfsexp)
@@ -827,9 +827,9 @@ Possible return values:
   nil: we skipped over an identifier, matched parentheses, ..."
   (smie-next-sexp
    (indirect-function smie-forward-token-function)
-   (indirect-function 'forward-sexp)
-   (indirect-function 'smie-op-right)
-   (indirect-function 'smie-op-left)
+   (indirect-function #'forward-sexp)
+   (indirect-function #'smie-op-right)
+   (indirect-function #'smie-op-left)
    halfsexp))
 
 ;;; Miscellaneous commands using the precedence parser.
@@ -1121,7 +1121,7 @@ OPENER is non-nil if TOKEN is an opener and nil if it's a closer."
   :type 'integer
   :group 'smie)
 
-(defvar smie-rules-function 'ignore
+(defvar smie-rules-function #'ignore
   "Function providing the indentation rules.
 It takes two arguments METHOD and ARG where the meaning of ARG
 and the expected return value depends on METHOD.
@@ -2121,41 +2121,45 @@ position corresponding to each rule."
                otraces)
 
       ;; Finally, guess the indentation rules.
-      (let ((ssigs nil)
-            (rules nil))
-        ;; Sort the sigs by frequency of occurrence.
-        (maphash (lambda (sig sig-data) (push (cons sig sig-data) ssigs)) sigs)
-        (setq ssigs (sort ssigs (lambda (sd1 sd2) (> (cadr sd1) (cadr sd2)))))
-        (while ssigs
-          (pcase-let ((`(,sig ,total ,off-alist ,cotraces) (pop ssigs)))
-            (cl-assert (= total (apply #'+ (mapcar #'cdr off-alist))))
-            (let* ((sorted-off-alist
-                    (sort off-alist (lambda (x y) (> (cdr x) (cdr y)))))
-                   (offset (caar sorted-off-alist)))
-              (if (zerop offset)
-                  ;; Nothing to do with this sig; indentation is
-                  ;; correct already.
-                  nil
-                (push (cons (+ offset (nth 2 sig)) sig) rules)
-                ;; Adjust the rest of the data.
-                (pcase-dolist ((and cotrace `(,count ,toffset . ,trace))
-                               cotraces)
-                  (setf (nth 1 cotrace) (- toffset offset))
-                  (dolist (sig trace)
-                    (let ((sig-data (cdr (assq sig ssigs))))
-                      (when sig-data
-                        (let* ((ooff-data (assq toffset (nth 1 sig-data)))
-                               (noffset (- toffset offset))
-                               (noff-data
-                                (or (assq noffset (nth 1 sig-data))
-                                    (let ((off-data (cons noffset 0)))
-                                      (push off-data (nth 1 sig-data))
-                                      off-data))))
-                          (cl-assert (>= (cdr ooff-data) count))
-                          (cl-decf (cdr ooff-data) count)
-                          (cl-incf (cdr noff-data) count))))))))))
-        (message "Guessing...done")
-        rules))))
+      (prog1
+         (smie-config--guess-1 sigs)
+        (message "Guessing...done")))))
+
+(defun smie-config--guess-1 (sigs)
+  (let ((ssigs nil)
+        (rules nil))
+    ;; Sort the sigs by frequency of occurrence.
+    (maphash (lambda (sig sig-data) (push (cons sig sig-data) ssigs)) sigs)
+    (setq ssigs (sort ssigs (lambda (sd1 sd2) (> (cadr sd1) (cadr sd2)))))
+    (while ssigs
+      (pcase-let ((`(,sig ,total ,off-alist ,cotraces) (pop ssigs)))
+        (cl-assert (= total (apply #'+ (mapcar #'cdr off-alist))))
+        (let* ((sorted-off-alist
+                (sort off-alist (lambda (x y) (> (cdr x) (cdr y)))))
+               (offset (caar sorted-off-alist)))
+          (if (zerop offset)
+              ;; Nothing to do with this sig; indentation is
+              ;; correct already.
+              nil
+            (push (cons (+ offset (nth 2 sig)) sig) rules)
+            ;; Adjust the rest of the data.
+            (pcase-dolist ((and cotrace `(,count ,toffset . ,trace))
+                           cotraces)
+              (setf (nth 1 cotrace) (- toffset offset))
+              (dolist (sig trace)
+                (let ((sig-data (cdr (assq sig ssigs))))
+                  (when sig-data
+                    (let* ((ooff-data (assq toffset (nth 1 sig-data)))
+                           (noffset (- toffset offset))
+                           (noff-data
+                            (or (assq noffset (nth 1 sig-data))
+                                (let ((off-data (cons noffset 0)))
+                                  (push off-data (nth 1 sig-data))
+                                  off-data))))
+                      (cl-assert (>= (cdr ooff-data) count))
+                      (cl-decf (cdr ooff-data) count)
+                      (cl-incf (cdr noff-data) count))))))))))
+    rules))
 
 (defun smie-config-guess ()
   "Try and figure out this buffer's indentation settings.
index 505a556b65f2c33ecde70ea16a59d7a82650e013..759760c7d621318aaa0f7e4600b94cb2ccbe4b6e 100644 (file)
 
 ;;; Code:
 
+(require 'pcase)
+
+
+(defmacro internal--thread-argument (first? &rest forms)
+  "Internal implementation for `thread-first' and `thread-last'.
+When Argument FIRST? is non-nil argument is threaded first, else
+last.  FORMS are the expressions to be threaded."
+  (pcase forms
+    (`(,x (,f . ,args) . ,rest)
+     `(internal--thread-argument
+       ,first? ,(if first? `(,f ,x ,@args) `(,f ,@args ,x)) ,@rest))
+    (`(,x ,f . ,rest) `(internal--thread-argument ,first? (,f ,x) ,@rest))
+    (_ (car forms))))
+
+(defmacro thread-first (&rest forms)
+  "Thread FORMS elements as the first argument of their successor.
+Example:
+    (thread-first
+      5
+      (+ 20)
+      (/ 25)
+      -
+      (+ 40))
+Is equivalent to:
+    (+ (- (/ (+ 5 20) 25)) 40)
+Note how the single `-' got converted into a list before
+threading."
+  (declare (indent 1)
+           (debug (form &rest [&or symbolp (sexp &rest form)])))
+  `(internal--thread-argument t ,@forms))
+
+(defmacro thread-last (&rest forms)
+  "Thread FORMS elements as the last argument of their successor.
+Example:
+    (thread-last
+      5
+      (+ 20)
+      (/ 25)
+      -
+      (+ 40))
+Is equivalent to:
+    (+ 40 (- (/ 25 (+ 20 5))))
+Note how the single `-' got converted into a list before
+threading."
+  (declare (indent 1) (debug thread-first))
+  `(internal--thread-argument nil ,@forms))
+
+(defsubst internal--listify (elt)
+  "Wrap ELT in a list if it is not one."
+  (if (not (listp elt))
+      (list elt)
+    elt))
+
+(defsubst internal--check-binding (binding)
+  "Check BINDING is properly formed."
+  (when (> (length binding) 2)
+    (signal
+     'error
+     (cons "`let' bindings can have only one value-form" binding)))
+  binding)
+
+(defsubst internal--build-binding-value-form (binding prev-var)
+  "Build the conditional value form for BINDING using PREV-VAR."
+  `(,(car binding) (and ,prev-var ,(cadr binding))))
+
+(defun internal--build-binding (binding prev-var)
+  "Check and build a single BINDING with PREV-VAR."
+  (thread-first
+      binding
+    internal--listify
+    internal--check-binding
+    (internal--build-binding-value-form prev-var)))
+
+(defun internal--build-bindings (bindings)
+  "Check and build conditional value forms for BINDINGS."
+  (let ((prev-var t))
+    (mapcar (lambda (binding)
+              (let ((binding (internal--build-binding binding prev-var)))
+                (setq prev-var (car binding))
+                binding))
+            bindings)))
+
+(defmacro if-let (bindings then &rest else)
+  "Process BINDINGS and if all values are non-nil eval THEN, else ELSE.
+Argument BINDINGS is a list of tuples whose car is a symbol to be
+bound and (optionally) used in THEN, and its cadr is a sexp to be
+evalled to set symbol's value.  In the special case you only want
+to bind a single value, BINDINGS can just be a plain tuple."
+  (declare (indent 2) (debug ((&rest (symbolp form)) form body)))
+  (when (and (<= (length bindings) 2)
+             (not (listp (car bindings))))
+    ;; Adjust the single binding case
+    (setq bindings (list bindings)))
+  `(let* ,(internal--build-bindings bindings)
+     (if ,(car (internal--listify (car (last bindings))))
+         ,then
+       ,@else)))
+
+(defmacro when-let (bindings &rest body)
+  "Process BINDINGS and if all values are non-nil eval BODY.
+Argument BINDINGS is a list of tuples whose car is a symbol to be
+bound and (optionally) used in BODY, and its cadr is a sexp to be
+evalled to set symbol's value.  In the special case you only want
+to bind a single value, BINDINGS can just be a plain tuple."
+  (declare (indent 1) (debug if-let))
+  (list 'if-let bindings (macroexp-progn body)))
+
 (defsubst hash-table-keys (hash-table)
   "Return a list of keys in HASH-TABLE."
   (let ((keys '()))
   "Join all STRINGS using SEPARATOR."
   (mapconcat 'identity strings separator))
 
-(defsubst string-reverse (str)
-  "Reverse the string STR."
-  (apply 'string (nreverse (string-to-list str))))
+(define-obsolete-function-alias 'string-reverse 'reverse "25.1")
 
 (defsubst string-trim-left (string)
   "Remove leading whitespace from STRING."
index 86701068c4ec5e3930743f79f0f08c072f953789..1e613c7fd4e779207833eb2879cb02e5886466a1 100644 (file)
@@ -323,7 +323,8 @@ to the entry with the same ID element as the current line."
     (if saved-pt
        (progn (goto-char saved-pt)
               (move-to-column saved-col)
-              (recenter))
+              (when (eq (window-buffer) (current-buffer))
+                (recenter)))
       (goto-char (point-min)))))
 
 (defun tabulated-list-print-entry (id cols)
index 96c9ba1e095a71bc219f7d7a34d63fe470bfb04f..ee70071b7eced089a2c3a681825f5bb0c9718aa4 100644 (file)
@@ -1156,19 +1156,6 @@ If ARG is the atom `-', scroll upward by nearly full screen."
        (cancel-timer cua--prefix-override-timer))
     (setq cua--prefix-override-timer nil))
 
-  (cond
-   ;; Only symbol commands can have necessary properties
-   ((not (symbolp this-command))
-    nil)
-
-   ((not (eq (get this-command 'CUA) 'move))
-    nil)
-
-   ;; Set mark if user explicitly said to do so
-   (cua--rectangle ;FIXME: ??
-    (unless mark-active
-      (push-mark-command nil nil))))
-
   ;; Detect extension of rectangles by mouse or other movement
   (setq cua--buffer-and-point-before-command
        (if cua--rectangle (cons (current-buffer) (point)))))
@@ -1367,36 +1354,6 @@ If ARG is the atom `-', scroll upward by nearly full screen."
   )
 
 
-;; Setup standard movement commands to be recognized by CUA.
-
-(dolist (cmd
- '(forward-char backward-char
-   right-char left-char
-   right-word left-word
-   next-line previous-line
-   forward-word backward-word
-   end-of-line beginning-of-line
-   end-of-visual-line beginning-of-visual-line
-   move-end-of-line move-beginning-of-line
-   end-of-buffer beginning-of-buffer
-   scroll-up scroll-down
-   scroll-up-command scroll-down-command
-   up-list down-list backward-up-list
-   end-of-defun beginning-of-defun
-   forward-sexp backward-sexp
-   forward-list backward-list
-   forward-sentence backward-sentence
-   forward-paragraph backward-paragraph
-   ;; CC mode motion commands
-   c-forward-conditional c-backward-conditional
-   c-down-conditional c-up-conditional
-   c-down-conditional-with-else c-up-conditional-with-else
-   c-beginning-of-statement c-end-of-statement))
-  (put cmd 'CUA 'move))
-
-;; Only called if pc-selection-mode is t, which means pc-select is loaded.
-(declare-function pc-selection-mode "pc-select" (&optional arg))
-
 ;; State prior to enabling cua-mode
 ;; Value is a list with the following elements:
 ;;   delete-selection-mode
index a32fb612adb3ebb922497e67be6c460c1c335fc0..e0e2660b70a739baaaf30b0f4965f1563cf1e26f 100644 (file)
@@ -2033,7 +2033,8 @@ created."
   ;; Make highlighting of selected text work properly for EDT commands.
   (if (featurep 'emacs)
       (progn
-       (setq edt-orig-transient-mark-mode transient-mark-mode)
+       (setq edt-orig-transient-mark-mode
+              (default-value 'transient-mark-mode))
        (add-hook 'activate-mark-hook
                  (function
                   (lambda ()
@@ -2068,7 +2069,7 @@ created."
   (edt-reset)
   (force-mode-line-update t)
   (if (featurep 'emacs)
-    (setq transient-mark-mode edt-orig-transient-mark-mode))
+      (setq-default transient-mark-mode edt-orig-transient-mark-mode))
   (message "Original key bindings restored; EDT Emulation disabled"))
 
 (defun edt-default-menu-bar-update-buffers ()
index 9a096a0a7094dc2d61bd79094dfdc402229dc6b0..d1ed679c0f1d16b5255d34653bf0a24e975b2c85 100644 (file)
@@ -70,27 +70,24 @@ USAGE would be `sign' or `encrypt'."
 ;;;###autoload
 (defun epa-mail-decrypt ()
   "Decrypt OpenPGP armors in the current buffer.
-The buffer is expected to contain a mail message.
-
-Don't use this command in Lisp programs!"
+The buffer is expected to contain a mail message."
+  (declare (interactive-only t))
   (interactive)
   (epa-decrypt-armor-in-region (point-min) (point-max)))
 
 ;;;###autoload
 (defun epa-mail-verify ()
   "Verify OpenPGP cleartext signed messages in the current buffer.
-The buffer is expected to contain a mail message.
-
-Don't use this command in Lisp programs!"
+The buffer is expected to contain a mail message."
+  (declare (interactive-only t))
   (interactive)
   (epa-verify-cleartext-in-region (point-min) (point-max)))
 
 ;;;###autoload
 (defun epa-mail-sign (start end signers mode)
   "Sign the current buffer.
-The buffer is expected to contain a mail message.
-
-Don't use this command in Lisp programs!"
+The buffer is expected to contain a mail message."
+  (declare (interactive-only t))
   (interactive
    (save-excursion
      (goto-char (point-min))
@@ -234,9 +231,8 @@ If no one is selected, symmetric encryption will be performed.  "
 ;;;###autoload
 (defun epa-mail-import-keys ()
   "Import keys in the OpenPGP armor format in the current buffer.
-The buffer is expected to contain a mail message.
-
-Don't use this command in Lisp programs!"
+The buffer is expected to contain a mail message."
+  (declare (interactive-only t))
   (interactive)
   (epa-import-armor-in-region (point-min) (point-max)))
 
index be439ef241d5b6d4b727bc1e8c361b25e8357ce6..0c833ab84d61d22fb5a2015b9904a44df06faa08 100644 (file)
@@ -834,6 +834,7 @@ For example:
 
 Don't use this command in Lisp programs!
 See the reason described in the `epa-decrypt-region' documentation."
+  (declare (interactive-only t))
   (interactive "r")
   (save-excursion
     (save-restriction
@@ -873,6 +874,7 @@ For example:
   (decode-coding-string
     (epg-verify-string context (buffer-substring start end))
     'utf-8))"
+  (declare (interactive-only t))
   (interactive "r")
   (let ((context (epg-make-context epa-protocol))
        plain)
@@ -914,6 +916,7 @@ between START and END.
 
 Don't use this command in Lisp programs!
 See the reason described in the `epa-verify-region' documentation."
+  (declare (interactive-only t))
   (interactive "r")
   (save-excursion
     (save-restriction
@@ -956,6 +959,7 @@ For example:
   (epg-sign-string
     context
     (encode-coding-string (buffer-substring start end) 'utf-8)))"
+  (declare (interactive-only t))
   (interactive
    (let ((verbose current-prefix-arg))
      (setq epa-last-coding-system-specified
@@ -1037,6 +1041,7 @@ For example:
     context
     (encode-coding-string (buffer-substring start end) 'utf-8)
     nil))"
+  (declare (interactive-only t))
   (interactive
    (let ((verbose current-prefix-arg)
         (context (epg-make-context epa-protocol))
@@ -1205,6 +1210,7 @@ If no one is selected, default public key is exported.  ")))
 ;; If a prefix-arg is specified, the signature is marked as non exportable.
 
 ;; Don't use this command in Lisp programs!"
+;;   (declare (interactive-only t))
 ;;   (interactive
 ;;    (let ((keys (epa--marked-keys)))
 ;;      (unless keys
index 10b3704144351869a337c7c76ff3dfedf1b35cca..16ed6e1f5c9ea4e4d88e5ef1a755745e2f6a45fa 100644 (file)
@@ -39,9 +39,9 @@
   :group 'data
   :group 'external)
 
-(defcustom epg-gpg-program (or (executable-find "gpg")
-                              (executable-find "gpg2")
-                              "gpg")
+(defcustom epg-gpg-program (cond ((executable-find "gpg") "gpg")
+                                ((executable-find "gpg2") "gpg2")
+                                (t "gpg"))
   "The `gpg' executable."
   :group 'epg
   :type 'string)
index 77181a1a342c5481f6eefd7fb1f0d26272ca2689..26e3b3d2501eca15f789cfd61b7e6ba1ecf1f73d 100644 (file)
@@ -1206,7 +1206,6 @@ This function is for internal use only."
         (coding-system-for-read 'binary)
         process-connection-type
         (process-environment process-environment)
-        (orig-mode (default-file-modes))
         (buffer (generate-new-buffer " *epg*"))
         process
         terminal-name
@@ -1265,14 +1264,9 @@ This function is for internal use only."
       (setq epg-agent-file agent-file)
       (make-local-variable 'epg-agent-mtime)
       (setq epg-agent-mtime agent-mtime))
-    (unwind-protect
-       (progn
-         (set-default-file-modes 448)
-         (setq process
-               (apply #'start-process "epg" buffer
-                      (epg-context-program context)
-                      args)))
-      (set-default-file-modes orig-mode))
+    (with-file-modes 448
+      (setq process (apply #'start-process "epg" buffer
+                          (epg-context-program context) args)))
     (set-process-filter process #'epg--process-filter)
     (epg-context-set-process context process)))
 
index b3cdb067d1329696b5fe4dc84f38aa8550516db7..c12f289ce0f5dfabada4f11a776ea7b7ffb97fd0 100644 (file)
@@ -1,9 +1,96 @@
-2014-09-24  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-10-15  Ivan Shmakov  <ivan@siamics.net>
+
+       * erc-track.el (erc-modified-channels-display): Update mode line
+       more frequently (bug#18510).
+
+2014-10-10  Kelvin White  <kwhite@gnu.org>
+
+       * erc.el (erc-initialize-log-marker): Only initialize
+         erc-last-saved-position if not already a marker.
+
+2014-10-04  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * erc.el (erc-channel-receive-names): Silence compiler warning.
+       (erc-format-@nick, erc-update-modes): Idem.
+
+2014-10-03  Kelvin White  <kwhite@gnu.org>
+
+       * erc.el (erc-rename-buffers): Use defcustom instead of defvar for
+       buffer renaming configuration option.
+
+2014-10-02  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * erc.el (erc-nick-at-point): Fix format-string typo (Bug#17755).
+
+2014-10-02  Kelvin White  <kwhite@gnu.org>
+
+       * erc.el (erc-rename-buffer-p): When set to t buffers will be
+       renamed to the current irc network.
+       (erc-format-target-and/or-network): Use `erc-rename-buffer-p' when
+       renaming buffers.
+
+       * erc-ring.el (erc-input-ring-setup): Fixes Bug #18599
+
+2014-09-30  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * erc-track.el (erc-modified-channels-display): Update all mode lines
        if needed (bug#18510).  Remove call to erc-modified-channels-object
        where we ignored the return value.
-       (erc-modified-channels-update): Don't force-mode-line-update here any more.
+       (erc-modified-channels-update): Don't force-mode-line-update here
+       any more.
+
+2014-09-26  Kelvin White  <kwhite@gnu.org>
+
+       * erc.el (erc-format-nick): Fix code regression - Bug #18551
+
+2014-09-25  Kelvin White  <kwhite@gnu.org>
+
+       * erc.el: Follow Emacs version instead of tracking it seperately.
+       (erc-quit/part-reason-default) : Clean up quit/part message
+       functions by abstracting repetitive code, change version string.
+       (erc-quit-reason-various, erc-quit-reason-normal, erc-quit-reason-zippy)
+       (erc-part-reason-normal, erc-part-reason-zippy, erc-part-reason-various)
+       (erc-cmd-SV, erc-ctcp-query-VERSION, erc-version, erc-version-string):
+       Change version string.
+
+2014-08-13  Kelvin White  <kwhite@gnu.org>
+
+       * erc.el (erc-send-input): Disable display commands in current buffer
+       (erc-format-target-and/or-network): Fix cases when buffer name is set
+
+2014-08-12  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * erc-stamp.el (erc-timestamp-intangible): Disable by default because
+       `intangible' is evil.
+
+2014-08-07  Kelvin White  <kwhite@gnu.org>
+
+       * erc.el (erc-channel-receive-names): Fix variable names
+       (erc-format-target-and/or-network): Rename server-buffers to
+       network name if possible
+
+2014-07-08  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * erc.el (erc-channel-receive-names): Reduce redundancy.
+
+2014-06-19  Kelvin White  <kwhite@gnu.org>
+
+       * erc-backend.el: Handle user modes in relevant server responses
+       * erc.el: Better user mode support.
+       (erc-channel-user): Add members for new modes.
+       (erc-channel-member-halfop-p, erc-channel-user-admin-p)
+       (erc-channel-user-owner-p): Use new struct members.
+       (erc-format-nick, erc-format-@nick): Display user modes as nick prefix.
+       (erc-nick-prefix-face, erc-my-nick-prefix-face): Add new faces
+       (erc-get-user-mode-prefix): Return symbol for mode prefix.
+       (erc-update-channel-member, erc-update-current-channel-member)
+       (erc-channel-receive-names): Update channel users.
+       (erc-nick-at-point): Return correct user info.
+
+2014-04-04  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * erc.el (erc-invite-only-mode, erc-toggle-channel-mode): Simplify.
+       (erc-load-script): Tighten a regexp.
 
 2014-02-25  Julien Danjou  <julien@danjou.info>
 
 
 2011-11-28  Mike Kazantsev  <mk.fraggod@gmail.com>  (tiny change)
 
-       * erc-dcc.el (erc-dcc-ctcp-query-send-regexp): Updated regexp to
+       * erc-dcc.el (erc-dcc-ctcp-query-send-regexp): Update regexp to
        match quoted filenames with spaces inside.
-       (erc-dcc-handle-ctcp-send): Updated regexp match group numbers,
+       (erc-dcc-handle-ctcp-send): Update regexp match group numbers,
        added processing of escaped quotes and backslashes if filename
        itself was in quotes.
 
@@ -617,4 +704,3 @@ See ChangeLog.08 for earlier changes.
 ;; coding: utf-8
 ;; add-log-time-zone-rule: t
 ;; End:
-
index 01fdfc54d1d98d8a857e55271c27b7efa625b75b..8751a194e3b8e2561c7d7a47867f48b572bf11ed 100644 (file)
@@ -679,7 +679,7 @@ Conditionally try to reconnect and take appropriate action."
     (when (buffer-live-p buf)
       (with-current-buffer buf
         (erc-log (format
-                  "SENTINEL: proc: %S   status: %S  event: %S (quitting: %S)"
+                  "SENTINEL: proc: %S    status: %S  event: %S (quitting: %S)"
                   cproc (process-status cproc) event erc-server-quitting))
         (if (string-match "^open" event)
             ;; newly opened connection (no wait)
@@ -1208,7 +1208,6 @@ add things to `%s' instead."
          parsed 'notice 'active
          'INVITE ?n nick ?u login ?h host ?c chnl)))))
 
-
 (define-erc-response-handler (JOIN)
   "Handle join messages."
   nil
@@ -1244,7 +1243,7 @@ add things to `%s' instead."
                        (erc-format-message
                         'JOIN ?n nick ?u login ?h host ?c chnl))))))
           (when buffer (set-buffer buffer))
-          (erc-update-channel-member chnl nick nick t nil nil host login)
+          (erc-update-channel-member chnl nick nick t nil nil nil nil nil host login)
           ;; on join, we want to stay in the new channel buffer
           ;;(set-buffer ob)
           (erc-display-message parsed nil buffer str))))))
@@ -1413,7 +1412,7 @@ add things to `%s' instead."
             ;; message.  We will accumulate private identities indefinitely
             ;; at this point.
             (erc-update-channel-member (if privp nick tgt) nick nick
-                                       privp nil nil host login nil nil t)
+                                       privp nil nil nil nil nil host login nil nil t)
             (let ((cdata (erc-get-channel-user nick)))
               (setq fnick (funcall erc-format-nick-function
                                    (car cdata) (cdr cdata))))))
@@ -1470,7 +1469,7 @@ add things to `%s' instead."
                                    (current-time))))
     (pcase-let ((`(,nick ,login ,host)
                  (erc-parse-user (erc-response.sender parsed))))
-      (erc-update-channel-member ch nick nick nil nil nil host login)
+      (erc-update-channel-member ch nick nick nil nil nil nil nil nil host login)
       (erc-update-channel-topic ch (format "%s\C-o (%s, %s)" topic nick time))
       (erc-display-message parsed 'notice (erc-get-buffer ch proc)
                            'TOPIC ?n nick ?u login ?h host
@@ -1800,8 +1799,7 @@ See `erc-display-server-message'." nil
       (when (string-match "\\(^[0-9]+ \\)\\(.*\\)$" full-name)
         (setq hopcount (match-string 1 full-name))
         (setq full-name (match-string 2 full-name)))
-      (erc-update-channel-member channel nick nick nil nil nil host
-                                 user full-name)
+      (erc-update-channel-member channel nick nick nil nil nil nil nil nil host user full-name)
       (erc-display-message parsed 'notice 'active 's352
                            ?c channel ?n nick ?a away-flag
                            ?u user ?h host ?f full-name))))
index 1762700ff36da524a693f84edfedf9a19217cf2c..682585c53bbcc32d16c050ac8d0c71833c782c23 100644 (file)
@@ -67,7 +67,8 @@ variable.")
 (defun erc-input-ring-setup ()
   "Do the setup required so that we can use comint style input rings.
 Call this function when setting up the mode."
-  (setq erc-input-ring (make-ring comint-input-ring-size))
+  (unless (ring-p erc-input-ring)
+    (setq erc-input-ring (make-ring comint-input-ring-size)))
   (setq erc-input-ring-index nil))
 
 (defun erc-add-to-input-ring (s)
index ab951652bcc2f9e001426372f7eb292c9a8bc691..39ffbb4bf3819b299b230f754d05812889a4658a 100644 (file)
@@ -147,10 +147,11 @@ the minibuffer."
   :group 'erc-stamp
   :type 'string)
 
-(defcustom erc-timestamp-intangible t
+(defcustom erc-timestamp-intangible nil
   "Whether the timestamps should be intangible, i.e. prevent the point
 from entering them and instead jump over them."
   :group 'erc-stamp
+  :version "25.1"
   :type 'boolean)
 
 (defface erc-timestamp-face '((t :weight bold :foreground "green"))
index 706cce2fefebabdb25f69d125cfb928d1e997673..47e76c3ea1e235a90663a392bc68be78d6a308ba 100644 (file)
@@ -860,7 +860,7 @@ Use `erc-make-mode-line-buffer-name' to create buttons."
                        faces (cdr faces)))
                strings)))
           (newobject (erc-modified-channels-object strings)))
-      (unless (equal oldobject newobject)
+      (unless (equal-including-properties oldobject newobject)
        (setq erc-modified-channels-object newobject)
        (force-mode-line-update t)))))
 
index d93e9e02156b3b444f76f45e27431a3aca9ed743..c70dfb94d7e496138983887d60b65d7d3ba793e2 100644 (file)
@@ -9,9 +9,10 @@
 ;;               Andreas Fuchs (afs@void.at)
 ;;               Gergely Nagy (algernon@midgard.debian.net)
 ;;               David Edmondson (dme@dme.org)
+;;               Kelvin White (kwhite@gnu.org)
 ;; Maintainer: emacs-devel@gnu.org
 ;; Keywords: IRC, chat, client, Internet
-;; Version: 5.3
+
 
 ;; This file is part of GNU Emacs.
 
 ;;; History:
 ;;
 
-;;; Code:
-
-(defconst erc-version-string "Version 5.3"
+(defconst erc-version-string (format "\C-bERC\C-b (IRC client for Emacs %s)" emacs-version)
   "ERC version.  This is used by function `erc-version'.")
 
+;;; Code:
+
 (eval-when-compile (require 'cl-lib))
 (require 'font-lock)
 (require 'pp)
@@ -143,7 +144,7 @@ See function `erc-compute-server' for more details on connection
 parameters and authentication."
   :group 'erc
   :type '(choice (const :tag "None" nil)
-                (string :tag "Server")))
+                 (string :tag "Server")))
 
 (defcustom erc-port nil
   "IRC port to use if not specified.
@@ -151,8 +152,8 @@ parameters and authentication."
 This can be either a string or a number."
   :group 'erc
   :type '(choice (const :tag "None" nil)
-                (integer :tag "Port number")
-                (string :tag "Port string")))
+                 (integer :tag "Port number")
+                 (string :tag "Port string")))
 
 (defcustom erc-nick nil
   "Nickname to use if one is not provided.
@@ -165,8 +166,8 @@ See function `erc-compute-nick' for more details on connection
 parameters and authentication."
   :group 'erc
   :type '(choice (const :tag "None" nil)
-                (string :tag "Nickname")
-                (repeat (string :tag "Nickname"))))
+                 (string :tag "Nickname")
+                 (repeat (string :tag "Nickname"))))
 
 (defcustom erc-nick-uniquifier "`"
   "The string to append to the nick if it is already in use."
@@ -190,10 +191,15 @@ See function `erc-compute-full-name' for more details on connection
 parameters and authentication."
   :group 'erc
   :type '(choice (const :tag "No name" nil)
-                (string :tag "Name")
-                (function :tag "Get from function"))
+                 (string :tag "Name")
+                 (function :tag "Get from function"))
   :set (lambda (sym val)
-        (set sym (if (functionp val) (funcall val) val))))
+         (set sym (if (functionp val) (funcall val) val))))
+
+(defcustom erc-rename-buffers nil
+  "When this is set to t, buffers will be renamed to network name if available"
+  :group 'erc
+  :type 'boolean)
 
 (defvar erc-password nil
   "Password to use when authenticating to an IRC server.
@@ -243,12 +249,12 @@ If nil, only \"> \" will be shown."
 (define-widget 'erc-message-type 'set
   "A set of standard IRC Message types."
   :args '((const "JOIN")
-         (const "KICK")
-         (const "NICK")
-         (const "PART")
-         (const "QUIT")
-         (const "MODE")
-         (repeat :inline t :tag "Others" (string :tag "IRC Message Type"))))
+          (const "KICK")
+          (const "NICK")
+          (const "PART")
+          (const "QUIT")
+          (const "MODE")
+          (repeat :inline t :tag "Others" (string :tag "IRC Message Type"))))
 
 (defcustom erc-hide-list nil
   "List of IRC type messages to hide.
@@ -339,14 +345,14 @@ nicknames with erc-server-user struct instances.")
 (defun erc-downcase (string)
   "Convert STRING to IRC standard conforming downcase."
   (let ((s (downcase string))
-       (c '((?\[ . ?\{)
-            (?\] . ?\})
-            (?\\ . ?\|)
-            (?~  . ?^))))
+        (c '((?\[ . ?\{)
+             (?\] . ?\})
+             (?\\ . ?\|)
+             (?~  . ?^))))
     (save-match-data
       (while (string-match "[]\\[~]" s)
-       (aset s (match-beginning 0)
-             (cdr (assq (aref s (match-beginning 0)) c)))))
+        (aset s (match-beginning 0)
+              (cdr (assq (aref s (match-beginning 0)) c)))))
     s))
 
 (defmacro erc-with-server-buffer (&rest body)
@@ -356,8 +362,8 @@ If no server buffer exists, return nil."
   (let ((buffer (make-symbol "buffer")))
     `(let ((,buffer (erc-server-buffer)))
        (when (buffer-live-p ,buffer)
-        (with-current-buffer ,buffer
-          ,@body)))))
+         (with-current-buffer ,buffer
+           ,@body)))))
 
 (cl-defstruct (erc-server-user (:type vector) :named)
   ;; User data
@@ -370,7 +376,7 @@ If no server buffer exists, return nil."
   )
 
 (cl-defstruct (erc-channel-user (:type vector) :named)
-  op voice
+  voice halfop op admin owner
   ;; Last message time (in the form of the return value of
   ;; (current-time)
   ;;
@@ -419,11 +425,11 @@ other buffers are also changed."
       (puthash (erc-downcase new-nick) user erc-server-users))
     (dolist (buf (erc-server-user-buffers user))
       (if (buffer-live-p buf)
-         (with-current-buffer buf
-           (let ((cdata (erc-get-channel-user nick)))
-             (remhash (erc-downcase nick) erc-channel-users)
-             (puthash (erc-downcase new-nick) cdata
-                      erc-channel-users)))))))
+          (with-current-buffer buf
+            (let ((cdata (erc-get-channel-user nick)))
+              (remhash (erc-downcase nick) erc-channel-users)
+              (puthash (erc-downcase new-nick) cdata
+                       erc-channel-users)))))))
 
 (defun erc-remove-channel-user (nick)
   "This function is for internal use only.
@@ -437,12 +443,12 @@ See also: `erc-remove-server-user' and `erc-remove-user'."
   (let ((channel-data (erc-get-channel-user nick)))
     (when channel-data
       (let ((user (car channel-data)))
-       (setf (erc-server-user-buffers user)
-             (delq (current-buffer)
-                   (erc-server-user-buffers user)))
-       (remhash (erc-downcase nick) erc-channel-users)
-       (if (null (erc-server-user-buffers user))
-           (erc-remove-server-user nick))))))
+        (setf (erc-server-user-buffers user)
+              (delq (current-buffer)
+                    (erc-server-user-buffers user)))
+        (remhash (erc-downcase nick) erc-channel-users)
+        (if (null (erc-server-user-buffers user))
+            (erc-remove-server-user nick))))))
 
 (defun erc-remove-user (nick)
   "This function is for internal use only.
@@ -455,11 +461,11 @@ See also: `erc-remove-server-user' and
   (let ((user (erc-get-server-user nick)))
     (when user
       (let ((buffers (erc-server-user-buffers user)))
-       (dolist (buf buffers)
-         (if (buffer-live-p buf)
-             (with-current-buffer buf
-               (remhash (erc-downcase nick) erc-channel-users)
-               (run-hooks 'erc-channel-members-changed-hook)))))
+        (dolist (buf buffers)
+          (if (buffer-live-p buf)
+              (with-current-buffer buf
+                (remhash (erc-downcase nick) erc-channel-users)
+                (run-hooks 'erc-channel-members-changed-hook)))))
       (erc-remove-server-user nick))))
 
 (defun erc-remove-channel-users ()
@@ -468,28 +474,52 @@ See also: `erc-remove-server-user' and
 Removes all users in the current channel.  This is called by
 `erc-server-PART' and `erc-server-QUIT'."
   (when (and erc-server-connected
-            (erc-server-process-alive)
-            (hash-table-p erc-channel-users))
+             (erc-server-process-alive)
+             (hash-table-p erc-channel-users))
     (maphash (lambda (nick _cdata)
-              (erc-remove-channel-user nick))
-            erc-channel-users)
+               (erc-remove-channel-user nick))
+             erc-channel-users)
     (clrhash erc-channel-users)))
 
+(defsubst erc-channel-user-owner-p (nick)
+  "Return non-nil if NICK is an owner of the current channel."
+  (and nick
+       (hash-table-p erc-channel-users)
+       (let ((cdata (erc-get-channel-user nick)))
+         (and cdata (cdr cdata)
+              (erc-channel-user-owner (cdr cdata))))))
+
+(defsubst erc-channel-user-admin-p (nick)
+  "Return non-nil if NICK is an admin in the current channel."
+  (and nick
+       (hash-table-p erc-channel-users)
+       (let ((cdata (erc-get-channel-user nick)))
+         (and cdata (cdr cdata)
+              (erc-channel-user-admin (cdr cdata))))))
+
 (defsubst erc-channel-user-op-p (nick)
-  "Return t if NICK is an operator in the current channel."
+  "Return non-nil if NICK is an operator in the current channel."
+  (and nick
+       (hash-table-p erc-channel-users)
+       (let ((cdata (erc-get-channel-user nick)))
+         (and cdata (cdr cdata)
+              (erc-channel-user-op (cdr cdata))))))
+
+(defsubst erc-channel-user-halfop-p (nick)
+  "Return non-nil if NICK is a half-operator in the current channel."
   (and nick
        (hash-table-p erc-channel-users)
        (let ((cdata (erc-get-channel-user nick)))
-        (and cdata (cdr cdata)
-             (erc-channel-user-op (cdr cdata))))))
+         (and cdata (cdr cdata)
+              (erc-channel-user-halfop (cdr cdata))))))
 
 (defsubst erc-channel-user-voice-p (nick)
-  "Return t if NICK has voice in the current channel."
+  "Return non-nil if NICK has voice in the current channel."
   (and nick
        (hash-table-p erc-channel-users)
        (let ((cdata (erc-get-channel-user nick)))
-        (and cdata (cdr cdata)
-             (erc-channel-user-voice (cdr cdata))))))
+         (and cdata (cdr cdata)
+              (erc-channel-user-voice (cdr cdata))))))
 
 (defun erc-get-channel-user-list ()
   "Return a list of users in the current channel.  Each element
@@ -500,9 +530,9 @@ erc-channel-user struct.
 See also: `erc-sort-channel-users-by-activity'"
   (let (users)
     (if (hash-table-p erc-channel-users)
-      (maphash (lambda (_nick cdata)
-                (setq users (cons cdata users)))
-              erc-channel-users))
+        (maphash (lambda (_nick cdata)
+                   (setq users (cons cdata users)))
+                 erc-channel-users))
     users))
 
 (defun erc-get-server-nickname-list ()
@@ -510,22 +540,22 @@ See also: `erc-sort-channel-users-by-activity'"
   (erc-with-server-buffer
     (let (nicks)
       (when (hash-table-p erc-server-users)
-       (maphash (lambda (_n user)
-                  (setq nicks
-                        (cons (erc-server-user-nickname user)
-                              nicks)))
-                erc-server-users)
-       nicks))))
+        (maphash (lambda (_n user)
+                   (setq nicks
+                         (cons (erc-server-user-nickname user)
+                               nicks)))
+                 erc-server-users)
+        nicks))))
 
 (defun erc-get-channel-nickname-list ()
   "Return a list of known nicknames on the current channel."
   (let (nicks)
     (when (hash-table-p erc-channel-users)
       (maphash (lambda (_n cdata)
-                (setq nicks
-                      (cons (erc-server-user-nickname (car cdata))
-                            nicks)))
-              erc-channel-users)
+                 (setq nicks
+                       (cons (erc-server-user-nickname (car cdata))
+                             nicks)))
+               erc-channel-users)
       nicks)))
 
 (defun erc-get-server-nickname-alist ()
@@ -533,22 +563,22 @@ See also: `erc-sort-channel-users-by-activity'"
   (erc-with-server-buffer
     (let (nicks)
       (when (hash-table-p erc-server-users)
-       (maphash (lambda (_n user)
-                  (setq nicks
-                        (cons (cons (erc-server-user-nickname user) nil)
-                              nicks)))
-                erc-server-users)
-       nicks))))
+        (maphash (lambda (_n user)
+                   (setq nicks
+                         (cons (cons (erc-server-user-nickname user) nil)
+                               nicks)))
+                 erc-server-users)
+        nicks))))
 
 (defun erc-get-channel-nickname-alist ()
   "Return an alist of known nicknames on the current channel."
   (let (nicks)
     (when (hash-table-p erc-channel-users)
       (maphash (lambda (_n cdata)
-                (setq nicks
-                      (cons (cons (erc-server-user-nickname (car cdata)) nil)
-                            nicks)))
-              erc-channel-users)
+                 (setq nicks
+                       (cons (cons (erc-server-user-nickname (car cdata)) nil)
+                             nicks)))
+               erc-channel-users)
       nicks)))
 
 (defun erc-sort-channel-users-by-activity (list)
@@ -557,13 +587,13 @@ LIST must be of the form (USER . CHANNEL-DATA).
 
 See also: `erc-get-channel-user-list'."
   (sort list
-       (lambda (x y)
-         (when (and (cdr x) (cdr y))
-           (let ((tx (erc-channel-user-last-message-time (cdr x)))
-                 (ty (erc-channel-user-last-message-time (cdr y))))
-             (and tx
-                  (or (not ty)
-                      (time-less-p ty tx))))))))
+        (lambda (x y)
+          (when (and (cdr x) (cdr y))
+            (let ((tx (erc-channel-user-last-message-time (cdr x)))
+                  (ty (erc-channel-user-last-message-time (cdr y))))
+              (and tx
+                   (or (not ty)
+                       (time-less-p ty tx))))))))
 
 (defun erc-sort-channel-users-alphabetically (list)
   "Sort LIST so that users' nicknames are in alphabetical order.
@@ -571,13 +601,13 @@ LIST must be of the form (USER . CHANNEL-DATA).
 
 See also: `erc-get-channel-user-list'."
   (sort list
-       (lambda (x y)
-         (when (and (cdr x) (cdr y))
-           (let ((nickx (downcase (erc-server-user-nickname (car x))))
-                 (nicky (downcase (erc-server-user-nickname (car y)))))
-             (and nickx
-                  (or (not nicky)
-                      (string-lessp nickx nicky))))))))
+        (lambda (x y)
+          (when (and (cdr x) (cdr y))
+            (let ((nickx (downcase (erc-server-user-nickname (car x))))
+                  (nicky (downcase (erc-server-user-nickname (car y)))))
+              (and nickx
+                   (or (not nicky)
+                       (string-lessp nickx nicky))))))))
 
 (defvar erc-channel-topic nil
   "A topic string for the channel.  Should only be used in channel-buffers.")
@@ -613,10 +643,10 @@ E.g. '(\"i\" \"m\" \"s\" \"b Quake!*@*\")
 
 See also the variable `erc-prompt'."
   (let ((prompt (if (functionp erc-prompt)
-                   (funcall erc-prompt)
-                 erc-prompt)))
+                    (funcall erc-prompt)
+                  erc-prompt)))
     (if (> (length prompt) 0)
-       (concat prompt " ")
+        (concat prompt " ")
       prompt)))
 
 (defcustom erc-command-indicator nil
@@ -635,11 +665,11 @@ If nil, the prompt will be constructed from the variable `erc-prompt'."
 This only has any meaning if the variable `erc-command-indicator' is non-nil."
   (and erc-command-indicator
        (let ((prompt (if (functionp erc-command-indicator)
-                        (funcall erc-command-indicator)
-                        erc-command-indicator)))
-        (if (> (length prompt) 0)
-            (concat prompt " ")
-            prompt))))
+                         (funcall erc-command-indicator)
+                       erc-command-indicator)))
+         (if (> (length prompt) 0)
+             (concat prompt " ")
+           prompt))))
 
 (defcustom erc-notice-prefix "*** "
   "Prefix for all notices."
@@ -658,8 +688,8 @@ The following values are allowed:
 Any other value disables notice's highlighting altogether."
   :group 'erc-display
   :type '(choice (const :tag "highlight notice prefix only" prefix)
-                (const :tag "highlight the entire notice" all)
-                (const :tag "don't highlight notices at all" nil)))
+                 (const :tag "highlight the entire notice" all)
+                 (const :tag "don't highlight notices at all" nil)))
 
 (defcustom erc-echo-notice-hook nil
   "List of functions to call to echo a private notice.
@@ -682,14 +712,14 @@ See also: `erc-echo-notice-always-hook',
   :group 'erc-hooks
   :type 'hook
   :options '(erc-echo-notice-in-default-buffer
-            erc-echo-notice-in-target-buffer
-            erc-echo-notice-in-minibuffer
-            erc-echo-notice-in-server-buffer
-            erc-echo-notice-in-active-non-server-buffer
-            erc-echo-notice-in-active-buffer
-            erc-echo-notice-in-user-buffers
-            erc-echo-notice-in-user-and-target-buffers
-            erc-echo-notice-in-first-user-buffer))
+             erc-echo-notice-in-target-buffer
+             erc-echo-notice-in-minibuffer
+             erc-echo-notice-in-server-buffer
+             erc-echo-notice-in-active-non-server-buffer
+             erc-echo-notice-in-active-buffer
+             erc-echo-notice-in-user-buffers
+             erc-echo-notice-in-user-and-target-buffers
+             erc-echo-notice-in-first-user-buffer))
 
 (defcustom erc-echo-notice-always-hook
   '(erc-echo-notice-in-default-buffer)
@@ -713,14 +743,14 @@ See also: `erc-echo-notice-hook',
   :group 'erc-hooks
   :type 'hook
   :options '(erc-echo-notice-in-default-buffer
-            erc-echo-notice-in-target-buffer
-            erc-echo-notice-in-minibuffer
-            erc-echo-notice-in-server-buffer
-            erc-echo-notice-in-active-non-server-buffer
-            erc-echo-notice-in-active-buffer
-            erc-echo-notice-in-user-buffers
-            erc-echo-notice-in-user-and-target-buffers
-            erc-echo-notice-in-first-user-buffer))
+             erc-echo-notice-in-target-buffer
+             erc-echo-notice-in-minibuffer
+             erc-echo-notice-in-server-buffer
+             erc-echo-notice-in-active-non-server-buffer
+             erc-echo-notice-in-active-buffer
+             erc-echo-notice-in-user-buffers
+             erc-echo-notice-in-user-and-target-buffers
+             erc-echo-notice-in-first-user-buffer))
 
 ;; other tunable parameters
 
@@ -747,7 +777,7 @@ Many consider it impolite to do so automatically."
   "The nickname to take when you are marked as being away."
   :group 'erc
   :type '(choice (const nil)
-                string))
+                 string))
 
 (defcustom erc-paranoid nil
   "If non-nil, then all incoming CTCP requests will be shown."
@@ -782,7 +812,7 @@ set if some hacker is trying to flood you away."
 If nil, ERC will call `system-name' to get this information."
   :group 'erc
   :type '(choice (const :tag "Default system name" nil)
-                string))
+                 string))
 
 (defcustom erc-ignore-list nil
   "List of regexps matching user identifiers to ignore.
@@ -824,8 +854,8 @@ See `erc-server-flood-margin' for other flood-related parameters.")
 
 (defcustom erc-startup-file-list
   (list (concat erc-user-emacs-directory ".ercrc.el")
-       (concat erc-user-emacs-directory ".ercrc")
-       "~/.ercrc.el" "~/.ercrc" ".ercrc.el" ".ercrc")
+        (concat erc-user-emacs-directory ".ercrc")
+        "~/.ercrc.el" "~/.ercrc" ".ercrc.el" ".ercrc")
   "List of files to try for a startup script.
 The first existent and readable one will get executed.
 
@@ -884,9 +914,9 @@ If no elements match, then the empty string is used.
 As an example:
   (setq erc-quit-reason-various-alist
       '((\"xmms\" dme:now-playing)
-       (\"version\" erc-quit-reason-normal)
-       (\"home\" \"Gone home !\")
-       (\"^$\" \"Default Reason\")))
+        (\"version\" erc-quit-reason-normal)
+        (\"home\" \"Gone home !\")
+        (\"^$\" \"Default Reason\")))
 If the user types \"/quit home\", then \"Gone home !\" will be used
 as the quit message."
   :group 'erc-quit-and-part
@@ -907,9 +937,9 @@ If no elements match, then the empty string is used.
 As an example:
   (setq erc-part-reason-various-alist
       '((\"xmms\" dme:now-playing)
-       (\"version\" erc-part-reason-normal)
-       (\"home\" \"Gone home !\")
-       (\"^$\" \"Default Reason\")))
+        (\"version\" erc-part-reason-normal)
+        (\"home\" \"Gone home !\")
+        (\"^$\" \"Default Reason\")))
 If the user types \"/part home\", then \"Gone home !\" will be used
 as the part message."
   :group 'erc-quit-and-part
@@ -922,8 +952,8 @@ The function is passed a single argument, the string typed by the
 user after \"/quit\"."
   :group 'erc-quit-and-part
   :type '(choice (const erc-quit-reason-normal)
-                (const erc-quit-reason-various)
-                (symbol)))
+                 (const erc-quit-reason-various)
+                 (symbol)))
 
 (defcustom erc-part-reason 'erc-part-reason-normal
   "A function which returns the reason for parting a channel.
@@ -932,8 +962,8 @@ The function is passed a single argument, the string typed by the
 user after \"/PART\"."
   :group 'erc-quit-and-part
   :type '(choice (const erc-part-reason-normal)
-                (const erc-part-reason-various)
-                (symbol)))
+                 (const erc-part-reason-various)
+                 (symbol)))
 
 (defvar erc-grab-buffer-name "*erc-grab*"
   "The name of the buffer created by `erc-grab-region'.")
@@ -1017,8 +1047,8 @@ At this point, all modifications from prior hook functions are done."
   :group 'erc-hooks
   :type 'hook
   :options '(erc-truncate-buffer
-            erc-make-read-only
-            erc-save-buffer-in-logs))
+             erc-make-read-only
+             erc-save-buffer-in-logs))
 
 (defcustom erc-send-modify-hook nil
   "Sending hook for functions that will change the text's appearance.
@@ -1048,8 +1078,8 @@ This function is called with narrowing, ala `erc-send-modify-hook'."
 (defcustom erc-send-completed-hook
   (when (fboundp 'emacspeak-auditory-icon)
     (list (byte-compile
-          (lambda (_str)
-            (emacspeak-auditory-icon 'select-object)))))
+           (lambda (_str)
+             (emacspeak-auditory-icon 'select-object)))))
   "Hook called after a message has been parsed by ERC.
 
 The single argument to the functions is the unmodified string
@@ -1122,6 +1152,14 @@ which the local user typed."
   "ERC default face."
   :group 'erc-faces)
 
+(defface erc-nick-prefix-face '((t :inherit erc-nick-default-face :weight bold))
+  "ERC face used for user mode prefix."
+  :group 'erc-faces)
+
+(defface erc-my-nick-prefix-face '((t :inherit erc-nick-default-face :weight bold))
+  "ERC face used for my user mode prefix."
+  :group 'erc-faces)
+
 (defface erc-direct-msg-face '((t :foreground "IndianRed"))
   "ERC face used for messages you receive in the main erc buffer."
   :group 'erc-faces)
@@ -1189,7 +1227,7 @@ See also `erc-show-my-nick'."
 (make-variable-buffer-local 'erc-dbuf)
 
 (defmacro define-erc-module (name alias doc enable-body disable-body
-                            &optional local-p)
+                                  &optional local-p)
   "Define a new minor mode using ERC conventions.
 Symbol NAME is the name of the module.
 Symbol ALIAS is the alias to use, or nil.
@@ -1209,50 +1247,50 @@ Example:
   (define-erc-module replace nil
     \"This mode replaces incoming text according to `erc-replace-alist'.\"
     ((add-hook 'erc-insert-modify-hook
-              'erc-replace-insert))
+               'erc-replace-insert))
     ((remove-hook 'erc-insert-modify-hook
-                 'erc-replace-insert)))"
+                  'erc-replace-insert)))"
   (declare (doc-string 3))
   (let* ((sn (symbol-name name))
-        (mode (intern (format "erc-%s-mode" (downcase sn))))
-        (group (intern (format "erc-%s" (downcase sn))))
-        (enable (intern (format "erc-%s-enable" (downcase sn))))
-        (disable (intern (format "erc-%s-disable" (downcase sn)))))
+         (mode (intern (format "erc-%s-mode" (downcase sn))))
+         (group (intern (format "erc-%s" (downcase sn))))
+         (enable (intern (format "erc-%s-enable" (downcase sn))))
+         (disable (intern (format "erc-%s-disable" (downcase sn)))))
     `(progn
        (erc-define-minor-mode
-       ,mode
-       ,(format "Toggle ERC %S mode.
+        ,mode
+        ,(format "Toggle ERC %S mode.
 With a prefix argument ARG, enable %s if ARG is positive,
 and disable it otherwise.  If called from Lisp, enable the mode
 if ARG is omitted or nil.
 %s" name name doc)
-       nil nil nil
-       :global ,(not local-p) :group (quote ,group)
-       (if ,mode
-           (,enable)
-         (,disable)))
+        nil nil nil
+        :global ,(not local-p) :group (quote ,group)
+        (if ,mode
+            (,enable)
+          (,disable)))
        (defun ,enable ()
-        ,(format "Enable ERC %S mode."
-                 name)
-        (interactive)
-        (add-to-list 'erc-modules (quote ,name))
-        (setq ,mode t)
-        ,@enable-body)
+         ,(format "Enable ERC %S mode."
+                  name)
+         (interactive)
+         (add-to-list 'erc-modules (quote ,name))
+         (setq ,mode t)
+         ,@enable-body)
        (defun ,disable ()
-        ,(format "Disable ERC %S mode."
-                 name)
-        (interactive)
-        (setq erc-modules (delq (quote ,name) erc-modules))
-        (setq ,mode nil)
-        ,@disable-body)
+         ,(format "Disable ERC %S mode."
+                  name)
+         (interactive)
+         (setq erc-modules (delq (quote ,name) erc-modules))
+         (setq ,mode nil)
+         ,@disable-body)
        ,(when (and alias (not (eq name alias)))
-         `(defalias
-            (quote
-             ,(intern
-               (format "erc-%s-mode"
-                       (downcase (symbol-name alias)))))
-            (quote
-             ,mode)))
+          `(defalias
+             (quote
+              ,(intern
+                (format "erc-%s-mode"
+                        (downcase (symbol-name alias)))))
+             (quote
+              ,mode)))
        ;; For find-function and find-variable.
        (put ',mode    'definition-name ',name)
        (put ',enable  'definition-name ',name)
@@ -1278,13 +1316,13 @@ capabilities."
     (error
      "You should only run `erc-once-with-server-event' in a server buffer"))
   (let ((fun (make-symbol "fun"))
-       (hook (erc-get-hook event)))
+        (hook (erc-get-hook event)))
     (put fun 'erc-original-buffer (current-buffer))
     (fset fun (lambda (proc parsed)
-               (with-current-buffer (get fun 'erc-original-buffer)
-                 (remove-hook hook fun t))
-               (fmakunbound fun)
-               (funcall f proc parsed)))
+                (with-current-buffer (get fun 'erc-original-buffer)
+                  (remove-hook hook fun t))
+                (fmakunbound fun)
+                (funcall f proc parsed)))
     (add-hook hook fun nil t)
     fun))
 
@@ -1311,7 +1349,7 @@ the process buffer."
 If BUFFER is nil, the current buffer is used."
   (with-current-buffer (or buffer (current-buffer))
     (and (eq major-mode 'erc-mode)
-        (null (erc-default-target)))))
+         (null (erc-default-target)))))
 
 (defun erc-open-server-buffer-p (&optional buffer)
   "Return non-nil if argument BUFFER is an ERC server buffer that
@@ -1327,8 +1365,8 @@ If BUFFER is nil, the current buffer is used."
   (with-current-buffer (or buffer (current-buffer))
     (let ((target (erc-default-target)))
       (and (eq major-mode 'erc-mode)
-          target
-          (not (memq (aref target 0) '(?# ?& ?+ ?!)))))))
+           target
+           (not (memq (aref target 0) '(?# ?& ?+ ?!)))))))
 
 (defun erc-ison-p (nick)
   "Return non-nil if NICK is online."
@@ -1338,39 +1376,39 @@ If BUFFER is nil, the current buffer is used."
       (erc-once-with-server-event
        303
        (lambda (_proc parsed)
-        (let ((ison (split-string (aref parsed 3))))
-          (setq erc-online-p (car (erc-member-ignore-case nick ison)))
-          t)))
+         (let ((ison (split-string (aref parsed 3))))
+           (setq erc-online-p (car (erc-member-ignore-case nick ison)))
+           t)))
       (erc-server-send (format "ISON %s" nick))
       (while (eq erc-online-p 'unknown) (accept-process-output))
       (if (called-interactively-p 'interactive)
-         (message "%s is %sonline"
-                  (or erc-online-p nick)
-                  (if erc-online-p "" "not "))
-       erc-online-p))))
+          (message "%s is %sonline"
+                   (or erc-online-p nick)
+                   (if erc-online-p "" "not "))
+        erc-online-p))))
 
 (defun erc-log-aux (string)
   "Do the debug logging of STRING."
   (let ((cb (current-buffer))
-       (point 1)
-       (was-eob nil)
-       (session-buffer (erc-server-buffer)))
+        (point 1)
+        (was-eob nil)
+        (session-buffer (erc-server-buffer)))
     (if session-buffer
-       (progn
-         (set-buffer session-buffer)
-         (if (not (and erc-dbuf (bufferp erc-dbuf) (buffer-live-p erc-dbuf)))
-             (progn
-               (setq erc-dbuf (get-buffer-create
-                               (concat "*ERC-DEBUG: "
-                                       erc-session-server "*")))))
-         (set-buffer erc-dbuf)
-         (setq point (point))
-         (setq was-eob (eobp))
-         (goto-char (point-max))
-         (insert (concat "** " string "\n"))
-         (if was-eob (goto-char (point-max))
-           (goto-char point))
-         (set-buffer cb))
+        (progn
+          (set-buffer session-buffer)
+          (if (not (and erc-dbuf (bufferp erc-dbuf) (buffer-live-p erc-dbuf)))
+              (progn
+                (setq erc-dbuf (get-buffer-create
+                                (concat "*ERC-DEBUG: "
+                                        erc-session-server "*")))))
+          (set-buffer erc-dbuf)
+          (setq point (point))
+          (setq was-eob (eobp))
+          (goto-char (point-max))
+          (insert (concat "** " string "\n"))
+          (if was-eob (goto-char (point-max))
+            (goto-char point))
+          (set-buffer cb))
       (message "ERC: ** %s" string))))
 
 ;; Last active buffer, to print server messages in the right place
@@ -1386,15 +1424,15 @@ server buffer.")
 Defaults to the server buffer."
   (erc-with-server-buffer
     (if (buffer-live-p erc-active-buffer)
-       erc-active-buffer
+        erc-active-buffer
       (setq erc-active-buffer (current-buffer)))))
 
 (defun erc-set-active-buffer (buffer)
   "Set the value of `erc-active-buffer' to BUFFER."
   (cond ((erc-server-buffer)
-        (with-current-buffer (erc-server-buffer)
-          (setq erc-active-buffer buffer)))
-       (t (setq erc-active-buffer buffer))))
+         (with-current-buffer (erc-server-buffer)
+           (setq erc-active-buffer buffer)))
+        (t (setq erc-active-buffer buffer))))
 
 ;; Mode activation routines
 
@@ -1431,19 +1469,19 @@ The available choices are:
   any other value  - in place of the current buffer."
   :group 'erc-buffers
   :type '(choice (const :tag "Split window and select" window)
-                (const :tag "Split window, don't select" window-noselect)
-                (const :tag "New frame" frame)
-                (const :tag "Bury in new buffer" bury)
-                (const :tag "Use current buffer" buffer)
-                (const :tag "Use current buffer" t)))
+                 (const :tag "Split window, don't select" window-noselect)
+                 (const :tag "New frame" frame)
+                 (const :tag "Bury in new buffer" bury)
+                 (const :tag "Use current buffer" buffer)
+                 (const :tag "Use current buffer" t)))
 
 (defcustom erc-frame-alist nil
   "Alist of frame parameters for creating erc frames.
 A value of nil means to use `default-frame-alist'."
   :group 'erc-buffers
   :type '(repeat (cons :format "%v"
-                      (symbol :tag "Parameter")
-                      (sexp :tag "Value"))))
+                       (symbol :tag "Parameter")
+                       (sexp :tag "Value"))))
 
 (defcustom erc-frame-dedicated-flag nil
   "Non-nil means the erc frames are dedicated to that buffer.
@@ -1462,11 +1500,11 @@ effect when `erc-join-buffer' is set to `frame'."
 (defun erc-channel-p (channel)
   "Return non-nil if CHANNEL seems to be an IRC channel name."
   (cond ((stringp channel)
-        (memq (aref channel 0) '(?# ?& ?+ ?!)))
-       ((and (bufferp channel) (buffer-live-p channel))
-        (with-current-buffer channel
-          (erc-channel-p (erc-default-target))))
-       (t nil)))
+         (memq (aref channel 0) '(?# ?& ?+ ?!)))
+        ((and (bufferp channel) (buffer-live-p channel))
+         (with-current-buffer channel
+           (erc-channel-p (erc-default-target))))
+        (t nil)))
 
 (defcustom erc-reuse-buffers t
   "If nil, create new buffers on joining a channel/query.
@@ -1492,17 +1530,17 @@ symbol, it may have these values:
     (let ((port-nr (string-to-number port)))
       (cond
        ((> port-nr 0)
-       port-nr)
+        port-nr)
        ((string-equal port "irc")
-       194)
+        194)
        ((string-equal port "ircs")
-       994)
+        994)
        ((string-equal port "ircd")
-       6667)
+        6667)
        ((string-equal port "ircd-dalnet")
-       7000)
+        7000)
        (t
-       nil))))
+        nil))))
    ((numberp port)
     port)
    (t
@@ -1557,8 +1595,8 @@ All strings are compared according to IRC protocol case rules, see
   (catch 'result
     (while list
       (if (string= string (erc-downcase (car list)))
-         (throw 'result list)
-       (setq list (cdr list))))))
+          (throw 'result list)
+        (setq list (cdr list))))))
 
 (defmacro erc-with-buffer (spec &rest body)
   "Execute BODY in the buffer associated with SPEC.
@@ -1578,21 +1616,21 @@ See also `with-current-buffer'.
 \(fn (TARGET [PROCESS]) BODY...)"
   (declare (indent 1) (debug ((form &optional form) body)))
   (let ((buf (make-symbol "buf"))
-       (proc (make-symbol "proc"))
-       (target (make-symbol "target"))
-       (process (make-symbol "process")))
+        (proc (make-symbol "proc"))
+        (target (make-symbol "target"))
+        (process (make-symbol "process")))
     `(let* ((,target ,(car spec))
-           (,process ,(cadr spec))
-           (,buf (if (bufferp ,target)
-                     ,target
-                   (let ((,proc (or ,process
-                                    (and (processp erc-server-process)
-                                         erc-server-process))))
-                     (if (and ,target ,proc)
-                         (erc-get-buffer ,target ,proc))))))
+            (,process ,(cadr spec))
+            (,buf (if (bufferp ,target)
+                      ,target
+                    (let ((,proc (or ,process
+                                     (and (processp erc-server-process)
+                                          erc-server-process))))
+                      (if (and ,target ,proc)
+                          (erc-get-buffer ,target ,proc))))))
        (when (buffer-live-p ,buf)
-        (with-current-buffer ,buf
-          ,@body)))))
+         (with-current-buffer ,buf
+           ,@body)))))
 
 (defun erc-get-buffer (target &optional proc)
   "Return the buffer matching TARGET in the process PROC.
@@ -1601,10 +1639,10 @@ If PROC is not supplied, all processes are searched."
     (catch 'buffer
       (erc-buffer-filter
        (lambda ()
-        (let ((current (erc-default-target)))
-          (and (stringp current)
-               (string-equal downcased-target (erc-downcase current))
-               (throw 'buffer (current-buffer)))))
+         (let ((current (erc-default-target)))
+           (and (stringp current)
+                (string-equal downcased-target (erc-downcase current))
+                (throw 'buffer (current-buffer)))))
        proc))))
 
 (defun erc-buffer-filter (predicate &optional proc)
@@ -1618,14 +1656,14 @@ server connection, or nil which means all open connections."
     (delq
      nil
      (mapcar (lambda (buf)
-              (when (buffer-live-p buf)
-                (with-current-buffer buf
-                  (and (eq major-mode 'erc-mode)
-                       (or (not proc)
-                           (eq proc erc-server-process))
-                       (funcall predicate)
-                       buf))))
-            (buffer-list)))))
+               (when (buffer-live-p buf)
+                 (with-current-buffer buf
+                   (and (eq major-mode 'erc-mode)
+                        (or (not proc)
+                            (eq proc erc-server-process))
+                        (funcall predicate)
+                        buf))))
+             (buffer-list)))))
 
 (defun erc-buffer-list (&optional predicate proc)
   "Return a list of ERC buffers.
@@ -1645,14 +1683,14 @@ nil."
   (declare (indent 1) (debug (form form body)))
   ;; Make the evaluation have the correct order
   (let ((pre (make-symbol "pre"))
-       (pro (make-symbol "pro")))
+        (pro (make-symbol "pro")))
     `(let* ((,pro ,process)
-           (,pre ,pred)
-           (res (mapcar (lambda (buffer)
-                          (with-current-buffer buffer
-                            ,@forms))
-                        (erc-buffer-list ,pre
-                                         ,pro))))
+            (,pre ,pred)
+            (res (mapcar (lambda (buffer)
+                           (with-current-buffer buffer
+                             ,@forms))
+                         (erc-buffer-list ,pre
+                                          ,pro))))
        ;; Silence the byte-compiler by binding the result of mapcar to
        ;; a variable.
        res)))
@@ -1660,7 +1698,7 @@ nil."
 ;; (iswitchb-mode) will autoload iswitchb.el
 (defvar iswitchb-temp-buflist)
 (declare-function iswitchb-read-buffer "iswitchb"
-                (prompt &optional default require-match start matches-set))
+                  (prompt &optional default require-match start matches-set))
 (defvar iswitchb-make-buflist-hook)
 
 (defun erc-iswitchb (&optional arg)
@@ -1676,20 +1714,20 @@ needs to be active for this function to work."
   (let ((enabled (bound-and-true-p iswitchb-mode)))
     (or enabled (iswitchb-mode 1))
     (unwind-protect
-       (let ((iswitchb-make-buflist-hook
-              (lambda ()
-                (setq iswitchb-temp-buflist
-                      (mapcar 'buffer-name
-                              (erc-buffer-list
-                               nil
-                               (when arg erc-server-process)))))))
-         (switch-to-buffer
-          (iswitchb-read-buffer
-           "Switch-to: "
-           (if (boundp 'erc-modified-channels-alist)
-               (buffer-name (caar (last erc-modified-channels-alist)))
-             nil)
-           t)))
+        (let ((iswitchb-make-buflist-hook
+               (lambda ()
+                 (setq iswitchb-temp-buflist
+                       (mapcar 'buffer-name
+                               (erc-buffer-list
+                                nil
+                                (when arg erc-server-process)))))))
+          (switch-to-buffer
+           (iswitchb-read-buffer
+            "Switch-to: "
+            (if (boundp 'erc-modified-channels-alist)
+                (buffer-name (caar (last erc-modified-channels-alist)))
+              nil)
+            t)))
       (or enabled (iswitchb-mode -1)))))
 
 (defun erc-channel-list (proc)
@@ -1699,7 +1737,7 @@ all channel buffers on all servers."
   (erc-buffer-filter
    (lambda ()
      (and (erc-default-target)
-         (erc-channel-p (erc-default-target))))
+          (erc-channel-p (erc-default-target))))
    proc))
 
 (defun erc-buffer-list-with-nick (nick proc)
@@ -1707,8 +1745,8 @@ all channel buffers on all servers."
   (with-current-buffer (process-buffer proc)
     (let ((user (gethash (erc-downcase nick) erc-server-users)))
       (if user
-         (erc-server-user-buffers user)
-       nil))))
+          (erc-server-user-buffers user)
+        nil))))
 
 ;; Some local variables
 
@@ -1766,31 +1804,31 @@ buffer rather than a server buffer.")
   (let ((transforms '((pcomplete . completion))))
     (erc-delete-dups
      (mapcar (lambda (m) (or (cdr (assoc m transforms)) m))
-            mods))))
+             mods))))
 
 (defcustom erc-modules '(netsplit fill button match track completion readonly
-                        networks ring autojoin noncommands irccontrols
-                        move-to-prompt stamp menu list)
+                                  networks ring autojoin noncommands irccontrols
+                                  move-to-prompt stamp menu list)
   "A list of modules which ERC should enable.
 If you set the value of this without using `customize' remember to call
 \(erc-update-modules) after you change it.  When using `customize', modules
 removed from the list will be disabled."
   :get (lambda (sym)
-        ;; replace outdated names with their newer equivalents
-        (erc-migrate-modules (symbol-value sym)))
+         ;; replace outdated names with their newer equivalents
+         (erc-migrate-modules (symbol-value sym)))
   :set (lambda (sym val)
-        ;; disable modules which have just been removed
-        (when (and (boundp 'erc-modules) erc-modules val)
-          (dolist (module erc-modules)
-            (unless (member module val)
-              (let ((f (intern-soft (format "erc-%s-mode" module))))
-                (when (and (fboundp f) (boundp f) (symbol-value f))
-                  (message "Disabling `erc-%s'" module)
-                  (funcall f 0))))))
-        (set sym val)
-        ;; this test is for the case where erc hasn't been loaded yet
-        (when (fboundp 'erc-update-modules)
-          (erc-update-modules)))
+         ;; disable modules which have just been removed
+         (when (and (boundp 'erc-modules) erc-modules val)
+           (dolist (module erc-modules)
+             (unless (member module val)
+               (let ((f (intern-soft (format "erc-%s-mode" module))))
+                 (when (and (fboundp f) (boundp f) (symbol-value f))
+                   (message "Disabling `erc-%s'" module)
+                   (funcall f 0))))))
+         (set sym val)
+         ;; this test is for the case where erc hasn't been loaded yet
+         (when (fboundp 'erc-update-modules)
+           (erc-update-modules)))
   :type
   '(set
     :greedy t
@@ -1798,42 +1836,42 @@ removed from the list will be disabled."
     (const :tag "autojoin: Join channels automatically" autojoin)
     (const :tag "button: Buttonize URLs, nicknames, and other text" button)
     (const :tag "capab: Mark unidentified users on servers supporting CAPAB"
-          capab-identify)
+           capab-identify)
     (const :tag "completion: Complete nicknames and commands (programmable)"
-          completion)
+           completion)
     (const :tag "hecomplete: Complete nicknames and commands (obsolete, use \"completion\")" hecomplete)
     (const :tag "dcc: Provide Direct Client-to-Client support" dcc)
     (const :tag "fill: Wrap long lines" fill)
     (const :tag "identd: Launch an identd server on port 8113" identd)
     (const :tag "irccontrols: Highlight or remove IRC control characters"
-          irccontrols)
+           irccontrols)
     (const :tag "keep-place: Leave point above un-viewed text" keep-place)
     (const :tag "list: List channels in a separate buffer" list)
     (const :tag "log: Save buffers in logs" log)
     (const :tag "match: Highlight pals, fools, and other keywords" match)
     (const :tag "menu: Display a menu in ERC buffers" menu)
     (const :tag "move-to-prompt: Move to the prompt when typing text"
-          move-to-prompt)
+           move-to-prompt)
     (const :tag "netsplit: Detect netsplits" netsplit)
     (const :tag "networks: Provide data about IRC networks" networks)
     (const :tag "noncommands: Don't display non-IRC commands after evaluation"
-          noncommands)
+           noncommands)
     (const :tag
-          "notify: Notify when the online status of certain users changes"
-          notify)
+           "notify: Notify when the online status of certain users changes"
+           notify)
     (const :tag "notifications: Send notifications on PRIVMSG or nickname mentions"
-          notifications)
+           notifications)
     (const :tag "page: Process CTCP PAGE requests from IRC" page)
     (const :tag "readonly: Make displayed lines read-only" readonly)
     (const :tag "replace: Replace text in messages" replace)
     (const :tag "ring: Enable an input history" ring)
     (const :tag "scrolltobottom: Scroll to the bottom of the buffer"
-          scrolltobottom)
+           scrolltobottom)
     (const :tag "services: Identify to Nickserv (IRC Services) automatically"
-          services)
+           services)
     (const :tag "smiley: Convert smileys to pretty icons" smiley)
     (const :tag "sound: Play sounds when you receive CTCP SOUND requests"
-          sound)
+           sound)
     (const :tag "stamp: Add timestamps to messages" stamp)
     (const :tag "spelling: Check spelling" spelling)
     (const :tag "track: Track channel activity in the mode-line" track)
@@ -1851,27 +1889,27 @@ removed from the list will be disabled."
       (cond
        ;; yuck. perhaps we should bring the filenames into sync?
        ((string= req "erc-capab-identify")
-       (setq req "erc-capab"))
+        (setq req "erc-capab"))
        ((string= req "erc-completion")
-       (setq req "erc-pcomplete"))
+        (setq req "erc-pcomplete"))
        ((string= req "erc-pcomplete")
-       (setq mod 'completion))
+        (setq mod 'completion))
        ((string= req "erc-autojoin")
-       (setq req "erc-join")))
+        (setq req "erc-join")))
       (condition-case nil
-         (require (intern req))
-       (error nil))
+          (require (intern req))
+        (error nil))
       (let ((sym (intern-soft (concat "erc-" (symbol-name mod) "-mode"))))
-       (if (fboundp sym)
-           (funcall sym 1)
-         (error "`%s' is not a known ERC module" mod))))))
+        (if (fboundp sym)
+            (funcall sym 1)
+          (error "`%s' is not a known ERC module" mod))))))
 
 (defun erc-setup-buffer (buffer)
   "Consults `erc-join-buffer' to find out how to display `BUFFER'."
   (pcase erc-join-buffer
     (`window
      (if (active-minibuffer-window)
-        (display-buffer buffer)
+         (display-buffer buffer)
        (switch-to-buffer-other-window buffer)))
     (`window-noselect
      (display-buffer buffer))
@@ -1879,21 +1917,21 @@ removed from the list will be disabled."
      nil)
     (`frame
      (when (or (not erc-reuse-frames)
-              (not (get-buffer-window buffer t)))
+               (not (get-buffer-window buffer t)))
        (let ((frame (make-frame (or erc-frame-alist
-                                   default-frame-alist))))
-        (raise-frame frame)
-        (select-frame frame))
+                                    default-frame-alist))))
+         (raise-frame frame)
+         (select-frame frame))
        (switch-to-buffer buffer)
        (when erc-frame-dedicated-flag
-        (set-window-dedicated-p (selected-window) t))))
+         (set-window-dedicated-p (selected-window) t))))
     (_
      (if (active-minibuffer-window)
-        (display-buffer buffer)
+         (display-buffer buffer)
        (switch-to-buffer buffer)))))
 
 (defun erc-open (&optional server port nick full-name
-                          connect passwd tgt-list channel process)
+                           connect passwd tgt-list channel process)
   "Connect to SERVER on PORT as NICK with FULL-NAME.
 
 If CONNECT is non-nil, connect to the server.  Otherwise assume
@@ -1905,13 +1943,13 @@ non-nil, use it to initialize `erc-default-recipients'.
 
 Returns the buffer for the given server or channel."
   (let ((server-announced-name (when (and (boundp 'erc-session-server)
-                                         (string= server erc-session-server))
-                                erc-server-announced-name))
-       (connected-p (unless connect erc-server-connected))
-       (buffer (erc-get-buffer-create server port channel))
-       (old-buffer (current-buffer))
-       old-point
-       continued-session)
+                                          (string= server erc-session-server))
+                                 erc-server-announced-name))
+        (connected-p (unless connect erc-server-connected))
+        (buffer (erc-get-buffer-create server port channel))
+        (old-buffer (current-buffer))
+        old-point
+        continued-session)
     (when connect (run-hook-with-args 'erc-before-connect server port nick))
     (erc-update-modules)
     (set-buffer buffer)
@@ -1930,8 +1968,8 @@ Returns the buffer for the given server or channel."
     (when (get-text-property (point) 'erc-prompt)
       (setq continued-session t)
       (set-marker erc-input-marker
-                 (or (next-single-property-change (point) 'erc-prompt)
-                     (point-max))))
+                  (or (next-single-property-change (point) 'erc-prompt)
+                      (point-max))))
     (unless continued-session
       (goto-char (point-max))
       (insert "\n"))
@@ -1941,14 +1979,14 @@ Returns the buffer for the given server or channel."
     (setq erc-server-current-nick nil)
     ;; Initialize erc-server-users and erc-channel-users
     (if connect
-       (progn ;; server buffer
-         (setq erc-server-users
-               (make-hash-table :test 'equal))
-         (setq erc-channel-users nil))
+        (progn ;; server buffer
+          (setq erc-server-users
+                (make-hash-table :test 'equal))
+          (setq erc-channel-users nil))
       (progn ;; target buffer
-       (setq erc-server-users nil)
-       (setq erc-channel-users
-             (make-hash-table :test 'equal))))
+        (setq erc-server-users nil)
+        (setq erc-channel-users
+              (make-hash-table :test 'equal))))
     ;; clear last incomplete line read
     (setq erc-server-filter-data nil)
     (setq erc-channel-topic "")
@@ -1969,29 +2007,29 @@ Returns the buffer for the given server or channel."
     (setq erc-default-nicks (if (consp erc-nick) erc-nick (list erc-nick)))
     ;; password stuff
     (setq erc-session-password
-         (or passwd
-             (let ((secret
-                    (plist-get
-                     (nth 0
-                          (auth-source-search :host server
-                                              :max 1
-                                              :user nick
-                                              :port port
-                                              :require '(:secret)))
-                     :secret)))
-               (if (functionp secret)
-                   (funcall secret)
-                 secret))))
+          (or passwd
+              (let ((secret
+                     (plist-get
+                      (nth 0
+                           (auth-source-search :host server
+                                               :max 1
+                                               :user nick
+                                               :port port
+                                               :require '(:secret)))
+                      :secret)))
+                (if (functionp secret)
+                    (funcall secret)
+                  secret))))
     ;; debug output buffer
     (setq erc-dbuf
-         (when erc-log-p
-           (get-buffer-create (concat "*ERC-DEBUG: " server "*"))))
+          (when erc-log-p
+            (get-buffer-create (concat "*ERC-DEBUG: " server "*"))))
     ;; set up prompt
     (unless continued-session
       (goto-char (point-max))
       (insert "\n"))
     (if continued-session
-       (goto-char old-point)
+        (goto-char old-point)
       (set-marker erc-insert-marker (point))
       (erc-display-prompt)
       (goto-char (point-max)))
@@ -2008,9 +2046,9 @@ Returns the buffer for the given server or channel."
     ;; Now display the buffer in a window as per user wishes.
     (unless (eq buffer old-buffer)
       (when erc-log-p
-       ;; we can't log to debug buffer, it may not exist yet
-       (message "erc: old buffer %s, switching to %s"
-                old-buffer buffer))
+        ;; we can't log to debug buffer, it may not exist yet
+        (message "erc: old buffer %s, switching to %s"
+                 old-buffer buffer))
       (erc-setup-buffer buffer))
 
     buffer))
@@ -2019,9 +2057,10 @@ Returns the buffer for the given server or channel."
   "Initialize the `erc-last-saved-position' marker to a sensible position.
 BUFFER is the current buffer."
   (with-current-buffer buffer
-    (setq erc-last-saved-position (make-marker))
-    (move-marker erc-last-saved-position
-                (1- (marker-position erc-insert-marker)))))
+    (unless (markerp erc-last-saved-position)
+      (setq erc-last-saved-position (make-marker))
+      (move-marker erc-last-saved-position
+                  (1- (marker-position erc-insert-marker))))))
 
 ;; interactive startup
 
@@ -2039,9 +2078,9 @@ If no buffer matches, return nil."
   (erc-buffer-list
    (lambda ()
      (and (erc-server-process-alive)
-         (string= erc-session-server server)
-         (erc-port-equal erc-session-port port)
-         (erc-current-nick-p nick)))))
+          (string= erc-session-server server)
+          (erc-port-equal erc-session-port port)
+          (erc-current-nick-p nick)))))
 
 (defcustom erc-before-connect nil
   "Hook called before connecting to a server.
@@ -2063,38 +2102,38 @@ functions in here get called with the parameters SERVER and NICK."
   "Prompt the user for values of nick, server, port, and password."
   (let (user-input server port nick passwd)
     (setq user-input (read-from-minibuffer
-                     "IRC server: "
-                     (erc-compute-server) nil nil 'erc-server-history-list))
+                      "IRC server: "
+                      (erc-compute-server) nil nil 'erc-server-history-list))
 
     (if (string-match "\\(.*\\):\\(.*\\)\\'" user-input)
-       (setq port (erc-string-to-port (match-string 2 user-input))
-             user-input (match-string 1 user-input))
+        (setq port (erc-string-to-port (match-string 2 user-input))
+              user-input (match-string 1 user-input))
       (setq port
-           (erc-string-to-port (read-from-minibuffer
-                                "IRC port: " (erc-port-to-string
-                                              (erc-compute-port))))))
+            (erc-string-to-port (read-from-minibuffer
+                                 "IRC port: " (erc-port-to-string
+                                               (erc-compute-port))))))
 
     (if (string-match "\\`\\(.*\\)@\\(.*\\)" user-input)
-       (setq nick (match-string 1 user-input)
-             user-input (match-string 2 user-input))
+        (setq nick (match-string 1 user-input)
+              user-input (match-string 2 user-input))
       (setq nick
-           (if (erc-already-logged-in server port nick)
-               (read-from-minibuffer
-                (erc-format-message 'nick-in-use ?n nick)
-                nick
-                nil nil 'erc-nick-history-list)
-             (read-from-minibuffer
-              "Nickname: " (erc-compute-nick nick)
-              nil nil 'erc-nick-history-list))))
+            (if (erc-already-logged-in server port nick)
+                (read-from-minibuffer
+                 (erc-format-message 'nick-in-use ?n nick)
+                 nick
+                 nil nil 'erc-nick-history-list)
+              (read-from-minibuffer
+               "Nickname: " (erc-compute-nick nick)
+               nil nil 'erc-nick-history-list))))
 
     (setq server user-input)
 
     (setq passwd (if erc-prompt-for-password
-                    (if (and erc-password
-                             (y-or-n-p "Use the default password? "))
-                        erc-password
-                      (read-passwd "Password: "))
-                  erc-password))
+                     (if (and erc-password
+                              (y-or-n-p "Use the default password? "))
+                         erc-password
+                       (read-passwd "Password: "))
+                   erc-password))
     (when (and passwd (string= "" passwd))
       (setq passwd nil))
 
@@ -2105,17 +2144,17 @@ functions in here get called with the parameters SERVER and NICK."
       ;; bncs transparent, so that erc-compute-buffer-name displays
       ;; the server one is connected to.
       (setq nick (read-from-minibuffer
-                 (erc-format-message 'nick-in-use ?n nick)
-                 nick
-                 nil nil 'erc-nick-history-list)))
+                  (erc-format-message 'nick-in-use ?n nick)
+                  nick
+                  nil nil 'erc-nick-history-list)))
     (list :server server :port port :nick nick :password passwd)))
 
 ;;;###autoload
 (cl-defun erc (&key (server (erc-compute-server))
-                   (port   (erc-compute-port))
-                   (nick   (erc-compute-nick))
-                   password
-                   (full-name (erc-compute-full-name)))
+                    (port   (erc-compute-port))
+                    (nick   (erc-compute-nick))
+                    password
+                    (full-name (erc-compute-full-name)))
   "ERC is a powerful, modular, and extensible IRC client.
 This function is the main entry point for ERC.
 
@@ -2155,7 +2194,7 @@ Arguments are the same as for `erc'."
 The process will be given the name NAME, its target buffer will be
 BUFFER.  HOST and PORT specify the connection target."
   (open-network-stream name buffer host port
-                      :type 'tls))
+                       :type 'tls))
 
 ;;; Displaying error messages
 
@@ -2195,36 +2234,36 @@ If OUTBOUND is non-nil, STRING is being sent to the IRC server
 and appears in face `erc-input-face' in the buffer."
   (when erc-debug-irc-protocol
     (let ((network-name (or (ignore-errors (erc-network-name))
-                           "???")))
+                            "???")))
       (with-current-buffer (get-buffer-create "*erc-protocol*")
-       (save-excursion
-         (goto-char (point-max))
-         (let ((inhibit-read-only t))
-           (insert (if (not outbound)
-                       ;; Cope with the fact that string might
-                       ;; contain multiple lines of text.
-                       (let ((lines (delete "" (split-string string
-                                                             "\n\\|\r\n")))
-                             (result ""))
-                         (dolist (line lines)
-                           (setq result (concat result network-name
-                                                " << " line "\n")))
-                         result)
-                     (erc-propertize
-                       (concat network-name " >> " string
-                               (if (/= ?\n
-                                       (aref string
-                                             (1- (length string))))
-                                   "\n"))
-                       'face 'erc-input-face)))))
-       (let ((orig-win (selected-window))
-             (debug-buffer-window (get-buffer-window (current-buffer) t)))
-         (when debug-buffer-window
-            (select-window debug-buffer-window)
-            (when (= 1 (count-lines (point) (point-max)))
-              (goto-char (point-max))
-              (recenter -1))
-            (select-window orig-win)))))))
+        (save-excursion
+          (goto-char (point-max))
+          (let ((inhibit-read-only t))
+            (insert (if (not outbound)
+                        ;; Cope with the fact that string might
+                        ;; contain multiple lines of text.
+                        (let ((lines (delete "" (split-string string
+                                                              "\n\\|\r\n")))
+                              (result ""))
+                          (dolist (line lines)
+                            (setq result (concat result network-name
+                                                 " << " line "\n")))
+                          result)
+                      (erc-propertize
+                       (concat network-name " >> " string
+                               (if (/= ?\n
+                                       (aref string
+                                             (1- (length string))))
+                                   "\n"))
+                       'face 'erc-input-face)))))
+        (let ((orig-win (selected-window))
+              (debug-buffer-window (get-buffer-window (current-buffer) t)))
+          (when debug-buffer-window
+            (select-window debug-buffer-window)
+            (when (= 1 (count-lines (point) (point-max)))
+              (goto-char (point-max))
+              (recenter -1))
+            (select-window orig-win)))))))
 
 (defun erc-toggle-debug-irc-protocol (&optional arg)
   "Toggle the value of `erc-debug-irc-protocol'.
@@ -2235,26 +2274,26 @@ If ARG is non-nil, show the *erc-protocol* buffer."
     (with-current-buffer buf
       (erc-view-mode-enter)
       (when (null (current-local-map))
-       (let ((inhibit-read-only t))
-         (insert (erc-make-notice "This buffer displays all IRC protocol traffic exchanged with each server.\n"))
-         (insert (erc-make-notice "Kill this buffer to terminate protocol logging.\n\n")))
-       (use-local-map (make-sparse-keymap))
-       (local-set-key (kbd "t") 'erc-toggle-debug-irc-protocol))
+        (let ((inhibit-read-only t))
+          (insert (erc-make-notice "This buffer displays all IRC protocol traffic exchanged with each server.\n"))
+          (insert (erc-make-notice "Kill this buffer to terminate protocol logging.\n\n")))
+        (use-local-map (make-sparse-keymap))
+        (local-set-key (kbd "t") 'erc-toggle-debug-irc-protocol))
       (add-hook 'kill-buffer-hook
-               #'(lambda () (setq erc-debug-irc-protocol nil))
-               nil 'local)
+                #'(lambda () (setq erc-debug-irc-protocol nil))
+                nil 'local)
       (goto-char (point-max))
       (let ((inhibit-read-only t))
-       (insert (erc-make-notice
-                (format "IRC protocol logging %s at %s -- Press `t' to toggle logging.\n"
-                        (if erc-debug-irc-protocol "disabled" "enabled")
-                        (current-time-string))))))
+        (insert (erc-make-notice
+                 (format "IRC protocol logging %s at %s -- Press `t' to toggle logging.\n"
+                         (if erc-debug-irc-protocol "disabled" "enabled")
+                         (current-time-string))))))
     (setq erc-debug-irc-protocol (not erc-debug-irc-protocol))
     (if (and arg
-            (not (get-buffer-window "*erc-protocol*" t)))
-       (display-buffer buf t))
+             (not (get-buffer-window "*erc-protocol*" t)))
+        (display-buffer buf t))
     (message "IRC protocol traffic logging %s (see buffer *erc-protocol*)."
-            (if erc-debug-irc-protocol "enabled" "disabled"))))
+             (if erc-debug-irc-protocol "enabled" "disabled"))))
 
 ;;; I/O interface
 
@@ -2293,69 +2332,69 @@ If STRING is nil, the function does nothing."
   (when string
     (with-current-buffer (or buffer (process-buffer erc-server-process))
       (let ((insert-position (or (marker-position erc-insert-marker)
-                                (point-max))))
-       (let ((string string) ;; FIXME! Can this be removed?
-             (buffer-undo-list t)
-             (inhibit-read-only t))
-         (unless (string-match "\n$" string)
-           (setq string (concat string "\n"))
-           (when (erc-string-invisible-p string)
-             (erc-put-text-properties 0 (length string)
-                                      '(invisible intangible) string)))
-         (erc-log (concat "erc-display-line: " string
-                          (format "(%S)" string) " in buffer "
-                          (format "%s" buffer)))
-         (setq erc-insert-this t)
-         (run-hook-with-args 'erc-insert-pre-hook string)
-         (if (null erc-insert-this)
-             ;; Leave erc-insert-this set to t as much as possible.  Fran
-             ;; Litterio <franl> has seen erc-insert-this set to nil while
-             ;; erc-send-pre-hook is running, which should never happen.  This
-             ;; may cure it.
-             (setq erc-insert-this t)
-           (save-excursion ;; to restore point in the new buffer
-             (save-restriction
-               (widen)
-               (goto-char insert-position)
-               (insert-before-markers string)
-               ;; run insertion hook, with point at restored location
-               (save-restriction
-                 (narrow-to-region insert-position (point))
-                 (run-hooks 'erc-insert-modify-hook)
-                 (run-hooks 'erc-insert-post-hook)
-                 (when erc-remove-parsed-property
-                   (remove-text-properties (point-min) (point-max)
-                                           '(erc-parsed nil))))))))
-       (erc-update-undo-list (- (or (marker-position erc-insert-marker)
-                                    (point-max))
-                                insert-position))))))
+                                 (point-max))))
+        (let ((string string) ;; FIXME! Can this be removed?
+              (buffer-undo-list t)
+              (inhibit-read-only t))
+          (unless (string-match "\n$" string)
+            (setq string (concat string "\n"))
+            (when (erc-string-invisible-p string)
+              (erc-put-text-properties 0 (length string)
+                                       '(invisible intangible) string)))
+          (erc-log (concat "erc-display-line: " string
+                           (format "(%S)" string) " in buffer "
+                           (format "%s" buffer)))
+          (setq erc-insert-this t)
+          (run-hook-with-args 'erc-insert-pre-hook string)
+          (if (null erc-insert-this)
+              ;; Leave erc-insert-this set to t as much as possible.  Fran
+              ;; Litterio <franl> has seen erc-insert-this set to nil while
+              ;; erc-send-pre-hook is running, which should never happen.  This
+              ;; may cure it.
+              (setq erc-insert-this t)
+            (save-excursion ;; to restore point in the new buffer
+              (save-restriction
+                (widen)
+                (goto-char insert-position)
+                (insert-before-markers string)
+                ;; run insertion hook, with point at restored location
+                (save-restriction
+                  (narrow-to-region insert-position (point))
+                  (run-hooks 'erc-insert-modify-hook)
+                  (run-hooks 'erc-insert-post-hook)
+                  (when erc-remove-parsed-property
+                    (remove-text-properties (point-min) (point-max)
+                                            '(erc-parsed nil))))))))
+        (erc-update-undo-list (- (or (marker-position erc-insert-marker)
+                                     (point-max))
+                                 insert-position))))))
 
 (defun erc-update-undo-list (shift)
   ;; Translate buffer positions in buffer-undo-list by SHIFT.
   (unless (or (zerop shift) (atom buffer-undo-list))
     (let ((list buffer-undo-list) elt)
       (while list
-       (setq elt (car list))
-       (cond ((integerp elt)           ; POSITION
-              (cl-incf (car list) shift))
-             ((or (atom elt)           ; nil, EXTENT
-                  ;; (eq t (car elt))  ; (t . TIME)
-                  (markerp (car elt))) ; (MARKER . DISTANCE)
-              nil)
-             ((integerp (car elt))     ; (BEGIN . END)
-              (cl-incf (car elt) shift)
-              (cl-incf (cdr elt) shift))
-             ((stringp (car elt))      ; (TEXT . POSITION)
-              (cl-incf (cdr elt) (* (if (natnump (cdr elt)) 1 -1) shift)))
-             ((null (car elt))         ; (nil PROPERTY VALUE BEG . END)
-              (let ((cons (nthcdr 3 elt)))
-                (cl-incf (car cons) shift)
-                (cl-incf (cdr cons) shift)))
-             ((and (featurep 'xemacs)
-                   (extentp (car elt))) ; (EXTENT START END)
-              (cl-incf (nth 1 elt) shift)
-              (cl-incf (nth 2 elt) shift)))
-       (setq list (cdr list))))))
+        (setq elt (car list))
+        (cond ((integerp elt)           ; POSITION
+               (cl-incf (car list) shift))
+              ((or (atom elt)           ; nil, EXTENT
+                   ;; (eq t (car elt))  ; (t . TIME)
+                   (markerp (car elt))) ; (MARKER . DISTANCE)
+               nil)
+              ((integerp (car elt))     ; (BEGIN . END)
+               (cl-incf (car elt) shift)
+               (cl-incf (cdr elt) shift))
+              ((stringp (car elt))      ; (TEXT . POSITION)
+               (cl-incf (cdr elt) (* (if (natnump (cdr elt)) 1 -1) shift)))
+              ((null (car elt))         ; (nil PROPERTY VALUE BEG . END)
+               (let ((cons (nthcdr 3 elt)))
+                 (cl-incf (car cons) shift)
+                 (cl-incf (cdr cons) shift)))
+              ((and (featurep 'xemacs)
+                    (extentp (car elt))) ; (EXTENT START END)
+               (cl-incf (nth 1 elt) shift)
+               (cl-incf (nth 2 elt) shift)))
+        (setq list (cdr list))))))
 
 (defvar erc-valid-nick-regexp "[]a-zA-Z^[;\\`_{}|][]^[;\\`_{}|a-zA-Z0-9-]*"
   "Regexp which matches all valid characters in a IRC nickname.")
@@ -2376,41 +2415,41 @@ buffer is used.  `erc-display-line-1' is used to display STRING.
 
 If STRING is nil, the function does nothing."
   (let ((inhibit-point-motion-hooks t)
-       new-bufs)
+        new-bufs)
     (dolist (buf (cond
-                 ((bufferp buffer) (list buffer))
-                 ((listp buffer) buffer)
-                 ((processp buffer) (list (process-buffer buffer)))
-                 ((eq 'all buffer)
-                  ;; Hmm, or all of the same session server?
-                  (erc-buffer-list nil erc-server-process))
-                 ((and (eq 'active buffer) (erc-active-buffer))
-                  (list (erc-active-buffer)))
-                 ((erc-server-buffer-live-p)
-                  (list (process-buffer erc-server-process)))
-                 (t (list (current-buffer)))))
+                  ((bufferp buffer) (list buffer))
+                  ((listp buffer) buffer)
+                  ((processp buffer) (list (process-buffer buffer)))
+                  ((eq 'all buffer)
+                   ;; Hmm, or all of the same session server?
+                   (erc-buffer-list nil erc-server-process))
+                  ((and (eq 'active buffer) (erc-active-buffer))
+                   (list (erc-active-buffer)))
+                  ((erc-server-buffer-live-p)
+                   (list (process-buffer erc-server-process)))
+                  (t (list (current-buffer)))))
       (when (buffer-live-p buf)
-       (erc-display-line-1 string buf)
-       (push buf new-bufs)))
+        (erc-display-line-1 string buf)
+        (push buf new-bufs)))
     (when (null new-bufs)
       (erc-display-line-1 string (if (erc-server-buffer-live-p)
-                                    (process-buffer erc-server-process)
-                                  (current-buffer))))))
+                                     (process-buffer erc-server-process)
+                                   (current-buffer))))))
 
 (defun erc-display-message-highlight (type string)
   "Highlight STRING according to TYPE, where erc-TYPE-face is an ERC face.
 
 See also `erc-make-notice'."
   (cond ((eq type 'notice)
-        (erc-make-notice string))
-       (t
-        (erc-put-text-property
-         0 (length string)
-         'face (or (intern-soft
-                    (concat "erc-" (symbol-name type) "-face"))
-                   "erc-default-face")
-         string)
-        string)))
+         (erc-make-notice string))
+        (t
+         (erc-put-text-property
+          0 (length string)
+          'face (or (intern-soft
+                     (concat "erc-" (symbol-name type) "-face"))
+                    "erc-default-face")
+          string)
+         string)))
 
 (defvar erc-lurker-state nil
   "Track the time of the last PRIVMSG for each (server,nick) pair.
@@ -2487,15 +2526,15 @@ consumption for long-lived IRC or Emacs sessions."
    (lambda (server hash)
      (maphash
       (lambda (nick last-PRIVMSG-time)
-       (when
-           (> (float-time (time-subtract
-                           (current-time)
-                           last-PRIVMSG-time))
-              erc-lurker-threshold-time)
-         (remhash nick hash)))
+        (when
+            (> (float-time (time-subtract
+                            (current-time)
+                            last-PRIVMSG-time))
+               erc-lurker-threshold-time)
+          (remhash nick hash)))
       hash)
      (if (zerop (hash-table-count hash))
-        (remhash server erc-lurker-state)))
+         (remhash server erc-lurker-state)))
    erc-lurker-state))
 
 (defvar erc-lurker-cleanup-count 0
@@ -2535,7 +2574,7 @@ updates of `erc-lurker-state'."
             (erc-canonicalize-server-name erc-server-announced-name)))
       (when (equal command "PRIVMSG")
         (when (>= (cl-incf erc-lurker-cleanup-count)
-                 erc-lurker-cleanup-interval)
+                  erc-lurker-cleanup-interval)
           (setq erc-lurker-cleanup-count 0)
           (erc-lurker-cleanup))
         (unless (gethash server erc-lurker-state)
@@ -2550,14 +2589,14 @@ Lurking is the condition where NICK has issued no PRIVMSG on this
 server within `erc-lurker-threshold-time'.  See also
 `erc-lurker-trim-nicks' and `erc-lurker-ignore-chars'."
   (unless erc-lurker-state (erc-lurker-initialize))
-    (let* ((server
-           (erc-canonicalize-server-name erc-server-announced-name))
-          (last-PRIVMSG-time
-           (gethash (erc-lurker-maybe-trim nick)
-                    (gethash server erc-lurker-state (make-hash-table)))))
-      (or (null last-PRIVMSG-time)
-         (> (float-time
-             (time-subtract (current-time) last-PRIVMSG-time))
+  (let* ((server
+          (erc-canonicalize-server-name erc-server-announced-name))
+         (last-PRIVMSG-time
+          (gethash (erc-lurker-maybe-trim nick)
+                   (gethash server erc-lurker-state (make-hash-table)))))
+    (or (null last-PRIVMSG-time)
+        (> (float-time
+            (time-subtract (current-time) last-PRIVMSG-time))
            erc-lurker-threshold-time))))
 
 (defcustom erc-common-server-suffixes
@@ -2577,8 +2616,8 @@ otherwise `erc-server-announced-name'.  SERVER is matched against
 `erc-common-server-suffixes'."
   (when server
     (or (cdar (erc-remove-if-not
-              (lambda (net) (string-match (car net) server))
-              erc-common-server-suffixes))
+               (lambda (net) (string-match (car net) server))
+               erc-common-server-suffixes))
         erc-server-announced-name)))
 
 (defun erc-hide-current-message-p (parsed)
@@ -2599,27 +2638,27 @@ ARGS, PARSED, and TYPE are used to format MSG sensibly.
 
 See also `erc-format-message' and `erc-display-line'."
   (let ((string (if (symbolp msg)
-                   (apply 'erc-format-message msg args)
-                 msg)))
+                    (apply 'erc-format-message msg args)
+                  msg)))
     (setq string
-         (cond
-          ((null type)
-           string)
-          ((listp type)
-           (mapc (lambda (type)
-                   (setq string
-                         (erc-display-message-highlight type string)))
-                 type)
-           string)
-          ((symbolp type)
-           (erc-display-message-highlight type string))))
+          (cond
+           ((null type)
+            string)
+           ((listp type)
+            (mapc (lambda (type)
+                    (setq string
+                          (erc-display-message-highlight type string)))
+                  type)
+            string)
+           ((symbolp type)
+            (erc-display-message-highlight type string))))
 
     (if (not (erc-response-p parsed))
-       (erc-display-line string buffer)
+        (erc-display-line string buffer)
       (unless (erc-hide-current-message-p parsed)
-       (erc-put-text-property 0 (length string) 'erc-parsed parsed string)
-       (erc-put-text-property 0 (length string) 'rear-sticky t string)
-       (erc-display-line string buffer)))))
+        (erc-put-text-property 0 (length string) 'erc-parsed parsed string)
+        (erc-put-text-property 0 (length string) 'rear-sticky t string)
+        (erc-display-line string buffer)))))
 
 (defun erc-message-type-member (position list)
   "Return non-nil if the erc-parsed text-property at POSITION is in LIST.
@@ -2637,19 +2676,19 @@ present."
 
 See also `erc-server-send'."
   (setq line (format "PRIVMSG %s :%s"
-                    target
-                    ;; If the line is empty, we still want to
-                    ;; send it - i.e. an empty pasted line.
-                    (if (string= line "\n")
-                        " \n"
-                      line)))
+                     target
+                     ;; If the line is empty, we still want to
+                     ;; send it - i.e. an empty pasted line.
+                     (if (string= line "\n")
+                         " \n"
+                       line)))
   (erc-server-send line force target))
 
 (defun erc-get-arglist (fun)
   "Return the argument list of a function without the parens."
   (let ((arglist (format "%S" (erc-function-arglist fun))))
     (if (string-match "^(\\(.*\\))$" arglist)
-       (match-string 1 arglist)
+        (match-string 1 arglist)
       arglist)))
 
 (defun erc-command-no-process-p (str)
@@ -2657,15 +2696,15 @@ See also `erc-server-send'."
 is not alive, nil otherwise."
   (let ((fun (erc-extract-command-from-line str)))
     (and fun
-        (symbolp (car fun))
-        (get (car fun) 'process-not-needed))))
+         (symbolp (car fun))
+         (get (car fun) 'process-not-needed))))
 
 (defun erc-command-name (cmd)
   "For CMD being the function name of a ERC command, something like
 erc-cmd-FOO, this returns a string /FOO."
   (let ((command-name (symbol-name cmd)))
     (if (string-match "^erc-cmd-\\(.*\\)$" command-name)
-       (concat "/" (match-string 1 command-name))
+        (concat "/" (match-string 1 command-name))
       command-name)))
 
 (defun erc-process-input-line (line &optional force no-command)
@@ -2681,30 +2720,30 @@ An optional FORCE argument forces sending the line when flood
 protection is in effect.  The optional NO-COMMAND argument prohibits
 this function from interpreting the line as a command."
   (let ((command-list (erc-extract-command-from-line line)))
-    (if        (and command-list
-            (not no-command))
-       (let* ((cmd  (nth 0 command-list))
-              (args (nth 1 command-list)))
-         (condition-case nil
-             (if (listp args)
-                 (apply cmd args)
-               (funcall cmd args))
-           (wrong-number-of-arguments
-            (erc-display-message nil 'error (current-buffer) 'incorrect-args
-                                 ?c (erc-command-name cmd)
-                                 ?u (or (erc-get-arglist cmd)
-                                        "")
-                                 ?d (format "%s\n"
-                                            (or (documentation cmd) "")))
-            nil)))
+    (if (and command-list
+             (not no-command))
+        (let* ((cmd  (nth 0 command-list))
+               (args (nth 1 command-list)))
+          (condition-case nil
+              (if (listp args)
+                  (apply cmd args)
+                (funcall cmd args))
+            (wrong-number-of-arguments
+             (erc-display-message nil 'error (current-buffer) 'incorrect-args
+                                  ?c (erc-command-name cmd)
+                                  ?u (or (erc-get-arglist cmd)
+                                         "")
+                                  ?d (format "%s\n"
+                                             (or (documentation cmd) "")))
+             nil)))
       (let ((r (erc-default-target)))
-       (if r
-           (funcall erc-send-input-line-function r line force)
-         (erc-display-message nil 'error (current-buffer) 'no-target)
-         nil)))))
+        (if r
+            (funcall erc-send-input-line-function r line force)
+          (erc-display-message nil 'error (current-buffer) 'no-target)
+          nil)))))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;                   Input commands handlers
+;;                    Input commands handlers
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (defun erc-cmd-AMSG (line)
@@ -2712,9 +2751,9 @@ this function from interpreting the line as a command."
   (interactive "sSend to all channels you're on: ")
   (setq line (erc-trim-string line))
   (erc-with-all-buffers-of-server nil
-   (lambda ()
-     (erc-channel-p (erc-default-target)))
-   (erc-send-message line)))
+    (lambda ()
+      (erc-channel-p (erc-default-target)))
+    (erc-send-message line)))
 (put 'erc-cmd-AMSG 'do-not-parse-args t)
 
 (defun erc-cmd-SAY (line)
@@ -2735,36 +2774,37 @@ VALUE is computed by evaluating the rest of LINE in Lisp."
   (cond
    ((string-match "^\\s-*\\(\\S-+\\)\\s-+\\(.*\\)$" line)
     (let ((var (read (concat "erc-" (match-string 1 line))))
-         (val (read (match-string 2 line))))
+          (val (read (match-string 2 line))))
       (if (boundp var)
-         (progn
-           (set var (eval val))
-           (erc-display-message
-            nil nil 'active (format "Set %S to %S" var val))
-           t)
-       (setq var (read (match-string 1 line)))
-       (if (boundp var)
-           (progn
-             (set var (eval val))
-             (erc-display-message
-              nil nil 'active (format "Set %S to %S" var val))
-             t)
-         (erc-display-message nil 'error 'active 'variable-not-bound)
-         nil))))
+          (progn
+            (set var (eval val))
+            (erc-display-message
+             nil nil 'active (format "Set %S to %S" var val))
+            t)
+        (setq var (read (match-string 1 line)))
+        (if (boundp var)
+            (progn
+              (set var (eval val))
+              (erc-display-message
+               nil nil 'active (format "Set %S to %S" var val))
+              t)
+          (erc-display-message nil 'error 'active 'variable-not-bound)
+          nil))))
    ((string-match "^\\s-*$" line)
     (erc-display-line
      (concat "Available user variables:\n"
-            (apply
-             'concat
-             (mapcar
-              (lambda (var)
-                (let ((val (symbol-value var)))
-                  (concat (format "%S:" var)
-                          (if (consp val)
-                              (concat "\n" (pp-to-string val))
-                            (format " %S\n" val)))))
-              (apropos-internal "^erc-" 'custom-variable-p))))
-     (current-buffer)) t)
+             (apply
+              'concat
+              (mapcar
+               (lambda (var)
+                 (let ((val (symbol-value var)))
+                   (concat (format "%S:" var)
+                           (if (consp val)
+                               (concat "\n" (pp-to-string val))
+                             (format " %S\n" val)))))
+               (apropos-internal "^erc-" 'custom-variable-p))))
+     (current-buffer))
+    t)
    (t nil)))
 (defalias 'erc-cmd-VAR 'erc-cmd-SET)
 (defalias 'erc-cmd-VARIABLE 'erc-cmd-SET)
@@ -2786,42 +2826,42 @@ therefore has to contain the command itself as well."
 If no USER argument is specified, list the contents of `erc-ignore-list'."
   (if user
       (let ((quoted (regexp-quote user)))
-       (when (and (not (string= user quoted))
-                  (y-or-n-p (format "Use regexp-quoted form (%s) instead? "
-                                    quoted)))
-         (setq user quoted))
-       (erc-display-line
-        (erc-make-notice (format "Now ignoring %s" user))
-        'active)
-       (erc-with-server-buffer (add-to-list 'erc-ignore-list user)))
+        (when (and (not (string= user quoted))
+                   (y-or-n-p (format "Use regexp-quoted form (%s) instead? "
+                                     quoted)))
+          (setq user quoted))
+        (erc-display-line
+         (erc-make-notice (format "Now ignoring %s" user))
+         'active)
+        (erc-with-server-buffer (add-to-list 'erc-ignore-list user)))
     (if (null (erc-with-server-buffer erc-ignore-list))
-       (erc-display-line (erc-make-notice "Ignore list is empty") 'active)
+        (erc-display-line (erc-make-notice "Ignore list is empty") 'active)
       (erc-display-line (erc-make-notice "Ignore list:") 'active)
       (mapc #'(lambda (item)
-               (erc-display-line (erc-make-notice item)
-                                 'active))
-           (erc-with-server-buffer erc-ignore-list))))
+                (erc-display-line (erc-make-notice item)
+                                  'active))
+            (erc-with-server-buffer erc-ignore-list))))
   t)
 
 (defun erc-cmd-UNIGNORE (user)
   "Remove the user specified in USER from the ignore list."
   (let ((ignored-nick (car (erc-with-server-buffer
-                            (erc-member-ignore-case (regexp-quote user)
-                                                    erc-ignore-list)))))
+                             (erc-member-ignore-case (regexp-quote user)
+                                                     erc-ignore-list)))))
     (unless ignored-nick
       (if (setq ignored-nick (erc-ignored-user-p user))
-         (unless (y-or-n-p (format "Remove this regexp (%s)? "
-                                   ignored-nick))
-           (setq ignored-nick nil))
-       (erc-display-line
-        (erc-make-notice (format "%s is not currently ignored!" user))
-        'active)))
+          (unless (y-or-n-p (format "Remove this regexp (%s)? "
+                                    ignored-nick))
+            (setq ignored-nick nil))
+        (erc-display-line
+         (erc-make-notice (format "%s is not currently ignored!" user))
+         'active)))
     (when ignored-nick
       (erc-display-line
        (erc-make-notice (format "No longer ignoring %s" user))
        'active)
       (erc-with-server-buffer
-       (setq erc-ignore-list (delete ignored-nick erc-ignore-list)))))
+        (setq erc-ignore-list (delete ignored-nick erc-ignore-list)))))
   t)
 
 (defun erc-cmd-CLEAR ()
@@ -2835,20 +2875,20 @@ If no USER argument is specified, list the contents of `erc-ignore-list'."
   (interactive)
   (let ((ops nil))
     (if erc-channel-users
-       (maphash (lambda (_nick user-data)
-                  (let ((cuser (cdr user-data)))
-                    (if (and cuser
-                             (erc-channel-user-op cuser))
-                        (setq ops (cons (erc-server-user-nickname
-                                         (car user-data))
-                                        ops)))))
-                erc-channel-users))
+        (maphash (lambda (_nick user-data)
+                   (let ((cuser (cdr user-data)))
+                     (if (and cuser
+                              (erc-channel-user-op cuser))
+                         (setq ops (cons (erc-server-user-nickname
+                                          (car user-data))
+                                         ops)))))
+                 erc-channel-users))
     (setq ops (sort ops 'string-lessp))
     (if ops
-       (erc-display-message
-        nil 'notice (current-buffer) 'ops
-        ?i (length ops) ?s (if (> (length ops) 1) "s" "")
-        ?o (mapconcat 'identity ops " "))
+        (erc-display-message
+         nil 'notice (current-buffer) 'ops
+         ?i (length ops) ?s (if (> (length ops) 1) "s" "")
+         ?o (mapconcat 'identity ops " "))
       (erc-display-message nil 'notice (current-buffer) 'ops-none)))
   t)
 
@@ -2857,11 +2897,11 @@ If no USER argument is specified, list the contents of `erc-ignore-list'."
   (require 'mail-extr)
   (let ((co (ignore-errors (what-domain tld))))
     (if co
-       (erc-display-message
-        nil 'notice 'active 'country ?c co ?d tld)
+        (erc-display-message
+         nil 'notice 'active 'country ?c co ?d tld)
       (erc-display-message
        nil 'notice 'active 'country-unknown ?d tld))
-  t))
+    t))
 (put 'erc-cmd-COUNTRY 'process-not-needed t)
 
 (defun erc-cmd-AWAY (line)
@@ -2872,8 +2912,8 @@ If no reason is given, unset away status."
       (erc-log (format "cmd: AWAY: %s" reason))
       (erc-server-send
        (if (string= reason "")
-          "AWAY"
-        (concat "AWAY :" reason))))
+           "AWAY"
+         (concat "AWAY :" reason))))
     t))
 (put 'erc-cmd-AWAY 'do-not-parse-args t)
 
@@ -2891,8 +2931,8 @@ If no reason is given, unset away status."
 CMD is the CTCP command, possible values being ECHO, FINGER, CLIENTINFO, TIME,
 VERSION and so on.  It is called with ARGS."
   (let ((str (concat cmd
-                    (when args
-                      (concat " " (mapconcat #'identity args " "))))))
+                     (when args
+                       (concat " " (mapconcat #'identity args " "))))))
     (erc-log (format "cmd: CTCP [%s]: [%s]" nick str))
     (erc-send-ctcp-message nick str)
     t))
@@ -2915,29 +2955,29 @@ For help about the WHOIS command, do:
 For a list of user commands (/join /part, ...):
   /help."
   (if func
-    (let* ((sym (or (let ((sym (intern-soft
-                               (concat "erc-cmd-" (upcase func)))))
-                     (if (and sym (or (boundp sym) (fboundp sym)))
-                         sym
-                       nil))
-                   (let ((sym (intern-soft func)))
-                     (if (and sym (or (boundp sym) (fboundp sym)))
-                         sym
-                       nil))
-                   (let ((sym (intern-soft (concat "erc-" func))))
-                     (if (and sym (or (boundp sym) (fboundp sym)))
-                         sym
-                       nil)))))
-      (if sym
-         (cond
-          ((boundp sym) (describe-variable sym))
-          ((fboundp sym) (describe-function sym))
-          (t nil))
-       (apropos-command (concat "erc-.*" func) nil
-                        (lambda (x)
-                          (or (commandp x)
-                              (get x 'custom-type))))
-       t))
+      (let* ((sym (or (let ((sym (intern-soft
+                                  (concat "erc-cmd-" (upcase func)))))
+                        (if (and sym (or (boundp sym) (fboundp sym)))
+                            sym
+                          nil))
+                      (let ((sym (intern-soft func)))
+                        (if (and sym (or (boundp sym) (fboundp sym)))
+                            sym
+                          nil))
+                      (let ((sym (intern-soft (concat "erc-" func))))
+                        (if (and sym (or (boundp sym) (fboundp sym)))
+                            sym
+                          nil)))))
+        (if sym
+            (cond
+             ((boundp sym) (describe-variable sym))
+             ((fboundp sym) (describe-function sym))
+             (t nil))
+          (apropos-command (concat "erc-.*" func) nil
+                           (lambda (x)
+                             (or (commandp x)
+                                 (get x 'custom-type))))
+          t))
     (apropos "erc-cmd-")
     (message "Type C-h m to get additional information about keybindings.")
     t))
@@ -2951,23 +2991,23 @@ If CHANNEL is specified as \"-invite\", join the channel to which you
 were most recently invited.  See also `invitation'."
   (let (chnl)
     (if (string= (upcase channel) "-INVITE")
-       (if erc-invitation
-           (setq chnl erc-invitation)
-         (erc-display-message nil 'error (current-buffer) 'no-invitation))
+        (if erc-invitation
+            (setq chnl erc-invitation)
+          (erc-display-message nil 'error (current-buffer) 'no-invitation))
       (setq chnl (erc-ensure-channel-name channel)))
     (when chnl
       ;; Prevent double joining of same channel on same server.
       (let ((joined-channels
-            (mapcar #'(lambda (chanbuf)
-                        (with-current-buffer chanbuf (erc-default-target)))
-                    (erc-channel-list erc-server-process))))
-       (if (erc-member-ignore-case chnl joined-channels)
-           (switch-to-buffer (car (erc-member-ignore-case chnl
-                                                          joined-channels)))
-         (erc-log (format "cmd: JOIN: %s" chnl))
-         (erc-server-send (if (and chnl key)
-                              (format "JOIN %s %s" chnl key)
-                            (format "JOIN %s" chnl)))))))
+             (mapcar #'(lambda (chanbuf)
+                         (with-current-buffer chanbuf (erc-default-target)))
+                     (erc-channel-list erc-server-process))))
+        (if (erc-member-ignore-case chnl joined-channels)
+            (switch-to-buffer (car (erc-member-ignore-case chnl
+                                                           joined-channels)))
+          (erc-log (format "cmd: JOIN: %s" chnl))
+          (erc-server-send (if (and chnl key)
+                               (format "JOIN %s %s" chnl key)
+                             (format "JOIN %s" chnl)))))))
   t)
 
 (defalias 'erc-cmd-CHANNEL 'erc-cmd-JOIN)
@@ -2986,14 +3026,14 @@ If CHANNEL is not specified, display the users in the current channel.
 This function clears the channel name list first, then sends the
 command."
   (let ((tgt (or (and (erc-channel-p channel) channel)
-                (erc-default-target))))
+                 (erc-default-target))))
     (if (and tgt (erc-channel-p tgt))
-       (progn
-         (erc-log (format "cmd: DEFAULT: NAMES %s" tgt))
-         (erc-with-buffer
-          (tgt)
-          (erc-channel-begin-receiving-names))
-         (erc-server-send (concat "NAMES " tgt)))
+        (progn
+          (erc-log (format "cmd: DEFAULT: NAMES %s" tgt))
+          (erc-with-buffer
+              (tgt)
+            (erc-channel-begin-receiving-names))
+          (erc-server-send (concat "NAMES " tgt)))
       (erc-display-message nil 'error (current-buffer) 'no-default-channel)))
   t)
 (defalias 'erc-cmd-N 'erc-cmd-NAMES)
@@ -3003,27 +3043,27 @@ command."
 LINE has the format: \"#CHANNEL NICK REASON\" or \"NICK REASON\"."
   (let ((reasonstring (mapconcat 'identity reasonwords " ")))
     (if (string= "" reasonstring)
-       (setq reasonstring (format "Kicked by %s" (erc-current-nick))))
+        (setq reasonstring (format "Kicked by %s" (erc-current-nick))))
     (if (erc-channel-p target)
-       (let ((nick reason-or-nick))
-         (erc-log (format "cmd: KICK: %s/%s: %s" nick target reasonstring))
-         (erc-server-send (format "KICK %s %s :%s" target nick reasonstring)
-                          nil target)
-         t)
+        (let ((nick reason-or-nick))
+          (erc-log (format "cmd: KICK: %s/%s: %s" nick target reasonstring))
+          (erc-server-send (format "KICK %s %s :%s" target nick reasonstring)
+                           nil target)
+          t)
       (when target
-       (let ((ch (erc-default-target)))
-         (setq reasonstring (concat
-                             (if reason-or-nick (concat reason-or-nick " "))
-                             reasonstring))
-         (if ch
-             (progn
-               (erc-log
-                (format "cmd: KICK: %s/%s: %s" target ch reasonstring))
-               (erc-server-send
-                (format "KICK %s %s :%s" ch target reasonstring) nil ch))
-           (erc-display-message nil 'error (current-buffer)
-                                'no-default-channel))
-         t)))))
+        (let ((ch (erc-default-target)))
+          (setq reasonstring (concat
+                              (if reason-or-nick (concat reason-or-nick " "))
+                              reasonstring))
+          (if ch
+              (progn
+                (erc-log
+                 (format "cmd: KICK: %s/%s: %s" target ch reasonstring))
+                (erc-server-send
+                 (format "KICK %s %s :%s" ch target reasonstring) nil ch))
+            (erc-display-message nil 'error (current-buffer)
+                                 'no-default-channel))
+          t)))))
 
 (defvar erc-script-args nil)
 
@@ -3038,20 +3078,20 @@ a script after exceeding the flood threshold."
   (cond
    ((string-match "^\\s-*\\(\\S-+\\)\\(.*\\)$" line)
     (let* ((file-to-find (match-string 1 line))
-          (erc-script-args (match-string 2 line))
-          (file (erc-find-file file-to-find erc-script-path)))
+           (erc-script-args (match-string 2 line))
+           (file (erc-find-file file-to-find erc-script-path)))
       (erc-log (format "cmd: LOAD: %s" file-to-find))
       (cond
        ((not file)
-       (erc-display-message nil 'error (current-buffer)
-                            'cannot-find-file ?f file-to-find))
+        (erc-display-message nil 'error (current-buffer)
+                             'cannot-find-file ?f file-to-find))
        ((not (file-readable-p file))
-       (erc-display-message nil 'error (current-buffer)
-                            'cannot-read-file ?f file))
+        (erc-display-message nil 'error (current-buffer)
+                             'cannot-read-file ?f file))
        (t
-       (message "Loading \'%s\'..." file)
-       (erc-load-script file)
-       (message "Loading \'%s\'...done" file))))
+        (message "Loading \'%s\'..." file)
+        (erc-load-script file)
+        (message "Loading \'%s\'...done" file))))
     t)
    (t nil)))
 
@@ -3061,11 +3101,11 @@ a script after exceeding the flood threshold."
 If SERVER is non-nil, use that, rather than the current server."
   ;; FIXME: is the above docstring correct?  -- Lawrence 2004-01-08
   (let ((send (if server
-                 (format "WHOIS %s %s" user server)
-               (format "WHOIS %s" user))))
+                  (format "WHOIS %s %s" user server)
+                (format "WHOIS %s" user))))
     (erc-log (format "cmd: %s" send))
     (erc-server-send send)
-  t))
+    t))
 (defalias 'erc-cmd-WI 'erc-cmd-WHOIS)
 
 (defun erc-cmd-WHOAMI ()
@@ -3076,78 +3116,78 @@ If SERVER is non-nil, use that, rather than the current server."
 (defun erc-cmd-IDLE (nick)
   "Show the length of time NICK has been idle."
   (let ((origbuf (current-buffer))
-       symlist)
+        symlist)
     (erc-with-server-buffer
-     (push (cons (erc-once-with-server-event
-                 311 (lambda (_proc parsed)
-                       (string= nick
-                                (nth 1 (erc-response.command-args
-                                        parsed)))))
-                'erc-server-311-functions)
-          symlist)
-     (push (cons (erc-once-with-server-event
-                 312 (lambda (_proc parsed)
-                       (string= nick
-                                (nth 1 (erc-response.command-args
-                                        parsed)))))
-                'erc-server-312-functions)
-          symlist)
-     (push (cons (erc-once-with-server-event
-                 318 (lambda (_proc parsed)
-                       (string= nick
-                                (nth 1 (erc-response.command-args
-                                        parsed)))))
-                'erc-server-318-functions)
-          symlist)
-     (push (cons (erc-once-with-server-event
-                 319 (lambda (_proc parsed)
-                       (string= nick
-                                (nth 1 (erc-response.command-args
-                                        parsed)))))
-                'erc-server-319-functions)
-          symlist)
-     (push (cons (erc-once-with-server-event
-                 320 (lambda (_proc parsed)
-                       (string= nick
-                                (nth 1 (erc-response.command-args
-                                        parsed)))))
-                'erc-server-320-functions)
-          symlist)
-     (push (cons (erc-once-with-server-event
-                 330 (lambda (_proc parsed)
-                       (string= nick
-                                (nth 1 (erc-response.command-args
-                                        parsed)))))
-                'erc-server-330-functions)
-          symlist)
-     (push (cons (erc-once-with-server-event
-                 317
-                 (lambda (_proc parsed)
-                   (let ((idleseconds
-                          (string-to-number
-                           (cl-third
-                            (erc-response.command-args parsed)))))
-                     (erc-display-line
-                      (erc-make-notice
-                       (format "%s has been idle for %s."
-                               (erc-string-no-properties nick)
-                               (erc-seconds-to-string idleseconds)))
-                      origbuf)
-                     t)))
-                'erc-server-317-functions)
-          symlist)
-
-     ;; Send the WHOIS command.
-     (erc-cmd-WHOIS nick)
-
-     ;; Remove the uninterned symbols from the server hooks that did not run.
-     (run-at-time 20 nil (lambda (buf symlist)
-                          (with-current-buffer buf
-                            (dolist (sym symlist)
-                              (let ((hooksym (cdr sym))
-                                    (funcsym (car sym)))
-                                (remove-hook hooksym funcsym t)))))
-                 (current-buffer) symlist)))
+      (push (cons (erc-once-with-server-event
+                   311 (lambda (_proc parsed)
+                         (string= nick
+                                  (nth 1 (erc-response.command-args
+                                          parsed)))))
+                  'erc-server-311-functions)
+            symlist)
+      (push (cons (erc-once-with-server-event
+                   312 (lambda (_proc parsed)
+                         (string= nick
+                                  (nth 1 (erc-response.command-args
+                                          parsed)))))
+                  'erc-server-312-functions)
+            symlist)
+      (push (cons (erc-once-with-server-event
+                   318 (lambda (_proc parsed)
+                         (string= nick
+                                  (nth 1 (erc-response.command-args
+                                          parsed)))))
+                  'erc-server-318-functions)
+            symlist)
+      (push (cons (erc-once-with-server-event
+                   319 (lambda (_proc parsed)
+                         (string= nick
+                                  (nth 1 (erc-response.command-args
+                                          parsed)))))
+                  'erc-server-319-functions)
+            symlist)
+      (push (cons (erc-once-with-server-event
+                   320 (lambda (_proc parsed)
+                         (string= nick
+                                  (nth 1 (erc-response.command-args
+                                          parsed)))))
+                  'erc-server-320-functions)
+            symlist)
+      (push (cons (erc-once-with-server-event
+                   330 (lambda (_proc parsed)
+                         (string= nick
+                                  (nth 1 (erc-response.command-args
+                                          parsed)))))
+                  'erc-server-330-functions)
+            symlist)
+      (push (cons (erc-once-with-server-event
+                   317
+                   (lambda (_proc parsed)
+                     (let ((idleseconds
+                            (string-to-number
+                             (cl-third
+                              (erc-response.command-args parsed)))))
+                       (erc-display-line
+                        (erc-make-notice
+                         (format "%s has been idle for %s."
+                                 (erc-string-no-properties nick)
+                                 (erc-seconds-to-string idleseconds)))
+                        origbuf)
+                       t)))
+                  'erc-server-317-functions)
+            symlist)
+
+      ;; Send the WHOIS command.
+      (erc-cmd-WHOIS nick)
+
+      ;; Remove the uninterned symbols from the server hooks that did not run.
+      (run-at-time 20 nil (lambda (buf symlist)
+                            (with-current-buffer buf
+                              (dolist (sym symlist)
+                                (let ((hooksym (cdr sym))
+                                      (funcsym (car sym)))
+                                  (remove-hook hooksym funcsym t)))))
+                   (current-buffer) symlist)))
   t)
 
 (defun erc-cmd-DESCRIBE (line)
@@ -3157,7 +3197,7 @@ LINE has the format \"USER ACTION\"."
    ((string-match
      "^\\s-*\\(\\S-+\\)\\s-\\(.*\\)$" line)
     (let ((dst (match-string 1 line))
-         (s (match-string 2 line)))
+          (s (match-string 2 line)))
       (erc-log (format "cmd: DESCRIBE: [%s] %s" dst s))
       (erc-send-action dst s))
     t)
@@ -3203,7 +3243,7 @@ See also `erc-message' and `erc-display-line'."
   (erc-message "PRIVMSG" (concat (erc-default-target) " " line) force)
   (erc-display-line
    (concat (erc-format-my-nick) line)
-     (current-buffer))
+   (current-buffer))
   ;; FIXME - treat multiline, run hooks, or remove me?
   t)
 
@@ -3229,7 +3269,7 @@ URL `http://freenode.net/using_the_network.shtml'."
   "Send a notice to the channel or user given as the first word.
 The rest is the message to send."
   (erc-message "NOTICE" (concat channel-or-user " "
-                               (mapconcat #'identity message " "))))
+                                (mapconcat #'identity message " "))))
 
 (defun erc-cmd-MSG (line)
   "Send a message to the channel or user given as the first word in LINE.
@@ -3250,16 +3290,16 @@ The rest of LINE is the message to send."
   "Change current nickname to NICK."
   (erc-log (format "cmd: NICK: %s (erc-bad-nick: %S)" nick erc-bad-nick))
   (let ((nicklen (cdr (assoc "NICKLEN" (erc-with-server-buffer
-                                        erc-server-parameters)))))
+                                         erc-server-parameters)))))
     (and nicklen (> (length nick) (string-to-number nicklen))
-        (erc-display-message
-         nil 'notice 'active 'nick-too-long
-         ?i (length nick) ?l nicklen)))
+         (erc-display-message
+          nil 'notice 'active 'nick-too-long
+          ?i (length nick) ?l nicklen)))
   (erc-server-send (format "NICK %s" nick))
   (cond (erc-bad-nick
-        (erc-set-current-nick nick)
-        (erc-update-mode-line)
-        (setq erc-bad-nick nil)))
+         (erc-set-current-nick nick)
+         (erc-update-mode-line)
+         (setq erc-bad-nick nil)))
   t)
 
 (defun erc-cmd-PART (line)
@@ -3268,26 +3308,26 @@ Otherwise leave the channel indicated by LINE."
   (cond
    ((string-match "^\\s-*\\([&#+!]\\S-+\\)\\s-?\\(.*\\)$" line)
     (let* ((ch (match-string 1 line))
-          (msg (match-string 2 line))
-          (reason (funcall erc-part-reason (if (equal msg "") nil msg))))
+           (msg (match-string 2 line))
+           (reason (funcall erc-part-reason (if (equal msg "") nil msg))))
       (erc-log (format "cmd: PART: %s: %s" ch reason))
       (erc-server-send (if (string= reason "")
-                          (format "PART %s" ch)
-                        (format "PART %s :%s" ch reason))
-                      nil ch))
+                           (format "PART %s" ch)
+                         (format "PART %s :%s" ch reason))
+                       nil ch))
     t)
    ((string-match "^\\s-*\\(.*\\)$" line)
     (let* ((ch (erc-default-target))
-          (msg (match-string 1 line))
-          (reason (funcall erc-part-reason (if (equal msg "") nil msg))))
+           (msg (match-string 1 line))
+           (reason (funcall erc-part-reason (if (equal msg "") nil msg))))
       (if (and ch (erc-channel-p ch))
-         (progn
-           (erc-log (format "cmd: PART: %s: %s" ch reason))
-           (erc-server-send (if (string= reason "")
-                                (format "PART %s" ch)
-                              (format "PART %s :%s" ch reason))
-                            nil ch))
-       (erc-display-message nil 'error (current-buffer) 'no-target)))
+          (progn
+            (erc-log (format "cmd: PART: %s: %s" ch reason))
+            (erc-server-send (if (string= reason "")
+                                 (format "PART %s" ch)
+                               (format "PART %s :%s" ch reason))
+                             nil ch))
+        (erc-display-message nil 'error (current-buffer) 'no-target)))
     t)
    (t nil)))
 (put 'erc-cmd-PART 'do-not-parse-args t)
@@ -3322,11 +3362,11 @@ See also `erc-auto-query' to decide how private messages from
 other people should be displayed."
   :group 'erc-query
   :type '(choice (const :tag "Split window and select" window)
-                (const :tag "Split window, don't select" window-noselect)
-                (const :tag "New frame" frame)
-                (const :tag "Bury in new buffer" bury)
-                (const :tag "Use current buffer" buffer)
-                (const :tag "Use current buffer" t)))
+                 (const :tag "Split window, don't select" window-noselect)
+                 (const :tag "New frame" frame)
+                 (const :tag "Bury in new buffer" bury)
+                 (const :tag "Use current buffer" buffer)
+                 (const :tag "Use current buffer" t)))
 
 (defun erc-cmd-QUERY (&optional user)
   "Open a query with USER.
@@ -3338,22 +3378,24 @@ If USER is omitted, close the current query buffer if one exists
   (interactive
    (list (read-from-minibuffer "Start a query with: " nil)))
   (let ((session-buffer (erc-server-buffer))
-       (erc-join-buffer erc-query-display))
+        (erc-join-buffer erc-query-display))
     (if user
-       (erc-query user session-buffer)
+        (erc-query user session-buffer)
       ;; currently broken, evil hack to display help anyway
-      ;(erc-delete-query))))
+                                        ;(erc-delete-query))))
       (signal 'wrong-number-of-arguments ""))))
 (defalias 'erc-cmd-Q 'erc-cmd-QUERY)
 
+(defun erc-quit/part-reason-default ()
+  "Default quit/part message."
+  (format "\C-bERC\C-b (IRC client for Emacs %s)" emacs-version))
+
+
 (defun erc-quit-reason-normal (&optional s)
   "Normal quit message.
 
 If S is non-nil, it will be used as the quit reason."
-  (or s
-      (format "\C-bERC\C-b %s (IRC client for Emacs)"; - \C-b%s\C-b"
-             erc-version-string) ; erc-official-location)
-  ))
+  (or s (erc-quit/part-reason-default)))
 
 (defun erc-quit-reason-zippy (&optional s)
   "Zippy quit message.
@@ -3361,8 +3403,8 @@ If S is non-nil, it will be used as the quit reason."
 If S is non-nil, it will be used as the quit reason."
   (or s
       (if (fboundp 'yow)
-         (erc-replace-regexp-in-string "\n" "" (yow))
-       (erc-quit-reason-normal))))
+          (erc-replace-regexp-in-string "\n" "" (yow))
+        (erc-quit/part-reason-default))))
 
 (make-obsolete 'erc-quit-reason-zippy "it will be removed." "24.4")
 
@@ -3370,21 +3412,18 @@ If S is non-nil, it will be used as the quit reason."
   "Choose a quit reason based on S (a string)."
   (when (featurep 'xemacs) (require 'poe))
   (let ((res (car (assoc-default (or s "")
-                  erc-quit-reason-various-alist 'string-match))))
+                                 erc-quit-reason-various-alist 'string-match))))
     (cond
      ((functionp res) (funcall res))
      ((stringp res) res)
      (s s)
-     (t (erc-quit-reason-normal)))))
+     (t (erc-quit/part-reason-default)))))
 
 (defun erc-part-reason-normal (&optional s)
   "Normal part message.
 
-If S is non-nil, it will be used as the quit reason."
-  (or s
-      (format "\C-bERC\C-b %s (IRC client for Emacs)"; - \C-b%s\C-b"
-             erc-version-string) ; erc-official-location)
-  ))
+If S is non-nil, it will be used as the part reason."
+  (or s (erc-quit/part-reason-default)))
 
 (defun erc-part-reason-zippy (&optional s)
   "Zippy part message.
@@ -3392,8 +3431,8 @@ If S is non-nil, it will be used as the quit reason."
 If S is non-nil, it will be used as the quit reason."
   (or s
       (if (fboundp 'yow)
-         (erc-replace-regexp-in-string "\n" "" (yow))
-       (erc-part-reason-normal))))
+          (erc-replace-regexp-in-string "\n" "" (yow))
+        (erc-quit/part-reason-default))))
 
 (make-obsolete 'erc-part-reason-zippy "it will be removed." "24.4")
 
@@ -3401,12 +3440,12 @@ If S is non-nil, it will be used as the quit reason."
   "Choose a part reason based on S (a string)."
   (when (featurep 'xemacs) (require 'poe))
   (let ((res (car (assoc-default (or s "")
-                  erc-part-reason-various-alist 'string-match))))
+                                 erc-part-reason-various-alist 'string-match))))
     (cond
      ((functionp res) (funcall res))
      ((stringp res) res)
      (s s)
-     (t (erc-part-reason-normal)))))
+     (t (erc-quit/part-reason-default)))))
 
 (defun erc-cmd-QUIT (reason)
   "Disconnect from the current server.
@@ -3417,28 +3456,28 @@ the message given by REASON."
   (cond
    ((string-match "^\\s-*\\(.*\\)$" reason)
     (let* ((s (match-string 1 reason))
-          (buffer (erc-server-buffer))
-          (reason (funcall erc-quit-reason (if (equal s "") nil s)))
-          server-proc)
+           (buffer (erc-server-buffer))
+           (reason (funcall erc-quit-reason (if (equal s "") nil s)))
+           server-proc)
       (with-current-buffer (if (and buffer
-                                   (bufferp buffer))
-                              buffer
-                            (current-buffer))
-       (erc-log (format "cmd: QUIT: %s" reason))
-       (setq erc-server-quitting t)
-       (erc-set-active-buffer (erc-server-buffer))
-       (setq server-proc erc-server-process)
-       (erc-server-send (format "QUIT :%s" reason)))
+                                    (bufferp buffer))
+                               buffer
+                             (current-buffer))
+        (erc-log (format "cmd: QUIT: %s" reason))
+        (setq erc-server-quitting t)
+        (erc-set-active-buffer (erc-server-buffer))
+        (setq server-proc erc-server-process)
+        (erc-server-send (format "QUIT :%s" reason)))
       (run-hook-with-args 'erc-quit-hook server-proc)
       (when erc-kill-queries-on-quit
-       (erc-kill-query-buffers server-proc))
+        (erc-kill-query-buffers server-proc))
       ;; if the process has not been killed within 4 seconds, kill it
       (run-at-time 4 nil
-                  (lambda (proc)
-                    (when (and (processp proc)
-                               (memq (process-status proc) '(run open)))
-                      (delete-process proc)))
-                  server-proc))
+                   (lambda (proc)
+                     (when (and (processp proc)
+                                (memq (process-status proc) '(run open)))
+                       (delete-process proc)))
+                   server-proc))
     t)
    (t nil)))
 
@@ -3451,7 +3490,7 @@ the message given by REASON."
 (defun erc-cmd-GQUIT (reason)
   "Disconnect from all servers at once with the same quit REASON."
   (erc-with-all-buffers-of-server nil #'erc-open-server-buffer-p
-                                 (erc-cmd-QUIT reason))
+                                  (erc-cmd-QUIT reason))
   (when erc-kill-queries-on-quit
     ;; if the query buffers have not been killed within 4 seconds,
     ;; kill them
@@ -3459,8 +3498,8 @@ the message given by REASON."
      4 nil
      (lambda ()
        (dolist (buffer (erc-buffer-list (lambda (buf)
-                                         (not (erc-server-buffer-p buf)))))
-        (kill-buffer buffer)))))
+                                          (not (erc-server-buffer-p buf)))))
+         (kill-buffer buffer)))))
   t)
 
 (defalias 'erc-cmd-GQ 'erc-cmd-GQUIT)
@@ -3470,7 +3509,7 @@ the message given by REASON."
 (defun erc-cmd-RECONNECT ()
   "Try to reconnect to the current IRC server."
   (let ((buffer (erc-server-buffer))
-       (process nil))
+        (process nil))
     (unless (buffer-live-p buffer)
       (setq buffer (current-buffer)))
     (with-current-buffer buffer
@@ -3479,8 +3518,8 @@ the message given by REASON."
       (setq erc-server-reconnect-count 0)
       (setq process (get-buffer-process (erc-server-buffer)))
       (if process
-         (delete-process process)
-       (erc-server-reconnect))
+          (delete-process process)
+        (erc-server-reconnect))
       (setq erc-server-reconnecting nil)))
   t)
 (put 'erc-cmd-RECONNECT 'process-not-needed t)
@@ -3500,55 +3539,54 @@ the message given by REASON."
 
 (defun erc-cmd-SV ()
   "Say the current ERC and Emacs version into channel."
-  (erc-send-message (format "I'm using ERC %s with %s %s (%s%s) of %s."
-                           erc-version-string
-                           (if (featurep 'xemacs) "XEmacs" "GNU Emacs")
-                           emacs-version
-                           system-configuration
-                           (concat
-                            (cond ((featurep 'motif)
-                                   (concat ", " (substring
-                                                 motif-version-string 4)))
-                                  ((featurep 'gtk)
-                                   (concat ", GTK+ Version "
-                                           gtk-version-string))
-                                  ((featurep 'x-toolkit) ", X toolkit")
-                                  (t ""))
-                            (if (and (boundp 'x-toolkit-scroll-bars)
-                                     (memq x-toolkit-scroll-bars
-                                           '(xaw xaw3d)))
-                                (format ", %s scroll bars"
-                                        (capitalize (symbol-name
-                                                     x-toolkit-scroll-bars)))
-                              "")
-                            (if (featurep 'multi-tty) ", multi-tty" ""))
-                           erc-emacs-build-time))
+  (erc-send-message (format "I'm using ERC with %s %s (%s%s) of %s."
+                            (if (featurep 'xemacs) "XEmacs" "GNU Emacs")
+                            emacs-version
+                            system-configuration
+                            (concat
+                             (cond ((featurep 'motif)
+                                    (concat ", " (substring
+                                                  motif-version-string 4)))
+                                   ((featurep 'gtk)
+                                    (concat ", GTK+ Version "
+                                            gtk-version-string))
+                                   ((featurep 'x-toolkit) ", X toolkit")
+                                   (t ""))
+                             (if (and (boundp 'x-toolkit-scroll-bars)
+                                      (memq x-toolkit-scroll-bars
+                                            '(xaw xaw3d)))
+                                 (format ", %s scroll bars"
+                                         (capitalize (symbol-name
+                                                      x-toolkit-scroll-bars)))
+                               "")
+                             (if (featurep 'multi-tty) ", multi-tty" ""))
+                            erc-emacs-build-time))
   t)
 
 (defun erc-cmd-SM ()
   "Say the current ERC modes into channel."
   (erc-send-message (format "I'm using the following modules: %s!"
-                           (erc-modes)))
+                            (erc-modes)))
   t)
 
 (defun erc-cmd-DEOP (&rest people)
   "Remove the operator setting from user(s) given in PEOPLE."
   (when (> (length people) 0)
     (erc-server-send (concat "MODE " (erc-default-target)
-                             " -"
-                             (make-string (length people) ?o)
-                             " "
-                             (mapconcat 'identity people " ")))
+                             " -"
+                             (make-string (length people) ?o)
+                             " "
+                             (mapconcat 'identity people " ")))
     t))
 
 (defun erc-cmd-OP (&rest people)
   "Add the operator setting to users(s) given in PEOPLE."
   (when (> (length people) 0)
     (erc-server-send (concat "MODE " (erc-default-target)
-                             " +"
-                             (make-string (length people) ?o)
-                             " "
-                             (mapconcat 'identity people " ")))
+                             " +"
+                             (make-string (length people) ?o)
+                             " "
+                             (mapconcat 'identity people " ")))
     t))
 
 (defun erc-cmd-TIME (&optional line)
@@ -3574,7 +3612,7 @@ be displayed."
    ;; /topic #channel TOPIC
    ((string-match "^\\s-*\\([&#+!]\\S-+\\)\\s-\\(.*\\)$" topic)
     (let ((ch (match-string 1 topic))
-         (topic (match-string 2 topic)))
+          (topic (match-string 2 topic)))
       (erc-log (format "cmd: TOPIC [%s]: %s" ch topic))
       (erc-server-send (format "TOPIC %s :%s" ch topic) nil ch))
     t)
@@ -3591,12 +3629,12 @@ be displayed."
    ;; /topic TOPIC
    ((string-match "^\\s-*\\(.*\\)$" topic)
     (let ((ch (erc-default-target))
-         (topic (match-string 1 topic)))
+          (topic (match-string 1 topic)))
       (if (and ch (erc-channel-p ch))
-         (progn
-           (erc-log (format "cmd: TOPIC [%s]: %s" ch topic))
-           (erc-server-send (format "TOPIC %s :%s" ch topic) nil ch))
-       (erc-display-message nil 'error (current-buffer) 'no-target)))
+          (progn
+            (erc-log (format "cmd: TOPIC [%s]: %s" ch topic))
+            (erc-server-send (format "TOPIC %s :%s" ch topic) nil ch))
+        (erc-display-message nil 'error (current-buffer) 'no-target)))
     t)
    (t nil)))
 (defalias 'erc-cmd-T 'erc-cmd-TOPIC)
@@ -3641,69 +3679,69 @@ or not the ban list has been requested from the server.")
 
 The ban list is fetched from the server if necessary."
   (let ((chnl (erc-default-target))
-       (chnl-name (buffer-name)))
+        (chnl-name (buffer-name)))
 
     (cond
      ((not (erc-channel-p chnl))
       (erc-display-line (erc-make-notice "You're not on a channel\n")
-                       'active))
+                        'active))
 
      ((not (get 'erc-channel-banlist 'received-from-server))
       (let ((old-367-hook erc-server-367-functions))
-       (setq erc-server-367-functions 'erc-banlist-store
-             erc-channel-banlist nil)
-       ;; fetch the ban list then callback
-       (erc-with-server-buffer
-         (erc-once-with-server-event
-          368
-          (lambda (_proc _parsed)
-            (with-current-buffer chnl-name
-             (put 'erc-channel-banlist 'received-from-server t)
-             (setq erc-server-367-functions old-367-hook)
-             (erc-cmd-BANLIST)
-             t)))
-         (erc-server-send (format "MODE %s b" chnl)))))
+        (setq erc-server-367-functions 'erc-banlist-store
+              erc-channel-banlist nil)
+        ;; fetch the ban list then callback
+        (erc-with-server-buffer
+          (erc-once-with-server-event
+           368
+           (lambda (_proc _parsed)
+             (with-current-buffer chnl-name
+               (put 'erc-channel-banlist 'received-from-server t)
+               (setq erc-server-367-functions old-367-hook)
+               (erc-cmd-BANLIST)
+               t)))
+          (erc-server-send (format "MODE %s b" chnl)))))
 
      ((null erc-channel-banlist)
       (erc-display-line (erc-make-notice
-                        (format "No bans for channel: %s\n" chnl))
-                       'active)
+                         (format "No bans for channel: %s\n" chnl))
+                        'active)
       (put 'erc-channel-banlist 'received-from-server nil))
 
      (t
       (let* ((erc-fill-column (or (and (boundp 'erc-fill-column)
-                                      erc-fill-column)
-                                 (and (boundp 'fill-column)
-                                      fill-column)
-                                 (1- (window-width))))
-            (separator (make-string erc-fill-column ?=))
-            (fmt (concat
-                  "%-" (number-to-string (/ erc-fill-column 2)) "s"
-                  "%" (number-to-string (/ erc-fill-column 2)) "s")))
-
-       (erc-display-line
-        (erc-make-notice (format "Ban list for channel: %s\n"
-                                 (erc-default-target)))
-        'active)
-
-       (erc-display-line separator 'active)
-       (erc-display-line (format fmt "Ban Mask" "Banned By") 'active)
-       (erc-display-line separator 'active)
-
-       (mapc
-        (lambda (x)
-          (erc-display-line
-           (format fmt
-                   (truncate-string-to-width (cdr x) (/ erc-fill-column 2))
-                   (if (car x)
-                       (truncate-string-to-width (car x) (/ erc-fill-column 2))
-                     ""))
-           'active))
-        erc-channel-banlist)
-
-       (erc-display-line (erc-make-notice "End of Ban list")
-                         'active)
-       (put 'erc-channel-banlist 'received-from-server nil)))))
+                                       erc-fill-column)
+                                  (and (boundp 'fill-column)
+                                       fill-column)
+                                  (1- (window-width))))
+             (separator (make-string erc-fill-column ?=))
+             (fmt (concat
+                   "%-" (number-to-string (/ erc-fill-column 2)) "s"
+                   "%" (number-to-string (/ erc-fill-column 2)) "s")))
+
+        (erc-display-line
+         (erc-make-notice (format "Ban list for channel: %s\n"
+                                  (erc-default-target)))
+         'active)
+
+        (erc-display-line separator 'active)
+        (erc-display-line (format fmt "Ban Mask" "Banned By") 'active)
+        (erc-display-line separator 'active)
+
+        (mapc
+         (lambda (x)
+           (erc-display-line
+            (format fmt
+                    (truncate-string-to-width (cdr x) (/ erc-fill-column 2))
+                    (if (car x)
+                        (truncate-string-to-width (car x) (/ erc-fill-column 2))
+                      ""))
+            'active))
+         erc-channel-banlist)
+
+        (erc-display-line (erc-make-notice "End of Ban list")
+                          'active)
+        (put 'erc-channel-banlist 'received-from-server nil)))))
   t)
 
 (defalias 'erc-cmd-BL 'erc-cmd-BANLIST)
@@ -3722,31 +3760,31 @@ Unban all currently banned users in the current channel."
 
      ((not (get 'erc-channel-banlist 'received-from-server))
       (let ((old-367-hook erc-server-367-functions))
-       (setq erc-server-367-functions 'erc-banlist-store)
-       ;; fetch the ban list then callback
-       (erc-with-server-buffer
-        (erc-once-with-server-event
-         368
-         (lambda (_proc _parsed)
-           (with-current-buffer chnl
-             (put 'erc-channel-banlist 'received-from-server t)
-             (setq erc-server-367-functions old-367-hook)
-             (erc-cmd-MASSUNBAN)
-             t)))
-        (erc-server-send (format "MODE %s b" chnl)))))
+        (setq erc-server-367-functions 'erc-banlist-store)
+        ;; fetch the ban list then callback
+        (erc-with-server-buffer
+          (erc-once-with-server-event
+           368
+           (lambda (_proc _parsed)
+             (with-current-buffer chnl
+               (put 'erc-channel-banlist 'received-from-server t)
+               (setq erc-server-367-functions old-367-hook)
+               (erc-cmd-MASSUNBAN)
+               t)))
+          (erc-server-send (format "MODE %s b" chnl)))))
 
      (t (let ((bans (mapcar 'cdr erc-channel-banlist)))
-         (when bans
-           ;; Glob the bans into groups of three, and carry out the unban.
-           ;; eg. /mode #foo -bbb a*!*@* b*!*@* c*!*@*
-           (mapc
-            (lambda (x)
-              (erc-server-send
-               (format "MODE %s -%s %s" (erc-default-target)
-                       (make-string (length x) ?b)
-                       (mapconcat 'identity x " "))))
-            (erc-group-list bans 3))))
-       t))))
+          (when bans
+            ;; Glob the bans into groups of three, and carry out the unban.
+            ;; eg. /mode #foo -bbb a*!*@* b*!*@* c*!*@*
+            (mapc
+             (lambda (x)
+               (erc-server-send
+                (format "MODE %s -%s %s" (erc-default-target)
+                        (make-string (length x) ?b)
+                        (mapconcat 'identity x " "))))
+             (erc-group-list bans 3))))
+        t))))
 
 (defalias 'erc-cmd-MUB 'erc-cmd-MASSUNBAN)
 
@@ -3770,12 +3808,12 @@ text again."
   (erc-set-active-buffer (current-buffer))
   (save-excursion
     (let* ((cb (current-buffer))
-          (buf (generate-new-buffer erc-grab-buffer-name))
-          (region (buffer-substring start end))
-          (lines (erc-split-multiline-safe region)))
+           (buf (generate-new-buffer erc-grab-buffer-name))
+           (region (buffer-substring start end))
+           (lines (erc-split-multiline-safe region)))
       (set-buffer buf)
       (dolist (line lines)
-       (insert (concat line "\n")))
+        (insert (concat line "\n")))
       (set-buffer cb)
       (switch-to-buffer-other-window buf)))
   (message "erc-grab-region doesn't grab colors etc. anymore. If you use this, please tell the maintainers.")
@@ -3791,8 +3829,8 @@ If POS is nil, PROMPT will be displayed at `point'.
 If FACE is non-nil, it will be used to propertize the prompt.  If it is nil,
 `erc-prompt-face' will be used."
   (let* ((prompt (or prompt (erc-prompt)))
-        (l (length prompt))
-        (ob (current-buffer)))
+         (l (length prompt))
+         (ob (current-buffer)))
     ;; We cannot use save-excursion because we move point, therefore
     ;; we resort to the ol' ob trick to restore this.
     (when (and buffer (bufferp buffer))
@@ -3804,20 +3842,20 @@ If FACE is non-nil, it will be used to propertize the prompt.  If it is nil,
       (setq pos (or pos (point)))
       (goto-char pos)
       (when (> l 0)
-       ;; Do not extend the text properties when typing at the end
-       ;; of the prompt, but stuff typed in front of the prompt
-       ;; shall remain part of the prompt.
-       (setq prompt (erc-propertize prompt
-                                    'start-open t ; XEmacs
-                                    'rear-nonsticky t ; Emacs
-                                    'erc-prompt t
-                                    'field t
-                                    'front-sticky t
-                                    'read-only t))
-       (erc-put-text-property 0 (1- (length prompt))
-                              'face (or face 'erc-prompt-face)
-                              prompt)
-       (insert prompt))
+        ;; Do not extend the text properties when typing at the end
+        ;; of the prompt, but stuff typed in front of the prompt
+        ;; shall remain part of the prompt.
+        (setq prompt (erc-propertize prompt
+                                     'start-open t ; XEmacs
+                                     'rear-nonsticky t ; Emacs
+                                     'erc-prompt t
+                                     'field t
+                                     'front-sticky t
+                                     'read-only t))
+        (erc-put-text-property 0 (1- (length prompt))
+                               'face (or face 'erc-prompt-face)
+                               prompt)
+        (insert prompt))
       ;; Set the input marker
       (set-marker erc-input-marker (point)))
 
@@ -3837,11 +3875,12 @@ If FACE is non-nil, it will be used to propertize the prompt.  If it is nil,
   "Read input from the minibuffer."
   (interactive)
   (let ((minibuffer-allow-text-properties t)
-       (read-map minibuffer-local-map))
+        (read-map minibuffer-local-map))
     (insert (read-from-minibuffer "Message: "
-                                 (string (if (featurep 'xemacs)
-                                             last-command-char
-                                           last-command-event)) read-map))
+                                  (string (if (featurep 'xemacs)
+                                              last-command-char
+                                            last-command-event))
+                                 read-map))
     (erc-send-current-line)))
 
 (defvar erc-action-history-list ()
@@ -3852,9 +3891,9 @@ If FACE is non-nil, it will be used to propertize the prompt.  If it is nil,
   (interactive "")
   (erc-set-active-buffer (current-buffer))
   (let ((action (read-from-minibuffer
-                "Action: " nil nil nil 'erc-action-history-list)))
+                 "Action: " nil nil nil 'erc-action-history-list)))
     (if (not (string-match "^\\s-*$" action))
-       (erc-send-action (erc-default-target) action))))
+        (erc-send-action (erc-default-target) action))))
 
 (defun erc-join-channel (channel &optional key)
   "Join CHANNEL.
@@ -3863,9 +3902,9 @@ If `point' is at the beginning of a channel name, use that as default."
   (interactive
    (list
     (let ((chnl (if (looking-at "\\([&#+!][^ \n]+\\)") (match-string 1) ""))
-         (table (when (erc-server-buffer-live-p)
-                  (set-buffer (process-buffer erc-server-process))
-                  erc-channel-list)))
+          (table (when (erc-server-buffer-live-p)
+                   (set-buffer (process-buffer erc-server-process))
+                   erc-channel-list)))
       (completing-read "Join channel: " table nil nil nil nil chnl))
     (when (or current-prefix-arg erc-prompt-for-channel-key)
       (read-from-minibuffer "Channel key (RET for none): " nil))))
@@ -3876,9 +3915,9 @@ If `point' is at the beginning of a channel name, use that as default."
   (interactive
    (list
     (if (and (boundp 'reason) (stringp reason) (not (string= reason "")))
-       reason
+        reason
       (read-from-minibuffer (concat "Reason for leaving " (erc-default-target)
-                                   ": ")))))
+                                    ": ")))))
   (erc-cmd-PART (concat (erc-default-target)" " reason)))
 
 (defun erc-set-topic (topic)
@@ -3889,8 +3928,8 @@ If `point' is at the beginning of a channel name, use that as default."
      (concat "Set topic of " (erc-default-target) ": ")
      (when erc-channel-topic
        (let ((ss (split-string erc-channel-topic "\C-o")))
-        (cons (apply 'concat (if (cdr ss) (butlast ss) ss))
-              0))))))
+         (cons (apply 'concat (if (cdr ss) (butlast ss) ss))
+               0))))))
   (let ((topic-list (split-string topic "\C-o"))) ; strip off the topic setter
     (erc-cmd-TOPIC (concat (erc-default-target) " " (car topic-list)))))
 
@@ -3898,31 +3937,31 @@ If `point' is at the beginning of a channel name, use that as default."
   "Set a LIMIT for the current channel.  Remove limit if nil.
 Prompt for one if called interactively."
   (interactive (list (read-from-minibuffer
-                     (format "Limit for %s (RET to remove limit): "
-                             (erc-default-target)))))
+                      (format "Limit for %s (RET to remove limit): "
+                              (erc-default-target)))))
   (let ((tgt (erc-default-target)))
     (erc-server-send (if (and limit (>= (length limit) 1))
-                        (format "MODE %s +l %s" tgt limit)
-                      (format "MODE %s -l" tgt)))))
+                         (format "MODE %s +l %s" tgt limit)
+                       (format "MODE %s -l" tgt)))))
 
 (defun erc-set-channel-key (&optional key)
   "Set a KEY for the current channel.  Remove key if nil.
 Prompt for one if called interactively."
   (interactive (list (read-from-minibuffer
-                     (format "Key for %s (RET to remove key): "
-                             (erc-default-target)))))
+                      (format "Key for %s (RET to remove key): "
+                              (erc-default-target)))))
   (let ((tgt (erc-default-target)))
     (erc-server-send (if (and key (>= (length key) 1))
-                        (format "MODE %s +k %s" tgt key)
-                      (format "MODE %s -k" tgt)))))
+                         (format "MODE %s +k %s" tgt key)
+                       (format "MODE %s -k" tgt)))))
 
 (defun erc-quit-server (reason)
   "Disconnect from current server after prompting for REASON.
 `erc-quit-reason' works with this just like with `erc-cmd-QUIT'."
   (interactive (list (read-from-minibuffer
-                     (format "Reason for quitting %s: "
-                             (or erc-server-announced-name
-                                 erc-session-server)))))
+                      (format "Reason for quitting %s: "
+                              (or erc-server-announced-name
+                                  erc-session-server)))))
   (erc-cmd-QUIT reason))
 
 ;; Movement of point
@@ -3941,10 +3980,10 @@ This places `point' just after the prompt, or at the beginning of the line."
   "Kill current input line using `erc-bol' followed by `kill-line'."
   (interactive)
   (when (and (erc-bol)
-            (/= (point) (point-max))) ;; Prevent a (ding) and an error when
-                                      ;; there's nothing to kill
+             (/= (point) (point-max))) ;; Prevent a (ding) and an error when
+    ;; there's nothing to kill
     (if (boundp 'erc-input-ring-index)
-       (setq erc-input-ring-index nil))
+        (setq erc-input-ring-index nil))
     (kill-line)))
 
 (defun erc-complete-word-at-point ()
@@ -3954,7 +3993,7 @@ This places `point' just after the prompt, or at the beginning of the line."
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
-;;                       IRC SERVER INPUT HANDLING
+;;                        IRC SERVER INPUT HANDLING
 ;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
@@ -3964,7 +4003,7 @@ This places `point' just after the prompt, or at the beginning of the line."
 ; experiment area.
 
 (defcustom erc-default-server-hook '(erc-debug-missing-hooks
-                                    erc-default-server-handler)
+                                     erc-default-server-handler)
   "Default for server messages which aren't covered by `erc-server-hooks'."
   :group 'erc-server-hooks
   :type 'hook)
@@ -3979,9 +4018,9 @@ Displays PROC and PARSED appropriately using `erc-display-message'."
     'identity
     (let (res)
       (mapc #'(lambda (x)
-               (if (stringp x)
-                   (setq res (append res (list x)))))
-           parsed)
+                (if (stringp x)
+                    (setq res (append res (list x)))))
+            parsed)
       res)
     " ")))
 
@@ -4003,18 +4042,18 @@ See `erc-default-server-hook'."
 To change how this query window is displayed, use `let' to bind
 `erc-join-buffer' before calling this."
   (unless (and server
-              (buffer-live-p server)
-              (set-buffer server))
+               (buffer-live-p server)
+               (set-buffer server))
     (error "Couldn't switch to server buffer"))
   (let ((buf (erc-open erc-session-server
-                      erc-session-port
-                      (erc-current-nick)
-                      erc-session-user-full-name
-                      nil
-                      nil
-                      (list target)
-                      target
-                      erc-server-process)))
+                       erc-session-port
+                       (erc-current-nick)
+                       erc-session-user-full-name
+                       nil
+                       nil
+                       (list target)
+                       target
+                       erc-server-process)))
     (unless buf
       (error "Couldn't open query window"))
     (erc-update-mode-line)
@@ -4030,12 +4069,12 @@ a new window, but not to select it.  See the documentation for
 `erc-join-buffer' for a description of the available choices."
   :group 'erc-query
   :type '(choice (const :tag "Don't create query window" nil)
-                (const :tag "Split window and select" window)
-                (const :tag "Split window, don't select" window-noselect)
-                (const :tag "New frame" frame)
-                (const :tag "Bury in new buffer" bury)
-                (const :tag "Use current buffer" buffer)
-                (const :tag "Use current buffer" t)))
+                 (const :tag "Split window and select" window)
+                 (const :tag "Split window, don't select" window-noselect)
+                 (const :tag "New frame" frame)
+                 (const :tag "Bury in new buffer" bury)
+                 (const :tag "Use current buffer" buffer)
+                 (const :tag "Use current buffer" t)))
 
 (defcustom erc-query-on-unjoined-chan-privmsg t
   "If non-nil create query buffer on receiving any PRIVMSG at all.
@@ -4069,15 +4108,17 @@ unmodified if nothing can be removed.
 E.g. \"Read error to Nick [user@some.host]: 110\" would be shortened to
 \"Read error: 110\". The same applies for \"Ping Timeout\"."
   (setq nick (regexp-quote nick)
-       login (regexp-quote login)
-       host (regexp-quote host))
+        login (regexp-quote login)
+        host (regexp-quote host))
   (or (when (string-match (concat "^\\(Read error\\) to "
-                                 nick "\\[" host "\\]: "
-                                 "\\(.+\\)$") reason)
-       (concat (match-string 1 reason) ": " (match-string 2 reason)))
+                                  nick "\\[" host "\\]: "
+                                  "\\(.+\\)$")
+                         reason)
+        (concat (match-string 1 reason) ": " (match-string 2 reason)))
       (when (string-match (concat "^\\(Ping timeout\\) for "
-                                 nick "\\[" host "\\]$") reason)
-       (match-string 1 reason))
+                                  nick "\\[" host "\\]$")
+                         reason)
+        (match-string 1 reason))
       reason))
 
 (defun erc-nickname-in-use (nick reason)
@@ -4085,40 +4126,40 @@ E.g. \"Read error to Nick [user@some.host]: 110\" would be shortened to
 
 See also `erc-display-error-notice'."
   (if (or (not erc-try-new-nick-p)
-         ;; how many default-nicks are left + one more try...
-         (eq erc-nick-change-attempt-count
-             (if (consp erc-nick)
-                 (+ (length erc-nick) 1)
-               1)))
+          ;; how many default-nicks are left + one more try...
+          (eq erc-nick-change-attempt-count
+              (if (consp erc-nick)
+                  (+ (length erc-nick) 1)
+                1)))
       (erc-display-error-notice
        nil
        (format "Nickname %s is %s, try another." nick reason))
     (setq erc-nick-change-attempt-count (+ erc-nick-change-attempt-count 1))
     (let ((newnick (nth 1 erc-default-nicks))
-         (nicklen (cdr (assoc "NICKLEN"
-                              (erc-with-server-buffer
-                                erc-server-parameters)))))
+          (nicklen (cdr (assoc "NICKLEN"
+                               (erc-with-server-buffer
+                                 erc-server-parameters)))))
       (setq erc-bad-nick t)
       ;; try to use a different nick
       (if erc-default-nicks
-         (setq erc-default-nicks (cdr erc-default-nicks)))
+          (setq erc-default-nicks (cdr erc-default-nicks)))
       (if (not newnick)
-         (setq newnick (concat (truncate-string-to-width
-                                nick
-                                (if (and erc-server-connected nicklen)
-                                    (- (string-to-number nicklen)
-                                       (length erc-nick-uniquifier))
-                                  ;; rfc2812 max nick length = 9
-                                  ;; we must assume this is the
-                                  ;; server's setting if we haven't
-                                  ;; established a connection yet
-                                  (- 9 (length erc-nick-uniquifier))))
-                               erc-nick-uniquifier)))
+          (setq newnick (concat (truncate-string-to-width
+                                 nick
+                                 (if (and erc-server-connected nicklen)
+                                     (- (string-to-number nicklen)
+                                        (length erc-nick-uniquifier))
+                                   ;; rfc2812 max nick length = 9
+                                   ;; we must assume this is the
+                                   ;; server's setting if we haven't
+                                   ;; established a connection yet
+                                   (- 9 (length erc-nick-uniquifier))))
+                                erc-nick-uniquifier)))
       (erc-cmd-NICK newnick)
       (erc-display-error-notice
        nil
        (format "Nickname %s is %s, trying %s"
-              nick reason newnick)))))
+               nick reason newnick)))))
 
 ;;; Server messages
 
@@ -4142,21 +4183,21 @@ and as second argument the event parsed as a vector."
   "Put this on `erc-server-PRIVMSG-functions'."
   (when erc-auto-query
     (let* ((nick (car (erc-parse-user (erc-response.sender parsed))))
-          (target (car (erc-response.command-args parsed)))
-          (msg (erc-response.contents parsed))
-          (query  (if (not erc-query-on-unjoined-chan-privmsg)
-                      nick
-                    (if (erc-current-nick-p target)
-                        nick
-                      target))))
+           (target (car (erc-response.command-args parsed)))
+           (msg (erc-response.contents parsed))
+           (query  (if (not erc-query-on-unjoined-chan-privmsg)
+                       nick
+                     (if (erc-current-nick-p target)
+                         nick
+                       target))))
       (and (not (erc-ignored-user-p (erc-response.sender parsed)))
-          (or erc-query-on-unjoined-chan-privmsg
-              (string= target (erc-current-nick)))
-          (not (erc-get-buffer query proc))
-          (not (erc-is-message-ctcp-and-not-action-p msg))
-          (let ((erc-query-display erc-auto-query))
-            (erc-cmd-QUERY query))
-          nil))))
+           (or erc-query-on-unjoined-chan-privmsg
+               (string= target (erc-current-nick)))
+           (not (erc-get-buffer query proc))
+           (not (erc-is-message-ctcp-and-not-action-p msg))
+           (let ((erc-query-display erc-auto-query))
+             (erc-cmd-QUERY query))
+           nil))))
 
 (defun erc-is-message-ctcp-p (message)
   "Check if MESSAGE is a CTCP message or not."
@@ -4170,16 +4211,16 @@ and as second argument the event parsed as a vector."
 (defun erc-format-privmessage (nick msg privp msgp)
   "Format a PRIVMSG in an insertable fashion."
   (let* ((mark-s (if msgp (if privp "*" "<") "-"))
-        (mark-e (if msgp (if privp "*" ">") "-"))
-        (str    (format "%s%s%s %s" mark-s nick mark-e msg))
-        (nick-face (if privp 'erc-nick-msg-face 'erc-nick-default-face))
-        (msg-face (if privp 'erc-direct-msg-face 'erc-default-face)))
+         (mark-e (if msgp (if privp "*" ">") "-"))
+         (str    (format "%s%s%s %s" mark-s nick mark-e msg))
+         (nick-face (if privp 'erc-nick-msg-face 'erc-nick-default-face))
+         (msg-face (if privp 'erc-direct-msg-face 'erc-default-face)))
     ;; add text properties to text before the nick, the nick and after the nick
     (erc-put-text-property 0 (length mark-s) 'face msg-face str)
     (erc-put-text-property (length mark-s) (+ (length mark-s) (length nick))
-                          'face nick-face str)
+                           'face nick-face str)
     (erc-put-text-property (+ (length mark-s) (length nick)) (length str)
-                          'face msg-face str)
+                           'face msg-face str)
     str))
 
 (defcustom erc-format-nick-function 'erc-format-nick
@@ -4192,26 +4233,45 @@ and as second argument the event parsed as a vector."
 See also `erc-format-nick-function'."
   (when user (erc-server-user-nickname user)))
 
-(defun erc-format-@nick (&optional user channel-data)
-  "Format the nickname of USER showing if USER is an operator or has voice.
-Operators have \"@\" and users with voice have \"+\" as a prefix.
-Use CHANNEL-DATA to determine op and voice status.
-See also `erc-format-nick-function'."
+(defun erc-get-user-mode-prefix (user)
+  (when user
+    (cond ((erc-channel-user-owner-p user)
+           (erc-propertize "~" 'help-echo "owner"))
+          ((erc-channel-user-admin-p user)
+           (erc-propertize "&" 'help-echo "admin"))
+          ((erc-channel-user-op-p user)
+           (erc-propertize "@" 'help-echo "operator"))
+          ((erc-channel-user-halfop-p user)
+           (erc-propertize "%" 'help-echo "half-op"))
+          ((erc-channel-user-voice-p user)
+           (erc-propertize "+" 'help-echo "voice"))
+          (t ""))))
+
+(defun erc-format-@nick (&optional user _channel-data)
+  "Format the nickname of USER showing if USER has a voice, is an
+operator, half-op, admin or owner. Owners have \"~\", admins have
+\"&\", operators have \"@\" and users with voice have \"+\" as a
+prefix.  Use CHANNEL-DATA to determine op and voice status.  See
+also `erc-format-nick-function'."
   (when user
-    (let ((op (and channel-data (erc-channel-user-op channel-data) "@"))
-         (voice (and channel-data (erc-channel-user-voice channel-data) "+")))
-      (concat voice op (erc-server-user-nickname user)))))
+    (let ((nick (erc-server-user-nickname user)))
+      (concat (erc-propertize
+               (erc-get-user-mode-prefix nick)
+               'face 'erc-nick-prefix-face)
+             nick))))
 
 (defun erc-format-my-nick ()
   "Return the beginning of this user's message, correctly propertized."
   (if erc-show-my-nick
-      (let ((open "<")
-           (close "> ")
-           (nick (erc-current-nick)))
-       (concat
-        (erc-propertize open 'face 'erc-default-face)
-        (erc-propertize nick 'face 'erc-my-nick-face)
-        (erc-propertize close 'face 'erc-default-face)))
+      (let* ((open "<")
+             (close "> ")
+             (nick (erc-current-nick))
+             (mode (erc-get-user-mode-prefix nick)))
+        (concat
+         (erc-propertize open 'face 'erc-default-face)
+         (erc-propertize mode 'face 'erc-my-nick-prefix-face)
+         (erc-propertize nick 'face 'erc-my-nick-face)
+         (erc-propertize close 'face 'erc-default-face)))
     (let ((prefix "> "))
       (erc-propertize prefix 'face 'erc-default-face))))
 
@@ -4275,7 +4335,7 @@ See also: `erc-echo-notice-in-first-user-buffer',
 `erc-buffer-list-with-nick'."
   (let ((buffers (erc-buffer-list-with-nick sender erc-server-process)))
     (if buffers
-       (progn (erc-display-message parsed nil buffers s) t)
+        (progn (erc-display-message parsed nil buffers s) t)
       nil)))
 
 (defun erc-echo-notice-in-user-and-target-buffers (s parsed buffer sender)
@@ -4290,8 +4350,8 @@ See also: `erc-echo-notice-in-user-buffers',
 `erc-buffer-list-with-nick'."
   (let ((buffers (erc-buffer-list-with-nick sender erc-server-process)))
     (unless (memq buffer buffers) (push buffer buffers))
-    (if buffers                                ;FIXME: How could it be nil?
-       (progn (erc-display-message parsed nil buffers s) t)
+    (if buffers                         ;FIXME: How could it be nil?
+        (progn (erc-display-message parsed nil buffers s) t)
       nil)))
 
 (defun erc-echo-notice-in-first-user-buffer (s parsed _buffer sender)
@@ -4305,7 +4365,7 @@ See also: `erc-echo-notice-in-user-buffers',
 `erc-buffer-list-with-nick'."
   (let ((buffers (erc-buffer-list-with-nick sender erc-server-process)))
     (if buffers
-       (progn (erc-display-message parsed nil (car buffers) s) t)
+        (progn (erc-display-message parsed nil (car buffers) s) t)
       nil)))
 
 ;;; Ban manipulation
@@ -4313,61 +4373,61 @@ See also: `erc-echo-notice-in-user-buffers',
 (defun erc-banlist-store (proc parsed)
   "Record ban entries for a channel."
   (pcase-let ((`(,channel ,mask ,whoset)
-              (cdr (erc-response.command-args parsed))))
+               (cdr (erc-response.command-args parsed))))
     ;; Determine to which buffer the message corresponds
     (let ((buffer (erc-get-buffer channel proc)))
       (with-current-buffer buffer
-       (unless (member (cons whoset mask) erc-channel-banlist)
-         (setq erc-channel-banlist (cons (cons whoset mask)
-                                         erc-channel-banlist))))))
+        (unless (member (cons whoset mask) erc-channel-banlist)
+          (setq erc-channel-banlist (cons (cons whoset mask)
+                                          erc-channel-banlist))))))
   nil)
 
 (defun erc-banlist-finished (proc parsed)
   "Record that we have received the banlist."
   (let* ((channel (nth 1 (erc-response.command-args parsed)))
-        (buffer (erc-get-buffer channel proc)))
+         (buffer (erc-get-buffer channel proc)))
     (with-current-buffer buffer
       (put 'erc-channel-banlist 'received-from-server t)))
-  t)                                   ; suppress the 'end of banlist' message
+  t)                                    ; suppress the 'end of banlist' message
 
 (defun erc-banlist-update (proc parsed)
   "Check MODE commands for bans and update the banlist appropriately."
   ;; FIXME: Possibly incorrect. -- Lawrence 2004-05-11
   (let* ((tgt (car (erc-response.command-args parsed)))
-        (mode (erc-response.contents parsed))
-        (whoset (erc-response.sender parsed))
-        (buffer (erc-get-buffer tgt proc)))
+         (mode (erc-response.contents parsed))
+         (whoset (erc-response.sender parsed))
+         (buffer (erc-get-buffer tgt proc)))
     (when buffer
       (with-current-buffer buffer
-       (cond ((not (get 'erc-channel-banlist 'received-from-server)) nil)
-             ((string-match "^\\([+-]\\)b" mode)
-              ;; This is a ban
-              (cond
-               ((string-match "^-" mode)
-                ;; Remove the unbanned masks from the ban list
-                (setq erc-channel-banlist
-                      (erc-delete-if
-                       #'(lambda (y)
-                           (member (upcase (cdr y))
-                                   (mapcar #'upcase
-                                           (cdr (split-string mode)))))
-                       erc-channel-banlist)))
-               ((string-match "^+" mode)
-                ;; Add the banned mask(s) to the ban list
-                (mapc
-                 (lambda (mask)
-                   (unless (member (cons whoset mask) erc-channel-banlist)
-                     (setq erc-channel-banlist
-                           (cons (cons whoset mask) erc-channel-banlist))))
-                 (cdr (split-string mode))))))))))
+        (cond ((not (get 'erc-channel-banlist 'received-from-server)) nil)
+              ((string-match "^\\([+-]\\)b" mode)
+               ;; This is a ban
+               (cond
+                ((string-match "^-" mode)
+                 ;; Remove the unbanned masks from the ban list
+                 (setq erc-channel-banlist
+                       (erc-delete-if
+                        #'(lambda (y)
+                            (member (upcase (cdr y))
+                                    (mapcar #'upcase
+                                            (cdr (split-string mode)))))
+                        erc-channel-banlist)))
+                ((string-match "^+" mode)
+                 ;; Add the banned mask(s) to the ban list
+                 (mapc
+                  (lambda (mask)
+                    (unless (member (cons whoset mask) erc-channel-banlist)
+                      (setq erc-channel-banlist
+                            (cons (cons whoset mask) erc-channel-banlist))))
+                  (cdr (split-string mode))))))))))
   nil)
 
 ;; used for the banlist cmds
 (defun erc-group-list (list n)
   "Group LIST into sublists of length N."
   (cond ((null list) nil)
-       ((null (nthcdr n list)) (list list))
-       (t (cons (erc-subseq list 0 n) (erc-group-list (nthcdr n list) n)))))
+        ((null (nthcdr n list)) (list list))
+        (t (cons (erc-subseq list 0 n) (erc-group-list (nthcdr n list) n)))))
 
 
 ;;; MOTD numreplies
@@ -4380,7 +4440,7 @@ See also: `erc-echo-notice-in-user-buffers',
     ;; execute a startup script
     (let ((f (erc-select-startup-file)))
       (when f
-       (erc-load-script f)))))
+        (erc-load-script f)))))
 
 (defun erc-connection-established (proc parsed)
   "Run just after connection.
@@ -4389,14 +4449,14 @@ Set user modes and run `erc-after-connect' hook."
   (with-current-buffer (process-buffer proc)
     (unless erc-server-connected ; only once per session
       (let ((server (or erc-server-announced-name
-                       (erc-response.sender parsed)))
-           (nick (car (erc-response.command-args parsed)))
-           (buffer (process-buffer proc)))
-       (setq erc-server-connected t)
-       (erc-update-mode-line)
-       (erc-set-initial-user-mode nick buffer)
-       (erc-server-setup-periodical-ping buffer)
-       (run-hook-with-args 'erc-after-connect server nick)))))
+                        (erc-response.sender parsed)))
+            (nick (car (erc-response.command-args parsed)))
+            (buffer (process-buffer proc)))
+        (setq erc-server-connected t)
+        (erc-update-mode-line)
+        (erc-set-initial-user-mode nick buffer)
+        (erc-server-setup-periodical-ping buffer)
+        (run-hook-with-args 'erc-after-connect server nick)))))
 
 (defun erc-set-initial-user-mode (nick buffer)
   "If `erc-user-mode' is non-nil for NICK, set the user modes.
@@ -4404,11 +4464,11 @@ The server buffer is given by BUFFER."
   (with-current-buffer buffer
     (when erc-user-mode
       (let ((mode (if (functionp erc-user-mode)
-                     (funcall erc-user-mode)
-                   erc-user-mode)))
-       (when (stringp mode)
-         (erc-log (format "changing mode for %s to %s" nick mode))
-         (erc-server-send (format "MODE %s %s" nick mode)))))))
+                      (funcall erc-user-mode)
+                    erc-user-mode)))
+        (when (stringp mode)
+          (erc-log (format "changing mode for %s to %s" nick mode))
+          (erc-server-send (format "MODE %s %s" nick mode)))))))
 
 (defun erc-display-error-notice (parsed string)
   "Display STRING as an error notice.
@@ -4421,41 +4481,41 @@ See also `erc-display-message'."
   ;; FIXME: This needs a proper docstring -- Lawrence 2004-01-08
   "Process a CTCP query."
   (let ((queries (delete "" (split-string (erc-response.contents parsed)
-                                         "\C-a"))))
+                                          "\C-a"))))
     (if (> (length queries) 4)
-       (erc-display-message
-        parsed (list 'notice 'error) proc 'ctcp-too-many)
+        (erc-display-message
+         parsed (list 'notice 'error) proc 'ctcp-too-many)
       (if (= 0 (length queries))
-         (erc-display-message
-          parsed (list 'notice 'error) proc
-          'ctcp-empty ?n nick)
-       (while queries
-         (let* ((type (upcase (car (split-string (car queries)))))
-                (hook (intern-soft (concat "erc-ctcp-query-" type "-hook"))))
-           (if (and hook (boundp hook))
-               (if (string-equal type "ACTION")
-                   (run-hook-with-args-until-success
-                    hook proc parsed nick login host
-                    (car (erc-response.command-args parsed))
-                    (car queries))
-                 (when erc-paranoid
-                   (if (erc-current-nick-p
-                        (car (erc-response.command-args parsed)))
-                       (erc-display-message
-                        parsed 'error 'active 'ctcp-request
-                        ?n nick ?u login ?h host ?r (car queries))
-                     (erc-display-message
-                      parsed 'error 'active 'ctcp-request-to
-                      ?n nick ?u login ?h host ?r (car queries)
-                      ?t (car (erc-response.command-args parsed)))))
-                 (run-hook-with-args-until-success
-                  hook proc nick login host
-                  (car (erc-response.command-args parsed))
-                  (car queries)))
-             (erc-display-message
-              parsed (list 'notice 'error) proc
-              'undefined-ctcp)))
-         (setq queries (cdr queries)))))))
+          (erc-display-message
+           parsed (list 'notice 'error) proc
+           'ctcp-empty ?n nick)
+        (while queries
+          (let* ((type (upcase (car (split-string (car queries)))))
+                 (hook (intern-soft (concat "erc-ctcp-query-" type "-hook"))))
+            (if (and hook (boundp hook))
+                (if (string-equal type "ACTION")
+                    (run-hook-with-args-until-success
+                     hook proc parsed nick login host
+                     (car (erc-response.command-args parsed))
+                     (car queries))
+                  (when erc-paranoid
+                    (if (erc-current-nick-p
+                         (car (erc-response.command-args parsed)))
+                        (erc-display-message
+                         parsed 'error 'active 'ctcp-request
+                         ?n nick ?u login ?h host ?r (car queries))
+                      (erc-display-message
+                       parsed 'error 'active 'ctcp-request-to
+                       ?n nick ?u login ?h host ?r (car queries)
+                       ?t (car (erc-response.command-args parsed)))))
+                  (run-hook-with-args-until-success
+                   hook proc nick login host
+                   (car (erc-response.command-args parsed))
+                   (car queries)))
+              (erc-display-message
+               parsed (list 'notice 'error) proc
+               'undefined-ctcp)))
+          (setq queries (cdr queries)))))))
 
 (defvar erc-ctcp-query-ACTION-hook '(erc-ctcp-query-ACTION))
 
@@ -4463,9 +4523,9 @@ See also `erc-display-message'."
   "Respond to a CTCP ACTION query."
   (when (string-match "^ACTION\\s-\\(.*\\)\\s-*$" msg)
     (let ((s (match-string 1 msg))
-         (buf (or (erc-get-buffer to proc)
-                  (erc-get-buffer nick proc)
-                  (process-buffer proc))))
+          (buf (or (erc-get-buffer to proc)
+                   (erc-get-buffer nick proc)
+                   (process-buffer proc))))
       (erc-display-message
        parsed 'action buf
        'ACTION ?n nick ?u login ?h host ?a s))))
@@ -4477,7 +4537,7 @@ See also `erc-display-message'."
   (when (string-match "^CLIENTINFO\\(\\s-*\\|\\s-+.*\\)$" msg)
     (let ((s (erc-client-info (erc-trim-string (match-string 1 msg)))))
       (unless erc-disable-ctcp-replies
-         (erc-send-ctcp-notice nick (format "CLIENTINFO %s" s)))))
+        (erc-send-ctcp-notice nick (format "CLIENTINFO %s" s)))))
   nil)
 
 (defvar erc-ctcp-query-ECHO-hook '(erc-ctcp-query-ECHO))
@@ -4486,7 +4546,7 @@ See also `erc-display-message'."
   (when (string-match "^ECHO\\s-+\\(.*\\)\\s-*$" msg)
     (let ((s (match-string 1 msg)))
       (unless erc-disable-ctcp-replies
-       (erc-send-ctcp-notice nick (format "ECHO %s" s)))))
+        (erc-send-ctcp-notice nick (format "ECHO %s" s)))))
   nil)
 
 (defvar erc-ctcp-query-FINGER-hook '(erc-ctcp-query-FINGER))
@@ -4494,15 +4554,15 @@ See also `erc-display-message'."
   "Respond to a CTCP FINGER query."
   (unless erc-disable-ctcp-replies
     (let ((s (if erc-anonymous-login
-                (format "FINGER I'm %s." (erc-current-nick))
-              (format "FINGER %s (%s@%s)."
-                      (user-full-name)
-                      (user-login-name)
-                      (system-name))))
-         (ns (erc-time-diff erc-server-last-sent-time (erc-current-time))))
-       (when (> ns 0)
-           (setq s (concat s " Idle for " (erc-sec-to-time ns))))
-       (erc-send-ctcp-notice nick s)))
+                 (format "FINGER I'm %s." (erc-current-nick))
+               (format "FINGER %s (%s@%s)."
+                       (user-full-name)
+                       (user-login-name)
+                       (system-name))))
+          (ns (erc-time-diff erc-server-last-sent-time (erc-current-time))))
+      (when (> ns 0)
+        (setq s (concat s " Idle for " (erc-sec-to-time ns))))
+      (erc-send-ctcp-notice nick s)))
   nil)
 
 (defvar erc-ctcp-query-PING-hook '(erc-ctcp-query-PING))
@@ -4511,7 +4571,7 @@ See also `erc-display-message'."
   (when (string-match "^PING\\s-+\\(.*\\)" msg)
     (unless erc-disable-ctcp-replies
       (let ((arg (match-string 1 msg)))
-       (erc-send-ctcp-notice nick (format "PING %s" arg)))))
+        (erc-send-ctcp-notice nick (format "PING %s" arg)))))
   nil)
 
 (defvar erc-ctcp-query-TIME-hook '(erc-ctcp-query-TIME))
@@ -4534,19 +4594,19 @@ See also `erc-display-message'."
   (unless erc-disable-ctcp-replies
     (erc-send-ctcp-notice
      nick (format
-          "VERSION \C-bERC\C-b %s - an IRC client for emacs (\C-b%s\C-b)"
-          erc-version-string
-          erc-official-location)))
+           "VERSION \C-bERC\C-b - an IRC client for Emacs %s (\C-b%s\C-b)"
+           emacs-version
+           erc-official-location)))
   nil)
 
 (defun erc-process-ctcp-reply (proc parsed nick login host msg)
   "Process MSG as a CTCP reply."
   (let* ((type (car (split-string msg)))
-        (hook (intern (concat "erc-ctcp-reply-" type "-hook"))))
+         (hook (intern (concat "erc-ctcp-reply-" type "-hook"))))
     (if (boundp hook)
-       (run-hook-with-args-until-success
-        hook proc nick login host
-        (car (erc-response.command-args parsed)) msg)
+        (run-hook-with-args-until-success
+         hook proc nick login host
+         (car (erc-response.command-args parsed)) msg)
       (erc-display-message
        parsed 'notice 'active
        'CTCP-UNKNOWN ?n nick ?u login ?h host ?m msg))))
@@ -4588,16 +4648,16 @@ See also `erc-display-message'."
       nil
     (let ((time (match-string 1 msg)))
       (condition-case nil
-         (let ((delta (erc-time-diff (string-to-number time)
-                                     (erc-current-time))))
-           (erc-display-message
-            nil 'notice 'active
-            'CTCP-PING ?n nick
-            ?t (erc-sec-to-time delta)))
-       (range-error
-        (erc-display-message
-         nil 'error 'active
-         'bad-ping-response ?n nick ?t time))))))
+          (let ((delta (erc-time-diff (string-to-number time)
+                                      (erc-current-time))))
+            (erc-display-message
+             nil 'notice 'active
+             'CTCP-PING ?n nick
+             ?t (erc-sec-to-time delta)))
+        (range-error
+         (erc-display-message
+          nil 'error 'active
+          'bad-ping-response ?n nick ?t time))))))
 
 (defvar erc-ctcp-reply-TIME-hook '(erc-ctcp-reply-TIME))
 (defun erc-ctcp-reply-TIME (_proc nick _login _host _to msg)
@@ -4627,31 +4687,31 @@ If non-nil, return from being away."
   (let ((sessionbuf (process-buffer proc)))
     (when sessionbuf
       (with-current-buffer sessionbuf
-       (when erc-away-nickname
-         (erc-log (format "erc-process-away: away-nick: %s, away-p: %s"
-                          erc-away-nickname away-p))
-         (erc-cmd-NICK (if away-p
-                           erc-away-nickname
-                         erc-nick)))
-       (cond
-        (away-p
-         (setq erc-away (current-time)))
-        (t
-         (let ((away-time erc-away))
-           ;; away must be set to NIL BEFORE sending anything to prevent
-           ;; an infinite recursion
-           (setq erc-away nil)
-           (with-current-buffer (erc-active-buffer)
-             (when erc-public-away-p
-               (erc-send-action
-                (erc-default-target)
-                (if away-time
-                    (format "is back (gone for %s)"
-                            (erc-sec-to-time
-                             (erc-time-diff
-                              (erc-emacs-time-to-erc-time away-time)
-                              (erc-current-time))))
-                  "is back")))))))))
+        (when erc-away-nickname
+          (erc-log (format "erc-process-away: away-nick: %s, away-p: %s"
+                           erc-away-nickname away-p))
+          (erc-cmd-NICK (if away-p
+                            erc-away-nickname
+                          erc-nick)))
+        (cond
+         (away-p
+          (setq erc-away (current-time)))
+         (t
+          (let ((away-time erc-away))
+            ;; away must be set to NIL BEFORE sending anything to prevent
+            ;; an infinite recursion
+            (setq erc-away nil)
+            (with-current-buffer (erc-active-buffer)
+              (when erc-public-away-p
+                (erc-send-action
+                 (erc-default-target)
+                 (if away-time
+                     (format "is back (gone for %s)"
+                             (erc-sec-to-time
+                              (erc-time-diff
+                               (erc-emacs-time-to-erc-time away-time)
+                               (erc-current-time))))
+                   "is back")))))))))
     (erc-update-mode-line)))
 
 ;;;; List of channel members handling
@@ -4674,30 +4734,30 @@ channel buffer.
 
 See also `erc-channel-begin-receiving-names'."
   (maphash (lambda (nick _user)
-            (if (null (gethash nick erc-channel-new-member-names))
-                (erc-remove-channel-user nick)))
-          erc-channel-users)
+             (if (null (gethash nick erc-channel-new-member-names))
+                 (erc-remove-channel-user nick)))
+           erc-channel-users)
   (setq erc-channel-new-member-names nil))
 
 (defun erc-parse-prefix ()
   "Return an alist of valid prefix character types and their representations.
 Example: (operator) o => @, (voiced) v => +."
   (let ((str (or (cdr (assoc "PREFIX" (erc-with-server-buffer
-                                       erc-server-parameters)))
-                ;; provide a sane default
-                "(ov)@+"))
-       types chars)
+                                        erc-server-parameters)))
+                 ;; provide a sane default
+                 "(qaohv)~&@%+"))
+        types chars)
     (when (string-match "^(\\([^)]+\\))\\(.+\\)$" str)
       (setq types (match-string 1 str)
-           chars (match-string 2 str))
+            chars (match-string 2 str))
       (let ((len (min (length types) (length chars)))
-           (i 0)
-           (alist nil))
-       (while (< i len)
-         (setq alist (cons (cons (elt types i) (elt chars i))
-                           alist))
-         (setq i (1+ i)))
-       alist))))
+            (i 0)
+            (alist nil))
+        (while (< i len)
+          (setq alist (cons (cons (elt types i) (elt chars i))
+                            alist))
+          (setq i (1+ i)))
+        alist))))
 
 (defun erc-channel-receive-names (names-string)
   "This function is for internal use only.
@@ -4705,40 +4765,39 @@ Example: (operator) o => @, (voiced) v => +."
 Update `erc-channel-users' according to NAMES-STRING.
 NAMES-STRING is a string listing some of the names on the
 channel."
-  (let (prefix op-ch voice-ch names name op voice)
-    (setq prefix (erc-parse-prefix))
-    (setq op-ch (cdr (assq ?o prefix))
-         voice-ch (cdr (assq ?v prefix)))
-    ;; We need to delete "" because in XEmacs, (split-string "a ")
-    ;; returns ("a" "").
-    (setq names (delete "" (split-string names-string)))
+  (let* ((prefix (erc-parse-prefix))
+         (voice-ch (cdr (assq ?v prefix)))
+         (op-ch (cdr (assq ?o prefix)))
+         (hop-ch (cdr (assq ?h prefix)))
+         (adm-ch (cdr (assq ?a prefix)))
+         (own-ch (cdr (assq ?q prefix)))
+         (names (delete "" (split-string names-string)))
+        name op voice halfop admin owner)
     (let ((erc-channel-members-changed-hook nil))
       (dolist (item names)
-       (let ((updatep t))
-         (if (rassq (elt item 0) prefix)
-             (cond ((= (length item) 1)
-                    (setq updatep nil))
-                   ((eq (elt item 0) op-ch)
-                    (setq name (substring item 1)
-                          op 'on
-                          voice 'off))
-                   ((eq (elt item 0) voice-ch)
-                    (setq name (substring item 1)
-                          op 'off
-                          voice 'on))
-                   (t (setq name (substring item 1)
-                            op 'off
-                            voice 'off)))
-           (setq name item
-                 op 'off
-                 voice 'off))
-         (when updatep
-           (puthash (erc-downcase name) t
-                    erc-channel-new-member-names)
-           (erc-update-current-channel-member
-            name name t op voice)))))
+        (let ((updatep t)
+             (ch (aref item 0)))
+          (setq name item op 'off voice 'off halfop 'off admin 'off owner 'off)
+          (if (rassq ch prefix)
+              (if (= (length item) 1)
+                 (setq updatep nil)
+               (setq name (substring item 1))
+               (setf (pcase ch
+                       ((pred (eq voice-ch)) voice)
+                       ((pred (eq hop-ch))   halfop)
+                       ((pred (eq op-ch))    op)
+                       ((pred (eq adm-ch))   admin)
+                       ((pred (eq own-ch))   owner)
+                       (_ (error "Unknown prefix char `%S'" ch) voice))
+                     'on)))
+          (when updatep
+            (puthash (erc-downcase name) t
+                     erc-channel-new-member-names)
+            (erc-update-current-channel-member
+             name name t voice halfop op admin owner)))))
     (run-hooks 'erc-channel-members-changed-hook)))
 
+
 (defcustom erc-channel-members-changed-hook nil
   "This hook is called every time the variable `channel-members' changes.
 The buffer where the change happened is current while this hook is called."
@@ -4746,15 +4805,15 @@ The buffer where the change happened is current while this hook is called."
   :type 'hook)
 
 (defun erc-update-user-nick (nick &optional new-nick
-                                 host login full-name info)
+                                  host login full-name info)
   "Update the stored user information for the user with nickname NICK.
 
 See also: `erc-update-user'."
   (erc-update-user (erc-get-server-user nick) new-nick
-                  host login full-name info))
+                   host login full-name info))
 
 (defun erc-update-user (user &optional new-nick
-                            host login full-name info)
+                             host login full-name info)
   "Update user info for USER.  USER must be an erc-server-user
 struct.  Any of NEW-NICK, HOST, LOGIN, FULL-NAME, INFO which are
 non-nil and not equal to the existing values for USER are used to
@@ -4766,45 +4825,44 @@ which USER is a member, and t is returned."
   (let (changed)
     (when user
       (when (and new-nick
-                (not (equal (erc-server-user-nickname user)
-                            new-nick)))
-       (setq changed t)
-       (erc-change-user-nickname user new-nick))
+                 (not (equal (erc-server-user-nickname user)
+                             new-nick)))
+        (setq changed t)
+        (erc-change-user-nickname user new-nick))
       (when (and host
-                (not (equal (erc-server-user-host user) host)))
-       (setq changed t)
-       (setf (erc-server-user-host user) host))
+                 (not (equal (erc-server-user-host user) host)))
+        (setq changed t)
+        (setf (erc-server-user-host user) host))
       (when (and login
-                (not (equal (erc-server-user-login user) login)))
-       (setq changed t)
-       (setf (erc-server-user-login user) login))
+                 (not (equal (erc-server-user-login user) login)))
+        (setq changed t)
+        (setf (erc-server-user-login user) login))
       (when (and full-name
-                (not (equal (erc-server-user-full-name user)
-                            full-name)))
-       (setq changed t)
-       (setf (erc-server-user-full-name user) full-name))
+                 (not (equal (erc-server-user-full-name user)
+                             full-name)))
+        (setq changed t)
+        (setf (erc-server-user-full-name user) full-name))
       (when (and info
-                (not (equal (erc-server-user-info user) info)))
-       (setq changed t)
-       (setf (erc-server-user-info user) info))
+                 (not (equal (erc-server-user-info user) info)))
+        (setq changed t)
+        (setf (erc-server-user-info user) info))
       (if changed
-         (dolist (buf (erc-server-user-buffers user))
-           (if (buffer-live-p buf)
-               (with-current-buffer buf
-                 (run-hooks 'erc-channel-members-changed-hook))))))
+          (dolist (buf (erc-server-user-buffers user))
+            (if (buffer-live-p buf)
+                (with-current-buffer buf
+                  (run-hooks 'erc-channel-members-changed-hook))))))
     changed))
 
 (defun erc-update-current-channel-member
-  (nick new-nick &optional add op voice host login full-name info
-       update-message-time)
+  (nick new-nick &optional add voice halfop op admin owner host login full-name info
+        update-message-time)
   "Update the stored user information for the user with nickname NICK.
 `erc-update-user' is called to handle changes to nickname,
-HOST, LOGIN, FULL-NAME, and INFO.  If OP or VOICE are non-nil,
-they must be equal to either `on' or `off', in which case the
-operator or voice status of the user in the current channel is
-changed accordingly.  If UPDATE-MESSAGE-TIME is non-nil, the
-last-message-time of the user in the current channel is set
-to (current-time).
+HOST, LOGIN, FULL-NAME, and INFO.  If VOICE HALFOP OP ADMIN or OWNER
+are non-nil, they must be equal to either `on' or `off', in which
+case the status of the user in the current channel is changed accordingly.
+If UPDATE-MESSAGE-TIME is non-nil, the last-message-time of the user
+ in the current channel is set to (current-time).
 
 If ADD is non-nil, the user will be added with the specified
 information if it is not already present in the user or channel
@@ -4815,74 +4873,104 @@ If, and only if, changes are made, or the user is added,
 
 See also: `erc-update-user' and `erc-update-channel-member'."
   (let* (changed user-changed
-        (channel-data (erc-get-channel-user nick))
-        (cuser (cdr channel-data))
-        (user (if channel-data (car channel-data)
-                (erc-get-server-user nick))))
+                 (channel-data (erc-get-channel-user nick))
+                 (cuser (cdr channel-data))
+                 (user (if channel-data (car channel-data)
+                         (erc-get-server-user nick))))
     (if cuser
-       (progn
-         (erc-log (format "update-member: user = %S, cuser = %S" user cuser))
-         (when (and op
-                    (not (eq (erc-channel-user-op cuser) op)))
-             (setq changed t)
-           (setf (erc-channel-user-op cuser)
-                 (cond ((eq op 'on) t)
-                       ((eq op 'off) nil)
-                       (t op))))
-         (when (and voice
-                    (not (eq (erc-channel-user-voice cuser) voice)))
-             (setq changed t)
-           (setf (erc-channel-user-voice cuser)
-                 (cond ((eq voice 'on) t)
-                       ((eq voice 'off) nil)
-                       (t voice))))
-         (when update-message-time
-           (setf (erc-channel-user-last-message-time cuser) (current-time)))
-         (setq user-changed
-               (erc-update-user user new-nick
-                                host login full-name info)))
+        (progn
+          (erc-log (format "update-member: user = %S, cuser = %S" user cuser))
+          (when (and voice
+                     (not (eq (erc-channel-user-voice cuser) voice)))
+            (setq changed t)
+            (setf (erc-channel-user-voice cuser)
+                  (cond ((eq voice 'on) t)
+                        ((eq voice 'off) nil)
+                        (t voice))))
+          (when (and halfop
+                     (not (eq (erc-channel-user-halfop cuser) halfop)))
+            (setq changed t)
+            (setf (erc-channel-user-halfop cuser)
+                  (cond ((eq halfop 'on) t)
+                        ((eq halfop 'off) nil)
+                        (t halfop))))
+          (when (and op
+                     (not (eq (erc-channel-user-op cuser) op)))
+            (setq changed t)
+            (setf (erc-channel-user-op cuser)
+                  (cond ((eq op 'on) t)
+                        ((eq op 'off) nil)
+                        (t op))))
+          (when (and admin
+                     (not (eq (erc-channel-user-admin cuser) admin)))
+            (setq changed t)
+            (setf (erc-channel-user-admin cuser)
+                  (cond ((eq admin 'on) t)
+                        ((eq admin 'off) nil)
+                        (t admin))))
+          (when (and owner
+                     (not (eq (erc-channel-user-owner cuser) owner)))
+            (setq changed t)
+            (setf (erc-channel-user-owner cuser)
+                  (cond ((eq owner 'on) t)
+                        ((eq owner 'off) nil)
+                        (t owner))))
+          (when update-message-time
+            (setf (erc-channel-user-last-message-time cuser) (current-time)))
+          (setq user-changed
+                (erc-update-user user new-nick
+                                 host login full-name info)))
       (when add
-       (if (null user)
-           (progn
-             (setq user (make-erc-server-user
-                         :nickname nick
-                         :host host
-                         :full-name full-name
-                         :login login
-                         :info info
-                         :buffers (list (current-buffer))))
-             (erc-add-server-user nick user))
-         (setf (erc-server-user-buffers user)
-               (cons (current-buffer)
-                     (erc-server-user-buffers user))))
-       (setq cuser (make-erc-channel-user
-                    :op (cond ((eq op 'on) t)
-                              ((eq op 'off) nil)
-                              (t op))
-                    :voice (cond ((eq voice 'on) t)
-                                 ((eq voice 'off) nil)
-                                 (t voice))
-                    :last-message-time
-                    (if update-message-time (current-time))))
-       (puthash (erc-downcase nick) (cons user cuser)
-                erc-channel-users)
-       (setq changed t)))
+        (if (null user)
+            (progn
+              (setq user (make-erc-server-user
+                          :nickname nick
+                          :host host
+                          :full-name full-name
+                          :login login
+                          :info info
+                          :buffers (list (current-buffer))))
+              (erc-add-server-user nick user))
+          (setf (erc-server-user-buffers user)
+                (cons (current-buffer)
+                      (erc-server-user-buffers user))))
+        (setq cuser (make-erc-channel-user
+                     :voice (cond ((eq voice 'on) t)
+                                  ((eq voice 'off) nil)
+                                  (t voice))
+                     :halfop (cond ((eq halfop 'on) t)
+                                ((eq halfop 'off) nil)
+                                (t halfop))
+                     :op (cond ((eq op 'on) t)
+                               ((eq op 'off) nil)
+                               (t op))
+                     :admin (cond ((eq admin 'on) t)
+                                  ((eq admin 'off) nil)
+                                  (t admin))
+                     :owner (cond ((eq owner 'on) t)
+                                  ((eq owner 'off) nil)
+                                  (t owner))
+                     :last-message-time
+                     (if update-message-time (current-time))))
+        (puthash (erc-downcase nick) (cons user cuser)
+                 erc-channel-users)
+        (setq changed t)))
     (when (and changed (null user-changed))
       (run-hooks 'erc-channel-members-changed-hook))
     (or changed user-changed add)))
 
 (defun erc-update-channel-member (channel nick new-nick
-                                 &optional add op voice host login
-                                 full-name info update-message-time)
+                                          &optional add voice halfop op admin owner host login
+                                          full-name info update-message-time)
   "Update user and channel information for the user with
 nickname NICK in channel CHANNEL.
 
 See also: `erc-update-current-channel-member'."
   (erc-with-buffer
-   (channel)
-   (erc-update-current-channel-member nick new-nick add op voice host
-                                     login full-name info
-                                     update-message-time)))
+      (channel)
+    (erc-update-current-channel-member nick new-nick add voice halfop op admin owner host
+                                       login full-name info
+                                       update-message-time)))
 
 (defun erc-remove-current-channel-member (nick)
   "Remove NICK from current channel membership list.
@@ -4897,8 +4985,8 @@ Runs `erc-channel-members-changed-hook'."
 
 See also `erc-remove-current-channel-member'."
   (erc-with-buffer
-   (channel)
-   (erc-remove-current-channel-member nick)))
+      (channel)
+    (erc-remove-current-channel-member nick)))
 
 (defun erc-update-channel-topic (channel topic &optional modify)
   "Find a buffer for CHANNEL and set the TOPIC for it.
@@ -4907,40 +4995,40 @@ If optional MODIFY is 'append or 'prepend, then append or prepend the
 TOPIC string to the current topic."
   (erc-with-buffer (channel)
     (cond ((eq modify 'append)
-          (setq erc-channel-topic (concat erc-channel-topic topic)))
-         ((eq modify 'prepend)
-          (setq erc-channel-topic (concat topic erc-channel-topic)))
-         (t (setq erc-channel-topic topic)))
+           (setq erc-channel-topic (concat erc-channel-topic topic)))
+          ((eq modify 'prepend)
+           (setq erc-channel-topic (concat topic erc-channel-topic)))
+          (t (setq erc-channel-topic topic)))
     (erc-update-mode-line-buffer (current-buffer))))
 
 (defun erc-set-modes (tgt mode-string)
   "Set the modes for the TGT provided as MODE-STRING."
   (let* ((modes (erc-parse-modes mode-string))
-        (add-modes (nth 0 modes))
-        ;; list of triples: (mode-char 'on/'off argument)
-        (arg-modes (nth 2 modes)))
+         (add-modes (nth 0 modes))
+         ;; list of triples: (mode-char 'on/'off argument)
+         (arg-modes (nth 2 modes)))
     (cond ((erc-channel-p tgt); channel modes
-          (let ((buf (and erc-server-process
-                          (erc-get-buffer tgt erc-server-process))))
-            (when buf
-              (with-current-buffer buf
-                (setq erc-channel-modes add-modes)
-                (setq erc-channel-user-limit nil)
-                (setq erc-channel-key nil)
-                (while arg-modes
-                  (let ((mode (nth 0 (car arg-modes)))
-                        (onoff (nth 1 (car arg-modes)))
-                        (arg (nth 2 (car arg-modes))))
-                    (cond ((string-match "^[Ll]" mode)
-                           (erc-update-channel-limit tgt onoff arg))
-                          ((string-match "^[Kk]" mode)
-                           (erc-update-channel-key tgt onoff arg))
-                          (t nil)))
-                  (setq arg-modes (cdr arg-modes)))
-                (erc-update-mode-line-buffer buf)))))
-         ;; we do not keep our nick's modes yet
-         ;;(t (setq erc-user-modes add-modes))
-         )
+           (let ((buf (and erc-server-process
+                           (erc-get-buffer tgt erc-server-process))))
+             (when buf
+               (with-current-buffer buf
+                 (setq erc-channel-modes add-modes)
+                 (setq erc-channel-user-limit nil)
+                 (setq erc-channel-key nil)
+                 (while arg-modes
+                   (let ((mode (nth 0 (car arg-modes)))
+                         (onoff (nth 1 (car arg-modes)))
+                         (arg (nth 2 (car arg-modes))))
+                     (cond ((string-match "^[Ll]" mode)
+                            (erc-update-channel-limit tgt onoff arg))
+                           ((string-match "^[Kk]" mode)
+                            (erc-update-channel-key tgt onoff arg))
+                           (t nil)))
+                   (setq arg-modes (cdr arg-modes)))
+                 (erc-update-mode-line-buffer buf)))))
+          ;; we do not keep our nick's modes yet
+          ;;(t (setq erc-user-modes add-modes))
+          )
     ))
 
 (defun erc-sort-strings (list-of-strings)
@@ -4963,109 +5051,114 @@ arg-modes is a list of triples of the form:
   (MODE-CHAR ON/OFF ARGUMENT)."
   (if (string-match "^\\s-*\\(\\S-+\\)\\(\\s-.*$\\|$\\)" mode-string)
       (let ((chars (mapcar 'char-to-string (match-string 1 mode-string)))
-           ;; arguments in channel modes
-           (args-str (match-string 2 mode-string))
-           (args nil)
-           (add-modes nil)
-           (remove-modes nil)
-           (arg-modes nil); list of triples: (mode-char 'on/'off argument)
-           (add-p t))
-       ;; make the argument list
-       (while (string-match "^\\s-*\\(\\S-+\\)\\(\\s-+.*$\\|$\\)" args-str)
-         (setq args (cons (match-string 1 args-str) args))
-         (setq args-str (match-string 2 args-str)))
-       (setq args (nreverse args))
-       ;; collect what modes changed, and match them with arguments
-       (while chars
-         (cond ((string= (car chars) "+") (setq add-p t))
-               ((string= (car chars) "-") (setq add-p nil))
-               ((string-match "^[ovbOVB]" (car chars))
-                (setq arg-modes (cons (list (car chars)
-                                            (if add-p 'on 'off)
-                                            (if args (car args) nil))
-                                      arg-modes))
-                (if args (setq args (cdr args))))
-               ((string-match "^[LlKk]" (car chars))
-                (setq arg-modes (cons (list (car chars)
-                                            (if add-p 'on 'off)
-                                            (if (and add-p args)
-                                                (car args) nil))
-                                      arg-modes))
-                (if (and add-p args) (setq args (cdr args))))
-               (add-p (setq add-modes (cons (car chars) add-modes)))
-               (t (setq remove-modes (cons (car chars) remove-modes))))
-         (setq chars (cdr chars)))
-       (setq add-modes (nreverse add-modes))
-       (setq remove-modes (nreverse remove-modes))
-       (setq arg-modes (nreverse arg-modes))
-       (list add-modes remove-modes arg-modes))
+            ;; arguments in channel modes
+            (args-str (match-string 2 mode-string))
+            (args nil)
+            (add-modes nil)
+            (remove-modes nil)
+            (arg-modes nil); list of triples: (mode-char 'on/'off argument)
+            (add-p t))
+        ;; make the argument list
+        (while (string-match "^\\s-*\\(\\S-+\\)\\(\\s-+.*$\\|$\\)" args-str)
+          (setq args (cons (match-string 1 args-str) args))
+          (setq args-str (match-string 2 args-str)))
+        (setq args (nreverse args))
+        ;; collect what modes changed, and match them with arguments
+        (while chars
+          (cond ((string= (car chars) "+") (setq add-p t))
+                ((string= (car chars) "-") (setq add-p nil))
+                ((string-match "^[qaovhbQAOVHB]" (car chars))
+                 (setq arg-modes (cons (list (car chars)
+                                             (if add-p 'on 'off)
+                                             (if args (car args) nil))
+                                       arg-modes))
+                 (if args (setq args (cdr args))))
+                ((string-match "^[LlKk]" (car chars))
+                 (setq arg-modes (cons (list (car chars)
+                                             (if add-p 'on 'off)
+                                             (if (and add-p args)
+                                                 (car args) nil))
+                                       arg-modes))
+                 (if (and add-p args) (setq args (cdr args))))
+                (add-p (setq add-modes (cons (car chars) add-modes)))
+                (t (setq remove-modes (cons (car chars) remove-modes))))
+          (setq chars (cdr chars)))
+        (setq add-modes (nreverse add-modes))
+        (setq remove-modes (nreverse remove-modes))
+        (setq arg-modes (nreverse arg-modes))
+        (list add-modes remove-modes arg-modes))
     nil))
 
-(defun erc-update-modes (tgt mode-string &optional nick host login)
+(defun erc-update-modes (tgt mode-string &optional _nick _host _login)
   "Update the mode information for TGT, provided as MODE-STRING.
 Optional arguments: NICK, HOST and LOGIN - the attributes of the
 person who changed the modes."
   ;; FIXME: neither of nick, host, and login are used!
   (let* ((modes (erc-parse-modes mode-string))
-        (add-modes (nth 0 modes))
-        (remove-modes (nth 1 modes))
-        ;; list of triples: (mode-char 'on/'off argument)
-        (arg-modes (nth 2 modes)))
+         (add-modes (nth 0 modes))
+         (remove-modes (nth 1 modes))
+         ;; list of triples: (mode-char 'on/'off argument)
+         (arg-modes (nth 2 modes)))
     ;; now parse the modes changes and do the updates
     (cond ((erc-channel-p tgt); channel modes
-          (let ((buf (and erc-server-process
-                          (erc-get-buffer tgt erc-server-process))))
-            (when buf
-              ;; FIXME! This used to have an original buffer
-              ;; variable, but it never switched back to the original
-              ;; buffer. Is this wanted behavior?
-              (set-buffer buf)
-              (if (not (boundp 'erc-channel-modes))
-                  (setq erc-channel-modes nil))
-              (while remove-modes
-                (setq erc-channel-modes (delete (car remove-modes)
-                                                erc-channel-modes)
-                      remove-modes (cdr remove-modes)))
-              (while add-modes
-                (setq erc-channel-modes (cons (car add-modes)
-                                              erc-channel-modes)
-                      add-modes (cdr add-modes)))
-              (setq erc-channel-modes (erc-sort-strings erc-channel-modes))
-              (while arg-modes
-                (let ((mode (nth 0 (car arg-modes)))
-                      (onoff (nth 1 (car arg-modes)))
-                      (arg (nth 2 (car arg-modes))))
-                  (cond ((string-match "^[oO]" mode)
-                         (erc-update-channel-member tgt arg arg nil onoff))
-                        ((string-match "^[Vv]" mode)
-                         (erc-update-channel-member tgt arg arg nil nil
-                                                    onoff))
-                        ((string-match "^[Ll]" mode)
-                         (erc-update-channel-limit tgt onoff arg))
-                        ((string-match "^[Kk]" mode)
-                         (erc-update-channel-key tgt onoff arg))
-                        (t nil)); only ops are tracked now
-                  (setq arg-modes (cdr arg-modes))))
-              (erc-update-mode-line buf))))
-         ;; nick modes - ignored at this point
-         (t nil))))
+           (let ((buf (and erc-server-process
+                           (erc-get-buffer tgt erc-server-process))))
+             (when buf
+               ;; FIXME! This used to have an original buffer
+               ;; variable, but it never switched back to the original
+               ;; buffer. Is this wanted behavior?
+               (set-buffer buf)
+               (if (not (boundp 'erc-channel-modes))
+                   (setq erc-channel-modes nil))
+               (while remove-modes
+                 (setq erc-channel-modes (delete (car remove-modes)
+                                                 erc-channel-modes)
+                       remove-modes (cdr remove-modes)))
+               (while add-modes
+                 (setq erc-channel-modes (cons (car add-modes)
+                                               erc-channel-modes)
+                       add-modes (cdr add-modes)))
+               (setq erc-channel-modes (erc-sort-strings erc-channel-modes))
+               (while arg-modes
+                 (let ((mode (nth 0 (car arg-modes)))
+                       (onoff (nth 1 (car arg-modes)))
+                       (arg (nth 2 (car arg-modes))))
+                   (cond ((string-match "^[Vv]" mode)
+                          (erc-update-channel-member tgt arg arg nil onoff))
+                         ((string-match "^[hH]" mode)
+                          (erc-update-channel-member tgt arg arg nil nil onoff))
+                         ((string-match "^[oO]" mode)
+                          (erc-update-channel-member tgt arg arg nil nil nil onoff))
+                         ((string-match "^[aA]" mode)
+                          (erc-update-channel-member tgt arg arg nil nil nil nil onoff))
+                         ((string-match "^[qQ]" mode)
+                          (erc-update-channel-member tgt arg arg nil nil nil nil nil onoff))
+                         ((string-match "^[Ll]" mode)
+                          (erc-update-channel-limit tgt onoff arg))
+                         ((string-match "^[Kk]" mode)
+                          (erc-update-channel-key tgt onoff arg))
+                         (t nil)); only ops are tracked now
+                   (setq arg-modes (cdr arg-modes))))
+               (erc-update-mode-line buf))))
+          ;; nick modes - ignored at this point
+          (t nil))))
 
 (defun erc-update-channel-limit (channel onoff n)
   ;; FIXME: what does ONOFF actually do?  -- Lawrence 2004-01-08
   "Update CHANNEL's user limit to N."
   (if (or (not (eq onoff 'on))
-         (and (stringp n) (string-match "^[0-9]+$" n)))
+          (and (stringp n) (string-match "^[0-9]+$" n)))
       (erc-with-buffer
-       (channel)
-      (cond ((eq onoff 'on) (setq erc-channel-user-limit (string-to-number n)))
-           (t (setq erc-channel-user-limit nil))))))
+          (channel)
+        (cond ((eq onoff 'on) (setq erc-channel-user-limit (string-to-number n)))
+              (t (setq erc-channel-user-limit nil))))))
 
 (defun erc-update-channel-key (channel onoff key)
   "Update CHANNEL's key to KEY if ONOFF is 'on or to nil if it's 'off."
   (erc-with-buffer
-   (channel)
-   (cond ((eq onoff 'on) (setq erc-channel-key key))
-        (t (setq erc-channel-key nil)))))
+      (channel)
+    (cond ((eq onoff 'on) (setq erc-channel-key key))
+          (t (setq erc-channel-key nil)))))
 
 (defun erc-handle-user-status-change (type nlh &optional l)
   "Handle changes in any user's status.
@@ -5078,9 +5171,9 @@ and L is a list containing additional TYPE-specific arguments.
 
 So far the following TYPE/L pairs are supported:
 
-       Event                   TYPE                   L
+       Event                    TYPE                   L
 
-    nickname change           'nick                (NEW-NICK)"
+    nickname change            'nick                (NEW-NICK)"
   (erc-log (format "user-change: type: %S  nlh: %S  l: %S" type nlh l))
   (cond
    ;; nickname change
@@ -5095,7 +5188,7 @@ See also variable `erc-notice-highlight-type'."
   (cond
    ((eq erc-notice-highlight-type 'prefix)
     (erc-put-text-property 0 (length erc-notice-prefix)
-                          'face 'erc-notice-face s)
+                           'face 'erc-notice-face s)
     s)
    ((eq erc-notice-highlight-type 'all)
     (erc-put-text-property 0 (length s) 'face 'erc-notice-face s)
@@ -5139,13 +5232,13 @@ Return a list of the three separate tokens."
   (cond
    ((string-match "^\\([^!\n]*\\)!\\([^@\n]*\\)@\\(.*\\)$" string)
     (list (match-string 1 string)
-         (match-string 2 string)
-         (match-string 3 string)))
+          (match-string 2 string)
+          (match-string 3 string)))
    ;; Some bogus bouncers send Nick!(null), try to live with that.
    ((string-match "^\\([^!\n]*\\)!\\(.*\\)$" string)
     (list (match-string 1 string)
-         ""
-         (match-string 2 string)))
+          ""
+          (match-string 2 string)))
    (t
     (list string "" ""))))
 
@@ -5156,7 +5249,7 @@ See also `erc-parse-user'."
   (car (erc-parse-user string)))
 
 (defun erc-put-text-properties (start end properties
-                               &optional object value-list)
+                                      &optional object value-list)
   "Set text-properties for OBJECT.
 
 START and END describe positions in OBJECT.
@@ -5164,7 +5257,7 @@ If VALUE-LIST is nil, set each property in PROPERTIES to t, else set
 each property to the corresponding value in VALUE-LIST."
   (unless value-list
     (setq value-list (mapcar (lambda (_x) t)
-                            properties)))
+                             properties)))
   (while (and properties value-list)
     (erc-put-text-property
      start end (pop properties) (pop value-list) object)))
@@ -5176,7 +5269,7 @@ each property to the corresponding value in VALUE-LIST."
 
 Specifically, return the position of `erc-insert-marker'."
   (or (and (boundp 'erc-insert-marker)
-          (markerp erc-insert-marker))
+           (markerp erc-insert-marker))
       (error "erc-insert-marker has no value, please report a bug"))
   (marker-position erc-insert-marker))
 
@@ -5206,43 +5299,43 @@ submitted line to be intentional."
   (interactive)
   (let ((now (float-time)))
     (if (or (not erc-accidental-paste-threshold-seconds)
-           (< erc-accidental-paste-threshold-seconds
-              (- now erc-last-input-time)))
-       (save-restriction
-         (widen)
-         (if (< (point) (erc-beg-of-input-line))
-             (erc-error "Point is not in the input area")
-           (let ((inhibit-read-only t)
-                 (str (erc-user-input))
-                 (old-buf (current-buffer)))
-             (if (and (not (erc-server-buffer-live-p))
-                      (not (erc-command-no-process-p str)))
-                 (erc-error "ERC: No process running")
-               (erc-set-active-buffer (current-buffer))
-               ;; Kill the input and the prompt
-               (delete-region (erc-beg-of-input-line)
-                              (erc-end-of-input-line))
-               (unwind-protect
-                   (erc-send-input str)
-                 ;; Fix the buffer if the command didn't kill it
-                 (when (buffer-live-p old-buf)
-                   (with-current-buffer old-buf
-                     (save-restriction
-                       (widen)
-                       (goto-char (point-max))
-                       (when (processp erc-server-process)
-                         (set-marker (process-mark erc-server-process) (point)))
-                       (set-marker erc-insert-marker (point))
-                       (let ((buffer-modified (buffer-modified-p)))
-                         (erc-display-prompt)
-                         (set-buffer-modified-p buffer-modified))))))
-
-               ;; Only when last hook has been run...
-               (run-hook-with-args 'erc-send-completed-hook str))))
-         (setq erc-last-input-time now))
+            (< erc-accidental-paste-threshold-seconds
+               (- now erc-last-input-time)))
+        (save-restriction
+          (widen)
+          (if (< (point) (erc-beg-of-input-line))
+              (erc-error "Point is not in the input area")
+            (let ((inhibit-read-only t)
+                  (str (erc-user-input))
+                  (old-buf (current-buffer)))
+              (if (and (not (erc-server-buffer-live-p))
+                       (not (erc-command-no-process-p str)))
+                  (erc-error "ERC: No process running")
+                (erc-set-active-buffer (current-buffer))
+                ;; Kill the input and the prompt
+                (delete-region (erc-beg-of-input-line)
+                               (erc-end-of-input-line))
+                (unwind-protect
+                    (erc-send-input str)
+                  ;; Fix the buffer if the command didn't kill it
+                  (when (buffer-live-p old-buf)
+                    (with-current-buffer old-buf
+                      (save-restriction
+                        (widen)
+                        (goto-char (point-max))
+                        (when (processp erc-server-process)
+                          (set-marker (process-mark erc-server-process) (point)))
+                        (set-marker erc-insert-marker (point))
+                        (let ((buffer-modified (buffer-modified-p)))
+                          (erc-display-prompt)
+                          (set-buffer-modified-p buffer-modified))))))
+
+                ;; Only when last hook has been run...
+                (run-hook-with-args 'erc-send-completed-hook str))))
+          (setq erc-last-input-time now))
       (switch-to-buffer "*ERC Accidental Paste Overflow*")
       (lwarn 'erc :warning
-            "You seem to have accidentally pasted some text!"))))
+             "You seem to have accidentally pasted some text!"))))
 
 (defun erc-user-input ()
   "Return the input of the user in the current buffer."
@@ -5261,7 +5354,7 @@ This returns non-nil only if we actually send anything."
   (cond
    ;; Ignore empty input
    ((if erc-send-whitespace-lines
-       (string= input "")
+        (string= input "")
       (string-match "\\`[ \t\r\f\n]*\\'" input))
     (when erc-warn-about-blank-lines
       (message "Blank line - ignoring...")
@@ -5269,48 +5362,46 @@ This returns non-nil only if we actually send anything."
     nil)
    (t
     (let ((str input)
-         (erc-insert-this t))
+          (erc-insert-this t))
       (setq erc-send-this t)
       (run-hook-with-args 'erc-send-pre-hook input)
       (when erc-send-this
-       (if (or (string-match "\n" str)
-               (not (string-match erc-command-regexp str)))
-           (mapc
-            (lambda (line)
-              (mapc
-               (lambda (line)
-                 ;; Insert what has to be inserted for this.
-                 (erc-display-msg line)
-                 (erc-process-input-line (concat line "\n")
-                                         (null erc-flood-protect) t))
-               (or (and erc-flood-protect (erc-split-line line))
-                   (list line))))
-            (split-string str "\n"))
-         ;; Insert the prompt along with the command.
-         (erc-display-command str)
-         (erc-process-input-line (concat str "\n") t nil))
-       t)))))
+        (if (or (string-match "\n" str)
+                (not (string-match erc-command-regexp str)))
+            (mapc
+             (lambda (line)
+               (mapc
+                (lambda (line)
+                  ;; Insert what has to be inserted for this.
+                  (erc-display-msg line)
+                  (erc-process-input-line (concat line "\n")
+                                          (null erc-flood-protect) t))
+                (or (and erc-flood-protect (erc-split-line line))
+                    (list line))))
+             (split-string str "\n"))
+          (erc-process-input-line (concat str "\n") t nil))
+        t)))))
 
 (defun erc-display-command (line)
   (when erc-insert-this
     (let ((insert-position (point)))
       (unless erc-hide-prompt
-       (erc-display-prompt nil nil (erc-command-indicator)
-                           (and (erc-command-indicator)
-                                'erc-command-indicator-face)))
+        (erc-display-prompt nil nil (erc-command-indicator)
+                            (and (erc-command-indicator)
+                                 'erc-command-indicator-face)))
       (let ((beg (point)))
-       (insert line)
-       (erc-put-text-property beg (point)
-                              'face 'erc-command-indicator-face)
-       (insert "\n"))
+        (insert line)
+        (erc-put-text-property beg (point)
+                               'face 'erc-command-indicator-face)
+        (insert "\n"))
       (when (processp erc-server-process)
-       (set-marker (process-mark erc-server-process) (point)))
+        (set-marker (process-mark erc-server-process) (point)))
       (set-marker erc-insert-marker (point))
       (save-excursion
-       (save-restriction
-         (narrow-to-region insert-position (point))
-         (run-hooks 'erc-send-modify-hook)
-         (run-hooks 'erc-send-post-hook))))))
+        (save-restriction
+          (narrow-to-region insert-position (point))
+          (run-hooks 'erc-send-modify-hook)
+          (run-hooks 'erc-send-post-hook))))))
 
 (defun erc-display-msg (line)
   "Display LINE as a message of the user to the current target at the
@@ -5319,18 +5410,18 @@ current position."
     (let ((insert-position (point)))
       (insert (erc-format-my-nick))
       (let ((beg (point)))
-       (insert line)
-       (erc-put-text-property beg (point)
-                              'face 'erc-input-face))
+        (insert line)
+        (erc-put-text-property beg (point)
+                               'face 'erc-input-face))
       (insert "\n")
       (when (processp erc-server-process)
-       (set-marker (process-mark erc-server-process) (point)))
+        (set-marker (process-mark erc-server-process) (point)))
       (set-marker erc-insert-marker (point))
       (save-excursion
-       (save-restriction
-         (narrow-to-region insert-position (point))
-         (run-hooks 'erc-send-modify-hook)
-         (run-hooks 'erc-send-post-hook))))))
+        (save-restriction
+          (narrow-to-region insert-position (point))
+          (run-hooks 'erc-send-modify-hook)
+          (run-hooks 'erc-send-post-hook))))))
 
 (defun erc-command-symbol (command)
   "Return the ERC command symbol for COMMAND if it exists and is bound."
@@ -5343,16 +5434,16 @@ If no command was given, return nil.  If command matches, return a
 list of the form: (command args) where both elements are strings."
   (when (string-match erc-command-regexp line)
     (let* ((cmd (erc-command-symbol (match-string 1 line)))
-          ;; note: return is nil, we apply this simply for side effects
-          (_canon-defun (while (and cmd (symbolp (symbol-function cmd)))
-                          (setq cmd (symbol-function cmd))))
-          (cmd-fun (or cmd #'erc-cmd-default))
-          (arg (if cmd
-                   (if (get cmd-fun 'do-not-parse-args)
-                       (format "%s" (match-string 2 line))
-                     (delete "" (split-string (erc-trim-string
-                                               (match-string 2 line)) " ")))
-                 line)))
+           ;; note: return is nil, we apply this simply for side effects
+           (_canon-defun (while (and cmd (symbolp (symbol-function cmd)))
+                           (setq cmd (symbol-function cmd))))
+           (cmd-fun (or cmd #'erc-cmd-default))
+           (arg (if cmd
+                    (if (get cmd-fun 'do-not-parse-args)
+                        (format "%s" (match-string 2 line))
+                      (delete "" (split-string (erc-trim-string
+                                                (match-string 2 line)) " ")))
+                  line)))
       (list cmd-fun arg))))
 
 (defun erc-split-multiline-safe (string)
@@ -5360,16 +5451,16 @@ list of the form: (command args) where both elements are strings."
 Do it only for STRING as the complete input, do not carry unfinished
 strings over to the next call."
   (let ((l ())
-       (i0 0)
-       (doit t))
+        (i0 0)
+        (doit t))
     (while doit
       (let ((i (string-match "\r?\n" string i0))
-           (s (substring string i0)))
-       (cond (i (setq l (cons (substring string i0 i) l))
-                (setq i0 (match-end 0)))
-             ((> (length s) 0)
-                (setq l (cons s l))(setq doit nil))
-             (t (setq doit nil)))))
+            (s (substring string i0)))
+        (cond (i (setq l (cons (substring string i0 i) l))
+                 (setq i0 (match-end 0)))
+              ((> (length s) 0)
+               (setq l (cons s l))(setq doit nil))
+              (t (setq doit nil)))))
     (nreverse l)))
 
 ;; nick handling
@@ -5377,15 +5468,15 @@ strings over to the next call."
 (defun erc-set-current-nick (nick)
   "Set the current nickname to NICK."
   (with-current-buffer (if (buffer-live-p (erc-server-buffer))
-                          (erc-server-buffer)
-                        (current-buffer))
+                           (erc-server-buffer)
+                         (current-buffer))
     (setq erc-server-current-nick nick)))
 
 (defun erc-current-nick ()
   "Return the current nickname."
   (with-current-buffer (if (buffer-live-p (erc-server-buffer))
-                          (erc-server-buffer)
-                        (current-buffer))
+                           (erc-server-buffer)
+                         (current-buffer))
     erc-server-current-nick))
 
 (defun erc-current-nick-p (nick)
@@ -5399,7 +5490,7 @@ This matches strings according to the IRC protocol's case convention.
 
 See also `erc-downcase'."
   (string= (erc-downcase nick1)
-          (erc-downcase nick2)))
+           (erc-downcase nick2)))
 
 ;; default target handling
 
@@ -5414,38 +5505,38 @@ See also `erc-downcase'."
 (defun erc-add-default-channel (channel)
   "Add CHANNEL to the default channel list."
   (let ((chl (downcase channel)))
-      (setq erc-default-recipients
-           (cons chl erc-default-recipients))))
+    (setq erc-default-recipients
+          (cons chl erc-default-recipients))))
 
 (defun erc-delete-default-channel (channel &optional buffer)
   "Delete CHANNEL from the default channel list."
   (with-current-buffer (if (and buffer
-                               (bufferp buffer))
-                          buffer
-                        (current-buffer))
+                                (bufferp buffer))
+                           buffer
+                         (current-buffer))
     (setq erc-default-recipients (delete (downcase channel)
-                                        erc-default-recipients))))
+                                         erc-default-recipients))))
 
 (defun erc-add-query (nickname)
   "Add QUERY'd NICKNAME to the default channel list.
 
 The previous default target of QUERY type gets removed."
   (let ((d1 (car erc-default-recipients))
-       (d2 (cdr erc-default-recipients))
-       (qt (cons 'QUERY (downcase nickname))))
+        (d2 (cdr erc-default-recipients))
+        (qt (cons 'QUERY (downcase nickname))))
     (setq erc-default-recipients (cons qt (if (and (listp d1)
-                                                  (eq (car d1) 'QUERY))
-                                             d2
-                                           erc-default-recipients)))))
+                                                   (eq (car d1) 'QUERY))
+                                              d2
+                                            erc-default-recipients)))))
 
 (defun erc-delete-query ()
   "Delete the topmost target if it is a QUERY."
 
   (let ((d1 (car erc-default-recipients))
-       (d2 (cdr erc-default-recipients)))
+        (d2 (cdr erc-default-recipients)))
     (if (and (listp d1)
-            (eq (car d1) 'QUERY))
-       (setq erc-default-recipients d2)
+             (eq (car d1) 'QUERY))
+        (setq erc-default-recipients d2)
       (error "Current target is not a QUERY"))))
 
 (defun erc-ignored-user-p (spec)
@@ -5457,7 +5548,7 @@ match, returns that regexp."
   (catch 'found
     (dolist (ignored (erc-with-server-buffer erc-ignore-list))
       (if (string-match ignored spec)
-         (throw 'found ignored)))))
+          (throw 'found ignored)))))
 
 (defun erc-ignored-reply-p (msg tgt proc)
   ;; FIXME: this docstring needs fixing -- Lawrence 2004-01-08
@@ -5467,12 +5558,12 @@ Takes a message MSG to a channel and returns non-nil if the addressed
 user matches any regexp in `erc-ignore-reply-list'."
   (let ((target-nick (erc-message-target msg)))
     (if (not target-nick)
-       nil
+        nil
       (erc-with-buffer (tgt proc)
-       (let ((user (erc-get-server-user target-nick)))
-         (when user
-           (erc-list-match erc-ignore-reply-list
-                           (erc-user-spec user))))))))
+        (let ((user (erc-get-server-user target-nick)))
+          (when user
+            (erc-list-match erc-ignore-reply-list
+                            (erc-user-spec user))))))))
 
 (defun erc-message-target (msg)
   "Return the addressed target in MSG.
@@ -5485,19 +5576,19 @@ The addressed target is the string before the first colon in MSG."
 (defun erc-user-spec (user)
   "Create a nick!user@host spec from a user struct."
   (let ((nick (erc-server-user-nickname user))
-       (host (erc-server-user-host user))
-       (login (erc-server-user-login user)))
-  (concat (or nick "")
-         "!"
-         (or login "")
-         "@"
-         (or host ""))))
+        (host (erc-server-user-host user))
+        (login (erc-server-user-login user)))
+    (concat (or nick "")
+            "!"
+            (or login "")
+            "@"
+            (or host ""))))
 
 (defun erc-list-match (lst str)
   "Return non-nil if any regexp in LST matches STR."
   (memq nil (mapcar (lambda (regexp)
-                     (not (string-match regexp str)))
-                   lst)))
+                      (not (string-match regexp str)))
+                    lst)))
 
 ;; other "toggles"
 
@@ -5509,9 +5600,9 @@ If ARG is positive, turns CTCP replies on.
 If ARG is non-nil and not positive, turns CTCP replies off."
   (interactive "P")
   (cond ((and (numberp arg) (> arg 0))
-        (setq erc-disable-ctcp-replies t))
-       (arg (setq erc-disable-ctcp-replies nil))
-       (t (setq erc-disable-ctcp-replies (not erc-disable-ctcp-replies))))
+         (setq erc-disable-ctcp-replies t))
+        (arg (setq erc-disable-ctcp-replies nil))
+        (t (setq erc-disable-ctcp-replies (not erc-disable-ctcp-replies))))
   (message "ERC CTCP replies are %s" (if erc-disable-ctcp-replies "OFF" "ON")))
 
 (defun erc-toggle-flood-control (&optional arg)
@@ -5524,12 +5615,12 @@ See `erc-server-flood-margin' for an explanation of the available
 flood control parameters."
   (interactive "P")
   (cond ((and (numberp arg) (> arg 0))
-        (setq erc-flood-protect t))
-       (arg (setq erc-flood-protect nil))
-       (t (setq erc-flood-protect (not erc-flood-protect))))
+         (setq erc-flood-protect t))
+        (arg (setq erc-flood-protect nil))
+        (t (setq erc-flood-protect (not erc-flood-protect))))
   (message "ERC flood control is %s"
-          (cond (erc-flood-protect "ON")
-                (t "OFF"))))
+           (cond (erc-flood-protect "ON")
+                 (t "OFF"))))
 
 ;; Some useful channel and nick commands for fast key bindings
 
@@ -5542,12 +5633,11 @@ This command is sent even if excess flood is detected."
   (interactive "P")
   (erc-set-active-buffer (current-buffer))
   (let ((tgt (erc-default-target)))
-    (cond ((or (not tgt) (not (erc-channel-p tgt)))
-          (erc-display-message nil 'error (current-buffer) 'no-target))
-         (arg (erc-load-irc-script-lines (list (concat "/mode " tgt " -i"))
-                                         t))
-         (t (erc-load-irc-script-lines (list (concat "/mode " tgt " +i"))
-                                       t)))))
+    (if (or (not tgt) (not (erc-channel-p tgt)))
+        (erc-display-message nil 'error (current-buffer) 'no-target)
+      (erc-load-irc-script-lines
+       (list (concat "/mode " tgt (if arg " -i" " +i")))
+       t))))
 
 (defun erc-get-channel-mode-from-keypress (key)
   "Read a key sequence and call the corresponding channel mode function.
@@ -5562,14 +5652,14 @@ Anything else will be sent to `erc-toggle-channel-mode'."
   (when (featurep 'xemacs)
     (setq key (char-to-string (event-to-character (aref key 0)))))
   (cond ((equal key "\C-g")
-        (keyboard-quit))
-       ((equal key "\C-m")
-        (erc-insert-mode-command))
-       ((equal key "l")
-        (call-interactively 'erc-set-channel-limit))
-       ((equal key "k")
-        (call-interactively 'erc-set-channel-key))
-       (t (erc-toggle-channel-mode key))))
+         (keyboard-quit))
+        ((equal key "\C-m")
+         (erc-insert-mode-command))
+        ((equal key "l")
+         (call-interactively 'erc-set-channel-limit))
+        ((equal key "k")
+         (call-interactively 'erc-set-channel-key))
+        (t (erc-toggle-channel-mode key))))
 
 (defun erc-toggle-channel-mode (mode &optional channel)
   "Toggle channel MODE.
@@ -5579,15 +5669,14 @@ If CHANNEL is non-nil, toggle MODE for that channel, otherwise use
   (interactive "P")
   (erc-set-active-buffer (current-buffer))
   (let ((tgt (or channel (erc-default-target))))
-    (cond ((or (null tgt) (null (erc-channel-p tgt)))
-          (erc-display-message nil 'error 'active 'no-target))
-         ((member mode erc-channel-modes)
-          (erc-log (format "%s: Toggle mode %s OFF" tgt mode))
-          (message "Toggle channel mode %s OFF" mode)
-          (erc-server-send (format "MODE %s -%s" tgt mode)))
-         (t (erc-log (format "%s: Toggle channel mode %s ON" tgt mode))
-            (message "Toggle channel mode %s ON" mode)
-            (erc-server-send (format "MODE %s +%s" tgt mode))))))
+    (if (or (null tgt) (null (erc-channel-p tgt)))
+        (erc-display-message nil 'error 'active 'no-target)
+      (let* ((active (member mode erc-channel-modes))
+             (newstate (if active "OFF" "ON")))
+        (erc-log (format "%s: Toggle mode %s %s" tgt mode newstate))
+        (message "Toggle channel mode %s %s" mode newstate)
+        (erc-server-send (format "MODE %s %s%s"
+                                 tgt (if active "-" "+") mode))))))
 
 (defun erc-insert-mode-command ()
   "Insert the line \"/mode <current target> \" at `point'."
@@ -5623,9 +5712,9 @@ If FILE is found, return the path to it."
   (let ((filepath file))
     (if (file-readable-p filepath) filepath
       (while (and path
-                 (progn (setq filepath (expand-file-name file (car path)))
-                        (not (file-readable-p filepath))))
-       (setq path (cdr path)))
+                  (progn (setq filepath (expand-file-name file (car path)))
+                         (not (file-readable-p filepath))))
+        (setq path (cdr path)))
       (if path filepath nil))))
 
 (defun erc-select-startup-file ()
@@ -5635,7 +5724,7 @@ See also `erc-startup-file-list'."
     (dolist (f erc-startup-file-list)
       (setq f (convert-standard-filename f))
       (when (file-readable-p f)
-       (throw 'found f)))))
+        (throw 'found f)))))
 
 (defun erc-find-script-file (file)
   "Search for FILE in `default-directory', and any in `erc-script-path'."
@@ -5650,7 +5739,7 @@ as an Emacs Lisp program.  Otherwise, treat it as a regular IRC
 script."
   (erc-log (concat "erc-load-script: " file))
   (cond
-   ((string-match "\\.el$" file)
+   ((string-match "\\.el\\'" file)
     (load file))
    (t
     (erc-load-irc-script file))))
@@ -5668,15 +5757,15 @@ $* = the entire argument string, $1 = the first argument, $2 = the second,
 and so on."
   (if (not args) (setq args ""))
   (let* ((arg-esc-regexp "\\(\\$\\(\\*\\|[1-9][0-9]*\\)\\)\\([^0-9]\\|$\\)")
-        (percent-regexp "\\(%.\\)")
-        (esc-regexp (concat arg-esc-regexp "\\|" percent-regexp))
-        (tgt (erc-default-target))
-        (server (and (boundp 'erc-session-server) erc-session-server))
-        (nick (erc-current-nick))
-        (res "")
-        (tmp nil)
-        (arg-list nil)
-        (arg-num 0))
+         (percent-regexp "\\(%.\\)")
+         (esc-regexp (concat arg-esc-regexp "\\|" percent-regexp))
+         (tgt (erc-default-target))
+         (server (and (boundp 'erc-session-server) erc-session-server))
+         (nick (erc-current-nick))
+         (res "")
+         (tmp nil)
+         (arg-list nil)
+         (arg-num 0))
     (if (not tgt) (setq tgt ""))
     (if (not server) (setq server ""))
     (if (not nick) (setq nick ""))
@@ -5692,36 +5781,36 @@ and so on."
     (while tmp
       ;;(message "beginning of while: tmp=%S" tmp)
       (let* ((hd (substring line 0 tmp))
-            (esc "")
-            (subst "")
-            (tail (substring line tmp)))
-       (cond ((string-match (concat "^" arg-esc-regexp) tail)
-              (setq esc (match-string 1 tail))
-              (setq tail (substring tail (match-end 1))))
-             ((string-match (concat "^" percent-regexp) tail)
-              (setq esc (match-string 1 tail))
-              (setq tail (substring tail (match-end 1)))))
-       ;;(message "hd=%S, esc=%S, tail=%S, arg-num=%S" hd esc tail arg-num)
-       (setq res (concat res hd))
-       (setq subst
-             (cond ((string= esc "") "")
-                   ((string-match "^\\$\\*$" esc) args)
-                   ((string-match "^\\$\\([0-9]+\\)$" esc)
-                    (let ((n (string-to-number (match-string 1 esc))))
-                      (message "n = %S, integerp(n)=%S" n (integerp n))
-                      (if (<= n arg-num) (nth (1- n) arg-list) "")))
-                   ((string-match "^%[Cc]$" esc) tgt)
-                   ((string-match "^%[Ss]$" esc) server)
-                   ((string-match "^%[Nn]$" esc) nick)
-                   ((string-match "^%\\(.\\)$" esc) (match-string 1 esc))
-                   (t (erc-log (format "BUG in erc-process-script-line: bad escape sequence: %S\n" esc))
-                      (message "BUG IN ERC: esc=%S" esc)
-                      "")))
-       (setq line tail)
-       (setq tmp (string-match esc-regexp line))
-       (setq res (concat res subst))
-       ;;(message "end of while: line=%S, res=%S, tmp=%S" line res tmp)
-       ))
+             (esc "")
+             (subst "")
+             (tail (substring line tmp)))
+        (cond ((string-match (concat "^" arg-esc-regexp) tail)
+               (setq esc (match-string 1 tail))
+               (setq tail (substring tail (match-end 1))))
+              ((string-match (concat "^" percent-regexp) tail)
+               (setq esc (match-string 1 tail))
+               (setq tail (substring tail (match-end 1)))))
+        ;;(message "hd=%S, esc=%S, tail=%S, arg-num=%S" hd esc tail arg-num)
+        (setq res (concat res hd))
+        (setq subst
+              (cond ((string= esc "") "")
+                    ((string-match "^\\$\\*$" esc) args)
+                    ((string-match "^\\$\\([0-9]+\\)$" esc)
+                     (let ((n (string-to-number (match-string 1 esc))))
+                       (message "n = %S, integerp(n)=%S" n (integerp n))
+                       (if (<= n arg-num) (nth (1- n) arg-list) "")))
+                    ((string-match "^%[Cc]$" esc) tgt)
+                    ((string-match "^%[Ss]$" esc) server)
+                    ((string-match "^%[Nn]$" esc) nick)
+                    ((string-match "^%\\(.\\)$" esc) (match-string 1 esc))
+                    (t (erc-log (format "BUG in erc-process-script-line: bad escape sequence: %S\n" esc))
+                       (message "BUG IN ERC: esc=%S" esc)
+                       "")))
+        (setq line tail)
+        (setq tmp (string-match esc-regexp line))
+        (setq res (concat res subst))
+        ;;(message "end of while: line=%S, res=%S, tmp=%S" line res tmp)
+        ))
     (setq res (concat res line))
     res))
 
@@ -5729,8 +5818,8 @@ and so on."
   "Load an IRC script from FILE."
   (erc-log (concat "erc-load-script: " file))
   (let ((str (with-temp-buffer
-              (insert-file-contents file)
-              (buffer-string))))
+               (insert-file-contents file)
+               (buffer-string))))
     (erc-load-irc-script-lines (erc-split-multiline-safe str) force)))
 
 (defun erc-load-irc-script-lines (lines &optional force noexpand)
@@ -5740,25 +5829,25 @@ If optional NOEXPAND is non-nil, do not expand script-specific
 sequences, process the lines verbatim.  Use this for multiline
 user input."
   (let* ((cb (current-buffer))
-        (s "")
-        (sp (or (erc-command-indicator) (erc-prompt)))
-        (args (and (boundp 'erc-script-args) erc-script-args)))
+         (s "")
+         (sp (or (erc-command-indicator) (erc-prompt)))
+         (args (and (boundp 'erc-script-args) erc-script-args)))
     (if (and args (string-match "^ " args))
-       (setq args (substring args 1)))
+        (setq args (substring args 1)))
     ;; prepare the prompt string for echo
     (erc-put-text-property 0 (length sp)
-                          'face 'erc-command-indicator-face sp)
+                           'face 'erc-command-indicator-face sp)
     (while lines
       (setq s (car lines))
       (erc-log (concat "erc-load-script: CMD: " s))
       (unless (string-match "^\\s-*$" s)
-       (let ((line (if noexpand s (erc-process-script-line s args))))
-         (if (and (erc-process-input-line line force)
-                  erc-script-echo)
-             (progn
-               (erc-put-text-property 0 (length line)
-                                      'face 'erc-input-face line)
-               (erc-display-line (concat sp line) cb)))))
+        (let ((line (if noexpand s (erc-process-script-line s args))))
+          (if (and (erc-process-input-line line force)
+                   erc-script-echo)
+              (progn
+                (erc-put-text-property 0 (length line)
+                                       'face 'erc-input-face line)
+                (erc-display-line (concat sp line) cb)))))
       (setq lines (cdr lines)))))
 
 ;; authentication
@@ -5766,21 +5855,21 @@ user input."
 (defun erc-login ()
   "Perform user authentication at the IRC server."
   (erc-log (format "login: nick: %s, user: %s %s %s :%s"
-                  (erc-current-nick)
-                  (user-login-name)
-                  (or erc-system-name (system-name))
-                  erc-session-server
-                  erc-session-user-full-name))
+                   (erc-current-nick)
+                   (user-login-name)
+                   (or erc-system-name (system-name))
+                   erc-session-server
+                   erc-session-user-full-name))
   (if erc-session-password
       (erc-server-send (format "PASS %s" erc-session-password))
     (message "Logging in without password"))
   (erc-server-send (format "NICK %s" (erc-current-nick)))
   (erc-server-send
    (format "USER %s %s %s :%s"
-          ;; hacked - S.B.
-          (if erc-anonymous-login erc-email-userid (user-login-name))
-          "0" "*"
-          erc-session-user-full-name))
+           ;; hacked - S.B.
+           (if erc-anonymous-login erc-email-userid (user-login-name))
+           "0" "*"
+           erc-session-user-full-name))
   (erc-update-mode-line))
 
 ;; connection properties' heuristics
@@ -5796,8 +5885,8 @@ Sets the buffer local variables:
 - `erc-server-current-nick'"
   (setq erc-session-connector erc-server-connect-function
         erc-session-server (erc-compute-server server)
-       erc-session-port (or port erc-default-port)
-       erc-session-user-full-name (erc-compute-full-name name))
+        erc-session-port (or port erc-default-port)
+        erc-session-user-full-name (erc-compute-full-name name))
   (erc-set-current-nick (erc-compute-nick nick)))
 
 (defun erc-compute-server (&optional server)
@@ -5865,7 +5954,7 @@ non-nil value is found.
 Returns a list of the form (HIGH LOW), compatible with Emacs time format."
   (let* ((n (string-to-number (concat string ".0"))))
     (list (truncate (/ n 65536))
-         (truncate (mod n 65536)))))
+          (truncate (mod n 65536)))))
 
 (defun erc-emacs-time-to-erc-time (time)
   "Convert Emacs TIME to a number of seconds since the epoch."
@@ -5891,33 +5980,33 @@ See also `erc-emacs-time-to-erc-time'."
   "Convert NS to a time string HH:MM.SS."
   (setq ns (truncate ns))
   (format "%02d:%02d.%02d"
-         (/ ns 3600)
-         (/ (% ns 3600) 60)
-         (% ns 60)))
+          (/ ns 3600)
+          (/ (% ns 3600) 60)
+          (% ns 60)))
 
 (defun erc-seconds-to-string (seconds)
   "Convert a number of SECONDS into an English phrase."
   (let (days hours minutes format-args output)
-    (setq days         (/ seconds 86400)
-         seconds       (% seconds 86400)
-         hours         (/ seconds 3600)
-         seconds       (% seconds 3600)
-         minutes       (/ seconds 60)
-         seconds       (% seconds 60)
-         format-args   (if (> days 0)
-                           `("%d days, %d hours, %d minutes, %d seconds"
-                             ,days ,hours ,minutes ,seconds)
-                         (if (> hours 0)
-                             `("%d hours, %d minutes, %d seconds"
-                               ,hours ,minutes ,seconds)
-                           (if (> minutes 0)
-                               `("%d minutes, %d seconds" ,minutes ,seconds)
-                             `("%d seconds" ,seconds))))
-         output        (apply 'format format-args))
+    (setq days          (/ seconds 86400)
+          seconds       (% seconds 86400)
+          hours         (/ seconds 3600)
+          seconds       (% seconds 3600)
+          minutes       (/ seconds 60)
+          seconds       (% seconds 60)
+          format-args   (if (> days 0)
+                            `("%d days, %d hours, %d minutes, %d seconds"
+                              ,days ,hours ,minutes ,seconds)
+                          (if (> hours 0)
+                              `("%d hours, %d minutes, %d seconds"
+                                ,hours ,minutes ,seconds)
+                            (if (> minutes 0)
+                                `("%d minutes, %d seconds" ,minutes ,seconds)
+                              `("%d seconds" ,seconds))))
+          output        (apply 'format format-args))
     ;; Change all "1 units" to "1 unit".
     (while (string-match "\\([^0-9]\\|^\\)1 \\S-+\\(s\\)" output)
       (setq output (erc-replace-match-subexpression-in-string
-                   "" output (match-string 2 output) 2 (match-beginning 2))))
+                    "" output (match-string 2 output) 2 (match-beginning 2))))
     output))
 
 
@@ -5940,14 +6029,14 @@ If S is nil or an empty string then return general CLIENTINFO."
   (if (or (not s) (string= s ""))
       (concat
        (apply #'concat
-             (mapcar (lambda (e)
-                       (concat (car e) " "))
-                     erc-clientinfo-alist))
+              (mapcar (lambda (e)
+                        (concat (car e) " "))
+                      erc-clientinfo-alist))
        ": use CLIENTINFO <COMMAND> to get more specific information")
     (let ((h (assoc (upcase s) erc-clientinfo-alist)))
       (if h
-         (concat s " " (cdr h))
-       (concat s ": unknown command")))))
+          (concat s " " (cdr h))
+        (concat s ": unknown command")))))
 
 ;; Hook functions
 
@@ -5962,9 +6051,9 @@ If it doesn't exist, create it."
   ;; here, we only want to match the channel buffers, to avoid
   ;; "selecting killed buffers" b0rkage.
   (erc-with-all-buffers-of-server process
-                                 (lambda ()
-                                   (not (erc-server-buffer-p)))
-                                 (kill-buffer (current-buffer))))
+    (lambda ()
+      (not (erc-server-buffer-p)))
+    (kill-buffer (current-buffer))))
 
 (defun erc-nick-at-point ()
   "Give information about the nickname at `point'.
@@ -5975,31 +6064,37 @@ entry of `channel-members'."
   (interactive)
   (require 'thingatpt)
   (let* ((word (word-at-point))
-        (channel-data (erc-get-channel-user word))
-        (cuser (cdr channel-data))
-        (user (if channel-data
-                  (car channel-data)
-                (erc-get-server-user word)))
-        host login full-name nick op voice)
+         (channel-data (erc-get-channel-user word))
+         (cuser (cdr channel-data))
+         (user (if channel-data
+                   (car channel-data)
+                 (erc-get-server-user word)))
+         host login full-name nick voice halfop op admin owner)
     (when user
       (setq nick (erc-server-user-nickname user)
-           host (erc-server-user-host user)
-           login (erc-server-user-login user)
-           full-name (erc-server-user-full-name user))
+            host (erc-server-user-host user)
+            login (erc-server-user-login user)
+            full-name (erc-server-user-full-name user))
       (if cuser
-         (setq op (erc-channel-user-op cuser)
-               voice (erc-channel-user-voice cuser)))
-      (if (called-interactively-p 'interactive)
-         (message "%s is %s@%s%s%s"
-                  nick login host
-                  (if full-name (format " (%s)" full-name) "")
-                  (if (or op voice)
-                              (format " and is +%s%s on %s"
-                              (if op "o" "")
-                              (if voice "v" "")
-                              (erc-default-target))
-                            ""))
-       user))))
+          (setq voice (erc-channel-user-voice cuser)
+                halfop (erc-channel-user-halfop cuser)
+                op (erc-channel-user-op cuser)
+                admin (erc-channel-user-admin cuser)
+                owner (erc-channel-user-owner cuser))))
+    (if (called-interactively-p 'interactive)
+        (message "%s is %s@%s%s%s"
+                 nick login host
+                 (if full-name (format " (%s)" full-name) "")
+                 (if (or voice halfop op admin owner)
+                     (format " and is +%s%s%s%s%s on %s"
+                             (if voice "v" "")
+                             (if halfop "h" "")
+                             (if op "o" "")
+                             (if admin "a" "")
+                             (if owner "q" "")
+                             (erc-default-target))
+                   ""))
+      user)))
 
 (defun erc-away-time ()
   "Return non-nil if the current ERC process is set away.
@@ -6044,11 +6139,11 @@ displayed.
 See `erc-mode-line-format' for which characters are can be used."
   :group 'erc-mode-line-and-header
   :set (lambda (sym val)
-        (set sym val)
-        (when (fboundp 'erc-update-mode-line)
-          (erc-update-mode-line nil)))
+         (set sym val)
+         (when (fboundp 'erc-update-mode-line)
+           (erc-update-mode-line nil)))
   :type '(choice (const :tag "Disabled" nil)
-                string))
+                 string))
 
 (defcustom erc-header-line-uses-tabbar-p nil
   "Use tabbar mode instead of the header line to display the header."
@@ -6069,8 +6164,8 @@ If given a function, call it and use the resulting face name.
 Otherwise, use the `erc-header-line' face."
   :group 'erc-mode-line-and-header
   :type '(choice (const :tag "Don't colorize" nil)
-                (const :tag "Use the erc-header-line face" t)
-                (function :tag "Call a function")))
+                 (const :tag "Use the erc-header-line face" t)
+                 (function :tag "Call a function")))
 
 (defcustom erc-show-channel-key-p t
   "Show the channel key in the header line."
@@ -6089,40 +6184,40 @@ This should be a string with substitution variables recognized by
   "Shorten SERVER-NAME according to `erc-common-server-suffixes'."
   (if (stringp server-name)
       (with-temp-buffer
-       (insert server-name)
-       (let ((alist erc-common-server-suffixes))
-         (while alist
-           (goto-char (point-min))
-       (if (re-search-forward (caar alist) nil t)
-           (replace-match (cdar alist)))
-       (setq alist (cdr alist))))
-       (buffer-string))))
+        (insert server-name)
+        (let ((alist erc-common-server-suffixes))
+          (while alist
+            (goto-char (point-min))
+            (if (re-search-forward (caar alist) nil t)
+                (replace-match (cdar alist)))
+            (setq alist (cdr alist))))
+        (buffer-string))))
 
 (defun erc-format-target ()
   "Return the name of the target (channel or nickname or servername:port)."
   (let ((target (erc-default-target)))
     (or target
-       (concat (erc-shorten-server-name
-                (or erc-server-announced-name
-                    erc-session-server))
-               ":" (erc-port-to-string erc-session-port)))))
+        (concat (erc-shorten-server-name
+                 (or erc-server-announced-name
+                     erc-session-server))
+                ":" (erc-port-to-string erc-session-port)))))
 
 (defun erc-format-target-and/or-server ()
   "Return the server name or the current target and server name combined."
   (let ((server-name (erc-shorten-server-name
-                     (or erc-server-announced-name
-                         erc-session-server))))
+                      (or erc-server-announced-name
+                          erc-session-server))))
     (cond ((erc-default-target)
-          (concat (erc-string-no-properties (erc-default-target))
-                  "@" server-name))
-         (server-name server-name)
-         (t (buffer-name (current-buffer))))))
+           (concat (erc-string-no-properties (erc-default-target))
+                   "@" server-name))
+          (server-name server-name)
+          (t (buffer-name (current-buffer))))))
 
 (defun erc-format-network ()
   "Return the name of the network we are currently on."
   (let ((network (and (fboundp 'erc-network-name) (erc-network-name))))
     (if (and network (symbolp network))
-       (symbol-name network)
+        (symbol-name network)
       "")))
 
 (defun erc-format-target-and/or-network ()
@@ -6130,48 +6225,52 @@ This should be a string with substitution variables recognized by
 If the name of the network is not available, then use the
 shortened server name instead."
   (let ((network-name (or (and (fboundp 'erc-network-name) (erc-network-name))
-                         (erc-shorten-server-name
-                          (or erc-server-announced-name
-                              erc-session-server)))))
+                          (erc-shorten-server-name
+                           (or erc-server-announced-name
+                               erc-session-server)))))
     (when (and network-name (symbolp network-name))
       (setq network-name (symbol-name network-name)))
     (cond ((erc-default-target)
-          (concat (erc-string-no-properties (erc-default-target))
-                  "@" network-name))
-         (network-name network-name)
-         (t (buffer-name (current-buffer))))))
+           (concat (erc-string-no-properties (erc-default-target))
+                   "@" network-name))
+          ((and network-name
+                (not (get-buffer network-name)))
+           (when erc-rename-buffers
+            (rename-buffer network-name))
+           network-name)
+          (t (buffer-name (current-buffer))))))
 
 (defun erc-format-away-status ()
   "Return a formatted `erc-mode-line-away-status-format'
 if `erc-away' is non-nil."
   (let ((a (erc-away-time)))
     (if a
-       (format-time-string erc-mode-line-away-status-format a)
+        (format-time-string erc-mode-line-away-status-format a)
       "")))
 
 (defun erc-format-channel-modes ()
   "Return the current channel's modes."
   (concat (apply 'concat
-                "+" erc-channel-modes)
-         (cond ((and erc-channel-user-limit erc-channel-key)
-                (if erc-show-channel-key-p
-                    (format "lk %.0f %s" erc-channel-user-limit
-                            erc-channel-key)
-                  (format "kl %.0f" erc-channel-user-limit)))
-               (erc-channel-user-limit
-                ;; Emacs has no bignums
-                (format "l %.0f" erc-channel-user-limit))
-               (erc-channel-key
-                (if erc-show-channel-key-p
-                    (format "k %s" erc-channel-key)
-                  "k"))
-               (t nil))))
+                 "+" erc-channel-modes)
+          (cond ((and erc-channel-user-limit erc-channel-key)
+                 (if erc-show-channel-key-p
+                     (format "lk %.0f %s" erc-channel-user-limit
+                             erc-channel-key)
+                   (format "kl %.0f" erc-channel-user-limit)))
+                (erc-channel-user-limit
+                 ;; Emacs has no bignums
+                 (format "l %.0f" erc-channel-user-limit))
+                (erc-channel-key
+                 (if erc-show-channel-key-p
+                     (format "k %s" erc-channel-key)
+                   "k"))
+                (t nil))))
 
 (defun erc-format-lag-time ()
   "Return the estimated lag time to server, `erc-server-lag'."
   (let ((lag (erc-with-server-buffer erc-server-lag)))
     (cond (lag (format "lag:%.0f" lag))
-         (t ""))))
+          (t ""))))
 
 ;; erc-goodies is required at end of this file.
 (declare-function erc-controls-strip "erc-goodies" (str))
@@ -6182,66 +6281,66 @@ if `erc-away' is non-nil."
   "Update the mode line in a single ERC buffer BUFFER."
   (with-current-buffer buffer
     (let ((spec (format-spec-make
-                ?a (erc-format-away-status)
-                ?l (erc-format-lag-time)
-                ?m (erc-format-channel-modes)
-                ?n (or (erc-current-nick) "")
-                ?N (erc-format-network)
-                ?o (or (erc-controls-strip erc-channel-topic) "")
-                ?p (erc-port-to-string erc-session-port)
-                ?s (erc-format-target-and/or-server)
-                ?S (erc-format-target-and/or-network)
-                ?t (erc-format-target)))
-         (process-status (cond ((and (erc-server-process-alive)
-                                     (not erc-server-connected))
-                                ":connecting")
-                               ((erc-server-process-alive)
-                                "")
-                               (t
-                                ": CLOSED")))
-         (face (cond ((eq erc-header-line-face-method nil)
-                      nil)
-                     ((functionp erc-header-line-face-method)
-                      (funcall erc-header-line-face-method))
-                     (t
-                      'erc-header-line))))
+                 ?a (erc-format-away-status)
+                 ?l (erc-format-lag-time)
+                 ?m (erc-format-channel-modes)
+                 ?n (or (erc-current-nick) "")
+                 ?N (erc-format-network)
+                 ?o (or (erc-controls-strip erc-channel-topic) "")
+                 ?p (erc-port-to-string erc-session-port)
+                 ?s (erc-format-target-and/or-server)
+                 ?S (erc-format-target-and/or-network)
+                 ?t (erc-format-target)))
+          (process-status (cond ((and (erc-server-process-alive)
+                                      (not erc-server-connected))
+                                 ":connecting")
+                                ((erc-server-process-alive)
+                                 "")
+                                (t
+                                 ": CLOSED")))
+          (face (cond ((eq erc-header-line-face-method nil)
+                       nil)
+                      ((functionp erc-header-line-face-method)
+                       (funcall erc-header-line-face-method))
+                      (t
+                       'erc-header-line))))
       (cond ((featurep 'xemacs)
-            (setq modeline-buffer-identification
-                  (list (format-spec erc-mode-line-format spec)))
-            (setq modeline-process (list process-status)))
-           (t
-            (setq mode-line-buffer-identification
-                  (list (format-spec erc-mode-line-format spec)))
-            (setq mode-line-process (list process-status))))
+             (setq modeline-buffer-identification
+                   (list (format-spec erc-mode-line-format spec)))
+             (setq modeline-process (list process-status)))
+            (t
+             (setq mode-line-buffer-identification
+                   (list (format-spec erc-mode-line-format spec)))
+             (setq mode-line-process (list process-status))))
       (when (boundp 'header-line-format)
-       (let ((header (if erc-header-line-format
-                         (format-spec erc-header-line-format spec)
-                       nil)))
-         (cond (erc-header-line-uses-tabbar-p
-                (set (make-local-variable 'tabbar--local-hlf)
-                     header-line-format)
-                (kill-local-variable 'header-line-format))
-               ((null header)
-                (setq header-line-format nil))
-               (erc-header-line-uses-help-echo-p
-                (let ((help-echo (with-temp-buffer
-                                   (insert header)
-                                   (fill-region (point-min) (point-max))
-                                   (buffer-string))))
-                  (setq header-line-format
-                        (erc-replace-regexp-in-string
-                         "%"
-                         "%%"
-                         (if face
-                             (erc-propertize header 'help-echo help-echo
-                                             'face face)
-                           (erc-propertize header 'help-echo help-echo))))))
-               (t (setq header-line-format
-                        (if face
-                            (erc-propertize header 'face face)
-                          header)))))))
+        (let ((header (if erc-header-line-format
+                          (format-spec erc-header-line-format spec)
+                        nil)))
+          (cond (erc-header-line-uses-tabbar-p
+                 (set (make-local-variable 'tabbar--local-hlf)
+                      header-line-format)
+                 (kill-local-variable 'header-line-format))
+                ((null header)
+                 (setq header-line-format nil))
+                (erc-header-line-uses-help-echo-p
+                 (let ((help-echo (with-temp-buffer
+                                    (insert header)
+                                    (fill-region (point-min) (point-max))
+                                    (buffer-string))))
+                   (setq header-line-format
+                         (erc-replace-regexp-in-string
+                          "%"
+                          "%%"
+                          (if face
+                              (erc-propertize header 'help-echo help-echo
+                                              'face face)
+                            (erc-propertize header 'help-echo help-echo))))))
+                (t (setq header-line-format
+                         (if face
+                             (erc-propertize header 'face face)
+                           header)))))))
     (if (featurep 'xemacs)
-       (redraw-modeline)
+        (redraw-modeline)
       (force-mode-line-update))))
 
 (defun erc-update-mode-line (&optional buffer)
@@ -6252,7 +6351,7 @@ If BUFFER is nil, update the mode line in all ERC buffers."
       (erc-update-mode-line-buffer buffer)
     (dolist (buf (erc-buffer-list))
       (when (buffer-live-p buf)
-       (erc-update-mode-line-buffer buf)))))
+        (erc-update-mode-line-buffer buf)))))
 
 ;; Miscellaneous
 
@@ -6269,40 +6368,40 @@ P may be an integer or a service name."
       s
     (let ((n (string-to-number s)))
       (if (= n 0)
-         s
-       n))))
+          s
+        n))))
 
 (defun erc-version (&optional here)
   "Show the version number of ERC in the minibuffer.
 If optional argument HERE is non-nil, insert version number at point."
   (interactive "P")
   (let ((version-string
-        (format "ERC %s (GNU Emacs %s)" erc-version-string emacs-version)))
+         (format "ERC (IRC client for Emacs %s)" emacs-version)))
     (if here
-       (insert version-string)
+        (insert version-string)
       (if (called-interactively-p 'interactive)
-         (message "%s" version-string)
-       version-string))))
+          (message "%s" version-string)
+        version-string))))
 
 (defun erc-modes (&optional here)
   "Show the active ERC modes in the minibuffer.
 If optional argument HERE is non-nil, insert version number at point."
   (interactive "P")
   (let ((string
-        (mapconcat 'identity
-                   (let (modes (case-fold-search nil))
-                     (dolist (var (apropos-internal "^erc-.*mode$"))
-                       (when (and (boundp var)
-                                  (symbol-value var))
-                         (setq modes (cons (symbol-name var)
-                                           modes))))
-                     modes)
-                   ", ")))
+         (mapconcat 'identity
+                    (let (modes (case-fold-search nil))
+                      (dolist (var (apropos-internal "^erc-.*mode$"))
+                        (when (and (boundp var)
+                                   (symbol-value var))
+                          (setq modes (cons (symbol-name var)
+                                            modes))))
+                      modes)
+                    ", ")))
     (if here
-       (insert string)
+        (insert string)
       (if (called-interactively-p 'interactive)
-         (message "%s" string)
-       string))))
+          (message "%s" string)
+        string))))
 
 (defun erc-trim-string (s)
   "Trim leading and trailing spaces off S."
@@ -6328,34 +6427,34 @@ All windows are opened in the current frame."
       (switch-to-buffer (car bufs))
       (setq bufs (cdr bufs))
       (while bufs
-       (split-window)
-       (other-window 1)
-       (switch-to-buffer (car bufs))
-       (setq bufs (cdr bufs))
-       (balance-windows)))))
+        (split-window)
+        (other-window 1)
+        (switch-to-buffer (car bufs))
+        (setq bufs (cdr bufs))
+        (balance-windows)))))
 
 (defun erc-popup-input-buffer ()
   "Provide an input buffer."
-   (interactive)
-   (let ((buffer-name (generate-new-buffer-name "*ERC input*"))
-        (mode (intern
-               (completing-read
-                "Mode: "
-                (mapcar (lambda (e)
-                          (list (symbol-name e)))
-                        (apropos-internal "-mode$" 'commandp))
-                nil t))))
-     (pop-to-buffer (make-indirect-buffer (current-buffer) buffer-name))
-     (funcall mode)
-     (narrow-to-region (point) (point))
-     (shrink-window-if-larger-than-buffer)))
+  (interactive)
+  (let ((buffer-name (generate-new-buffer-name "*ERC input*"))
+        (mode (intern
+               (completing-read
+                "Mode: "
+                (mapcar (lambda (e)
+                          (list (symbol-name e)))
+                        (apropos-internal "-mode$" 'commandp))
+                nil t))))
+    (pop-to-buffer (make-indirect-buffer (current-buffer) buffer-name))
+    (funcall mode)
+    (narrow-to-region (point) (point))
+    (shrink-window-if-larger-than-buffer)))
 
 ;;; Message catalog
 
 (defun erc-make-message-variable-name (catalog entry)
   "Create a variable name corresponding to CATALOG's ENTRY."
   (intern (concat "erc-message-"
-                 (symbol-name catalog) "-" (symbol-name entry))))
+                  (symbol-name catalog) "-" (symbol-name entry))))
 
 (defun erc-define-catalog-entry (catalog entry format-spec)
   "Set CATALOG's ENTRY to FORMAT-SPEC."
@@ -6497,18 +6596,18 @@ All windows are opened in the current frame."
 This function is an example on what could be done with formatting
 functions."
   (let ((nick (cadr (memq ?n args)))
-       (user (cadr (memq ?u args)))
-       (host (cadr (memq ?h args)))
-       (channel (cadr (memq ?c args)))
-       (reason (cadr (memq ?r args))))
+        (user (cadr (memq ?u args)))
+        (host (cadr (memq ?h args)))
+        (channel (cadr (memq ?c args)))
+        (reason (cadr (memq ?r args))))
     (if (string= nick (erc-current-nick))
-       (format "You have left channel %s" channel)
+        (format "You have left channel %s" channel)
       (format "%s (%s@%s) has left channel %s%s"
-             nick user host channel
-             (if (not (string= reason ""))
-                 (format ": %s"
-                         (erc-replace-regexp-in-string "%" "%%" reason))
-               "")))))
+              nick user host channel
+              (if (not (string= reason ""))
+                  (format ": %s"
+                          (erc-replace-regexp-in-string "%" "%%" reason))
+                "")))))
 
 
 (defvar erc-current-message-catalog 'english)
@@ -6524,15 +6623,15 @@ english, catalog."
   (unless catalog (setq catalog erc-current-message-catalog))
   (let ((var (erc-make-message-variable-name catalog entry)))
     (if (boundp var)
-       (symbol-value var)
+        (symbol-value var)
       (when (boundp (erc-make-message-variable-name 'english entry))
-       (symbol-value (erc-make-message-variable-name 'english entry))))))
+        (symbol-value (erc-make-message-variable-name 'english entry))))))
 
 (defun erc-format-message (msg &rest args)
   "Format MSG according to ARGS.
 
 See also `format-spec'."
-  (when (eq (logand (length args) 1) 1)        ; oddp
+  (when (eq (logand (length args) 1) 1) ; oddp
     (error "Obscure usage of this function appeared"))
   (let ((entry (erc-retrieve-catalog-entry msg)))
     (when (not entry)
@@ -6593,8 +6692,8 @@ This function should be on `erc-kill-channel-hook'."
   (when (erc-server-process-alive)
     (let ((tgt (erc-default-target)))
       (erc-server-send (format "PART %s :%s" tgt
-                              (funcall erc-part-reason nil))
-                      nil tgt))))
+                               (funcall erc-part-reason nil))
+                       nil tgt))))
 
 ;;; Dealing with `erc-parsed'
 
@@ -6616,10 +6715,10 @@ This function should be on `erc-kill-channel-hook'."
 (defun erc-get-parsed-vector-nick (vect)
   "Return nickname in the parsed vector VECT."
   (let* ((untreated-nick (and vect (erc-response.sender vect)))
-        (maybe-nick (when untreated-nick
-                      (car (split-string untreated-nick "!")))))
+         (maybe-nick (when untreated-nick
+                       (car (split-string untreated-nick "!")))))
     (when (and (not (null maybe-nick))
-              (erc-is-valid-nick-p maybe-nick))
+               (erc-is-valid-nick-p maybe-nick))
       untreated-nick)))
 
 (defun erc-get-parsed-vector-type (vect)
@@ -6636,18 +6735,18 @@ This function should be on `erc-kill-channel-hook'."
 If ERC is already connected to HOST:PORT, simply /join CHANNEL.
 Otherwise, connect to HOST:PORT as USER and /join CHANNEL."
   (let ((server-buffer
-        (car (erc-buffer-filter
-              (lambda ()
-                (and (string-equal erc-session-server host)
-                     (= erc-session-port port)
-                     (erc-open-server-buffer-p)))))))
+         (car (erc-buffer-filter
+               (lambda ()
+                 (and (string-equal erc-session-server host)
+                      (= erc-session-port port)
+                      (erc-open-server-buffer-p)))))))
     (with-current-buffer (or server-buffer (current-buffer))
       (if (and server-buffer channel)
-         (erc-cmd-JOIN channel)
-       (erc-open host port (or user (erc-compute-nick)) (erc-compute-full-name)
-                 (not server-buffer) password nil channel
-                 (when server-buffer
-                   (get-buffer-process server-buffer)))))))
+          (erc-cmd-JOIN channel)
+        (erc-open host port (or user (erc-compute-nick)) (erc-compute-full-name)
+                  (not server-buffer) password nil channel
+                  (when server-buffer
+                    (get-buffer-process server-buffer)))))))
 
 (provide 'erc)
 
index ee6181000ba62e97ee441b8f2807617d2e7561cc..70c53a809b59baa17eb62c5421f76f2b920ba879 100644 (file)
@@ -188,7 +188,8 @@ The options are `begin', `after' or `end'."
     (add-hook 'eshell-post-command-hook
              (function
               (lambda ()
-                (setq eshell-smart-command-done t))) t t)
+                (setq eshell-smart-command-done t)))
+              t t)
 
     (unless (eq eshell-review-quick-commands t)
       (add-hook 'eshell-post-command-hook
@@ -200,8 +201,7 @@ The options are `begin', `after' or `end'."
   (unless eshell-currently-handling-window
     (let ((inhibit-point-motion-hooks t)
          (eshell-currently-handling-window t))
-      (save-selected-window
-       (select-window wind)
+      (with-selected-window wind
        (eshell-smart-redisplay)))))
 
 (defun eshell-refresh-windows (&optional frame)
@@ -212,12 +212,12 @@ The options are `begin', `after' or `end'."
       (lambda (wind)
        (with-current-buffer (window-buffer wind)
          (if eshell-mode
-             (let (window-scroll-functions)
+             (let (window-scroll-functions) ;;FIXME: Why?
                (eshell-smart-scroll-window wind (window-start))
                (setq affected t))))))
      0 frame)
     (if affected
-       (let (window-scroll-functions)
+       (let (window-scroll-functions) ;;FIXME: Why?
          (eshell-redisplay)))))
 
 (defun eshell-smart-display-setup ()
index b7830db08b502c6d0a84f5d41a7b00d2f68f164d..ebbca58a442c2aaa9d56a7da987b89a7e168a31e 100644 (file)
@@ -118,8 +118,6 @@ from executing while Emacs is redisplaying."
   :type 'integer
   :group 'eshell-io)
 
-(defvar x-select-enable-clipboard)     ; term/common-win
-
 (defcustom eshell-virtual-targets
   '(("/dev/eshell" eshell-interactive-print nil)
     ("/dev/kill" (lambda (mode)
@@ -128,7 +126,7 @@ from executing while Emacs is redisplaying."
                   'eshell-kill-append) t)
     ("/dev/clip" (lambda (mode)
                   (if (eq mode 'overwrite)
-                      (let ((x-select-enable-clipboard t))
+                      (let ((gui-select-enable-clipboard t))
                         (kill-new "")))
                   'eshell-clipboard-append) t))
   "Map virtual devices name to Emacs Lisp functions.
@@ -328,7 +326,7 @@ last execution result should not be changed."
 (defun eshell-clipboard-append (string)
   "Call `kill-append' with STRING, if it is indeed a string."
   (if (stringp string)
-      (let ((x-select-enable-clipboard t))
+      (let ((gui-select-enable-clipboard t))
        (kill-append string nil))))
 
 (defun eshell-get-target (target &optional mode)
index 5286f280b393c82b9ff6471378d10aeb3ecbe317..cd73c0afa75ad0097f08fec0098f4ab5ca442121 100644 (file)
@@ -539,20 +539,17 @@ Unless optional argument INPLACE is non-nil, return a new string."
 
 (defmacro eshell-with-file-modes (modes &rest forms)
   "Evaluate, with file-modes set to MODES, the given FORMS."
-  `(let ((modes (default-file-modes)))
-     (set-default-file-modes ,modes)
-     (unwind-protect
-        (progn ,@forms)
-       (set-default-file-modes modes))))
+  (declare (obsolete with-file-modes "25.1"))
+  `(with-file-modes ,modes ,@forms))
 
 (defmacro eshell-with-private-file-modes (&rest forms)
   "Evaluate FORMS with private file modes set."
-  `(eshell-with-file-modes ,eshell-private-file-modes ,@forms))
+  `(with-file-modes ,eshell-private-file-modes ,@forms))
 
 (defsubst eshell-make-private-directory (dir &optional parents)
   "Make DIR with file-modes set to `eshell-private-directory-modes'."
-  (eshell-with-file-modes eshell-private-directory-modes
-                         (make-directory dir parents)))
+  (with-file-modes eshell-private-directory-modes
+    (make-directory dir parents)))
 
 (defsubst eshell-substring (string sublen)
   "Return the beginning of STRING, up to SUBLEN bytes."
index 5590483a54b6a5c71eb01408e87bfaf74aeaf6bc..af67266e67b34e3b7e6137b3d04bf6809059ca78 100644 (file)
 ;; @ 4nt
 ;; @ csh
 
-;;;_* Speeding up load time
-;;
-;; If you find that Eshell loads too slowly, there is something you
-;; can do to speed it up.
-;;
-;; Create a file, named /tmp/elc, containing this filelist:
-;;
-;;   esh-util.elc
-;;   eshell.elc
-;;   esh-module.elc
-;;   esh-var.elc
-;;   esh-proc.elc
-;;   esh-arg.elc
-;;   esh-io.elc
-;;   esh-ext.elc
-;;   esh-cmd.elc
-;;   esh-mode.elc
-;;   esh-opt.elc
-;;   em-alias.elc
-;;   em-banner.elc
-;;   em-basic.elc
-;;   em-cmpl.elc
-;;   em-dirs.elc
-;;   em-pred.elc
-;;   em-glob.elc
-;;   em-hist.elc
-;;   em-ls.elc
-;;   em-prompt.elc
-;;   em-rebind.elc
-;;   em-script.elc
-;;   em-smart.elc
-;;   em-term.elc
-;;   em-unix.elc
-;;   em-xtra.elc
-;;
-;; The order is very important.  Remove from the filelist any features
-;; you don't use.  These all begin with "em-".  If you don't use
-;; Eshell's key rebinding module, you can remove "em-rebind.elc" from
-;; the filelist.  The modules you are currently using are listed in
-;; `eshell-modules-list'.
-;;
-;; Now, concatenating all of the above mentioned .elc files, in that
-;; order, to another file.  Here is how to do this on UNIX:
-;;
-;;   cat `cat /tmp/elc` > tmp.elc ; mv tmp.elc eshell.elc
-;;
-;; Now your eshell.elc file contains all of the .elc files that make
-;; up Eshell, in the right load order.  When you next load Eshell, it
-;; will only have to read in this one file, which will greatly speed
-;; things up.
+;;; Code:
 
 (eval-when-compile
   (require 'cl-lib))
index 20665286b4f76d8ca3b3a95364e2f371c8fc9aab..d7b330ee64ca514dd39f6fcc3ca0269bd3f7847d 100644 (file)
@@ -35,6 +35,26 @@ the terminal-initialization file to be loaded."
                 (string :tag "Name of directory with term files"))
   :group 'terminals)
 
+(defcustom term-file-aliases
+  '(("apollo" . "vt100")
+    ("vt102" . "vt100")
+    ("vt125" . "vt100")
+    ("vt201" . "vt200")
+    ("vt220" . "vt200")
+    ("vt240" . "vt200")
+    ("vt300" . "vt200")
+    ("vt320" . "vt200")
+    ("vt400" . "vt200")
+    ("vt420" . "vt200")
+    )
+  "Alist of terminal type aliases.
+Entries are of the form (TYPE . ALIAS), where both elements are strings.
+This means to treat a terminal of type TYPE as if it were of type ALIAS."
+  :type '(alist :key-type (string :tag "Terminal")
+               :value-type (string :tag "Alias"))
+  :group 'terminals
+  :version "25.1")
+
 (declare-function xw-defined-colors "term/common-win" (&optional frame))
 
 (defvar help-xref-stack-item)
@@ -129,15 +149,11 @@ REGISTRY, ALTERNATIVE1, ALTERNATIVE2, and etc."
   "Return a list of all defined faces."
   (mapcar #'car face-new-frame-defaults))
 
-(defun make-face (face &optional no-init-from-resources)
+(defun make-face (face)
   "Define a new face with name FACE, a symbol.
 Do not call this directly from Lisp code; use `defface' instead.
 
-If FACE is already known as a face, leave it unmodified.  Return FACE.
-
-NO-INIT-FROM-RESOURCES has been deprecated and is no longer used
-and will go away.  Handling of conditional X resources application
-has been pushed down to make-x-resource-internal itself."
+If FACE is already known as a face, leave it unmodified.  Return FACE."
   (interactive (list (read-from-minibuffer
                      "Make face: " nil nil t 'face-name-history)))
   (unless (facep face)
@@ -151,11 +167,6 @@ has been pushed down to make-x-resource-internal itself."
     (make-face-x-resource-internal face))
   face)
 
-;; Handling of whether to apply X resources or not, has been pushed down
-;; to make-face-x-resource-internal itself, thus the optional arg is no
-;; longer evaluated at all and going away.
-(set-advertised-calling-convention 'make-face '(face) "24.4")
-
 (defun make-empty-face (face)
   "Define a new, empty face with name FACE.
 Do not call this directly from Lisp code; use `defface' instead."
@@ -2056,17 +2067,16 @@ Calculate the face definitions using the face specs, custom theme
 settings, X resources, and `face-new-frame-defaults'.
 Finally, apply any relevant face attributes found amongst the
 frame parameters in PARAMETERS."
-  (let ((window-system-p (memq (window-system frame) '(x w32))))
-    ;; The `reverse' is so that `default' goes first.
-    (dolist (face (nreverse (face-list)))
-      (condition-case ()
-         (progn
-           ;; Initialize faces from face spec and custom theme.
-           (face-spec-recalc face frame)
-           ;; Apply attributes specified by face-new-frame-defaults
-           (internal-merge-in-global-face face frame))
-       ;; Don't let invalid specs prevent frame creation.
-       (error nil))))
+  ;; The `reverse' is so that `default' goes first.
+  (dolist (face (nreverse (face-list)))
+    (condition-case ()
+       (progn
+         ;; Initialize faces from face spec and custom theme.
+         (face-spec-recalc face frame)
+         ;; Apply attributes specified by face-new-frame-defaults
+         (internal-merge-in-global-face face frame))
+      ;; Don't let invalid specs prevent frame creation.
+      (error nil)))
 
   ;; Apply attributes specified by frame parameters.
   (let ((face-params '((foreground-color default :foreground)
@@ -2148,11 +2158,16 @@ This can be used to fine tune the `input-decode-map', for example.")
 The optional TYPE parameter may be used to override the autodetected
 terminal type to a different value.
 
+This consults `term-file-aliases' to map terminal types to their aliases.
+
 If optional argument RUN-HOOK is non-nil, then as a final step,
 this runs the hook `tty-setup-hook'.
 
 If you set `term-file-prefix' to nil, this function does nothing."
   (setq type (or type (tty-type frame)))
+  (let ((alias (tty-find-type
+               (lambda (typ) (assoc typ term-file-aliases)) type)))
+    (if alias (setq type (cdr (assoc alias term-file-aliases)))))
   ;; Load library for our terminal type.
   ;; User init file can set term-file-prefix to nil to prevent this.
   (with-selected-frame frame
index 119e0ad30789aab7f774ac5986a0c6ecbf453214..e5f574db2de17a271767c357fdf4761fa50a44a6 100644 (file)
@@ -163,6 +163,12 @@ schemes (e.g. \"ftp\"); in that case, only convert those URLs."
   :group 'ffap
   :version "24.3")
 
+(defcustom ffap-lax-url nil
+  "If non-nil, allow lax URL matching."
+  :type 'boolean
+  :group 'ffap
+  :version "25.1")
+
 (defcustom ffap-ftp-default-user "anonymous"
   "User name in FTP file names generated by `ffap-host-to-path'.
 Note this name may be omitted if it equals the default
@@ -1096,7 +1102,7 @@ Assumes the buffer has not changed."
             (w3-view-this-url t))
        (let ((thing-at-point-beginning-of-url-regexp ffap-url-regexp)
              (thing-at-point-default-mail-uri-scheme ffap-foo-at-bar-prefix))
-         (thing-at-point-url-at-point t
+         (thing-at-point-url-at-point ffap-lax-url
                                       (if (use-region-p)
                                           (cons (region-beginning)
                                                 (region-end))))))))
@@ -1253,7 +1259,8 @@ which may actually result in an URL rather than a filename."
                         (not (ffap-file-exists-string dir))
                         (not (equal dir (setq dir (file-name-directory
                                                    (directory-file-name dir)))))))
-            (ffap-file-exists-string dir)))
+            (and (not (string= dir "/"))
+                (ffap-file-exists-string dir))))
         )
       (set-match-data data))))
 \f
index 5ed5f8a6e1e50ee97c85bb5796ae9d27a938397b..84391c1716475b886e0a216d9d10c7cdccfb78b0 100644 (file)
@@ -559,14 +559,6 @@ A value of nil means ignore them; anything else means query."
                 (other :tag "Query" other))
   :group 'find-file)
 
-;; Avoid losing in versions where CLASH_DETECTION is disabled.
-(or (fboundp 'lock-buffer)
-    (defalias 'lock-buffer 'ignore))
-(or (fboundp 'unlock-buffer)
-    (defalias 'unlock-buffer 'ignore))
-(or (fboundp 'file-locked-p)
-    (defalias 'file-locked-p 'ignore))
-
 (defcustom view-read-only nil
   "Non-nil means buffers visiting files read-only do so in view mode.
 In fact, this means that all read-only buffers normally have
@@ -891,7 +883,7 @@ which we're looking."
   ;;
   ;; Represent /home/luser/foo as ~/foo so that we don't try to look for
   ;; `name' in /home or in /.
-  (setq file (abbreviate-file-name file))
+  (setq file (abbreviate-file-name (expand-file-name file)))
   (let ((root nil)
         ;; `user' is not initialized outside the loop because
         ;; `file' may not exist, so we may have to walk up part of the
@@ -949,14 +941,10 @@ directory if it does not exist."
             (if (file-directory-p user-emacs-directory)
                 (or (file-accessible-directory-p user-emacs-directory)
                     (setq errtype "access"))
-              (let ((umask (default-file-modes)))
-                (unwind-protect
-                    (progn
-                      (set-default-file-modes ?\700)
-                      (condition-case nil
-                          (make-directory user-emacs-directory)
-                        (error (setq errtype "create"))))
-                  (set-default-file-modes umask))))
+              (with-file-modes ?\700
+                (condition-case nil
+                    (make-directory user-emacs-directory)
+                  (error (setq errtype "create")))))
             (when (and errtype
                        user-emacs-directory-warning
                        (not (get 'user-emacs-directory-warning 'this-session)))
@@ -1281,36 +1269,31 @@ You can then use `write-region' to write new data into the file.
 If DIR-FLAG is non-nil, create a new empty directory instead of a file.
 
 If SUFFIX is non-nil, add that at the end of the file name."
-  (let ((umask (default-file-modes))
-       file)
-    (unwind-protect
-       (progn
-         ;; Create temp files with strict access rights.  It's easy to
-         ;; loosen them later, whereas it's impossible to close the
-         ;; time-window of loose permissions otherwise.
-         (set-default-file-modes ?\700)
-         (while (condition-case ()
-                    (progn
-                      (setq file
-                            (make-temp-name
-                              (if (zerop (length prefix))
-                                  (file-name-as-directory
-                                   temporary-file-directory)
-                                (expand-file-name prefix
-                                                  temporary-file-directory))))
-                      (if suffix
-                          (setq file (concat file suffix)))
-                      (if dir-flag
-                          (make-directory file)
-                        (write-region "" nil file nil 'silent nil 'excl))
-                      nil)
-                  (file-already-exists t))
-           ;; the file was somehow created by someone else between
-           ;; `make-temp-name' and `write-region', let's try again.
-           nil)
-         file)
-      ;; Reset the umask.
-      (set-default-file-modes umask))))
+  ;; Create temp files with strict access rights.  It's easy to
+  ;; loosen them later, whereas it's impossible to close the
+  ;; time-window of loose permissions otherwise.
+  (with-file-modes ?\700
+    (let (file)
+      (while (condition-case ()
+                (progn
+                  (setq file
+                        (make-temp-name
+                         (if (zerop (length prefix))
+                             (file-name-as-directory
+                              temporary-file-directory)
+                           (expand-file-name prefix
+                                             temporary-file-directory))))
+                  (if suffix
+                      (setq file (concat file suffix)))
+                  (if dir-flag
+                      (make-directory file)
+                    (write-region "" nil file nil 'silent nil 'excl))
+                  nil)
+              (file-already-exists t))
+       ;; the file was somehow created by someone else between
+       ;; `make-temp-name' and `write-region', let's try again.
+       nil)
+      file)))
 
 (defun recode-file-name (file coding new-coding &optional ok-if-already-exists)
   "Change the encoding of FILE's name from CODING to NEW-CODING.
@@ -1392,6 +1375,9 @@ return value, which may be passed as the REQUIRE-MATCH arg to
 
 (defmacro minibuffer-with-setup-hook (fun &rest body)
   "Temporarily add FUN to `minibuffer-setup-hook' while executing BODY.
+FUN can also be (:append FUN1), in which case FUN1 is appended to
+`minibuffer-setup-hook'.
+
 BODY should use the minibuffer at most once.
 Recursive uses of the minibuffer are unaffected (FUN is not
 called additional times).
@@ -1399,19 +1385,24 @@ called additional times).
 This macro actually adds an auxiliary function that calls FUN,
 rather than FUN itself, to `minibuffer-setup-hook'."
   (declare (indent 1) (debug t))
-  (let ((hook (make-symbol "setup-hook")))
-    `(let (,hook)
+  (let ((hook (make-symbol "setup-hook"))
+        (funsym (make-symbol "fun"))
+        (append nil))
+    (when (eq (car-safe fun) :append)
+      (setq append '(t) fun (cadr fun)))
+    `(let ((,funsym ,fun)
+           ,hook)
        (setq ,hook
-            (lambda ()
-              ;; Clear out this hook so it does not interfere
-              ;; with any recursive minibuffer usage.
-              (remove-hook 'minibuffer-setup-hook ,hook)
-              (funcall ,fun)))
+             (lambda ()
+               ;; Clear out this hook so it does not interfere
+               ;; with any recursive minibuffer usage.
+               (remove-hook 'minibuffer-setup-hook ,hook)
+               (funcall ,funsym)))
        (unwind-protect
-          (progn
-            (add-hook 'minibuffer-setup-hook ,hook)
-            ,@body)
-        (remove-hook 'minibuffer-setup-hook ,hook)))))
+           (progn
+             (add-hook 'minibuffer-setup-hook ,hook ,@append)
+             ,@body)
+         (remove-hook 'minibuffer-setup-hook ,hook)))))
 
 (defun find-file-read-args (prompt mustmatch)
   (list (read-file-name prompt nil default-directory mustmatch)
@@ -1801,6 +1792,15 @@ When nil, never request confirmation."
   :version "22.1"
   :type '(choice integer (const :tag "Never request confirmation" nil)))
 
+(defcustom out-of-memory-warning-percentage nil
+  "Warn if file size exceeds this percentage of available free memory.
+When nil, never issue warning.  Beware: This probably doesn't do what you
+think it does, because \"free\" is pretty hard to define in practice."
+  :group 'files
+  :group 'find-file
+  :version "25.1"
+  :type '(choice integer (const :tag "Never issue warning" nil)))
+
 (defun abort-if-file-too-large (size op-type filename)
   "If file SIZE larger than `large-file-warning-threshold', allow user to abort.
 OP-TYPE specifies the file operation being performed (for message to user)."
@@ -1811,6 +1811,25 @@ OP-TYPE specifies the file operation being performed (for message to user)."
                                    (file-size-human-readable size) op-type))))
     (error "Aborted")))
 
+(defun warn-maybe-out-of-memory (size)
+  "Warn if an attempt to open file of SIZE bytes may run out of memory."
+  (when (and (numberp size) (not (zerop size))
+            (integerp out-of-memory-warning-percentage))
+    (let ((meminfo (memory-info)))
+      (when (consp meminfo)
+       (let ((total-free-memory (float (+ (nth 1 meminfo) (nth 3 meminfo)))))
+         (when (> (/ size 1024)
+                  (/ (* total-free-memory out-of-memory-warning-percentage)
+                     100.0))
+           (warn
+            "You are trying to open a file whose size (%s)
+exceeds the %S%% of currently available free memory (%s).
+If that fails, try to open it with `find-file-literally'
+\(but note that some characters might be displayed incorrectly)."
+            (file-size-human-readable size)
+            out-of-memory-warning-percentage
+            (file-size-human-readable (* total-free-memory 1024)))))))))
+
 (defun find-file-noselect (filename &optional nowarn rawfile wildcards)
   "Read file FILENAME into a buffer and return the buffer.
 If a buffer exists visiting FILENAME, return that one, but
@@ -1863,7 +1882,8 @@ the various files."
                  (setq buf other))))
        ;; Check to see if the file looks uncommonly large.
        (when (not (or buf nowarn))
-         (abort-if-file-too-large (nth 7 attributes) "open" filename))
+         (abort-if-file-too-large (nth 7 attributes) "open" filename)
+         (warn-maybe-out-of-memory (nth 7 attributes)))
        (if buf
            ;; We are using an existing buffer.
            (let (nonexistent)
@@ -2091,9 +2111,9 @@ This function ensures that none of these modifications will take place."
 This function is meant for the user to run interactively.
 Don't call it from programs!  Use `insert-file-contents-literally' instead.
 \(Its calling sequence is different; see its documentation)."
+  (declare (interactive-only insert-file-contents-literally))
   (interactive "*fInsert file literally: ")
   (insert-file-1 filename #'insert-file-contents-literally))
-(put 'insert-file-literally 'interactive-only 'insert-file-contents-literally)
 
 (defvar find-file-literally nil
   "Non-nil if this buffer was made by `find-file-literally' or equivalent.
@@ -2337,7 +2357,7 @@ since only a single case-insensitive search through the alist is made."
      ("[cC]hange[lL]og[-.][0-9]+\\'" . change-log-mode)
      ("\\$CHANGE_LOG\\$\\.TXT" . change-log-mode)
      ("\\.scm\\.[0-9]*\\'" . scheme-mode)
-     ("\\.[ck]?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode)
+     ("\\.[ckz]?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode)
      ("\\.bash\\'" . sh-mode)
      ("\\(/\\|\\`\\)\\.\\(bash_\\(profile\\|history\\|log\\(in\\|out\\)\\)\\|z?log\\(in\\|out\\)\\)\\'" . sh-mode)
      ("\\(/\\|\\`\\)\\.\\(shrc\\|[kz]shrc\\|bashrc\\|t?cshrc\\|esrc\\)\\'" . sh-mode)
@@ -2399,11 +2419,10 @@ ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|7Z\\)\\'" . archive-mode)
      ("\\.by\\'" . bovine-grammar-mode)
      ("\\.wy\\'" . wisent-grammar-mode)
      ;; .emacs or .gnus or .viper following a directory delimiter in
-     ;; Unix, MSDOG or VMS syntax.
-     ("[]>:/\\]\\..*\\(emacs\\|gnus\\|viper\\)\\'" . emacs-lisp-mode)
+     ;; Unix or MS-DOS syntax.
+     ("[:/\\]\\..*\\(emacs\\|gnus\\|viper\\)\\'" . emacs-lisp-mode)
      ("\\`\\..*emacs\\'" . emacs-lisp-mode)
-     ;; _emacs following a directory delimiter
-     ;; in MsDos syntax
+     ;; _emacs following a directory delimiter in MS-DOS syntax
      ("[:/]_emacs\\'" . emacs-lisp-mode)
      ("/crontab\\.X*[0-9]+\\'" . shell-script-mode)
      ("\\.ml\\'" . lisp-mode)
@@ -2426,7 +2445,7 @@ ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|7Z\\)\\'" . archive-mode)
      ("\\.\\(asn\\|mib\\|smi\\)\\'" . snmp-mode)
      ("\\.\\(as\\|mi\\|sm\\)2\\'" . snmpv2-mode)
      ("\\.\\(diffs?\\|patch\\|rej\\)\\'" . diff-mode)
-     ("\\.\\(dif\\|pat\\)\\'" . diff-mode) ; for MSDOG
+     ("\\.\\(dif\\|pat\\)\\'" . diff-mode) ; for MS-DOS
      ("\\.[eE]?[pP][sS]\\'" . ps-mode)
      ("\\.\\(?:PDF\\|DVI\\|OD[FGPST]\\|DOCX?\\|XLSX?\\|PPTX?\\|pdf\\|djvu\\|dvi\\|od[fgpst]\\|docx?\\|xlsx?\\|pptx?\\)\\'" . doc-view-mode-maybe)
      ("configure\\.\\(ac\\|in\\)\\'" . autoconf-mode)
@@ -2457,7 +2476,7 @@ ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|7Z\\)\\'" . archive-mode)
      ("/\\.\\(?:enigma\\|gltron\\|gtk\\|hxplayer\\|net\\|neverball\\|qt/.+\\|realplayer\\|scummvm\\|sversion\\|sylpheed/.+\\|xmp\\)rc\\'" . conf-mode)
      ("/\\.\\(?:gdbtkinit\\|grip\\|orbital/.+txt\\|rhosts\\|tuxracer/options\\)\\'" . conf-mode)
      ("/\\.?X\\(?:default\\|resource\\|re\\)s\\>" . conf-xdefaults-mode)
-     ("/X11.+app-defaults/" . conf-xdefaults-mode)
+     ("/X11.+app-defaults/\\|\\.ad\\'" . conf-xdefaults-mode)
      ("/X11.+locale/.+/Compose\\'" . conf-colon-mode)
      ;; this contains everything twice, with space and with colon :-(
      ("/X11.+locale/compose\\.dir\\'" . conf-javaprop-mode)
@@ -2520,6 +2539,7 @@ and `magic-mode-alist', which determines modes based on file contents.")
      ("[acjkwz]sh" . sh-mode)
      ("r?bash2?" . sh-mode)
      ("dash" . sh-mode)
+     ("mksh" . sh-mode)
      ("\\(dt\\|pd\\|w\\)ksh" . sh-mode)
      ("es" . sh-mode)
      ("i?tcsh" . sh-mode)
@@ -3629,10 +3649,7 @@ VARIABLES list of the class.  The list is processed in order.
 * If the element is of the form (DIRECTORY . LIST), and DIRECTORY
   is an initial substring of the file's directory, then LIST is
   applied by recursively following these rules."
-  (let ((elt (assq class dir-locals-class-alist)))
-    (if elt
-       (setcdr elt variables)
-      (push (cons class variables) dir-locals-class-alist))))
+  (setf (alist-get class dir-locals-class-alist) variables))
 
 (defconst dir-locals-file ".dir-locals.el"
   "File that contains directory-local variables.
@@ -3675,10 +3692,9 @@ of no valid cache entry."
 ;;;     (setq locals-file nil))
     ;; Find the best cached value in `dir-locals-directory-cache'.
     (dolist (elt dir-locals-directory-cache)
-      (when (and (eq t (compare-strings file nil (length (car elt))
-                                       (car elt) nil nil
-                                       (memq system-type
-                                             '(windows-nt cygwin ms-dos))))
+      (when (and (string-prefix-p (car elt) file
+                                 (memq system-type
+                                       '(windows-nt cygwin ms-dos)))
                 (> (length (car elt)) (length (car dir-elt))))
        (setq dir-elt elt)))
     (if (and dir-elt
@@ -4081,31 +4097,26 @@ BACKUPNAME is the backup file name, which is the old file renamed."
            (file-error nil))))))
 
 (defun backup-buffer-copy (from-name to-name modes extended-attributes)
-  (let ((umask (default-file-modes)))
-    (unwind-protect
-       (progn
-         ;; Create temp files with strict access rights.  It's easy to
-         ;; loosen them later, whereas it's impossible to close the
-         ;; time-window of loose permissions otherwise.
-         (set-default-file-modes ?\700)
-         (when (condition-case nil
-                   ;; Try to overwrite old backup first.
-                   (copy-file from-name to-name t t t)
-                 (error t))
-           (while (condition-case nil
-                      (progn
-                        (when (file-exists-p to-name)
-                          (delete-file to-name))
-                        (copy-file from-name to-name nil t t)
-                        nil)
-                    (file-already-exists t))
-             ;; The file was somehow created by someone else between
-             ;; `delete-file' and `copy-file', so let's try again.
-             ;; rms says "I think there is also a possible race
-             ;; condition for making backup files" (emacs-devel 20070821).
-             nil)))
-      ;; Reset the umask.
-      (set-default-file-modes umask)))
+  ;; Create temp files with strict access rights.  It's easy to
+  ;; loosen them later, whereas it's impossible to close the
+  ;; time-window of loose permissions otherwise.
+  (with-file-modes ?\700
+    (when (condition-case nil
+             ;; Try to overwrite old backup first.
+             (copy-file from-name to-name t t t)
+           (error t))
+      (while (condition-case nil
+                (progn
+                  (when (file-exists-p to-name)
+                    (delete-file to-name))
+                  (copy-file from-name to-name nil t t)
+                  nil)
+              (file-already-exists t))
+       ;; The file was somehow created by someone else between
+       ;; `delete-file' and `copy-file', so let's try again.
+       ;; rms says "I think there is also a possible race
+       ;; condition for making backup files" (emacs-devel 20070821).
+       nil)))
   ;; If set-file-extended-attributes fails, fall back on set-file-modes.
   (unless (and extended-attributes
               (with-demoted-errors
@@ -4528,18 +4539,14 @@ on a DOS/Windows machine, it returns FILENAME in expanded form."
         (let ((ancestor ".")
              (filename-dir (file-name-as-directory filename)))
           (while (not
-                 (or
-                  (eq t (compare-strings filename-dir nil (length directory)
-                                         directory nil nil fold-case))
-                  (eq t (compare-strings filename nil (length directory)
-                                         directory nil nil fold-case))))
+                 (or (string-prefix-p directory filename-dir fold-case)
+                     (string-prefix-p directory filename fold-case)))
             (setq directory (file-name-directory (substring directory 0 -1))
                  ancestor (if (equal ancestor ".")
                               ".."
                             (concat "../" ancestor))))
           ;; Now ancestor is empty, or .., or ../.., etc.
-          (if (eq t (compare-strings filename nil (length directory)
-                                    directory nil nil fold-case))
+          (if (string-prefix-p directory filename fold-case)
              ;; We matched within FILENAME's directory part.
              ;; Add the rest of FILENAME onto ANCESTOR.
              (let ((rest (substring filename (length directory))))
@@ -4997,6 +5004,7 @@ With prefix ARG, mark buffer as modified, so \\[save-buffer] will save.
 
 It is not a good idea to use this function in Lisp programs, because it
 prints a message in the minibuffer.  Instead, use `set-buffer-modified-p'."
+  (declare (interactive-only set-buffer-modified-p))
   (interactive "P")
   (message (if arg "Modification-flag set"
               "Modification-flag cleared"))
@@ -5017,9 +5025,9 @@ Set mark after the inserted text.
 This function is meant for the user to run interactively.
 Don't call it from programs!  Use `insert-file-contents' instead.
 \(Its calling sequence is different; see its documentation)."
+  (declare (interactive-only insert-file-contents))
   (interactive "*fInsert file: ")
   (insert-file-1 filename #'insert-file-contents))
-(put 'insert-file 'interactive-only 'insert-file-contents)
 
 (defun append-to-file (start end filename)
   "Append the contents of the region to the end of file FILENAME.
@@ -5988,10 +5996,9 @@ default directory.  However, if FULL is non-nil, they are absolute."
                             (file-expand-wildcards (directory-file-name dirpart)))
                   (list dirpart)))
           contents)
-      (while dirs
-       (when (or (null (car dirs))     ; Possible if DIRPART is not wild.
-                 (and (file-directory-p (directory-file-name (car dirs)))
-                      (file-readable-p (car dirs))))
+      (dolist (dir dirs)
+       (when (or (null dir)    ; Possible if DIRPART is not wild.
+                 (file-accessible-directory-p dir))
          (let ((this-dir-contents
                 ;; Filter out "." and ".."
                 (delq nil
@@ -5999,16 +6006,15 @@ default directory.  However, if FULL is non-nil, they are absolute."
                                   (unless (string-match "\\`\\.\\.?\\'"
                                                         (file-name-nondirectory name))
                                     name))
-                              (directory-files (or (car dirs) ".") full
+                              (directory-files (or dir ".") full
                                                (wildcard-to-regexp nondir))))))
            (setq contents
                  (nconc
-                  (if (and (car dirs) (not full))
-                      (mapcar (function (lambda (name) (concat (car dirs) name)))
+                  (if (and dir (not full))
+                      (mapcar #'(lambda (name) (concat dir name))
                               this-dir-contents)
                     this-dir-contents)
-                  contents))))
-       (setq dirs (cdr dirs)))
+                  contents)))))
       contents)))
 
 ;; Let Tramp know that `file-expand-wildcards' does not need an advice.
@@ -6866,15 +6872,11 @@ Otherwise, trash FILENAME using the freedesktop.org conventions,
                      trash-info-dir filename))
 
           ;; Ensure that the trash directory exists; otherwise, create it.
-          (let ((saved-default-file-modes (default-file-modes)))
-            (unwind-protect
-                (progn
-                  (set-default-file-modes #o700)
-                  (unless (file-exists-p trash-files-dir)
-                    (make-directory trash-files-dir t))
-                  (unless (file-exists-p trash-info-dir)
-                    (make-directory trash-info-dir t)))
-              (set-default-file-modes saved-default-file-modes)))
+          (with-file-modes #o700
+            (unless (file-exists-p trash-files-dir)
+              (make-directory trash-files-dir t))
+            (unless (file-exists-p trash-info-dir)
+              (make-directory trash-info-dir t)))
 
           ;; Try to move to trash with .trashinfo undo information
           (save-excursion
index acd820a31cee3a382989053a1766aa3d65108a27..276aeed1208b03760c53cfd0fd71fe44dbed1004 100644 (file)
@@ -39,6 +39,8 @@
 
 ;;; Code:
 
+(require 'grep)
+
 (defconst find-constituents
   '((and . find-and)
     (not . find-not)
@@ -145,13 +147,15 @@ For example:
 
 `default-directory' is used as the initial search path.  The
 result is a string that should be ready for the command line."
-  (concat
-   "find " (shell-quote-argument (expand-file-name default-directory)) " "
-           (cond
-            ((cdr subfinds)
-             (mapconcat 'find-to-string subfinds ""))
-            (t
-             (find-to-string (car subfinds))))))
+  ;; FIXME: Provide a version that returns a list of strings (ready to pass to
+  ;; call-process).
+  (concat find-program " "
+          (shell-quote-argument (expand-file-name default-directory)) " "
+          (cond
+           ((cdr subfinds)
+            (mapconcat #'find-to-string subfinds ""))
+           (t
+            (find-to-string (car subfinds))))))
 
 (defun find-and (form)
   "And FORMs together, so:
@@ -161,7 +165,7 @@ will produce:
   (if (< (length form) 2)
       (find-to-string (car form))
       (concat "\\( "
-              (mapconcat 'find-to-string form "-and ")
+              (mapconcat #'find-to-string form "-and ")
               "\\) ")))
 
 (defun find-or (form)
@@ -172,7 +176,7 @@ will produce:
   (if (< (length form) 2)
       (find-to-string (car form))
       (concat "\\( "
-              (mapconcat 'find-to-string form "-or ")
+              (mapconcat #'find-to-string form "-or ")
               "\\) ")))
 
 (defun find-not (form)
@@ -183,7 +187,7 @@ will produce:
 If you wanted the FORMs -and(ed) together instead then this would
 suffice:
   \(not \(and \(mtime \"+1\"\) \(name \"something\"\)\)\)"
-  (concat "-not " (find-or (mapcar 'find-to-string form))))
+  (concat "-not " (find-or (mapcar #'find-to-string form))))
 
 (defun find-prune (form)
   "-or together FORMs postfix '-prune' and then -or that with a
@@ -194,7 +198,7 @@ will produce (unwrapped):
   -prune -or -true \\\) -and -name '*.pm' \\\)"
   (find-or
    (list
-    (concat (find-or (mapcar 'find-to-string form)) (find-generic "prune"))
+    (concat (find-or (mapcar #'find-to-string form)) (find-generic "prune"))
     (find-generic "true"))))
 
 (defun find-generic (option &optional oper argcount args dont-quote)
index 82e97c4da62124028aeea00e4d0ad1eb7251e8dc..22444277ba2ef177883f0366ccb35f5f14a9e9f1 100644 (file)
@@ -601,14 +601,14 @@ This is normally set via `font-lock-defaults'.")
 Currently, valid mode names are `fast-lock-mode', `jit-lock-mode' and
 `lazy-lock-mode'.  This is normally set via `font-lock-defaults'.")
 
-(defvar font-lock-multiline nil
+(defvar-local font-lock-multiline nil
   "Whether font-lock should cater to multiline keywords.
 If nil, don't try to handle multiline patterns.
 If t, always handle multiline patterns.
 If `undecided', don't try to handle multiline patterns until you see one.
 Major/minor modes can set this variable if they know which option applies.")
 
-(defvar font-lock-fontified nil)       ; Whether we have fontified the buffer.
+(defvar-local font-lock-fontified nil) ; Whether we have fontified the buffer.
 \f
 ;; Font Lock mode.
 
@@ -626,6 +626,8 @@ Major/minor modes can set this variable if they know which option applies.")
   ;; Shut up the byte compiler.
   (defvar font-lock-face-attributes))  ; Obsolete but respected if set.
 
+(defvar-local font-lock-set-defaults nil) ; Whether we have set up defaults.
+
 (defun font-lock-specified-p (mode)
   "Return non-nil if the current buffer is ready for fontification.
 The MODE argument, if non-nil, means Font Lock mode is about to
@@ -634,7 +636,6 @@ be enabled."
       (and (boundp 'font-lock-keywords)
           font-lock-keywords)
       (and mode
-          (boundp 'font-lock-set-defaults)
           font-lock-set-defaults
           font-lock-major-mode
           (not (eq font-lock-major-mode major-mode)))))
@@ -921,6 +922,14 @@ The value of this variable is used when Font Lock mode is turned on."
      ;; Prepare for jit-lock
      (remove-hook 'after-change-functions
                   'font-lock-after-change-function t)
+     (set (make-local-variable 'font-lock-flush-function)
+          'jit-lock-refontify)
+     (set (make-local-variable 'font-lock-ensure-function)
+          'jit-lock-fontify-now)
+     ;; Prevent font-lock-fontify-buffer from fontifying eagerly the whole
+     ;; buffer.  This is important for things like CWarn mode which
+     ;; adds/removes a few keywords and does a refontify (which takes ages on
+     ;; large files).
      (set (make-local-variable 'font-lock-fontify-buffer-function)
           'jit-lock-refontify)
      ;; Don't fontify eagerly (and don't abort if the buffer is large).
@@ -1025,12 +1034,23 @@ This function should preserve the match-data.
 The region it returns may start or end in the middle of a line.")
 (make-variable-buffer-local 'font-lock-extend-after-change-region-function)
 
-(defun font-lock-fontify-buffer ()
+(defun font-lock-fontify-buffer (&optional interactively)
   "Fontify the current buffer the way the function `font-lock-mode' would."
-  (interactive)
+  (declare
+   ;; When called from Lisp, this function is a big mess.  The caller usually
+   ;; expects one of the following behaviors:
+   ;; - refresh the highlighting (because the font-lock-keywords have been
+   ;;   changed).
+   ;; - apply font-lock highlighting even if font-lock-mode is not enabled.
+   ;; - reset the highlighting rules because font-lock-defaults
+   ;;   has been changed (and then rehighlight everything).
+   ;; Of course, this function doesn't do all of the above in all situations
+   ;; (e.g. depending on whether jit-lock is in use) and it can't guess what
+   ;; the caller wants.
+   (interactive-only "use `font-lock-ensure' or `font-lock-flush' instead."))
+  (interactive "p")
   (font-lock-set-defaults)
-  (let ((font-lock-verbose (or font-lock-verbose
-                              (called-interactively-p 'interactive))))
+  (let ((font-lock-verbose (or font-lock-verbose interactively)))
     (funcall font-lock-fontify-buffer-function)))
 
 (defun font-lock-unfontify-buffer ()
@@ -1049,6 +1069,31 @@ This works by calling `font-lock-unfontify-region-function'."
   (save-buffer-state
     (funcall font-lock-unfontify-region-function beg end)))
 
+(defvar font-lock-flush-function #'font-lock-after-change-function
+  "Function to use to mark a region for refontification.
+Called with two arguments BEG and END.")
+
+(defun font-lock-flush (&optional beg end)
+  "Declare the region BEG...END's fontification as out-of-date.
+If the region is not specified, it defaults to the whole buffer."
+  (and font-lock-mode
+       font-lock-fontified
+       (funcall font-lock-flush-function
+                (or beg (point-min)) (or end (point-max)))))
+
+(defvar font-lock-ensure-function
+  (lambda (_beg _end)
+    (unless font-lock-fontified (font-lock-default-fontify-buffer)))
+  "Function to make sure a region has been fontified.
+Called with two arguments BEG and END.")
+
+(defun font-lock-ensure (&optional beg end)
+  "Make sure the region BEG...END has been fontified.
+If the region is not specified, it defaults to the whole buffer."
+  (font-lock-set-defaults)
+  (funcall font-lock-ensure-function
+           (or beg (point-min)) (or end (point-max))))
+
 (defun font-lock-default-fontify-buffer ()
   "Fontify the whole buffer using `font-lock-fontify-region-function'."
   (let ((verbose (if (numberp font-lock-verbose)
@@ -1059,7 +1104,7 @@ This works by calling `font-lock-unfontify-region-function'."
          (format "Fontifying %s..." (buffer-name)))
       ;; Make sure we fontify etc. in the whole buffer.
       (save-restriction
-       (widen)
+        (unless font-lock-dont-widen (widen))
        (condition-case nil
            (save-excursion
              (save-match-data
@@ -1201,7 +1246,7 @@ This function is the default `font-lock-unfontify-region-function'."
              '(face font-lock-multiline)))))
 
 ;; Called when any modification is made to buffer text.
-(defun font-lock-after-change-function (beg end old-len)
+(defun font-lock-after-change-function (beg end &optional old-len)
   (save-excursion
     (let ((inhibit-point-motion-hooks t)
           (inhibit-quit t)
@@ -1714,7 +1759,7 @@ If SYNTACTIC-KEYWORDS is non-nil, it means these keywords are used for
       keywords
     (setq keywords
          (cons t (cons keywords
-                       (mapcar 'font-lock-compile-keyword keywords))))
+                       (mapcar #'font-lock-compile-keyword keywords))))
     (if (and (not syntactic-keywords)
             (let ((beg-function
                    (or font-lock-beginning-of-syntax-function
@@ -1738,7 +1783,7 @@ If SYNTACTIC-KEYWORDS is non-nil, it means these keywords are used for
     keywords))
 
 (defun font-lock-compile-keyword (keyword)
-  (cond ((nlistp keyword)                      ; MATCHER
+  (cond ((or (functionp keyword) (nlistp keyword)) ; MATCHER
         (list keyword '(0 font-lock-keyword-face)))
        ((eq (car keyword) 'eval)               ; (eval . FORM)
         (font-lock-compile-keyword (eval (cdr keyword))))
@@ -1786,8 +1831,6 @@ A LEVEL of nil is equal to a LEVEL of 0, a LEVEL of t is equal to
        (t
         (car keywords))))
 
-(defvar font-lock-set-defaults nil)    ; Whether we have set up defaults.
-
 (defun font-lock-refresh-defaults ()
   "Restart fontification in current buffer after recomputing from defaults.
 Recompute fontification variables using `font-lock-defaults' and
@@ -1815,9 +1858,7 @@ Sets various variables using `font-lock-defaults' and
   (unless (and font-lock-set-defaults
               (eq font-lock-major-mode major-mode))
     (setq font-lock-major-mode major-mode)
-    (set (make-local-variable 'font-lock-set-defaults) t)
-    (make-local-variable 'font-lock-fontified)
-    (make-local-variable 'font-lock-multiline)
+    (setq font-lock-set-defaults t)
     (let* ((defaults font-lock-defaults)
           (keywords
            (font-lock-choose-keywords (nth 0 defaults)
@@ -1825,7 +1866,6 @@ Sets various variables using `font-lock-defaults' and
           (local (cdr (assq major-mode font-lock-keywords-alist)))
           (removed-keywords
            (cdr-safe (assq major-mode font-lock-removed-keywords-alist))))
-      (set (make-local-variable 'font-lock-defaults) defaults)
       ;; Syntactic fontification?
       (if (nth 1 defaults)
           (set (make-local-variable 'font-lock-keywords-only) t)
@@ -1868,7 +1908,8 @@ Sets various variables using `font-lock-defaults' and
       ;; Now compile the keywords.
       (unless (eq (car font-lock-keywords) t)
        (setq font-lock-keywords
-              (font-lock-compile-keywords font-lock-keywords))))))
+              (font-lock-compile-keywords font-lock-keywords))))
+    (font-lock-flush)))
 \f
 ;;; Color etc. support.
 
index 08d4a136e1ca6f7e8c60cc3c78c05e2200027b86..952a3568156d7e2cb115d9ae2b6f4a9cb3f2194a 100644 (file)
@@ -1,7 +1,6 @@
-;;; frame.el --- multi-frame management independent of window systems
+;;; frame.el --- multi-frame management independent of window systems  -*- lexical-binding:t -*-
 
-;; Copyright (C) 1993-1994, 1996-1997, 2000-2014 Free Software
-;; Foundation, Inc.
+;; Copyright (C) 1993-1994, 1996-1997, 2000-2014 Free Software Foundation, Inc.
 
 ;; Maintainer: emacs-devel@gnu.org
 ;; Keywords: internal
 ;;; Code:
 (eval-when-compile (require 'cl-lib))
 
-(defvar frame-creation-function-alist
-  (list (cons nil
-             (if (fboundp 'tty-create-frame-with-faces)
-                 'tty-create-frame-with-faces
-                (lambda (_parameters)
-                  (error "Can't create multiple frames without a window system")))))
-  "Alist of window-system dependent functions to call to create a new frame.
+;; Dispatch tables for GUI methods.
+
+(defun gui-method--name (base)
+  (intern (format "%s-alist" base)))
+
+(defmacro gui-method (name &optional type)
+  (macroexp-let2 nil type (or type `(framep (selected-frame)))
+    `(alist-get ,type ,(gui-method--name name)
+                (lambda (&rest _args)
+                  (error "No method %S for %S frame" ',name ,type)))))
+
+(defmacro gui-method-define (name type fun)
+  `(setf (gui-method ,name ',type) ,fun))
+
+(defmacro gui-method-declare (name &optional tty-fun doc)
+  (declare (doc-string 3) (indent 2))
+  `(defvar ,(gui-method--name name)
+     ,(if tty-fun `(list (cons t ,tty-fun))) ,doc))
+
+(defmacro gui-call (name &rest args)
+  `(funcall (gui-method ,name) ,@args))
+
+(gui-method-declare frame-creation-function
+    #'tty-create-frame-with-faces
+  "Method for window-system dependent functions to create a new frame.
 The window system startup file should add its frame creation
-function to this list, which should take an alist of parameters
+function to this method, which should take an alist of parameters
 as its argument.")
 
 (defvar window-system-default-frame-alist nil
   "Window-system dependent default frame parameters.
 The value should be an alist of elements (WINDOW-SYSTEM . ALIST),
-where WINDOW-SYSTEM is a window system symbol (see `window-system')
+where WINDOW-SYSTEM is a window system symbol (as returned by `framep')
 and ALIST is a frame parameter alist like `default-frame-alist'.
 Then, for frames on WINDOW-SYSTEM, any parameters specified in
 ALIST supersede the corresponding parameters specified in
@@ -149,12 +166,6 @@ This function runs the hook `focus-out-hook'."
 ;; 3) Once the init file is done, we apply any newly set parameters
 ;; in initial-frame-alist to the frame.
 
-;; These are now called explicitly at the proper times,
-;; since that is easier to understand.
-;; Actually using hooks within Emacs is bad for future maintenance. --rms.
-;; (add-hook 'before-init-hook 'frame-initialize)
-;; (add-hook 'window-setup-hook 'frame-notice-user-settings)
-
 ;; If we create the initial frame, this is it.
 (defvar frame-initial-frame nil)
 
@@ -181,10 +192,6 @@ This function runs the hook `focus-out-hook'."
            (progn
              (setq frame-initial-frame-alist
                    (append initial-frame-alist default-frame-alist nil))
-             (or (assq 'horizontal-scroll-bars frame-initial-frame-alist)
-                 (setq frame-initial-frame-alist
-                       (cons '(horizontal-scroll-bars . t)
-                             frame-initial-frame-alist)))
              (setq frame-initial-frame-alist
                    (cons (cons 'window-system initial-window-system)
                          frame-initial-frame-alist))
@@ -263,60 +270,43 @@ there (in decreasing order of priority)."
     ;; If the initial frame is still around, apply initial-frame-alist
     ;; and default-frame-alist to it.
     (when (frame-live-p frame-initial-frame)
-
       ;; When tool-bar has been switched off, correct the frame size
       ;; by the lines added in x-create-frame for the tool-bar and
       ;; switch `tool-bar-mode' off.
       (when (display-graphic-p)
-       (let ((tool-bar-lines (or (assq 'tool-bar-lines initial-frame-alist)
-                                 (assq 'tool-bar-lines window-system-frame-alist)
-                                 (assq 'tool-bar-lines default-frame-alist))))
-         (when (and tool-bar-originally-present
-                     (or (null tool-bar-lines)
-                         (null (cdr tool-bar-lines))
-                         (eq 0 (cdr tool-bar-lines))))
-           (let* ((char-height (frame-char-height frame-initial-frame))
-                  (image-height tool-bar-images-pixel-height)
-                  (margin (cond ((and (consp tool-bar-button-margin)
-                                      (integerp (cdr tool-bar-button-margin))
-                                      (> tool-bar-button-margin 0))
-                                 (cdr tool-bar-button-margin))
-                                ((and (integerp tool-bar-button-margin)
-                                      (> tool-bar-button-margin 0))
-                                 tool-bar-button-margin)
-                                (t 0)))
-                  (relief (if (and (integerp tool-bar-button-relief)
-                                   (> tool-bar-button-relief 0))
-                              tool-bar-button-relief 3))
-                  (lines (/ (+ image-height
-                               (* 2 margin)
-                               (* 2 relief)
-                               (1- char-height))
-                            char-height))
-                  (height (frame-parameter frame-initial-frame 'height))
-                  (newparms (list (cons 'height (- height lines))))
-                  (initial-top (cdr (assq 'top
-                                          frame-initial-geometry-arguments)))
+       (let ((tool-bar-lines
+              (or (assq 'tool-bar-lines initial-frame-alist)
+                  (assq 'tool-bar-lines window-system-frame-alist)
+                  (assq 'tool-bar-lines default-frame-alist))))
+         ;; Shrink frame by its initial tool bar height iff either zero
+         ;; tool bar lines have been requested in one of the frame's
+         ;; alists or tool bar mode has been turned off explicitly in
+         ;; the user's init file.
+         (when (and tool-bar-lines
+                    (> frame-initial-frame-tool-bar-height 0)
+                    (or (not tool-bar-mode)
+                        (null (cdr tool-bar-lines))
+                        (eq 0 (cdr tool-bar-lines))))
+           (set-frame-height
+            frame-initial-frame (- (frame-text-height frame-initial-frame)
+                                   frame-initial-frame-tool-bar-height)
+            nil t)
+           (let* ((initial-top
+                   (cdr (assq 'top frame-initial-geometry-arguments)))
                   (top (frame-parameter frame-initial-frame 'top)))
              (when (and (consp initial-top) (eq '- (car initial-top)))
                (let ((adjusted-top
-                      (cond ((and (consp top)
-                                  (eq '+ (car top)))
-                             (list '+
-                                   (+ (cadr top)
-                                      (* lines char-height))))
-                            ((and (consp top)
-                                  (eq '- (car top)))
-                             (list '-
-                                   (- (cadr top)
-                                      (* lines char-height))))
-                            (t (+ top (* lines char-height))))))
-                 (setq newparms
-                       (append newparms
-                               `((top . ,adjusted-top))
-                               nil))))
-             (modify-frame-parameters frame-initial-frame newparms)
-             (tool-bar-mode -1)))))
+                      (cond
+                       ((and (consp top) (eq '+ (car top)))
+                        (list '+ (+ (cadr top)
+                                    frame-initial-frame-tool-bar-height)))
+                       ((and (consp top) (eq '- (car top)))
+                        (list '- (- (cadr top)
+                                    frame-initial-frame-tool-bar-height)))
+                       (t (+ top frame-initial-frame-tool-bar-height)))))
+                 (modify-frame-parameters
+                  frame-initial-frame '((top . adjusted-top))))))
+           (tool-bar-mode -1))))
 
       ;; The initial frame we create above always has a minibuffer.
       ;; If the user wants to remove it, or make it a minibuffer-only
@@ -656,30 +646,29 @@ frame the selected frame.  However, the window system may select
 the new frame according to its own rules."
   (interactive)
   (let* ((display (cdr (assq 'display parameters)))
-         (w (cond
-            ((assq 'terminal parameters)
-             (let ((type (terminal-live-p (cdr (assq 'terminal parameters)))))
-               (cond
-                ((eq type t) nil)
-                ((eq type nil) (error "Terminal %s does not exist"
-                                       (cdr (assq 'terminal parameters))))
-                (t type))))
-            ((assq 'window-system parameters)
-             (cdr (assq 'window-system parameters)))
-             (display
-              (or (window-system-for-display display)
-                  (error "Don't know how to interpret display %S"
-                         display)))
-            (t window-system)))
-        (frame-creation-function (cdr (assq w frame-creation-function-alist)))
+         (w (or
+             (cond
+              ((assq 'terminal parameters)
+               (let ((type (terminal-live-p
+                            (cdr (assq 'terminal parameters)))))
+                 (cond
+                  ((null type) (error "Terminal %s does not exist"
+                                      (cdr (assq 'terminal parameters))))
+                  (t type))))
+              ((assq 'window-system parameters)
+               (cdr (assq 'window-system parameters)))
+              (display
+               (or (window-system-for-display display)
+                   (error "Don't know how to interpret display %S"
+                          display)))
+              (t window-system))
+             t))
         (oldframe (selected-frame))
         (params parameters)
         frame)
-    (unless frame-creation-function
-      (error "Don't know how to create a frame on window system %s" w))
 
     (unless (get w 'window-system-initialized)
-      (funcall (cdr (assq w window-system-initialization-alist)) display)
+      (funcall (gui-method window-system-initialization w) display)
       (setq x-display-name display)
       (put w 'window-system-initialized t))
 
@@ -693,7 +682,8 @@ the new frame according to its own rules."
        (push p params)))
     ;; Now make the frame.
     (run-hooks 'before-make-frame-hook)
-    (setq frame (funcall frame-creation-function params))
+    (setq frame
+          (funcall (gui-method frame-creation-function w) params))
     (normal-erase-is-backspace-setup-frame frame)
     ;; Inherit the original frame's parameters.
     (dolist (param frame-inherited-parameters)
@@ -1276,16 +1266,18 @@ On graphical displays, it is displayed on the frame's title bar."
                           (list (cons 'name name))))
 
 (defun frame-current-scroll-bars (&optional frame)
-  "Return the current scroll-bar settings in frame FRAME.
-Value is a cons (VERTICAL . HORIZ0NTAL) where VERTICAL specifies the
-current location of the vertical scroll-bars (left, right, or nil),
-and HORIZONTAL specifies the current location of the horizontal scroll
-bars (top, bottom, or nil)."
-  (let ((vert (frame-parameter frame 'vertical-scroll-bars))
-       (hor nil))
-    (unless (memq vert '(left right nil))
-      (setq vert default-frame-scroll-bars))
-    (cons vert hor)))
+  "Return the current scroll-bar types for frame FRAME.
+Value is a cons (VERTICAL . HORIZ0NTAL) where VERTICAL specifies
+the current location of the vertical scroll-bars (`left', `right'
+or nil), and HORIZONTAL specifies the current location of the
+horizontal scroll bars (`bottom' or nil).  FRAME must specify a
+live frame and defaults to the selected one."
+  (let* ((frame (window-normalize-frame frame))
+        (vertical (frame-parameter frame 'vertical-scroll-bars))
+        (horizontal (frame-parameter frame 'horizontal-scroll-bars)))
+    (unless (memq vertical '(left right nil))
+      (setq vertical default-frame-scroll-bars))
+    (cons vertical (and horizontal 'bottom))))
 
 (defun frame-monitor-attributes (&optional frame)
   "Return the attributes of the physical monitor dominating FRAME.
@@ -1368,8 +1360,8 @@ frame's display)."
   (let ((frame-type (framep-on-display display)))
     (cond
      ((eq frame-type 'pc)
-      ;; MS-DOG frames support selections when Emacs runs inside
-      ;; the Windows' DOS Box.
+      ;; MS-DOS frames support selections when Emacs runs inside
+      ;; a Windows DOS Box.
       (with-no-warnings
        (not (null dos-windows-version))))
      ((memq frame-type '(x w32 ns))
index 9a4745198132d1726219d3a20861a89e5aac6860..f8436259df030ff27e9030445065fb298e38a960 100644 (file)
@@ -664,10 +664,7 @@ nil while the filtering is done to restore it."
     ;; Set the display parameter after filtering, so that filter functions
     ;; have access to its original value.
     (when frameset--target-display
-      (let ((display (assq 'display filtered)))
-       (if display
-           (setcdr display (cdr frameset--target-display))
-         (push frameset--target-display filtered))))
+      (setf (alist-get 'display filtered) (cdr frameset--target-display)))
     filtered))
 
 \f
@@ -1265,6 +1262,17 @@ Called from `jump-to-register'.  Internal use only."
        (set-frame-selected-window frame window)
        (with-current-buffer buffer (goto-char (aref data 2)))))))
 
+;;;###autoload
+(defun frameset--print-register (data)
+  "Print basic info about frameset stored in DATA.
+Called from `list-registers' and `view-register'.  Internal use only."
+  (let* ((fs (aref data 0))
+        (ns (length (frameset-states fs))))
+    (princ (format "a frameset (%d frame%s, saved on %s)."
+                  ns
+                  (if (= 1 ns) "" "s")
+                  (format-time-string "%c" (frameset-timestamp fs))))))
+
 ;;;###autoload
 (defun frameset-to-register (register)
   "Store the current frameset in register REGISTER.
@@ -1282,7 +1290,7 @@ Interactively, reads the register using `register-read-with-preview'."
                         ;; in the current buffer, so record that separately.
                         (frameset-frame-id nil)
                         (point-marker))
-                :print-func (lambda (_data) (princ "a frameset."))
+                :print-func #'frameset--print-register
                 :jump-func #'frameset--jump-to-register)))
 
 (provide 'frameset)
index 228cd104783878c4326d982fc6df5e26b7bfcba7..30eda3d2bf0449e45cab3b49014161573ddcbab2 100644 (file)
+2014-10-14  Teodor Zlatanov  <tzz@lifelogs.com>
+
+       * gnus-start.el (gnus-save-newsrc-file-check-timestamp): New option to
+       check the newsrc.eld file's timestamp before saving it.
+       (gnus-save-newsrc-file): Use it, with a prompt when the newsrc.eld
+       timestamp has changed to be newer.
+
+2014-10-06  Jan Tatarik  <jan.tatarik@gmail.com>
+
+       * gnus-icalendar.el (gnus-icalendar-identities):
+       Include message-alternative-emails.
+
+2014-10-04  Alan Schmitt  <alan.schmitt@polytechnique.org>  (tiny change)
+
+       * nnimap.el (nnimap-process-expiry-targets): Reverse the list of
+       expired messages only when it was built in reverse order.
+
+2014-10-04  Peter Münster  <pmlists@free.fr>  (tiny change)
+
+       * gnus-delay.el (gnus-delay-send-queue): Remove `gnus-delay-header'
+       last so it can be used in `message-send-hook'.
+
+2014-10-02  Daiki Ueno  <ueno@gnu.org>
+
+       * mml.el (mml-parse-1): Error out if unknown mode is specified in
+       <#secure> tag (bug#18513).
+
 2014-09-29  Daiki Ueno  <ueno@gnu.org>
 
        * mml.el (mml-parse-1): Error out if unknown mode is specified in
        <#secure> tag (bug#18513).
 
+2014-09-11  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * gnus-cloud.el (gnus-cloud-parse-version-1): Fix misspelling
+       of ":delete".
+
+2014-08-26  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-art.el (gnus-article-browse-html-save-cid-content)
+       (gnus-article-browse-html-parts):
+       Revert last change that breaks links other than cid contents.
+
+2014-08-26  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-art.el (gnus-article-browse-html-save-cid-content)
+       (gnus-article-browse-html-parts): Make cid file names relative.
+
+2014-08-21  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * mm-view.el (mm-display-inline-fontify): Make the working buffer
+       temporarily displayed when running a mode function (at least org-mode
+       requires it).
+
+2014-08-14  Alan Schmitt  <alan.schmitt@polytechnique.org>
+
+       * gnus-sum.el (gnus-summary-expire-articles): Functions registered to
+       the gnus-summary-article-expire-hook should be told where the function
+       is going. In particular, the Gnus registry might want to know.
+
+2014-08-12  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * gnus-art.el (gnus-hidden-properties): Drop the evil `intangible'.
+
+2014-08-06  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-sum.el (gnus-summary-expire-articles): Revert.
+
+2014-08-05  Eric Abrahamsen  <eric@ericabrahamsen.net>
+
+       * gnus-sum.el (gnus-summary-expire-articles): Functions registered to
+       the gnus-summary-article-expire-hook should be told where the function
+       is going. In particular, the Gnus registry might want to know.
+
+2014-07-31  Tassilo Horn  <tsdh@gnu.org>
+
+       * gnus-msg.el (gnus-inews-insert-gcc): Allow `gcc-self' to be a list of
+       groups and t.
+
+2014-07-22  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-utils.el (gnus-recursive-directory-files):
+       Unify hard or symbolic links (bug#18063).
+
+2013-07-17  Albert Krewinkel  <albert@zeitkraut.de>
+
+       * gnus-msg.el (gnus-configure-posting-style):
+       Allow string replacements in values when matching against a header.
+
+2014-07-07  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-start.el (gnus-dribble-read-file): Don't stop the auto-saving of
+       the dribble buffer even when it is shrunk a lot.
+       <http://thread.gmane.org/gmane.emacs.gnus.user/16923>
+
 2014-06-26  Glenn Morris  <rgm@gnu.org>
 
        * mm-util.el (help-function-arglist): Remove outdated declaration.
 
-2014-06-22  Andreas Schwab  <schwab@linux-m68k.org>
+2014-06-24  Andreas Schwab  <schwab@linux-m68k.org>
 
        * html2text.el (html2text-get-attr): Rewrite to handle spaces in quoted
        attribute values.  (Bug#17834)
 
-2014-05-28  Andreas Schwab  <schwab@linux-m68k.org>
+2013-06-22  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * gnus-sum.el (gnus-summary-edit-article-done):
+       Prefer point-marker to copy-marker of point.
+
+2014-06-05  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-art.el (gnus-article-edit-part): Don't modifiy markers.
+       (gnus-article-read-summary-keys):
+       Don't bug out when there is no article in the summary buffer.
+       (gnus-mime-buttonize-attachments-in-header):
+       Improve criterion that finds parts to display.
+
+       * gnus-art.el (gnus-mm-display-part):
+       * mm-decode.el (mm-shr):
+       * mm-view.el (mm-inline-text-html-render-with-w3m, mm-inline-text)
+       (mm-insert-inline): Revert last changes.
+
+2014-06-05  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-art.el (gnus-mm-display-part):
+       * mm-decode.el (mm-shr):
+       * mm-view.el (mm-inline-text-html-render-with-w3m, mm-inline-text)
+       (mm-insert-inline): Set insertion type of end-marker, not only
+       start-marker, of undisplayer so as to stay after inserted text.
+
+2014-06-02  Andreas Schwab  <schwab@linux-m68k.org>
 
        * html2text.el (html2text-get-attr): Fix typo when splitting value from
        attribute. (Bug#17613)
 
-2014-05-06  Glenn Morris  <rgm@gnu.org>
+2014-05-29  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * mm-view.el (mm-display-inline-fontify): Use font-lock-ensure.
+       * gnus-cite.el (gnus-message-citation-mode): Use font-lock-flush.
+
+2014-05-15  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-art.el (gnus-mime-inline-part, gnus-mm-display-part):
+       Don't delete next part button; keep spacing between buttons.
+
+2014-05-14  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-art.el (gnus-mime-inline-part, gnus-mm-display-part):
+       Work for the last MIME part in an article.
+       (gnus-mime-display-single): Suppress excessive newlines between parts.
+
+       * mm-uu.el (mm-uu-dissect): Assume that separators may be accompanied
+       by leading or trailing newline.
+
+2014-05-09  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-art.el (gnus-mm-display-part): Don't put article out of sight
+       while prompting a user for a file name, etc.
+       (gnus-mime-display-single): Display part with a common appearance no
+       matter whether MIME button is omitted or not; don't add duplicate entry
+       to gnus-article-mime-handle-alist.
+       (gnus-mime-buttonize-attachments-in-header): Use copied buttons.
+
+2014-05-08  Adam Sjøgren  <asjo@koldfront.dk>
+
+       * mml2015.el (mml2015-display-key-image): New variable.
+
+2014-05-08  Glenn Morris  <rgm@gnu.org>
 
        * gnus-fun.el (gnus-grab-cam-face):
        Do not use predictable temp-file name.  (http://bugs.debian.org/747100)
        This is CVE-2014-3421.
 
-2014-05-01  Glenn Morris  <rgm@gnu.org>
+2014-05-04  Glenn Morris  <rgm@gnu.org>
 
        * gnus-registry.el (gnus-registry-install-p): Doc fix.
 
+2014-05-02  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-art.el (gnus-mime-inline-part): Redisplay a button so as to show
+       the displaying state of a part.
+       (gnus-mm-display-part): Don't insert a newline in the beginning of
+       a part like gnus-mime-inline-part doesn't; work for XEmacs.
+
+       * mm-decode.el (mm-display-part): Don't insert a newline in the top.
+       (mm-shr): Make undisplayer unbreakable.
+
+       * mm-view.el (mm-inline-image-emacs, mm-inline-image-xemacs):
+       Don't insert excessive newline.
+       (mm-inline-text-html-render-with-w3m, mm-inline-text)
+       (mm-insert-inline): Make undisplayer unbreakable.
+
+2014-05-01  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-art.el (gnus-mm-display-part):
+       Highlight header attachment buttons.
+
+2014-04-30  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-art.el (gnus-mm-display-part): Don't move point while toggling
+       a part; redisplay a button (enbugged in 2014-03-23).
+
+2014-04-27  Teodor Zlatanov  <tzz@lifelogs.com>
+
+       * auth-source.el (auth-source-search, auth-source-search-backends):
+       Treat :max 0 as an indicator that a boolean return is wanted, as
+       documented. Reported by Joe Bloggs.
+
+2014-04-20  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-icalendar.el: Require gnus-art.
+
+2014-04-20  Jan Tatarik  <jan.tatarik@gmail.com>
+
+       * gnus-icalendar.el (gnus-icalendar-event->org-entry)
+       (gnus-icalendar--update-org-event): put event timestamp in
+       the org entry body instead of the drawer.
+       (gnus-icalendar-event--get-attendee-names): list of participants should
+       contain even attendees without common name attribute.
+       (gnus-icalendar--update-org-event): don't generate duplicates of empty
+       property tags in org drawers.
+
+2014-04-15  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gmm-utils.el (gmm-format-time-string): New function.
+
+       * message.el (message-insert-formatted-citation-line): Use the original
+       author's time zone to express a date string.
+
+2014-04-06  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * gnus-srvr.el (gnus-tmp-how, gnus-tmp-name, gnus-tmp-where)
+       (gnus-tmp-status, gnus-tmp-agent, gnus-tmp-cloud)
+       (gnus-tmp-news-server, gnus-tmp-news-method, gnus-tmp-user-defined):
+       Silence compiler warnings.
+       (gnus-server-insert-server-line): Don't use dyn-bind var as argument.
+
+2014-03-24  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * mml.el: Require url when compiling.
+
+       * gnus-cloud.el (gnus-cloud-parse-version-1):
+       Use plist-get rather than CL's getf.
+       (gnus-activate-group, gnus-subscribe-group): Declare.
+
+       * gnus-sum.el (gnus-mime-buttonize-attachments-in-header): Declare.
+
+2014-03-23  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-sum.el (gnus-summary-toggle-header): Display header attachment
+       buttons when toggling the header off.
+
+2014-03-23  Daiki Ueno  <ueno@gnu.org>
+
+       * mml2015.el (mml2015-use): Don't check the availability of GnuPG
+       commands here; instead, only check if epg-config.el is available.
+
+2014-03-23  Lars Ingebrigtsen  <larsi@gnus.org>
+
+       * mml.el (mml-expand-html-into-multipart-related): Allow sending HTML
+       messages with embedded images.
+       (mml-generate-mime): Don't bug out if you don't have libxml.
+
+2014-03-23  Lars Ingebrigtsen  <larsi@gnus.org>
+
+       * message.el (message-make-html-message-with-image-files): New command.
+
+2014-03-23  Lars Ingebrigtsen  <larsi@gnus.org>
+
+       * mml.el (mml-insert-mime-headers): Allow `recipient-filename'.
+
+2014-03-23  David Engster  <deng@randomsample.de>
+
+       * auth-source.el (auth-source-netrc-saver): Do not depend on `cl-lib'
+       to stay compatible with older Emacsen, so replace `cl-loop' with
+       `loop'.
+
+2014-03-23  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-art.el (gnus-article-prepare, gnus-article-prepare-display):
+       Display header attachment buttons by gnus-article-prepare-display
+       rather than gnus-article-prepare so as to view in mml-preview as well.
+
+2014-03-23  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-art.el (gnus-article-goto-part): Find a button in the body first.
+       (gnus-mime-buttonize-attachments-in-header): Number hidden buttons.
+
+2014-03-23  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-art.el (gnus-mime-buttonize-attachments-in-header):
+       Display buttons that are hidden in unselected alternative part as well.
+       (gnus-mime-display-alternative): Redraw attachment buttons in header.
+
+       * gmm-utils.el (gmm-labels): Add edebug spec.
+
+2014-03-23  Lars Ingebrigtsen  <larsi@gnus.org>
+
+       * gnus-srvr.el (gnus-server-toggle-cloud-server): New command and
+       keystroke.
+       (gnus-server-toggle-cloud-server): Only allow clouding applicable
+       types.
+
+2014-03-23  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus.el (gnus-copy-overlay, gnus-overlays-at): New functions.
+
+       * gnus-art.el (gnus-mime-display-attachment-buttons-in-header):
+       New user option.
+       (gnus-mime-buttonize-attachments-in-header): New function.
+       (gnus-article-prepare): Use it.
+       (gnus-mime-inline-part): Suppress extra newline.
+       (gnus-mm-display-part): Save excursion;
+       remove useless deleting and adding of buttons.
+       (gnus-insert-mime-button): Allow insertion in the middle of a line.
+
+       * gnus-sum.el (gnus-summary-wash-mime-map, gnus-summary-article-menu):
+       Add gnus-mime-buttonize-attachments-in-header.
+
+2014-03-23  Lars Ingebrigtsen  <larsi@gnus.org>
+
+       * nnimap.el (nnimap-request-articles): New command to download several
+       articles at once.
+
+       * gnus.el (gnus-variable-list): Save Cloud variables.
+
+2014-03-23  Lars Ingebrigtsen  <larsi@gnus.org>
+
+       * gnus-cloud.el: New file to provide the Emacs Cloud.
+
+       * gravatar.el (gravatar-retrieve-synchronously): XEmacs also has
+       `url-retrieve-synchronously', apparently.
+
+       * gnus-notifications.el (gravatar-retrieve-synchronously): Declare for
+       XEmacs.
+
+       * nnrss.el (libxml-parse-html-region): Silence compilation error.
+
+2014-03-23  Daniel Dehennin  <daniel.dehennin@baby-gnu.org>
+
+       * gnus-mlspl.el (gnus-group-split-fancy): Use `gnus-parameters' in
+       `gnus-group-split-fancy'.
+
+2014-03-23  Lars Ingebrigtsen  <larsi@gnus.org>
+
+       * message.el (message-remove-header): Doc fix.
+       (message-forward-included-headers): New variable.
+       (message-remove-ignored-headers): Use it.
+
+2014-03-23  Dave Abrahams  <dave@boostpro.com>
+
+       * gnus-sum.el (gnus-summary-open-group-with-article): New command.
+
+2014-03-23  Rasmus Pank Roulund  <emacs@pank.eu>
+
+       * gnus-fun.el (gnus-x-face-omit-files): Regexp to omit matched results
+       from random face commands.
+       (gnus-face-directory): Like `gnus-x-face-directory` for png files and
+       Face.
+       (gnus-face-omit-files): Like `gnus-x-face-omit-files` for Face.
+       (gnus--random-face-with-type): Generic function returning a face-type
+       as a string.
+       (gnus--insert-random-face-with-type): Generic function inserting a face
+       in a message buffer header.
+       (gnus-random-x-face): Rewritten to use `gnus--random-face-with-type`.
+       (gnus-insert-random-x-face-header): Rewritten to use
+       `gnus--insert-random-face-with-type`.
+       (gnus-random-face): Return random (png) Face as string.
+       (nus-insert-random-face-header): Insert random (png) Face in a message
+       buffer.
+
+2014-03-23  Lars Ingebrigtsen  <larsi@gnus.org>
+
+       * mm-url.el: Remove all usage of w3.
+
+       * nnrss.el: Ditto.
+
+       * mm-decode.el: Ditto.
+
+       * mm-view.el: Ditto.
+
+       * gnus-setup.el: Remove outdated file.
+
 2014-03-07  Lars Ingebrigtsen  <larsi@gnus.org>
 
        * nnimap.el (nnimap-request-accept-article): Make respooling to nnimap
        * gnus-setup.el (gnus-use-sendmail): We never use sendmail for mail
        reading.
 
-2014-01-09  Ken Olum  <kdo@cosmos.phy.tufts.edu>  (tiny change)
+2014-01-09  Ken Olum  <kdo@cosmos.phy.tufts.edu>
 
        * message.el (message-bury): Call bury-buffer with no argument
        in the message-return-action case too.
index 475f7667f39223f298e01501d6a127dd0688469f..37d1c1d9f7aa198932dc2a57d36bf7c5db04e6c3 100644 (file)
 
        * message.el (message-header-synonyms): Defcustom.
        (message-get-reply-headers): Catch `Original-To'.
-       (message-carefully-insert-headers): Added comment.
+       (message-carefully-insert-headers): Add comment.
 
-       * gnus-sum.el (gnus-summary-make-menu-bar): Improved "Washing" menu.
+       * gnus-sum.el (gnus-summary-make-menu-bar): Improve "Washing" menu.
 
 2004-01-03  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * gnus-sum.el (gnus-select-newsgroup): Use cat.
 
-       * gnus-agent.el (gnus-agent-cat-enable-undownloaded-faces): New
-       cat.
+       * gnus-agent.el (gnus-agent-cat-enable-undownloaded-faces):
+       New cat.
 
-       * gnus.el (gnus-user-agent): Moved here.
+       * gnus.el (gnus-user-agent): Move here.
 
-       * gnus-msg.el (gnus-user-agent): Moved from here.
+       * gnus-msg.el (gnus-user-agent): Move from here.
 
        * gnus.el (gnus-version-number): Bump.
 
        topic lines.
        (gnus-group-set-current-level): Fix fix.
 
-2003-12-31  Jeremy Maitin-Shepard  <jbms@attbi.com>
+2003-12-31  Jeremy Maitin-Shepard  <jbms@attbi.com>  (tiny change)
 
-       * mml.el (mml-generate-mime-1): Use mml-compute-boundary (tiny
-       change).
+       * mml.el (mml-generate-mime-1): Use mml-compute-boundary.
 
 2003-12-30  Reiner Steib  <Reiner.Steib@gmx.de>
 
-       * gnus-group.el: Removed `(when t ...)' around `gnus-define-keys'.
-       (gnus-group-group-map): Added `gnus-group-read-ephemeral-group'
+       * gnus-group.el: Remove `(when t ...)' around `gnus-define-keys'.
+       (gnus-group-group-map): Add `gnus-group-read-ephemeral-group'
        (already in previous commit inadvertently).
-       (gnus-group-make-menu-bar): Added `gnus-group-read-ephemeral-group'.
+       (gnus-group-make-menu-bar): Add `gnus-group-read-ephemeral-group'.
        (gnus-group-read-ephemeral-group): Made interactive.
 
-       * gnus-score.el (gnus-score-find-trace): Added comment on sync
+       * gnus-score.el (gnus-score-find-trace): Add comment on sync
        with `gnus-score-edit-file-at-point'.
 
        * gnus-logic.el (gnus-score-advanced): Ditto.
 
 2003-12-30  Simon Josefsson  <jas@extundo.com>
 
-       * gnus-score.el (gnus-score-edit-file-at-point): Use
-       gnus-point-at-*, for portability.
+       * gnus-score.el (gnus-score-edit-file-at-point):
+       Use gnus-point-at-*, for portability.
 
 2003-12-30  Reiner Steib  <Reiner.Steib@gmx.de>
 
        custom type.
        (gnus-button-mid-or-mail-regexp): Don't be too restrictive.
        Suggested by Felix Wiemann <Felix.Wiemann@gmx.net>.
-       (gnus-button-alist): Added "M-x ... RET" and "mid:" buttons.
-       Added comments about relevant RFCs.
+       (gnus-button-alist): Add "M-x ... RET" and "mid:" buttons.
+       Add comments about relevant RFCs.
 
        * gnus-sum.el (gnus-summary-mode): Untabify doc-string.
        (gnus-summary-goto-article): Allow `%40'.
 
 2003-12-30  Reiner Steib  <Reiner.Steib@gmx.de>
 
-       (gnus-score-find-trace): Use gnus-score-edit-file-at-point.  Added
-       `f' and `t' commands, added quick help.  With some suggestions
+       (gnus-score-find-trace): Use gnus-score-edit-file-at-point.
+       Add `f' and `t' commands, added quick help.  With some suggestions
        from Karl Pflästerer <sigurd@12move.de>.
 
-       * gnus-util.el (gnus-emacs-version): Added doc-string.
+       * gnus-util.el (gnus-emacs-version): Add doc-string.
 
        * mml.el (mml-minibuffer-read-disposition): New function.
        (mml-attach-file): Use it.
-       (mml-preview): Added MIME preview to gnus-buffers.
+       (mml-preview): Add MIME preview to gnus-buffers.
 
 2003-12-30  Karl Pflästerer  <sigurd@12move.de>
 
        (gnus-agent-auto-agentize-methods): Customize.
 
 2003-12-29  Kevin Greiner  <kgreiner@xpediantsolutions.com>
-       * gnus.el (gnus-server-to-method): Fixed bug in 2003-12-22
+       * gnus.el (gnus-server-to-method): Fix bug in 2003-12-22
        check-in.
 
 2003-12-28  Adrian Lanz  <lanz@fowi.ethz.ch>
 
 2003-12-28  Jesper Harder  <harder@ifa.au.dk>
 
-       * mm-view.el (mm-text-html-washer-alist): Use
-       mm-inline-wash-with-stdin for w3m-standalone.
+       * mm-view.el (mm-text-html-washer-alist):
+       Use mm-inline-wash-with-stdin for w3m-standalone.
 
        * mm-decode.el (mm-text-html-renderer): Add w3m-standalone.
 
 
 2003-12-22  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
-       * gnus-int.el (gnus-open-server): Fixed the server status such
+       * gnus-int.el (gnus-open-server): Fix the server status such
        that an agentized server, when opened offline, has a status of
        offline.  Also fixes bug whereby the agent's backend was called
        twice to open each server.
 
-       * gnus-start.el (gnus-get-unread-articles-in-group): Autoload
-       gnus-agent-possibly-alter-active rather than inline to resolve
+       * gnus-start.el (gnus-get-unread-articles-in-group):
+       Autoload gnus-agent-possibly-alter-active rather than inline to resolve
        compiler warnings.
 
-       * gnus.el (gnus-server-to-method): Added fallback of iterating
+       * gnus.el (gnus-server-to-method): Add fallback of iterating
        over gnus-newsrc-alist to resolve names of foreign servers.
        Should fix recent agent bug.
 
 
 2003-12-21  Jesper Harder  <harder@ifa.au.dk>
 
-       * gnus-agent.el (gnus-agent-read-agentview): Use
-       car-less-than-car.
+       * gnus-agent.el (gnus-agent-read-agentview):
+       Use car-less-than-car.
 
 2003-12-20  Artem Chuprina  <ran@ran.pp.ru>  (tiny change)
 
 2003-12-18  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * mm-url.el (mm-url-insert-file-contents-external)
-       (mm-url-insert-file-contents): Added doc-strings.  Autoload.
+       (mm-url-insert-file-contents): Add doc-strings.  Autoload.
 
 2003-12-18  Jesper Harder  <harder@ifa.au.dk>
 
-       * gnus-cus.el (defvar): Defvar
-       gnus-agent-cat-disable-undownloaded-faces.
+       * gnus-cus.el (defvar):
+       Defvar gnus-agent-cat-disable-undownloaded-faces.
 
 2003-12-17  Katsumi Yamaoka  <yamaoka@jpl.org>
 
-       * message.el (message-forward-subject-name-subject): Use
-       gnus-extract-address-components instead of
+       * message.el (message-forward-subject-name-subject):
+       Use gnus-extract-address-components instead of
        mail-header-parse-address because it may be called with non-ascii
        text.
 
 
 2003-12-13  Teodor Zlatanov  <tzz@lifelogs.com>
 
-       * spam.el: Added some gnus-registry autoloads.
+       * spam.el: Add some gnus-registry autoloads.
        (spam-split-symbolic-return): Makes spam-split return 'spam
        instead of the value of spam-split-group when spam is detected.
        (spam-split-symbolic-return-positive): Makes spam-split return
        (spam-unload-hook): Remove spam-find-spam from
        gnus-summary-prepare-hook.
 
-       * gnus.el (spam-autodetect, spam-autodetect-methods): New
-       configuration items for spam autodetection.
+       * gnus.el (spam-autodetect, spam-autodetect-methods):
+       New configuration items for spam autodetection.
 
 2003-12-12  Reiner Steib  <Reiner.Steib@gmx.de>
 
        (gnus-agent-regenerate-group): When necessary, alter the group's
        active range to include articles newly recognized as being
        downloaded.
-       (gnus-agent-regenerate): Removed code that updated the agent's
+       (gnus-agent-regenerate): Remove code that updated the agent's
        active file as the new gnus-agent-possibly-alter-active function
        obsolesced it.
 
-       * gnus-cus.el (gnus-agent-customize-category): Added missing
+       * gnus-cus.el (gnus-agent-customize-category): Add missing
        agent-disable-undownloaded-faces parameter.
 
        * gnus-start.el (gnus-activate-group): Backed out my 2003-11-29
        patch as it was too late at adjusting the active range.
-       (gnus-get-unread-articles-in-group): Added call to new
+       (gnus-get-unread-articles-in-group): Add call to new
        gnus-agent-possibly-alter-active to adjust the active range.
 
 2003-12-10  Jesper Harder  <harder@ifa.au.dk>
 
 2003-12-10  Lőrentey Károly  <lorentey@elte.hu>
 
-       * spam.el (spam-disable-spam-split-during-ham-respool): New
-       variable.
-       (spam-ham-copy-or-move-routine): Respect
-       spam-disable-spam-split-during-ham-respool.
+       * spam.el (spam-disable-spam-split-during-ham-respool):
+       New variable.
+       (spam-ham-copy-or-move-routine):
+       Respect spam-disable-spam-split-during-ham-respool.
        (spam-split-disabled): New variable.
        (spam-split): Respect spam-split-disabled.
 
 
 2003-12-09  Xavier Maillard  <zedek@gnu-rox.org>
 
-       * spam.el (spam-bogofilter-database-directory): Correct
-       customization group.
+       * spam.el (spam-bogofilter-database-directory):
+       Correct customization group.
 
 2003-12-09  Per Abrahamsen  <abraham@dina.kvl.dk>
 
 
 2003-12-07  Jesper Harder  <harder@ifa.au.dk>
 
-       * spam.el (spam-check-spamoracle, spam-spamoracle-learn): Don't
-       use = or zerop to test the return value of call-process, because
+       * spam.el (spam-check-spamoracle, spam-spamoracle-learn):
+       Don't use = or zerop to test the return value of call-process, because
        it can be a string.
 
        * mail-source.el (mail-source-fetch-with-program): Do.
 
 2003-12-01  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
-       * gnus-agent.el (gnus-agent-consider-all-articles): Updated
-       docstring.
+       * gnus-agent.el (gnus-agent-consider-all-articles):
+       Update docstring.
        (gnus-predicate-implies-unread, gnus-predicate-implies-unread-1):
-       Fixed implementation such that the predicate `true' no longer
+       Fix implementation such that the predicate `true' no longer
        evaluates to t.
 
 2003-12-01  Adrian Lanz  <lanz@fowi.ethz.ch>  (tiny change)
 
 2003-11-29  Jesper Harder  <harder@ifa.au.dk>
 
-       * gnus-group.el (gnus-group-make-menu-bar): Add
-       gnus-group-make-rss-group.
+       * gnus-group.el (gnus-group-make-menu-bar):
+       Add gnus-group-make-rss-group.
 
 2003-11-28  Reiner Steib  <Reiner.Steib@gmx.de>
 
-       * message.el: Added custom-manual links to all variables that have
+       * message.el: Add custom-manual links to all variables that have
        an index entry in the message manual.
-       (message-generate-headers-first): Fixed doc-string.
+       (message-generate-headers-first): Fix doc-string.
 
 2003-11-27  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        (spam-classification-valid-p, spam-process-type-valid-p)
        (spam-registration-check-valid-p)
        (spam-unregistration-check-valid-p): Convenience functions.
-       (spam-registration-function, spam-unregistration-function): Look
-       up the registration/unregistration function based on a
+       (spam-registration-function, spam-unregistration-function):
+       Look up the registration/unregistration function based on a
        classification and the check (spam-use-* symbol).
        (spam-list-articles): Generate list of spam/ham articles from a
        given list of articles.
        (spam-register-routine): Do the heavy work of registering and
        unregistering articles, using all the articles in the group or
        specific ones as needed.
-       (spam-generic-register-routine): Removed, no longer used.
+       (spam-generic-register-routine): Remove, no longer used.
        (spam-log-unregistration-needed-p, spam-log-undo-registration):
        Handle article registration/unregistration with a given spam/ham
        processor and group.
        parameter is specified.
        (spam-stat-load): Clear spam-stat-dirty.
 
-       * gnus.el (gnus-install-group-spam-parameters): Marked the
+       * gnus.el (gnus-install-group-spam-parameters): Mark the
        old-style exit processors as obsolete in the docs, added the
        new-style exit processors while the old ones are still allowed.
 
 
 2003-11-20  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
-       * gnus.el (gnus-agent-covered-methods): Documented use of
+       * gnus.el (gnus-agent-covered-methods): Document use of
        named servers, not methods, to identity agentized groups.
        Users may now change their server configurations without having
        the server become "unagentized".
-       (gnus-agent-covered-methods): Removed from gnus-variable-list to
+       (gnus-agent-covered-methods): Remove from gnus-variable-list to
        avoid storing two copies of gnus-agent-covered-methods, one in
        .newsrc.eld and the other in agent/lib/servers.
        (gnus-server-to-method): Do not cache server for the nil method.
        (gnus-method-to-server): New function.  Associate named server
        with all, even foreign, methods.
-       (gnus-agent-method-p, gnus-agent-method-p-cache): Incorporated
+       (gnus-agent-method-p, gnus-agent-method-p-cache): Incorporate
        simple last-response cache to offset performance lose of having to
        always convert methods to named servers.
-       * gnus-agent.el (gnus-agent-expire-days): Removed obsolete
+       * gnus-agent.el (gnus-agent-expire-days): Remove obsolete
        documentation.
        (gnus-agentize, gnus-agent-add-server, gnus-agent-remove-server):
-       Modified to support new definition of gnus-agent-covered-method.
+       Modify to support new definition of gnus-agent-covered-method.
        (gnus-agent-read-servers): Rewritten to convert old method data
        into server names.
        (gnus-agent-read-servers-validate)
        (gnus-agent-expire-done-message): New function.
        (gnus-agent-unread-articles): Bug fix.  No longer drops last
        unread article onto read list.
-       (gnus-agent-regenerate-group): Changed prompt to use typical
+       (gnus-agent-regenerate-group): Change prompt to use typical
        style.
        (gnus-agent-group-covered-p): Rewrote to internally use
        gnus-agent-method-p.
        * gnus-int.el (gnus-start-news-server): Partially convert old
        gnus-agent-covered-methods to new format so that gnus-open-server
        functions correctly.
-       * gnus-srvr.el (gnus-server-insert-server-line): Replaced
-       gnus-agent-covered-methods with gnus-agent-method-p.
-       * gnus-start.el (gnus-clear-system): Added
-       gnus-agent-covered-methods to compensate for removing it from
+       * gnus-srvr.el (gnus-server-insert-server-line):
+       Replace gnus-agent-covered-methods with gnus-agent-method-p.
+       * gnus-start.el (gnus-clear-system):
+       Add gnus-agent-covered-methods to compensate for removing it from
        gnus-variable-list.
        (gnus-setup-news): Complete conversion of old
        gnus-agent-covered-methods to new format so that secondary and
 
 2003-11-10  Reiner Steib  <Reiner.Steib@gmx.de>
 
-       * message.el (message-mode-field-menu): Moved some entries, added
+       * message.el (message-mode-field-menu): Move some entries, added
        `message-insert-wide-reply'.
-       (message-change-subject): Fixed comment.
+       (message-change-subject): Fix comment.
 
 2003-11-10  Sam Steingold  <sds@gnu.org>
 
        requested.
        (gnus-registry-split-fancy-with-parent): When long names are in use,
        strip the name if we're in the native server, or else return nothing.
-       (gnus-registry-spool-action, gnus-registry-action): Use
-       gnus-group-guess-full-name-from-command-method instead of
+       (gnus-registry-spool-action, gnus-registry-action):
+       Use gnus-group-guess-full-name-from-command-method instead of
        gnus-group-guess-full-name.
 
        * spam.el (spam-mark-spam-as-expired-and-move-routine)
        (spam-ham-copy-or-move-routine): Prevent article deletions or
        moves unless the backend allows it.
 
-       * gnus.el (gnus-install-group-spam-parameters): Fixed parameters
+       * gnus.el (gnus-install-group-spam-parameters): Fix parameters
        to list spamoracle as well, suggested by Jean-Marc Lasgouttes
        <Jean-Marc.Lasgouttes@inria.fr>.
 
 2003-10-31  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * spam.el
-       (spam-log-processing-to-registry): Improved message and comments.
+       (spam-log-processing-to-registry): Improve message and comments.
        (spam-log-unregistration-needed-p): New function.
        (spam-ifile-register-spam-routine)
        (spam-ifile-register-ham-routine, spam-stat-register-spam-routine)
        (spam-whitelist-register-routine)
        (spam-bogofilter-register-spam-routine)
        (spam-bogofilter-register-ham-routine)
-       (spam-spamoracle-learn-ham, spam-spamoracle-learn-spam): Change
-       spam-log-processing-to-registry invocations appropriately.
+       (spam-spamoracle-learn-ham, spam-spamoracle-learn-spam):
+       Change spam-log-processing-to-registry invocations appropriately.
 
 2003-10-31  Derek Atkins  <warlord@MIT.EDU>  (tiny change)
 
        (spam-whitelist-register-routine)
        (spam-bogofilter-register-spam-routine)
        (spam-bogofilter-register-ham-routine)
-       (spam-spamoracle-learn-ham, spam-spamoracle-learn-spam): Add
-       spam-log-processing-to-registry invocations.
+       (spam-spamoracle-learn-ham, spam-spamoracle-learn-spam):
+       Add spam-log-processing-to-registry invocations.
 
        * gnus-registry.el: Fixed docs in the preface to mention
        gnus-registry-initialize.
        * spam.el (spam-mark-spam-as-expired-and-move-routine)
        (spam-ham-copy-or-move-routine): Don't ask when deleting copied
        articles, and use move instead of copy when possible.
-       (spam-split): Added the option of specifying a string as a
+       (spam-split): Add the option of specifying a string as a
        spam-split parameter; such a string will override
        spam-split-group temporarily.
 
        * gnus-art.el (gnus-button-alist): Allow & in mailto URLs.
        (gnus-header-button-alist): Likewise.
        (gnus-url-mailto): Handle ?to parameters.  Replace \r\n with \n.
-       Reverse parameter list to use same order as in the URL.  Reported
-       by f95-msv@f.kth.se (Mårten Svantesson).
+       Reverse parameter list to use same order as in the URL.
+       Reported by f95-msv@f.kth.se (Mårten Svantesson).
 
 2003-10-25  Teodor Zlatanov  <tzz@lifelogs.com>
 
 
 2003-10-24  Katsumi Yamaoka  <yamaoka@jpl.org>
 
-       * nndoc.el (nndoc-guess-type): Reverse the sort order.  Suggested
-       by ARISAWA Akihiro <ari@mbf.ocn.ne.jp>.
+       * nndoc.el (nndoc-guess-type): Reverse the sort order.
+       Suggested by ARISAWA Akihiro <ari@mbf.ocn.ne.jp>.
        (nndoc-dissect-buffer): Don't miss even-numbered articles.
 
 2003-10-23  Katsumi Yamaoka  <yamaoka@jpl.org>
        requirement, now just "IP address" is enough for detection for
        blackhole checking.
        (spam-check-blackholes): Oops, the dots were not escaped.
-       (spam-mark-spam-as-expired-and-move-routine): Added multiple group
+       (spam-mark-spam-as-expired-and-move-routine): Add multiple group
        support (multiple copies, then delete).
        (spam-ham-copy-routine): New function.
        (spam-ham-move-routine): New function.
        * gnus-art.el (gnus-narrow-to-page): Clear as well as set the
        value for gnus-page-broken.
 
-       * gnus-sum.el (gnus-summary-beginning-of-article): Use
-       gnus-break-pages instead of gnus-page-broken.
+       * gnus-sum.el (gnus-summary-beginning-of-article):
+       Use gnus-break-pages instead of gnus-page-broken.
        (gnus-summary-end-of-article): Use gnus-break-pages instead of
        gnus-page-broken; narrow to the end of a page beforehand.
        (gnus-summary-toggle-header): Use gnus-break-pages instead of
 
        * gnus-msg.el (gnus-extended-version): Use it.
 
-       * gnus-util.el (gnus-emacs-version): Separated out into own
+       * gnus-util.el (gnus-emacs-version): Separate out into own
        function.
 
 2003-10-19  Reiner Steib  <Reiner.Steib@gmx.de>
 
-       * message.el (message-mode-field-menu): Added
-       message-generate-unsubscribed-mail-followup-to.
+       * message.el (message-mode-field-menu):
+       Add message-generate-unsubscribed-mail-followup-to.
        (message-forward-subject-fwd): Avoid double "Fwd: ".
-       (message-change-subject): Added comment.
+       (message-change-subject): Add comment.
 
 2003-10-19  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 
 2003-10-19  Katsumi Yamaoka  <yamaoka@jpl.org>
 
-       * gnus-sum.el (gnus-remove-odd-characters): Use
-       mm-subst-char-in-string instead of subst-char-in-string.
+       * gnus-sum.el (gnus-remove-odd-characters):
+       Use mm-subst-char-in-string instead of subst-char-in-string.
        (gnus-summary-refer-article): Use gnus-replace-in-string instead
        of replace-regexp-in-string.
 
 
 2003-10-18  Jesper Harder  <harder@ifa.au.dk>
 
-       * gnus-sum.el (gnus-summary-save-parts-last-directory): Default
-       to mm-default-directory.
+       * gnus-sum.el (gnus-summary-save-parts-last-directory):
+       Default to mm-default-directory.
        (gnus-summary-save-parts-1): Use mm-file-name-rewrite-functions.
 
 2003-10-18  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * pop3.el (pop3-read-response): Check whether the process is
-       alive.
+       * pop3.el (pop3-read-response): Check whether the process is alive.
 
        * gnus-sum.el (gnus-summary-refer-article): Strip spaces.
 
-       * rfc2047.el (rfc2047-encode-region): Do error out on invalid
-       strings.
+       * rfc2047.el (rfc2047-encode-region): Do error out on invalid strings.
 
-       * nntp.el (nntp-retrieve-headers-with-xover): Get error messages
-       right.
+       * nntp.el (nntp-retrieve-headers-with-xover): Get error messages right.
 
        * gnus-agent.el (gnus-agent-read-servers): Remove sit-for.
 
        name for gcc-self.
        (gnus-inews-insert-archive-gcc): Paren mistake.
 
-       * gnus-sum.el (gnus-summary-enter-digest-group): Add
-       parent-group.
+       * gnus-sum.el (gnus-summary-enter-digest-group):
+       Add parent-group.
 
        * gnus-art.el (gnus-ignored-headers): Add more headers.
 
 
 2003-10-06  Jesper Harder  <harder@ifa.au.dk>
 
-       * gnus.el (gnus-group-faq-directory): Update .tw entry.  From
-       Albert Chun-Chieh Huang <mr894348@cs.nthu.edu.tw>
+       * gnus.el (gnus-group-faq-directory): Update .tw entry.
+       From Albert Chun-Chieh Huang <mr894348@cs.nthu.edu.tw>
 
 2003-10-03  Teodor Zlatanov  <tzz@lifelogs.com>
 
 
 2003-10-02  Reiner Steib  <Reiner.Steib@gmx.de>
 
-       * spam.el (spam-install-hooks-function): Added Autoload cookie.
+       * spam.el (spam-install-hooks-function): Add Autoload cookie.
 
 2003-10-02  Michael Shields  <shields@msrl.com>
 
 
 2003-10-01  Jesper Harder  <harder@ifa.au.dk>
 
-       * message.el (message-send): Fix reversed logic of supersedes
-       check.
+       * message.el (message-send): Fix reversed logic of supersedes check.
 
 2003-09-30  Reiner Steib  <Reiner.Steib@gmx.de>
 
 
 2003-09-05  Teodor Zlatanov  <tzz@lifelogs.com>
 
-       * gnus-registry.el (gnus-registry-split-fancy-with-parent): Yet
-       another error.  *sigh*
+       * gnus-registry.el (gnus-registry-split-fancy-with-parent):
+       Yet another error.  *sigh*
 
        * gnus-registry.el (gnus-registry-fetch-extra-entry): Don't use
        puthash unless gnus-registry-entry-caching is on.
        (gnus-registry-register-message-ids): Pass subject to
        gnus-registry-add-group.
        (gnus-registry-simplify-subject)
-       (gnus-registry-fetch-simplified-message-subject-fast): New
-       functions.
-       (gnus-registry-fetch-extra, gnus-registry-fetch-extra-entry): Add
-       extra data entry caching.
+       (gnus-registry-fetch-simplified-message-subject-fast):
+       New functions.
+       (gnus-registry-fetch-extra, gnus-registry-fetch-extra-entry):
+       Add extra data entry caching.
        (gnus-registry-add-group): Handle the extra subject parameter.
        (gnus-registry-install-hooks, gnus-registry-unload-hook): Fix the
        gnus-register-* function names.
        * nnmail.el (nnmail-cache-insert): Add subject parameter, pass it
        on to the nnmail-spool-hook.
 
-       * nnbabyl.el (nnbabyl-request-accept-article): Added subject to
+       * nnbabyl.el (nnbabyl-request-accept-article): Add subject to
        nnmail-cache-insert call.
 
-       * nndiary.el (nndiary-request-accept-article): Added subject to
+       * nndiary.el (nndiary-request-accept-article): Add subject to
        nnmail-cache-insert call.
 
-       * nnfolder.el (nnfolder-request-accept-article): Added subject to
+       * nnfolder.el (nnfolder-request-accept-article): Add subject to
        nnmail-cache-insert call.
 
-       * nnimap.el (nnimap-split-articles): Added subject to
+       * nnimap.el (nnimap-split-articles): Add subject to
        nnmail-cache-insert call.
-       (nnimap-request-accept-article): Added subject to
+       (nnimap-request-accept-article): Add subject to
        nnmail-cache-insert call.
 
-       * nnmbox.el (nnmbox-request-accept-article): Added subject to
+       * nnmbox.el (nnmbox-request-accept-article): Add subject to
        nnmail-cache-insert call.
 
-       * nnmh.el (nnmh-request-accept-article): Added subject to
+       * nnmh.el (nnmh-request-accept-article): Add subject to
        nnmail-cache-insert call.
 
-       * nnml.el (nnml-request-accept-article): Added subject to
+       * nnml.el (nnml-request-accept-article): Add subject to
        nnmail-cache-insert call.
 
 2003-09-04  Jesper Harder  <harder@ifa.au.dk>
 
 2003-08-29  Simon Josefsson  <jas@extundo.com>
 
-       * gnus-group.el (gnus-group-delete-group): Doc fix.  Suggested by
-       Jochen Küpper <jochen@jochen-kuepper.de>.
+       * gnus-group.el (gnus-group-delete-group): Doc fix.
+       Suggested by Jochen Küpper <jochen@jochen-kuepper.de>.
 
 2003-08-29  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 
 2003-08-24  Jesper Harder  <harder@ifa.au.dk>
 
-       * gnus-art.el (gnus-header-button-alist, gnus-button-alist): Fix
-       type.
+       * gnus-art.el (gnus-header-button-alist, gnus-button-alist):
+       Fix type.
 
 2003-08-22  Jesper Harder  <harder@ifa.au.dk>
 
-       * message.el (message-make-forward-subject-function): Fix
-       customize mismatch.
+       * message.el (message-make-forward-subject-function):
+       Fix customize mismatch.
 
        * gnus.el (gnus-message-archive-method): Do.
 
        char is `/' and add more information for the user.
 
        * gnus-art.el (gnus-button-alist): Add `+' (gnus-button-handle-man).
-       (gnus-header-button-alist): Added `In-Reply-To'.
+       (gnus-header-button-alist): Add `In-Reply-To'.
 
        * nnimap.el (nnimap-open-connection): Allow different user names
        on the same server (and in the same authinfo file).
 
        * gnus-sieve.el (gnus-sieve-crosspost): Fix type.
 
-       * message.el (message-make-forward-subject-function): Add
-       message-forward-subject-name-subject to choices.
+       * message.el (message-make-forward-subject-function):
+       Add message-forward-subject-name-subject to choices.
 
        * gnus-art.el (gnus-article-edit-done, gnus-article-edit-exit):
        Redisplay article after editing.
 
 2003-08-20  Jari Aalto  <jari.aalto@poboxes.com>
 
-       * gnus.el (gnus-read-group): Added check to ask confirmation if
+       * gnus.el (gnus-read-group): Add check to ask confirmation if
        Group name contains invalid character.  You can use '/' in IMAP,
        but not in filenames.  G m cannot know what the user is creating,
        so let user decide.  See thread m2oeysiev3.fsf@naima.lensflare.org.
 
 2003-08-07  Jesper Harder  <harder@ifa.au.dk>
 
-       * pgg-gpg.el (pgg-gpg-process-region): Bind
-       default-enable-multibyte-characters to nil.
+       * pgg-gpg.el (pgg-gpg-process-region):
+       Bind default-enable-multibyte-characters to nil.
 
 2003-08-07  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 
        * spam.el (spam-use-regex-body, spam-regex-body-spam)
        (spam-regex-body-ham): New variables, default to nil/empty/empty.
-       (spam-install-hooks): Added spam-use-regex-body to list or
+       (spam-install-hooks): Add spam-use-regex-body to list or
        pre-install conditions.
-       (spam-list-of-checks): Added spam-use-regex-body and
+       (spam-list-of-checks): Add spam-use-regex-body and
        spam-check-regex-body to list of checks.
-       (spam-list-of-statistical-checks): Added spam-use-regex-body to
+       (spam-list-of-statistical-checks): Add spam-use-regex-body to
        list of statistical checks.
        (spam-check-regex-body): Invokes spam-check-regex-headers with
        appropriate variable masking.
        (gnus-registry-clean-empty): New variable to enable cleaning the
        registry when saving it by calling gnus-registry-clean-empty-function.
 
-       * spam.el (spam-summary-prepare-exit): Use
-       spam-process-ham-in-spam-groups.
+       * spam.el (spam-summary-prepare-exit):
+       Use spam-process-ham-in-spam-groups.
        (spam-process-ham-in-spam-groups): New variable.
 
 2003-07-24  Jesper Harder  <harder@ifa.au.dk>
        * pgg-gpg.el (pgg-gpg-process-region): Add "--yes" to options.
 
        * pgg-gpg.el, pgg-pgp.el, pgg-pgp5.el, pgg.el: Reapply changes
-       from 2003-04-03 to fix security problem.  See
-       http://www.debian.org/security/2003/dsa-339.
+       from 2003-04-03 to fix security problem.
+       See http://www.debian.org/security/2003/dsa-339.
 
 2003-07-23  Teodor Zlatanov  <tzz@lifelogs.com>
 
 
 2003-07-10  Kai Großjohann  <kai.grossjohann@gmx.net>
 
-       * imap.el (imap-arrival-filter): Fix test for missing process
-       buffer.
+       * imap.el (imap-arrival-filter): Fix test for missing process buffer.
 
 2003-07-09  Gaute B Strokkenes  <gs234@cam.ac.uk>  (tiny change)
 
 
 2003-07-06  Jesper Harder  <harder@ifa.au.dk>
 
-       * message.el (message-send-mail-with-sendmail): Handle
-       non-numeric return values.
+       * message.el (message-send-mail-with-sendmail):
+       Handle non-numeric return values.
 
        * gnus-start.el (gnus-clear-system): Revert change from
        2003-06-19.
 
 2003-06-23  Teodor Zlatanov  <tzz@lifelogs.com>
 
-       * spam.el (spam-from-listed-p, spam-parse-list): Use
-       ietf-drums-parse-addresses to extract the address portion of the
+       * spam.el (spam-from-listed-p, spam-parse-list):
+       Use ietf-drums-parse-addresses to extract the address portion of the
        whitelist/blacklist file if it looks like an address can be found.
 
 2003-06-23  Didier Verna  <didier@xemacs.org>
        (gnus-xmas-remove-image): Ditto, with extents.
        * gnus-art.el (gnus-delete-images): Pass CATEGORY argument to
        gnus-[xmas-]remove-image.
-       (article-display-face): Don't always act as a toggle.  Call
-       `gnus-put-image' with CATEGORY argument.
+       (article-display-face): Don't always act as a toggle.
+       Call `gnus-put-image' with CATEGORY argument.
        (article-display-x-face): Call `gnus-put-image' with CATEGORY
        argument.
        * smiley.el (smiley-region): Ditto.
 
 2003-06-20  Jesper Harder  <harder@ifa.au.dk>
 
-       * mm-util.el (mm-append-to-file): Say "Appended to".  Suggested by
-       Dan Jacobson <jidanni@jidanni.org>.
+       * mm-util.el (mm-append-to-file): Say "Appended to".
+       Suggested by Dan Jacobson <jidanni@jidanni.org>.
 
-       * mm-view.el (mm-inline-message): Bind
-       gnus-original-article-buffer to the buffer in the mml handle
+       * mm-view.el (mm-inline-message):
+       Bind gnus-original-article-buffer to the buffer in the mml handle
        holding the message.
 
 2003-06-20  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 2003-06-19  Jesper Harder  <harder@ifa.au.dk>
 
-       * nnheader.el (nnheader-init-server-buffer): Add
-       nntp-server-buffer to gnus-buffers.
+       * nnheader.el (nnheader-init-server-buffer):
+       Add nntp-server-buffer to gnus-buffers.
 
        * gnus-start.el (gnus-clear-system): Now we don't need to kill
        nntp-server-buffer separately.
 
 2003-06-17  Reiner Steib  <Reiner.Steib@gmx.de>
 
-       * gnus-util.el (gnus-extract-address-components): Added
-       doc-string.
+       * gnus-util.el (gnus-extract-address-components):
+       Add doc-string.
 
 2003-06-16  Michael Albinus  <Michael.Albinus@alcatel.de>
 
 
 2003-06-16  Katsumi Yamaoka  <yamaoka@jpl.org>
 
-       * gnus-sum.el (gnus-summary-refer-parent-article): Extract
-       Message-ID from In-Reply-To header.
+       * gnus-sum.el (gnus-summary-refer-parent-article):
+       Extract Message-ID from In-Reply-To header.
 
 2003-06-16  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 
 2003-06-15  Reiner Steib  <Reiner.Steib@gmx.de>
 
-       * gnus-sum.el (gnus-summary-force-verify-and-decrypt): Bind
-       `gnus-article-emulate-mime'.
+       * gnus-sum.el (gnus-summary-force-verify-and-decrypt):
+       Bind `gnus-article-emulate-mime'.
 
 2003-06-15  Tommi Vainikainen  <thv+gnus@iki.fi>
 
-       * message.el (message-is-yours-p): New function.  Separated common
-       code from message-cancel-news and message-supersede.  Added
-       matching code which uses message-alternative-emails regexp as last
+       * message.el (message-is-yours-p): New function.  Separate common
+       code from message-cancel-news and message-supersede.
+       Add matching code which uses message-alternative-emails regexp as last
        resort.
        (message-cancel-news, message-supersede): Use message-is-yours-p.
 
 
 2003-06-12  Dave Love  <fx@gnu.org>
 
-       * nnheader.el (nnheader-functionp): Deleted.
+       * nnheader.el (nnheader-functionp): Delete.
 
        * nnmail.el (nnmail-split-fancy-syntax-table): Define all in
        defvar.
-       (nnmail-version): Deleted.
+       (nnmail-version): Delete.
        (nnmail-check-duplication, nnmail-expiry-target-group): Don't use
        nnheader-functionp.
 
        (spam-spamoracle, spam-spamoracle): New variables.
        (spam-group-spam-processor-spamoracle-p)
        (spam-group-ham-processor-spamoracle-p): New functions.
-       (spam-summary-prepare-exit): Added spamoracle ham/spam exit processing.
-       (spam-list-of-checks, spam-list-of-statistical-checks): Add
-       spam-use-spamoracle.
+       (spam-summary-prepare-exit): Add spamoracle ham/spam exit processing.
+       (spam-list-of-checks, spam-list-of-statistical-checks):
+       Add spam-use-spamoracle.
        (spam-check-spamoracle, spam-spamoracle-learn)
        (spam-spamoracle-learn-ham, spam-spamoracle-learn-spam): New functions.
 
        * gnus.el (gnus-group-spam-exit-processor-spamoracle)
        (gnus-group-ham-exit-processor-spamoracle): New variables for SpamOracle.
-       (spam-process, ham-process): Added spamoracle spam/ham processors.
+       (spam-process, ham-process): Add spamoracle spam/ham processors.
 
 2003-06-08  Jesper Harder  <harder@ifa.au.dk>
 
 
 2003-06-07  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * gnus-sum.el (gnus-summary-make-menu-bar): Removed ["Add buttons"
+       * gnus-sum.el (gnus-summary-make-menu-bar): Remove ["Add buttons"
        gnus-summary-display-buttonized t].
 
 2003-06-07  Kai Großjohann  <kai.grossjohann@gmx.net>
        (gnus-other-frame): Quote lambda used as hook.
 
        * message.el: Doc fixes.
-       (message-functionp): Deleted.  Callers changed.
-       (message-fix-before-sending): Highlight with overlays.  Clarify
-       `illegible text' messages.
+       (message-functionp): Delete.  Callers changed.
+       (message-fix-before-sending): Highlight with overlays.
+       Clarify `illegible text' messages.
        (rmail-enable-mime-composing, gnus-message-group-art): Defvar when
        compiling.
        (gnus-find-method-for-group, nnvirtual-find-group-art): Autoload.
 
 2003-06-03  Eric Eide  <eeide@cs.utah.edu>
 
-       * gnus-xmas.el (gnus-xmas-create-image): Use
-       insert-file-contents-literally.
+       * gnus-xmas.el (gnus-xmas-create-image):
+       Use insert-file-contents-literally.
 
 2003-06-02  Teodor Zlatanov  <tzz@lifelogs.com>
 
        (gnus-registry-delete-group): Use it.
        (gnus-registry-unload-hook): Uninstall all the hooks.
 
-       * spam.el (spam-install-hooks-function, spam-unload-hook): New
-       functions so users that load spam.el for customization don't get
+       * spam.el (spam-install-hooks-function, spam-unload-hook):
+       New functions so users that load spam.el for customization don't get
        all the hooks installed.
        (spam-install-hooks): New variable, set to t by default if user
        has one of the spam-use-* variables set.
        * rfc2047.el (rfc2047-decode): Don't use
        mm-with-unibyte-current-buffer.
 
-       * qp.el (quoted-printable-decode-string): Use
-       mm-with-unibyte-buffer.
+       * qp.el (quoted-printable-decode-string):
+       Use mm-with-unibyte-buffer.
 
 2003-05-29  Teodor Zlatanov  <tzz@lifelogs.com>
 
 
 2003-05-20  Dave Love  <fx@gnu.org>
 
-       * rfc2047.el (rfc2047-q-encoding-alist): Deleted.
+       * rfc2047.el (rfc2047-q-encoding-alist): Delete.
        (rfc2047-q-encode-region): Don't use it.
        (rfc2047-encode-message-header) <(eq method 'mime)>: Bind
        rfc2047-encoding-type to `mime'.
 
 2003-05-14  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
-       * gnus-agent.el (gnus-agentize): Updated documentation to match
+       * gnus-agent.el (gnus-agentize): Update documentation to match
        usage.
        (gnus-agent-expire-group-1): Do not skip over a group when the
        force argument is set.
-       * gnus.el (gnus-agent): Updated documentation to reflect that
+       * gnus.el (gnus-agent): Update documentation to reflect that
        gnus-agent now defaults to t.
 
 2003-05-14  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 2003-05-14  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * mail-source.el (mail-source-delete-incoming): Changed to t.
+       * mail-source.el (mail-source-delete-incoming): Change to t.
 
        * rfc2047.el (rfc2047-syntax-table): Funcall.
 
        * rfc2047.el (rfc2047-encodable-p): Use the header charset.
 
-       * gnus-sum.el (gnus-summary-reselect-current-group): Supply
-       leave-hidden.
+       * gnus-sum.el (gnus-summary-reselect-current-group):
+       Supply leave-hidden.
 
 2003-05-14  Jonathan I. Kamens  <jik@kamens.brookline.ma.us>
 
-       * gnus-sum.el (gnus-summary-exit): Added `leave-hidden'.  (Tiny
+       * gnus-sum.el (gnus-summary-exit): Add `leave-hidden'.  (Tiny
        patch.)
 
 2003-05-13  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * gnus-registry.el (gnus-registry-store-extra-entry): Use
-       gnus-assq-delete-all.
+       * gnus-registry.el (gnus-registry-store-extra-entry):
+       Use gnus-assq-delete-all.
 
        * gnus-xmas.el (gnus-xmas-assq-delete-all): New function.
 
        (gnus-agent-cat-disable-undownloaded-faces): New function.
        Accessor for new agent property
        'agent-disable-undownloaded-faces'.
-       gnus-cus.el (gnus-agent-parameters): Added
-       agent-disable-undownloaded-faces and corrected documentation.
+       gnus-cus.el (gnus-agent-parameters):
+       Add agent-disable-undownloaded-faces and corrected documentation.
        (gnus-agent-cat-prepare-category-field,
-       gnus-agent-customize-category): Changed to avoid creating free
+       gnus-agent-customize-category): Change to avoid creating free
        references to each field's symbol.
        gnus-sum.el (gnus-summary-use-undownloaded-faces): New local variable.
        (gnus-select-newgroup): Initialize it.
 
 2003-05-12  Dave Love  <fx@gnu.org>
 
-       * mm-util.el (mm-read-charset): Deleted.
+       * mm-util.el (mm-read-charset): Delete.
        (mm-coding-system-mime-charset): New.
        (mm-read-coding-system, mm-mule-charset-to-mime-charset)
        (mm-charset-to-coding-system, mm-mime-charset)
        (mm-find-mime-charset-region): Use it.
        (mm-default-multibyte-p): Fix non-mule case.
 
-       * rfc2047.el (rfc2047-point-at-bol, rfc2047-point-at-bol): Eval
-       and compile.
+       * rfc2047.el (rfc2047-point-at-bol, rfc2047-point-at-bol):
+       Eval and compile.
        (rfc2047-syntax-table): Fix building table to work in Emacs 22.
        (rfc2047-unfold-region): Delete unused var `leading'.
 
 
 2003-05-11  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * gnus-agent.el (gnus-agent-expire-unagentized-dirs): Added
-       space.
+       * gnus-agent.el (gnus-agent-expire-unagentized-dirs):
+       Add space.
 
 2003-05-11  Jesper Harder  <harder@ifa.au.dk>
 
 
 2003-05-10  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * gnus.el (gnus-logo-color-alist): Added no colors.
+       * gnus.el (gnus-logo-color-alist): Add no colors.
 
 2003-05-09  Dave Love  <fx@gnu.org>
 
 
        * gnus-registry.el (gnus-registry-unregistered-group-regex):
        removed in favor of the group/topic/global variables.
-       (gnus-registry-register-message-ids): Fixed test to omit
+       (gnus-registry-register-message-ids): Fix test to omit
        gnus-registry-unregistered-group-regex.
 
-       * gnus.el (gnus-variable-list): Removed gnus-registry-alist and
+       * gnus.el (gnus-variable-list): Remove gnus-registry-alist and
        gnus-registry-headers-alist from the list.
-       (gnus-registry-headers-alist): Removed.
+       (gnus-registry-headers-alist): Remove.
        (registry-ignore): New parameter, with accompanying
        gnus-registry-ignored-groups global variable.
 
        used by gnus-registry.el.
 
        * gnus-registry.el (gnus-registry-cache-file): New file variable.
-       (gnus-registry-cache-read, gnus-registry-cache-save): New
-       functions.
+       (gnus-registry-cache-read, gnus-registry-cache-save):
+       New functions.
        (gnus-registry-save, gnus-registry-read): Use the new
        gnus-registry-cache-{read|save} functions, and change the name
        from gnus-registry-translate-{from|to}-alist.
-       (gnus-registry-clear): Fixed so it doesn't refer to old function name.
+       (gnus-registry-clear): Fix so it doesn't refer to old function name.
 
 2003-05-09  Dan Christensen  <jdc@chow.mat.jhu.edu>
 
 
 2003-05-08  Teodor Zlatanov  <tzz@lifelogs.com>
 
-       * gnus-start.el (gnus-clear-system): Added gnus-registry-alist to
+       * gnus-start.el (gnus-clear-system): Add gnus-registry-alist to
        the list of cleared variables.
 
        * gnus-registry.el (gnus-registry-split-fancy-with-parent):
 
 2003-05-08  Kai Großjohann  <kai.grossjohann@gmx.net>
 
-       * gnus-sum.el (gnus-summary-next-page): Mention
-       `gnus-article-skip-boring' in docstring.
+       * gnus-sum.el (gnus-summary-next-page):
+       Mention `gnus-article-skip-boring' in docstring.
 
 2003-05-08  Jesper Harder  <harder@ifa.au.dk>
 
 
        * rfc2047.el (rfc2047-point-at-bol, rfc2047-point-at-eol): New.
        Callers of gnus- versions changed to use them.
-       (rfc2047-header-encoding-alist): Add `address-mime' part.  Doc
-       fixes.
+       (rfc2047-header-encoding-alist): Add `address-mime' part.
+       Doc fixes.
        (rfc2047-encoding-type): New.
        (rfc2047-encode-message-header): Use mm-charset-to-coding-system.
        Don't include header name field in encoding.  Add `address-mime'
        case and bind rfc2047-encoding-type for `mime' case.
-       (rfc2047-encodable-p): Deleted.
+       (rfc2047-encodable-p): Delete.
        (rfc2047-syntax-table): New.
        (rfc2047-encode-region, rfc2047-encode): Rewritten to take account
        of rfc2047 rules with respect to rfc2822 tokens and to do encoding
 
 2003-05-02  Dave Love  <fx@gnu.org>
 
-       * rfc2047.el (rfc2047-q-encode-region, rfc2047-decode): Use
-       mm-with-unibyte-current-buffer.
+       * rfc2047.el (rfc2047-q-encode-region, rfc2047-decode):
+       Use mm-with-unibyte-current-buffer.
        (ietf-drums, gnus-util): Don't require.
 
        * sieve.el (sieve-manage-mode-menu): Define before use.
        * mm-util.el (mm-coding-system-p): Don't override nil from
        coding-system-p.
        (mm-mule4-p, mm-disable-multibyte-mule4)
-       (mm-with-unibyte-current-buffer-mule4): Deleted.
+       (mm-with-unibyte-current-buffer-mule4): Delete.
        (mm-multibyte-p): Use defun, not defalias.
-       (mm-make-temp-file): Moved to group at top of file.
+       (mm-make-temp-file): Move to group at top of file.
        (mm-point-at-eol, mm-point-at-bol): New.
 
        * gnus-cite.el (gnus-art): Require.
        (gnus-output-to-rmail): Require mm-util.
 
        * mail-source.el (mail-source-callback): Use mm-make-temp-file.
-       (mail-source-make-complex-temp-name): Deleted.
+       (mail-source-make-complex-temp-name): Delete.
 
        * message.el (message-use-idna): Use mm-coding-system-p.
        (message-tokenize-header, message-make-organization)
        (message-make-from): Use with-temp-buffer.
-       (message-set-work-buffer): Deleted.
+       (message-set-work-buffer): Delete.
        (message-fill-paragraph): Use `if' not `and' for compiler warning.
        (message-check-news-header-syntax): Remove useless lambda.
        (message-forward-make-body): Use mm-disable-multibyte,
        mm-with-unibyte-current-buffer, mm-enable-multibyte.
-       (message-replace-chars-in-string): Deleted.
+       (message-replace-chars-in-string): Delete.
 
        * mm-extern.el (mm-extern-local-file): Use mm-disable-multibyte.
        (mm-extern-url): Use mm-with-unibyte-current-buffer,
        mm-disable-multibyte.
        (mm-extern-anon-ftp): Use mm-disable-multibyte.
 
-       * mml1991.el (mml1991-mailcrypt-encrypt, mml1991-gpg-encrypt): Use
-       mm-with-unibyte-current-buffer.
+       * mml1991.el (mml1991-mailcrypt-encrypt, mml1991-gpg-encrypt):
+       Use mm-with-unibyte-current-buffer.
 
        * mml2015.el (mml): Require.
-       (mml2015-mailcrypt-encrypt, mml2015-gpg-encrypt): Use
-       mm-with-unibyte-current-buffer.
+       (mml2015-mailcrypt-encrypt, mml2015-gpg-encrypt):
+       Use mm-with-unibyte-current-buffer.
 
        * nnheader.el (gnus-util): Require.
 
        * gnus-registry.el (gnus-registry-fetch-extra)
        (gnus-registry-store-extra, gnus-registry-group-count): New functions.
        (gnus-registry-fetch-group, gnus-registry-delete-group)
-       (gnus-registry-add-group): Changed to work with extra data element
+       (gnus-registry-add-group): Change to work with extra data element
        if present.
 
 2003-05-01  Lars Magne Ingebrigtsen  <lars@ingebrigtsen.no>
 
 2003-05-01  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * message.el (message-forward-subject-name-subject): Decode
-       string when forwarding.
+       * message.el (message-forward-subject-name-subject):
+       Decode string when forwarding.
 
 2003-05-01  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 
 2003-04-30  Reiner Steib  <Reiner.Steib@gmx.de>
 
-       * gnus-art.el (gnus-button-prefer-mid-or-mail): Fixed typo in
+       * gnus-art.el (gnus-button-prefer-mid-or-mail): Fix typo in
        doc-string.
 
 2003-05-01  Steve Youngs  <youngs@xemacs.org>
 
 2003-04-30  Teodor Zlatanov  <tzz@lifelogs.com>
 
-       * gnus-registry.el (gnus-registry-split-fancy-with-parent): Added
-       diagnostic message.
+       * gnus-registry.el (gnus-registry-split-fancy-with-parent):
+       Add diagnostic message.
        (gnus-registry-grep-in-list): Don't run when word is nil.
        (gnus-registry-fetch-message-id-fast): New function.
        (gnus-registry-delete-group, gnus-registry-add-group): Make sure
        the id and group are not nil.
        (gnus-registry-register-message-ids): New function.
-       (gnus-register-action): Optimized logical flow.
-       (gnus-summary-prepare-hook): Added gnus-registry-register-message-ids.
+       (gnus-register-action): Optimize logical flow.
+       (gnus-summary-prepare-hook): Add gnus-registry-register-message-ids.
 
 2003-04-30  Kai Großjohann  <kai.grossjohann@gmx.net>
 
-       * gnus-delay.el (gnus-delay-article): Call
-       `gnus-agent-queue-setup' to create the delay group.
+       * gnus-delay.el (gnus-delay-article):
+       Call `gnus-agent-queue-setup' to create the delay group.
 
        * gnus-agent.el (gnus-agent-queue-setup): Support optional arg
        for the (queue) group name.
 2003-04-30  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
        * gnus-agent.el (gnus-agent-cat-defaccessor, gnus-agent-cat-name):
-       Wrapped in eval-when-compile.
+       Wrap in eval-when-compile.
        (gnus-agent-mode): Bind gnus-agent-go-online to nil as you
        shouldn't be asked twice to go online with each server.
        (gnus-agent-get-undownloaded-list, gnus-agent-fetch-articles,
        gnus-agent-crosspost, gnus-agent-flush-cache,
        gnus-agent-fetch-session, gnus-agent-unread-articles,
        gnus-agent-uncached-articles, gnus-agent-regenerate-group,
-       gnus-agent-group-covered-p): Expanded pop macros used for
+       gnus-agent-group-covered-p): Expand pop macros used for
        effect.  Avoids compilation warning in emacs 21.3.
 
-       * gnus-int.el (gnus-open-server): Restructured to only open
+       * gnus-int.el (gnus-open-server): Restructure to only open
        nnagent when gnus-plugged is nil.
 
 2003-04-29  Teodor Zlatanov  <tzz@lifelogs.com>
 
 2003-04-29  Reiner Steib  <Reiner.Steib@gmx.de>
 
-       * gnus-art.el (gnus-button-alist): Fixed CTAN regexp.
+       * gnus-art.el (gnus-button-alist): Fix CTAN regexp.
 
 2003-04-29  Teodor Zlatanov  <tzz@lifelogs.com>
 
 
        * gnus-art.el (gnus-mime-display-multipart-as-mixed)
        (gnus-mime-display-multipart-alternative-as-mixed)
-       (gnus-mime-display-multipart-related-as-mixed): Added doc-strings,
+       (gnus-mime-display-multipart-related-as-mixed): Add doc-strings,
        allow customization.
 
 2003-04-27  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 2003-04-27  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
-       * gnus-registry.el (gnus-register-spool-action): Replaced literal
+       * gnus-registry.el (gnus-register-spool-action): Replace literal
        carriage-return character with its escape sequence.
 
 2003-04-27  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * gnus.el: Remove gnus-functionp throughout.
 
-       * gnus-util.el (gnus-functionp): Removed.
+       * gnus-util.el (gnus-functionp): Remove.
 
        * gnus-msg.el (gnus-summary-wide-reply-with-original): Doc fix.
 
        * gnus-start.el (message-make-date): Autoload rather than
        requiring message.
 
-       * gnus-group.el (gnus-group-name-charset-group-alist): Use
-       mm-coding-system-p.
+       * gnus-group.el (gnus-group-name-charset-group-alist):
+       Use mm-coding-system-p.
        (gnus-cache-active-altered): Defvar when compiling.
        (gnus-group-delete-group): Re-write to help avoid warnings.
 
 
 2003-04-22  Paul Jarc  <prj@po.cwru.edu>
 
-       * gnus-util.el (gnus-merge): Added "type" argument to match CL
+       * gnus-util.el (gnus-merge): Add "type" argument to match CL
        merge and gnus-sum.el's expectations.
 
 2003-04-21  Reiner Steib  <Reiner.Steib@gmx.de>
 
-       * gnus-art.el (gnus-button-url-regexp): Added nntp.
+       * gnus-art.el (gnus-button-url-regexp): Add nntp.
 
        * message.el (message-generate-headers-first): Default to
        '(references).
        * spam.el (spam-split): Allow a particular check as a parameter,
        e.g. (: spam-split 'spam-use-bogofilter).
        (spam-mark-only-unseen-as-spam): New parameter, see doc.
-       (spam-mark-junk-as-spam-routine): Use
-       spam-mark-only-unseen-as-spam, simplify routine to take advantage
+       (spam-mark-junk-as-spam-routine):
+       Use spam-mark-only-unseen-as-spam, simplify routine to take advantage
        of gnus-newsgroup-unread as well as gnus-newsgroup-unseen.
 
 2003-04-17  Teodor Zlatanov  <tzz@lifelogs.com>
        * gnus-registry.el (gnus-registry-clear)
        (gnus-registry-fetch-group, gnus-registry-grep-in-list)
        (gnus-registry-split-fancy-with-parent): New functions.
-       (gnus-register-spool-action, gnus-register-action): Simplified the
+       (gnus-register-spool-action, gnus-register-action): Simplify the
        format.
        (gnus-registry): New customization group.
        (gnus-registry-unfollowed-groups): New variable.
 
        * spam-report.el (Module): New module for spam reporting.
 
-       * gnus.el (spam-process): Added
-       gnus-group-spam-exit-processor-report-gmane to the list of choices.
-       (gnus-install-group-spam-parameters): Defined new spam exit processor.
+       * gnus.el (spam-process):
+       Add gnus-group-spam-exit-processor-report-gmane to the list of choices.
+       (gnus-install-group-spam-parameters): Define new spam exit processor.
 
        * spam.el (autoload): Autoload spam-report-gmane when needed.
        (spam-report-gmane-register-routine): Glue for spam-report.el.
 
 2003-04-16  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
-       * gnus-agent.el (gnus-agent-make-cat): Added optional parameter to
+       * gnus-agent.el (gnus-agent-make-cat): Add optional parameter to
        specify a predicate other than false.
        (gnus-category-read): Use the new feature to create a 'default'
        category with a 'short' predicate.
 
 2003-04-15  Teodor Zlatanov  <tzz@lifelogs.com>
 
-       * spam.el (spam-split): Added save-restriction to save-excursion.
+       * spam.el (spam-split): Add save-restriction to save-excursion.
 
 2003-04-15  Julien Avarre  <julien@avarre.com>
 
 
 2003-04-13  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
-       * gnus-agent.el (gnus-agent-group-pathname): Bind
-       gnus-command-method so that gnus-agent-directory will always
+       * gnus-agent.el (gnus-agent-group-pathname):
+       Bind gnus-command-method so that gnus-agent-directory will always
        return a valid directory.
        * gnus-cache.el (gnus-cache-enter-article): Remove article from
        gnus-newsgroup-undownloaded so that the summary will display the
 
 2003-04-12  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * gnus-art.el (gnus-article-next-page): Use
-       gnus-article-over-scroll.
+       * gnus-art.el (gnus-article-next-page):
+       Use gnus-article-over-scroll.
        (gnus-article-over-scroll): New variable.
 
        * message.el (message-newline-and-reformat): Place a boundary
        before filling.
-       (message-make-forward-subject-function): Changed default to
+       (message-make-forward-subject-function): Change default to
        message-forward-subject-name-subject.
        (message-forward-subject-name-subject): New function.
 
 
        * gnus-sum.el (gnus-summary-line-message-size): Ditto.
 
-       * gnus-cus.el (gnus-group-parameters): Removed "which see".
+       * gnus-cus.el (gnus-group-parameters): Remove "which see".
 
-       * mml.el (mml-minibuffer-read-file): Bind
-       completion-ignored-extensions to nil.
+       * mml.el (mml-minibuffer-read-file):
+       Bind completion-ignored-extensions to nil.
 
        * message.el (message-fix-before-sending): Comment fix.
        (message-fix-before-sending): Make hidden headers visible.
        (message-hide-headers): Bind after-change-functions to nil.
-       (message-forbidden-properties): Put invisible and intangible
-       back.
+       (message-forbidden-properties): Put invisible and intangible back.
        (message-strip-forbidden-properties): Ignore message-hidden text.
 
        * gnus-msg.el: Hide headers.
        (message-hide-headers): New function.
        (message-hide-header-p): New function.
        (message-hide-header-p): Change logic.
-       (message-forbidden-properties): Remove intangible nil invisible
-       nil.
+       (message-forbidden-properties): Remove intangible nil invisible nil.
        (message-hide-headers): Narrow to headers.
 
 2003-04-12  Jesper Harder  <harder@ifa.au.dk>
        * gnus-agent.el (gnus-agent-get-undownloaded-list): Articles in
        the CACHE are now detected and handled the same as an article
        downloaded into the agent.
-       (gnus-agent-group-path): Modified to match nnmail-group-pathname
+       (gnus-agent-group-path): Modify to match nnmail-group-pathname
        so that the agent front-end and back-end (nnagent) always use the
        same directory.
        (gnus-agent-group-pathname): New function.  Wrapper for
 
 2003-04-09  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
-       * gnus-agent.el (gnus-agent-write-active): Added option of
+       * gnus-agent.el (gnus-agent-write-active): Add option of
        replacing, rather than updating, the agent's active file.  Do NOT
        use the fully qualified group name as gnus-active-to-gnus-format
        blindly prefixes group names with server names.
        (gnus-agent-expire-unagentized-dirs): Avoid asking to delete the
        same ancestor multiple times.
 
-       * gnus-async.el (gnus-asynchronous): Moved defcustom of
-       gnus-asynchronous away from defgroup of gnus-asynchronous.  This
-       seems to fix an intermittant error in which loading gnus-async
+       * gnus-async.el (gnus-asynchronous): Move defcustom of
+       gnus-asynchronous away from defgroup of gnus-asynchronous.
+       This seems to fix an intermittant error in which loading gnus-async
        fails to define gnus-asynchronous (the variable).
 
        * gnus-sum.el: Concur with Steve Young, 5th argument to 'load' is
        group's active range to include fetched articles that are no
        longer in the server's active range.
 
-       * gnus-util.el (gnus-with-output-to-file): Removed all of the
+       * gnus-util.el (gnus-with-output-to-file): Remove all of the
        print-* bindings as they should be handled by the function doing
        the printing.
 
 
 2003-04-06  Jesper Harder  <harder@ifa.au.dk>
 
-       * mm-uu.el (mm-uu-copy-to-buffer): Copy
-       `buffer-file-coding-system' to the new buffer.
+       * mm-uu.el (mm-uu-copy-to-buffer):
+       Copy `buffer-file-coding-system' to the new buffer.
        (mm-uu-pgp-signed-extract-1): Don't copy
        `buffer-file-coding-system' here.
 
        exist in XEmacs.
        (mm-decode-body): Add missing quote.
 
-       * mm-uu.el (mm-uu-pgp-signed-extract-1): Set
-       buffer-file-coding-system.
+       * mm-uu.el (mm-uu-pgp-signed-extract-1):
+       Set buffer-file-coding-system.
 
        * mm-bodies.el (mm-decode-body): Set buffer-file-coding-system to
        last-coding-system-used.
 
 2003-04-05  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
-       * gnus-start.el (gnus-gnus-to-quick-newsrc-format): Bound
-       print-escape-nonascii to fix more characters in compiled format
+       * gnus-start.el (gnus-gnus-to-quick-newsrc-format):
+       Bound print-escape-nonascii to fix more characters in compiled format
        specs.
 
 2003-04-05  Jesper Harder  <harder@ifa.au.dk>
 
 2003-04-04  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
-       * gnus-start.el (gnus-gnus-to-quick-newsrc-format): Bound
-       print-quoted, print-readably, print-escape-multibyte, and
+       * gnus-start.el (gnus-gnus-to-quick-newsrc-format):
+       Bound print-quoted, print-readably, print-escape-multibyte, and
        print-level to match original behavior of gnus-prin1.  This should
        repair the format of .newsrc.eld when using compiled format specs.
 
 
 2003-04-03  Reiner Steib  <Reiner.Steib@gmx.de>
 
-       * gnus-art.el (gnus-button-ctan-directory-regexp): Changed meaning
+       * gnus-art.el (gnus-button-ctan-directory-regexp): Change meaning
        and value.
        (gnus-button-alist): Use it.
 
 
 2003-04-02  Reiner Steib  <Reiner.Steib@gmx.de>
 
-       * gnus-util.el (gnus-message): Added doc-string.
+       * gnus-util.el (gnus-message): Add doc-string.
 
-       * gnus-score.el (gnus-score-find-trace): Changed behavior of `q'.
+       * gnus-score.el (gnus-score-find-trace): Change behavior of `q'.
        (gnus-score-edit-file-at-point): Goto first match when using `e'.
 
 2003-04-01  Reiner Steib  <Reiner.Steib@gmx.de>
 
 2003-03-31  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
-       * gnus-start.el (gnus-gnus-to-quick-newsrc-format): Bound
-       print-escape-newlines to print escape sequences rather than
+       * gnus-start.el (gnus-gnus-to-quick-newsrc-format):
+       Bound print-escape-newlines to print escape sequences rather than
        literal newline characters.
 
 2003-03-31  Reiner Steib  <Reiner.Steib@gmx.de>
 
-       * gnus-art.el (gnus-button-valid-fqdn-regexp): Use
-       `message-valid-fqdn-regexp' for initialization.
-       (gnus-button-handle-info-url): Renamed and extended version of
+       * gnus-art.el (gnus-button-valid-fqdn-regexp):
+       Use `message-valid-fqdn-regexp' for initialization.
+       (gnus-button-handle-info-url): Rename and extended version of
        `gnus-button-handle-info'.
-       (gnus-button-message-level): Renamed from `gnus-button-mail-level'.
+       (gnus-button-message-level): Rename from `gnus-button-mail-level'.
        (gnus-button-handle-symbol, gnus-button-handle-library)
        (gnus-button-handle-info-keystrokes): New functions.
        (gnus-button-browse-level): New variable.
        (gnus-button-alist): Use them.  Added levels.
-       (gnus-header-button-alist): Added levels.
+       (gnus-header-button-alist): Add levels.
 
 2003-03-31  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 
 2003-03-31  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * gnus-start.el (gnus-unload): Removed.
+       * gnus-start.el (gnus-unload): Remove.
 
-       * pop3.el (pop3-read-response): Use
-       nnheader-accept-process-output.
+       * pop3.el (pop3-read-response):
+       Use nnheader-accept-process-output.
        (pop3-retr): Ditto.
 
        * mm-view.el (mm-text-html-renderer-alist): Add -nolist to Lynx.
        * nnheader.el (nnheader-read-timeout): New variable.
        (nnheader-accept-process-output): New function.
 
-       * nntp.el (nntp-read-timeout): Removed.
+       * nntp.el (nntp-read-timeout): Remove.
 
        * gnus-sum.el (gnus-summary-prepare-threads): Add comment.
 
 
 2003-03-28  Vasily Korytov  <deskpot@myrealbox.com>
 
-       * message.el (message-make-in-reply-to): Use
-       mail-extract-address-components to determine sender's
+       * message.el (message-make-in-reply-to):
+       Use mail-extract-address-components to determine sender's
        name/address.
 
 2003-03-30  Lars Magne Ingebrigtsen  <larsi@gnus.org>
        valid lambda.
        (gnus-registry-translate-from-alist): Ditto.
 
-       * gnus-start.el (gnus-gnus-to-quick-newsrc-format): Bind
-       print-length to nil.
+       * gnus-start.el (gnus-gnus-to-quick-newsrc-format):
+       Bind print-length to nil.
 
        * gnus-sum.el (gnus-summary-highlight-line-0): Indent.
 
        (gnus-registry-translate-from-alist): New functions.
        (gnus-register-spool-action): Add a spool item to the registry.
 
-       * gnus.el (gnus-variable-list): Added gnus-registry-alist to the
+       * gnus.el (gnus-variable-list): Add gnus-registry-alist to the
        list of saved variables.
        (gnus-registry-alist): New variable.
 
 2003-03-28  Andreas Fuchs  <asf@void.at>
 
-       * gnus-registry.el (alist-to-hashtable, hashtable-to-alist): New
-       functions.
+       * gnus-registry.el (alist-to-hashtable, hashtable-to-alist):
+       New functions.
 
 2003-03-27  Simon Josefsson  <jas@extundo.com>
 
 
 2003-03-26  Kevin Ryde  <user42@zip.com.au>
 
-       * gnus-sum.el (gnus-summary-find-for-reselect): Renamed from
+       * gnus-sum.el (gnus-summary-find-for-reselect): Rename from
        gnus-summary-find-uncancelled, skip temporary articles inserted by
        "refer" functions.
 
 
 2003-03-26  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
-       * gnus-agent.el (gnus-agent-fetch-selected-article): Replaced
+       * gnus-agent.el (gnus-agent-fetch-selected-article): Replace
        gnus-summary-update-line (which updated the article's face) with
        gnus-summary-update-download-mark (which updates the article's
        face by calling gnus-summary-update-line AND updates the download
        * rfc2047.el (rfc2047-header-encoding-alist): Make Followup-To
        same as Newsgroups.
 
-       * nntp.el (nntp-open-connection-function): Mention
-       nntp-open-tls-stream.
+       * nntp.el (nntp-open-connection-function):
+       Mention nntp-open-tls-stream.
        (nntp-open-tls-stream): New function.
 
        * tls.el: New file.
        * gnus-int.el (gnus-open-server): Catch errors in backend's
        open-server method.  Returns nil rather than crashing startup.
 
-       * gnus-sum.el (eval-when-compile): Modified to resolve
+       * gnus-sum.el (eval-when-compile): Modify to resolve
        compile-time warnings.
 
-       * gnus-uu.el (gnus-uu-mark-series): Added informative msg.
+       * gnus-uu.el (gnus-uu-mark-series): Add informative msg.
        Reports length of series so that the user can compare N with a
        subject that should, if the entire series is present, contain
        '(.../N)'.
 
 2003-03-20  Reiner Steib  <Reiner.Steib@gmx.de>
 
-       * message.el (message-check-news-header-syntax): Fixed regexp.
+       * message.el (message-check-news-header-syntax): Fix regexp.
 
 2003-03-20  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
 
        * spam.el (spam-group-ham-mark-p, spam-group-spam-mark-p)
        (spam-group-ham-marks, spam-group-spam-marks): New functions.
-       (spam-spam-marks, spam-ham-marks): Removed in favor of the
+       (spam-spam-marks, spam-ham-marks): Remove in favor of the
        spam-marks and ham-marks parameters.
        (spam-generic-register-routine, spam-ham-move-routine): Use the
        new spam-group-{spam,ham}-mark-p functions.
 
 2003-03-09  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
-       * gnus-agent.el (gnus-agent-fetched-hook): New variable.  Just
-       fixing the code to match the documentation.
-       (gnus-agent-fetch-selected-article): Replaced
+       * gnus-agent.el (gnus-agent-fetched-hook): New variable.
+       Just fixing the code to match the documentation.
+       (gnus-agent-fetch-selected-article): Replace
        gnus-summary-update-article-line with gnus-summary-update-line as
        the former did not correctly recalculate the thread indentation.
        (gnus-agent-find-parameter): The agent-predicate, if not found
        anywhere else, defaults to the value of gnus-agent-predicate.
-       (gnus-agent-fetch-session): Fixed typo; now executes
+       (gnus-agent-fetch-session): Fix typo; now executes
        gnus-agent-fetched-hook rather than the undocumented
        gnus-agent-fetch-hook.
-       (gnus-agent-fetch-group-1): Removed part of 2003-03-06 fix.  The
-       default agent predicate is now provided by
+       (gnus-agent-fetch-group-1): Remove part of 2003-03-06 fix.
+       The default agent predicate is now provided by
        gnus-agent-find-parameter.
        (gnus-agent-message): New macro.  This macro avoids potentially
        costly parameter evaluation when the message's level is too high
        to display.
-       (gnus-agent-expire-group-1): Disabled undo tracking in temp
+       (gnus-agent-expire-group-1): Disable undo tracking in temp
        overview buffer.  Uses new gnus-agent-message macro to reduce
        overhead of optional messages.  Reversed message levels to
        emphasize percent completion messages.  Detailed messages of
 
 2003-03-08  Teodor Zlatanov  <tzz@lifelogs.com>
 
-       * spam.el (spam-ham-move-routine): Use
-       spam-mark-ham-unread-before-move-from-spam-group.
+       * spam.el (spam-ham-move-routine):
+       Use spam-mark-ham-unread-before-move-from-spam-group.
        (spam-mark-ham-unread-before-move-from-spam-group): New variable.
 
 2003-03-07  Teodor Zlatanov  <tzz@lifelogs.com>
 2003-03-07  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * spam.el (spam-use-hashcash): New variable.
-       (spam-list-of-checks): Added spam-use-hashcash with associated
+       (spam-list-of-checks): Add spam-use-hashcash with associated
        spam-check-hashcash.
        (spam-check-hashcash): New function, installed iff hashcash.el is
        loaded.
 
 2003-03-06  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
-       * gnus-agent.el (gnus-agent-fetch-group-1): Added default
+       * gnus-agent.el (gnus-agent-fetch-group-1): Add default
        predicate of `false' to avoid an error when a group defines no
        predicate.  Fixed typo that disabled agent scoring (i.e. the
        low/high predicates should now work).
 
        * spam.el: Add spam-maybe-spam-stat-load to
        gnus-get-top-new-news-hook, remove it from gnus-get-new-news-hook.
-       (spam-bogofilter-register-with-bogofilter): Use
-       spam-bogofilter-spam-switch and spam-bogofilter-ham-switch.
-       (spam-bogofilter-spam-switch, spam-bogofilter-ham-switch): New
-       custom variables to replace "-s" and "-n".
+       (spam-bogofilter-register-with-bogofilter):
+       Use spam-bogofilter-spam-switch and spam-bogofilter-ham-switch.
+       (spam-bogofilter-spam-switch, spam-bogofilter-ham-switch):
+       New custom variables to replace "-s" and "-n".
 
        * gnus-group.el (gnus-group-get-new-news): Call the new
        gnus-get-top-new-news-hook hook.
 
 2003-03-06  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
-       * gnus-agent.el (gnus-agent-fetch-group-1): Added missing binding
+       * gnus-agent.el (gnus-agent-fetch-group-1): Add missing binding
        on gnus-agent-short-article.
-       (gnus-category-read): Replaced CL function mapcar* with new macro:
+       (gnus-category-read): Replace CL function mapcar* with new macro:
        gnus-mapcar.
        * gnus-util.el (gnus-mapcar): New macro.  Generalizes mapcar to
        support functions that accept multiple parameters.  A separate
 
 2003-03-04  Kai Großjohann  <kai.grossjohann@uni-duisburg.de>
 
-       * gnus-agent.el (gnus-function-implies-unread-1): Grok
-       byte-compiled functions.
+       * gnus-agent.el (gnus-function-implies-unread-1):
+       Grok byte-compiled functions.
 
 2003-03-04  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
-       * gnus-sum.el (gnus-auto-goto-ignores): New variable.  Provides
-       customization between new maneuvering (which permits selecting
+       * gnus-sum.el (gnus-auto-goto-ignores): New variable.
+       Provides customization between new maneuvering (which permits selecting
        undownloaded articles) and old maneuvering (which skipped over
        undownloaded articles) behaviors.
        (gnus-summary-find-next): Pass through the unread and subject
        parameters when calling gnus-summary-find-prev.
-       (gnus-summary-find-next, gnus-summary-find-prev): Apply
-       gnus-auto-goto-ignores to filter out unacceptable articles.
+       (gnus-summary-find-next, gnus-summary-find-prev):
+       Apply gnus-auto-goto-ignores to filter out unacceptable articles.
 
 2003-03-04  Jesper Harder  <harder@ifa.au.dk>
 
        (mail-source-fetch-webmail): Use read-passwd.
 
        * nntp.el (nntp-send-authinfo, nntp-send-nosy-authinfo)
-       (nntp-open-telnet, nntp-open-via-telnet-and-telnet): Use
-       read-passwd.
+       (nntp-open-telnet, nntp-open-via-telnet-and-telnet):
+       Use read-passwd.
 
        * nnwarchive.el (nnwarchive-open-server): Use read-passwd.
 
        (sieve-manage-interactive-login): Use read-passwd.
 
        * pop3.el (pop3-read-passwd): Remove.
-       (pop3-movemail, pop3-get-message-count, pop3-apop): Use
-       read-passwd.
+       (pop3-movemail, pop3-get-message-count, pop3-apop):
+       Use read-passwd.
 
        * pgg.el (pgg-read-passphrase): Simplify.
 
 2003-03-04  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
-       * gnus-agent.el (gnus-agent-mode): Fixed the mode line reports
+       * gnus-agent.el (gnus-agent-mode): Fix the mode line reports
        'plugged' when actually 'unplugged' bug.
        (gnus-category-read): Ignore nil values when converting an
        old-format category so that the new-format category will default
 
 2003-03-03  Reiner Steib  <Reiner.Steib@gmx.de>
 
-       * mail-source.el (mail-source-delete-old-incoming-confirm): Fixed
-       doc-string.
+       * mail-source.el (mail-source-delete-old-incoming-confirm):
+       Fix doc-string.
 
 2003-03-03  Jesper Harder  <harder@ifa.au.dk>
 
 2003-03-03  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * gnus-msg.el (gnus-extended-version): Fix for 'emacs-gnus-config.
-       (gnus-user-agent): Fixed typo.
+       (gnus-user-agent): Fix typo.
 
 2003-03-03  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
-       * gnus-agent.el (gnus-agent-enable-expiration): Fixed documentation.
-       (gnus-agent-expire-group-1): Removed invalid (interactive) specifier.
+       * gnus-agent.el (gnus-agent-enable-expiration): Fix documentation.
+       (gnus-agent-expire-group-1): Remove invalid (interactive) specifier.
 
 2003-03-03  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 2003-03-03  Jesper Harder  <harder@ifa.au.dk>
 
        * gnus-sum.el (gnus-highlight-selected-summary)
-       (gnus-article-get-xrefs, gnus-summary-show-thread): Use
-       `gnus-point-at-bol' and `gnus-point-at-eol' instead of
+       (gnus-article-get-xrefs, gnus-summary-show-thread):
+       Use `gnus-point-at-bol' and `gnus-point-at-eol' instead of
        `(progn (beginning-of-line) (point))'.  It's shorter, faster,
        and makes it clear that we don't need the side effect.
        * gnus-util.el (gnus-delete-line): Do.
 
 2003-03-02  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
-       * gnus-agent.el (gnus-agent-enable-expiration): New
-       variable.  Either ENABLE or DISABLE.  Sets default behavior for
+       * gnus-agent.el (gnus-agent-enable-expiration):
+       New variable.  Either ENABLE or DISABLE.  Sets default behavior for
        selecting which groups are expired.
        (gnus-agent-cat-set-property, gnus-agent-cat-defaccessor,
        gnus-agent-set-cat-groups): Provides abstract interface for
        (gnus-agent-add-group, gnus-agent-remove-group,
        gnus-category-insert-line, gnus-category-edit-predicate,
        gnus-category-edit-score, gnus-category-edit-groups,
-       gnus-category-copy, gnus-category-add, gnus-group-category): Use
-       new agent category abstraction.
+       gnus-category-copy, gnus-category-add, gnus-group-category):
+       Use new agent category abstraction.
        (gnus-agent-find-parameter): New function.  Search for agent
        configuration parameter first in the group's parameters, then its
        topics (if any), and then the group's category.  If not found
        (gnus-category-write): Writes category file compatible with
        current, and previous, versions of gnus-agent.
        (gnus-category-make-function, gnus-category-make-function-1):
-       Corrected documentation; parameter is predicate NOT category.
+       Correct documentation; parameter is predicate NOT category.
        (gnus-predicate-implies-unread): Now works in more cases per the
        todo comment.
-       (gnus-function-implies-unread-1): New function.  Supports
-       gnus-predicate-implies-unread.
+       (gnus-function-implies-unread-1): New function.
+       Supports gnus-predicate-implies-unread.
        (gnus-agent-expire-group): Command now provides default of group
        under point.
        (gnus-agent-expire-group-1): Obeys new agent-enable-expiration and
        (gnus-agent-request-article): Now performs its own checks of
        gnus-agent, gnus-agent-cache, and gnus-plugged rather than
        assuming that the caller will do them correctly.
-       (): Added one-time hook to gnus-group-prepare-hook.  Detects when
+       (): Add one-time hook to gnus-group-prepare-hook.  Detects when
        gnus-agent-expire-days is set to an alist.  Converts said alist
        into group parameter so that gnus-agent-expire-days will not be
        needed.
-       * gnus-art.el (gnus-request-article-this-buffer): Conditional
-       checks surrounding gnus-agent-request-article removed; now
+       * gnus-art.el (gnus-request-article-this-buffer):
+       Conditional checks surrounding gnus-agent-request-article removed; now
        performed by gnus-agent-request-article.
        * gnus-cus.el (gnus-agent-parameters): New variable.  List of
        customizable group/topic parameters that regulate the agent.
        warnings.
        (gnus-long-file-names): New function.  Isolates platform dependent
        msdos-long-file-names.
-       (gnus-save-startup-file-via-temp-buffer): New variable.  Provides
-       option of writing directly to file.  Avoids memory exhausted
+       (gnus-save-startup-file-via-temp-buffer): New variable.
+       Provides option of writing directly to file.  Avoids memory exhausted
        errors when .newsrc.eld is huge.
        (gnus-save-newsrc-file): Uses new
        gnus-save-startup-file-via-temp-buffer.
        nnimap-split-download-body, we add it to gnus-get-new-news-hook.
        (spam-list-of-statistical-checks): List of statistical splitter
        checks.
-       (spam-split): Added a widen call when a statistical check is
-       enabled.
+       (spam-split): Add a widen call when a statistical check is enabled.
 
 2003-02-28  Reiner Steib  <Reiner.Steib@gmx.de>
 
-       * gnus-msg.el (gnus-user-agent): Changed default to
+       * gnus-msg.el (gnus-user-agent): Change default to
        'emacs-gnus-type, renamed 'full.
 
 2003-02-28  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
 2003-02-26  Simon Josefsson  <jas@extundo.com>
 
-       * gnus-sum.el (gnus-summary-toggle-header): Run
-       gnus-article-decode-hook instead of calling a-decode-encoded-words
+       * gnus-sum.el (gnus-summary-toggle-header):
+       Run gnus-article-decode-hook instead of calling a-decode-encoded-words
        directly (the latter is run as part of the former).
 
 2003-02-26  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
 2003-02-25  Reiner Steib  <Reiner.Steib@gmx.de>
 
-       * gnus-art.el (gnus-button-mid-or-mail-heuristic-alist): Added
-       compensation for TDMA addresses.
+       * gnus-art.el (gnus-button-mid-or-mail-heuristic-alist):
+       Add compensation for TDMA addresses.
 
 2003-02-24  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * gnus-msg.el (gnus-user-agent): New variable.
-       (gnus-version-expose-system): Removed.  Obsoleted by
+       (gnus-version-expose-system): Remove.  Obsoleted by
        `gnus-user-agent'.
        (gnus-extended-version): Use `gnus-user-agent'.
 
 
 2003-02-24  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
-       * gnus-group.el (gnus-topic-mode-p): Fixed free variable
+       * gnus-group.el (gnus-topic-mode-p): Fix free variable
        reference.
 
 2003-02-24  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
-       * nnheader.el (nnheader-find-nov-line): Changed midpoint
+       * nnheader.el (nnheader-find-nov-line): Change midpoint
        calculation to avoid integer overflow.
 
 2003-02-24  Reiner Steib  <Reiner.Steib@gmx.de>
 
-       * gnus-start.el (gnus-backup-startup-file): Fixed custom type.
+       * gnus-start.el (gnus-backup-startup-file): Fix custom type.
 
 2003-02-24  Teodor Zlatanov  <tzz@lifelogs.com>
 
        clause of the condition-case statement.  Errors connecting to a
        server no longer terminate gnus.
 
-       * gnus-agent.el (gnus-agent-toggle-plugged): Renamed parameter to
+       * gnus-agent.el (gnus-agent-toggle-plugged): Rename parameter to
        make its use obvious.  Added no-nothing case to avoid
        opening(closing) servers when already open(closed).
-       (gnus-agent-while-plugged): Added macro to facilitate internal use
+       (gnus-agent-while-plugged): Add macro to facilitate internal use
        of gnus-agent-toggle-plugged.
        (gnus-agent-fetch-group): Use new gnus-agent-while-plugged to
        temporarily open servers.
 
 2003-02-20  Reiner Steib  <Reiner.Steib@gmx.de>
 
-       * message.el (message-user-fqdn, message-valid-fqdn-regexp): New
-       variables.
+       * message.el (message-user-fqdn, message-valid-fqdn-regexp):
+       New variables.
        (message-make-fqdn): Use it.  Improved validity check.
 
 2003-02-23  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 2003-02-23  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * gnus-art.el (gnus-button-url-regexp): Removed `.
+       * gnus-art.el (gnus-button-url-regexp): Remove `.
 
 2003-02-23  Max Froumentin  <mf@w3.org>
 
        * gnus-art.el (gnus-mime-action-on-part): Require a match
        interactively.
 
-       * gnus-start.el (gnus-save-newsrc-file): Use
-       gnus-backup-startup-file.
+       * gnus-start.el (gnus-save-newsrc-file):
+       Use gnus-backup-startup-file.
        (gnus-backup-startup-file): New variable.
 
 2003-02-22  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * gnus.el (gnus-summary-buffer-name): Moved function here.
+       * gnus.el (gnus-summary-buffer-name): Move function here.
 
        * gnus-draft.el (defun): Remove debug.
 
 
 2003-02-22  Kai Großjohann  <kai.grossjohann@uni-duisburg.de>
 
-       * gnus-agent.el (gnus-agent-get-undownloaded-list): Sort
-       `gnus-newsgroup-headers'.
+       * gnus-agent.el (gnus-agent-get-undownloaded-list):
+       Sort `gnus-newsgroup-headers'.
 
 2003-02-22  Karl Pflästerer  <sigurd@12move.de>
 
        just article ID.
 
        * gnus-registry.el (gnus-registry-hashtb, gnus-register-action)
-       (gnus-register-spool-action): Added hashtable of message ID keys
+       (gnus-register-spool-action): Add hashtable of message ID keys
        with message motion data.
 
 2003-02-21  Reiner Steib  <Reiner.Steib@gmx.de>
 
-       * gnus-art.el (gnus-button-mid-or-mail-heuristic-alist): New
-       variable, used in `gnus-button-mid-or-mail-heuristic'.
+       * gnus-art.el (gnus-button-mid-or-mail-heuristic-alist):
+       New variable, used in `gnus-button-mid-or-mail-heuristic'.
        (gnus-button-mid-or-mail-heuristic): New function derived from
        Florian Weimer's Perl script.
        (gnus-button-handle-mid-or-mail): Allow a function instead of
        'guess.
-       (gnus-button-guessed-mid-regexp): Removed.
+       (gnus-button-guessed-mid-regexp): Remove.
 
 2003-02-20  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 2003-02-19  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * gnus-cite.el (gnus-cite-unsightly-citation-regexp)
-       (gnus-cite-parse): Renamed `gnus-unsightly-citation-regexp' to
+       (gnus-cite-parse): Rename `gnus-unsightly-citation-regexp' to
        `gnus-cite-unsightly-citation-regexp'.
 
 2003-02-19  Katsumi Yamaoka  <yamaoka@jpl.org>
 2003-02-18  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * spam.el (spam-ham-move-routine)
-       (spam-mark-spam-as-expired-and-move-routine): Use
-       gnus-summary-kill-process-mark and gnus-summary-yank-process-mark
+       (spam-mark-spam-as-expired-and-move-routine):
+       Use gnus-summary-kill-process-mark and gnus-summary-yank-process-mark
        around process-mark manipulation on the group.
 
 2003-02-17  Kai Großjohann  <kai.grossjohann@uni-duisburg.de>
 
 2003-02-16  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * nndraft.el (nndraft-request-move-article): Bind
-       nnmh-allow-delete-final to t.
+       * nndraft.el (nndraft-request-move-article):
+       Bind nnmh-allow-delete-final to t.
 
 2003-02-14  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * gnus-art.el (gnus-article-only-boring-p): New.
        (gnus-article-skip-boring): New.
        * gnus-cite.el (gnus-article-boring-faces): New.
-       * gnus-sum.el (gnus-summary-next-page): Use
-       gnus-article-only-boring-p.
+       * gnus-sum.el (gnus-summary-next-page):
+       Use gnus-article-only-boring-p.
 
 2003-02-12  Teodor Zlatanov  <tzz@lifelogs.com>
 
 
 2003-02-11  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
-       * gnus-agent.el (gnus-summary-set-agent-mark): Added call to
+       * gnus-agent.el (gnus-summary-set-agent-mark): Add call to
        gnus-summary-goto-subject as gnus-summary-update-mark operates on
        the current LINE.
        (gnus-agent-summary-fetch-group): Minimized the number of times
 
 2003-02-10  Jesper Harder  <harder@ifa.au.dk>
 
-       * mm-util.el (mm-mule-charset-to-mime-charset): Use
-       sort-coding-systems to prefer utf-8 over utf-16.
+       * mm-util.el (mm-mule-charset-to-mime-charset):
+       Use sort-coding-systems to prefer utf-8 over utf-16.
 
 2003-02-09  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
        If you don't want to run gnus-agent-expire, don't call it.
        (gnus-agent-expire): The broken test to disable gnus-agent-expire
        when g-a-e-d was NOT nil was removed.
-       (gnus-agent-article-name): Removed unnecessary input test as
+       (gnus-agent-article-name): Remove unnecessary input test as
        article IDs are always strings.
-       (gnus-agent-regenerate-group): Added check to protect against
+       (gnus-agent-regenerate-group): Add check to protect against
        servers that generate absurdly long article IDs.  Valid IDs are
        less than 10 digits to avoid overflow errors.  Fixed logic error
        when ensuring that the final article ID is present in the new
 
 2003-02-08  Jesper Harder  <harder@ifa.au.dk>
 
-       * gnus-art.el (gnus-article-refer-article): Use
-       gnus-replace-in-string.
+       * gnus-art.el (gnus-article-refer-article):
+       Use gnus-replace-in-string.
 
        * gnus-util.el (gnus-map-function): Remove unneeded let-binding.
        (gnus-remove-duplicates): Do.
 
        * gnus-int.el (gnus-internal-registry-spool-current-method):
        New variable.
-       (gnus-request-scan): Set
-       gnus-internal-registry-spool-current-method to gnus-command-method
+       (gnus-request-scan):
+       Set gnus-internal-registry-spool-current-method to gnus-command-method
        before a request-scan operation.
 
-       * gnus-registry.el (regtest-nnmail): Use
-       gnus-internal-registry-spool-current-method.
+       * gnus-registry.el (regtest-nnmail):
+       Use gnus-internal-registry-spool-current-method.
 
 2003-02-07  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 
        * gnus-registry.el: New file with examples of using the hooks.
 
-       * gnus.el (gnus-registry): Added registry customization group.
+       * gnus.el (gnus-registry): Add registry customization group.
        (gnus-group-prefixed-name): Improve function to return full group
        name optionally.
        (gnus-group-guess-prefixed-name): Shortcut to
 
 2003-02-07  Simon Josefsson  <jas@extundo.com>
 
-       * mml-sec.el (mml-unsecure-message): Don't use kill-region.  Tiny
-       patch from deskpot@myrealbox.com (Vasily Korytov).
+       * mml-sec.el (mml-unsecure-message): Don't use kill-region.
+       Tiny patch from deskpot@myrealbox.com (Vasily Korytov).
 
 2003-02-02  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 
 2003-02-06  Katsumi Yamaoka  <yamaoka@jpl.org>
 
-       * gnus-art.el (gnus-mime-view-part-internally): Bind
-       buffer-read-only to nil.
+       * gnus-art.el (gnus-mime-view-part-internally):
+       Bind buffer-read-only to nil.
 
 2003-02-05  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gnus-util.el (gnus-prin1-to-string): Bind print-length and
        print-level.
 
-       * gnus-art.el (article-display-x-face): Removed gray x-face stuff.
-       (gnus-treat-display-grey-xface): Removed.
+       * gnus-art.el (article-display-x-face): Remove gray x-face stuff.
+       (gnus-treat-display-grey-xface): Remove.
 
        * gnus-fun.el (gnus-grab-cam-face): New.
-       (gnus-convert-image-to-gray-x-face): Removed.
-       (gnus-convert-gray-x-face-to-xpm): Removed.
-       (gnus-convert-gray-x-face-region): Removed.
-       (gnus-grab-gray-x-face): Removed.
+       (gnus-convert-image-to-gray-x-face): Remove.
+       (gnus-convert-gray-x-face-to-xpm): Remove.
+       (gnus-convert-gray-x-face-region): Remove.
+       (gnus-grab-gray-x-face): Remove.
 
        * nnmail.el (nnmail-expiry-wait-function): Doc indent.
 
        * gnus-fun.el (gnus-face-encode): New function.
        (gnus-convert-png-to-face): Use it.
 
-       * gnus-sum.el (gnus-summary-make-menu-bar): Added M-& to marks.
+       * gnus-sum.el (gnus-summary-make-menu-bar): Add M-& to marks.
 
 2003-01-26  Jesper Harder  <harder@ifa.au.dk>
 
        * mm-encode.el (mm-qp-or-base64): Always QP iff
        mm-use-ultra-safe-encoding and cleartext PGP.
 
-       * gnus-sum.el (gnus-summary-select-article): Inhibit
-       redisplay (mainly for secured messages).
+       * gnus-sum.el (gnus-summary-select-article):
+       Inhibit redisplay (mainly for secured messages).
 
        * nnmail.el (nnmail-article-group): Copy body too (but don't
        process it).
 
 2003-01-25  Jesper Harder  <harder@ifa.au.dk>
 
-       * gnus-art.el (gnus-article-setup-buffer): Reset
-       gnus-button-marker-list.
+       * gnus-art.el (gnus-article-setup-buffer):
+       Reset gnus-button-marker-list.
 
 2003-01-25  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 
 2003-01-24  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * nnheader.el (nnheader-directory-separator-character): New
-       variable.
+       * nnheader.el (nnheader-directory-separator-character):
+       New variable.
 
 2003-01-24  Kai Großjohann  <kai.grossjohann@uni-duisburg.de>
 
 2003-01-24  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * spam.el (spam-check-blackholes, spam-split)
-       (spam-mark-junk-as-spam-routine, spam-summary-prepare-exit): Added
-       gnus-message calls to show to users what spam.el is doing.
+       (spam-mark-junk-as-spam-routine, spam-summary-prepare-exit):
+       Add gnus-message calls to show to users what spam.el is doing.
 
 2003-01-24  Jesper Harder  <harder@ifa.au.dk>
 
        * gnus-async.el (gnus-async-wait-for-article): Don't use a
        timeout.
 
-       * nntp.el (nntp-accept-process-output): Removed timeout.
+       * nntp.el (nntp-accept-process-output): Remove timeout.
        (nntp-read-timeout): New variable.
        (nntp-accept-process-output): Use it.
 
 
 2003-01-23  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
-       * gnus-sum.el (gnus-summary-first-subject): Fixed bug that I
+       * gnus-sum.el (gnus-summary-first-subject): Fix bug that I
        introduced on 2002-01-22.
        (gnus-summary-first-unseen-or-unread-subject): Ditto.
 
 2003-01-23  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * spam.el (spam-check-regex-headers, spam-list-of-checks)
-       (spam-regex-headers-spam, spam-regex-headers-ham): Added spam/ham
+       (spam-regex-headers-spam, spam-regex-headers-ham): Add spam/ham
        checks of incoming mail based on simple header regexp matching.
 
 2003-01-22  Teodor Zlatanov  <tzz@lifelogs.com>
        gnus-newsgroup-unfetched, the list of articles whose headers have
        not been fetched from the server.
 
-       * gnus-sum.el (gnus-summary-find-next): Removed undownloaded
+       * gnus-sum.el (gnus-summary-find-next): Remove undownloaded
        parameter as it never worked due to a bug.  Added check to prevent
        selection of any article in the gnus-newsgroup-unfetched list.
-       (gnus-summary-find-prev): Added check to prevent selection of any
+       (gnus-summary-find-prev): Add check to prevent selection of any
        article in the gnus-newsgroup-unfetched list.
-       (gnus-summary-first-subject): Documented API.  Modified
-       implementation so that constraints are handled independently.
+       (gnus-summary-first-subject): Document API.
+       Modified implementation so that constraints are handled independently.
        Added check to prevent selection of any article in the
        gnus-newsgroup-unfetched list.
-       (gnus-summary-first-unseen-subject): Updated parameters in
+       (gnus-summary-first-unseen-subject): Update parameters in
        gnus-summary-first-subject call to match new API.
        (gnus-summary-first-unseen-or-unread-subject): Ditto.
        (gnus-summary-catchup): Do not mark unfetched articles as read.
        make-obsolete-variable allows only two arguments in XEmacs and
        Emacs 20.
 
-       * gnus-sum.el (gnus-summary-wash-hide-map): Remove
-       gnus-article-hide-pgp.
+       * gnus-sum.el (gnus-summary-wash-hide-map):
+       Remove gnus-article-hide-pgp.
        (gnus-summary-make-menu-bar): Do.
 
        * gnus-art.el (gnus-treat-strip-pgp): Make obsolete.
 
 2003-01-21  Teodor Zlatanov  <tzz@lifelogs.com>
 
-       * spam.el (spam-group-ham-processor-bogofilter-p): Fixed bug.
-       (spam-ifile-register-ham-routine, spam-ifile-ham-category): New
-       option to make ifile a purely binary classifier.
+       * spam.el (spam-group-ham-processor-bogofilter-p): Fix bug.
+       (spam-ifile-register-ham-routine, spam-ifile-ham-category):
+       New option to make ifile a purely binary classifier.
 
 2003-01-21  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * mml-sec.el (mml-secure-sign-pgpauto): Renamed.
-       (mml-secure-encrypt-pgpmime): Removed double.
+       * mml-sec.el (mml-secure-sign-pgpauto): Rename.
+       (mml-secure-encrypt-pgpmime): Remove double.
 
-       * gnus-sum.el (gnus-summary-mark-article-as-replied): Added
-       debugging statements.
+       * gnus-sum.el (gnus-summary-mark-article-as-replied):
+       Add debugging statements.
 
 2003-01-21  Andreas Fuchs  <asf@void.at>
 
-       * mml-sec.el (mml-sign-alist): Added pgpauto.
+       * mml-sec.el (mml-sign-alist): Add pgpauto.
 
 2003-01-21  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 
 2003-01-21  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * gnus-art.el (gnus-button-url-regexp): Removed |.
+       * gnus-art.el (gnus-button-url-regexp): Remove |.
 
        * message.el (message-send-hook): Doc fix.
 
 
 2003-01-18  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
-       * gnus-agent.el (gnus-agent-regenerate-group): Added interactive form.
+       * gnus-agent.el (gnus-agent-regenerate-group): Add interactive form.
 
-       * gnus-sum.el (gnus-summary-update-article-line): Fixed
-       calculation of net characters added for use in the gnus-data
+       * gnus-sum.el (gnus-summary-update-article-line):
+       Fix calculation of net characters added for use in the gnus-data
        structure.
 
 2003-01-18  Kai Großjohann  <kai.grossjohann@uni-duisburg.de>
        avoid encoding problems.
 
        * mailcap.el (mailcap-ps-command): New variable.
-       (mailcap-mime-data): Add print entry where applicable.  Use
-       pdftotext on a tty.
+       (mailcap-mime-data): Add print entry where applicable.
+       Use pdftotext on a tty.
 
 2003-01-16  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * spam.el (spam-get-article-as-filename): New function (unused for now).
        (spam-get-article-as-buffer): New function.
        (spam-get-article-as-string): Use spam-get-article-as-buffer.
-       (spam-summary-prepare-exit): Fixed bug, noticed by Malcolm Purvis.
+       (spam-summary-prepare-exit): Fix bug, noticed by Malcolm Purvis.
 
 2003-01-15  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        (spam-group-ham-processor-bogofilter-p): New functions for the new
        Bogofilter interface.
        (spam-summary-prepare-exit): Use the new Bogofilter functions.
-       (spam-list-of-checks): Added spam-use-bogofilter-headers.
+       (spam-list-of-checks): Add spam-use-bogofilter-headers.
        (spam-bogofilter-score): Rewrote function.
        (spam-check-bogofilter): Optional score parameter, uses
        spam-check-bogofilter-headers better.
 
 2003-01-13  Jhair Tocancipa Triana  <jhair_tocancipa@gmx.net>
 
-       * gnus-audio.el (gnus-audio-au-player, gnus-audio-wav-player): Use
-       /usr/bin/play as default player.
-       (gnus-audio-play): Added ARG-DESCRIPTOR to prompt for a file to play.
+       * gnus-audio.el (gnus-audio-au-player, gnus-audio-wav-player):
+       Use /usr/bin/play as default player.
+       (gnus-audio-play): Add ARG-DESCRIPTOR to prompt for a file to play.
 
 2003-01-14  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        fictitious headers generated by nnagent (ie. Undownloaded Article
        ####) in the list of articles that have not been downloaded.
 
-       * gnus-int.el (): Added require declarations to resolve
+       * gnus-int.el (): Add require declarations to resolve
        compile-time warnings.
        (gnus-open-server): If the server status is set to offline,
        recursively execute gnus-open-server to open the offline backend
 
 2003-01-14  Jesper Harder  <harder@ifa.au.dk>
 
-       * gnus-art.el (gnus-article-reply-with-original): Use
-       gnus-mark-active-p.
+       * gnus-art.el (gnus-article-reply-with-original):
+       Use gnus-mark-active-p.
        (gnus-article-followup-with-original): Do.
 
 2003-01-13  Reiner Steib  <Reiner.Steib@gmx.de>
        * deuglify.el (gnus-article-outlook-unwrap-lines)
        (gnus-article-outlook-repair-attribution)
        (gnus-article-outlook-rearrange-citation): New function names,
-       renamed from "gnus-outlook-" to "gnus-article-outlook-".  Changed
-       doc-string.
+       renamed from "gnus-outlook-" to "gnus-article-outlook-".
+       Changed doc-string.
 
        * gnus-sum.el (gnus-summary-mode-map): Use new function names,
        removed `W k' key binding (use `W Y f' instead).
 
 2003-01-12  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * mail-source.el (mail-sources): Removed autoload to make it
+       * mail-source.el (mail-sources): Remove autoload to make it
        compile under XEmacs.
 
 2003-01-12  Raymond Scholz  <ray-2003@zonix.de>
 
 2003-01-12  Simon Josefsson  <jas@extundo.com>
 
-       * sieve.el (sieve-upload-and-bury): New.  Suggested by
-       kai.grossjohann@uni-duisburg.de (Kai Großjohann).
+       * sieve.el (sieve-upload-and-bury): New.
+       Suggested by kai.grossjohann@uni-duisburg.de (Kai Großjohann).
 
        * sieve-mode.el (sieve-mode-map): Bind s-u-a-b to C-c C-c.
        Suggested by kai.grossjohann@uni-duisburg.de (Kai Großjohann).
 
 2003-01-10  Reiner Steib  <Reiner.Steib@gmx.de>
 
-       * deuglify.el (gnus-outlook-deuglify-attrib-verb-regexp): Added
-       castellano.
+       * deuglify.el (gnus-outlook-deuglify-attrib-verb-regexp):
+       Add castellano.
        (gnus-outlook-display-hook): New variable.
        (gnus-outlook-display-article-buffer): New function.
        (gnus-outlook-unwrap-lines, gnus-outlook-repair-attribution)
        (gnus-article-outlook-deuglify-article): Use `g-o-d-a-b'.
 
        * gnus-sum.el: Added autoloads.
-       (gnus-summary-mode-map): Added gnus-summary-wash-deuglify-map.
-       (gnus-summary-make-menu-bar): Added "(Outlook) Deuglify" menu.
+       (gnus-summary-mode-map): Add gnus-summary-wash-deuglify-map.
+       (gnus-summary-make-menu-bar): Add "(Outlook) Deuglify" menu.
 
 2003-01-11  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * gnus-fun.el (gnus-face-from-file): New function.
        (gnus-convert-face-to-png): Ditto.
 
-       * gnus-art.el (gnus-ignored-headers): Added Face.
+       * gnus-art.el (gnus-ignored-headers): Add Face.
 
 2003-01-10  Simon Josefsson  <jas@extundo.com>
 
 
        * spam-stat.el (spam-stat): Typo fix.
        (spam-stat-install-hooks): New variable.
-       (spam-stat-split-fancy-spam-group): Added documentation clarification.
+       (spam-stat-split-fancy-spam-group): Add documentation clarification.
        (spam-stat-split-fancy-spam-threshhold): New variable.
        (spam-stat-install-hooks): Make hooks conditional.
        (spam-stat-split-fancy): Use spam-stat-split-fancy-spam-threshhold.
 
-       * gnus.el (gnus-group-ham-exit-processor-stat, spam-process): Add
-       spam-stat ham/spam processor symbols.
+       * gnus.el (gnus-group-ham-exit-processor-stat, spam-process):
+       Add spam-stat ham/spam processor symbols.
 
 2003-01-10  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 
 2003-01-09  Teodor Zlatanov  <tzz@lifelogs.com>
 
-       * spam.el (spam-check-ifile): Fixed call-process-region to use the
+       * spam.el (spam-check-ifile): Fix call-process-region to use the
        db parameter only if it's set.
        (spam-ifile-register-with-ifile): Ditto.
 
        * spam.el: Fixed the BBDB autoloads again, using
        bbdb-search-simple now (which is not a macro, thank god).
 
-       * gnus.el (ham-process-destination): Added new parameter for
+       * gnus.el (ham-process-destination): Add new parameter for
        destination of ham articles found in spam groups at summary exit.
 
        * spam.el (spam-get-ifile-database-parameter):
        use spam-ifile-database-path.
        (spam-check-ifile, spam-ifile-register-with-ifile):
        use spam-get-ifile-database-parameter.
-       (spam-ifile-database-path): Added new parameter for ifile's database.
+       (spam-ifile-database-path): Add new parameter for ifile's database.
        (spam-move-spam-nonspam-groups-only): New parameter to determine
        if spam should be moved from all groups or only some.
-       (spam-summary-prepare-exit): Fixed logic to use
+       (spam-summary-prepare-exit): Fix logic to use
        spam-move-spam-nonspam-groups-only when deciding to invoke
        spam-mark-spam-as-expired-and-move-routine; always invoke that
        routine after the spam has been expired-or-moved in case there's
 
        * gnus-spec.el (gnus-parse-complex-format): %~ => ~*.
 
-       * gnus-agent.el (gnus-agent-fetch-selected-article): Use
-       gnus-summary-update-article-line.
+       * gnus-agent.el (gnus-agent-fetch-selected-article):
+       Use gnus-summary-update-article-line.
 
 2003-01-08  Simon Josefsson  <jas@extundo.com>
 
 
 2003-01-07  Teodor Zlatanov  <tzz@lifelogs.com>
 
-       * spam.el (spam-check-ifile): Fixed the spam-ifile-all-categories
+       * spam.el (spam-check-ifile): Fix the spam-ifile-all-categories
        logic, finally.
 
 2003-01-08  Lars Magne Ingebrigtsen  <larsi@gnus.org>
        * message.el (message-make-mail-followup-to,
        message-generate-unsubscribed-mail-followup-to): New function
        names.  Renamed functions: "-mft" -> "-mail-followup-to".
-       (message-make-mft, message-gen-unsubscribed-mft): Removed function
+       (message-make-mft, message-gen-unsubscribed-mft): Remove function
        names.
 
        * mml.el (mml-preview-insert-mail-followup-to): New function name.
-       (mml-preview-insert-mft): Removed function name.
+       (mml-preview-insert-mft): Remove function name.
        (mml-preview): Use new function names.
 
        * gnus-art.el (gnus-article-edit-mode-map): Use new function names.
 
-       * message.el (message-mode-field-menu): Moved header related
+       * message.el (message-mode-field-menu): Move header related
        commands from "Message" to "Field" menu.
 
 2003-01-07  Reiner Steib  <Reiner.Steib@gmx.de>
 
-       * message.el (message-generate-headers-first): Added customization
+       * message.el (message-generate-headers-first): Add customization
        if variable is a list.
 
 2003-01-07  Michael Shields  <shields@msrl.com>
 
        * gnus-msg.el (gnus-debug): Use ignore-errors.
 
-       * gnus-agent.el (gnus-agent-fetch-selected-article): Use
-       `gnus-summary-update-line'.
+       * gnus-agent.el (gnus-agent-fetch-selected-article):
+       Use `gnus-summary-update-line'.
 
 2003-01-08  Simon Josefsson  <jas@extundo.com>
 
 
 2003-01-07  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * gnus-sum.el (gnus-summary-make-menu-bar): Added
-       gnus-summary-refer-thread to thread menu.
+       * gnus-sum.el (gnus-summary-make-menu-bar):
+       Add gnus-summary-refer-thread to thread menu.
 
 2003-01-07  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
 
        * spam.el (spam-check-ifile, spam-ifile-register-with-ifile)
        (spam-ifile-register-spam-routine)
-       (spam-ifile-register-ham-routine): Added ifile functionality that
+       (spam-ifile-register-ham-routine): Add ifile functionality that
        does not use ifile-gnus.el to classify and register articles.
        (spam-get-article-as-string): Convenience function.
-       (spam-summary-prepare-exit): Added ifile spam and ham registration.
+       (spam-summary-prepare-exit): Add ifile spam and ham registration.
        (spam-ifile-all-categories, spam-ifile-spam-category)
-       (spam-ifile-path, spam-ifile): Added customization options.
+       (spam-ifile-path, spam-ifile): Add customization options.
 
-       * gnus.el (gnus-group-ham-exit-processor-ifile): Added ifile ham
+       * gnus.el (gnus-group-ham-exit-processor-ifile): Add ifile ham
        exit processor.
-       (spam-process): Added gnus-group-ham-exit-processor-ifile to the
+       (spam-process): Add gnus-group-ham-exit-processor-ifile to the
        list of choices.
 
 2003-01-07  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 2003-01-06  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * nnweb.el (nnweb-asynchronous-p): Changed to nil.
+       * nnweb.el (nnweb-asynchronous-p): Change to nil.
 
 2003-01-07  Simon Josefsson  <jas@extundo.com>
 
 
 2003-01-06  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
-       * gnus-agent.el (gnus-agent-fetch-group): Modified to permit execution
+       * gnus-agent.el (gnus-agent-fetch-group): Modify to permit execution
        in either the group or summary buffer.
        New command "JS", in summary buffer, will fetch articles per the
        group's category, predicate, and processable flags.
        (gnus-agent-summary-fetch-series): Rewritten to call
        gnus-agent-session-fetch-group once with all articles in the
        series.
-       (gnus-agent-summary-fetch-group): Fixed bug and modified code to
+       (gnus-agent-summary-fetch-group): Fix bug and modified code to
        return list of fetched articles.
        (gnus-agent-fetch-articles): Split fetch list into sublists such
        that the article buffer is only slightly larger than
        When called in the group buffer, articles that can not be fetched
        are AUTOMATICALLY MARKED AS READ.
 
-       * gnus-sum.el (): Modified eval-when-compile to minimize
+       * gnus-sum.el (): Modify eval-when-compile to minimize
        misleading compilation warnings.
-       (gnus-update-summary-mark-positions): Changed code to use
+       (gnus-update-summary-mark-positions): Change code to use
        gnus-undownloaded-mark rather than gnus-downloaded-mark.
 
        * nnheader.el (nnheader-insert-nov-file): Do not try to insert an
        determine the appropriate course of action.  Instead, two function
        implementations are provided and the nntp-report function value is
        bound to the appropriate implementation.
-       (nntp-retrieve-data): Moved nntp-report call to end of implementation.
+       (nntp-retrieve-data): Move nntp-report call to end of implementation.
        (nntp-with-open-group): Now binds nntp-report's function cell
        rather than binding gnus-with-open-group-first-pass.  Added a
        condition-case to detect a quit during a nntp command.  When the
        quit occurs, the current connection is closed as a fetch articles
        request could have several megabytes queued up for reading.
-       (nntp-retrieve-headers): Bind articles to itself.  If
-       nntp-with-open-group repeats this command, I must have access to
+       (nntp-retrieve-headers): Bind articles to itself.
+       If nntp-with-open-group repeats this command, I must have access to
        the original list of articles.
        (nntp-retrieve-groups): Ditto for groups.
        (nntp-retrieve-articles): Ditto for articles.
-       (*): Replaced nntp-possibly-change-group calls to
+       (*): Replace nntp-possibly-change-group calls to
        nntp-with-open-group forms in all, but one, occurrence.
        (nntp-accept-process-output): Bug fix.  Detect when called with
        null process.
 
        * mm-url.el (mm-url-program): Doc fix.
 
-       * message.el (message-mode-map): Rebound
-       message-insert-wide-reply.
+       * message.el (message-mode-map):
+       Rebound message-insert-wide-reply.
 
 2003-01-05  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 
        * spam.el: Fixed line lengths to 80 chars or less.
 
-       * gnus-sum.el (gnus-read-mark-p): Added the spam-mark as a
+       * gnus-sum.el (gnus-read-mark-p): Add the spam-mark as a
        "not-read" mark.
-       (gnus-summary-mark-forward): Added the spam-mark to the list of
+       (gnus-summary-mark-forward): Add the spam-mark to the list of
        marks not to be marked as "read" when viewed.
 
 2003-01-05  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 2003-01-04  Kevin Ryde  <user42@zip.com.au>
 
-       * gnus-art.el (gnus-mime-jka-compr-maybe-uncompress): New
-       function.
+       * gnus-art.el (gnus-mime-jka-compr-maybe-uncompress):
+       New function.
 
 2003-01-04  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        (spam-generic-register-routine, spam-BBDB-register-routine)
        (spam-ifile-register-routine, spam-blacklist-register-routine)
        (spam-whitelist-register-routine): New functions.
-       (spam-summary-prepare-exit): Added summary exit processing (expire
+       (spam-summary-prepare-exit): Add summary exit processing (expire
        or move) of spam-marked articles for spam groups; added slots for
        all the spam-*-register-routine functions.
 
 
 2003-01-02  Jesper Harder  <harder@ifa.au.dk>
 
-       * gnus-group.el (gnus-group-fetch-charter): Use
-       http://TLH.news-admin.org/charters/GROUPNAME as a fallback.
+       * gnus-group.el (gnus-group-fetch-charter):
+       Use http://TLH.news-admin.org/charters/GROUPNAME as a fallback.
 
 2003-01-02  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 
        * gnus.el (nnheader): Require nnheader.
 
-       * nndraft.el (nndraft-request-associate-buffer): Use
-       make-local-variable.
+       * nndraft.el (nndraft-request-associate-buffer):
+       Use make-local-variable.
 
 2003-01-02  Michael Shields  <shields@msrl.com>
 
-       * nndraft.el (nndraft-request-associate-buffer): Make
-       write-contents-hooks buffer-local before setting it.
+       * nndraft.el (nndraft-request-associate-buffer):
+       Make write-contents-hooks buffer-local before setting it.
 
 2003-01-02  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 
 2003-01-01  Teodor Zlatanov  <tzz@lifelogs.com>
 
-       * spam.el (spam-summary-prepare-exit): Added slots for spam- and
+       * spam.el (spam-summary-prepare-exit): Add slots for spam- and
        ham-processing of articles; use the new
        spam-group-(spam|ham)-contents-p functions.
-       (spam-group-spam-contents-p, spam-group-ham-contents-p): New
-       convenience functions.
+       (spam-group-spam-contents-p, spam-group-ham-contents-p):
+       New convenience functions.
        (spam-mark-junk-as-spam-routine): Use the new
        spam-group-spam-contents-p function.
 
        (gnus-group-spam-exit-processor-whitelist)
        (gnus-group-spam-exit-processor-BBDB)
        (gnus-group-spam-classification-spam)
-       (gnus-group-spam-classification-ham): Added new symbols for the
+       (gnus-group-spam-classification-ham): Add new symbols for the
        spam-process and spam-contents parameters.
 
-       * spam.el (spam-ham-marks, spam-spam-marks): Changed list
+       * spam.el (spam-ham-marks, spam-spam-marks): Change list
        customization and list itself to store mark symbol rather than
        mark character.
-       (spam-bogofilter-register-routine): Added logic to generate mark
+       (spam-bogofilter-register-routine): Add logic to generate mark
        values list from spam-ham-marks and spam-spam-marks, so (member)
        would work.
 
 
 2003-01-01  Teodor Zlatanov  <tzz@lifelogs.com>
 
-       * spam.el (spam-ham-marks, spam-spam-marks): Changed list
+       * spam.el (spam-ham-marks, spam-spam-marks): Change list
        customization and list itself to store mark symbol rather than
        mark character.
-       (spam-bogofilter-register-routine): Added logic to generate mark
+       (spam-bogofilter-register-routine): Add logic to generate mark
        values list from spam-ham-marks and spam-spam-marks, so (member)
        would work.
 
        message-cross-post-note-function): New variables names.
        (message-xpost-old-target, message-xpost-default,
        message-xpost-note, message-fup2-note,
-       message-xpost-note-function): Removed variable names.
+       message-xpost-note-function): Remove variable names.
        (message-cross-post-followup-to-header,
        message-cross-post-insert-note, message-cross-post-followup-to):
        New function names.
        (message-xpost-fup2-header, message-xpost-insert-note,
-       message-xpost-fup2): Removed function names.
+       message-xpost-fup2): Remove function names.
 
 2002-12-30  Reiner Steib  <Reiner.Steib@gmx.de>
 
-       * message.el (message-send-mail): Added message-cleanup-headers to
+       * message.el (message-send-mail): Add message-cleanup-headers to
        prevent newlines in headers.
 
 2003-01-01  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 2003-01-01  Wes Hardaker  <wes@hardakers.net>
 
-       * gnus-sum.el (gnus-summary-display-while-building): New
-       variable.
+       * gnus-sum.el (gnus-summary-display-while-building):
+       New variable.
 
 2003-01-01  Raymond Scholz  <ray-2003@zonix.de>
 
        lambda form.
        (message-draft-headers): New variable.
 
-       * gnus-msg.el (gnus-inews-make-draft-meta-information): New
-       function.
+       * gnus-msg.el (gnus-inews-make-draft-meta-information):
+       New function.
        (gnus-setup-message): Use it.
 
        * message.el (message-generate-headers-first): Doc fix.
 
 2002-12-31  Raymond Scholz  <ray-2002@zonix.de>
 
-       * deuglify.el (gnus-outlook-rearrange-article): Use
-       `transpose-regions' instead of tempering the kill-ring.
+       * deuglify.el (gnus-outlook-rearrange-article):
+       Use `transpose-regions' instead of tempering the kill-ring.
        (gnus-article-outlook-deuglify-article): Rehighlight article
        instead of a complete redisplay.
 
 
 2002-12-30  Reiner Steib  <Reiner.Steib@gmx.de>
 
-       * message.el (message-completion-alist): Added "Mail-Followup-To"
+       * message.el (message-completion-alist): Add "Mail-Followup-To"
        and "Mail-Copies-To".
 
 2002-07-21  Jesper Harder  <harder@ifa.au.dk>
 
        * spam.el (spam-use-dig): New variable for blackhole checking
        through dig.el.
-       (spam-check-blackholes): Added dig.el checking functionality and
+       (spam-check-blackholes): Add dig.el checking functionality and
        more verbose reporting; query-dig is autoloaded from dig.el.
        (spam-use-blackholes): Disabled by default.
-       (spam-blackhole-servers): Removed rbl.maps.vix.com from the
+       (spam-blackhole-servers): Remove rbl.maps.vix.com from the
        blackhole servers list.
 
 2002-12-30  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 2002-08-10  Jari Aalto  <jari.aalto@poboxes.com>
 
-       * nnmail.el (nnmail-split-it): Added tracing to
+       * nnmail.el (nnmail-split-it): Add tracing to
        `:' split rule.
 
 2002-08-13  Hrvoje Niksic  <hniksic@xemacs.org>
        * gnus-topic.el (gnus-topic-display-missing-topic): New function.
        (gnus-topic-goto-missing-group): Use it.
 
-       * message.el (message-required-news-headers): Removed Lines.
+       * message.el (message-required-news-headers): Remove Lines.
        (message-reply): Don't insert References first.
        (message-followup): Ditto.
        (message-make-references): New function.
 
 2002-12-12  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
-       * gnus-agent.el (gnus-agent-fetch-selected-article): Added call to
+       * gnus-agent.el (gnus-agent-fetch-selected-article): Add call to
        gnus-summary-update-download-mark to update the article in the
        summary.
 
        gnus-summary-normal-uncached-face, gnus-summary-low-uncached-face)
        New faces.
 
-       * gnus-agent.el (gnus-agent-downloaded-article-face): REMOVED.  I
-       added this on 2002-11-23 but it just wasn't working out as
+       * gnus-agent.el (gnus-agent-downloaded-article-face): REMOVED.
+       added this on 2002-11-23 but it just wasn't working out as
        intended.  The idea isn't entirely dead, three new faces
        gnus-summary-*-uncached-face are being added to gnus.el to provide
        the basis for an improved implementation.
-       (gnus-agent-read-servers): Undo the change made on 2002-11-23.  The
-       proper file to open is lib/servers.
-       (gnus-summary-set-agent-mark): Expanded documentation.  Unmarking
+       (gnus-agent-read-servers): Undo the change made on 2002-11-23.
+       The proper file to open is lib/servers.
+       (gnus-summary-set-agent-mark): Expand documentation.  Unmarking
        (i.e. removing the article from gnus-newsgroup-downloadable) will
        now restore the article's default mark rather than simply setting
        no mark.
        (gnus-agent-summary-fetch-group): Keep gnus-newsgroup-undownloaded
        up to date.  Call new gnus-summary-update-download-mark to keep
        summary buffer up-to-date.
-       (gnus-agent-fetch-selected-article): Keep
-       gnus-newsgroup-undownloaded up to date.
+       (gnus-agent-fetch-selected-article):
+       Keep gnus-newsgroup-undownloaded up to date.
        (gnus-agent-fetch-articles): Return list of articles that were
        successfully fetched.
        (gnus-agent-check-overview-buffer): No more thingatpt.
        downloaded/undownloaded mark is no longer stored as the article's
        mark.
 
-       * gnus-salt.el (gnus-tree-highlight-node): Added uncached as
+       * gnus-salt.el (gnus-tree-highlight-node): Add uncached as
        gnus-summary-highlight may use it.  Added downloaded as
        gnus-summary-highlight was using it.
 
-       * gnus-sum.el (gnus-undownloaded-mark): Changed from ?@ to ?- as
+       * gnus-sum.el (gnus-undownloaded-mark): Change from ?@ to ?- as
        the download mark now follows Kai's +/- convention.
-       (gnus-downloaded-mark): Added ?+ mark.
-       (gnus-summary-highlight): Added rules to select
+       (gnus-downloaded-mark): Add ?+ mark.
+       (gnus-summary-highlight): Add rules to select
        gnus-summary-high-uncached-face,
        gnus-summary-normal-uncached-face, and
        gnus-summary-low-uncached-face.  Removed the
        you don't have to agentize every server that you use.
        (gnus-update-summary-mark-positions): Completed support for the
        download type of mark.
-       (gnus-summary-insert-line): Added undownloaded to the parameters.
+       (gnus-summary-insert-line): Add undownloaded to the parameters.
        (gnus-summary-prepare-threads): Set gnus-tmp-downloaded for
        reference by the gnus-summary-line-format-spec.
 
 
 2002-12-09  Kai Großjohann  <kai.grossjohann@uni-duisburg.de>
 
-       * nntp.el (nntp-send-command): Braino in last commit.  Replace
-       `and' with `or'.
+       * nntp.el (nntp-send-command): Braino in last commit.
+       Replace `and' with `or'.
 
 2002-12-08  Kai Großjohann  <kai.grossjohann@uni-duisburg.de>
 
 
 2002-11-29  Kai Großjohann  <kai.grossjohann@uni-duisburg.de>
 
-       * gnus-art.el (gnus-inhibit-mime-unbuttonizing): Moved here from
+       * gnus-art.el (gnus-inhibit-mime-unbuttonizing): Move here from
        gnus-sum.  Made into a user option.
 
        * gnus-sum.el (gnus-simplify-ignored-prefixes)
        (gnus-summary-mark-article-as-unread)
        (gnus-mark-article-as-unread, gnus-summary-highlight-line):
        Reformatting to avoid long lines.
-       (gnus-inhibit-mime-unbuttonizing): Moved to gnus-art.
+       (gnus-inhibit-mime-unbuttonizing): Move to gnus-art.
 
 2002-11-28  Daiki Ueno  <ueno@unixuser.org>
 
 
 2002-11-26  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * gnus-agent.el (gnus-agent-uncached-articles): If
-       gnus-agent-load-alist fails, return ARTICLES.
+       * gnus-agent.el (gnus-agent-uncached-articles):
+       If gnus-agent-load-alist fails, return ARTICLES.
 
        * nnrss.el (nnrss-group-alist): Update the link of Jabber.
 
 2002-11-26  Kai Großjohann  <kai.grossjohann@uni-duisburg.de>
 
-       * gnus-sum.el (gnus-summary-insert-old-articles): Remove
-       superfluous function call.
+       * gnus-sum.el (gnus-summary-insert-old-articles):
+       Remove superfluous function call.
        (gnus-summary-catchup-all, gnus-summary-catchup-all-and-exit):
        Add warning to docstring.
 
 
 2002-11-26  Kai Großjohann  <kai.grossjohann@uni-duisburg.de>
 
-       * gnus-agent.el (gnus-agent-check-overview-buffer): Explicitly
-       require thingatpt (for number-at-point) and protect against
+       * gnus-agent.el (gnus-agent-check-overview-buffer):
+       Explicitly require thingatpt (for number-at-point) and protect against
        deactivate-mark being unbound (on XEmacs).
 
 2002-11-25  Kai Großjohann  <kai.grossjohann@uni-duisburg.de>
 
 2002-11-24  Kai Großjohann  <kai.grossjohann@uni-duisburg.de>
 
-       * gnus-sum.el (gnus-summary-insert-old-articles): Use
-       gnus-remove-from-range instead of gnus-range-difference which
+       * gnus-sum.el (gnus-summary-insert-old-articles):
+       Use gnus-remove-from-range instead of gnus-range-difference which
        doesn't exist.
 
 2002-11-23  Kevin Greiner  <kgreiner@xpediantsolutions.com>
        (gnus-agent-article-alist): Format change.  Add documentation.
        (gnus-agent-summary-mode-map): New keybinding `J s' for fetching
        process-marked articles.
-       (gnus-agent-summary-fetch-series): Command for `J s'.  Articles
-       in the series are individually fetched to minimize lose of
+       (gnus-agent-summary-fetch-series): Command for `J s'.
+       Articles in the series are individually fetched to minimize lose of
        content due to an error/quit.
-       (gnus-agent-synchronize-flags-server, gnus-agent-add-server): Use
-       gnus-message instead of message.
+       (gnus-agent-synchronize-flags-server, gnus-agent-add-server):
+       Use gnus-message instead of message.
        (gnus-agent-read-servers): Use file lib/methods instead of
        lib/servers.  TODO: Why?
        (gnus-summary-set-agent-mark): Adapt to new agent-alist format.
        (gnus-agent-fetch-selected-article): Don't use history.
        (gnus-agent-save-history, gnus-agent-enter-history)
        (gnus-agent-article-in-history-p, gnus-agent-history-path):
-       Removed function; history is not used anymore.
+       Remove function; history is not used anymore.
        (gnus-agent-fetch-articles): Fix handling of crossposted articles.
        (gnus-agent-crosspost): Started rewrite then realized that a typo
        in gnus-agent-fetch-articles ensures that this function is never
        (gnus-agent-regenerate-group): No longer needs to be called from
        gnus-agent-regenerate.  Individual groups may be regenerated.  The
        regeneration code now fixes duplicate, and mis-ordered, NOV entries.
-       The article fetch dates are validated in the article alist.  The
-       article alist is pruned of entries that do not reference existing
+       The article fetch dates are validated in the article alist.
+       The article alist is pruned of entries that do not reference existing
        NOV entries.  All changes are computed then applied with
        inhibit-quit bound to t.  As a result, it is now safe to quit out of
        regeneration.  The optional clean parameter has been replaced with
        regeneration gets the appropriate setting from
        gnus-agent-consider-all-articles.  The new reread parameter will
        result in fetched, or all, articles being marked as unread.
-       (gnus-agent-regenerate): Removed code to regenerate the history
+       (gnus-agent-regenerate): Remove code to regenerate the history
        file as it is no longer used.
 
-       * gnus-start.el (gnus-make-ascending-articles-unread): New
-       function, for efficient mass-marking.
+       * gnus-start.el (gnus-make-ascending-articles-unread):
+       New function, for efficient mass-marking.
 
        * gnus-sum.el (gnus-summary-highlight): Use new face for
        downloaded articles.
        line.
        (gnus-summary-highlight-line): Use new face for downloaded
        articles.
-       (gnus-summary-insert-old-articles): Improved performance by
+       (gnus-summary-insert-old-articles): Improve performance by
        replacing the initial LIST of older articles with a compressed
        RANGE of older articles.  Some servers appear to lie about
        their active range so the original list could contain millions
 
 2002-11-19  Simon Josefsson  <jas@extundo.com>
 
-       * gnus-sum.el (gnus-summary-morse-message): Load
-       morse.el (unmorse-region not autoloaded in Emacs 20 nor XEmacs).
+       * gnus-sum.el (gnus-summary-morse-message):
+       Load morse.el (unmorse-region not autoloaded in Emacs 20 nor XEmacs).
        (unmorse-region): Autoload it instead.
 
 2002-11-18  Simon Josefsson  <jas@extundo.com>
 
 2002-11-17  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * message.el (message-set-auto-save-file-name): Use
-       make-directory, to avoid the dependence on gnus-util.
+       * message.el (message-set-auto-save-file-name):
+       Use make-directory, to avoid the dependence on gnus-util.
 
 2002-11-16  Simon Josefsson  <jas@extundo.com>
 
        * nnimap.el (nnimap-callback-callback-function):
-       (nnimap-callback-buffer): Removed, these cannot be global but must
+       (nnimap-callback-buffer): Remove, these cannot be global but must
        be embedded into the callback.
        (nnimap-make-callback): New.  Embedd article number, callback and
        buffer in function.
 
 2002-11-11  Simon Josefsson  <jas@extundo.com>
 
-       * pgg.el (pgg-encrypt, pgg-decrypt, pgg-sign, pgg-verify): Display
-       output when called interactively.
+       * pgg.el (pgg-encrypt, pgg-decrypt, pgg-sign, pgg-verify):
+       Display output when called interactively.
 
 2002-11-08  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        works better.
        (gnus-agent-fetch-headers): New implementation from Kevin
        Greiner.  Uses gnus-agent-article-alist to store information
-       about fetched messages which aren't on the server anymore.  The
-       trick is to return a list of considered messages to the caller,
+       about fetched messages which aren't on the server anymore.
+       The trick is to return a list of considered messages to the caller,
        but to only fetch those which haven't been fetched yet.
 
 2002-10-30  Simon Josefsson  <jas@extundo.com>
 
        * pgg-def.el (pgg-passphrase-cache-expiry): New, defcustom.
 
-       * pgg.el (pgg-passphrase-cache-expiry): Removed.
+       * pgg.el (pgg-passphrase-cache-expiry): Remove.
 
 2002-10-30  TSUCHIYA Masatoshi  <tsuchiya@namazu.org>
 
        versions of emacs-w3m than 1.3.3.
 
        * mm-view.el (mm-w3m-mode-command-alist)
-       (mm-w3m-mode-dont-bind-keys, mm-w3m-mode-ignored-keys): Removed.
+       (mm-w3m-mode-dont-bind-keys, mm-w3m-mode-ignored-keys): Remove.
        (mm-w3m-mode-map): Undefined for Emacs21 and XEmacs.
-       (mm-setup-w3m): Simplified.
+       (mm-setup-w3m): Simplify.
        (mm-w3m-local-map-property): New function.
        (mm-inline-text-html-render-with-w3m): Use it.
 
-       * gnus-art.el (gnus-article-wash-html-with-w3m): Use
-       mm-w3m-local-map-property.
+       * gnus-art.el (gnus-article-wash-html-with-w3m):
+       Use mm-w3m-local-map-property.
 
 2002-10-29  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 
 2002-10-28  Josh Huber  <huber@alum.wpi.edu>
 
-       * mml.el (mml-mode-map): Fixed keybindings for mml-secure-*
+       * mml.el (mml-mode-map): Fix keybindings for mml-secure-*
        functions.
 
 2002-10-28  Mark A. Hershberger  <mah@everybody.org>
 
 2002-10-25  Kai Großjohann  <kai.grossjohann@uni-duisburg.de>
 
-       * gnus-agent.el (gnus-agent-save-fetched-headers): Create
-       directory if it doesn't exist.
+       * gnus-agent.el (gnus-agent-save-fetched-headers):
+       Create directory if it doesn't exist.
        (gnus-agent-fetch-headers): Remove old cruft that tried to
        abstain from downloading articles more than once if
        gnus-agent-consider-all-articles was true.  This is now done
        * gnus-agent.el (gnus-agent-fetched-headers): New variable,
        contains range of headers that have been fetched by the agent
        already.  Compare gnus-agent-article-alist.
-       (gnus-agent-file-header-cache): Like
-       gnus-agent-file-loading-cache, but for gnus-agent-fetched-headers.
+       (gnus-agent-file-header-cache):
+       Like gnus-agent-file-loading-cache, but for gnus-agent-fetched-headers.
        (gnus-agent-fetch-headers): Improve comment.  Revert to old
        seen/recent logic.
        Remember which headers have been fetched before and don't fetch
        * gnus-group.el (gnus-fetch-group): Allow an optional
        specification of the articles to select.
 
-       * gnus-srvr.el (gnus-server-prepare): Removed superfluous cdr.
+       * gnus-srvr.el (gnus-server-prepare): Remove superfluous cdr.
 
 2002-10-20  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
 
 2002-10-20  Steve Youngs  <youngs@xemacs.org>
 
-       * pgg-parse.el (pgg-parse-public-key-algorithm-alist): XEmacs
-       doesn't have the 'alist custom type, use cons cells instead.
+       * pgg-parse.el (pgg-parse-public-key-algorithm-alist):
+       XEmacs doesn't have the 'alist custom type, use cons cells instead.
        (pgg-parse-symmetric-key-algorithm-alist): Ditto.
        (pgg-parse-hash-algorithm-alist): Ditto.
        (pgg-parse-compression-algorithm-alist): Ditto.
        (nnheader-remove-cr-followed-by-lf): New function.
        (nnheader-ms-strip-cr): Use the above function.
 
-       * gnus-agent.el (gnus-agent-regenerate-group): Call
-       `nnheader-remove-body'; use `nnheader-parse-naked-head' instead of
+       * gnus-agent.el (gnus-agent-regenerate-group):
+       Call `nnheader-remove-body'; use `nnheader-parse-naked-head' instead of
        `nnheader-parse-head'.
        * gnus-cache.el (gnus-cache-possibly-enter-article): Ditto.
 
 2002-10-16  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * spam-stat.el: Check for the existence of hash functions instead
-       of the Emacs version to decide whether to load cl.  Suggested by
-       Kai Großjohann.
+       of the Emacs version to decide whether to load cl.
+       Suggested by Kai Großjohann.
 
 2002-10-15  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
 
 2002-10-11  Teodor Zlatanov  <tzz@lifelogs.com>
 
-       * spam.el (spam-check-ifile): Added ifile as a spam checking
+       * spam.el (spam-check-ifile): Add ifile as a spam checking
        backend, and spam-use-ifle as the variable to toggle that check.
 
 2002-10-12  Simon Josefsson  <jas@extundo.com>
 
        * mml2015.el (mml2015-pgg-decrypt): Set gnus details even when
        decrypt failed.
-       (mml2015-trust-boundaries-alist): Removed.
+       (mml2015-trust-boundaries-alist): Remove.
        (mml2015-gpg-extract-signature-details): Don't use it.
        (mml2015-unabbrev-trust-alist): New.
        (mml2015-gpg-extract-signature-details): Use it.
        * pgg-gpg.el (pgg-gpg-verify-region): Filter out stuff into output
        buffer and error buffer depending on type of information.
 
-       * mml2015.el (mml2015-gpg-extract-signature-details): Parse
-       --status-fd stuff even if gpg.el is not used (revert earlier
+       * mml2015.el (mml2015-gpg-extract-signature-details):
+       Parse --status-fd stuff even if gpg.el is not used (revert earlier
        change).
        (mml2015-pgg-{clear-,}verify): Store both output and errors as
        gnus details.
 
 2002-10-08  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
-       * gnus-agent.el (gnus-agent-fetch-selected-article): Bind
-       gnus-agent-current-history.
+       * gnus-agent.el (gnus-agent-fetch-selected-article):
+       Bind gnus-agent-current-history.
 
 2002-10-06  Simon Josefsson  <jas@extundo.com>
 
 
        * pgg-gpg.el (pgg-gpg-encrypt-region): Make signencrypt work.
 
-       * pgg-pgp.el (pgg-pgp-verify-region): Inline
-       binary-write-decoded-region from MEL.
+       * pgg-pgp.el (pgg-pgp-verify-region):
+       Inline binary-write-decoded-region from MEL.
 
        * pgg.el (pgg-encrypt-region): Support sign.
 
        (pgg-string-as-unibyte): Defalias.
        (pgg-parse-armor-region): Use it.
 
-       * pgg-gpg.el (pgg-gpg-process-region): Use
-       pgg-temporary-file-directory.
+       * pgg-gpg.el (pgg-gpg-process-region):
+       Use pgg-temporary-file-directory.
 
        * luna.el: Don't def-edebug.
 
-       * pgg-pgp5.el (pgg-scheme-verify-region): Inline
-       binary-write-decoded-region from MEL.
+       * pgg-pgp5.el (pgg-scheme-verify-region):
+       Inline binary-write-decoded-region from MEL.
 
        * pgg-pgp5.el, pgg-gpg.el: Don't require mel.
 
        * gnus-art.el (gnus-article-mode-syntax-table): Make M-. work in
        article buffers.
 
-       * nnimap.el (nnimap-fixup-unread-after-getting-new-news): Autoload
-       it just in case.
+       * nnimap.el (nnimap-fixup-unread-after-getting-new-news):
+       Autoload it just in case.
        (nnimap-update-unseen): New function; update unseen count in
        `n-m-info'.
        (nnimap-close-group): Call it.
        * gnus-art.el (gnus-button-handle-apropos-variable): Fall back to
        apropos if apropos-variable does not exist.
        (gnus-button-guessed-mid-regexp)
-       (gnus-button-handle-describe-prefix, gnus-button-alist): Better
-       regexes.
+       (gnus-button-handle-describe-prefix, gnus-button-alist):
+       Better regexes.
        (gnus-button-handle-describe-function)
        (gnus-button-handle-describe-variable): Doc fix.
        (gnus-button-handle-describe-key, gnus-button-handle-apropos)
 
 2002-09-23  Reiner Steib  <Reiner.Steib@gmx.de>
 
-       * gnus-art.el (gnus-button-guessed-mid-regexp): Improved regexp.
-       (gnus-button-alist): Improved regexp for
+       * gnus-art.el (gnus-button-guessed-mid-regexp): Improve regexp.
+       (gnus-button-alist): Improve regexp for
        gnus-button-handle-mid-or-mail (false positives), fixed
        gnus-button-handle-man entries.
 
 
 2002-09-23  Paul Jarc  <prj@po.cwru.edu>
 
-       * nnmaildir.el: Store article numbers persistently.  General
-       revision.
+       * nnmaildir.el: Store article numbers persistently.
+       General revision.
        (nnmaildir-request-expire-articles): Handle 'immediate and 'never
        for nnmail-expiry-wait; delete instead of moving if 'force is
        given.
 
        * gnus-msg.el (gnus-configure-posting-styles): Sort results.
 
-       * gnus-art.el (gnus-article-reply-with-original): Correct
-       with-current-buffer scope.
+       * gnus-art.el (gnus-article-reply-with-original):
+       Correct with-current-buffer scope.
 
        * message.el (message-completion-alist): Add Reply-To, From, etc.
 
        describtion and menu.
        (message-change-subject, message-xpost-fup2): Signal error if
        current header is empty.
-       (message-xpost-insert-note): Changed insert position.
+       (message-xpost-insert-note): Change insert position.
        (message-archive-note): Ensure to insert note in message body (not
        in head).
        (message-archive-header, message-archive-note)
        (message-subject-trailing-was-query)
        (message-subject-trailing-was-ask-regexp)
        (message-subject-trailing-was-regexp): New variables.
-       (message-to-list-only): Added doc-string and menu entry.
+       (message-to-list-only): Add doc-string and menu entry.
 
        * message-utils.el: Removed.  Functions are now in message.el.
 
 
 2002-09-03  Katsumi Yamaoka  <yamaoka@jpl.org>
 
-       * gnus-util.el (gnus-frame-or-window-display-name): Exclude
-       invalid display names.
+       * gnus-util.el (gnus-frame-or-window-display-name):
+       Exclude invalid display names.
 
 2002-08-30  Reiner Steib  <Reiner.Steib@gmx.de>
 
 
 2002-08-27  Simon Josefsson  <jas@extundo.com>
 
-       * gnus-msg.el (posting-charset-alist): Use
-       gnus-define-group-parameter instead of defcustom.
+       * gnus-msg.el (posting-charset-alist):
+       Use gnus-define-group-parameter instead of defcustom.
        (gnus-put-message): Handle SPC in GCC.
        (gnus-inews-insert-gcc): Ditto.
        (gnus-inews-insert-archive-gcc): Ditto.
 2002-08-11  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * message-utils.el (message-xpost-default)
-       (message-xpost-fup2-header, message-xpost-fup2): Fixed Typos.
+       (message-xpost-fup2-header, message-xpost-fup2): Fix Typos.
 
 2002-08-09  Simon Josefsson  <jas@extundo.com>
 
-       * message.el (message-canlock-password): Set
-       canlock-password-for-verify to newly generated canlock-password.
+       * message.el (message-canlock-password):
+       Set canlock-password-for-verify to newly generated canlock-password.
        When Emacs is restarted, Custom makes sure this is set, but during
        the same session we must set it manually.
 
 
        * nnweb.el (nnweb-type, nnweb-type-definition)
        (nnweb-gmane-create-mapping, nnweb-gmane-wash-article)
-       (nnweb-gmane-search, nnweb-gmane-identity): Added gmane
+       (nnweb-gmane-search, nnweb-gmane-identity): Add gmane
        functionality.
        * nnweb.el: Removed old non-functioning search engines.
 
 
        * flow-fill.el (fill-flowed): Disable filladapt-mode.
 
-       * gnus-sieve.el (gnus-sieve-guess-rule-for-article): Don't
-       regexp-quote, Cyrus Sieve is fixed.
+       * gnus-sieve.el (gnus-sieve-guess-rule-for-article):
+       Don't regexp-quote, Cyrus Sieve is fixed.
 
        * sieve-manage.el (sieve-manage-deletescript): New function.
 
        * mm-decode.el (mm-inline-text-html-with-images): Doc fix.
        (mm-w3m-safe-url-regexp): New user option.
 
-       * mm-view.el (mm-inline-text-html-render-with-w3m): Use
-       `mm-w3m-safe-url-regexp' to bind `w3m-safe-url-regexp'.
+       * mm-view.el (mm-inline-text-html-render-with-w3m):
+       Use `mm-w3m-safe-url-regexp' to bind `w3m-safe-url-regexp'.
 
 2002-07-23  Karl Kleinpaste  <karl@charcoal.com>
 
-       * gnus-sum.el (gnus-summary-delete-article): Force
-       nnmail-expiry-target to 'delete, so that absolute deletion
+       * gnus-sum.el (gnus-summary-delete-article):
+       Force nnmail-expiry-target to 'delete, so that absolute deletion
        happens when absolute deletion is requested.
 
 2002-07-21  Nevin Kapur  <nevin@jhu.edu>
 
 2002-07-06  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * gnus-topic.el (gnus-topic-indent, gnus-topic-unindent): Change
-       cdaar to cdar and car.
+       * gnus-topic.el (gnus-topic-indent, gnus-topic-unindent):
+       Change cdaar to cdar and car.
 
        * nnsoup.el (nnsoup-retrieve-headers, nnsoup-request-type)
        (nnsoup-read-active-file, nnsoup-article-to-area): Ditto.
 
 2002-06-17  Simon Josefsson  <jas@extundo.com>
 
-       * gnus-start.el (gnus-clear-system, gnus-read-newsrc-file): Make
-       sure to write byte-compiled versions of gnus-*-format-alist to
+       * gnus-start.el (gnus-clear-system, gnus-read-newsrc-file):
+       Make sure to write byte-compiled versions of gnus-*-format-alist to
        .newsrc.eld.
 
 2002-06-16  Bjørn Mork  <bmork@dod.no>
        * nnheader.el (nnheader-file-name-translation-alist): Set the
        default value for MS Windows systems.
 
-       * gnus-ems.el (nnheader-file-name-translation-alist): Removed.
+       * gnus-ems.el (nnheader-file-name-translation-alist): Remove.
 
 2002-06-14  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 
        * gnus-msg.el (gnus-group-mail, gnus-group-news)
        (gnus-group-post-news, gnus-summary-mail-other-window)
-       (gnus-summary-news-other-window, gnus-summary-post-news): Bind
-       gnus-article-copy to nil, thereby inhibiting the `header' posting
+       (gnus-summary-news-other-window, gnus-summary-post-news):
+       Bind gnus-article-copy to nil, thereby inhibiting the `header' posting
        style match to use data from last viewed article.
        Suggested by Hrvoje Niksic.
 
 
 2002-05-20  Jason Baker  <jbaker@cs.utah.edu>  (tiny change)
 
-       * gnus-art.el (gnus-request-article-this-buffer): Try
-       reconnecting if you don't get the message.
+       * gnus-art.el (gnus-request-article-this-buffer):
+       Try reconnecting if you don't get the message.
 
 2002-05-20  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 
 2002-05-06  Josh Huber  <huber@alum.wpi.edu>
 
-       * mml2015.el (mml2015-gpg-encrypt): Changed name of optional
+       * mml2015.el (mml2015-gpg-encrypt): Change name of optional
        argument, and fixed compiler warning.  (Added autoload for
        gpg-encrypt).
 
        * mml-sec.el (mml-signencrypt-style): New.
        * mml-sec.el (mml-pgpmime-encrypt-buffer): Accept optional
        argument `sign'.
-       * mml-sec.el (mml-secure-message-encrypt-pgp): Changed default to
+       * mml-sec.el (mml-secure-message-encrypt-pgp): Change default to
        signencrypt.
        * mml-sec.el (mml-secure-message-encrypt-pgpmime): Ditto.
-       * mml.el (mml-generate-mime-1): Changed logic so a part which is
+       * mml.el (mml-generate-mime-1): Change logic so a part which is
        both signed & encryped is processed in one operation (rather than
        two separate ops: sign, then encrypt).
        * mml2015.el (mml2015-gpg-extract-signature-details): Give some
 
 2002-05-01  Simon Josefsson  <jas@extundo.com>
 
-       * imap.el (imap-parse-resp-text-code, imap-parse-status): Treat
-       UIDNEXT as a string.
+       * imap.el (imap-parse-resp-text-code, imap-parse-status):
+       Treat UIDNEXT as a string.
 
        * nnimap.el (nnimap-string-lessp-numerical): New function.
        (nnimap-retrieve-groups): Compare UIDNEXT as strings instead of
        (nnimap-mailbox-info): New internal variable.
        (nnimap-retrieve-groups): Implement faster new mail check.
 
-       * nnimap.el (nnimap-split-articles): Support
-       nnmail-cache-accepted-message-ids.
+       * nnimap.el (nnimap-split-articles):
+       Support nnmail-cache-accepted-message-ids.
        (nnimap-request-accept-article): Ditto.
 
        * imap.el (imap-mailbox-status-asynch): New command.
 
 2002-04-23  Matthieu Moy  <Matthieu.Moy@imag.fr>
 
-       * gnus-msg.el (gnus-summary-resend-message-edit): Remove
-       message-ignored-resent-headers, too.
+       * gnus-msg.el (gnus-summary-resend-message-edit):
+       Remove message-ignored-resent-headers, too.
 
 2002-04-22  Björn Torkelsson  <torkel@acc.umu.se>
 
        (message-mode): Add description for
        `message-to-list-only'.
        (message-to-list-only): New.
-       (message-make-mft): Changed to use the cl loop macro, and added
+       (message-make-mft): Change to use the cl loop macro, and added
        optional flag to return only the matched list (for use in new
        message-to-list-only function).
 
 
 2002-04-13  Josh Huber  <huber@alum.wpi.edu>
 
-       * mml-sec.el (mml-secure-message): Changed to support arbritrary
+       * mml-sec.el (mml-secure-message): Change to support arbritrary
        modes.
        * mml-sec.el (mml-secure-message-encrypt-(smime|pgp|pgpmime)):
        changed to support "signencrypt" mode.
-       * mml.el (mml-parse-1): Changed to support different secure modes
+       * mml.el (mml-parse-1): Change to support different secure modes
        more easily (for signencrypt).
 
 2002-04-11  Stefan Monnier  <monnier@cs.yale.edu>
 
 2002-04-12  Daiki Ueno  <ueno@unixuser.org>
 
-       * gnus-srvr.el (gnus-server-set-info): Clear
-       `gnus-server-method-cache' when `gnus-server-alist' is changed.
+       * gnus-srvr.el (gnus-server-set-info):
+       Clear `gnus-server-method-cache' when `gnus-server-alist' is changed.
 
 2002-04-11  Simon Josefsson  <jas@extundo.com>
 
-       * gnus-sum.el (gnus-summary-force-verify-and-decrypt): Force
-       viewing of security buttons.  Thanks to Nicolas Kowalski
+       * gnus-sum.el (gnus-summary-force-verify-and-decrypt):
+       Force viewing of security buttons.  Thanks to Nicolas Kowalski
        <Nicolas.Kowalski@imag.fr>.
 
        * smime.el (smime-CA-directory): Fix doc.  Thanks to Arne
 
 2002-04-07  Josh Huber  <huber@alum.wpi.edu>
 
-       * message.el (message-make-mft): Changed MFT code from using
+       * message.el (message-make-mft): Change MFT code from using
        message-recipients (which included Bcc) to use only the To and CC
        headers.
 
        * nnmaildir.el: Use defstruct.  Use a single copy of
        nnmail-extra-headers to save memory.  Store server's group name
        prefix instead of each group's prefixed name.
-       * nnnil.el (nnnil-retrieve-headers, nnnil-request-list): Erase
-       nntp-server-buffer.
+       * nnnil.el (nnnil-retrieve-headers, nnnil-request-list):
+       Erase nntp-server-buffer.
 
 2002-03-31  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 
 2002-03-22  Josh Huber  <huber@alum.wpi.edu>
 
-       * mml.el (mml-mode-map): Added a keybinding for
+       * mml.el (mml-mode-map): Add a keybinding for
        `mml-unsecure-message'.  Also, added a menu entry for said
        function in the Attachments menu.
 
 
 2002-03-12  Faried Nawaz  <fn@hungry.org>  (tiny change)
 
-       * message.el (message-qmail-inject-args): May be function.  Adjust
-       doc string and custom type.
+       * message.el (message-qmail-inject-args): May be function.
+       Adjust doc string and custom type.
        (message-send-mail-with-qmail): Call function if m-q-i-a is a
        function.
 
 
 2002-03-09  Andre Srinivasan  <andre@slamdunknetworks.com>  (tiny change)
 
-       * gnus-sum.el (gnus-summary-save-parts-default-mime): Remove
-       duplication.
+       * gnus-sum.el (gnus-summary-save-parts-default-mime):
+       Remove duplication.
        (gnus-summary-save-parts-type-history): Ditto.
        (gnus-summary-save-parts-last-directory): Ditto.
 
        * qp.el (quoted-printable-decode-region): Doc addition.
        From: Eli Zaretskii <eliz@is.elta.co.il>
 
-       * mail-source.el (make-source-make-complex-temp-name): Use
-       make-temp-file.
+       * mail-source.el (make-source-make-complex-temp-name):
+       Use make-temp-file.
 
        * mm-util.el (mm-make-temp-file): New function.
        * nneething.el (nneething-file-name): Use it.
 
 2002-03-04  Paul Jarc  <prj@po.cwru.edu>
 
-       * message.el (nnmaildir-article-number-to-base-name): New
-       function.
+       * message.el (nnmaildir-article-number-to-base-name):
+       New function.
        (nnmaildir-base-name-to-article-number): New function.
 
 2002-03-04  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gnus-util.el (gnus-multiple-choice): New function.
 
-       * gnus-kill.el (gnus-score-insert-help): Removed, because it is
+       * gnus-kill.el (gnus-score-insert-help): Remove, because it is
        also defined in gnus-score.el.
 
 2002-03-01  Paul Jarc  <prj@po.cwru.edu>
 
 2002-02-22  Andre Srinivasan  <andre@slamdunknetworks.com>  (tiny change)
 
-       * mm-decode.el (mm-display-external): Use
-       mm-file-name-rewrite-functions.
+       * mm-decode.el (mm-display-external):
+       Use mm-file-name-rewrite-functions.
 
 2002-02-22  Paul Jarc  <prj@po.cwru.edu>
 
 
 2002-02-21  Paul Jarc  <prj@po.cwru.edu>
 
-       * nnmaildir.el (nnmaildir-request-expire-articles): Use
-       nnmail-expiry-wait* if expire-age parameter is not set.
+       * nnmaildir.el (nnmaildir-request-expire-articles):
+       Use nnmail-expiry-wait* if expire-age parameter is not set.
 
 2002-02-21  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * gnus-group.el (gnus-group-sort-groups-by-real-name): New
-       function.
+       * gnus-group.el (gnus-group-sort-groups-by-real-name):
+       New function.
        (gnus-group-sort-selected-groups-by-real-name): New function.
        (gnus-group-make-menu-bar): Add sort by real name.
 
 
        * rfc2231.el (rfc2231-parse-string): Support non-ascii chars.
 
-       * gnus-art.el (gnus-article-wash-html-with-w3): Remove
-       w3-delay-image-loads.
+       * gnus-art.el (gnus-article-wash-html-with-w3):
+       Remove w3-delay-image-loads.
        * mm-view.el (mm-inline-text-html-render-with-w3): Ditto.
        (mm-w3-prepare-buffer): Ditto.
 
 
 2002-02-18  Katsumi Yamaoka  <yamaoka@jpl.org>
 
-       * gnus-fun.el (gnus-convert-gray-x-face-to-xpm): Improved to speed
+       * gnus-fun.el (gnus-convert-gray-x-face-to-xpm): Improve to speed
        up.  Suggested by Yuuichi Teranishi <teranisi@gohome.org>.
 
        * gnus-art.el (article-display-x-face): Sort gray X-Faces.
 
        * gnus-agent.el (gnus-get-predicate): Use nconc.
 
-       * gnus-sum.el (gnus-summary-display-make-predicate): Use
-       gnus-summary-display-cache as cache.
+       * gnus-sum.el (gnus-summary-display-make-predicate):
+       Use gnus-summary-display-cache as cache.
 
        * nndoc.el (nndoc-type-alist): Add mail-in-mail type.
        (nndoc-mail-in-mail-type-p): New function.
 
        * mailcap.el (mailcap-mime-data): Use enriched-decode.
 
-       * gnus-cite.el (gnus-article-fill-cited-article): Bind
-       use-hard-newlines to nil.
+       * gnus-cite.el (gnus-article-fill-cited-article):
+       Bind use-hard-newlines to nil.
 
        * gnus-xmas.el (gnus-xmas-image-type-available-p): Assume that
        image is not available if window-system is not available.
        * gnus-soup.el (gnus-soup-send-packet): Send news and mail
        directly instead of calling message-send-mail.
 
-       * gnus-start.el (gnus-read-descriptions-file): Use
-       gnus-default-charset.
+       * gnus-start.el (gnus-read-descriptions-file):
+       Use gnus-default-charset.
 
        * mm-util.el (mm-guess-mime-charset): New function.
 
 
 2002-02-07  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * gnus-art.el (gnus-article-treat-body-boundary): Add
-       gnus-decoration property.
+       * gnus-art.el (gnus-article-treat-body-boundary):
+       Add gnus-decoration property.
        * gnus-msg.el (gnus-copy-article-buffer): Remove gnus-decoration.
 
        * gnus-art.el (gnus-article-treat-unfold-headers): Don't remove
        too many spaces.
 
        * rfc2047.el (rfc2047-unfold-region): Ditto.
-       (rfc2047-decode-region): Don't unfold.  Let
-       gnus-article-treat-unfold-headers do it.
+       (rfc2047-decode-region): Don't unfold.
+       Let gnus-article-treat-unfold-headers do it.
 
 2002-02-07  Matt Armstrong  <matt@lickey.com>
 
        force, prevent errors when following up from article buffer.
        (gnus-article-reply-with-original): Ditto.
 
-       * binhex.el (binhex-decoder-switches): Fix doc.  From
-       Pavel@Janik.cz (Pavel Janík).
+       * binhex.el (binhex-decoder-switches): Fix doc.
+       From Pavel@Janik.cz (Pavel Janík).
 
 2002-02-04  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * gnus-cache.el (gnus-summary-insert-cached-articles):
        (gnus-summary-limit-include-cached): gnus-newsgroup-cached is sorted.
 
-       * gnus-group.el (gnus-group-mark-article-read): Nreverse
-       gnus-newsgroups-unselected.
+       * gnus-group.el (gnus-group-mark-article-read):
+       Nreverse gnus-newsgroups-unselected.
 
-       * gnus-agent.el (gnus-summary-set-agent-mark): Use
-       gnus-add-to-sorted-list.
+       * gnus-agent.el (gnus-summary-set-agent-mark):
+       Use gnus-add-to-sorted-list.
 
        * gnus-sum.el (gnus-summary-update-info): gnus-newsgroup-unreads
        gnus-newsgroup-unselected are sorted.  Use gnus-sorted-union.
        directories.
        (gnus-dired-print): New function.
 
-       * gnus-art.el (gnus-mime-print-part): Add argument filename.  Call
-       ps-despool.
+       * gnus-art.el (gnus-mime-print-part): Add argument filename.
+       Call ps-despool.
 
 2002-02-02  Simon Josefsson  <jas@extundo.com>
 
 
 2002-01-31  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * nnfolder.el (nnfolder-request-replace-article): Unfold.  Don't
-       use mail-header-unfold-field.
+       * nnfolder.el (nnfolder-request-replace-article): Unfold.
+       Don't use mail-header-unfold-field.
 
-       * gnus-cache.el (gnus-summary-insert-cached-articles): Use
-       gnus-summary-limit.
+       * gnus-cache.el (gnus-summary-insert-cached-articles):
+       Use gnus-summary-limit.
 
        * gnus-range.el (gnus-add-to-sorted-list): New function.
        * gnus-sum.el (gnus-mark-article-as-read): Use it.
        * gnus-msg.el (gnus-posting-styles): Add new format of header.
        (gnus-configure-posting-styles): Support the new format.
 
-       * mail-source.el (mail-source-bind, mail-source-bind-common): Set
-       edebug-form-spec to (sexp body).
+       * mail-source.el (mail-source-bind, mail-source-bind-common):
+       Set edebug-form-spec to (sexp body).
        Suggested by Joe Wells <jbw@izanami.cee.hw.ac.uk>.
 
        * message.el (message-reply-headers): Add doc.
 
        * nnagent.el (nnagent-retrieve-headers): Use gnus-sorted-difference.
 
-       * gnus-agent.el (gnus-agent-retrieve-headers): Use
-       gnus-sorted-difference.
+       * gnus-agent.el (gnus-agent-retrieve-headers):
+       Use gnus-sorted-difference.
 
-       * nnsoup.el (nnsoup-request-expire-articles): Use
-       gnus-sorted-difference.
+       * nnsoup.el (nnsoup-request-expire-articles):
+       Use gnus-sorted-difference.
 
        * nnheader.el: Autoload gnus-sorted-difference.
 
-       * nnfolder.el (nnfolder-request-expire-articles): Use
-       gnus-sorted-difference.
+       * nnfolder.el (nnfolder-request-expire-articles):
+       Use gnus-sorted-difference.
 
-       * gnus-cache.el (gnus-cache-retrieve-headers): Use
-       gnus-sorted-difference.
+       * gnus-cache.el (gnus-cache-retrieve-headers):
+       Use gnus-sorted-difference.
 
        * gnus-range.el: Autoload cookies.
        (gnus-sorted-difference): New function.
        * gnus-sum.el (gnus-select-newsgroup): Use gnus-sorted-difference,
        gnus-sorted-ndifference, and gnus-sorted-nintersection.
        (gnus-articles-to-read): Use gnus-sorted-difference.
-       (gnus-summary-limit-mark-excluded-as-read): Use
-       gnus-sorted-intersection and gnus-sorted-ndifference.
+       (gnus-summary-limit-mark-excluded-as-read):
+       Use gnus-sorted-intersection and gnus-sorted-ndifference.
        (gnus-list-of-read-articles): Use gnus-list-range-difference.
        (gnus-summary-insert-articles): Use gnus-sorted-difference.
 
 
        * mm-view.el (mm-w3m-mode-map): New variable.
        (mm-w3m-mode-command-alist): New variable.
-       (mm-w3m-minor-mode): Removed.
+       (mm-w3m-minor-mode): Remove.
        (mm-setup-w3m): Setup `mm-w3m-mode-map'; don't add minor mode.
        (mm-inline-text-html-render-with-w3m): Add keymap property to the
        buffer for using emacs-w3m command keys.
        (message-cite-prefix-regexp): Auto detect non word constituents.
        (message-cite-prefix-regexp): Don't use with-syntax-table.
 
-       * gnus-sum.el (gnus-summary-update-info): Use
-       gnus-list-range-intersection.
+       * gnus-sum.el (gnus-summary-update-info):
+       Use gnus-list-range-intersection.
 
-       * gnus-agent.el (gnus-agent-fetch-headers): Use
-       gnus-list-range-intersection.
+       * gnus-agent.el (gnus-agent-fetch-headers):
+       Use gnus-list-range-intersection.
 
        * gnus-range.el (gnus-range-normalize): Use correct predicate.
        (gnus-list-range-intersection): Use it.
        Don't split when the window is small, e.g. when a small *BBDB*
        window is the lowest one.
 
-       * gnus-agent.el (gnus-agent-retrieve-headers): Use
-       nnheader-find-nov-line to speed up.  Use nreverse, because it is
+       * gnus-agent.el (gnus-agent-retrieve-headers):
+       Use nnheader-find-nov-line to speed up.  Use nreverse, because it is
        sorted.  Use nnheader-insert-nov-file.
 
 2002-01-28  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * time-date.el: Add autoload cookies.  Many doc fixes.
        (time-add): New function.
-       (time-subtract): Renamed from subtract-time.
+       (time-subtract): Rename from subtract-time.
        (subtract-time): New alias for time-subtract.
 
 2002-01-28  Katsumi Yamaoka  <yamaoka@jpl.org>
 2002-01-26  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * nnml.el (nnml-use-compressed-files): New variable.
-       (nnml-filenames-are-evil): Removed.
+       (nnml-filenames-are-evil): Remove.
        (nnml-current-group-article-to-file-alist): Don't use.
        (nnml-update-file-alist): Inhibit.
        (nnml-article-to-file): Use new var.
 
 2002-01-25  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * gnus-agent.el (gnus-agent-save-alist): Optimized.
+       * gnus-agent.el (gnus-agent-save-alist): Optimize.
 
 2002-01-25  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        (gnus-server-method-cache): New variable.
        (gnus-server-to-method): Use it.
        (gnus-group-method-cache): New variable.
-       (gnus-find-method-for-group-1): Renamed.
+       (gnus-find-method-for-group-1): Rename.
        (gnus-find-method-for-group): New function.
-       (gnus-group-method-cache): Removed.
+       (gnus-group-method-cache): Remove.
 
        * gnus-sum.el (gnus-compute-unseen-list): Use new optimized
        function.
 
        * gnus-range.el (gnus-members-of-range): New function.
-       (gnus-list-range-intersection): Renamed.
+       (gnus-list-range-intersection): Rename.
        (gnus-inverse-list-range-intersection): New function.
 
        * gnus-sum.el (gnus-compute-unseen-list): Made into own function.
 
 2002-01-25  Katsumi Yamaoka  <yamaoka@jpl.org>
 
-       * mm-view.el (mm-inline-text-html-render-with-w3m): Decode
-       charset-encoded html contents.
+       * mm-view.el (mm-inline-text-html-render-with-w3m):
+       Decode charset-encoded html contents.
 
 2002-01-24  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
 
 2002-01-22  Josh Huber  <huber@alum.wpi.edu>
 
-       * mml.el (mml-parse-1): Fixed usage of recipients in the secure
+       * mml.el (mml-parse-1): Fix usage of recipients in the secure
        tag.
 
 2002-01-22  Josh Huber  <huber@alum.wpi.edu>
 
-       * message.el (message-font-lock-keywords): Added the secure tag.
+       * message.el (message-font-lock-keywords): Add the secure tag.
        * mml-sec.el: Added functions to generate/modify/remove the secure
        tag while in message mode.
        * mml-sec.el (mml-secure-message): New.
        * mml-sec.el (mml-secure-message-encrypt-smime): New.
        * mml-sec.el (mml-secure-message-encrypt-pgp): New.
        * mml-sec.el (mml-secure-message-encrypt-pgpmime): New.
-       * mml.el (mml-parse-1): Added code to recognize the secure tag and
+       * mml.el (mml-parse-1): Add code to recognize the secure tag and
        convert it to either a part or multipart depending on if there are
        other parts in the message.
-       * mml.el (mml-mode-map): Changed default sign/encrypt keybindings
+       * mml.el (mml-mode-map): Change default sign/encrypt keybindings
        to use the secure tag, rather than the part tag.
-       * mml.el (mml-preview): Added a save-excursion to keep cursor
+       * mml.el (mml-preview): Add a save-excursion to keep cursor
        position after doing an MML preview.
 
 2002-01-22  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 2002-01-20  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * nnfolder.el (nnfolder-request-accept-article): Unfold
-       x-from-line.
+       * nnfolder.el (nnfolder-request-accept-article):
+       Unfold x-from-line.
        (nnfolder-request-replace-article): Ditto.
 
 2002-01-20  Nevin Kapur  <nevin@jhu.edu>
 
        * message.el (message-dont-send): Doc fix.
 
-       * gnus-util.el (gnus-completing-read): Remove
-       inherit-input-method.
+       * gnus-util.el (gnus-completing-read):
+       Remove inherit-input-method.
 
        * gnus-art.el (gnus-treat-smiley): Doc fix.
 
 
 2002-01-19  Daniel Pittman  <daniel@rimspace.net>
 
-       * gnus-sum.el (gnus-summary-first-unseen-or-unread-subject): New
-       functions.
+       * gnus-sum.el (gnus-summary-first-unseen-or-unread-subject):
+       New functions.
 
 2002-01-19  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * gnus-sum.el (gnus-summary-goto-subject): Error on non-numerical
        articles.
 
-       * gnus-util.el (gnus-completing-read-with-default): Renamed.
+       * gnus-util.el (gnus-completing-read-with-default): Rename.
 
        * nnmail.el (nnmail-article-group): Clean up.
 
 
        * smiley-ems.el (smiley-region): Register smiley.
        (smiley-toggle-buffer): Rewrite the function.
-       (smiley-active): Removed.
+       (smiley-active): Remove.
 
 2002-01-19  Simon Josefsson  <jas@extundo.com>
 
-       * gnus-util.el (gnus-parent-id): Optimize null n case.  From
-       Jesper Harder <harder@ifa.au.dk>.
+       * gnus-util.el (gnus-parent-id): Optimize null n case.
+       From Jesper Harder <harder@ifa.au.dk>.
 
 2002-01-18  TSUCHIYA Masatoshi  <tsuchiya@namazu.org>
 
-       * gnus-art.el (gnus-request-article-this-buffer): Call
-       `nneething-get-file-name' to extract the file name from the
+       * gnus-art.el (gnus-request-article-this-buffer):
+       Call `nneething-get-file-name' to extract the file name from the
        message id.
 
        * nneething.el (nneething-encode-file-name): New function.
 2002-01-17  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * gnus-agent.el (gnus-agent-retrieve-headers): Use correct buffer.
-       (gnus-agent-braid-nov): Switch back to nntp-server-buffer.  Remove
-       duplications.
+       (gnus-agent-braid-nov): Switch back to nntp-server-buffer.
+       Remove duplications.
        (gnus-agent-batch): Bind gnus-agent-confirmation-function.
 
 2002-01-16  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * gnus-sum.el (gnus-summary-initial-limit): Inline
-       gnus-summary-limit-children.
+       * gnus-sum.el (gnus-summary-initial-limit):
+       Inline gnus-summary-limit-children.
        (gnus-summary-initial-limit): Don't limit if
        gnus-newsgroup-display is nil.
        (gnus-summary-initial-limit): No, don't.
 
        * gnus-util.el
-       (gnus-put-text-property-excluding-characters-with-faces): Inline
-       gnus-put-text-property.
+       (gnus-put-text-property-excluding-characters-with-faces):
+       Inline gnus-put-text-property.
 
        * gnus-spec.el (gnus-default-format-specs): New variable.
 
 
        * gnus-sum.el (gnus-summary-from-or-to-or-newsgroups): Inline some
        functions.
-       (gnus-gather-threads-by-references): Inline
-       `gnus-split-references'.
+       (gnus-gather-threads-by-references):
+       Inline `gnus-split-references'.
 
        * gnus-spec.el (gnus-summary-line-format-spec): New, optimized
        default value of gnus-summary-line-format-spec.
        * nnslashdot.el (nnslashdot-retrieve-headers-1): A better error
        message.
        (nnslashdot-request-list): Ditto.
-       (nnslashdot-sid-strip): Removed.
+       (nnslashdot-sid-strip): Remove.
 
 2002-01-15  Simon Josefsson  <jas@extundo.com>
 
 
 2002-01-15  TSUCHIYA Masatoshi  <tsuchiya@namazu.org>
 
-       * nneething.el (nneething-request-article): Set
-       `nnmail-file-coding-system' to `binary' locally, in order to read
+       * nneething.el (nneething-request-article):
+       Set `nnmail-file-coding-system' to `binary' locally, in order to read
        files without any conversion.
 
 2002-01-15  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * gnus-agent.el (gnus-agent-retrieve-headers): Use
-       nnheader-file-coding-system and nnmail-active-file-coding-system.
+       * gnus-agent.el (gnus-agent-retrieve-headers):
+       Use nnheader-file-coding-system and nnmail-active-file-coding-system.
        (gnus-agent-regenerate-group): Ditto.
        (gnus-agent-regenerate): Ditto.
        (gnus-agent-write-active): Ditto.
 
        * imap.el (imap-close): Keep going if quit.
 
-       * gnus-agent.el (gnus-agent-retrieve-headers): Erase
-       nntp-server-buffer.
+       * gnus-agent.el (gnus-agent-retrieve-headers):
+       Erase nntp-server-buffer.
 
 2002-01-12  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * mm-view.el (mm-display-inline-fontify): Require font-lock to
        avoid unbinding shadowed variables.
 
-       * gnus-art.el (gnus-picon-databases): Moved here.
-       (gnus-picons-installed-p): Moved here.
+       * gnus-art.el (gnus-picon-databases): Move here.
+       (gnus-picons-installed-p): Move here.
        (gnus-article-reply-with-original): Use `mark'.
 
-       * gnus.el (gnus-picon): Moved here and renamed.
+       * gnus.el (gnus-picon): Move here and renamed.
 
        * gnus-art.el (gnus-treat-from-picon): Only be on if picons are
        installed.
 
 2002-01-12  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * gnus-art.el (gnus-article-reply-with-original): Use
-       `mark-active'.
+       * gnus-art.el (gnus-article-reply-with-original):
+       Use `mark-active'.
 
        * gnus-msg.el (gnus-summary-reply): Don't bug out on regions.
 
 2002-01-12  Simon Josefsson  <jas@extundo.com>
 
        * flow-fill.el (fill-flowed-display-column)
-       (fill-flowed-encode-columnq): New variables.  Suggested by
-       Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann).
+       (fill-flowed-encode-columnq): New variables.
+       Suggested by Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann).
        (fill-flowed-encode, fill-flowed): Use them.
 
-       * message.el (message-send-news, message-send-mail): Use
-       m-b-s-n-p-e-h-n.
+       * message.el (message-send-news, message-send-mail):
+       Use m-b-s-n-p-e-h-n.
 
        * mml.el (autoload): Autoload fill-flowed-encode.
-       (mml-buffer-substring-no-properties-except-hard-newlines): New
-       function.
+       (mml-buffer-substring-no-properties-except-hard-newlines):
+       New function.
        (mml-read-part): Use it.
        (mml-generate-mime-1): Encode format=flowed if appropriate.
        (mml-insert-mime-headers): Insert format=flowed.
        gnus-article-prepare-hook.
 
        * gnus-agent.el (gnus-agent-retrieve-headers): Load agentview.
-       (gnus-agent-toggle-plugged): Use gnus-agent-go-online.  Move
-       gnus-agent-possibly-synchronize-flags to the last.
+       (gnus-agent-toggle-plugged): Use gnus-agent-go-online.
+       Move gnus-agent-possibly-synchronize-flags to the last.
        (gnus-agent-go-online): New function.  New variable.
 
 2002-01-11  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
 2002-01-10  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * nnkiboze.el (nnkiboze-request-article): Use
-       gnus-agent-request-article.
+       * nnkiboze.el (nnkiboze-request-article):
+       Use gnus-agent-request-article.
 
        * nnagent.el (nnagent-retrieve-headers): Don't use nnml
        function.  Insert undownloaded NOV.
 
        * gnus.el (gnus-agent-cache): New variable.
 
-       * gnus-int.el (gnus-retrieve-headers): Use
-       gnus-agent-retrieve-headers.
+       * gnus-int.el (gnus-retrieve-headers):
+       Use gnus-agent-retrieve-headers.
        (gnus-request-head): Use gnus-agent-request-article.
        (gnus-request-body): Ditto.
 
-       * gnus-art.el (gnus-request-article-this-buffer): Use
-       gnus-agent-request-article.
+       * gnus-art.el (gnus-request-article-this-buffer):
+       Use gnus-agent-request-article.
 
        * gnus-sum.el (gnus-summary-read-group-1): Don't show the first
        article if it is undownloaded.
 
 2002-01-08  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * mm-encode.el (mm-content-transfer-encoding-defaults): Add
-       application/x-emacs-lisp.
+       * mm-encode.el (mm-content-transfer-encoding-defaults):
+       Add application/x-emacs-lisp.
 
        * gnus-msg.el (gnus-bug): Use application/emacs-lisp.
 
 2002-01-07  TSUCHIYA Masatoshi  <tsuchiya@namazu.org>
 
        * nneething.el (nneething-request-article): When a non-text file
-       is converted to an article, its data is encoded in base64.  Call
-       `nneething-make-head' with options to specify MIME types.
+       is converted to an article, its data is encoded in base64.
+       Call `nneething-make-head' with options to specify MIME types.
        (nneething-make-head): Add optional arguments to specify MIME
        types.
 
 
 2002-01-06  Simon Josefsson  <jas@extundo.com>
 
-       * imap.el (imap-ssl-open, imap-ssl-open, imap-parse-fetch): Use
-       condition-case, not ignore-errors.
+       * imap.el (imap-ssl-open, imap-ssl-open, imap-parse-fetch):
+       Use condition-case, not ignore-errors.
 
 2002-01-06  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * gnus-sum.el (gnus-summary-insert-old-articles): Bind
-       gnus-fetch-old-headers.
+       * gnus-sum.el (gnus-summary-insert-old-articles):
+       Bind gnus-fetch-old-headers.
 
        * gnus-art.el (article-display-x-face): Use the current buffer
        unless `W f'.  Otherwise, X-Face may be shown in the header of a
 
 2002-01-06  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * gnus-group.el (gnus-group-read-ephemeral-group): Fix
-       parameters.
+       * gnus-group.el (gnus-group-read-ephemeral-group):
+       Fix parameters.
 
 2002-01-06  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        (mm-detect-coding-region): New function.
        (mm-detect-mime-charset-region): New function.
 
-       * gnus-sum.el (gnus-summary-show-article): Use
-       mm-detect-coding-region.
+       * gnus-sum.el (gnus-summary-show-article):
+       Use mm-detect-coding-region.
 
 2002-01-06  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 
 2002-01-05  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * gnus.el (gnus-logo-color-alist): Added more colors from Luis.
+       * gnus.el (gnus-logo-color-alist): Add more colors from Luis.
 
 2002-01-05  Keiichi Suzuki  <keiichi@nanap.org>  (tiny change)
 
 2002-01-05  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * gnus-sum.el (gnus-thread-latest-date): New function.
-       (gnus-thread-sort-by-most-recent-number): Renamed.
+       (gnus-thread-sort-by-most-recent-number): Rename.
        (gnus-thread-sort-functions): Doc fix.
        (gnus-select-group-hook): Don't use setq on a hook.
        (gnus-thread-latest-date): Use date, not number.
        * gnus-agent.el (gnus-agent-expire-days): Doc fix.
        (gnus-agent-expire): Allow regexp of expire-days.
 
-       * gnus-art.el (gnus-article-reply-with-original): Deactivate
-       region.
+       * gnus-art.el (gnus-article-reply-with-original):
+       Deactivate region.
        (gnus-article-followup-with-original): Ditto.
 
        * gnus-sum.el (gnus-thread-highest-number): Doc fix.
 
-       * gnus-art.el (gnus-mime-display-alternative): Use
-       gnus-local-map-property.
+       * gnus-art.el (gnus-mime-display-alternative):
+       Use gnus-local-map-property.
        (gnus-mime-display-alternative): Ditto.
        (gnus-insert-mime-security-button): Ditto.
        (gnus-insert-next-page-button): Ditto.
        "X-Face: " to the data in the built-in scenario.
 
        * gnus-spec.el (gnus-parse-simple-format): Use gnus-pad-form.
-       (gnus-correct-pad-form): Renamed.
+       (gnus-correct-pad-form): Rename.
        (gnus-tilde-max-form): Clean up.
        (gnus-pad-form): Use gnus-use-correct-string-widths.
 
 
        * gnus-fun.el (gnus-display-x-face-in-from): Use face.
 
-       * gnus-ems.el (gnus-article-xface-ring-internal): Removed.
-       (gnus-article-xface-ring-size): Removed.
-       (gnus-article-display-xface): Removed.
+       * gnus-ems.el (gnus-article-xface-ring-internal): Remove.
+       (gnus-article-xface-ring-size): Remove.
+       (gnus-article-display-xface): Remove.
        (gnus-remove-image): Cleaned up.
 
        * gnus-xmas.el (gnus-xmas-create-image): Convert pbm to xbm.
        (gnus-xmas-create-image): Take pbm files.
-       (gnus-x-face): Removed.
-       (gnus-xmas-article-display-xface): Removed.
+       (gnus-x-face): Remove.
+       (gnus-xmas-article-display-xface): Remove.
 
-       * gnus-fun.el (gnus-display-x-face-in-from): Bind
-       default-enable-multibyte-characters.
+       * gnus-fun.el (gnus-display-x-face-in-from):
+       Bind default-enable-multibyte-characters.
 
        * compface.el (uncompface): Doc fix.
 
-       * gnus-art.el (gnus-article-x-face-command): Use
-       gnus-display-x-face-in-from.
+       * gnus-art.el (gnus-article-x-face-command):
+       Use gnus-display-x-face-in-from.
 
        * gnus-xmas.el (gnus-xmas-put-image): Return the image.
 
        * gnus-ems.el (gnus-put-image): Return the image.
 
        * gnus-fun.el (gnus-display-x-face-in-from): New function.
-       (gnus-x-face): Moved here.
+       (gnus-x-face): Move here.
 
 2002-01-04  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
 
        * gnus-fun.el (gnus-convert-gray-x-face-to-xpm): Use uncompface.
 
-       * compface.el (compface-xbm-p): Removed.
+       * compface.el (compface-xbm-p): Remove.
 
-       * gnus-ems.el (gnus-article-compface-xbm): Removed.
+       * gnus-ems.el (gnus-article-compface-xbm): Remove.
        (gnus-article-display-xface): Use compface.
 
        * compface.el: New file.
 
 2002-01-03  Paul Jarc  <prj@po.cwru.edu>
 
-       * nnmaildir.el (nnmaildir-request-expire-articles): Evaluate
-       the expire-group parameter once per article rather than once
+       * nnmaildir.el (nnmaildir-request-expire-articles):
+       Evaluate the expire-group parameter once per article rather than once
        per group; bind `nnmaildir-article-file-name' and `article'
        for convenience.  Leave article alone when expire-group
        specifies the current group.
 
 2002-01-03  Dave Love  <d.love@dl.ac.uk>
 
-       * gnus-start.el (gnus-startup-file-coding-system): Removed.
+       * gnus-start.el (gnus-startup-file-coding-system): Remove.
        (gnus-read-init-file): Don't use it.
 
 2002-01-03  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 2002-01-03  Per Abrahamsen  <abraham@dina.kvl.dk>
 
-       * gnus.el (gnus-summary-line-format): Added :link.
+       * gnus.el (gnus-summary-line-format): Add :link.
        * gnus-topic.el (gnus-topic-line-format): Ditto.
        * gnus-sum.el (gnus-summary-dummy-line-format): Ditto.
        * gnus-srvr.el (gnus-server-line-format): Ditto.
 
 2002-01-02  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * gnus-fun.el (gnus-convert-gray-x-face-to-xpm): Renamed.
+       * gnus-fun.el (gnus-convert-gray-x-face-to-xpm): Rename.
 
        * gnus-art.el (gnus-ignored-headers): Hide all X-Faces.
        (article-display-x-face): Display gray X-Faces.
        * gnus-fun.el: New file.
        (gnus-convert-image-to-x-face-command): New variable.
        (gnus-insert-x-face): New function.
-       (gnus-random-x-face): Renamed.
-       (gnus-x-face-from-file): Renamed.
+       (gnus-random-x-face): Rename.
+       (gnus-x-face-from-file): Rename.
 
-       * gnus-art.el (gnus-body-boundary-delimiter): Changed default to
+       * gnus-art.el (gnus-body-boundary-delimiter): Change default to
        "_".
        (gnus-body-boundary-delimiter): Typo fix.
 
        * gnus-picon.el (gnus-picon-find-face): Search MISC for all types.
        (gnus-picon-transform-address): Search for unknown faces as well.
        (gnus-picon-find-face): Don't search "news" for MISC.
-       (gnus-picon-user-directories): Changed default back to exclude
+       (gnus-picon-user-directories): Change default back to exclude
        "unknown".
 
        * gnus-sum.el (gnus-summary-hide-all-threads): Reversed logic.
        keystroke.
        (gnus-topic-goto-next-topic): Ditto.
 
-       * gnus.el (gnus-summary-line-format): Changed default.
+       * gnus.el (gnus-summary-line-format): Change default.
 
        * nnmail.el (nnmail-extra-headers): Change default.
 
        * gnus-sum.el (gnus-extra-headers): Change default.
 
-       * message.el (message-news-other-window): Changed "news" to
+       * message.el (message-news-other-window): Change "news" to
        "posting".
        (message-news-other-frame): Ditto.
        (message-do-send-housekeeping): Ditto.
 
 2002-01-01  Steve Youngs  <youngs@xemacs.org>
 
-       * gnus-xmas.el (gnus-xmas-article-display-xface): Uncomment
-       'set-glyph-face' so x-face back/foreground can be set.
+       * gnus-xmas.el (gnus-xmas-article-display-xface):
+       Uncomment 'set-glyph-face' so x-face back/foreground can be set.
 
 2001-12-31  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
 
 2002-01-01  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * gnus-art.el (gnus-treat-smiley): Renamed command.
+       * gnus-art.el (gnus-treat-smiley): Rename command.
        (gnus-article-remove-images): New command and keystroke.
 
-       * gnus-sum.el (gnus-summary-toggle-smiley): Removed.
+       * gnus-sum.el (gnus-summary-toggle-smiley): Remove.
 
-       * smiley-ems.el (gnus-smiley-display): Removed.
+       * smiley-ems.el (gnus-smiley-display): Remove.
 
        * gnus.el (gnus-version-number): Update version.
 
-       * message.el (message-text-with-property): Renamed and moved
+       * message.el (message-text-with-property): Rename and moved
        here.
        (message-fix-before-sending): Highlight invisible text and place
        point there.
 
 2002-01-01  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * gnus-delay.el (gnus-delay-send-queue): Renamed.
+       * gnus-delay.el (gnus-delay-send-queue): Rename.
 
        * gnus-art.el (gnus-ignored-headers): More headers.
 
 
 2001-12-31  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * gnus-group.el (gnus-group-line-format): Added %O to the default
+       * gnus-group.el (gnus-group-line-format): Add %O to the default
        value.
 
        * gnus-util.el (gnus-text-with-property): The smallest point is
 
        * gnus-ems.el (gnus-article-display-xface): Mark and store image.
 
-       * gnus-art.el (gnus-article-wash-status-entry): Renamed.
+       * gnus-art.el (gnus-article-wash-status-entry): Rename.
        (gnus-article-wash-status): Use it.
        (gnus-signature-toggle): Clean up.
        (gnus-add-wash-status): New function.
        * smiley-ems.el (gnus-smiley-file-types): New variable.
        (smiley-update-cache): Use it.
        (smiley-regexp-alist): Suffix-less smiley names.
-       (smiley-regexp-alist): Added more smileys.
+       (smiley-regexp-alist): Add more smileys.
 
        * gnus-sum.el (gnus-print-buffer): Made into own function.
        (gnus-summary-print-article): Use it.
 
 2001-12-31  Simon Josefsson  <jas@extundo.com>
 
-       * imap.el (imap-parse-fetch): Notice empty flags responses.  From
-       Nic Ferrier <nferrier@tf1.tapsellferrier.co.uk>.
+       * imap.el (imap-parse-fetch): Notice empty flags responses.
+       From Nic Ferrier <nferrier@tf1.tapsellferrier.co.uk>.
 
 2001-12-30  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
 
 2001-12-30  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * gnus-art.el (gnus-article-treat-fold-newsgroups): Don't
-       infloop.
+       * gnus-art.el (gnus-article-treat-fold-newsgroups):
+       Don't infloop.
 
        * gnus-sum.el (t): New `W D' map.
 
        * gnus-art.el (gnus-treat-fold-newsgroups): New variable.
        (gnus-article-treat-body-boundary): Clean up.
-       (gnus-body-boundary-face): Removed.
-       (gnus-article-goto-header): Moved here.
+       (gnus-body-boundary-face): Remove.
+       (gnus-article-goto-header): Move here.
        (gnus-article-goto-header): Allow better regexps.
        (gnus-article-treat-fold-newsgroups): New command.
 
        * mail-parse.el (mail-header-fold-line): New alias.
        (mail-header-unfold-line): Ditto.
 
-       * gnus-art.el (gnus-body-boundary-face): Renamed.
+       * gnus-art.el (gnus-body-boundary-face): Rename.
        (gnus-article-treat-body-boundary): Use it.
        (gnus-article-treat-body-boundary): Use an invisible header and a
        line of underline characters.
        (gnus-picon-transform-address): Use it.  Set first to t for each
        address.
 
-       * gnus-art.el (gnus-with-article-headers): Move to here.  Define
-       the macro then use it.
+       * gnus-art.el (gnus-with-article-headers): Move to here.
+       Define the macro then use it.
        (gnus-treatment-function-alist): Treat picons earlier.
 
 2001-12-30  Lars Magne Ingebrigtsen  <larsi@gnus.org>
        * gnus-xmas.el (gnus-xmas-group-startup-message): Use general
        colors.
 
-       * gnus.el (gnus-logo-color-alist): Moved here and renamed.
+       * gnus.el (gnus-logo-color-alist): Move here and renamed.
        (gnus-logo-color-style): Ditto.
        (gnus-logo-colors): Ditto.
 
        * ietf-drums.el (ietf-drums-parse-addresses): Accept a nil
        string.
 
-       * gnus-picon.el (gnus-treat-mail-picon): Renamed.
+       * gnus-picon.el (gnus-treat-mail-picon): Rename.
 
        * gnus-art.el (gnus-treat-cc-picon): New variable.
-       (gnus-treat-mail-picon): Renamed.
+       (gnus-treat-mail-picon): Rename.
 
        * gnus-picon.el: New implementation.
-       (gnus-picon-find-face): Renamed.
+       (gnus-picon-find-face): Rename.
        (gnus-treat-from-picon): Use it.
-       (gnus-picon-transform-address): Renamed.
+       (gnus-picon-transform-address): Rename.
        (gnus-treat-from-picon): Use it.
-       (gnus-picon-create-glyph): Renamed.
+       (gnus-picon-create-glyph): Rename.
        (gnus-picon-transform-address): Use it.
        (gnus-treat-cc-picon): New command.
 
-       * mm-decode.el (mm-create-image-xemacs): Separated out into
+       * mm-decode.el (mm-create-image-xemacs): Separate out into
        function.
        (mm-get-image): Use it.
 
        * gnus-art.el (gnus-treat-display-picons): Simplify.
-       (gnus-treat-from-picon): Renamed.
+       (gnus-treat-from-picon): Rename.
 
        * gnus-ems.el (gnus-create-image): New function.
        (gnus-put-image): New function.
 2001-12-29  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * gnus-art.el (gnus-treat-unfold-lines): New variable.
-       (gnus-treat-unfold-headers): Renamed.
+       (gnus-treat-unfold-headers): Rename.
        (gnus-article-treat-unfold-headers): New command and keystroke.
 
        * rfc2047.el (rfc2047-encode-message-header): Clean up.
 
 2001-12-29  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * gnus-picon.el (gnus-picons-news-directories): Removed obsolete
+       * gnus-picon.el (gnus-picons-news-directories): Remove obsolete
        alias.
        (gnus-picons-database): Default to list.
        (gnus-picons-lookup-internal): Use it.
        * gnus-art.el (gnus-treatment-function-alist): Emphasize after
        other treatments.
 
-       * gnus-util.el (gnus-put-overlay-excluding-newlines): New
-       function.
+       * gnus-util.el (gnus-put-overlay-excluding-newlines):
+       New function.
 
        * gnus-art.el (gnus-article-show-hidden-text): Remove the type
        from the list of hidden types.
 
 2001-12-29  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * gnus-art.el (gnus-ignored-headers): Added more headers.
+       * gnus-art.el (gnus-ignored-headers): Add more headers.
 
 2001-12-29  Jesper Harder  <harder@ifa.au.dk>
 
 
 2001-12-28  Simon Josefsson  <jas@extundo.com>
 
-       * gnus-srvr.el (gnus-browse-foreign-server): Fix typo.  From
-       Jesper Harder <harder@ifa.au.dk>.
+       * gnus-srvr.el (gnus-browse-foreign-server): Fix typo.
+       From Jesper Harder <harder@ifa.au.dk>.
 
 2001-12-27  Simon Josefsson  <jas@extundo.com>
 
-       * gnus-sum.el (gnus-select-newsgroup): Make
-       `gnus-newsgroup-unseen' sorted.  Make `gnus-newsgroup-unseen'
+       * gnus-sum.el (gnus-select-newsgroup):
+       Make `gnus-newsgroup-unseen' sorted.  Make `gnus-newsgroup-unseen'
        contain all articles (instead of none) when no seen marks have
        been set for the group.
        (gnus-update-marks): Use `gnus-range-add' on a uncompressed list
 
 2001-12-26 11:00:00  Jesper Harder  <harder@ifa.au.dk>
 
-       * mm-util.el (mm-iso-8859-x-to-15-region): Use
-       insert-before-markers.
+       * mm-util.el (mm-iso-8859-x-to-15-region):
+       Use insert-before-markers.
 
 2001-12-26  Paul Jarc  <prj@po.cwru.edu>
 
 
 2001-12-22 22:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * gnus-group.el (gnus-group-read-ephemeral-group): Call
-       gnus-group-real-name.
+       * gnus-group.el (gnus-group-read-ephemeral-group):
+       Call gnus-group-real-name.
 
        * gnus-sum.el (gnus-decode-encoded-word-methods): Backslash paren.
        (gnus-newsgroup-variables): Ditto.
 
        * nnimap.el (top-level): Don't require cl.  Suggested by ShengHuo
        ZHU <zsh@cs.rochester.edu>.
-       (nnimap-close-group): Don't quote KEYLIST items.  Suggested by
-       Brian P Templeton <bpt@tunes.org>.
+       (nnimap-close-group): Don't quote KEYLIST items.
+       Suggested by Brian P Templeton <bpt@tunes.org>.
 
 2001-12-19 17:00:00  Paul Jarc  <prj@po.cwru.edu>
 
 
        * gnus-salt.el (gnus-tree-recenter, gnus-generate-tree)
        (gnus-generate-tree, gnus-highlight-selected-tree)
-       (gnus-highlight-selected-tree, gnus-tree-highlight-article): Use
-       it.
+       (gnus-highlight-selected-tree, gnus-tree-highlight-article):
+       Use it.
 
        * gnus-art.el (gnus-article-set-window-start)
        (gnus-mm-display-part, gnus-request-article-this-buffer)
 
 2001-12-13  Josh Huber  <huber@alum.wpi.edu>
 
-       * gnus-cus.el (gnus-extra-topic-parameters): Added topic parameter
+       * gnus-cus.el (gnus-extra-topic-parameters): Add topic parameter
        subscribe-level
        * gnus-topic.el (gnus-subscribe-topics): Use it.
 
 
 2001-12-07 09:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * nnrss.el (nnrss-decode-entities-unibyte-string): Use
-       mm-url-decode-entities-nbsp.
+       * nnrss.el (nnrss-decode-entities-unibyte-string):
+       Use mm-url-decode-entities-nbsp.
 
        * nnlistserv.el, nnultimate.el, nnwarchive.el, nnweb.el:
        * webmail.el, nnwfm.el: Use mm-url.
 
 2001-12-06 10:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * nnweb.el (nnweb-replace-in-string): Removed.
+       * nnweb.el (nnweb-replace-in-string): Remove.
 
        * gnus-util.el (gnus-replace-in-string): New function.
        (gnus-mode-string-quote): Use it.
 
 2001-12-01 15:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * gnus-sum.el (gnus-summary-save-article): Nix
-       gnus-display-mime-function and gnus-article-prepare-hook.
+       * gnus-sum.el (gnus-summary-save-article):
+       Nix gnus-display-mime-function and gnus-article-prepare-hook.
 
        * gnus-spec.el (gnus-parse-complex-format): Properly handle %C at
        the beginning of lines.
 2001-11-29  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
        * message.el (message-newgroups-header-regexp)
-       (message-completion-alist, message-tab-body-function): Use
-       defcustom rather than defvar.
+       (message-completion-alist, message-tab-body-function):
+       Use defcustom rather than defvar.
        (message-tab): Mention `message-tab-body-function' in doc.
        Suggested by Karl Eichwalder.
 
 
        * message.el (message-mode): make-local-hook is harmless in Emacs 21.
 
-       * gnus-msg.el (gnus-configure-posting-styles): Use
-       make-local-hook.  Add LOCAL for add-hook.
+       * gnus-msg.el (gnus-configure-posting-styles):
+       Use make-local-hook.  Add LOCAL for add-hook.
 
 2001-11-27  Per Abrahamsen  <abraham@dina.kvl.dk>
 
 
 2001-11-15  Per Abrahamsen  <abraham@dina.kvl.dk>
 
-       * gnus-art.el (gnus-article-wash-status-strings): Use
-       `copy-sequence', not `copy-seq'.
+       * gnus-art.el (gnus-article-wash-status-strings):
+       Use `copy-sequence', not `copy-seq'.
 
 2001-11-15  Per Abrahamsen  <abraham@dina.kvl.dk>
 
 2001-11-12  Simon Josefsson  <jas@extundo.com>
 
        * mml1991.el (mml1991-use, mml1991-function-alist): New variables.
-       (mml1991-gpg-sign, mml1991-gpg-encrypt): Renamed, from
+       (mml1991-gpg-sign, mml1991-gpg-encrypt): Rename, from
        `mml1991-sign' and `mml1991-encrypt'.
        (mml1991-encrypt, mml1991-sign): New glue functions.
        (mml1991-mailcrypt-sign, mml1991-mailcrypt-encrypt): New functions.
 
        * message.el (top-level): Autoload sha1.
        (message-canlock-generate): Use sha1 instead of md5 (sha1 used by
-       canlock, no need to require two different hash algs).  Suggested
-       by Ferenc Wagner <wferi@bolyai1.elte.hu>.
+       canlock, no need to require two different hash algs).
+       Suggested by Ferenc Wagner <wferi@bolyai1.elte.hu>.
 
 2001-11-09  Pavel Janík  <Pavel@Janik.cz>
 
 
        * sieve-mode.el (sieve-control-commands-face)
        (sieve-control-commands-face, sieve-action-commands-face)
-       (sieve-test-commands-face, sieve-tagged-arguments-face): New
-       faces.
+       (sieve-test-commands-face, sieve-tagged-arguments-face):
+       New faces.
        (sieve-font-lock-keywords): Use them.
        (sieve-mode): Only set font-lock-defaults in emacs.
 
-       * gnus-art.el (gnus-default-article-saver): Add
-       gnus-summary-save-body-in-file.
+       * gnus-art.el (gnus-default-article-saver):
+       Add gnus-summary-save-body-in-file.
        (gnus-summary-write-to-file): Fix doc.
 
 2001-11-07  Simon Josefsson  <jas@extundo.com>
        (nnimap-expunge): Don't use it.
 
        * imap.el (imap-callbacks): New variable.
-       (imap-remassoc): Copied from `gnus-remassoc'.
+       (imap-remassoc): Copy from `gnus-remassoc'.
        (imap-add-callback): New function.
        (imap-mailbox-expunge, imap-mailbox-close): Support asynchronous
        behavior.
 
        * smiley-ems.el (smiley-update-cache): Auto detect file type.
 
-       * message.el (message-forward-rmail-make-body): Use
-       save-window-excursion.
+       * message.el (message-forward-rmail-make-body):
+       Use save-window-excursion.
        (message-encode-message-body): Search with noerror.
        (message-setup-1): Convert compose-mail send-actions to
        message-send-actions.
        (mm-charset-synonym-alist): Remove windows-125[02].  Make other
        entries conditional on not having a coding system defined for
        them.
-       (mm-mule-charset-to-mime-charset): Use
-       find-coding-systems-for-charsets if defined.
+       (mm-mule-charset-to-mime-charset):
+       Use find-coding-systems-for-charsets if defined.
        (mm-charset-to-coding-system): Don't use
        mm-get-coding-system-list.  Look in mm-charset-synonym-alist
        later.  Add last resort search of coding systems.
 
 2001-10-30 13:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * gnus-spec.el (gnus-parse-simple-format): Use
-       buffer-substring-no-properties.
+       * gnus-spec.el (gnus-parse-simple-format):
+       Use buffer-substring-no-properties.
 
 2001-10-30  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 
 2001-10-22  Simon Josefsson  <jas@extundo.com>
 
-       * gnus-msg.el (gnus-extended-version): Include
-       system-configuration.
+       * gnus-msg.el (gnus-extended-version):
+       Include system-configuration.
        Suggested by Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann).
 
 2001-10-22  Per Abrahamsen  <abraham@dina.kvl.dk>
 2001-10-21  Simon Josefsson  <jas@extundo.com>
 
        * nnimap.el (nnimap): Defgroup.
-       (nnimap-strict-function, nnimap-strict-function-match): New
-       widget, from Per Abrahamsen  <abraham@dina.kvl.dk>.
+       (nnimap-strict-function, nnimap-strict-function-match):
+       New widget, from Per Abrahamsen  <abraham@dina.kvl.dk>.
        (nnimap-split-crosspost, nnimap-split-inbox)
        (nnimap-split-rule, nnimap-split-predicate)
        (nnimap-split-predicate): Defcustom.
 
        * message.el (message-do-auto-fill): New version that does not
        rely on text properties, by Simon Josefsson <jas@extundo.com>.
-       (message-setup-1): Removed the `message-field' property.
+       (message-setup-1): Remove the `message-field' property.
 
-       * gnus-draft.el (gnus-draft-edit-message): Removed the
+       * gnus-draft.el (gnus-draft-edit-message): Remove the
        `message-field' property.
 
 2001-10-19  Per Abrahamsen  <abraham@dina.kvl.dk>
        * message.el (message-check-news-header-syntax): Special case
        nnvirtual groups.
 
-       * gnus-sum.el (gnus-summary-respool-default-method): Changed
-       customize type to `symbol'.
+       * gnus-sum.el (gnus-summary-respool-default-method):
+       Change customize type to `symbol'.
 
 2001-10-17 12:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
 
 2001-10-17  Per Abrahamsen  <abraham@dina.kvl.dk>
 
-       * gnus-msg.el (gnus-post-method): Changed two instances of
+       * gnus-msg.el (gnus-post-method): Change two instances of
        `active' to `current' and one `null' to `not'.
 
 2001-10-16  Katsumi Yamaoka  <yamaoka@jpl.org>
 
-       * message.el (message-setup-fill-variables): Use
-       `normal-auto-fill-function' instead of `auto-fill-function'.
+       * message.el (message-setup-fill-variables):
+       Use `normal-auto-fill-function' instead of `auto-fill-function'.
 
 2001-10-16  Simon Josefsson  <jas@extundo.com>
 
 2001-10-12  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
        Suggested by Oliver Scholz <epameinondas@gmx.de>.
 
-       * message.el (message-do-auto-fill): New function.  Like
-       `do-auto-fill' but don't fill when in the message header.
+       * message.el (message-do-auto-fill): New function.
+       Like `do-auto-fill' but don't fill when in the message header.
        (message-setup-1): Put a text property on the message header.
        (message-setup-fill-variables): Use `message-do-auto-fill'.
 
 
 2001-10-10  Katsumi Yamaoka  <yamaoka@jpl.org>
 
-       * gnus-group.el (gnus-group-name-charset-group-alist): Use
-       `find-coding-system' for XEmacs to check whether the coding-system
+       * gnus-group.el (gnus-group-name-charset-group-alist):
+       Use `find-coding-system' for XEmacs to check whether the coding-system
        `utf-8' is available.
 
 2001-10-09  Per Abrahamsen  <abraham@dina.kvl.dk>
 
 2001-10-09  Per Abrahamsen  <abraham@dina.kvl.dk>
 
-       * message.el (message-send-news): Allow
-       `gnus-group-name-charset-group-alist' to affect encoding of the
+       * message.el (message-send-news):
+       Allow `gnus-group-name-charset-group-alist' to affect encoding of the
        "Newsgroups" and "Followup-To" headers.
 
 2001-10-07  Per Abrahamsen  <abraham@dina.kvl.dk>
        default charset for newsgroup names in accordance with USEFOR.
 
        * gnus-group.el (gnus-group-name-charset-method-alist,
-       gnus-group-name-charset-group-alist): Removed "*" from doc
+       gnus-group-name-charset-group-alist): Remove "*" from doc
        strings, "*" should not be used for complex variables.
 
 2001-10-06  Simon Josefsson  <jas@extundo.com>
        `gnus-article-decode-hook's except `article-decode-charset'
        instead of hardcoding call to one of them.
 
-       * gnus-art.el (gnus-article-decode-hook): Add
-       `article-decode-group-name'.
+       * gnus-art.el (gnus-article-decode-hook):
+       Add `article-decode-group-name'.
        (article-decode-group-name): New function, use `g-d-n'.
 
-       * gnus-group.el (gnus-group-insert-group-line): Decode
-       gnus-tmp-group using `g-d-n'.
+       * gnus-group.el (gnus-group-insert-group-line):
+       Decode gnus-tmp-group using `g-d-n'.
 
        * gnus-util.el (gnus-decode-newsgroups): New function.
 
 2001-10-06  Per Abrahamsen  <abraham@dina.kvl.dk>
 
-       * gnus-srvr.el (gnus-browse-foreign-server): Fixed bug non-nil
+       * gnus-srvr.el (gnus-browse-foreign-server): Fix bug non-nil
        `gnus-group-name-charset-group-alist'.
 
 2001-10-05  Simon Josefsson  <jas@extundo.com>
 
 2001-09-19  Sam Steingold  <sds@gnu.org>
 
-       * gnus-win.el (gnus-buffer-configuration): Respect
-       `gnus-bug-create-help-buffer'.
+       * gnus-win.el (gnus-buffer-configuration):
+       Respect `gnus-bug-create-help-buffer'.
 
 2001-09-18  Simon Josefsson  <jas@extundo.com>
 
 
 2001-09-14  Simon Josefsson  <jas@extundo.com>
 
-       * gnus-start.el (gnus-group-mode-hook): Moved from gnus-group
+       * gnus-start.el (gnus-group-mode-hook): Move from gnus-group
        (otherwise e.g. gnus-agentize in .gnus overrides the customized
        default before gnus-group is loaded and the variable set.)
 
        * nndiary.el (nndiary-request-accept-article-hooks): New.
        * nndiary.el (nndiary-request-accept-article): Use it, check
        message validity.
-       * nndiary.el (nndiary-get-new-mail): Changed default to nil.
+       * nndiary.el (nndiary-get-new-mail): Change default to nil.
        * nndiary.el (nndiary-schedule): Fix bug (misplaced
        condition-case): it didn't return nil on error.
        * gnus-diary.el: New version.
-       * gnus-diary.el (gnus-diary-summary-line-format): Removed %I.
+       * gnus-diary.el (gnus-diary-summary-line-format): Remove %I.
        * gnus-diary.el (gnus-diary-header-value-history): New.
        * gnus-diary.el (gnus-diary-narrow-to-headers): New.
        * gnus-diary.el (gnus-diary-add-header): New.
 
 2001-09-10  TSUCHIYA Masatoshi  <tsuchiya@namazu.org>
 
-       * gnus-sum.el (gnus-select-newsgroup): Make
-       `gnus-current-select-method' buffer-local.
+       * gnus-sum.el (gnus-select-newsgroup):
+       Make `gnus-current-select-method' buffer-local.
 
-       * gnus-art.el (gnus-request-article-this-buffer): Refer
-       `gnus-current-select-method' in the current summary buffer.
+       * gnus-art.el (gnus-request-article-this-buffer):
+       Refer `gnus-current-select-method' in the current summary buffer.
 
 2001-09-10  Daniel Pittman  <daniel@rimspace.net>
 
 
 2001-09-09  Simon Josefsson  <jas@extundo.com>
 
-       * mm-decode.el (mm-inline-media-tests): Add
-       application/x-emacs-lisp.
-       (mm-attachment-override-types): Add
-       application/{x-,}pkcs7-signature.
+       * mm-decode.el (mm-inline-media-tests):
+       Add application/x-emacs-lisp.
+       (mm-attachment-override-types):
+       Add application/{x-,}pkcs7-signature.
 
        * gnus-srvr.el (gnus-server-mode-hook, gnus-server-exit-hook)
        (gnus-server-line-format, gnus-server-mode-line-format)
        (nnml-request-update-info): Don't update if marks didn't change.
 
        * gnus-agent.el (gnus-agent-any-covered-gcc)
-       (gnus-agent-add-server, gnus-agent-remove-server): Use
-       gnus-agent-method-p.
+       (gnus-agent-add-server, gnus-agent-remove-server):
+       Use gnus-agent-method-p.
 
        * gnus-art.el (gnus-buttonized-mime-types): New variable.
        (gnus-unbuttonized-mime-type-p): Use it.
 
        * gnus-spec.el (gnus-compile): Don't compile gnus-version.
 
-       * gnus-group.el (gnus-update-group-mark-positions): Bind
-       gnus-group-update-hook to nil.
+       * gnus-group.el (gnus-update-group-mark-positions):
+       Bind gnus-group-update-hook to nil.
 
 2001-08-24 13:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
 
 2001-08-24  Simon Josefsson  <jas@extundo.com>
 
-       * gnus-group.el (gnus-info-clear-data): Call
-       nnfoo-request-set-mark to propagate marks.  Fix bug:
+       * gnus-group.el (gnus-info-clear-data):
+       Call nnfoo-request-set-mark to propagate marks.  Fix bug:
        `gnus-group-update-line' doesn't update read range unless we call
        `gnus-get-unread-articles-in-group' first.
 
 
 2001-08-20 15:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * nnslashdot.el (nnslashdot-retrieve-headers-1): Replace
-       nnslashdot-*-retrieve-headers.
+       * nnslashdot.el (nnslashdot-retrieve-headers-1):
+       Replace nnslashdot-*-retrieve-headers.
        (nnslashdot-request-article): Fix for slashcode 2.2.
        (nnslashdot-make-tuple): New function.
        (nnslashdot-read-groups): Use it.
 
        * mm-view.el (mm-inline-text): Ignore vcard errors.
 
-       * gnus-art.el (gnus-ignored-headers): Added more junk headers.
+       * gnus-art.el (gnus-ignored-headers): Add more junk headers.
 
        * gnus-score.el (gnus-all-score-files): Use append instead of
        nconc.
 
        * gnus.el (gnus-splash-face): Doc fix.
 
-       * mm-decode.el (mm-mailcap-command): Use
-       mm-path-name-rewrite-functions.
+       * mm-decode.el (mm-mailcap-command):
+       Use mm-path-name-rewrite-functions.
        (mm-path-name-rewrite-functions): New variable.
 
        * gnus-spec.el (gnus-parse-complex-format): React to ?=.
        the positional spec.
        (gnus-parse-complex-format): React to %C.
 
-       * gnus-ems.el (gnus-char-width): Moved here.
+       * gnus-ems.el (gnus-char-width): Move here.
 
-       * gnus-sum.el (gnus-select-newsgroup): Set
-       gnus-newsgroup-articles.
+       * gnus-sum.el (gnus-select-newsgroup):
+       Set gnus-newsgroup-articles.
        (gnus-unseen-mark): New variable.
        (gnus-newsgroup-unseen): Ditto.
        (gnus-newsgroup-seen): Ditto.
 
 2001-08-18  Simon Josefsson  <jas@extundo.com>
 
-       * gnus-util.el (gnus-remassoc, gnus-update-alist-soft): Moved from
+       * gnus-util.el (gnus-remassoc, gnus-update-alist-soft): Move from
        nnimap.
 
-       * nnimap.el (nnimap-remassoc, nnimap-update-alist-soft): Moved to
+       * nnimap.el (nnimap-remassoc, nnimap-update-alist-soft): Move to
        gnus-util.
        (nnimap-request-update-info-internal): Use new functions.
 
-       * nnml.el (nnml-request-set-mark, nnml-request-update-info): Use
-       new functions.
+       * nnml.el (nnml-request-set-mark, nnml-request-update-info):
+       Use new functions.
 
 2001-08-18  Simon Josefsson  <jas@extundo.com>
 
        * gnus-start.el (gnus-setup-news): Push the archive server only
        the server list.
 
-       * mml.el (mml-menu): Changed name to "Attachments".
+       * mml.el (mml-menu): Change name to "Attachments".
 
        * mm-decode.el (mm-destroy-postponed-undisplay-list): Only message
        when there is something to destroy.
        `nnmail-split-history' if recent is > 0.
        (nnimap-request-update-info-internal): Update `recent' marks.
        (nnimap-request-set-mark): Never set `recent' marks.
-       (nnimap-mark-to-predicate-alist, nnimap-mark-to-flag-alist): Add
-       recent.
+       (nnimap-mark-to-predicate-alist, nnimap-mark-to-flag-alist):
+       Add recent.
 
        * gnus-sum.el (gnus-recent-mark): New mark.
        (gnus-newsgroup-recent): New variable.
 
 2001-08-12  Simon Josefsson  <jas@extundo.com>
 
-       * mm-bodies.el (mm-decode-content-transfer-encoding): Returns
-       whether successful decoding took place.  Add doc.
+       * mm-bodies.el (mm-decode-content-transfer-encoding):
+       Returns whether successful decoding took place.  Add doc.
 
 2001-08-12  Simon Josefsson  <jas@extundo.com>
        Suggested by Per Abrahamsen <abraham@dina.kvl.dk>
 
 2001-08-10 02:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * gnus-ml.el (turn-on-gnus-mailing-list-mode): Use
-       gnus-group-find-parameter.  Suggested by Janne Rinta-Manty
+       * gnus-ml.el (turn-on-gnus-mailing-list-mode):
+       Use gnus-group-find-parameter.  Suggested by Janne Rinta-Manty
        <rintaman@cs.Helsinki.FI>.
 
        * mail-source.el (mail-source-movemail): The error buffer is
 
 2001-08-09 15:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * nndraft.el (nndraft-request-group): Use
-       nndraft-auto-save-file-name.
+       * nndraft.el (nndraft-request-group):
+       Use nndraft-auto-save-file-name.
 
 2001-08-09  Simon Josefsson  <jas@extundo.com>
 
 
 2001-08-09  Simon Josefsson  <jas@extundo.com>
 
-       * message.el (message-get-reply-headers): Fix string.  Suggested by
-       Christoph Conrad <cc@cli.de>.
+       * message.el (message-get-reply-headers): Fix string.
+       Suggested by Christoph Conrad <cc@cli.de>.
 
 2001-08-08 15:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
 
 2001-08-04  Nuutti Kotivuori  <nuutti.kotivuori@smarttrust.com>
 
-       * gnus-sum.el (gnus-summary-show-article): Call
-       gnus-summary-update-secondary-secondary-mark.
+       * gnus-sum.el (gnus-summary-show-article):
+       Call gnus-summary-update-secondary-secondary-mark.
        * gnus-sum.el (gnus-summary-edit-article-done): Ditto.
        * gnus-sum.el (gnus-summary-reparent-thread): Ditto.
 
 
 2001-08-06  Florian Weimer  <fw@deneb.enyo.de>
 
-       * message.el (message-indent-citation): Use
-       `message-yank-cited-prefix' for empty lines.
+       * message.el (message-indent-citation):
+       Use `message-yank-cited-prefix' for empty lines.
 
 2001-08-05  Florian Weimer  <fw@deneb.enyo.de>
 
 
 2001-08-05  Nuutti Kotivuori  <nuutti.kotivuori@smarttrust.com>  (tiny change)
 
-       * gnus-cache.el (gnus-cache-possibly-enter-article): Use
-       gnus-cache-fully-p.
+       * gnus-cache.el (gnus-cache-possibly-enter-article):
+       Use gnus-cache-fully-p.
 
 2001-08-04  Simon Josefsson  <jas@extundo.com>
 
 2001-08-04  Simon Josefsson  <jas@extundo.com>
 
        * gnus-cache.el (gnus-cache-possibly-enter-article): Revert.
-       (gnus-cache-passively-or-fully-p): Removed.
+       (gnus-cache-passively-or-fully-p): Remove.
        (gnus-cache-fully-p): Fix it.
 
        * mm-view.el (mm-pkcs7-signed-magic): Support more ASN.1 lengths.
 
 2001-08-04 10:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * gnus-art.el (gnus-mime-security-verify-or-decrypt): Insert
-       before remove.
+       * gnus-art.el (gnus-mime-security-verify-or-decrypt):
+       Insert before remove.
        (gnus-mime-security-show-details): Ditto.
 
 2001-08-04  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
 2001-08-02  Simon Josefsson  <jas@extundo.com>
 
-       * smime.el (smime-extra-arguments): Removed.
+       * smime.el (smime-extra-arguments): Remove.
        (smime-call-openssl-region): Don't use it.
 
 2001-08-02  Simon Josefsson  <jas@extundo.com>
        * smime.el (smime-sign-region): Handle stderr.
        (smime-encrypt-region): Ditto.
 
-       * mm-view.el (mm-pkcs7-signed-magic): Make it a regexp.  Don't
-       match the ASN.1 length bytes.
+       * mm-view.el (mm-pkcs7-signed-magic): Make it a regexp.
+       Don't match the ASN.1 length bytes.
        (mm-pkcs7-enveloped-magic): Ditto.
        (mm-view-pkcs7-get-type): Don't regexp quote.
 
 
        * smime.el (smime-call-openssl-region): Revert previous change,
        just pass on buf to `call-process-region'.
-       (smime-verify-region): Doc fix.  Don't message stuff.  Use
-       `smime-new-details-buffer'.  Inserts error messages into buffer.
+       (smime-verify-region): Doc fix.  Don't message stuff.
+       Use `smime-new-details-buffer'.  Inserts error messages into buffer.
        (smime-noverify-region): Ditto.
        (smime-decrypt-region): Ditto.  Handles stderr separately.
        (smime-verify-buffer, smime-noverify-buffer)
 
 2001-07-30 12:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * gnus-art.el (gnus-mime-save-part-and-strip): Save
-       gnus-article-mime-handles.
+       * gnus-art.el (gnus-mime-save-part-and-strip):
+       Save gnus-article-mime-handles.
 
 2001-07-29  Simon Josefsson  <jas@extundo.com>
 
        * gnus.el (gnus-summary-line-format): Mention `gnus-sum-thread-*'
        for %B spec.
 
-       * gnus-sum.el (gnus-summary-prepare-threads): If
-       gnus-sum-thread-tree-root is nil, use subject instead.
+       * gnus-sum.el (gnus-summary-prepare-threads):
+       If gnus-sum-thread-tree-root is nil, use subject instead.
        (gnus-sum-thread-tree-root, gnus-sum-thread-tree-single-indent)
        (gnus-sum-thread-tree-vertical, gnus-sum-thread-tree-indent)
        (gnus-sum-thread-tree-leaf-with-other)
 
 2001-07-27 12:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * nnfolder.el (nnfolder-request-accept-article): Bind
-       nntp-server-buffer.
+       * nnfolder.el (nnfolder-request-accept-article):
+       Bind nntp-server-buffer.
 
        * nnmail.el (nnmail-parse-active): Read from buffer instead of
        nntp-server-buffer.
 
 2001-07-27 11:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * message.el (message-check-news-header-syntax): Use
-       message-post-method.
+       * message.el (message-check-news-header-syntax):
+       Use message-post-method.
        (message-send-news): Bind message-post-method.
 
 2001-07-27 07:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
 2001-07-26 22:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * nnfolder.el (nnfolder-request-accept-article): Replace
-       nnfolder-request-list.
+       * nnfolder.el (nnfolder-request-accept-article):
+       Replace nnfolder-request-list.
 
 2001-07-27  Simon Josefsson  <jas@extundo.com>
 
 
        * gnus-art.el (gnus-mm-display-part): Narrow to point if eobp.
 
-       * message.el (message-set-auto-save-file-name): More
-       poor-system-types.
+       * message.el (message-set-auto-save-file-name):
+       More poor-system-types.
 
        * mailcap.el (mailcap-parse-mimetypes): poor-system-types.
 
 
 2001-07-25 22:22:22  Raymond Scholz  <rscholz@zonix.de>
 
-       * nnmail.el (nnmail-split-fancy-with-parent-ignore-groups): New
-       variable.
+       * nnmail.el (nnmail-split-fancy-with-parent-ignore-groups):
+       New variable.
        (nnmail-split-fancy-with-parent): Ignore certain groups.
 
 2001-07-25 11:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
 2001-07-23  Katsumi Yamaoka  <yamaoka@jpl.org>
 
-       * gnus-start.el (gnus-setup-news): Call
-       `gnus-check-bogus-newsgroups' just after the native server is
+       * gnus-start.el (gnus-setup-news):
+       Call `gnus-check-bogus-newsgroups' just after the native server is
        opened.
 
 2001-07-23  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
        * mm-util.el (mm-read-coding-system): Take two arguments.
 
-       * gnus-sum.el (gnus-summary-show-article): Use
-       mm-read-coding-system.
+       * gnus-sum.el (gnus-summary-show-article):
+       Use mm-read-coding-system.
 
        * gnus-art.el (article-de-quoted-unreadable):
        (article-de-base64-unreadable, article-wash-html):
        * nntp.el (nntp-request-newgroups): Use UTC date for NEWGROUPS
        command.
 
-       * gnus-start.el (gnus-find-new-newsgroups): Use
-       `message-make-date' instead of `current-time-string'.
+       * gnus-start.el (gnus-find-new-newsgroups):
+       Use `message-make-date' instead of `current-time-string'.
        (gnus-ask-server-for-new-groups): Ditto.
        (gnus-check-first-time-used): Ditto.
 
 
 2001-07-12  Björn Torkelsson  <torkel@hpc2n.umu.se>
 
-       * gnus-srvr.el (gnus-browse-make-menu-bar): Changed one of the
+       * gnus-srvr.el (gnus-browse-make-menu-bar): Change one of the
        Browse->Next entries to Browse->Prev.
 
 2001-07-11 22:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
 2001-06-15 09:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * gnus-art.el (article-strip-multiple-blank-lines): Use
-       delete-region instead of replace-match.
+       * gnus-art.el (article-strip-multiple-blank-lines):
+       Use delete-region instead of replace-match.
 
 2001-06-14 16:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
 
 2001-06-05  Alex Schroeder  <alex@gnu.org>
 
-       * mm-decode.el (mm-handle-set-external-undisplayer): Don't
-       generate compiler warnings.
+       * mm-decode.el (mm-handle-set-external-undisplayer):
+       Don't generate compiler warnings.
 
 2001-06-04  Hrvoje Niksic  <hniksic@arsdigita.com>
 
 
 2001-04-25  Per Abrahamsen  <abraham@dina.kvl.dk>
 
-       * mm-uu.el (mm-uu-configure-list): Fixed customize type.
+       * mm-uu.el (mm-uu-configure-list): Fix customize type.
 
 2001-04-24  Hrvoje Niksic  <hniksic@arsdigita.com>
 
 
 2001-04-02  Nevin Kapur  <nevin@jhu.edu>
 
-       * nnmail.el (nnmail-split-it): Added check for .* at the end of
+       * nnmail.el (nnmail-split-it): Add check for .* at the end of
        regexp in nnmail-split-fancy.
 
 2001-04-10  Simon Josefsson  <simon@josefsson.org>
 
 2001-03-31 00:03:42  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * gnus-msg.el (gnus-inews-insert-draft-meta-information): Allow
-       lists of articles.
+       * gnus-msg.el (gnus-inews-insert-draft-meta-information):
+       Allow lists of articles.
 
        * gnus-uu.el (gnus-uu-digest-mail-forward): Mark as forwarded.
 
        forwarded.
        (gnus-summary-mail-forward): Clean up.
 
-       * gnus.el (gnus-article-mark-lists): Added forward.
+       * gnus.el (gnus-article-mark-lists): Add forward.
 
        * gnus-sum.el (gnus-forwarded-mark): New variable.
        (gnus-summary-prepare-threads): Use it.
 
 2001-03-15 09:47:23  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * nnultimate.el (nnultimate-retrieve-headers): Understand
-       long-form month names.
+       * nnultimate.el (nnultimate-retrieve-headers):
+       Understand long-form month names.
 
 2001-03-18 23:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * gnus-sum.el (gnus-summary-show-all-headers):
-       gnus-article-show-all-headers is broken.  Use
-       gnus-summary-toggle-header instead.
+       gnus-article-show-all-headers is broken.
+       Use gnus-summary-toggle-header instead.
 
        * mml2015.el (mml2015-gpg-extract-from): No error.
 
 
 2001-03-17 10:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * message.el (message-setup-fill-variables): Use
-       fill-paragraph-function.
+       * message.el (message-setup-fill-variables):
+       Use fill-paragraph-function.
        (message-fill-paragraph): Take an argument.
        (message-newline-and-reformat): Take another argument.
 
 
 2001-03-16  Simon Josefsson  <simon@josefsson.org>
 
-       * nnimap.el (nnimap-dont-use-nov-p): Renamed from
+       * nnimap.el (nnimap-dont-use-nov-p): Rename from
        `nnimap-use-nov-p' (it really tested the negative).
        (nnimap-retrieve-headers): Use it.
 
 ;;
 2001-03-01  Dave Love  <fx@gnu.org>
 
-       * mm-util.el (mm-inhibit-file-name-handlers): Add
-       image-file-handler.
+       * mm-util.el (mm-inhibit-file-name-handlers):
+       Add image-file-handler.
 
 2001-02-11  Dave Love  <fx@gnu.org>
 
        * gnus-score.el (gnus-score-find-bnews): Print messages on illegal
        SCORE paths.
 
-       * mm-decode.el (mm-dissect-buffer): Call
-       mail-extract-address-components only if necessary.
+       * mm-decode.el (mm-dissect-buffer):
+       Call mail-extract-address-components only if necessary.
 
 2001-03-06 13:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
 
 2001-03-06 13:00:00  Adrian Aichner  <adrian@xemacs.org>
 
-       * gnus-score.el (gnus-score-score-files-1): Use
-       gnus-kill-files-directory.
+       * gnus-score.el (gnus-score-score-files-1):
+       Use gnus-kill-files-directory.
 
 2001-03-05 08:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
 
        * mml.el (mml-preview): Disable local map.
 
-       * gnus-sum.el (gnus-summary-make-menu-bar): Make
-       gnus-article-post-menu here.
+       * gnus-sum.el (gnus-summary-make-menu-bar):
+       Make gnus-article-post-menu here.
 
        * gnus-art.el (gnus-article-make-menu-bar): Make summary-menu bar
        if it has not been made.
 
        * smiley.el (gnus-smiley-display): Don't do widening.
 
-       * smiley-ems.el (gnus-smiley-display): Don't do widening.  Smiley
-       within body.
+       * smiley-ems.el (gnus-smiley-display): Don't do widening.
+       Smiley within body.
 
        * gnus-msg.el (gnus-inews-do-gcc): Activate group anyway.
 
 
 2001-02-14 15:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * gnus.el (gnus-define-group-parameter): Improved.
+       * gnus.el (gnus-define-group-parameter): Improve.
 
        * gnus-sum.el (charset): Define parameter.
        (ignored-charsets): Ditto.
 
 2001-02-13 21:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * gnus-sum.el (gnus-summary-read-group-1): Remove
-       gnus-summary-set-local-parameters.
+       * gnus-sum.el (gnus-summary-read-group-1):
+       Remove gnus-summary-set-local-parameters.
        (gnus-summary-setup-buffer): Put it here.
 
 2001-02-13 20:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
        (article-remove-leading-whitespace): New function.
        (gnus-article-make-menu-bar): Use it.
 
-       * gnus-sum.el (gnus-summary-wash-empty-map): Add
-       remove-leading-whitespace.
+       * gnus-sum.el (gnus-summary-wash-empty-map):
+       Add remove-leading-whitespace.
        (gnus-summary-wash-map): Bind strip-headers-in-body to `W a',
        because of conflict.
 
 
 2001-02-08  Tommi Vainikainen  <thv@iki.fi>  (tiny change)
 
-       * gnus-sum.el (gnus-simplify-subject-re): Use
-       message-subject-re-regexp.
+       * gnus-sum.el (gnus-simplify-subject-re):
+       Use message-subject-re-regexp.
 
 2001-02-08 18:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * nnmail.el (nnmail-expiry-target-group): Bind
-       nnmail-cache-accepted-message-ids to nil.
+       * nnmail.el (nnmail-expiry-target-group):
+       Bind nnmail-cache-accepted-message-ids to nil.
 
        * gnus-xmas.el (gnus-xmas-article-display-xface): Use binary
        coding system.
 
 2001-02-06 02:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * gnus-xmas.el (gnus-xmas-article-menu-add): Add
-       gnus-article-commands-menu.
+       * gnus-xmas.el (gnus-xmas-article-menu-add):
+       Add gnus-article-commands-menu.
 
        * gnus-sum.el (gnus-summary-make-menu-bar): Don't share menu bar
        in Emacs.
 
-       * gnus-start.el (gnus-read-descriptions-file): Use
-       gnus-group-name-charset and gnus-group-charset-alist.
+       * gnus-start.el (gnus-read-descriptions-file):
+       Use gnus-group-name-charset and gnus-group-charset-alist.
 
 2001-02-04 23:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * gnus-sum.el (gnus-summary-mark-as-processable): Understand
-       active region.
+       * gnus-sum.el (gnus-summary-mark-as-processable):
+       Understand active region.
 
        * gnus-start.el (gnus-group-change-level): Remove from both
        gnus-zombie-list and gnus-killed-list.
 
 2001-02-04 11:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * gnus-start.el (gnus-subscribe-options-newsgroup-method): Add
-       gnus-subscribe-topics.
+       * gnus-start.el (gnus-subscribe-options-newsgroup-method):
+       Add gnus-subscribe-topics.
 
        * gnus-cus.el (gnus-extra-topic-parameters): Fix doc.
 
 2001-02-04 11:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * gnus-art.el (gnus-article-make-menu-bar): Make
-       gnus-article-post-menu.
+       * gnus-art.el (gnus-article-make-menu-bar):
+       Make gnus-article-post-menu.
 
        * gnus-xmas.el (gnus-xmas-article-menu-add): Add post menu.
 
 2001-01-31  Dave Love  <fx@gnu.org>
 
        * gnus-art.el (gnus-article-x-face-command)
-       (gnus-treat-display-xface, gnus-treat-display-smileys): Add
-       :version.
+       (gnus-treat-display-xface, gnus-treat-display-smileys):
+       Add :version.
 
 2001-01-26  Dave Love  <fx@gnu.org>
 
 
 2001-01-31  Karl Kleinpaste  <karl@charcoal.com>
 
-       * nnmail.el (nnmail-remove-list-identifiers): Improved.
+       * nnmail.el (nnmail-remove-list-identifiers): Improve.
 
 2001-01-31 09:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
 
 2001-01-18 18:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * message.el (message-yank-original): Understand
-       universal-argument.
+       * message.el (message-yank-original):
+       Understand universal-argument.
 
 2001-01-18 16:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
 
 2001-01-15 16:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * gnus-art.el (article-display-x-face): Use
-       gnus-original-article-buffer.
+       * gnus-art.el (article-display-x-face):
+       Use gnus-original-article-buffer.
 
 2001-01-15  Jack Twilley  <jmt@tbe.net>
 
        (message-make-forward-subject-function)
        (message-send-mail-function, message-reply-to-function)
        (message-wide-reply-to-function, message-followup-to-function)
-       (message-distribution-function, message-auto-save-directory): Fix
-       :type.
+       (message-distribution-function, message-auto-save-directory):
+       Fix :type.
 
        * mml.el (mml-parse-1): Frob mml-confirmation-set when
        proceeding after warnings.  Amend multipart warning message.
        compiling.
        (gnus-make-directory): Require nnmail.
 
-       * mm-decode.el (mm-inline-media-tests): Add
-       image/x-portable-bitmap.
+       * mm-decode.el (mm-inline-media-tests):
+       Add image/x-portable-bitmap.
        (mm-get-image): Grok pbm.
 
 2001-01-10  Paul Stevenson  <p.stevenson@surrey.ac.uk>
 
 2000-12-30 00:17:38  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * gnus-sum.el (gnus-summary-limit-include-expunged): Really
-       include the expunged articles.
+       * gnus-sum.el (gnus-summary-limit-include-expunged):
+       Really include the expunged articles.
 
        * gnus-group.el (gnus-group-sort-by-server): New function.
 
        * gnus-cite.el (gnus-article-fill-cited-article): Add a space
        after the fill prefix.
 
-       * gnus-sum.el (gnus-summary-make-menu-bar): Removed "Enter
+       * gnus-sum.el (gnus-summary-make-menu-bar): Remove "Enter
        score...".
 
        * gnus-art.el (gnus-ignored-headers): Hide more headers.
 
 2000-12-29 01:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * mm-util.el (mm-enable-multibyte): Use
-       default-enable-multibyte-characters.
+       * mm-util.el (mm-enable-multibyte):
+       Use default-enable-multibyte-characters.
        (mm-enable-multibyte-mule4): Ditto.
        (mm-disable-multibyte): Test XEmacs.
        (mm-disable-multibyte-mule4): Ditto.
-       (mm-with-unibyte-current-buffer): Simplified.
+       (mm-with-unibyte-current-buffer): Simplify.
        (mm-with-unibyte-current-buffer-mule4): Ditto.
 
 2000-12-28 19:44:56  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 2000-12-24  Simon Josefsson  <sj@extundo.com>
 
-       * mm-bodies.el (mm-decode-content-transfer-encoding): Preserve
-       mailing list junk at end of part.
+       * mm-bodies.el (mm-decode-content-transfer-encoding):
+       Preserve mailing list junk at end of part.
 
 2000-12-23  Simon Josefsson  <sj@extundo.com>
 
 
        * mml.el (gnus-ems): Don't require.
 
-       * gnus.el (gnus-decode-rfc1522): Removed.
+       * gnus.el (gnus-decode-rfc1522): Remove.
        (gnus-set-text-properties): Define.
 
 2000-12-21 09:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 2000-12-20 17:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * message.el (message-mail-user-agent): New variable.
-       (message-setup): Renamed to message-setup-1.  Support
-       mail-user-agent.
+       (message-setup): Rename to message-setup-1.
+       Support mail-user-agent.
        (message-mail-user-agent): New function.
        (message-mail): Use it.
        (message-reply): Use it.
 
 2000-12-20 03:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * mm-decode.el (mm-possibly-verify-or-decrypt): Use
-       mail-extract-a-c instead.  Don't depend on Gnus.
+       * mm-decode.el (mm-possibly-verify-or-decrypt):
+       Use mail-extract-a-c instead.  Don't depend on Gnus.
 
        * mml.el (gnus-ems): Require it.
 
 
 2000-11-30  Dave Love  <fx@gnu.org>
 
-       * message.el (message-auto-save-directory): Use
-       file-name-as-directory.
-       (message-set-auto-save-file-name): Create
-       message-auto-save-directory if necessary.
-       (message-replace-chars-in-string): Removed -- unused.
+       * message.el (message-auto-save-directory):
+       Use file-name-as-directory.
+       (message-set-auto-save-file-name):
+       Create message-auto-save-directory if necessary.
+       (message-replace-chars-in-string): Remove -- unused.
        (message-mail-alias-type): Customize.
        (message-headers): Remove duplicate defgroup.
 
        * uu-post.pbm, uu-decode.pbm: New files from XPMs.
 
        * mm-uu.el (uudecode): Require.
-       (uudecode-decode-region, uudecode-decode-region-external): Don't
-       autoload.
+       (uudecode-decode-region, uudecode-decode-region-external):
+       Don't autoload.
        (mm-uu-copy-to-buffer): Doc fix.
        (mm-uu-decode-function, mm-uu-binhex-decode-function): Doc, custom
        type fix.
        (mailcap): New group.
        (mailcap-download-directory): Customize.
        (mailcap-generate-unique-filename, mailcap-binary-suffixes)
-       (mailcap-temporary-directory): Deleted (unused).
+       (mailcap-temporary-directory): Delete (unused).
        (mailcap-unescape-mime-test): Simplify slightly.
        (mailcap-viewer-passes-test): Use functionp.
        (mailcap-command-p): Aliased to executable-find.
 
        * gnus-agent.el (gnus-agent-confirmation-function): Add :version.
        (gnus-agent-lib-file, gnus-agent-load-alist)
-       (gnus-agent-save-alist, gnus-agent-article-name): Use
-       expand-file-name.
+       (gnus-agent-save-alist, gnus-agent-article-name):
+       Use expand-file-name.
 
-       * gnus-group.el (gnus-group-name-charset-method-alist): Add
-       :version.
+       * gnus-group.el (gnus-group-name-charset-method-alist):
+       Add :version.
        (nnkiboze-score-file): Defvar when compiling.
 
        * gnus-start.el (gnus-read-newsrc-file): Add :version.
 
        * gnus-cache.el (gnus-cache-active-file): Don't use
        file-name-as-directory on directory.
-       (gnus-cache-file-name): Use expand-file-name, not concat.  Don't
-       use file-name-as-directory on directory.
+       (gnus-cache-file-name): Use expand-file-name, not concat.
+       Don't use file-name-as-directory on directory.
 
        * time-date.el (timezone-make-date-arpa-standard): Autoload.
        (date-to-time): Use it.
        * gnus-int.el (gnus-start-news-server): Use expand-file-name, not
        concat.
 
-       * pop3.el (pop3-version): Deleted.
+       * pop3.el (pop3-version): Delete.
        (pop3-make-date): New function, avoiding message-make-date.
        (pop3-munge-message-separator): Use it.
 
        * message.el (tool-bar-map): Defvar when compiling.
 
        * gnus-setup.el (running-xemacs, gnus-use-installed-tm)
-       (gnus-tm-lisp-directory): Deleted.
-       (gnus-use-installed-mailcrypt, gnus-emacs-lisp-directory): Use
-       (featurep 'xemacs).
+       (gnus-tm-lisp-directory): Delete.
+       (gnus-use-installed-mailcrypt, gnus-emacs-lisp-directory):
+       Use (featurep 'xemacs).
        (gnus-gnus-lisp-directory, gnus-mailcrypt-lisp-directory)
-       (gnus-mailcrypt-lisp-directory, gnus-bbdb-lisp-directory): Remove
-       version numbers from file names.
+       (gnus-mailcrypt-lisp-directory, gnus-bbdb-lisp-directory):
+       Remove version numbers from file names.
 
 2000-11-08  Dave Love  <fx@gnu.org>
 
 
        * rfc2047.el (base64): Require unconditionally.
        (message-posting-charset): Defvar when compiling.
-       (rfc2047-encode-message-header, rfc2047-encodable-p): Require
-       message.
+       (rfc2047-encode-message-header, rfc2047-encodable-p):
+       Require message.
 
        * gnus-sum.el (nnoo): Require.
        (mm-uu-dissect): Autoload.
 
 2000-10-09  Dave Love  <fx@gnu.org>
 
-       * mail-source.el (mail-source-fetch-imap): Bind
-       default-enable-multibyte-characters rather than using
+       * mail-source.el (mail-source-fetch-imap):
+       Bind default-enable-multibyte-characters rather than using
        mm-disable-multibyte.
 
 2000-10-05  Dave Love  <fx@gnu.org>
 
 2000-10-04  Dave Love  <fx@gnu.org>
 
-       * smiley-ems.el (smiley-regexp-alist, smiley-update-cache): Use
-       pbm images.
+       * smiley-ems.el (smiley-regexp-alist, smiley-update-cache):
+       Use pbm images.
 
        * frown.pbm, smile.pbm, wry.pbm: New files.
 
 2000-12-15 10:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * pop3.el (pop3-movemail): Use binary.
-       (pop3-movemail-file-coding-system): Removed.
+       (pop3-movemail-file-coding-system): Remove.
 
 2000-12-14 13:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
 
 2000-12-04 18:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * mail-source.el (mail-source-report-new-mail): Use
-       nnheader-run-at-time.
+       * mail-source.el (mail-source-report-new-mail):
+       Use nnheader-run-at-time.
 
 2000-02-15  Andrew Innes  <andrewi@gnu.org>
 
 
 2000-12-01  Simon Josefsson  <sj@extundo.com>
 
-       * mml-smime.el (mml-smime-verify): Don't modify MM buffer.  Handle
-       more than one certificate inside PKCS#7 blob.  Better security
+       * mml-smime.el (mml-smime-verify): Don't modify MM buffer.
+       Handle more than one certificate inside PKCS#7 blob.  Better security
        information (clamed / actual sender, openssl output, certificates
        inside message).
 
 
 2000-11-30 23:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * gnus-art.el (gnus-mime-security-button-line-format-alist): Add
-       ?d and ?D.
+       * gnus-art.el (gnus-mime-security-button-line-format-alist):
+       Add ?d and ?D.
        (gnus-mime-security-show-details-inline): New variable.
        (gnus-mime-security-show-details): Use them.
        (gnus-insert-mime-security-button): Ditto.
 
 2000-11-22  Jan Nieuwenhuizen  <janneke@gnu.org>
 
-       * nnmh.el (nnmh-request-expire-articles): Implemented
-       expiry-target for nnmh backend.
+       * nnmh.el (nnmh-request-expire-articles):
+       Implemented expiry-target for nnmh backend.
 
 2000-11-30  Simon Josefsson  <sj@extundo.com>
 
 
 2000-11-22 11:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * gnus-xmas.el (gnus-xmas-article-display-xface): Use
-       insert-buffer-substring.
+       * gnus-xmas.el (gnus-xmas-article-display-xface):
+       Use insert-buffer-substring.
 
        * message.el (message-send-mail): Use buffer-substring-no-properties.
        (message-send-news): Ditto.
 
        * mml-sec.el (mml-sign-alist): Update names.
        (mml-encrypt-alist): Ditto.
-       (mml-secure-part-smime-sign): Moved to mml-smime.el
+       (mml-secure-part-smime-sign): Move to mml-smime.el
        as `mml-smime-sign-query'.
-       (mml-secure-part-smime-encrypt-by-file): Moved to mml-smime.el as
+       (mml-secure-part-smime-encrypt-by-file): Move to mml-smime.el as
        `mml-smime-get-file-cert'.
-       (mml-secure-part-smime-encrypt-by-dns): Moved to mml-smime.el as
+       (mml-secure-part-smime-encrypt-by-dns): Move to mml-smime.el as
        `mml-smime-get-dns-cert'.
-       (mml-secure-part-smime-encrypt): Moved to mml-smime.el as
+       (mml-secure-part-smime-encrypt): Move to mml-smime.el as
        `mml-smime-encrypt-query'.
        (mml-smime-sign-buffer): Use mml-smime-sign.
        (mml-smime-encrypt-buffer): Use mml-smime-encrypt.
        (mml-smime-sign-query):
        (mml-smime-get-file-cert):
        (mml-smime-get-dns-cert):
-       (mml-smime-encrypt-query): Moved from mml-sec.el.
+       (mml-smime-encrypt-query): Move from mml-sec.el.
 
 2000-11-16  Simon Josefsson  <sj@extundo.com>
 
 
 2000-11-17 14:21  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * message.el (message-setup-fill-variables): Use
-       message-cite-prefix-regexp.
+       * message.el (message-setup-fill-variables):
+       Use message-cite-prefix-regexp.
        (message-newline-and-reformat): Check the end of citation, leading
        WSP, break in the cite prefix.
        (message-fill-paragraph): New function.
 
 2000-11-12  David Edmondson  <dme@dme.org>
 
-       * message.el (message-font-lock-keywords): Use
-       message-cite-prefix-regexp.
+       * message.el (message-font-lock-keywords):
+       Use message-cite-prefix-regexp.
 
 2000-11-15  Kai Großjohann  <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 
 
 2000-11-12  David Edmondson  <dme@dme.org>
 
-       * message.el (message-cite-prefix-regexp): Moved from gnus-cite.el
+       * message.el (message-cite-prefix-regexp): Move from gnus-cite.el
        and replace `.' with `\w' to allow for different syntax tables
        (from Vladimir Volovich).
-       * message.el (message-newline-and-reformat): Use
-       `message-cite-prefix-regexp'.
-       * gnus-cite.el (gnus-supercite-regexp): Use
-       `message-cite-prefix-regexp'.
-       * gnus-cite.el (gnus-cite-parse): Use
-       `message-cite-prefix-regexp'.
+       * message.el (message-newline-and-reformat):
+       Use `message-cite-prefix-regexp'.
+       * gnus-cite.el (gnus-supercite-regexp):
+       Use `message-cite-prefix-regexp'.
+       * gnus-cite.el (gnus-cite-parse):
+       Use `message-cite-prefix-regexp'.
 
 2000-11-12 08:52:46  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
 
        Verify S/MIME signature support.
 
-       * mm-decode.el (mm-inline-media-tests): Add
-       application/{x-,}pkcs7-signature.
+       * mm-decode.el (mm-inline-media-tests):
+       Add application/{x-,}pkcs7-signature.
        (mm-inlined-types): Ditto.
        (mm-automatic-display): Ditto.
        (mm-verify-function-alist): Ditto.  Add name of method.
 
        * qp.el (quoted-printable-encode-region): Replace leading - when
        ultra safe.
-       * mml.el (mml-generate-mime-postprocess-function): Removed.
-       (mml-postprocess-alist): Removed.
+       * mml.el (mml-generate-mime-postprocess-function): Remove.
+       (mml-postprocess-alist): Remove.
        (mml-generate-mime-1): Use ultra-safe when sign.
        * mml2015.el (mml2015-fix-micalg): Uppercase.
        (mml2015-verify): Insert LF.
 
 2000-10-30 08:17:46  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * gnus.el (gnus-server-browse-hashtb): Removed.
+       * gnus.el (gnus-server-browse-hashtb): Remove.
        * gnus-group.el (gnus-group-prepare-flat-list-dead): Use gnus-active.
        (gnus-group-insert-group-line-info): Use simplified method.
        * gnus-srvr.el (gnus-browse-foreign-server): Use gnus-set-active.
 
 2000-10-30 01:52:40  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * gnus-util.el (gnus-union): Renamed from gnus-agent-union, and
+       * gnus-util.el (gnus-union): Rename from gnus-agent-union, and
        moved here.
        * gnus-agent.el (gnus-agent-fetch-headers): Use it.
        * gnus-group.el (gnus-group-prepare-flat): Use it.
 
        * mml-sec.el (mml-smime-encrypt-buffer): Support certfiles stored
        in buffers.
-       (mml-secure-dns-server): Removed.
-       (mml-secure-part-smime-encrypt-by-dns): Use DIG interface.  Don't
-       write certificates to files.
+       (mml-secure-dns-server): Remove.
+       (mml-secure-part-smime-encrypt-by-dns): Use DIG interface.
+       Don't write certificates to files.
 
        * smime.el (smime-dns-server): New variable.
        (smime-mail-to-domain):
index a50ad75063b352c35081e83d36a448eed15a81d7..2efb16b8611be9c4438c55eafbfb2d4473fde90e 100644 (file)
@@ -654,9 +654,11 @@ Use `auth-source-delete' in ELisp code instead of calling
 'secrets are the only ones supported right now.
 
 :max N means to try to return at most N items (defaults to 1).
-When 0 the function will return just t or nil to indicate if any
-matches were found.  More than N items may be returned, depending
-on the search and the backend.
+More than N items may be returned, depending on the search and
+the backend.
+
+When :max is 0 the function will return just t or nil to indicate
+if any matches were found.
 
 :host (X Y Z) means to match only hosts X, Y, or Z according to
 the match rules above.  Defaults to t.
@@ -757,18 +759,22 @@ must call it to obtain the actual value."
       (when auth-source-do-cache
         (auth-source-remember spec found)))
 
-    found))
+    (if (zerop max)
+        (not (null found))
+      found)))
 
 (defun auth-source-search-backends (backends spec max create delete require)
-  (let (matches)
+  (let ((max (if (zerop max) 1 max)) ; stop with 1 match if we're asked for zero
+        matches)
     (dolist (backend backends)
-      (when (> max (length matches))   ; when we need more matches...
+      (when (> max (length matches)) ; if we need more matches...
         (let* ((bmatches (apply
                           (slot-value backend 'search-function)
                           :backend backend
                           :type (slot-value backend :type)
                           ;; note we're overriding whatever the spec
-                          ;; has for :require, :create, and :delete
+                          ;; has for :max, :require, :create, and :delete
+                          :max max
                           :require require
                           :create create
                           :delete delete
@@ -783,6 +789,7 @@ must call it to obtain the actual value."
             (setq matches (append matches bmatches))))))
     matches))
 
+;; (auth-source-search :max 0)
 ;; (auth-source-search :max 1)
 ;; (funcall (plist-get (nth 0 (auth-source-search :max 1)) :secret))
 ;; (auth-source-search :host "nonesuch" :type 'netrc :K 1)
@@ -1524,10 +1531,10 @@ list, it matches the original pattern."
            (heads (if (stringp value)
                       (list (list key value))
                     (mapcar (lambda (v) (list key v)) value))))
-      (cl-loop
+      (loop
          for h in heads
          nconc
-           (cl-loop
+           (loop
               for tl in tails
               collect (append h tl))))))
 
@@ -1653,6 +1660,7 @@ authentication tokens:
 
 ;; (let ((auth-sources '("macos-keychain-internet:/Users/tzz/Library/Keychains/login.keychain"))) (auth-source-search :max 1))
 ;; (let ((auth-sources '("macos-keychain-generic:Login"))) (auth-source-search :max 1 :host "git.gnus.org"))
+;; (let ((auth-sources '("macos-keychain-generic:Login"))) (auth-source-search :max 1))
 
 (defun* auth-source-macos-keychain-search (&rest
                                     spec
index 8ce29323088094e4d978a3aad6036531473c9bce..70ef27a7e900761b5d1dfbd3e36eb3b3da063a8f 100644 (file)
@@ -441,6 +441,39 @@ rather than relying on `lexical-binding'.
   `(,(progn (require 'cl) (if (fboundp 'cl-labels) 'cl-labels 'labels))
     ,bindings ,@body))
 (put 'gmm-labels 'lisp-indent-function 1)
+(put 'gmm-labels 'edebug-form-spec '((&rest (sexp sexp &rest form)) &rest form))
+
+(defun gmm-format-time-string (format-string &optional time tz)
+  "Use FORMAT-STRING to format the time TIME, or now if omitted.
+The optional TZ specifies the time zone in a number of seconds; any
+other non-nil value will be treated as 0.  Note that both the format
+specifiers `%Z' and `%z' will be replaced with a numeric form. "
+;; FIXME: is there a smart way to replace %Z with a time zone name?
+  (if (and (numberp tz) (not (zerop tz)))
+      (let ((st 0)
+           (case-fold-search t)
+           ls nd rest)
+       (setq time (if time
+                      (copy-sequence time)
+                    (current-time)))
+       (if (>= (setq ls (- (cadr time) (car (current-time-zone)) (- tz))) 0)
+           (setcar (cdr time) ls)
+         (setcar (cdr time) (+ ls 65536))
+         (setcar time (1- (car time))))
+       (setq tz (format "%s%02d%02d"
+                        (if (>= tz 0) "+" "-")
+                        (/ (abs tz) 3600)
+                        (/ (% (abs tz) 3600) 60)))
+       (while (string-match "%+z" format-string st)
+         (if (zerop (% (- (setq nd (match-end 0)) (match-beginning 0)) 2))
+             (progn
+               (push (substring format-string st (- nd 2)) rest)
+               (push tz rest))
+           (push (substring format-string st nd) rest))
+         (setq st nd))
+       (push (substring format-string st) rest)
+       (format-time-string (apply 'concat (nreverse rest)) time))
+    (format-time-string format-string time tz)))
 
 (provide 'gmm-utils)
 
index 29d70aa1a86b405cbfed1576a703a261f1f22491..3b343adb2fdd68c967adb749afea5a40ab0e30c1 100644 (file)
@@ -24,9 +24,6 @@
 
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
 (eval-when-compile
   (require 'cl))
 (defvar tool-bar-map)
@@ -256,7 +253,13 @@ This can also be a list of the above values."
                 (regexp :value ".*"))
   :group 'gnus-article-signature)
 
-(defcustom gnus-hidden-properties '(invisible t intangible t)
+(defcustom gnus-hidden-properties
+  (if (featurep 'xemacs)
+      ;; `intangible' is evil, but I keep it here in case it's useful.
+      '(invisible t intangible t)
+    ;; Emacs's command loop moves point out of invisible text anyway, so
+    ;; `intangible' is clearly not needed there.
+    '(invisible t))
   "Property list to use for hiding text."
   :type 'sexp
   :group 'gnus-article-hiding)
@@ -4728,7 +4731,10 @@ If ALL-HEADERS is non-nil, no headers are hidden."
          gnus-article-image-alist nil)
     (gnus-run-hooks 'gnus-tmp-internal-hook)
     (when gnus-display-mime-function
-      (funcall gnus-display-mime-function))))
+      (funcall gnus-display-mime-function))
+    ;; Add attachment buttons to the header.
+    (when gnus-mime-display-attachment-buttons-in-header
+      (gnus-mime-buttonize-attachments-in-header))))
 
 ;;;
 ;;; Gnus Sticky Article Mode
@@ -4987,7 +4993,6 @@ and `gnus-mime-delete-part', and not provided at run-time normally."
     (gnus-article-edit-article
      `(lambda ()
        (buffer-disable-undo)
-       (erase-buffer)
        (let ((mail-parse-charset (or gnus-article-charset
                                      ',gnus-newsgroup-charset))
              (mail-parse-ignored-charsets
@@ -4995,7 +5000,14 @@ and `gnus-mime-delete-part', and not provided at run-time normally."
                   ',gnus-newsgroup-ignored-charsets))
              (mbl mml-buffer-list))
          (setq mml-buffer-list nil)
-         (insert-buffer-substring gnus-original-article-buffer)
+         ;; A new text must be inserted before deleting existing ones
+         ;; at the end so as not to move existing markers of which
+         ;; the insertion type is t.
+         (delete-region
+          (point-min)
+          (prog1
+              (goto-char (point-max))
+            (insert-buffer-substring gnus-original-article-buffer)))
          (mime-to-mml ',handles)
          (setq gnus-article-mime-handles nil)
          (let ((mbl1 mml-buffer-list))
@@ -5300,12 +5312,26 @@ are decompressed."
 Compressed files like .gz and .bz2 are decompressed."
   (interactive (list nil current-prefix-arg))
   (gnus-article-check-buffer)
-  (unless handle
-    (setq handle (get-text-property (point) 'gnus-data)))
-  (when handle
-    (let ((b (point))
-         (inhibit-read-only t)
-         contents charset coding-system)
+  (let* ((inhibit-read-only t)
+        (b (point))
+        (btn ;; position where the MIME button exists
+         (if handle
+             (if (eq handle (get-text-property b 'gnus-data))
+                 b
+               (article-goto-body)
+               (or (text-property-any (point) (point-max) 'gnus-data handle)
+                   (text-property-any (point-min) (point) 'gnus-data handle)))
+           (setq handle (get-text-property b 'gnus-data))
+           b))
+        start contents charset coding-system)
+    (when handle
+      (when (= b (prog1
+                    btn
+                  (setq start (next-single-property-change btn 'gnus-data
+                                                           nil (point-max))
+                        btn (previous-single-property-change start
+                                                             'gnus-data))))
+       (setq b btn))
       (if (and (not arg) (mm-handle-undisplayer handle))
          (mm-remove-part handle)
        (mm-with-unibyte-buffer
@@ -5331,9 +5357,48 @@ Compressed files like .gz and .bz2 are decompressed."
                    (mm-read-coding-system "Charset: "))))
         ((mm-handle-undisplayer handle)
          (mm-remove-part handle)))
-       (forward-line 2)
-        (mm-display-inline handle)
-       (goto-char b)))))
+       (goto-char start)
+       (unless (bolp)
+         ;; This is a header button.
+         (forward-line 1))
+       (mm-display-inline handle))
+      ;; Toggle the button appearance between `[button]...' and `[button]'.
+      (goto-char btn)
+      (let ((displayed-p (mm-handle-displayed-p handle)))
+       (gnus-insert-mime-button handle (get-text-property btn 'gnus-part)
+                                (list displayed-p))
+       (if (featurep 'emacs)
+           (delete-region
+            (point)
+            (next-single-property-change (point) 'gnus-data nil (point-max)))
+         (let* ((end (next-single-property-change (point) 'gnus-data))
+                (annots (annotations-at (or end (point-max)))))
+           (delete-region (point)
+                          (if end
+                              (if annots (1+ end) end)
+                            (point-max)))
+           (dolist (annot annots)
+             (set-extent-endpoints annot (point) (point)))))
+       (setq start (point))
+       (if (search-backward "\n\n" nil t)
+           (progn
+             (goto-char start)
+             (unless (or displayed-p (eolp))
+               ;; Add extra newline.
+               (insert (propertize (buffer-substring (1- start) start)
+                                   'gnus-undeletable t))))
+         ;; We're in the article header.
+         (delete-char -1)
+         (dolist (ovl (gnus-overlays-in btn (point)))
+           (gnus-overlay-put ovl 'gnus-button-attachment-extra t)
+           (gnus-overlay-put ovl 'face nil))
+         (save-restriction
+           (message-narrow-to-field)
+           (let ((gnus-treatment-function-alist
+                  '((gnus-treat-highlight-headers
+                     gnus-article-highlight-headers))))
+             (gnus-treat-article 'head)))))
+      (goto-char b))))
 
 (defun gnus-mime-set-charset-parameters (handle charset)
   "Set CHARSET to parameters in HANDLE.
@@ -5635,54 +5700,106 @@ all parts."
   "Display HANDLE and fix MIME button."
   (let ((id (get-text-property (point) 'gnus-part))
        (point (point))
-       (inhibit-read-only t))
-    (forward-line 1)
-    (prog1
-       (let ((window (selected-window))
-             (mail-parse-charset gnus-newsgroup-charset)
-             (mail-parse-ignored-charsets
-              (if (gnus-buffer-live-p gnus-summary-buffer)
-                  (with-current-buffer gnus-summary-buffer
-                    gnus-newsgroup-ignored-charsets)
-                nil)))
-         (save-excursion
-           (unwind-protect
-               (let ((win (gnus-get-buffer-window (current-buffer) t))
-                     (beg (point)))
-                 (when win
-                   (select-window win))
-                 (goto-char point)
-                 (forward-line)
-                 (if (mm-handle-displayed-p handle)
-                     ;; This will remove the part.
-                     (mm-display-part handle)
-                   (save-restriction
-                     (narrow-to-region (point)
-                                       (if (eobp) (point) (1+ (point))))
-                     (gnus-bind-safe-url-regexp (mm-display-part handle))
-                     ;; We narrow to the part itself and
-                     ;; then call the treatment functions.
-                     (goto-char (point-min))
-                     (forward-line 1)
-                     (narrow-to-region (point) (point-max))
-                     (gnus-treat-article
-                      nil id
-                      (gnus-article-mime-total-parts)
-                      (mm-handle-media-type handle)))))
-             (if (window-live-p window)
-                 (select-window window)))))
+       (inhibit-read-only t)
+       (window (selected-window))
+       (mail-parse-charset gnus-newsgroup-charset)
+       (mail-parse-ignored-charsets
+        (if (gnus-buffer-live-p gnus-summary-buffer)
+            (with-current-buffer gnus-summary-buffer
+              gnus-newsgroup-ignored-charsets)
+          nil))
+       start retval)
+    (unwind-protect
+       (progn
+         (let ((win (gnus-get-buffer-window (current-buffer) t)))
+           (when win
+             (select-window win)
+             (goto-char point)))
+         (setq start (next-single-property-change point 'gnus-data
+                                                  nil (point-max))
+               point (previous-single-property-change start 'gnus-data))
+         (if (mm-handle-displayed-p handle)
+             ;; This will remove the part.
+             (setq retval (mm-display-part handle))
+           (let ((part (or (and (mm-inlinable-p handle)
+                                (mm-inlined-p handle)
+                                t)
+                           (with-temp-buffer
+                             (gnus-bind-safe-url-regexp
+                              (setq retval (mm-display-part handle)))
+                             (unless (zerop (buffer-size))
+                               (buffer-string))))))
+             (goto-char start)
+             (unless (bolp)
+               ;; This is a header button.
+               (forward-line 1))
+             (cond ((stringp part)
+                    (save-restriction
+                      (narrow-to-region (point)
+                                        (progn
+                                          (insert part)
+                                          (unless (bolp) (insert "\n"))
+                                          (point)))
+                      (gnus-treat-article nil id
+                                          (gnus-article-mime-total-parts)
+                                          (mm-handle-media-type handle))
+                      (mm-handle-set-undisplayer
+                       handle
+                       `(lambda ()
+                          (let ((inhibit-read-only t))
+                            (delete-region ,(copy-marker (point-min) t)
+                                           ,(point-max-marker)))))))
+                   (part
+                    (mm-display-inline handle))))))
       (goto-char point)
-      (gnus-delete-line)
-      (gnus-insert-mime-button
-       handle id (list (mm-handle-displayed-p handle)))
-      (goto-char point))))
+      ;; Toggle the button appearance between `[button]...' and `[button]'.
+      (let ((displayed-p (mm-handle-displayed-p handle)))
+       (gnus-insert-mime-button handle id (list displayed-p))
+       (if (featurep 'emacs)
+           (delete-region
+            (point)
+            (next-single-property-change (point) 'gnus-data nil (point-max)))
+         (let* ((end (next-single-property-change (point) 'gnus-data))
+                (annots (annotations-at (or end (point-max)))))
+           (delete-region (point)
+                          (if end
+                              (if annots (1+ end) end)
+                            (point-max)))
+           (dolist (annot annots)
+             (set-extent-endpoints annot (point) (point)))))
+       (setq start (point))
+       (if (search-backward "\n\n" nil t)
+           (progn
+             (goto-char start)
+             (unless (or displayed-p (eolp))
+               ;; Add extra newline.
+               (insert (propertize (buffer-substring (1- start) start)
+                                   'gnus-undeletable t))))
+         ;; We're in the article header.
+         (delete-char -1)
+         (dolist (ovl (gnus-overlays-in point (point)))
+           (gnus-overlay-put ovl 'gnus-button-attachment-extra t)
+           (gnus-overlay-put ovl 'face nil))
+         (save-restriction
+           (message-narrow-to-field)
+           (let ((gnus-treatment-function-alist
+                  '((gnus-treat-highlight-headers
+                     gnus-article-highlight-headers))))
+             (gnus-treat-article 'head)))))
+      (goto-char point)
+      (if (window-live-p window)
+         (select-window window)))
+    retval))
 
 (defun gnus-article-goto-part (n)
   "Go to MIME part N."
   (when gnus-break-pages
     (widen))
+  (article-goto-body)
   (prog1
-      (let ((start (text-property-any (point-min) (point-max) 'gnus-part n))
+      (let ((start (or (text-property-any (point) (point-max) 'gnus-part n)
+                      ;; There may be header buttons.
+                      (text-property-any (point-min) (point) 'gnus-part n)))
            part handle end next handles)
        (when start
          (goto-char start)
@@ -5736,8 +5853,6 @@ all parts."
                                          (concat "; " gnus-tmp-name))))
     (unless (equal gnus-tmp-description "")
       (setq gnus-tmp-type-long (concat " --- " gnus-tmp-type-long)))
-    (unless (bolp)
-      (insert "\n"))
     (setq b (point))
     (gnus-eval-format
      gnus-mime-button-line-format gnus-mime-button-line-format-alist
@@ -5862,6 +5977,16 @@ If displaying \"text/html\" is discouraged \(see
   :group 'gnus-article-mime
   :type 'boolean)
 
+(defcustom gnus-mime-display-attachment-buttons-in-header t
+  "Add attachment buttons in the end of the header of an article.
+Since MIME attachments tend to be put at the end of an article, we may
+overlook them if there is a huge body.  This option offers you a copy
+of all non-inlinable MIME parts as buttons shown in front of an article.
+If nil, don't show those extra buttons."
+  :version "25.1"
+  :group 'gnus-article-mime
+  :type 'boolean)
+
 (defun gnus-mime-display-part (handle)
   (cond
    ;; Maybe a broken MIME message.
@@ -5884,14 +6009,6 @@ If displaying \"text/html\" is discouraged \(see
    ((and (equal (car handle) "multipart/related")
         (not (or gnus-mime-display-multipart-as-mixed
                  gnus-mime-display-multipart-related-as-mixed)))
-    ;;;!!!We should find the start part, but we just default
-    ;;;!!!to the first part.
-    ;;(gnus-mime-display-part (cadr handle))
-    ;;;!!! Most multipart/related is an HTML message plus images.
-    ;;;!!! Unfortunately we are unable to let W3 display those
-    ;;;!!! included images, so we just display it as a mixed multipart.
-    ;;(gnus-mime-display-mixed (cdr handle))
-    ;;;!!! No, w3 can display everything just fine.
     (gnus-mime-display-part (cadr handle)))
    ((equal (car handle) "multipart/signed")
     (gnus-add-wash-type 'signed)
@@ -5915,7 +6032,6 @@ If displaying \"text/html\" is discouraged \(see
   (let ((type (mm-handle-media-type handle))
        (ignored gnus-ignored-mime-types)
        (not-attachment t)
-       (move nil)
        display text)
     (catch 'ignored
       (progn
@@ -5941,9 +6057,11 @@ If displaying \"text/html\" is discouraged \(see
            (setq display t)
          (when (equal (mm-handle-media-supertype handle) "text")
            (setq text t)))
-       (let ((id (1+ (length gnus-article-mime-handle-alist)))
+       (let ((id (car (rassq handle gnus-article-mime-handle-alist)))
              beg)
-         (push (cons id handle) gnus-article-mime-handle-alist)
+         (unless id
+           (setq id (1+ (length gnus-article-mime-handle-alist)))
+           (push (cons id handle) gnus-article-mime-handle-alist))
          (when (and display
                     (equal (mm-handle-media-supertype handle) "message"))
            (insert-char
@@ -5955,31 +6073,28 @@ If displaying \"text/html\" is discouraged \(see
                    (not (gnus-unbuttonized-mime-type-p type))
                    (eq id gnus-mime-buttonized-part-id))
            (gnus-insert-mime-button
-            handle id (list (or display (and not-attachment text))))
-           (gnus-article-insert-newline)
-           ;; Remember modify the number of forward lines.
-           (setq move t))
+            handle id (list (or display (and not-attachment text)))))
          (setq beg (point))
          (cond
           (display
-           (when move
-             (forward-line -1)
-             (setq beg (point)))
            (let ((mail-parse-charset gnus-newsgroup-charset)
                  (mail-parse-ignored-charsets
                   (save-excursion (condition-case ()
                                       (set-buffer gnus-summary-buffer)
                                     (error))
                                   gnus-newsgroup-ignored-charsets)))
-             (gnus-bind-safe-url-regexp (mm-display-part handle t)))
-           (goto-char (point-max)))
+             (gnus-bind-safe-url-regexp (mm-display-part handle t))))
           ((and text not-attachment)
-           (when move
-             (forward-line -1)
-             (setq beg (point)))
-           (gnus-article-insert-newline)
-           (mm-display-inline handle)
-           (goto-char (point-max))))
+           (mm-display-inline handle)))
+         (goto-char (point-max))
+         (if (string-match "\\`image/" type)
+             (gnus-article-insert-newline)
+           (if (prog1
+                   (= (skip-chars-backward "\n") -1)
+                 (forward-char 1))
+               (gnus-article-insert-newline)
+             (put-text-property (point) (point-max) 'gnus-undeletable t))
+           (goto-char (point-max)))
          ;; Do highlighting.
          (save-excursion
            (save-restriction
@@ -6110,7 +6225,10 @@ If displaying \"text/html\" is discouraged \(see
          (goto-char (point-max))
          (setcdr begend (point-marker)))))
     (when ibegend
-      (goto-char point))))
+      (goto-char point)))
+  ;; Redraw attachment buttons in the header.
+  (when gnus-mime-display-attachment-buttons-in-header
+    (gnus-mime-buttonize-attachments-in-header)))
 
 (defconst gnus-article-wash-status-strings
   (let ((alist '((cite "c" "Possible hidden citation text"
@@ -6216,6 +6334,116 @@ Provided for backwards compatibility."
     (when image
       (gnus-add-image 'shr image))))
 
+(defun gnus-mime-buttonize-attachments-in-header (&optional interactive)
+  "Show attachments as buttons in the end of the header of an article.
+This function toggles the display when called interactively.  Note that
+buttons to be added to the header are only the ones that aren't inlined
+in the body.  Use `gnus-header-face-alist' to highlight buttons."
+  (interactive (list t))
+  (gnus-with-article-buffer
+    (gmm-labels
+       ;; Function that returns a flattened version of
+       ;; `gnus-article-mime-handle-alist'.
+       ((flattened-alist
+         (&optional alist id all)
+         (if alist
+             (let ((i 1) newid flat)
+               (dolist (handle alist flat)
+                 (setq newid (append id (list i))
+                       i (1+ i))
+                 (if (stringp (car handle))
+                     (setq flat (nconc flat (flattened-alist (cdr handle)
+                                                             newid all)))
+                   (delq (rassq handle all) all)
+                   (setq flat (nconc flat (list (cons newid handle)))))))
+           (let ((flat (list nil)))
+             ;; Assume that elements of `gnus-article-mime-handle-alist'
+             ;; are in the decreasing order, but unnumbered subsidiaries
+             ;; in each element are in the increasing order.
+             (dolist (handle (reverse gnus-article-mime-handle-alist))
+               (if (stringp (cadr handle))
+                   (setq flat (nconc flat (flattened-alist (cddr handle)
+                                                           (list (car handle))
+                                                           flat)))
+                 (delq (rassq (cdr handle) flat) flat)
+                 (setq flat (nconc flat (list (cons (list (car handle))
+                                                    (cdr handle)))))))
+             (setq flat (cdr flat))
+             (mapc (lambda (handle)
+                     (if (cdar handle)
+                         ;; This is a hidden (i.e. unnumbered) handle.
+                         (progn
+                           (setcar handle
+                                   (1+ (caar gnus-article-mime-handle-alist)))
+                           (push handle gnus-article-mime-handle-alist))
+                       (setcar handle (caar handle))))
+                   flat)
+             flat))))
+      (let ((case-fold-search t) buttons handle type st)
+       (save-excursion
+         (save-restriction
+           (widen)
+           (article-narrow-to-head)
+           ;; Header buttons exist?
+           (while (and (not buttons)
+                       (re-search-forward "^attachments?:[\n ]+" nil t))
+             (when (get-char-property (match-end 0)
+                                      'gnus-button-attachment-extra)
+               (setq buttons (match-beginning 0))))
+           (widen)
+           (when buttons
+             ;; Delete header buttons.
+             (delete-region buttons (if (re-search-forward "^[^ ]" nil t)
+                                        (match-beginning 0)
+                                      (point-max))))
+           (unless (and interactive buttons)
+             ;; Find buttons.
+             (setq buttons nil)
+             (dolist (button (flattened-alist))
+               (setq handle (cdr button)
+                     type (mm-handle-media-type handle))
+               (when (or (and (if (gnus-buffer-live-p gnus-summary-buffer)
+                                  (with-current-buffer gnus-summary-buffer
+                                    gnus-inhibit-images)
+                                gnus-inhibit-images)
+                              (string-match "\\`image/" type))
+                         (mm-inline-override-p handle)
+                         (and (mm-handle-disposition handle)
+                              (not (equal (car (mm-handle-disposition handle))
+                                          "inline"))
+                              (not (mm-attachment-override-p handle)))
+                         (not (mm-automatic-display-p handle))
+                         (not (or (and (mm-inlinable-p handle)
+                                       (mm-inlined-p handle))
+                                  (mm-automatic-external-display-p type))))
+                 (push button buttons)))
+             (when buttons
+               ;; Add header buttons.
+               (article-goto-body)
+               (forward-line -1)
+               (narrow-to-region (point) (point))
+               (insert "Attachment" (if (cdr buttons) "s" "") ":")
+               (dolist (button (nreverse buttons))
+                 (setq st (point))
+                 (insert " ")
+                 (mm-handle-set-undisplayer
+                  (setq handle (copy-sequence (cdr button))) nil)
+                 (gnus-insert-mime-button handle (car button))
+                 (skip-chars-backward "\t\n ")
+                 (delete-region (point) (point-max))
+                 (when (> (current-column) (window-width))
+                   (goto-char st)
+                   (insert "\n")
+                   (end-of-line)))
+               (insert "\n")
+               (dolist (ovl (gnus-overlays-in (point-min) (point)))
+                 (gnus-overlay-put ovl 'gnus-button-attachment-extra t)
+                 (gnus-overlay-put ovl 'face nil))
+               (let ((gnus-treatment-function-alist
+                      '((gnus-treat-highlight-headers
+                         gnus-article-highlight-headers))))
+                 (gnus-treat-article 'head))))))))))
+
 ;;; Article savers.
 
 (defun gnus-output-to-file (file-name)
@@ -6584,7 +6812,7 @@ not have a face in `gnus-article-boring-faces'."
                        (when (eq obuf (current-buffer))
                          (set-buffer in-buffer)
                          t))
-               (setq selected (gnus-summary-select-article))
+               (setq selected (ignore-errors (gnus-summary-select-article)))
                (set-buffer obuf)
                (unless not-restore-window
                  (set-window-configuration owin))
index d58acbd18cabade4aac69144cd8119a30a702d74..544d6672a8ccc9067926aba4109f00d3b4fad058 100644 (file)
 
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-
 (eval-when-compile (require 'cl))
 
 (require 'gnus)
index db6a0f63e38b9442f2d5f12f75b7443c3edbb2c7..5a6d6f8f2433762d56dd406d010ce3c9876be9fa 100644 (file)
@@ -1204,7 +1204,8 @@ When enabled, it automatically turns on `font-lock-mode'."
   nil ;; init-value
   "" ;; lighter
   nil ;; keymap
-  (when (eq major-mode 'message-mode)
+  (when (eq major-mode 'message-mode)   ;FIXME: Use derived-mode-p.
+    ;; FIXME: Use font-lock-add-keywords!
     (let ((defaults (car (if (featurep 'xemacs)
                             (get 'message-mode 'font-lock-defaults)
                           font-lock-defaults)))
@@ -1233,8 +1234,10 @@ When enabled, it automatically turns on `font-lock-mode'."
                font-lock-keywords nil))
       (setq font-lock-set-defaults nil))
     (font-lock-set-defaults)
-    (cond ((symbol-value 'font-lock-mode)
-          (font-lock-fontify-buffer))
+    (cond (font-lock-mode
+           (if (fboundp 'font-lock-flush)
+               (font-lock-flush)
+             (font-lock-fontify-buffer)))
          (gnus-message-citation-mode
           (font-lock-mode 1)))))
 
diff --git a/lisp/gnus/gnus-cloud.el b/lisp/gnus/gnus-cloud.el
new file mode 100644 (file)
index 0000000..ec85a16
--- /dev/null
@@ -0,0 +1,332 @@
+;;; gnus-cloud.el --- storing and retrieving data via IMAP
+
+;; Copyright (C) 2014 Free Software Foundation, Inc.
+
+;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
+;; Keywords: mail
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;; Code:
+
+(eval-when-compile (require 'cl))
+(require 'parse-time)
+(require 'nnimap)
+
+(defgroup gnus-cloud nil
+  "Syncing Gnus data via IMAP."
+  :group 'gnus)
+
+(defcustom gnus-cloud-synced-files
+  '(;;"~/.authinfo"
+    "~/.authinfo.gpg"
+    "~/.gnus.el"
+    (:directory "~/News" :match ".*.SCORE\\'"))
+  "List of file regexps that should be kept up-to-date via the cloud."
+  :group 'gnus-cloud
+  :type '(repeat regexp))
+
+(defvar gnus-cloud-group-name "*Emacs Cloud*")
+(defvar gnus-cloud-covered-servers nil)
+
+(defvar gnus-cloud-version 1)
+(defvar gnus-cloud-sequence 1)
+
+(defvar gnus-cloud-method nil
+  "The IMAP select method used to store the cloud data.")
+
+(defun gnus-cloud-make-chunk (elems)
+  (with-temp-buffer
+    (insert (format "Version %s\n" gnus-cloud-version))
+    (insert (gnus-cloud-insert-data elems))
+    (buffer-string)))
+
+(defun gnus-cloud-insert-data (elems)
+  (mm-with-unibyte-buffer
+    (dolist (elem elems)
+      (cond
+       ((eq (plist-get elem :type) :file)
+       (let (length data)
+         (mm-with-unibyte-buffer
+           (insert-file-contents-literally (plist-get elem :file-name))
+           (setq length (buffer-size)
+                 data (buffer-string)))
+         (insert (format "(:type :file :file-name %S :timestamp %S :length %d)\n"
+                         (plist-get elem :file-name)
+                         (plist-get elem :timestamp)
+                         length))
+         (insert data)
+         (insert "\n")))
+       ((eq (plist-get elem :type) :data)
+       (insert (format "(:type :data :name %S :length %d)\n"
+                       (plist-get elem :name)
+                       (with-current-buffer (plist-get elem :buffer)
+                         (buffer-size))))
+       (insert-buffer-substring (plist-get elem :buffer))
+       (insert "\n"))
+       ((eq (plist-get elem :type) :delete)
+       (insert (format "(:type :delete :file-name %S)\n"
+                       (plist-get elem :file-name))))))
+    (gnus-cloud-encode-data)
+    (buffer-string)))
+
+(defun gnus-cloud-encode-data ()
+  (call-process-region (point-min) (point-max) "gzip"
+                      t (current-buffer) nil
+                      "-c")
+  (base64-encode-region (point-min) (point-max)))
+
+(defun gnus-cloud-decode-data ()
+  (base64-decode-region (point-min) (point-max))
+  (call-process-region (point-min) (point-max) "gunzip"
+                      t (current-buffer) nil
+                      "-c"))
+
+(defun gnus-cloud-parse-chunk ()
+  (save-excursion
+    (goto-char (point-min))
+    (unless (looking-at "Version \\([0-9]+\\)")
+      (error "Not a valid Cloud chunk in the current buffer"))
+    (forward-line 1)
+    (let ((version (string-to-number (match-string 1)))
+         (data (buffer-substring (point) (point-max))))
+      (mm-with-unibyte-buffer
+       (insert data)
+       (cond
+        ((= version 1)
+         (gnus-cloud-decode-data)
+         (goto-char (point-min))
+         (gnus-cloud-parse-version-1))
+        (t
+         (error "Unsupported Cloud chunk version %s" version)))))))
+
+(defun gnus-cloud-parse-version-1 ()
+  (let ((elems nil))
+    (while (not (eobp))
+      (while (and (not (eobp))
+                 (not (looking-at "(:type")))
+       (forward-line 1))
+      (unless (eobp)
+       (let ((spec (ignore-errors (read (current-buffer))))
+             length)
+         (when (and (consp spec)
+                    (memq (plist-get spec :type) '(:file :data :delete)))
+           (setq length (plist-get spec :length))
+           (push (append spec
+                         (list
+                          :contents (buffer-substring (1+ (point))
+                                                      (+ (point) 1 length))))
+                 elems)
+           (goto-char (+ (point) 1 length))))))
+    (nreverse elems)))
+
+(defun gnus-cloud-update-data (elems)
+  (dolist (elem elems)
+    (let ((type (plist-get elem :type)))
+      (cond
+       ((eq type :data)
+       )
+       ((eq type :delete)
+       (gnus-cloud-delete-file (plist-get elem :file-name))
+       )
+       ((eq type :file)
+       (gnus-cloud-update-file elem))
+       (t
+       (message "Unknown type %s; ignoring" type))))))
+
+(defun gnus-cloud-update-file (elem)
+  (let ((file-name (plist-get elem :file-name))
+       (date (plist-get elem :timestamp))
+       (contents (plist-get elem :contents)))
+    (unless (gnus-cloud-file-covered-p file-name)
+      (message "%s isn't covered by the cloud; ignoring" file-name))
+    (when (or (not (file-exists-p file-name))
+             (and (file-exists-p file-name)
+                  (mm-with-unibyte-buffer
+                    (insert-file-contents-literally file-name)
+                    (not (equal (buffer-string) contents)))))
+      (gnus-cloud-replace-file file-name date contents))))
+
+(defun gnus-cloud-replace-file (file-name date new-contents)
+  (mm-with-unibyte-buffer
+    (insert new-contents)
+    (when (file-exists-p file-name)
+      (rename-file file-name (car (find-backup-file-name file-name))))
+    (write-region (point-min) (point-max) file-name)
+    (set-file-times file-name (parse-iso8601-time-string date))))
+
+(defun gnus-cloud-delete-file (file-name)
+  (unless (gnus-cloud-file-covered-p file-name)
+    (message "%s isn't covered by the cloud; ignoring" file-name))
+  (when (file-exists-p file-name)
+    (rename-file file-name (car (find-backup-file-name file-name)))))
+
+(defun gnus-cloud-file-covered-p (file-name)
+  (let ((matched nil))
+    (dolist (elem gnus-cloud-synced-files)
+      (cond
+       ((stringp elem)
+       (when (equal elem file-name)
+         (setq matched t)))
+       ((consp elem)
+       (when (and (equal (directory-file-name (plist-get elem :directory))
+                         (directory-file-name (file-name-directory file-name)))
+                  (string-match (plist-get elem :match)
+                                (file-name-nondirectory file-name)))
+         (setq matched t)))))
+    matched))
+
+(defun gnus-cloud-all-files ()
+  (let ((files nil))
+    (dolist (elem gnus-cloud-synced-files)
+      (cond
+       ((stringp elem)
+       (push elem files))
+       ((consp elem)
+       (dolist (file (directory-files (plist-get elem :directory)
+                                      nil
+                                      (plist-get elem :match)))
+         (push (format "%s/%s"
+                       (directory-file-name (plist-get elem :directory))
+                       file)
+               files)))))
+    (nreverse files)))
+
+(defvar gnus-cloud-file-timestamps nil)
+
+(defun gnus-cloud-files-to-upload (&optional full)
+  (let ((files nil)
+       timestamp)
+    (dolist (file (gnus-cloud-all-files))
+      (if (file-exists-p file)
+         (when (setq timestamp (gnus-cloud-file-new-p file full))
+           (push `(:type :file :file-name ,file :timestamp ,timestamp) files))
+       (when (assoc file gnus-cloud-file-timestamps)
+         (push `(:type :delete :file-name ,file) files))))
+    (nreverse files)))
+
+(defun gnus-cloud-file-new-p (file full)
+  (let ((timestamp (format-time-string
+                   "%FT%T%z" (nth 5 (file-attributes file))))
+       (old (cadr (assoc file gnus-cloud-file-timestamps))))
+    (when (or full
+             (null old)
+             (string< old timestamp))
+      timestamp)))
+
+(declare-function gnus-activate-group "gnus-start"
+                 (group &optional scan dont-check method dont-sub-check))
+(declare-function gnus-subscribe-group "gnus-start"
+                 (group &optional previous method))
+
+(defun gnus-cloud-ensure-cloud-group ()
+  (let ((method (if (stringp gnus-cloud-method)
+                   (gnus-server-to-method gnus-cloud-method)
+                 gnus-cloud-method)))
+    (unless (or (gnus-active gnus-cloud-group-name)
+               (gnus-activate-group gnus-cloud-group-name nil nil
+                                    gnus-cloud-method))
+      (and (gnus-request-create-group gnus-cloud-group-name gnus-cloud-method)
+          (gnus-activate-group gnus-cloud-group-name nil nil gnus-cloud-method)
+          (gnus-subscribe-group gnus-cloud-group-name)))))
+
+(defun gnus-cloud-upload-data (&optional full)
+  (gnus-cloud-ensure-cloud-group)
+  (with-temp-buffer
+    (let ((elems (gnus-cloud-files-to-upload full)))
+      (insert (format "Subject: (sequence: %d type: %s)\n"
+                     gnus-cloud-sequence
+                     (if full :full :partial)))
+      (insert "From: nobody@invalid.com\n")
+      (insert "\n")
+      (insert (gnus-cloud-make-chunk elems))
+      (when (gnus-request-accept-article gnus-cloud-group-name gnus-cloud-method
+                                        t t)
+       (setq gnus-cloud-sequence (1+ gnus-cloud-sequence))
+       (gnus-cloud-add-timestamps elems)))))
+
+(defun gnus-cloud-add-timestamps (elems)
+  (dolist (elem elems)
+    (let* ((file-name (plist-get elem :file-name))
+          (old (assoc file-name gnus-cloud-file-timestamps)))
+      (when old
+       (setq gnus-cloud-file-timestamps
+             (delq old gnus-cloud-file-timestamps)))
+      (push (list file-name (plist-get elem :timestamp))
+           gnus-cloud-file-timestamps))))
+
+(defun gnus-cloud-available-chunks ()
+  (gnus-activate-group gnus-cloud-group-name nil nil gnus-cloud-method)
+  (let* ((group (gnus-group-full-name gnus-cloud-group-name gnus-cloud-method))
+        (active (gnus-active group))
+        headers head)
+    (when (gnus-retrieve-headers (gnus-uncompress-range active) group)
+      (with-current-buffer nntp-server-buffer
+       (goto-char (point-min))
+       (while (and (not (eobp))
+                   (setq head (nnheader-parse-head)))
+         (push head headers))))
+    (sort (nreverse headers)
+         (lambda (h1 h2)
+           (> (gnus-cloud-chunk-sequence (mail-header-subject h1))
+              (gnus-cloud-chunk-sequence (mail-header-subject h2)))))))
+
+(defun gnus-cloud-chunk-sequence (string)
+  (if (string-match "sequence: \\([0-9]+\\)" string)
+      (string-to-number (match-string 1 string))
+    0))
+
+(defun gnus-cloud-prune-old-chunks (headers)
+  (let ((headers (reverse headers))
+       (found nil))
+  (while (and headers
+             (not found))
+    (when (string-match "type: :full" (mail-header-subject (car headers)))
+      (setq found t))
+    (pop headers))
+  ;; All the chunks that are older than the newest :full chunk can be
+  ;; deleted.
+  (when headers
+    (gnus-request-expire-articles
+     (mapcar (lambda (h)
+              (mail-header-number h))
+            (nreverse headers))
+     (gnus-group-full-name gnus-cloud-group-name gnus-cloud-method)))))
+
+(defun gnus-cloud-download-data ()
+  (let ((articles nil)
+       chunks)
+    (dolist (header (gnus-cloud-available-chunks))
+      (when (> (gnus-cloud-chunk-sequence (mail-header-subject header))
+              gnus-cloud-sequence)
+       (push (mail-header-number header) articles)))
+    (when articles
+      (nnimap-request-articles (nreverse articles) gnus-cloud-group-name)
+      (with-current-buffer nntp-server-buffer
+       (goto-char (point-min))
+       (while (re-search-forward "^Version " nil t)
+         (beginning-of-line)
+         (push (gnus-cloud-parse-chunk) chunks)
+         (forward-line 1))))))
+
+(defun gnus-cloud-server-p (server)
+  (member server gnus-cloud-covered-servers))
+
+(provide 'gnus-cloud)
+
+;;; gnus-cloud.el ends here
index 5432d4da9f162d85a0c4a645ee485287a098e6e8..75b967e2d4884f64915d56fdf517f30827873556 100644 (file)
@@ -153,7 +153,7 @@ DELAY is a string, giving the length of the time.  Possible values are:
       (when (gnus-group-entry group)
        (gnus-activate-group group)
        (add-hook 'message-send-hook
-                 (lambda () (message-remove-header gnus-delay-header)))
+                 (lambda () (message-remove-header gnus-delay-header)) t)
        (setq articles (nndraft-articles))
        (while (setq article (pop articles))
          (gnus-request-head article group)
index 28c6a4d3312348b030bd2cd6ebf443ffe1deacc2..8d08cd66463c97fd54aaa7bb32a49108c8fcc730 100644 (file)
 
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-
 (eval-when-compile
   (require 'cl))
 
   :group 'gnus-fun
   :type 'directory)
 
+(defcustom gnus-x-face-omit-files nil
+  "Regexp to match faces in `gnus-x-face-directory' to be omitted."
+  :version "25.1"
+  :group 'gnus-fun
+  :type 'string)
+
+(defcustom gnus-face-directory (expand-file-name "faces" gnus-directory)
+  "*Directory where Face PNG files are stored."
+  :version "25.1"
+  :group 'gnus-fun
+  :type 'directory)
+
+(defcustom gnus-face-omit-files nil
+  "Regexp to match faces in `gnus-face-directory' to be omitted."
+  :version "25.1"
+  :group 'gnus-fun
+  :type 'string)
+
 (defcustom gnus-convert-pbm-to-x-face-command "pbmtoxbm %s | compface"
   "Command for converting a PBM to an X-Face."
   :version "22.1"
@@ -86,35 +100,57 @@ PNG format."
                  nil shell-command-switch command)))
 
 ;;;###autoload
-(defun gnus-random-x-face ()
-  "Return X-Face header data chosen randomly from `gnus-x-face-directory'."
-  (interactive)
-  (when (file-exists-p gnus-x-face-directory)
-    (let* ((files (directory-files gnus-x-face-directory t "\\.pbm$"))
-          (file (nth (random (length files)) files)))
+(defun gnus--random-face-with-type (dir ext omit fun)
+  "Return file from DIR with extension EXT, omitting matches of OMIT, processed by FUN."
+  (when (file-exists-p dir)
+    (let* ((files
+            (remove nil (mapcar
+                         (lambda (f) (unless (string-match (or omit "^$") f) f))
+                         (directory-files dir t ext))))
+           (file (nth (random (length files)) files)))
       (when file
-       (gnus-shell-command-to-string
-        (format gnus-convert-pbm-to-x-face-command
-                (shell-quote-argument file)))))))
+        (funcall fun file)))))
 
+;;;###autoload
 (autoload 'message-goto-eoh "message" nil t)
+(autoload 'message-insert-header "message" nil t)
+
+(defun gnus--insert-random-face-with-type (fun type)
+  "Get a random face using FUN and insert it as a header TYPE.
+
+For instance, to insert an X-Face use `gnus-random-x-face' as FUN
+  and \"X-Face\" as TYPE."
+  (let ((data (funcall fun)))
+    (save-excursion
+      (if data
+          (progn (message-goto-eoh)
+                 (insert  type ": " data "\n"))
+       (message
+        "No face returned by the function %s." (symbol-name fun))))))
+
+
+
+;;;###autoload
+(defun gnus-random-x-face ()
+  "Return X-Face header data chosen randomly from `gnus-x-face-directory'.
+
+Files matching `gnus-x-face-omit-files' are not considered."
+  (interactive)
+  (gnus--random-face-with-type gnus-x-face-directory "\\.pbm$" gnus-x-face-omit-files
+                         (lambda (file)
+                           (gnus-shell-command-to-string
+                            (format gnus-convert-pbm-to-x-face-command
+                                    (shell-quote-argument file))))))
 
 ;;;###autoload
 (defun gnus-insert-random-x-face-header ()
   "Insert a random X-Face header from `gnus-x-face-directory'."
   (interactive)
-  (let ((data (gnus-random-x-face)))
-    (save-excursion
-      (message-goto-eoh)
-      (if data
-         (insert "X-Face: " data)
-       (message
-        "No face returned by `gnus-random-x-face'.  Does %s/*.pbm exist?"
-        gnus-x-face-directory)))))
+  (gnus--insert-random-face-with-type 'gnus-random-x-face 'X-Face))
 
 ;;;###autoload
 (defun gnus-x-face-from-file (file)
-  "Insert an X-Face header based on an image file.
+  "Insert an X-Face header based on an image FILE.
 
 Depending on `gnus-convert-image-to-x-face-command' it may accept
 different input formats."
@@ -126,7 +162,7 @@ different input formats."
 
 ;;;###autoload
 (defun gnus-face-from-file (file)
-  "Return a Face header based on an image file.
+  "Return a Face header based on an image FILE.
 
 Depending on `gnus-convert-image-to-face-command' it may accept
 different input formats."
@@ -191,6 +227,21 @@ FILE should be a PNG file that's 48x48 and smaller than or equal to
             (buffer-size)))
     (gnus-face-encode)))
 
+;;;###autoload
+(defun gnus-random-face ()
+  "Return randomly chosen Face from `gnus-face-directory'.
+
+Files matching `gnus-face-omit-files' are not considered."
+  (interactive)
+  (gnus--random-face-with-type gnus-face-directory "\\.png$"
+                         gnus-face-omit-files
+                         'gnus-convert-png-to-face))
+
+;;;###autoload
+(defun gnus-insert-random-face-header ()
+  "Insert a random Face header from `gnus-face-directory'."
+  (gnus--insert-random-face-with-type 'gnus-random-face 'Face))
+
 (defface gnus-x-face '((t (:foreground "black" :background "white")))
   "Face to show X-Face.
 The colors from this face are used as the foreground and background
index d8260b404346b35239d7ce3c57dd495d4a5e2fc0..31078be48aa5ca8e4437a0c9023c2a218026dde0 100644 (file)
 
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-
 (eval-when-compile
   (require 'cl))
 (defvar tool-bar-mode)
index 90947fe4d8ca7778274d3cf4d2a25e6d515ab598..540694f34fb46416b99a82c7234339aafa36910f 100644 (file)
 
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-
 (eval-when-compile (require 'cl))
 
 (require 'gnus-art)
index 79f1e2fe2030cad8859a5582e777fdfd4c171875..3362cc8781106490f45c986bdf5f29c66c56f089 100644 (file)
@@ -38,6 +38,7 @@
 (require 'gmm-utils)
 (require 'mm-decode)
 (require 'gnus-sum)
+(require 'gnus-art)
 
 (eval-when-compile (require 'cl))
 
                           (caddr event))))
 
     (gmm-labels ((attendee-role (prop) (plist-get (cadr prop) 'ROLE))
-                 (attendee-name (prop) (plist-get (cadr prop) 'CN))
+                 (attendee-name (prop)
+                                (or (plist-get (cadr prop) 'CN)
+                                    (replace-regexp-in-string "^.*MAILTO:" "" (caddr prop))))
                  (attendees-by-type (type)
                    (gnus-remove-if-not
                     (lambda (p) (string= (attendee-role p) type))
@@ -452,7 +455,6 @@ Return nil for non-recurring EVENT."
                       "Not replied yet"))
              (props `(("ICAL_EVENT" . "t")
                       ("ID" . ,uid)
-                      ("DT" . ,(gnus-icalendar-event:org-timestamp event))
                       ("ORGANIZER" . ,(gnus-icalendar-event:organizer event))
                       ("LOCATION" . ,(gnus-icalendar-event:location event))
                       ("PARTICIPATION_TYPE" . ,(symbol-name (gnus-icalendar-event:participation-type event)))
@@ -470,7 +472,9 @@ Return nil for non-recurring EVENT."
       (when description
         (save-restriction
           (narrow-to-region (point) (point))
-          (insert description)
+          (insert (gnus-icalendar-event:org-timestamp event)
+                  "\n\n"
+                  description)
           (indent-region (point-min) (point-max) 2)
           (fill-region (point-min) (point-max))))
 
@@ -551,20 +555,31 @@ is searched."
                 (when description
                   (save-restriction
                     (narrow-to-region (point) (point))
-                    (insert "\n" (replace-regexp-in-string "[\n]+$" "\n" description) "\n")
+                    (insert "\n"
+                            (gnus-icalendar-event:org-timestamp event)
+                            "\n\n"
+                            (replace-regexp-in-string "[\n]+$" "\n" description)
+                            "\n")
                     (indent-region (point-min) (point-max) (1+ entry-outline-level))
                     (fill-region (point-min) (point-max))))
 
                 ;; update entry properties
-                (org-entry-put event-pos "DT" (gnus-icalendar-event:org-timestamp event))
-                (org-entry-put event-pos "ORGANIZER" organizer)
-                (org-entry-put event-pos "LOCATION" location)
-                (org-entry-put event-pos "PARTICIPATION_TYPE" (symbol-name participation-type))
-                (org-entry-put event-pos "REQ_PARTICIPANTS" (gnus-icalendar--format-participant-list req-participants))
-                (org-entry-put event-pos "OPT_PARTICIPANTS" (gnus-icalendar--format-participant-list opt-participants))
-                (org-entry-put event-pos "RRULE" recur)
-                (when reply-status (org-entry-put event-pos "REPLY"
-                                                  (capitalize (symbol-name reply-status))))
+                (gmm-labels
+                    ((update-org-entry (position property value)
+                                       (if (or (null value)
+                                               (string= value ""))
+                                           (org-entry-delete position property)
+                                         (org-entry-put position property value))))
+
+                  (update-org-entry event-pos "ORGANIZER" organizer)
+                  (update-org-entry event-pos "LOCATION" location)
+                  (update-org-entry event-pos "PARTICIPATION_TYPE" (symbol-name participation-type))
+                  (update-org-entry event-pos "REQ_PARTICIPANTS" (gnus-icalendar--format-participant-list req-participants))
+                  (update-org-entry event-pos "OPT_PARTICIPANTS" (gnus-icalendar--format-participant-list opt-participants))
+                  (update-org-entry event-pos "RRULE" recur)
+                  (update-org-entry event-pos "REPLY"
+                                    (if reply-status (capitalize (symbol-name reply-status))
+                                      "Not replied yet")))
                 (save-buffer)))))))))
 
 
@@ -661,8 +676,9 @@ Gnus will only offer you the Accept/Tentative/Decline buttons for
 calendar events if any of your identities matches at least one
 RSVP participant.
 
-Your identity is guessed automatically from the variables `user-full-name',
-`user-mail-address', and `gnus-ignored-from-addresses'.
+Your identity is guessed automatically from the variables
+`user-full-name', `user-mail-address',
+`gnus-ignored-from-addresses' and `message-alternative-emails'.
 
 If you need even more aliases you can define them here.  It really
 only makes sense to define names or email addresses."
@@ -688,6 +704,7 @@ These will be used to retrieve the RSVP information from ical events."
                  (list user-full-name (regexp-quote user-mail-address)
                        ; NOTE: these can be lists
                        gnus-ignored-from-addresses ; already regexp-quoted
+                       message-alternative-emails  ;
                        (mapcar #'regexp-quote gnus-icalendar-additional-identities)))))
 
 ;; TODO: make the template customizable
index 8dec6f2421705ec3954cfad220130ef8d617300d..2d86d0b81ad7b3992c61ab1c065d984c7b434452 100644 (file)
@@ -146,20 +146,27 @@ Calling (gnus-group-split-fancy nil nil \"mail.others\") returns:
       (any \"\\\\(foo@nowhere\\\\.gov\\\\|foo@localhost\\\\|foo-redist@home\\\\)\"
           - \"bugs-foo\" - \"rambling-foo\" \"mail.foo\"))
    \"mail.others\")"
-  (let* ((newsrc (cdr gnus-newsrc-alist))
-        split)
-    (dolist (info newsrc)
-      (let ((group (gnus-info-group info))
-           (params (gnus-info-params info)))
-       ;; For all GROUPs that match the specified GROUPS
-       (when (or (not groups)
-                 (and (listp groups)
-                      (memq group groups))
-                 (and (stringp groups)
-                      (string-match groups group)))
-         (let ((split-spec (assoc 'split-spec params)) group-clean)
-           ;; Remove backend from group name
-           (setq group-clean (string-match ":" group))
+  (let ((group-names (if (and (listp groups)
+                             (not (null groups)))
+                        groups
+                      (delete-dups
+                       (delq nil
+                             (mapcar
+                              (lambda (info)
+                                (let ((group (gnus-info-group info)))
+                                  (if (or (not groups)
+                                          (and (stringp groups)
+                                               (string-match groups group)))
+                                      group)))
+                              (append gnus-newsrc-alist gnus-parameters))))))
+       split)
+    (dolist (group group-names)
+      (let ((params (gnus-group-find-parameter group)))
+       ;; Skip groups without param (or nonexistent)
+       (when (not (null params))
+         (let ((split-spec (assoc 'split-spec params)) group-clean)
+           ;; Remove backend from group name
+           (setq group-clean (string-match ":" group))
            (setq group-clean
                  (if group-clean
                      (substring group (1+ group-clean))
index 1c8635c5992bc03cfd70c2aa579ff8db5e227968..8b9842918da7f10ad06a3096f990c77db28bd260 100644 (file)
@@ -1726,7 +1726,20 @@ this is a reply."
          (var (or gnus-outgoing-message-group gnus-message-archive-group))
         (gcc-self-val
          (and group (not (gnus-virtual-group-p group))
-              (gnus-group-find-parameter group 'gcc-self)))
+              (gnus-group-find-parameter group 'gcc-self t)))
+        (gcc-self-get (lambda (gcc-self-val group)
+                        (if (stringp gcc-self-val)
+                            (if (string-match " " gcc-self-val)
+                                (concat "\"" gcc-self-val "\"")
+                              gcc-self-val)
+                          ;; In nndoc groups, we use the parent group name
+                          ;; instead of the current group.
+                          (let ((group (or (gnus-group-find-parameter
+                                            gnus-newsgroup-name 'parent-group)
+                                           group)))
+                            (if (string-match " " group)
+                                (concat "\"" group "\"")
+                              group)))))
         result
         (groups
          (cond
@@ -1777,19 +1790,11 @@ this is a reply."
          (if gcc-self-val
              ;; Use the `gcc-self' param value instead.
              (progn
-               (insert
-                (if (stringp gcc-self-val)
-                    (if (string-match " " gcc-self-val)
-                        (concat "\"" gcc-self-val "\"")
-                      gcc-self-val)
-                  ;; In nndoc groups, we use the parent group name
-                  ;; instead of the current group.
-                  (let ((group (or (gnus-group-find-parameter
-                                    gnus-newsgroup-name 'parent-group)
-                                   group)))
-                    (if (string-match " " group)
-                        (concat "\"" group "\"")
-                      group))))
+               (insert (if (listp gcc-self-val)
+                           (mapconcat (lambda (val)
+                                        (funcall gcc-self-get val group))
+                                      gcc-self-val ", ")
+                           (funcall gcc-self-get gcc-self-val group)))
                (if (not (eq gcc-self-val 'none))
                    (insert "\n")
                  (gnus-delete-line)))
@@ -1826,7 +1831,7 @@ this is a reply."
                      (with-current-buffer gnus-summary-buffer
                        gnus-posting-styles)
                    gnus-posting-styles))
-         style match attribute value v results
+         style match attribute value v results matched-string
          filep name address element)
       ;; If the group has a posting-style parameter, add it at the end with a
       ;; regexp matching everything, to be sure it takes precedence over all
@@ -1846,7 +1851,9 @@ this is a reply."
        (when (cond
               ((stringp match)
                ;; Regexp string match on the group name.
-               (string-match match group))
+               (when (string-match match group)
+                  (setq matched-string group)
+                  t))
               ((eq match 'header)
                ;; Obsolete format of header match.
                (and (gnus-buffer-live-p gnus-article-copy)
@@ -1875,7 +1882,8 @@ this is a reply."
                           (nnheader-narrow-to-headers)
                           (let ((header (message-fetch-field (nth 1 match))))
                             (and header
-                                 (string-match (nth 2 match) header)))))))
+                                 (string-match (nth 2 match) header)
+                                 (setq matched-string header)))))))
                 (t
                  ;; This is a form to be evalled.
                  (eval match)))))
@@ -1896,10 +1904,11 @@ this is a reply."
            (setq v
                  (cond
                   ((stringp value)
-                   (if (and (stringp match)
+                   (if (and matched-string
                             (gnus-string-match-p "\\\\[&[:digit:]]" value)
                             (match-beginning 1))
-                       (gnus-match-substitute-replacement value nil nil group)
+                       (gnus-match-substitute-replacement value nil nil
+                                                          matched-string)
                      value))
                   ((or (symbolp value)
                        (functionp value))
index 0621c23c20c2eb228c8ec0a0aec6b3e6fc76c463..ee1083d80056b0e1ae83c2b250fd14a5a76d3c42 100644 (file)
@@ -102,6 +102,9 @@ Return a notification id if any, or t on success."
     ;; Don't return an id
     t))
 
+(declare-function gravatar-retrieve-synchronously "gravatar.el"
+                 (mail-address))
+
 (defun gnus-notifications-get-photo (mail-address)
   "Get photo for mail address."
   (let ((google-photo (when (and gnus-notifications-use-google-contacts
index 83629df1713684ceb249545c481693e667cb8db0..05301673a50a4f7ffa370589d387672a7c1c8456 100644 (file)
 ;;
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-
 (eval-when-compile (require 'cl))
 
 (require 'gnus)
diff --git a/lisp/gnus/gnus-setup.el b/lisp/gnus/gnus-setup.el
deleted file mode 100644 (file)
index 7ef8dc5..0000000
+++ /dev/null
@@ -1,191 +0,0 @@
-;;; gnus-setup.el --- Initialization & Setup for Gnus 5
-
-;; Copyright (C) 1995-1996, 2000-2014 Free Software Foundation, Inc.
-
-;; Author: Steven L. Baur <steve@miranova.com>
-;; Keywords: news
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
-
-;;; Commentary:
-;; My head is starting to spin with all the different mail/news packages.
-;; Stop The Madness!
-
-;; Given that Emacs Lisp byte codes may be diverging, it is probably best
-;; not to byte compile this, and just arrange to have the .el loaded out
-;; of .emacs.
-
-;;; Code:
-
-(eval-when-compile (require 'cl))
-
-(defvar gnus-use-installed-gnus t
-  "*If non-nil use installed version of Gnus.")
-
-(defvar gnus-use-installed-mailcrypt (featurep 'xemacs)
-  "*If non-nil use installed version of mailcrypt.")
-
-(defvar gnus-emacs-lisp-directory (if (featurep 'xemacs)
-                                     "/usr/local/lib/xemacs/"
-                                   "/usr/local/share/emacs/")
-  "Directory where Emacs site lisp is located.")
-
-(defvar gnus-gnus-lisp-directory (concat gnus-emacs-lisp-directory
-                                        "gnus/lisp/")
-  "Directory where Gnus Emacs lisp is found.")
-
-(defvar gnus-mailcrypt-lisp-directory (concat gnus-emacs-lisp-directory
-                                             "site-lisp/mailcrypt/")
-  "Directory where Mailcrypt Emacs Lisp is found.")
-
-(defvar gnus-bbdb-lisp-directory (concat gnus-emacs-lisp-directory
-                                        "site-lisp/bbdb/")
-  "Directory where Big Brother Database is found.")
-
-(defvar gnus-use-mhe nil
-  "Set this if you want to use MH-E for mail reading.")
-(defvar gnus-use-rmail nil
-  "Set this if you want to use RMAIL for mail reading.")
-(defvar gnus-use-sendmail nil
-  "Set this if you want to use SENDMAIL for mail reading.")
-(defvar gnus-use-vm nil
-  "Set this if you want to use the VM package for mail reading.")
-(defvar gnus-use-sc nil
-  "Set this if you want to use Supercite.")
-(defvar gnus-use-mailcrypt t
-  "Set this if you want to use Mailcrypt for dealing with PGP messages.")
-(defvar gnus-use-bbdb nil
-  "Set this if you want to use the Big Brother DataBase.")
-
-(when (and (not gnus-use-installed-gnus)
-          (null (member gnus-gnus-lisp-directory load-path)))
-  (push gnus-gnus-lisp-directory load-path))
-
-;;; We can't do this until we know where Gnus is.
-(require 'message)
-
-;;; Mailcrypt by
-;;; Jin Choi <jin@atype.com>
-;;; Patrick LoPresti <patl@lcs.mit.edu>
-
-(when gnus-use-mailcrypt
-  (when (and (not gnus-use-installed-mailcrypt)
-            (null (member gnus-mailcrypt-lisp-directory load-path)))
-    (setq load-path (cons gnus-mailcrypt-lisp-directory load-path)))
-  (autoload 'mc-install-write-mode "mailcrypt" nil t)
-  (autoload 'mc-install-read-mode "mailcrypt" nil t)
-;;;   (add-hook 'message-mode-hook 'mc-install-write-mode)
-;;;   (add-hook 'gnus-summary-mode-hook 'mc-install-read-mode)
-  (when gnus-use-mhe
-    (add-hook 'mh-folder-mode-hook 'mc-install-read-mode)
-    (add-hook 'mh-letter-mode-hook 'mc-install-write-mode)))
-
-;;; BBDB by
-;;; Jamie Zawinski <jwz@lucid.com>
-
-(when gnus-use-bbdb
-  ;; bbdb will never be installed with emacs.
-  (when (null (member gnus-bbdb-lisp-directory load-path))
-    (setq load-path (cons gnus-bbdb-lisp-directory load-path)))
-  (autoload 'bbdb "bbdb-com"
-    "Insidious Big Brother Database" t)
-  (autoload 'bbdb-name "bbdb-com"
-    "Insidious Big Brother Database" t)
-  (autoload 'bbdb-company "bbdb-com"
-    "Insidious Big Brother Database" t)
-  (autoload 'bbdb-net "bbdb-com"
-    "Insidious Big Brother Database" t)
-  (autoload 'bbdb-notes "bbdb-com"
-    "Insidious Big Brother Database" t)
-
-  (when gnus-use-vm
-    (autoload 'bbdb-insinuate-vm "bbdb-vm"
-      "Hook BBDB into VM" t))
-
-  (when gnus-use-rmail
-    (autoload 'bbdb-insinuate-rmail "bbdb-rmail"
-      "Hook BBDB into RMAIL" t)
-    (add-hook 'rmail-mode-hook 'bbdb-insinuate-rmail))
-
-  (when gnus-use-mhe
-    (autoload 'bbdb-insinuate-mh "bbdb-mh"
-      "Hook BBDB into MH-E" t)
-    (add-hook 'mh-folder-mode-hook 'bbdb-insinuate-mh))
-
-  (autoload 'bbdb-insinuate-gnus "bbdb-gnus"
-    "Hook BBDB into Gnus" t)
-  (add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus)
-
-  (when gnus-use-sendmail
-    (autoload 'bbdb-insinuate-sendmail "bbdb"
-      "Insidious Big Brother Database" t)
-    (add-hook 'mail-setup-hook 'bbdb-insinuate-sendmail)
-    (add-hook 'message-setup-hook 'bbdb-insinuate-sendmail)))
-
-(when gnus-use-sc
-  (add-hook 'mail-citation-hook 'sc-cite-original)
-  (setq message-cite-function 'sc-cite-original))
-\f
-;;;### (autoloads (gnus gnus-slave gnus-no-server) "gnus" "lisp/gnus.el" (12473 2137))
-;;; Generated autoloads from lisp/gnus.el
-
-;; Don't redo this if autoloads already exist
-(unless (fboundp 'gnus)
-  (autoload 'gnus-slave-no-server "gnus" "\
-Read network news as a slave without connecting to local server." t nil)
-
-  (autoload 'gnus-no-server "gnus" "\
-Read network news.
-If ARG is a positive number, Gnus will use that as the
-startup level.  If ARG is nil, Gnus will be started at level 2.
-If ARG is non-nil and not a positive number, Gnus will
-prompt the user for the name of an NNTP server to use.
-As opposed to `gnus', this command will not connect to the local server." t nil)
-
-  (autoload 'gnus-slave "gnus" "\
-Read news as a slave." t nil)
-
-  (autoload 'gnus "gnus" "\
-Read network news.
-If ARG is non-nil and a positive number, Gnus will use that as the
-startup level.  If ARG is non-nil and not a positive number, Gnus will
-prompt the user for the name of an NNTP server to use." t nil)
-
-;;;***
-
-;;; These have moved out of gnus.el into other files.
-;;; FIX FIX FIX: should other things be in gnus-setup? or these not in it?
-  (autoload 'gnus-update-format "gnus-spec" "\
-Update the format specification near point." t nil)
-
-  (autoload 'gnus-fetch-group "gnus-group" "\
-Start Gnus if necessary and enter GROUP.
-Returns whether the fetching was successful or not." t nil)
-
-  (defalias 'gnus-batch-kill 'gnus-batch-score)
-
-  (autoload 'gnus-batch-score "gnus-kill" "\
-Run batched scoring.
-Usage: emacs -batch -l gnus -f gnus-batch-score <newsgroups> ...
-Newsgroups is a list of strings in Bnews format.  If you want to score
-the comp hierarchy, you'd say \"comp.all\".  If you would not like to
-score the alt hierarchy, you'd say \"!alt.all\"." t nil))
-
-(provide 'gnus-setup)
-
-(run-hooks 'gnus-setup-load-hook)
-
-;;; gnus-setup.el ends here
index 54714d503bc75c2fea555f008d2e74fca5a42339..e11ddc4c4f5be4e90ecc656e586402289880ab9d 100644 (file)
@@ -24,9 +24,6 @@
 
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
 (eval-when-compile (require 'cl))
 (defvar gnus-newsrc-file-version)
 
index 319f7a8cbce444000fe686b540974b7aee91d8b8..083a3d68183f44232e7f409b2658c2f03d57a877 100644 (file)
@@ -45,7 +45,7 @@
   :group 'gnus-server
   :type 'hook)
 
-(defcustom gnus-server-line-format "     {%(%h:%w%)} %s%a\n"
+(defcustom gnus-server-line-format "     {%(%h:%w%)} %s%a%c\n"
   "Format of server lines.
 It works along the same lines as a normal formatting string,
 with some simple extensions.
@@ -78,6 +78,16 @@ If nil, a faster, but more primitive, buffer is used instead."
 
 ;;; Internal variables.
 
+(defvar gnus-tmp-how)
+(defvar gnus-tmp-name)
+(defvar gnus-tmp-where)
+(defvar gnus-tmp-status)
+(defvar gnus-tmp-agent)
+(defvar gnus-tmp-cloud)
+(defvar gnus-tmp-news-server)
+(defvar gnus-tmp-news-method)
+(defvar gnus-tmp-user-defined)
+
 (defvar gnus-inserted-opened-servers nil)
 
 (defvar gnus-server-line-format-alist
@@ -85,7 +95,8 @@ If nil, a faster, but more primitive, buffer is used instead."
     (?n gnus-tmp-name ?s)
     (?w gnus-tmp-where ?s)
     (?s gnus-tmp-status ?s)
-    (?a gnus-tmp-agent ?s)))
+    (?a gnus-tmp-agent ?s)
+    (?c gnus-tmp-cloud ?s)))
 
 (defvar gnus-server-mode-line-format-alist
   `((?S gnus-tmp-news-server ?s)
@@ -127,6 +138,7 @@ If nil, a faster, but more primitive, buffer is used instead."
        ["Close" gnus-server-close-server t]
        ["Offline" gnus-server-offline-server t]
        ["Deny" gnus-server-deny-server t]
+       ["Toggle Cloud" gnus-server-toggle-cloud-server t]
        "---"
        ["Open All" gnus-server-open-all-servers t]
        ["Close All" gnus-server-close-all-servers t]
@@ -172,6 +184,8 @@ If nil, a faster, but more primitive, buffer is used instead."
 
     "z" gnus-server-compact-server
 
+    "i" gnus-server-toggle-cloud-server
+
     "\C-c\C-i" gnus-info-find-node
     "\C-c\C-b" gnus-bug))
 
@@ -185,6 +199,13 @@ If nil, a faster, but more primitive, buffer is used instead."
 (put 'gnus-server-agent-face 'face-alias 'gnus-server-agent)
 (put 'gnus-server-agent-face 'obsolete-face "22.1")
 
+(defface gnus-server-cloud
+  '((((class color) (background light)) (:foreground "ForestGreen" :bold t))
+    (((class color) (background dark)) (:foreground "PaleGreen" :bold t))
+    (t (:bold t)))
+  "Face used for displaying AGENTIZED servers"
+  :group 'gnus-server-visual)
+
 (defface gnus-server-opened
   '((((class color) (background light)) (:foreground "Green3" :bold t))
     (((class color) (background dark)) (:foreground "Green1" :bold t))
@@ -228,6 +249,7 @@ If nil, a faster, but more primitive, buffer is used instead."
 
 (defvar gnus-server-font-lock-keywords
   '(("(\\(agent\\))" 1 'gnus-server-agent)
+    ("(\\(cloud\\))" 1 'gnus-server-cloud)
     ("(\\(opened\\))" 1 'gnus-server-opened)
     ("(\\(closed\\))" 1 'gnus-server-closed)
     ("(\\(offline\\))" 1 'gnus-server-offline)
@@ -264,8 +286,9 @@ The following commands are available:
         '(gnus-server-font-lock-keywords t)))
   (gnus-run-mode-hooks 'gnus-server-mode-hook))
 
-(defun gnus-server-insert-server-line (gnus-tmp-name method)
-  (let* ((gnus-tmp-how (car method))
+(defun gnus-server-insert-server-line (name method)
+  (let* ((gnus-tmp-name name)
+         (gnus-tmp-how (car method))
         (gnus-tmp-where (nth 1 method))
         (elem (assoc method gnus-opened-servers))
         (gnus-tmp-status
@@ -282,6 +305,9 @@ The following commands are available:
         (gnus-tmp-agent (if (and gnus-agent
                                  (gnus-agent-method-p method))
                             " (agent)"
+                          ""))
+        (gnus-tmp-cloud (if (gnus-cloud-server-p gnus-tmp-name)
+                            " (cloud)"
                           "")))
     (beginning-of-line)
     (gnus-add-text-properties
@@ -1084,6 +1110,27 @@ Requesting compaction of %s... (this may take a long time)"
       (let ((original (get-buffer gnus-original-article-buffer)))
        (and original (gnus-kill-buffer original))))))
 
+(defun gnus-server-toggle-cloud-server ()
+  "Make the server under point be replicated in the Emacs Cloud."
+  (interactive)
+  (let ((server (gnus-server-server-name)))
+    (unless server
+      (error "No server on the current line"))
+
+    (unless (gnus-method-option-p server 'cloud)
+      (error "The server under point doesn't support cloudiness"))
+
+    (if (gnus-cloud-server-p server)
+       (setq gnus-cloud-covered-servers
+             (delete server gnus-cloud-covered-servers))
+      (push server gnus-cloud-covered-servers))
+
+    (gnus-server-update-server server)
+    (gnus-message 1 (if (gnus-cloud-server-p server)
+                       "Replication of %s in the cloud will start"
+                     "Replication of %s in the cloud will stop")
+                 server)))
+
 (provide 'gnus-srvr)
 
 ;;; gnus-srvr.el ends here
index b9b259e0d18c252d2503d74ca027f89e9cc859ce..5b734d0ae772d9e2a7a6784b2c8849e6500a4924 100644 (file)
@@ -30,6 +30,7 @@
 (require 'gnus-spec)
 (require 'gnus-range)
 (require 'gnus-util)
+(require 'gnus-cloud)
 (autoload 'message-make-date "message")
 (autoload 'gnus-agent-read-servers-validate "gnus-agent")
 (autoload 'gnus-agent-save-local "gnus-agent")
@@ -441,6 +442,14 @@ See also `gnus-before-startup-hook'."
   :group 'gnus-newsrc
   :type 'hook)
 
+(defcustom gnus-save-newsrc-file-check-timestamp nil
+  "Check the modification time of the newsrc.eld file before saving it.
+When the newsrc.eld file is updated by multiple machines,
+checking the file's modification time is a good way to avoid
+overwriting updated data."
+  :group 'gnus-newsrc
+  :type 'boolean)
+
 (defcustom gnus-save-newsrc-hook nil
   "A hook called before saving any of the newsrc files."
   :group 'gnus-newsrc
@@ -888,6 +897,11 @@ If REGEXP is given, lines that match it will be deleted."
       (setq buffer-save-without-query t)
       (erase-buffer)
       (setq buffer-file-name dribble-file)
+      ;; The buffer may be shrunk a lot when deleting old entries.
+      ;; It caused the auto-saving to stop.
+      (if (featurep 'emacs)
+         (set (make-local-variable 'auto-save-include-big-deletions) t)
+       (set (make-local-variable 'disable-auto-save-when-buffer-shrinks) nil))
       (auto-save-mode t)
       (buffer-disable-undo)
       (bury-buffer (current-buffer))
@@ -2777,6 +2791,7 @@ If FORCE is non-nil, the .newsrc file is read."
       'msdos-long-file-names
       (lambda () t))))
 
+(defvar gnus-save-newsrc-file-last-timestamp nil)
 (defun gnus-save-newsrc-file (&optional force)
   "Save .newsrc file."
   ;; Note: We cannot save .newsrc file if all newsgroups are removed
@@ -2815,12 +2830,30 @@ If FORCE is non-nil, the .newsrc file is read."
          (erase-buffer)
           (gnus-message 5 "Saving %s.eld..." gnus-current-startup-file)
 
+          ;; check timestamp of `gnus-current-startup-file'.eld against
+          ;; `gnus-save-newsrc-file-last-timestamp'
+          (when gnus-save-newsrc-file-check-timestamp
+            (let* ((checkfile (concat gnus-current-startup-file ".eld"))
+                   (mtime (nth 5 (file-attributes checkfile))))
+              (when (and gnus-save-newsrc-file-last-timestamp
+                         (time-less-p gnus-save-newsrc-file-last-timestamp
+                                      mtime))
+                (unless (y-or-n-p
+                         (format "%s was updated externally after %s, save?"
+                                 checkfile
+                                 (format-time-string
+                                  "%c"
+                                  gnus-save-newsrc-file-last-timestamp)))
+                (error "Couldn't save %s: updated externally" checkfile)))))
+
           (if gnus-save-startup-file-via-temp-buffer
               (let ((coding-system-for-write gnus-ding-file-coding-system)
                     (standard-output (current-buffer)))
                 (gnus-gnus-to-quick-newsrc-format)
                 (gnus-run-hooks 'gnus-save-quick-newsrc-hook)
-                (save-buffer))
+                (save-buffer)
+                (setq gnus-save-newsrc-file-last-timestamp
+                            (nth 5 (file-attributes buffer-file-name))))
             (let ((coding-system-for-write gnus-ding-file-coding-system)
                   (version-control gnus-backup-startup-file)
                   (startup-file (concat gnus-current-startup-file ".eld"))
@@ -2855,7 +2888,9 @@ If FORCE is non-nil, the .newsrc file is read."
 
                       ;; Replace the existing startup file with the temp file.
                       (rename-file working-file startup-file t)
-                      (gnus-set-file-modes startup-file setmodes)))
+                      (gnus-set-file-modes startup-file setmodes)
+                      (setq gnus-save-newsrc-file-last-timestamp
+                            (nth 5 (file-attributes startup-file)))))
                 (condition-case nil
                     (delete-file working-file)
                   (file-error nil)))))
index d6c801fdd392e0570708fc933f7667e4ed3b1da0..db0242ef42bfbcc63466ba5947ace5cfe74d3aeb 100644 (file)
@@ -24,9 +24,6 @@
 
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
 (eval-when-compile
   (require 'cl))
 (eval-when-compile
@@ -2188,6 +2185,7 @@ increase the score of each group you read."
 (gnus-define-keys (gnus-summary-wash-mime-map "M" gnus-summary-wash-map)
   "w" gnus-article-decode-mime-words
   "c" gnus-article-decode-charset
+  "h" gnus-mime-buttonize-attachments-in-header
   "v" gnus-mime-view-all-parts
   "b" gnus-article-view-part)
 
@@ -2394,6 +2392,8 @@ increase the score of each group you read."
              ["QP" gnus-article-de-quoted-unreadable t]
              ["Base64" gnus-article-de-base64-unreadable t]
              ["View MIME buttons" gnus-summary-display-buttonized t]
+             ["View MIME buttons in header"
+              gnus-mime-buttonize-attachments-in-header t]
              ["View all" gnus-mime-view-all-parts t]
              ["Verify and Decrypt" gnus-summary-force-verify-and-decrypt t]
              ["Encrypt body" gnus-article-encrypt-body
@@ -9085,6 +9085,41 @@ non-numeric or nil fetch the number specified by the
       (gnus-summary-limit-include-thread id)))
   (gnus-summary-show-thread))
 
+(defun gnus-summary-open-group-with-article (message-id)
+  "Open a group containing the article with the given MESSAGE-ID."
+  (interactive "sMessage-ID: ")
+  (require 'nndoc)
+  (with-temp-buffer
+    ;; Prepare a dummy article
+    (erase-buffer)
+    (insert "From nobody Tue Sep 13 22:05:34 2011\n\n")
+
+    ;; Prepare pretty modelines for summary and article buffers
+    (let ((gnus-summary-mode-line-format "Found %G")
+          (gnus-article-mode-line-format
+           ;; Group names just get in the way here, especially the
+           ;; abbreviated ones
+           (if (string-match "%[gG]" gnus-article-mode-line-format)
+              (concat (substring gnus-article-mode-line-format
+                                 0 (match-beginning 0))
+                      (substring gnus-article-mode-line-format (match-end 0)))
+            gnus-article-mode-line-format)))
+
+      ;; Build an ephemeral group containing the dummy article (hidden)
+      (gnus-group-read-ephemeral-group
+       message-id
+       `(nndoc ,message-id
+              (nndoc-address ,(current-buffer))
+              (nndoc-article-type mbox))
+       :activate
+       (cons (current-buffer) gnus-current-window-configuration)
+       (not :request-only)
+       '(-1)                           ; :select-articles
+       (not :parameters)
+       0))                             ; :number
+    ;; Fetch the desired article
+    (gnus-summary-refer-article message-id)))
+
 (defun gnus-summary-refer-article (message-id)
   "Fetch an article specified by MESSAGE-ID."
   (interactive "sMessage-ID: ")
@@ -9748,6 +9783,8 @@ If ARG is a negative number, turn header display off."
 (declare-function article-narrow-to-head "gnus-art" ())
 (declare-function gnus-article-hidden-text-p "gnus-art" (type))
 (declare-function gnus-delete-wash-type "gnus-art" (type))
+(declare-function gnus-mime-buttonize-attachments-in-header
+                 "gnus-art" (&optional interactive))
 
 (defun gnus-summary-toggle-header (&optional arg)
   "Show the headers if they are hidden, or hide them if they are shown.
@@ -9779,7 +9816,10 @@ If ARG is a negative number, hide the unwanted header lines."
                  (gnus-treat-hide-boring-headers nil))
              (gnus-delete-wash-type 'headers)
              (gnus-treat-article 'head))
-         (gnus-treat-article 'head))
+         (gnus-treat-article 'head)
+         ;; Add attachment buttons to the header.
+         (when gnus-mime-display-attachment-buttons-in-header
+           (gnus-mime-buttonize-attachments-in-header)))
        (widen)
        (if window
            (set-window-start window (goto-char (point-min))))
@@ -10404,13 +10444,19 @@ This will be the case if the article has both been mailed and posted."
                  (when (and (not (memq article es))
                             (gnus-data-find article))
                    (gnus-summary-mark-article article gnus-canceled-mark)
-                   (run-hook-with-args 'gnus-summary-article-expire-hook
-                                       'delete
-                                       (gnus-data-header
-                                        (assoc article (gnus-data-list nil)))
-                                       gnus-newsgroup-name
-                                       nil
-                                       nil)))))))
+                   (run-hook-with-args
+                    'gnus-summary-article-expire-hook
+                    'delete
+                    (gnus-data-header (assoc article (gnus-data-list nil)))
+                    gnus-newsgroup-name
+                    (cond
+                     ((stringp nnmail-expiry-target) nnmail-expiry-target)
+                     ((eq nnmail-expiry-target 'delete) nil)
+                     (t
+                      (let ((rescall (funcall nnmail-expiry-target
+                                              gnus-newsgroup-name)))
+                        (if (stringp rescall) rescall nil))))
+                    nil)))))))
        (gnus-message 6 "Expiring articles...done")))))
 
 (defun gnus-summary-expire-articles-now ()
@@ -10573,7 +10619,7 @@ groups."
       (let ((lines (count-lines (point) (point-max)))
            (length (- (point-max) (point)))
            (case-fold-search t)
-           (body (copy-marker (point))))
+           (body (point-marker)))
        (goto-char (point-min))
        (when (re-search-forward "^content-length:[ \t]\\([0-9]+\\)" body t)
          (delete-region (match-beginning 1) (match-end 1))
index a3038a1bfe5d245d882c5a3745695e40fb797c09..fe4d707be2e0c0dbb180ca670ce7cbe6118f0f35 100644 (file)
@@ -32,9 +32,6 @@
 
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
 (eval-when-compile
   (require 'cl))
 
@@ -1913,17 +1910,25 @@ Sizes are in pixels."
                    image)))
       image)))
 
+(eval-when-compile (require 'gmm-utils))
 (defun gnus-recursive-directory-files (dir)
-  "Return all regular files below DIR."
-  (let (files)
-    (dolist (file (directory-files dir t))
-      (when (and (not (member (file-name-nondirectory file) '("." "..")))
-                (file-readable-p file))
-       (cond
-        ((file-regular-p file)
-         (push file files))
-        ((file-directory-p file)
-         (setq files (append (gnus-recursive-directory-files file) files))))))
+  "Return all regular files below DIR.
+The first found will be returned if a file has hard or symbolic links."
+  (let (files attr attrs)
+    (gmm-labels
+       ((fn (directory)
+            (dolist (file (directory-files directory t))
+              (setq attr (file-attributes (file-truename file)))
+              (when (and (not (member attr attrs))
+                         (not (member (file-name-nondirectory file)
+                                      '("." "..")))
+                         (file-readable-p file))
+                (push attr attrs)
+                (cond ((file-regular-p file)
+                       (push file files))
+                      ((file-directory-p file)
+                       (fn file)))))))
+      (fn dir))
     files))
 
 (defun gnus-list-memq-of-list (elements list)
index b1d60de93d99a999f5618e8cda763bd78c478fb6..206f5a502fc7df8ea840835bca308b6c7f5b8865 100644 (file)
 
 (eval '(run-hooks 'gnus-load-hook))
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-
 (eval-when-compile (require 'cl))
 (require 'wid-edit)
 (require 'mm-util)
@@ -309,6 +305,7 @@ be set in `.emacs' instead."
 
 (unless (featurep 'gnus-xmas)
   (defalias 'gnus-make-overlay 'make-overlay)
+  (defalias 'gnus-copy-overlay 'copy-overlay)
   (defalias 'gnus-delete-overlay 'delete-overlay)
   (defalias 'gnus-overlay-get 'overlay-get)
   (defalias 'gnus-overlay-put 'overlay-put)
@@ -316,6 +313,7 @@ be set in `.emacs' instead."
   (defalias 'gnus-overlay-buffer 'overlay-buffer)
   (defalias 'gnus-overlay-start 'overlay-start)
   (defalias 'gnus-overlay-end 'overlay-end)
+  (defalias 'gnus-overlays-at 'overlays-at)
   (defalias 'gnus-overlays-in 'overlays-in)
   (defalias 'gnus-extent-detached-p 'ignore)
   (defalias 'gnus-extent-start-open 'ignore)
@@ -1614,7 +1612,7 @@ slower."
   :type 'string)
 
 (defcustom gnus-valid-select-methods
-  '(("nntp" post address prompt-address physical-address)
+  '(("nntp" post address prompt-address physical-address cloud)
     ("nnspool" post address)
     ("nnvirtual" post-mail virtual prompt-address)
     ("nnmbox" mail respool address)
@@ -1631,7 +1629,7 @@ slower."
     ("nnrss" none global)
     ("nnagent" post-mail)
     ("nnimap" post-mail address prompt-address physical-address respool
-     server-marks)
+     server-marks cloud)
     ("nnmaildir" mail respool address server-marks)
     ("nnnil" none))
   "*An alist of valid select methods.
@@ -2703,7 +2701,10 @@ such as a mark that says whether an article is stored in the cache
                        gnus-newsrc-last-checked-date
                        gnus-newsrc-alist gnus-server-alist
                        gnus-killed-list gnus-zombie-list
-                       gnus-topic-topology gnus-topic-alist)
+                       gnus-topic-topology gnus-topic-alist
+                       gnus-cloud-sequence
+                       gnus-cloud-covered-servers
+                       gnus-cloud-file-timestamps)
   "Gnus variables saved in the quick startup file.")
 
 (defvar gnus-newsrc-alist nil
index 650564e2802e6136fe42c36480d13ceffd3e5dcb..ffbc37ae15887748346f35d7c2aa433a5434dc4d 100644 (file)
@@ -138,9 +138,7 @@ You can provide a list of argument to pass to CB in CBARGS."
   "Retrieve MAIL-ADDRESS gravatar and returns it."
   (let ((url (gravatar-build-url mail-address)))
     (if (gravatar-cache-expired url)
-        (with-current-buffer (if (featurep 'xemacs)
-                                (url-retrieve url)
-                              (url-retrieve-synchronously url))
+        (with-current-buffer (url-retrieve-synchronously url)
          (when gravatar-automatic-caching
             (url-store-in-cache (current-buffer)))
           (let ((data (gravatar-data->image)))
index d54377fae199ce50ac64d179f9ba19cc4c26394a..51b9c9115455994aaba23f4e1d9234a7c26c7305 100644 (file)
 
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-
 (require 'format-spec)
 (eval-when-compile
   (require 'cl)
index 5515a348b4c02b863e39856ee089f6e12f461323..4f1bdf4b1dffe76d689eb96454e7ed55ad581e9a 100644 (file)
@@ -215,10 +215,6 @@ This is a compatibility function for different Emacsen."
       (viewer . vm-mode)
       (test   . (fboundp 'vm-mode))
       (type   . "message/rfc822"))
-     ("rfc-*822"
-      (viewer . w3-mode)
-      (test   . (fboundp 'w3-mode))
-      (type   . "message/rfc822"))
      ("rfc-*822"
       (viewer . view-mode)
       (type   . "message/rfc822")))
@@ -252,10 +248,6 @@ This is a compatibility function for different Emacsen."
       (test   . (eq window-system 'x))
       ("needsx11")))
     ("text"
-     ("plain"
-      (viewer  . w3-mode)
-      (test    . (fboundp 'w3-mode))
-      (type    . "text/plain"))
      ("plain"
       (viewer  . view-mode)
       (test    . (fboundp 'view-mode))
@@ -267,10 +259,6 @@ This is a compatibility function for different Emacsen."
       (viewer . enriched-decode)
       (test   . (fboundp 'enriched-decode))
       (type   . "text/enriched"))
-     ("html"
-      (viewer . mm-w3-prepare-buffer)
-      (test   . (fboundp 'w3-prepare-buffer))
-      (type   . "text/html"))
      ("dns"
       (viewer . dns-mode)
       (test   . (fboundp 'dns-mode))
index 5300de5eabbb91e023614fd5701357b74713bd60..92cab57337c95af538301aab7bbd1c74a6477161 100644 (file)
@@ -28,9 +28,6 @@
 
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
 (eval-when-compile
   (require 'cl))
 
@@ -50,6 +47,7 @@
 (require 'mml)
 (require 'rfc822)
 (require 'format-spec)
+(require 'dired)
 
 (autoload 'mailclient-send-it "mailclient") ;; Emacs 22 or contrib/
 
@@ -606,7 +604,8 @@ Done before generating the new subject of a forward."
                 regexp))
 
 (defcustom message-forward-ignored-headers "^Content-Transfer-Encoding:\\|^X-Gnus"
-  "*All headers that match this regexp will be deleted when forwarding a message."
+  "*All headers that match this regexp will be deleted when forwarding a message.
+This may also be a list of regexps."
   :version "21.1"
   :group 'message-forwarding
   :type '(repeat :value-to-internal (lambda (widget value)
@@ -616,6 +615,19 @@ Done before generating the new subject of a forward."
                              (widget-editable-list-match widget value)))
                 regexp))
 
+(defcustom message-forward-included-headers nil
+  "If non-nil, delete non-matching headers when forwarding a message.
+Only headers that match this regexp will be included.  This
+variable should be a regexp or a list of regexps."
+  :version "25.1"
+  :group 'message-forwarding
+  :type '(repeat :value-to-internal (lambda (widget value)
+                                     (custom-split-regexp-maybe value))
+                :match (lambda (widget value)
+                         (or (stringp value)
+                             (widget-editable-list-match widget value)))
+                regexp))
+
 (defcustom message-ignored-cited-headers "."
   "*Delete these headers from the messages you yank."
   :group 'message-insertion
@@ -970,8 +982,8 @@ configuration.  See the variable `gnus-cite-attribution-suffix'."
 (defcustom message-citation-line-format "On %a, %b %d %Y, %N wrote:\n"
   "Format of the \"Whomever writes:\" line.
 
-The string is formatted using `format-spec'.  The following
-constructs are replaced:
+The string is formatted using `format-spec'.  The following constructs
+are replaced:
 
   %f   The full From, e.g. \"John Doe <john.doe@example.invalid>\".
   %n   The mail address, e.g. \"john.doe@example.invalid\".
@@ -979,11 +991,14 @@ constructs are replaced:
        back to the mail address.
   %F   The first name if present, e.g.: \"John\".
   %L   The last name if present, e.g.: \"Doe\".
+  %Z, %z   The time zone in the numeric form, e.g.:\"+0000\".
 
 All other format specifiers are passed to `format-time-string'
-which is called using the date from the article your replying to.
-Extracting the first (%F) and last name (%L) is done
-heuristically, so you should always check it yourself.
+which is called using the date from the article your replying to, but
+the date in the formatted string will be expressed in the author's
+time zone as much as possible.
+Extracting the first (%F) and last name (%L) is done heuristically,
+so you should always check it yourself.
 
 Please also read the note in the documentation of
 `message-citation-line-function'."
@@ -2451,6 +2466,7 @@ With prefix-argument just set Follow-Up, don't cross-post."
   "Remove HEADER in the narrowed buffer.
 If IS-REGEXP, HEADER is a regular expression.
 If FIRST, only remove the first instance of the header.
+If REVERSE, remove headers that doesn't match HEADER.
 Return the number of headers removed."
   (goto-char (point-min))
   (let ((regexp (if is-regexp header (concat "^" (regexp-quote header) ":")))
@@ -3907,9 +3923,13 @@ This function uses `mail-citation-hook' if that is non-nil."
 (defvar gnus-extract-address-components)
 
 (autoload 'format-spec "format-spec")
+(autoload 'gnus-date-get-time "gnus-util")
 
-(defun message-insert-formatted-citation-line (&optional from date)
+(defun message-insert-formatted-citation-line (&optional from date tz)
   "Function that inserts a formatted citation line.
+The optional FROM, and DATE are strings containing the contents of
+the From header and the Date header respectively.  The optional TZ
+is a number of seconds, overrides the time zone of DATE.
 
 See `message-citation-line-format'."
   ;; The optional args are for testing/debugging.  They will disappear later.
@@ -3917,7 +3937,7 @@ See `message-citation-line-format'."
   ;; (with-temp-buffer
   ;;   (message-insert-formatted-citation-line
   ;;    "John Doe <john.doe@example.invalid>"
-  ;;    (current-time))
+  ;;    (message-make-date))
   ;;   (buffer-string))
   (when (or message-reply-headers (and from date))
     (unless from
@@ -3934,28 +3954,43 @@ See `message-citation-line-format'."
           (net (car (cdr data)))
           (name-or-net (or (car data)
                            (car (cdr data)) from))
-          (replydate
-           (or
-            date
-            ;; We need Gnus functionality if the user wants date or time from
-            ;; the original article:
-            (when (string-match "%[^fnNFL]" message-citation-line-format)
-              (autoload 'gnus-date-get-time "gnus-util")
-              (gnus-date-get-time (mail-header-date message-reply-headers)))))
+          (time
+           (when (string-match "%[^fnNFL]" message-citation-line-format)
+             (cond ((numberp (car-safe date)) date) ;; backward compatibility
+                   (date (gnus-date-get-time date))
+                   (t
+                    (gnus-date-get-time
+                     (setq date (mail-header-date message-reply-headers)))))))
+          (tz (or tz
+                  (when (stringp date)
+                    (nth 8 (parse-time-string date)))))
           (flist
            (let ((i ?A) lst)
              (when (stringp name)
                ;; Guess first name and last name:
-                (let* ((names (delq nil (mapcar (lambda (x)
-                                                 (if (string-match "\\`\\(\\w\\|[-.]\\)+\\'" x) x nil))
-                                               (split-string name "[ \t]+"))))
-                      (count (length names)))
-                  (cond ((= count 1) (setq fname (car names)
-                                           lname ""))
-                        ((or (= count 2) (= count 3)) (setq fname (car names)
-                                                            lname (mapconcat 'identity (cdr names) " ")))
-                        ((> count 3) (setq fname (mapconcat 'identity (butlast names (- count 2)) " ")
-                                           lname (mapconcat 'identity (nthcdr 2 names) " "))) )
+               (let* ((names (delq
+                              nil
+                              (mapcar
+                               (lambda (x)
+                                 (if (string-match "\\`\\(\\w\\|[-.]\\)+\\'"
+                                                   x)
+                                     x
+                                   nil))
+                               (split-string name "[ \t]+"))))
+                      (count (length names)))
+                 (cond ((= count 1)
+                        (setq fname (car names)
+                              lname ""))
+                       ((or (= count 2) (= count 3))
+                        (setq fname (car names)
+                              lname (mapconcat 'identity (cdr names) " ")))
+                       ((> count 3)
+                        (setq fname (mapconcat 'identity
+                                               (butlast names (- count 2))
+                                               " ")
+                              lname (mapconcat 'identity
+                                               (nthcdr 2 names)
+                                               " "))))
                   (when (string-match "\\(.*\\),\\'" fname)
                     (let ((newlname (match-string 1 fname)))
                       (setq fname lname lname newlname)))))
@@ -3985,7 +4020,7 @@ See `message-citation-line-format'."
                               (>= i ?a)))
                  (push i lst)
                  (push (condition-case nil
-                           (format-time-string (format "%%%c" i) replydate)
+                           (gmm-format-time-string (format "%%%c" i) time tz)
                          (error (format ">%c<" i)))
                        lst))
                (setq i (1+ i)))
@@ -7374,17 +7409,25 @@ Optional DIGEST will use digest to forward."
     (message-remove-ignored-headers b e)))
 
 (defun message-remove-ignored-headers (b e)
-  (when message-forward-ignored-headers
+  (when (or message-forward-ignored-headers
+           message-forward-included-headers)
     (save-restriction
       (narrow-to-region b e)
       (goto-char b)
       (narrow-to-region (point)
                        (or (search-forward "\n\n" nil t) (point)))
-      (let ((ignored (if (stringp message-forward-ignored-headers)
-                        (list message-forward-ignored-headers)
-                      message-forward-ignored-headers)))
-       (dolist (elem ignored)
-         (message-remove-header elem t))))))
+      (when message-forward-ignored-headers
+       (let ((ignored (if (stringp message-forward-ignored-headers)
+                          (list message-forward-ignored-headers)
+                        message-forward-ignored-headers)))
+         (dolist (elem ignored)
+           (message-remove-header elem t))))
+      (when message-forward-included-headers
+       (message-remove-header
+        (if (listp message-forward-included-headers)
+            (regexp-opt message-forward-included-headers)
+          message-forward-included-headers)
+        t nil t)))))
 
 (defun message-forward-make-body-mime (forward-buffer &optional beg end)
   (let ((b (point)))
@@ -7432,8 +7475,7 @@ Optional DIGEST will use digest to forward."
        (goto-char (point-max))))
     (setq e (point))
     (insert "<#/mml>\n")
-    (when (and (not message-forward-decoded-p)
-              message-forward-ignored-headers)
+    (when (not message-forward-decoded-p)
       (message-remove-ignored-headers b e))))
 
 (defun message-forward-make-body-digest-plain (forward-buffer)
@@ -8421,6 +8463,17 @@ Used in `message-simplify-recipients'."
         (message-fetch-field hdr) t))
       ", "))))
 
+;;; multipart/related and HTML support.
+
+(defun message-make-html-message-with-image-files (files)
+  (interactive (list (dired-get-marked-files nil current-prefix-arg)))
+  (message-mail)
+  (message-goto-body)
+  (insert "<#part type=text/html>\n\n")
+  (dolist (file files)
+    (insert (format "<img src=%S>\n\n" file)))
+  (message-goto-to))
+
 (when (featurep 'xemacs)
   (require 'messagexmas)
   (message-xmas-redefine))
index 49724597382306ed745c2f8024eabf6cd1717ded..c2f6df9c62a69b8d16ab76039302bc53274b959d 100644 (file)
 
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-
 (require 'mm-util)
 (require 'rfc2047)
 (require 'mm-encode)
index 17c8fb1b8dbeaf740ffb0572bedda89a2be47ce6..cde0af036a569949028259b0bbfc4b495ca86768 100644 (file)
 
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-
 (require 'mail-parse)
 (require 'mm-bodies)
 (eval-when-compile (require 'cl))
        ((executable-find "w3m") 'gnus-w3m)
        ((executable-find "links") 'links)
        ((executable-find "lynx") 'lynx)
-       ((locate-library "w3") 'w3)
        ((locate-library "html2text") 'html2text)
        (t nil))
   "Render of HTML contents.
@@ -136,13 +131,11 @@ The defined renderer types are:
 `w3m-standalone': use plain w3m;
 `links': use links;
 `lynx': use lynx;
-`w3': use Emacs/W3;
 `html2text': use html2text;
 nil    : use external viewer (default web browser)."
   :version "24.1"
   :type '(choice (const shr)
                  (const gnus-w3m)
-                 (const w3)
                  (const w3m :tag "emacs-w3m")
                 (const w3m-standalone :tag "standalone w3m" )
                 (const links)
@@ -153,9 +146,9 @@ nil    : use external viewer (default web browser)."
   :group 'mime-display)
 
 (defcustom mm-inline-text-html-with-images nil
-  "If non-nil, Gnus will allow retrieving images in HTML contents with
-the <img> tags.  It has no effect on Emacs/w3.  See also the
-documentation for the `mm-w3m-safe-url-regexp' variable."
+  "If non-nil, Gnus will allow retrieving images in HTML that has <img> tags.
+See also the documentation for the `mm-w3m-safe-url-regexp'
+variable."
   :version "22.1"
   :type 'boolean
   :group 'mime-display)
@@ -828,7 +821,6 @@ external if displayed external."
          'inline)
         ((and (mm-inlinable-p ehandle)
               (mm-inlined-p ehandle))
-         (forward-line 1)
          (mm-display-inline handle)
          'inline)
         ((or method
@@ -1875,7 +1867,7 @@ If RECURSIVE, search recursively."
        handle
        `(lambda ()
          (let ((inhibit-read-only t))
-           (delete-region ,(point-min-marker)
+           (delete-region ,(copy-marker (point-min) t)
                           ,(point-max-marker))))))))
 
 (defvar shr-map)
index 882c8545e595aaad7376eaa212777b600fd204c5..d574b9d51df496a5e4a7df06973d02e237032607 100644 (file)
 
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-
 (eval-when-compile (require 'cl))
 
 (require 'mm-util)
index 4b46ab74f526b1f08ebc9f2e61e6b64145858f77..bb342d6b8b120324a44deae5d8c3d09890b3a67d 100644 (file)
@@ -21,7 +21,7 @@
 
 ;;; Commentary:
 
-;; Some codes are stolen from w3 and url packages. Some are moved from
+;; Some code is stolen from w3 and url packages. Some are moved from
 ;; nnweb.
 
 ;; TODO: Support POST, cookie.
@@ -264,8 +264,6 @@ This is taken from RFC 2396.")
                (require 'url-parse)
                (require 'url-vars))
            (error nil))
-    ;; w3-4.0pre0.46 or earlier version.
-    (require 'w3-vars)
     (require 'url)))
 
 ;;;###autoload
index 6433ec969388d1e2992a5f95cb24142627fbde20..31b7d073fbe5ff91e7604dcdd8cb12e329058e04 100644 (file)
 
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-
 (eval-when-compile (require 'cl))
 (require 'mail-prsvr)
 
index 423324a86f4ccebca3048aa8b799093acb9d94ed..d91d2a41c8f95e01162c9e64e9045b07d603d0e5 100644 (file)
@@ -673,22 +673,34 @@ value of `mm-uu-text-plain-type'."
                     (goto-char text-start)
                     (re-search-forward "." start-point t)))
              (push
-              (mm-make-handle (mm-uu-copy-to-buffer text-start start-point)
-                              mm-uu-text-plain-type)
+              (mm-make-handle
+               (mm-uu-copy-to-buffer
+                text-start
+                ;; A start-separator is likely accompanied by
+                ;; a leading newline.
+                (if (and (eq (char-before start-point) ?\n)
+                         (eq (char-before (1- start-point)) ?\n))
+                    (1- start-point)
+                  start-point))
+               mm-uu-text-plain-type)
               result))
          (push
           (funcall (mm-uu-function-extract entry))
           result)
          (goto-char (setq text-start end-point))))
       (when result
-       (if (and (> (point-max) (1+ text-start))
-                (save-excursion
-                  (goto-char text-start)
-                  (re-search-forward "." nil t)))
-           (push
-            (mm-make-handle (mm-uu-copy-to-buffer text-start (point-max))
-                            mm-uu-text-plain-type)
-            result))
+       (goto-char text-start)
+       (when (re-search-forward "." nil t)
+         (push (mm-make-handle
+                (mm-uu-copy-to-buffer
+                 ;; An end-separator is likely accompanied by
+                 ;; a trailing newline.
+                 (if (eq (char-after text-start) ?\n)
+                     (1+ text-start)
+                   text-start)
+                 (point-max))
+                mm-uu-text-plain-type)
+               result))
        (setq result (cons "multipart/mixed" (nreverse result))))
       result)))
 
index a764fa51c5d996304ee8adeb59dcae8c4ed9deb9..bf24f3496220c263abfee9b681caeaaae096dd02 100644 (file)
@@ -22,9 +22,6 @@
 
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
 (eval-when-compile (require 'cl))
 (require 'mail-parse)
 (require 'mailcap)
@@ -51,7 +48,6 @@
 
 (defvar mm-text-html-renderer-alist
   '((shr . mm-shr)
-    (w3 . mm-inline-text-html-render-with-w3)
     (w3m . mm-inline-text-html-render-with-w3m)
     (w3m-standalone . mm-inline-text-html-render-with-w3m-standalone)
     (gnus-w3m . gnus-article-html)
                                 (- (nth 3 edges) (nth 1 edges)))))))
          image))
      b)
-    (insert "\n\n")
+    (insert "\n")
     (mm-handle-set-undisplayer
      handle
      `(lambda ()
        (let ((b ,b)
              (inhibit-read-only t))
          (remove-images b b)
-         (delete-region b (+ b 2)))))))
+         (delete-region b (1+ b)))))))
 
 (defun mm-inline-image-xemacs (handle)
   (when (featurep 'xemacs)
-    (insert "\n\n")
-    (forward-char -2)
+    (insert "\n")
+    (forward-char -1)
     (let ((annot (make-annotation (mm-get-image handle) nil 'text))
        (inhibit-read-only t))
       (mm-handle-set-undisplayer
          (let ((b ,(point-marker))
              (inhibit-read-only t))
            (delete-annotation ,annot)
-           (delete-region (- b 2) b))))
+           (delete-region (1- b) b))))
       (set-extent-property annot 'mm t)
       (set-extent-property annot 'duplicable t))))
 
       (defalias 'mm-inline-image 'mm-inline-image-xemacs)
     (defalias 'mm-inline-image 'mm-inline-image-emacs)))
 
-;; External.
-(declare-function w3-do-setup       "ext:w3"         ())
-(declare-function w3-region         "ext:w3-display" (st nd))
-(declare-function w3-prepare-buffer "ext:w3-display" (&rest args))
-
-(defvar mm-w3-setup nil)
-(defun mm-setup-w3 ()
-  (unless mm-w3-setup
-    (require 'w3)
-    (w3-do-setup)
-    (require 'url)
-    (require 'w3-vars)
-    (require 'url-vars)
-    (setq mm-w3-setup t)))
-
-(defun mm-inline-text-html-render-with-w3 (handle)
-  (mm-setup-w3)
-  (let ((text (mm-get-part handle))
-       (b (point))
-       (url-standalone-mode t)
-       (url-gateway-unplugged t)
-       (w3-honor-stylesheets nil)
-       (url-current-object
-        (url-generic-parse-url (format "cid:%s" (mm-handle-id handle))))
-       (width (window-width))
-       (charset (mail-content-type-get
-                 (mm-handle-type handle) 'charset)))
-    (save-excursion
-      (insert (if charset (mm-decode-string text charset) text))
-      (save-restriction
-       (narrow-to-region b (point))
-       (unless charset
-         (goto-char (point-min))
-         (when (or (and (boundp 'w3-meta-content-type-charset-regexp)
-                        (re-search-forward
-                         w3-meta-content-type-charset-regexp nil t))
-                   (and (boundp 'w3-meta-charset-content-type-regexp)
-                        (re-search-forward
-                         w3-meta-charset-content-type-regexp nil t)))
-           (setq charset
-                 (let ((bsubstr (buffer-substring-no-properties
-                                 (match-beginning 2)
-                                 (match-end 2))))
-                   (if (fboundp 'w3-coding-system-for-mime-charset)
-                       (w3-coding-system-for-mime-charset bsubstr)
-                     (mm-charset-to-coding-system bsubstr nil t))))
-           (delete-region (point-min) (point-max))
-           (insert (mm-decode-string text charset))))
-       (save-window-excursion
-         (save-restriction
-           (let ((w3-strict-width width)
-                 ;; Don't let w3 set the global version of
-                 ;; this variable.
-                 (fill-column fill-column))
-             (if (or debug-on-error debug-on-quit)
-                 (w3-region (point-min) (point-max))
-               (condition-case ()
-                   (w3-region (point-min) (point-max))
-                 (error
-                  (delete-region (point-min) (point-max))
-                  (let ((b (point))
-                        (charset (mail-content-type-get
-                                  (mm-handle-type handle) 'charset)))
-                    (if (or (eq charset 'gnus-decoded)
-                            (eq mail-parse-charset 'gnus-decoded))
-                      (save-restriction
-                        (narrow-to-region (point) (point))
-                        (mm-insert-part handle)
-                        (goto-char (point-max)))
-                      (insert (mm-decode-string (mm-get-part handle)
-                                                charset))))
-                  (message
-                   "Error while rendering html; showing as text/plain")))))))
-       (mm-handle-set-undisplayer
-        handle
-        `(lambda ()
-           (let ((inhibit-read-only t))
-             ,@(if (functionp 'remove-specifier)
-                    '((dolist (prop '(background background-pixmap foreground))
-                        (remove-specifier
-                         (face-property 'default prop)
-                         (current-buffer)))))
-             (delete-region ,(point-min-marker)
-                            ,(point-max-marker)))))))))
-
 (defvar mm-w3m-setup nil
   "Whether gnus-article-mode has been setup to use emacs-w3m.")
 
         handle
         `(lambda ()
            (let ((inhibit-read-only t))
-             (delete-region ,(point-min-marker)
+             (delete-region ,(copy-marker (point-min) t)
                             ,(point-max-marker)))))))))
 
 (defvar mm-w3m-standalone-supports-m17n-p (if (featurep 'mule) 'undecided)
        handle
        `(lambda ()
           (let ((inhibit-read-only t))
-           (delete-region ,(point-min-marker)
+           (delete-region ,(copy-marker (point-min) t)
                           ,(point-max-marker))))))))
 
 (defun mm-insert-inline (handle text)
      handle
      `(lambda ()
        (let ((inhibit-read-only t))
-         (delete-region ,(copy-marker b)
-                        ,(copy-marker (point))))))))
+         (delete-region ,(copy-marker b t)
+                        ,(point-marker)))))))
 
 (defun mm-inline-audio (handle)
   (message "Not implemented"))
 
-(defun mm-w3-prepare-buffer ()
-  (require 'w3)
-  (let ((url-standalone-mode t)
-       (url-gateway-unplugged t)
-       (w3-honor-stylesheets nil))
-    (w3-prepare-buffer)))
-
 (defun mm-view-message ()
   (mm-enable-multibyte)
   (let (handles)
@@ -609,16 +513,20 @@ If MODE is not set, try to find mode automatically."
         (set (make-local-variable 'enable-local-variables) nil)
        (with-demoted-errors
          (if mode
-             (funcall mode)
+             (save-window-excursion
+               (switch-to-buffer (current-buffer))
+               (funcall mode))
            (let ((auto-mode-alist
                   (delq (rassq 'doc-view-mode-maybe auto-mode-alist)
                         (copy-sequence auto-mode-alist))))
              (set-auto-mode)))
          ;; The mode function might have already turned on font-lock.
          ;; Do not fontify if the guess mode is fundamental.
-         (unless (or (symbol-value 'font-lock-mode)
+         (unless (or font-lock-mode
                      (eq major-mode 'fundamental-mode))
-           (font-lock-fontify-buffer))))
+            (if (fboundp 'font-lock-ensure)
+                (font-lock-ensure)
+              (font-lock-fontify-buffer)))))
       ;; By default, XEmacs font-lock uses non-duplicable text
       ;; properties.  This code forces all the text properties
       ;; to be copied along with the text.
index bd7a50f7184c225fa9f16bc501e8c155c170caef..caa1380a497d70856df487380238006494287c0f 100644 (file)
 
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-
 (eval-when-compile (require 'cl))
 
 (require 'smime)
index 8c2f84ae49d69a47ca650d4bdf646f6bf194f7d8..fccdf521303f371ed76df2b89095574be33d89b3 100644 (file)
 
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-
 (require 'mm-util)
 (require 'mm-bodies)
 (require 'mm-encode)
 (require 'mm-decode)
 (require 'mml-sec)
 (eval-when-compile (require 'cl))
+(eval-when-compile (require 'url))
 (eval-when-compile
   (when (featurep 'xemacs)
     (require 'easy-mmode))) ; for `define-minor-mode'
@@ -465,6 +462,9 @@ If MML is non-nil, return the buffer up till the correspondent mml tag."
 (defvar mml-multipart-number 0)
 (defvar mml-inhibit-compute-boundary nil)
 
+(declare-function libxml-parse-html-region "xml.c"
+                 (start end &optional base-url))
+
 (defun mml-generate-mime (&optional multipart-type)
   "Generate a MIME message based on the current MML document.
 MULTIPART-TYPE defaults to \"mixed\", but can also
@@ -474,19 +474,69 @@ be \"related\" or \"alternate\"."
        (options message-options))
     (if (not cont)
        nil
+      (when (and (consp (car cont))
+                (= (length cont) 1)
+                (fboundp 'libxml-parse-html-region)
+                (equal (cdr (assq 'type (car cont))) "text/html"))
+       (setq cont (mml-expand-html-into-multipart-related (car cont))))
       (prog1
          (mm-with-multibyte-buffer
            (setq message-options options)
-           (if (and (consp (car cont))
-                    (= (length cont) 1))
-               (mml-generate-mime-1 (car cont))
+           (cond
+            ((and (consp (car cont))
+                  (= (length cont) 1))
+             (mml-generate-mime-1 (car cont)))
+            ((eq (car cont) 'multipart)
+             (mml-generate-mime-1 cont))
+            (t
              (mml-generate-mime-1
               (nconc (list 'multipart (cons 'type (or multipart-type "mixed")))
-                     cont)))
+                     cont))))
            (setq options message-options)
            (buffer-string))
        (setq message-options options)))))
 
+(defun mml-expand-html-into-multipart-related (cont)
+  (let ((new-parts nil)
+       (cid 1))
+    (mm-with-multibyte-buffer
+      (insert (cdr (assq 'contents cont)))
+      (goto-char (point-min))
+      (with-syntax-table mml-syntax-table
+       (while (re-search-forward "<img\\b" nil t)
+         (goto-char (match-beginning 0))
+         (let* ((start (point))
+                (img (nth 2
+                          (nth 2
+                               (libxml-parse-html-region
+                                (point) (progn (forward-sexp) (point))))))
+                (end (point))
+                (parsed (url-generic-parse-url (cdr (assq 'src (cadr img))))))
+           (when (and (null (url-type parsed))
+                      (url-filename parsed)
+                      (file-exists-p (url-filename parsed)))
+             (goto-char start)
+             (when (search-forward (url-filename parsed) end t)
+               (let ((cid (format "fsf.%d" cid)))
+                 (replace-match (concat "cid:" cid) t t)
+                 (push (list cid (url-filename parsed)) new-parts))
+               (setq cid (1+ cid)))))))
+      ;; We have local images that we want to include.
+      (if (not new-parts)
+         (list cont)
+       (setcdr (assq 'contents cont) (buffer-string))
+       (setq cont
+             (nconc (list 'multipart (cons 'type "related"))
+                    (list cont)))
+       (dolist (new-part (nreverse new-parts))
+         (setq cont
+               (nconc cont
+                      (list `(part (type . "image/png")
+                                   (filename . ,(nth 1 new-part))
+                                   (id . ,(concat "<" (nth 0 new-part)
+                                                  ">")))))))
+       cont))))
+
 (defun mml-generate-mime-1 (cont)
   (let ((mm-use-ultra-safe-encoding
         (or mm-use-ultra-safe-encoding (assq 'sign cont))))
index 8c698edb06af65520842dc27ac6b95bb18e4c425..2663107133d8c7773036e255c1b8d58ed7e7ad0d 100644 (file)
@@ -26,9 +26,6 @@
 ;;; Code:
 
 (eval-and-compile
-  ;; For Emacs <22.2 and XEmacs.
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))
-
   (if (locate-library "password-cache")
       (require 'password-cache)
     (require 'password)))
index 9fc8f6e8c0c31d7a206c8bb98d540804d9080f2b..941b5ecf7c3491e594e8b9ac67c86336d892bf45 100644 (file)
@@ -28,9 +28,6 @@
 ;;; Code:
 
 (eval-and-compile
-  ;; For Emacs <22.2 and XEmacs.
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))
-
   (if (locate-library "password-cache")
       (require 'password-cache)
     (require 'password)))
 ;; Then mml1991 would not need to require mml2015, and mml1991-use
 ;; could be removed.
 (defvar mml2015-use (or
-                    (condition-case nil
-                        (progn
-                          (require 'epg-config)
-                          (epg-check-configuration (epg-configuration))
-                          'epg)
-                      (error))
+                    (progn
+                      (ignore-errors (require 'epg-config))
+                      (and (fboundp 'epg-check-configuration)
+                          'epg))
                     (progn
                       (let ((abs-file (locate-library "pgg")))
                         ;; Don't load PGG if it is marked as obsolete
@@ -152,6 +147,12 @@ If set, it overrides the setting of `mml2015-sign-with-sender'."
   :group 'mime-security
   :type 'integer)
 
+(defcustom mml2015-display-key-image t
+  "If t, try to display key images."
+  :version "25.1"
+  :group 'mime-security
+  :type 'boolean)
+
 ;; Extract plaintext from cleartext signature.  IMO, this kind of task
 ;; should be done by GnuPG rather than Elisp, but older PGP backends
 ;; (such as Mailcrypt, and PGG) discard the output from GnuPG.
@@ -903,7 +904,8 @@ If set, it overrides the setting of `mml2015-sign-with-sender'."
 
 (defun mml2015-epg-signature-to-string (signature)
   (concat (epg-signature-to-string signature)
-         (mml2015-epg-key-image-to-string (epg-signature-key-id signature))))
+          (when mml2015-display-key-image
+            (mml2015-epg-key-image-to-string (epg-signature-key-id signature)))))
 
 (defun mml2015-epg-verify-result-to-string (verify-result)
   (mapconcat #'mml2015-epg-signature-to-string verify-result "\n"))
index 3e917b41b19082dadf502c116b3afef9cd097548..764314de0af201d3ecb57f19b90521646469edfb 100644 (file)
 
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-
 (require 'nnheader)
 (require 'nnmail)
 (require 'gnus-start)
index 1a799d3c5734cf7e1beb705e00d50711135c01c0..a403f3965c0f51da8b37d63db1573fe9890c5f9d 100644 (file)
 
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-
 (require 'nnheader)
 (require 'message)
 (require 'nnmail)
index 3ce3dfa1e75d8c0043723e240a6f5679df37bb73..994c2d022c877fb7f07aa85dbfe25100ee365d8e 100644 (file)
@@ -26,9 +26,6 @@
 
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
 (eval-when-compile (require 'cl))
 
 (defvar nnmail-extra-headers)
index 2fc2dd6af79f9a531c07b5c547a60823cef6f2df..ad48d4737a5805470aaed699d75c4310f555edcb 100644 (file)
 
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-
 (eval-and-compile
   (require 'nnheader)
   ;; In Emacs 24, `open-protocol-stream' is an autoloaded alias for
@@ -628,6 +624,26 @@ textual parts.")
            (nnheader-ms-strip-cr)
            (cons group article)))))))
 
+(deffoo nnimap-request-articles (articles &optional group server)
+  (when group
+    (setq group (nnimap-decode-gnus-group group)))
+  (with-current-buffer nntp-server-buffer
+    (let ((result (nnimap-change-group group server)))
+      (when result
+       (erase-buffer)
+       (with-current-buffer (nnimap-buffer)
+         (erase-buffer)
+         (when (nnimap-command
+                (if (nnimap-ver4-p)
+                    "UID FETCH %s BODY.PEEK[]"
+                  "UID FETCH %s RFC822.PEEK")
+                (nnimap-article-ranges (gnus-compress-sequence articles)))
+           (let ((buffer (current-buffer)))
+             (with-current-buffer nntp-server-buffer
+               (nnheader-insert-buffer-substring buffer)
+               (nnheader-ms-strip-cr)))
+           t))))))
+
 (defun nnimap-get-whole-article (article &optional command)
   (let ((result
         (nnimap-command
@@ -970,10 +986,10 @@ textual parts.")
                    (setq target nil))
                (nnheader-message 7 "Expiring article %s:%d" group article))
              (when target
-               (push article deleted-articles))))))))
+               (push article deleted-articles))))))
+      (setq deleted-articles (nreverse deleted-articles))))
     ;; Change back to the current group again.
     (nnimap-change-group group server)
-    (setq deleted-articles (nreverse deleted-articles))
     (nnimap-delete-article (gnus-compress-sequence deleted-articles))
     deleted-articles))
 
index 5910cde1c3d1a145b25b7f864c8826532fc39210..e2051dfd315ddb8a40bed0b2027782a2c0266770 100644 (file)
 
 ;;; Setup:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-
 (require 'nnoo)
 (require 'gnus-group)
 (require 'message)
index ac4b638fda0ca41ea882e4aab5606bb4ac4832ae..d1a0455a1b04eb0504354abfc0eec4c17a922c53 100644 (file)
 
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-
 (eval-when-compile (require 'cl))
 
 (require 'gnus)                                ; for macro gnus-kill-buffer, at least
index 7d33e511baa11541c57b5ea9e0503ebaea0ed624..21fa5b37aa465de582e7fc5411153c8b1ed25797 100644 (file)
    )
 ]
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-
 (require 'nnheader)
 (require 'gnus)
 (require 'gnus-util)
index 5ef91d0be7b96008ee0528a6f9256531d45da2a2..02a9513d07cbc59029914a9db906716a3f437434 100644 (file)
 
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-
 (eval-when-compile (require 'cl))
 
 (require 'gnus)
@@ -398,8 +394,8 @@ otherwise return nil."
                                         nnrss-compatible-encoding-alist)))))
     (mm-coding-system-p 'utf-8)))
 
-(declare-function w3-parse-buffer "ext:w3-parse" (&optional buff))
-
+(declare-function libxml-parse-html-region "xml.c"
+                 (start end &optional base-url))
 (defun nnrss-fetch (url &optional local)
   "Fetch URL and put it in a the expected Lisp structure."
   (mm-with-unibyte-buffer
@@ -426,22 +422,14 @@ otherwise return nil."
                  (mm-enable-multibyte))))
       (goto-char (point-min))
 
-      ;; Because xml-parse-region can't deal with anything that isn't
-      ;; xml and w3-parse-buffer can't deal with some xml, we have to
-      ;; parse with xml-parse-region first and, if that fails, parse
-      ;; with w3-parse-buffer.  Yuck.  Eventually, someone should find out
-      ;; why w3-parse-buffer fails to parse some well-formed xml and
-      ;; fix it.
-
       (condition-case err1
          (setq xmlform (xml-parse-region (point-min) (point-max)))
        (error
         (condition-case err2
-            (setq htmlform (caddar (w3-parse-buffer
-                                    (current-buffer))))
+            (setq htmlform (libxml-parse-html-region (point-min) (point-max)))
           (error
            (message "\
-nnrss: %s: Not valid XML %s and w3-parse doesn't work %s"
+nnrss: %s: Not valid XML %s and libxml-parse-html-region doesn't work %s"
                     url err1 err2)))))
       (if htmlform
          htmlform
@@ -599,7 +587,7 @@ which RSS 2.0 allows."
 (defun nnrss-no-cache (url)
   "")
 
-(defun nnrss-insert-w3 (url)
+(defun nnrss-insert (url)
   (mm-with-unibyte-current-buffer
     (condition-case err
        (mm-url-insert url)
@@ -614,8 +602,6 @@ which RSS 2.0 allows."
        (mm-url-decode-entities-nbsp)
        (buffer-string))))
 
-(defalias 'nnrss-insert 'nnrss-insert-w3)
-
 (defun nnrss-mime-encode-string (string)
   (mm-with-multibyte-buffer
     (insert string)
@@ -880,8 +866,7 @@ Careful with this on large documents!"
 
 (defun nnrss-extract-hrefs (data)
   "Recursively extract hrefs from a page's source.
-DATA should be the output of `xml-parse-region' or
-`w3-parse-buffer'."
+DATA should be the output of `xml-parse-region'."
   (mapcar (lambda (ahref)
            (cdr (assoc 'href (cadr ahref))))
          (nnrss-find-el 'a data)))
index 5ef13984abcd0fb15a284107e1f02a001dbbf242..6035162d2948f63928b1a49c74ac407b0f5a3bea 100644 (file)
@@ -25,9 +25,7 @@
 
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
 (eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))
   ;; In Emacs 24, `open-protocol-stream' is an autoloaded alias for
   ;; `make-network-stream'.
   (unless (fboundp 'open-protocol-stream)
index 3fb35b2278d09a12af041676f9d641a30654c13e..e909372e8a742c109ddcf3108d94961d8b5d0e89 100644 (file)
@@ -22,8 +22,6 @@
 
 ;;; Commentary:
 
-;; Note: You need to have `w3' installed for some functions to work.
-
 ;;; Code:
 
 (eval-when-compile (require 'cl))
@@ -38,7 +36,6 @@
 (eval-and-compile
   (ignore-errors
     (require 'url)))
-(autoload 'w3-parse-buffer "w3-parse")
 
 (nnoo-declare nnweb)
 
@@ -527,7 +524,7 @@ Valid types include `google', `dejanews', and `gmane'.")
     url))
 
 ;;;
-;;; General web/w3 interface utility functions
+;;; General web interface utility functions
 ;;;
 
 (defun nnweb-insert-html (parse)
index 09c2b723eb7130ba848948f62fa4f4ba3d096a52..74e8f12fc30eb0dc0a3486eb86b0b4a58117eae1 100644 (file)
 
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-
 (eval-when-compile (require 'cl))
 (require 'mm-util)
 
index fd97c7d595b26f6dc750872488bd6558f3baa240..62d185e28571ae3e1a66f135eb2bcda9aa8235cf 100644 (file)
 
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-
 (if (locate-library "password-cache")
     (require 'password-cache)
   (require 'password))
index 4a763caba8e32db6d719d9bc85e4430b29ca8bef..bcebe3ddc38e85f21c0e809015dbdd85566f2f92 100644 (file)
 
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
 (require 'dig)
 
 (if (locate-library "password-cache")
index 82f98c4294f113ae7f0d6a06abfb39938137891f..664ac53a76f5b99449ecc9c91cbfcc950cc82440 100644 (file)
 
 ;;{{{ compilation directives and autoloads/requires
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-
 (eval-when-compile (require 'cl))
 
 (require 'message)              ;for the message-fetch-field functions
index 46b7370183554ac788cee4df6315598d38258573..248e505ad79790c4281e2dbe34c1fbed17817ae1 100644 (file)
@@ -1,6 +1,7 @@
 ;;; help-fns.el --- Complex help functions -*- lexical-binding: t -*-
 
-;; Copyright (C) 1985-1986, 1993-1994, 1998-2014 Free Software Foundation, Inc.
+;; Copyright (C) 1985-1986, 1993-1994, 1998-2014
+;;   Free Software Foundation, Inc.
 
 ;; Maintainer: emacs-devel@gnu.org
 ;; Keywords: help, internal
@@ -429,6 +430,28 @@ FILE is the file where FUNCTION was probably defined."
       (setq load-hist (cdr load-hist)))
     found))
 
+(defun help-fns--interactive-only (function)
+  "Insert some help blurb if FUNCTION should only be used interactively."
+  ;; Ignore lambda constructs, keyboard macros, etc.
+  (and (symbolp function)
+       (not (eq (car-safe (symbol-function function)) 'macro))
+       (let* ((interactive-only
+               (or (get function 'interactive-only)
+                   (if (boundp 'byte-compile-interactive-only-functions)
+                       (memq function
+                             byte-compile-interactive-only-functions)))))
+         (when interactive-only
+           (insert "\nThis function is for interactive use only"
+                   ;; Cf byte-compile-form.
+                   (cond ((stringp interactive-only)
+                          (format ";\nin Lisp code %s" interactive-only))
+                         ((and (symbolp 'interactive-only)
+                               (not (eq interactive-only t)))
+                          (format ";\nin Lisp code use `%s' instead."
+                                  interactive-only))
+                         (t "."))
+                   "\n")))))
+
 ;;;###autoload
 (defun describe-function-1 (function)
   (let* ((advised (and (symbolp function)
@@ -553,6 +576,7 @@ FILE is the file where FUNCTION was probably defined."
 
 ;; Add defaults to `help-fns-describe-function-functions'.
 (add-hook 'help-fns-describe-function-functions #'help-fns--obsolete)
+(add-hook 'help-fns-describe-function-functions #'help-fns--interactive-only)
 (add-hook 'help-fns-describe-function-functions #'help-fns--parent-mode)
 (add-hook 'help-fns-describe-function-functions #'help-fns--compiler-macro)
 
index fa2a4f207e0157c913675f37f640888fbcc62468..2da43d3ed486a5dc3ca4400382b42691a4218636 100644 (file)
@@ -296,10 +296,11 @@ If that doesn't give a function, return nil."
   (interactive)
   (view-help-file "COPYING"))
 
+;; Maybe this command should just be removed.
 (defun describe-gnu-project ()
-  "Display info on the GNU project."
+  "Browse online information on the GNU project."
   (interactive)
-  (view-help-file "THE-GNU-PROJECT"))
+  (browse-url "http://www.gnu.org/gnu/thegnuproject.html"))
 
 (define-obsolete-function-alias 'describe-project 'describe-gnu-project "22.2")
 
@@ -520,8 +521,10 @@ If INSERT (the prefix arg) is non-nil, insert the message in the buffer."
                (if fn
                    (format "Where is command (default %s): " fn)
                  "Where is command: ")
-               obarray 'commandp t))
-     (list (if (equal val "") fn (intern val)) current-prefix-arg)))
+               obarray 'commandp t nil nil
+               (and fn (symbol-name fn))))
+     (list (unless (equal val "") (intern val))
+          current-prefix-arg)))
   (unless definition (error "No command"))
   (let ((func (indirect-function definition))
         (defs nil)
@@ -647,6 +650,68 @@ temporarily enables it to allow getting help on disabled items and buttons."
        (princ (format "%s%s is undefined" key-desc mouse-msg))
       (princ (format "%s%s runs the command %S" key-desc mouse-msg defn)))))
 
+(defun help--key-binding-keymap (key &optional accept-default no-remap position)
+  "Return a keymap holding a binding for KEY within current keymaps.
+The effect of the arguments KEY, ACCEPT-DEFAULT, NO-REMAP and
+POSITION is as documented in the function `key-binding'."
+  (let* ((active-maps (current-active-maps t position))
+         map found)
+    ;; We loop over active maps like key-binding does.
+    (while (and
+            (not found)
+            (setq map (pop active-maps)))
+      (setq found (lookup-key map key accept-default))
+      (when (integerp found)
+        ;; The first `found' characters of KEY were found but not the
+        ;; whole sequence.
+        (setq found nil)))
+    (when found
+      (if (and (symbolp found)
+               (not no-remap)
+               (command-remapping found))
+          ;; The user might want to know in which map the binding is
+          ;; found, or in which map the remapping is found.  The
+          ;; default is to show the latter.
+          (help--key-binding-keymap (vector 'remap found))
+        map))))
+
+(defun help--binding-locus (key position)
+  "Describe in which keymap KEY is defined.
+Return a symbol pointing to that keymap if one exists ; otherwise
+return nil."
+  (let ((map (help--key-binding-keymap key t nil position)))
+    (when map
+      (catch 'found
+        (let ((advertised-syms (nconc
+                                (list 'overriding-terminal-local-map
+                                      'overriding-local-map)
+                                (delq nil
+                                      (mapcar
+                                       (lambda (mode-and-map)
+                                         (let ((mode (car mode-and-map)))
+                                           (when (symbol-value mode)
+                                             (intern-soft
+                                              (format "%s-map" mode)))))
+                                       minor-mode-map-alist))
+                                (list 'global-map
+                                      (intern-soft (format "%s-map" major-mode)))))
+              found)
+          ;; Look into these advertised symbols first.
+          (dolist (sym advertised-syms)
+            (when (and
+                   (boundp sym)
+                   (eq map (symbol-value sym)))
+              (throw 'found sym)))
+          ;; Only look in other symbols otherwise.
+          (mapatoms
+           (lambda (x)
+             (when (and (boundp x)
+                        ;; Avoid let-bound symbols.
+                        (special-variable-p x)
+                        (eq (symbol-value x) map))
+               (throw 'found x))))
+          nil)))))
+
 (defun describe-key (&optional key untranslated up-event)
   "Display documentation of the function invoked by KEY.
 KEY can be any kind of a key sequence; it can include keyboard events,
@@ -709,6 +774,7 @@ temporarily enables it to allow getting help on disabled items and buttons."
         (mouse-msg (if (or (memq 'click modifiers) (memq 'down modifiers)
                            (memq 'drag modifiers)) " at that spot" ""))
         (defn (key-binding key t))
+         key-locus key-locus-up key-locus-up-tricky
         defn-up defn-up-tricky ev-type
         mouse-1-remapped mouse-1-tricky)
 
@@ -747,15 +813,19 @@ temporarily enables it to allow getting help on disabled items and buttons."
                   (setcar up-event (elt mouse-1-remapped 0)))
                  (t (setcar up-event 'mouse-2))))
          (setq defn-up (key-binding sequence nil nil (event-start up-event)))
+          (setq key-locus-up (help--binding-locus sequence (event-start up-event)))
          (when mouse-1-tricky
            (setq sequence (vector up-event))
            (aset sequence 0 'mouse-1)
-           (setq defn-up-tricky (key-binding sequence nil nil (event-start up-event))))))
+           (setq defn-up-tricky (key-binding sequence nil nil (event-start up-event)))
+            (setq key-locus-up-tricky (help--binding-locus sequence (event-start up-event))))))
+      (setq key-locus (help--binding-locus key (event-start event)))
       (with-help-window (help-buffer)
        (princ (help-key-description key untranslated))
-       (princ (format "\
-%s runs the command %S, which is "
-                      mouse-msg defn))
+       (princ (format "%s runs the command %S%s, which is "
+                      mouse-msg defn (if key-locus
+                                          (format " (found in %s)" key-locus)
+                                        "")))
        (describe-function-1 defn)
        (when up-event
          (unless (or (null defn-up)
@@ -765,13 +835,15 @@ temporarily enables it to allow getting help on disabled items and buttons."
 
 ----------------- up-event %s----------------
 
-%s%s%s runs the command %S, which is "
+%s%s%s runs the command %S%s, which is "
                           (if mouse-1-tricky "(short click) " "")
                           (key-description (vector up-event))
                           mouse-msg
                           (if mouse-1-remapped
                                " is remapped to <mouse-2>, which" "")
-                          defn-up))
+                          defn-up (if key-locus-up
+                                       (format " (found in %s)" key-locus-up)
+                                     "")))
            (describe-function-1 defn-up))
          (unless (or (null defn-up-tricky)
                      (integerp defn-up-tricky)
@@ -781,10 +853,12 @@ temporarily enables it to allow getting help on disabled items and buttons."
 ----------------- up-event (long click) ----------------
 
 Pressing <%S>%s for longer than %d milli-seconds
-runs the command %S, which is "
+runs the command %S%s, which is "
                           ev-type mouse-msg
                           mouse-1-click-follows-link
-                          defn-up-tricky))
+                          defn-up-tricky (if key-locus-up-tricky
+                                              (format " (found in %s)" key-locus-up-tricky)
+                                            "")))
            (describe-function-1 defn-up-tricky)))))))
 \f
 (defun describe-mode (&optional buffer)
index 78efd8671c47063515fefe068c4bfa3057f116da..98a26dd463487c855b81024fcff609bd3893ea73 100644 (file)
@@ -391,7 +391,7 @@ versions before 22 use the following in your init file:
        (font-lock-remove-keywords nil hi-lock-file-patterns)
        (setq hi-lock-file-patterns nil))
       (remove-overlays nil nil 'hi-lock-overlay t)
-      (when font-lock-fontified (font-lock-fontify-buffer)))
+      (font-lock-flush))
     (define-key-after menu-bar-edit-menu [hi-lock] nil)
     (remove-hook 'font-lock-mode-hook 'hi-lock-font-lock-hook t)))
 
@@ -601,7 +601,7 @@ then remove all hi-lock highlighting."
             (delq keyword hi-lock-interactive-patterns))
       (remove-overlays
        nil nil 'hi-lock-overlay-regexp (hi-lock--hashcons (car keyword)))
-      (when font-lock-fontified (font-lock-fontify-buffer)))))
+      (font-lock-flush))))
 
 ;;;###autoload
 (defun hi-lock-write-interactive-patterns ()
@@ -695,7 +695,7 @@ with completion and history."
       (if (and font-lock-mode (font-lock-specified-p major-mode))
          (progn
            (font-lock-add-keywords nil (list pattern) t)
-           (font-lock-fontify-buffer))
+           (font-lock-flush))
         (let* ((range-min (- (point) (/ hi-lock-highlight-range 2)))
                (range-max (+ (point) (/ hi-lock-highlight-range 2)))
                (search-start
@@ -719,7 +719,7 @@ with completion and history."
     (font-lock-remove-keywords nil hi-lock-file-patterns)
     (setq hi-lock-file-patterns patterns)
     (font-lock-add-keywords nil hi-lock-file-patterns t)
-    (font-lock-fontify-buffer)))
+    (font-lock-flush)))
 
 (defun hi-lock-find-patterns ()
   "Find patterns in current buffer for hi-lock."
index d3b8a2cf6c5da1f78ddc8fc172bd99d8f8a689ce..ec6007ebf828b4975bb5263722810b1b16311309 100644 (file)
@@ -637,15 +637,27 @@ string).  It returns t if a new completion is found, nil otherwise."
 The argument OLD has to be nil the first call of this function, and t
 for subsequent calls (for further possible completions of the same
 string).  It returns t if a new completion is found, nil otherwise."
+  (he--all-buffers
+   old
+   (lambda () (he-line-beg (and (get-buffer-process (current-buffer))
+                           comint-use-prompt-regexp
+                           comint-prompt-regexp)))
+   (lambda (string)
+     (he-line-search string
+                     (and (get-buffer-process (current-buffer))
+                          comint-use-prompt-regexp
+                          comint-prompt-regexp)
+                     nil))))
+
+(defun he--all-buffers (old beg-function search-function)
   (let ((expansion ())
-       (strip-prompt (and (get-buffer-process (current-buffer))
-                          comint-use-prompt-regexp
-                          comint-prompt-regexp))
-       (buf (current-buffer))
-       (orig-case-fold-search case-fold-search))
+        (buf (current-buffer))
+        (only-buffers hippie-expand-only-buffers)
+        (ignore-buffers hippie-expand-ignore-buffers)
+        (orig-case-fold-search case-fold-search))
     (if (not old)
-       (progn
-         (he-init-string (he-line-beg strip-prompt) (point))
+        (progn
+         (he-init-string (funcall beg-function) (point))
          (setq he-search-bufs (buffer-list))
          (setq he-searched-n-bufs 0)
          (set-marker he-search-loc 1 (car he-search-bufs))))
@@ -654,24 +666,20 @@ string).  It returns t if a new completion is found, nil otherwise."
        (while (and he-search-bufs
                    (not expansion)
                    (or (not hippie-expand-max-buffers)
-                       (< he-searched-n-bufs hippie-expand-max-buffers)))
-         (set-buffer (car he-search-bufs))
-         (if (and (not (eq (current-buffer) buf))
-                  (if hippie-expand-only-buffers
-                      (he-buffer-member hippie-expand-only-buffers)
-                    (not (he-buffer-member hippie-expand-ignore-buffers))))
-             (save-excursion
-               (save-restriction
-                 (if hippie-expand-no-restriction
+                        (< he-searched-n-bufs hippie-expand-max-buffers)))
+          (set-buffer (car he-search-bufs))
+          (if (and (not (eq (current-buffer) buf))
+                   (if only-buffers
+                       (he-buffer-member only-buffers)
+                     (not (he-buffer-member ignore-buffers))))
+              (save-excursion
+                (save-restriction
+                  (if hippie-expand-no-restriction
                      (widen))
                  (goto-char he-search-loc)
-                 (setq strip-prompt (and (get-buffer-process (current-buffer))
-                                         comint-use-prompt-regexp
-                                         comint-prompt-regexp))
                  (setq expansion
                        (let ((case-fold-search orig-case-fold-search))
-                         (he-line-search he-search-string
-                                         strip-prompt nil)))
+                         (funcall search-function he-search-string)))
                  (set-marker he-search-loc (point))
                  (if (not expansion)
                      (progn
@@ -686,9 +694,9 @@ string).  It returns t if a new completion is found, nil otherwise."
        (progn
          (if old (he-reset-string))
          ())
-       (progn
-         (he-substitute-string expansion t)
-         t))))
+      (progn
+        (he-substitute-string expansion t)
+        t))))
 
 (defun he-line-search (str strip-prompt reverse)
   (let ((result ()))
@@ -769,53 +777,9 @@ string).  It returns t if a new completion is found, nil otherwise."
 The argument OLD has to be nil the first call of this function, and t
 for subsequent calls (for further possible completions of the same
 string).  It returns t if a new completion is found, nil otherwise."
-  (let ((expansion ())
-       (buf (current-buffer))
-       (orig-case-fold-search case-fold-search))
-    (if (not old)
-       (progn
-         (he-init-string (he-list-beg) (point))
-         (setq he-search-bufs (buffer-list))
-         (setq he-searched-n-bufs 0)
-         (set-marker he-search-loc 1 (car he-search-bufs))))
-
-    (if (not (equal he-search-string ""))
-       (while (and he-search-bufs
-                   (not expansion)
-                   (or (not hippie-expand-max-buffers)
-                       (< he-searched-n-bufs hippie-expand-max-buffers)))
-         (set-buffer (car he-search-bufs))
-         (if (and (not (eq (current-buffer) buf))
-                  (if hippie-expand-only-buffers
-                      (he-buffer-member hippie-expand-only-buffers)
-                    (not (he-buffer-member hippie-expand-ignore-buffers))))
-             (save-excursion
-               (save-restriction
-                 (if hippie-expand-no-restriction
-                     (widen))
-                 (goto-char he-search-loc)
-                 (setq expansion
-                       (let ((case-fold-search orig-case-fold-search))
-                         (he-list-search he-search-string nil)))
-                 (set-marker he-search-loc (point))
-                 (if (not expansion)
-                     (progn
-                       (setq he-search-bufs (cdr he-search-bufs))
-                       (setq he-searched-n-bufs (1+ he-searched-n-bufs))
-                       (set-marker he-search-loc 1 (car he-search-bufs))))))
-           (setq he-search-bufs (cdr he-search-bufs))
-           (set-marker he-search-loc 1 (car he-search-bufs)))))
-
-    (set-buffer buf)
-    (if (not expansion)
-       (progn
-         (if old (he-reset-string))
-         ())
-       (progn
-         (he-substitute-string expansion t)
-         t))))
+  (he--all-buffers old #'he-list-beg #'he-list-search))
 
-(defun he-list-search (str reverse)
+(defun he-list-search (str &optional reverse)
   (let ((result ())
        beg pos err)
     (while (and (not result)
@@ -924,51 +888,7 @@ string).  It returns t if a new expansion is found, nil otherwise."
 The argument OLD has to be nil the first call of this function, and t
 for subsequent calls (for further possible expansions of the same
 string).  It returns t if a new expansion is found, nil otherwise."
-  (let ((expansion ())
-       (buf (current-buffer))
-       (orig-case-fold-search case-fold-search))
-    (if (not old)
-       (progn
-         (he-init-string (he-dabbrev-beg) (point))
-         (setq he-search-bufs (buffer-list))
-         (setq he-searched-n-bufs 0)
-         (set-marker he-search-loc 1 (car he-search-bufs))))
-
-    (if (not (equal he-search-string ""))
-       (while (and he-search-bufs
-                   (not expansion)
-                   (or (not hippie-expand-max-buffers)
-                       (< he-searched-n-bufs hippie-expand-max-buffers)))
-         (set-buffer (car he-search-bufs))
-         (if (and (not (eq (current-buffer) buf))
-                  (if hippie-expand-only-buffers
-                      (he-buffer-member hippie-expand-only-buffers)
-                    (not (he-buffer-member hippie-expand-ignore-buffers))))
-             (save-excursion
-               (save-restriction
-                 (if hippie-expand-no-restriction
-                     (widen))
-                 (goto-char he-search-loc)
-                 (setq expansion
-                       (let ((case-fold-search orig-case-fold-search))
-                         (he-dabbrev-search he-search-string nil)))
-                 (set-marker he-search-loc (point))
-                 (if (not expansion)
-                     (progn
-                       (setq he-search-bufs (cdr he-search-bufs))
-                       (setq he-searched-n-bufs (1+ he-searched-n-bufs))
-                       (set-marker he-search-loc 1 (car he-search-bufs))))))
-           (setq he-search-bufs (cdr he-search-bufs))
-           (set-marker he-search-loc 1 (car he-search-bufs)))))
-
-    (set-buffer buf)
-    (if (not expansion)
-       (progn
-         (if old (he-reset-string))
-         ())
-       (progn
-         (he-substitute-string expansion t)
-         t))))
+  (he--all-buffers old #'he-dabbrev-beg #'he-dabbrev-search))
 
 ;; Thanks go to Jeff Dairiki <dairiki@faraday.apl.washington.edu> who
 ;; suggested this one.
index 56887f39befdee1176b7b8880819e3972cf9eefa..5128ca8f9c49a4eb99d9f4e928a7ed9dfe0fea93 100644 (file)
@@ -1809,17 +1809,25 @@ fontified.  This is a simple convenience wrapper around
   (eval-and-compile (require 'font-lock))
   (if (boundp 'font-lock-cache-position)
       (or font-lock-cache-position
-          (set 'font-lock-cache-position (make-marker))))
-  (if (not noninteractive)
-      (progn
-        (message "hfy interactive mode (%S %S)" window-system major-mode)
-        (when (and font-lock-defaults
-                   font-lock-mode)
-          (font-lock-fontify-region (point-min) (point-max) nil)))
+          (setq font-lock-cache-position (make-marker))))
+  (cond
+   (noninteractive
     (message "hfy batch mode (%s:%S)"
              (or (buffer-file-name) (buffer-name)) major-mode)
-    (when font-lock-defaults
-      (font-lock-fontify-buffer)) ))
+    (if (fboundp 'font-lock-ensure)
+        (font-lock-ensure)
+      (when font-lock-defaults
+        (font-lock-fontify-buffer))))
+   ((fboundp #'jit-lock-fontify-now)
+    (message "hfy jit-lock mode (%S %S)" window-system major-mode)
+    (jit-lock-fontify-now))
+   (t
+    (message "hfy interactive mode (%S %S)" window-system major-mode)
+    ;; If jit-lock is not in use, then the buffer is already fontified!
+    ;; (when (and font-lock-defaults
+    ;;            font-lock-mode)
+    ;;   (font-lock-fontify-region (point-min) (point-max) nil))
+    )))
 
 ;;;###autoload
 (defun htmlfontify-buffer (&optional srcdir file)
index a3c5b062401173fa2a2852cb17c504711cc61519..4b13b9ab11bec33798a972a49c343464b24586e2 100644 (file)
@@ -1,4 +1,4 @@
-;;; ibuf-ext.el --- extensions for ibuffer
+;;; ibuf-ext.el --- extensions for ibuffer  -*- lexical-binding:t -*-
 
 ;; Copyright (C) 2000-2014 Free Software Foundation, Inc.
 
@@ -523,9 +523,9 @@ To evaluate a form without viewing the buffer, see `ibuffer-do-eval'."
                                ibuffer-filter-groups
                              (append ibuffer-filter-groups
                                      (list (cons "Default" nil))))))
-;;     (dolist (hidden ibuffer-hidden-filter-groups)
-;;       (setq filter-group-alist (ibuffer-delete-alist
-;;                                hidden filter-group-alist)))
+    ;; (dolist (hidden ibuffer-hidden-filter-groups)
+    ;;   (setq filter-group-alist (ibuffer-delete-alist
+    ;;                            hidden filter-group-alist)))
     (let ((vec (make-vector (length filter-group-alist) nil))
          (i 0))
       (dolist (filtergroup filter-group-alist)
@@ -540,12 +540,13 @@ To evaluate a form without viewing the buffer, see `ibuffer-do-eval'."
            (cl-incf i)
            (setq bmarklist lamers))))
       (let (ret)
-       (dotimes (j i ret)
+       (dotimes (j i)
          (let ((bufs (aref vec j)))
            (unless (and noempty (null bufs))
              (push (cons (car (nth j filter-group-alist))
                          bufs)
-                   ret))))))))
+                   ret))))
+        ret))))
 
 ;;;###autoload
 (defun ibuffer-filters-to-filter-group (name)
@@ -1100,9 +1101,9 @@ Default sorting modes are:
  Major Mode - the name of the major mode of the buffer
  Size - the size of the buffer"
   (interactive)
-  (let ((modes (mapcar 'car ibuffer-sorting-functions-alist)))
-    (add-to-list 'modes 'recency)
-    (setq modes (sort modes 'string-lessp))
+  (let ((modes (mapcar #'car ibuffer-sorting-functions-alist)))
+    (cl-pushnew 'recency modes)
+    (setq modes (sort modes #'string-lessp))
     (let ((next (or (car-safe (cdr-safe (memq ibuffer-sorting-mode modes)))
                     (car modes))))
       (setq ibuffer-sorting-mode next)
index a475e1eccb97a77c329a6e37d8f8aa368445541b..96701ee4d39dcf549fcba364a414e7ca81949966 100644 (file)
@@ -1,4 +1,4 @@
-;;; ibuf-macs.el --- macros for ibuffer
+;;; ibuf-macs.el --- macros for ibuffer  -*- lexical-binding:t -*-
 
 ;; Copyright (C) 2000-2014 Free Software Foundation, Inc.
 
@@ -111,6 +111,7 @@ change its definition, you should explicitly call
        ,(if inline
            `(push '(,sym ,bod) ibuffer-inline-columns)
          `(defun ,sym (buffer mark)
+             (ignore mark)            ;Silence byte-compiler if mark is unused.
             ,bod))
        (put (quote ,sym) 'ibuffer-column-name
            ,(if (stringp name)
@@ -204,7 +205,8 @@ macro for exactly what it does.
   (declare (indent 2) (doc-string 3))
   `(progn
      (defun ,(intern (concat (if (string-match "^ibuffer-do" (symbol-name op))
-                                "" "ibuffer-do-") (symbol-name op)))
+                                "" "ibuffer-do-")
+                             (symbol-name op)))
        ,args
        ,(if (stringp documentation)
            documentation
@@ -247,6 +249,9 @@ macro for exactly what it does.
                                   (_
                                    'ibuffer-map-marked-lines))
                                #'(lambda (buf mark)
+                                    ;; Silence warning for code that doesn't
+                                    ;; use `mark'.
+                                    (ignore mark)
                                    ,(if (eq modifier-p :maybe)
                                         `(let ((ibuffer-tmp-previous-buffer-modification
                                                 (buffer-modified-p buf)))
index 7bf0858aac0d3738fce8776681e7bae7f4f92e95..5541bbb310eefb84177430f6cc69da3d70fc2ec9 100644 (file)
@@ -1,4 +1,4 @@
-;;; ibuffer.el --- operate on buffers like dired
+;;; ibuffer.el --- operate on buffers like dired  -*- lexical-binding:t -*-
 
 ;; Copyright (C) 2000-2014 Free Software Foundation, Inc.
 
@@ -350,6 +350,7 @@ directory, like `default-directory'."
 (defcustom ibuffer-mode-hook nil
   "Hook run upon entry into `ibuffer-mode'."
   :type 'hook
+  :options '(ibuffer-auto-mode)
   :group 'ibuffer)
 
 (defcustom ibuffer-load-hook nil
@@ -539,10 +540,6 @@ directory, like `default-directory'."
     (define-key map (kbd "/ X") 'ibuffer-delete-saved-filter-groups)
     (define-key map (kbd "/ \\") 'ibuffer-clear-filter-groups)
 
-    (define-key map (kbd "q") 'ibuffer-quit)
-    (define-key map (kbd "h") 'describe-mode)
-    (define-key map (kbd "?") 'describe-mode)
-
     (define-key map (kbd "% n") 'ibuffer-mark-by-name-regexp)
     (define-key map (kbd "% m") 'ibuffer-mark-by-mode-regexp)
     (define-key map (kbd "% f") 'ibuffer-mark-by-file-name-regexp)
@@ -706,7 +703,8 @@ directory, like `default-directory'."
       '(menu-item "Diff with file" ibuffer-diff-with-file
         :help "View the differences between this buffer and its file"))
     (define-key-after map [menu-bar view auto-mode]
-      '(menu-item "Toggle Auto Mode" ibuffer-auto-mode
+      '(menu-item "Auto Mode" ibuffer-auto-mode
+        :button (:toggle . ibuffer-auto-mode)
         :help "Attempt to automatically update the Ibuffer buffer"))
     (define-key-after map [menu-bar view customize]
       '(menu-item "Customize Ibuffer" ibuffer-customize
@@ -876,12 +874,6 @@ directory, like `default-directory'."
     (define-key map [down-mouse-3] 'ibuffer-mouse-popup-menu)
     map))
 
-(defvar ibuffer-restore-window-config-on-quit nil
-  "If non-nil, restore previous window configuration upon exiting `ibuffer'.")
-
-(defvar ibuffer-prev-window-config nil
-  "Window configuration before starting Ibuffer.")
-
 (defvar ibuffer-did-modification nil)
 
 (defvar ibuffer-compiled-formats nil)
@@ -915,7 +907,7 @@ width and the longest string in LIST."
       (when (zerop columns)
        (setq columns 1))
       (while list
-       (dotimes (i (1- columns))
+       (dotimes (_ (1- columns))
          (insert (concat (car list) (make-string (- max (length (car list)))
                                                  ?\s)))
          (setq list (cdr list)))
@@ -1283,7 +1275,7 @@ a new window in the current frame, splitting vertically."
    :modifier-p t)
   (set-buffer-modified-p (not (buffer-modified-p))))
 
-(define-ibuffer-op ibuffer-do-toggle-read-only (&optional arg)
+(define-ibuffer-op ibuffer-do-toggle-read-only (&optional _arg);FIXME:arg unused!
   "Toggle read only status in marked buffers.
 With optional ARG, make read-only only if ARG is not negative."
   (:opstring "toggled read only status in"
@@ -1528,7 +1520,7 @@ If point is on a group name, this function operates on that group."
        ;; We use these variables to keep track of which variables
        ;; inside the generated function we need to bind, since
        ;; binding variables in Emacs takes time.
-       str-used tmp1-used tmp2-used global-strlen-used)
+       (vars-used ()))
     (dolist (form format)
       (push
        ;; Generate a form based on a particular format entry, like
@@ -1554,8 +1546,8 @@ If point is on a group name, this function operates on that group."
               ;; This is a complex case; they want it limited to a
               ;; minimum size.
               (setq min-used t)
-              (setq str-used t strlen-used t global-strlen-used t
-                    tmp1-used t tmp2-used t)
+               (setq strlen-used t)
+              (setq vars-used '(str strlen tmp1 tmp2))
               ;; Generate code to limit the string to a minimum size.
               (setq minform `(progn
                                (setq str
@@ -1567,7 +1559,8 @@ If point is on a group name, this function operates on that group."
                                            strlen)
                                        align)))))
             (when (or (not (integerp max)) (> max 0))
-              (setq str-used t max-used t)
+              (setq max-used t)
+               (cl-pushnew 'str vars-used)
               ;; Generate code to limit the string to a maximum size.
               (setq maxform `(progn
                                (setq str
@@ -1595,8 +1588,9 @@ If point is on a group name, this function operates on that group."
                   ;; don't even understand it, and I wrote it five
                   ;; minutes ago.
                   (insertgenfn
-                    (ibuffer-aif (get sym 'ibuffer-column-summarizer)
+                    (if (get sym 'ibuffer-column-summarizer)
                         ;; I really, really wish Emacs Lisp had closures.
+                        ;; FIXME: Elisp does have them now.
                         (lambda (arg sym)
                           `(insert
                             (let ((ret ,arg))
@@ -1604,7 +1598,7 @@ If point is on a group name, this function operates on that group."
                                    (cons ret (get ',sym
                                                   'ibuffer-column-summary)))
                               ret)))
-                      (lambda (arg sym)
+                      (lambda (arg _sym)
                         `(insert ,arg))))
                   (mincompform `(< strlen ,(if (integerp min)
                                                min
@@ -1632,10 +1626,9 @@ If point is on a group name, this function operates on that group."
                          `(when ,maxcompform
                             ,maxform)))
                      outforms)
-                    (push (append
-                           `(setq str ,callform)
-                           (when strlen-used
-                             `(strlen (length str))))
+                    (push `(setq str ,callform
+                                  ,@(when strlen-used
+                                      `(strlen (length str))))
                           outforms)
                     (setq outforms
                           (append outforms
@@ -1648,25 +1641,17 @@ If point is on a group name, this function operates on that group."
               `(let ,letbindings
                  ,@outforms)))))
        result))
-    (setq result
-         ;; We don't want to unconditionally load the byte-compiler.
-         (funcall (if (or ibuffer-always-compile-formats
-                          (featurep 'bytecomp))
-                      #'byte-compile
-                    #'identity)
-                  ;; Here, we actually create a lambda form which
-                  ;; inserts all the generated forms for each entry
-                  ;; in the format string.
-                  (nconc (list 'lambda '(buffer mark))
-                         `((let ,(append (when str-used
-                                           '(str))
-                                         (when global-strlen-used
-                                           '(strlen))
-                                         (when tmp1-used
-                                           '(tmp1))
-                                         (when tmp2-used
-                                           '(tmp2)))
-                             ,@(nreverse result))))))))
+    ;; We don't want to unconditionally load the byte-compiler.
+    (funcall (if (or ibuffer-always-compile-formats
+                     (featurep 'bytecomp))
+                 #'byte-compile
+               #'identity)
+             ;; Here, we actually create a lambda form which
+             ;; inserts all the generated forms for each entry
+             ;; in the format string.
+             `(lambda (buffer mark)
+                (let ,vars-used
+                  ,@(nreverse result))))))
 
 (defun ibuffer-recompile-formats ()
   "Recompile `ibuffer-formats'."
@@ -1684,8 +1669,8 @@ If point is on a group name, this function operates on that group."
 
 (defun ibuffer-clear-summary-columns (format)
   (dolist (form format)
-    (ibuffer-awhen (and (consp form)
-                       (get (car form) 'ibuffer-column-summarizer))
+    (when (and (consp form)
+               (get (car form) 'ibuffer-column-summarizer))
       (put (car form) 'ibuffer-column-summary nil))))
 
 (defun ibuffer-check-formats ()
@@ -2296,18 +2281,6 @@ If optional arg SILENT is non-nil, do not display progress messages."
       (goto-char (point-min))
       (forward-line orig))))
 
-(defun ibuffer-quit ()
-  "Quit this `ibuffer' session.
-Try to restore the previous window configuration if
-`ibuffer-restore-window-config-on-quit' is non-nil."
-  (interactive)
-  (if ibuffer-restore-window-config-on-quit
-      (progn
-       (bury-buffer)
-       (unless (= (count-windows) 1)
-         (set-window-configuration ibuffer-prev-window-config)))
-    (bury-buffer)))
-
 ;;;###autoload
 (defun ibuffer-list-buffers (&optional files-only)
   "Display a list of buffers, in another window.
@@ -2348,7 +2321,6 @@ FORMATS is the value to use for `ibuffer-formats'.
   (interactive "P")
   (when ibuffer-use-other-window
     (setq other-window-p t))
-  (setq ibuffer-prev-window-config (current-window-configuration))
   (let ((buf (get-buffer-create (or name "*Ibuffer*"))))
     (if other-window-p
        (funcall (if noselect (lambda (buf) (display-buffer buf t)) #'pop-to-buffer) buf)
@@ -2360,8 +2332,7 @@ FORMATS is the value to use for `ibuffer-formats'.
        (select-window (get-buffer-window buf 0))
        (or (derived-mode-p 'ibuffer-mode)
            (ibuffer-mode))
-       (setq ibuffer-restore-window-config-on-quit other-window-p)
-       (when shrink
+       (when shrink
          (setq ibuffer-shrink-to-minimum-size shrink))
        (when qualifiers
          (require 'ibuf-ext)
@@ -2499,7 +2470,6 @@ Other commands:
   '\\[ibuffer-switch-format]' - Change the current display format.
   '\\[forward-line]' - Move point to the next line.
   '\\[previous-line]' - Move point to the previous line.
-  '\\[ibuffer-quit]' - Bury the Ibuffer buffer.
   '\\[describe-mode]' - This help.
   '\\[ibuffer-diff-with-file]' - View the differences between this buffer
           and its associated file.
@@ -2614,7 +2584,6 @@ will be inserted before the group at point."
   (set (make-local-variable 'ibuffer-cached-eliding-string) nil)
   (set (make-local-variable 'ibuffer-cached-elide-long-columns) nil)
   (set (make-local-variable 'ibuffer-current-format) nil)
-  (set (make-local-variable 'ibuffer-restore-window-config-on-quit) nil)
   (set (make-local-variable 'ibuffer-did-modification) nil)
   (set (make-local-variable 'ibuffer-tmp-hide-regexps) nil)
   (set (make-local-variable 'ibuffer-tmp-show-regexps) nil)
@@ -2628,7 +2597,7 @@ will be inserted before the group at point."
 \f
 ;;; Start of automatically extracted autoloads.
 \f
-;;;### (autoloads nil "ibuf-ext" "ibuf-ext.el" "e8ce929c4c76419f8d355b444f722c3a")
+;;;### (autoloads nil "ibuf-ext" "ibuf-ext.el" "0d2393d1b47136bc7b1ac41593527f02")
 ;;; Generated autoloads from ibuf-ext.el
 
 (autoload 'ibuffer-auto-mode "ibuf-ext" "\
index 0c5a2babd8623bd6426555a631f599ecd263f23c..95a6e1b357c9774a544afa6a86565cb232da6003 100644 (file)
@@ -487,6 +487,19 @@ matches exist."
                    "}")
          (concat determ " [Matched]"))))))
 
+;;; Iswitchb compatibility
+
+;; We moved Iswitchb to `obsolete' in 24.4, but autoloads in files in
+;; `obsolete' aren't obeyed (since that would encourage people to keep using
+;; those packages, oblivious to their obsolescence).  Given the fact that
+;; Iswitchb was very popular, we decided to keep its autoload for a bit longer,
+;; so we moved it here.
+
+;;;###autoload(when (locate-library "obsolete/iswitchb")
+;;;###autoload  (autoload 'iswitchb-mode "iswitchb" "Toggle Iswitchb mode." t)
+;;;###autoload  (make-obsolete 'iswitchb-mode
+;;;###autoload    "use `icomplete-mode' or `ido-mode' instead." "24.4"))
+
 ;;;_* Provide
 (provide 'icomplete)
 
index d6d742875d671ea3bed8a3cc462c69b351e087fc..37e66ccc61133638f3d652065869528420fb64af 100644 (file)
@@ -541,7 +541,9 @@ Customized bindings may be defined in `ielm-map', which currently contains:
   (setq comint-process-echoes nil)
   (set (make-local-variable 'completion-at-point-functions)
        '(comint-replace-by-expanded-history
-         ielm-complete-filename lisp-completion-at-point))
+         ielm-complete-filename elisp-completion-at-point))
+  (setq-local eldoc-documentation-function
+              #'elisp-eldoc-documentation-function)
   (set (make-local-variable 'ielm-prompt-internal) ielm-prompt)
   (set (make-local-variable 'comint-prompt-read-only) ielm-prompt-read-only)
   (setq comint-get-old-input 'ielm-get-old-input)
index de6bb85bcb6b8559a25b02950a7d75bcf1fc9584..b94162d413a2d1d27baa4e69028b27337fc6ee59 100644 (file)
   "Special hook run when image data is requested in a new window.
 It is called with one argument, the initial WINPROPS.")
 
+;; FIXME this doesn't seem mature yet. Document in manual when it is.
+(defvar image-transform-resize nil
+  "The image resize operation.
+Its value should be one of the following:
+ - nil, meaning no resizing.
+ - `fit-height', meaning to fit the image to the window height.
+ - `fit-width', meaning to fit the image to the window width.
+ - A number, which is a scale factor (the default size is 1).")
+
+(defvar image-transform-scale 1.0
+  "The scale factor of the image being displayed.")
+
+(defvar image-transform-rotation 0.0
+  "Rotation angle for the image in the current Image mode buffer.")
+
+(defvar image-transform-right-angle-fudge 0.0001
+  "Snap distance to a multiple of a right angle.
+There's no deep theory behind the default value, it should just
+be somewhat larger than ImageMagick's MagickEpsilon.")
+
 (defun image-mode-winprops (&optional window cleanup)
   "Return winprops of WINDOW.
 A winprops object has the shape (WINDOW . ALIST).
@@ -90,6 +110,8 @@ otherwise it defaults to t, used for times when the buffer is not displayed."
 
 (defun image-mode-window-put (prop val &optional winprops)
   (unless (consp winprops) (setq winprops (image-mode-winprops winprops)))
+  (unless (eq t (car winprops))
+    (image-mode-window-put prop val t))
   (setcdr winprops (cons (cons prop val)
                          (delq (assq prop (cdr winprops)) (cdr winprops)))))
 
@@ -377,8 +399,6 @@ call."
        ["Show as Text" image-toggle-display :active t
         :help "Show image as text"]
        "--"
-       ["Fit Frame to Image" image-mode-fit-frame :active t
-        :help "Resize frame to match image"]
        ["Fit to Window Height" image-transform-fit-to-height
         :visible (eq image-type 'imagemagick)
         :help "Resize image to match the window height"]
@@ -388,6 +408,9 @@ call."
        ["Rotate Image..." image-transform-set-rotation
         :visible (eq image-type 'imagemagick)
         :help "Rotate the image"]
+       ["Reset Transformations" image-transform-reset
+        :visible (eq image-type 'imagemagick)
+        :help "Reset all image transformations"]
        "--"
        ["Show Thumbnails"
         (lambda ()
@@ -400,6 +423,9 @@ call."
        ["Previous Image" image-previous-file :active buffer-file-name
          :help "Move to previous image in this directory"]
        "--"
+       ["Fit Frame to Image" image-mode-fit-frame :active t
+        :help "Resize frame to match image"]
+       "--"
        ["Animate Image" image-toggle-animation :style toggle
         :selected (let ((image (image-get-display-property)))
                     (and image (image-animate-timer image)))
@@ -636,8 +662,19 @@ was inserted."
                           (string-make-unibyte
                            (buffer-substring-no-properties (point-min) (point-max)))
                         filename))
-        (type (image-type file-or-data nil data-p))
-        (image (create-image file-or-data type data-p))
+        ;; If we have a `fit-width' or a `fit-height', don't limit
+        ;; the size of the image to the window size.
+        (edges (and (null image-transform-resize)
+                    (window-inside-pixel-edges
+                     (get-buffer-window (current-buffer)))))
+        (type (if (fboundp 'imagemagick-types)
+                  'imagemagick
+                (image-type file-or-data nil data-p)))
+        (image (if (not edges)
+                   (create-image file-or-data type data-p)
+                 (create-image file-or-data type data-p
+                               :max-width (- (nth 2 edges) (nth 0 edges))
+                               :max-height (- (nth 3 edges) (nth 1 edges)))))
         (inhibit-read-only t)
         (buffer-undo-list t)
         (modified (buffer-modified-p))
@@ -888,26 +925,6 @@ replacing the current Image mode buffer."
 ;;   nil "image-transform" image-transform-minor-mode-map)
 
 
-;; FIXME this doesn't seem mature yet. Document in manual when it is.
-(defvar image-transform-resize nil
-  "The image resize operation.
-Its value should be one of the following:
- - nil, meaning no resizing.
- - `fit-height', meaning to fit the image to the window height.
- - `fit-width', meaning to fit the image to the window width.
- - A number, which is a scale factor (the default size is 1).")
-
-(defvar image-transform-scale 1.0
-  "The scale factor of the image being displayed.")
-
-(defvar image-transform-rotation 0.0
-  "Rotation angle for the image in the current Image mode buffer.")
-
-(defvar image-transform-right-angle-fudge 0.0001
-  "Snap distance to a multiple of a right angle.
-There's no deep theory behind the default value, it should just
-be somewhat larger than ImageMagick's MagickEpsilon.")
-
 (defsubst image-transform-width (width height)
   "Return the bounding box width of a rotated WIDTH x HEIGHT rectangle.
 The rotation angle is the value of `image-transform-rotation' in degrees."
@@ -1089,6 +1106,16 @@ Emacs is compiled with ImageMagick support."
   (setq image-transform-rotation (float (mod rotation 360)))
   (image-toggle-display-image))
 
+(defun image-transform-reset ()
+  "Display the current image with the default size and rotation.
+This command has no effect unless Emacs is compiled with
+ImageMagick support."
+  (interactive)
+  (setq image-transform-resize nil
+       image-transform-rotation 0.0
+       image-transform-scale 1)
+  (image-toggle-display-image))
+
 (provide 'image-mode)
 
 ;;; image-mode.el ends here
index 3159b6cc563f0556d9efd9709f7e9f8d95d6ed24..5bad4c09c4454303dc7238cb99ad8e89355af14b 100644 (file)
@@ -1034,16 +1034,13 @@ for more information."
   (if (stringp index-item)
       (setq index-item (assoc index-item (imenu--make-index-alist))))
   (when index-item
-    (push-mark nil t)
-    (let* ((is-special-item (listp (cdr index-item)))
-          (function
-           (if is-special-item
-               (nth 2 index-item) imenu-default-goto-function))
-          (position (if is-special-item
-                        (cadr index-item) (cdr index-item)))
-          (args (if is-special-item (cdr (cddr index-item)))))
-      (apply function (car index-item) position args))
-    (run-hooks 'imenu-after-jump-hook)))
+    (pcase index-item
+      (`(,name ,pos ,fn . ,args)
+       (push-mark nil t)
+       (apply fn name pos args)
+       (run-hooks 'imenu-after-jump-hook))
+      (`(,name . ,pos) (imenu (list name pos imenu-default-goto-function)))
+      (_ (error "Unknown imenu item: %S" index-item)))))
 
 (provide 'imenu)
 
index 6e72e544dd5bfbd8985b5393d8a8fc55d3c46053..2a8ba9064b2295e742bfb16c90d72189e43005c7 100644 (file)
@@ -1,4 +1,4 @@
-;; info.el --- info package for Emacs
+;; info.el --- Info package for Emacs  -*- lexical-binding:t -*-
 
 ;; Copyright (C) 1985-1986, 1992-2014 Free Software Foundation, Inc.
 
 
 ;;; Code:
 
+(eval-when-compile (require 'cl-lib))
+
 (defgroup info nil
   "Info subsystem."
   :group 'help
   :group 'docs)
 
 
-(defvar Info-history nil
+(defvar-local Info-history nil
   "Stack of Info nodes user has visited.
 Each element of the stack is a list (FILENAME NODENAME BUFFERPOS).")
 
-(defvar Info-history-forward nil
+(defvar-local Info-history-forward nil
   "Stack of Info nodes user has visited with `Info-history-back' command.
 Each element of the stack is a list (FILENAME NODENAME BUFFERPOS).")
 
@@ -136,10 +138,15 @@ The Lisp code is executed when the node is selected.")
   :type 'boolean
   :group 'info)
 
-(defcustom Info-fontify-maximum-menu-size 100000
+;; It's unfortunate that nil means no fontification, as opposed to no limit,
+;; since that differs from font-lock-maximum-size.
+(defcustom Info-fontify-maximum-menu-size 400000
   "Maximum size of menu to fontify if `font-lock-mode' is non-nil.
-Set to nil to disable node fontification."
-  :type 'integer
+Set to nil to disable node fontification; set to t for no limit."
+  :type '(choice (const :tag "No fontification" nil)
+                (const :tag "No size limit" t)
+                (integer :tag "Up to this many characters"))
+  :version "25.1"                      ; 100k -> 400k
   :group 'info)
 
 (defcustom Info-use-header-line t
@@ -375,33 +382,33 @@ with wrapping around the current Info node."
 (make-obsolete-variable 'Info-edit-mode-hook
                        "editing Info nodes by hand is not recommended." "24.4")
 
-(defvar Info-current-file nil
+(defvar-local Info-current-file nil
   "Info file that Info is now looking at, or nil.
 This is the name that was specified in Info, not the actual file name.
 It doesn't contain directory names or file name extensions added by Info.")
 
-(defvar Info-current-subfile nil
+(defvar-local Info-current-subfile nil
   "Info subfile that is actually in the *info* buffer now.
 It is nil if current Info file is not split into subfiles.")
 
-(defvar Info-current-node nil
+(defvar-local Info-current-node nil
   "Name of node that Info is now looking at, or nil.")
 
-(defvar Info-tag-table-marker nil
+(defvar-local Info-tag-table-marker nil
   "Marker pointing at beginning of current Info file's tag table.
 Marker points nowhere if file has no tag table.")
 
-(defvar Info-tag-table-buffer nil
+(defvar-local Info-tag-table-buffer nil
   "Buffer used for indirect tag tables.")
 
-(defvar Info-current-file-completions nil
+(defvar-local Info-current-file-completions nil
   "Cached completion list for current Info file.")
 
 (defvar Info-file-completions nil
   "Cached completion alist of visited Info files.
 Each element of the alist is (FILE . COMPLETIONS)")
 
-(defvar Info-file-supports-index-cookies nil
+(defvar-local Info-file-supports-index-cookies nil
   "Non-nil if current Info file supports index cookies.")
 
 (defvar Info-file-supports-index-cookies-list nil
@@ -409,7 +416,7 @@ Each element of the alist is (FILE . COMPLETIONS)")
 Each element of the list is a list (FILENAME SUPPORTS-INDEX-COOKIES)
 where SUPPORTS-INDEX-COOKIES can be either t or nil.")
 
-(defvar Info-index-alternatives nil
+(defvar-local Info-index-alternatives nil
   "List of possible matches for last `Info-index' command.")
 
 (defvar Info-point-loc nil
@@ -455,7 +462,7 @@ existing node names.  OPERATION is one of the following operation
 symbols `find-node' that define what HANDLER function to call instead
 of calling the default corresponding function to override it.")
 
-(defvar Info-current-node-virtual nil
+(defvar-local Info-current-node-virtual nil
   "Non-nil if the current Info node is virtual.")
 
 (defun Info-virtual-file-p (filename)
@@ -953,10 +960,10 @@ otherwise, that defaults to `Top'."
   (unless nodename (setq nodename "Top"))
   (info-initialize)
   (Info-mode)
-  (set (make-local-variable 'Info-current-file)
-       (or buffer-file-name
-          ;; If called on a non-file buffer, make a fake file name.
-          (concat default-directory (buffer-name))))
+  (setq Info-current-file
+        (or buffer-file-name
+            ;; If called on a non-file buffer, make a fake file name.
+            (concat default-directory (buffer-name))))
   (Info-find-node-2 nil nodename))
 
 (defun Info-revert-find-node (filename nodename)
@@ -1090,7 +1097,7 @@ is non-nil)."
            (set-marker Info-tag-table-marker nil)
            (setq buffer-read-only t)
            (set-buffer-modified-p nil)
-           (set (make-local-variable 'Info-current-node-virtual) t)))
+           (setq Info-current-node-virtual t)))
         ((not (and
                ;; Reread a file when moving from a virtual node.
                (not Info-current-node-virtual)
@@ -1100,7 +1107,7 @@ is non-nil)."
          (let ((inhibit-read-only t))
            (when Info-current-node-virtual
              ;; When moving from a virtual node.
-             (set (make-local-variable 'Info-current-node-virtual) nil)
+             (setq Info-current-node-virtual nil)
              (if (null filename)
                  (setq filename Info-current-file)))
            (setq Info-current-file nil
@@ -1111,7 +1118,7 @@ is non-nil)."
            (info-insert-file-contents filename nil)
            (setq default-directory (file-name-directory filename))
            (set-buffer-modified-p nil)
-           (set (make-local-variable 'Info-file-supports-index-cookies)
+           (setq Info-file-supports-index-cookies
                 (Info-file-supports-index-cookies filename))
 
            ;; See whether file has a tag table.  Record the location if yes.
@@ -1250,17 +1257,17 @@ is non-nil)."
 
 ;; Cache the contents of the (virtual) dir file, once we have merged
 ;; it for the first time, so we can save time subsequently.
-(defvar Info-dir-contents nil)
+(defvar-local Info-dir-contents nil)
 
 ;; Cache for the directory we decided to use for the default-directory
 ;; of the merged dir text.
-(defvar Info-dir-contents-directory nil)
+(defvar-local Info-dir-contents-directory nil)
 
 ;; Record the file attributes of all the files from which we
 ;; constructed Info-dir-contents.
-(defvar Info-dir-file-attributes nil)
+(defvar-local Info-dir-file-attributes nil)
 
-(defvar Info-dir-file-name nil)
+(defvar-local Info-dir-file-name nil)
 
 ;; Construct the Info directory node by merging the files named `dir'
 ;; from various directories.  Set the *info* buffer's
@@ -1333,13 +1340,12 @@ is non-nil)."
                          ;; knows...
                          (let ((inhibit-null-byte-detection t))
                            (insert-file-contents file)
-                           (set (make-local-variable 'Info-dir-file-name)
-                                file)
+                           (setq Info-dir-file-name file)
                            (push (current-buffer) buffers)
                            (push (cons file attrs) dir-file-attrs))
                        (error (kill-buffer (current-buffer))))))))
          (unless (cdr dirs)
-           (set (make-local-variable 'Info-dir-contents-directory)
+           (setq Info-dir-contents-directory
                 (file-name-as-directory (car dirs))))
          (setq dirs (cdr dirs))))
 
@@ -1424,8 +1430,8 @@ is non-nil)."
       (if problems
          (message "Composing main Info directory...problems encountered, see `*Messages*'")
        (message "Composing main Info directory...done"))
-      (set (make-local-variable 'Info-dir-contents) (buffer-string))
-      (set (make-local-variable 'Info-dir-file-attributes) dir-file-attrs)))
+      (setq Info-dir-contents (buffer-string))
+      (setq Info-dir-file-attributes dir-file-attrs)))
   (setq default-directory Info-dir-contents-directory))
 
 (defvar Info-streamline-headings
@@ -1891,7 +1897,7 @@ the Top node in FILENAME."
                        (cons (list (match-string-no-properties 1))
                              compl))))))))
     (setq compl (cons '("*") (nreverse compl)))
-    (set (make-local-variable 'Info-current-file-completions) compl)
+    (setq Info-current-file-completions compl)
     compl))
 
 \f
@@ -2206,7 +2212,7 @@ End of submatch 0, 1, and 3 are the same, so you can safely concat."
          "[" (or allowedchars "^,\t\n") " ]" ;The last char can't be a space.
          "\\|\\)\\)"))                       ;Allow empty node names.
 
-;;; For compatibility; other files have used this name.
+;; For compatibility; other files have used this name.
 (defun Info-following-node-name ()
   (and (looking-at (Info-following-node-name-re))
        (match-string-no-properties 1)))
@@ -2644,7 +2650,7 @@ Because of ambiguities, this should be concatenated with something like
 (defvar Info-complete-menu-buffer)
 (defvar Info-complete-next-re nil)
 (defvar Info-complete-nodes nil)
-(defvar Info-complete-cache nil)
+(defvar-local Info-complete-cache nil)
 
 (defconst Info-node-spec-re
   (concat (Info-following-node-name-re "^.,:") "[,:.]")
@@ -2689,9 +2695,7 @@ Because of ambiguities, this should be concatenated with something like
                      (equal (nth 1 Info-complete-cache) Info-current-node)
                      (equal (nth 2 Info-complete-cache) Info-complete-next-re)
                      (equal (nth 5 Info-complete-cache) Info-complete-nodes)
-                     (let ((prev (nth 3 Info-complete-cache)))
-                       (eq t (compare-strings string 0 (length prev)
-                                              prev 0 nil t))))
+                     (string-prefix-p (nth 3 Info-complete-cache) string) t)
                 ;; We can reuse the previous list.
                 (setq completions (nth 4 Info-complete-cache))
               ;; The cache can't be used.
@@ -2713,7 +2717,7 @@ Because of ambiguities, this should be concatenated with something like
               (unless (equal Info-current-node orignode)
                 (Info-goto-node orignode))
               ;; Update the cache.
-              (set (make-local-variable 'Info-complete-cache)
+              (setq Info-complete-cache
                   (list Info-current-file Info-current-node
                         Info-complete-next-re string completions
                         Info-complete-nodes)))
@@ -3561,9 +3565,9 @@ Return a list of matches where each element is in the format
        (goto-char (point-min))
        (re-search-forward "\\* Menu: *\n" nil t)
        (while (re-search-forward "\\*.*: *(\\([^)]+\\))" nil t)
-         ;; add-to-list makes sure we don't have duplicates in `manuals',
+         ;; Make sure we don't have duplicates in `manuals',
          ;; so that the following dolist loop runs faster.
-         (add-to-list 'manuals (match-string 1)))
+         (cl-pushnew (match-string 1) manuals :test #'equal))
        (dolist (manual (nreverse manuals))
          (message "Searching %s" manual)
          (condition-case err
@@ -3632,6 +3636,18 @@ Build a menu of the possible matches."
 (defvar finder-keywords-hash)
 (defvar package--builtins)             ; finder requires package
 
+(defun info--prettify-description (desc)
+  (if (stringp desc)
+      (with-temp-buffer
+       (insert desc)
+       (if (equal ?. (char-before))
+           (delete-char -1))
+       (goto-char (point-min))
+       (or (let (case-fold-search) (looking-at-p "\\.\\|[[:upper:]]"))
+           (capitalize-word 1))
+       (buffer-string))
+    desc))
+
 (defun Info-finder-find-node (_filename nodename &optional _no-going-back)
   "Finder-specific implementation of `Info-find-node-2'."
   (require 'finder)
@@ -3650,7 +3666,7 @@ Build a menu of the possible matches."
        (insert (format "* %s %s.\n"
                        (concat (symbol-name keyword) ": "
                                "Keyword " (symbol-name keyword) ".")
-                       (cdr assoc))))))
+                       (info--prettify-description (cdr assoc)))))))
    ((equal nodename "Keyword unknown")
     ;; Display unknown keywords
     (insert (format "\n\^_\nFile: %s,  Node: %s,  Up: Top\n\n"
@@ -3678,7 +3694,7 @@ Build a menu of the possible matches."
        (when (vectorp desc)
          (insert (format "* %-16s %s.\n"
                          (concat (symbol-name (car package)) "::")
-                         (aref desc 2)))))))
+                         (info--prettify-description (aref desc 2))))))))
    ((string-match "\\`Keyword " nodename)
     (setq nodename (substring nodename (match-end 0)))
     ;; Display packages that match the keyword
@@ -3699,27 +3715,31 @@ Build a menu of the possible matches."
        (push (copy-tree (gethash keyword finder-keywords-hash)) hits))
       (setq hits (delete-dups (apply 'append hits))
            ;; Not a meaningful package.
-           hits (delete 'emacs hits))
+           hits (delete 'emacs hits)
+           hits (sort hits (lambda (a b) (string< (symbol-name a)
+                                                  (symbol-name b)))))
       (dolist (package hits)
        (setq desc (cdr-safe (assq package package--builtins)))
        (when (vectorp desc)
          (insert (format "* %-16s %s.\n"
                          (concat (symbol-name package) "::")
-                         (aref desc 2)))))))
+                         (info--prettify-description (aref desc 2))))))))
    (t
     ;; Display commentary section
     (insert (format "\n\^_\nFile: %s,  Node: %s,  Up: Top\n\n"
                    Info-finder-file nodename))
-    (insert "Finder Commentary\n")
-    (insert "*****************\n\n")
+    (insert "Package Description\n")
+    (insert "*******************\n\n")
     (insert
-     "Commentary section of the package `" nodename "':\n\n")
-    ;; FIXME this assumes that a file named package.el exists,
+     "Description of the package `" nodename "':\n\n")
+    ;; This assumes that a file named package.el exists,
     ;; which is not always true.  E.g. for the nxml package,
     ;; there is no "nxml.el" (it's nxml-mode.el).
-    (let ((str (lm-commentary (find-library-name nodename))))
+    ;; But package.el makes the same assumption.
+    ;; I think nxml is the only exception - maybe it should be just be renamed.
+    (let ((str (ignore-errors (lm-commentary (find-library-name nodename)))))
       (if (null str)
-         (insert "Can't find any Commentary section\n\n")
+         (insert "Can't find package description.\n\n")
        (insert
         (with-temp-buffer
           (insert str)
@@ -4192,9 +4212,16 @@ With a zero prefix arg, put the name inside a function call to `info'."
     st)
   "Syntax table used in `Info-mode'.")
 
+(defface Info-quoted
+  '((t :family "courier"))
+  "Face used for quoted elements.")
+
+(defvar Info-mode-font-lock-keywords
+  '(("‘\\([^’]*\\)’" (1 'Info-quoted))))
+
 ;; Autoload cookie needed by desktop.el
 ;;;###autoload
-(define-derived-mode Info-mode nil "Info"
+(define-derived-mode Info-mode nil "Info" ;FIXME: Derive from special-mode?
   "Info mode provides commands for browsing through the Info documentation tree.
 Documentation in Info is divided into \"nodes\", each of which discusses
 one topic and contains references to other nodes which discuss related
@@ -4262,39 +4289,27 @@ Advanced commands:
   (add-hook 'activate-menubar-hook 'Info-menu-update nil t)
   (setq case-fold-search t)
   (setq buffer-read-only t)
-  (make-local-variable 'Info-current-file)
-  (make-local-variable 'Info-current-subfile)
-  (make-local-variable 'Info-current-node)
-  (set (make-local-variable 'Info-tag-table-marker) (make-marker))
-  (set (make-local-variable 'Info-tag-table-buffer) nil)
-  (make-local-variable 'Info-history)
-  (make-local-variable 'Info-history-forward)
-  (make-local-variable 'Info-index-alternatives)
+  (setq Info-tag-table-marker (make-marker))
   (if Info-use-header-line    ; do not override global header lines
       (setq header-line-format
            '(:eval (get-text-property (point-min) 'header-line))))
-  (set (make-local-variable 'tool-bar-map) info-tool-bar-map)
+  (setq-local tool-bar-map info-tool-bar-map)
   ;; This is for the sake of the invisible text we use handling titles.
-  (set (make-local-variable 'line-move-ignore-invisible) t)
-  (set (make-local-variable 'desktop-save-buffer)
-       'Info-desktop-buffer-misc-data)
-  (set (make-local-variable 'widen-automatically) nil)
+  (setq-local line-move-ignore-invisible t)
+  (setq-local desktop-save-buffer 'Info-desktop-buffer-misc-data)
+  (setq-local widen-automatically nil)
   (add-hook 'kill-buffer-hook 'Info-kill-buffer nil t)
   (add-hook 'clone-buffer-hook 'Info-clone-buffer nil t)
   (add-hook 'change-major-mode-hook 'font-lock-defontify nil t)
   (add-hook 'isearch-mode-hook 'Info-isearch-start nil t)
-  (set (make-local-variable 'isearch-search-fun-function)
-       'Info-isearch-search)
-  (set (make-local-variable 'isearch-wrap-function)
-       'Info-isearch-wrap)
-  (set (make-local-variable 'isearch-push-state-function)
-       'Info-isearch-push-state)
-  (set (make-local-variable 'isearch-filter-predicate) #'Info-isearch-filter)
-  (set (make-local-variable 'revert-buffer-function)
-       'Info-revert-buffer-function)
+  (setq-local isearch-search-fun-function #'Info-isearch-search)
+  (setq-local isearch-wrap-function #'Info-isearch-wrap)
+  (setq-local isearch-push-state-function #'Info-isearch-push-state)
+  (setq-local isearch-filter-predicate #'Info-isearch-filter)
+  (setq-local revert-buffer-function #'Info-revert-buffer-function)
+  (setq-local font-lock-defaults '(Info-mode-font-lock-keywords t t))
   (Info-set-mode-line)
-  (set (make-local-variable 'bookmark-make-record-function)
-       'Info-bookmark-make-record))
+  (setq-local bookmark-make-record-function #'Info-bookmark-make-record))
 
 ;; When an Info buffer is killed, make sure the associated tags buffer
 ;; is killed too.
@@ -4323,7 +4338,7 @@ Advanced commands:
                              map)
   "Local keymap used within `e' command of Info.")
 
-(make-obsolete-variable 'Info-edit-map
+(make-obsolete-variable 'Info-edit-mode-map
                        "editing Info nodes by hand is not recommended."
                        "24.4")
 
@@ -4333,8 +4348,7 @@ Advanced commands:
 (define-derived-mode Info-edit-mode text-mode "Info Edit"
   "Major mode for editing the contents of an Info node.
 Like text mode with the addition of `Info-cease-edit'
-which returns to Info mode for browsing.
-\\{Info-edit-map}"
+which returns to Info mode for browsing."
   (setq buffer-read-only nil)
   (force-mode-line-update)
   (buffer-enable-undo (current-buffer)))
@@ -4347,7 +4361,7 @@ which returns to Info mode for browsing.
   (interactive)
   (Info-edit-mode)
   (message "%s" (substitute-command-keys
-                "Editing: Type \\<Info-edit-map>\\[Info-cease-edit] to return to info")))
+                "Editing: Type \\<Info-edit-mode-map>\\[Info-cease-edit] to return to info")))
 
 (put 'Info-edit 'disabled "Editing Info nodes by hand is not recommended.
 This feature will be removed in future.")
@@ -4596,7 +4610,9 @@ first line or header line, and for breadcrumb links.")
             (and Info-fontify-visited-nodes
                  ;; Don't take time to refontify visited nodes in huge nodes
                 Info-fontify-maximum-menu-size
-                 (< (- (point-max) (point-min)) Info-fontify-maximum-menu-size)))
+                 (or (eq Info-fontify-maximum-menu-size t)
+                    (< (- (point-max) (point-min))
+                       Info-fontify-maximum-menu-size))))
            rbeg rend)
 
       ;; Fontify header line
@@ -4853,7 +4869,9 @@ first line or header line, and for breadcrumb links.")
                  (search-forward "\n* Menu:" nil t)
                  ;; Don't take time to annotate huge menus
                 Info-fontify-maximum-menu-size
-                 (< (- (point-max) (point)) Info-fontify-maximum-menu-size))
+                (or (eq Info-fontify-maximum-menu-size t)
+                    (< (- (point-max) (point))
+                       Info-fontify-maximum-menu-size)))
         (let ((n 0)
               cont)
           (while (re-search-forward
index 4cab85be1056d694ba6a653cc90b90a64c2320be..067b1c35fa07b8c97699c8273a1b7ed01836e474 100644 (file)
@@ -1389,11 +1389,13 @@ Setup char-width-table appropriate for non-CJK language environment."
 (when (setq unicode-category-table
            (unicode-property-table-internal 'general-category))
   (map-char-table #'(lambda (key val)
-                     (if (and val
-                              (or (and (/= (aref (symbol-name val) 0) ?M)
-                                       (/= (aref (symbol-name val) 0) ?C))
-                                  (eq val 'Zs)))
-                         (modify-category-entry key ?.)))
+                     (if val
+                         (cond ((or (and (/= (aref (symbol-name val) 0) ?M)
+                                         (/= (aref (symbol-name val) 0) ?C))
+                                    (eq val 'Zs))
+                                (modify-category-entry key ?.))
+                               ((eq val 'Mn)
+                                (modify-category-entry key ?^)))))
                  unicode-category-table))
 
 (optimize-char-table (standard-category-table))
index 0a2f09029da153c802fc85f4004c90e3c06bfef3..61ecc8b702a6821879e3916cf03f9a59e6b71592 100644 (file)
@@ -1,4 +1,4 @@
-;;; mule-cmds.el --- commands for multilingual environment -*-coding: utf-8 -*-
+;;; mule-cmds.el --- commands for multilingual environment  -*- lexical-binding:t -*-
 
 ;; Copyright (C) 1997-2014 Free Software Foundation, Inc.
 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
@@ -2776,11 +2776,7 @@ See also the documentation of `get-char-code-property' and
     (or (stringp table)
        (error "Not a char-table nor a file name: %s" table)))
   (if (stringp table) (setq table (purecopy table)))
-  (let ((slot (assq name char-code-property-alist)))
-    (if slot
-       (setcdr slot table)
-      (setq char-code-property-alist
-           (cons (cons name table) char-code-property-alist))))
+  (setf (alist-get name char-code-property-alist) table)
   (put name 'char-code-property-documentation (purecopy docstring)))
 
 (defvar char-code-property-table
@@ -2909,16 +2905,14 @@ on encoding."
 (defun ucs-names ()
   "Return alist of (CHAR-NAME . CHAR-CODE) pairs cached in `ucs-names'."
   (or ucs-names
-      (let ((bmp-ranges
+      (let ((ranges
             '((#x0000 . #x33FF)
               ;; (#x3400 . #x4DBF) CJK Ideographs Extension A
               (#x4DC0 . #x4DFF)
               ;; (#x4E00 . #x9FFF) CJK Unified Ideographs
               (#xA000 . #xD7FF)
               ;; (#xD800 . #xFAFF) Surrogate/Private
-              (#xFB00 . #xFFFD)))
-           (upper-ranges
-            '((#x10000 . #x134FF)
+              (#xFB00 . #x134FF)
               ;; (#x13500 . #x167FF) unused
               (#x16800 . #x16A3F)
               ;; (#x16A40 . #x1AFFF) unused
@@ -2928,23 +2922,20 @@ on encoding."
               ;; (#x20000 . #xDFFFF) CJK Ideograph Extension A, B, etc, unused
               (#xE0000 . #xE01FF)))
            (gc-cons-threshold 10000000)
-           c end name names)
-        (dolist (range bmp-ranges)
-          (setq c (car range)
-                end (cdr range))
-         (while (<= c end)
-           (if (setq name (get-char-code-property c 'name))
-               (push (cons name c) names))
-           (if (setq name (get-char-code-property c 'old-name))
-               (push (cons name c) names))
-           (setq c (1+ c))))
-        (dolist (range upper-ranges)
-          (setq c (car range)
-                end (cdr range))
+           names)
+       (dolist (range ranges)
+         (let ((c (car range))
+               (end (cdr range)))
          (while (<= c end)
-           (if (setq name (get-char-code-property c 'name))
-               (push (cons name c) names))
-           (setq c (1+ c))))
+             (let ((new-name (get-char-code-property c 'name))
+                   (old-name (get-char-code-property c 'old-name)))
+               ;; In theory this code could end up pushing an "old-name" that
+               ;; shadows a "new-name" but in practice every time an
+               ;; `old-name' conflicts with a `new-name', the newer one has a
+               ;; higher code, so it gets pushed later!
+               (if new-name (push (cons new-name c) names))
+               (if old-name (push (cons old-name c) names))
+               (setq c (1+ c))))))
        ;; Special case for "BELL" which is apparently the only char which
        ;; doesn't have a new name and whose old-name is shadowed by a newer
        ;; char with that name.
index efafb96538b5ad30bc0f21b8d57303b4bacda97b..42bc5ef1e5c34448fb4628b35fe62973c3bf93cf 100644 (file)
@@ -56,6 +56,9 @@
        (setq i (1+ i)))))
   string)
 
+(defvar truncate-string-ellipsis "..."  ;"…"
+  "String to use to indicate truncation.")
+
 ;;;###autoload
 (defun truncate-string-to-width (str end-column
                                     &optional start-column padding ellipsis)
@@ -80,11 +83,11 @@ If ELLIPSIS is non-nil, it should be a string which will replace the
 end of STR (including any padding) if it extends beyond END-COLUMN,
 unless the display width of STR is equal to or less than the display
 width of ELLIPSIS.  If it is non-nil and not a string, then ELLIPSIS
-defaults to \"...\"."
+defaults to `truncate-string-ellipsis'."
   (or start-column
       (setq start-column 0))
   (when (and ellipsis (not (stringp ellipsis)))
-    (setq ellipsis "..."))
+    (setq ellipsis truncate-string-ellipsis))
   (let ((str-len (length str))
        (str-width (string-width str))
        (ellipsis-len (if ellipsis (length ellipsis) 0))
index 42e6519e38c77fce1dbe51e005cec162bdab0bd8..d346f050415ef0af2faa37fac81daa9122099d16 100644 (file)
@@ -318,10 +318,6 @@ Only applies to the current buffer."
   (remove-hook 'jit-lock-functions fun t)
   (unless jit-lock-functions (jit-lock-mode nil)))
 
-;; This function is used to prevent font-lock-fontify-buffer from
-;; fontifying eagerly the whole buffer.  This is important for
-;; things like CWarn mode which adds/removes a few keywords and
-;; does a refontify (which takes ages on large files).
 (defun jit-lock-refontify (&optional beg end)
   "Force refontification of the region BEG..END (default whole buffer)."
   (with-buffer-prepared-for-jit-lock
index 50d07e3702f4ae6abab0268474ce2a8648c8efdf..b5b94764fe1c20a388e7168b5bcc0cace89ce93f 100644 (file)
@@ -3,7 +3,7 @@
 ;;; Code:
 
 \f
-;;;### (autoloads nil "5x5" "play/5x5.el" (21291 53104 431149 0))
+;;;### (autoloads nil "5x5" "play/5x5.el" (21187 63826 213216 0))
 ;;; Generated autoloads from play/5x5.el
 
 (autoload '5x5 "5x5" "\
@@ -65,8 +65,8 @@ should return a grid vector array that is the new solution.
 
 ;;;***
 \f
-;;;### (autoloads nil "ada-mode" "progmodes/ada-mode.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "ada-mode" "progmodes/ada-mode.el" (21476 41895
+;;;;;;  55661 0))
 ;;; Generated autoloads from progmodes/ada-mode.el
 
 (autoload 'ada-add-extensions "ada-mode" "\
@@ -85,8 +85,8 @@ Ada mode is the major mode for editing Ada code.
 
 ;;;***
 \f
-;;;### (autoloads nil "ada-stmt" "progmodes/ada-stmt.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "ada-stmt" "progmodes/ada-stmt.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from progmodes/ada-stmt.el
 
 (autoload 'ada-header "ada-stmt" "\
@@ -96,8 +96,8 @@ Insert a descriptive header at the top of the file.
 
 ;;;***
 \f
-;;;### (autoloads nil "ada-xref" "progmodes/ada-xref.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "ada-xref" "progmodes/ada-xref.el" (21476 41895
+;;;;;;  55661 0))
 ;;; Generated autoloads from progmodes/ada-xref.el
 
 (autoload 'ada-find-file "ada-xref" "\
@@ -108,7 +108,7 @@ Completion is available.
 
 ;;;***
 \f
-;;;### (autoloads nil "add-log" "vc/add-log.el" (21291 53104 431149
+;;;### (autoloads nil "add-log" "vc/add-log.el" (21541 15655 55679
 ;;;;;;  0))
 ;;; Generated autoloads from vc/add-log.el
 
@@ -238,8 +238,8 @@ old-style time formats for entries are supported.
 
 ;;;***
 \f
-;;;### (autoloads nil "advice" "emacs-lisp/advice.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "advice" "emacs-lisp/advice.el" (21278 229
+;;;;;;  682967 799000))
 ;;; Generated autoloads from emacs-lisp/advice.el
 
 (defvar ad-redefinition-action 'warn "\
@@ -368,13 +368,13 @@ usage: (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...)
 
 \(fn FUNCTION ARGS &rest BODY)" nil t)
 
-(put 'defadvice 'doc-string-elt '3)
+(function-put 'defadvice 'doc-string-elt '3)
 
-(put 'defadvice 'lisp-indent-function '2)
+(function-put 'defadvice 'lisp-indent-function '2)
 
 ;;;***
 \f
-;;;### (autoloads nil "align" "align.el" (21418 19288 912946 0))
+;;;### (autoloads nil "align" "align.el" (21417 20521 870414 0))
 ;;; Generated autoloads from align.el
 
 (autoload 'align "align" "\
@@ -477,7 +477,7 @@ A replacement function for `newline-and-indent', aligning as it goes.
 
 ;;;***
 \f
-;;;### (autoloads nil "allout" "allout.el" (21291 53104 431149 0))
+;;;### (autoloads nil "allout" "allout.el" (21187 63826 213216 0))
 ;;; Generated autoloads from allout.el
 (push (purecopy '(allout 2 3)) package--builtin-versions)
 
@@ -837,8 +837,8 @@ for details on preparing Emacs for automatic allout activation.
 
 ;;;***
 \f
-;;;### (autoloads nil "allout-widgets" "allout-widgets.el" (21346
-;;;;;;  62196 327729 0))
+;;;### (autoloads nil "allout-widgets" "allout-widgets.el" (21350
+;;;;;;  58112 380040 0))
 ;;; Generated autoloads from allout-widgets.el
 (push (purecopy '(allout-widgets 1 0)) package--builtin-versions)
 
@@ -896,7 +896,7 @@ outline hot-spot navigation (see `allout-mode').
 
 ;;;***
 \f
-;;;### (autoloads nil "ange-ftp" "net/ange-ftp.el" (21291 53104 431149
+;;;### (autoloads nil "ange-ftp" "net/ange-ftp.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from net/ange-ftp.el
 
@@ -918,7 +918,7 @@ directory, so that Emacs will know its current contents.
 
 ;;;***
 \f
-;;;### (autoloads nil "animate" "play/animate.el" (21291 53104 431149
+;;;### (autoloads nil "animate" "play/animate.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from play/animate.el
 
@@ -951,7 +951,7 @@ the buffer *Birthday-Present-for-Name*.
 
 ;;;***
 \f
-;;;### (autoloads nil "ansi-color" "ansi-color.el" (21291 53104 431149
+;;;### (autoloads nil "ansi-color" "ansi-color.el" (21277 37159 898165
 ;;;;;;  0))
 ;;; Generated autoloads from ansi-color.el
 (push (purecopy '(ansi-color 3 4 2)) package--builtin-versions)
@@ -978,8 +978,8 @@ This is a good function to put in `comint-output-filter-functions'.
 
 ;;;***
 \f
-;;;### (autoloads nil "antlr-mode" "progmodes/antlr-mode.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "antlr-mode" "progmodes/antlr-mode.el" (21208
+;;;;;;  39903 471297 312000))
 ;;; Generated autoloads from progmodes/antlr-mode.el
 (push (purecopy '(antlr-mode 2 2 3)) package--builtin-versions)
 
@@ -1015,7 +1015,7 @@ Used in `antlr-mode'.  Also a useful function in `java-mode-hook'.
 
 ;;;***
 \f
-;;;### (autoloads nil "appt" "calendar/appt.el" (21291 53104 431149
+;;;### (autoloads nil "appt" "calendar/appt.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from calendar/appt.el
 
@@ -1037,7 +1037,7 @@ ARG is positive, otherwise off.
 
 ;;;***
 \f
-;;;### (autoloads nil "apropos" "apropos.el" (21291 53104 431149
+;;;### (autoloads nil "apropos" "apropos.el" (21259 10807 217062
 ;;;;;;  0))
 ;;; Generated autoloads from apropos.el
 
@@ -1153,7 +1153,7 @@ Returns list of symbols and documentation found.
 
 ;;;***
 \f
-;;;### (autoloads nil "arc-mode" "arc-mode.el" (21291 53104 431149
+;;;### (autoloads nil "arc-mode" "arc-mode.el" (21476 41895 55661
 ;;;;;;  0))
 ;;; Generated autoloads from arc-mode.el
 
@@ -1174,7 +1174,7 @@ archive.
 
 ;;;***
 \f
-;;;### (autoloads nil "array" "array.el" (21291 53104 431149 0))
+;;;### (autoloads nil "array" "array.el" (21240 46395 727291 0))
 ;;; Generated autoloads from array.el
 
 (autoload 'array-mode "array" "\
@@ -1245,8 +1245,8 @@ Entering array mode calls the function `array-mode-hook'.
 
 ;;;***
 \f
-;;;### (autoloads nil "artist" "textmodes/artist.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "artist" "textmodes/artist.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from textmodes/artist.el
 (push (purecopy '(artist 1 2 6)) package--builtin-versions)
 
@@ -1452,8 +1452,8 @@ Keymap summary
 
 ;;;***
 \f
-;;;### (autoloads nil "asm-mode" "progmodes/asm-mode.el" (21419 46255
-;;;;;;  468379 0))
+;;;### (autoloads nil "asm-mode" "progmodes/asm-mode.el" (21419 62246
+;;;;;;  751914 0))
 ;;; Generated autoloads from progmodes/asm-mode.el
 
 (autoload 'asm-mode "asm-mode" "\
@@ -1480,8 +1480,8 @@ Special commands:
 
 ;;;***
 \f
-;;;### (autoloads nil "auth-source" "gnus/auth-source.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "auth-source" "gnus/auth-source.el" (21342
+;;;;;;  10917 902592 0))
 ;;; Generated autoloads from gnus/auth-source.el
 
 (defvar auth-source-cache-expiry 7200 "\
@@ -1493,7 +1493,7 @@ let-binding.")
 
 ;;;***
 \f
-;;;### (autoloads nil "autoarg" "autoarg.el" (21291 53104 431149
+;;;### (autoloads nil "autoarg" "autoarg.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from autoarg.el
 
@@ -1554,8 +1554,8 @@ This is similar to `autoarg-mode' but rebinds the keypad keys
 
 ;;;***
 \f
-;;;### (autoloads nil "autoconf" "progmodes/autoconf.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "autoconf" "progmodes/autoconf.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from progmodes/autoconf.el
 
 (autoload 'autoconf-mode "autoconf" "\
@@ -1565,7 +1565,7 @@ Major mode for editing Autoconf configure.ac files.
 
 ;;;***
 \f
-;;;### (autoloads nil "autoinsert" "autoinsert.el" (21291 53104 431149
+;;;### (autoloads nil "autoinsert" "autoinsert.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from autoinsert.el
 
@@ -1604,14 +1604,16 @@ insert a template for the file depending on the mode of the buffer.
 
 ;;;***
 \f
-;;;### (autoloads nil "autoload" "emacs-lisp/autoload.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "autoload" "emacs-lisp/autoload.el" (21425
+;;;;;;  43779 760127 645000))
 ;;; Generated autoloads from emacs-lisp/autoload.el
 
 (put 'generated-autoload-file 'safe-local-variable 'stringp)
 
 (put 'generated-autoload-load-name 'safe-local-variable 'stringp)
 
+(put 'autoload-ensure-writable 'risky-local-variable t)
+
 (autoload 'update-file-autoloads "autoload" "\
 Update the autoloads for FILE.
 If prefix arg SAVE-AFTER is non-nil, save the buffer too.
@@ -1654,7 +1656,7 @@ should be non-nil).
 
 ;;;***
 \f
-;;;### (autoloads nil "autorevert" "autorevert.el" (21310 8261 281810
+;;;### (autoloads nil "autorevert" "autorevert.el" (21315 5521 187938
 ;;;;;;  0))
 ;;; Generated autoloads from autorevert.el
 
@@ -1743,7 +1745,7 @@ specifies in the mode line.
 
 ;;;***
 \f
-;;;### (autoloads nil "avoid" "avoid.el" (21372 5105 739240 0))
+;;;### (autoloads nil "avoid" "avoid.el" (21379 5287 607434 0))
 ;;; Generated autoloads from avoid.el
 
 (defvar mouse-avoidance-mode nil "\
@@ -1781,8 +1783,8 @@ definition of \"random distance\".)
 
 ;;;***
 \f
-;;;### (autoloads nil "bat-mode" "progmodes/bat-mode.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "bat-mode" "progmodes/bat-mode.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from progmodes/bat-mode.el
 
 (add-to-list 'auto-mode-alist '("\\.\\(bat\\|cmd\\)\\'" . bat-mode))
@@ -1800,8 +1802,7 @@ Run script using `bat-run' and `bat-run-args'.
 
 ;;;***
 \f
-;;;### (autoloads nil "battery" "battery.el" (21341 23900 988149
-;;;;;;  0))
+;;;### (autoloads nil "battery" "battery.el" (21346 7974 405729 0))
 ;;; Generated autoloads from battery.el
  (put 'battery-mode-line-string 'risky-local-variable t)
 
@@ -1836,8 +1837,8 @@ seconds.
 
 ;;;***
 \f
-;;;### (autoloads nil "benchmark" "emacs-lisp/benchmark.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "benchmark" "emacs-lisp/benchmark.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from emacs-lisp/benchmark.el
 
 (autoload 'benchmark-run "benchmark" "\
@@ -1851,7 +1852,7 @@ See also `benchmark-run-compiled'.
 
 \(fn &optional REPETITIONS &rest FORMS)" nil t)
 
-(put 'benchmark-run 'lisp-indent-function '1)
+(function-put 'benchmark-run 'lisp-indent-function '1)
 
 (autoload 'benchmark-run-compiled "benchmark" "\
 Time execution of compiled version of FORMS.
@@ -1861,7 +1862,7 @@ result.  The overhead of the `lambda's is accounted for.
 
 \(fn &optional REPETITIONS &rest FORMS)" nil t)
 
-(put 'benchmark-run-compiled 'lisp-indent-function '1)
+(function-put 'benchmark-run-compiled 'lisp-indent-function '1)
 
 (autoload 'benchmark "benchmark" "\
 Print the time taken for REPETITIONS executions of FORM.
@@ -1873,8 +1874,8 @@ For non-interactive use see also `benchmark-run' and
 
 ;;;***
 \f
-;;;### (autoloads nil "bibtex" "textmodes/bibtex.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "bibtex" "textmodes/bibtex.el" (21414 44327
+;;;;;;  790846 0))
 ;;; Generated autoloads from textmodes/bibtex.el
 
 (autoload 'bibtex-initialize "bibtex" "\
@@ -1966,7 +1967,7 @@ A prefix arg negates the value of `bibtex-search-entry-globally'.
 ;;;***
 \f
 ;;;### (autoloads nil "bibtex-style" "textmodes/bibtex-style.el"
-;;;;;;  (21291 53104 431149 0))
+;;;;;;  (21187 63826 213216 0))
 ;;; Generated autoloads from textmodes/bibtex-style.el
 
 (autoload 'bibtex-style-mode "bibtex-style" "\
@@ -1976,7 +1977,7 @@ Major mode for editing BibTeX style files.
 
 ;;;***
 \f
-;;;### (autoloads nil "binhex" "mail/binhex.el" (21291 53104 431149
+;;;### (autoloads nil "binhex" "mail/binhex.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from mail/binhex.el
 
@@ -2001,8 +2002,8 @@ Binhex decode region between START and END.
 
 ;;;***
 \f
-;;;### (autoloads nil "blackbox" "play/blackbox.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "blackbox" "play/blackbox.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from play/blackbox.el
 
 (autoload 'blackbox "blackbox" "\
@@ -2121,7 +2122,7 @@ a reflection.
 
 ;;;***
 \f
-;;;### (autoloads nil "bookmark" "bookmark.el" (21396 5125 546680
+;;;### (autoloads nil "bookmark" "bookmark.el" (21397 35239 170099
 ;;;;;;  0))
 ;;; Generated autoloads from bookmark.el
  (define-key ctl-x-r-map "b" 'bookmark-jump)
@@ -2248,10 +2249,11 @@ probably because we were called from there.
 
 (autoload 'bookmark-write "bookmark" "\
 Write bookmarks to a file (reading the file name with the minibuffer).
-Don't use this in Lisp programs; use `bookmark-save' instead.
 
 \(fn)" t nil)
 
+(function-put 'bookmark-write 'interactive-only 'bookmark-save)
+
 (autoload 'bookmark-save "bookmark" "\
 Save currently defined bookmarks.
 Saves by default in the file defined by the variable
@@ -2314,8 +2316,8 @@ Incremental search of bookmarks, hiding the non-matches as we go.
 
 ;;;***
 \f
-;;;### (autoloads nil "browse-url" "net/browse-url.el" (21362 56326
-;;;;;;  483293 0))
+;;;### (autoloads nil "browse-url" "net/browse-url.el" (21364 37926
+;;;;;;  837230 0))
 ;;; Generated autoloads from net/browse-url.el
 
 (defvar browse-url-browser-function 'browse-url-default-browser "\
@@ -2630,7 +2632,7 @@ from `browse-url-elinks-wrapper'.
 
 ;;;***
 \f
-;;;### (autoloads nil "bs" "bs.el" (21452 38897 477078 478000))
+;;;### (autoloads nil "bs" "bs.el" (21452 59559 901066 0))
 ;;; Generated autoloads from bs.el
 (push (purecopy '(bs 1 17)) package--builtin-versions)
 
@@ -2671,7 +2673,7 @@ name of buffer configuration.
 
 ;;;***
 \f
-;;;### (autoloads nil "bubbles" "play/bubbles.el" (21291 53104 431149
+;;;### (autoloads nil "bubbles" "play/bubbles.el" (21410 47268 609529
 ;;;;;;  0))
 ;;; Generated autoloads from play/bubbles.el
 
@@ -2694,7 +2696,7 @@ columns on its right towards the left.
 ;;;***
 \f
 ;;;### (autoloads nil "bug-reference" "progmodes/bug-reference.el"
-;;;;;;  (21291 53104 431149 0))
+;;;;;;  (21187 63826 213216 0))
 ;;; Generated autoloads from progmodes/bug-reference.el
 
 (put 'bug-reference-url-format 'safe-local-variable (lambda (s) (or (stringp s) (and (symbolp s) (get s 'bug-reference-url-format)))))
@@ -2714,8 +2716,8 @@ Like `bug-reference-mode', but only buttonize in comments and strings.
 
 ;;;***
 \f
-;;;### (autoloads nil "bytecomp" "emacs-lisp/bytecomp.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "bytecomp" "emacs-lisp/bytecomp.el" (21543
+;;;;;;  57381 284584 0))
 ;;; Generated autoloads from emacs-lisp/bytecomp.el
 (put 'byte-compile-dynamic 'safe-local-variable 'booleanp)
 (put 'byte-compile-disable-print-circle 'safe-local-variable 'booleanp)
@@ -2835,8 +2837,8 @@ and corresponding effects.
 
 ;;;***
 \f
-;;;### (autoloads nil "cal-china" "calendar/cal-china.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "cal-china" "calendar/cal-china.el" (21350
+;;;;;;  5031 352444 0))
 ;;; Generated autoloads from calendar/cal-china.el
 
 (put 'calendar-chinese-time-zone 'risky-local-variable t)
@@ -2845,8 +2847,8 @@ and corresponding effects.
 
 ;;;***
 \f
-;;;### (autoloads nil "cal-dst" "calendar/cal-dst.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "cal-dst" "calendar/cal-dst.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from calendar/cal-dst.el
 
 (put 'calendar-daylight-savings-starts 'risky-local-variable t)
@@ -2857,8 +2859,8 @@ and corresponding effects.
 
 ;;;***
 \f
-;;;### (autoloads nil "cal-hebrew" "calendar/cal-hebrew.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "cal-hebrew" "calendar/cal-hebrew.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from calendar/cal-hebrew.el
 
 (autoload 'calendar-hebrew-list-yahrzeits "cal-hebrew" "\
@@ -2872,7 +2874,7 @@ from the cursor position.
 
 ;;;***
 \f
-;;;### (autoloads nil "calc" "calc/calc.el" (21421 999 106354 0))
+;;;### (autoloads nil "calc" "calc/calc.el" (21377 49959 896066 0))
 ;;; Generated autoloads from calc/calc.el
  (define-key ctl-x-map "*" 'calc-dispatch)
 
@@ -2952,12 +2954,12 @@ See Info node `(calc)Defining Functions'.
 
 \(fn FUNC ARGS &rest BODY)" nil t)
 
-(put 'defmath 'doc-string-elt '3)
+(function-put 'defmath 'doc-string-elt '3)
 
 ;;;***
 \f
-;;;### (autoloads nil "calc-undo" "calc/calc-undo.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "calc-undo" "calc/calc-undo.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from calc/calc-undo.el
 
 (autoload 'calc-undo "calc-undo" "\
@@ -2967,7 +2969,7 @@ See Info node `(calc)Defining Functions'.
 
 ;;;***
 \f
-;;;### (autoloads nil "calculator" "calculator.el" (21291 53104 431149
+;;;### (autoloads nil "calculator" "calculator.el" (21417 20521 870414
 ;;;;;;  0))
 ;;; Generated autoloads from calculator.el
 
@@ -2979,8 +2981,8 @@ See the documentation for `calculator-mode' for more information.
 
 ;;;***
 \f
-;;;### (autoloads nil "calendar" "calendar/calendar.el" (21517 17755
-;;;;;;  154419 0))
+;;;### (autoloads nil "calendar" "calendar/calendar.el" (21546 33576
+;;;;;;  601815 0))
 ;;; Generated autoloads from calendar/calendar.el
 
 (autoload 'calendar "calendar" "\
@@ -3023,7 +3025,7 @@ This function is suitable for execution in an init file.
 
 ;;;***
 \f
-;;;### (autoloads nil "canlock" "gnus/canlock.el" (21291 53104 431149
+;;;### (autoloads nil "canlock" "gnus/canlock.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from gnus/canlock.el
 
@@ -3041,55 +3043,15 @@ it fails.
 
 ;;;***
 \f
-;;;### (autoloads nil "cap-words" "progmodes/cap-words.el" (21291
-;;;;;;  53104 431149 0))
-;;; Generated autoloads from progmodes/cap-words.el
-
-(autoload 'capitalized-words-mode "cap-words" "\
-Toggle Capitalized Words mode.
-With a prefix argument ARG, enable Capitalized Words mode if ARG
-is positive, and disable it otherwise.  If called from Lisp,
-enable the mode if ARG is omitted or nil.
-
-Capitalized Words mode is a buffer-local minor mode.  When
-enabled, a word boundary occurs immediately before an uppercase
-letter in a symbol.  This is in addition to all the normal
-boundaries given by the syntax and category tables.  There is no
-restriction to ASCII.
-
-E.g. the beginning of words in the following identifier are as marked:
-
-  capitalizedWorDD
-  ^          ^  ^^
-
-Note that these word boundaries only apply for word motion and
-marking commands such as \\[forward-word].  This mode does not affect word
-boundaries found by regexp matching (`\\>', `\\w' &c).
-
-This style of identifiers is common in environments like Java ones,
-where underscores aren't trendy enough.  Capitalization rules are
-sometimes part of the language, e.g. Haskell, which may thus encourage
-such a style.  It is appropriate to add `capitalized-words-mode' to
-the mode hook for programming language modes in which you encounter
-variables like this, e.g. `java-mode-hook'.  It's unlikely to cause
-trouble if such identifiers aren't used.
-
-See also `glasses-mode' and `studlify-word'.
-Obsoletes `c-forward-into-nomenclature'.
-
-\(fn &optional ARG)" t nil)
-
-;;;***
-\f
-;;;### (autoloads nil "cc-compat" "progmodes/cc-compat.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "cc-compat" "progmodes/cc-compat.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from progmodes/cc-compat.el
 (put 'c-indent-level 'safe-local-variable 'integerp)
 
 ;;;***
 \f
-;;;### (autoloads nil "cc-engine" "progmodes/cc-engine.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "cc-engine" "progmodes/cc-engine.el" (21522
+;;;;;;  51241 590401 0))
 ;;; Generated autoloads from progmodes/cc-engine.el
 
 (autoload 'c-guess-basic-syntax "cc-engine" "\
@@ -3099,8 +3061,8 @@ Return the syntactic context of the current line.
 
 ;;;***
 \f
-;;;### (autoloads nil "cc-guess" "progmodes/cc-guess.el" (21307 46976
-;;;;;;  832220 0))
+;;;### (autoloads nil "cc-guess" "progmodes/cc-guess.el" (21419 62246
+;;;;;;  751914 0))
 ;;; Generated autoloads from progmodes/cc-guess.el
 
 (defvar c-guess-guessed-offsets-alist nil "\
@@ -3198,8 +3160,8 @@ the absolute file name of the file if STYLE-NAME is nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "cc-mode" "progmodes/cc-mode.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "cc-mode" "progmodes/cc-mode.el" (21269 46645
+;;;;;;  763684 0))
 ;;; Generated autoloads from progmodes/cc-mode.el
 
 (autoload 'c-initialize-cc-mode "cc-mode" "\
@@ -3356,8 +3318,8 @@ Key bindings:
 
 ;;;***
 \f
-;;;### (autoloads nil "cc-styles" "progmodes/cc-styles.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "cc-styles" "progmodes/cc-styles.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from progmodes/cc-styles.el
 
 (autoload 'c-set-style "cc-styles" "\
@@ -3408,8 +3370,8 @@ and exists only for compatibility reasons.
 
 ;;;***
 \f
-;;;### (autoloads nil "cc-vars" "progmodes/cc-vars.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "cc-vars" "progmodes/cc-vars.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from progmodes/cc-vars.el
 (put 'c-basic-offset 'safe-local-variable 'integerp)
 (put 'c-backslash-column 'safe-local-variable 'integerp)
@@ -3417,7 +3379,7 @@ and exists only for compatibility reasons.
 
 ;;;***
 \f
-;;;### (autoloads nil "ccl" "international/ccl.el" (21291 53104 431149
+;;;### (autoloads nil "ccl" "international/ccl.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from international/ccl.el
 
@@ -3657,7 +3619,7 @@ MAP-ID := integer
 
 \(fn NAME CCL-PROGRAM &optional DOC)" nil t)
 
-(put 'define-ccl-program 'doc-string-elt '3)
+(function-put 'define-ccl-program 'doc-string-elt '3)
 
 (autoload 'check-ccl-program "ccl" "\
 Check validity of CCL-PROGRAM.
@@ -3678,8 +3640,8 @@ See the documentation of `define-ccl-program' for the detail of CCL program.
 
 ;;;***
 \f
-;;;### (autoloads nil "cconv" "emacs-lisp/cconv.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "cconv" "emacs-lisp/cconv.el" (21543 57381
+;;;;;;  284584 0))
 ;;; Generated autoloads from emacs-lisp/cconv.el
 
 (autoload 'cconv-closure-convert "cconv" "\
@@ -3698,15 +3660,15 @@ Add the warnings that closure conversion would encounter.
 
 ;;;***
 \f
-;;;### (autoloads nil "cedet" "cedet/cedet.el" (21291 53104 431149
+;;;### (autoloads nil "cedet" "cedet/cedet.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from cedet/cedet.el
 (push (purecopy '(cedet 2 0)) package--builtin-versions)
 
 ;;;***
 \f
-;;;### (autoloads nil "cfengine" "progmodes/cfengine.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "cfengine" "progmodes/cfengine.el" (21226 13501
+;;;;;;  706948 0))
 ;;; Generated autoloads from progmodes/cfengine.el
 (push (purecopy '(cfengine 1 3)) package--builtin-versions)
 
@@ -3736,15 +3698,15 @@ on the buffer contents
 
 ;;;***
 \f
-;;;### (autoloads nil "chart" "emacs-lisp/chart.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "chart" "emacs-lisp/chart.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from emacs-lisp/chart.el
 (push (purecopy '(chart 0 2)) package--builtin-versions)
 
 ;;;***
 \f
 ;;;### (autoloads nil "check-declare" "emacs-lisp/check-declare.el"
-;;;;;;  (21291 53104 431149 0))
+;;;;;;  (21187 63826 213216 0))
 ;;; Generated autoloads from emacs-lisp/check-declare.el
 
 (autoload 'check-declare-file "check-declare" "\
@@ -3761,8 +3723,8 @@ Returns non-nil if any false statements are found.
 
 ;;;***
 \f
-;;;### (autoloads nil "checkdoc" "emacs-lisp/checkdoc.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "checkdoc" "emacs-lisp/checkdoc.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from emacs-lisp/checkdoc.el
 (push (purecopy '(checkdoc 0 6 2)) package--builtin-versions)
 (put 'checkdoc-force-docstrings-flag 'safe-local-variable #'booleanp)
@@ -3962,8 +3924,8 @@ checking of documentation strings.
 
 ;;;***
 \f
-;;;### (autoloads nil "china-util" "language/china-util.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "china-util" "language/china-util.el" (21197
+;;;;;;  43194 200483 0))
 ;;; Generated autoloads from language/china-util.el
 
 (autoload 'decode-hz-region "china-util" "\
@@ -4000,7 +3962,7 @@ Encode the text in the current buffer to HZ.
 
 ;;;***
 \f
-;;;### (autoloads nil "chistory" "chistory.el" (21291 53104 431149
+;;;### (autoloads nil "chistory" "chistory.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from chistory.el
 
@@ -4040,8 +4002,8 @@ and runs the normal hook `command-history-hook'.
 
 ;;;***
 \f
-;;;### (autoloads nil "cl-indent" "emacs-lisp/cl-indent.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "cl-indent" "emacs-lisp/cl-indent.el" (21318
+;;;;;;  28582 821557 0))
 ;;; Generated autoloads from emacs-lisp/cl-indent.el
 
 (autoload 'common-lisp-indent-function "cl-indent" "\
@@ -4115,12 +4077,17 @@ For example, the function `case' has an indent property
     of them.  The first list element has an offset of 2, all the rest
     have an offset of 2+1=3.
 
+If the current mode is actually `emacs-lisp-mode', look for a
+`common-lisp-indent-function-for-elisp' property before looking
+at `common-lisp-indent-function' and, if set, use its value
+instead.
+
 \(fn INDENT-POINT STATE)" nil nil)
 
 ;;;***
 \f
-;;;### (autoloads nil "cl-lib" "emacs-lisp/cl-lib.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "cl-lib" "emacs-lisp/cl-lib.el" (21541 15655
+;;;;;;  55679 0))
 ;;; Generated autoloads from emacs-lisp/cl-lib.el
 (push (purecopy '(cl-lib 1 0)) package--builtin-versions)
 
@@ -4150,8 +4117,8 @@ a future Emacs interpreter will be able to use it.")
 
 ;;;***
 \f
-;;;### (autoloads nil "cmacexp" "progmodes/cmacexp.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "cmacexp" "progmodes/cmacexp.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from progmodes/cmacexp.el
 
 (autoload 'c-macro-expand "cmacexp" "\
@@ -4171,7 +4138,7 @@ For use inside Lisp programs, see also `c-macro-expansion'.
 
 ;;;***
 \f
-;;;### (autoloads nil "cmuscheme" "cmuscheme.el" (21291 53104 431149
+;;;### (autoloads nil "cmuscheme" "cmuscheme.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from cmuscheme.el
 
@@ -4192,7 +4159,7 @@ is run).
 
 ;;;***
 \f
-;;;### (autoloads nil "color" "color.el" (21291 53104 431149 0))
+;;;### (autoloads nil "color" "color.el" (21187 63826 213216 0))
 ;;; Generated autoloads from color.el
 
 (autoload 'color-name-to-rgb "color" "\
@@ -4211,7 +4178,7 @@ If FRAME cannot display COLOR, return nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "comint" "comint.el" (21341 23900 988149 0))
+;;;### (autoloads nil "comint" "comint.el" (21339 34726 39547 0))
 ;;; Generated autoloads from comint.el
 
 (defvar comint-output-filter-functions '(ansi-color-process-output comint-postoutput-scroll-to-bottom comint-watch-for-password-prompt) "\
@@ -4273,6 +4240,8 @@ See `make-comint' and `comint-exec'.
 
 \(fn PROGRAM)" t nil)
 
+(function-put 'comint-run 'interactive-only 'make-comint)
+
 (defvar comint-file-name-prefix (purecopy "") "\
 Prefix prepended to absolute file names taken from process input.
 This is used by Comint's and shell's completion functions, and by shell's
@@ -4310,8 +4279,8 @@ REGEXP-GROUP is the regular expression group in REGEXP to use.
 
 ;;;***
 \f
-;;;### (autoloads nil "compare-w" "vc/compare-w.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "compare-w" "vc/compare-w.el" (21240 46395
+;;;;;;  727291 0))
 ;;; Generated autoloads from vc/compare-w.el
 
 (autoload 'compare-windows "compare-w" "\
@@ -4344,8 +4313,8 @@ on third call it again advances points to the next difference and so on.
 
 ;;;***
 \f
-;;;### (autoloads nil "compile" "progmodes/compile.el" (21358 35866
-;;;;;;  898057 0))
+;;;### (autoloads nil "compile" "progmodes/compile.el" (21484 36010
+;;;;;;  707226 0))
 ;;; Generated autoloads from progmodes/compile.el
 
 (defvar compilation-mode-hook nil "\
@@ -4526,7 +4495,7 @@ This is the value of `next-error-function' in Compilation buffers.
 
 ;;;***
 \f
-;;;### (autoloads nil "completion" "completion.el" (21291 53104 431149
+;;;### (autoloads nil "completion" "completion.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from completion.el
 
@@ -4549,8 +4518,8 @@ if ARG is omitted or nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "conf-mode" "textmodes/conf-mode.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "conf-mode" "textmodes/conf-mode.el" (21383
+;;;;;;  2343 498187 0))
 ;;; Generated autoloads from textmodes/conf-mode.el
 
 (autoload 'conf-mode "conf-mode" "\
@@ -4705,7 +4674,7 @@ For details see `conf-mode'.  Example:
 
 ;;;***
 \f
-;;;### (autoloads nil "cookie1" "play/cookie1.el" (21291 53104 431149
+;;;### (autoloads nil "cookie1" "play/cookie1.el" (21245 64312 799897
 ;;;;;;  0))
 ;;; Generated autoloads from play/cookie1.el
 
@@ -4734,8 +4703,8 @@ and subsequent calls on the same file won't go to disk.
 
 ;;;***
 \f
-;;;### (autoloads nil "copyright" "emacs-lisp/copyright.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "copyright" "emacs-lisp/copyright.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from emacs-lisp/copyright.el
 (put 'copyright-at-end-flag 'safe-local-variable 'booleanp)
 (put 'copyright-names-regexp 'safe-local-variable 'stringp)
@@ -4773,8 +4742,8 @@ If FIX is non-nil, run `copyright-fix-years' instead.
 
 ;;;***
 \f
-;;;### (autoloads nil "cperl-mode" "progmodes/cperl-mode.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "cperl-mode" "progmodes/cperl-mode.el" (21438
+;;;;;;  26670 609361 0))
 ;;; Generated autoloads from progmodes/cperl-mode.el
 (put 'cperl-indent-level 'safe-local-variable 'integerp)
 (put 'cperl-brace-offset 'safe-local-variable 'integerp)
@@ -4972,7 +4941,7 @@ Run a `perldoc' on the word around point.
 
 ;;;***
 \f
-;;;### (autoloads nil "cpp" "progmodes/cpp.el" (21291 53104 431149
+;;;### (autoloads nil "cpp" "progmodes/cpp.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from progmodes/cpp.el
 
@@ -4991,33 +4960,7 @@ Edit display information for cpp conditionals.
 
 ;;;***
 \f
-;;;### (autoloads nil "crisp" "emulation/crisp.el" (21291 53104 431149
-;;;;;;  0))
-;;; Generated autoloads from emulation/crisp.el
-
-(defvar crisp-mode nil "\
-Track status of CRiSP emulation mode.
-A value of nil means CRiSP mode is not enabled.  A value of t
-indicates CRiSP mode is enabled.
-
-Setting this variable directly does not take effect;
-use either M-x customize or the function `crisp-mode'.")
-
-(custom-autoload 'crisp-mode "crisp" nil)
-
-(autoload 'crisp-mode "crisp" "\
-Toggle CRiSP/Brief emulation (CRiSP mode).
-With a prefix argument ARG, enable CRiSP mode if ARG is positive,
-and disable it otherwise.  If called from Lisp, enable the mode
-if ARG is omitted or nil.
-
-\(fn &optional ARG)" t nil)
-
-(defalias 'brief-mode 'crisp-mode)
-
-;;;***
-\f
-;;;### (autoloads nil "crm" "emacs-lisp/crm.el" (21291 53104 431149
+;;;### (autoloads nil "crm" "emacs-lisp/crm.el" (21263 7861 493097
 ;;;;;;  0))
 ;;; Generated autoloads from emacs-lisp/crm.el
 
@@ -5044,8 +4987,8 @@ with empty strings removed.
 
 ;;;***
 \f
-;;;### (autoloads nil "css-mode" "textmodes/css-mode.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "css-mode" "textmodes/css-mode.el" (21285 31272
+;;;;;;  331063 0))
 ;;; Generated autoloads from textmodes/css-mode.el
 
 (autoload 'css-mode "css-mode" "\
@@ -5055,8 +4998,8 @@ Major mode to edit Cascading Style Sheets.
 
 ;;;***
 \f
-;;;### (autoloads nil "cua-base" "emulation/cua-base.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "cua-base" "emulation/cua-base.el" (21319 49445
+;;;;;;  508378 0))
 ;;; Generated autoloads from emulation/cua-base.el
 
 (defvar cua-mode nil "\
@@ -5101,8 +5044,8 @@ Enable CUA selection mode without the C-z/C-x/C-c/C-v bindings.
 
 ;;;***
 \f
-;;;### (autoloads nil "cua-rect" "emulation/cua-rect.el" (21501 26335
-;;;;;;  264462 0))
+;;;### (autoloads nil "cua-rect" "emulation/cua-rect.el" (21503 425
+;;;;;;  992235 0))
 ;;; Generated autoloads from emulation/cua-rect.el
 
 (autoload 'cua-rectangle-mark-mode "cua-rect" "\
@@ -5113,8 +5056,8 @@ Activates the region if needed.  Only lasts until the region is deactivated.
 
 ;;;***
 \f
-;;;### (autoloads nil "cus-edit" "cus-edit.el" (21423 31150 636189
-;;;;;;  289000))
+;;;### (autoloads nil "cus-edit" "cus-edit.el" (21429 11690 49391
+;;;;;;  0))
 ;;; Generated autoloads from cus-edit.el
 
 (defvar custom-browse-sort-alphabetically nil "\
@@ -5426,7 +5369,7 @@ The format is suitable for use with `easy-menu-define'.
 
 ;;;***
 \f
-;;;### (autoloads nil "cus-theme" "cus-theme.el" (21291 53104 431149
+;;;### (autoloads nil "cus-theme" "cus-theme.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from cus-theme.el
 
@@ -5460,8 +5403,8 @@ omitted, a buffer named *Custom Themes* is used.
 
 ;;;***
 \f
-;;;### (autoloads nil "cvs-status" "vc/cvs-status.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "cvs-status" "vc/cvs-status.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from vc/cvs-status.el
 
 (autoload 'cvs-status-mode "cvs-status" "\
@@ -5471,7 +5414,7 @@ Mode used for cvs status output.
 
 ;;;***
 \f
-;;;### (autoloads nil "cwarn" "progmodes/cwarn.el" (21291 53104 431149
+;;;### (autoloads nil "cwarn" "progmodes/cwarn.el" (21383 2343 498187
 ;;;;;;  0))
 ;;; Generated autoloads from progmodes/cwarn.el
 (push (purecopy '(cwarn 1 3 1)) package--builtin-versions)
@@ -5516,8 +5459,8 @@ See `cwarn-mode' for more information on Cwarn mode.
 
 ;;;***
 \f
-;;;### (autoloads nil "cyril-util" "language/cyril-util.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "cyril-util" "language/cyril-util.el" (21193
+;;;;;;  16180 875828 0))
 ;;; Generated autoloads from language/cyril-util.el
 
 (autoload 'cyrillic-encode-koi8-r-char "cyril-util" "\
@@ -5545,7 +5488,7 @@ If the argument is nil, we return the display table to its standard state.
 
 ;;;***
 \f
-;;;### (autoloads nil "dabbrev" "dabbrev.el" (21291 53104 431149
+;;;### (autoloads nil "dabbrev" "dabbrev.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from dabbrev.el
 (put 'dabbrev-case-fold-search 'risky-local-variable t)
@@ -5592,8 +5535,8 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion].
 
 ;;;***
 \f
-;;;### (autoloads nil "data-debug" "cedet/data-debug.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "data-debug" "cedet/data-debug.el" (21197 43194
+;;;;;;  200483 0))
 ;;; Generated autoloads from cedet/data-debug.el
 
 (autoload 'data-debug-new-buffer "data-debug" "\
@@ -5603,7 +5546,7 @@ Create a new data-debug buffer with NAME.
 
 ;;;***
 \f
-;;;### (autoloads nil "dbus" "net/dbus.el" (21405 56335 157417 0))
+;;;### (autoloads nil "dbus" "net/dbus.el" (21430 32550 215986 0))
 ;;; Generated autoloads from net/dbus.el
 
 (autoload 'dbus-handle-event "dbus" "\
@@ -5616,8 +5559,8 @@ If the HANDLER returns a `dbus-error', it is propagated as return message.
 
 ;;;***
 \f
-;;;### (autoloads nil "dcl-mode" "progmodes/dcl-mode.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "dcl-mode" "progmodes/dcl-mode.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from progmodes/dcl-mode.el
 
 (autoload 'dcl-mode "dcl-mode" "\
@@ -5743,8 +5686,8 @@ There is some minimal font-lock support (see vars
 
 ;;;***
 \f
-;;;### (autoloads nil "debug" "emacs-lisp/debug.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "debug" "emacs-lisp/debug.el" (21240 46395
+;;;;;;  727291 0))
 ;;; Generated autoloads from emacs-lisp/debug.el
 
 (setq debugger 'debug)
@@ -5787,8 +5730,8 @@ To specify a nil argument interactively, exit with an empty minibuffer.
 
 ;;;***
 \f
-;;;### (autoloads nil "decipher" "play/decipher.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "decipher" "play/decipher.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from play/decipher.el
 
 (autoload 'decipher "decipher" "\
@@ -5816,7 +5759,7 @@ The most useful commands are:
 
 ;;;***
 \f
-;;;### (autoloads nil "delim-col" "delim-col.el" (21291 53104 431149
+;;;### (autoloads nil "delim-col" "delim-col.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from delim-col.el
 (push (purecopy '(delim-col 2 1)) package--builtin-versions)
@@ -5842,7 +5785,7 @@ START and END delimits the corners of text rectangle.
 
 ;;;***
 \f
-;;;### (autoloads nil "delsel" "delsel.el" (21410 64156 350465 0))
+;;;### (autoloads nil "delsel" "delsel.el" (21414 44327 790846 0))
 ;;; Generated autoloads from delsel.el
 
 (defalias 'pending-delete-mode 'delete-selection-mode)
@@ -5870,8 +5813,8 @@ point regardless of any selection.
 
 ;;;***
 \f
-;;;### (autoloads nil "derived" "emacs-lisp/derived.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "derived" "emacs-lisp/derived.el" (21240 46395
+;;;;;;  727291 0))
 ;;; Generated autoloads from emacs-lisp/derived.el
 
 (autoload 'define-derived-mode "derived" "\
@@ -5925,7 +5868,7 @@ See Info node `(elisp)Derived Modes' for more details.
 
 \(fn CHILD PARENT NAME &optional DOCSTRING &rest BODY)" nil t)
 
-(put 'define-derived-mode 'doc-string-elt '4)
+(function-put 'define-derived-mode 'doc-string-elt '4)
 
 (autoload 'derived-mode-init-mode-variables "derived" "\
 Initialize variables for a new MODE.
@@ -5937,7 +5880,7 @@ the first time the mode is used.
 
 ;;;***
 \f
-;;;### (autoloads nil "descr-text" "descr-text.el" (21291 53104 431149
+;;;### (autoloads nil "descr-text" "descr-text.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from descr-text.el
 
@@ -5972,7 +5915,7 @@ relevant to POS.
 
 ;;;***
 \f
-;;;### (autoloads nil "desktop" "desktop.el" (21522 31638 598764
+;;;### (autoloads nil "desktop" "desktop.el" (21526 48295 289762
 ;;;;;;  0))
 ;;; Generated autoloads from desktop.el
 
@@ -6178,8 +6121,8 @@ Revert to the last loaded desktop.
 
 ;;;***
 \f
-;;;### (autoloads nil "deuglify" "gnus/deuglify.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "deuglify" "gnus/deuglify.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from gnus/deuglify.el
 
 (autoload 'gnus-article-outlook-unwrap-lines "deuglify" "\
@@ -6211,8 +6154,8 @@ Deuglify broken Outlook (Express) articles and redisplay.
 
 ;;;***
 \f
-;;;### (autoloads nil "diary-lib" "calendar/diary-lib.el" (21522
-;;;;;;  31638 598764 0))
+;;;### (autoloads nil "diary-lib" "calendar/diary-lib.el" (21526
+;;;;;;  48295 289762 0))
 ;;; Generated autoloads from calendar/diary-lib.el
 
 (autoload 'diary "diary-lib" "\
@@ -6254,7 +6197,7 @@ Major mode for editing the diary file.
 
 ;;;***
 \f
-;;;### (autoloads nil "diff" "vc/diff.el" (21291 53104 431149 0))
+;;;### (autoloads nil "diff" "vc/diff.el" (21240 46395 727291 0))
 ;;; Generated autoloads from vc/diff.el
 
 (defvar diff-switches (purecopy "-c") "\
@@ -6302,8 +6245,8 @@ This requires the external program `diff' to be in your `exec-path'.
 
 ;;;***
 \f
-;;;### (autoloads nil "diff-mode" "vc/diff-mode.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "diff-mode" "vc/diff-mode.el" (21546 33576
+;;;;;;  601815 0))
 ;;; Generated autoloads from vc/diff-mode.el
 
 (autoload 'diff-mode "diff-mode" "\
@@ -6335,7 +6278,7 @@ the mode if ARG is omitted or nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "dig" "net/dig.el" (21291 53104 431149 0))
+;;;### (autoloads nil "dig" "net/dig.el" (21187 63826 213216 0))
 ;;; Generated autoloads from net/dig.el
 
 (autoload 'dig "dig" "\
@@ -6346,7 +6289,7 @@ Optional arguments are passed to `dig-invoke'.
 
 ;;;***
 \f
-;;;### (autoloads nil "dired" "dired.el" (21452 38823 243032 890000))
+;;;### (autoloads nil "dired" "dired.el" (21452 59559 901066 0))
 ;;; Generated autoloads from dired.el
 
 (defvar dired-listing-switches (purecopy "-al") "\
@@ -6422,7 +6365,7 @@ Type \\[dired-mark] to Mark a file or subdirectory for later commands.
   to see why something went wrong.
 Type \\[dired-unmark] to Unmark a file or all files of an inserted subdirectory.
 Type \\[dired-unmark-backward] to back up one line and unmark or unflag.
-Type \\[dired-do-flagged-delete] to delete (eXecute) the files flagged `D'.
+Type \\[dired-do-flagged-delete] to delete (eXpunge) the files flagged `D'.
 Type \\[dired-find-file] to Find the current line's file
   (or dired it in another buffer, if it is a directory).
 Type \\[dired-find-file-other-window] to find file or Dired directory in Other window.
@@ -6466,7 +6409,7 @@ Keybindings:
 
 ;;;***
 \f
-;;;### (autoloads nil "dirtrack" "dirtrack.el" (21291 53104 431149
+;;;### (autoloads nil "dirtrack" "dirtrack.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from dirtrack.el
 
@@ -6497,8 +6440,8 @@ from `default-directory'.
 
 ;;;***
 \f
-;;;### (autoloads nil "disass" "emacs-lisp/disass.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "disass" "emacs-lisp/disass.el" (21240 46395
+;;;;;;  727291 0))
 ;;; Generated autoloads from emacs-lisp/disass.el
 
 (autoload 'disassemble "disass" "\
@@ -6512,7 +6455,7 @@ redefine OBJECT if it is a symbol.
 
 ;;;***
 \f
-;;;### (autoloads nil "disp-table" "disp-table.el" (21291 53104 431149
+;;;### (autoloads nil "disp-table" "disp-table.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from disp-table.el
 
@@ -6634,8 +6577,8 @@ in `.emacs'.
 
 ;;;***
 \f
-;;;### (autoloads nil "dissociate" "play/dissociate.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "dissociate" "play/dissociate.el" (21240 46395
+;;;;;;  727291 0))
 ;;; Generated autoloads from play/dissociate.el
 
 (autoload 'dissociated-press "dissociate" "\
@@ -6651,7 +6594,7 @@ Default is 2.
 
 ;;;***
 \f
-;;;### (autoloads nil "dnd" "dnd.el" (21291 53104 431149 0))
+;;;### (autoloads nil "dnd" "dnd.el" (21240 46395 727291 0))
 ;;; Generated autoloads from dnd.el
 
 (defvar dnd-protocol-alist `((,(purecopy "^file:///") . dnd-open-local-file) (,(purecopy "^file://") . dnd-open-file) (,(purecopy "^file:") . dnd-open-local-file) (,(purecopy "^\\(https?\\|ftp\\|file\\|nfs\\)://") . dnd-open-file)) "\
@@ -6671,8 +6614,8 @@ if some action was made, or nil if the URL is ignored.")
 
 ;;;***
 \f
-;;;### (autoloads nil "dns-mode" "textmodes/dns-mode.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "dns-mode" "textmodes/dns-mode.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from textmodes/dns-mode.el
 
 (autoload 'dns-mode "dns-mode" "\
@@ -6695,7 +6638,7 @@ Locate SOA record and increment the serial field.
 
 ;;;***
 \f
-;;;### (autoloads nil "doc-view" "doc-view.el" (21462 6563 648736
+;;;### (autoloads nil "doc-view" "doc-view.el" (21462 9001 456449
 ;;;;;;  0))
 ;;; Generated autoloads from doc-view.el
 
@@ -6742,7 +6685,7 @@ See the command `doc-view-mode' for more information on this mode.
 
 ;;;***
 \f
-;;;### (autoloads nil "doctor" "play/doctor.el" (21291 53104 431149
+;;;### (autoloads nil "doctor" "play/doctor.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from play/doctor.el
 
@@ -6753,7 +6696,7 @@ Switch to *doctor* buffer and start giving psychotherapy.
 
 ;;;***
 \f
-;;;### (autoloads nil "double" "double.el" (21291 53104 431149 0))
+;;;### (autoloads nil "double" "double.el" (21187 63826 213216 0))
 ;;; Generated autoloads from double.el
 
 (autoload 'double-mode "double" "\
@@ -6769,7 +6712,7 @@ strings when pressed twice.  See `double-map' for details.
 
 ;;;***
 \f
-;;;### (autoloads nil "dunnet" "play/dunnet.el" (21291 53104 431149
+;;;### (autoloads nil "dunnet" "play/dunnet.el" (21406 50214 284651
 ;;;;;;  0))
 ;;; Generated autoloads from play/dunnet.el
 (push (purecopy '(dunnet 2 1)) package--builtin-versions)
@@ -6781,8 +6724,8 @@ Switch to *dungeon* buffer and start game.
 
 ;;;***
 \f
-;;;### (autoloads nil "easy-mmode" "emacs-lisp/easy-mmode.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "easy-mmode" "emacs-lisp/easy-mmode.el" (21505
+;;;;;;  42150 427725 0))
 ;;; Generated autoloads from emacs-lisp/easy-mmode.el
 
 (defalias 'easy-mmode-define-minor-mode 'define-minor-mode)
@@ -6854,7 +6797,7 @@ For example, you could write
 
 \(fn MODE DOC &optional INIT-VALUE LIGHTER KEYMAP &rest BODY)" nil t)
 
-(put 'define-minor-mode 'doc-string-elt '2)
+(function-put 'define-minor-mode 'doc-string-elt '2)
 
 (defalias 'easy-mmode-define-global-mode 'define-globalized-minor-mode)
 
@@ -6885,7 +6828,7 @@ on if the hook has explicitly disabled it.
 
 \(fn GLOBAL-MODE MODE TURN-ON &rest KEYS)" nil t)
 
-(put 'define-globalized-minor-mode 'doc-string-elt '2)
+(function-put 'define-globalized-minor-mode 'doc-string-elt '2)
 
 (autoload 'easy-mmode-define-keymap "easy-mmode" "\
 Return a keymap built from bindings BS.
@@ -6921,8 +6864,8 @@ CSS contains a list of syntax specifications of the form (CHAR . SYNTAX).
 
 ;;;***
 \f
-;;;### (autoloads nil "easymenu" "emacs-lisp/easymenu.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "easymenu" "emacs-lisp/easymenu.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from emacs-lisp/easymenu.el
 
 (autoload 'easy-menu-define "easymenu" "\
@@ -7024,7 +6967,7 @@ MENU.  This is a submenu.
 
 \(fn SYMBOL MAPS DOC MENU)" nil t)
 
-(put 'easy-menu-define 'lisp-indent-function 'defun)
+(function-put 'easy-menu-define 'lisp-indent-function 'defun)
 
 (autoload 'easy-menu-do-define "easymenu" "\
 
@@ -7060,8 +7003,8 @@ To implement dynamic menus, either call this from
 
 ;;;***
 \f
-;;;### (autoloads nil "ebnf2ps" "progmodes/ebnf2ps.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "ebnf2ps" "progmodes/ebnf2ps.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from progmodes/ebnf2ps.el
 (push (purecopy '(ebnf2ps 4 4)) package--builtin-versions)
 
@@ -7326,8 +7269,8 @@ See `ebnf-style-database' documentation.
 
 ;;;***
 \f
-;;;### (autoloads nil "ebrowse" "progmodes/ebrowse.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "ebrowse" "progmodes/ebrowse.el" (21240 46395
+;;;;;;  727291 0))
 ;;; Generated autoloads from progmodes/ebrowse.el
 
 (autoload 'ebrowse-tree-mode "ebrowse" "\
@@ -7475,7 +7418,7 @@ Display statistics for a class tree.
 
 ;;;***
 \f
-;;;### (autoloads nil "ebuff-menu" "ebuff-menu.el" (21291 53104 431149
+;;;### (autoloads nil "ebuff-menu" "ebuff-menu.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from ebuff-menu.el
 
@@ -7508,7 +7451,7 @@ Run hooks in `electric-buffer-menu-mode-hook' on entry.
 
 ;;;***
 \f
-;;;### (autoloads nil "echistory" "echistory.el" (21291 53104 431149
+;;;### (autoloads nil "echistory" "echistory.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from echistory.el
 
@@ -7520,8 +7463,8 @@ With prefix arg NOCONFIRM, execute current line as-is without editing.
 
 ;;;***
 \f
-;;;### (autoloads nil "ecomplete" "gnus/ecomplete.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "ecomplete" "gnus/ecomplete.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from gnus/ecomplete.el
 
 (autoload 'ecomplete-setup "ecomplete" "\
@@ -7531,7 +7474,7 @@ With prefix arg NOCONFIRM, execute current line as-is without editing.
 
 ;;;***
 \f
-;;;### (autoloads nil "ede" "cedet/ede.el" (21346 62196 327729 0))
+;;;### (autoloads nil "ede" "cedet/ede.el" (21350 58112 380040 0))
 ;;; Generated autoloads from cedet/ede.el
 (push (purecopy '(ede 1 2)) package--builtin-versions)
 
@@ -7557,8 +7500,8 @@ an EDE controlled project.
 
 ;;;***
 \f
-;;;### (autoloads nil "edebug" "emacs-lisp/edebug.el" (21432 23023
-;;;;;;  204760 0))
+;;;### (autoloads nil "edebug" "emacs-lisp/edebug.el" (21452 59559
+;;;;;;  901066 0))
 ;;; Generated autoloads from emacs-lisp/edebug.el
 
 (defvar edebug-all-defs nil "\
@@ -7622,7 +7565,7 @@ Toggle edebugging of all forms.
 
 ;;;***
 \f
-;;;### (autoloads nil "ediff" "vc/ediff.el" (21423 31043 342896 583000))
+;;;### (autoloads nil "ediff" "vc/ediff.el" (21429 11690 49391 0))
 ;;; Generated autoloads from vc/ediff.el
 (push (purecopy '(ediff 2 81 4)) package--builtin-versions)
 
@@ -7894,8 +7837,8 @@ With optional NODE, goes to that node.
 
 ;;;***
 \f
-;;;### (autoloads nil "ediff-help" "vc/ediff-help.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "ediff-help" "vc/ediff-help.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from vc/ediff-help.el
 
 (autoload 'ediff-customize "ediff-help" "\
@@ -7905,8 +7848,8 @@ With optional NODE, goes to that node.
 
 ;;;***
 \f
-;;;### (autoloads nil "ediff-mult" "vc/ediff-mult.el" (21423 31069
-;;;;;;  474237 381000))
+;;;### (autoloads nil "ediff-mult" "vc/ediff-mult.el" (21429 11690
+;;;;;;  49391 0))
 ;;; Generated autoloads from vc/ediff-mult.el
 
 (autoload 'ediff-show-registry "ediff-mult" "\
@@ -7918,8 +7861,8 @@ Display Ediff's registry.
 
 ;;;***
 \f
-;;;### (autoloads nil "ediff-util" "vc/ediff-util.el" (21349 10841
-;;;;;;  977368 0))
+;;;### (autoloads nil "ediff-util" "vc/ediff-util.el" (21458 11942
+;;;;;;  975332 0))
 ;;; Generated autoloads from vc/ediff-util.el
 
 (autoload 'ediff-toggle-multiframe "ediff-util" "\
@@ -7938,7 +7881,7 @@ To change the default, set the variable `ediff-use-toolbar-p', which see.
 
 ;;;***
 \f
-;;;### (autoloads nil "edmacro" "edmacro.el" (21291 53104 431149
+;;;### (autoloads nil "edmacro" "edmacro.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from edmacro.el
 (push (purecopy '(edmacro 2 1)) package--builtin-versions)
@@ -7988,7 +7931,7 @@ or nil, use a compact 80-column format.
 
 ;;;***
 \f
-;;;### (autoloads nil "edt" "emulation/edt.el" (21291 53104 431149
+;;;### (autoloads nil "edt" "emulation/edt.el" (21417 20521 870414
 ;;;;;;  0))
 ;;; Generated autoloads from emulation/edt.el
 
@@ -8006,7 +7949,7 @@ Turn on EDT Emulation.
 
 ;;;***
 \f
-;;;### (autoloads nil "ehelp" "ehelp.el" (21423 31105 645324 612000))
+;;;### (autoloads nil "ehelp" "ehelp.el" (21429 11690 49391 0))
 ;;; Generated autoloads from ehelp.el
 
 (autoload 'with-electric-help "ehelp" "\
@@ -8042,15 +7985,15 @@ BUFFER is put back into its original major mode.
 
 ;;;***
 \f
-;;;### (autoloads nil "eieio" "emacs-lisp/eieio.el" (21365 34831
-;;;;;;  786505 0))
+;;;### (autoloads nil "eieio" "emacs-lisp/eieio.el" (21379 5529 990138
+;;;;;;  255000))
 ;;; Generated autoloads from emacs-lisp/eieio.el
 (push (purecopy '(eieio 1 4)) package--builtin-versions)
 
 ;;;***
 \f
-;;;### (autoloads nil "eieio-core" "emacs-lisp/eieio-core.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "eieio-core" "emacs-lisp/eieio-core.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from emacs-lisp/eieio-core.el
 (push (purecopy '(eieio-core 1 4)) package--builtin-versions)
 
@@ -8066,8 +8009,8 @@ It creates an autoload function for CNAME's constructor.
 
 ;;;***
 \f
-;;;### (autoloads nil "eldoc" "emacs-lisp/eldoc.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "eldoc" "emacs-lisp/eldoc.el" (21546 33576
+;;;;;;  601815 0))
 ;;; Generated autoloads from emacs-lisp/eldoc.el
 
 (defvar eldoc-minor-mode-string (purecopy " ElDoc") "\
@@ -8090,10 +8033,24 @@ expression point is on.
 
 \(fn &optional ARG)" t nil)
 
+(defvar global-eldoc-mode nil "\
+Non-nil if Global-Eldoc mode is enabled.
+See the command `global-eldoc-mode' for a description of this minor mode.
+Setting this variable directly does not take effect;
+either customize it (see the info node `Easy Customization')
+or call the function `global-eldoc-mode'.")
+
+(custom-autoload 'global-eldoc-mode "eldoc" nil)
+
+(autoload 'global-eldoc-mode "eldoc" "\
+Enable `eldoc-mode' in all buffers where it's applicable.
+
+\(fn &optional ARG)" t nil)
+
 (define-obsolete-function-alias 'turn-on-eldoc-mode 'eldoc-mode "24.4")
 
 (defvar eldoc-documentation-function nil "\
-If non-nil, function to call to return doc string.
+Function to call to return doc string.
 The function of no args should return a one-line string for displaying
 doc about a function etc. appropriate to the context around point.
 It should return nil if there's no doc appropriate for the context.
@@ -8105,12 +8062,11 @@ the variables `eldoc-argument-case' and `eldoc-echo-area-use-multiline-p',
 and the face `eldoc-highlight-function-argument', if they are to have any
 effect.
 
-This variable is expected to be made buffer-local by modes (other than
-Emacs Lisp mode) that support ElDoc.")
+This variable is expected to be set buffer-locally by modes that support ElDoc.")
 
 ;;;***
 \f
-;;;### (autoloads nil "elec-pair" "elec-pair.el" (21341 23900 988149
+;;;### (autoloads nil "elec-pair" "elec-pair.el" (21327 43559 923043
 ;;;;;;  0))
 ;;; Generated autoloads from elec-pair.el
 
@@ -8146,7 +8102,7 @@ closing parenthesis.  (Likewise for brackets, etc.).
 
 ;;;***
 \f
-;;;### (autoloads nil "elide-head" "elide-head.el" (21291 53104 431149
+;;;### (autoloads nil "elide-head" "elide-head.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from elide-head.el
 
@@ -8162,8 +8118,8 @@ This is suitable as an entry on `find-file-hook' or appropriate mode hooks.
 
 ;;;***
 \f
-;;;### (autoloads nil "elint" "emacs-lisp/elint.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "elint" "emacs-lisp/elint.el" (21195 23530
+;;;;;;  495420 0))
 ;;; Generated autoloads from emacs-lisp/elint.el
 
 (autoload 'elint-file "elint" "\
@@ -8198,7 +8154,7 @@ optional prefix argument REINIT is non-nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "elp" "emacs-lisp/elp.el" (21291 53104 431149
+;;;### (autoloads nil "elp" "emacs-lisp/elp.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from emacs-lisp/elp.el
 
@@ -8233,7 +8189,7 @@ displayed.
 
 ;;;***
 \f
-;;;### (autoloads nil "emacs-lock" "emacs-lock.el" (21291 53104 431149
+;;;### (autoloads nil "emacs-lock" "emacs-lock.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from emacs-lock.el
 
@@ -8261,8 +8217,8 @@ Other values are interpreted as usual.
 
 ;;;***
 \f
-;;;### (autoloads nil "emacsbug" "mail/emacsbug.el" (21295 7741 571176
-;;;;;;  0))
+;;;### (autoloads nil "emacsbug" "mail/emacsbug.el" (21302 89 140834
+;;;;;;  615000))
 ;;; Generated autoloads from mail/emacsbug.el
 
 (autoload 'report-emacs-bug "emacsbug" "\
@@ -8273,8 +8229,8 @@ Prompts for bug subject.  Leaves you in a mail buffer.
 
 ;;;***
 \f
-;;;### (autoloads nil "emerge" "vc/emerge.el" (21363 5094 196397
-;;;;;;  745000))
+;;;### (autoloads nil "emerge" "vc/emerge.el" (21364 37926 837230
+;;;;;;  0))
 ;;; Generated autoloads from vc/emerge.el
 
 (autoload 'emerge-files "emerge" "\
@@ -8334,8 +8290,8 @@ Emerge two RCS revisions of a file, with another revision as ancestor.
 
 ;;;***
 \f
-;;;### (autoloads nil "enriched" "textmodes/enriched.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "enriched" "textmodes/enriched.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from textmodes/enriched.el
 
 (autoload 'enriched-mode "enriched" "\
@@ -8370,7 +8326,7 @@ Commands:
 
 ;;;***
 \f
-;;;### (autoloads nil "epa" "epa.el" (21291 53104 431149 0))
+;;;### (autoloads nil "epa" "epa.el" (21294 46247 414129 0))
 ;;; Generated autoloads from epa.el
 
 (autoload 'epa-list-keys "epa" "\
@@ -8447,6 +8403,8 @@ See the reason described in the `epa-decrypt-region' documentation.
 
 \(fn START END)" t nil)
 
+(function-put 'epa-decrypt-armor-in-region 'interactive-only 't)
+
 (autoload 'epa-verify-region "epa" "\
 Verify the current region between START and END.
 
@@ -8467,6 +8425,8 @@ For example:
 
 \(fn START END)" t nil)
 
+(function-put 'epa-verify-region 'interactive-only 't)
+
 (autoload 'epa-verify-cleartext-in-region "epa" "\
 Verify OpenPGP cleartext signed messages in the current region
 between START and END.
@@ -8476,6 +8436,8 @@ See the reason described in the `epa-verify-region' documentation.
 
 \(fn START END)" t nil)
 
+(function-put 'epa-verify-cleartext-in-region 'interactive-only 't)
+
 (autoload 'epa-sign-region "epa" "\
 Sign the current region between START and END by SIGNERS keys selected.
 
@@ -8495,6 +8457,8 @@ For example:
 
 \(fn START END SIGNERS MODE)" t nil)
 
+(function-put 'epa-sign-region 'interactive-only 't)
+
 (autoload 'epa-encrypt-region "epa" "\
 Encrypt the current region between START and END for RECIPIENTS.
 
@@ -8515,6 +8479,8 @@ For example:
 
 \(fn START END RECIPIENTS SIGN SIGNERS)" t nil)
 
+(function-put 'epa-encrypt-region 'interactive-only 't)
+
 (autoload 'epa-delete-keys "epa" "\
 Delete selected KEYS.
 
@@ -8548,7 +8514,7 @@ Insert selected KEYS after the point.
 
 ;;;***
 \f
-;;;### (autoloads nil "epa-dired" "epa-dired.el" (21291 53104 431149
+;;;### (autoloads nil "epa-dired" "epa-dired.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from epa-dired.el
 
@@ -8574,7 +8540,7 @@ Encrypt marked files.
 
 ;;;***
 \f
-;;;### (autoloads nil "epa-file" "epa-file.el" (21291 53104 431149
+;;;### (autoloads nil "epa-file" "epa-file.el" (21205 7349 58947
 ;;;;;;  0))
 ;;; Generated autoloads from epa-file.el
 
@@ -8595,7 +8561,7 @@ Encrypt marked files.
 
 ;;;***
 \f
-;;;### (autoloads nil "epa-mail" "epa-mail.el" (21291 53104 431149
+;;;### (autoloads nil "epa-mail" "epa-mail.el" (21294 46247 414129
 ;;;;;;  0))
 ;;; Generated autoloads from epa-mail.el
 
@@ -8611,26 +8577,26 @@ if ARG is omitted or nil.
 Decrypt OpenPGP armors in the current buffer.
 The buffer is expected to contain a mail message.
 
-Don't use this command in Lisp programs!
-
 \(fn)" t nil)
 
+(function-put 'epa-mail-decrypt 'interactive-only 't)
+
 (autoload 'epa-mail-verify "epa-mail" "\
 Verify OpenPGP cleartext signed messages in the current buffer.
 The buffer is expected to contain a mail message.
 
-Don't use this command in Lisp programs!
-
 \(fn)" t nil)
 
+(function-put 'epa-mail-verify 'interactive-only 't)
+
 (autoload 'epa-mail-sign "epa-mail" "\
 Sign the current buffer.
 The buffer is expected to contain a mail message.
 
-Don't use this command in Lisp programs!
-
 \(fn START END SIGNERS MODE)" t nil)
 
+(function-put 'epa-mail-sign 'interactive-only 't)
+
 (autoload 'epa-mail-encrypt "epa-mail" "\
 Encrypt the outgoing mail message in the current buffer.
 Takes the recipients from the text in the header in the buffer
@@ -8650,10 +8616,10 @@ SIGNERS is a list of keys to sign the message with.
 Import keys in the OpenPGP armor format in the current buffer.
 The buffer is expected to contain a mail message.
 
-Don't use this command in Lisp programs!
-
 \(fn)" t nil)
 
+(function-put 'epa-mail-import-keys 'interactive-only 't)
+
 (defvar epa-global-mail-mode nil "\
 Non-nil if Epa-Global-Mail mode is enabled.
 See the command `epa-global-mail-mode' for a description of this minor mode.
@@ -8673,7 +8639,7 @@ if ARG is omitted or nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "epg" "epg.el" (21291 53104 431149 0))
+;;;### (autoloads nil "epg" "epg.el" (21364 37926 837230 0))
 ;;; Generated autoloads from epg.el
 (push (purecopy '(epg 1 0 0)) package--builtin-versions)
 
@@ -8684,7 +8650,7 @@ Return a context object.
 
 ;;;***
 \f
-;;;### (autoloads nil "epg-config" "epg-config.el" (21291 53104 431149
+;;;### (autoloads nil "epg-config" "epg-config.el" (21543 57381 284584
 ;;;;;;  0))
 ;;; Generated autoloads from epg-config.el
 
@@ -8705,9 +8671,8 @@ Look at CONFIG and try to expand GROUP.
 
 ;;;***
 \f
-;;;### (autoloads nil "erc" "erc/erc.el" (21291 53104 431149 0))
+;;;### (autoloads nil "erc" "erc/erc.el" (21542 36519 256429 0))
 ;;; Generated autoloads from erc/erc.el
-(push (purecopy '(erc 5 3)) package--builtin-versions)
 
 (autoload 'erc-select-read-args "erc" "\
 Prompt the user for values of nick, server, port, and password.
@@ -8754,35 +8719,35 @@ Otherwise, connect to HOST:PORT as USER and /join CHANNEL.
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-autoaway" "erc/erc-autoaway.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "erc-autoaway" "erc/erc-autoaway.el" (21240
+;;;;;;  46395 727291 0))
 ;;; Generated autoloads from erc/erc-autoaway.el
  (autoload 'erc-autoaway-mode "erc-autoaway")
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-button" "erc/erc-button.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "erc-button" "erc/erc-button.el" (21240 46395
+;;;;;;  727291 0))
 ;;; Generated autoloads from erc/erc-button.el
  (autoload 'erc-button-mode "erc-button" nil t)
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-capab" "erc/erc-capab.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "erc-capab" "erc/erc-capab.el" (21240 46395
+;;;;;;  727291 0))
 ;;; Generated autoloads from erc/erc-capab.el
  (autoload 'erc-capab-identify-mode "erc-capab" nil t)
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-compat" "erc/erc-compat.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "erc-compat" "erc/erc-compat.el" (21240 46395
+;;;;;;  727291 0))
 ;;; Generated autoloads from erc/erc-compat.el
  (autoload 'erc-define-minor-mode "erc-compat")
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-dcc" "erc/erc-dcc.el" (21291 53104 431149
+;;;### (autoloads nil "erc-dcc" "erc/erc-dcc.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from erc/erc-dcc.el
  (autoload 'erc-dcc-mode "erc-dcc")
@@ -8813,14 +8778,14 @@ that subcommand.
 ;;;***
 \f
 ;;;### (autoloads nil "erc-desktop-notifications" "erc/erc-desktop-notifications.el"
-;;;;;;  (21291 53104 431149 0))
+;;;;;;  (21187 63826 213216 0))
 ;;; Generated autoloads from erc/erc-desktop-notifications.el
 (autoload 'erc-notifications-mode "erc-desktop-notifications" "" t)
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-ezbounce" "erc/erc-ezbounce.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "erc-ezbounce" "erc/erc-ezbounce.el" (21240
+;;;;;;  46395 727291 0))
 ;;; Generated autoloads from erc/erc-ezbounce.el
 
 (autoload 'erc-cmd-ezb "erc-ezbounce" "\
@@ -8882,7 +8847,7 @@ Add EZBouncer convenience functions to ERC.
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-fill" "erc/erc-fill.el" (21291 53104 431149
+;;;### (autoloads nil "erc-fill" "erc/erc-fill.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from erc/erc-fill.el
  (autoload 'erc-fill-mode "erc-fill" nil t)
@@ -8895,8 +8860,8 @@ You can put this on `erc-insert-modify-hook' and/or `erc-send-modify-hook'.
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-identd" "erc/erc-identd.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "erc-identd" "erc/erc-identd.el" (21240 46395
+;;;;;;  727291 0))
 ;;; Generated autoloads from erc/erc-identd.el
  (autoload 'erc-identd-mode "erc-identd")
 
@@ -8917,8 +8882,8 @@ system.
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-imenu" "erc/erc-imenu.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "erc-imenu" "erc/erc-imenu.el" (21240 46395
+;;;;;;  727291 0))
 ;;; Generated autoloads from erc/erc-imenu.el
 
 (autoload 'erc-create-imenu-index "erc-imenu" "\
@@ -8928,21 +8893,21 @@ system.
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-join" "erc/erc-join.el" (21291 53104 431149
+;;;### (autoloads nil "erc-join" "erc/erc-join.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from erc/erc-join.el
  (autoload 'erc-autojoin-mode "erc-join" nil t)
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-list" "erc/erc-list.el" (21307 46976 832220
+;;;### (autoloads nil "erc-list" "erc/erc-list.el" (21308 46599 181916
 ;;;;;;  0))
 ;;; Generated autoloads from erc/erc-list.el
  (autoload 'erc-list-mode "erc-list")
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-log" "erc/erc-log.el" (21291 53104 431149
+;;;### (autoloads nil "erc-log" "erc/erc-log.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from erc/erc-log.el
  (autoload 'erc-log-mode "erc-log" nil t)
@@ -8972,8 +8937,8 @@ You can save every individual message by putting this function on
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-match" "erc/erc-match.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "erc-match" "erc/erc-match.el" (21240 46395
+;;;;;;  727291 0))
 ;;; Generated autoloads from erc/erc-match.el
  (autoload 'erc-match-mode "erc-match")
 
@@ -9019,15 +8984,15 @@ Delete dangerous-host interactively to `erc-dangerous-hosts'.
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-menu" "erc/erc-menu.el" (21291 53104 431149
+;;;### (autoloads nil "erc-menu" "erc/erc-menu.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from erc/erc-menu.el
  (autoload 'erc-menu-mode "erc-menu" nil t)
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-netsplit" "erc/erc-netsplit.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "erc-netsplit" "erc/erc-netsplit.el" (21240
+;;;;;;  46395 727291 0))
 ;;; Generated autoloads from erc/erc-netsplit.el
  (autoload 'erc-netsplit-mode "erc-netsplit")
 
@@ -9038,8 +9003,8 @@ Show who's gone.
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-networks" "erc/erc-networks.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "erc-networks" "erc/erc-networks.el" (21260
+;;;;;;  55795 711190 0))
 ;;; Generated autoloads from erc/erc-networks.el
 
 (autoload 'erc-determine-network "erc-networks" "\
@@ -9056,8 +9021,8 @@ Interactively select a server to connect to using `erc-server-alist'.
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-notify" "erc/erc-notify.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "erc-notify" "erc/erc-notify.el" (21240 46395
+;;;;;;  727291 0))
 ;;; Generated autoloads from erc/erc-notify.el
  (autoload 'erc-notify-mode "erc-notify" nil t)
 
@@ -9075,36 +9040,36 @@ with args, toggle notify status of people.
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-page" "erc/erc-page.el" (21291 53104 431149
+;;;### (autoloads nil "erc-page" "erc/erc-page.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from erc/erc-page.el
  (autoload 'erc-page-mode "erc-page")
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-pcomplete" "erc/erc-pcomplete.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "erc-pcomplete" "erc/erc-pcomplete.el" (21240
+;;;;;;  46395 727291 0))
 ;;; Generated autoloads from erc/erc-pcomplete.el
  (autoload 'erc-completion-mode "erc-pcomplete" nil t)
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-replace" "erc/erc-replace.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "erc-replace" "erc/erc-replace.el" (21240 46395
+;;;;;;  727291 0))
 ;;; Generated autoloads from erc/erc-replace.el
  (autoload 'erc-replace-mode "erc-replace")
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-ring" "erc/erc-ring.el" (21291 53104 431149
+;;;### (autoloads nil "erc-ring" "erc/erc-ring.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from erc/erc-ring.el
  (autoload 'erc-ring-mode "erc-ring" nil t)
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-services" "erc/erc-services.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "erc-services" "erc/erc-services.el" (21240
+;;;;;;  46395 727291 0))
 ;;; Generated autoloads from erc/erc-services.el
  (autoload 'erc-services-mode "erc-services" nil t)
 
@@ -9121,15 +9086,15 @@ When called interactively, read the password using `read-passwd'.
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-sound" "erc/erc-sound.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "erc-sound" "erc/erc-sound.el" (21240 46395
+;;;;;;  727291 0))
 ;;; Generated autoloads from erc/erc-sound.el
  (autoload 'erc-sound-mode "erc-sound")
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-speedbar" "erc/erc-speedbar.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "erc-speedbar" "erc/erc-speedbar.el" (21240
+;;;;;;  46395 727291 0))
 ;;; Generated autoloads from erc/erc-speedbar.el
 
 (autoload 'erc-speedbar-browser "erc-speedbar" "\
@@ -9140,22 +9105,22 @@ This will add a speedbar major display mode.
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-spelling" "erc/erc-spelling.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "erc-spelling" "erc/erc-spelling.el" (21240
+;;;;;;  46395 727291 0))
 ;;; Generated autoloads from erc/erc-spelling.el
  (autoload 'erc-spelling-mode "erc-spelling" nil t)
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-stamp" "erc/erc-stamp.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "erc-stamp" "erc/erc-stamp.el" (21546 33576
+;;;;;;  601815 0))
 ;;; Generated autoloads from erc/erc-stamp.el
  (autoload 'erc-timestamp-mode "erc-stamp" nil t)
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-track" "erc/erc-track.el" (21546 52205
-;;;;;;  704969 0))
+;;;### (autoloads nil "erc-track" "erc/erc-track.el" (21547 54441
+;;;;;;  168831 0))
 ;;; Generated autoloads from erc/erc-track.el
 
 (defvar erc-track-minor-mode nil "\
@@ -9180,8 +9145,8 @@ keybindings will not do anything useful.
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-truncate" "erc/erc-truncate.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "erc-truncate" "erc/erc-truncate.el" (21240
+;;;;;;  46395 727291 0))
 ;;; Generated autoloads from erc/erc-truncate.el
  (autoload 'erc-truncate-mode "erc-truncate" nil t)
 
@@ -9200,7 +9165,7 @@ Meant to be used in hooks, like `erc-insert-post-hook'.
 
 ;;;***
 \f
-;;;### (autoloads nil "erc-xdcc" "erc/erc-xdcc.el" (21291 53104 431149
+;;;### (autoloads nil "erc-xdcc" "erc/erc-xdcc.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from erc/erc-xdcc.el
  (autoload 'erc-xdcc-mode "erc-xdcc")
@@ -9212,7 +9177,7 @@ Add a file to `erc-xdcc-files'.
 
 ;;;***
 \f
-;;;### (autoloads nil "ert" "emacs-lisp/ert.el" (21291 53104 431149
+;;;### (autoloads nil "ert" "emacs-lisp/ert.el" (21419 62246 751914
 ;;;;;;  0))
 ;;; Generated autoloads from emacs-lisp/ert.el
 
@@ -9278,8 +9243,8 @@ Display the documentation for TEST-OR-TEST-NAME (a symbol or ert-test).
 
 ;;;***
 \f
-;;;### (autoloads nil "ert-x" "emacs-lisp/ert-x.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "ert-x" "emacs-lisp/ert-x.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from emacs-lisp/ert-x.el
 
 (put 'ert-with-test-buffer 'lisp-indent-function 1)
@@ -9291,8 +9256,8 @@ Kill all test buffers that are still live.
 
 ;;;***
 \f
-;;;### (autoloads nil "esh-mode" "eshell/esh-mode.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "esh-mode" "eshell/esh-mode.el" (21213 1461
+;;;;;;  513511 0))
 ;;; Generated autoloads from eshell/esh-mode.el
 
 (autoload 'eshell-mode "esh-mode" "\
@@ -9302,8 +9267,8 @@ Emacs shell interactive mode.
 
 ;;;***
 \f
-;;;### (autoloads nil "eshell" "eshell/eshell.el" (21291 53104 431149
-;;;;;;  0))
+;;;### (autoloads nil "eshell" "eshell/eshell.el" (21403 21396 190131
+;;;;;;  14000))
 ;;; Generated autoloads from eshell/eshell.el
 (push (purecopy '(eshell 2 4 2)) package--builtin-versions)
 
@@ -9338,7 +9303,7 @@ corresponding to a successful execution.
 
 ;;;***
 \f
-;;;### (autoloads nil "etags" "progmodes/etags.el" (21291 53104 431149
+;;;### (autoloads nil "etags" "progmodes/etags.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from progmodes/etags.el
 
@@ -9647,8 +9612,8 @@ for \\[find-tag] (which see).
 
 ;;;***
 \f
-;;;### (autoloads nil "ethio-util" "language/ethio-util.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "ethio-util" "language/ethio-util.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from language/ethio-util.el
 
 (autoload 'setup-ethiopic-environment-internal "ethio-util" "\
@@ -9816,7 +9781,7 @@ With ARG, insert that many delimiters.
 
 ;;;***
 \f
-;;;### (autoloads nil "eudc" "net/eudc.el" (21291 53104 431149 0))
+;;;### (autoloads nil "eudc" "net/eudc.el" (21187 63826 213216 0))
 ;;; Generated autoloads from net/eudc.el
 
 (autoload 'eudc-set-server "eudc" "\
@@ -9870,7 +9835,7 @@ This does nothing except loading eudc by autoload side-effect.
 
 ;;;***
 \f
-;;;### (autoloads nil "eudc-bob" "net/eudc-bob.el" (21291 53104 431149
+;;;### (autoloads nil "eudc-bob" "net/eudc-bob.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from net/eudc-bob.el
 
@@ -9906,8 +9871,8 @@ Display a button for the JPEG DATA.
 
 ;;;***
 \f
-;;;### (autoloads nil "eudc-export" "net/eudc-export.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "eudc-export" "net/eudc-export.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from net/eudc-export.el
 
 (autoload 'eudc-insert-record-at-point-into-bbdb "eudc-export" "\
@@ -9923,8 +9888,8 @@ Call `eudc-insert-record-at-point-into-bbdb' if on a record.
 
 ;;;***
 \f
-;;;### (autoloads nil "eudc-hotlist" "net/eudc-hotlist.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "eudc-hotlist" "net/eudc-hotlist.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from net/eudc-hotlist.el
 
 (autoload 'eudc-edit-hotlist "eudc-hotlist" "\
@@ -9934,7 +9899,7 @@ Edit the hotlist of directory servers in a specialized buffer.
 
 ;;;***
 \f
-;;;### (autoloads nil "ewoc" "emacs-lisp/ewoc.el" (21291 53104 431149
+;;;### (autoloads nil "ewoc" "emacs-lisp/ewoc.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from emacs-lisp/ewoc.el
 
@@ -9961,7 +9926,7 @@ fourth arg NOSEP non-nil inhibits this.
 
 ;;;***
 \f
-;;;### (autoloads nil "eww" "net/eww.el" (21420 54160 358217 0))
+;;;### (autoloads nil "eww" "net/eww.el" (21546 33576 601815 0))
 ;;; Generated autoloads from net/eww.el
 
 (autoload 'eww "eww" "\
@@ -9984,8 +9949,8 @@ Render a file using EWW.
 
 ;;;***
 \f
-;;;### (autoloads nil "executable" "progmodes/executable.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "executable" "progmodes/executable.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from progmodes/executable.el
 
 (autoload 'executable-command-find-posix-p "executable" "\
@@ -10026,7 +9991,7 @@ file modes.
 
 ;;;***
 \f
-;;;### (autoloads nil "expand" "expand.el" (21291 53104 431149 0))
+;;;### (autoloads nil "expand" "expand.el" (21187 63826 213216 0))
 ;;; Generated autoloads from expand.el
 
 (autoload 'expand-add-abbrevs "expand" "\
@@ -10075,8 +10040,8 @@ This is used only in conjunction with `expand-add-abbrevs'.
 
 ;;;***
 \f
-;;;### (autoloads nil "f90" "progmodes/f90.el" (21423 29466 406582
-;;;;;;  886000))
+;;;### (autoloads nil "f90" "progmodes/f90.el" (21429 11690 49391
+;;;;;;  0))
 ;;; Generated autoloads from progmodes/f90.el
 
 (autoload 'f90-mode "f90" "\
@@ -10143,7 +10108,7 @@ with no args, if that value is non-nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "face-remap" "face-remap.el" (21291 53104 431149
+;;;### (autoloads nil "face-remap" "face-remap.el" (21241 18251 378509
 ;;;;;;  0))
 ;;; Generated autoloads from face-remap.el
 
@@ -10303,8 +10268,8 @@ Besides the choice of face, it is the same as `buffer-face-mode'.
 
 ;;;***
 \f
-;;;### (autoloads nil "feedmail" "mail/feedmail.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "feedmail" "mail/feedmail.el" (21002 1963 769129
+;;;;;;  0))
 ;;; Generated autoloads from mail/feedmail.el
 (push (purecopy '(feedmail 11)) package--builtin-versions)
 
@@ -10358,7 +10323,7 @@ you can set `feedmail-queue-reminder-alist' to nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "ffap" "ffap.el" (21291 53104 431149 0))
+;;;### (autoloads nil "ffap" "ffap.el" (21546 33576 601815 0))
 ;;; Generated autoloads from ffap.el
 
 (autoload 'ffap-next "ffap" "\
@@ -10421,7 +10386,7 @@ Evaluate the forms in variable `ffap-bindings'.
 
 ;;;***
 \f
-;;;### (autoloads nil "filecache" "filecache.el" (21291 53104 431149
+;;;### (autoloads nil "filecache" "filecache.el" (21265 49588 918402
 ;;;;;;  0))
 ;;; Generated autoloads from filecache.el
 
@@ -10479,7 +10444,7 @@ the name is considered already unique; only the second substitution
 
 ;;;***
 \f
-;;;### (autoloads nil "filenotify" "filenotify.el" (21291 53104 431149
+;;;### (autoloads nil "filenotify" "filenotify.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from filenotify.el
 
@@ -10492,7 +10457,7 @@ Otherwise, signal a `file-notify-error'.
 
 ;;;***
 \f
-;;;### (autoloads nil "files-x" "files-x.el" (21291 53104 431149
+;;;### (autoloads nil "files-x" "files-x.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from files-x.el
 
@@ -10558,7 +10523,7 @@ Copy directory-local variables to the -*- line.
 
 ;;;***
 \f
-;;;### (autoloads nil "filesets" "filesets.el" (21291 53104 431149
+;;;### (autoloads nil "filesets" "filesets.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from filesets.el
 
@@ -10570,7 +10535,7 @@ Set up hooks, load the cache file -- if existing -- and build the menu.
 
 ;;;***
 \f
-;;;### (autoloads nil "find-cmd" "find-cmd.el" (21291 53104 431149
+;;;### (autoloads nil "find-cmd" "find-cmd.el" (21539 60334 648861
 ;;;;;;  0))
 ;;; Generated autoloads from find-cmd.el
 (push (purecopy '(find-cmd 0 6)) package--builtin-versions)
@@ -10591,7 +10556,7 @@ result is a string that should be ready for the command line.
 
 ;;;***
 \f
-;;;### (autoloads nil "find-dired" "find-dired.el" (21291 53104 431149
+;;;### (autoloads nil "find-dired" "find-dired.el" (21264 57319 597552
 ;;;;;;  0))
 ;;; Generated autoloads from find-dired.el
 
@@ -10632,7 +10597,7 @@ use in place of \"-ls\" as the final argument.
 
 ;;;***
 \f
-;;;### (autoloads nil "find-file" "find-file.el" (21291 53104 431149
+;;;### (autoloads nil "find-file" "find-file.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from find-file.el
 
@@ -10723,8 +10688,8 @@ Visit the file you click on in another window.
 
 ;;;***
 \f
-;;;### (autoloads nil "find-func" "emacs-lisp/find-func.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "find-func" "emacs-lisp/find-func.el" (21419
+;;;;;;  62246 751914 0))
 ;;; Generated autoloads from emacs-lisp/find-func.el
 
 (autoload 'find-library "find-func" "\
@@ -10882,7 +10847,7 @@ Define some key bindings for the find-function family of functions.
 
 ;;;***
 \f
-;;;### (autoloads nil "find-lisp" "find-lisp.el" (21291 53104 431149
+;;;### (autoloads nil "find-lisp" "find-lisp.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from find-lisp.el
 
@@ -10903,7 +10868,7 @@ Change the filter on a `find-lisp-find-dired' buffer to REGEXP.
 
 ;;;***
 \f
-;;;### (autoloads nil "finder" "finder.el" (21423 31137 48532 240000))
+;;;### (autoloads nil "finder" "finder.el" (21429 11690 49391 0))
 ;;; Generated autoloads from finder.el
 (push (purecopy '(finder 1 0)) package--builtin-versions)
 
@@ -10925,7 +10890,7 @@ Find packages matching a given keyword.
 
 ;;;***
 \f
-;;;### (autoloads nil "flow-ctrl" "flow-ctrl.el" (21291 53104 431149
+;;;### (autoloads nil "flow-ctrl" "flow-ctrl.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from flow-ctrl.el
 
@@ -10947,8 +10912,8 @@ to get the effect of a C-q.
 
 ;;;***
 \f
-;;;### (autoloads nil "flow-fill" "gnus/flow-fill.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "flow-fill" "gnus/flow-fill.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from gnus/flow-fill.el
 
 (autoload 'fill-flowed-encode "flow-fill" "\
@@ -10963,8 +10928,8 @@ to get the effect of a C-q.
 
 ;;;***
 \f
-;;;### (autoloads nil "flymake" "progmodes/flymake.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "flymake" "progmodes/flymake.el" (21245 64312
+;;;;;;  799897 0))
 ;;; Generated autoloads from progmodes/flymake.el
 (push (purecopy '(flymake 0 3)) package--builtin-versions)
 
@@ -10994,8 +10959,8 @@ Turn flymake mode off.
 
 ;;;***
 \f
-;;;### (autoloads nil "flyspell" "textmodes/flyspell.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "flyspell" "textmodes/flyspell.el" (21240 46395
+;;;;;;  727291 0))
 ;;; Generated autoloads from textmodes/flyspell.el
 
 (autoload 'flyspell-prog-mode "flyspell" "\
@@ -11065,14 +11030,14 @@ Flyspell whole buffer.
 
 ;;;***
 \f
-;;;### (autoloads nil "foldout" "foldout.el" (21291 53104 431149
+;;;### (autoloads nil "foldout" "foldout.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from foldout.el
 (push (purecopy '(foldout 1 10)) package--builtin-versions)
 
 ;;;***
 \f
-;;;### (autoloads nil "follow" "follow.el" (21291 53104 431149 0))
+;;;### (autoloads nil "follow" "follow.el" (21240 46395 727291 0))
 ;;; Generated autoloads from follow.el
 
 (autoload 'turn-on-follow-mode "follow" "\
@@ -11140,8 +11105,8 @@ selected if the original window is the first one in the frame.
 
 ;;;***
 \f
-;;;### (autoloads nil "footnote" "mail/footnote.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "footnote" "mail/footnote.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from mail/footnote.el
 (push (purecopy '(footnote 0 19)) package--builtin-versions)
 
@@ -11160,7 +11125,7 @@ play around with the following keys:
 
 ;;;***
 \f
-;;;### (autoloads nil "forms" "forms.el" (21291 53104 431149 0))
+;;;### (autoloads nil "forms" "forms.el" (21187 63826 213216 0))
 ;;; Generated autoloads from forms.el
 
 (autoload 'forms-mode "forms" "\
@@ -11196,8 +11161,8 @@ Visit a file in Forms mode in other window.
 
 ;;;***
 \f
-;;;### (autoloads nil "fortran" "progmodes/fortran.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "fortran" "progmodes/fortran.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from progmodes/fortran.el
 
 (autoload 'fortran-mode "fortran" "\
@@ -11274,7 +11239,7 @@ with no args, if that value is non-nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "fortune" "play/fortune.el" (21291 53104 431149
+;;;### (autoloads nil "fortune" "play/fortune.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from play/fortune.el
 
@@ -11323,7 +11288,7 @@ and choose the directory as the fortune-file.
 
 ;;;***
 \f
-;;;### (autoloads nil "frameset" "frameset.el" (21300 58261 85827
+;;;### (autoloads nil "frameset" "frameset.el" (21300 27302 473448
 ;;;;;;  0))
 ;;; Generated autoloads from frameset.el
 
@@ -11493,6 +11458,12 @@ Called from `jump-to-register'.  Internal use only.
 
 \(fn DATA)" nil nil)
 
+(autoload 'frameset--print-register "frameset" "\
+Print basic info about frameset stored in DATA.
+Called from `list-registers' and `view-register'.  Internal use only.
+
+\(fn DATA)" nil nil)
+
 (autoload 'frameset-to-register "frameset" "\
 Store the current frameset in register REGISTER.
 Use \\[jump-to-register] to restore the frameset.
@@ -11504,15 +11475,15 @@ Interactively, reads the register using `register-read-with-preview'.
 
 ;;;***
 \f
-;;;### (autoloads nil "gamegrid" "play/gamegrid.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "gamegrid" "play/gamegrid.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from play/gamegrid.el
 (push (purecopy '(gamegrid 1 2)) package--builtin-versions)
 
 ;;;***
 \f
-;;;### (autoloads nil "gdb-mi" "progmodes/gdb-mi.el" (21346 62196
-;;;;;;  327729 0))
+;;;### (autoloads nil "gdb-mi" "progmodes/gdb-mi.el" (21350 58112
+;;;;;;  380040 0))
 ;;; Generated autoloads from progmodes/gdb-mi.el
 
 (defvar gdb-enable-debug nil "\
@@ -11589,8 +11560,8 @@ detailed description of this mode.
 
 ;;;***
 \f
-;;;### (autoloads nil "generic" "emacs-lisp/generic.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "generic" "emacs-lisp/generic.el" (21202 31159
+;;;;;;  541460 0))
 ;;; Generated autoloads from emacs-lisp/generic.el
 
 (defvar generic-mode-list nil "\
@@ -11634,9 +11605,9 @@ See the file generic-x.el for some examples of `define-generic-mode'.
 
 \(fn MODE COMMENT-LIST KEYWORD-LIST FONT-LOCK-LIST AUTO-MODE-LIST FUNCTION-LIST &optional DOCSTRING)" nil t)
 
-(put 'define-generic-mode 'lisp-indent-function '1)
+(function-put 'define-generic-mode 'lisp-indent-function '1)
 
-(put 'define-generic-mode 'doc-string-elt '7)
+(function-put 'define-generic-mode 'doc-string-elt '7)
 
 (autoload 'generic-mode-internal "generic" "\
 Go into the generic mode MODE.
@@ -11670,8 +11641,8 @@ regular expression that can be used as an element of
 
 ;;;***
 \f
-;;;### (autoloads nil "glasses" "progmodes/glasses.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "glasses" "progmodes/glasses.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from progmodes/glasses.el
 
 (autoload 'glasses-mode "glasses" "\
@@ -11685,8 +11656,8 @@ add virtual separators (like underscores) at places they belong to.
 
 ;;;***
 \f
-;;;### (autoloads nil "gmm-utils" "gnus/gmm-utils.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "gmm-utils" "gnus/gmm-utils.el" (21326 22692
+;;;;;;  123234 0))
 ;;; Generated autoloads from gnus/gmm-utils.el
 
 (autoload 'gmm-regexp-concat "gmm-utils" "\
@@ -11740,7 +11711,7 @@ DEFAULT-MAP specifies the default key map for ICON-LIST.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus" "gnus/gnus.el" (21291 53104 431149 0))
+;;;### (autoloads nil "gnus" "gnus/gnus.el" (21296 1575 438327 0))
 ;;; Generated autoloads from gnus/gnus.el
 (push (purecopy '(gnus 5 13)) package--builtin-versions)
 (when (fboundp 'custom-autoload)
@@ -11790,8 +11761,8 @@ prompt the user for the name of an NNTP server to use.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-agent" "gnus/gnus-agent.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "gnus-agent" "gnus/gnus-agent.el" (21274 64565
+;;;;;;  737222 0))
 ;;; Generated autoloads from gnus/gnus-agent.el
 
 (autoload 'gnus-unplugged "gnus-agent" "\
@@ -11881,8 +11852,8 @@ CLEAN is obsolete and ignored.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-art" "gnus/gnus-art.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "gnus-art" "gnus/gnus-art.el" (21546 33576
+;;;;;;  601815 0))
 ;;; Generated autoloads from gnus/gnus-art.el
 
 (autoload 'gnus-article-prepare-display "gnus-art" "\
@@ -11892,8 +11863,8 @@ Make the current buffer look like a nice article.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-bookmark" "gnus/gnus-bookmark.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "gnus-bookmark" "gnus/gnus-bookmark.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from gnus/gnus-bookmark.el
 
 (autoload 'gnus-bookmark-set "gnus-bookmark" "\
@@ -11916,8 +11887,8 @@ deletion, or > if it is flagged for displaying.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-cache" "gnus/gnus-cache.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "gnus-cache" "gnus/gnus-cache.el" (21296 1575
+;;;;;;  438327 0))
 ;;; Generated autoloads from gnus/gnus-cache.el
 
 (autoload 'gnus-jog-cache "gnus-cache" "\
@@ -11958,8 +11929,8 @@ supported.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-delay" "gnus/gnus-delay.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "gnus-delay" "gnus/gnus-delay.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from gnus/gnus-delay.el
 
 (autoload 'gnus-delay-article "gnus-delay" "\
@@ -11994,8 +11965,8 @@ Checking delayed messages is skipped if optional arg NO-CHECK is non-nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-diary" "gnus/gnus-diary.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "gnus-diary" "gnus/gnus-diary.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from gnus/gnus-diary.el
 
 (autoload 'gnus-user-format-function-d "gnus-diary" "\
@@ -12010,8 +11981,8 @@ Checking delayed messages is skipped if optional arg NO-CHECK is non-nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-dired" "gnus/gnus-dired.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "gnus-dired" "gnus/gnus-dired.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from gnus/gnus-dired.el
 
 (autoload 'turn-on-gnus-dired-mode "gnus-dired" "\
@@ -12021,8 +11992,8 @@ Convenience method to turn on gnus-dired-mode.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-draft" "gnus/gnus-draft.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "gnus-draft" "gnus/gnus-draft.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from gnus/gnus-draft.el
 
 (autoload 'gnus-draft-reminder "gnus-draft" "\
@@ -12032,13 +12003,22 @@ Reminder user if there are unsent drafts.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-fun" "gnus/gnus-fun.el" (21352 23381
-;;;;;;  760641 862000))
+;;;### (autoloads nil "gnus-fun" "gnus/gnus-fun.el" (21546 33576
+;;;;;;  601815 0))
 ;;; Generated autoloads from gnus/gnus-fun.el
 
+(autoload 'gnus--random-face-with-type "gnus-fun" "\
+Return file from DIR with extension EXT, omitting matches of OMIT, processed by FUN.
+
+\(fn DIR EXT OMIT FUN)" nil nil)
+
+(autoload 'message-goto-eoh "message" nil t)
+
 (autoload 'gnus-random-x-face "gnus-fun" "\
 Return X-Face header data chosen randomly from `gnus-x-face-directory'.
 
+Files matching `gnus-x-face-omit-files' are not considered.
+
 \(fn)" t nil)
 
 (autoload 'gnus-insert-random-x-face-header "gnus-fun" "\
@@ -12047,7 +12027,7 @@ Insert a random X-Face header from `gnus-x-face-directory'.
 \(fn)" t nil)
 
 (autoload 'gnus-x-face-from-file "gnus-fun" "\
-Insert an X-Face header based on an image file.
+Insert an X-Face header based on an image FILE.
 
 Depending on `gnus-convert-image-to-x-face-command' it may accept
 different input formats.
@@ -12055,7 +12035,7 @@ different input formats.
 \(fn FILE)" t nil)
 
 (autoload 'gnus-face-from-file "gnus-fun" "\
-Return a Face header based on an image file.
+Return a Face header based on an image FILE.
 
 Depending on `gnus-convert-image-to-face-command' it may accept
 different input formats.
@@ -12075,10 +12055,22 @@ FILE should be a PNG file that's 48x48 and smaller than or equal to
 
 \(fn FILE)" nil nil)
 
+(autoload 'gnus-random-face "gnus-fun" "\
+Return randomly chosen Face from `gnus-face-directory'.
+
+Files matching `gnus-face-omit-files' are not considered.
+
+\(fn)" t nil)
+
+(autoload 'gnus-insert-random-face-header "gnus-fun" "\
+Insert a random Face header from `gnus-face-directory'.
+
+\(fn)" nil nil)
+
 ;;;***
 \f
-;;;### (autoloads nil "gnus-gravatar" "gnus/gnus-gravatar.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "gnus-gravatar" "gnus/gnus-gravatar.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from gnus/gnus-gravatar.el
 
 (autoload 'gnus-treat-from-gravatar "gnus-gravatar" "\
@@ -12095,8 +12087,8 @@ If gravatars are already displayed, remove them.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-group" "gnus/gnus-group.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "gnus-group" "gnus/gnus-group.el" (21296 1575
+;;;;;;  438327 0))
 ;;; Generated autoloads from gnus/gnus-group.el
 
 (autoload 'gnus-fetch-group "gnus-group" "\
@@ -12113,8 +12105,8 @@ Pop up a frame and enter GROUP.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-html" "gnus/gnus-html.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "gnus-html" "gnus/gnus-html.el" (21296 1575
+;;;;;;  438327 0))
 ;;; Generated autoloads from gnus/gnus-html.el
 
 (autoload 'gnus-article-html "gnus-html" "\
@@ -12129,8 +12121,8 @@ Pop up a frame and enter GROUP.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-kill" "gnus/gnus-kill.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "gnus-kill" "gnus/gnus-kill.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from gnus/gnus-kill.el
 
 (defalias 'gnus-batch-kill 'gnus-batch-score)
@@ -12143,7 +12135,7 @@ Usage: emacs -batch -l ~/.emacs -l gnus -f gnus-batch-score
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-ml" "gnus/gnus-ml.el" (21291 53104 431149
+;;;### (autoloads nil "gnus-ml" "gnus/gnus-ml.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from gnus/gnus-ml.el
 
@@ -12167,8 +12159,8 @@ Minor mode for providing mailing-list commands.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-mlspl" "gnus/gnus-mlspl.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "gnus-mlspl" "gnus/gnus-mlspl.el" (21296 1575
+;;;;;;  438327 0))
 ;;; Generated autoloads from gnus/gnus-mlspl.el
 
 (autoload 'gnus-group-split-setup "gnus-mlspl" "\
@@ -12268,8 +12260,8 @@ Calling (gnus-group-split-fancy nil nil \"mail.others\") returns:
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-msg" "gnus/gnus-msg.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "gnus-msg" "gnus/gnus-msg.el" (21467 26920
+;;;;;;  243336 0))
 ;;; Generated autoloads from gnus/gnus-msg.el
 
 (autoload 'gnus-msg-mail "gnus-msg" "\
@@ -12296,7 +12288,7 @@ Like `message-reply'.
 ;;;***
 \f
 ;;;### (autoloads nil "gnus-notifications" "gnus/gnus-notifications.el"
-;;;;;;  (21291 53104 431149 0))
+;;;;;;  (21296 1575 438327 0))
 ;;; Generated autoloads from gnus/gnus-notifications.el
 
 (autoload 'gnus-notifications "gnus-notifications" "\
@@ -12312,8 +12304,8 @@ This is typically a function to add in
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-picon" "gnus/gnus-picon.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "gnus-picon" "gnus/gnus-picon.el" (21296 1575
+;;;;;;  438327 0))
 ;;; Generated autoloads from gnus/gnus-picon.el
 
 (autoload 'gnus-treat-from-picon "gnus-picon" "\
@@ -12336,8 +12328,8 @@ If picons are already displayed, remove them.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-range" "gnus/gnus-range.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "gnus-range" "gnus/gnus-range.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from gnus/gnus-range.el
 
 (autoload 'gnus-sorted-difference "gnus-range" "\
@@ -12404,8 +12396,8 @@ Add NUM into sorted LIST by side effect.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-registry" "gnus/gnus-registry.el" (21346
-;;;;;;  62196 327729 0))
+;;;### (autoloads nil "gnus-registry" "gnus/gnus-registry.el" (21350
+;;;;;;  58112 380040 0))
 ;;; Generated autoloads from gnus/gnus-registry.el
 
 (autoload 'gnus-registry-initialize "gnus-registry" "\
@@ -12420,8 +12412,8 @@ Install the registry hooks.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-sieve" "gnus/gnus-sieve.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "gnus-sieve" "gnus/gnus-sieve.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from gnus/gnus-sieve.el
 
 (autoload 'gnus-sieve-update "gnus-sieve" "\
@@ -12448,8 +12440,8 @@ See the documentation for these variables and functions for details.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-spec" "gnus/gnus-spec.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "gnus-spec" "gnus/gnus-spec.el" (21296 1575
+;;;;;;  438327 0))
 ;;; Generated autoloads from gnus/gnus-spec.el
 
 (autoload 'gnus-update-format "gnus-spec" "\
@@ -12459,8 +12451,8 @@ Update the format specification near point.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-start" "gnus/gnus-start.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "gnus-start" "gnus/gnus-start.el" (21434 29609
+;;;;;;  547282 0))
 ;;; Generated autoloads from gnus/gnus-start.el
 
 (autoload 'gnus-declare-backend "gnus-start" "\
@@ -12470,8 +12462,8 @@ Declare back end NAME with ABILITIES as a Gnus back end.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-sum" "gnus/gnus-sum.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "gnus-sum" "gnus/gnus-sum.el" (21485 56871
+;;;;;;  932720 0))
 ;;; Generated autoloads from gnus/gnus-sum.el
 
 (autoload 'gnus-summary-bookmark-jump "gnus-sum" "\
@@ -12482,8 +12474,8 @@ BOOKMARK is a bookmark name or a bookmark record.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-sync" "gnus/gnus-sync.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "gnus-sync" "gnus/gnus-sync.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from gnus/gnus-sync.el
 
 (autoload 'gnus-sync-initialize "gnus-sync" "\
@@ -12498,8 +12490,8 @@ Install the sync hooks.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnus-win" "gnus/gnus-win.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "gnus-win" "gnus/gnus-win.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from gnus/gnus-win.el
 
 (autoload 'gnus-add-configuration "gnus-win" "\
@@ -12509,7 +12501,7 @@ Add the window configuration CONF to `gnus-buffer-configuration'.
 
 ;;;***
 \f
-;;;### (autoloads nil "gnutls" "net/gnutls.el" (21291 53104 431149
+;;;### (autoloads nil "gnutls" "net/gnutls.el" (21427 56357 771874
 ;;;;;;  0))
 ;;; Generated autoloads from net/gnutls.el
 
@@ -12526,7 +12518,7 @@ A value of nil says to use the default GnuTLS value.")
 
 ;;;***
 \f
-;;;### (autoloads nil "gomoku" "play/gomoku.el" (21291 53104 431149
+;;;### (autoloads nil "gomoku" "play/gomoku.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from play/gomoku.el
 
@@ -12553,8 +12545,8 @@ Use \\[describe-mode] for more info.
 
 ;;;***
 \f
-;;;### (autoloads nil "goto-addr" "net/goto-addr.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "goto-addr" "net/goto-addr.el" (21240 46395
+;;;;;;  727291 0))
 ;;; Generated autoloads from net/goto-addr.el
 
 (define-obsolete-function-alias 'goto-address-at-mouse 'goto-address-at-point "22.1")
@@ -12595,8 +12587,8 @@ Like `goto-address-mode', but only for comments and strings.
 
 ;;;***
 \f
-;;;### (autoloads nil "gravatar" "gnus/gravatar.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "gravatar" "gnus/gravatar.el" (21296 1575 438327
+;;;;;;  0))
 ;;; Generated autoloads from gnus/gravatar.el
 
 (autoload 'gravatar-retrieve "gravatar" "\
@@ -12612,7 +12604,7 @@ Retrieve MAIL-ADDRESS gravatar and returns it.
 
 ;;;***
 \f
-;;;### (autoloads nil "grep" "progmodes/grep.el" (21291 53104 431149
+;;;### (autoloads nil "grep" "progmodes/grep.el" (21542 36519 256429
 ;;;;;;  0))
 ;;; Generated autoloads from progmodes/grep.el
 
@@ -12646,7 +12638,7 @@ List of hook functions run by `grep-process-setup' (see `run-hooks').")
 
 (custom-autoload 'grep-setup-hook "grep" t)
 
-(defconst grep-regexp-alist '(("^\\(.+?\\)\\(:[        ]*\\)\\([1-9][0-9]*\\)\\2" 1 3 ((lambda nil (when grep-highlight-matches (let* ((beg (match-end 0)) (end (save-excursion (goto-char beg) (line-end-position))) (mbeg (text-property-any beg end 'font-lock-face grep-match-face))) (when mbeg (- mbeg beg))))) lambda nil (when grep-highlight-matches (let* ((beg (match-end 0)) (end (save-excursion (goto-char beg) (line-end-position))) (mbeg (text-property-any beg end 'font-lock-face grep-match-face)) (mend (and mbeg (next-single-property-change mbeg 'font-lock-face nil end)))) (when mend (- mend beg)))))) ("^Binary file \\(.+\\) matches$" 1 nil nil 0 1)) "\
+(defconst grep-regexp-alist '(("^\\(.*?[^/\n]\\):[     ]*\\([1-9][0-9]*\\)[    ]*:" 1 2 ((lambda nil (when grep-highlight-matches (let* ((beg (match-end 0)) (end (save-excursion (goto-char beg) (line-end-position))) (mbeg (text-property-any beg end 'font-lock-face grep-match-face))) (when mbeg (- mbeg beg))))) lambda nil (when grep-highlight-matches (let* ((beg (match-end 0)) (end (save-excursion (goto-char beg) (line-end-position))) (mbeg (text-property-any beg end 'font-lock-face grep-match-face)) (mend (and mbeg (next-single-property-change mbeg 'font-lock-face nil end)))) (when mend (- mend beg)))))) ("^Binary file \\(.+\\) matches$" 1 nil nil 0 1)) "\
 Regexp used to match grep hits.  See `compilation-error-regexp-alist'.")
 
 (defvar grep-program (purecopy "grep") "\
@@ -12771,13 +12763,13 @@ Recursively grep for REGEXP in gzipped FILES in tree rooted at DIR.
 Like `rgrep' but uses `zgrep' for `grep-program', sets the default
 file name to `*.gz', and sets `grep-highlight-matches' to `always'.
 
-\(fn REGEXP &optional FILES DIR CONFIRM GREP-FIND-TEMPLATE)" t nil)
+\(fn REGEXP &optional FILES DIR CONFIRM TEMPLATE)" t nil)
 
 (defalias 'rzgrep 'zrgrep)
 
 ;;;***
 \f
-;;;### (autoloads nil "gs" "gs.el" (21291 53104 431149 0))
+;;;### (autoloads nil "gs" "gs.el" (21240 46395 727291 0))
 ;;; Generated autoloads from gs.el
 
 (autoload 'gs-load-image "gs" "\
@@ -12790,7 +12782,7 @@ the form \"WINDOW-ID PIXMAP-ID\".  Value is non-nil if successful.
 
 ;;;***
 \f
-;;;### (autoloads nil "gud" "progmodes/gud.el" (21513 8534 259476
+;;;### (autoloads nil "gud" "progmodes/gud.el" (21510 60072 112989
 ;;;;;;  0))
 ;;; Generated autoloads from progmodes/gud.el
 
@@ -12839,6 +12831,13 @@ and source-file directory for your debugger.
 
 \(fn COMMAND-LINE)" t nil)
 
+(autoload 'guiler "gud" "\
+Run guiler on program FILE in buffer `*gud-FILE*'.
+The directory containing FILE becomes the initial working directory
+and source-file directory for your debugger.
+
+\(fn COMMAND-LINE)" t nil)
+
 (autoload 'jdb "gud" "\
 Run jdb with command line COMMAND-LINE in a buffer.
 The buffer is named \"*gud*\" if no initial class is given or
@@ -12879,7 +12878,7 @@ it if ARG is omitted or nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "gv" "emacs-lisp/gv.el" (21386 29521 774249
+;;;### (autoloads nil "gv" "emacs-lisp/gv.el" (21388 20265 495157
 ;;;;;;  0))
 ;;; Generated autoloads from emacs-lisp/gv.el
 
@@ -12908,7 +12907,7 @@ all the parts of PLACE that can be evaluated and then runs E.
 
 \(fn (GETTER SETTER) PLACE &rest BODY)" nil t)
 
-(put 'gv-letplace 'lisp-indent-function '2)
+(function-put 'gv-letplace 'lisp-indent-function '2)
 
 (autoload 'gv-define-expander "gv" "\
 Use HANDLER to handle NAME as a generalized var.
@@ -12918,7 +12917,7 @@ arguments as NAME.  DO is a function as defined in `gv-get'.
 
 \(fn NAME HANDLER)" nil t)
 
-(put 'gv-define-expander 'lisp-indent-function '1)
+(function-put 'gv-define-expander 'lisp-indent-function '1)
 
 (autoload 'gv--defun-declaration "gv" "\
 
@@ -12943,7 +12942,7 @@ to be pure and copyable.  Example use:
 
 \(fn NAME ARGLIST &rest BODY)" nil t)
 
-(put 'gv-define-setter 'lisp-indent-function '2)
+(function-put 'gv-define-setter 'lisp-indent-function '2)
 
 (autoload 'gv-define-simple-setter "gv" "\
 Define a simple setter method for generalized variable NAME.
@@ -12982,8 +12981,8 @@ binding mode.
 
 ;;;***
 \f
-;;;### (autoloads nil "handwrite" "play/handwrite.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "handwrite" "play/handwrite.el" (21207 49087
+;;;;;;  974317 0))
 ;;; Generated autoloads from play/handwrite.el
 
 (autoload 'handwrite "handwrite" "\
@@ -13000,7 +12999,7 @@ Variables: `handwrite-linespace'     (default 12)
 
 ;;;***
 \f
-;;;### (autoloads nil "hanoi" "play/hanoi.el" (21291 53104 431149
+;;;### (autoloads nil "hanoi" "play/hanoi.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from play/hanoi.el
 
@@ -13028,8 +13027,8 @@ to be updated.
 
 ;;;***
 \f
-;;;### (autoloads nil "hashcash" "mail/hashcash.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "hashcash" "mail/hashcash.el" (21296 1575 438327
+;;;;;;  0))
 ;;; Generated autoloads from mail/hashcash.el
 
 (autoload 'hashcash-insert-payment "hashcash" "\
@@ -13071,7 +13070,7 @@ Prefix arg sets default accept amount temporarily.
 
 ;;;***
 \f
-;;;### (autoloads nil "help-at-pt" "help-at-pt.el" (21291 53104 431149
+;;;### (autoloads nil "help-at-pt" "help-at-pt.el" (21231 31415 579137
 ;;;;;;  0))
 ;;; Generated autoloads from help-at-pt.el
 
@@ -13199,7 +13198,7 @@ different regions.  With numeric argument ARG, behaves like
 
 ;;;***
 \f
-;;;### (autoloads nil "help-fns" "help-fns.el" (21418 19288 912946
+;;;### (autoloads nil "help-fns" "help-fns.el" (21419 62246 751914
 ;;;;;;  0))
 ;;; Generated autoloads from help-fns.el
 
@@ -13279,7 +13278,7 @@ Produce a texinfo buffer with sorted doc-strings from the DOC file.
 
 ;;;***
 \f
-;;;### (autoloads nil "help-macro" "help-macro.el" (21291 53104 431149
+;;;### (autoloads nil "help-macro" "help-macro.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from help-macro.el
 
@@ -13294,7 +13293,7 @@ gives the window that lists the options.")
 
 ;;;***
 \f
-;;;### (autoloads nil "help-mode" "help-mode.el" (21291 53104 431149
+;;;### (autoloads nil "help-mode" "help-mode.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from help-mode.el
 
@@ -13394,8 +13393,8 @@ BOOKMARK is a bookmark name or a bookmark record.
 
 ;;;***
 \f
-;;;### (autoloads nil "helper" "emacs-lisp/helper.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "helper" "emacs-lisp/helper.el" (21240 46395
+;;;;;;  727291 0))
 ;;; Generated autoloads from emacs-lisp/helper.el
 
 (autoload 'Helper-describe-bindings "helper" "\
@@ -13410,7 +13409,7 @@ Provide help for current mode.
 
 ;;;***
 \f
-;;;### (autoloads nil "hexl" "hexl.el" (21291 53104 431149 0))
+;;;### (autoloads nil "hexl" "hexl.el" (21271 1974 113743 0))
 ;;; Generated autoloads from hexl.el
 
 (autoload 'hexl-mode "hexl" "\
@@ -13504,8 +13503,7 @@ This discards the buffer's undo information.
 
 ;;;***
 \f
-;;;### (autoloads nil "hi-lock" "hi-lock.el" (21291 53104 431149
-;;;;;;  0))
+;;;### (autoloads nil "hi-lock" "hi-lock.el" (21383 2343 498187 0))
 ;;; Generated autoloads from hi-lock.el
 
 (autoload 'hi-lock-mode "hi-lock" "\
@@ -13672,8 +13670,8 @@ be found in variable `hi-lock-interactive-patterns'.
 
 ;;;***
 \f
-;;;### (autoloads nil "hideif" "progmodes/hideif.el" (21452 39235
-;;;;;;  700171 164000))
+;;;### (autoloads nil "hideif" "progmodes/hideif.el" (21546 33576
+;;;;;;  601815 0))
 ;;; Generated autoloads from progmodes/hideif.el
 
 (autoload 'hide-ifdef-mode "hideif" "\
@@ -13688,27 +13686,31 @@ that the C preprocessor would eliminate may be hidden from view.
 Several variables affect how the hiding is done:
 
 `hide-ifdef-env'
-       An association list of defined and undefined symbols for the
-       current buffer.  Initially, the global value of `hide-ifdef-env'
-       is used.
+        An association list of defined and undefined symbols for the
+        current project.  Initially, the global value of `hide-ifdef-env'
+        is used.  This variable was a buffer-local variable, which limits
+        hideif to parse only one C/C++ file at a time.  We've extended
+        hideif to support parsing a C/C++ project containing multiple C/C++
+        source files opened simultaneously in different buffers.  Therefore
+        `hide-ifdef-env' can no longer be buffer local but must be global.
 
 `hide-ifdef-define-alist'
-       An association list of defined symbol lists.
+        An association list of defined symbol lists.
         Use `hide-ifdef-set-define-alist' to save the current `hide-ifdef-env'
         and `hide-ifdef-use-define-alist' to set the current `hide-ifdef-env'
         from one of the lists in `hide-ifdef-define-alist'.
 
 `hide-ifdef-lines'
-       Set to non-nil to not show #if, #ifdef, #ifndef, #else, and
-       #endif lines when hiding.
+        Set to non-nil to not show #if, #ifdef, #ifndef, #else, and
+        #endif lines when hiding.
 
 `hide-ifdef-initially'
-       Indicates whether `hide-ifdefs' should be called when Hide-Ifdef mode
-       is activated.
+        Indicates whether `hide-ifdefs' should be called when Hide-Ifdef mode
+        is activated.
 
 `hide-ifdef-read-only'
-       Set to non-nil if you want to make buffers read only while hiding.
-       After `show-ifdefs', read-only status is restored to previous value.
+        Set to non-nil if you want to make buffers read only while hiding.
+        After `show-ifdefs', read-only status is restored to previous value.
 
 \\{hide-ifdef-mode-map}
 
@@ -13716,8 +13718,8 @@ Several variables affect how the hiding is done:
 
 ;;;***
 \f
-;;;### (autoloads nil "hideshow" "progmodes/hideshow.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "hideshow" "progmodes/hideshow.el" (21460 53672
+;;;;;;  48319 0))
 ;;; Generated autoloads from progmodes/hideshow.el
 
 (defvar hs-special-modes-alist (mapcar 'purecopy '((c-mode "{" "}" "/[*/]" nil nil) (c++-mode "{" "}" "/[*/]" nil nil) (bibtex-mode ("@\\S(*\\(\\s(\\)" 1)) (java-mode "{" "}" "/[*/]" nil nil) (js-mode "{" "}" "/[*/]" nil))) "\
@@ -13779,7 +13781,7 @@ Unconditionally turn off `hs-minor-mode'.
 
 ;;;***
 \f
-;;;### (autoloads nil "hilit-chg" "hilit-chg.el" (21291 53104 431149
+;;;### (autoloads nil "hilit-chg" "hilit-chg.el" (21271 1974 113743
 ;;;;;;  0))
 ;;; Generated autoloads from hilit-chg.el
 
@@ -13911,7 +13913,7 @@ See `highlight-changes-mode' for more information on Highlight-Changes mode.
 
 ;;;***
 \f
-;;;### (autoloads nil "hippie-exp" "hippie-exp.el" (21377 1451 96610
+;;;### (autoloads nil "hippie-exp" "hippie-exp.el" (21402 53158 293492
 ;;;;;;  0))
 ;;; Generated autoloads from hippie-exp.el
 (push (purecopy '(hippie-exp 1 6)) package--builtin-versions)
@@ -13944,7 +13946,7 @@ argument VERBOSE non-nil makes the function verbose.
 
 ;;;***
 \f
-;;;### (autoloads nil "hl-line" "hl-line.el" (21291 53104 431149
+;;;### (autoloads nil "hl-line" "hl-line.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from hl-line.el
 
@@ -13994,8 +13996,8 @@ Global-Hl-Line mode uses the functions `global-hl-line-unhighlight' and
 
 ;;;***
 \f
-;;;### (autoloads nil "holidays" "calendar/holidays.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "holidays" "calendar/holidays.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from calendar/holidays.el
 
 (define-obsolete-variable-alias 'general-holidays 'holiday-general-holidays "23.1")
@@ -14143,8 +14145,8 @@ The optional LABEL is used to label the buffer created.
 
 ;;;***
 \f
-;;;### (autoloads nil "html2text" "gnus/html2text.el" (21415 30982
-;;;;;;  815536 0))
+;;;### (autoloads nil "html2text" "gnus/html2text.el" (21417 20521
+;;;;;;  870414 0))
 ;;; Generated autoloads from gnus/html2text.el
 
 (autoload 'html2text "html2text" "\
@@ -14154,8 +14156,8 @@ Convert HTML to plain text in the current buffer.
 
 ;;;***
 \f
-;;;### (autoloads nil "htmlfontify" "htmlfontify.el" (21341 23900
-;;;;;;  988149 0))
+;;;### (autoloads nil "htmlfontify" "htmlfontify.el" (21383 2343
+;;;;;;  498187 0))
 ;;; Generated autoloads from htmlfontify.el
 (push (purecopy '(htmlfontify 0 21)) package--builtin-versions)
 
@@ -14188,7 +14190,7 @@ You may also want to set `hfy-page-header' and `hfy-page-footer'.
 
 ;;;***
 \f
-;;;### (autoloads nil "ibuf-macs" "ibuf-macs.el" (21291 53104 431149
+;;;### (autoloads nil "ibuf-macs" "ibuf-macs.el" (21537 18599 384335
 ;;;;;;  0))
 ;;; Generated autoloads from ibuf-macs.el
 
@@ -14277,8 +14279,8 @@ bound to the current value of the filter.
 
 ;;;***
 \f
-;;;### (autoloads nil "ibuffer" "ibuffer.el" (21291 53104 431149
-;;;;;;  0))
+;;;### (autoloads nil "ibuffer" "ibuffer.el" (21537 18854 710114
+;;;;;;  217000))
 ;;; Generated autoloads from ibuffer.el
 
 (autoload 'ibuffer-list-buffers "ibuffer" "\
@@ -14317,8 +14319,8 @@ FORMATS is the value to use for `ibuffer-formats'.
 
 ;;;***
 \f
-;;;### (autoloads nil "icalendar" "calendar/icalendar.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "icalendar" "calendar/icalendar.el" (21546
+;;;;;;  33576 601815 0))
 ;;; Generated autoloads from calendar/icalendar.el
 (push (purecopy '(icalendar 0 19)) package--builtin-versions)
 
@@ -14371,7 +14373,7 @@ buffer `*icalendar-errors*'.
 
 ;;;***
 \f
-;;;### (autoloads nil "icomplete" "icomplete.el" (21291 53104 431149
+;;;### (autoloads nil "icomplete" "icomplete.el" (21268 25782 576189
 ;;;;;;  0))
 ;;; Generated autoloads from icomplete.el
 
@@ -14407,7 +14409,7 @@ completions:
 
 ;;;***
 \f
-;;;### (autoloads nil "icon" "progmodes/icon.el" (21291 53104 431149
+;;;### (autoloads nil "icon" "progmodes/icon.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from progmodes/icon.el
 
@@ -14448,8 +14450,8 @@ with no args, if that value is non-nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "idlw-shell" "progmodes/idlw-shell.el" (21423
-;;;;;;  29775 174830 222000))
+;;;### (autoloads nil "idlw-shell" "progmodes/idlw-shell.el" (21429
+;;;;;;  11690 49391 0))
 ;;; Generated autoloads from progmodes/idlw-shell.el
 
 (autoload 'idlwave-shell "idlw-shell" "\
@@ -14474,8 +14476,8 @@ See also the variable `idlwave-shell-prompt-pattern'.
 
 ;;;***
 \f
-;;;### (autoloads nil "idlwave" "progmodes/idlwave.el" (21423 29709
-;;;;;;  912469 748000))
+;;;### (autoloads nil "idlwave" "progmodes/idlwave.el" (21429 11690
+;;;;;;  49391 0))
 ;;; Generated autoloads from progmodes/idlwave.el
 (push (purecopy '(idlwave 6 1 22)) package--builtin-versions)
 
@@ -14604,7 +14606,7 @@ The main features of this mode are
 
 ;;;***
 \f
-;;;### (autoloads nil "ido" "ido.el" (21291 53104 431149 0))
+;;;### (autoloads nil "ido" "ido.el" (21268 25782 576189 0))
 ;;; Generated autoloads from ido.el
 
 (defvar ido-mode nil "\
@@ -14866,7 +14868,7 @@ DEF, if non-nil, is the default value.
 
 ;;;***
 \f
-;;;### (autoloads nil "ielm" "ielm.el" (21291 53104 431149 0))
+;;;### (autoloads nil "ielm" "ielm.el" (21542 36519 256429 0))
 ;;; Generated autoloads from ielm.el
 
 (autoload 'ielm "ielm" "\
@@ -14878,7 +14880,7 @@ See `inferior-emacs-lisp-mode' for details.
 
 ;;;***
 \f
-;;;### (autoloads nil "iimage" "iimage.el" (21291 53104 431149 0))
+;;;### (autoloads nil "iimage" "iimage.el" (21289 28325 826818 0))
 ;;; Generated autoloads from iimage.el
 
 (define-obsolete-function-alias 'turn-on-iimage-mode 'iimage-mode "24.1")
@@ -14894,7 +14896,7 @@ the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'.
 
 ;;;***
 \f
-;;;### (autoloads nil "image" "image.el" (21526 9707 512144 108000))
+;;;### (autoloads nil "image" "image.el" (21526 48295 289762 0))
 ;;; Generated autoloads from image.el
 
 (autoload 'image-type-from-data "image" "\
@@ -15069,7 +15071,7 @@ Example:
 
 \(fn SYMBOL SPECS &optional DOC)" nil t)
 
-(put 'defimage 'doc-string-elt '3)
+(function-put 'defimage 'doc-string-elt '3)
 
 (autoload 'imagemagick-register-types "image" "\
 Register file types that can be handled by ImageMagick.
@@ -15087,8 +15089,8 @@ If Emacs is compiled without ImageMagick support, this does nothing.
 
 ;;;***
 \f
-;;;### (autoloads nil "image-dired" "image-dired.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "image-dired" "image-dired.el" (21194 37048
+;;;;;;  599945 0))
 ;;; Generated autoloads from image-dired.el
 (push (purecopy '(image-dired 0 4 11)) package--builtin-versions)
 
@@ -15225,7 +15227,7 @@ easy-to-use form.
 
 ;;;***
 \f
-;;;### (autoloads nil "image-file" "image-file.el" (21291 53104 431149
+;;;### (autoloads nil "image-file" "image-file.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from image-file.el
 
@@ -15288,7 +15290,7 @@ An image file is one whose name has an extension in
 
 ;;;***
 \f
-;;;### (autoloads nil "image-mode" "image-mode.el" (21291 53104 431149
+;;;### (autoloads nil "image-mode" "image-mode.el" (21532 676 459903
 ;;;;;;  0))
 ;;; Generated autoloads from image-mode.el
 
@@ -15336,7 +15338,7 @@ on these modes.
 
 ;;;***
 \f
-;;;### (autoloads nil "imenu" "imenu.el" (21291 53104 431149 0))
+;;;### (autoloads nil "imenu" "imenu.el" (21257 55477 969423 0))
 ;;; Generated autoloads from imenu.el
 
 (defvar imenu-sort-function nil "\
@@ -15474,8 +15476,8 @@ for more information.
 
 ;;;***
 \f
-;;;### (autoloads nil "ind-util" "language/ind-util.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "ind-util" "language/ind-util.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from language/ind-util.el
 
 (autoload 'indian-compose-region "ind-util" "\
@@ -15505,8 +15507,8 @@ Convert old Emacs Devanagari characters to UCS.
 
 ;;;***
 \f
-;;;### (autoloads nil "inf-lisp" "progmodes/inf-lisp.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "inf-lisp" "progmodes/inf-lisp.el" (21437 5802
+;;;;;;  125919 0))
 ;;; Generated autoloads from progmodes/inf-lisp.el
 
 (autoload 'inferior-lisp "inf-lisp" "\
@@ -15524,7 +15526,7 @@ of `inferior-lisp-program').  Runs the hooks from
 
 ;;;***
 \f
-;;;### (autoloads nil "info" "info.el" (21478 34653 139782 0))
+;;;### (autoloads nil "info" "info.el" (21480 38952 540043 0))
 ;;; Generated autoloads from info.el
 
 (defcustom Info-default-directory-list (let* ((config-dir (file-name-as-directory (or (and (featurep 'ns) (let ((dir (expand-file-name "../info" data-directory))) (if (file-directory-p dir) dir))) configure-info-directory))) (prefixes (prune-directory-list '("/usr/local/" "/usr/" "/opt/" "/"))) (suffixes '("share/" "" "gnu/" "gnu/lib/" "gnu/lib/emacs/" "emacs/" "lib/" "lib/emacs/")) (standard-info-dirs (apply #'nconc (mapcar (lambda (pfx) (let ((dirs (mapcar (lambda (sfx) (concat pfx sfx "info/")) suffixes))) (prune-directory-list dirs))) prefixes))) (dirs (if (member config-dir standard-info-dirs) (nconc standard-info-dirs (list config-dir)) (cons config-dir standard-info-dirs)))) (if (not (eq system-type 'windows-nt)) dirs (let* ((instdir (file-name-directory invocation-directory)) (dir1 (expand-file-name "../info/" instdir)) (dir2 (expand-file-name "../../../info/" instdir))) (cond ((file-exists-p dir1) (append dirs (list dir1))) ((file-exists-p dir2) (append dirs (list dir2))) (t dirs))))) "\
@@ -15734,7 +15736,7 @@ Otherwise, visit the manual in a new Info buffer.
 
 ;;;***
 \f
-;;;### (autoloads nil "info-look" "info-look.el" (21291 53104 431149
+;;;### (autoloads nil "info-look" "info-look.el" (21238 4664 559807
 ;;;;;;  0))
 ;;; Generated autoloads from info-look.el
 
@@ -15782,7 +15784,7 @@ Perform completion on file preceding point.
 
 ;;;***
 \f
-;;;### (autoloads nil "info-xref" "info-xref.el" (21291 53104 431149
+;;;### (autoloads nil "info-xref" "info-xref.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from info-xref.el
 (push (purecopy '(info-xref 3)) package--builtin-versions)
@@ -15866,7 +15868,7 @@ the sources handy.
 
 ;;;***
 \f
-;;;### (autoloads nil "informat" "informat.el" (21291 53104 431149
+;;;### (autoloads nil "informat" "informat.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from informat.el
 
@@ -15912,8 +15914,8 @@ For example, invoke \"emacs -batch -f batch-info-validate $info/ ~/*.info\"
 
 ;;;***
 \f
-;;;### (autoloads nil "inversion" "cedet/inversion.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "inversion" "cedet/inversion.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from cedet/inversion.el
 (push (purecopy '(inversion 1 3)) package--builtin-versions)
 
@@ -15925,8 +15927,8 @@ Only checks one based on which kind of Emacs is being run.
 
 ;;;***
 \f
-;;;### (autoloads nil "isearch-x" "international/isearch-x.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "isearch-x" "international/isearch-x.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from international/isearch-x.el
 
 (autoload 'isearch-toggle-specified-input-method "isearch-x" "\
@@ -15946,7 +15948,7 @@ Toggle input method in interactive search.
 
 ;;;***
 \f
-;;;### (autoloads nil "isearchb" "isearchb.el" (21291 53104 431149
+;;;### (autoloads nil "isearchb" "isearchb.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from isearchb.el
 (push (purecopy '(isearchb 1 5)) package--builtin-versions)
@@ -15961,8 +15963,8 @@ accessed via isearchb.
 
 ;;;***
 \f
-;;;### (autoloads nil "iso-cvt" "international/iso-cvt.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "iso-cvt" "international/iso-cvt.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from international/iso-cvt.el
 
 (autoload 'iso-spanish "iso-cvt" "\
@@ -16053,15 +16055,15 @@ Add submenus to the File menu, to convert to and from various formats.
 ;;;***
 \f
 ;;;### (autoloads nil "iso-transl" "international/iso-transl.el"
-;;;;;;  (21291 53104 431149 0))
+;;;;;;  (21240 46395 727291 0))
 ;;; Generated autoloads from international/iso-transl.el
  (define-key key-translation-map "\C-x8" 'iso-transl-ctl-x-8-map)
  (autoload 'iso-transl-ctl-x-8-map "iso-transl" "Keymap for C-x 8 prefix." t 'keymap)
 
 ;;;***
 \f
-;;;### (autoloads nil "ispell" "textmodes/ispell.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "ispell" "textmodes/ispell.el" (21356 43818
+;;;;;;  957743 0))
 ;;; Generated autoloads from textmodes/ispell.el
 
 (put 'ispell-check-comments 'safe-local-variable (lambda (a) (memq a '(nil t exclusive))))
@@ -16294,8 +16296,36 @@ You can bind this to the key C-c i in GNUS or mail by adding to
 
 ;;;***
 \f
-;;;### (autoloads nil "japan-util" "language/japan-util.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "iswitchb" "obsolete/iswitchb.el" (21300 29848
+;;;;;;  351552 156000))
+;;; Generated autoloads from obsolete/iswitchb.el
+
+(defvar iswitchb-mode nil "\
+Non-nil if Iswitchb mode is enabled.
+See the command `iswitchb-mode' for a description of this minor mode.
+Setting this variable directly does not take effect;
+either customize it (see the info node `Easy Customization')
+or call the function `iswitchb-mode'.")
+
+(custom-autoload 'iswitchb-mode "iswitchb" nil)
+
+(autoload 'iswitchb-mode "iswitchb" "\
+Toggle Iswitchb mode.
+With a prefix argument ARG, enable Iswitchb mode if ARG is
+positive, and disable it otherwise.  If called from Lisp, enable
+the mode if ARG is omitted or nil.
+
+Iswitchb mode is a global minor mode that enables switching
+between buffers using substrings.  See `iswitchb' for details.
+
+\(fn &optional ARG)" t nil)
+
+(make-obsolete 'iswitchb-mode "use `icomplete-mode' or `ido-mode' instead." "24.4")
+
+;;;***
+\f
+;;;### (autoloads nil "japan-util" "language/japan-util.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from language/japan-util.el
 
 (autoload 'setup-japanese-environment-internal "japan-util" "\
@@ -16372,7 +16402,7 @@ If non-nil, second arg INITIAL-INPUT is a string to insert before reading.
 
 ;;;***
 \f
-;;;### (autoloads nil "jka-compr" "jka-compr.el" (21291 53104 431149
+;;;### (autoloads nil "jka-compr" "jka-compr.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from jka-compr.el
 
@@ -16396,8 +16426,7 @@ by `jka-compr-installed'.
 
 ;;;***
 \f
-;;;### (autoloads nil "js" "progmodes/js.el" (21387 48819 906838
-;;;;;;  0))
+;;;### (autoloads nil "js" "progmodes/js.el" (21529 24490 97012 0))
 ;;; Generated autoloads from progmodes/js.el
 (push (purecopy '(js 9)) package--builtin-versions)
 
@@ -16407,16 +16436,18 @@ Major mode for editing JavaScript.
 \(fn)" t nil)
  (defalias 'javascript-mode 'js-mode)
 
+(dolist (name (list "node" "nodejs" "gjs" "rhino")) (add-to-list 'interpreter-mode-alist (cons (purecopy name) 'js-mode)))
+
 ;;;***
 \f
-;;;### (autoloads nil "json" "json.el" (21291 53104 431149 0))
+;;;### (autoloads nil "json" "json.el" (21187 63826 213216 0))
 ;;; Generated autoloads from json.el
 (push (purecopy '(json 1 4)) package--builtin-versions)
 
 ;;;***
 \f
-;;;### (autoloads nil "keypad" "emulation/keypad.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "keypad" "emulation/keypad.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from emulation/keypad.el
 
 (defvar keypad-setup nil "\
@@ -16471,8 +16502,8 @@ the decimal key on the keypad is mapped to DECIMAL instead of `.'
 
 ;;;***
 \f
-;;;### (autoloads nil "kinsoku" "international/kinsoku.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "kinsoku" "international/kinsoku.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from international/kinsoku.el
 
 (autoload 'kinsoku "kinsoku" "\
@@ -16493,7 +16524,7 @@ the context of text formatting.
 
 ;;;***
 \f
-;;;### (autoloads nil "kkc" "international/kkc.el" (21291 53104 431149
+;;;### (autoloads nil "kkc" "international/kkc.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from international/kkc.el
 
@@ -16516,7 +16547,7 @@ and the return value is the length of the conversion.
 
 ;;;***
 \f
-;;;### (autoloads nil "kmacro" "kmacro.el" (21291 53104 431149 0))
+;;;### (autoloads nil "kmacro" "kmacro.el" (21244 11875 194797 0))
 ;;; Generated autoloads from kmacro.el
  (global-set-key "\C-x(" 'kmacro-start-macro)
  (global-set-key "\C-x)" 'kmacro-end-macro)
@@ -16628,8 +16659,8 @@ If kbd macro currently being defined end it before activating it.
 
 ;;;***
 \f
-;;;### (autoloads nil "korea-util" "language/korea-util.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "korea-util" "language/korea-util.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from language/korea-util.el
 
 (defvar default-korean-keyboard (purecopy (if (string-match "3" (or (getenv "HANGUL_KEYBOARD_TYPE") "")) "3" "")) "\
@@ -16643,9 +16674,10 @@ The kind of Korean keyboard for Korean input method.
 
 ;;;***
 \f
-;;;### (autoloads nil "landmark" "play/landmark.el" (21415 30982
-;;;;;;  815536 0))
+;;;### (autoloads nil "landmark" "play/landmark.el" (21419 7843 195974
+;;;;;;  0))
 ;;; Generated autoloads from play/landmark.el
+(push (purecopy '(landmark 1 0)) package--builtin-versions)
 
 (defalias 'landmark-repeat 'landmark-test-run)
 
@@ -16674,8 +16706,8 @@ Use \\[describe-mode] for more info.
 
 ;;;***
 \f
-;;;### (autoloads nil "lao-util" "language/lao-util.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "lao-util" "language/lao-util.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from language/lao-util.el
 
 (autoload 'lao-compose-string "lao-util" "\
@@ -16712,8 +16744,8 @@ Transcribe Romanized Lao string STR to Lao character string.
 
 ;;;***
 \f
-;;;### (autoloads nil "latexenc" "international/latexenc.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "latexenc" "international/latexenc.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from international/latexenc.el
 
 (defvar latex-inputenc-coding-alist (purecopy '(("ansinew" . windows-1252) ("applemac" . mac-roman) ("ascii" . us-ascii) ("cp1250" . windows-1250) ("cp1252" . windows-1252) ("cp1257" . cp1257) ("cp437de" . cp437) ("cp437" . cp437) ("cp850" . cp850) ("cp852" . cp852) ("cp858" . cp858) ("cp865" . cp865) ("latin1" . iso-8859-1) ("latin2" . iso-8859-2) ("latin3" . iso-8859-3) ("latin4" . iso-8859-4) ("latin5" . iso-8859-5) ("latin9" . iso-8859-15) ("next" . next) ("utf8" . utf-8) ("utf8x" . utf-8))) "\
@@ -16745,7 +16777,7 @@ coding system names is determined from `latex-inputenc-coding-alist'.
 ;;;***
 \f
 ;;;### (autoloads nil "latin1-disp" "international/latin1-disp.el"
-;;;;;;  (21291 53104 431149 0))
+;;;;;;  (21187 63826 213216 0))
 ;;; Generated autoloads from international/latin1-disp.el
 
 (defvar latin1-display nil "\
@@ -16786,8 +16818,8 @@ use either \\[customize] or the function `latin1-display'.")
 
 ;;;***
 \f
-;;;### (autoloads nil "ld-script" "progmodes/ld-script.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "ld-script" "progmodes/ld-script.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from progmodes/ld-script.el
 
 (autoload 'ld-script-mode "ld-script" "\
@@ -16797,7 +16829,7 @@ A major mode to edit GNU ld script files
 
 ;;;***
 \f
-;;;### (autoloads nil "life" "play/life.el" (21291 53104 431149 0))
+;;;### (autoloads nil "life" "play/life.el" (21240 46395 727291 0))
 ;;; Generated autoloads from play/life.el
 
 (autoload 'life "life" "\
@@ -16810,7 +16842,7 @@ generations (this defaults to 1).
 
 ;;;***
 \f
-;;;### (autoloads nil "linum" "linum.el" (21291 53104 431149 0))
+;;;### (autoloads nil "linum" "linum.el" (21437 5802 125919 0))
 ;;; Generated autoloads from linum.el
 (push (purecopy '(linum 0 9 24)) package--builtin-versions)
 
@@ -16847,7 +16879,7 @@ See `linum-mode' for more information on Linum mode.
 
 ;;;***
 \f
-;;;### (autoloads nil "loadhist" "loadhist.el" (21291 53104 431149
+;;;### (autoloads nil "loadhist" "loadhist.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from loadhist.el
 
@@ -16879,7 +16911,7 @@ something strange, such as redefining an Emacs function.
 
 ;;;***
 \f
-;;;### (autoloads nil "locate" "locate.el" (21291 53104 431149 0))
+;;;### (autoloads nil "locate" "locate.el" (21187 63826 213216 0))
 ;;; Generated autoloads from locate.el
 
 (defvar locate-ls-subdir-switches (purecopy "-al") "\
@@ -16931,7 +16963,7 @@ except that FILTER is not optional.
 
 ;;;***
 \f
-;;;### (autoloads nil "log-edit" "vc/log-edit.el" (21439 23977 68537
+;;;### (autoloads nil "log-edit" "vc/log-edit.el" (21442 23723 6983
 ;;;;;;  0))
 ;;; Generated autoloads from vc/log-edit.el
 
@@ -16963,7 +16995,7 @@ done.  Otherwise, it uses the current buffer.
 
 ;;;***
 \f
-;;;### (autoloads nil "log-view" "vc/log-view.el" (21291 53104 431149
+;;;### (autoloads nil "log-view" "vc/log-view.el" (21195 57908 940910
 ;;;;;;  0))
 ;;; Generated autoloads from vc/log-view.el
 
@@ -16974,7 +17006,7 @@ Major mode for browsing CVS log output.
 
 ;;;***
 \f
-;;;### (autoloads nil "lpr" "lpr.el" (21291 53104 431149 0))
+;;;### (autoloads nil "lpr" "lpr.el" (21240 46395 727291 0))
 ;;; Generated autoloads from lpr.el
 
 (defvar lpr-windows-system (memq system-type '(ms-dos windows-nt)) "\
@@ -17069,7 +17101,7 @@ for further customization of the printer command.
 
 ;;;***
 \f
-;;;### (autoloads nil "ls-lisp" "ls-lisp.el" (21291 53104 431149
+;;;### (autoloads nil "ls-lisp" "ls-lisp.el" (21546 33576 601815
 ;;;;;;  0))
 ;;; Generated autoloads from ls-lisp.el
 
@@ -17081,7 +17113,7 @@ Otherwise they are treated as Emacs regexps (for backward compatibility).")
 
 ;;;***
 \f
-;;;### (autoloads nil "lunar" "calendar/lunar.el" (21291 53104 431149
+;;;### (autoloads nil "lunar" "calendar/lunar.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from calendar/lunar.el
 
@@ -17096,8 +17128,8 @@ This function is suitable for execution in an init file.
 
 ;;;***
 \f
-;;;### (autoloads nil "m4-mode" "progmodes/m4-mode.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "m4-mode" "progmodes/m4-mode.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from progmodes/m4-mode.el
 
 (autoload 'm4-mode "m4-mode" "\
@@ -17107,7 +17139,7 @@ A major mode to edit m4 macro files.
 
 ;;;***
 \f
-;;;### (autoloads nil "macros" "macros.el" (21291 53104 431149 0))
+;;;### (autoloads nil "macros" "macros.el" (21240 46395 727291 0))
 ;;; Generated autoloads from macros.el
 
 (autoload 'name-last-kbd-macro "macros" "\
@@ -17196,8 +17228,8 @@ and then select the region of un-tablified names and use
 
 ;;;***
 \f
-;;;### (autoloads nil "mail-extr" "mail/mail-extr.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "mail-extr" "mail/mail-extr.el" (21240 46395
+;;;;;;  727291 0))
 ;;; Generated autoloads from mail/mail-extr.el
 
 (autoload 'mail-extract-address-components "mail-extr" "\
@@ -17227,8 +17259,8 @@ Convert mail domain DOMAIN to the country it corresponds to.
 
 ;;;***
 \f
-;;;### (autoloads nil "mail-hist" "mail/mail-hist.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "mail-hist" "mail/mail-hist.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from mail/mail-hist.el
 
 (autoload 'mail-hist-define-keys "mail-hist" "\
@@ -17257,8 +17289,8 @@ This function normally would be called when the message is sent.
 
 ;;;***
 \f
-;;;### (autoloads nil "mail-utils" "mail/mail-utils.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "mail-utils" "mail/mail-utils.el" (21240 46395
+;;;;;;  727291 0))
 ;;; Generated autoloads from mail/mail-utils.el
 
 (defvar mail-use-rfc822 nil "\
@@ -17332,8 +17364,8 @@ matches may be returned from the message body.
 
 ;;;***
 \f
-;;;### (autoloads nil "mailabbrev" "mail/mailabbrev.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "mailabbrev" "mail/mailabbrev.el" (21240 46395
+;;;;;;  727291 0))
 ;;; Generated autoloads from mail/mailabbrev.el
 
 (defvar mail-abbrevs-mode nil "\
@@ -17382,8 +17414,8 @@ double-quotes.
 
 ;;;***
 \f
-;;;### (autoloads nil "mailalias" "mail/mailalias.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "mailalias" "mail/mailalias.el" (21240 46395
+;;;;;;  727291 0))
 ;;; Generated autoloads from mail/mailalias.el
 
 (defvar mail-complete-style 'angles "\
@@ -17436,8 +17468,8 @@ current header, calls `mail-complete-function' and passes prefix ARG if any.
 
 ;;;***
 \f
-;;;### (autoloads nil "mailclient" "mail/mailclient.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "mailclient" "mail/mailclient.el" (21215 8898
+;;;;;;  840126 623000))
 ;;; Generated autoloads from mail/mailclient.el
 
 (autoload 'mailclient-send-it "mailclient" "\
@@ -17449,8 +17481,8 @@ The mail client is taken to be the handler of mailto URLs.
 
 ;;;***
 \f
-;;;### (autoloads nil "make-mode" "progmodes/make-mode.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "make-mode" "progmodes/make-mode.el" (21240
+;;;;;;  46395 727291 0))
 ;;; Generated autoloads from progmodes/make-mode.el
 
 (autoload 'makefile-mode "make-mode" "\
@@ -17567,7 +17599,7 @@ An adapted `makefile-mode' that knows about imake.
 
 ;;;***
 \f
-;;;### (autoloads nil "makesum" "makesum.el" (21291 53104 431149
+;;;### (autoloads nil "makesum" "makesum.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from makesum.el
 
@@ -17579,19 +17611,21 @@ Previous contents of that buffer are killed first.
 
 ;;;***
 \f
-;;;### (autoloads nil "man" "man.el" (21291 53104 431149 0))
+;;;### (autoloads nil "man" "man.el" (21427 56357 771874 0))
 ;;; Generated autoloads from man.el
 
 (defalias 'manual-entry 'man)
 
 (autoload 'man "man" "\
 Get a Un*x manual page and put it in a buffer.
-This command is the top-level command in the man package.  It
-runs a Un*x command to retrieve and clean a manpage in the
+This command is the top-level command in the man package.
+It runs a Un*x command to retrieve and clean a manpage in the
 background and places the results in a `Man-mode' browsing
-buffer.  See variable `Man-notify-method' for what happens when
-the buffer is ready.  If a buffer already exists for this man
-page, it will display immediately.
+buffer.  The variable `Man-width' defines the number of columns in
+formatted manual pages.  The buffer is displayed immediately.
+The variable `Man-notify-method' defines how the buffer is displayed.
+If a buffer already exists for this man page, it will be displayed
+without running the man command.
 
 For a manpage from a particular section, use either of the
 following.  \"cat(1)\" is how cross-references appear and is
@@ -17633,7 +17667,7 @@ Default bookmark handler for Man buffers.
 
 ;;;***
 \f
-;;;### (autoloads nil "master" "master.el" (21291 53104 431149 0))
+;;;### (autoloads nil "master" "master.el" (21187 63826 213216 0))
 ;;; Generated autoloads from master.el
 (push (purecopy '(master 1 0 2)) package--builtin-versions)
 
@@ -17656,7 +17690,7 @@ yourself the value of `master-of' by calling `master-show-slave'.
 
 ;;;***
 \f
-;;;### (autoloads nil "mb-depth" "mb-depth.el" (21291 53104 431149
+;;;### (autoloads nil "mb-depth" "mb-depth.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from mb-depth.el
 
@@ -17684,13 +17718,13 @@ recursion depth in the minibuffer prompt.  This is only useful if
 
 ;;;***
 \f
-;;;### (autoloads nil "md4" "md4.el" (21291 53104 431149 0))
+;;;### (autoloads nil "md4" "md4.el" (21187 63826 213216 0))
 ;;; Generated autoloads from md4.el
 (push (purecopy '(md4 1 0)) package--builtin-versions)
 
 ;;;***
 \f
-;;;### (autoloads nil "message" "gnus/message.el" (21291 53104 431149
+;;;### (autoloads nil "message" "gnus/message.el" (21546 33576 601815
 ;;;;;;  0))
 ;;; Generated autoloads from gnus/message.el
 
@@ -17856,8 +17890,8 @@ which specify the range to operate on.
 
 ;;;***
 \f
-;;;### (autoloads nil "meta-mode" "progmodes/meta-mode.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "meta-mode" "progmodes/meta-mode.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from progmodes/meta-mode.el
 (push (purecopy '(meta-mode 1 0)) package--builtin-versions)
 
@@ -17873,8 +17907,8 @@ Major mode for editing MetaPost sources.
 
 ;;;***
 \f
-;;;### (autoloads nil "metamail" "mail/metamail.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "metamail" "mail/metamail.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from mail/metamail.el
 
 (autoload 'metamail-interpret-header "metamail" "\
@@ -17917,7 +17951,7 @@ redisplayed as output is inserted.
 
 ;;;***
 \f
-;;;### (autoloads nil "mh-comp" "mh-e/mh-comp.el" (21546 52205 704969
+;;;### (autoloads nil "mh-comp" "mh-e/mh-comp.el" (21546 33576 601815
 ;;;;;;  0))
 ;;; Generated autoloads from mh-e/mh-comp.el
 
@@ -18008,7 +18042,7 @@ delete the draft message.
 
 ;;;***
 \f
-;;;### (autoloads nil "mh-e" "mh-e/mh-e.el" (21546 52205 704969 0))
+;;;### (autoloads nil "mh-e" "mh-e/mh-e.el" (21546 33576 601815 0))
 ;;; Generated autoloads from mh-e/mh-e.el
 (push (purecopy '(mh-e 8 6)) package--builtin-versions)
 
@@ -18025,8 +18059,8 @@ Display version information about MH-E and the MH mail handling system.
 
 ;;;***
 \f
-;;;### (autoloads nil "mh-folder" "mh-e/mh-folder.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "mh-folder" "mh-e/mh-folder.el" (21286 52150
+;;;;;;  476720 0))
 ;;; Generated autoloads from mh-e/mh-folder.el
 
 (autoload 'mh-rmail "mh-folder" "\
@@ -18107,7 +18141,7 @@ perform the operation on all messages in that region.
 
 ;;;***
 \f
-;;;### (autoloads nil "midnight" "midnight.el" (21291 53104 431149
+;;;### (autoloads nil "midnight" "midnight.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from midnight.el
 
@@ -18134,8 +18168,8 @@ to its second argument TM.
 
 ;;;***
 \f
-;;;### (autoloads nil "minibuf-eldef" "minibuf-eldef.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "minibuf-eldef" "minibuf-eldef.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from minibuf-eldef.el
 
 (defvar minibuffer-electric-default-mode nil "\
@@ -18164,7 +18198,7 @@ is modified to remove the default indication.
 
 ;;;***
 \f
-;;;### (autoloads nil "misc" "misc.el" (21291 53104 431149 0))
+;;;### (autoloads nil "misc" "misc.el" (21240 46395 727291 0))
 ;;; Generated autoloads from misc.el
 
 (autoload 'butterfly "misc" "\
@@ -18192,7 +18226,7 @@ The return value is always nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "misearch" "misearch.el" (21291 53104 431149
+;;;### (autoloads nil "misearch" "misearch.el" (21245 64312 799897
 ;;;;;;  0))
 ;;; Generated autoloads from misearch.el
  (add-hook 'isearch-mode-hook 'multi-isearch-setup)
@@ -18274,8 +18308,8 @@ whose file names match the specified wildcard.
 
 ;;;***
 \f
-;;;### (autoloads nil "mixal-mode" "progmodes/mixal-mode.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "mixal-mode" "progmodes/mixal-mode.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from progmodes/mixal-mode.el
 (push (purecopy '(mixal-mode 0 1)) package--builtin-versions)
 
@@ -18286,8 +18320,8 @@ Major mode for the mixal asm language.
 
 ;;;***
 \f
-;;;### (autoloads nil "mm-encode" "gnus/mm-encode.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "mm-encode" "gnus/mm-encode.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from gnus/mm-encode.el
 
 (autoload 'mm-default-file-encoding "mm-encode" "\
@@ -18297,8 +18331,8 @@ Return a default encoding for FILE.
 
 ;;;***
 \f
-;;;### (autoloads nil "mm-extern" "gnus/mm-extern.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "mm-extern" "gnus/mm-extern.el" (21296 1575
+;;;;;;  438327 0))
 ;;; Generated autoloads from gnus/mm-extern.el
 
 (autoload 'mm-extern-cache-contents "mm-extern" "\
@@ -18316,8 +18350,8 @@ If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing.
 
 ;;;***
 \f
-;;;### (autoloads nil "mm-partial" "gnus/mm-partial.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "mm-partial" "gnus/mm-partial.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from gnus/mm-partial.el
 
 (autoload 'mm-inline-partial "mm-partial" "\
@@ -18330,7 +18364,7 @@ If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing.
 
 ;;;***
 \f
-;;;### (autoloads nil "mm-url" "gnus/mm-url.el" (21291 53104 431149
+;;;### (autoloads nil "mm-url" "gnus/mm-url.el" (21296 1575 438327
 ;;;;;;  0))
 ;;; Generated autoloads from gnus/mm-url.el
 
@@ -18347,7 +18381,7 @@ Insert file contents of URL using `mm-url-program'.
 
 ;;;***
 \f
-;;;### (autoloads nil "mm-uu" "gnus/mm-uu.el" (21291 53104 431149
+;;;### (autoloads nil "mm-uu" "gnus/mm-uu.el" (21363 17065 850322
 ;;;;;;  0))
 ;;; Generated autoloads from gnus/mm-uu.el
 
@@ -18367,7 +18401,7 @@ Assume text has been decoded if DECODED is non-nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "mml" "gnus/mml.el" (21548 39298 812747 0))
+;;;### (autoloads nil "mml" "gnus/mml.el" (21546 33576 601815 0))
 ;;; Generated autoloads from gnus/mml.el
 
 (autoload 'mml-to-mime "mml" "\
@@ -18392,7 +18426,7 @@ body) or \"attachment\" (separate from the body).
 
 ;;;***
 \f
-;;;### (autoloads nil "mml1991" "gnus/mml1991.el" (21291 53104 431149
+;;;### (autoloads nil "mml1991" "gnus/mml1991.el" (21296 1575 438327
 ;;;;;;  0))
 ;;; Generated autoloads from gnus/mml1991.el
 
@@ -18408,7 +18442,7 @@ body) or \"attachment\" (separate from the body).
 
 ;;;***
 \f
-;;;### (autoloads nil "mml2015" "gnus/mml2015.el" (21291 53104 431149
+;;;### (autoloads nil "mml2015" "gnus/mml2015.el" (21546 33576 601815
 ;;;;;;  0))
 ;;; Generated autoloads from gnus/mml2015.el
 
@@ -18449,16 +18483,16 @@ body) or \"attachment\" (separate from the body).
 
 ;;;***
 \f
-;;;### (autoloads nil "mode-local" "cedet/mode-local.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "mode-local" "cedet/mode-local.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from cedet/mode-local.el
 
 (put 'define-overloadable-function 'doc-string-elt 3)
 
 ;;;***
 \f
-;;;### (autoloads nil "modula2" "progmodes/modula2.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "modula2" "progmodes/modula2.el" (21282 19826
+;;;;;;  403614 0))
 ;;; Generated autoloads from progmodes/modula2.el
 
 (defalias 'modula-2-mode 'm2-mode)
@@ -18491,7 +18525,7 @@ followed by the first character of the construct.
 
 ;;;***
 \f
-;;;### (autoloads nil "morse" "play/morse.el" (21291 53104 431149
+;;;### (autoloads nil "morse" "play/morse.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from play/morse.el
 
@@ -18517,7 +18551,7 @@ Convert NATO phonetic alphabet in region to ordinary ASCII text.
 
 ;;;***
 \f
-;;;### (autoloads nil "mouse-drag" "mouse-drag.el" (21291 53104 431149
+;;;### (autoloads nil "mouse-drag" "mouse-drag.el" (21202 31159 541460
 ;;;;;;  0))
 ;;; Generated autoloads from mouse-drag.el
 
@@ -18565,7 +18599,7 @@ To test this function, evaluate:
 
 ;;;***
 \f
-;;;### (autoloads nil "mpc" "mpc.el" (21346 62196 327729 0))
+;;;### (autoloads nil "mpc" "mpc.el" (21537 18599 384335 0))
 ;;; Generated autoloads from mpc.el
 
 (autoload 'mpc "mpc" "\
@@ -18575,7 +18609,7 @@ Main entry point for MPC.
 
 ;;;***
 \f
-;;;### (autoloads nil "mpuz" "play/mpuz.el" (21291 53104 431149 0))
+;;;### (autoloads nil "mpuz" "play/mpuz.el" (21187 63826 213216 0))
 ;;; Generated autoloads from play/mpuz.el
 
 (autoload 'mpuz "mpuz" "\
@@ -18585,7 +18619,7 @@ Multiplication puzzle with GNU Emacs.
 
 ;;;***
 \f
-;;;### (autoloads nil "msb" "msb.el" (21291 53104 431149 0))
+;;;### (autoloads nil "msb" "msb.el" (21528 3626 241769 0))
 ;;; Generated autoloads from msb.el
 
 (defvar msb-mode nil "\
@@ -18610,8 +18644,8 @@ different buffer menu using the function `msb'.
 
 ;;;***
 \f
-;;;### (autoloads nil "mule-diag" "international/mule-diag.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "mule-diag" "international/mule-diag.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from international/mule-diag.el
 
 (autoload 'list-character-sets "mule-diag" "\
@@ -18743,8 +18777,8 @@ The default is 20.  If LIMIT is negative, do not limit the listing.
 
 ;;;***
 \f
-;;;### (autoloads nil "mule-util" "international/mule-util.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "mule-util" "international/mule-util.el" (21412
+;;;;;;  2598 318409 0))
 ;;; Generated autoloads from international/mule-util.el
 
 (defsubst string-to-list (string) "\
@@ -18780,7 +18814,7 @@ If ELLIPSIS is non-nil, it should be a string which will replace the
 end of STR (including any padding) if it extends beyond END-COLUMN,
 unless the display width of STR is equal to or less than the display
 width of ELLIPSIS.  If it is non-nil and not a string, then ELLIPSIS
-defaults to \"...\".
+defaults to `truncate-string-ellipsis'.
 
 \(fn STR END-COLUMN &optional START-COLUMN PADDING ELLIPSIS)" nil nil)
 
@@ -18875,8 +18909,8 @@ per-character basis, this may not be accurate.
 
 ;;;***
 \f
-;;;### (autoloads nil "net-utils" "net/net-utils.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "net-utils" "net/net-utils.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from net/net-utils.el
 
 (autoload 'ifconfig "net-utils" "\
@@ -18970,7 +19004,7 @@ Open a network connection to HOST on PORT.
 
 ;;;***
 \f
-;;;### (autoloads nil "netrc" "net/netrc.el" (21291 53104 431149
+;;;### (autoloads nil "netrc" "net/netrc.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from net/netrc.el
 
@@ -18983,8 +19017,8 @@ listed in the PORTS list.
 
 ;;;***
 \f
-;;;### (autoloads nil "network-stream" "net/network-stream.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "network-stream" "net/network-stream.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from net/network-stream.el
 
 (autoload 'open-network-stream "network-stream" "\
@@ -19077,8 +19111,8 @@ a greeting from the server.
 
 ;;;***
 \f
-;;;### (autoloads nil "newst-backend" "net/newst-backend.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "newst-backend" "net/newst-backend.el" (21539
+;;;;;;  60334 648861 0))
 ;;; Generated autoloads from net/newst-backend.el
 
 (autoload 'newsticker-running-p "newst-backend" "\
@@ -19100,7 +19134,7 @@ Run `newsticker-start-hook' if newsticker was not running already.
 ;;;***
 \f
 ;;;### (autoloads nil "newst-plainview" "net/newst-plainview.el"
-;;;;;;  (21291 53104 431149 0))
+;;;;;;  (21187 63826 213216 0))
 ;;; Generated autoloads from net/newst-plainview.el
 
 (autoload 'newsticker-plainview "newst-plainview" "\
@@ -19110,8 +19144,8 @@ Start newsticker plainview.
 
 ;;;***
 \f
-;;;### (autoloads nil "newst-reader" "net/newst-reader.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "newst-reader" "net/newst-reader.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from net/newst-reader.el
 
 (autoload 'newsticker-show-news "newst-reader" "\
@@ -19121,8 +19155,8 @@ Start reading news.  You may want to bind this to a key.
 
 ;;;***
 \f
-;;;### (autoloads nil "newst-ticker" "net/newst-ticker.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "newst-ticker" "net/newst-ticker.el" (21539
+;;;;;;  60334 648861 0))
 ;;; Generated autoloads from net/newst-ticker.el
 
 (autoload 'newsticker-ticker-running-p "newst-ticker" "\
@@ -19142,8 +19176,8 @@ running already.
 
 ;;;***
 \f
-;;;### (autoloads nil "newst-treeview" "net/newst-treeview.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "newst-treeview" "net/newst-treeview.el" (21546
+;;;;;;  33576 601815 0))
 ;;; Generated autoloads from net/newst-treeview.el
 
 (autoload 'newsticker-treeview "newst-treeview" "\
@@ -19153,14 +19187,14 @@ Start newsticker treeview.
 
 ;;;***
 \f
-;;;### (autoloads nil "newsticker" "net/newsticker.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "newsticker" "net/newsticker.el" (21194 37048
+;;;;;;  599945 0))
 ;;; Generated autoloads from net/newsticker.el
 (push (purecopy '(newsticker 1 99)) package--builtin-versions)
 
 ;;;***
 \f
-;;;### (autoloads nil "nndiary" "gnus/nndiary.el" (21291 53104 431149
+;;;### (autoloads nil "nndiary" "gnus/nndiary.el" (21204 37210 187838
 ;;;;;;  0))
 ;;; Generated autoloads from gnus/nndiary.el
 
@@ -19171,7 +19205,7 @@ Generate NOV databases in all nndiary directories.
 
 ;;;***
 \f
-;;;### (autoloads nil "nndoc" "gnus/nndoc.el" (21291 53104 431149
+;;;### (autoloads nil "nndoc" "gnus/nndoc.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from gnus/nndoc.el
 
@@ -19186,8 +19220,8 @@ symbol in the alist.
 
 ;;;***
 \f
-;;;### (autoloads nil "nnfolder" "gnus/nnfolder.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "nnfolder" "gnus/nnfolder.el" (21296 1575 438327
+;;;;;;  0))
 ;;; Generated autoloads from gnus/nnfolder.el
 
 (autoload 'nnfolder-generate-active-file "nnfolder" "\
@@ -19198,7 +19232,7 @@ This command does not work if you use short group names.
 
 ;;;***
 \f
-;;;### (autoloads nil "nnml" "gnus/nnml.el" (21291 53104 431149 0))
+;;;### (autoloads nil "nnml" "gnus/nnml.el" (21187 63826 213216 0))
 ;;; Generated autoloads from gnus/nnml.el
 
 (autoload 'nnml-generate-nov-databases "nnml" "\
@@ -19208,7 +19242,7 @@ Generate NOV databases in all nnml directories.
 
 ;;;***
 \f
-;;;### (autoloads nil "novice" "novice.el" (21291 53104 431149 0))
+;;;### (autoloads nil "novice" "novice.el" (21240 46395 727291 0))
 ;;; Generated autoloads from novice.el
 
 (define-obsolete-variable-alias 'disabled-command-hook 'disabled-command-function "22.1")
@@ -19240,8 +19274,8 @@ future sessions.
 
 ;;;***
 \f
-;;;### (autoloads nil "nroff-mode" "textmodes/nroff-mode.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "nroff-mode" "textmodes/nroff-mode.el" (21240
+;;;;;;  46395 727291 0))
 ;;; Generated autoloads from textmodes/nroff-mode.el
 
 (autoload 'nroff-mode "nroff-mode" "\
@@ -19255,14 +19289,14 @@ closing requests for requests that are used in matched pairs.
 
 ;;;***
 \f
-;;;### (autoloads nil "ntlm" "net/ntlm.el" (21291 53104 431149 0))
+;;;### (autoloads nil "ntlm" "net/ntlm.el" (21187 63826 213216 0))
 ;;; Generated autoloads from net/ntlm.el
 (push (purecopy '(ntlm 1 0)) package--builtin-versions)
 
 ;;;***
 \f
-;;;### (autoloads nil "nxml-glyph" "nxml/nxml-glyph.el" (21291 57968
-;;;;;;  313602 751000))
+;;;### (autoloads nil "nxml-glyph" "nxml/nxml-glyph.el" (21293 25385
+;;;;;;  120083 0))
 ;;; Generated autoloads from nxml/nxml-glyph.el
 
 (autoload 'nxml-glyph-display-string "nxml-glyph" "\
@@ -19274,8 +19308,8 @@ Return nil if the face cannot display a glyph for N.
 
 ;;;***
 \f
-;;;### (autoloads nil "nxml-mode" "nxml/nxml-mode.el" (21373 39620
-;;;;;;  652244 0))
+;;;### (autoloads nil "nxml-mode" "nxml/nxml-mode.el" (21383 2343
+;;;;;;  498187 0))
 ;;; Generated autoloads from nxml/nxml-mode.el
 
 (autoload 'nxml-mode "nxml-mode" "\
@@ -19335,8 +19369,8 @@ Many aspects this mode can be customized using
 
 ;;;***
 \f
-;;;### (autoloads nil "nxml-uchnm" "nxml/nxml-uchnm.el" (21291 57968
-;;;;;;  313602 751000))
+;;;### (autoloads nil "nxml-uchnm" "nxml/nxml-uchnm.el" (21293 25385
+;;;;;;  120083 0))
 ;;; Generated autoloads from nxml/nxml-uchnm.el
 
 (autoload 'nxml-enable-unicode-char-name-sets "nxml-uchnm" "\
@@ -19348,8 +19382,8 @@ the variable `nxml-enabled-unicode-blocks'.
 
 ;;;***
 \f
-;;;### (autoloads nil "octave" "progmodes/octave.el" (21430 7105
-;;;;;;  839163 0))
+;;;### (autoloads nil "octave" "progmodes/octave.el" (21437 5802
+;;;;;;  125919 0))
 ;;; Generated autoloads from progmodes/octave.el
 
 (autoload 'octave-mode "octave" "\
@@ -19386,8 +19420,8 @@ startup file, `~/.emacs-octave'.
 
 ;;;***
 \f
-;;;### (autoloads nil "opascal" "progmodes/opascal.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "opascal" "progmodes/opascal.el" (21282 19826
+;;;;;;  403614 0))
 ;;; Generated autoloads from progmodes/opascal.el
 
 (define-obsolete-function-alias 'delphi-mode 'opascal-mode "24.4")
@@ -19422,7 +19456,7 @@ Coloring:
 
 ;;;***
 \f
-;;;### (autoloads nil "org" "org/org.el" (21341 23900 988149 0))
+;;;### (autoloads nil "org" "org/org.el" (21383 2343 498187 0))
 ;;; Generated autoloads from org/org.el
 
 (autoload 'org-babel-do-load-languages "org" "\
@@ -19643,8 +19677,8 @@ Call the customize function with org as argument.
 
 ;;;***
 \f
-;;;### (autoloads nil "org-agenda" "org/org-agenda.el" (21341 23900
-;;;;;;  988149 0))
+;;;### (autoloads nil "org-agenda" "org/org-agenda.el" (21335 37672
+;;;;;;  97862 0))
 ;;; Generated autoloads from org/org-agenda.el
 
 (autoload 'org-toggle-sticky-agenda "org-agenda" "\
@@ -19917,8 +19951,8 @@ to override `appt-message-warning-time'.
 
 ;;;***
 \f
-;;;### (autoloads nil "org-capture" "org/org-capture.el" (21341 23900
-;;;;;;  988149 0))
+;;;### (autoloads nil "org-capture" "org/org-capture.el" (21335 37672
+;;;;;;  97862 0))
 ;;; Generated autoloads from org/org-capture.el
 
 (autoload 'org-capture-string "org-capture" "\
@@ -19960,8 +19994,8 @@ Set `org-capture-templates' to be similar to `org-remember-templates'.
 
 ;;;***
 \f
-;;;### (autoloads nil "org-colview" "org/org-colview.el" (21341 23900
-;;;;;;  988149 0))
+;;;### (autoloads nil "org-colview" "org/org-colview.el" (21335 37672
+;;;;;;  97862 0))
 ;;; Generated autoloads from org/org-colview.el
 
 (autoload 'org-columns-remove-overlays "org-colview" "\
@@ -20024,8 +20058,8 @@ Turn on or update column view in the agenda.
 
 ;;;***
 \f
-;;;### (autoloads nil "org-compat" "org/org-compat.el" (21341 23900
-;;;;;;  988149 0))
+;;;### (autoloads nil "org-compat" "org/org-compat.el" (21417 20521
+;;;;;;  870414 0))
 ;;; Generated autoloads from org/org-compat.el
 
 (autoload 'org-check-version "org-compat" "\
@@ -20035,7 +20069,7 @@ Try very hard to provide sensible version strings.
 
 ;;;***
 \f
-;;;### (autoloads nil "org-macs" "org/org-macs.el" (21291 53104 431149
+;;;### (autoloads nil "org-macs" "org/org-macs.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from org/org-macs.el
 
@@ -20046,8 +20080,8 @@ Load FILE with optional arguments NOERROR and MUSTSUFFIX.  Drop the MUSTSUFFIX a
 
 ;;;***
 \f
-;;;### (autoloads nil "org-version" "org/org-version.el" (21341 23900
-;;;;;;  988149 0))
+;;;### (autoloads nil "org-version" "org/org-version.el" (21335 37672
+;;;;;;  97862 0))
 ;;; Generated autoloads from org/org-version.el
 
 (autoload 'org-release "org-version" "\
@@ -20064,7 +20098,7 @@ The Git version of org-mode.
 
 ;;;***
 \f
-;;;### (autoloads nil "outline" "outline.el" (21291 53104 431149
+;;;### (autoloads nil "outline" "outline.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from outline.el
 (put 'outline-regexp 'safe-local-variable 'stringp)
@@ -20126,8 +20160,8 @@ See the command `outline-mode' for more information on this mode.
 
 ;;;***
 \f
-;;;### (autoloads nil "package" "emacs-lisp/package.el" (21548 39298
-;;;;;;  812747 0))
+;;;### (autoloads nil "package" "emacs-lisp/package.el" (21547 54441
+;;;;;;  168831 0))
 ;;; Generated autoloads from emacs-lisp/package.el
 (push (purecopy '(package 1 0 1)) package--builtin-versions)
 
@@ -20199,7 +20233,7 @@ The list is displayed in a buffer named `*Packages*'.
 
 ;;;***
 \f
-;;;### (autoloads nil "paren" "paren.el" (21291 53104 431149 0))
+;;;### (autoloads nil "paren" "paren.el" (21240 46395 727291 0))
 ;;; Generated autoloads from paren.el
 
 (defvar show-paren-mode nil "\
@@ -20225,8 +20259,8 @@ matching parenthesis is highlighted in `show-paren-style' after
 
 ;;;***
 \f
-;;;### (autoloads nil "parse-time" "calendar/parse-time.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "parse-time" "calendar/parse-time.el" (21541
+;;;;;;  15655 55679 0))
 ;;; Generated autoloads from calendar/parse-time.el
 (put 'parse-time-rules 'risky-local-variable t)
 
@@ -20239,8 +20273,8 @@ unknown are returned as nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "pascal" "progmodes/pascal.el" (21423 29528
-;;;;;;  125035 469000))
+;;;### (autoloads nil "pascal" "progmodes/pascal.el" (21429 11690
+;;;;;;  49391 0))
 ;;; Generated autoloads from progmodes/pascal.el
 
 (autoload 'pascal-mode "pascal" "\
@@ -20289,8 +20323,8 @@ See also the user variables `pascal-type-keywords', `pascal-start-keywords' and
 
 ;;;***
 \f
-;;;### (autoloads nil "password-cache" "password-cache.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "password-cache" "password-cache.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from password-cache.el
 
 (defvar password-cache t "\
@@ -20311,8 +20345,8 @@ Check if KEY is in the cache.
 
 ;;;***
 \f
-;;;### (autoloads nil "pcase" "emacs-lisp/pcase.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "pcase" "emacs-lisp/pcase.el" (21542 36519
+;;;;;;  256429 0))
 ;;; Generated autoloads from emacs-lisp/pcase.el
 
 (autoload 'pcase "pcase" "\
@@ -20325,33 +20359,45 @@ UPatterns can take the following forms:
   SYMBOL       matches anything and binds it to SYMBOL.
   (or UPAT...) matches if any of the patterns matches.
   (and UPAT...)        matches if all the patterns match.
+  'VAL         matches if the object is `equal' to VAL
   `QPAT                matches if the QPattern QPAT matches.
-  (pred PRED)  matches if PRED applied to the object returns non-nil.
+  (pred FUN)   matches if FUN applied to the object returns non-nil.
   (guard BOOLEXP)      matches if BOOLEXP evaluates to non-nil.
   (let UPAT EXP)       matches if EXP matches UPAT.
+  (app FUN UPAT)       matches if FUN applied to the object matches UPAT.
 If a SYMBOL is used twice in the same pattern (i.e. the pattern is
 \"non-linear\"), then the second occurrence is turned into an `eq'uality test.
 
 QPatterns can take the following forms:
-  (QPAT1 . QPAT2)      matches if QPAT1 matches the car and QPAT2 the cdr.
-  ,UPAT                        matches if the UPattern UPAT matches.
-  STRING               matches if the object is `equal' to STRING.
-  ATOM                 matches if the object is `eq' to ATOM.
-QPatterns for vectors are not implemented yet.
-
-PRED can take the form
-  FUNCTION          in which case it gets called with one argument.
-  (FUN ARG1 .. ARGN) in which case it gets called with an N+1'th argument
+  (QPAT1 . QPAT2)       matches if QPAT1 matches the car and QPAT2 the cdr.
+  [QPAT1 QPAT2..QPATn]  matches a vector of length n and QPAT1..QPATn match
+                           its 0..(n-1)th elements, respectively.
+  ,UPAT                 matches if the UPattern UPAT matches.
+  STRING                matches if the object is `equal' to STRING.
+  ATOM                  matches if the object is `eq' to ATOM.
+
+FUN can take the form
+  SYMBOL or (lambda ARGS BODY)  in which case it's called with one argument.
+  (F ARG1 .. ARGn) in which case F gets called with an n+1'th argument
                         which is the value being matched.
-A PRED of the form FUNCTION is equivalent to one of the form (FUNCTION).
-PRED patterns can refer to variables bound earlier in the pattern.
+So a FUN of the form SYMBOL is equivalent to one of the form (FUN).
+FUN can refer to variables bound earlier in the pattern.
+FUN is assumed to be pure, i.e. it can be dropped if its result is not used,
+and two identical calls can be merged into one.
 E.g. you can match pairs where the cdr is larger than the car with a pattern
 like `(,a . ,(pred (< a))) or, with more checks:
 `(,(and a (pred numberp)) . ,(and (pred numberp) (pred (< a))))
 
 \(fn EXP &rest CASES)" nil t)
 
-(put 'pcase 'lisp-indent-function '1)
+(function-put 'pcase 'lisp-indent-function '1)
+
+(autoload 'pcase-exhaustive "pcase" "\
+The exhaustive version of `pcase' (which see).
+
+\(fn EXP &rest CASES)" nil t)
+
+(function-put 'pcase-exhaustive 'lisp-indent-function '1)
 
 (autoload 'pcase-let* "pcase" "\
 Like `let*' but where you can use `pcase' patterns for bindings.
@@ -20360,7 +20406,7 @@ of the form (UPAT EXP).
 
 \(fn BINDINGS &rest BODY)" nil t)
 
-(put 'pcase-let* 'lisp-indent-function '1)
+(function-put 'pcase-let* 'lisp-indent-function '1)
 
 (autoload 'pcase-let "pcase" "\
 Like `let' but where you can use `pcase' patterns for bindings.
@@ -20369,11 +20415,20 @@ of the form (UPAT EXP).
 
 \(fn BINDINGS &rest BODY)" nil t)
 
-(put 'pcase-let 'lisp-indent-function '1)
+(function-put 'pcase-let 'lisp-indent-function '1)
+
+(autoload 'pcase-defmacro "pcase" "\
+Define a pcase UPattern macro.
+
+\(fn NAME ARGS &rest BODY)" nil t)
+
+(function-put 'pcase-defmacro 'lisp-indent-function '2)
+
+(function-put 'pcase-defmacro 'doc-string-elt '3)
 
 ;;;***
 \f
-;;;### (autoloads nil "pcmpl-cvs" "pcmpl-cvs.el" (21291 53104 431149
+;;;### (autoloads nil "pcmpl-cvs" "pcmpl-cvs.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from pcmpl-cvs.el
 
@@ -20384,7 +20439,7 @@ Completion rules for the `cvs' command.
 
 ;;;***
 \f
-;;;### (autoloads nil "pcmpl-gnu" "pcmpl-gnu.el" (21291 53104 431149
+;;;### (autoloads nil "pcmpl-gnu" "pcmpl-gnu.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from pcmpl-gnu.el
 
@@ -20412,8 +20467,8 @@ Completion for the GNU tar utility.
 
 ;;;***
 \f
-;;;### (autoloads nil "pcmpl-linux" "pcmpl-linux.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "pcmpl-linux" "pcmpl-linux.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from pcmpl-linux.el
 
 (autoload 'pcomplete/kill "pcmpl-linux" "\
@@ -20433,7 +20488,7 @@ Completion for GNU/Linux `mount'.
 
 ;;;***
 \f
-;;;### (autoloads nil "pcmpl-rpm" "pcmpl-rpm.el" (21291 53104 431149
+;;;### (autoloads nil "pcmpl-rpm" "pcmpl-rpm.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from pcmpl-rpm.el
 
@@ -20444,7 +20499,7 @@ Completion for the `rpm' command.
 
 ;;;***
 \f
-;;;### (autoloads nil "pcmpl-unix" "pcmpl-unix.el" (21291 53104 431149
+;;;### (autoloads nil "pcmpl-unix" "pcmpl-unix.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from pcmpl-unix.el
 
@@ -20500,7 +20555,7 @@ Includes files as well as host names followed by a colon.
 
 ;;;***
 \f
-;;;### (autoloads nil "pcmpl-x" "pcmpl-x.el" (21291 53104 431149
+;;;### (autoloads nil "pcmpl-x" "pcmpl-x.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from pcmpl-x.el
 
@@ -20525,7 +20580,7 @@ Completion for the `ag' command.
 
 ;;;***
 \f
-;;;### (autoloads nil "pcomplete" "pcomplete.el" (21291 53104 431149
+;;;### (autoloads nil "pcomplete" "pcomplete.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from pcomplete.el
 
@@ -20583,7 +20638,7 @@ Setup `shell-mode' to use pcomplete.
 
 ;;;***
 \f
-;;;### (autoloads nil "pcvs" "vc/pcvs.el" (21291 53104 431149 0))
+;;;### (autoloads nil "pcvs" "vc/pcvs.el" (21280 13349 392544 0))
 ;;; Generated autoloads from vc/pcvs.el
 
 (autoload 'cvs-checkout "pcvs" "\
@@ -20658,8 +20713,8 @@ The exact behavior is determined also by `cvs-dired-use-hook'." (when (stringp d
 
 ;;;***
 \f
-;;;### (autoloads nil "pcvs-defs" "vc/pcvs-defs.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "pcvs-defs" "vc/pcvs-defs.el" (21280 13349
+;;;;;;  392544 0))
 ;;; Generated autoloads from vc/pcvs-defs.el
 
 (defvar cvs-global-menu (let ((m (make-sparse-keymap "PCL-CVS"))) (define-key m [status] `(menu-item ,(purecopy "Directory Status") cvs-status :help ,(purecopy "A more verbose status of a workarea"))) (define-key m [checkout] `(menu-item ,(purecopy "Checkout Module") cvs-checkout :help ,(purecopy "Check out a module from the repository"))) (define-key m [update] `(menu-item ,(purecopy "Update Directory") cvs-update :help ,(purecopy "Fetch updates from the repository"))) (define-key m [examine] `(menu-item ,(purecopy "Examine Directory") cvs-examine :help ,(purecopy "Examine the current state of a workarea"))) (fset 'cvs-global-menu m)) "\
@@ -20667,8 +20722,8 @@ Global menu used by PCL-CVS.")
 
 ;;;***
 \f
-;;;### (autoloads nil "perl-mode" "progmodes/perl-mode.el" (21341
-;;;;;;  23900 988149 0))
+;;;### (autoloads nil "perl-mode" "progmodes/perl-mode.el" (21535
+;;;;;;  63274 647253 0))
 ;;; Generated autoloads from progmodes/perl-mode.el
 (put 'perl-indent-level 'safe-local-variable 'integerp)
 (put 'perl-continued-statement-offset 'safe-local-variable 'integerp)
@@ -20729,8 +20784,8 @@ Turning on Perl mode runs the normal hook `perl-mode-hook'.
 
 ;;;***
 \f
-;;;### (autoloads nil "picture" "textmodes/picture.el" (21419 46255
-;;;;;;  468379 0))
+;;;### (autoloads nil "picture" "textmodes/picture.el" (21419 62246
+;;;;;;  751914 0))
 ;;; Generated autoloads from textmodes/picture.el
 
 (autoload 'picture-mode "picture" "\
@@ -20810,7 +20865,7 @@ they are not by default assigned to keys.
 
 ;;;***
 \f
-;;;### (autoloads nil "plstore" "gnus/plstore.el" (21291 53104 431149
+;;;### (autoloads nil "plstore" "gnus/plstore.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from gnus/plstore.el
 
@@ -20826,7 +20881,7 @@ Major mode for editing PLSTORE files.
 
 ;;;***
 \f
-;;;### (autoloads nil "po" "textmodes/po.el" (21291 53104 431149
+;;;### (autoloads nil "po" "textmodes/po.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from textmodes/po.el
 
@@ -20838,7 +20893,7 @@ Called through `file-coding-system-alist', before the file is visited for real.
 
 ;;;***
 \f
-;;;### (autoloads nil "pong" "play/pong.el" (21291 53104 431149 0))
+;;;### (autoloads nil "pong" "play/pong.el" (21187 63826 213216 0))
 ;;; Generated autoloads from play/pong.el
 
 (autoload 'pong "pong" "\
@@ -20854,7 +20909,7 @@ pong-mode keybindings:\\<pong-mode-map>
 
 ;;;***
 \f
-;;;### (autoloads nil "pop3" "gnus/pop3.el" (21291 53104 431149 0))
+;;;### (autoloads nil "pop3" "gnus/pop3.el" (21240 46395 727291 0))
 ;;; Generated autoloads from gnus/pop3.el
 
 (autoload 'pop3-movemail "pop3" "\
@@ -20865,7 +20920,7 @@ Use streaming commands.
 
 ;;;***
 \f
-;;;### (autoloads nil "pp" "emacs-lisp/pp.el" (21428 61556 603934
+;;;### (autoloads nil "pp" "emacs-lisp/pp.el" (21429 11690 49391
 ;;;;;;  0))
 ;;; Generated autoloads from emacs-lisp/pp.el
 
@@ -20916,8 +20971,8 @@ Ignores leading comment characters.
 
 ;;;***
 \f
-;;;### (autoloads nil "printing" "printing.el" (21358 40001 706245
-;;;;;;  561000))
+;;;### (autoloads nil "printing" "printing.el" (21546 33576 601815
+;;;;;;  0))
 ;;; Generated autoloads from printing.el
 (push (purecopy '(printing 6 9 3)) package--builtin-versions)
 
@@ -21505,7 +21560,7 @@ are both set to t.
 
 ;;;***
 \f
-;;;### (autoloads nil "proced" "proced.el" (21291 53104 431149 0))
+;;;### (autoloads nil "proced" "proced.el" (21187 63826 213216 0))
 ;;; Generated autoloads from proced.el
 
 (autoload 'proced "proced" "\
@@ -21523,7 +21578,7 @@ Proced buffers.
 
 ;;;***
 \f
-;;;### (autoloads nil "profiler" "profiler.el" (21291 53104 431149
+;;;### (autoloads nil "profiler" "profiler.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from profiler.el
 
@@ -21552,8 +21607,8 @@ Open profile FILENAME.
 
 ;;;***
 \f
-;;;### (autoloads nil "prolog" "progmodes/prolog.el" (21458 5037
-;;;;;;  542417 679000))
+;;;### (autoloads nil "prolog" "progmodes/prolog.el" (21462 9001
+;;;;;;  456449 0))
 ;;; Generated autoloads from progmodes/prolog.el
 
 (autoload 'prolog-mode "prolog" "\
@@ -21586,7 +21641,7 @@ With prefix argument ARG, restart the Prolog process if running before.
 
 ;;;***
 \f
-;;;### (autoloads nil "ps-bdf" "ps-bdf.el" (21291 53104 431149 0))
+;;;### (autoloads nil "ps-bdf" "ps-bdf.el" (21187 63826 213216 0))
 ;;; Generated autoloads from ps-bdf.el
 
 (defvar bdf-directory-list (if (memq system-type '(ms-dos windows-nt)) (list (expand-file-name "fonts/bdf" installation-directory)) '("/usr/local/share/emacs/fonts/bdf")) "\
@@ -21597,8 +21652,8 @@ The default value is '(\"/usr/local/share/emacs/fonts/bdf\").")
 
 ;;;***
 \f
-;;;### (autoloads nil "ps-mode" "progmodes/ps-mode.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "ps-mode" "progmodes/ps-mode.el" (21342 10917
+;;;;;;  902592 0))
 ;;; Generated autoloads from progmodes/ps-mode.el
 (push (purecopy '(ps-mode 1 1 9)) package--builtin-versions)
 
@@ -21610,7 +21665,6 @@ Entry to this mode calls `ps-mode-hook'.
 The following variables hold user options, and can
 be set through the `customize' command:
 
-  `ps-mode-auto-indent'
   `ps-mode-tab'
   `ps-mode-paper-size'
   `ps-mode-print-function'
@@ -21645,8 +21699,8 @@ Typing \\<ps-run-mode-map>\\[ps-run-goto-error] when the cursor is at the number
 
 ;;;***
 \f
-;;;### (autoloads nil "ps-print" "ps-print.el" (21358 40055 584873
-;;;;;;  719000))
+;;;### (autoloads nil "ps-print" "ps-print.el" (21360 40869 887231
+;;;;;;  0))
 ;;; Generated autoloads from ps-print.el
 (push (purecopy '(ps-print 7 3 5)) package--builtin-versions)
 
@@ -21843,15 +21897,15 @@ If EXTENSION is any other symbol, it is ignored.
 
 ;;;***
 \f
-;;;### (autoloads nil "pulse" "cedet/pulse.el" (21291 53104 431149
+;;;### (autoloads nil "pulse" "cedet/pulse.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from cedet/pulse.el
 (push (purecopy '(pulse 1 0)) package--builtin-versions)
 
 ;;;***
 \f
-;;;### (autoloads nil "python" "progmodes/python.el" (21548 39298
-;;;;;;  812747 0))
+;;;### (autoloads nil "python" "progmodes/python.el" (21547 54441
+;;;;;;  168831 0))
 ;;; Generated autoloads from progmodes/python.el
 (push (purecopy '(python 0 24 4)) package--builtin-versions)
 
@@ -21885,7 +21939,7 @@ Major mode for editing Python files.
 
 ;;;***
 \f
-;;;### (autoloads nil "qp" "gnus/qp.el" (21291 53104 431149 0))
+;;;### (autoloads nil "qp" "gnus/qp.el" (21187 63826 213216 0))
 ;;; Generated autoloads from gnus/qp.el
 
 (autoload 'quoted-printable-decode-region "qp" "\
@@ -21904,8 +21958,8 @@ them into characters should be done separately.
 
 ;;;***
 \f
-;;;### (autoloads nil "quail" "international/quail.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "quail" "international/quail.el" (21215 43189
+;;;;;;  822371 0))
 ;;; Generated autoloads from international/quail.el
 
 (autoload 'quail-title "quail" "\
@@ -22135,8 +22189,8 @@ of each directory.
 
 ;;;***
 \f
-;;;### (autoloads nil "quail/hangul" "leim/quail/hangul.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "quail/hangul" "leim/quail/hangul.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from leim/quail/hangul.el
 
 (autoload 'hangul-input-method-activate "quail/hangul" "\
@@ -22149,7 +22203,7 @@ HELP-TEXT is a text set in `hangul-input-method-help-text'.
 ;;;***
 \f
 ;;;### (autoloads nil "quail/uni-input" "leim/quail/uni-input.el"
-;;;;;;  (21291 53104 431149 0))
+;;;;;;  (21187 63826 213216 0))
 ;;; Generated autoloads from leim/quail/uni-input.el
 
 (autoload 'ucs-input-activate "quail/uni-input" "\
@@ -22163,7 +22217,7 @@ While this input method is active, the variable
 
 ;;;***
 \f
-;;;### (autoloads nil "quickurl" "net/quickurl.el" (21291 53104 431149
+;;;### (autoloads nil "quickurl" "net/quickurl.el" (21222 16439 978802
 ;;;;;;  0))
 ;;; Generated autoloads from net/quickurl.el
 
@@ -22235,7 +22289,7 @@ Display `quickurl-list' as a formatted list using `quickurl-list-mode'.
 
 ;;;***
 \f
-;;;### (autoloads nil "rcirc" "net/rcirc.el" (21291 53104 431149
+;;;### (autoloads nil "rcirc" "net/rcirc.el" (21546 33576 601815
 ;;;;;;  0))
 ;;; Generated autoloads from net/rcirc.el
 
@@ -22274,8 +22328,8 @@ if ARG is omitted or nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "re-builder" "emacs-lisp/re-builder.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "re-builder" "emacs-lisp/re-builder.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from emacs-lisp/re-builder.el
 
 (defalias 'regexp-builder 're-builder)
@@ -22293,7 +22347,7 @@ matching parts of the target buffer will be highlighted.
 
 ;;;***
 \f
-;;;### (autoloads nil "recentf" "recentf.el" (21291 53104 431149
+;;;### (autoloads nil "recentf" "recentf.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from recentf.el
 
@@ -22320,7 +22374,7 @@ were operated on recently.
 
 ;;;***
 \f
-;;;### (autoloads nil "rect" "rect.el" (21291 53104 431149 0))
+;;;### (autoloads nil "rect" "rect.el" (21546 33576 601815 0))
 ;;; Generated autoloads from rect.el
 
 (autoload 'delete-rectangle "rect" "\
@@ -22460,8 +22514,8 @@ Activates the region if needed.  Only lasts until the region is deactivated.
 
 ;;;***
 \f
-;;;### (autoloads nil "refill" "textmodes/refill.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "refill" "textmodes/refill.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from textmodes/refill.el
 
 (autoload 'refill-mode "refill" "\
@@ -22481,9 +22535,13 @@ For true \"word wrap\" behavior, use `visual-line-mode' instead.
 
 ;;;***
 \f
-;;;### (autoloads nil "reftex" "textmodes/reftex.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "reftex" "textmodes/reftex.el" (21534 42729
+;;;;;;  1557 881000))
 ;;; Generated autoloads from textmodes/reftex.el
+(autoload 'reftex-citation "reftex-cite" nil t)
+(autoload 'reftex-all-document-files "reftex-parse")
+(autoload 'reftex-isearch-minor-mode "reftex-global" nil t)
+(autoload 'reftex-index-phrases-mode "reftex-index" nil t)
 
 (autoload 'turn-on-reftex "reftex" "\
 Turn on RefTeX mode.
@@ -22531,101 +22589,8 @@ This enforces rescanning the buffer on next use.
 
 ;;;***
 \f
-;;;### (autoloads nil "reftex-cite" "textmodes/reftex-cite.el" (21291
-;;;;;;  53104 431149 0))
-;;; Generated autoloads from textmodes/reftex-cite.el
-
-(autoload 'reftex-citation "reftex-cite" "\
-Make a citation using BibTeX database files.
-After prompting for a regular expression, scans the buffers with
-bibtex entries (taken from the \\bibliography command) and offers the
-matching entries for selection.  The selected entry is formatted according
-to `reftex-cite-format' and inserted into the buffer.
-
-If NO-INSERT is non-nil, nothing is inserted, only the selected key returned.
-
-FORMAT-KEY can be used to pre-select a citation format.
-
-When called with a `C-u' prefix, prompt for optional arguments in
-cite macros.  When called with a numeric prefix, make that many
-citations.  When called with point inside the braces of a `\\cite'
-command, it will add another key, ignoring the value of
-`reftex-cite-format'.
-
-The regular expression uses an expanded syntax: && is interpreted as `and'.
-Thus, `aaaa&&bbb' matches entries which contain both `aaaa' and `bbb'.
-While entering the regexp, completion on knows citation keys is possible.
-`=' is a good regular expression to match all entries in all files.
-
-\(fn &optional NO-INSERT FORMAT-KEY)" t nil)
-
-;;;***
-\f
-;;;### (autoloads nil "reftex-global" "textmodes/reftex-global.el"
-;;;;;;  (21291 53104 431149 0))
-;;; Generated autoloads from textmodes/reftex-global.el
-
-(autoload 'reftex-isearch-minor-mode "reftex-global" "\
-When on, isearch searches the whole document, not only the current file.
-This minor mode allows isearch to search through all the files of
-the current TeX document.
-
-With no argument, this command toggles
-`reftex-isearch-minor-mode'.  With a prefix argument ARG, turn
-`reftex-isearch-minor-mode' on if ARG is positive, otherwise turn it off.
-
-\(fn &optional ARG)" t nil)
-
-;;;***
-\f
-;;;### (autoloads nil "reftex-index" "textmodes/reftex-index.el"
-;;;;;;  (21291 53104 431149 0))
-;;; Generated autoloads from textmodes/reftex-index.el
-
-(autoload 'reftex-index-phrases-mode "reftex-index" "\
-Major mode for managing the Index phrases of a LaTeX document.
-This buffer was created with RefTeX.
-
-To insert new phrases, use
- - `C-c \\' in the LaTeX document to copy selection or word
- - `\\[reftex-index-new-phrase]' in the phrases buffer.
-
-To index phrases use one of:
-
-\\[reftex-index-this-phrase]     index current phrase
-\\[reftex-index-next-phrase]     index next phrase (or N with prefix arg)
-\\[reftex-index-all-phrases]     index all phrases
-\\[reftex-index-remaining-phrases]     index current and following phrases
-\\[reftex-index-region-phrases]     index the phrases in the region
-
-You can sort the phrases in this buffer with \\[reftex-index-sort-phrases].
-To display information about the phrase at point, use \\[reftex-index-phrases-info].
-
-For more information see the RefTeX User Manual.
-
-Here are all local bindings.
-
-\\{reftex-index-phrases-mode-map}
-
-\(fn)" t nil)
-
-;;;***
-\f
-;;;### (autoloads nil "reftex-parse" "textmodes/reftex-parse.el"
-;;;;;;  (21346 62196 327729 0))
-;;; Generated autoloads from textmodes/reftex-parse.el
-
-(autoload 'reftex-all-document-files "reftex-parse" "\
-Return a list of all files belonging to the current document.
-When RELATIVE is non-nil, give file names relative to directory
-of master file.
-
-\(fn &optional RELATIVE)" nil nil)
-
-;;;***
-\f
-;;;### (autoloads nil "reftex-vars" "textmodes/reftex-vars.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "reftex-vars" "textmodes/reftex-vars.el" (21194
+;;;;;;  37048 599945 0))
 ;;; Generated autoloads from textmodes/reftex-vars.el
 (put 'reftex-vref-is-default 'safe-local-variable (lambda (x) (or (stringp x) (symbolp x))))
 (put 'reftex-fref-is-default 'safe-local-variable (lambda (x) (or (stringp x) (symbolp x))))
@@ -22634,8 +22599,8 @@ of master file.
 
 ;;;***
 \f
-;;;### (autoloads nil "regexp-opt" "emacs-lisp/regexp-opt.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "regexp-opt" "emacs-lisp/regexp-opt.el" (21376
+;;;;;;  29092 815151 0))
 ;;; Generated autoloads from emacs-lisp/regexp-opt.el
 
 (autoload 'regexp-opt "regexp-opt" "\
@@ -22664,15 +22629,15 @@ This means the number of non-shy regexp grouping constructs
 
 ;;;***
 \f
-;;;### (autoloads nil "regi" "emacs-lisp/regi.el" (21291 53104 431149
+;;;### (autoloads nil "regi" "emacs-lisp/regi.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from emacs-lisp/regi.el
 (push (purecopy '(regi 1 8)) package--builtin-versions)
 
 ;;;***
 \f
-;;;### (autoloads nil "remember" "textmodes/remember.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "remember" "textmodes/remember.el" (21252 37559
+;;;;;;  125878 0))
 ;;; Generated autoloads from textmodes/remember.el
 (push (purecopy '(remember 2 0)) package--builtin-versions)
 
@@ -22726,7 +22691,7 @@ to turn the *scratch* buffer into your notes buffer.
 
 ;;;***
 \f
-;;;### (autoloads nil "repeat" "repeat.el" (21291 53104 431149 0))
+;;;### (autoloads nil "repeat" "repeat.el" (21239 25528 651427 0))
 ;;; Generated autoloads from repeat.el
 (push (purecopy '(repeat 0 51)) package--builtin-versions)
 
@@ -22749,8 +22714,8 @@ recently executed command not bound to an input event\".
 
 ;;;***
 \f
-;;;### (autoloads nil "reporter" "mail/reporter.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "reporter" "mail/reporter.el" (21240 46395
+;;;;;;  727291 0))
 ;;; Generated autoloads from mail/reporter.el
 
 (autoload 'reporter-submit-bug-report "reporter" "\
@@ -22781,7 +22746,7 @@ mail-sending package is used for editing and sending the message.
 
 ;;;***
 \f
-;;;### (autoloads nil "reposition" "reposition.el" (21291 53104 431149
+;;;### (autoloads nil "reposition" "reposition.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from reposition.el
 
@@ -22808,7 +22773,7 @@ first comment line visible (if point is in a comment).
 
 ;;;***
 \f
-;;;### (autoloads nil "reveal" "reveal.el" (21291 53104 431149 0))
+;;;### (autoloads nil "reveal" "reveal.el" (21359 20005 772941 0))
 ;;; Generated autoloads from reveal.el
 
 (autoload 'reveal-mode "reveal" "\
@@ -22843,7 +22808,7 @@ the mode if ARG is omitted or nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "ring" "emacs-lisp/ring.el" (21291 53104 431149
+;;;### (autoloads nil "ring" "emacs-lisp/ring.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from emacs-lisp/ring.el
 
@@ -22859,7 +22824,7 @@ Make a ring that can contain SIZE elements.
 
 ;;;***
 \f
-;;;### (autoloads nil "rlogin" "net/rlogin.el" (21291 53104 431149
+;;;### (autoloads nil "rlogin" "net/rlogin.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from net/rlogin.el
 
@@ -22904,206 +22869,8 @@ variable.
 
 ;;;***
 \f
-;;;### (autoloads nil "rmail" "mail/rmail.el" (21349 10841 977368
-;;;;;;  0))
-;;; Generated autoloads from mail/rmail.el
-
-(defvar rmail-file-name (purecopy "~/RMAIL") "\
-Name of user's primary mail file.")
-
-(custom-autoload 'rmail-file-name "rmail" t)
-
-(put 'rmail-spool-directory 'standard-value '((cond ((file-exists-p "/var/mail") "/var/mail/") ((file-exists-p "/var/spool/mail") "/var/spool/mail/") ((memq system-type '(hpux usg-unix-v irix)) "/usr/mail/") (t "/usr/spool/mail/"))))
-
-(defvar rmail-spool-directory (purecopy (cond ((file-exists-p "/var/mail") "/var/mail/") ((file-exists-p "/var/spool/mail") "/var/spool/mail/") ((memq system-type '(hpux usg-unix-v irix)) "/usr/mail/") (t "/usr/spool/mail/"))) "\
-Name of directory used by system mailer for delivering new mail.
-Its name should end with a slash.")
-
-(custom-autoload 'rmail-spool-directory "rmail" t)
-(custom-initialize-delay 'rmail-spool-directory nil)
-
-(autoload 'rmail-movemail-variant-p "rmail" "\
-Return t if the current movemail variant is any of VARIANTS.
-Currently known variants are 'emacs and 'mailutils.
-
-\(fn &rest VARIANTS)" nil nil)
-
-(defvar rmail-user-mail-address-regexp nil "\
-Regexp matching user mail addresses.
-If non-nil, this variable is used to identify the correspondent
-when receiving new mail.  If it matches the address of the sender,
-the recipient is taken as correspondent of a mail.
-If nil (default value), your `user-login-name' and `user-mail-address'
-are used to exclude yourself as correspondent.
-
-Usually you don't have to set this variable, except if you collect mails
-sent by you under different user names.
-Then it should be a regexp matching your mail addresses.
-
-Setting this variable has an effect only before reading a mail.")
-
-(custom-autoload 'rmail-user-mail-address-regexp "rmail" t)
-
-(define-obsolete-variable-alias 'rmail-dont-reply-to-names 'mail-dont-reply-to-names "24.1")
-
-(defvar rmail-default-dont-reply-to-names nil "\
-Regexp specifying part of the default value of `mail-dont-reply-to-names'.
-This is used when the user does not set `mail-dont-reply-to-names'
-explicitly.")
-
-(make-obsolete-variable 'rmail-default-dont-reply-to-names 'mail-dont-reply-to-names "24.1")
-
-(defvar rmail-ignored-headers (purecopy (concat "^via:\\|^mail-from:\\|^origin:\\|^references:\\|^sender:" "\\|^status:\\|^received:\\|^x400-originator:\\|^x400-recipients:" "\\|^x400-received:\\|^x400-mts-identifier:\\|^x400-content-type:" "\\|^\\(resent-\\|\\)message-id:\\|^summary-line:\\|^resent-date:" "\\|^nntp-posting-host:\\|^path:\\|^x-char.*:\\|^x-face:\\|^face:" "\\|^x-mailer:\\|^delivered-to:\\|^lines:" "\\|^content-transfer-encoding:\\|^x-coding-system:" "\\|^return-path:\\|^errors-to:\\|^return-receipt-to:" "\\|^precedence:\\|^mime-version:" "\\|^list-owner:\\|^list-help:\\|^list-post:\\|^list-subscribe:" "\\|^list-id:\\|^list-unsubscribe:\\|^list-archive:" "\\|^content-length:\\|^nntp-posting-date:\\|^user-agent" "\\|^importance:\\|^envelope-to:\\|^delivery-date\\|^openpgp:" "\\|^mbox-line:\\|^cancel-lock:" "\\|^DomainKey-Signature:\\|^dkim-signature:" "\\|^resent-face:\\|^resent-x.*:\\|^resent-organization:\\|^resent-openpgp:" "\\|^x-.*:")) "\
-Regexp to match header fields that Rmail should normally hide.
-\(See also `rmail-nonignored-headers', which overrides this regexp.)
-This variable is used for reformatting the message header,
-which normally happens once for each message,
-when you view the message for the first time in Rmail.
-To make a change in this variable take effect
-for a message that you have already viewed,
-go to that message and type \\[rmail-toggle-header] twice.")
-
-(custom-autoload 'rmail-ignored-headers "rmail" t)
-
-(defvar rmail-displayed-headers nil "\
-Regexp to match Header fields that Rmail should display.
-If nil, display all header fields except those matched by
-`rmail-ignored-headers'.")
-
-(custom-autoload 'rmail-displayed-headers "rmail" t)
-
-(defvar rmail-retry-ignored-headers (purecopy "^x-authentication-warning:\\|^x-detected-operating-system:\\|^x-spam[-a-z]*:\\|content-type:\\|content-transfer-encoding:\\|mime-version:\\|message-id:") "\
-Headers that should be stripped when retrying a failed message.")
-
-(custom-autoload 'rmail-retry-ignored-headers "rmail" t)
-
-(defvar rmail-highlighted-headers (purecopy "^From:\\|^Subject:") "\
-Regexp to match Header fields that Rmail should normally highlight.
-A value of nil means don't highlight.  Uses the face `rmail-highlight'.")
-
-(custom-autoload 'rmail-highlighted-headers "rmail" t)
-
-(defvar rmail-primary-inbox-list nil "\
-List of files that are inboxes for your primary mail file `rmail-file-name'.
-If this is nil, uses the environment variable MAIL.  If that is
-unset, uses a file named by the function `user-login-name' in the
-directory `rmail-spool-directory' (whose value depends on the
-operating system).  For example, \"/var/mail/USER\".")
-
-(custom-autoload 'rmail-primary-inbox-list "rmail" t)
-
-(defvar rmail-secondary-file-directory (purecopy "~/") "\
-Directory for additional secondary Rmail files.")
-
-(custom-autoload 'rmail-secondary-file-directory "rmail" t)
-
-(defvar rmail-secondary-file-regexp (purecopy "\\.xmail$") "\
-Regexp for which files are secondary Rmail files.")
-
-(custom-autoload 'rmail-secondary-file-regexp "rmail" t)
-
-(defvar rmail-mode-hook nil "\
-List of functions to call when Rmail is invoked.")
-
-(defvar rmail-show-message-hook nil "\
-List of functions to call when Rmail displays a message.")
-
-(custom-autoload 'rmail-show-message-hook "rmail" t)
-
-(defvar rmail-file-coding-system nil "\
-Coding system used in RMAIL file.
-
-This is set to nil by default.")
-
-(defvar rmail-insert-mime-forwarded-message-function nil "\
-Function to insert a message in MIME format so it can be forwarded.
-This function is called if `rmail-enable-mime' and
-`rmail-enable-mime-composing' are non-nil.
-It is called with one argument FORWARD-BUFFER, which is a
-buffer containing the message to forward.  The current buffer
-is the outgoing mail buffer.")
-
-(autoload 'rmail "rmail" "\
-Read and edit incoming mail.
-Moves messages into file named by `rmail-file-name' and edits that
-file in RMAIL Mode.
-Type \\[describe-mode] once editing that file, for a list of RMAIL commands.
-
-May be called with file name as argument; then performs rmail editing on
-that file, but does not copy any new mail into the file.
-Interactively, if you supply a prefix argument, then you
-have a chance to specify a file name with the minibuffer.
-
-If `rmail-display-summary' is non-nil, make a summary for this RMAIL file.
-
-\(fn &optional FILE-NAME-ARG)" t nil)
-
-(autoload 'rmail-mode "rmail" "\
-Rmail Mode is used by \\<rmail-mode-map>\\[rmail] for editing Rmail files.
-All normal editing commands are turned off.
-Instead, these commands are available:
-
-\\[rmail-beginning-of-message] Move point to front of this message.
-\\[rmail-end-of-message]       Move point to bottom of this message.
-\\[scroll-up]  Scroll to next screen of this message.
-\\[scroll-down]        Scroll to previous screen of this message.
-\\[rmail-next-undeleted-message]       Move to Next non-deleted message.
-\\[rmail-previous-undeleted-message]   Move to Previous non-deleted message.
-\\[rmail-next-message] Move to Next message whether deleted or not.
-\\[rmail-previous-message]     Move to Previous message whether deleted or not.
-\\[rmail-first-message]        Move to the first message in Rmail file.
-\\[rmail-last-message] Move to the last message in Rmail file.
-\\[rmail-show-message] Jump to message specified by numeric position in file.
-\\[rmail-search]       Search for string and show message it is found in.
-\\[rmail-delete-forward]       Delete this message, move to next nondeleted.
-\\[rmail-delete-backward]      Delete this message, move to previous nondeleted.
-\\[rmail-undelete-previous-message]    Undelete message.  Tries current message, then earlier messages
-       till a deleted message is found.
-\\[rmail-edit-current-message] Edit the current message.  \\[rmail-cease-edit] to return to Rmail.
-\\[rmail-expunge]      Expunge deleted messages.
-\\[rmail-expunge-and-save]     Expunge and save the file.
-\\[rmail-quit]       Quit Rmail: expunge, save, then switch to another buffer.
-\\[save-buffer] Save without expunging.
-\\[rmail-get-new-mail] Move new mail from system spool directory into this file.
-\\[rmail-mail] Mail a message (same as \\[mail-other-window]).
-\\[rmail-continue]     Continue composing outgoing message started before.
-\\[rmail-reply]        Reply to this message.  Like \\[rmail-mail] but initializes some fields.
-\\[rmail-retry-failure]        Send this message again.  Used on a mailer failure message.
-\\[rmail-forward]      Forward this message to another user.
-\\[rmail-output]       Output (append) this message to another mail file.
-\\[rmail-output-as-seen]       Output (append) this message to file as it's displayed.
-\\[rmail-output-body-to-file]  Save message body to a file.  Default filename comes from Subject line.
-\\[rmail-input]        Input Rmail file.  Run Rmail on that file.
-\\[rmail-add-label]    Add label to message.  It will be displayed in the mode line.
-\\[rmail-kill-label]   Kill label.  Remove a label from current message.
-\\[rmail-next-labeled-message]   Move to Next message with specified label
-          (label defaults to last one specified).
-          Standard labels: filed, unseen, answered, forwarded, deleted.
-          Any other label is present only if you add it with \\[rmail-add-label].
-\\[rmail-previous-labeled-message]   Move to Previous message with specified label
-\\[rmail-summary]      Show headers buffer, with a one line summary of each message.
-\\[rmail-summary-by-labels]    Summarize only messages with particular label(s).
-\\[rmail-summary-by-recipients]   Summarize only messages with particular recipient(s).
-\\[rmail-summary-by-regexp]   Summarize only messages with particular regexp(s).
-\\[rmail-summary-by-topic]   Summarize only messages with subject line regexp(s).
-\\[rmail-toggle-header]        Toggle display of complete header.
-
-\(fn)" t nil)
-
-(autoload 'rmail-input "rmail" "\
-Run Rmail on file FILENAME.
-
-\(fn FILENAME)" t nil)
-
-(autoload 'rmail-set-remote-password "rmail" "\
-Set PASSWORD to be used for retrieving mail from a POP or IMAP server.
-
-\(fn PASSWORD)" t nil)
-
-;;;***
-\f
-;;;### (autoloads nil "rmailout" "mail/rmailout.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "rmailout" "mail/rmailout.el" (21240 46395
+;;;;;;  727291 0))
 ;;; Generated autoloads from mail/rmailout.el
 (put 'rmail-output-file-alist 'risky-local-variable t)
 
@@ -23167,8 +22934,8 @@ than appending to it.  Deletes the message after writing if
 
 ;;;***
 \f
-;;;### (autoloads nil "rng-cmpct" "nxml/rng-cmpct.el" (21319 19378
-;;;;;;  69506 0))
+;;;### (autoloads nil "rng-cmpct" "nxml/rng-cmpct.el" (21319 49445
+;;;;;;  508378 0))
 ;;; Generated autoloads from nxml/rng-cmpct.el
 
 (autoload 'rng-c-load-schema "rng-cmpct" "\
@@ -23179,8 +22946,8 @@ Return a pattern.
 
 ;;;***
 \f
-;;;### (autoloads nil "rng-nxml" "nxml/rng-nxml.el" (21291 57968
-;;;;;;  317602 643000))
+;;;### (autoloads nil "rng-nxml" "nxml/rng-nxml.el" (21293 25385
+;;;;;;  120083 0))
 ;;; Generated autoloads from nxml/rng-nxml.el
 
 (autoload 'rng-nxml-mode-init "rng-nxml" "\
@@ -23192,8 +22959,8 @@ Validation will be enabled if `rng-nxml-auto-validate-flag' is non-nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "rng-valid" "nxml/rng-valid.el" (21291 57968
-;;;;;;  317602 643000))
+;;;### (autoloads nil "rng-valid" "nxml/rng-valid.el" (21293 25385
+;;;;;;  120083 0))
 ;;; Generated autoloads from nxml/rng-valid.el
 
 (autoload 'rng-validate-mode "rng-valid" "\
@@ -23223,8 +22990,8 @@ to use for finding the schema.
 
 ;;;***
 \f
-;;;### (autoloads nil "rng-xsd" "nxml/rng-xsd.el" (21291 57968 317602
-;;;;;;  643000))
+;;;### (autoloads nil "rng-xsd" "nxml/rng-xsd.el" (21293 25385 120083
+;;;;;;  0))
 ;;; Generated autoloads from nxml/rng-xsd.el
 
 (put 'http://www\.w3\.org/2001/XMLSchema-datatypes 'rng-dt-compile 'rng-xsd-compile)
@@ -23251,8 +23018,8 @@ must be equal.
 
 ;;;***
 \f
-;;;### (autoloads nil "robin" "international/robin.el" (20627 28607
-;;;;;;  829638 0))
+;;;### (autoloads nil "robin" "international/robin.el" (20523 62082
+;;;;;;  997685 0))
 ;;; Generated autoloads from international/robin.el
 
 (autoload 'robin-define-package "robin" "\
@@ -23284,7 +23051,7 @@ Start using robin package NAME, which is a string.
 
 ;;;***
 \f
-;;;### (autoloads nil "rot13" "rot13.el" (21291 53104 431149 0))
+;;;### (autoloads nil "rot13" "rot13.el" (21240 46395 727291 0))
 ;;; Generated autoloads from rot13.el
 
 (autoload 'rot13 "rot13" "\
@@ -23321,7 +23088,7 @@ Toggle the use of ROT13 encoding for the current window.
 
 ;;;***
 \f
-;;;### (autoloads nil "rst" "textmodes/rst.el" (21343 47921 549108
+;;;### (autoloads nil "rst" "textmodes/rst.el" (21415 65191 692645
 ;;;;;;  0))
 ;;; Generated autoloads from textmodes/rst.el
  (add-to-list 'auto-mode-alist (purecopy '("\\.re?st\\'" . rst-mode)))
@@ -23352,8 +23119,8 @@ for modes derived from Text mode, like Mail mode.
 
 ;;;***
 \f
-;;;### (autoloads nil "ruby-mode" "progmodes/ruby-mode.el" (21432
-;;;;;;  23023 204760 0))
+;;;### (autoloads nil "ruby-mode" "progmodes/ruby-mode.el" (21437
+;;;;;;  5802 125919 0))
 ;;; Generated autoloads from progmodes/ruby-mode.el
 (push (purecopy '(ruby-mode 1 2)) package--builtin-versions)
 
@@ -23370,7 +23137,7 @@ Major mode for editing Ruby code.
 
 ;;;***
 \f
-;;;### (autoloads nil "ruler-mode" "ruler-mode.el" (21419 46255 468379
+;;;### (autoloads nil "ruler-mode" "ruler-mode.el" (21419 62246 751914
 ;;;;;;  0))
 ;;; Generated autoloads from ruler-mode.el
 (push (purecopy '(ruler-mode 1 6)) package--builtin-versions)
@@ -23389,7 +23156,7 @@ if ARG is omitted or nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "rx" "emacs-lisp/rx.el" (21291 53104 431149
+;;;### (autoloads nil "rx" "emacs-lisp/rx.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from emacs-lisp/rx.el
 
@@ -23701,14 +23468,14 @@ enclosed in `(and ...)'.
 
 ;;;***
 \f
-;;;### (autoloads nil "sasl-ntlm" "net/sasl-ntlm.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "sasl-ntlm" "net/sasl-ntlm.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from net/sasl-ntlm.el
 (push (purecopy '(sasl 1 0)) package--builtin-versions)
 
 ;;;***
 \f
-;;;### (autoloads nil "savehist" "savehist.el" (21291 53104 431149
+;;;### (autoloads nil "savehist" "savehist.el" (21326 22692 123234
 ;;;;;;  0))
 ;;; Generated autoloads from savehist.el
 (push (purecopy '(savehist 24)) package--builtin-versions)
@@ -23741,8 +23508,8 @@ histories, which is probably undesirable.
 
 ;;;***
 \f
-;;;### (autoloads nil "scheme" "progmodes/scheme.el" (21372 5105
-;;;;;;  739240 0))
+;;;### (autoloads nil "scheme" "progmodes/scheme.el" (21379 5287
+;;;;;;  607434 0))
 ;;; Generated autoloads from progmodes/scheme.el
 
 (autoload 'scheme-mode "scheme" "\
@@ -23781,8 +23548,8 @@ that variable's value is a string.
 
 ;;;***
 \f
-;;;### (autoloads nil "score-mode" "gnus/score-mode.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "score-mode" "gnus/score-mode.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from gnus/score-mode.el
 
 (autoload 'gnus-score-mode "score-mode" "\
@@ -23795,7 +23562,7 @@ This mode is an extended emacs-lisp mode.
 
 ;;;***
 \f
-;;;### (autoloads nil "scroll-all" "scroll-all.el" (21291 53104 431149
+;;;### (autoloads nil "scroll-all" "scroll-all.el" (21388 20265 495157
 ;;;;;;  0))
 ;;; Generated autoloads from scroll-all.el
 
@@ -23821,8 +23588,8 @@ one window apply to all visible windows in the same frame.
 
 ;;;***
 \f
-;;;### (autoloads nil "scroll-lock" "scroll-lock.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "scroll-lock" "scroll-lock.el" (21240 46395
+;;;;;;  727291 0))
 ;;; Generated autoloads from scroll-lock.el
 
 (autoload 'scroll-lock-mode "scroll-lock" "\
@@ -23838,7 +23605,7 @@ vertically fixed relative to window boundaries during scrolling.
 
 ;;;***
 \f
-;;;### (autoloads nil "secrets" "net/secrets.el" (21291 53104 431149
+;;;### (autoloads nil "secrets" "net/secrets.el" (21256 34613 967717
 ;;;;;;  0))
 ;;; Generated autoloads from net/secrets.el
 (when (featurep 'dbusbind)
@@ -23846,8 +23613,8 @@ vertically fixed relative to window boundaries during scrolling.
 
 ;;;***
 \f
-;;;### (autoloads nil "semantic" "cedet/semantic.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "semantic" "cedet/semantic.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from cedet/semantic.el
 (push (purecopy '(semantic 2 2)) package--builtin-versions)
 
@@ -23905,7 +23672,7 @@ Semantic mode.
 ;;;***
 \f
 ;;;### (autoloads nil "semantic/bovine/grammar" "cedet/semantic/bovine/grammar.el"
-;;;;;;  (21291 53104 431149 0))
+;;;;;;  (21187 63826 213216 0))
 ;;; Generated autoloads from cedet/semantic/bovine/grammar.el
 
 (autoload 'bovine-grammar-mode "semantic/bovine/grammar" "\
@@ -23916,7 +23683,7 @@ Major mode for editing Bovine grammars.
 ;;;***
 \f
 ;;;### (autoloads nil "semantic/wisent/grammar" "cedet/semantic/wisent/grammar.el"
-;;;;;;  (21291 53104 431149 0))
+;;;;;;  (21187 63826 213216 0))
 ;;; Generated autoloads from cedet/semantic/wisent/grammar.el
 
 (autoload 'wisent-grammar-mode "semantic/wisent/grammar" "\
@@ -23926,8 +23693,8 @@ Major mode for editing Wisent grammars.
 
 ;;;***
 \f
-;;;### (autoloads nil "sendmail" "mail/sendmail.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "sendmail" "mail/sendmail.el" (21240 46395
+;;;;;;  727291 0))
 ;;; Generated autoloads from mail/sendmail.el
 
 (defvar mail-from-style 'default "\
@@ -24208,7 +23975,7 @@ Like `mail' command, but display mail buffer in another frame.
 
 ;;;***
 \f
-;;;### (autoloads nil "server" "server.el" (21291 53104 431149 0))
+;;;### (autoloads nil "server" "server.el" (21437 5802 125919 0))
 ;;; Generated autoloads from server.el
 
 (put 'server-host 'risky-local-variable t)
@@ -24275,7 +24042,7 @@ only these files will be asked to be saved.
 
 ;;;***
 \f
-;;;### (autoloads nil "ses" "ses.el" (21291 53104 431149 0))
+;;;### (autoloads nil "ses" "ses.el" (21547 54441 168831 0))
 ;;; Generated autoloads from ses.el
 
 (autoload 'ses-mode "ses" "\
@@ -24319,8 +24086,8 @@ formula:
 
 ;;;***
 \f
-;;;### (autoloads nil "sgml-mode" "textmodes/sgml-mode.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "sgml-mode" "textmodes/sgml-mode.el" (21481
+;;;;;;  59815 980216 0))
 ;;; Generated autoloads from textmodes/sgml-mode.el
 
 (autoload 'sgml-mode "sgml-mode" "\
@@ -24385,8 +24152,8 @@ To work around that, do:
 
 ;;;***
 \f
-;;;### (autoloads nil "sh-script" "progmodes/sh-script.el" (21438
-;;;;;;  47246 650067 0))
+;;;### (autoloads nil "sh-script" "progmodes/sh-script.el" (21510
+;;;;;;  60072 112989 0))
 ;;; Generated autoloads from progmodes/sh-script.el
 (push (purecopy '(sh-script 2 0 6)) package--builtin-versions)
 (put 'sh-shell 'safe-local-variable 'symbolp)
@@ -24450,8 +24217,8 @@ with your script for an edit-interpret-debug cycle.
 
 ;;;***
 \f
-;;;### (autoloads nil "shadow" "emacs-lisp/shadow.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "shadow" "emacs-lisp/shadow.el" (21271 54940
+;;;;;;  492268 31000))
 ;;; Generated autoloads from emacs-lisp/shadow.el
 
 (autoload 'list-load-path-shadows "shadow" "\
@@ -24500,7 +24267,7 @@ function, `load-path-shadows-find'.
 
 ;;;***
 \f
-;;;### (autoloads nil "shadowfile" "shadowfile.el" (21291 53104 431149
+;;;### (autoloads nil "shadowfile" "shadowfile.el" (21222 16439 978802
 ;;;;;;  0))
 ;;; Generated autoloads from shadowfile.el
 
@@ -24539,7 +24306,7 @@ Set up file shadowing.
 
 ;;;***
 \f
-;;;### (autoloads nil "shell" "shell.el" (21313 65162 603703 543000))
+;;;### (autoloads nil "shell" "shell.el" (21374 22080 740835 768000))
 ;;; Generated autoloads from shell.el
 
 (defvar shell-dumb-shell-regexp (purecopy "cmd\\(proxy\\)?\\.exe") "\
@@ -24587,7 +24354,7 @@ Otherwise, one argument `-i' is passed to the shell.
 
 ;;;***
 \f
-;;;### (autoloads nil "shr" "net/shr.el" (21501 26431 616864 948000))
+;;;### (autoloads nil "shr" "net/shr.el" (21532 676 459903 0))
 ;;; Generated autoloads from net/shr.el
 
 (autoload 'shr-render-region "shr" "\
@@ -24604,7 +24371,7 @@ DOM should be a parse tree as generated by
 
 ;;;***
 \f
-;;;### (autoloads nil "sieve" "gnus/sieve.el" (21291 53104 431149
+;;;### (autoloads nil "sieve" "gnus/sieve.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from gnus/sieve.el
 
@@ -24630,8 +24397,8 @@ DOM should be a parse tree as generated by
 
 ;;;***
 \f
-;;;### (autoloads nil "sieve-mode" "gnus/sieve-mode.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "sieve-mode" "gnus/sieve-mode.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from gnus/sieve-mode.el
 
 (autoload 'sieve-mode "sieve-mode" "\
@@ -24646,8 +24413,8 @@ Turning on Sieve mode runs `sieve-mode-hook'.
 
 ;;;***
 \f
-;;;### (autoloads nil "simula" "progmodes/simula.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "simula" "progmodes/simula.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from progmodes/simula.el
 
 (autoload 'simula-mode "simula" "\
@@ -24695,7 +24462,7 @@ with no arguments, if that value is non-nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "skeleton" "skeleton.el" (21415 30982 815536
+;;;### (autoloads nil "skeleton" "skeleton.el" (21420 38312 308000
 ;;;;;;  0))
 ;;; Generated autoloads from skeleton.el
 
@@ -24709,7 +24476,7 @@ SKELETON is as defined under `skeleton-insert'.
 
 \(fn COMMAND DOCUMENTATION &rest SKELETON)" nil t)
 
-(put 'define-skeleton 'doc-string-elt '2)
+(function-put 'define-skeleton 'doc-string-elt '2)
 
 (autoload 'skeleton-proxy-new "skeleton" "\
 Insert SKELETON.
@@ -24814,8 +24581,8 @@ symmetrical ones, and the same character twice for the others.
 
 ;;;***
 \f
-;;;### (autoloads nil "smerge-mode" "vc/smerge-mode.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "smerge-mode" "vc/smerge-mode.el" (21409 26408
+;;;;;;  607647 0))
 ;;; Generated autoloads from vc/smerge-mode.el
 
 (autoload 'smerge-ediff "smerge-mode" "\
@@ -24842,7 +24609,7 @@ If no conflict maker is found, turn off `smerge-mode'.
 
 ;;;***
 \f
-;;;### (autoloads nil "smiley" "gnus/smiley.el" (21291 53104 431149
+;;;### (autoloads nil "smiley" "gnus/smiley.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from gnus/smiley.el
 
@@ -24860,8 +24627,8 @@ interactively.  If there's no argument, do it at the current buffer.
 
 ;;;***
 \f
-;;;### (autoloads nil "smtpmail" "mail/smtpmail.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "smtpmail" "mail/smtpmail.el" (21322 25639
+;;;;;;  363230 0))
 ;;; Generated autoloads from mail/smtpmail.el
 
 (autoload 'smtpmail-send-it "smtpmail" "\
@@ -24876,7 +24643,7 @@ Send mail that was queued as a result of setting `smtpmail-queue-mail'.
 
 ;;;***
 \f
-;;;### (autoloads nil "snake" "play/snake.el" (21291 53104 431149
+;;;### (autoloads nil "snake" "play/snake.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from play/snake.el
 
@@ -24900,8 +24667,8 @@ Snake mode keybindings:
 
 ;;;***
 \f
-;;;### (autoloads nil "snmp-mode" "net/snmp-mode.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "snmp-mode" "net/snmp-mode.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from net/snmp-mode.el
 
 (autoload 'snmp-mode "snmp-mode" "\
@@ -24930,7 +24697,7 @@ then `snmpv2-mode-hook'.
 
 ;;;***
 \f
-;;;### (autoloads nil "solar" "calendar/solar.el" (21291 53104 431149
+;;;### (autoloads nil "solar" "calendar/solar.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from calendar/solar.el
 
@@ -24946,8 +24713,8 @@ This function is suitable for execution in an init file.
 
 ;;;***
 \f
-;;;### (autoloads nil "solitaire" "play/solitaire.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "solitaire" "play/solitaire.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from play/solitaire.el
 
 (autoload 'solitaire "solitaire" "\
@@ -25022,7 +24789,7 @@ Pick your favorite shortcuts:
 
 ;;;***
 \f
-;;;### (autoloads nil "sort" "sort.el" (21291 53104 431149 0))
+;;;### (autoloads nil "sort" "sort.el" (21240 46395 727291 0))
 ;;; Generated autoloads from sort.el
 (put 'sort-fold-case 'safe-local-variable 'booleanp)
 
@@ -25197,7 +24964,7 @@ is non-nil, it also prints a message describing the number of deletions.
 
 ;;;***
 \f
-;;;### (autoloads nil "spam" "gnus/spam.el" (21291 53104 431149 0))
+;;;### (autoloads nil "spam" "gnus/spam.el" (21296 1575 438327 0))
 ;;; Generated autoloads from gnus/spam.el
 
 (autoload 'spam-initialize "spam" "\
@@ -25211,8 +24978,8 @@ installed through `spam-necessary-extra-headers'.
 
 ;;;***
 \f
-;;;### (autoloads nil "spam-report" "gnus/spam-report.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "spam-report" "gnus/spam-report.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from gnus/spam-report.el
 
 (autoload 'spam-report-process-queue "spam-report" "\
@@ -25254,7 +25021,7 @@ Spam reports will be queued with the method used when
 
 ;;;***
 \f
-;;;### (autoloads nil "speedbar" "speedbar.el" (21485 23655 451617
+;;;### (autoloads nil "speedbar" "speedbar.el" (21485 56871 932720
 ;;;;;;  0))
 ;;; Generated autoloads from speedbar.el
 
@@ -25279,7 +25046,7 @@ selected.  If the speedbar frame is active, then select the attached frame.
 
 ;;;***
 \f
-;;;### (autoloads nil "spook" "play/spook.el" (21291 53104 431149
+;;;### (autoloads nil "spook" "play/spook.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from play/spook.el
 
@@ -25295,7 +25062,7 @@ Return a vector containing the lines from `spook-phrases-file'.
 
 ;;;***
 \f
-;;;### (autoloads nil "sql" "progmodes/sql.el" (21291 53104 431149
+;;;### (autoloads nil "sql" "progmodes/sql.el" (21546 33576 601815
 ;;;;;;  0))
 ;;; Generated autoloads from progmodes/sql.el
 (push (purecopy '(sql 3 4)) package--builtin-versions)
@@ -25755,9 +25522,14 @@ buffer.
 
 \(fn &optional BUFFER)" t nil)
 
+(autoload 'sql-vertica "sql" "\
+Run vsql as an inferior process.
+
+\(fn &optional BUFFER)" t nil)
+
 ;;;***
 \f
-;;;### (autoloads nil "srecode" "cedet/srecode.el" (21291 53104 431149
+;;;### (autoloads nil "srecode" "cedet/srecode.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from cedet/srecode.el
 (push (purecopy '(srecode 1 2)) package--builtin-versions)
@@ -25765,7 +25537,7 @@ buffer.
 ;;;***
 \f
 ;;;### (autoloads nil "srecode/srt-mode" "cedet/srecode/srt-mode.el"
-;;;;;;  (21291 53104 431149 0))
+;;;;;;  (21187 63826 213216 0))
 ;;; Generated autoloads from cedet/srecode/srt-mode.el
 
 (autoload 'srecode-template-mode "srecode/srt-mode" "\
@@ -25777,8 +25549,8 @@ Major-mode for writing SRecode macros.
 
 ;;;***
 \f
-;;;### (autoloads nil "starttls" "gnus/starttls.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "starttls" "gnus/starttls.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from gnus/starttls.el
 
 (autoload 'starttls-open-stream "starttls" "\
@@ -25801,8 +25573,7 @@ GnuTLS requires a port number.
 
 ;;;***
 \f
-;;;### (autoloads nil "strokes" "strokes.el" (21291 53104 431149
-;;;;;;  0))
+;;;### (autoloads nil "strokes" "strokes.el" (21271 1974 113743 0))
 ;;; Generated autoloads from strokes.el
 
 (autoload 'strokes-global-set-stroke "strokes" "\
@@ -25915,7 +25686,7 @@ Read a complex stroke and insert its glyph into the current buffer.
 
 ;;;***
 \f
-;;;### (autoloads nil "studly" "play/studly.el" (21291 53104 431149
+;;;### (autoloads nil "studly" "play/studly.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from play/studly.el
 
@@ -25936,18 +25707,20 @@ Studlify-case the current buffer.
 
 ;;;***
 \f
-;;;### (autoloads nil "subword" "progmodes/subword.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "subword" "progmodes/subword.el" (21546 33576
+;;;;;;  601815 0))
 ;;; Generated autoloads from progmodes/subword.el
 
+(define-obsolete-function-alias 'capitalized-words-mode 'subword-mode "25.1")
+
 (autoload 'subword-mode "subword" "\
 Toggle subword movement and editing (Subword mode).
 With a prefix argument ARG, enable Subword mode if ARG is
 positive, and disable it otherwise.  If called from Lisp, enable
 the mode if ARG is omitted or nil.
 
-Subword mode is a buffer-local minor mode.  Enabling it remaps
-word-based editing commands to subword-based commands that handle
+Subword mode is a buffer-local minor mode.  Enabling it changes
+the definition of a word so that word-based commands stop inside
 symbols with mixed uppercase and lowercase letters,
 e.g. \"GtkWidget\", \"EmacsFrameClass\", \"NSGraphicsContext\".
 
@@ -25961,9 +25734,8 @@ called a `subword'.  Here are some examples:
   EmacsFrameClass    =>  \"Emacs\", \"Frame\" and \"Class\"
   NSGraphicsContext  =>  \"NS\", \"Graphics\" and \"Context\"
 
-The subword oriented commands activated in this minor mode recognize
-subwords in a nomenclature to move between subwords and to edit them
-as words.
+This mode changes the definition of a word so that word commands
+treat nomenclature boundaries as word boundaries.
 
 \\{subword-mode-map}
 
@@ -25996,13 +25768,10 @@ With a prefix argument ARG, enable Superword mode if ARG is
 positive, and disable it otherwise.  If called from Lisp, enable
 the mode if ARG is omitted or nil.
 
-Superword mode is a buffer-local minor mode.  Enabling it remaps
-word-based editing commands to superword-based commands that
-treat symbols as words, e.g. \"this_is_a_symbol\".
-
-The superword oriented commands activated in this minor mode
-recognize symbols as superwords to move between superwords and to
-edit them as words.
+Superword mode is a buffer-local minor mode.  Enabling it changes
+the definition of words such that symbols characters are treated
+as parts of words: e.g., in `superword-mode',
+\"this_is_a_symbol\" counts as one word.
 
 \\{superword-mode-map}
 
@@ -26031,8 +25800,8 @@ See `superword-mode' for more information on Superword mode.
 
 ;;;***
 \f
-;;;### (autoloads nil "supercite" "mail/supercite.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "supercite" "mail/supercite.el" (21240 46395
+;;;;;;  727291 0))
 ;;; Generated autoloads from mail/supercite.el
 
 (autoload 'sc-cite-original "supercite" "\
@@ -26064,7 +25833,7 @@ and `sc-post-hook' is run after the guts of this function.
 
 ;;;***
 \f
-;;;### (autoloads nil "t-mouse" "t-mouse.el" (21291 53104 431149
+;;;### (autoloads nil "t-mouse" "t-mouse.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from t-mouse.el
 
@@ -26093,7 +25862,7 @@ It relies on the `gpm' daemon being activated.
 
 ;;;***
 \f
-;;;### (autoloads nil "tabify" "tabify.el" (21291 53104 431149 0))
+;;;### (autoloads nil "tabify" "tabify.el" (21240 46395 727291 0))
 ;;; Generated autoloads from tabify.el
 
 (autoload 'untabify "tabify" "\
@@ -26122,7 +25891,7 @@ The variable `tab-width' controls the spacing of tab stops.
 
 ;;;***
 \f
-;;;### (autoloads nil "table" "textmodes/table.el" (21291 53104 431149
+;;;### (autoloads nil "table" "textmodes/table.el" (21194 37048 599945
 ;;;;;;  0))
 ;;; Generated autoloads from textmodes/table.el
 
@@ -26715,7 +26484,7 @@ converts a table into plain text without frames.  It is a companion to
 
 ;;;***
 \f
-;;;### (autoloads nil "talk" "talk.el" (21291 53104 431149 0))
+;;;### (autoloads nil "talk" "talk.el" (21240 46395 727291 0))
 ;;; Generated autoloads from talk.el
 
 (autoload 'talk-connect "talk" "\
@@ -26730,7 +26499,7 @@ Connect to the Emacs talk group from the current X display or tty frame.
 
 ;;;***
 \f
-;;;### (autoloads nil "tar-mode" "tar-mode.el" (21504 6071 527764
+;;;### (autoloads nil "tar-mode" "tar-mode.el" (21510 60072 112989
 ;;;;;;  0))
 ;;; Generated autoloads from tar-mode.el
 
@@ -26754,7 +26523,7 @@ See also: variables `tar-update-datestamp' and `tar-anal-blocksize'.
 
 ;;;***
 \f
-;;;### (autoloads nil "tcl" "progmodes/tcl.el" (21291 53104 431149
+;;;### (autoloads nil "tcl" "progmodes/tcl.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from progmodes/tcl.el
 
@@ -26803,7 +26572,7 @@ Prefix argument means invert sense of `tcl-use-smart-word-finder'.
 
 ;;;***
 \f
-;;;### (autoloads nil "telnet" "net/telnet.el" (21291 53104 431149
+;;;### (autoloads nil "telnet" "net/telnet.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from net/telnet.el
 
@@ -26829,7 +26598,7 @@ Normally input is edited in Emacs and sent a line at a time.
 
 ;;;***
 \f
-;;;### (autoloads nil "term" "term.el" (21341 23900 988149 0))
+;;;### (autoloads nil "term" "term.el" (21437 5802 125919 0))
 ;;; Generated autoloads from term.el
 
 (autoload 'make-term "term" "\
@@ -26871,8 +26640,8 @@ use in that buffer.
 
 ;;;***
 \f
-;;;### (autoloads nil "testcover" "emacs-lisp/testcover.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "testcover" "emacs-lisp/testcover.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from emacs-lisp/testcover.el
 
 (autoload 'testcover-this-defun "testcover" "\
@@ -26882,7 +26651,7 @@ Start coverage on function under point.
 
 ;;;***
 \f
-;;;### (autoloads nil "tetris" "play/tetris.el" (21291 53104 431149
+;;;### (autoloads nil "tetris" "play/tetris.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from play/tetris.el
 (push (purecopy '(tetris 2 1)) package--builtin-versions)
@@ -26908,8 +26677,8 @@ tetris-mode keybindings:
 
 ;;;***
 \f
-;;;### (autoloads nil "tex-mode" "textmodes/tex-mode.el" (21461 43491
-;;;;;;  589246 0))
+;;;### (autoloads nil "tex-mode" "textmodes/tex-mode.el" (21546 33576
+;;;;;;  601815 0))
 ;;; Generated autoloads from textmodes/tex-mode.el
 
 (defvar tex-shell-file-name nil "\
@@ -27210,8 +26979,8 @@ Major mode to edit DocTeX files.
 
 ;;;***
 \f
-;;;### (autoloads nil "texinfmt" "textmodes/texinfmt.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "texinfmt" "textmodes/texinfmt.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from textmodes/texinfmt.el
 
 (autoload 'texinfo-format-buffer "texinfmt" "\
@@ -27250,8 +27019,8 @@ if large.  You can use `Info-split' to do this manually.
 
 ;;;***
 \f
-;;;### (autoloads nil "texinfo" "textmodes/texinfo.el" (21412 28481
-;;;;;;  677015 0))
+;;;### (autoloads nil "texinfo" "textmodes/texinfo.el" (21414 44327
+;;;;;;  790846 0))
 ;;; Generated autoloads from textmodes/texinfo.el
 
 (defvar texinfo-open-quote (purecopy "``") "\
@@ -27335,8 +27104,8 @@ value of `texinfo-mode-hook'.
 
 ;;;***
 \f
-;;;### (autoloads nil "thai-util" "language/thai-util.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "thai-util" "language/thai-util.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from language/thai-util.el
 
 (autoload 'thai-compose-region "thai-util" "\
@@ -27363,7 +27132,7 @@ Compose Thai characters in the current buffer.
 
 ;;;***
 \f
-;;;### (autoloads nil "thingatpt" "thingatpt.el" (21291 53104 431149
+;;;### (autoloads nil "thingatpt" "thingatpt.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from thingatpt.el
 
@@ -27428,7 +27197,7 @@ Return the Lisp list at point, or nil if none is found.
 
 ;;;***
 \f
-;;;### (autoloads nil "thumbs" "thumbs.el" (21291 53104 431149 0))
+;;;### (autoloads nil "thumbs" "thumbs.el" (21240 46395 727291 0))
 ;;; Generated autoloads from thumbs.el
 
 (autoload 'thumbs-find-thumb "thumbs" "\
@@ -27462,8 +27231,8 @@ In dired, call the setroot program on the image at point.
 
 ;;;***
 \f
-;;;### (autoloads nil "tibet-util" "language/tibet-util.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "tibet-util" "language/tibet-util.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from language/tibet-util.el
 
 (autoload 'tibetan-char-p "tibet-util" "\
@@ -27536,10 +27305,10 @@ See also docstring of the function tibetan-compose-region.
 
 ;;;***
 \f
-;;;### (autoloads nil "tildify" "textmodes/tildify.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "tildify" "textmodes/tildify.el" (21393 38187
+;;;;;;  675040 0))
 ;;; Generated autoloads from textmodes/tildify.el
-(push (purecopy '(tildify 4 5)) package--builtin-versions)
+(push (purecopy '(tildify 4 5 3)) package--builtin-versions)
 
 (autoload 'tildify-region "tildify" "\
 Add hard spaces in the region between BEG and END.
@@ -27547,8 +27316,10 @@ See variables `tildify-pattern-alist', `tildify-string-alist', and
 `tildify-ignored-environments-alist' for information about configuration
 parameters.
 This function performs no refilling of the changed text.
+If DONT-ASK is set, or called interactively with prefix argument, user
+won't be prompted for confirmation of each substitution.
 
-\(fn BEG END)" t nil)
+\(fn BEG END &optional DONT-ASK)" t nil)
 
 (autoload 'tildify-buffer "tildify" "\
 Add hard spaces in the current buffer.
@@ -27556,12 +27327,14 @@ See variables `tildify-pattern-alist', `tildify-string-alist', and
 `tildify-ignored-environments-alist' for information about configuration
 parameters.
 This function performs no refilling of the changed text.
+If DONT-ASK is set, or called interactively with prefix argument, user
+won't be prompted for confirmation of each substitution.
 
-\(fn)" t nil)
+\(fn &optional DONT-ASK)" t nil)
 
 ;;;***
 \f
-;;;### (autoloads nil "time" "time.el" (21291 53104 431149 0))
+;;;### (autoloads nil "time" "time.el" (21240 46395 727291 0))
 ;;; Generated autoloads from time.el
 
 (defvar display-time-day-and-date nil "\
@@ -27623,8 +27396,8 @@ Return a string giving the duration of the Emacs initialization.
 
 ;;;***
 \f
-;;;### (autoloads nil "time-date" "calendar/time-date.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "time-date" "calendar/time-date.el" (21471
+;;;;;;  23976 844614 0))
 ;;; Generated autoloads from calendar/time-date.el
 
 (autoload 'date-to-time "time-date" "\
@@ -27733,9 +27506,14 @@ This function does not work for SECONDS greater than `most-positive-fixnum'.
 
 \(fn STRING SECONDS)" nil nil)
 
+(autoload 'seconds-to-string "time-date" "\
+Convert the time interval in seconds to a short string.
+
+\(fn DELAY)" nil nil)
+
 ;;;***
 \f
-;;;### (autoloads nil "time-stamp" "time-stamp.el" (21291 53104 431149
+;;;### (autoloads nil "time-stamp" "time-stamp.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from time-stamp.el
 (put 'time-stamp-format 'safe-local-variable 'stringp)
@@ -27776,8 +27554,8 @@ With ARG, turn time stamping on if and only if arg is positive.
 
 ;;;***
 \f
-;;;### (autoloads nil "timeclock" "calendar/timeclock.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "timeclock" "calendar/timeclock.el" (21222
+;;;;;;  16439 978802 0))
 ;;; Generated autoloads from calendar/timeclock.el
 (push (purecopy '(timeclock 2 6 1)) package--builtin-versions)
 
@@ -27887,7 +27665,7 @@ relative only to the time worked today, and not to past time.
 ;;;***
 \f
 ;;;### (autoloads nil "titdic-cnv" "international/titdic-cnv.el"
-;;;;;;  (21291 53104 431149 0))
+;;;;;;  (21187 63826 213216 0))
 ;;; Generated autoloads from international/titdic-cnv.el
 
 (autoload 'titdic-convert "titdic-cnv" "\
@@ -27909,7 +27687,7 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\".
 
 ;;;***
 \f
-;;;### (autoloads nil "tmm" "tmm.el" (21291 53104 431149 0))
+;;;### (autoloads nil "tmm" "tmm.el" (21240 46395 727291 0))
 ;;; Generated autoloads from tmm.el
  (define-key global-map "\M-`" 'tmm-menubar)
  (define-key global-map [menu-bar mouse-1] 'tmm-menubar-mouse)
@@ -27951,8 +27729,8 @@ Its value should be an event that has a binding in MENU.
 
 ;;;***
 \f
-;;;### (autoloads nil "todo-mode" "calendar/todo-mode.el" (21469
-;;;;;;  45425 622894 0))
+;;;### (autoloads nil "todo-mode" "calendar/todo-mode.el" (21471
+;;;;;;  23976 844614 0))
 ;;; Generated autoloads from calendar/todo-mode.el
 
 (autoload 'todo-show "todo-mode" "\
@@ -28019,7 +27797,7 @@ Mode for displaying and reprioritizing top priority Todo.
 
 ;;;***
 \f
-;;;### (autoloads nil "tool-bar" "tool-bar.el" (21291 53104 431149
+;;;### (autoloads nil "tool-bar" "tool-bar.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from tool-bar.el
 
@@ -28090,73 +27868,7 @@ holds a keymap.
 
 ;;;***
 \f
-;;;### (autoloads nil "tpu-edt" "emulation/tpu-edt.el" (21291 53104
-;;;;;;  431149 0))
-;;; Generated autoloads from emulation/tpu-edt.el
-(push (purecopy '(tpu-edt 4 5)) package--builtin-versions)
-
-(defvar tpu-edt-mode nil "\
-Non-nil if Tpu-Edt mode is enabled.
-See the command `tpu-edt-mode' for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `tpu-edt-mode'.")
-
-(custom-autoload 'tpu-edt-mode "tpu-edt" nil)
-
-(autoload 'tpu-edt-mode "tpu-edt" "\
-Toggle TPU/edt emulation on or off.
-With a prefix argument ARG, enable the mode if ARG is positive,
-and disable it otherwise.  If called from Lisp, enable the mode
-if ARG is omitted or nil.
-
-\(fn &optional ARG)" t nil)
-
-(defalias 'tpu-edt 'tpu-edt-on)
-
-(autoload 'tpu-edt-on "tpu-edt" "\
-Turn on TPU/edt emulation.
-
-\(fn)" t nil)
-
-;;;***
-\f
-;;;### (autoloads nil "tpu-mapper" "emulation/tpu-mapper.el" (21291
-;;;;;;  53104 431149 0))
-;;; Generated autoloads from emulation/tpu-mapper.el
-
-(autoload 'tpu-mapper "tpu-mapper" "\
-Create an Emacs lisp file defining the TPU-edt keypad for X-windows.
-
-This command displays an instruction screen showing the TPU-edt keypad
-and asks you to press the TPU-edt editing keys.  It uses the keys you
-press to create an Emacs Lisp file that will define a TPU-edt keypad
-for your X server.  You can even re-arrange the standard EDT keypad to
-suit your tastes (or to cope with those silly Sun and PC keypads).
-
-Finally, you will be prompted for the name of the file to store the key
-definitions.  If you chose the default, TPU-edt will find it and load it
-automatically.  If you specify a different file name, you will need to
-set the variable ``tpu-xkeys-file'' before starting TPU-edt.  Here's how
-you might go about doing that in your init file.
-
-  (setq tpu-xkeys-file (expand-file-name \"~/.my-emacs-x-keys\"))
-  (tpu-edt)
-
-Known Problems:
-
-Sometimes, tpu-mapper will ignore a key you press, and just continue to
-prompt for the same key.  This can happen when your window manager sucks
-up the key and doesn't pass it on to Emacs, or it could be an Emacs bug.
-Either way, there's nothing that tpu-mapper can do about it.  You must
-press RETURN, to skip the current key and continue.  Later, you and/or
-your local X guru can try to figure out why the key is being ignored.
-
-\(fn)" t nil)
-
-;;;***
-\f
-;;;### (autoloads nil "tq" "emacs-lisp/tq.el" (21291 53104 431149
+;;;### (autoloads nil "tq" "emacs-lisp/tq.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from emacs-lisp/tq.el
 
@@ -28170,8 +27882,8 @@ to a tcp server on another machine.
 
 ;;;***
 \f
-;;;### (autoloads nil "trace" "emacs-lisp/trace.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "trace" "emacs-lisp/trace.el" (21240 46395
+;;;;;;  727291 0))
 ;;; Generated autoloads from emacs-lisp/trace.el
 
 (defvar trace-buffer "*trace-output*" "\
@@ -28216,7 +27928,7 @@ the output buffer or changing the window configuration.
 
 ;;;***
 \f
-;;;### (autoloads nil "tramp" "net/tramp.el" (21391 16284 875808
+;;;### (autoloads nil "tramp" "net/tramp.el" (21525 27433 340807
 ;;;;;;  0))
 ;;; Generated autoloads from net/tramp.el
 
@@ -28332,8 +28044,8 @@ Discard Tramp from loading remote files.
 
 ;;;***
 \f
-;;;### (autoloads nil "tramp-ftp" "net/tramp-ftp.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "tramp-ftp" "net/tramp-ftp.el" (21476 41895
+;;;;;;  55661 0))
 ;;; Generated autoloads from net/tramp-ftp.el
 
 (autoload 'tramp-ftp-enable-ange-ftp "tramp-ftp" "\
@@ -28343,8 +28055,8 @@ Discard Tramp from loading remote files.
 
 ;;;***
 \f
-;;;### (autoloads nil "tutorial" "tutorial.el" (21509 26638 997760
-;;;;;;  598000))
+;;;### (autoloads nil "tutorial" "tutorial.el" (21510 60072 112989
+;;;;;;  0))
 ;;; Generated autoloads from tutorial.el
 
 (autoload 'help-with-tutorial "tutorial" "\
@@ -28368,8 +28080,8 @@ resumed later.
 
 ;;;***
 \f
-;;;### (autoloads nil "tv-util" "language/tv-util.el" (20352 35897
-;;;;;;  183049 0))
+;;;### (autoloads nil "tv-util" "language/tv-util.el" (20355 10021
+;;;;;;  546955 0))
 ;;; Generated autoloads from language/tv-util.el
 
 (autoload 'tai-viet-composition-function "tv-util" "\
@@ -28379,8 +28091,8 @@ resumed later.
 
 ;;;***
 \f
-;;;### (autoloads nil "two-column" "textmodes/two-column.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "two-column" "textmodes/two-column.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from textmodes/two-column.el
  (autoload '2C-command "two-column" () t 'keymap)
  (global-set-key "\C-x6" '2C-command)
@@ -28427,7 +28139,7 @@ First column's text    sSs  Second column's text
 
 ;;;***
 \f
-;;;### (autoloads nil "type-break" "type-break.el" (21291 53104 431149
+;;;### (autoloads nil "type-break" "type-break.el" (21222 16439 978802
 ;;;;;;  0))
 ;;; Generated autoloads from type-break.el
 
@@ -28560,7 +28272,7 @@ FRAC should be the inverse of the fractional value; for example, a value of
 
 ;;;***
 \f
-;;;### (autoloads nil "uce" "mail/uce.el" (21291 53104 431149 0))
+;;;### (autoloads nil "uce" "mail/uce.el" (21199 54969 178188 0))
 ;;; Generated autoloads from mail/uce.el
 
 (autoload 'uce-reply-to-uce "uce" "\
@@ -28574,7 +28286,7 @@ You might need to set `uce-mail-reader' before using this.
 ;;;***
 \f
 ;;;### (autoloads nil "ucs-normalize" "international/ucs-normalize.el"
-;;;;;;  (21291 53104 431149 0))
+;;;;;;  (21194 37048 599945 0))
 ;;; Generated autoloads from international/ucs-normalize.el
 
 (autoload 'ucs-normalize-NFD-region "ucs-normalize" "\
@@ -28639,8 +28351,8 @@ Normalize the string STR by the Unicode NFC and Mac OS's HFS Plus.
 
 ;;;***
 \f
-;;;### (autoloads nil "underline" "textmodes/underline.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "underline" "textmodes/underline.el" (21240
+;;;;;;  46395 727291 0))
 ;;; Generated autoloads from textmodes/underline.el
 
 (autoload 'underline-region "underline" "\
@@ -28660,7 +28372,7 @@ which specify the range to operate on.
 
 ;;;***
 \f
-;;;### (autoloads nil "unrmail" "mail/unrmail.el" (21291 53104 431149
+;;;### (autoloads nil "unrmail" "mail/unrmail.el" (21240 46395 727291
 ;;;;;;  0))
 ;;; Generated autoloads from mail/unrmail.el
 
@@ -28681,8 +28393,8 @@ The variable `unrmail-mbox-format' controls which mbox format to use.
 
 ;;;***
 \f
-;;;### (autoloads nil "unsafep" "emacs-lisp/unsafep.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "unsafep" "emacs-lisp/unsafep.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from emacs-lisp/unsafep.el
 
 (autoload 'unsafep "unsafep" "\
@@ -28694,7 +28406,7 @@ UNSAFEP-VARS is a list of symbols with local bindings.
 
 ;;;***
 \f
-;;;### (autoloads nil "url" "url/url.el" (21546 52205 704969 0))
+;;;### (autoloads nil "url" "url/url.el" (21537 18599 384335 0))
 ;;; Generated autoloads from url/url.el
 
 (autoload 'url-retrieve "url" "\
@@ -28741,7 +28453,7 @@ no further processing).  URL is either a string or a parsed URL.
 
 ;;;***
 \f
-;;;### (autoloads nil "url-auth" "url/url-auth.el" (21291 53104 431149
+;;;### (autoloads nil "url-auth" "url/url-auth.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from url/url-auth.el
 
@@ -28783,8 +28495,8 @@ RATING   a rating between 1 and 10 of the strength of the authentication.
 
 ;;;***
 \f
-;;;### (autoloads nil "url-cache" "url/url-cache.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "url-cache" "url/url-cache.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from url/url-cache.el
 
 (autoload 'url-store-in-cache "url-cache" "\
@@ -28805,7 +28517,7 @@ Extract FNAM from the local disk cache.
 
 ;;;***
 \f
-;;;### (autoloads nil "url-cid" "url/url-cid.el" (21291 53104 431149
+;;;### (autoloads nil "url-cid" "url/url-cid.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from url/url-cid.el
 
@@ -28816,8 +28528,8 @@ Extract FNAM from the local disk cache.
 
 ;;;***
 \f
-;;;### (autoloads nil "url-dav" "url/url-dav.el" (21291 53104 431149
-;;;;;;  0))
+;;;### (autoloads nil "url-dav" "url/url-dav.el" (21302 6606 390237
+;;;;;;  377000))
 ;;; Generated autoloads from url/url-dav.el
 
 (autoload 'url-dav-supported-p "url-dav" "\
@@ -28851,7 +28563,7 @@ added to this list, so most requests can just pass in nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "url-file" "url/url-file.el" (21291 53104 431149
+;;;### (autoloads nil "url-file" "url/url-file.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from url/url-file.el
 
@@ -28862,7 +28574,7 @@ Handle file: and ftp: URLs.
 
 ;;;***
 \f
-;;;### (autoloads nil "url-gw" "url/url-gw.el" (21291 53104 431149
+;;;### (autoloads nil "url-gw" "url/url-gw.el" (21545 12711 344259
 ;;;;;;  0))
 ;;; Generated autoloads from url/url-gw.el
 
@@ -28877,12 +28589,15 @@ Args per `open-network-stream'.
 Will not make a connection if `url-gateway-unplugged' is non-nil.
 Might do a non-blocking connection; use `process-status' to check.
 
-\(fn NAME BUFFER HOST SERVICE)" nil nil)
+Optional arg GATEWAY-METHOD specifies the gateway to be used,
+overriding the value of `url-gateway-method'.
+
+\(fn NAME BUFFER HOST SERVICE &optional GATEWAY-METHOD)" nil nil)
 
 ;;;***
 \f
-;;;### (autoloads nil "url-handlers" "url/url-handlers.el" (21419
-;;;;;;  46255 468379 0))
+;;;### (autoloads nil "url-handlers" "url/url-handlers.el" (21546
+;;;;;;  33576 601815 0))
 ;;; Generated autoloads from url/url-handlers.el
 
 (defvar url-handler-mode nil "\
@@ -28936,7 +28651,7 @@ accessible.
 
 ;;;***
 \f
-;;;### (autoloads nil "url-http" "url/url-http.el" (21546 52205 704969
+;;;### (autoloads nil "url-http" "url/url-http.el" (21545 12711 344259
 ;;;;;;  0))
 ;;; Generated autoloads from url/url-http.el
  (autoload 'url-default-expander "url-expand")
@@ -28949,7 +28664,7 @@ accessible.
 
 ;;;***
 \f
-;;;### (autoloads nil "url-irc" "url/url-irc.el" (21291 53104 431149
+;;;### (autoloads nil "url-irc" "url/url-irc.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from url/url-irc.el
 
@@ -28960,7 +28675,7 @@ accessible.
 
 ;;;***
 \f
-;;;### (autoloads nil "url-ldap" "url/url-ldap.el" (21291 53104 431149
+;;;### (autoloads nil "url-ldap" "url/url-ldap.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from url/url-ldap.el
 
@@ -28974,8 +28689,8 @@ URL can be a URL string, or a URL vector of the type returned by
 
 ;;;***
 \f
-;;;### (autoloads nil "url-mailto" "url/url-mailto.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "url-mailto" "url/url-mailto.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from url/url-mailto.el
 
 (autoload 'url-mail "url-mailto" "\
@@ -28990,7 +28705,7 @@ Handle the mailto: URL syntax.
 
 ;;;***
 \f
-;;;### (autoloads nil "url-misc" "url/url-misc.el" (21291 53104 431149
+;;;### (autoloads nil "url-misc" "url/url-misc.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from url/url-misc.el
 
@@ -29022,8 +28737,8 @@ Fetch a data URL (RFC 2397).
 
 ;;;***
 \f
-;;;### (autoloads nil "url-news" "url/url-news.el" (21291 53104 431149
-;;;;;;  0))
+;;;### (autoloads nil "url-news" "url/url-news.el" (21301 65237 320114
+;;;;;;  350000))
 ;;; Generated autoloads from url/url-news.el
 
 (autoload 'url-news "url-news" "\
@@ -29038,7 +28753,7 @@ Fetch a data URL (RFC 2397).
 
 ;;;***
 \f
-;;;### (autoloads nil "url-ns" "url/url-ns.el" (21291 53104 431149
+;;;### (autoloads nil "url-ns" "url/url-ns.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from url/url-ns.el
 
@@ -29079,8 +28794,8 @@ Fetch a data URL (RFC 2397).
 
 ;;;***
 \f
-;;;### (autoloads nil "url-parse" "url/url-parse.el" (21346 62196
-;;;;;;  327729 0))
+;;;### (autoloads nil "url-parse" "url/url-parse.el" (21350 58112
+;;;;;;  380040 0))
 ;;; Generated autoloads from url/url-parse.el
 
 (autoload 'url-recreate-url "url-parse" "\
@@ -29131,8 +28846,8 @@ parses to
 
 ;;;***
 \f
-;;;### (autoloads nil "url-privacy" "url/url-privacy.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "url-privacy" "url/url-privacy.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from url/url-privacy.el
 
 (autoload 'url-setup-privacy-info "url-privacy" "\
@@ -29142,8 +28857,8 @@ Setup variables that expose info about you and your system.
 
 ;;;***
 \f
-;;;### (autoloads nil "url-queue" "url/url-queue.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "url-queue" "url/url-queue.el" (21193 16180
+;;;;;;  875828 0))
 ;;; Generated autoloads from url/url-queue.el
 
 (autoload 'url-queue-retrieve "url-queue" "\
@@ -29157,7 +28872,26 @@ The variable `url-queue-timeout' sets a timeout.
 
 ;;;***
 \f
-;;;### (autoloads nil "url-util" "url/url-util.el" (21291 53104 431149
+;;;### (autoloads nil "url-tramp" "url/url-tramp.el" (21546 33576
+;;;;;;  601815 0))
+;;; Generated autoloads from url/url-tramp.el
+
+(defvar url-tramp-protocols '("ftp" "ssh" "scp" "rsync" "telnet") "\
+List of URL protocols the work is handled by Tramp.
+They must also be covered by `url-handler-regexp'.")
+
+(custom-autoload 'url-tramp-protocols "url-tramp" t)
+
+(autoload 'url-tramp-file-handler "url-tramp" "\
+Function called from the `file-name-handler-alist' routines.
+OPERATION is what needs to be done.  ARGS are the arguments that
+would have been passed to OPERATION.
+
+\(fn OPERATION &rest ARGS)" nil nil)
+
+;;;***
+\f
+;;;### (autoloads nil "url-util" "url/url-util.el" (21364 37926 837230
 ;;;;;;  0))
 ;;; Generated autoloads from url/url-util.el
 
@@ -29326,8 +29060,8 @@ This uses `url-current-object', set locally to the buffer.
 
 ;;;***
 \f
-;;;### (autoloads nil "userlock" "userlock.el" (21291 53104 431149
-;;;;;;  0))
+;;;### (autoloads nil "userlock" "userlock.el" (21260 57764 872288
+;;;;;;  374000))
 ;;; Generated autoloads from userlock.el
 
 (autoload 'ask-user-about-lock "userlock" "\
@@ -29355,8 +29089,8 @@ The buffer in question is current when this function is called.
 
 ;;;***
 \f
-;;;### (autoloads nil "utf-7" "international/utf-7.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "utf-7" "international/utf-7.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from international/utf-7.el
 
 (autoload 'utf-7-post-read-conversion "utf-7" "\
@@ -29381,7 +29115,7 @@ The buffer in question is current when this function is called.
 
 ;;;***
 \f
-;;;### (autoloads nil "utf7" "gnus/utf7.el" (21291 53104 431149 0))
+;;;### (autoloads nil "utf7" "gnus/utf7.el" (21187 63826 213216 0))
 ;;; Generated autoloads from gnus/utf7.el
 
 (autoload 'utf7-encode "utf7" "\
@@ -29391,8 +29125,8 @@ Encode UTF-7 STRING.  Use IMAP modification if FOR-IMAP is non-nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "uudecode" "mail/uudecode.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "uudecode" "mail/uudecode.el" (21187 63826
+;;;;;;  213216 0))
 ;;; Generated autoloads from mail/uudecode.el
 
 (autoload 'uudecode-decode-region-external "uudecode" "\
@@ -29416,7 +29150,7 @@ If FILE-NAME is non-nil, save the result to FILE-NAME.
 
 ;;;***
 \f
-;;;### (autoloads nil "vc" "vc/vc.el" (21291 53104 431149 0))
+;;;### (autoloads nil "vc" "vc/vc.el" (21332 61483 90708 0))
 ;;; Generated autoloads from vc/vc.el
 
 (defvar vc-checkout-hook nil "\
@@ -29524,6 +29258,12 @@ saving the buffer.
 
 \(fn HISTORIC &optional NOT-URGENT)" t nil)
 
+(autoload 'vc-root-dir "vc" "\
+Return the root directory for the current VC tree.
+Return nil if the root directory cannot be identified.
+
+\(fn)" nil nil)
+
 (autoload 'vc-revision-other-window "vc" "\
 Visit revision REV of the current file in another window.
 If the current file is named `F', the revision is named `F.~REV~'.
@@ -29697,8 +29437,8 @@ Return the branch part of a revision number REV.
 
 ;;;***
 \f
-;;;### (autoloads nil "vc-annotate" "vc/vc-annotate.el" (21291 53104
-;;;;;;  431149 0))
+;;;### (autoloads nil "vc-annotate" "vc/vc-annotate.el" (21546 33576
+;;;;;;  601815 0))
 ;;; Generated autoloads from vc/vc-annotate.el
 
 (autoload 'vc-annotate "vc-annotate" "\
@@ -29730,12 +29470,14 @@ Customization variables:
 mode-specific menu.  `vc-annotate-color-map' and
 `vc-annotate-very-old-color' define the mapping of time to colors.
 `vc-annotate-background' specifies the background color.
+`vc-annotate-background-mode' specifies whether the color map
+should be applied to the background or to the foreground.
 
 \(fn FILE REV &optional DISPLAY-MODE BUF MOVE-POINT-TO VC-BK)" t nil)
 
 ;;;***
 \f
-;;;### (autoloads nil "vc-arch" "vc/vc-arch.el" (21291 53104 431149
+;;;### (autoloads nil "vc-arch" "vc/vc-arch.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from vc/vc-arch.el
  (defun vc-arch-registered (file)
@@ -29746,7 +29488,7 @@ mode-specific menu.  `vc-annotate-color-map' and
 
 ;;;***
 \f
-;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (21291 53104 431149
+;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (21452 59559 901066
 ;;;;;;  0))
 ;;; Generated autoloads from vc/vc-bzr.el
 
@@ -29763,7 +29505,7 @@ Name of the format file in a .bzr directory.")
 
 ;;;***
 \f
-;;;### (autoloads nil "vc-cvs" "vc/vc-cvs.el" (21291 53104 431149
+;;;### (autoloads nil "vc-cvs" "vc/vc-cvs.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from vc/vc-cvs.el
 (defun vc-cvs-registered (f)
@@ -29775,7 +29517,7 @@ Name of the format file in a .bzr directory.")
 
 ;;;***
 \f
-;;;### (autoloads nil "vc-dir" "vc/vc-dir.el" (21515 41273 793570
+;;;### (autoloads nil "vc-dir" "vc/vc-dir.el" (21517 33344 974987
 ;;;;;;  0))
 ;;; Generated autoloads from vc/vc-dir.el
 
@@ -29800,8 +29542,8 @@ These are the commands available for use in the file status buffer:
 
 ;;;***
 \f
-;;;### (autoloads nil "vc-dispatcher" "vc/vc-dispatcher.el" (21445
-;;;;;;  65296 677138 0))
+;;;### (autoloads nil "vc-dispatcher" "vc/vc-dispatcher.el" (21446
+;;;;;;  45134 152348 0))
 ;;; Generated autoloads from vc/vc-dispatcher.el
 
 (autoload 'vc-do-command "vc-dispatcher" "\
@@ -29824,7 +29566,7 @@ case, and the process object in the asynchronous case.
 
 ;;;***
 \f
-;;;### (autoloads nil "vc-git" "vc/vc-git.el" (21426 23582 506828
+;;;### (autoloads nil "vc-git" "vc/vc-git.el" (21513 36261 278490
 ;;;;;;  0))
 ;;; Generated autoloads from vc/vc-git.el
  (defun vc-git-registered (file)
@@ -29836,7 +29578,7 @@ case, and the process object in the asynchronous case.
 
 ;;;***
 \f
-;;;### (autoloads nil "vc-hg" "vc/vc-hg.el" (21393 64365 929177 0))
+;;;### (autoloads nil "vc-hg" "vc/vc-hg.el" (21396 14374 24888 0))
 ;;; Generated autoloads from vc/vc-hg.el
  (defun vc-hg-registered (file)
   "Return non-nil if FILE is registered with hg."
@@ -29847,7 +29589,7 @@ case, and the process object in the asynchronous case.
 
 ;;;***
 \f
-;;;### (autoloads nil "vc-mtn" "vc/vc-mtn.el" (21291 53104 431149
+;;;### (autoloads nil "vc-mtn" "vc/vc-mtn.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from vc/vc-mtn.el
 
@@ -29864,7 +29606,7 @@ Name of the monotone directory's format file.")
 
 ;;;***
 \f
-;;;### (autoloads nil "vc-rcs" "vc/vc-rcs.el" (21371 31054 820435
+;;;### (autoloads nil "vc-rcs" "vc/vc-rcs.el" (21379 5287 607434
 ;;;;;;  0))
 ;;; Generated autoloads from vc/vc-rcs.el
 
@@ -29878,7 +29620,7 @@ For a description of possible values, see `vc-check-master-templates'.")
 
 ;;;***
 \f
-;;;### (autoloads nil "vc-sccs" "vc/vc-sccs.el" (21291 53104 431149
+;;;### (autoloads nil "vc-sccs" "vc/vc-sccs.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from vc/vc-sccs.el
 
@@ -29897,7 +29639,7 @@ find any project directory." (let ((project-dir (getenv "PROJECTDIR")) dirs dir)
 
 ;;;***
 \f
-;;;### (autoloads nil "vc-svn" "vc/vc-svn.el" (21291 53104 431149
+;;;### (autoloads nil "vc-svn" "vc/vc-svn.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from vc/vc-svn.el
  (defun vc-svn-registered (f)
@@ -29911,8 +29653,8 @@ find any project directory." (let ((project-dir (getenv "PROJECTDIR")) dirs dir)
 
 ;;;***
 \f
-;;;### (autoloads nil "vera-mode" "progmodes/vera-mode.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "vera-mode" "progmodes/vera-mode.el" (21546
+;;;;;;  33576 601815 0))
 ;;; Generated autoloads from progmodes/vera-mode.el
 (push (purecopy '(vera-mode 2 28)) package--builtin-versions)
  (add-to-list 'auto-mode-alist (cons (purecopy "\\.vr[hi]?\\'")  'vera-mode))
@@ -29971,7 +29713,7 @@ Key bindings:
 ;;;***
 \f
 ;;;### (autoloads nil "verilog-mode" "progmodes/verilog-mode.el"
-;;;;;;  (21346 62196 327729 0))
+;;;;;;  (21546 33576 601815 0))
 ;;; Generated autoloads from progmodes/verilog-mode.el
 
 (autoload 'verilog-mode "verilog-mode" "\
@@ -30110,8 +29852,8 @@ Key bindings specific to `verilog-mode-map' are:
 
 ;;;***
 \f
-;;;### (autoloads nil "vhdl-mode" "progmodes/vhdl-mode.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "vhdl-mode" "progmodes/vhdl-mode.el" (21305
+;;;;;;  16557 836987 0))
 ;;; Generated autoloads from progmodes/vhdl-mode.el
 
 (autoload 'vhdl-mode "vhdl-mode" "\
@@ -30665,61 +30407,8 @@ Key bindings:
 
 ;;;***
 \f
-;;;### (autoloads nil "vi" "emulation/vi.el" (21291 53104 431149
-;;;;;;  0))
-;;; Generated autoloads from emulation/vi.el
-
-(autoload 'vi-mode "vi" "\
-Major mode that acts like the `vi' editor.
-The purpose of this mode is to provide you the combined power of vi (namely,
-the \"cross product\" effect of commands and repeat last changes) and Emacs.
-
-This command redefines nearly all keys to look like vi commands.
-It records the previous major mode, and any vi command for input
-\(`i', `a', `s', etc.) switches back to that mode.
-Thus, ordinary Emacs (in whatever major mode you had been using)
-is \"input\" mode as far as vi is concerned.
-
-To get back into vi from \"input\" mode, you must issue this command again.
-Therefore, it is recommended that you assign it to a key.
-
-Major differences between this mode and real vi :
-
-* Limitations and unsupported features
-  - Search patterns with line offset (e.g. /pat/+3 or /pat/z.) are
-    not supported.
-  - Ex commands are not implemented; try ':' to get some hints.
-  - No line undo (i.e. the 'U' command), but multi-undo is a standard feature.
-
-* Modifications
-  - The stopping positions for some point motion commands (word boundary,
-    pattern search) are slightly different from standard 'vi'.
-    Also, no automatic wrap around at end of buffer for pattern searching.
-  - Since changes are done in two steps (deletion then insertion), you need
-    to undo twice to completely undo a change command.  But this is not needed
-    for undoing a repeated change command.
-  - No need to set/unset 'magic', to search for a string with regular expr
-    in it just put a prefix arg for the search commands.  Replace cmds too.
-  - ^R is bound to incremental backward search, so use ^L to redraw screen.
-
-* Extensions
-  - Some standard (or modified) Emacs commands were integrated, such as
-    incremental search, query replace, transpose objects, and keyboard macros.
-  - In command state, ^X links to the 'ctl-x-map', and ESC can be linked to
-    esc-map or set undefined.  These can give you the full power of Emacs.
-  - See vi-com-map for those keys that are extensions to standard vi, e.g.
-    `vi-name-last-change-or-macro', `vi-verify-spelling', `vi-locate-def',
-    `vi-mark-region', and 'vi-quote-words'.  Some of them are quite handy.
-  - Use \\[vi-switch-mode] to switch among different modes quickly.
-
-Syntax table and abbrevs while in vi mode remain as they were in Emacs.
-
-\(fn)" t nil)
-
-;;;***
-\f
-;;;### (autoloads nil "viet-util" "language/viet-util.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "viet-util" "language/viet-util.el" (21187
+;;;;;;  63826 213216 0))
 ;;; Generated autoloads from language/viet-util.el
 
 (autoload 'viet-encode-viscii-char "viet-util" "\
@@ -30763,7 +30452,7 @@ Convert Vietnamese characters of the current buffer to `VIQR' mnemonics.
 
 ;;;***
 \f
-;;;### (autoloads nil "view" "view.el" (21452 38973 331081 127000))
+;;;### (autoloads nil "view" "view.el" (21452 59559 901066 0))
 ;;; Generated autoloads from view.el
 
 (defvar view-remove-frame-by-deleting t "\
@@ -31019,24 +30708,8 @@ Exit View mode and make the current buffer editable.
 
 ;;;***
 \f
-;;;### (autoloads nil "vip" "emulation/vip.el" (21291 53104 431149
+;;;### (autoloads nil "viper" "emulation/viper.el" (21429 11690 49391
 ;;;;;;  0))
-;;; Generated autoloads from emulation/vip.el
-
-(autoload 'vip-setup "vip" "\
-Set up bindings for C-x 7 and C-z that are useful for VIP users.
-
-\(fn)" nil nil)
-
-(autoload 'vip-mode "vip" "\
-Turn on VIP emulation of VI.
-
-\(fn)" t nil)
-
-;;;***
-\f
-;;;### (autoloads nil "viper" "emulation/viper.el" (21423 31086 21820
-;;;;;;  199000))
 ;;; Generated autoloads from emulation/viper.el
 (push (purecopy '(viper 3 14 1)) package--builtin-versions)
 
@@ -31053,8 +30726,8 @@ Turn on Viper emulation of Vi in Emacs. See Info node `(viper)Top'.
 
 ;;;***
 \f
-;;;### (autoloads nil "warnings" "emacs-lisp/warnings.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "warnings" "emacs-lisp/warnings.el" (21240
+;;;;;;  46395 727291 0))
 ;;; Generated autoloads from emacs-lisp/warnings.el
 
 (defvar warning-prefix-function nil "\
@@ -31144,7 +30817,7 @@ this is equivalent to `display-warning', using
 
 ;;;***
 \f
-;;;### (autoloads nil "wdired" "wdired.el" (21291 53104 431149 0))
+;;;### (autoloads nil "wdired" "wdired.el" (21187 63826 213216 0))
 ;;; Generated autoloads from wdired.el
 (push (purecopy '(wdired 2 0)) package--builtin-versions)
 
@@ -31162,7 +30835,7 @@ See `wdired-mode'.
 
 ;;;***
 \f
-;;;### (autoloads nil "webjump" "net/webjump.el" (21291 53104 431149
+;;;### (autoloads nil "webjump" "net/webjump.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from net/webjump.el
 
@@ -31179,8 +30852,8 @@ Please submit bug reports and other feedback to the author, Neil W. Van Dyke
 
 ;;;***
 \f
-;;;### (autoloads nil "which-func" "progmodes/which-func.el" (21291
-;;;;;;  53104 431149 0))
+;;;### (autoloads nil "which-func" "progmodes/which-func.el" (21511
+;;;;;;  46035 786880 0))
 ;;; Generated autoloads from progmodes/which-func.el
  (put 'which-func-format 'risky-local-variable t)
  (put 'which-func-current 'risky-local-variable t)
@@ -31210,7 +30883,7 @@ in certain major modes.
 
 ;;;***
 \f
-;;;### (autoloads nil "whitespace" "whitespace.el" (21291 53104 431149
+;;;### (autoloads nil "whitespace" "whitespace.el" (21384 23211 329821
 ;;;;;;  0))
 ;;; Generated autoloads from whitespace.el
 (push (purecopy '(whitespace 13 2 2)) package--builtin-versions)
@@ -31525,43 +31198,7 @@ documentation.
 (autoload 'whitespace-report "whitespace" "\
 Report some whitespace problems in buffer.
 
-Return nil if there is no whitespace problem; otherwise, return
-non-nil.
-
-If FORCE is non-nil or \\[universal-argument] was pressed just
-before calling `whitespace-report' interactively, it forces
-`whitespace-style' to have:
-
-   empty
-   trailing
-   indentation
-   space-before-tab
-   space-after-tab
-
-If REPORT-IF-BOGUS is non-nil, it reports only when there are any
-whitespace problems in buffer.
-
-Report if some of the following whitespace problems exist:
-
-* If `indent-tabs-mode' is non-nil:
-   empty               1. empty lines at beginning of buffer.
-   empty               2. empty lines at end of buffer.
-   trailing            3. SPACEs or TABs at end of line.
-   indentation         4. 8 or more SPACEs at beginning of line.
-   space-before-tab    5. SPACEs before TAB.
-   space-after-tab     6. 8 or more SPACEs after TAB.
-
-* If `indent-tabs-mode' is nil:
-   empty               1. empty lines at beginning of buffer.
-   empty               2. empty lines at end of buffer.
-   trailing            3. SPACEs or TABs at end of line.
-   indentation         4. TABS at beginning of line.
-   space-before-tab    5. SPACEs before TAB.
-   space-after-tab     6. 8 or more SPACEs after TAB.
-
-See `whitespace-style' for documentation.
-See also `whitespace-cleanup' and `whitespace-cleanup-region' for
-cleaning up these problems.
+Perform `whitespace-report-region' on the current buffer.
 
 \(fn &optional FORCE REPORT-IF-BOGUS)" t nil)
 
@@ -31576,13 +31213,14 @@ before calling `whitespace-report-region' interactively, it
 forces `whitespace-style' to have:
 
    empty
+   trailing
    indentation
    space-before-tab
-   trailing
    space-after-tab
 
-If REPORT-IF-BOGUS is non-nil, it reports only when there are any
-whitespace problems in buffer.
+If REPORT-IF-BOGUS is t, it reports only when there are any
+whitespace problems in buffer; if it is `never', it does not
+report problems.
 
 Report if some of the following whitespace problems exist:
 
@@ -31610,7 +31248,7 @@ cleaning up these problems.
 
 ;;;***
 \f
-;;;### (autoloads nil "wid-browse" "wid-browse.el" (21291 53104 431149
+;;;### (autoloads nil "wid-browse" "wid-browse.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from wid-browse.el
 
@@ -31639,7 +31277,7 @@ if ARG is omitted or nil.
 
 ;;;***
 \f
-;;;### (autoloads nil "wid-edit" "wid-edit.el" (21291 53104 431149
+;;;### (autoloads nil "wid-edit" "wid-edit.el" (21414 44327 790846
 ;;;;;;  0))
 ;;; Generated autoloads from wid-edit.el
 
@@ -31682,7 +31320,7 @@ Setup current buffer so editing string widgets works.
 
 ;;;***
 \f
-;;;### (autoloads nil "windmove" "windmove.el" (21291 53104 431149
+;;;### (autoloads nil "windmove" "windmove.el" (21187 63826 213216
 ;;;;;;  0))
 ;;; Generated autoloads from windmove.el
 
@@ -31735,7 +31373,7 @@ Default MODIFIER is 'shift.
 
 ;;;***
 \f
-;;;### (autoloads nil "winner" "winner.el" (21291 53104 431149 0))
+;;;### (autoloads nil "winner" "winner.el" (21187 63826 213216 0))
 ;;; Generated autoloads from winner.el
 
 (defvar winner-mode nil "\
@@ -31758,7 +31396,7 @@ the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'.
 
 ;;;***
 \f
-;;;### (autoloads nil "woman" "woman.el" (21291 53104 431149 0))
+;;;### (autoloads nil "woman" "woman.el" (21393 38187 675040 0))
 ;;; Generated autoloads from woman.el
 (push (purecopy '(woman 0 551)) package--builtin-versions)
 
@@ -31807,29 +31445,7 @@ Default bookmark handler for Woman buffers.
 
 ;;;***
 \f
-;;;### (autoloads nil "ws-mode" "emulation/ws-mode.el" (21291 53104
-;;;;;;  431149 0))
-;;; Generated autoloads from emulation/ws-mode.el
-(push (purecopy '(ws-mode 0 7)) package--builtin-versions)
-
-(autoload 'wordstar-mode "ws-mode" "\
-Major mode with WordStar-like key bindings.
-
-BUGS:
- - Help menus with WordStar commands (C-j just calls help-for-help)
-   are not implemented
- - Options for search and replace
- - Show markers (C-k h) is somewhat strange
- - Search and replace (C-q a) is only available in forward direction
-
-No key bindings beginning with ESC are installed, they will work
-Emacs-like.
-
-\(fn)" t nil)
-
-;;;***
-\f
-;;;### (autoloads nil "xml" "xml.el" (21291 53104 431149 0))
+;;;### (autoloads nil "xml" "xml.el" (21187 63826 213216 0))
 ;;; Generated autoloads from xml.el
 
 (autoload 'xml-parse-file "xml" "\
@@ -31885,7 +31501,7 @@ Both features can be combined by providing a cons cell
 
 ;;;***
 \f
-;;;### (autoloads nil "xmltok" "nxml/xmltok.el" (21341 23900 988149
+;;;### (autoloads nil "xmltok" "nxml/xmltok.el" (21327 43559 923043
 ;;;;;;  0))
 ;;; Generated autoloads from nxml/xmltok.el
 
@@ -31904,7 +31520,7 @@ If LIMIT is non-nil, then do not consider characters beyond LIMIT.
 
 ;;;***
 \f
-;;;### (autoloads nil "xt-mouse" "xt-mouse.el" (21410 64156 350465
+;;;### (autoloads nil "xt-mouse" "xt-mouse.el" (21451 38694 880517
 ;;;;;;  0))
 ;;; Generated autoloads from xt-mouse.el
 
@@ -31934,7 +31550,7 @@ down the SHIFT key while pressing the mouse button.
 
 ;;;***
 \f
-;;;### (autoloads nil "yenc" "gnus/yenc.el" (21291 53104 431149 0))
+;;;### (autoloads nil "yenc" "gnus/yenc.el" (21187 63826 213216 0))
 ;;; Generated autoloads from gnus/yenc.el
 
 (autoload 'yenc-decode-region "yenc" "\
@@ -31949,7 +31565,7 @@ Extract file name from an yenc header.
 
 ;;;***
 \f
-;;;### (autoloads nil "zone" "play/zone.el" (21291 53104 431149 0))
+;;;### (autoloads nil "zone" "play/zone.el" (21187 63826 213216 0))
 ;;; Generated autoloads from play/zone.el
 
 (autoload 'zone "zone" "\
@@ -31965,45 +31581,44 @@ Zone out, completely.
 ;;;;;;  "calc/calc-fin.el" "calc/calc-forms.el" "calc/calc-frac.el"
 ;;;;;;  "calc/calc-funcs.el" "calc/calc-graph.el" "calc/calc-help.el"
 ;;;;;;  "calc/calc-incom.el" "calc/calc-keypd.el" "calc/calc-lang.el"
-;;;;;;  "calc/calc-macs.el" "calc/calc-map.el" "calc/calc-math.el"
-;;;;;;  "calc/calc-menu.el" "calc/calc-misc.el" "calc/calc-mode.el"
-;;;;;;  "calc/calc-mtx.el" "calc/calc-nlfit.el" "calc/calc-poly.el"
-;;;;;;  "calc/calc-prog.el" "calc/calc-rewr.el" "calc/calc-rules.el"
-;;;;;;  "calc/calc-sel.el" "calc/calc-stat.el" "calc/calc-store.el"
-;;;;;;  "calc/calc-stuff.el" "calc/calc-trail.el" "calc/calc-units.el"
-;;;;;;  "calc/calc-vec.el" "calc/calc-yank.el" "calc/calcalg2.el"
-;;;;;;  "calc/calcalg3.el" "calc/calccomp.el" "calc/calcsel2.el"
-;;;;;;  "calendar/cal-bahai.el" "calendar/cal-coptic.el" "calendar/cal-french.el"
-;;;;;;  "calendar/cal-html.el" "calendar/cal-islam.el" "calendar/cal-iso.el"
-;;;;;;  "calendar/cal-julian.el" "calendar/cal-loaddefs.el" "calendar/cal-mayan.el"
-;;;;;;  "calendar/cal-menu.el" "calendar/cal-move.el" "calendar/cal-persia.el"
-;;;;;;  "calendar/cal-tex.el" "calendar/cal-x.el" "calendar/diary-loaddefs.el"
-;;;;;;  "calendar/hol-loaddefs.el" "cdl.el" "cedet/cedet-cscope.el"
-;;;;;;  "cedet/cedet-files.el" "cedet/cedet-global.el" "cedet/cedet-idutils.el"
-;;;;;;  "cedet/ede/auto.el" "cedet/ede/autoconf-edit.el" "cedet/ede/base.el"
-;;;;;;  "cedet/ede/cpp-root.el" "cedet/ede/custom.el" "cedet/ede/dired.el"
-;;;;;;  "cedet/ede/emacs.el" "cedet/ede/files.el" "cedet/ede/generic.el"
-;;;;;;  "cedet/ede/linux.el" "cedet/ede/locate.el" "cedet/ede/make.el"
-;;;;;;  "cedet/ede/makefile-edit.el" "cedet/ede/pconf.el" "cedet/ede/pmake.el"
-;;;;;;  "cedet/ede/proj-archive.el" "cedet/ede/proj-aux.el" "cedet/ede/proj-comp.el"
-;;;;;;  "cedet/ede/proj-elisp.el" "cedet/ede/proj-info.el" "cedet/ede/proj-misc.el"
-;;;;;;  "cedet/ede/proj-obj.el" "cedet/ede/proj-prog.el" "cedet/ede/proj-scheme.el"
-;;;;;;  "cedet/ede/proj-shared.el" "cedet/ede/proj.el" "cedet/ede/project-am.el"
-;;;;;;  "cedet/ede/shell.el" "cedet/ede/simple.el" "cedet/ede/source.el"
-;;;;;;  "cedet/ede/speedbar.el" "cedet/ede/srecode.el" "cedet/ede/system.el"
-;;;;;;  "cedet/ede/util.el" "cedet/semantic/analyze.el" "cedet/semantic/analyze/complete.el"
+;;;;;;  "calc/calc-loaddefs.el" "calc/calc-macs.el" "calc/calc-map.el"
+;;;;;;  "calc/calc-math.el" "calc/calc-menu.el" "calc/calc-misc.el"
+;;;;;;  "calc/calc-mode.el" "calc/calc-mtx.el" "calc/calc-nlfit.el"
+;;;;;;  "calc/calc-poly.el" "calc/calc-prog.el" "calc/calc-rewr.el"
+;;;;;;  "calc/calc-rules.el" "calc/calc-sel.el" "calc/calc-stat.el"
+;;;;;;  "calc/calc-store.el" "calc/calc-stuff.el" "calc/calc-trail.el"
+;;;;;;  "calc/calc-units.el" "calc/calc-vec.el" "calc/calc-yank.el"
+;;;;;;  "calc/calcalg2.el" "calc/calcalg3.el" "calc/calccomp.el"
+;;;;;;  "calc/calcsel2.el" "calendar/cal-bahai.el" "calendar/cal-coptic.el"
+;;;;;;  "calendar/cal-french.el" "calendar/cal-html.el" "calendar/cal-islam.el"
+;;;;;;  "calendar/cal-iso.el" "calendar/cal-julian.el" "calendar/cal-loaddefs.el"
+;;;;;;  "calendar/cal-mayan.el" "calendar/cal-menu.el" "calendar/cal-move.el"
+;;;;;;  "calendar/cal-persia.el" "calendar/cal-tex.el" "calendar/cal-x.el"
+;;;;;;  "calendar/diary-loaddefs.el" "calendar/hol-loaddefs.el" "cdl.el"
+;;;;;;  "cedet/cedet-cscope.el" "cedet/cedet-files.el" "cedet/cedet-global.el"
+;;;;;;  "cedet/cedet-idutils.el" "cedet/ede/auto.el" "cedet/ede/autoconf-edit.el"
+;;;;;;  "cedet/ede/base.el" "cedet/ede/cpp-root.el" "cedet/ede/custom.el"
+;;;;;;  "cedet/ede/dired.el" "cedet/ede/emacs.el" "cedet/ede/files.el"
+;;;;;;  "cedet/ede/generic.el" "cedet/ede/linux.el" "cedet/ede/loaddefs.el"
+;;;;;;  "cedet/ede/locate.el" "cedet/ede/make.el" "cedet/ede/makefile-edit.el"
+;;;;;;  "cedet/ede/pconf.el" "cedet/ede/pmake.el" "cedet/ede/proj-archive.el"
+;;;;;;  "cedet/ede/proj-aux.el" "cedet/ede/proj-comp.el" "cedet/ede/proj-elisp.el"
+;;;;;;  "cedet/ede/proj-info.el" "cedet/ede/proj-misc.el" "cedet/ede/proj-obj.el"
+;;;;;;  "cedet/ede/proj-prog.el" "cedet/ede/proj-scheme.el" "cedet/ede/proj-shared.el"
+;;;;;;  "cedet/ede/proj.el" "cedet/ede/project-am.el" "cedet/ede/shell.el"
+;;;;;;  "cedet/ede/simple.el" "cedet/ede/source.el" "cedet/ede/speedbar.el"
+;;;;;;  "cedet/ede/srecode.el" "cedet/ede/system.el" "cedet/ede/util.el"
+;;;;;;  "cedet/semantic/analyze.el" "cedet/semantic/analyze/complete.el"
 ;;;;;;  "cedet/semantic/analyze/debug.el" "cedet/semantic/analyze/fcn.el"
 ;;;;;;  "cedet/semantic/analyze/refs.el" "cedet/semantic/bovine.el"
-;;;;;;  "cedet/semantic/bovine/c-by.el" "cedet/semantic/bovine/c.el"
-;;;;;;  "cedet/semantic/bovine/debug.el" "cedet/semantic/bovine/el.el"
-;;;;;;  "cedet/semantic/bovine/gcc.el" "cedet/semantic/bovine/make-by.el"
-;;;;;;  "cedet/semantic/bovine/make.el" "cedet/semantic/bovine/scm-by.el"
-;;;;;;  "cedet/semantic/bovine/scm.el" "cedet/semantic/chart.el"
-;;;;;;  "cedet/semantic/complete.el" "cedet/semantic/ctxt.el" "cedet/semantic/db-debug.el"
-;;;;;;  "cedet/semantic/db-ebrowse.el" "cedet/semantic/db-el.el"
-;;;;;;  "cedet/semantic/db-file.el" "cedet/semantic/db-find.el" "cedet/semantic/db-global.el"
-;;;;;;  "cedet/semantic/db-javascript.el" "cedet/semantic/db-mode.el"
-;;;;;;  "cedet/semantic/db-ref.el" "cedet/semantic/db-typecache.el"
+;;;;;;  "cedet/semantic/bovine/c.el" "cedet/semantic/bovine/debug.el"
+;;;;;;  "cedet/semantic/bovine/el.el" "cedet/semantic/bovine/gcc.el"
+;;;;;;  "cedet/semantic/bovine/make.el" "cedet/semantic/bovine/scm.el"
+;;;;;;  "cedet/semantic/chart.el" "cedet/semantic/complete.el" "cedet/semantic/ctxt.el"
+;;;;;;  "cedet/semantic/db-debug.el" "cedet/semantic/db-ebrowse.el"
+;;;;;;  "cedet/semantic/db-el.el" "cedet/semantic/db-file.el" "cedet/semantic/db-find.el"
+;;;;;;  "cedet/semantic/db-global.el" "cedet/semantic/db-javascript.el"
+;;;;;;  "cedet/semantic/db-mode.el" "cedet/semantic/db-ref.el" "cedet/semantic/db-typecache.el"
 ;;;;;;  "cedet/semantic/db.el" "cedet/semantic/debug.el" "cedet/semantic/decorate.el"
 ;;;;;;  "cedet/semantic/decorate/include.el" "cedet/semantic/decorate/mode.el"
 ;;;;;;  "cedet/semantic/dep.el" "cedet/semantic/doc.el" "cedet/semantic/ede-grammar.el"
@@ -32011,38 +31626,35 @@ Zone out, completely.
 ;;;;;;  "cedet/semantic/fw.el" "cedet/semantic/grammar-wy.el" "cedet/semantic/grammar.el"
 ;;;;;;  "cedet/semantic/html.el" "cedet/semantic/ia-sb.el" "cedet/semantic/ia.el"
 ;;;;;;  "cedet/semantic/idle.el" "cedet/semantic/imenu.el" "cedet/semantic/java.el"
-;;;;;;  "cedet/semantic/lex-spp.el" "cedet/semantic/lex.el" "cedet/semantic/mru-bookmark.el"
-;;;;;;  "cedet/semantic/sb.el" "cedet/semantic/scope.el" "cedet/semantic/senator.el"
-;;;;;;  "cedet/semantic/sort.el" "cedet/semantic/symref.el" "cedet/semantic/symref/cscope.el"
-;;;;;;  "cedet/semantic/symref/filter.el" "cedet/semantic/symref/global.el"
-;;;;;;  "cedet/semantic/symref/grep.el" "cedet/semantic/symref/idutils.el"
-;;;;;;  "cedet/semantic/symref/list.el" "cedet/semantic/tag-file.el"
-;;;;;;  "cedet/semantic/tag-ls.el" "cedet/semantic/tag-write.el"
+;;;;;;  "cedet/semantic/lex-spp.el" "cedet/semantic/lex.el" "cedet/semantic/loaddefs.el"
+;;;;;;  "cedet/semantic/mru-bookmark.el" "cedet/semantic/sb.el" "cedet/semantic/scope.el"
+;;;;;;  "cedet/semantic/senator.el" "cedet/semantic/sort.el" "cedet/semantic/symref.el"
+;;;;;;  "cedet/semantic/symref/cscope.el" "cedet/semantic/symref/filter.el"
+;;;;;;  "cedet/semantic/symref/global.el" "cedet/semantic/symref/grep.el"
+;;;;;;  "cedet/semantic/symref/idutils.el" "cedet/semantic/symref/list.el"
+;;;;;;  "cedet/semantic/tag-file.el" "cedet/semantic/tag-ls.el" "cedet/semantic/tag-write.el"
 ;;;;;;  "cedet/semantic/tag.el" "cedet/semantic/texi.el" "cedet/semantic/util-modes.el"
 ;;;;;;  "cedet/semantic/util.el" "cedet/semantic/wisent.el" "cedet/semantic/wisent/comp.el"
 ;;;;;;  "cedet/semantic/wisent/java-tags.el" "cedet/semantic/wisent/javascript.el"
-;;;;;;  "cedet/semantic/wisent/javat-wy.el" "cedet/semantic/wisent/js-wy.el"
-;;;;;;  "cedet/semantic/wisent/python-wy.el" "cedet/semantic/wisent/python.el"
-;;;;;;  "cedet/semantic/wisent/wisent.el" "cedet/srecode/args.el"
-;;;;;;  "cedet/srecode/compile.el" "cedet/srecode/cpp.el" "cedet/srecode/ctxt.el"
-;;;;;;  "cedet/srecode/dictionary.el" "cedet/srecode/document.el"
+;;;;;;  "cedet/semantic/wisent/python.el" "cedet/semantic/wisent/wisent.el"
+;;;;;;  "cedet/srecode/args.el" "cedet/srecode/compile.el" "cedet/srecode/cpp.el"
+;;;;;;  "cedet/srecode/ctxt.el" "cedet/srecode/dictionary.el" "cedet/srecode/document.el"
 ;;;;;;  "cedet/srecode/el.el" "cedet/srecode/expandproto.el" "cedet/srecode/extract.el"
 ;;;;;;  "cedet/srecode/fields.el" "cedet/srecode/filters.el" "cedet/srecode/find.el"
 ;;;;;;  "cedet/srecode/getset.el" "cedet/srecode/insert.el" "cedet/srecode/java.el"
-;;;;;;  "cedet/srecode/map.el" "cedet/srecode/mode.el" "cedet/srecode/semantic.el"
-;;;;;;  "cedet/srecode/srt-wy.el" "cedet/srecode/srt.el" "cedet/srecode/table.el"
+;;;;;;  "cedet/srecode/loaddefs.el" "cedet/srecode/map.el" "cedet/srecode/mode.el"
+;;;;;;  "cedet/srecode/semantic.el" "cedet/srecode/srt.el" "cedet/srecode/table.el"
 ;;;;;;  "cedet/srecode/template.el" "cedet/srecode/texi.el" "cus-dep.el"
 ;;;;;;  "dframe.el" "dired-aux.el" "dired-x.el" "dos-fns.el" "dos-vars.el"
-;;;;;;  "dos-w32.el" "dynamic-setting.el" "emacs-lisp/authors.el"
-;;;;;;  "emacs-lisp/avl-tree.el" "emacs-lisp/bindat.el" "emacs-lisp/byte-opt.el"
-;;;;;;  "emacs-lisp/cl-extra.el" "emacs-lisp/cl-macs.el" "emacs-lisp/cl-seq.el"
+;;;;;;  "dos-w32.el" "dynamic-setting.el" "emacs-lisp/avl-tree.el"
+;;;;;;  "emacs-lisp/bindat.el" "emacs-lisp/byte-opt.el" "emacs-lisp/cl-extra.el"
+;;;;;;  "emacs-lisp/cl-loaddefs.el" "emacs-lisp/cl-macs.el" "emacs-lisp/cl-seq.el"
 ;;;;;;  "emacs-lisp/cl.el" "emacs-lisp/eieio-base.el" "emacs-lisp/eieio-custom.el"
 ;;;;;;  "emacs-lisp/eieio-datadebug.el" "emacs-lisp/eieio-opt.el"
-;;;;;;  "emacs-lisp/eieio-speedbar.el" "emacs-lisp/gulp.el" "emacs-lisp/lisp-mnt.el"
-;;;;;;  "emacs-lisp/package-x.el" "emacs-lisp/smie.el" "emacs-lisp/subr-x.el"
-;;;;;;  "emacs-lisp/tcover-ses.el" "emacs-lisp/tcover-unsafep.el"
-;;;;;;  "emulation/cua-gmrk.el" "emulation/edt-lk201.el" "emulation/edt-mapper.el"
-;;;;;;  "emulation/edt-pc.el" "emulation/edt-vt100.el" "emulation/tpu-extras.el"
+;;;;;;  "emacs-lisp/eieio-speedbar.el" "emacs-lisp/lisp-mnt.el" "emacs-lisp/package-x.el"
+;;;;;;  "emacs-lisp/smie.el" "emacs-lisp/subr-x.el" "emacs-lisp/tcover-ses.el"
+;;;;;;  "emacs-lisp/tcover-unsafep.el" "emulation/cua-gmrk.el" "emulation/edt-lk201.el"
+;;;;;;  "emulation/edt-mapper.el" "emulation/edt-pc.el" "emulation/edt-vt100.el"
 ;;;;;;  "emulation/viper-cmd.el" "emulation/viper-ex.el" "emulation/viper-init.el"
 ;;;;;;  "emulation/viper-keym.el" "emulation/viper-macs.el" "emulation/viper-mous.el"
 ;;;;;;  "emulation/viper-util.el" "erc/erc-backend.el" "erc/erc-goodies.el"
@@ -32053,56 +31665,49 @@ Zone out, completely.
 ;;;;;;  "eshell/em-rebind.el" "eshell/em-script.el" "eshell/em-smart.el"
 ;;;;;;  "eshell/em-term.el" "eshell/em-tramp.el" "eshell/em-unix.el"
 ;;;;;;  "eshell/em-xtra.el" "eshell/esh-arg.el" "eshell/esh-cmd.el"
-;;;;;;  "eshell/esh-ext.el" "eshell/esh-io.el" "eshell/esh-module.el"
-;;;;;;  "eshell/esh-opt.el" "eshell/esh-proc.el" "eshell/esh-util.el"
-;;;;;;  "eshell/esh-var.el" "ezimage.el" "format-spec.el" "fringe.el"
-;;;;;;  "generic-x.el" "gnus/compface.el" "gnus/gnus-async.el" "gnus/gnus-bcklg.el"
-;;;;;;  "gnus/gnus-cite.el" "gnus/gnus-cus.el" "gnus/gnus-demon.el"
-;;;;;;  "gnus/gnus-dup.el" "gnus/gnus-eform.el" "gnus/gnus-ems.el"
-;;;;;;  "gnus/gnus-icalendar.el" "gnus/gnus-int.el" "gnus/gnus-logic.el"
-;;;;;;  "gnus/gnus-mh.el" "gnus/gnus-salt.el" "gnus/gnus-score.el"
-;;;;;;  "gnus/gnus-setup.el" "gnus/gnus-srvr.el" "gnus/gnus-topic.el"
-;;;;;;  "gnus/gnus-undo.el" "gnus/gnus-util.el" "gnus/gnus-uu.el"
-;;;;;;  "gnus/gnus-vm.el" "gnus/gssapi.el" "gnus/ietf-drums.el" "gnus/legacy-gnus-agent.el"
-;;;;;;  "gnus/mail-parse.el" "gnus/mail-prsvr.el" "gnus/mail-source.el"
-;;;;;;  "gnus/mailcap.el" "gnus/messcompat.el" "gnus/mm-archive.el"
-;;;;;;  "gnus/mm-bodies.el" "gnus/mm-decode.el" "gnus/mm-util.el"
-;;;;;;  "gnus/mm-view.el" "gnus/mml-sec.el" "gnus/mml-smime.el" "gnus/nnagent.el"
-;;;;;;  "gnus/nnbabyl.el" "gnus/nndir.el" "gnus/nndraft.el" "gnus/nneething.el"
-;;;;;;  "gnus/nngateway.el" "gnus/nnheader.el" "gnus/nnimap.el" "gnus/nnir.el"
-;;;;;;  "gnus/nnmail.el" "gnus/nnmaildir.el" "gnus/nnmairix.el" "gnus/nnmbox.el"
-;;;;;;  "gnus/nnmh.el" "gnus/nnnil.el" "gnus/nnoo.el" "gnus/nnregistry.el"
-;;;;;;  "gnus/nnrss.el" "gnus/nnspool.el" "gnus/nntp.el" "gnus/nnvirtual.el"
-;;;;;;  "gnus/nnweb.el" "gnus/registry.el" "gnus/rfc1843.el" "gnus/rfc2045.el"
-;;;;;;  "gnus/rfc2047.el" "gnus/rfc2104.el" "gnus/rfc2231.el" "gnus/rtree.el"
-;;;;;;  "gnus/sieve-manage.el" "gnus/smime.el" "gnus/spam-stat.el"
-;;;;;;  "gnus/spam-wash.el" "hex-util.el" "hfy-cmap.el" "ibuf-ext.el"
-;;;;;;  "international/cp51932.el" "international/eucjp-ms.el" "international/fontset.el"
-;;;;;;  "international/iso-ascii.el" "international/ja-dic-cnv.el"
-;;;;;;  "international/ja-dic-utl.el" "international/ogonek.el" "international/uni-bidi.el"
-;;;;;;  "international/uni-category.el" "international/uni-combining.el"
-;;;;;;  "international/uni-comment.el" "international/uni-decimal.el"
-;;;;;;  "international/uni-decomposition.el" "international/uni-digit.el"
-;;;;;;  "international/uni-lowercase.el" "international/uni-mirrored.el"
-;;;;;;  "international/uni-name.el" "international/uni-numeric.el"
-;;;;;;  "international/uni-old-name.el" "international/uni-titlecase.el"
-;;;;;;  "international/uni-uppercase.el" "kermit.el" "language/hanja-util.el"
-;;;;;;  "language/thai-word.el" "ldefs-boot.el" "leim/ja-dic/ja-dic.el"
-;;;;;;  "leim/quail/4Corner.el" "leim/quail/arabic.el" "leim/quail/croatian.el"
-;;;;;;  "leim/quail/cyril-jis.el" "leim/quail/cyrillic.el" "leim/quail/czech.el"
-;;;;;;  "leim/quail/ethiopic.el" "leim/quail/georgian.el" "leim/quail/greek.el"
-;;;;;;  "leim/quail/hanja-jis.el" "leim/quail/hanja.el" "leim/quail/hanja3.el"
-;;;;;;  "leim/quail/hebrew.el" "leim/quail/indian.el" "leim/quail/ipa-praat.el"
-;;;;;;  "leim/quail/ipa.el" "leim/quail/japanese.el" "leim/quail/lao.el"
-;;;;;;  "leim/quail/latin-alt.el" "leim/quail/latin-ltx.el" "leim/quail/latin-post.el"
-;;;;;;  "leim/quail/latin-pre.el" "leim/quail/lrt.el" "leim/quail/persian.el"
-;;;;;;  "leim/quail/py-punct.el" "leim/quail/pypunct-b5.el" "leim/quail/rfc1345.el"
-;;;;;;  "leim/quail/sgml-input.el" "leim/quail/sisheng.el" "leim/quail/slovak.el"
-;;;;;;  "leim/quail/symbol-ksc.el" "leim/quail/thai.el" "leim/quail/tibetan.el"
-;;;;;;  "leim/quail/viqr.el" "leim/quail/vntelex.el" "leim/quail/vnvni.el"
-;;;;;;  "leim/quail/welsh.el" "loadup.el" "mail/blessmail.el" "mail/mailheader.el"
-;;;;;;  "mail/mspools.el" "mail/rfc2368.el" "mail/rfc822.el" "mail/rmail-spam-filter.el"
-;;;;;;  "mail/rmailedit.el" "mail/rmailkwd.el" "mail/rmailmm.el"
+;;;;;;  "eshell/esh-ext.el" "eshell/esh-groups.el" "eshell/esh-io.el"
+;;;;;;  "eshell/esh-module.el" "eshell/esh-opt.el" "eshell/esh-proc.el"
+;;;;;;  "eshell/esh-util.el" "eshell/esh-var.el" "ezimage.el" "format-spec.el"
+;;;;;;  "fringe.el" "generic-x.el" "gnus/compface.el" "gnus/gnus-async.el"
+;;;;;;  "gnus/gnus-bcklg.el" "gnus/gnus-cite.el" "gnus/gnus-cloud.el"
+;;;;;;  "gnus/gnus-cus.el" "gnus/gnus-demon.el" "gnus/gnus-dup.el"
+;;;;;;  "gnus/gnus-eform.el" "gnus/gnus-ems.el" "gnus/gnus-icalendar.el"
+;;;;;;  "gnus/gnus-int.el" "gnus/gnus-logic.el" "gnus/gnus-mh.el"
+;;;;;;  "gnus/gnus-salt.el" "gnus/gnus-score.el" "gnus/gnus-srvr.el"
+;;;;;;  "gnus/gnus-topic.el" "gnus/gnus-undo.el" "gnus/gnus-util.el"
+;;;;;;  "gnus/gnus-uu.el" "gnus/gnus-vm.el" "gnus/gssapi.el" "gnus/ietf-drums.el"
+;;;;;;  "gnus/legacy-gnus-agent.el" "gnus/mail-parse.el" "gnus/mail-prsvr.el"
+;;;;;;  "gnus/mail-source.el" "gnus/mailcap.el" "gnus/messcompat.el"
+;;;;;;  "gnus/mm-archive.el" "gnus/mm-bodies.el" "gnus/mm-decode.el"
+;;;;;;  "gnus/mm-util.el" "gnus/mm-view.el" "gnus/mml-sec.el" "gnus/mml-smime.el"
+;;;;;;  "gnus/nnagent.el" "gnus/nnbabyl.el" "gnus/nndir.el" "gnus/nndraft.el"
+;;;;;;  "gnus/nneething.el" "gnus/nngateway.el" "gnus/nnheader.el"
+;;;;;;  "gnus/nnimap.el" "gnus/nnir.el" "gnus/nnmail.el" "gnus/nnmaildir.el"
+;;;;;;  "gnus/nnmairix.el" "gnus/nnmbox.el" "gnus/nnmh.el" "gnus/nnnil.el"
+;;;;;;  "gnus/nnoo.el" "gnus/nnregistry.el" "gnus/nnrss.el" "gnus/nnspool.el"
+;;;;;;  "gnus/nntp.el" "gnus/nnvirtual.el" "gnus/nnweb.el" "gnus/registry.el"
+;;;;;;  "gnus/rfc1843.el" "gnus/rfc2045.el" "gnus/rfc2047.el" "gnus/rfc2104.el"
+;;;;;;  "gnus/rfc2231.el" "gnus/rtree.el" "gnus/sieve-manage.el"
+;;;;;;  "gnus/smime.el" "gnus/spam-stat.el" "gnus/spam-wash.el" "hex-util.el"
+;;;;;;  "hfy-cmap.el" "ibuf-ext.el" "international/cp51932.el" "international/eucjp-ms.el"
+;;;;;;  "international/fontset.el" "international/iso-ascii.el" "international/ja-dic-cnv.el"
+;;;;;;  "international/ja-dic-utl.el" "international/ogonek.el" "kermit.el"
+;;;;;;  "language/hanja-util.el" "language/thai-word.el" "ldefs-boot.el"
+;;;;;;  "leim/quail/arabic.el" "leim/quail/croatian.el" "leim/quail/cyril-jis.el"
+;;;;;;  "leim/quail/cyrillic.el" "leim/quail/czech.el" "leim/quail/ethiopic.el"
+;;;;;;  "leim/quail/georgian.el" "leim/quail/greek.el" "leim/quail/hanja-jis.el"
+;;;;;;  "leim/quail/hanja.el" "leim/quail/hanja3.el" "leim/quail/hebrew.el"
+;;;;;;  "leim/quail/indian.el" "leim/quail/ipa-praat.el" "leim/quail/ipa.el"
+;;;;;;  "leim/quail/japanese.el" "leim/quail/lao.el" "leim/quail/latin-alt.el"
+;;;;;;  "leim/quail/latin-ltx.el" "leim/quail/latin-post.el" "leim/quail/latin-pre.el"
+;;;;;;  "leim/quail/lrt.el" "leim/quail/persian.el" "leim/quail/py-punct.el"
+;;;;;;  "leim/quail/pypunct-b5.el" "leim/quail/rfc1345.el" "leim/quail/sgml-input.el"
+;;;;;;  "leim/quail/sisheng.el" "leim/quail/slovak.el" "leim/quail/symbol-ksc.el"
+;;;;;;  "leim/quail/thai.el" "leim/quail/tibetan.el" "leim/quail/viqr.el"
+;;;;;;  "leim/quail/vntelex.el" "leim/quail/vnvni.el" "leim/quail/welsh.el"
+;;;;;;  "loadup.el" "mail/blessmail.el" "mail/mailheader.el" "mail/mspools.el"
+;;;;;;  "mail/rfc2368.el" "mail/rfc822.el" "mail/rmail-spam-filter.el"
+;;;;;;  "mail/rmail.el" "mail/rmailedit.el" "mail/rmailkwd.el" "mail/rmailmm.el"
 ;;;;;;  "mail/rmailmsc.el" "mail/rmailsort.el" "mail/rmailsum.el"
 ;;;;;;  "mail/undigest.el" "mh-e/mh-acros.el" "mh-e/mh-alias.el"
 ;;;;;;  "mh-e/mh-buffers.el" "mh-e/mh-compat.el" "mh-e/mh-funcs.el"
@@ -32111,49 +31716,66 @@ Zone out, completely.
 ;;;;;;  "mh-e/mh-loaddefs.el" "mh-e/mh-mime.el" "mh-e/mh-print.el"
 ;;;;;;  "mh-e/mh-scan.el" "mh-e/mh-search.el" "mh-e/mh-seq.el" "mh-e/mh-show.el"
 ;;;;;;  "mh-e/mh-speed.el" "mh-e/mh-thread.el" "mh-e/mh-tool-bar.el"
-;;;;;;  "mh-e/mh-utils.el" "mh-e/mh-xface.el" "mouse-copy.el" "mouse.el"
-;;;;;;  "mwheel.el" "net/dns.el" "net/eudc-vars.el" "net/eudcb-bbdb.el"
-;;;;;;  "net/eudcb-ldap.el" "net/eudcb-mab.el" "net/eudcb-ph.el"
-;;;;;;  "net/hmac-def.el" "net/hmac-md5.el" "net/imap.el" "net/ldap.el"
-;;;;;;  "net/mairix.el" "net/sasl-cram.el" "net/sasl-digest.el" "net/sasl.el"
-;;;;;;  "net/shr-color.el" "net/soap-client.el" "net/soap-inspect.el"
-;;;;;;  "net/socks.el" "net/tls.el" "net/tramp-adb.el" "net/tramp-cache.el"
-;;;;;;  "net/tramp-cmds.el" "net/tramp-compat.el" "net/tramp-gvfs.el"
-;;;;;;  "net/tramp-gw.el" "net/tramp-loaddefs.el" "net/tramp-sh.el"
-;;;;;;  "net/tramp-smb.el" "net/tramp-uu.el" "net/trampver.el" "net/zeroconf.el"
-;;;;;;  "notifications.el" "nxml/nxml-enc.el" "nxml/nxml-maint.el"
+;;;;;;  "mh-e/mh-utils.el" "mh-e/mh-xface.el" "mouse-copy.el" "mwheel.el"
+;;;;;;  "net/dns.el" "net/eudc-vars.el" "net/eudcb-bbdb.el" "net/eudcb-ldap.el"
+;;;;;;  "net/eudcb-mab.el" "net/eudcb-ph.el" "net/hmac-def.el" "net/hmac-md5.el"
+;;;;;;  "net/imap.el" "net/ldap.el" "net/mairix.el" "net/sasl-cram.el"
+;;;;;;  "net/sasl-digest.el" "net/sasl.el" "net/shr-color.el" "net/soap-client.el"
+;;;;;;  "net/soap-inspect.el" "net/socks.el" "net/tls.el" "net/tramp-adb.el"
+;;;;;;  "net/tramp-cache.el" "net/tramp-cmds.el" "net/tramp-compat.el"
+;;;;;;  "net/tramp-gvfs.el" "net/tramp-gw.el" "net/tramp-loaddefs.el"
+;;;;;;  "net/tramp-sh.el" "net/tramp-smb.el" "net/tramp-uu.el" "net/trampver.el"
+;;;;;;  "net/zeroconf.el" "notifications.el" "nxml/nxml-enc.el" "nxml/nxml-maint.el"
 ;;;;;;  "nxml/nxml-ns.el" "nxml/nxml-outln.el" "nxml/nxml-parse.el"
 ;;;;;;  "nxml/nxml-rap.el" "nxml/nxml-util.el" "nxml/rng-dt.el" "nxml/rng-loc.el"
 ;;;;;;  "nxml/rng-maint.el" "nxml/rng-match.el" "nxml/rng-parse.el"
 ;;;;;;  "nxml/rng-pttrn.el" "nxml/rng-uri.el" "nxml/rng-util.el"
-;;;;;;  "nxml/xsd-regexp.el" "org/ob-C.el" "org/ob-R.el" "org/ob-asymptote.el"
-;;;;;;  "org/ob-awk.el" "org/ob-calc.el" "org/ob-clojure.el" "org/ob-comint.el"
-;;;;;;  "org/ob-core.el" "org/ob-css.el" "org/ob-ditaa.el" "org/ob-dot.el"
-;;;;;;  "org/ob-emacs-lisp.el" "org/ob-eval.el" "org/ob-exp.el" "org/ob-fortran.el"
-;;;;;;  "org/ob-gnuplot.el" "org/ob-haskell.el" "org/ob-io.el" "org/ob-java.el"
-;;;;;;  "org/ob-js.el" "org/ob-keys.el" "org/ob-latex.el" "org/ob-ledger.el"
-;;;;;;  "org/ob-lilypond.el" "org/ob-lisp.el" "org/ob-lob.el" "org/ob-makefile.el"
-;;;;;;  "org/ob-matlab.el" "org/ob-maxima.el" "org/ob-mscgen.el"
-;;;;;;  "org/ob-ocaml.el" "org/ob-octave.el" "org/ob-org.el" "org/ob-perl.el"
-;;;;;;  "org/ob-picolisp.el" "org/ob-plantuml.el" "org/ob-python.el"
-;;;;;;  "org/ob-ref.el" "org/ob-ruby.el" "org/ob-sass.el" "org/ob-scala.el"
-;;;;;;  "org/ob-scheme.el" "org/ob-screen.el" "org/ob-sh.el" "org/ob-shen.el"
-;;;;;;  "org/ob-sql.el" "org/ob-sqlite.el" "org/ob-table.el" "org/ob-tangle.el"
-;;;;;;  "org/ob.el" "org/org-archive.el" "org/org-attach.el" "org/org-bbdb.el"
-;;;;;;  "org/org-bibtex.el" "org/org-clock.el" "org/org-crypt.el"
-;;;;;;  "org/org-ctags.el" "org/org-datetree.el" "org/org-docview.el"
-;;;;;;  "org/org-element.el" "org/org-entities.el" "org/org-eshell.el"
-;;;;;;  "org/org-faces.el" "org/org-feed.el" "org/org-footnote.el"
-;;;;;;  "org/org-gnus.el" "org/org-habit.el" "org/org-id.el" "org/org-indent.el"
-;;;;;;  "org/org-info.el" "org/org-inlinetask.el" "org/org-install.el"
-;;;;;;  "org/org-irc.el" "org/org-list.el" "org/org-macro.el" "org/org-mhe.el"
-;;;;;;  "org/org-mobile.el" "org/org-mouse.el" "org/org-pcomplete.el"
-;;;;;;  "org/org-plot.el" "org/org-protocol.el" "org/org-rmail.el"
-;;;;;;  "org/org-src.el" "org/org-table.el" "org/org-timer.el" "org/org-w3m.el"
-;;;;;;  "org/ox-ascii.el" "org/ox-beamer.el" "org/ox-html.el" "org/ox-icalendar.el"
-;;;;;;  "org/ox-latex.el" "org/ox-man.el" "org/ox-md.el" "org/ox-odt.el"
-;;;;;;  "org/ox-org.el" "org/ox-publish.el" "org/ox-texinfo.el" "org/ox.el"
-;;;;;;  "play/gametree.el" "progmodes/ada-prj.el" "progmodes/cc-align.el"
+;;;;;;  "nxml/xsd-regexp.el" "obsolete/abbrevlist.el" "obsolete/assoc.el"
+;;;;;;  "obsolete/awk-mode.el" "obsolete/bruce.el" "obsolete/cl-compat.el"
+;;;;;;  "obsolete/complete.el" "obsolete/crisp.el" "obsolete/cust-print.el"
+;;;;;;  "obsolete/erc-hecomplete.el" "obsolete/fast-lock.el" "obsolete/gulp.el"
+;;;;;;  "obsolete/iso-acc.el" "obsolete/iso-insert.el" "obsolete/iso-swed.el"
+;;;;;;  "obsolete/keyswap.el" "obsolete/lazy-lock.el" "obsolete/ledit.el"
+;;;;;;  "obsolete/levents.el" "obsolete/lmenu.el" "obsolete/longlines.el"
+;;;;;;  "obsolete/lucid.el" "obsolete/mailpost.el" "obsolete/meese.el"
+;;;;;;  "obsolete/mouse-sel.el" "obsolete/old-emacs-lock.el" "obsolete/old-whitespace.el"
+;;;;;;  "obsolete/options.el" "obsolete/otodo-mode.el" "obsolete/patcomp.el"
+;;;;;;  "obsolete/pc-mode.el" "obsolete/pc-select.el" "obsolete/pgg-def.el"
+;;;;;;  "obsolete/pgg-gpg.el" "obsolete/pgg-parse.el" "obsolete/pgg-pgp.el"
+;;;;;;  "obsolete/pgg-pgp5.el" "obsolete/pgg.el" "obsolete/rcompile.el"
+;;;;;;  "obsolete/resume.el" "obsolete/s-region.el" "obsolete/scribe.el"
+;;;;;;  "obsolete/spell.el" "obsolete/sregex.el" "obsolete/sup-mouse.el"
+;;;;;;  "obsolete/swedish.el" "obsolete/sym-comp.el" "obsolete/terminal.el"
+;;;;;;  "obsolete/tpu-edt.el" "obsolete/tpu-extras.el" "obsolete/tpu-mapper.el"
+;;;;;;  "obsolete/vc-mcvs.el" "obsolete/vi.el" "obsolete/vip.el"
+;;;;;;  "obsolete/ws-mode.el" "obsolete/xesam.el" "obsolete/yow.el"
+;;;;;;  "org/ob-C.el" "org/ob-R.el" "org/ob-asymptote.el" "org/ob-awk.el"
+;;;;;;  "org/ob-calc.el" "org/ob-clojure.el" "org/ob-comint.el" "org/ob-core.el"
+;;;;;;  "org/ob-css.el" "org/ob-ditaa.el" "org/ob-dot.el" "org/ob-emacs-lisp.el"
+;;;;;;  "org/ob-eval.el" "org/ob-exp.el" "org/ob-fortran.el" "org/ob-gnuplot.el"
+;;;;;;  "org/ob-haskell.el" "org/ob-io.el" "org/ob-java.el" "org/ob-js.el"
+;;;;;;  "org/ob-keys.el" "org/ob-latex.el" "org/ob-ledger.el" "org/ob-lilypond.el"
+;;;;;;  "org/ob-lisp.el" "org/ob-lob.el" "org/ob-makefile.el" "org/ob-matlab.el"
+;;;;;;  "org/ob-maxima.el" "org/ob-mscgen.el" "org/ob-ocaml.el" "org/ob-octave.el"
+;;;;;;  "org/ob-org.el" "org/ob-perl.el" "org/ob-picolisp.el" "org/ob-plantuml.el"
+;;;;;;  "org/ob-python.el" "org/ob-ref.el" "org/ob-ruby.el" "org/ob-sass.el"
+;;;;;;  "org/ob-scala.el" "org/ob-scheme.el" "org/ob-screen.el" "org/ob-sh.el"
+;;;;;;  "org/ob-shen.el" "org/ob-sql.el" "org/ob-sqlite.el" "org/ob-table.el"
+;;;;;;  "org/ob-tangle.el" "org/ob.el" "org/org-archive.el" "org/org-attach.el"
+;;;;;;  "org/org-bbdb.el" "org/org-bibtex.el" "org/org-clock.el"
+;;;;;;  "org/org-crypt.el" "org/org-ctags.el" "org/org-datetree.el"
+;;;;;;  "org/org-docview.el" "org/org-element.el" "org/org-entities.el"
+;;;;;;  "org/org-eshell.el" "org/org-faces.el" "org/org-feed.el"
+;;;;;;  "org/org-footnote.el" "org/org-gnus.el" "org/org-habit.el"
+;;;;;;  "org/org-id.el" "org/org-indent.el" "org/org-info.el" "org/org-inlinetask.el"
+;;;;;;  "org/org-install.el" "org/org-irc.el" "org/org-list.el" "org/org-loaddefs.el"
+;;;;;;  "org/org-macro.el" "org/org-mhe.el" "org/org-mobile.el" "org/org-mouse.el"
+;;;;;;  "org/org-pcomplete.el" "org/org-plot.el" "org/org-protocol.el"
+;;;;;;  "org/org-rmail.el" "org/org-src.el" "org/org-table.el" "org/org-timer.el"
+;;;;;;  "org/org-w3m.el" "org/ox-ascii.el" "org/ox-beamer.el" "org/ox-html.el"
+;;;;;;  "org/ox-icalendar.el" "org/ox-latex.el" "org/ox-man.el" "org/ox-md.el"
+;;;;;;  "org/ox-odt.el" "org/ox-org.el" "org/ox-publish.el" "org/ox-texinfo.el"
+;;;;;;  "org/ox.el" "play/gametree.el" "progmodes/ada-prj.el" "progmodes/cc-align.el"
 ;;;;;;  "progmodes/cc-awk.el" "progmodes/cc-bytecomp.el" "progmodes/cc-cmds.el"
 ;;;;;;  "progmodes/cc-defs.el" "progmodes/cc-fonts.el" "progmodes/cc-langs.el"
 ;;;;;;  "progmodes/cc-menus.el" "progmodes/ebnf-abn.el" "progmodes/ebnf-bnf.el"
@@ -32161,22 +31783,23 @@ Zone out, completely.
 ;;;;;;  "progmodes/ebnf-otz.el" "progmodes/ebnf-yac.el" "progmodes/idlw-complete-structtag.el"
 ;;;;;;  "progmodes/idlw-help.el" "progmodes/idlw-toolbar.el" "progmodes/mantemp.el"
 ;;;;;;  "progmodes/xscheme.el" "ps-def.el" "ps-mule.el" "ps-samp.el"
-;;;;;;  "saveplace.el" "sb-image.el" "scroll-bar.el" "select.el"
-;;;;;;  "soundex.el" "subdirs.el" "tempo.el" "textmodes/bib-mode.el"
-;;;;;;  "textmodes/makeinfo.el" "textmodes/page-ext.el" "textmodes/refbib.el"
-;;;;;;  "textmodes/refer.el" "textmodes/reftex-auc.el" "textmodes/reftex-dcr.el"
-;;;;;;  "textmodes/reftex-ref.el" "textmodes/reftex-sel.el" "textmodes/reftex-toc.el"
-;;;;;;  "textmodes/texnfo-upd.el" "timezone.el" "tooltip.el" "tree-widget.el"
-;;;;;;  "url/url-about.el" "url/url-cookie.el" "url/url-dired.el"
-;;;;;;  "url/url-domsuf.el" "url/url-expand.el" "url/url-ftp.el"
-;;;;;;  "url/url-future.el" "url/url-history.el" "url/url-imap.el"
-;;;;;;  "url/url-methods.el" "url/url-nfs.el" "url/url-proxy.el"
+;;;;;;  "saveplace.el" "sb-image.el" "scroll-bar.el" "soundex.el"
+;;;;;;  "subdirs.el" "tempo.el" "textmodes/bib-mode.el" "textmodes/makeinfo.el"
+;;;;;;  "textmodes/page-ext.el" "textmodes/refbib.el" "textmodes/refer.el"
+;;;;;;  "textmodes/reftex-auc.el" "textmodes/reftex-cite.el" "textmodes/reftex-dcr.el"
+;;;;;;  "textmodes/reftex-global.el" "textmodes/reftex-index.el"
+;;;;;;  "textmodes/reftex-parse.el" "textmodes/reftex-ref.el" "textmodes/reftex-sel.el"
+;;;;;;  "textmodes/reftex-toc.el" "textmodes/texnfo-upd.el" "timezone.el"
+;;;;;;  "tooltip.el" "tree-widget.el" "url/url-about.el" "url/url-cookie.el"
+;;;;;;  "url/url-dired.el" "url/url-domsuf.el" "url/url-expand.el"
+;;;;;;  "url/url-ftp.el" "url/url-future.el" "url/url-history.el"
+;;;;;;  "url/url-imap.el" "url/url-methods.el" "url/url-nfs.el" "url/url-proxy.el"
 ;;;;;;  "url/url-vars.el" "vc/ediff-diff.el" "vc/ediff-init.el" "vc/ediff-merg.el"
 ;;;;;;  "vc/ediff-ptch.el" "vc/ediff-vers.el" "vc/ediff-wind.el"
 ;;;;;;  "vc/pcvs-info.el" "vc/pcvs-parse.el" "vc/pcvs-util.el" "vc/vc-dav.el"
 ;;;;;;  "vcursor.el" "vt-control.el" "vt100-led.el" "w32-common-fns.el"
-;;;;;;  "w32-fns.el" "w32-vars.el" "x-dnd.el") (21548 39937 969940
-;;;;;;  896000))
+;;;;;;  "w32-fns.el" "w32-vars.el" "x-dnd.el") (21547 54610 44674
+;;;;;;  534000))
 
 ;;;***
 \f
index c72c459fde07a49c18ed40dc586679502a1f254c..a4bb85eca6949122a48eee85f9c9fa79feb0c5b5 100644 (file)
@@ -2299,6 +2299,7 @@ Doubling the postfix separates the letter and postfix: e.g. a'' -> a'
  ("z." ?ż)
  ("z~" ?ž)
 
+ (" __" [" _"])
  ("!//" ["!/"])
  ("///" ["//"])
  ("<<<" ["<<"])
index 35a5f41f323a4495b0a7fb7961688180c7d2e455..324188e88e801ecf1c900847edfff9f65455ea84 100644 (file)
@@ -249,42 +249,39 @@ Example:  nve5    -> nüe
 
 ;; Call quail-make-sisheng-rules for all syllables in sisheng-syllable-table.
 ;;
-(let ((case-table-save (current-case-table))
-      sisheng-list)
-  (set-case-table (standard-case-table))
+(let (sisheng-list)
   (dolist (syllable sisheng-syllable-table)
     (setq sisheng-list
-         (append (quail-make-sisheng-rules syllable)
-                 sisheng-list)))
+          (append (quail-make-sisheng-rules syllable)
+                  sisheng-list)))
 
   (dolist (syllable sisheng-syllable-table)
     (setq sisheng-list
-         (append (quail-make-sisheng-rules (upcase-initials syllable))
-                 sisheng-list)))
+          (append (quail-make-sisheng-rules (upcase-initials syllable))
+                  sisheng-list)))
 
   (dolist (syllable sisheng-syllable-table)
     (setq sisheng-list
-         (append (quail-make-sisheng-rules (upcase syllable))
-                 sisheng-list)))
+          (append (quail-make-sisheng-rules (upcase syllable))
+                  sisheng-list)))
 
   (eval `(quail-define-rules
-         ,@sisheng-list
-
-         ("lv5" ["lü"])
-         ("lve5" ["lüe"])
-         ("nv5" ["nü"])
-         ("nve5" ["nüe"])
-
-         ("Lv5" ["Lü"])
-         ("Lve5" ["Lüe"])
-         ("Nv5" ["Nü"])
-         ("Nve5" ["Nüe"])
-
-         ("LV5" ["LÜ"])
-         ("LVE5" ["LÜE"])
-         ("NV5" ["NÜ"])
-         ("NVE5" ["NÜE"])))
-  (set-case-table case-table-save))
+          ,@sisheng-list
+
+          ("lv5" ["lü"])
+          ("lve5" ["lüe"])
+          ("nv5" ["nü"])
+          ("nve5" ["nüe"])
+
+          ("Lv5" ["Lü"])
+          ("Lve5" ["Lüe"])
+          ("Nv5" ["Nü"])
+          ("Nve5" ["Nüe"])
+
+          ("LV5" ["LÜ"])
+          ("LVE5" ["LÜE"])
+          ("NV5" ["NÜ"])
+          ("NVE5" ["NÜE"]))))
 
 ;; Local Variables:
 ;; coding: utf-8
index bbf7ebec3998e6b2d45054e239400f9949b9be7f..b13bd8dbbb6ad5780feeaff6788a2f9f424ade40 100644 (file)
@@ -138,6 +138,9 @@ Linum mode is a buffer-local minor mode."
       (mapc #'delete-overlay linum-available)
       (setq linum-available nil))))
 
+(defun linum--face-height (face)
+  (aref (font-info (face-font face)) 2))
+
 (defun linum-update-window (win)
   "Update line numbers for the portion visible in window WIN."
   (goto-char (window-start win))
@@ -178,6 +181,12 @@ Linum mode is a buffer-local minor mode."
       (let ((inhibit-point-motion-hooks t))
         (forward-line))
       (setq line (1+ line)))
+    (when (display-graphic-p)
+      (setq width (ceiling
+                   ;; We'd really want to check the widths rather than the
+                   ;; heights, but it's a start.
+                   (/ (* width 1.0 (linum--face-height 'linum))
+                      (frame-char-height)))))
     (set-window-margins win width (cdr (window-margins win)))))
 
 (defun linum-after-change (beg end _len)
index 8d009ed5165bf26be027af5ce05e2bea82a29037..fd34648bb30e0c7cca8161d889633170b2f557aa 100644 (file)
@@ -1,7 +1,7 @@
 ;;; loadup.el --- load up standardly loaded Lisp files for Emacs
 
-;; Copyright (C) 1985-1986, 1992, 1994, 2001-2014 Free Software
-;; Foundation, Inc.
+;; Copyright (C) 1985-1986, 1992, 1994, 2001-2014
+;;   Free Software Foundation, Inc.
 
 ;; Maintainer: emacs-devel@gnu.org
 ;; Keywords: internal
@@ -46,8 +46,7 @@
 ;; Add subdirectories to the load-path for files that might get
 ;; autoloaded when bootstrapping.
 ;; This is because PATH_DUMPLOADSEARCH is just "../lisp".
-(if (or (equal (nth 3 command-line-args) "bootstrap")
-       (equal (nth 4 command-line-args) "bootstrap")
+(if (or (equal (member "bootstrap" command-line-args) '("bootstrap"))
        ;; FIXME this is irritatingly fragile.
        (equal (nth 4 command-line-args) "unidata-gen.el")
        (equal (nth 7 command-line-args) "unidata-gen-files")
 
 (message "Using load-path %s" load-path)
 
-(if (or (member (nth 3 command-line-args) '("dump" "bootstrap"))
-       (member (nth 4 command-line-args) '("dump" "bootstrap")))
-    ;; To reduce the size of dumped Emacs, we avoid making huge
-    ;; char-tables.
-    (setq inhibit-load-charset-map t))
+;; This is a poor man's `last', since we haven't loaded subr.el yet.
+(if (or (equal (member "bootstrap" command-line-args) '("bootstrap"))
+       (equal (member "dump" command-line-args) '("dump")))
+    (progn
+      ;; To reduce the size of dumped Emacs, we avoid making huge char-tables.
+      (setq inhibit-load-charset-map t)
+      ;; --eval gets handled too late.
+      (defvar load--prefer-newer load-prefer-newer)
+      (setq load-prefer-newer t)))
 
 ;; We don't want to have any undo records in the dumped Emacs.
 (set-buffer "*scratch*")
   (let ((macroexp--pending-eager-loads '(skip)))
     (load "emacs-lisp/pcase"))
   ;; Re-load macroexp so as to eagerly macro-expand its uses of pcase.
-  (load "emacs-lisp/macroexp"))
+  (let ((max-lisp-eval-depth (* 2 max-lisp-eval-depth)))
+    (load "emacs-lisp/macroexp")))
 
 (load "cus-face")
 (load "faces")  ; after here, `defface' may be used.
 
 (load "button")
-(load "startup")
 
 ;; We don't want to store loaddefs.el in the repository because it is
 ;; a generated file; but it is required in order to compile the lisp files.
 
 (load "indent")
 (load "frame")
+(load "startup")
 (load "term/tty-colors")
 (load "font-core")
 ;; facemenu must be loaded before font-lock, because `facemenu-keymap'
 (load "font-lock")
 (load "jit-lock")
 
-(if (fboundp 'track-mouse)
-    (progn
-      (load "mouse")
-      (and (boundp 'x-toolkit-scroll-bars)
-          (load "scroll-bar"))
-      (load "select")))
+(load "mouse")
+(if (boundp 'x-toolkit-scroll-bars)
+    (load "scroll-bar"))
+(load "select")
 (load "emacs-lisp/timer")
 (load "isearch")
 (load "rfn-eshadow")
 (load "textmodes/paragraphs")
 (load "progmodes/prog-mode")
 (load "emacs-lisp/lisp-mode")
+(load "progmodes/elisp-mode")
 (load "textmodes/text-mode")
 (load "textmodes/fill")
 (load "newcomment")
       (load "w32-vars")
       (load "term/w32-win")
       (load "disp-table")
-      (load "w32-common-fns")
       (when (eq system-type 'windows-nt)
         (load "w32-fns")
         (load "ls-lisp")
@@ -308,17 +310,13 @@ lost after dumping")))
 ;; file primitive.  So the only workable solution to support building
 ;; in non-ASCII directories is to manipulate unibyte strings in the
 ;; current locale's encoding.
-(if (and (or (equal (nth 3 command-line-args) "dump")
-            (equal (nth 4 command-line-args) "dump")
-            (equal (nth 3 command-line-args) "bootstrap")
-            (equal (nth 4 command-line-args) "bootstrap"))
+(if (and (member (car (last command-line-args)) '("dump" "bootstrap"))
         (multibyte-string-p default-directory))
     (error "default-directory must be unibyte when dumping Emacs!"))
 
 ;; Determine which last version number to use
 ;; based on the executables that now exist.
-(if (and (or (equal (nth 3 command-line-args) "dump")
-            (equal (nth 4 command-line-args) "dump"))
+(if (and (equal (last command-line-args) '("dump"))
         (not (eq system-type 'ms-dos)))
     (let* ((base (concat "emacs-" emacs-version "."))
           (exelen (if (eq system-type 'windows-nt) -4))
@@ -337,8 +335,7 @@ lost after dumping")))
 
 
 (message "Finding pointers to doc strings...")
-(if (or (equal (nth 3 command-line-args) "dump")
-       (equal (nth 4 command-line-args) "dump"))
+(if (equal (last command-line-args) '("dump"))
     (Snarf-documentation "DOC")
   (condition-case nil
       (Snarf-documentation "DOC")
@@ -365,6 +362,12 @@ lost after dumping")))
 
 (remove-hook 'after-load-functions (lambda (f) (garbage-collect)))
 
+(if (boundp 'load--prefer-newer)
+    (progn
+      (setq load-prefer-newer load--prefer-newer)
+      (put 'load-prefer-newer 'standard-value load--prefer-newer)
+      (makunbound 'load--prefer-newer)))
+
 (setq inhibit-load-charset-map nil)
 (clear-charset-maps)
 (garbage-collect)
@@ -396,8 +399,7 @@ lost after dumping")))
 (if (null (garbage-collect))
     (setq pure-space-overflow t))
 
-(if (or (member (nth 3 command-line-args) '("dump" "bootstrap"))
-       (member (nth 4 command-line-args) '("dump" "bootstrap")))
+(if (member (car (last command-line-args)) '("dump" "bootstrap"))
     (progn
       (message "Dumping under the name emacs")
       (condition-case ()
@@ -413,8 +415,7 @@ lost after dumping")))
       (if (not (or (eq system-type 'ms-dos)
                    ;; Don't bother adding another name if we're just
                    ;; building bootstrap-emacs.
-                   (equal (nth 3 command-line-args) "bootstrap")
-                   (equal (nth 4 command-line-args) "bootstrap")))
+                   (equal (last command-line-args) '("bootstrap"))))
          (let ((name (concat "emacs-" emacs-version))
                (exe (if (eq system-type 'windows-nt) ".exe" "")))
            (while (string-match "[^-+_.a-zA-Z0-9]+" name)
@@ -435,7 +436,7 @@ lost after dumping")))
 ;; this file must be loaded each time Emacs is run.
 ;; So run the startup code now.  First, remove `-l loadup' from args.
 
-(if (and (equal (nth 1 command-line-args) "-l")
+(if (and (member (nth 1 command-line-args) '("-l" "--load"))
         (equal (nth 2 command-line-args) "loadup"))
     (setcdr command-line-args (nthcdr 3 command-line-args)))
 
index 2ff0a3a230b6b1831402e9198c378a812fe7f91c..03ee0d25cce69b653ac2172f348cd58a064ac8b3 100644 (file)
@@ -113,6 +113,47 @@ update the dependent variables."
   :type 'boolean
   :group 'ls-lisp)
 
+(defcustom ls-lisp-use-string-collate
+  (cond ((memq ls-lisp-emulation '(MacOS UNIX)) nil)
+       (t t))          ; GNU/Linux or MS-Windows emulate GNU ls
+  "Non-nil causes ls-lisp to sort files in locale-dependent collation order.
+
+A value of nil means use ordinary string comparison (see `compare-strings')
+for sorting files.  A non-nil value uses `string-collate-lessp' instead,
+which more closely emulates what GNU `ls' does.
+
+On GNU/Linux systems, if the locale's codeset specifies UTF-8, as
+in \"en_US.UTF-8\", the collation order follows the Unicode
+Collation Algorithm (UCA), which places together file names that
+differ only in punctuation characters.  On MS-Windows, customize
+the option `ls-lisp-UCA-like-collation' to a non-nil value to get
+similar behavior."
+  :version "25.1"
+  :set-after '(ls-lisp-emulation)
+  :type 'boolean
+  :group 'ls-lisp)
+
+(defcustom ls-lisp-UCA-like-collation t
+  "Non-nil means force ls-lisp use a collation order compatible with UCA.
+
+UCA is the Unicode Collation Algorithm.  GNU/Linux systems automatically
+follow it in their string-collation routines if the locale specifies
+UTF-8 as its codeset.  On MS-Windows, customize this option to a non-nil
+value to get similar behavior.
+
+When this option is non-nil, and `ls-lisp-use-string-collate' is also
+non-nil, the collation order produced on MS-Windows will ignore
+punctuation and symbol characters, which will, for example, place
+\`.foo' near `foo'.  See the documentation of `string-collate-lessp'
+and `w32-collate-ignore-punctuation' for more details.
+
+This option is ignored on platforms other than MS-Windows; to
+control the collation ordering of the file names on those other
+systems, set your locale instead."
+  :version "25.1"
+  :type 'boolean
+  :group 'ls-lisp)
+
 (defcustom ls-lisp-dirs-first (eq ls-lisp-emulation 'MS-Windows)
   "Non-nil causes ls-lisp to sort directories first in any ordering.
 \(Or last if it is reversed.)  Follows Microsoft Windows Explorer."
@@ -232,7 +273,7 @@ The Lisp emulation does not run any external programs or shells.  It
 supports ordinary shell wildcards if `ls-lisp-support-shell-wildcards'
 is non-nil; otherwise, it interprets wildcards as regular expressions
 to match file names.  It does not support all `ls' switches -- those
-that work are: A a B C c F G g h i n R r S s t U u X.  The l switch
+that work are: A a B C c F G g h i n R r S s t U u X.  The l switch
 is assumed to be always present and cannot be turned off."
   (if ls-lisp-use-insert-directory-program
       (funcall orig-fun
@@ -495,11 +536,81 @@ Responds to the window width as ls should but may not!"
     result))
 
 (defsubst ls-lisp-string-lessp (s1 s2)
-  "Return t if string S1 is less than string S2 in lexicographic order.
+  "Return t if string S1 should sort before string S2.
+Case is significant if `ls-lisp-ignore-case' is nil.
+Uses `string-collate-lessp' if `ls-lisp-use-string-collate' is non-nil,
+\`compare-strings' otherwise.
+On GNU/Linux systems, if the locale specifies UTF-8 as the codeset,
+the sorting order will place together file names that differ only
+by punctuation characters, like `.emacs' and `emacs'.  To have a
+similar behavior on MS-Windows, customize `ls-lisp-UCA-like-collation'
+to a non-nil value."
+  (let ((w32-collate-ignore-punctuation ls-lisp-UCA-like-collation))
+    (if ls-lisp-use-string-collate
+       (string-collate-lessp s1 s2 nil ls-lisp-ignore-case)
+      (let ((u (compare-strings s1 0 nil s2 0 nil ls-lisp-ignore-case)))
+       (and (numberp u) (< u 0))))))
+
+(defun ls-lisp-version-lessp (s1 s2)
+  "Return t if versioned string S1 should sort before versioned string S2.
+
 Case is significant if `ls-lisp-ignore-case' is nil.
-Unibyte strings are converted to multibyte for comparison."
-  (let ((u (compare-strings s1 0 nil s2 0 nil ls-lisp-ignore-case)))
-    (and (numberp u) (< u 0))))
+This is the same as string-lessp (with the exception of case
+insensitivity), but sequences of digits are compared numerically,
+as a whole, in the same manner as the `strverscmp' function available
+in some standard C libraries does."
+  (let ((i1 0)
+       (i2 0)
+       (len1 (length s1))
+       (len2 (length s2))
+       (val 0)
+       ni1 ni2 e1 e2 found-2-numbers-p)
+    (while (and (< i1 len1) (< i2 len2) (zerop val))
+      (unless found-2-numbers-p
+       (setq ni1 (string-match "[0-9]+" s1 i1)
+             e1 (match-end 0))
+       (setq ni2 (string-match "[0-9]+" s2 i2)
+             e2 (match-end 0)))
+      (cond
+       ((and ni1 ni2)
+       (cond
+        ((and (> ni1 i1) (> ni2 i2))
+         ;; Compare non-numerical part as strings.
+         (setq val (compare-strings s1 i1 ni1 s2 i2 ni2 ls-lisp-ignore-case)
+               i1 ni1
+               i2 ni2
+               found-2-numbers-p t))
+        ((and (= ni1 i1) (= ni2 i2))
+         (setq found-2-numbers-p nil)
+         ;; Compare numerical parts as integral and/or fractional parts.
+         (let* ((sub1 (substring s1 ni1 e1))
+                (sub2 (substring s2 ni2 e2))
+                ;; "Fraction" is a numerical sequence with leading zeros.
+                (fr1 (string-match "\\`0+" sub1))
+                (fr2 (string-match "\\`0+" sub2)))
+           (cond
+            ((and fr1 fr2)     ; two fractions, the shortest wins
+             (setq val (- val (- (length sub1) (length sub2)))))
+            (fr1               ; a fraction is always less than an integral
+             (setq val (- ni1)))
+            (fr2
+             (setq val ni2)))
+           (if (zerop val)     ; fall back on numerical comparison
+               (setq val (- (string-to-number sub1)
+                            (string-to-number sub2))))
+           (setq i1 e1
+                 i2 e2)))
+        (t
+         (setq val (compare-strings s1 i1 nil s2 i2 nil ls-lisp-ignore-case)
+               i1 len1
+               i2 len2))))
+       (t (setq val (compare-strings s1 i1 nil s2 i2 nil ls-lisp-ignore-case)
+               i1 len1
+               i2 len2)))
+      (and (eq val t) (setq val 0)))
+    (if (zerop val)
+       (setq val (- len1 len2)))
+    (< val 0)))
 
 (defun ls-lisp-handle-switches (file-alist switches)
   "Return new FILE-ALIST sorted according to SWITCHES.
@@ -527,6 +638,9 @@ SWITCHES is a list of characters.  Default sorting is alphabetic."
                                 (ls-lisp-string-lessp
                                  (ls-lisp-extension (car x))
                                  (ls-lisp-extension (car y)))))
+                             ((memq ?v switches)
+                              (lambda (x y) ; sorted by version number
+                                (ls-lisp-version-lessp (car x) (car y))))
                              (t
                               (lambda (x y) ; sorted alphabetically
                                 (ls-lisp-string-lessp (car x) (car y))))))))
index b994949e94d825f71b19ce8514bd5d25fd92a167..91451504cab29fdc0f15a277c2c13df2ada60de3 100644 (file)
@@ -1,7 +1,7 @@
 ;;; emacsbug.el --- command to report Emacs bugs to appropriate mailing list
 
-;; Copyright (C) 1985, 1994, 1997-1998, 2000-2014 Free Software
-;; Foundation, Inc.
+;; Copyright (C) 1985, 1994, 1997-1998, 2000-2014
+;;   Free Software Foundation, Inc.
 
 ;; Author: K. Shane Hartman
 ;; Maintainer: emacs-devel@gnu.org
 (define-obsolete-variable-alias 'report-emacs-bug-pretest-address
   'report-emacs-bug-address "24.1")
 
-(defcustom report-emacs-bug-address "bug-gnu-emacs@gnu.org"
-  "Address of mailing list for GNU Emacs bugs."
-  :group 'emacsbug
-  :type 'string)
-
 (defcustom report-emacs-bug-no-confirmation nil
   "If non-nil, suppress the confirmations asked for the sake of novice users."
   :group 'emacsbug
@@ -251,6 +246,8 @@ usually do not have translators for other languages.\n\n")))
       (insert "Configured using:\n `configure "
              system-configuration-options "'\n\n")
       (fill-region (line-beginning-position -1) (point)))
+    (insert "Configured features:\n" system-configuration-features "\n\n")
+    (fill-region (line-beginning-position -1) (point))
     (insert "Important settings:\n")
     (mapc
      (lambda (var)
index 2224884eede8d31a878d3e7988ab082e2304cbeb..fb8dfba8554010eab33bfc9586835dfac3add050 100644 (file)
 
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-
 (eval-when-compile (require 'cl))      ; for case
 
 (defgroup hashcash nil
index 52f4845eecb6da5f36d8b3dbc482791191b5dd41..5f3628b7131730fedf7cd761d958d4bda537df6f 100644 (file)
@@ -1507,8 +1507,7 @@ If so restore the actual mbox message collection."
        '(rmail-font-lock-keywords
          t t nil nil
          (font-lock-maximum-size . nil)
-         (font-lock-fontify-buffer-function . rmail-fontify-buffer-function)
-         (font-lock-unfontify-buffer-function . rmail-unfontify-buffer-function)
+          (font-lock-dont-widen . t)
          (font-lock-inhibit-thing-lock . (lazy-lock-mode fast-lock-mode))))
   (make-local-variable 'require-final-newline)
   (setq require-final-newline nil)
@@ -3448,47 +3447,66 @@ STATE non-nil means mark as deleted."
   "Delete this message and stay on it."
   (interactive)
   (rmail-set-attribute rmail-deleted-attr-index t)
-  (run-hooks 'rmail-delete-message-hook))
+  (run-hooks 'rmail-delete-message-hook)
+  (let ((del-msg rmail-current-message))
+    (if (rmail-summary-exists)
+       (rmail-select-summary
+        (rmail-summary-mark-deleted del-msg)))))
 
-(defun rmail-undelete-previous-message ()
+(defun rmail-undelete-previous-message (count)
   "Back up to deleted message, select it, and undelete it."
-  (interactive)
+  (interactive "p")
   (set-buffer rmail-buffer)
-  (let ((msg rmail-current-message))
-    (while (and (> msg 0)
-               (not (rmail-message-deleted-p msg)))
-      (setq msg (1- msg)))
-    (if (= msg 0)
-       (error "No previous deleted message")
-      (if (/= msg rmail-current-message)
-         (rmail-show-message msg))
-      (rmail-set-attribute rmail-deleted-attr-index nil)
-      (if (rmail-summary-exists)
-         (with-current-buffer rmail-summary-buffer
-           (rmail-summary-mark-undeleted msg)))
-      (rmail-maybe-display-summary))))
-
-(defun rmail-delete-forward (&optional backward)
+  (let (value)
+    (dotimes (i count)
+      (let ((msg rmail-current-message))
+       (while (and (> msg 0)
+                   (not (rmail-message-deleted-p msg)))
+         (setq msg (1- msg)))
+       (if (= msg 0)
+           (error "No previous deleted message")
+         (if (/= msg rmail-current-message)
+             (rmail-show-message msg))
+         (rmail-set-attribute rmail-deleted-attr-index nil)
+         (if (rmail-summary-exists)
+             (with-current-buffer rmail-summary-buffer
+               (rmail-summary-mark-undeleted msg))))))
+    (rmail-maybe-display-summary)))
+
+(defun rmail-delete-forward (&optional count)
   "Delete this message and move to next nondeleted one.
 Deleted messages stay in the file until the \\[rmail-expunge] command is given.
-With prefix argument, delete and move backward.
+Optional argument COUNT (interactively, prefix argument) is a repeat count;
+negative argument means move backwards instead of forwards.
 
 Returns t if a new message is displayed after the delete, or nil otherwise."
-  (interactive "P")
-  (rmail-set-attribute rmail-deleted-attr-index t)
-  (run-hooks 'rmail-delete-message-hook)
-  (let ((del-msg rmail-current-message))
-    (if (rmail-summary-exists)
-       (rmail-select-summary
-        (rmail-summary-mark-deleted del-msg)))
-    (prog1 (rmail-next-undeleted-message (if backward -1 1))
-      (rmail-maybe-display-summary))))
+  (interactive "p")
+  (if (not count) (setq count 1))
+  (let (value backward)
+    (if (< count 0)
+       (setq count (- count) backward t))
+    (dotimes (i count)
+      (rmail-set-attribute rmail-deleted-attr-index t)
+      (run-hooks 'rmail-delete-message-hook)
+      (let ((del-msg rmail-current-message))
+       (if (rmail-summary-exists)
+           (rmail-select-summary
+            (rmail-summary-mark-deleted del-msg)))
+       (setq value (rmail-next-undeleted-message (if backward -1 1)))))
+    (rmail-maybe-display-summary)
+    value))
 
-(defun rmail-delete-backward ()
+(defun rmail-delete-backward (&optional count)
   "Delete this message and move to previous nondeleted one.
-Deleted messages stay in the file until the \\[rmail-expunge] command is given."
-  (interactive)
-  (rmail-delete-forward t))
+Deleted messages stay in the file until the \\[rmail-expunge] command is given.
+Optional argument COUNT (interactively, prefix argument) is a repeat count;
+negative argument means move forwards instead of backwards.
+
+Returns t if a new message is displayed after the delete, or nil otherwise."
+
+  (interactive "p")
+  (if (not count) (setq count 1))
+  (rmail-delete-forward (- count)))
 \f
 ;; Expunging.
 
@@ -4297,31 +4315,21 @@ This has an effect only if a summary buffer exists."
 
 (defun rmail-unfontify-buffer-function ()
   ;; This function's symbol is bound to font-lock-fontify-unbuffer-function.
-  (let ((modified (buffer-modified-p))
-       (buffer-undo-list t) (inhibit-read-only t)
-       before-change-functions after-change-functions
-       buffer-file-name buffer-file-truename)
+  (with-silent-modifications
     (save-restriction
       (widen)
       (remove-hook 'rmail-show-message-hook 'rmail-fontify-message t)
       (remove-text-properties (point-min) (point-max) '(rmail-fontified nil))
-      (font-lock-default-unfontify-buffer)
-      (and (not modified) (buffer-modified-p)
-           (restore-buffer-modified-p nil)))))
+      (font-lock-default-unfontify-buffer))))
 
 (defun rmail-fontify-message ()
   ;; Fontify the current message if it is not already fontified.
   (if (text-property-any (point-min) (point-max) 'rmail-fontified nil)
-      (let ((modified (buffer-modified-p))
-           (buffer-undo-list t) (inhibit-read-only t)
-           before-change-functions after-change-functions
-           buffer-file-name buffer-file-truename)
+      (with-silent-modifications
        (save-excursion
          (save-match-data
            (add-text-properties (point-min) (point-max) '(rmail-fontified t))
-           (font-lock-fontify-region (point-min) (point-max))
-           (and (not modified) (buffer-modified-p)
-                 (restore-buffer-modified-p nil)))))))
+           (font-lock-fontify-region (point-min) (point-max)))))))
 \f
 ;;; Speedbar support for RMAIL files.
 (defcustom rmail-speedbar-match-folder-regexp "^[A-Z0-9]+\\(\\.[A-Z0-9]+\\)?$"
@@ -4676,7 +4684,7 @@ With prefix argument N moves forward N messages with these labels.
 
 ;;;***
 \f
-;;;### (autoloads nil "rmailmm" "rmailmm.el" "4904dafb4e3b7b456c14e63d2dc9163d")
+;;;### (autoloads nil "rmailmm" "rmailmm.el" "6446c799d49a6df8519b11bfe2e3cbea")
 ;;; Generated autoloads from rmailmm.el
 
 (autoload 'rmail-mime "rmailmm" "\
@@ -4773,7 +4781,7 @@ If prefix argument REVERSE is non-nil, sorts in reverse order.
 
 ;;;***
 \f
-;;;### (autoloads nil "rmailsum" "rmailsum.el" "1278ff9911aa307f30dd57c20adbcdc6")
+;;;### (autoloads nil "rmailsum" "rmailsum.el" "ee1fa556cd65d7ef457a97ab560e15da")
 ;;; Generated autoloads from rmailsum.el
 
 (autoload 'rmail-summary "rmailsum" "\
index 2c625f67e38de7a5292938a49b7a0b017aca1015..29f7d449a8bce8363a0294f3a9c0076be4084a41 100644 (file)
@@ -131,6 +131,26 @@ automatically display the image in the buffer."
   :version "23.2"
   :group 'rmail-mime)
 
+(defcustom rmail-mime-render-html-function
+  (cond ((fboundp 'libxml-parse-html-region) 'rmail-mime-render-html-shr)
+       ((executable-find "lynx") 'rmail-mime-render-html-lynx)
+       (t nil))
+  "Function to convert HTML to text.  Called with buffer containing HTML
+extracted from message in a temporary buffer.  Converts to text in current 
+buffer. If NIL, display HTML source."
+  :group 'rmail
+  :version "25.1"
+  :type '(choice function (const nil)))
+
+(defcustom rmail-mime-prefer-html
+  ;; Default to preferring HTML parts, but only if we have a renderer
+  (if rmail-mime-render-html-function t nil)
+  "If non-nil, default to showing HTML part rather than text part
+when both are available"
+  :group 'rmail
+  :version "25.1"
+  :type 'boolean)
+
 ;;; End of user options.
 
 ;;; Global variables that always have let-binding when referred.
@@ -150,6 +170,10 @@ processing MIME.")
 The value is usually nil, and bound to non-nil while inserting
 MIME entities.")
 
+(defvar rmail-mime-searching nil
+  "Bound to T inside `rmail-search-mime-message' to suppress expensive 
+operations such as HTML decoding")
+
 ;;; MIME-entity object
 
 (defun rmail-mime-entity (type disposition transfer-encoding
@@ -631,6 +655,72 @@ HEADER is a header component of a MIME-entity object (see
     (insert-image (create-image data (cdr bulk-data) t))
     (insert "\n")))
 
+(defun rmail-mime-insert-html (entity)
+  "Decode, render, and insert html from MIME-entity ENTITY."
+  (let ((body (rmail-mime-entity-body entity))
+       (transfer-encoding (rmail-mime-entity-transfer-encoding entity))
+       (charset (cdr (assq 'charset (cdr (rmail-mime-entity-type entity)))))
+       (buffer (current-buffer))
+       coding-system)
+    (if charset (setq coding-system (coding-system-from-name charset)))
+    (or (and coding-system (coding-system-p coding-system))
+       (setq coding-system 'undecided))
+    (with-temp-buffer
+      (set-buffer-multibyte nil)
+      (setq buffer-undo-list t)
+      (insert-buffer-substring rmail-mime-mbox-buffer
+                              (aref body 0) (aref body 1))
+      (cond ((string= transfer-encoding "base64")
+            (ignore-errors (base64-decode-region (point-min) (point-max))))
+           ((string= transfer-encoding "quoted-printable")
+            (quoted-printable-decode-region (point-min) (point-max))))
+      (decode-coding-region (point-min) (point) coding-system)
+      (if (and
+          (or (not rmail-mime-coding-system) (consp rmail-mime-coding-system))
+          (not (eq (coding-system-base coding-system) 'us-ascii)))
+         (setq rmail-mime-coding-system coding-system))
+      ;; Convert html in temporary buffer to text and insert in original buffer
+      (let ((source-buffer (current-buffer)))
+       (with-current-buffer buffer
+         (let ((start (point)))
+           (if rmail-mime-render-html-function
+               (funcall rmail-mime-render-html-function source-buffer)
+             (insert-buffer-substring source-buffer))
+           (rmail-mime-fix-inserted-faces start)))))))
+
+(defun rmail-mime-render-html-shr (source-buffer)
+  (let ((dom (with-current-buffer source-buffer
+              (libxml-parse-html-region (point-min) (point-max))))
+       ;; Image retrieval happens asynchronously, but meanwhile
+       ;; `rmail-swap-buffers' may have been run, leaving
+       ;; `shr-image-fetched' trying to insert the image in the wrong buffer.
+       (shr-inhibit-images t)
+       ;; Bind shr-width to nil to force shr-insert-document break
+       ;; the lines at the window margin.  The default is
+       ;; fill-column, whose default value is too small, and screws
+       ;; up display of the quoted messages.
+       shr-width)
+    (shr-insert-document dom)))
+
+(defun rmail-mime-render-html-lynx (source-buffer)
+  (let ((destination-buffer (current-buffer)))
+    (with-current-buffer source-buffer
+      (call-process-region (point-min) (point-max)
+                          "lynx" nil destination-buffer nil
+                          "-stdin" "-dump" "-force_html"
+                          "-dont_wrap_pre" "-width=70"))))
+
+;; Put font-lock-face properties matching face properties on text
+;; inserted, e.g., by shr, in text from START to point.
+(defun rmail-mime-fix-inserted-faces (start)
+  (while (< start (point))
+    (let ((face (get-text-property start 'face))
+         (next (next-single-property-change 
+                start 'face (current-buffer) (point))))
+      (if face                         ; anything to do?
+         (put-text-property start next 'font-lock-face face))
+      (setq start next))))
+    
 (defun rmail-mime-toggle-button (button)
   "Hide or show the body of the MIME-entity associated with BUTTON."
   (save-excursion
@@ -675,6 +765,8 @@ directly."
                    (setq size (/ (* size 7) 3)))))))
 
     (cond
+     ((string-match "text/html" content-type)
+      (setq type 'html))
      ((string-match "text/" content-type)
       (setq type 'text))
      ((string-match "image/\\(.*\\)" content-type)
@@ -784,6 +876,12 @@ directly."
       (if (rmail-mime-display-body new)
          (cond ((eq (cdr bulk-data) 'text)
                 (rmail-mime-insert-decoded-text entity))
+               ((eq (cdr bulk-data) 'html)
+                ;; Render HTML if display single message, but if searching
+                ;; don't render but just search HTML itself.
+                (if rmail-mime-searching
+                    (rmail-mime-insert-decoded-text entity)
+                  (rmail-mime-insert-html entity)))
                ((cdr bulk-data)
                 (rmail-mime-insert-image entity))
                (t
@@ -918,18 +1016,28 @@ The other arguments are the same as `rmail-mime-multipart-handler'."
       (setq entities (nreverse entities))
       (if (string-match "alternative" subtype)
          ;; Find the best entity to show, and hide all the others.
-         (let (best second)
+         ;; If rmail-mime-prefer-html is set, html is best, then plain.
+         ;; If not, plain is best, then html.
+         ;; Then comes any other text part.
+         ;; If thereto of the same type, earlier entities in the message (later
+         ;; in the reverse list) are preferred.
+         (let (best best-priority)
            (dolist (child entities)
              (if (string= (or (car (rmail-mime-entity-disposition child))
                               (car content-disposition))
                           "inline")
-                 (if (string-match "text/plain"
-                                   (car (rmail-mime-entity-type child)))
-                     (setq best child)
-                   (if (string-match "text/.*"
-                                     (car (rmail-mime-entity-type child)))
-                       (setq second child)))))
-           (or best (not second) (setq best second))
+                 (let ((type (car (rmail-mime-entity-type child))))
+                   (if (string-match "text/" type)
+                       ;; Consider all inline text parts
+                       (let ((priority
+                              (cond ((string-match "text/html" type)
+                                     (if rmail-mime-prefer-html 1 2))
+                                    ((string-match "text/plain" type)
+                                     (if rmail-mime-prefer-html 2 1))
+                                    (t 3))))
+                         (if (or (null best) (<= priority best-priority))
+                             (setq best child
+                                   best-priority priority)))))))
            (dolist (child entities)
              (unless (eq best child)
                (aset (rmail-mime-entity-body child) 2 nil)
@@ -1114,6 +1222,8 @@ modified."
          (cond ((string-match "multipart/.*" (car content-type))
                 (save-restriction
                   (narrow-to-region (1- end) (point-max))
+                  (if (zerop (length parse-tag)) ; top level of message
+                      (aset new 1 (aset tagline 2 nil))) ; don't show tagline
                   (setq children (rmail-mime-process-multipart
                                   content-type
                                   content-disposition
@@ -1134,6 +1244,12 @@ modified."
                     (aset (rmail-mime-entity-tagline msg) 2 nil)
                     (setq children (list msg)
                           handler 'rmail-mime-insert-multipart))))
+               ((and is-inline (string-match "text/html" (car content-type)))
+                ;; Display tagline, so part can be detached
+                (aset new 1 (aset tagline 2 t))
+                (aset new 2 (aset body 2 t)) ; display body also.
+                (setq handler 'rmail-mime-insert-bulk))
+               ;; Inline non-HTML text
                ((and is-inline (string-match "text/" (car content-type)))
                 ;; Don't need a tagline.
                 (aset new 1 (aset tagline 2 nil))
@@ -1186,10 +1302,6 @@ If an error occurs, return an error message string."
                   (new (aref (rmail-mime-entity-display entity) 1)))
              ;; Show header.
              (aset new 0 (aset (rmail-mime-entity-header entity) 2 t))
-             ;; Show tagline if and only if body is not shown.
-             (if (aref new 2)
-                 (aset new 1 (aset (rmail-mime-entity-tagline entity) 2 nil))
-               (aset new 1 (aset (rmail-mime-entity-tagline entity) 2 t)))
              entity)))
       (error (format "%s" err)))))
 
@@ -1390,7 +1502,8 @@ This is the usual value of `rmail-insert-mime-forwarded-message-function'."
   "Function to set in `rmail-search-mime-message-function' (which see)."
   (save-restriction
     (narrow-to-region (rmail-msgbeg msg) (rmail-msgend msg))
-    (let* ((rmail-mime-mbox-buffer (current-buffer))
+    (let* ((rmail-mime-searching t)    ; mark inside search
+          (rmail-mime-mbox-buffer (current-buffer))
           (rmail-mime-view-buffer rmail-view-buffer)
           (header-end (save-excursion
                         (re-search-forward "^$" nil 'move) (point)))
index ca884136a34480ad8a35bc7d044742f46f64ed6a..af08d0f3d3a66e935255f9f8e6e4d351bb5cef55 100644 (file)
@@ -914,7 +914,10 @@ a negative argument means to delete and move backward."
   (unless (numberp count) (setq count 1))
   (let (end del-msg
            (backward (< count 0)))
-    (while (/= count 0)
+    (while (and (/= count 0)
+               ;; Don't waste time if we are at the beginning
+               ;; and trying to go backward.
+               (not (and backward (bobp))))
       (rmail-summary-goto-msg)
       (with-current-buffer rmail-buffer
        (rmail-delete-message)
@@ -924,11 +927,13 @@ a negative argument means to delete and move backward."
                  (save-excursion (beginning-of-line)
                                  (looking-at " *[0-9]+D")))
        (forward-line (if backward -1 1)))
+      (setq count
+           (if (> count 0) (1- count) (1+ count)))
       ;; It looks ugly to move to the empty line at end of buffer.
+      ;; And don't waste time after hitting the end.
       (and (eobp) (not backward)
-          (forward-line -1))
-      (setq count
-           (if (> count 0) (1- count) (1+ count))))))
+          (progn (setq count 0)
+                 (forward-line -1))))))
 
 (defun rmail-summary-delete-backward (&optional count)
   "Delete this message and move to previous nondeleted one.
@@ -939,8 +944,9 @@ a negative argument means to delete and move forward."
   (rmail-summary-delete-forward (- count)))
 
 (defun rmail-summary-mark-deleted (&optional n undel)
-  ;; Since third arg is t, this only alters the summary, not the Rmail buf.
-  (and n (rmail-summary-goto-msg n t t))
+  (and n (not (eq n (rmail-summary-msg-number)))
+       ;; Since third arg is t, this only alters summary, not the Rmail buf.
+       (rmail-summary-goto-msg n t t))
   (or (eobp)
       (not (overlay-get rmail-summary-overlay 'face))
       (let ((buffer-read-only nil))
@@ -951,9 +957,9 @@ a negative argument means to delete and move forward."
                (progn (delete-char 1) (insert " ")))
          (delete-char 1)
          (insert "D"))
-       ;; Register a new summary line.
+       ;; Discard cached new summary line.
        (with-current-buffer rmail-buffer
-         (aset rmail-summary-vector (1- n) (rmail-create-summary-line n)))))
+         (aset rmail-summary-vector (1- n) nil))))
   (beginning-of-line))
 
 (defun rmail-summary-update-line (n)
@@ -1002,7 +1008,7 @@ Optional prefix ARG means undelete ARG previous messages."
                 (set-buffer rmail-buffer)
               (rmail-pop-to-buffer rmail-buffer))
             (and (rmail-message-deleted-p rmail-current-message)
-                 (rmail-undelete-previous-message))
+                 (rmail-undelete-previous-message 1))
             (if rmail-enable-mime
                 (rmail-pop-to-buffer rmail-buffer))
             (rmail-pop-to-buffer rmail-summary-buffer))
@@ -1011,26 +1017,35 @@ Optional prefix ARG means undelete ARG previous messages."
 (defun rmail-summary-undelete-many (&optional n)
   "Undelete all deleted msgs, optional prefix arg N means undelete N prev msgs."
   (interactive "P")
-  (with-current-buffer rmail-buffer
-    (let* ((init-msg (if n rmail-current-message rmail-total-messages))
-          (rmail-current-message init-msg)
-          (n (or n rmail-total-messages))
-          (msgs-undeled 0))
-      (while (and (> rmail-current-message 0)
-                 (< msgs-undeled n))
-       (if (rmail-message-deleted-p rmail-current-message)
-           (progn (rmail-set-attribute rmail-deleted-attr-index nil)
-                  (setq msgs-undeled (1+ msgs-undeled))))
-       (setq rmail-current-message (1- rmail-current-message)))
-      (set-buffer rmail-summary-buffer)
-      (setq rmail-current-message init-msg msgs-undeled 0)
-      (while (and (> rmail-current-message 0)
-                 (< msgs-undeled n))
-       (if (rmail-summary-deleted-p rmail-current-message)
-           (progn (rmail-summary-mark-undeleted rmail-current-message)
-                  (setq msgs-undeled (1+ msgs-undeled))))
-       (setq rmail-current-message (1- rmail-current-message))))
-    (rmail-summary-goto-msg)))
+  (if n
+      (while (and (> n 0) (not (eobp)))
+       (rmail-summary-goto-msg)
+       (let (del-msg)
+         (when (rmail-summary-deleted-p)
+           (with-current-buffer rmail-buffer
+             (rmail-undelete-previous-message 1)
+             (setq del-msg rmail-current-message))
+           (rmail-summary-mark-undeleted del-msg)))
+       (while (and (not (eobp))
+                   (save-excursion (beginning-of-line)
+                                   (looking-at " *[0-9]+ ")))
+         (forward-line 1))
+       (setq n (1- n)))
+    (rmail-summary-goto-msg 1)
+    (dotimes (i rmail-total-messages)
+      (rmail-summary-goto-msg)
+      (let (del-msg)
+       (when (rmail-summary-deleted-p)
+         (with-current-buffer rmail-buffer
+           (rmail-undelete-previous-message 1)
+           (setq del-msg rmail-current-message))
+         (rmail-summary-mark-undeleted del-msg)))
+      (if (not (eobp))
+         (forward-line 1))))
+
+  ;; It looks ugly to move to the empty line at end of buffer.
+  (and (eobp)
+       (forward-line -1)))
 \f
 ;; Rmail Summary mode is suitable only for specially formatted data.
 (put 'rmail-summary-mode 'mode-class 'special)
@@ -1188,6 +1203,13 @@ Search, the `unseen' attribute is restored.")
   (goto-char (posn-point (event-end event)))
   (rmail-summary-goto-msg))
 
+(defun rmail-summary-msg-number ()
+  (save-excursion
+    (beginning-of-line)
+    (string-to-number
+     (buffer-substring (point)
+                      (min (point-max) (+ 6 (point)))))))
+
 (defun rmail-summary-goto-msg (&optional n nowarn skip-rmail)
   "Go to message N in the summary buffer and the Rmail buffer.
 If N is nil, use the message corresponding to point in the summary
index 54f4664e6dbe2ab0d00e5206d433d206448224f3..3440741f573b15635a9e6e8a17d196b5b7bf1120 100644 (file)
@@ -733,7 +733,7 @@ Returns an error if the server cannot be contacted."
                                (plist-get (cdr result) :capabilities)
                                "\r\n")))
                  (let ((name
-                        (with-case-table ascii-case-table
+                        (with-case-table ascii-case-table ;FIXME: Why?
                           (mapcar (lambda (s) (intern (downcase s)))
                                   (split-string (substring line 4) "[ ]")))))
                    (when (= (length name) 1)
index 7a095981ebde4df94be2dd912a5a23f5de752864..4b235302f8b4549289f6224b7995781105c77165 100644 (file)
@@ -1,7 +1,6 @@
 ;;; man.el --- browse UNIX manual pages  -*- coding: utf-8 -*-
 
-;; Copyright (C) 1993-1994, 1996-1997, 2001-2014 Free Software
-;; Foundation, Inc.
+;; Copyright (C) 1993-1994, 1996-1997, 2001-2014 Free Software Foundation, Inc.
 
 ;; Author: Barry A. Warsaw <bwarsaw@cen.com>
 ;; Maintainer: emacs-devel@gnu.org
@@ -174,13 +173,12 @@ Any other value of `Man-notify-method' is equivalent to `meek'."
 
 (defcustom Man-width nil
   "Number of columns for which manual pages should be formatted.
-If nil, the width of the window selected at the moment of man
-invocation is used.  If non-nil, the width of the frame selected
-at the moment of man invocation is used.  The value also can be a
-positive integer."
+If nil, use the width of the window where the manpage is displayed.
+If non-nil, use the width of the frame where the manpage is displayed.
+The value also can be a positive integer for a fixed width."
   :type '(choice (const :tag "Window width" nil)
                  (const :tag "Frame width" t)
-                 (integer :tag "Specific width" :value 65))
+                 (integer :tag "Fixed width" :value 65))
   :group 'man)
 
 (defcustom Man-frame-parameters nil
@@ -695,9 +693,8 @@ a \"/\" as a local filename.  The function returns either `man-db'
             (with-temp-buffer
               (let ((default-directory
                       ;; Ensure that `default-directory' exists and is readable.
-                      (if (and (file-directory-p default-directory)
-                               (file-readable-p default-directory))
-                        default-directory
+                      (if (file-accessible-directory-p default-directory)
+                          default-directory
                         (expand-file-name "~/"))))
                 (ignore-errors
                   (call-process manual-program nil t nil "--help")))
@@ -932,12 +929,14 @@ test/automated/man-tests.el in the emacs bzr repository."
 ;;;###autoload
 (defun man (man-args)
   "Get a Un*x manual page and put it in a buffer.
-This command is the top-level command in the man package.  It
-runs a Un*x command to retrieve and clean a manpage in the
+This command is the top-level command in the man package.
+It runs a Un*x command to retrieve and clean a manpage in the
 background and places the results in a `Man-mode' browsing
-buffer.  See variable `Man-notify-method' for what happens when
-the buffer is ready.  If a buffer already exists for this man
-page, it will display immediately.
+buffer.  The variable `Man-width' defines the number of columns in
+formatted manual pages.  The buffer is displayed immediately.
+The variable `Man-notify-method' defines how the buffer is displayed.
+If a buffer already exists for this man page, it will be displayed
+without running the man command.
 
 For a manpage from a particular section, use either of the
 following.  \"cat(1)\" is how cross-references appear and is
@@ -1032,15 +1031,22 @@ names or descriptions.  The pattern argument is usually an
     ;;               ther is available).
     (when (or window-system
              (not (or (getenv "MANWIDTH") (getenv "COLUMNS"))))
-      ;; This isn't strictly correct, since we don't know how
-      ;; the page will actually be displayed, but it seems
-      ;; reasonable.
+      ;; Since the page buffer is displayed beforehand,
+      ;; we can select its window and get the window/frame width.
       (setenv "COLUMNS" (number-to-string
                         (cond
                          ((and (integerp Man-width) (> Man-width 0))
                           Man-width)
-                         (Man-width (frame-width))
-                         ((window-width))))))
+                         (Man-width
+                          (if (window-live-p (get-buffer-window (current-buffer) t))
+                              (with-selected-window (get-buffer-window (current-buffer) t)
+                                (frame-width))
+                            (frame-width)))
+                         (t
+                          (if (window-live-p (get-buffer-window (current-buffer) t))
+                              (with-selected-window (get-buffer-window (current-buffer) t)
+                                (window-width))
+                            (window-width)))))))
     ;; Since man-db 2.4.3-1, man writes plain text with no escape
     ;; sequences when stdout is not a tty.     In 2.5.0, the following
     ;; env-var was added to allow control of this (see Debian Bug#340673).
@@ -1059,33 +1065,45 @@ Return the buffer in which the manpage will appear."
       (message "Invoking %s %s in the background" manual-program man-args)
       (setq buffer (generate-new-buffer bufname))
       (with-current-buffer buffer
+       (Man-notify-when-ready buffer)
        (setq buffer-undo-list t)
        (setq Man-original-frame (selected-frame))
-       (setq Man-arguments man-args))
-      (Man-start-calling
-       (if (fboundp 'start-process)
-           (set-process-sentinel
-            (start-process manual-program buffer
-                           (if (memq system-type '(cygwin windows-nt))
-                               shell-file-name
-                             "sh")
-                           shell-command-switch
-                           (format (Man-build-man-command) man-args))
-            'Man-bgproc-sentinel)
-         (let ((exit-status
-                (call-process shell-file-name nil (list buffer nil) nil
-                              shell-command-switch
-                              (format (Man-build-man-command) man-args)))
-               (msg ""))
-           (or (and (numberp exit-status)
-                    (= exit-status 0))
-               (and (numberp exit-status)
-                    (setq msg
-                          (format "exited abnormally with code %d"
-                                  exit-status)))
-               (setq msg exit-status))
-           (Man-bgproc-sentinel bufname msg)))))
-      buffer))
+       (setq Man-arguments man-args)
+       (Man-mode)
+       (setq mode-line-process
+             (concat " " (propertize (if Man-fontify-manpage-flag
+                                         "[formatting...]"
+                                       "[cleaning...]")
+                                     'face 'mode-line-emphasis)))
+       (Man-start-calling
+        (if (fboundp 'start-process)
+            (let ((proc (start-process
+                         manual-program buffer
+                         (if (memq system-type '(cygwin windows-nt))
+                             shell-file-name
+                           "sh")
+                         shell-command-switch
+                         (format (Man-build-man-command) man-args))))
+              (set-process-sentinel proc 'Man-bgproc-sentinel)
+              (set-process-filter proc 'Man-bgproc-filter))
+          (let* ((inhibit-read-only t)
+                 (exit-status
+                  (call-process shell-file-name nil (list buffer nil) nil
+                                shell-command-switch
+                                (format (Man-build-man-command) man-args)))
+                 (msg ""))
+            (or (and (numberp exit-status)
+                     (= exit-status 0))
+                (and (numberp exit-status)
+                     (setq msg
+                           (format "exited abnormally with code %d"
+                                   exit-status)))
+                (setq msg exit-status))
+            (if Man-fontify-manpage-flag
+                (Man-fontify-manpage)
+              (Man-cleanup-manpage))
+            (Man-bgproc-sentinel bufname msg))))))
+    buffer))
 
 (defun Man-update-manpage ()
   "Reformat current manpage by calling the man command again synchronously."
@@ -1170,7 +1188,6 @@ See the variable `Man-notify-method' for the different notification behaviors."
   "Convert overstriking and underlining to the correct fonts.
 Same for the ANSI bold and normal escape sequences."
   (interactive)
-  (message "Please wait: formatting the %s man page..." Man-arguments)
   (goto-char (point-min))
   ;; Fontify ANSI escapes.
   (let ((ansi-color-apply-face-function
@@ -1185,7 +1202,7 @@ Same for the ANSI bold and normal escape sequences."
        ;; Multibyte characters exist.
        (progn
          (goto-char (point-min))
-         (while (search-forward "__\b\b" nil t)
+         (while (and (search-forward "__\b\b" nil t) (not (eobp)))
            (backward-delete-char 4)
            (put-text-property (point) (1+ (point)) 'face 'Man-underline))
          (goto-char (point-min))
@@ -1193,7 +1210,7 @@ Same for the ANSI bold and normal escape sequences."
            (backward-delete-char 4)
            (put-text-property (1- (point)) (point) 'face 'Man-underline))))
     (goto-char (point-min))
-    (while (search-forward "_\b" nil t)
+    (while (and (search-forward "_\b" nil t) (not (eobp)))
       (backward-delete-char 2)
       (put-text-property (point) (1+ (point)) 'face 'Man-underline))
     (goto-char (point-min))
@@ -1225,8 +1242,7 @@ Same for the ANSI bold and normal escape sequences."
     (while (re-search-forward Man-heading-regexp nil t)
       (put-text-property (match-beginning 0)
                         (match-end 0)
-                        'face 'Man-overstrike)))
-  (message "%s man page formatted" (Man-page-from-arguments Man-arguments)))
+                        'face 'Man-overstrike))))
 
 (defun Man-highlight-references (&optional xref-man-type)
   "Highlight the references on mouse-over.
@@ -1288,8 +1304,6 @@ Normally skip any jobs that should have been done by the sed script,
 but when called interactively, do those jobs even if the sed
 script would have done them."
   (interactive "p")
-  (message "Please wait: cleaning up the %s man page..."
-          Man-arguments)
   (if (or interactive (not Man-sed-script))
       (progn
        (goto-char (point-min))
@@ -1311,8 +1325,35 @@ script would have done them."
   ;; their preceding chars (but don't put Man-overstrike).  (Bug#5566)
   (goto-char (point-min))
   (while (re-search-forward ".\b" nil t) (backward-delete-char 2))
-  (Man-softhyphen-to-minus)
-  (message "%s man page cleaned up" Man-arguments))
+  (Man-softhyphen-to-minus))
+
+(defun Man-bgproc-filter (process string)
+  "Manpage background process filter.
+When manpage command is run asynchronously, PROCESS is the process
+object for the manpage command; when manpage command is run
+synchronously, PROCESS is the name of the buffer where the manpage
+command is run.  Second argument STRING is the entire string of output."
+  (save-excursion
+    (let ((Man-buffer (process-buffer process)))
+      (if (null (buffer-name Man-buffer)) ;; deleted buffer
+         (set-process-buffer process nil)
+
+       (with-current-buffer Man-buffer
+         (let ((inhibit-read-only t)
+               (beg (marker-position (process-mark process))))
+           (save-excursion
+             (goto-char beg)
+             (insert string)
+             (save-restriction
+               (narrow-to-region
+                (save-excursion
+                  (goto-char beg)
+                  (line-beginning-position))
+                (point))
+               (if Man-fontify-manpage-flag
+                   (Man-fontify-manpage)
+                 (Man-cleanup-manpage)))
+             (set-marker (process-mark process) (point-max)))))))))
 
 (defun Man-bgproc-sentinel (process msg)
   "Manpage background process sentinel.
@@ -1331,63 +1372,75 @@ manpage command."
            (set-process-buffer process nil))
 
       (with-current-buffer Man-buffer
-       (let ((case-fold-search nil))
-         (goto-char (point-min))
-         (cond ((or (looking-at "No \\(manual \\)*entry for")
-                    (looking-at "[^\n]*: nothing appropriate$"))
-                (setq err-mess (buffer-substring (point)
-                                                 (progn
-                                                   (end-of-line) (point)))
-                      delete-buff t))
-
-               ;; "-k foo", successful exit, but no output (from man-db)
-               ;; ENHANCE-ME: share the check for -k with
-               ;; `Man-highlight-references'.  The \\s- bits here are
-               ;; meant to allow for multiple options with -k among them.
-               ((and (string-match "\\(\\`\\|\\s-\\)-k\\s-" Man-arguments)
-                     (eq (process-status process) 'exit)
-                     (= (process-exit-status process) 0)
-                     (= (point-min) (point-max)))
-                (setq err-mess (format "%s: no matches" Man-arguments)
-                      delete-buff t))
-
-               ((or (stringp process)
-                    (not (and (eq (process-status process) 'exit)
-                              (= (process-exit-status process) 0))))
-                (or (zerop (length msg))
-                    (progn
-                      (setq err-mess
-                            (concat (buffer-name Man-buffer)
-                                    ": process "
-                                    (let ((eos (1- (length msg))))
-                                      (if (= (aref msg eos) ?\n)
-                                          (substring msg 0 eos) msg))))
-                      (goto-char (point-max))
-                      (insert (format "\nprocess %s" msg))))
-                ))
-        (if delete-buff
-            (kill-buffer Man-buffer)
-          (if Man-fontify-manpage-flag
-              (Man-fontify-manpage)
-            (Man-cleanup-manpage))
-
-          (run-hooks 'Man-cooked-hook)
-         (Man-mode)
-
-         (if (not Man-page-list)
-             (let ((args Man-arguments))
-               (kill-buffer (current-buffer))
-               (user-error "Can't find the %s manpage"
-                            (Man-page-from-arguments args)))
-           (set-buffer-modified-p nil))))
-       ;; Restore case-fold-search before calling
-       ;; Man-notify-when-ready because it may switch buffers.
-
-       (if (not delete-buff)
-           (Man-notify-when-ready Man-buffer))
+       (save-excursion
+         (let ((case-fold-search nil))
+           (goto-char (point-min))
+           (cond ((or (looking-at "No \\(manual \\)*entry for")
+                      (looking-at "[^\n]*: nothing appropriate$"))
+                  (setq err-mess (buffer-substring (point)
+                                                   (progn
+                                                     (end-of-line) (point)))
+                        delete-buff t))
+
+                 ;; "-k foo", successful exit, but no output (from man-db)
+                 ;; ENHANCE-ME: share the check for -k with
+                 ;; `Man-highlight-references'.  The \\s- bits here are
+                 ;; meant to allow for multiple options with -k among them.
+                 ((and (string-match "\\(\\`\\|\\s-\\)-k\\s-" Man-arguments)
+                       (eq (process-status process) 'exit)
+                       (= (process-exit-status process) 0)
+                       (= (point-min) (point-max)))
+                  (setq err-mess (format "%s: no matches" Man-arguments)
+                        delete-buff t))
+
+                 ((or (stringp process)
+                      (not (and (eq (process-status process) 'exit)
+                                (= (process-exit-status process) 0))))
+                  (or (zerop (length msg))
+                      (progn
+                        (setq err-mess
+                              (concat (buffer-name Man-buffer)
+                                      ": process "
+                                      (let ((eos (1- (length msg))))
+                                        (if (= (aref msg eos) ?\n)
+                                            (substring msg 0 eos) msg))))
+                        (goto-char (point-max))
+                        (insert (format "\nprocess %s" msg))))
+                  ))
+           (if delete-buff
+               (if (window-live-p (get-buffer-window Man-buffer t))
+                   (quit-restore-window
+                    (get-buffer-window Man-buffer t) 'kill)
+                 (kill-buffer Man-buffer))
+
+             (run-hooks 'Man-cooked-hook)
+
+             (Man-build-page-list)
+             (Man-strip-page-headers)
+             (Man-unindent)
+             (Man-goto-page 1 t)
+
+             (if (not Man-page-list)
+                 (let ((args Man-arguments))
+                   (if (window-live-p (get-buffer-window (current-buffer) t))
+                       (quit-restore-window
+                        (get-buffer-window (current-buffer) t) 'kill)
+                     (kill-buffer (current-buffer)))
+                   (message "Can't find the %s manpage"
+                            (Man-page-from-arguments args)))
+
+               (if Man-fontify-manpage-flag
+                   (message "%s man page formatted"
+                            (Man-page-from-arguments Man-arguments))
+                 (message "%s man page cleaned up"
+                          (Man-page-from-arguments Man-arguments)))
+               (unless (and (processp process)
+                            (not (eq (process-status process) 'exit)))
+                 (setq mode-line-process nil))
+               (set-buffer-modified-p nil)))))
 
        (if err-mess
-           (error "%s" err-mess))
+           (message "%s" err-mess))
        ))))
 
 (defun Man-page-from-arguments (args)
@@ -1431,7 +1484,7 @@ The following man commands are available in the buffer.  Try
 The following variables may be of some use.  Try
 \"\\[describe-variable] <variable-name> RET\" for more information:
 
-`Man-notify-method'            What happens when manpage formatting is done.
+`Man-notify-method'            What happens when manpage is ready to display.
 `Man-downcase-section-letters-flag' Force section letters to lower case.
 `Man-circular-pages-flag'      Treat multiple manpage list as circular.
 `Man-section-translations-alist' List of section numbers and their Un*x equiv.
@@ -1460,11 +1513,7 @@ The following key bindings are currently in effect in the buffer:
   (set (make-local-variable 'outline-regexp) Man-heading-regexp)
   (set (make-local-variable 'outline-level) (lambda () 1))
   (set (make-local-variable 'bookmark-make-record-function)
-       'Man-bookmark-make-record)
-  (Man-build-page-list)
-  (Man-strip-page-headers)
-  (Man-unindent)
-  (Man-goto-page 1 t))
+       'Man-bookmark-make-record))
 
 (defsubst Man-build-section-alist ()
   "Build the list of manpage sections."
@@ -1518,7 +1567,6 @@ The following key bindings are currently in effect in the buffer:
        (page-end (point-max))
        (header ""))
     (goto-char page-start)
-    ;; (switch-to-buffer (current-buffer))(debug)
     (while (not (eobp))
       (setq header
            (if (looking-at Man-page-header-regexp)
index 19c8bdd4e24d89a04d5a58b2437c2246f2eeb596..5ae5da9aff2ac3295f1f90cdb9b6c045f4925889 100644 (file)
                        [paste-from-menu])
       ;; ns-win.el said: Change text to be more consistent with
       ;; surrounding menu items `paste', etc."
-      `(menu-item ,(if (featurep 'ns) "Select and Paste"
-                     "Paste from Kill Menu") yank-menu
+      `(menu-item ,(if (featurep 'ns) "Select and Paste" "Paste from Kill Menu")
+                  yank-menu
                   :enable (and (cdr yank-menu) (not buffer-read-only))
                   :help "Choose a string from the kill ring and paste it"))
     (bindings--define-key menu [paste]
       '(menu-item "Paste" yank
                   :enable (and (or
-                                ;; Emacs compiled --without-x (or --with-ns)
-                                ;; doesn't have x-selection-exists-p.
-                                (and (fboundp 'x-selection-exists-p)
-                                     (x-selection-exists-p 'CLIPBOARD))
+                                (gui-call gui-selection-exists-p 'CLIPBOARD)
                                 (if (featurep 'ns) ; like paste-from-menu
                                     (cdr yank-menu)
                                   kill-ring))
      '(and mark-active (not buffer-read-only)))
 (put 'clipboard-kill-ring-save 'menu-enable 'mark-active)
 (put 'clipboard-yank 'menu-enable
-     '(and (or (not (fboundp 'x-selection-exists-p))
-              (x-selection-exists-p)
-              (x-selection-exists-p 'CLIPBOARD))
+     '(and (or (gui-call gui-selection-exists-p 'PRIMARY)
+              (gui-call gui-selection-exists-p 'CLIPBOARD))
           (not buffer-read-only)))
 
 (defun clipboard-yank ()
   "Insert the clipboard contents, or the last stretch of killed text."
   (interactive "*")
-  (let ((x-select-enable-clipboard t))
+  (let ((gui-select-enable-clipboard t))
     (yank)))
 
 (defun clipboard-kill-ring-save (beg end &optional region)
-  "Copy region to kill ring, and save in the X clipboard."
+  "Copy region to kill ring, and save in the GUI's clipboard."
   (interactive "r\np")
-  (let ((x-select-enable-clipboard t))
+  (let ((gui-select-enable-clipboard t))
     (kill-ring-save beg end region)))
 
 (defun clipboard-kill-region (beg end &optional region)
-  "Kill the region, and save it in the X clipboard."
+  "Kill the region, and save it in the GUI's clipboard."
   (interactive "r\np")
-  (let ((x-select-enable-clipboard t))
+  (let ((gui-select-enable-clipboard t))
     (kill-region beg end region)))
 
 (defun menu-bar-enable-clipboard ()
@@ -887,8 +883,33 @@ by \"Save Options\" in Custom buffers.")
   (interactive)
   (customize-set-variable 'scroll-bar-mode nil))
 
+(defun menu-bar-horizontal-scroll-bar ()
+  "Display horizontal scroll bars on each window."
+  (interactive)
+  (customize-set-variable 'horizontal-scroll-bar-mode t))
+
+(defun menu-bar-no-horizontal-scroll-bar ()
+  "Turn off horizontal scroll bars."
+  (interactive)
+  (customize-set-variable 'horizontal-scroll-bar-mode nil))
+
 (defvar menu-bar-showhide-scroll-bar-menu
   (let ((menu (make-sparse-keymap "Scroll-bar")))
+    (bindings--define-key menu [horizontal]
+      '(menu-item "Horizontal"
+                  menu-bar-horizontal-scroll-bar
+                  :help "Horizontal scroll bar"
+                  :visible (horizontal-scroll-bars-available-p)
+                  :button (:radio . (cdr (assq 'horizontal-scroll-bars
+                                              (frame-parameters))))))
+
+    (bindings--define-key menu [none-horizontal]
+      '(menu-item "None-horizontal"
+                  menu-bar-no-horizontal-scroll-bar
+                  :help "Turn off horizontal scroll bars"
+                  :visible (horizontal-scroll-bars-available-p)
+                  :button (:radio . (not (cdr (assq 'horizontal-scroll-bars
+                                                   (frame-parameters)))))))
 
     (bindings--define-key menu [right]
       '(menu-item "On the Right"
@@ -896,7 +917,8 @@ by \"Save Options\" in Custom buffers.")
                   :help "Scroll-bar on the right side"
                   :visible (display-graphic-p)
                   :button (:radio . (eq (cdr (assq 'vertical-scroll-bars
-                                                   (frame-parameters))) 'right))))
+                                                   (frame-parameters)))
+                                       'right))))
 
     (bindings--define-key menu [left]
       '(menu-item "On the Left"
@@ -904,7 +926,8 @@ by \"Save Options\" in Custom buffers.")
                   :help "Scroll-bar on the left side"
                   :visible (display-graphic-p)
                   :button (:radio . (eq (cdr (assq 'vertical-scroll-bars
-                                                   (frame-parameters))) 'left))))
+                                                   (frame-parameters)))
+                                       'left))))
 
     (bindings--define-key menu [none]
       '(menu-item "None"
@@ -912,7 +935,8 @@ by \"Save Options\" in Custom buffers.")
                   :help "Turn off scroll-bar"
                   :visible (display-graphic-p)
                   :button (:radio . (eq (cdr (assq 'vertical-scroll-bars
-                                                   (frame-parameters))) nil))))
+                                                   (frame-parameters)))
+                                       nil))))
     menu))
 
 (defun menu-bar-frame-for-menubar ()
@@ -1302,9 +1326,6 @@ mail status in mode line"))
     (bindings--define-key menu [life]
       '(menu-item "Life"  life
                   :help "Watch how John Conway's cellular automaton evolves"))
-    (bindings--define-key menu [land]
-      '(menu-item "Landmark" landmark
-                  :help "Watch a neural-network robot learn landmarks"))
     (bindings--define-key menu [hanoi]
       '(menu-item "Towers of Hanoi" hanoi
                   :help "Watch Towers-of-Hanoi puzzle solved by Emacs"))
@@ -1958,11 +1979,10 @@ It must accept a buffer as its only required argument.")
                    (dolist (pair alist)
                      (setq i (1- i))
                      (aset buffers-vec i
-                          (nconc (list (car pair)
-                                       (cons nil nil))
-                                 `(lambda ()
-                                     (interactive)
-                                     (funcall menu-bar-select-buffer-function ,(cdr pair))))))
+                          (cons (car pair)
+                                 `(lambda ()
+                                    (interactive)
+                                    (funcall menu-bar-select-buffer-function ,(cdr pair))))))
                    (list buffers-vec))))
 
         ;; Make a Frames menu if we have more than one frame.
@@ -1974,10 +1994,8 @@ It must accept a buffer as its only required argument.")
                   (i 0))
              (dolist (frame frames)
                (aset frames-vec i
-                     (nconc
-                      (list
-                       (frame-parameter frame 'name)
-                       (cons nil nil))
+                     (cons
+                      (frame-parameter frame 'name)
                       `(lambda ()
                          (interactive) (menu-bar-select-frame ,frame))))
                (setq i (1+ i)))
@@ -2140,6 +2158,13 @@ See `menu-bar-mode' for more information."
 (declare-function x-menu-bar-open "term/x-win" (&optional frame))
 (declare-function w32-menu-bar-open "term/w32-win" (&optional frame))
 
+(defun lookup-key-ignore-too-long (map key)
+  "Call `lookup-key' and convert numeric values to nil."
+  (let ((binding (lookup-key map key)))
+    (if (numberp binding)       ; `too long'
+        nil
+      binding)))
+
 (defun popup-menu (menu &optional position prefix from-menu-bar)
   "Popup the given menu and call the selected option.
 MENU can be a keymap, an easymenu-style menu or a list of keymaps as for
@@ -2192,11 +2217,9 @@ FROM-MENU-BAR, if non-nil, means we are dropping one of menu-bar's menus."
              (let ((mouse-click (apply 'vector event))
                    binding)
                (while (and map (null binding))
-                 (setq binding (lookup-key (car map) mouse-click))
-                 (if (numberp binding) ; `too long'
-                     (setq binding nil))
+                 (setq binding (lookup-key-ignore-too-long (car map) mouse-click))
                  (setq map (cdr map)))
-                 binding))
+                binding))
             (t
              ;; We were given a single keymap.
              (lookup-key map (apply 'vector event)))))
@@ -2276,8 +2299,10 @@ If FRAME is nil or not given, use the selected frame."
       (let* ((x tty-menu--initial-menu-x)
             (menu (menu-bar-menu-at-x-y x 0 frame)))
        (popup-menu (or
-                    (lookup-key global-map (vector 'menu-bar menu))
-                    (lookup-key (current-local-map) (vector 'menu-bar menu))
+                    (lookup-key-ignore-too-long
+                      global-map (vector 'menu-bar menu))
+                    (lookup-key-ignore-too-long
+                      (current-local-map) (vector 'menu-bar menu))
                     (cdar (minor-mode-key-binding (vector 'menu-bar menu))))
                    (posn-at-x-y x 0 nil t) nil t)))
      (t (with-selected-frame (or frame (selected-frame))
index e0beeef46de3f309b05646c06541e6413b7b8db0..8008f07c700bc9910bee6ddbf7573ba24494434f 100644 (file)
@@ -9,13 +9,17 @@
        * mh-comp.el (mh-insert-x-face): Ensure that mh-x-face-file is a
        string before trying to use it (closes SF #474).
        (mh-bare-components): New function to create a temporary initial
-       components file; replaces mh-find-components. Improve the temp
-       folder and file names as per a suggestion from Bill Wohler. Also
+       components file; replaces mh-find-components.  Improve the temp
+       folder and file names as per a suggestion from Bill Wohler.  Also
        address XEmacs compatibility issues: use mm-make-temp-file instead
        of make-temp-file, and only pass one argument to delete-directory.
        (mh-edit-again, mh-send-sub): Use mh-bare-components instead of
        mh-find-components (partially closes SF #468).
 
+2014-05-09  Glenn Morris  <rgm@gnu.org>
+
+       * mh-e.el (mh-variants): Use file-accessible-directory-p.
+
 2014-03-16  Bill Wohler  <wohler@newt.com>
 
        * mh-folder.el (mh-regenerate-headers): Fix scan: bad message list
index 7abd16bd83211f52fec16db14c50e67c89607ceb..21526c80d0a4777c9649a1f5da5fffd378604ece 100644 (file)
 
 ;;; Compatibility
 
+;; TODO: Replace `cl' with `cl-lib'.
+;; `cl' is deprecated in Emacs 24.3. Use `cl-lib' instead. However,
+;; we'll likely have to insert `cl-' before each use of a Common Lisp
+;; function.
 ;;;###mh-autoload
 (defmacro mh-require-cl ()
   "Macro to load \"cl\" if needed.
index 920fef81dd4342328f198a76e3fbb9b4bef30931..06f48e95c4b49534fe14a9ddc9fca68fe3a106d9 100644 (file)
@@ -1,7 +1,7 @@
 ;;; mh-e.el --- GNU Emacs interface to the MH mail system
 
-;; Copyright (C) 1985-1988, 1990, 1992-1995, 1997, 1999-2014 Free
-;; Software Foundation, Inc.
+;; Copyright (C) 1985-1988, 1990, 1992-1995, 1997, 1999-2014
+;;   Free Software Foundation, Inc.
 
 ;; Author: Bill Wohler <wohler@newt.com>
 ;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -739,7 +739,7 @@ is described by the variable `mh-variants'."
             (setq dir (file-chase-links (directory-file-name dir)))
             (add-to-list 'list-unique dir))
       (loop for dir in (nreverse list-unique) do
-            (when (and dir (file-directory-p dir) (file-readable-p dir))
+            (when (and dir (file-accessible-directory-p dir))
               (let ((variant (mh-variant-info dir)))
                 (if variant
                     (add-to-list 'mh-variants variant)))))
index 2c0541ac0966a8299fcce0b13e24e1044c24aec7..fb74af2e0df3a165d65abf4fcaa4a351ac7cbcd3 100644 (file)
@@ -244,8 +244,7 @@ The result is a completion table which completes strings of the
 form (concat S1 S) in the same way as TABLE completes strings of
 the form (concat S2 S)."
   (lambda (string pred action)
-    (let* ((str (if (eq t (compare-strings string 0 (length s1) s1 nil nil
-                                           completion-ignore-case))
+    (let* ((str (if (string-prefix-p s1 string completion-ignore-case)
                     (concat s2 (substring string (length s1)))))
            (res (if str (complete-with-action action table str pred))))
       (when res
@@ -257,8 +256,7 @@ the form (concat S2 S)."
                     (+ beg (- (length s1) (length s2))))
               . ,(and (eq (car-safe res) 'boundaries) (cddr res)))))
          ((stringp res)
-          (if (eq t (compare-strings res 0 (length s2) s2 nil nil
-                                     completion-ignore-case))
+          (if (string-prefix-p s2 string completion-ignore-case)
               (concat s1 (substring res (length s2)))))
          ((eq action t)
           (let ((bounds (completion-boundaries str table pred "")))
@@ -873,6 +871,7 @@ completing buffer and file names, respectively."
   ;; part of the string (e.g. substitute-in-file-name).
   (let ((requote
          (when (completion-metadata-get metadata 'completion--unquote-requote)
+           (cl-assert (functionp table))
            (let ((new (funcall table string point 'completion--unquote)))
              (setq string (pop new))
              (setq table (pop new))
@@ -1117,9 +1116,10 @@ If no characters can be completed, display a list of possible completions.
 If you repeat this command after it displayed such a list,
 scroll the window of possible completions."
   (interactive)
-  (completion-in-region (minibuffer-prompt-end) (point-max)
-                        minibuffer-completion-table
-                        minibuffer-completion-predicate))
+  (when (<= (minibuffer-prompt-end) (point))
+    (completion-in-region (minibuffer-prompt-end) (point-max)
+                          minibuffer-completion-table
+                          minibuffer-completion-predicate)))
 
 (defun completion--in-region-1 (beg end)
   ;; If the previous command was not this,
@@ -1794,8 +1794,29 @@ variables.")
              ;; window, mark it as softly-dedicated, so bury-buffer in
              ;; minibuffer-hide-completions will know whether to
              ;; delete the window or not.
-             (display-buffer-mark-dedicated 'soft))
-        (with-output-to-temp-buffer "*Completions*"
+             (display-buffer-mark-dedicated 'soft)
+             ;; Disable `pop-up-windows' temporarily to allow
+             ;; `display-buffer--maybe-pop-up-frame-or-window'
+             ;; in the display actions below to pop up a frame
+             ;; if `pop-up-frames' is non-nil, but not to pop up a window.
+             (pop-up-windows nil))
+        (with-displayed-buffer-window
+          "*Completions*"
+          ;; This is a copy of `display-buffer-fallback-action'
+          ;; where `display-buffer-use-some-window' is replaced
+          ;; with `display-buffer-at-bottom'.
+          `((display-buffer--maybe-same-window
+             display-buffer-reuse-window
+             display-buffer--maybe-pop-up-frame-or-window
+             ;; Use `display-buffer-below-selected' for inline completions,
+             ;; but not in the minibuffer (e.g. in `eval-expression')
+             ;; for which `display-buffer-at-bottom' is used.
+             ,(if (and completion-in-region-mode-predicate
+                       (not (minibuffer-selected-window)))
+                  'display-buffer-below-selected
+                'display-buffer-at-bottom))
+            (window-height . fit-window-to-buffer))
+          nil
           ;; Remove the base-size tail because `sort' requires a properly
           ;; nil-terminated list.
           (when last (setcdr last nil))
@@ -2085,7 +2106,11 @@ The completion method is determined by `completion-at-point-functions'."
          (completion-in-region start end collection
                                (plist-get plist :predicate))))
       ;; Maybe completion already happened and the function returned t.
-      (_ (cdr res)))))
+      (_
+       (when (cdr res)
+         (message "Warning: %S failed to return valid completion data!"
+                  (car res)))
+       (cdr res)))))
 
 (defun completion-help-at-point ()
   "Display the completions on the text around point.
@@ -3065,16 +3090,9 @@ filter out additional entries (because TABLE might not obey PRED)."
       (nconc (completion-pcm--hilit-commonality pattern all)
              (length prefix)))))
 
-(defun completion--sreverse (str)
-  "Like `reverse' but for a string STR rather than a list."
-  (apply #'string (nreverse (mapcar 'identity str))))
-
 (defun completion--common-suffix (strs)
   "Return the common suffix of the strings STRS."
-  (completion--sreverse
-   (try-completion
-    ""
-    (mapcar #'completion--sreverse strs))))
+  (nreverse (try-completion "" (mapcar #'reverse strs))))
 
 (defun completion-pcm--merge-completions (strs pattern)
   "Extract the commonality in STRS, with the help of PATTERN.
@@ -3292,6 +3310,7 @@ the same set of elements."
                 (string-match completion-pcm--delim-wild-regex str
                               (car bounds)))
       (if (zerop (car bounds))
+          ;; FIXME: Don't hardcode "-" (bug#17559).
           (mapconcat 'string str "-")
         ;; If there's a boundary, it's trickier.  The main use-case
         ;; we consider here is file-name completion.  We'd like
index b8bd339acb3ad8482867b3b50b35d9bd28f0ee47..ddfb879318ff74a239a63638976096be0bdc24a1 100644 (file)
@@ -147,7 +147,7 @@ If you have the bug (or the real fix :-), please let me know."
       ;; Third, set the selection.
       ;; (setq me-beg beg me-end end me-range range)  ; for debugging
       (set-buffer end-buffer)
-      (x-set-selection 'SECONDARY (buffer-substring beg end)))))
+      (gui-set-selection 'SECONDARY (buffer-substring beg end)))))
 
 
 (defun mouse-drag-secondary-pasting (start-event)
@@ -203,7 +203,7 @@ by johnh@ficus.cs.ucla.edu."
     (kill-region (overlay-start mouse-secondary-overlay)
                 (overlay-end mouse-secondary-overlay)))
   ;; (delete-overlay mouse-secondary-overlay)
-  ;; (x-set-selection 'SECONDARY nil)
+  ;; (gui-set-selection 'SECONDARY nil)
   ;; (setq mouse-secondary-overlay nil)
 )
 
index d84c6c119ede03caa34c0a258041d5ab014e3e17..f569ec3577d26ac3918ce51eee2c758f220a5263 100644 (file)
@@ -307,13 +307,14 @@ This command must be bound to a mouse click."
     (or (eq frame oframe)
        (set-mouse-position (selected-frame) (1- (frame-width)) 0))))
 
-(defun mouse-tear-off-window (click)
-  "Delete the window clicked on, and create a new frame displaying its buffer."
+(define-obsolete-function-alias 'mouse-tear-off-window 'tear-off-window "24.4")
+(defun tear-off-window (click)
+  "Delete the selected window, and create a new frame displaying its buffer."
   (interactive "e")
   (mouse-minibuffer-check click)
   (let* ((window (posn-window (event-start click)))
         (buf (window-buffer window))
-        (frame (make-frame)))
+        (frame (make-frame)))          ;FIXME: Use pop-to-buffer.
     (select-frame frame)
     (switch-to-buffer buf)
     (delete-window window)))
@@ -509,14 +510,18 @@ must be one of the symbols `header', `mode', or `vertical'."
   (interactive "e")
   (mouse-drag-line start-event 'vertical))
 \f
-(defun mouse-set-point (event)
+(defun mouse-set-point (event &optional promote-to-region)
   "Move point to the position clicked on with the mouse.
-This should be bound to a mouse click event type."
-  (interactive "e")
+This should be bound to a mouse click event type.
+If PROMOTE-TO-REGION is non-nil and event is a multiple-click,
+select the corresponding element around point."
+  (interactive "e\np")
   (mouse-minibuffer-check event)
-  ;; Use event-end in case called from mouse-drag-region.
-  ;; If EVENT is a click, event-end and event-start give same value.
-  (posn-set-point (event-end event)))
+  (if (and promote-to-region (> (event-click-count event) 1))
+      (mouse-set-region event)
+    ;; Use event-end in case called from mouse-drag-region.
+    ;; If EVENT is a click, event-end and event-start give same value.
+    (posn-set-point (event-end event))))
 
 (defvar mouse-last-region-beg nil)
 (defvar mouse-last-region-end nil)
@@ -529,6 +534,8 @@ This should be bound to a mouse click event type."
        (eq mouse-last-region-end (region-end))
        (eq mouse-last-region-tick (buffer-modified-tick))))
 
+(defvar mouse--drag-start-event nil)
+
 (defun mouse-set-region (click)
   "Set the region to the text dragged over, and copy to kill ring.
 This should be bound to a mouse drag event.
@@ -538,7 +545,29 @@ command alters the kill ring or not."
   (mouse-minibuffer-check click)
   (select-window (posn-window (event-start click)))
   (let ((beg (posn-point (event-start click)))
-       (end (posn-point (event-end click))))
+       (end (posn-point (event-end click)))
+        (click-count (event-click-count click)))
+    (let ((drag-start (terminal-parameter nil 'mouse-drag-start)))
+      (when drag-start
+        ;; Drag events don't come with a click count, sadly, so we hack
+        ;; our way around this problem by remembering the start-event in
+        ;; `mouse-drag-start' and fetching the click-count from there.
+        (when (and (<= click-count 1)
+                   (equal beg (posn-point (event-start drag-start))))
+          (setq click-count (event-click-count drag-start)))
+        ;; Occasionally we get spurious drag events where the user hasn't
+        ;; dragged his mouse, but instead Emacs has dragged the text under the
+        ;; user's mouse.  Try to recover those cases (bug#17562).
+        (when (and (equal (posn-x-y (event-start click))
+                          (posn-x-y (event-end click)))
+                   (not (eq (car drag-start) 'mouse-movement)))
+          (setq end beg))
+        (setf (terminal-parameter nil 'mouse-drag-start) nil)))
+    (when (and (integerp beg) (integerp end))
+      (let ((range (mouse-start-end beg end (1- click-count))))
+        (if (< end beg)
+            (setq end (nth 0 range) beg (nth 1 range))
+          (setq beg (nth 0 range) end (nth 1 range)))))
     (and mouse-drag-copy-region (integerp beg) (integerp end)
         ;; Don't set this-command to `kill-region', so a following
         ;; C-w won't double the text in the kill ring.  Ignore
@@ -558,10 +587,10 @@ command alters the kill ring or not."
 (defun mouse-set-region-1 ()
   ;; Set transient-mark-mode for a little while.
   (unless (eq (car-safe transient-mark-mode) 'only)
-    (setq transient-mark-mode
-         (cons 'only
-               (unless (eq transient-mark-mode 'lambda)
-                 transient-mark-mode))))
+    (setq-local transient-mark-mode
+                (cons 'only
+                      (unless (eq transient-mark-mode 'lambda)
+                        transient-mark-mode))))
   (setq mouse-last-region-beg (region-beginning))
   (setq mouse-last-region-end (region-end))
   (setq mouse-last-region-tick (buffer-modified-tick)))
@@ -632,13 +661,11 @@ Upon exit, point is at the far edge of the newly visible text."
 Highlight the drag area as you move the mouse.
 This must be bound to a button-down mouse event.
 In Transient Mark mode, the highlighting remains as long as the mark
-remains active.  Otherwise, it remains until the next input event.
-
-If the click is in the echo area, display the `*Messages*' buffer."
+remains active.  Otherwise, it remains until the next input event."
   (interactive "e")
   ;; Give temporary modes such as isearch a chance to turn off.
   (run-hooks 'mouse-leave-buffer-hook)
-  (mouse-drag-track start-event t))
+  (mouse-drag-track start-event))
 
 
 (defun mouse-posn-property (pos property)
@@ -655,10 +682,11 @@ its value is returned."
            (str (posn-string pos)))
        (or (and str
                 (get-text-property (cdr str) property (car str)))
-            ;; FIXME: mouse clicks on the mode-line come with a position in
-            ;; (nth 5).  Maybe we should change the C code instead so that
-            ;; mouse-clicks don't include a position there!
-           (and pt (not (memq (posn-area pos) '(mode-line header-line)))
+            ;; Mouse clicks in the fringe come with a position in
+            ;; (nth 5).  This is useful but is not exactly where we clicked, so
+            ;; don't look up that position's properties!
+           (and pt (not (memq (posn-area pos) '(left-fringe right-fringe
+                                                 left-margin right-margin)))
                 (get-char-property pt property w))))
     (get-char-property pos property)))
 
@@ -745,12 +773,9 @@ at the same position."
                    "mouse-1" (substring msg 7)))))))
   msg)
 
-(defun mouse-drag-track (start-event  &optional
-                                     do-mouse-drag-region-post-process)
+(defun mouse-drag-track (start-event)
     "Track mouse drags by highlighting area between point and cursor.
-The region will be defined with mark and point.
-DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by
-`mouse-drag-region'."
+The region will be defined with mark and point."
   (mouse-minibuffer-check start-event)
   (setq mouse-selection-click-count-buffer (current-buffer))
   (deactivate-mark)
@@ -763,8 +788,6 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by
         (start-posn (event-start start-event))
         (start-point (posn-point start-posn))
         (start-window (posn-window start-posn))
-        (start-window-start (window-start start-window))
-        (start-hscroll (window-hscroll start-window))
         (bounds (window-edges start-window))
         (make-cursor-line-fully-visible nil)
         (top (nth 1 bounds))
@@ -775,9 +798,7 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by
         (click-count (1- (event-click-count start-event)))
         ;; Suppress automatic hscrolling, because that is a nuisance
         ;; when setting point near the right fringe (but see below).
-        (auto-hscroll-mode-saved auto-hscroll-mode)
-        (auto-hscroll-mode nil)
-        moved-off-start event end end-point)
+        (auto-hscroll-mode-saved auto-hscroll-mode))
 
     (setq mouse-selection-click-count click-count)
     ;; In case the down click is in the middle of some intangible text,
@@ -788,93 +809,51 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by
 
     ;; Activate the region, using `mouse-start-end' to determine where
     ;; to put point and mark (e.g., double-click will select a word).
-    (setq transient-mark-mode
-         (if (eq transient-mark-mode 'lambda)
-             '(only)
-           (cons 'only transient-mark-mode)))
+    (setq-local transient-mark-mode
+                (if (eq transient-mark-mode 'lambda)
+                    '(only)
+                  (cons 'only transient-mark-mode)))
     (let ((range (mouse-start-end start-point start-point click-count)))
       (push-mark (nth 0 range) t t)
       (goto-char (nth 1 range)))
 
-    ;; Track the mouse until we get a non-movement event.
-    (track-mouse
-      (while (progn
-              (setq event (read-event))
-              (or (mouse-movement-p event)
-                  (memq (car-safe event) '(switch-frame select-window))))
-       (unless (memq (car-safe event) '(switch-frame select-window))
-         ;; Automatic hscrolling did not occur during the call to
-         ;; `read-event'; but if the user subsequently drags the
-         ;; mouse, go ahead and hscroll.
-         (let ((auto-hscroll-mode auto-hscroll-mode-saved))
-           (redisplay))
-         (setq end (event-end event)
-               end-point (posn-point end))
-         ;; Note whether the mouse has left the starting position.
-         (unless (eq end-point start-point)
-           (setq moved-off-start t))
-         (if (and (eq (posn-window end) start-window)
-                  (integer-or-marker-p end-point))
-             (mouse--drag-set-mark-and-point start-point
-                                             end-point click-count)
-           (let ((mouse-row (cdr (cdr (mouse-position)))))
-             (cond
-              ((null mouse-row))
-              ((< mouse-row top)
-               (mouse-scroll-subr start-window (- mouse-row top)
-                                  nil start-point))
-              ((>= mouse-row bottom)
-               (mouse-scroll-subr start-window (1+ (- mouse-row bottom))
-                                  nil start-point))))))))
-
-    ;; Handle the terminating event if possible.
-    (when (consp event)
-      ;; Ensure that point is on the end of the last event.
-      (when (and (setq end-point (posn-point (event-end event)))
-                (eq (posn-window end) start-window)
-                (integer-or-marker-p end-point)
-                (/= start-point end-point))
-       (mouse--drag-set-mark-and-point start-point
-                                       end-point click-count))
-
-      ;; Find its binding.
-      (let* ((fun (key-binding (vector (car event))))
-            ;; FIXME This doesn't make sense, because
-            ;; event-click-count always returns something >= 1.
-            (do-multi-click (and (> (event-click-count event) 0)
-                                 (functionp fun)
-                                 (not (memq fun '(mouse-set-point
-                                                  mouse-set-region))))))
-       (if (and (/= (mark) (point))
-                (not do-multi-click))
-
-           ;; If point has moved, finish the drag.
-           (let* (last-command this-command)
-             (and mouse-drag-copy-region
-                  do-mouse-drag-region-post-process
-                  (let (deactivate-mark)
-                    (copy-region-as-kill (mark) (point)))))
-
-         ;; Otherwise, run binding of terminating up-event.
+    (setf (terminal-parameter nil 'mouse-drag-start) start-event)
+    (setq track-mouse t)
+    (setq auto-hscroll-mode nil)
+
+    (set-transient-map
+     (let ((map (make-sparse-keymap)))
+       (define-key map [switch-frame] #'ignore)
+       (define-key map [select-window] #'ignore)
+       (define-key map [mouse-movement]
+         (lambda (event) (interactive "e")
+           (let* ((end (event-end event))
+                  (end-point (posn-point end)))
+             (unless (eq end-point start-point)
+               ;; As soon as the user moves, we can re-enable auto-hscroll.
+               (setq auto-hscroll-mode auto-hscroll-mode-saved)
+               ;; And remember that we have moved, so mouse-set-region can know
+               ;; its event is really a drag event.
+               (setcar start-event 'mouse-movement))
+             (if (and (eq (posn-window end) start-window)
+                      (integer-or-marker-p end-point))
+                 (mouse--drag-set-mark-and-point start-point
+                                                 end-point click-count)
+               (let ((mouse-row (cdr (cdr (mouse-position)))))
+                 (cond
+                  ((null mouse-row))
+                  ((< mouse-row top)
+                   (mouse-scroll-subr start-window (- mouse-row top)
+                                      nil start-point))
+                  ((>= mouse-row bottom)
+                   (mouse-scroll-subr start-window (1+ (- mouse-row bottom))
+                                      nil start-point))))))))
+       map)
+     t (lambda ()
+         (setq track-mouse nil)
+         (setq auto-hscroll-mode auto-hscroll-mode-saved)
           (deactivate-mark)
-         (if do-multi-click
-             (goto-char start-point)
-           (unless moved-off-start
-             (pop-mark)))
-
-         (when (and (functionp fun)
-                    (= start-hscroll (window-hscroll start-window))
-                    ;; Don't run the up-event handler if the window
-                    ;; start changed in a redisplay after the
-                    ;; mouse-set-point for the down-mouse event at
-                    ;; the beginning of this function.  When the
-                    ;; window start has changed, the up-mouse event
-                    ;; contains a different position due to the new
-                    ;; window contents, and point is set again.
-                    (or end-point
-                        (= (window-start start-window)
-                           start-window-start)))
-           (push event unread-command-events)))))))
+         (pop-mark)))))
 
 (defun mouse--drag-set-mark-and-point (start click click-count)
   (let* ((range (mouse-start-end start click click-count))
@@ -1089,24 +1068,7 @@ regardless of where you click."
     (let (select-active-regions)
       (deactivate-mark)))
   (or mouse-yank-at-point (mouse-set-point click))
-  (let ((primary
-         (if (fboundp 'x-get-selection-value)
-             (if (eq (framep (selected-frame)) 'w32)
-                 ;; MS-Windows emulates PRIMARY in x-get-selection, but not
-                 ;; in x-get-selection-value (the latter only accesses the
-                 ;; clipboard).  So try PRIMARY first, in case they selected
-                 ;; something with the mouse in the current Emacs session.
-                 (or (x-get-selection 'PRIMARY)
-                     (x-get-selection-value))
-               ;; Else MS-DOS or X.
-               ;; On X, x-get-selection-value supports more formats and
-               ;; encodings, so use it in preference to x-get-selection.
-               (or (x-get-selection-value)
-                   (x-get-selection 'PRIMARY)))
-           ;; FIXME: What about xterm-mouse-mode etc.?
-           (x-get-selection 'PRIMARY))))
-    (unless primary
-      (error "No selection is available"))
+  (let ((primary (gui-get-primary-selection)))
     (push-mark (point))
     (insert-for-yank primary)))
 
@@ -1293,7 +1255,7 @@ This must be bound to a mouse drag event."
       (if (numberp (posn-point posn))
          (setq beg (posn-point posn)))
       (move-overlay mouse-secondary-overlay beg (posn-point end))
-      (x-set-selection
+      (gui-set-selection
        'SECONDARY
        (buffer-substring (overlay-start mouse-secondary-overlay)
                         (overlay-end mouse-secondary-overlay))))))
@@ -1368,13 +1330,13 @@ The function returns a non-nil value if it creates a secondary selection."
            (if (marker-position mouse-secondary-start)
                (save-window-excursion
                  (delete-overlay mouse-secondary-overlay)
-                 (x-set-selection 'SECONDARY nil)
+                 (gui-set-selection 'SECONDARY nil)
                  (select-window start-window)
                  (save-excursion
                    (goto-char mouse-secondary-start)
                    (sit-for 1)
                    nil))
-             (x-set-selection
+             (gui-set-selection
               'SECONDARY
               (buffer-substring (overlay-start mouse-secondary-overlay)
                                 (overlay-end mouse-secondary-overlay)))))))))
@@ -1507,7 +1469,7 @@ CLICK position, kill the secondary selection."
         (setq str (buffer-substring (overlay-start mouse-secondary-overlay)
                                     (overlay-end mouse-secondary-overlay)))
         (> (length str) 0)
-        (x-set-selection 'SECONDARY str))))
+        (gui-set-selection 'SECONDARY str))))
 
 \f
 (defcustom mouse-buffer-menu-maxlen 20
@@ -1902,14 +1864,10 @@ choose a font."
 \f
 ;;; Bindings for mouse commands.
 
-(define-key global-map [down-mouse-1] 'mouse-drag-region)
+(global-set-key [down-mouse-1] 'mouse-drag-region)
 (global-set-key [mouse-1]      'mouse-set-point)
 (global-set-key [drag-mouse-1] 'mouse-set-region)
 
-;; These are tested for in mouse-drag-region.
-(global-set-key [double-mouse-1] 'mouse-set-point)
-(global-set-key [triple-mouse-1] 'mouse-set-point)
-
 (defun mouse--strip-first-event (_prompt)
   (substring (this-single-command-raw-keys) 1))
 
index d569610a6152c0f868f6821b0d51233645faba7b..3dac7f9901440c542c110b5dc8b2b0fd61540b35 100644 (file)
@@ -1,4 +1,4 @@
-;;; mpc.el --- A client for the Music Player Daemon   -*- coding: utf-8; lexical-binding: t -*-
+;;; mpc.el --- A client for the Music Player Daemon   -*- lexical-binding: t -*-
 
 ;; Copyright (C) 2006-2014 Free Software Foundation, Inc.
 
@@ -891,9 +891,7 @@ If PLAYLIST is t or nil or missing, use the main playlist."
   :type '(choice (const nil) directory))
 
 (defcustom mpc-data-directory
-  (if (and (not (file-directory-p "~/.mpc"))
-           (file-directory-p "~/.emacs.d"))
-      "~/.emacs.d/mpc" "~/.mpc")
+  (locate-user-emacs-file "mpc" ".mpc")
   "Directory where MPC.el stores auxiliary data."
   :type 'directory)
 
@@ -1024,7 +1022,12 @@ If PLAYLIST is t or nil or missing, use the main playlist."
                          (when (and (null val) (eq tag 'Title))
                            (setq val (cdr (assq 'file info))))
                          (push `(equal ',val (cdr (assq ',tag info))) pred)
-                         val)))))
+                         (cond
+                          ((not (and (eq tag 'Date) (stringp val))) val)
+                          ;; For "date", only keep the year!
+                          ((string-match "[0-9]\\{4\\}" val)
+                           (match-string 0 val))
+                          (t val)))))))
                (space (when size
                         (setq size (string-to-number size))
                         (propertize " " 'display
@@ -1619,7 +1622,7 @@ Return non-nil if a selection was deactivated."
           (setq active
                 (if (listp active) (mpc-intersection active vals) vals))))
 
-      (when (and (listp active))
+      (when (listp active)
         ;; Remove the selections if they are all in conflict with
         ;; other constraints.
         (let ((deactivate t))
@@ -1633,8 +1636,14 @@ Return non-nil if a selection was deactivated."
               (setq selection nil)
               (mapc 'delete-overlay mpc-select)
               (setq mpc-select nil)
-              (mpc-tagbrowser-all-select)))))
-
+              (mpc-tagbrowser-all-select))))
+
+        ;; Don't bother splitting the "active" elements to the first part if
+        ;; they're the same as the selection.
+        (when (equal (sort (copy-sequence active) #'string-lessp)
+                     (sort (copy-sequence selection) #'string-lessp))
+          (setq active 'all)))
+      
       ;; FIXME: This `mpc-sort' takes a lot of time.  Maybe we should
       ;; be more clever and presume the buffer is mostly sorted already.
       (mpc-sort (if (listp active) active))
@@ -1796,7 +1805,9 @@ A value of t means the main playlist.")
   ;; Maintain the volume.
   (setq mpc-volume
         (mpc-volume-widget
-         (string-to-number (cdr (assq 'volume mpc-status))))))
+         (string-to-number (cdr (assq 'volume mpc-status)))))
+  (let ((status-buf (mpc-proc-buffer (mpc-proc) 'status)))
+    (when status-buf (with-current-buffer status-buf (force-mode-line-update)))))
 
 (defvar mpc-volume-step 5)
 
@@ -1866,7 +1877,7 @@ This is used so that they can be compared with `eq', which is needed for
 `text-property-any'.")
 (defun mpc-songs-hashcons (name)
   (or (gethash name mpc-songs-hashcons) (puthash name name mpc-songs-hashcons)))
-(defcustom mpc-songs-format "%2{Disc--}%3{Track} %-5{Time} %25{Title} %20{Album} %20{Artist} %10{Date}"
+(defcustom mpc-songs-format "%2{Disc--}%3{Track} %-5{Time} %25{Title} %20{Album} %20{Artist} %5{Date}"
   "Format used to display each song in the list of songs."
   :type 'string)
 
@@ -2025,7 +2036,7 @@ This is used so that they can be compared with `eq', which is needed for
                  (match-string 1)))))
     (cond
      ((null re) (posn-set-point posn))
-     ((null sn) (error "This song is not in the playlist"))
+     ((null sn) (user-error "This song is not in the playlist"))
      ((null (with-current-buffer plbuf (re-search-forward re nil t)))
       ;; song-file only appears once in the playlist: no ambiguity,
       ;; we're good to go!
@@ -2335,7 +2346,7 @@ This is used so that they can be compared with `eq', which is needed for
     (if (mpc-playlist-add)
         (if (member (cdr (assq 'state (mpc-cmd-status))) '("stop"))
             (mpc-cmd-play))
-      (error "Don't know what to play"))))
+      (user-error "Don't know what to play"))))
 
 (defun mpc-next ()
   "Jump to the next song in the queue."
@@ -2599,7 +2610,8 @@ This is used so that they can be compared with `eq', which is needed for
             (mpc-cmd-move (let ((poss '()))
                             (dotimes (i (length songs))
                                      (push (+ i (length pl)) poss))
-                            (nreverse poss)) dest-pos mpc-songs-playlist)
+                            (nreverse poss))
+                            dest-pos mpc-songs-playlist)
             (message "Added %d songs" (length songs)))))
         (mpc-songs-refresh))
       (t
index 166c6c61e3066bf9d9d017dcb1a7717c1d7fd9bb..474d76bf6ca94611677a8f776598b292beaef843 100644 (file)
@@ -1064,7 +1064,7 @@ variable `msb-menu-cond'."
     list))
 
 (defun msb--make-keymap-menu (raw-menu)
-  (let ((end (cons '(nil) 'menu-bar-select-buffer))
+  (let ((end 'menu-bar-select-buffer)
        (mcount 0))
     (mapcar
      (lambda (sub-menu)
@@ -1105,13 +1105,12 @@ variable `msb-menu-cond'."
            (setcdr (nthcdr msb-max-menu-items frames) nil))
          (setq frames-menu
                (nconc
-                (list 'frame f-title '(nil) 'keymap f-title)
+                (list 'frame f-title 'keymap f-title)
                 (mapcar
                  (lambda (frame)
                    (nconc
                     (list (frame-parameter frame 'name)
-                          (frame-parameter frame 'name)
-                          (cons nil nil))
+                          (frame-parameter frame 'name))
                      `(lambda ()
                         (interactive) (menu-bar-select-frame ,frame))))
                  frames)))))
index 9644a509b2203740ced7c17b8ba6258aa2a5a3e7..09d84795f4f9a9394cb61379bd3c8c13dd68aeab 100644 (file)
@@ -1343,16 +1343,12 @@ used instead of `browse-url-new-window-flag'."
                         "newwin\n"
                       "goto\n")
                     url "\n")
-            (let ((umask (default-file-modes)))
-              (unwind-protect
-                  (progn
-                    (set-default-file-modes ?\700)
-                    (if (file-exists-p
-                         (setq pidfile (format "/tmp/Mosaic.%d" pid)))
-                        (delete-file pidfile))
-                    ;; http://debbugs.gnu.org/17428.  Use O_EXCL.
-                    (write-region nil nil pidfile nil 'silent nil 'excl))
-                (set-default-file-modes umask))))
+            (with-file-modes ?\700
+              (if (file-exists-p
+                   (setq pidfile (format "/tmp/Mosaic.%d" pid)))
+                  (delete-file pidfile))
+              ;; http://debbugs.gnu.org/17428.  Use O_EXCL.
+              (write-region nil nil pidfile nil 'silent nil 'excl)))
          ;; Send signal SIGUSR to Mosaic
          (message "Signaling Mosaic...")
          (signal-process pid 'SIGUSR1)
index 66170dafef8a813c8f75d3b817ae610dbb0bff38..582f54faf4e91c17f0ee6e857553ff692776b2da 100644 (file)
@@ -544,6 +544,10 @@ placed in the queue.
 
 `:already-owner': Service is already the primary owner."
 
+  ;; Add Peer handler.
+  (dbus-register-method
+   bus service nil dbus-interface-peer "Ping" 'dbus-peer-handler 'dont-register)
+
   ;; Add ObjectManager handler.
   (dbus-register-method
    bus service nil dbus-interface-objectmanager "GetManagedObjects"
@@ -1151,6 +1155,22 @@ apply
          bus service dbus-path-dbus dbus-interface-peer "Ping")))
     (dbus-error nil)))
 
+(defun dbus-peer-handler ()
+  "Default handler for the \"org.freedesktop.DBus.Peer\" interface.
+It will be registered for all objects created by `dbus-register-service'."
+  (let* ((last-input-event last-input-event)
+        (method (dbus-event-member-name last-input-event)))
+    (cond
+     ;; "Ping" does not return an output parameter.
+     ((string-equal method "Ping")
+      :ignore)
+     ;; "GetMachineId" returns "s".
+     ((string-equal method "GetMachineId")
+      (signal
+       'dbus-error
+       (list
+       (format "%s.GetMachineId not implemented" dbus-interface-peer)))))))
+
 \f
 ;;; D-Bus introspection.
 
@@ -1672,7 +1692,7 @@ and \"org.freedesktop.DBus.Properties.GetAll\", which is slow."
 
 (defun dbus-managed-objects-handler ()
   "Default handler for the \"org.freedesktop.DBus.ObjectManager\" interface.
-It will be registered for all objects created by `dbus-register-method'."
+It will be registered for all objects created by `dbus-register-service'."
   (let* ((last-input-event last-input-event)
         (bus (dbus-event-bus-name last-input-event))
         (path (dbus-event-path-name last-input-event)))
index e52ead1fb7273b8e281c486387c147725b5fbb3b..ea1c805c6b9f10b2466b1eb7fba28bd00d6e470d 100644 (file)
   "List of DNS servers to query.
 If nil, /etc/resolv.conf and nslookup will be consulted.")
 
+(defvar dns-servers-valid-for-interfaces nil
+  "The return value of `network-interface-list' when `dns-servers' was set.
+If the set of network interfaces and/or their IP addresses
+change, then presumably the list of DNS servers needs to be
+updated.  Set this variable to t to disable the check.")
+
 ;;; Internal code:
 
 (defvar dns-query-types
@@ -297,6 +303,17 @@ If TCP-P, the first two bytes of the package with be the length field."
            (t string)))
       (goto-char point))))
 
+(declare-function network-interface-list "process.c")
+
+(defun dns-servers-up-to-date-p ()
+  "Return false if we need to recheck the list of DNS servers."
+  (and dns-servers
+       (or (eq dns-servers-valid-for-interfaces t)
+          ;; `network-interface-list' was introduced in Emacs 22.1.
+          (not (fboundp 'network-interface-list))
+          (equal dns-servers-valid-for-interfaces
+                 (network-interface-list)))))
+
 (defun dns-set-servers ()
   "Set `dns-servers' to a list of DNS servers or nil if none are found.
 Parses \"/etc/resolv.conf\" or calls \"nslookup\"."
@@ -314,7 +331,9 @@ Parses \"/etc/resolv.conf\" or calls \"nslookup\"."
          (goto-char (point-min))
          (re-search-forward
           "^Address:[ \t]*\\([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+\\)" nil t)
-         (setq dns-servers (list (match-string 1)))))))
+         (setq dns-servers (list (match-string 1))))))
+  (when (fboundp 'network-interface-list)
+    (setq dns-servers-valid-for-interfaces (network-interface-list))))
 
 (defun dns-read-txt (string)
   (if (> (length string) 1)
@@ -378,7 +397,7 @@ Parses \"/etc/resolv.conf\" or calls \"nslookup\"."
 If FULLP, return the entire record returned.
 If REVERSEP, look up an IP address."
   (setq type (or type 'A))
-  (unless dns-servers
+  (unless (dns-servers-up-to-date-p)
     (dns-set-servers))
 
   (when reversep
index 02fc575c261cc6009cfef69e52b7aaa5d1a6edab..3329c3263c9ca20442c583ec9f64571cf57aec46 100644 (file)
   :group 'eww
   :type 'string)
 
+(defcustom eww-bookmarks-directory user-emacs-directory
+  "Directory where bookmark files will be stored."
+  :version "25.1"
+  :group 'eww
+  :type 'string)
+
 (defcustom eww-use-external-browser-for-content-type
   "\\`\\(video/\\|audio/\\|application/ogg\\)"
   "Always use external browser for specified content-type."
@@ -264,7 +270,6 @@ word(s) will be searched for via `eww-search-prefix'."
     (setq eww-current-dom document)
     (let ((inhibit-read-only t)
          (after-change-functions nil)
-         (shr-width nil)
          (shr-target-id (url-target (url-generic-parse-url url)))
          (shr-external-rendering-functions
           '((title . eww-tag-title)
@@ -1118,12 +1123,12 @@ Differences in #targets are ignored."
        (message "Bookmarked %s (%s)" eww-current-url eww-current-title))))
 
 (defun eww-write-bookmarks ()
-  (with-temp-file (expand-file-name "eww-bookmarks" user-emacs-directory)
+  (with-temp-file (expand-file-name "eww-bookmarks" eww-bookmarks-directory)
     (insert ";; Auto-generated file; don't edit\n")
     (pp eww-bookmarks (current-buffer))))
 
 (defun eww-read-bookmarks ()
-  (let ((file (expand-file-name "eww-bookmarks" user-emacs-directory)))
+  (let ((file (expand-file-name "eww-bookmarks" eww-bookmarks-directory)))
     (setq eww-bookmarks
          (unless (zerop (or (nth 7 (file-attributes file)) 0))
            (with-temp-buffer
index ea4c0351be78a0a4212ee526fa7f0f9c57855632..0c650f38d9526912b0853cc874fbb101afecb8b6 100644 (file)
@@ -214,7 +214,7 @@ defaults to GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT."
                              (cl-mapcan
                               (lambda (check)
                                 (when (string-match (car check) hostname)
-                                  (cdr check)))
+                                  (copy-sequence (cdr check))))
                               gnutls-verify-error))
                             ;; else it's nil
                             (t nil))))
index f67baccda7ce7c1877dbdbf147d51a86c7a66b83..b7bd3d0933ebf0be709dc0d4804fac343f040906 100644 (file)
@@ -6,7 +6,6 @@
 ;; Filename:    newst-backend.el
 ;; URL:         http://www.nongnu.org/newsticker
 ;; Keywords:    News, RSS, Atom
-;; Time-stamp:  "13. Mai 2011, 20:47:05 (ulf)"
 ;; Package:     newsticker
 
 ;; ======================================================================
@@ -47,9 +46,6 @@
   "List of timers for news retrieval.
 This is an alist, each element consisting of (feed-name . timer).")
 
-(defvar newsticker--download-logos nil
-  "If non-nil download feed logos if available.")
-
 (defvar newsticker--sentinel-callback nil
   "Function called at end of `newsticker--sentinel'.")
 
@@ -483,14 +479,6 @@ that can be added."
 ;; ======================================================================
 ;;; Internal variables
 ;; ======================================================================
-(defvar newsticker--item-list nil
-  "List of newsticker items.")
-(defvar newsticker--item-position 0
-  "Actual position in list of newsticker items.")
-(defvar newsticker--prev-message "There was no previous message yet!"
-  "Last message that the newsticker displayed.")
-(defvar newsticker--scrollable-text ""
-  "The text which is scrolled smoothly in the echo area.")
 (defvar newsticker--buffer-uptodate-p nil
   "Tells whether the newsticker buffer is up to date.")
 (defvar newsticker--latest-update-time (current-time)
@@ -869,59 +857,11 @@ Argument BUFFER is the buffer of the retrieval process."
              (node-list
               (save-current-buffer
                 (set-buffer buffer)
-                ;; a very very dirty workaround to overcome the
-                ;; problems with the newest (20030621) xml.el:
-                ;; remove all unnecessary whitespace
-                (goto-char (point-min))
-                (while (re-search-forward ">[ \t\r\n]+<" nil t)
-                  (replace-match "><" nil t))
-                ;; and another brutal workaround (20031105)!  For some
-                ;; reason the xml parser does not like the colon in the
-                ;; doctype name "rdf:RDF"
-                (goto-char (point-min))
-                (if (re-search-forward "<!DOCTYPE[ \t\n]+rdf:RDF" nil t)
-                  (replace-match "<!DOCTYPE rdfColonRDF" nil t))
-                ;; finally.... ~##^°!!!!!
-                (goto-char (point-min))
-                (while (search-forward "\r\n" nil t)
-                  (replace-match "\n" nil t))
-                ;; still more brutal workarounds (20040309)!  The xml
-                ;; parser does not like doctype rss
-                (goto-char (point-min))
-                (if (re-search-forward "<!DOCTYPE[ \t\n]+rss[ \t\n]*>" nil t)
-                  (replace-match "" nil t))
-                ;; And another one (20050618)! (Fixed in GNU Emacs 22.0.50.18)
-                ;; Remove comments to avoid this xml-parsing bug:
-                ;; "XML files can have only one toplevel tag"
-                (goto-char (point-min))
-                (while (search-forward "<!--" nil t)
-                  (let ((start (match-beginning 0)))
-                    (unless (search-forward "-->" nil t)
-                      (error "Can't find end of comment"))
-                    (delete-region start (point))))
-                ;; And another one (20050702)! If description is HTML
-                ;; encoded and starts with a `<', wrap the whole
-                ;; description in a CDATA expression.  This happened for
-                ;; http://www.thefreedictionary.com/_/WoD/rss.aspx?type=quote
-                (goto-char (point-min))
-                (while (re-search-forward
-                        "<description>\\(<img.*?\\)</description>" nil t)
-                  (replace-match
-                   "<description><![CDATA[ \\1 ]]></description>"))
-                ;; And another one (20051123)! XML parser does not
-                ;; like this: <yweather:location city="Frankfurt/Main"
-                ;; region="" country="GM" />
-                ;; try to "fix" empty attributes
-                ;; This happened for
-                ;; http://xml.weather.yahoo.com/forecastrss?p=GMXX0040&u=f
-                (goto-char (point-min))
-                (while (re-search-forward "\\(<[^>]*\\)=\"\"" nil t)
-                  (replace-match "\\1=\" \""))
-                ;;
-                (set-buffer-modified-p nil)
+                (unless (fboundp 'libxml-parse-xml-region)
+                  (newsticker--do-xml-workarounds))
                 ;; check coding system
                 (goto-char (point-min))
-                (if (re-search-forward "encoding=\"\\([^\"]+\\)\""
+                (if (re-search-forward "encoding=['\"]\\([^\"]+?\\)['\"]"
                                        nil t)
                     (setq coding-system (intern (downcase (match-string 1))))
                   (setq coding-system
@@ -939,12 +879,13 @@ Argument BUFFER is the buffer of the retrieval process."
                 (condition-case errordata
                     ;; The xml parser might fail
                     ;; or the xml might be bugged
-                    (xml-parse-region (point-min) (point-max))
+                    (if (fboundp 'libxml-parse-xml-region)
+                        (list (libxml-parse-xml-region (point-min) (point-max)))
+                      (xml-parse-region (point-min) (point-max)))
                   (error (message "Could not parse %s: %s"
                                   (buffer-name) (cadr errordata))
                          (throw 'oops nil)))))
              (topnode (car node-list))
-             (channelnode (car (xml-get-children topnode 'channel)))
              (imageurl nil))
         ;; mark all items as obsolete
         (newsticker--cache-replace-age newsticker--cache
@@ -971,7 +912,8 @@ Argument BUFFER is the buffer of the retrieval process."
                   (setq imageurl (newsticker--get-logo-url-rss-0.92 topnode))
                   (newsticker--parse-rss-0.92 name time topnode))
                  ;; RSS 1.0
-                 ((eq 'rdf:RDF (xml-node-name topnode))
+                 ((or (eq 'RDF (xml-node-name topnode))
+                      (eq 'rdf:RDF (xml-node-name topnode)))
                   (setq imageurl (newsticker--get-logo-url-rss-1.0 topnode))
                   (newsticker--parse-rss-1.0 name time topnode))
                  ;; RSS 2.0
@@ -986,16 +928,24 @@ Argument BUFFER is the buffer of the retrieval process."
                   (setq imageurl (newsticker--get-logo-url-atom-0.3 topnode))
                   (newsticker--parse-atom-0.3 name time topnode))
                  ;; Atom 1.0
-                 ((and (eq 'feed (xml-node-name topnode))
-                       (string= "http://www.w3.org/2005/Atom"
-                                (xml-get-attribute topnode 'xmlns)))
+                 (t
+                  ;; The test for Atom 1.0 does not work when using
+                  ;; libxml, as with libxml the namespace attribute is
+                  ;; not in the xml tree.  For the time being we skip
+                  ;; the check and assume that we are dealing with an
+                  ;; Atom 1.0 feed.
+
+                  ;; (and (eq 'feed (xml-node-name topnode))
+                  ;;      (string= "http://www.w3.org/2005/Atom"
+                  ;;               (xml-get-attribute topnode 'xmlns)))
                   (setq imageurl (newsticker--get-logo-url-atom-1.0 topnode))
                   (newsticker--parse-atom-1.0 name time topnode))
                  ;; unknown feed type
-                 (t
-                  (newsticker--debug-msg "Feed type unknown: %s: %s"
-                                         (xml-node-name topnode) name)
-                  nil))
+                 ;; (t
+                 ;;  (newsticker--debug-msg "Feed type unknown: %s: %s"
+                 ;;                         (xml-node-name topnode) name)
+                 ;;  nil)
+                 )
                 (setq something-was-added t))
           (error (message "sentinelerror in %s: %s" name error-data)))
 
@@ -1039,11 +989,67 @@ Argument BUFFER is the buffer of the retrieval process."
         (unless newsticker-debug
           (kill-buffer buffer))
         ;; launch retrieval of image
-        (when (and imageurl newsticker--download-logos)
+        (when (and imageurl (boundp 'newsticker-download-logos)
+                   newsticker-download-logos)
           (newsticker--image-get name imageurl)))))
   (when newsticker--sentinel-callback
     (funcall newsticker--sentinel-callback)))
 
+(defun newsticker--do-xml-workarounds ()
+  "Fix all issues which `xml-parse-region' could be choking on."
+  
+  ;; a very very dirty workaround to overcome the
+  ;; problems with the newest (20030621) xml.el:
+  ;; remove all unnecessary whitespace
+  (goto-char (point-min))
+  (while (re-search-forward ">[ \t\r\n]+<" nil t)
+    (replace-match "><" nil t))
+  ;; and another brutal workaround (20031105)!  For some
+  ;; reason the xml parser does not like the colon in the
+  ;; doctype name "rdf:RDF"
+  (goto-char (point-min))
+  (if (re-search-forward "<!DOCTYPE[ \t\n]+rdf:RDF" nil t)
+      (replace-match "<!DOCTYPE rdfColonRDF" nil t))
+  ;; finally.... ~##^°!!!!!
+  (goto-char (point-min))
+  (while (search-forward "\r\n" nil t)
+    (replace-match "\n" nil t))
+  ;; still more brutal workarounds (20040309)!  The xml
+  ;; parser does not like doctype rss
+  (goto-char (point-min))
+  (if (re-search-forward "<!DOCTYPE[ \t\n]+rss[ \t\n]*>" nil t)
+      (replace-match "" nil t))
+  ;; And another one (20050618)! (Fixed in GNU Emacs 22.0.50.18)
+  ;; Remove comments to avoid this xml-parsing bug:
+  ;; "XML files can have only one toplevel tag"
+  (goto-char (point-min))
+  (while (search-forward "<!--" nil t)
+    (let ((start (match-beginning 0)))
+      (unless (search-forward "-->" nil t)
+        (error "Can't find end of comment"))
+      (delete-region start (point))))
+  ;; And another one (20050702)! If description is HTML
+  ;; encoded and starts with a `<', wrap the whole
+  ;; description in a CDATA expression.  This happened for
+  ;; http://www.thefreedictionary.com/_/WoD/rss.aspx?type=quote
+  (goto-char (point-min))
+  (while (re-search-forward
+          "<description>\\(<img.*?\\)</description>" nil t)
+    (replace-match
+     "<description><![CDATA[ \\1 ]]></description>"))
+  ;; And another one (20051123)! XML parser does not
+  ;; like this: <yweather:location city="Frankfurt/Main"
+  ;; region="" country="GM" />
+  ;; try to "fix" empty attributes
+  ;; This happened for
+  ;; http://xml.weather.yahoo.com/forecastrss?p=GMXX0040&u=f
+  (goto-char (point-min))
+  (while (re-search-forward "\\(<[^>]*\\)=\"\"" nil t)
+    (replace-match "\\1=\" \""))
+  ;;
+  (set-buffer-modified-p nil))
+
+
 (defun newsticker--get-logo-url-atom-1.0 (node)
   "Return logo URL from atom 1.0 data in NODE."
   (car (xml-node-children
@@ -1125,6 +1131,30 @@ same as in `newsticker--parse-atom-1.0'."
                       (xml-node-children node))))
     (or new-item new-feed)))
 
+(defun newsticker--unxml (node)
+  "Reverse parsing of an xml string.
+Restore an xml-string from a an xml-node that was returned by xml-parse..."
+  (if (or (not node) (stringp node))
+      node
+    (newsticker--unxml-node node)))
+
+(defun newsticker--unxml-node (node)
+  "Actually restore xml-string of an xml node."
+  (let ((qname (symbol-name (car node)))
+        (att-list (cadr node))
+        (children (cddr node)))
+    (concat "<" qname
+            (when att-list " ")
+            (mapconcat 'newsticker--unxml-attribute att-list " ")
+            ">"
+            (mapconcat 'newsticker--unxml children "") "</" qname ">")))
+
+(defun newsticker--unxml-attribute (att)
+  "Actually restore xml-string of an attribute of an xml node."
+  (let ((name (symbol-name (car att)))
+        (value (cdr att)))
+    (concat name "=\"" value "\"")))
+
 (defun newsticker--parse-atom-1.0 (name time topnode)
   "Parse Atom 1.0 data.
 Argument NAME gives the name of a news feed.  TIME gives the
@@ -1157,8 +1187,13 @@ URL `http://www.atompub.org/2005/08/17/draft-ietf-atompub-format-11.html'"
                             (car (xml-get-children node 'title)))))
                     ;; desc-fn
                     (lambda (node)
-                      (or (car (xml-node-children
-                                (car (xml-get-children node 'content))))
+                      ;; unxml the content node. Atom allows for
+                      ;; integrating (x)html into the atom structure
+                      ;; but we need the raw html string.
+                      ;; e.g. http://www.heise.de/open/news/news-atom.xml
+                  (or (newsticker--unxml
+                           (car (xml-node-children
+                                (car (xml-get-children node 'content)))))
                           (car (xml-node-children
                                 (car (xml-get-children node 'summary))))))
                     ;; link-fn
@@ -1303,9 +1338,15 @@ For the RSS 1.0 specification see URL `http://web.resource.org/rss/1.0/spec'."
                        (car (xml-node-children
                              (car (xml-get-children channelnode 'title))))
                        ;; desc
-                       (car (xml-node-children
-                             (car (xml-get-children channelnode
-                                                    'description))))
+                       (or (car (xml-node-children
+                                 (car (xml-get-children channelnode
+                                                        'encoded))))
+                           (car (xml-node-children
+                                 (car (xml-get-children channelnode
+                                                        'content:encoded))))
+                           (car (xml-node-children
+                                 (car (xml-get-children channelnode
+                                                        'description)))))
                        ;; link
                        (car (xml-node-children
                              (car (xml-get-children channelnode 'link))))
@@ -1329,8 +1370,10 @@ For the RSS 1.0 specification see URL `http://web.resource.org/rss/1.0/spec'."
                          ;; time-fn
                          (lambda (node)
                            (newsticker--decode-iso8601-date
-                            (car (xml-node-children
-                                  (car (xml-get-children node 'dc:date))))))
+                            (or (car (xml-node-children
+                                      (car (xml-get-children node 'dc:date))))
+                                (car (xml-node-children
+                                      (car (xml-get-children node 'date)))))))
                          ;; guid-fn
                          (lambda (node)
                            nil)
@@ -1354,9 +1397,15 @@ For the RSS 2.0 specification see URL `http://blogs.law.harvard.edu/tech/rss'."
                        (car (xml-node-children
                              (car (xml-get-children channelnode 'title))))
                        ;; desc
-                       (car (xml-node-children
-                             (car (xml-get-children channelnode
-                                                    'description))))
+                       (or (car (xml-node-children
+                                 (car (xml-get-children channelnode
+                                                        'encoded))))
+                           (car (xml-node-children
+                                 (car (xml-get-children channelnode
+                                                        'content:encoded))))
+                           (car (xml-node-children
+                                 (car (xml-get-children channelnode
+                                                        'description)))))
                        ;; link
                        (car (xml-node-children
                              (car (xml-get-children channelnode 'link))))
@@ -1371,6 +1420,9 @@ For the RSS 2.0 specification see URL `http://blogs.law.harvard.edu/tech/rss'."
                          ;; desc-fn
                          (lambda (node)
                            (or (car (xml-node-children
+                                     (car (xml-get-children node
+                                                            'encoded))))
+                               (car (xml-node-children
                                      (car (xml-get-children node
                                                             'content:encoded))))
                                (car (xml-node-children
@@ -1464,7 +1516,7 @@ argument, which is one of the items in ITEMLIST."
               ;; decode numeric entities
               (setq title (xml-substitute-numeric-entities title))
               (when desc
-                (setq desc  (xml-substitute-numeric-entities desc)))
+                (setq desc (xml-substitute-numeric-entities desc)))
               (setq link (xml-substitute-numeric-entities link))
               ;; remove whitespace from title, desc, and link
               (setq title (newsticker--remove-whitespace title))
@@ -1486,9 +1538,9 @@ argument, which is one of the items in ITEMLIST."
                     (let ((prev-age (newsticker--age old-item)))
                       (unless newsticker-automatically-mark-items-as-old
                         ;; Some feeds deliver items multiply, the
-                        ;; first time we find an 'obsolete-old one the
-                        ;; cache, the following times we find an 'old
-                        ;; one
+                        ;; first time we find an 'obsolete-old one in
+                        ;; the cache, the following times we find an
+                        ;; 'old one
                         (if (memq prev-age '(obsolete-old old))
                             (setq age2 'old)
                           (setq age2 'new)))
@@ -1712,7 +1764,7 @@ Checks list of active processes against list of newsticker processes."
 ;; ======================================================================
 (defun newsticker--images-dir ()
   "Return directory where feed images are saved."
-  (concat newsticker-dir "/images"))
+  (concat newsticker-dir "/images/"))
 
 (defun newsticker--image-get (feed-name url)
   "Get image of the news site FEED-NAME from URL.
@@ -1733,7 +1785,7 @@ If the image has been downloaded in the last 24h do nothing."
              (item (or (assoc feed-name newsticker-url-list)
                        (assoc feed-name newsticker-url-list-defaults)
                        (error
-                        "Cannot get news for %s: Check newsticker-url-list"
+                        "Cannot get image for %s: Check newsticker-url-list"
                         feed-name)))
              (wget-arguments (or (car (cdr (cdr (cdr (cdr item)))))
                                  newsticker-wget-arguments)))
index a05a2f67bcb82f11855f2d33066abc2533c51aca..dea24f12a978a61f4778c87a1cd006be046f65e2 100644 (file)
@@ -5,7 +5,6 @@
 ;; Author:      Ulf Jasper <ulf.jasper@web.de>
 ;; Filename:    newst-plainview.el
 ;; URL:         http://www.nongnu.org/newsticker
-;; Time-stamp:  "Mon 11-Feb-2013 20:27:11 gm on skiddaw"
 ;; Package:     newsticker
 
 ;; ======================================================================
index 737aac22d4683b8ab294e8a6d1d4bb424034cbcf..8232e4bd9bdce6b1acb09af900c21785bdd645c0 100644 (file)
@@ -5,7 +5,6 @@
 ;; Author:      Ulf Jasper <ulf.jasper@web.de>
 ;; Filename:    newst-reader.el
 ;; URL:         http://www.nongnu.org/newsticker
-;; Time-stamp:  "24. September 2011, 15:47:49 (ulf)"
 ;; Package:     newsticker
 
 ;; ======================================================================
@@ -67,6 +66,12 @@ This must be one of the functions `newsticker-plainview' or
   :group 'newsticker-reader)
 
 ;; image related things
+(defcustom newsticker-download-logos
+  t
+  "If non-nil newsticker downloads logo images of subscribed feeds."
+  :type 'boolean
+  :group 'newsticker-reader)
+
 (defcustom newsticker-enable-logo-manipulations
   t
   "If non-nil newsticker manipulates logo images.
@@ -186,15 +191,17 @@ KEYMAP will be applied."
                                    'nt-type 'desc))
         (insert "\n")))))
 
-(defun newsticker--print-extra-elements (item keymap)
+(defun newsticker--print-extra-elements (item keymap &optional htmlish)
   "Insert extra-elements of ITEM in a pretty form into the current buffer.
 KEYMAP is applied."
   (let ((ignored-elements '(items link title description content
-                                  content:encoded dc:subject
-                                  dc:date entry item guid pubDate
+                                  content:encoded encoded
+                                  dc:subject subject
+                                  dc:date date entry item guid pubDate
                                   published updated
                                   enclosure))
         (left-column-width 1))
+    (if htmlish (insert "<ul>"))
     (mapc (lambda (extra-element)
             (when (listp extra-element) ;; take care of broken xml
                                         ;; data, 2007-05-25
@@ -209,15 +216,19 @@ KEYMAP is applied."
               (unless (memq (car extra-element) ignored-elements)
                 (newsticker--do-print-extra-element extra-element
                                                     left-column-width
-                                                    keymap))))
-          (newsticker--extra item))))
+                                                    keymap
+                                                    htmlish))))
+          (newsticker--extra item))
+    (if htmlish (insert "</ul>"))))
 
-(defun newsticker--do-print-extra-element (extra-element width keymap)
+(defun newsticker--do-print-extra-element (extra-element width keymap htmlish)
   "Actually print an EXTRA-ELEMENT using the given WIDTH.
 KEYMAP is applied."
   (let ((name (symbol-name (car extra-element))))
-    (insert (format "%s: " name))
-    (insert (make-string (- width (length name)) ? )))
+    (if htmlish
+        (insert (format "<li>%s: " name))
+      (insert (format "%s: " name))
+      (insert (make-string (- width (length name)) ? ))))
   (let (;;(attributes (cadr extra-element)) ;FIXME!!!!
         (contents (cddr extra-element)))
     (cond ((listp contents)
@@ -238,7 +249,9 @@ KEYMAP is applied."
                  contents))
           (t
            (insert (format "%s" contents))))
-    (insert "\n")))
+    (if htmlish
+        (insert "</li>")
+      (insert "\n"))))
 
 (defun newsticker--image-read (feed-name-symbol disabled)
   "Read the cached image for FEED-NAME-SYMBOL from disk.
index bf0e3981824921ff9536945be69511225904f32f..982bcfc59f4bff113f0fd39d05225f8f0b69bd52 100644 (file)
@@ -6,7 +6,6 @@
 ;; Filename:    newst-ticker.el
 ;; URL:         http://www.nongnu.org/newsticker
 ;; Keywords:    News, RSS, Atom
-;; Time-stamp:  "6. Dezember 2009, 19:16:00 (ulf)"
 ;; Package:     newsticker
 
 ;; ======================================================================
 
 (require 'newst-backend)
 
+(defvar newsticker--item-list nil
+  "List of newsticker items.")
+(defvar newsticker--item-position 0
+  "Actual position in list of newsticker items.")
+(defvar newsticker--prev-message "There was no previous message yet!"
+  "Last message that the newsticker displayed.")
+(defvar newsticker--scrollable-text ""
+  "The text which is scrolled smoothly in the echo area.")
 (defvar newsticker--ticker-timer nil
   "Timer for newsticker ticker.")
 
index 4b96a8bc3cc9cc26e5bf413bc52da1c98fb3dac9..097a2a588055ee2e72bcce92fe45d68c0fff3644 100644 (file)
   "Face for newsticker selection."
   :group 'newsticker-treeview)
 
+(defcustom newsticker-treeview-date-format
+  "%d.%m.%y, %H:%M"
+  "Format for the date column in the treeview list buffer.
+See `format-time-string' for a list of valid specifiers."
+  :version "25.1"
+  :type 'string
+  :group 'newsticker-treeview)
+
 (defcustom newsticker-treeview-own-frame
   nil
   "Decides whether newsticker treeview creates and uses its own frame."
@@ -230,23 +238,23 @@ their id stays constant."
     (newsticker--treeview-do-get-node-of-feed feed-name
                                               newsticker--treeview-vfeed-tree)))
 
-(defun newsticker--treeview-do-get-node (id startnode)
+(defun newsticker--treeview-do-get-node-by-id (id startnode)
    "Recursively search node with ID starting from STARTNODE."
    (if (newsticker--treeview-ids-eq id (widget-get startnode :nt-id))
        (throw 'found startnode)
      (let ((children (widget-get startnode :children)))
        (dolist (w children)
-         (newsticker--treeview-do-get-node id w)))))
+         (newsticker--treeview-do-get-node-by-id id w)))))
 
-(defun newsticker--treeview-get-node (id)
+(defun newsticker--treeview-get-node-by-id (id)
   "Return node with ID in newsticker treeview tree."
   (catch 'found
-    (newsticker--treeview-do-get-node id newsticker--treeview-feed-tree)
-    (newsticker--treeview-do-get-node id newsticker--treeview-vfeed-tree)))
+    (newsticker--treeview-do-get-node-by-id id newsticker--treeview-feed-tree)
+    (newsticker--treeview-do-get-node-by-id id newsticker--treeview-vfeed-tree)))
 
 (defun newsticker--treeview-get-current-node ()
   "Return current node in newsticker treeview tree."
-  (newsticker--treeview-get-node newsticker--treeview-current-node-id))
+  (newsticker--treeview-get-node-by-id newsticker--treeview-current-node-id))
 
 ;; ======================================================================
 
@@ -307,7 +315,7 @@ If string SHOW-FEED is non-nil it is shown in the item string."
                     0 10)
                    (propertize " " 'display '(space :align-to 12)))
                 ""))
-      (insert (format-time-string "%d.%m.%y, %H:%M"
+      (insert (format-time-string newsticker-treeview-date-format
                                   (newsticker--time item)))
       (insert (propertize " " 'display
                           (list 'space :align-to (if show-feed 28 18))))
@@ -773,8 +781,11 @@ for the button."
         (put-text-property pos (point) 'face 'newsticker-enclosure-face)
         (setq pos (point))
         (insert "\n")
-        (newsticker--print-extra-elements item newsticker--treeview-url-keymap)
-        (put-text-property pos (point) 'face 'newsticker-extra-face)
+        (set-marker marker1 pos)
+        (newsticker--print-extra-elements item newsticker--treeview-url-keymap t)
+        (set-marker marker2 (point))
+        (newsticker--treeview-render-text marker1 marker2)
+        (put-text-property marker1 marker2 'face 'newsticker-extra-face)
         (goto-char (point-min)))))
   (if (and newsticker-treeview-automatically-mark-displayed-items-as-old
            item
@@ -1158,12 +1169,14 @@ Arguments IGNORE are ignored."
 
   (unless newsticker--selection-overlay
     (with-current-buffer (newsticker--treeview-list-buffer)
+      (setq buffer-undo-list t)
       (setq newsticker--selection-overlay (make-overlay (point-min)
                                                         (point-max)))
       (overlay-put newsticker--selection-overlay 'face
                    'newsticker-treeview-selection-face)))
   (unless newsticker--tree-selection-overlay
     (with-current-buffer (newsticker--treeview-tree-buffer)
+      (setq buffer-undo-list t)
       (setq newsticker--tree-selection-overlay (make-overlay (point-min)
                                                              (point-max)))
       (overlay-put newsticker--tree-selection-overlay 'face
@@ -1210,7 +1223,7 @@ Note: does not update the layout."
   (newsticker-treeview-save))
 
 (defun newsticker-treeview-save ()
-  "Save newsticker data including treeview settings."
+  "Save treeview group settings."
   (interactive)
   (let ((coding-system-for-write 'utf-8)
         (buf (find-file-noselect (concat newsticker-dir "/groups"))))
@@ -1590,10 +1603,8 @@ Return t if a new feed was activated, nil otherwise."
   "Recursively show subtree above the node that represents FEED-NAME."
   (let ((node (newsticker--treeview-get-node-of-feed feed-name)))
     (unless node
-      (let* ((group-name (or (car (newsticker--group-find-group-for-feed
-                                   feed-name))
-                             (newsticker--group-get-parent-group
-                              feed-name))))
+      (let* ((group-name (car (newsticker--group-find-parent-group
+                               feed-name))))
         (newsticker--treeview-unfold-node group-name))
       (setq node (newsticker--treeview-get-node-of-feed feed-name)))
     (when node
@@ -1617,20 +1628,31 @@ Return t if a new feed was activated, nil otherwise."
 ;; ======================================================================
 ;;; Groups
 ;; ======================================================================
-(defun newsticker--group-do-find-group-for-feed (feed-name node)
-  "Recursively find FEED-NAME in NODE."
-  (if (member feed-name (cdr node))
-      (throw 'found node)
-    (mapc (lambda (n)
-            (if (listp n)
-                (newsticker--group-do-find-group-for-feed feed-name n)))
-          (cdr node))))
-
-(defun newsticker--group-find-group-for-feed (feed-name)
-  "Find group containing FEED-NAME."
+(defun newsticker--group-do-find-group (feed-or-group-name parent-node node)
+  "Recursively find FEED-OR-GROUP-NAME in PARENT-NODE or NODE."
+  (cond ((stringp node)
+         (when (string= feed-or-group-name node)
+           (throw 'found parent-node)))
+        ((listp node)
+         (cond ((string= feed-or-group-name (car node))
+                (throw 'found parent-node))
+               ((member feed-or-group-name (cdr node))
+                (throw 'found node))
+               (t
+                (mapc (lambda (n)
+                        (if (listp n)
+                            (newsticker--group-do-find-group
+                             feed-or-group-name node n)))
+                      (cdr node)))))))
+
+(defun newsticker--group-find-parent-group (feed-or-group-name)
+  "Find group containing FEED-OR-GROUP-NAME."
   (catch 'found
-    (newsticker--group-do-find-group-for-feed feed-name
-                                              newsticker-groups)
+    (mapc (lambda (n)
+            (newsticker--group-do-find-group feed-or-group-name
+                                             newsticker-groups
+                                             n))
+          newsticker-groups)
     nil))
 
 (defun newsticker--group-do-get-group (name node)
@@ -1651,26 +1673,6 @@ Return t if a new feed was activated, nil otherwise."
           newsticker-groups)
     nil))
 
-(defun newsticker--group-do-get-parent-group (name node parent)
-  "Recursively find parent group for NAME from NODE which is a child of PARENT."
-  (if (string= name (car node))
-      (throw 'found parent)
-    (mapc (lambda (n)
-            (if (listp n)
-                (newsticker--group-do-get-parent-group name n (car node))))
-          (cdr node))))
-
-(defun newsticker--group-get-parent-group (name)
-  "Find parent group for group named NAME."
-  (catch 'found
-    (mapc (lambda (n)
-            (if (listp n)
-                (newsticker--group-do-get-parent-group
-                 name n (car newsticker-groups))))
-          newsticker-groups)
-    nil))
-
-
 (defun newsticker--group-get-subgroups (group &optional recursive)
   "Return list of subgroups for GROUP.
 If RECURSIVE is non-nil recursively get subgroups and return a nested list."
@@ -1706,9 +1708,9 @@ return a nested list."
 (defun newsticker-group-add-group (name parent)
   "Add group NAME to group PARENT."
   (interactive
-   (list (read-string "Group Name: ")
+   (list (read-string "Name of new group: ")
          (let ((completion-ignore-case t))
-           (completing-read "Parent Group: " (newsticker--group-all-groups)
+           (completing-read "Name of parent group (optional): " (newsticker--group-all-groups)
                             nil t))))
   (if (newsticker--group-get-group name)
       (error "Group %s exists already" name))
@@ -1718,46 +1720,154 @@ return a nested list."
     (unless p
       (error "Parent %s does not exist" parent))
     (setcdr p (cons (list name) (cdr p))))
-  (newsticker--treeview-tree-update))
+  (newsticker--treeview-tree-update)
+  (newsticker-treeview-jump newsticker--treeview-current-feed))
+
+(defun newsticker-group-delete-group (name)
+  "Delete group NAME."
+  (interactive
+   (list (let ((completion-ignore-case t))
+           (completing-read "Delete group: "
+                            (newsticker--group-names)
+                            nil t (car (newsticker--group-find-parent-group
+                                        newsticker--treeview-current-feed))))))
+  (let ((parent-group (newsticker--group-find-parent-group name)))
+    (unless parent-group
+      (error "Parent %s does not exist" parent-group))
+    (setcdr parent-group (cl-delete-if (lambda (g)
+                                         (and (listp g)
+                                              (string= name (car g))))
+                                       (cdr parent-group)))
+    (newsticker--group-manage-orphan-feeds)
+    (newsticker--treeview-tree-update)
+    (newsticker-treeview-update)
+    (newsticker-treeview-jump newsticker--treeview-current-feed)))
+
+(defun newsticker--group-do-rename-group (old-name new-name)
+  "Actually rename group OLD-NAME to NEW-NAME."
+  (let ((parent-group (newsticker--group-find-parent-group old-name)))
+    (unless parent-group
+      (error "Parent of %s does not exist" old-name))
+    (mapcar (lambda (elt)
+              (cond ((and (listp elt)
+                          (string= old-name (car elt)))
+                     (cons new-name (cdr elt)))
+                    (t
+                     elt))) parent-group)))
+
+(defun newsticker-group-rename-group (old-name new-name)
+  "Rename group OLD-NAME to NEW-NAME."
+  (interactive
+   (list (let* ((completion-ignore-case t))
+           (completing-read "Rename group: "
+                            (newsticker--group-names)
+                            nil t (car (newsticker--group-find-parent-group
+                                        newsticker--treeview-current-feed))))
+         (read-string "Rename to: ")))
+  (setq newsticker-groups (newsticker--group-do-rename-group old-name new-name))
+  (newsticker--group-manage-orphan-feeds)
+  (newsticker--treeview-tree-update)
+  (newsticker-treeview-update)
+  (newsticker-treeview-jump newsticker--treeview-current-feed))
+
+(defun newsticker--get-group-names (lst)
+  "Do get the group names from LST."
+  (delete nil (cons (car lst)
+                    (apply 'append
+                           (mapcar (lambda (e)
+                                     (cond ((listp e)
+                                            (newsticker--get-group-names e))
+                                           (t
+                                            nil)))
+                                   (cdr lst))))))
+
+(defun newsticker--group-names ()
+  "Get names of all newsticker groups."
+  (newsticker--get-group-names newsticker-groups))
 
 (defun newsticker-group-move-feed (name group-name &optional no-update)
   "Move feed NAME to group GROUP-NAME.
 Update treeview afterwards unless NO-UPDATE is non-nil."
   (interactive
    (let ((completion-ignore-case t))
-     (list (completing-read "Feed Name: "
-                            (mapcar 'car newsticker-url-list)
+     (list (completing-read "Name of feed or group to move: "
+                            (append (mapcar 'car newsticker-url-list)
+                                    (newsticker--group-names))
                             nil t newsticker--treeview-current-feed)
-           (completing-read "Group Name: " (newsticker--group-all-groups)
+           (completing-read "Name of new parent group: " (newsticker--group-names)
                             nil t))))
-  (let ((group (if (and group-name (not (string= group-name "")))
-                   (newsticker--group-get-group group-name)
-                 newsticker-groups)))
+  (let* ((group (if (and group-name (not (string= group-name "")))
+                    (newsticker--group-get-group group-name)
+                  newsticker-groups))
+         (moving-group-p (member name (newsticker--group-names)))
+         (moved-thing (if moving-group-p
+                          (newsticker--group-get-group name)
+                        name)))
     (unless group
       (error "Group %s does not exist" group-name))
     (while (let ((old-group
-                  (newsticker--group-find-group-for-feed name)))
+                  (newsticker--group-find-parent-group name)))
              (when old-group
-               (delete name old-group))
+               (delete moved-thing old-group))
              old-group))
-    (setcdr group (cons name (cdr group)))
+    (setcdr group (cons moved-thing (cdr group)))
     (unless no-update
       (newsticker--treeview-tree-update)
-      (newsticker-treeview-update))))
+      (newsticker-treeview-update)
+      (newsticker-treeview-jump name))))
 
-(defun newsticker-group-delete-group (name)
-  "Remove group NAME."
-  (interactive
-   (let ((completion-ignore-case t))
-     (list (completing-read "Group Name: " (newsticker--group-all-groups)
-                            nil t))))
-  (let* ((g (newsticker--group-get-group name))
-         (p (or (newsticker--group-get-parent-group name)
-                newsticker-groups)))
-    (unless g
-      (error "Group %s does not exist" name))
-    (delete g p))
-  (newsticker--treeview-tree-update))
+(defun newsticker-group-shift-feed-down ()
+  "Shift current feed down in its group."
+  (interactive)
+  (newsticker--group-shift 1))
+
+(defun newsticker-group-shift-feed-up ()
+  "Shift current feed down in its group."
+  (interactive)
+  (newsticker--group-shift -1))
+
+(defun newsticker-group-shift-group-down ()
+  "Shift current group down in its group."
+  (interactive)
+  (newsticker--group-shift 1 t))
+
+(defun newsticker-group-shift-group-up ()
+  "Shift current group down in its group."
+  (interactive)
+  (newsticker--group-shift -1 t))
+
+(defun newsticker--group-shift (delta &optional move-group)
+  "Shift current feed or group within its parent group.
+DELTA is an integer which specifies the direction and the amount
+of the shift.  If MOVE-GROUP is nil the currently selected feed
+`newsticker--treeview-current-feed' is shifted, if it is t then
+the current feed's parent group is shifted.."
+  (let* ((cur-feed newsticker--treeview-current-feed)
+         (thing (if move-group
+                    (newsticker--group-find-parent-group cur-feed)
+                  cur-feed))
+         (parent-group (newsticker--group-find-parent-group
+                        (if move-group (car thing) thing))))
+    (unless parent-group
+      (error "Group not found!"))
+    (let* ((siblings (cdr parent-group))
+           (pos (cl-position thing siblings :test 'equal))
+           (tpos (+ pos delta ))
+           (new-pos (max 0 (min (length siblings) tpos)))
+           (beg (cl-subseq siblings 0 (min pos new-pos)))
+           (end (cl-subseq siblings (+ 1 (max pos new-pos))))
+           (p (elt siblings new-pos)))
+      (when (not (= pos new-pos))
+        (setcdr parent-group
+                (cl-concatenate 'list
+                                beg
+                                (if (> delta 0)
+                                    (list p thing)
+                                  (list thing p))
+                                end))
+        (newsticker--treeview-tree-update)
+        (newsticker-treeview-update)
+        (newsticker-treeview-jump cur-feed)))))
 
 (defun newsticker--count-groups (group)
   "Recursively count number of subgroups of GROUP."
@@ -1804,7 +1914,7 @@ Return t if groups have changed, nil otherwise."
   (let ((new-feed nil)
         (grouped-feeds (newsticker--count-grouped-feeds newsticker-groups)))
     (mapc (lambda (f)
-            (unless (newsticker--group-find-group-for-feed (car f))
+            (unless (newsticker--group-find-parent-group (car f))
               (setq new-feed t)
               (newsticker-group-move-feed (car f) nil t)))
           (append newsticker-url-list-defaults newsticker-url-list))
@@ -1906,6 +2016,12 @@ Return t if groups have changed, nil otherwise."
     ;;(define-key map "\C-m" 'newsticker-treeview-scroll-item)
     (define-key map "\M-m" 'newsticker-group-move-feed)
     (define-key map "\M-a" 'newsticker-group-add-group)
+    (define-key map "\M-d" 'newsticker-group-delete-group)
+    (define-key map "\M-r" 'newsticker-group-rename-group)
+    (define-key map [M-down] 'newsticker-group-shift-feed-down)
+    (define-key map [M-up] 'newsticker-group-shift-feed-up)
+    (define-key map [M-S-down] 'newsticker-group-shift-group-down)
+    (define-key map [M-S-up] 'newsticker-group-shift-group-up)
     map)
   "Mode map for newsticker treeview.")
 
@@ -1964,10 +2080,10 @@ POS gives the position where EVENT occurred."
            (newsticker-treeview-show-item))
           (t
            ;; click in tree buffer
-           (let ((w (newsticker--treeview-get-node nt-id)))
+           (let ((w (newsticker--treeview-get-node-by-id nt-id)))
              (when w
                (newsticker--treeview-tree-update-tag w t t)
-               (setq w (newsticker--treeview-get-node nt-id))
+               (setq w (newsticker--treeview-get-node-by-id nt-id))
                (widget-put w :nt-selected t)
                (widget-apply w :action event)
                (newsticker--treeview-set-current-node w))))))
index c77058a1e199e0783fc368c3ff28602b8e98a659..630db6782a1a3aa34bb336b2b314bc6a56304b1a 100644 (file)
@@ -7,8 +7,6 @@
 ;; URL:         http://www.nongnu.org/newsticker
 ;; Created:     17. June 2003
 ;; Keywords:    News, RSS, Atom
-;; Time-stamp:  "6. Dezember 2009, 19:15:18 (ulf)"
-;; Version:     1.99
 
 ;; ======================================================================
 
@@ -28,6 +26,7 @@
 ;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 (defconst newsticker-version "1.99" "Version number of newsticker.el.")
+(make-obsolete-variable 'newsticker-version 'emacs-version "25.1")
 
 ;; ======================================================================
 ;;; Commentary:
index bff3bab720759874b8efc28331c14124e36638cc..30958aaa6bf91ac427069801bba706f7929f2331 100644 (file)
@@ -80,8 +80,8 @@ is not given."
        (request-msgType (concat (make-string 1 1) (make-string 3 0)))
                                        ;0x01 0x00 0x00 0x00
        (request-flags (concat (make-string 1 7) (make-string 1 178)
-                              (make-string 2 0)))
-                                       ;0x07 0xb2 0x00 0x00
+                              (make-string 1 8) (make-string 1 0)))
+                                       ;0x07 0xb2 0x08 0x00
        lu ld off-d off-u)
     (when (string-match "@" user)
       (unless domain
@@ -144,11 +144,35 @@ by PASSWORD-HASHES.  PASSWORD-HASHES should be a return value of
       (setq domain (substring user (1+ (match-beginning 0))))
       (setq user (substring user 0 (match-beginning 0))))
 
-    ;; generate response data
-    (setq lmRespData
-         (ntlm-smb-owf-encrypt (car password-hashes) challengeData))
-    (setq ntRespData
-         (ntlm-smb-owf-encrypt (cadr password-hashes) challengeData))
+    ;; check if "negotiate NTLM2 key" flag is set in type 2 message
+    (if (not (zerop (logand (aref flags 2) 8)))
+       (let (randomString
+             sessionHash)
+         ;; generate NTLM2 session response data
+         (setq randomString (string-make-unibyte
+                             (concat
+                              (make-string 1 (random 256))
+                              (make-string 1 (random 256))
+                              (make-string 1 (random 256))
+                              (make-string 1 (random 256))
+                              (make-string 1 (random 256))
+                              (make-string 1 (random 256))
+                              (make-string 1 (random 256))
+                              (make-string 1 (random 256)))))
+         (setq sessionHash (secure-hash 'md5
+                                        (concat challengeData randomString)
+                                        nil nil t))
+         (setq sessionHash (substring sessionHash 0 8))
+
+         (setq lmRespData (concat randomString (make-string 16 0)))
+         (setq ntRespData (ntlm-smb-owf-encrypt
+                           (cadr password-hashes) sessionHash)))
+      (progn
+       ;; generate response data
+       (setq lmRespData
+             (ntlm-smb-owf-encrypt (car password-hashes) challengeData))
+       (setq ntRespData
+             (ntlm-smb-owf-encrypt (cadr password-hashes) challengeData))))
 
     ;; get offsets to fields to pack the response struct in a string
     (setq lu (length user))
index 2591fc83e8458492d641c0c6099181d715f6e3fc..f36487971c4a8419870241c76a367a2a3e199f04 100644 (file)
@@ -1,10 +1,10 @@
-;;; rcirc.el --- default, simple IRC client.
+;;; rcirc.el --- default, simple IRC client          -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2005-2014 Free Software Foundation, Inc.
 
 ;; Author: Ryan Yeske <rcyeske@gmail.com>
 ;; Maintainers: Ryan Yeske <rcyeske@gmail.com>,
-;;              Deniz Dogan <deniz@dogan.se>
+;;             Leo Liu <sdl.web@gmail.com>
 ;; Keywords: comm
 
 ;; This file is part of GNU Emacs.
@@ -43,9 +43,9 @@
 
 ;;; Code:
 
+(require 'cl-lib)
 (require 'ring)
 (require 'time-date)
-(eval-when-compile (require 'cl))
 
 (defgroup rcirc nil
   "Simple IRC client."
@@ -489,7 +489,7 @@ If ARG is non-nil, instead prompt for connection parameters."
                (when (string= server (process-name p))
                  (setq connected p)))
              (if (not connected)
-                 (condition-case e
+                 (condition-case nil
                      (rcirc-connect server port nick user-name
                                     full-name channels password encryption)
                    (quit (message "Quit connecting to %s" server)))
@@ -521,6 +521,7 @@ If ARG is non-nil, instead prompt for connection parameters."
 (defvar rcirc-user-authenticated nil)
 (defvar rcirc-user-disconnect nil)
 (defvar rcirc-connecting nil)
+(defvar rcirc-connection-info nil)
 (defvar rcirc-process nil)
 
 ;;;###autoload
@@ -549,22 +550,23 @@ If ARG is non-nil, instead prompt for connection parameters."
       (set-process-sentinel process 'rcirc-sentinel)
       (set-process-filter process 'rcirc-filter)
 
-      (set (make-local-variable 'rcirc-process) process)
-      (set (make-local-variable 'rcirc-server) server)
-      (set (make-local-variable 'rcirc-server-name) server) ; Update when we get 001 response.
-      (set (make-local-variable 'rcirc-buffer-alist) nil)
-      (set (make-local-variable 'rcirc-nick-table)
-           (make-hash-table :test 'equal))
-      (set (make-local-variable 'rcirc-nick) nick)
-      (set (make-local-variable 'rcirc-process-output) nil)
-      (set (make-local-variable 'rcirc-startup-channels) startup-channels)
-      (set (make-local-variable 'rcirc-last-server-message-time)
-           (current-time))
-
-      (set (make-local-variable 'rcirc-timeout-timer) nil)
-      (set (make-local-variable 'rcirc-user-disconnect) nil)
-      (set (make-local-variable 'rcirc-user-authenticated) nil)
-      (set (make-local-variable 'rcirc-connecting) t)
+      (setq-local rcirc-connection-info
+                 (list server port nick user-name full-name startup-channels
+                       password encryption))
+      (setq-local rcirc-process process)
+      (setq-local rcirc-server server)
+      (setq-local rcirc-server-name server) ; Update when we get 001 response.
+      (setq-local rcirc-buffer-alist nil)
+      (setq-local rcirc-nick-table (make-hash-table :test 'equal))
+      (setq-local rcirc-nick nick)
+      (setq-local rcirc-process-output nil)
+      (setq-local rcirc-startup-channels startup-channels)
+      (setq-local rcirc-last-server-message-time (current-time))
+
+      (setq-local rcirc-timeout-timer nil)
+      (setq-local rcirc-user-disconnect nil)
+      (setq-local rcirc-user-authenticated nil)
+      (setq-local rcirc-connecting t)
 
       (add-hook 'auto-save-hook 'rcirc-log-write)
 
@@ -629,7 +631,7 @@ last ping."
       (cancel-timer rcirc-keepalive-timer))
     (setq rcirc-keepalive-timer nil)))
 
-(defun rcirc-handler-ctcp-KEEPALIVE (process target sender message)
+(defun rcirc-handler-ctcp-KEEPALIVE (process _target _sender message)
   (with-rcirc-process-buffer process
     (setq header-line-format (format "%f" (- (rcirc-float-time)
                                             (string-to-number message))))))
@@ -656,6 +658,16 @@ is non-nil."
   "Hook functions called when the process sentinel is called.
 Functions are called with PROCESS and SENTINEL arguments.")
 
+(defcustom rcirc-reconnect-delay 0
+  "The minimum interval in seconds between reconnect attempts.
+When 0, do not auto-reconnect."
+  :version "25.1"
+  :type 'integer
+  :group 'rcirc)
+
+(defvar rcirc-last-connect-time nil
+  "The last time the buffer was connected.")
+
 (defun rcirc-sentinel (process sentinel)
   "Called when PROCESS receives SENTINEL."
   (let ((sentinel (replace-regexp-in-string "\n" "" sentinel)))
@@ -667,8 +679,17 @@ Functions are called with PROCESS and SENTINEL arguments.")
                       (format "%s: %s (%S)"
                               (process-name process)
                               sentinel
-                              (process-status process)) (not rcirc-target))
+                              (process-status process))
+                       (not rcirc-target))
          (rcirc-disconnect-buffer)))
+      (when (and (string= sentinel "deleted")
+                 (< 0 rcirc-reconnect-delay))
+        (let ((now (current-time)))
+          (when (or (null rcirc-last-connect-time)
+                    (< rcirc-reconnect-delay
+                       (float-time (time-subtract now rcirc-last-connect-time))))
+            (setq rcirc-last-connect-time now)
+            (rcirc-cmd-reconnect nil))))
       (run-hook-with-args 'rcirc-sentinel-functions process sentinel))))
 
 (defun rcirc-disconnect-buffer (&optional buffer)
@@ -752,7 +773,7 @@ Function is called with PROCESS, COMMAND, SENDER, ARGS and LINE.")
 (defvar rcirc-responses-no-activity '("305" "306")
   "Responses that don't trigger activity in the mode-line indicator.")
 
-(defun rcirc-handler-generic (process response sender args text)
+(defun rcirc-handler-generic (process response sender args _text)
   "Generic server response handler."
   (rcirc-print process sender response nil
                (mapconcat 'identity (cdr args) " ")
@@ -782,11 +803,11 @@ Function is called with PROCESS, COMMAND, SENDER, ARGS and LINE.")
 (defun rcirc-buffer-process (&optional buffer)
   "Return the process associated with channel BUFFER.
 With no argument or nil as argument, use the current buffer."
-  (or (get-buffer-process (if buffer
-                             (with-current-buffer buffer
-                               rcirc-server-buffer)
-                           rcirc-server-buffer))
-      rcirc-process))
+  (let ((buffer (or buffer (and (buffer-live-p rcirc-server-buffer)
+                               rcirc-server-buffer))))
+    (if buffer
+        (with-current-buffer buffer rcirc-process)
+      rcirc-process)))
 
 (defun rcirc-server-name (process)
   "Return PROCESS server name, given by the 001 response."
@@ -928,12 +949,12 @@ IRC command completion is performed only if '/' is the first input char."
 (defun set-rcirc-decode-coding-system (coding-system)
   "Set the decode coding system used in this channel."
   (interactive "zCoding system for incoming messages: ")
-  (set (make-local-variable 'rcirc-decode-coding-system) coding-system))
+  (setq-local rcirc-decode-coding-system coding-system))
 
 (defun set-rcirc-encode-coding-system (coding-system)
   "Set the encode coding system used in this channel."
   (interactive "zCoding system for outgoing messages: ")
-  (set (make-local-variable 'rcirc-encode-coding-system) coding-system))
+  (setq-local rcirc-encode-coding-system coding-system))
 
 (defvar rcirc-mode-map
   (let ((map (make-sparse-keymap)))
@@ -990,25 +1011,26 @@ This number is independent of the number of lines in the buffer.")
   (setq major-mode 'rcirc-mode)
   (setq mode-line-process nil)
 
-  (set (make-local-variable 'rcirc-input-ring)
-       ;; If rcirc-input-ring is already a ring with desired size do
-       ;; not re-initialize.
-       (if (and (ring-p rcirc-input-ring)
-               (= (ring-size rcirc-input-ring)
-                  rcirc-input-ring-size))
-          rcirc-input-ring
-        (make-ring rcirc-input-ring-size)))
-  (set (make-local-variable 'rcirc-server-buffer) (process-buffer process))
-  (set (make-local-variable 'rcirc-target) target)
-  (set (make-local-variable 'rcirc-topic) nil)
-  (set (make-local-variable 'rcirc-last-post-time) (current-time))
-  (set (make-local-variable 'fill-paragraph-function) 'rcirc-fill-paragraph)
-  (set (make-local-variable 'rcirc-recent-quit-alist) nil)
-  (set (make-local-variable 'rcirc-current-line) 0)
+  (setq-local rcirc-input-ring
+             ;; If rcirc-input-ring is already a ring with desired
+             ;; size do not re-initialize.
+             (if (and (ring-p rcirc-input-ring)
+                      (= (ring-size rcirc-input-ring)
+                         rcirc-input-ring-size))
+                 rcirc-input-ring
+               (make-ring rcirc-input-ring-size)))
+  (setq-local rcirc-server-buffer (process-buffer process))
+  (setq-local rcirc-target target)
+  (setq-local rcirc-topic nil)
+  (setq-local rcirc-last-post-time (current-time))
+  (setq-local fill-paragraph-function 'rcirc-fill-paragraph)
+  (setq-local rcirc-recent-quit-alist nil)
+  (setq-local rcirc-current-line 0)
+  (setq-local rcirc-last-connect-time (current-time))
 
   (use-hard-newlines t)
-  (set (make-local-variable 'rcirc-short-buffer-name) nil)
-  (set (make-local-variable 'rcirc-urls) nil)
+  (setq-local rcirc-short-buffer-name nil)
+  (setq-local rcirc-urls nil)
 
   ;; setup for omitting responses
   (setq buffer-invisibility-spec '())
@@ -1023,18 +1045,18 @@ This number is independent of the number of lines in the buffer.")
          (serv (if (consp (car i)) (cdar i) "")))
       (when (and (string-match chan (or target ""))
                 (string-match serv (rcirc-server-name process)))
-       (set (make-local-variable 'rcirc-decode-coding-system)
-             (if (consp (cdr i)) (cadr i) (cdr i)))
-        (set (make-local-variable 'rcirc-encode-coding-system)
-             (if (consp (cdr i)) (cddr i) (cdr i))))))
+       (setq-local rcirc-decode-coding-system
+                   (if (consp (cdr i)) (cadr i) (cdr i)))
+        (setq-local rcirc-encode-coding-system
+                   (if (consp (cdr i)) (cddr i) (cdr i))))))
 
   ;; setup the prompt and markers
-  (set (make-local-variable 'rcirc-prompt-start-marker) (point-max-marker))
-  (set (make-local-variable 'rcirc-prompt-end-marker) (point-max-marker))
+  (setq-local rcirc-prompt-start-marker (point-max-marker))
+  (setq-local rcirc-prompt-end-marker (point-max-marker))
   (rcirc-update-prompt)
   (goto-char rcirc-prompt-end-marker)
 
-  (set (make-local-variable 'overlay-arrow-position) (make-marker))
+  (setq-local overlay-arrow-position (make-marker))
 
   ;; if the user changes the major mode or kills the buffer, there is
   ;; cleanup work to do
@@ -1222,13 +1244,13 @@ Create the buffer if it doesn't exist."
          (ring-insert rcirc-input-ring input)
          (setq rcirc-input-ring-index 0))))))
 
-(defun rcirc-fill-paragraph (&optional arg)
-  (interactive "p")
+(defun rcirc-fill-paragraph (&optional justify)
+  (interactive "P")
   (when (> (point) rcirc-prompt-end-marker)
     (save-restriction
       (narrow-to-region rcirc-prompt-end-marker (point-max))
       (let ((fill-column rcirc-max-message-length))
-       (fill-region (point-min) (point-max))))))
+       (fill-region (point-min) (point-max) justify)))))
 
 (defun rcirc-process-input-line (line)
   (if (string-match "^/\\([^ ]+\\) ?\\(.*\\)$" line)
@@ -1393,9 +1415,9 @@ is found by looking up RESPONSE in `rcirc-response-formats'."
        (rcirc-add-face start (match-beginning 0) face)
        (setq start (match-beginning 0))
        (replace-match
-        (case (aref (match-string 1) 0)
+        (cl-case (aref (match-string 1) 0)
            (?f (setq face
-                     (case (string-to-char (match-string 3))
+                     (cl-case (string-to-char (match-string 3))
                        (?w 'font-lock-warning-face)
                        (?p 'rcirc-server-prefix)
                        (?s 'rcirc-server)
@@ -1431,9 +1453,9 @@ is found by looking up RESPONSE in `rcirc-response-formats'."
       (rcirc-add-face start (match-beginning 0) face))
       (buffer-substring (point-min) (point-max))))
 
-(defun rcirc-target-buffer (process sender response target text)
+(defun rcirc-target-buffer (process sender response target _text)
   "Return a buffer to print the server response."
-  (assert (not (bufferp target)))
+  (cl-assert (not (bufferp target)))
   (with-rcirc-process-buffer process
     (cond ((not target)
           (rcirc-any-buffer process))
@@ -1474,11 +1496,10 @@ Returns nil if the information is not recorded."
 
 (defun rcirc-last-line (process nick target)
   "Return the line from the last activity from NICK in TARGET."
-  (let* ((chanbuf (rcirc-get-buffer process target))
-        (line (or (cdr (assoc-string target
-                                     (gethash nick (with-rcirc-server-buffer
-                                                     rcirc-nick-table)) t))
-                  (rcirc-last-quit-line process nick target))))
+  (let ((line (or (cdr (assoc-string target
+                                    (gethash nick (with-rcirc-server-buffer
+                                                    rcirc-nick-table)) t))
+                 (rcirc-last-quit-line process nick target))))
     (if line
        line
       ;;(message "line is nil for %s in %s" nick target)
@@ -1883,7 +1904,9 @@ Uninteresting lines are those whose responses are listed in
        (message "Rcirc-Omit mode enabled"))
     (remove-from-invisibility-spec '(rcirc-omit . nil))
     (message "Rcirc-Omit mode disabled"))
-    (recenter (when (> (point) rcirc-prompt-start-marker) -1)))
+  (dolist (window (get-buffer-window-list (current-buffer)))
+    (with-selected-window window
+      (recenter (when (> (point) rcirc-prompt-start-marker) -1)))))
 
 (defun rcirc-switch-to-server-buffer ()
   "Switch to the server buffer associated with current channel buffer."
@@ -1956,7 +1979,7 @@ activity.  Only run if the buffer is not visible and
                      (let ((t1 (with-current-buffer b1 rcirc-last-post-time))
                            (t2 (with-current-buffer b2 rcirc-last-post-time)))
                        (time-less-p t2 t1)))))
-       (pushnew type rcirc-activity-types)
+       (cl-pushnew type rcirc-activity-types)
        (unless (and (equal rcirc-activity old-activity)
                     (member type old-types))
          (rcirc-update-activity-string)))))
@@ -1977,13 +2000,13 @@ activity.  Only run if the buffer is not visible and
 (defun rcirc-split-activity (activity)
   "Return a cons cell with ACTIVITY split into (lopri . hipri)."
   (let (lopri hipri)
-    (dolist (buf rcirc-activity)
+    (dolist (buf activity)
       (with-current-buffer buf
        (if (and rcirc-low-priority-flag
                 (not (member 'nick rcirc-activity-types)))
-           (add-to-list 'lopri buf t)
-         (add-to-list 'hipri buf t))))
-    (cons lopri hipri)))
+           (push buf lopri)
+         (push buf hipri))))
+    (cons (nreverse lopri) (nreverse hipri))))
 
 (defvar rcirc-update-activity-string-hook nil
   "Hook run whenever the activity string is updated.")
@@ -2015,7 +2038,7 @@ activity.  Only run if the buffer is not visible and
                 (with-current-buffer b
                   (dolist (type rcirc-activity-types)
                     (rcirc-add-face 0 (length s)
-                                    (case type
+                                    (cl-case type
                                       (nick 'rcirc-track-nick)
                                       (keyword 'rcirc-track-keyword))
                                     s)))
@@ -2123,7 +2146,7 @@ activity.  Only run if the buffer is not visible and
            (when (and (listp x) (listp (cadr x)))
              (setcdr x (if (> (length (cdr x)) 1)
                            (rcirc-make-trees (cdr x))
-                         (setcdr x (list (cdadr x)))))))
+                         (setcdr x (list (cl-cdadr x)))))))
          alist)))
 \f
 ;;; /commands these are called with 3 args: PROCESS, TARGET, which is
@@ -2211,6 +2234,19 @@ CHANNELS is a comma- or space-separated string of channel names."
                                         reason
                                       rcirc-id-string))))
 
+(defun-rcirc-command reconnect (_)
+  "Reconnect to current server."
+  (interactive "i")
+  (with-rcirc-server-buffer
+    (cond
+     (rcirc-connecting (message "Already connecting"))
+     ((process-live-p process) (message "Server process is alive"))
+     (t (let ((conn-info rcirc-connection-info))
+         (setf (nth 5 conn-info)
+               (cl-remove-if-not #'rcirc-channel-p
+                                 (mapcar #'car rcirc-buffer-alist)))
+         (apply #'rcirc-connect conn-info))))))
+
 (defun-rcirc-command nick (nick)
   "Change nick to NICK."
   (interactive "i")
@@ -2281,7 +2317,7 @@ With a prefix arg, prompt for new topic."
                             (mapconcat 'identity (cdr arglist) " "))))
     (rcirc-send-string process (concat "KICK " target " " argstring))))
 
-(defun rcirc-cmd-ctcp (args &optional process target)
+(defun rcirc-cmd-ctcp (args &optional process _target)
   (if (string-match "^\\([^ ]+\\)\\s-+\\(.+\\)$" args)
       (let* ((target (match-string 1 args))
              (request (upcase (match-string 2 args)))
@@ -2292,7 +2328,7 @@ With a prefix arg, prompt for new topic."
     (rcirc-print process (rcirc-nick process) "ERROR" nil
                  "usage: /ctcp NICK REQUEST")))
 
-(defun rcirc-ctcp-sender-PING (process target request)
+(defun rcirc-ctcp-sender-PING (process target _request)
   "Send a CTCP PING message to TARGET."
   (let ((timestamp (format "%.0f" (rcirc-float-time))))
     (rcirc-send-ctcp process target "PING" timestamp)))
@@ -2412,21 +2448,20 @@ If ARG is given, opens the URL in a new browser window."
                     (lambda (x) (>= point (cdr x)))
                     rcirc-urls))
          (completions (mapcar (lambda (x) (car x)) filtered))
-         (initial-input (caar filtered))
-         (history (mapcar (lambda (x) (car x)) (cdr filtered))))
-    (browse-url (completing-read "rcirc browse-url: "
-                                 completions nil nil initial-input 'history)
+         (defaults (mapcar (lambda (x) (car x)) filtered)))
+    (browse-url (completing-read "Rcirc browse-url: "
+                                 completions nil nil (car defaults) nil defaults)
                 arg)))
 \f
-(defun rcirc-markup-timestamp (sender response)
+(defun rcirc-markup-timestamp (_sender _response)
   (goto-char (point-min))
   (insert (rcirc-facify (format-time-string rcirc-time-format)
                        'rcirc-timestamp)))
 
-(defun rcirc-markup-attributes (sender response)
+(defun rcirc-markup-attributes (_sender _response)
   (while (re-search-forward "\\([\C-b\C-_\C-v]\\).*?\\(\\1\\|\C-o\\)" nil t)
     (rcirc-add-face (match-beginning 0) (match-end 0)
-                   (case (char-after (match-beginning 1))
+                   (cl-case (char-after (match-beginning 1))
                      (?\C-b 'bold)
                      (?\C-v 'italic)
                      (?\C-_ 'underline)))
@@ -2440,7 +2475,7 @@ If ARG is given, opens the URL in a new browser window."
   (while (re-search-forward "\C-o+" nil t)
     (delete-region (match-beginning 0) (match-end 0))))
 
-(defun rcirc-markup-my-nick (sender response)
+(defun rcirc-markup-my-nick (_sender response)
   (with-syntax-table rcirc-nick-syntax-table
     (while (re-search-forward (concat "\\b"
                                      (regexp-quote (rcirc-nick
@@ -2454,7 +2489,7 @@ If ARG is given, opens the URL in a new browser window."
                        'rcirc-nick-in-message-full-line)
        (rcirc-record-activity (current-buffer) 'nick)))))
 
-(defun rcirc-markup-urls (sender response)
+(defun rcirc-markup-urls (_sender _response)
   (while (and rcirc-url-regexp ;; nil means disable URL catching
               (re-search-forward rcirc-url-regexp nil t))
     (let* ((start (match-beginning 0))
@@ -2485,7 +2520,7 @@ If ARG is given, opens the URL in a new browser window."
          (rcirc-add-face (match-beginning 0) (match-end 0) 'rcirc-keyword)
          (rcirc-record-activity (current-buffer) 'keyword))))))
 
-(defun rcirc-markup-bright-nicks (sender response)
+(defun rcirc-markup-bright-nicks (_sender response)
   (when (and rcirc-bright-nicks
             (string= response "NAMES"))
     (with-syntax-table rcirc-nick-syntax-table
@@ -2493,7 +2528,7 @@ If ARG is given, opens the URL in a new browser window."
        (rcirc-add-face (match-beginning 0) (match-end 0)
                        'rcirc-bright-nick)))))
 
-(defun rcirc-markup-fill (sender response)
+(defun rcirc-markup-fill (_sender response)
   (when (not (string= response "372"))         ; /motd
     (let ((fill-prefix
           (or rcirc-fill-prefix
@@ -2574,7 +2609,7 @@ If ARG is given, opens the URL in a new browser window."
                            sender)))
                  message t))))
 
-(defun rcirc-check-auth-status (process sender args text)
+(defun rcirc-check-auth-status (process sender args _text)
   "Check if the user just authenticated.
 If authenticated, runs `rcirc-authenticated-hook' with PROCESS as
 the only argument."
@@ -2602,10 +2637,10 @@ the only argument."
           (run-hook-with-args 'rcirc-authenticated-hook process)
           (remove-hook 'rcirc-authenticated-hook 'rcirc-join-channels-post-auth t))))))
 
-(defun rcirc-handler-WALLOPS (process sender args text)
+(defun rcirc-handler-WALLOPS (process sender args _text)
   (rcirc-print process sender "WALLOPS" sender (car args) t))
 
-(defun rcirc-handler-JOIN (process sender args text)
+(defun rcirc-handler-JOIN (process sender args _text)
   (let ((channel (car args)))
     (with-current-buffer (rcirc-get-buffer-create process channel)
       ;; when recently rejoining, restore the linestamp
@@ -2626,7 +2661,7 @@ the only argument."
       (rcirc-print process sender "JOIN" sender channel))))
 
 ;; PART and KICK are handled the same way
-(defun rcirc-handler-PART-or-KICK (process response channel sender nick args)
+(defun rcirc-handler-PART-or-KICK (process _response channel _sender nick _args)
   (rcirc-ignore-update-automatic nick)
   (if (not (string= nick (rcirc-nick process)))
       ;; this is someone else leaving
@@ -2643,7 +2678,7 @@ the only argument."
       (when buffer
        (rcirc-disconnect-buffer buffer)))))
 
-(defun rcirc-handler-PART (process sender args text)
+(defun rcirc-handler-PART (process sender args _text)
   (let* ((channel (car args))
         (reason (cadr args))
         (message (concat channel " " reason)))
@@ -2654,10 +2689,10 @@ the only argument."
 
     (rcirc-handler-PART-or-KICK process "PART" channel sender sender reason)))
 
-(defun rcirc-handler-KICK (process sender args text)
+(defun rcirc-handler-KICK (process sender args _text)
   (let* ((channel (car args))
         (nick (cadr args))
-        (reason (caddr args))
+        (reason (cl-caddr args))
         (message (concat nick " " channel " " reason)))
     (rcirc-print process sender "KICK" channel message t)
     ;; print in private chat buffer if it exists
@@ -2682,7 +2717,7 @@ the only argument."
                      (cons (cons nick line)
                            rcirc-recent-quit-alist))))))))))
 
-(defun rcirc-handler-QUIT (process sender args text)
+(defun rcirc-handler-QUIT (process sender args _text)
   (rcirc-ignore-update-automatic sender)
   (mapc (lambda (channel)
          ;; broadcast quit message each channel
@@ -2692,7 +2727,7 @@ the only argument."
        (rcirc-nick-channels process sender))
   (rcirc-nick-remove process sender))
 
-(defun rcirc-handler-NICK (process sender args text)
+(defun rcirc-handler-NICK (process sender args _text)
   (let* ((old-nick sender)
          (new-nick (car args))
          (channels (rcirc-nick-channels process old-nick)))
@@ -2723,25 +2758,25 @@ the only argument."
         ;; reauthenticate
         (when rcirc-auto-authenticate-flag (rcirc-authenticate))))))
 
-(defun rcirc-handler-PING (process sender args text)
+(defun rcirc-handler-PING (process _sender args _text)
   (rcirc-send-string process (concat "PONG :" (car args))))
 
-(defun rcirc-handler-PONG (process sender args text)
+(defun rcirc-handler-PONG (_process _sender _args _text)
   ;; do nothing
   )
 
-(defun rcirc-handler-TOPIC (process sender args text)
+(defun rcirc-handler-TOPIC (process sender args _text)
   (let ((topic (cadr args)))
     (rcirc-print process sender "TOPIC" (car args) topic)
     (with-current-buffer (rcirc-get-buffer process (car args))
       (setq rcirc-topic topic))))
 
 (defvar rcirc-nick-away-alist nil)
-(defun rcirc-handler-301 (process sender args text)
+(defun rcirc-handler-301 (process _sender args text)
   "RPL_AWAY"
   (let* ((nick (cadr args))
         (rec (assoc-string nick rcirc-nick-away-alist))
-        (away-message (caddr args)))
+        (away-message (cl-caddr args)))
     (when (or (not rec)
              (not (string= (cdr rec) away-message)))
       ;; away message has changed
@@ -2751,7 +2786,7 @@ the only argument."
        (setq rcirc-nick-away-alist (cons (cons nick away-message)
                                          rcirc-nick-away-alist))))))
 
-(defun rcirc-handler-317 (process sender args text)
+(defun rcirc-handler-317 (process sender args _text)
   "RPL_WHOISIDLE"
   (let* ((nick (nth 1 args))
          (idle-secs (string-to-number (nth 2 args)))
@@ -2765,31 +2800,31 @@ the only argument."
                           nick idle-string signon-string)))
     (rcirc-print process sender "317" nil message t)))
 
-(defun rcirc-handler-332 (process sender args text)
+(defun rcirc-handler-332 (process _sender args _text)
   "RPL_TOPIC"
   (let ((buffer (or (rcirc-get-buffer process (cadr args))
                    (rcirc-get-temp-buffer-create process (cadr args)))))
     (with-current-buffer buffer
-      (setq rcirc-topic (caddr args)))))
+      (setq rcirc-topic (cl-caddr args)))))
 
-(defun rcirc-handler-333 (process sender args text)
+(defun rcirc-handler-333 (process sender args _text)
   "333 says who set the topic and when.
 Not in rfc1459.txt"
   (let ((buffer (or (rcirc-get-buffer process (cadr args))
                    (rcirc-get-temp-buffer-create process (cadr args)))))
     (with-current-buffer buffer
-      (let ((setter (caddr args))
+      (let ((setter (cl-caddr args))
            (time (current-time-string
                   (seconds-to-time
-                   (string-to-number (cadddr args))))))
+                   (string-to-number (cl-cadddr args))))))
        (rcirc-print process sender "TOPIC" (cadr args)
                     (format "%s (%s on %s)" rcirc-topic setter time))))))
 
-(defun rcirc-handler-477 (process sender args text)
+(defun rcirc-handler-477 (process sender args _text)
   "ERR_NOCHANMODES"
-  (rcirc-print process sender "477" (cadr args) (caddr args)))
+  (rcirc-print process sender "477" (cadr args) (cl-caddr args)))
 
-(defun rcirc-handler-MODE (process sender args text)
+(defun rcirc-handler-MODE (process sender args _text)
   (let ((target (car args))
         (msg (mapconcat 'identity (cdr args) " ")))
     (rcirc-print process sender "MODE"
@@ -2809,7 +2844,7 @@ Not in rfc1459.txt"
   (let ((tmpnam (concat " " (downcase channel) "TMP" (process-name process))))
     (get-buffer-create tmpnam)))
 
-(defun rcirc-handler-353 (process sender args text)
+(defun rcirc-handler-353 (process _sender args _text)
   "RPL_NAMREPLY"
   (let ((channel (nth 2 args))
        (names (or (nth 3 args) "")))
@@ -2822,7 +2857,7 @@ Not in rfc1459.txt"
       (goto-char (point-max))
       (insert (car (last args)) " "))))
 
-(defun rcirc-handler-366 (process sender args text)
+(defun rcirc-handler-366 (process sender args _text)
   "RPL_ENDOFNAMES"
   (let* ((channel (cadr args))
          (buffer (rcirc-get-temp-buffer-create process channel)))
@@ -2847,14 +2882,14 @@ Passwords are stored in `rcirc-authinfo' (which see)."
     (dolist (i rcirc-authinfo)
       (let ((process (rcirc-buffer-process))
            (server (car i))
-           (nick (caddr i))
+           (nick (cl-caddr i))
            (method (cadr i))
-           (args (cdddr i)))
+           (args (cl-cdddr i)))
        (when (and (string-match server rcirc-server))
           (if (and (memq method '(nickserv chanserv bitlbee))
                    (string-match nick rcirc-nick))
               ;; the following methods rely on the user's nickname.
-              (case method
+              (cl-case method
                 (nickserv
                  (rcirc-send-privmsg
                   process
@@ -2878,10 +2913,10 @@ Passwords are stored in `rcirc-authinfo' (which see)."
                "Q@CServe.quakenet.org"
                (format "AUTH %s %s" nick (car args))))))))))
 
-(defun rcirc-handler-INVITE (process sender args text)
+(defun rcirc-handler-INVITE (process sender args _text)
   (rcirc-print process sender "INVITE" nil (mapconcat 'identity args " ") t))
 
-(defun rcirc-handler-ERROR (process sender args text)
+(defun rcirc-handler-ERROR (process sender args _text)
   (rcirc-print process sender "ERROR" nil (mapconcat 'identity args " ")))
 
 (defun rcirc-handler-CTCP (process target sender text)
@@ -2899,7 +2934,7 @@ Passwords are stored in `rcirc-authinfo' (which see)."
               (rcirc-print process sender "CTCP" target
                           (format "%s" text) t))))))
 
-(defun rcirc-handler-ctcp-VERSION (process target sender args)
+(defun rcirc-handler-ctcp-VERSION (process _target sender _args)
   (rcirc-send-string process
                      (concat "NOTICE " sender
                              " :\C-aVERSION " rcirc-id-string
@@ -2908,12 +2943,12 @@ Passwords are stored in `rcirc-authinfo' (which see)."
 (defun rcirc-handler-ctcp-ACTION (process target sender args)
   (rcirc-print process sender "ACTION" target args t))
 
-(defun rcirc-handler-ctcp-TIME (process target sender args)
+(defun rcirc-handler-ctcp-TIME (process _target sender _args)
   (rcirc-send-string process
                      (concat "NOTICE " sender
                              " :\C-aTIME " (current-time-string) "\C-a")))
 
-(defun rcirc-handler-CTCP-response (process target sender message)
+(defun rcirc-handler-CTCP-response (process _target sender message)
   (rcirc-print process sender "CTCP" nil message t))
 \f
 (defgroup rcirc-faces nil
index d43d3cb3e5bf057fad91ec99511b726b9b7f8576..878728c93199c24087777f23b88dc2a91617e566 100644 (file)
@@ -130,6 +130,7 @@ cid: URL as the argument.")
 (defvar shr-start nil)
 (defvar shr-indentation 0)
 (defvar shr-inhibit-images nil)
+(defvar shr-internal-width (or shr-width (1- (window-width))))
 (defvar shr-list-mode nil)
 (defvar shr-content-cache nil)
 (defvar shr-kinsoku-shorten nil)
@@ -197,7 +198,7 @@ DOM should be a parse tree as generated by
        (shr-state nil)
        (shr-start nil)
        (shr-base nil)
-       (shr-width (or shr-width (1- (window-width)))))
+       (shr-internal-width (or shr-width (1- (window-width)))))
     (shr-descend (shr-transform-dom dom))
     (shr-remove-trailing-whitespace start (point))))
 
@@ -214,12 +215,16 @@ DOM should be a parse tree as generated by
              (overlay-put overlay 'before-string nil))))
        (forward-line 1)))))
 
-(defun shr-copy-url ()
+(defun shr-copy-url (&optional image-url)
   "Copy the URL under point to the kill ring.
+If IMAGE-URL (the prefix) is non-nil, or there is no link under
+point, but there is an image under point then copy the URL of the
+image under point instead.
 If called twice, then try to fetch the URL and see whether it
 redirects somewhere else."
-  (interactive)
-  (let ((url (get-text-property (point) 'shr-url)))
+  (interactive "P")
+  (let ((url (or (get-text-property (point) 'shr-url)
+                (get-text-property (point) 'image-url))))
     (cond
      ((not url)
       (message "No URL under point"))
@@ -242,9 +247,9 @@ redirects somewhere else."
      ;; Copy the URL to the kill ring.
      (t
       (with-temp-buffer
-       (insert url)
+       (insert (url-encode-url url))
        (copy-region-as-kill (point-min) (point-max))
-       (message "Copied %s" url))))))
+       (message "Copied %s" (buffer-string)))))))
 
 (defun shr-next-link ()
   "Skip to the next link."
@@ -467,8 +472,8 @@ size, and full-buffer size."
       (insert elem)
       (setq shr-state nil)
       (let (found)
-       (while (and (> (current-column) shr-width)
-                   (> shr-width 0)
+       (while (and (> (current-column) shr-internal-width)
+                   (> shr-internal-width 0)
                    (progn
                      (setq found (shr-find-fill-point))
                      (not (eolp))))
@@ -482,10 +487,10 @@ size, and full-buffer size."
          (when (> shr-indentation 0)
            (shr-indent))
          (end-of-line))
-       (if (<= (current-column) shr-width)
+       (if (<= (current-column) shr-internal-width)
            (insert " ")
          ;; In case we couldn't get a valid break point (because of a
-         ;; word that's longer than `shr-width'), just break anyway.
+         ;; word that's longer than `shr-internal-width'), just break anyway.
          (insert "\n")
          (when (> shr-indentation 0)
            (shr-indent)))))
@@ -493,7 +498,7 @@ size, and full-buffer size."
       (delete-char -1)))))
 
 (defun shr-find-fill-point ()
-  (when (> (move-to-column shr-width) shr-width)
+  (when (> (move-to-column shr-internal-width) shr-internal-width)
     (backward-char 1))
   (let ((bp (point))
        failed)
@@ -533,7 +538,7 @@ size, and full-buffer size."
           ;; so we look for the second best position.
           (while (and (progn
                         (forward-char 1)
-                        (<= (current-column) shr-width))
+                        (<= (current-column) shr-internal-width))
                       (progn
                         (setq bp (point))
                         (shr-char-kinsoku-eol-p (following-char)))))
@@ -1340,7 +1345,7 @@ The preference is a float determined from `shr-prefer-media-type'."
 
 (defun shr-tag-hr (_cont)
   (shr-ensure-newline)
-  (insert (make-string shr-width shr-hr-line) "\n"))
+  (insert (make-string shr-internal-width shr-hr-line) "\n"))
 
 (defun shr-tag-title (cont)
   (shr-heading cont 'bold 'underline))
@@ -1633,7 +1638,7 @@ The preference is a float determined from `shr-prefer-media-type'."
        (setq style (nconc (list (cons 'color fgcolor)) style)))
       (when style
        (setq shr-stylesheet (append style shr-stylesheet)))
-      (let ((shr-width width)
+      (let ((shr-internal-width width)
            (shr-indentation 0))
        (shr-descend (cons 'td cont)))
       ;; Delete padding at the bottom of the TDs.
@@ -1705,7 +1710,8 @@ The preference is a float determined from `shr-prefer-media-type'."
     (dotimes (i (length columns))
       (aset widths i (max (truncate (* (aref columns i)
                                       total-percentage
-                                      (- shr-width (1+ (length columns)))))
+                                      (- shr-internal-width
+                                          (1+ (length columns)))))
                          10)))
     widths))
 
index 3d41750a92da908df8fe3c04d473fa46ea0b1b2c..88e52fe019923d22fd519e7d747255f0fde92ed5 100644 (file)
@@ -458,9 +458,7 @@ Emacs dired can't find files."
       (insert "  " (mapconcat 'identity sorted-lines "\n  ")))
     ;; Add final newline.
     (goto-char (point-max))
-    (unless (= (point) (line-beginning-position))
-      (insert "\n"))))
-
+    (unless (bolp) (insert "\n"))))
 
 (defun tramp-adb-ls-output-time-less-p (a b)
   "Sort \"ls\" output by time, descending."
@@ -609,10 +607,10 @@ But handle the case, if the \"test\" command is not available."
        'write-region
        (list start end tmpfile append 'no-message lockname confirm))
       (with-tramp-progress-reporter
-         v 3 (format "Moving tmp file %s to %s" tmpfile filename)
+         v 3 (format "Moving tmp file `%s' to `%s'" tmpfile filename)
        (unwind-protect
            (when (tramp-adb-execute-adb-command v "push" tmpfile localname)
-             (tramp-error v 'file-error "Cannot write: `%s' filename"))
+             (tramp-error v 'file-error "Cannot write: `%s'" filename))
          (delete-file tmpfile)))
 
       (when (or (eq visit t) (stringp visit))
@@ -998,7 +996,8 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
   (with-temp-buffer
     (prog1
        (unless
-           (zerop (apply 'tramp-call-process tramp-adb-program nil t nil args))
+           (zerop
+            (apply 'tramp-call-process vec tramp-adb-program nil t nil args))
          (buffer-string))
       (tramp-message vec 6 "%s" (buffer-string)))))
 
@@ -1031,7 +1030,7 @@ This happens for Android >= 4.0."
 
 (defun tramp-adb-send-command-and-check
   (vec command)
-  "Run COMMAND and and check its exit status.
+  "Run COMMAND and check its exit status.
 Sends `echo $?' along with the COMMAND for checking the exit status.  If
 COMMAND is nil, just sends `echo $?'.  Returns the exit status found."
   (tramp-adb-send-command
@@ -1107,10 +1106,7 @@ connection if a previous connection has died for some reason."
        (and p (processp p) (memq (process-status p) '(run open)))
       (save-match-data
        (when (and p (processp p)) (delete-process p))
-       (setq tramp-current-method (tramp-file-name-method vec)
-             tramp-current-user (tramp-file-name-user vec)
-             tramp-current-host (tramp-file-name-host vec)
-             devices (mapcar 'cadr (tramp-adb-parse-device-names nil)))
+       (setq devices (mapcar 'cadr (tramp-adb-parse-device-names nil)))
        (if (not devices)
            (tramp-error vec 'file-error "No device connected"))
        (if (and (> (length host) 0) (not (member host devices)))
index be66f18d9e44664b8cdf1f5b6757aff73a8d4d17..056b1bdaf914f43ef0ee33fc80cae3078e9f0228 100644 (file)
@@ -201,15 +201,21 @@ Remove also properties of all files in subdirectories."
 ;; Reverting or killing a buffer should also flush file properties.
 ;; They could have been changed outside Tramp.  In eshell, "ls" would
 ;; not show proper directory contents when a file has been copied or
-;; deleted before.
+;; deleted before.  We must apply `save-match-data', because it would
+;; corrupt other packages otherwise (reported from org).
 (defun tramp-flush-file-function ()
-  "Flush all Tramp cache properties from `buffer-file-name'."
-  (let ((bfn (if (stringp (buffer-file-name))
-                (buffer-file-name)
-              default-directory)))
-    (when (tramp-tramp-file-p bfn)
-      (with-parsed-tramp-file-name bfn nil
-       (tramp-flush-file-property v localname)))))
+  "Flush all Tramp cache properties from `buffer-file-name'.
+This is suppressed for temporary buffers."
+  (save-match-data
+    (unless (or (null (buffer-name))
+               (string-match "^\\( \\|\\*\\)" (buffer-name)))
+      (let ((bfn (if (stringp (buffer-file-name))
+                    (buffer-file-name)
+                  default-directory))
+           (tramp-verbose 0))
+       (when (tramp-tramp-file-p bfn)
+         (with-parsed-tramp-file-name bfn nil
+           (tramp-flush-file-property v localname)))))))
 
 (add-hook 'before-revert-hook 'tramp-flush-file-function)
 (add-hook 'eshell-pre-command-hook 'tramp-flush-file-function)
index dc84a524ba0816602fec32c5f20e299e936784dd..a723e57f29678975cc9091ad1097ecec7571bfe3 100644 (file)
@@ -120,17 +120,6 @@ present for backward compatibility."
      tramp-ftp-method
      '((tramp-parse-netrc "~/.netrc"))))
 
-;; If there is URL syntax, `substitute-in-file-name' needs special
-;; handling.
-(put 'substitute-in-file-name 'ange-ftp 'tramp-handle-substitute-in-file-name)
-(add-hook 'tramp-ftp-unload-hook
-         (lambda ()
-            (setplist 'substitute-in-file-name
-                      (delete 'ange-ftp
-                              (delete 'tramp-handle-substitute-in-file-name
-                                      (symbol-plist
-                                       'substitute-in-file-name))))))
-
 ;;;###tramp-autoload
 (defun tramp-ftp-file-name-handler (operation &rest args)
   "Invoke the Ange-FTP handler for OPERATION.
@@ -189,12 +178,7 @@ pass to the OPERATION."
            (ignore-errors (delete-file tmpfile)))))
 
        ;; Normally, the handlers must be discarded.
-       ;; `inhibit-file-name-handlers' isn't sufficient, because the
-       ;; local file name could be in Tramp syntax as well (for
-       ;; example, returning VMS file names like "/DISK$CAM:/AAA").
-       ;; That's why we set also `tramp-mode' to nil.
-       (t (let* (;(tramp-mode nil)
-                (inhibit-file-name-handlers
+       (t (let* ((inhibit-file-name-handlers
                  (list 'tramp-file-name-handler
                        'tramp-completion-file-name-handler
                        (and (eq inhibit-file-name-operation operation)
index 52189e091fb40c0654ad531306ef58d62b6c023f..569fb684144a19755ca5f54891c7df3e5176c5f6 100644 (file)
 
 ;; The customer option `tramp-gvfs-methods' contains the list of
 ;; supported connection methods.  Per default, these are "dav",
-;; "davs", "obex" and "synce".  Note that with "obex" it might be
-;; necessary to pair with the other bluetooth device, if it hasn't
+;; "davs", "obex", "sftp" and "synce".  Note that with "obex" it might
+;; be necessary to pair with the other bluetooth device, if it hasn't
 ;; been done already.  There might be also some few seconds delay in
 ;; discovering available bluetooth devices.
 
-;; Other possible connection methods are "ftp", "sftp" and "smb".
-;; When one of these methods is added to the list, the remote access
-;; for that method is performed via GVFS instead of the native Tramp
+;; Other possible connection methods are "ftp" and "smb".  When one of
+;; these methods is added to the list, the remote access for that
+;; method is performed via GVFS instead of the native Tramp
 ;; implementation.
 
 ;; GVFS offers even more connection methods.  The complete list of
   (require 'custom))
 
 ;;;###tramp-autoload
-(defcustom tramp-gvfs-methods '("dav" "davs" "obex" "synce")
+(defcustom tramp-gvfs-methods '("dav" "davs" "obex" "sftp" "synce")
   "List of methods for remote files, accessed with GVFS."
   :group 'tramp
   :version "23.2"
@@ -661,7 +661,7 @@ is no information where to trace the message.")
   "Like `delete-file' for Tramp files."
   (with-parsed-tramp-file-name filename nil
     (tramp-flush-file-property v (file-name-directory localname))
-    (tramp-flush-directory-property v localname)
+    (tramp-flush-file-property v localname)
     (unless
        (tramp-gvfs-send-command
         v (if (and trash delete-by-moving-to-trash) "gvfs-trash" "gvfs-rm")
@@ -794,7 +794,8 @@ is no information where to trace the message.")
            (goto-char (point-min))
            (setq res-filemodes
                  (if (re-search-forward "unix::mode:\\s-+\\([0-9]+\\)" nil t)
-                     (tramp-file-mode-from-int (match-string 1))
+                     (tramp-file-mode-from-int
+                      (string-to-number (match-string 1)))
                    (if dirp "drwx------" "-rwx------")))
            ;; ... inode and device
            (goto-char (point-min))
@@ -899,7 +900,7 @@ is no information where to trace the message.")
               entry)
            ;; Get a list of directories and files.
           (tramp-gvfs-send-command
-           v "gvfs-ls" (tramp-gvfs-url-file-name directory))
+           v "gvfs-ls" "-h" (tramp-gvfs-url-file-name directory))
 
           ;; Now grab the output.
            (with-temp-buffer
@@ -1107,7 +1108,7 @@ is no information where to trace the message.")
 (defun tramp-gvfs-url-file-name (filename)
   "Return FILENAME in URL syntax."
   ;; "/" must NOT be hexlified.
-  (let ((url-unreserved-chars (append '(?/) url-unreserved-chars))
+  (let ((url-unreserved-chars (cons ?/ url-unreserved-chars))
        result)
     (setq
      result
@@ -1118,9 +1119,9 @@ is no information where to trace the message.")
              (setq user
                    (concat (match-string 2 user) ";" (match-string 1 user))))
            (url-parse-make-urlobj
-            method (url-hexify-string user) nil
+            method (and user (url-hexify-string user)) nil
             (tramp-file-name-real-host v) (tramp-file-name-port v)
-            (url-hexify-string localname) nil nil t))
+            (and localname (url-hexify-string localname)) nil nil t))
        (url-parse-make-urlobj
         "file" nil nil nil nil
         (url-hexify-string (file-truename filename)) nil nil t))))
@@ -1555,14 +1556,10 @@ connection if a previous connection has died for some reason."
   "Send the COMMAND with its ARGS to connection VEC.
 COMMAND is usually a command from the gvfs-* utilities.
 `call-process' is applied, and it returns `t' if the return code is zero."
-  (let (result)
-    (with-current-buffer (tramp-get-connection-buffer vec)
-      (tramp-gvfs-maybe-open-connection vec)
-      (erase-buffer)
-      (tramp-message vec 6 "%s %s" command (mapconcat 'identity args " "))
-      (setq result (apply 'tramp-call-process command nil t nil args))
-      (tramp-message vec 6 "\n%s" (buffer-string))
-      (zerop result))))
+  (with-current-buffer (tramp-get-connection-buffer vec)
+    (tramp-gvfs-maybe-open-connection vec)
+    (erase-buffer)
+    (zerop (apply 'tramp-call-process vec command nil t nil args))))
 
 \f
 ;; D-Bus BLUEZ functions.
@@ -1671,7 +1668,7 @@ be used."
        (list user host)))
    (zeroconf-list-services "_webdav._tcp")))
 
-;; Add completion function for DAV and DAVS methods.
+;; Add completion function for SFTP, DAV and DAVS methods.
 (when (and tramp-gvfs-enabled
           (member zeroconf-service-avahi (dbus-list-known-names :system)))
   (zeroconf-init tramp-gvfs-zeroconf-domain)
index 6f55b86e9e5f5a73d3a0edd45933a9254c18e23e..ce5e2faff50795307ea68d4d24eba4aae71e96d0 100644 (file)
 (defvar directory-sep-char)
 (defvar tramp-gw-tunnel-method)
 (defvar tramp-gw-socks-method)
+(defvar vc-handled-backends)
+(defvar vc-bzr-program)
+(defvar vc-git-program)
+(defvar vc-hg-program)
 
 (defcustom tramp-inline-compress-start-size 4096
   "The minimum size of compressing where inline transfer.
@@ -141,17 +145,6 @@ detected as prompt when being sent on echoing hosts, therefore.")
                                 ("-o" "StrictHostKeyChecking=no")))
     (tramp-default-port         22)))
 ;;;###tramp-autoload
-(add-to-list 'tramp-methods
-  '("sftp"
-    (tramp-login-program        "ssh")
-    (tramp-login-args           (("-l" "%u") ("-p" "%p") ("%c")
-                                ("-e" "none") ("%h")))
-    (tramp-async-args           (("-q")))
-    (tramp-remote-shell         "/bin/sh")
-    (tramp-remote-shell-args    ("-c"))
-    (tramp-copy-program         "sftp")
-    (tramp-copy-args            ("%c"))))
- ;;;###tramp-autoload
 (add-to-list 'tramp-methods
   '("rsync"
     (tramp-login-program        "ssh")
@@ -210,11 +203,27 @@ detected as prompt when being sent on echoing hosts, therefore.")
 (add-to-list 'tramp-methods
   '("telnet"
     (tramp-login-program        "telnet")
-    (tramp-login-args           (("%h") ("%p")))
+    (tramp-login-args           (("%h") ("%p") ("2>/dev/null")))
     (tramp-remote-shell         "/bin/sh")
     (tramp-remote-shell-args    ("-c"))
     (tramp-default-port         23)))
 ;;;###tramp-autoload
+(add-to-list 'tramp-methods
+  '("nc"
+    (tramp-login-program        "telnet")
+    (tramp-login-args           (("%h") ("%p") ("2>/dev/null")))
+    (tramp-remote-shell         "/bin/sh")
+    (tramp-remote-shell-args    ("-c"))
+    (tramp-copy-program         "nc")
+    ;; We use "-v" for better error tracking.
+    (tramp-copy-args            (("-w" "1") ("-v") ("%h") ("%r")))
+    (tramp-remote-copy-program  "nc")
+    ;; We use "-p" as required for newer busyboxes.  For older
+    ;; busybox/nc versions, the value must be (("-l") ("%r")).  This
+    ;; can be achieved by tweaking `tramp-connection-properties'.
+    (tramp-remote-copy-args     (("-l") ("-p" "%r")))
+    (tramp-default-port         23)))
+;;;###tramp-autoload
 (add-to-list 'tramp-methods
   '("su"
     (tramp-login-program        "su")
@@ -249,9 +258,16 @@ detected as prompt when being sent on echoing hosts, therefore.")
     (tramp-remote-shell-args    ("-c"))))
 ;;;###tramp-autoload
 (add-to-list 'tramp-methods
-  '("plink"
+  `("plink"
     (tramp-login-program        "plink")
-    (tramp-login-args           (("-l" "%u") ("-P" "%p") ("-ssh") ("%h")))
+    ;; ("%h") must be a single element, see `tramp-compute-multi-hops'.
+    (tramp-login-args           (("-l" "%u") ("-P" "%p") ("-ssh") ("-t")
+                                ("%h") ("\"")
+                                (,(format
+                                   "env 'TERM=%s' 'PROMPT_COMMAND=' 'PS1=%s'"
+                                   tramp-terminal-type
+                                   tramp-initial-end-of-output))
+                                ("/bin/sh") ("\"")))
     (tramp-remote-shell         "/bin/sh")
     (tramp-remote-shell-args    ("-c"))
     (tramp-default-port         22)))
@@ -259,21 +275,25 @@ detected as prompt when being sent on echoing hosts, therefore.")
 (add-to-list 'tramp-methods
   `("plinkx"
     (tramp-login-program        "plink")
-    ;; ("%h") must be a single element, see
-    ;; `tramp-compute-multi-hops'.
-    (tramp-login-args           (("-load") ("%h") ("-t")
+    (tramp-login-args           (("-load") ("%h") ("-t") ("\"")
                                 (,(format
                                    "env 'TERM=%s' 'PROMPT_COMMAND=' 'PS1=%s'"
                                    tramp-terminal-type
                                    tramp-initial-end-of-output))
-                                ("/bin/sh")))
+                                ("/bin/sh") ("\"")))
     (tramp-remote-shell         "/bin/sh")
     (tramp-remote-shell-args    ("-c"))))
 ;;;###tramp-autoload
 (add-to-list 'tramp-methods
-  '("pscp"
+  `("pscp"
     (tramp-login-program        "plink")
-    (tramp-login-args           (("-l" "%u") ("-P" "%p") ("-ssh") ("%h")))
+    (tramp-login-args           (("-l" "%u") ("-P" "%p") ("-ssh") ("-t")
+                                ("%h") ("\"")
+                                (,(format
+                                   "env 'TERM=%s' 'PROMPT_COMMAND=' 'PS1=%s'"
+                                   tramp-terminal-type
+                                   tramp-initial-end-of-output))
+                                ("/bin/sh") ("\"")))
     (tramp-remote-shell         "/bin/sh")
     (tramp-remote-shell-args    ("-c"))
     (tramp-copy-program         "pscp")
@@ -284,9 +304,15 @@ detected as prompt when being sent on echoing hosts, therefore.")
     (tramp-default-port         22)))
 ;;;###tramp-autoload
 (add-to-list 'tramp-methods
-  '("psftp"
+  `("psftp"
     (tramp-login-program        "plink")
-    (tramp-login-args           (("-l" "%u") ("-P" "%p") ("-ssh") ("%h")))
+    (tramp-login-args           (("-l" "%u") ("-P" "%p") ("-ssh") ("-t")
+                                ("%h") ("\"")
+                                (,(format
+                                   "env 'TERM=%s' 'PROMPT_COMMAND=' 'PS1=%s'"
+                                   tramp-terminal-type
+                                   tramp-initial-end-of-output))
+                                ("/bin/sh") ("\"")))
     (tramp-remote-shell         "/bin/sh")
     (tramp-remote-shell-args    ("-c"))
     (tramp-copy-program         "pscp")
@@ -319,7 +345,8 @@ detected as prompt when being sent on echoing hosts, therefore.")
 (add-to-list 'tramp-default-user-alist
             `(,(concat
                 "\\`"
-                (regexp-opt '("rcp" "remcp" "rsh" "telnet" "krlogin" "fcp"))
+                (regexp-opt
+                 '("rcp" "remcp" "rsh" "telnet" "nc" "krlogin" "fcp"))
                 "\\'")
               nil ,(user-login-name)))
 
@@ -370,7 +397,6 @@ detected as prompt when being sent on echoing hosts, therefore.")
      (tramp-set-completion-function "remcp" tramp-completion-function-alist-rsh)
      (tramp-set-completion-function "scp" tramp-completion-function-alist-ssh)
      (tramp-set-completion-function "scpx" tramp-completion-function-alist-ssh)
-     (tramp-set-completion-function "sftp" tramp-completion-function-alist-ssh)
      (tramp-set-completion-function "rsync" tramp-completion-function-alist-ssh)
      (tramp-set-completion-function "rsh" tramp-completion-function-alist-rsh)
      (tramp-set-completion-function "remsh" tramp-completion-function-alist-rsh)
@@ -378,6 +404,7 @@ detected as prompt when being sent on echoing hosts, therefore.")
      (tramp-set-completion-function "sshx" tramp-completion-function-alist-ssh)
      (tramp-set-completion-function
       "telnet" tramp-completion-function-alist-telnet)
+     (tramp-set-completion-function "nc" tramp-completion-function-alist-telnet)
      (tramp-set-completion-function "su" tramp-completion-function-alist-su)
      (tramp-set-completion-function "sudo" tramp-completion-function-alist-su)
      (tramp-set-completion-function "ksu" tramp-completion-function-alist-su)
@@ -387,6 +414,7 @@ detected as prompt when being sent on echoing hosts, therefore.")
      (tramp-set-completion-function
       "plinkx" tramp-completion-function-alist-putty)
      (tramp-set-completion-function "pscp" tramp-completion-function-alist-ssh)
+     (tramp-set-completion-function "psftp" tramp-completion-function-alist-ssh)
      (tramp-set-completion-function "fcp" tramp-completion-function-alist-ssh)))
 
 ;; "getconf PATH" yields:
@@ -1239,8 +1267,7 @@ target of the symlink differ."
               (format "%s -ild %s"
                       (tramp-get-ls-command v)
                       (tramp-shell-quote-argument localname)))
-             (setq attr (buffer-substring (point)
-                                          (progn (end-of-line) (point)))))
+             (setq attr (buffer-substring (point) (point-at-eol))))
            (tramp-set-file-property
             v localname "visited-file-modtime-ild" attr))
          (when (boundp 'last-coding-system-used)
@@ -1291,8 +1318,7 @@ of."
                       (tramp-get-ls-command v)
                       (tramp-shell-quote-argument localname)))
              (with-current-buffer (tramp-get-buffer v)
-               (setq attr (buffer-substring
-                           (point) (progn (end-of-line) (point)))))
+               (setq attr (buffer-substring (point) (point-at-eol))))
              (equal
               attr
               (tramp-get-file-property
@@ -1346,7 +1372,7 @@ of."
     ;; We are local, so we don't need the UTC settings.
     (zerop
      (tramp-call-process
-      "touch" nil nil nil "-t"
+      nil "touch" nil nil nil "-t"
       (format-time-string "%Y%m%d%H%M.%S" time)
       (tramp-shell-quote-argument filename)))))
 
@@ -1380,7 +1406,7 @@ be non-negative integers."
       (let ((uid (or (and (natnump uid) uid) (tramp-get-local-uid 'integer)))
            (gid (or (and (natnump gid) gid) (tramp-get-local-gid 'integer))))
        (tramp-call-process
-        "chown" nil nil nil
+        nil "chown" nil nil nil
          (format "%d:%d" uid gid) (tramp-shell-quote-argument filename))))))
 
 (defun tramp-remote-selinux-p (vec)
@@ -1542,7 +1568,7 @@ be non-negative integers."
 (defun tramp-sh-handle-file-directory-p (filename)
   "Like `file-directory-p' for Tramp files."
   (with-parsed-tramp-file-name filename nil
-    ;; `file-directory-p' is used as predicate for filename completion.
+    ;; `file-directory-p' is used as predicate for file name completion.
     ;; Sometimes, when a connection is not established yet, it is
     ;; desirable to return t immediately for "/method:foo:".  It can
     ;; be expected that this is always a directory.
@@ -1644,10 +1670,10 @@ be non-negative integers."
    vec
    (format
     (concat
-     ;; We must care about filenames with spaces, or starting with
+     ;; We must care about file names with spaces, or starting with
      ;; "-"; this would confuse xargs.  "ls -aQ" might be a solution,
      ;; but it does not work on all remote systems.  Therefore, we
-     ;; quote the filenames via sed.
+     ;; quote the file names via sed.
      "cd %s; echo \"(\"; (%s -a | sed -e s/\\$/\\\"/g -e s/^/\\\"/g | "
      "xargs %s -c "
      "'(\"%%n\" (\"%%N\") %%h %s %s %%Xe0 %%Ye0 %%Ze0 %%se0 \"%%A\" t %%ie0 -1)'"
@@ -1670,15 +1696,15 @@ be non-negative integers."
        (mapcar
        'list
         (or
-        ;; Try cache entries for filename, filename with last
-        ;; character removed, filename with last two characters
+        ;; Try cache entries for `filename', `filename' with last
+        ;; character removed, `filename' with last two characters
         ;; removed, ..., and finally the empty string - all
         ;; concatenated to the local directory name.
          (let ((remote-file-name-inhibit-cache
                (or remote-file-name-inhibit-cache
                    tramp-completion-reread-directory-timeout)))
 
-          ;; This is inefficient for very long filenames, pity
+          ;; This is inefficient for very long file names, pity
           ;; `reduce' is not available...
           (car
            (apply
@@ -1742,7 +1768,7 @@ be non-negative integers."
                       (tramp-shell-quote-argument localname)
                       (tramp-get-ls-command v)
                       ;; When `filename' is empty, just `ls' without
-                      ;; filename argument is more efficient than `ls *'
+                      ;; `filename' argument is more efficient than `ls *'
                       ;; for very large directories and might avoid the
                       ;; `Argument list too long' error.
                       ;;
@@ -1981,7 +2007,7 @@ file names."
               ;; create a new buffer, insert the contents of the
               ;; source file into it, then write out the buffer to
               ;; the target file.  The advantage is that it doesn't
-              ;; matter which filename handlers are used for the
+              ;; matter which file name handlers are used for the
               ;; source and target file.
               (t
                (tramp-do-copy-or-rename-file-via-buffer
@@ -2212,19 +2238,19 @@ the uid and gid from FILENAME."
            (set-file-modes newname file-modes))))))
 
 (defun tramp-do-copy-or-rename-file-out-of-band (op filename newname keep-date)
-  "Invoke rcp program to copy.
+  "Invoke `scp' program to copy.
 The method used must be an out-of-band method."
   (let* ((t1 (tramp-tramp-file-p filename))
         (t2 (tramp-tramp-file-p newname))
         (orig-vec (tramp-dissect-file-name (if t1 filename newname)))
-        copy-program copy-args copy-env copy-keep-date port spec
-        options source target)
+        copy-program copy-args copy-env copy-keep-date port listener spec
+        options source target remote-copy-program remote-copy-args)
 
     (with-parsed-tramp-file-name (if t1 filename newname) nil
       (if (and t1 t2)
 
          ;; Both are Tramp files.  We shall optimize it when the
-         ;; methods for filename and newname are the same.
+         ;; methods for FILENAME and NEWNAME are the same.
          (let* ((dir-flag (file-directory-p filename))
                 (tmpfile (tramp-compat-make-temp-file localname dir-flag)))
            (if dir-flag
@@ -2285,6 +2311,13 @@ The method used must be an out-of-band method."
        (setq user (or (tramp-file-name-user v)
                       (tramp-get-connection-property v "login-as" nil)))
 
+       ;; Check for listener port.
+       (when (tramp-get-method-parameter method 'tramp-remote-copy-args)
+         (setq listener (number-to-string (+ 50000 (random 10000))))
+         (while
+             (zerop (tramp-call-process v "nc" nil nil nil "-z" host listener))
+           (setq listener (number-to-string (+ 50000 (random 10000))))))
+
        ;; Compose copy command.
        (setq host (or host "")
              user (or user "")
@@ -2297,12 +2330,13 @@ The method used must be an out-of-band method."
                           tramp-ssh-controlmaster-options "")
                       spec)
              spec (format-spec-make
-                   ?h host ?u user ?p port ?c options
+                   ?h host ?u user ?p port ?r listener ?c options
                    ?k (if keep-date " " ""))
              copy-program (tramp-get-method-parameter
                            method 'tramp-copy-program)
              copy-keep-date (tramp-get-method-parameter
                              method 'tramp-copy-keep-date)
+
              copy-args
              (delete
               ;; " " has either been a replacement of "%k" (when
@@ -2318,6 +2352,7 @@ The method used must be an out-of-band method."
                        copy-args
                        (let ((y (mapcar (lambda (z) (format-spec z spec)) x)))
                          (if (member "" y) '(" ") y))))))
+
              copy-env
              (delq
               nil
@@ -2325,12 +2360,54 @@ The method used must be an out-of-band method."
                (lambda (x)
                  (setq x (mapcar (lambda (y) (format-spec y spec)) x))
                  (unless (member "" x) (mapconcat 'identity x " ")))
-               (tramp-get-method-parameter method 'tramp-copy-env))))
+               (tramp-get-method-parameter method 'tramp-copy-env)))
+
+             remote-copy-program
+             (tramp-get-method-parameter method 'tramp-remote-copy-program))
 
-       ;; Check for program.
+       (dolist
+           (x
+            (or
+             (tramp-get-connection-property v "remote-copy-args" nil)
+             (tramp-get-method-parameter method 'tramp-remote-copy-args)))
+         (setq remote-copy-args
+               (append
+                remote-copy-args
+                (let ((y (mapcar (lambda (z) (format-spec z spec)) x)))
+                  (if (member "" y) '(" ") y)))))
+
+       ;; Check for local copy program.
        (unless (executable-find copy-program)
          (tramp-error
-          v 'file-error "Cannot find copy program: %s" copy-program))
+          v 'file-error "Cannot find local copy program: %s" copy-program))
+
+       ;; Install listener on the remote side.  The prompt must be
+       ;; consumed later on, when the process does not listen anymore.
+       (when remote-copy-program
+         (unless (with-tramp-connection-property
+                     v (concat "remote-copy-program-" remote-copy-program)
+                   (tramp-find-executable
+                    v remote-copy-program (tramp-get-remote-path v)))
+           (tramp-error
+            v 'file-error
+            "Cannot find remote listener: %s" remote-copy-program))
+         (setq remote-copy-program
+               (mapconcat
+                'identity
+                (append
+                 (list remote-copy-program) remote-copy-args
+                 (list (if t1 (concat "<" source) (concat ">" target)) "&"))
+                " "))
+         (tramp-send-command v remote-copy-program)
+         (with-timeout
+             (1 (tramp-error
+                 v 'file-error
+                 "Listener process not running on remote host: `%s'"
+                 remote-copy-program))
+           (tramp-send-command v (format "netstat -l | grep -q :%s" listener))
+           (while (not (tramp-send-command-and-check v nil))
+             (tramp-send-command
+              v (format "netstat -l | grep -q :%s" listener)))))
 
        (with-temp-buffer
          (unwind-protect
@@ -2347,24 +2424,26 @@ The method used must be an out-of-band method."
                  (tramp-message
                   orig-vec 6 "%s=\"%s\"" (car copy-env) (cadr copy-env))
                  (setenv (pop copy-env) (pop copy-env)))
+               (setq
+                copy-args
+                (append
+                 copy-args
+                 (if remote-copy-program
+                     (list (if t1 (concat ">" target) (concat "<" source)))
+                   (list source target))))
 
                ;; Use an asynchronous process.  By this, password can
-               ;; be handled.  The default directory must be local, in
-               ;; order to apply the correct `copy-program'.  We don't
-               ;; set a timeout, because the copying of large files can
-               ;; last longer than 60 secs.
-               (let ((p (let ((default-directory
-                                (tramp-compat-temporary-file-directory)))
-                          (apply 'start-process-shell-command
-                                 (tramp-get-connection-name v)
-                                 (tramp-get-connection-buffer v)
-                                 copy-program
-                                 (append
-                                  copy-args
-                                  (list
-                                   source target
-                                   "&&" "echo" "tramp_exit_status" "0"
-                                   "||" "echo" "tramp_exit_status" "1"))))))
+               ;; be handled.  We don't set a timeout, because the
+               ;; copying of large files can last longer than 60
+               ;; secs.
+               (let ((p (apply 'start-process-shell-command
+                               (tramp-get-connection-name v)
+                               (tramp-get-connection-buffer v)
+                               copy-program
+                               (append
+                                copy-args
+                                (list "&&" "echo" "tramp_exit_status" "0"
+                                      "||" "echo" "tramp_exit_status" "1")))))
                  (tramp-message
                   orig-vec 6 "%s"
                   (mapconcat 'identity (process-command p) " "))
@@ -2391,7 +2470,14 @@ The method used must be an out-of-band method."
 
            ;; Reset the transfer process properties.
            (tramp-set-connection-property v "process-name" nil)
-           (tramp-set-connection-property v "process-buffer" nil)))
+           (tramp-set-connection-property v "process-buffer" nil)
+           ;; Clear the remote prompt.
+           (when (and remote-copy-program
+                      (not (tramp-send-command-and-check v nil)))
+             ;; Houston, we have a problem!  Likely, the listener is
+             ;; still running, so let's clear everything (but the
+             ;; cached password).
+             (tramp-cleanup-connection v 'keep-debug 'keep-password))))
 
        ;; Handle KEEP-DATE argument.
        (when (and keep-date (not copy-keep-date))
@@ -2621,7 +2707,8 @@ This is like `dired-recursive-delete-directory' for Tramp files."
            (delete-region (match-beginning 0) (point)))
 
          ;; Some busyboxes are reluctant to discard colors.
-         (unless (string-match "color" (tramp-get-connection-property v "ls" ""))
+         (unless
+             (string-match "color" (tramp-get-connection-property v "ls" ""))
            (goto-char beg)
            (while (re-search-forward tramp-color-escape-sequence-regexp nil t)
              (replace-match "")))
@@ -2651,9 +2738,9 @@ This is like `dired-recursive-delete-directory' for Tramp files."
 
 (defun tramp-sh-handle-expand-file-name (name &optional dir)
   "Like `expand-file-name' for Tramp files.
-If the localname part of the given filename starts with \"/../\" then
-the result will be a local, non-Tramp, filename."
-  ;; If DIR is not given, use DEFAULT-DIRECTORY or "/".
+If the localname part of the given file name starts with \"/../\" then
+the result will be a local, non-Tramp, file name."
+  ;; If DIR is not given, use `default-directory' or "/".
   (setq dir (or dir default-directory "/"))
   ;; Unless NAME is absolute, concat DIR and NAME.
   (unless (file-name-absolute-p name)
@@ -2724,7 +2811,7 @@ the result will be a local, non-Tramp, filename."
 ;; connection has been setup.
 (defun tramp-sh-handle-start-file-process (name buffer program &rest args)
   "Like `start-file-process' for Tramp files."
-  (with-parsed-tramp-file-name default-directory nil
+  (with-parsed-tramp-file-name (expand-file-name default-directory) nil
     (let* (;; When PROGRAM matches "*sh", and the first arg is "-c",
           ;; it might be that the arguments exceed the command line
           ;; length.  Therefore, we modify the command.
@@ -3133,7 +3220,7 @@ the result will be a local, non-Tramp, filename."
                    (symbol-value 'last-coding-system-used))))
 
          ;; The permissions of the temporary file should be set.  If
-         ;; filename does not exist (eq modes nil) it has been
+         ;; FILENAME does not exist (eq modes nil) it has been
          ;; renamed to the backup file.  This case `save-buffer'
          ;; handles permissions.
          ;; Ensure that it is still readable.
@@ -3144,7 +3231,7 @@ the result will be a local, non-Tramp, filename."
 
          ;; This is a bit lengthy due to the different methods
          ;; possible for file transfer.  First, we check whether the
-         ;; method uses an rcp program.  If so, we call it.
+         ;; method uses an scp program.  If so, we call it.
          ;; Otherwise, both encoding and decoding command must be
          ;; specified.  However, if the method _also_ specifies an
          ;; encoding function, then that is used for encoding the
@@ -3238,7 +3325,7 @@ the result will be a local, non-Tramp, filename."
                        (erase-buffer)
                        (and
                         ;; cksum runs locally, if possible.
-                        (zerop (tramp-call-process "cksum" tmpfile t))
+                        (zerop (tramp-call-process "cksum" tmpfile t))
                         ;; cksum runs remotely.
                         (tramp-send-command-and-check
                          v
@@ -3264,7 +3351,7 @@ the result will be a local, non-Tramp, filename."
              (tramp-error
               v 'file-error
               (concat "Method `%s' should specify both encoding and "
-                      "decoding command or an rcp program")
+                      "decoding command or an scp program")
               method))))
 
          ;; Make `last-coding-system-used' have the right value.
@@ -3281,7 +3368,7 @@ the result will be a local, non-Tramp, filename."
        (when (or (eq visit t) (stringp visit))
           (let ((file-attr (tramp-compat-file-attributes filename 'integer)))
             (set-visited-file-modtime
-             ;; We must pass modtime explicitly, because filename can
+             ;; We must pass modtime explicitly, because FILENAME can
              ;; be different from (buffer-file-name), f.e. if
              ;; `file-precious-flag' is set.
              (nth 5 file-attr))
@@ -3369,7 +3456,28 @@ the result will be a local, non-Tramp, filename."
        ;; calls shall be answered from the file cache.  We unset
        ;; `process-file-side-effects' and `remote-file-name-inhibit-cache'
        ;; in order to keep the cache.
-       (let (remote-file-name-inhibit-cache process-file-side-effects)
+       (let ((vc-handled-backends vc-handled-backends)
+             remote-file-name-inhibit-cache process-file-side-effects)
+         ;; Reduce `vc-handled-backends' in order to minimize process calls.
+         (when (and (memq 'Bzr vc-handled-backends)
+                    (boundp 'vc-bzr-program)
+                    (not (with-tramp-connection-property v vc-bzr-program
+                           (tramp-find-executable
+                            v vc-bzr-program (tramp-get-remote-path v)))))
+           (setq vc-handled-backends (remq 'Bzr vc-handled-backends)))
+         (when (and (memq 'Git vc-handled-backends)
+                    (boundp 'vc-git-program)
+                    (not (with-tramp-connection-property v vc-git-program
+                           (tramp-find-executable
+                            v vc-git-program (tramp-get-remote-path v)))))
+           (setq vc-handled-backends (remq 'Git vc-handled-backends)))
+         (when (and (memq 'Hg vc-handled-backends)
+                    (boundp 'vc-hg-program)
+                    (not (with-tramp-connection-property v vc-hg-program
+                           (tramp-find-executable
+                            v vc-hg-program (tramp-get-remote-path v)))))
+           (setq vc-handled-backends (remq 'Hg vc-handled-backends)))
+         ;; Run.
          (ignore-errors
            (tramp-run-real-handler 'vc-registered (list file))))))))
 
@@ -3847,23 +3955,22 @@ process to set up.  VEC specifies the connection."
 
   (tramp-message vec 5 "Setting shell prompt")
   (tramp-send-command
-   vec (format "PS1=%s" (tramp-shell-quote-argument tramp-end-of-output)) t)
-  (tramp-send-command vec "PS2=''" t)
-  (tramp-send-command vec "PS3=''" t)
-  (tramp-send-command vec "PROMPT_COMMAND=''" t)
+   vec (format "PS1=%s PS2='' PS3='' PROMPT_COMMAND=''"
+              (tramp-shell-quote-argument tramp-end-of-output)) t)
 
   ;; Try to set up the coding system correctly.
   ;; CCC this can't be the right way to do it.  Hm.
   (tramp-message vec 5 "Determining coding system")
-  (tramp-send-command vec "echo foo ; echo bar" t)
   (with-current-buffer (process-buffer proc)
-    (goto-char (point-min))
     (if (featurep 'mule)
        ;; Use MULE to select the right EOL convention for communicating
        ;; with the process.
-       (let* ((cs (or (tramp-compat-funcall 'process-coding-system proc)
-                      (cons 'undecided 'undecided)))
-              cs-decode cs-encode)
+       (let ((cs (or (when (string-match
+                            "utf8" (or (tramp-get-remote-locale vec) ""))
+                       (cons 'utf-8 'utf-8))
+                     (tramp-compat-funcall 'process-coding-system proc)
+                     (cons 'undecided 'undecided)))
+             cs-decode cs-encode)
          (when (symbolp cs) (setq cs (cons cs cs)))
          (setq cs-decode (car cs))
          (setq cs-encode (cdr cs))
@@ -3871,6 +3978,8 @@ process to set up.  VEC specifies the connection."
          (unless cs-encode (setq cs-encode 'undecided))
          (setq cs-encode (tramp-compat-coding-system-change-eol-conversion
                           cs-encode 'unix))
+         (tramp-send-command vec "echo foo ; echo bar" t)
+         (goto-char (point-min))
          (when (search-forward "\r" nil t)
            (setq cs-decode (tramp-compat-coding-system-change-eol-conversion
                             cs-decode 'dos)))
@@ -3967,15 +4076,22 @@ process to set up.  VEC specifies the connection."
   (let ((env (append (when (tramp-get-remote-locale vec) ; Discard `(nil)'.
                       `(,(tramp-get-remote-locale vec)))
                     (copy-sequence tramp-remote-process-environment)))
-       unset item)
+       unset vars item)
     (while env
       (setq item (tramp-compat-split-string (car env) "="))
       (setcdr item (mapconcat 'identity (cdr item) "="))
       (if (and (stringp (cdr item)) (not (string-equal (cdr item) "")))
-         (tramp-send-command
-          vec (format "%s=%s; export %s" (car item) (cdr item) (car item)) t)
+         (push (format "%s %s" (car item) (cdr item)) vars)
        (push (car item) unset))
       (setq env (cdr env)))
+    (when vars
+      (tramp-send-command
+       vec
+       (format "while read var val; do export $var=$val; done <<'%s'\n%s\n%s"
+              tramp-end-of-heredoc
+              (mapconcat 'identity vars "\n")
+              tramp-end-of-heredoc)
+       t))
     (when unset
       (tramp-send-command
        vec (format "unset %s" (mapconcat 'identity unset " ")) t))))
@@ -4010,7 +4126,7 @@ FORMAT is  symbol describing the encoding/decoding format.  It can be
 ENCODING and DECODING can be strings, giving commands, or symbols,
 giving functions.  If they are strings, then they can contain
 the \"%s\" format specifier.  If that specifier is present, the input
-filename will be put into the command line at that spot.  If the
+file name will be put into the command line at that spot.  If the
 specifier is not present, the input should be read from standard
 input.
 
@@ -4045,7 +4161,7 @@ FORMAT is a symbol describing the encoding/decoding format.  It can be
 ENCODING and DECODING can be strings, giving commands, or symbols,
 giving variables.  If they are strings, then they can contain
 the \"%s\" format specifier.  If that specifier is present, the input
-filename will be put into the command line at that spot.  If the
+file name will be put into the command line at that spot.  If the
 specifier is not present, the input should be read from standard
 input.
 
@@ -4171,32 +4287,28 @@ Goes through the list `tramp-local-coding-commands' and
                  (setq rem-dec (nth 2 ritem))
                  (setq found t)))))))
 
-      ;; Did we find something?
-      (unless found
-       (tramp-error
-        vec 'file-error "Couldn't find an inline transfer encoding"))
-
-      ;; Set connection properties.  Since the commands are risky (due
-      ;; to output direction), we cache them in the process cache.
-      (tramp-message vec 5 "Using local encoding `%s'" loc-enc)
-      (tramp-set-connection-property p "local-encoding" loc-enc)
-      (tramp-message vec 5 "Using local decoding `%s'" loc-dec)
-      (tramp-set-connection-property p "local-decoding" loc-dec)
-      (tramp-message vec 5 "Using remote encoding `%s'" rem-enc)
-      (tramp-set-connection-property p "remote-encoding" rem-enc)
-      (tramp-message vec 5 "Using remote decoding `%s'" rem-dec)
-      (tramp-set-connection-property p "remote-decoding" rem-dec))))
+      (when found
+       ;; Set connection properties.  Since the commands are risky
+       ;; (due to output direction), we cache them in the process cache.
+       (tramp-message vec 5 "Using local encoding `%s'" loc-enc)
+       (tramp-set-connection-property p "local-encoding" loc-enc)
+       (tramp-message vec 5 "Using local decoding `%s'" loc-dec)
+       (tramp-set-connection-property p "local-decoding" loc-dec)
+       (tramp-message vec 5 "Using remote encoding `%s'" rem-enc)
+       (tramp-set-connection-property p "remote-encoding" rem-enc)
+       (tramp-message vec 5 "Using remote decoding `%s'" rem-dec)
+       (tramp-set-connection-property p "remote-decoding" rem-dec)))))
 
 (defun tramp-call-local-coding-command (cmd input output)
   "Call the local encoding or decoding command.
 If CMD contains \"%s\", provide input file INPUT there in command.
 Otherwise, INPUT is passed via standard input.
 INPUT can also be nil which means `/dev/null'.
-OUTPUT can be a string (which specifies a filename), or t (which
+OUTPUT can be a string (which specifies a file name), or t (which
 means standard output and thus the current buffer), or nil (which
 means discard it)."
   (tramp-call-process
-   tramp-encoding-shell
+   nil tramp-encoding-shell
    (when (and input (not (string-match "%s" cmd))) input)
    (if (eq output t) t nil)
    nil
@@ -4844,15 +4956,18 @@ Return ATTR."
    ""))
 
 (defun tramp-make-copy-program-file-name (vec)
-  "Create a file name suitable to be passed to `rcp' and workalikes."
-  (let ((user (tramp-file-name-user vec))
+  "Create a file name suitable to be passed to `scp' or `nc' and workalikes."
+  (let ((method (tramp-file-name-method vec))
+       (user (tramp-file-name-user vec))
        (host (tramp-file-name-real-host vec))
        (localname (tramp-shell-quote-argument
                    (tramp-file-name-localname vec))))
-    (shell-quote-argument
-     (if (not (zerop (length user)))
-        (format "%s@%s:%s" user host localname)
-       (format "%s:%s" host localname)))))
+    (cond
+     ((tramp-get-method-parameter method 'tramp-remote-copy-program)
+      localname)
+     ((not (zerop (length user)))
+      (shell-quote-argument (format "%s@%s:%s" user host localname)))
+     (t (shell-quote-argument (format "%s:%s" host localname))))))
 
 (defun tramp-method-out-of-band-p (vec size)
   "Return t if this is an out-of-band method, nil otherwise."
@@ -5118,13 +5233,14 @@ Return ATTR."
   (with-tramp-connection-property vec "id"
     (tramp-message vec 5 "Finding POSIX `id' command")
     (catch 'id-found
-      (let ((dl (tramp-get-remote-path vec))
-           result)
-       (while (and dl (setq result (tramp-find-executable vec "id" dl t t)))
-         ;; Check POSIX parameter.
-         (when (tramp-send-command-and-check vec (format "%s -u" result))
-           (throw 'id-found result))
-         (setq dl (cdr dl)))))))
+      (dolist (cmd '("id" "gid"))
+       (let ((dl (tramp-get-remote-path vec))
+             result)
+         (while (and dl (setq result (tramp-find-executable vec cmd dl t t)))
+           ;; Check POSIX parameter.
+           (when (tramp-send-command-and-check vec (format "%s -u" result))
+             (throw 'id-found result))
+           (setq dl (cdr dl))))))))
 
 (defun tramp-get-remote-uid-with-id (vec id-format)
   (tramp-send-command-and-read
@@ -5147,7 +5263,9 @@ Return ATTR."
 (defun tramp-get-remote-python (vec)
   (with-tramp-connection-property vec "python"
     (tramp-message vec 5 "Finding a suitable `python' command")
-    (tramp-find-executable vec "python" (tramp-get-remote-path vec))))
+    (or (tramp-find-executable vec "python" (tramp-get-remote-path vec))
+        (tramp-find-executable vec "python2" (tramp-get-remote-path vec))
+        (tramp-find-executable vec "python3" (tramp-get-remote-path vec)))))
 
 (defun tramp-get-remote-uid-with-python (vec id-format)
   (tramp-send-command-and-read
@@ -5155,8 +5273,8 @@ Return ATTR."
    (format "%s -c \"%s\""
           (tramp-get-remote-python vec)
           (if (equal id-format 'integer)
-              "import os; print os.getuid()"
-            "import os, pwd; print '\\\"' + pwd.getpwuid(os.getuid())[0] + '\\\"'"))))
+              "import os; print (os.getuid())"
+            "import os, pwd; print ('\\\"' + pwd.getpwuid(os.getuid())[0] + '\\\"')"))))
 
 (defun tramp-get-remote-uid (vec id-format)
   (with-tramp-connection-property vec (format "uid-%s" id-format)
@@ -5196,8 +5314,8 @@ Return ATTR."
    (format "%s -c \"%s\""
           (tramp-get-remote-python vec)
           (if (equal id-format 'integer)
-              "import os; print os.getgid()"
-            "import os, grp; print '\\\"' + grp.getgrgid(os.getgid())[0] + '\\\"'"))))
+              "import os; print (os.getgid())"
+            "import os, grp; print ('\\\"' + grp.getgrgid(os.getgid())[0] + '\\\"')"))))
 
 (defun tramp-get-remote-gid (vec id-format)
   (with-tramp-connection-property vec (format "gid-%s" id-format)
@@ -5371,9 +5489,5 @@ function cell is returned to be applied on a buffer."
 ;;   rsync).
 ;; * Keep a second connection open for out-of-band methods like scp or
 ;;   rsync.
-;; * Try telnet+curl as new method.  It might be useful for busybox,
-;;   without built-in uuencode/uudecode.
-;; * Try telnet+nc as new method.  It might be useful for busybox,
-;;   without built-in uuencode/uudecode.
 
 ;;; tramp-sh.el ends here
index fa5e72dfb3e0112d60f5b2e2f2256bb78d7dfa46..15ae9ed6fa806d73abf90e1c596639c7a40c20ed 100644 (file)
@@ -447,8 +447,7 @@ pass to the OPERATION."
                               (expand-file-name
                                tramp-temp-name-prefix
                                (tramp-compat-temporary-file-directory))))
-                  (args      (list tramp-smb-program
-                                   (concat "//" real-host "/" share) "-E")))
+                  (args      (list (concat "//" real-host "/" share) "-E")))
 
              (if (not (zerop (length real-user)))
                  (setq args (append args (list "-U" real-user)))
@@ -495,10 +494,11 @@ pass to the OPERATION."
                    ;; Use an asynchronous processes.  By this,
                    ;; password can be handled.
                    (let* ((default-directory tmpdir)
-                          (p (start-process-shell-command
+                          (p (apply
+                              'start-process
                               (tramp-get-connection-name v)
                               (tramp-get-connection-buffer v)
-                              (mapconcat 'identity args " "))))
+                              tramp-smb-program args)))
 
                      (tramp-message
                       v 6 "%s" (mapconcat 'identity (process-command p) " "))
@@ -938,99 +938,100 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
       (setq filename (file-name-as-directory filename))
     (setq filename (directory-file-name filename)))
   (with-parsed-tramp-file-name filename nil
-    (save-match-data
-      (let ((base (file-name-nondirectory filename))
-           ;; We should not destroy the cache entry.
-           (entries (copy-sequence
-                     (tramp-smb-get-file-entries
-                      (file-name-directory filename)))))
-
-       (when wildcard
-         (string-match "\\." base)
-         (setq base (replace-match "\\\\." nil nil base))
-         (string-match "\\*" base)
-         (setq base (replace-match ".*" nil nil base))
-         (string-match "\\?" base)
-         (setq base (replace-match ".?" nil nil base)))
-
-       ;; Filter entries.
-       (setq entries
-             (delq
-              nil
-              (if (or wildcard (zerop (length base)))
-                  ;; Check for matching entries.
-                  (mapcar
-                   (lambda (x)
-                     (when (string-match
-                            (format "^%s" base) (nth 0 x))
-                       x))
-                   entries)
-                ;; We just need the only and only entry FILENAME.
-                (list (assoc base entries)))))
-
-       ;; Sort entries.
-       (setq entries
-             (sort
-              entries
-              (lambda (x y)
-                (if (string-match "t" switches)
-                    ;; Sort by date.
-                    (tramp-time-less-p (nth 3 y) (nth 3 x))
-                  ;; Sort by name.
-                  (string-lessp (nth 0 x) (nth 0 y))))))
-
-       ;; Handle "-F" switch.
-       (when (string-match "F" switches)
+    (with-tramp-progress-reporter v 0 (format "Opening directory %s" filename)
+      (save-match-data
+       (let ((base (file-name-nondirectory filename))
+             ;; We should not destroy the cache entry.
+             (entries (copy-sequence
+                       (tramp-smb-get-file-entries
+                        (file-name-directory filename)))))
+
+         (when wildcard
+           (string-match "\\." base)
+           (setq base (replace-match "\\\\." nil nil base))
+           (string-match "\\*" base)
+           (setq base (replace-match ".*" nil nil base))
+           (string-match "\\?" base)
+           (setq base (replace-match ".?" nil nil base)))
+
+         ;; Filter entries.
+         (setq entries
+               (delq
+                nil
+                (if (or wildcard (zerop (length base)))
+                    ;; Check for matching entries.
+                    (mapcar
+                     (lambda (x)
+                       (when (string-match
+                              (format "^%s" base) (nth 0 x))
+                         x))
+                     entries)
+                  ;; We just need the only and only entry FILENAME.
+                  (list (assoc base entries)))))
+
+         ;; Sort entries.
+         (setq entries
+               (sort
+                entries
+                (lambda (x y)
+                  (if (string-match "t" switches)
+                      ;; Sort by date.
+                      (tramp-time-less-p (nth 3 y) (nth 3 x))
+                    ;; Sort by name.
+                    (string-lessp (nth 0 x) (nth 0 y))))))
+
+         ;; Handle "-F" switch.
+         (when (string-match "F" switches)
+           (mapc
+            (lambda (x)
+              (when (not (zerop (length (car x))))
+                (cond
+                 ((char-equal ?d (string-to-char (nth 1 x)))
+                  (setcar x (concat (car x) "/")))
+                 ((char-equal ?x (string-to-char (nth 1 x)))
+                  (setcar x (concat (car x) "*"))))))
+            entries))
+
+         ;; Print entries.
          (mapc
           (lambda (x)
-            (when (not (zerop (length (car x))))
-              (cond
-               ((char-equal ?d (string-to-char (nth 1 x)))
-                (setcar x (concat (car x) "/")))
-               ((char-equal ?x (string-to-char (nth 1 x)))
-                (setcar x (concat (car x) "*"))))))
-          entries))
-
-       ;; Print entries.
-       (mapc
-        (lambda (x)
-          (when (not (zerop (length (nth 0 x))))
-            (when (string-match "l" switches)
-              (let ((attr
-                     (when (tramp-smb-get-stat-capability v)
-                       (ignore-errors
-                         (file-attributes filename 'string)))))
+            (when (not (zerop (length (nth 0 x))))
+              (when (string-match "l" switches)
+                (let ((attr
+                       (when (tramp-smb-get-stat-capability v)
+                         (ignore-errors
+                           (file-attributes filename 'string)))))
+                  (insert
+                   (format
+                    "%10s %3d %-8s %-8s %8s %s "
+                    (or (nth 8 attr) (nth 1 x)) ; mode
+                    (or (nth 1 attr) 1) ; inode
+                    (or (nth 2 attr) "nobody") ; uid
+                    (or (nth 3 attr) "nogroup") ; gid
+                    (or (nth 7 attr) (nth 2 x)) ; size
+                    (format-time-string
+                     (if (tramp-time-less-p
+                          (tramp-time-subtract (current-time) (nth 3 x))
+                          tramp-half-a-year)
+                         "%b %e %R"
+                       "%b %e  %Y")
+                     (nth 3 x)))))) ; date
+
+              ;; We mark the file name.  The inserted name could be
+              ;; from somewhere else, so we use the relative file name
+              ;; of `default-directory'.
+              (let ((start (point)))
                 (insert
                  (format
-                  "%10s %3d %-8s %-8s %8s %s "
-                  (or (nth 8 attr) (nth 1 x)) ; mode
-                  (or (nth 1 attr) 1) ; inode
-                  (or (nth 2 attr) "nobody") ; uid
-                  (or (nth 3 attr) "nogroup") ; gid
-                  (or (nth 7 attr) (nth 2 x)) ; size
-                  (format-time-string
-                   (if (tramp-time-less-p
-                        (tramp-time-subtract (current-time) (nth 3 x))
-                        tramp-half-a-year)
-                       "%b %e %R"
-                     "%b %e  %Y")
-                   (nth 3 x)))))) ; date
-
-            ;; We mark the file name.  The inserted name could be
-            ;; from somewhere else, so we use the relative file name
-            ;; of `default-directory'.
-            (let ((start (point)))
-              (insert
-               (format
-                "%s\n"
-                (file-relative-name
-                 (expand-file-name
-                  (nth 0 x) (file-name-directory filename))
-                 (when full-directory-p (file-name-directory filename)))))
-              (put-text-property start (1- (point)) 'dired-filename t))
-            (forward-line)
-            (beginning-of-line)))
-        entries)))))
+                  "%s\n"
+                  (file-relative-name
+                   (expand-file-name
+                    (nth 0 x) (file-name-directory filename))
+                   (when full-directory-p (file-name-directory filename)))))
+                (put-text-property start (1- (point)) 'dired-filename t))
+              (forward-line)
+              (beginning-of-line)))
+          entries))))))
 
 (defun tramp-smb-handle-make-directory (dir &optional parents)
   "Like `make-directory' for Tramp files."
@@ -1277,6 +1278,8 @@ target of the symlink differ."
 
            ;; We must also flush the cache of the directory, because
            ;; `file-attributes' reads the values from there.
+           (tramp-flush-file-property v1 (file-name-directory v1-localname))
+           (tramp-flush-file-property v1 v1-localname)
            (tramp-flush-file-property v2 (file-name-directory v2-localname))
            (tramp-flush-file-property v2 v2-localname)
            (unless (tramp-smb-get-share v2)
@@ -1349,7 +1352,7 @@ target of the symlink differ."
                ;; Use an asynchronous processes.  By this, password can
                ;; be handled.
                (let ((p (apply
-                         'start-process-shell-command
+                         'start-process
                          (tramp-get-connection-name v)
                          (tramp-get-connection-buffer v)
                          tramp-smb-acl-program args)))
index 9a97d82452879fdb0a62770afd9d6cc2c9f7b35e..e3fb177b0c5029a6ac487ad840892d4ee7c43ded 100644 (file)
@@ -240,7 +240,7 @@ pair of the form (KEY VALUE).  The following KEYs are defined:
     tamper the process output.
   * `tramp-copy-program'
     This specifies the name of the program to use for remotely copying
-    the file; this might be the absolute filename of rcp or the name of
+    the file; this might be the absolute filename of scp or the name of
     a workalike program.  It is always applied on the local host.
   * `tramp-copy-args'
     This specifies the list of parameters to pass to the above mentioned
@@ -248,6 +248,13 @@ pair of the form (KEY VALUE).  The following KEYs are defined:
   * `tramp-copy-env'
      A list of environment variables and their values, which will
      be set when calling `tramp-copy-program'.
+  * `tramp-remote-copy-program'
+    The listener program to be applied on remote side, if needed.
+  * `tramp-remote-copy-args'
+    The list of parameters to pass to the listener program, the hints
+    for `tramp-login-args' also apply here.  Additionally, \"%r\" could
+    be used here and in `tramp-copy-args'.  It denotes a randomly
+    chosen port for the remote listener.
   * `tramp-copy-keep-date'
     This specifies whether the copying program when the preserves the
     timestamp of the original file.
@@ -275,7 +282,7 @@ pair of the form (KEY VALUE).  The following KEYs are defined:
 What does all this mean?  Well, you should specify `tramp-login-program'
 for all methods; this program is used to log in to the remote site.  Then,
 there are two ways to actually transfer the files between the local and the
-remote side.  One way is using an additional rcp-like program.  If you want
+remote side.  One way is using an additional scp-like program.  If you want
 to do this, set `tramp-copy-program' in the method.
 
 Another possibility for file transfer is inline transfer, i.e. the
@@ -1762,7 +1769,7 @@ Example:
                       (and (memq system-type '(cygwin windows-nt))
                            (zerop
                             (tramp-call-process
-                             "reg" nil nil nil "query" (nth 1 (car v)))))
+                             "reg" nil nil nil "query" (nth 1 (car v)))))
                     ;; Configuration file.
                     (file-exists-p (nth 1 (car v)))))
        (setq r (delete (car v) r)))
@@ -2141,13 +2148,13 @@ Falls back to normal file name handler if no Tramp file name handler exists."
                       ((eq result 'non-essential)
                        (tramp-message
                         v 5 "Non-essential received in operation %s"
-                        (append (list operation) args))
+                        (cons operation args))
                        (tramp-run-real-handler operation args))
                       ((eq result 'suppress)
                        (let (tramp-message-show-message)
                          (tramp-message
                           v 1 "Suppress received in operation %s"
-                          (append (list operation) args))
+                          (cons operation args))
                          (tramp-cleanup-connection v t)
                          (tramp-run-real-handler operation args)))
                       (t result)))
@@ -2157,7 +2164,7 @@ Falls back to normal file name handler if no Tramp file name handler exists."
                   (let (tramp-message-show-message)
                     (tramp-message
                      v 1 "Interrupt received in operation %s"
-                     (append (list operation) args)))
+                     (cons operation args)))
                   ;; Propagate the quit signal.
                   (signal (car err) (cdr err)))
 
@@ -2816,7 +2823,7 @@ User is always nil."
   (if (memq system-type '(windows-nt))
       (with-temp-buffer
        (when (zerop (tramp-call-process
-                     "reg" nil t nil "query" registry-or-dirname))
+                     nil "reg" nil t nil "query" registry-or-dirname))
          (goto-char (point-min))
          (loop while (not (eobp)) collect
                (tramp-parse-putty-group registry-or-dirname))))
@@ -2895,7 +2902,7 @@ User is always nil."
 (defun tramp-handle-file-accessible-directory-p (filename)
   "Like `file-accessible-directory-p' for Tramp files."
   (and (file-directory-p filename)
-       (file-executable-p filename)))
+       (file-readable-p filename)))
 
 (defun tramp-handle-file-exists-p (filename)
   "Like `file-exists-p' for Tramp files."
@@ -2991,8 +2998,6 @@ User is always nil."
   (with-parsed-tramp-file-name filename nil
     (let ((x (car (file-attributes filename))))
       (when (stringp x)
-       ;; When Tramp is running on VMS, then `file-name-absolute-p'
-       ;; might do weird things.
        (if (file-name-absolute-p x)
            (tramp-make-tramp-file-name method user host x)
          x)))))
@@ -3284,11 +3289,12 @@ User is always nil."
            ;; Run the process.
            (setq p (apply 'start-file-process "*Async Shell*" buffer args))
          ;; Display output.
-         (pop-to-buffer output-buffer)
-         (setq mode-line-process '(":%s"))
-         (shell-mode)
-         (set-process-sentinel p 'shell-command-sentinel)
-         (set-process-filter p 'comint-output-filter))
+         (with-current-buffer output-buffer
+           (display-buffer output-buffer '(nil (allow-no-window . t)))
+           (setq mode-line-process '(":%s"))
+           (shell-mode)
+           (set-process-sentinel p 'shell-command-sentinel)
+           (set-process-filter p 'comint-output-filter)))
 
       (prog1
          ;; Run the process.
@@ -3333,8 +3339,9 @@ User is always nil."
 (defun tramp-handle-unhandled-file-name-directory (_filename)
   "Like `unhandled-file-name-directory' for Tramp files."
   ;; With Emacs 23, we could simply return `nil'.  But we must keep it
-  ;; for backward compatibility.
-  (expand-file-name "~/"))
+  ;; for backward compatibility.  "~/" cannot be returned, because
+  ;; there might be machines without a HOME directory (like hydra).
+  "/")
 
 (defun tramp-handle-set-visited-file-modtime (&optional time-list)
   "Like `set-visited-file-modtime' for Tramp files."
@@ -3905,7 +3912,7 @@ be granted."
                (tramp-get-file-property
                 vec (tramp-file-name-localname vec)
                 (concat "file-attributes-" suffix) nil)
-               (file-attributes
+               (tramp-compat-file-attributes
                 (tramp-make-tramp-file-name
                  (tramp-file-name-method vec)
                  (tramp-file-name-user vec)
@@ -4117,18 +4124,34 @@ ALIST is of the form ((FROM . TO) ...)."
 ;;; Compatibility functions section:
 
 (defun tramp-call-process
-  (program &optional infile destination display &rest args)
+  (vec program &optional infile destination display &rest args)
   "Calls `call-process' on the local host.
-This is needed because for some Emacs flavors Tramp has
-defadvised `call-process' to behave like `process-file'.  The
-Lisp error raised when PROGRAM is nil is trapped also, returning 1.
-Furthermore, traces are written with verbosity of 6."
-  (tramp-message
-   (vector tramp-current-method tramp-current-user tramp-current-host nil nil)
-   6 "`%s %s' %s %s" program (mapconcat 'identity args " ") infile destination)
-  (if (executable-find program)
-      (apply 'call-process program infile destination display args)
-    1))
+It always returns a return code.  The Lisp error raised when
+PROGRAM is nil is trapped also, returning 1.  Furthermore, traces
+are written with verbosity of 6."
+  (let ((v (or vec
+              (vector tramp-current-method tramp-current-user
+                      tramp-current-host nil nil)))
+       (destination (if (eq destination t) (current-buffer) destination))
+       result)
+    (tramp-message
+     v 6 "`%s %s' %s %s"
+     program (mapconcat 'identity args " ") infile destination)
+    (condition-case err
+       (with-temp-buffer
+         (setq result
+               (apply
+                'call-process program infile (or destination t) display args))
+         ;; `result' could also be an error string.
+         (when (stringp result)
+           (signal 'file-error (list result)))
+         (with-current-buffer
+             (if (bufferp destination) destination (current-buffer))
+           (tramp-message v 6 "%d\n%s" result (buffer-string))))
+      (error
+       (setq result 1)
+       (tramp-message v 6 "%d\n%s" result (error-message-string err))))
+    result))
 
 ;;;###tramp-autoload
 (defun tramp-read-passwd (proc &optional prompt)
index 1ee6e6ad025ca85dc58a5a1fdf6acf5f4d48ddec..065c3f33ebec92d93c7fd43d50a564c1b8698bca 100644 (file)
 
 ;;; Code:
 
-;; In the Tramp CVS repository, the version number and the bug report
+;; In the Tramp GIT repository, the version number and the bug report
 ;; address are auto-frobbed from configure.ac, so you should edit that
 ;; file and run "autoconf && ./configure" to change them.  (X)Emacs
 ;; version check is defined in macro AC_EMACS_INFO of aclocal.m4;
 ;; should be changed only there.
 
 ;;;###tramp-autoload
-(defconst tramp-version "2.2.9-24.4"
+(defconst tramp-version "2.2.11-pre"
   "This version of Tramp.")
 
 ;;;###tramp-autoload
@@ -44,7 +44,7 @@
                      (= emacs-major-version 21)
                      (>= emacs-minor-version 4)))
             "ok"
-          (format "Tramp 2.2.9-24.4 is not fit for %s"
+          (format "Tramp 2.2.11-pre is not fit for %s"
                   (when (string-match "^.*$" (emacs-version))
                     (match-string 0 (emacs-version)))))))
   (unless (string-match "\\`ok\\'" x) (error "%s" x)))
index 2d798494b8b5b6e3539dd06597d2f8db4446d9fa..b607eb95df2267e27f0b49766be578b98e995a8b 100644 (file)
@@ -1390,22 +1390,12 @@ unless optional argument SOFT is non-nil."
         ;; If we're not inside a comment, just try to indent.
         ((not compos) (indent-according-to-mode))
         (t
-         (let* ((comment-column
-                 ;; The continuation indentation should be somewhere between
-                 ;; the current line's indentation (plus 2 for good measure)
-                 ;; and the current comment's indentation, with a preference
-                 ;; for comment-column.
-                 (save-excursion
-                   ;; FIXME: use prev line's info rather than first line's.
-                   (goto-char compos)
-                   (min (current-column) (max comment-column
-                                              (+ 2 (current-indentation))))))
-                (comstart (buffer-substring compos comin))
+         (let* ((comstart (buffer-substring compos comin))
                 (normalp
                  (string-match (regexp-quote (comment-string-strip
                                               comment-start t t))
                                comstart))
-                (comment-end
+                (comend
                  (if normalp comment-end
                    ;; The comment starter is not the normal comment-start
                    ;; so we can't just use comment-end.
@@ -1416,19 +1406,42 @@ unless optional argument SOFT is non-nil."
                         (buffer-substring
                          (save-excursion (comment-enter-backward) (point))
                          (point))
-                        nil t)))))
-                (comment-start comstart)
-                (continuep (or comment-multi-line
-                               (cadr (assoc comment-style comment-styles))))
-                ;; Force comment-continue to be recreated from comment-start.
-                ;; FIXME: wrong if comment-continue was set explicitly!
-                ;; FIXME: use prev line's continuation if available.
-                (comment-continue nil))
-           (if (and comment-multi-line (> (length comment-end) 0))
+                        nil t))))))
+           (if (and comment-multi-line (> (length comend) 0))
                (indent-according-to-mode)
              (insert-and-inherit ?\n)
              (forward-char -1)
-             (comment-indent continuep)
+              (let* ((comment-column
+                      ;; The continuation indentation should be somewhere
+                      ;; between the current line's indentation (plus 2 for
+                      ;; good measure) and the current comment's indentation,
+                      ;; with a preference for comment-column.
+                      (save-excursion
+                        ;; FIXME: use prev line's info rather than first
+                        ;; line's.
+                        (goto-char compos)
+                        (min (current-column)
+                             (max comment-column
+                                  (+ 2 (current-indentation))))))
+                     (comment-indent-function
+                      ;; If the previous comment is on its own line, then
+                      ;; reuse its indentation unconditionally.
+                      ;; Important for modes like Python/Haskell where
+                      ;; auto-indentation is unreliable.
+                      (if (save-excursion (goto-char compos)
+                                          (skip-chars-backward " \t")
+                                          (bolp))
+                          (lambda () comment-column) comment-indent-function))
+                     (comment-start comstart)
+                     (comment-end comend)
+                     (continuep (or comment-multi-line
+                                    (cadr (assoc comment-style
+                                                 comment-styles))))
+                     ;; Recreate comment-continue from comment-start.
+                     ;; FIXME: wrong if comment-continue was set explicitly!
+                     ;; FIXME: use prev line's continuation if available.
+                     (comment-continue nil))
+                (comment-indent continuep))
              (save-excursion
                (let ((pt (point)))
                  (end-of-line)
index b3ce7aaac258d4c59397c781cb6f81e3687a1686..4859bbc7a77b2f41fe3e0a641c1d46ca7e1de076 100644 (file)
@@ -2567,7 +2567,7 @@ With a prefix argument, inserts the character directly."
               (> (prefix-numeric-value arg) 0))))
     (when (not (eq new nxml-char-ref-extra-display))
       (setq nxml-char-ref-extra-display new)
-      (font-lock-fontify-buffer))))
+      (font-lock-flush))))
 
 (put 'nxml-char-ref 'evaporate t)
 
index 191f885a900368430f882e797632b422ffeb85f0..bd702a84a254c151902a06b805d2c042186aef0d 100644 (file)
     (if test-not (not (funcall test-not item elt))
       (funcall (or test 'eql) item elt))))
 
-
-;;; Rounding functions with old-style multiple value returns.
-
-(defun cl-floor (a &optional b) (Values-list (floor* a b)))
-(defun cl-ceiling (a &optional b) (Values-list (ceiling* a b)))
-(defun cl-round (a &optional b) (Values-list (round* a b)))
-(defun cl-truncate (a &optional b) (Values-list (truncate* a b)))
-
 (defun safe-idiv (a b)
   (let* ((q (/ (abs a) (abs b)))
          (s (* (signum a) (signum b))))
similarity index 99%
rename from lisp/emulation/crisp.el
rename to lisp/obsolete/crisp.el
index ad46341273583d4ad62b762cfd57531a843f28e7..47cf898190bf25a9a7ae081f365f3a6a0f4540de 100644 (file)
@@ -4,6 +4,7 @@
 
 ;; Author: Gary D. Foster <Gary.Foster@Corp.Sun.COM>
 ;; Keywords: emulations brief crisp
+;; Obsolete-since: 24.5
 
 ;; This file is part of GNU Emacs.
 
similarity index 99%
rename from lisp/emacs-lisp/gulp.el
rename to lisp/obsolete/gulp.el
index d0a89b3075ab9065659f0a95ed5ecddd01f1eef7..d959b73ba696a027e7fbd07f66ed96257a4ae4d9 100644 (file)
@@ -5,6 +5,7 @@
 ;; Author: Sam Shteingold <shteingd@math.ucla.edu>
 ;; Maintainer: emacs-devel@gnu.org
 ;; Keywords: maint
+;; Obsolete-since: 24.5
 
 ;; This file is part of GNU Emacs.
 
index c1313b8a00fde8da562591cb899291d9d9a8a040..4a0338af5304be3c3fabe1e5e2ea22a237262fa1 100644 (file)
@@ -1416,9 +1416,6 @@ See the variable `iswitchb-case' for details."
          (isearch-no-upper-case-p iswitchb-text)
        (isearch-no-upper-case-p iswitchb-text t))))
 
-;; NB obsolete/ is not scanned for autoloads.
-;; If you change any of the following doc, copy the changes to simple.el.
-
 ;;;###autoload
 (define-minor-mode iswitchb-mode
   "Toggle Iswitchb mode.
@@ -1433,10 +1430,6 @@ between buffers using substrings.  See `iswitchb' for details."
       (add-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup)
     (remove-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup)))
 
-;;;###autoload
-(make-obsolete 'iswitchb-mode
-               "use `icomplete-mode' or `ido-mode' instead." "24.4")
-
 (provide 'iswitchb)
 
 ;;; iswitchb.el ends here
index 15f806528094fcd3c0fbf5a58a1a2cdbb5d235ad..2c6efa408ffc3ae036349f0e1f6d43c995f2c07d 100644 (file)
 
 (defalias 'current-time-seconds 'current-time)
 
-(defun read-number (prompt &optional integers-only)
-  "Read a number from the minibuffer.
-Keep reentering the minibuffer until we get suitable input.
-If optional argument INTEGERS-ONLY is non-nil, insist on an integer."
-  (interactive)
-  (let (success
-       (number nil)
-       (predicate (if integers-only 'integerp 'numberp)))
-    (while (not success)
-      (let ((input-string (read-string prompt)))
-       (condition-case ()
-           (setq number (read input-string))
-         (error))
-       (if (funcall predicate number)
-           (setq success t)
-         (let ((cursor-in-echo-area t))
-           (message "Please type %s"
-                    (if integers-only "an integer" "a number"))
-           (sit-for 1)))))
-    number))
-
 (defun real-path-name (name &optional default)
   (file-truename (expand-file-name name default)))
 
index 880780c577cbefa23a7596062c4d763684dd82b4..bcd468c2b06389f96db8d22db904d0c8e490fa2a 100644 (file)
@@ -75,12 +75,7 @@ site-init."
            (if mail-interactive
                (with-current-buffer errbuf
                  (erase-buffer))))
-         (let ((m (default-file-modes)))
-           (unwind-protect
-               (progn
-                 (set-default-file-modes 384)
-                 (setq temfile  (make-temp-file ",rpost")))
-             (set-default-file-modes m)))
+         (with-file-modes 384 (setq temfile (make-temp-file ",rpost")))
          (apply 'call-process
                 (append (list (if (boundp 'post-mail-program)
                                   post-mail-program
index 9b3ba9f727ebfe0c9c959d3ecd9ba9f89fc3b1ef..837aefb8b7f0af9960678a56dc930f36b8e5c481 100644 (file)
@@ -97,8 +97,8 @@
 ;;      In this mode, mouse-insert-selection just calls mouse-yank-at-click.
 ;;
 ;;       Selection/kill-ring interaction is retained
-;;         interprogram-cut-function   = x-select-text
-;;         interprogram-paste-function = x-selection-value
+;;         interprogram-cut-function   = gui-select-text
+;;         interprogram-paste-function = gui-selection-value
 ;;
 ;;       What you lose is the ability to select some text in
 ;;       delete-selection-mode and yank over the top of it.
@@ -190,12 +190,9 @@ If nil, point will always be placed at the beginning of the region."
 
 ;;=== User Command ========================================================
 
-(defvar mouse-sel-has-been-enabled nil
-  "Non-nil if Mouse Sel mode has been enabled at least once.")
-
 (defvar mouse-sel-original-bindings nil)
-(defvar mouse-sel-original-interprogram-cut-function nil)
-(defvar mouse-sel-original-interprogram-paste-function nil)
+
+(defalias 'mouse-sel--ignore #'ignore)
 
 ;;;###autoload
 (define-minor-mode mouse-sel-mode
@@ -242,14 +239,11 @@ kill ring; mouse-1 or mouse-3 kills it."
                              (global-set-key event (cdr binding)))))
                        mouse-sel-bound-events))
          ;; Update interprogram functions.
-         (setq mouse-sel-original-interprogram-cut-function
-               interprogram-cut-function
-               mouse-sel-original-interprogram-paste-function
-               interprogram-paste-function
-               mouse-sel-has-been-enabled t)
          (unless (eq mouse-sel-default-bindings 'interprogram-cut-paste)
-           (setq interprogram-cut-function nil
-                 interprogram-paste-function nil))))
+           (add-function :override interprogram-cut-function
+                          #'mouse-sel--ignore)
+            (add-function :override interprogram-paste-function
+                          #'mouse-sel--ignore))))
 
     ;; Restore original bindings
     (remove-hook 'x-lost-selection-functions 'mouse-sel-lost-selection-hook)
@@ -257,11 +251,8 @@ kill ring; mouse-1 or mouse-3 kills it."
       (global-set-key (car binding) (cdr binding)))
     ;; Restore the old values of these variables,
     ;; only if they were actually saved previously.
-    (if mouse-sel-has-been-enabled
-       (setq interprogram-cut-function
-             mouse-sel-original-interprogram-cut-function
-             interprogram-paste-function
-             mouse-sel-original-interprogram-paste-function))))
+    (remove-function interprogram-cut-function #'mouse-sel--ignore)
+    (remove-function interprogram-paste-function #'mouse-sel--ignore)))
 
 (make-obsolete 'mouse-sel-mode "use the normal mouse modes" "24.3")
 
@@ -301,15 +292,13 @@ where   SELECTION-NAME          = name of selection
        SELECTION-THING-SYMBOL  = name of variable where the current selection
                                  type for this selection should be stored.")
 
-(declare-function x-select-text "term/common-win" (text))
-
 (defvar mouse-sel-set-selection-function
   (if (eq mouse-sel-default-bindings 'interprogram-cut-paste)
-      'x-set-selection
+      'gui-set-selection
     (lambda (selection value)
       (if (eq selection 'PRIMARY)
-         (x-select-text value)
-       (x-set-selection selection value))))
+         (gui-select-text value)
+       (gui-set-selection selection value))))
   "Function to call to set selection.
 Called with two arguments:
 
@@ -319,14 +308,13 @@ Called with two arguments:
 This sets the selection, unless `mouse-sel-default-bindings'
 is `interprogram-cut-paste'.")
 
-(declare-function x-selection-value "term/x-win" ())
 
 (defvar mouse-sel-get-selection-function
   (lambda (selection)
     (if (eq selection 'PRIMARY)
-       (or (x-selection-value)
-           (bound-and-true-p x-last-selected-text)
-           (bound-and-true-p x-last-selected-text-primary))
+       (or (gui-selection-value)
+           (bound-and-true-p x-last-selected-text-primary)
+            gui-last-selected-text)
       (x-get-selection selection)))
   "Function to call to get the selection.
 Called with one argument:
index e5ac1e1427d979253863af7d42de78af8ce3e91b..5ee0818a1e5879932fd6edbe1e37cc602d41994d 100644 (file)
@@ -388,7 +388,7 @@ but before calling PC Selection mode):
                   (fboundp 'normal-erase-is-backspace-mode))
          (normal-erase-is-backspace-mode 1))
        (setq highlight-nonselected-windows nil)
-       (setq transient-mark-mode t)
+       (transient-mark-mode 1)
        (setq mark-even-if-inactive t)
        (delete-selection-mode 1))
     ;;else
index 5a54cb0caffbf11e87dcbc2987544d273d0eb638..5d6ae9cc2e96993c87d49e69f62c7526d859ee35 100644 (file)
@@ -202,15 +202,11 @@ passphrase cache or user."
 (defun pgg-pgp-verify-region (start end &optional signature)
   "Verify region between START and END as the detached signature SIGNATURE."
   (let* ((orig-file (pgg-make-temp-file "pgg"))
-        (args "+verbose=1 +batchmode +language=us")
-        (orig-mode (default-file-modes)))
-    (unwind-protect
-       (progn
-         (set-default-file-modes 448)
-         (let ((coding-system-for-write 'binary)
-               jka-compr-compression-info-list jam-zcat-filename-list)
-           (write-region start end orig-file)))
-      (set-default-file-modes orig-mode))
+        (args "+verbose=1 +batchmode +language=us"))
+    (with-file-modes 448
+      (let ((coding-system-for-write 'binary)
+            jka-compr-compression-info-list jam-zcat-filename-list)
+        (write-region start end orig-file)))
     (if (stringp signature)
        (progn
          (copy-file signature (setq signature (concat orig-file ".asc")))
index beece7ea2ea5f36bea731d054f553c898c8ea0b3..944800cf0f6a49c6c457d0a026fbdcb8a1156673 100644 (file)
@@ -208,15 +208,11 @@ Bourne shell or its equivalent \(not tcsh) is needed for \"2>\"."
 (defun pgg-pgp5-verify-region (start end &optional signature)
   "Verify region between START and END as the detached signature SIGNATURE."
   (let ((orig-file (pgg-make-temp-file "pgg"))
-       (args '("+verbose=1" "+batchmode=1" "+language=us"))
-       (orig-mode (default-file-modes)))
-    (unwind-protect
-       (progn
-         (set-default-file-modes 448)
-         (let ((coding-system-for-write 'binary)
-               jka-compr-compression-info-list jam-zcat-filename-list)
-           (write-region start end orig-file)))
-      (set-default-file-modes orig-mode))
+       (args '("+verbose=1" "+batchmode=1" "+language=us")))
+    (with-file-modes 448
+      (let ((coding-system-for-write 'binary)
+           jka-compr-compression-info-list jam-zcat-filename-list)
+       (write-region start end orig-file)))
     (when (stringp signature)
       (copy-file signature (setq signature (concat orig-file ".asc")))
       (setq args (append args (list signature))))
similarity index 99%
rename from lisp/emulation/tpu-edt.el
rename to lisp/obsolete/tpu-edt.el
index d9ed1908c763a46542103f35ca0c9c9054fb9155..43189319a6a21748ec780b827c8c7db6737396a6 100644 (file)
@@ -6,6 +6,7 @@
 ;; Maintainer: Rob Riepel <riepel@networking.stanford.edu>
 ;; Version: 4.5
 ;; Keywords: emulations
+;; Obsolete-since: 24.5
 
 ;; This file is part of GNU Emacs.
 
similarity index 99%
rename from lisp/emulation/tpu-extras.el
rename to lisp/obsolete/tpu-extras.el
index 9ebaaf6ffcef7f18d471cb45c11b69f3a2ba03fd..32257e840ac046cf42b71133eb4c1d3f0b522714 100644 (file)
@@ -6,6 +6,7 @@
 ;; Maintainer: Rob Riepel <riepel@networking.stanford.edu>
 ;; Keywords: emulations
 ;; Package: tpu-edt
+;; Obsolete-since: 24.5
 
 ;; This file is part of GNU Emacs.
 
similarity index 99%
rename from lisp/emulation/tpu-mapper.el
rename to lisp/obsolete/tpu-mapper.el
index 2479389ac3c732343e396a2b7b44ba54a59591d1..d653685218bccb1fa4b07fd741de092a7b27ea2d 100644 (file)
@@ -6,6 +6,7 @@
 ;; Maintainer: Rob Riepel <riepel@networking.stanford.edu>
 ;; Keywords: emulations
 ;; Package: tpu-edt
+;; Obsolete-since: 24.5
 
 ;; This file is part of GNU Emacs.
 
similarity index 99%
rename from lisp/emulation/vi.el
rename to lisp/obsolete/vi.el
index 9aae40c0d00ed4ced974df47a8df9ca8456a0b2d..fbdf7a1e920a2db8dc7d730c412217a3f7f8347f 100644 (file)
@@ -8,9 +8,12 @@
 ;; Author: Neal Ziring <nz@rsch.wisc.edu>
 ;;     Felix S. T. Wu <wu@crys.wisc.edu>
 ;; Keywords: emulations
+;; Obsolete-since: 24.5
 
 ;;; Commentary:
 
+;; This file is obsolete.  Consider using viper instead.
+
 ;; Originally written by : seismo!wucs!nz@rsch.wisc.edu (Neal Ziring)
 ;; Extensively redesigned and rewritten by wu@crys.wisc.edu (Felix S.T. Wu)
 ;; Last revision: 01/07/87 Wed (for GNU Emacs 18.33)
@@ -1197,7 +1200,7 @@ SPECIAL FEATURE: char argument can be used to specify shift amount(1-9)."
     (let ((aelt (assq char vi-mark-alist)))
       (if aelt
          (move-marker (cdr aelt) (point)) ; fixed 6/12/86
-       (setq aelt (cons char (copy-marker (point))))
+       (setq aelt (cons char (point-marker)))
        (setq vi-mark-alist (cons aelt vi-mark-alist))))))
 
 (defun vi-find-matching-paren ()
similarity index 99%
rename from lisp/emulation/vip.el
rename to lisp/obsolete/vip.el
index 09456e6320bc03e2fcc6f452ba54167db9b08ec6..ea102cb0ac5ae05763502e602b22836a7d8efe54 100644 (file)
@@ -1,10 +1,11 @@
 ;;; vip.el --- a VI Package for GNU Emacs
 
-;; Copyright (C) 1986-1988, 1992-1993, 1998, 2001-2014 Free Software
-;; Foundation, Inc.
+;; Copyright (C) 1986-1988, 1992-1993, 1998, 2001-2014
+;;   Free Software Foundation, Inc.
 
 ;; Author: Masahiko Sato <ms@sail.stanford.edu>
 ;; Keywords: emulations
+;; Obsolete-since: 24.5
 
 ;; This file is part of GNU Emacs.
 
@@ -23,6 +24,8 @@
 
 ;;; Commentary:
 
+;; This file is obsolete.  Consider using viper instead.
+
 ;; A full-featured vi(1) emulator.
 ;;
 ;; In Japan, the author's address is: masahiko@sato.riec.tohoku.junet
similarity index 99%
rename from lisp/emulation/ws-mode.el
rename to lisp/obsolete/ws-mode.el
index fb140e6ebd7a530472971be298aae748481cbef5..d87cc73252b1375701396f492e45d161a36857f8 100644 (file)
@@ -5,6 +5,7 @@
 ;; Author: Juergen Nickelsen <nickel@cs.tu-berlin.de>
 ;; Version: 0.7
 ;; Keywords: emulations
+;; Obsolete-since: 24.5
 
 ;; This file is part of GNU Emacs.
 
index 439bed3706a3ff997dce84013599717103f3fd8c..3910a71db3fe3d76e0e4c8e13a2a3696897f83e7 100644 (file)
@@ -15,8 +15,7 @@
 
 2014-10-12  Christopher Schmidt  <ch@ristopher.com>
 
-       * org.el (orgstruct-make-binding): Do not use loop in interpreted
-       code.
+       * org.el (orgstruct-make-binding): Do not use loop in interpreted code.
 
 2014-10-12  Mike McLean  <mike.mclean@pobox.com>  (tiny change)
 
 
 2014-10-12  Nicolas Goaziou  <mail@nicolasgoaziou.fr>
 
-       * ox.el (org-export-async-start): Allow to use symbols as
-       function.
+       * ox.el (org-export-async-start): Allow to use symbols as function.
 
-2014-10-02  Achim Gratz  <Stromeko@Stromeko.DE>
+2014-10-03  Achim Gratz  <Stromeko@Stromeko.DE>
 
        * ob-sh.el (org-babel-sh-initiate-session): After initiating a
        session, initialize the marker `comint-last-output-start' since it
        returns nil, do not run make-directory.  Remove superfluous when
        clauses by using short-circuiting `and' instead.
 
-2014-10-02  Alex Kosorukoff  <alex@3form.com>  (tiny change)
+2014-10-03  Alex Kosorukoff  <alex@3form.com>  (tiny change)
 
        * org-capture.el (org-capture-fill-template): Set `mark-active' to
        nil.
 
-2014-10-02  Bastien Guerry  <bzg@gnu.org>
+2014-10-03  Bastien Guerry  <bzg@gnu.org>
 
        * org-agenda.el (org-agenda-prepare): Reset preset filters when
        using sticky agendas.
        * org-agenda.el (org-agenda-finalize): Filter by top headline if
        `org-agenda-top-headline-filter' is set.
 
-2014-10-02  Bernt Hansen  <bernt@norang.ca>
+2014-10-03  Bernt Hansen  <bernt@norang.ca>
 
        * org-macs.el: Remove restriction when locating markers.
 
-2014-10-02  Dmitry Gorbik  <dgorbik@me.com>  (tiny change)
+2014-10-03  Dmitry Gorbik  <dgorbik@me.com>  (tiny change)
 
        * org.el (org-fast-tag-selection): Fix window splitting.
 
-2014-10-02  Eric Schulte  <schulte.eric@gmail.com>
+2014-10-03  Eric Schulte  <schulte.eric@gmail.com>
 
        * ob-screen.el (org-babel-screen-test): Use unpredictable name for
        temporary file.
        * ob-screen.el (org-babel-screen-session-write-temp-file): Use
        unpredictable temp file name, fixes bug#17416.
 
-2014-10-02  Ian Kelling  <ian@iankelling.org>
+2014-10-03  Ian Kelling  <ian@iankelling.org>
 
        * ob-core.el (org-babel-insert-result): Test all list elements
        against listp and (eq element 'hline) instead of checking just the
        first.
 
-2014-10-02  Konstantin Kliakhandler  <kosta@slumpy.org>  (tiny change)
+2014-10-03  Konstantin Kliakhandler  <kosta@slumpy.org>  (tiny change)
 
        * org-agenda.el (org-agenda-redo): Reapply the filters correctly.
 
-2014-10-02  Kyle Meyer  <kyle@kyleam.com>  (tiny change)
+2014-10-03  Kyle Meyer  <kyle@kyleam.com>  (tiny change)
 
        * ox.el (org-export-show-temporary-export-buffer): Fix typo.
 
-2014-10-02  Matt Lundin  <mdl@imapmail.org>
+2014-10-03  Matt Lundin  <mdl@imapmail.org>
 
        * ox-publish.el (org-publish-find-title, org-publish-find-date):
        Make sure to call org-export-get-environment in copy of buffer if
        * ox-publish.el (org-publish-find-title, org-publish-find-date):
        Fix unnecessary invocations of org-mode with org-inhibit-startup.
 
-2014-10-02  Nick Dokos  <ndokos@gmail.com>
+2014-10-03  Nick Dokos  <ndokos@gmail.com>
 
        * org-table.el (org-table-clean-before-export): The regexes match
        spaces in addition to the special characters that might be used in
        * ox-ascii.el (org-ascii-superscript): Change _ to ^ in the
        output.
 
-2014-10-02  Nick Dokos  <ndokos@redhat.com>
+2014-10-03  Nick Dokos  <ndokos@redhat.com>
 
        * org-table.el (org-table-show-reference): Call `set-window-start'
        with the calculated values `min' and `max', not with
        (point-min) and (point-max).
 
-2014-10-02  Nicolas Goaziou  <n.goaziou@gmail.com>
+2014-10-03  Nicolas Goaziou  <n.goaziou@gmail.com>
 
        * ox-latex.el (org-latex-link): Improve test for unnumbered
        headlines.
        * ox-icalendar.el (org-icalendar-entry): Use
        `org-icalendar-with-timestamps'.
 
-2014-10-02  Nicolas Richard  <theonewiththeevillook@yahoo.fr>
+2014-10-03  Nicolas Richard  <theonewiththeevillook@yahoo.fr>
 
        * org.el (org-cycle-internal-local): Don't show a trailing
        character when cycling a subtree that ends with a non-newline
        character at the end of the buffer or the narrowed region.
 
-2014-10-02  Sebastien Vauban  <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
+2014-10-03  Sebastien Vauban  <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
 
        * ox-ascii.el (org-ascii--box-string): Choose more universal
        Unicode characters for boxquote corners.
 
-2014-10-02  Marco Wahl  <marcowahlsoft@gmail.com>  (tiny change)
+2014-10-03  Marco Wahl  <marcowahlsoft@gmail.com>  (tiny change)
 
        * org-agenda.el (org-agenda-bulk-mark)
        (org-agenda-bulk-mark-regexp, org-agenda-bulk-toggle-all): Fix
        org-agenda-bulk-mark-all when time-grid is shown.
 
+2014-06-23  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * org-compat.el (activate-mark): Set transient-mark-mode buffer-locally.
+
+2014-06-22  Mario Lang  <mlang@delysid.org>
+
+       * org-list.el (org-list-insert-item): The the -> the.
+
+       * org-bibtex.el (org-bibtex-fields): The the -> the.
+
+2013-06-22  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * ob-core.el (org-babel-insert-result): Prefer point-min-marker
+       and point-max-marker.
+       * org-mouse.el (org-mouse-do-remotely): Prefer point-marker
+       to copy-marker of point.
+
+2014-05-29  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * org-compat.el (org-font-lock-ensure): New function.
+       * ox-odt.el (org-odt-do-format-code):
+       * ox-html.el (org-html-fontify-code):
+       * org.el (org-fontify-like-in-org-mode):
+       * org-src.el (org-src-font-lock-fontify-block):
+       * org-clock.el (org-clock-get-clocktable): Use it.
+       * ox-org.el (org-org-publish-to-org): Use it.  Avoid using find-file
+       from Elisp.
+
 2014-05-12  Eric Schulte  <eric.schulte@gmx.com>
 
        * ob-screen.el (org-babel-screen-session-write-temp-file)
        `org-babel-gnuplot-table-to-data´ expects a table, so we need to
        construct one when Babel hands us a vector.
 
-       * ob-ref.el (org-babel-ref-parse): If
-       `org-babel-current-src-block-location' is a marker, it can be from
+       * ob-ref.el (org-babel-ref-parse):
+       If `org-babel-current-src-block-location' is a marker, it can be from
        another buffer, use marker-position instead in this case.
 
 2014-04-22  Arun Persaud  <apersaud@lbl.gov>  (tiny change)
 
-       * org-src.el (org-edit-src-exit): Don't add indentation on empty
-       lines.
+       * org-src.el (org-edit-src-exit): Don't add indentation on empty lines.
 
 2014-04-22  Bastien Guerry  <bzg@gnu.org>
 
 
        * org-table.el (org-table-copy-down)
        (org-table-find-dataline, org-table-move-row)
-       (org-table-insert-hline, org-table-kill-row): Use
-       `org-move-to-column' with the IGNORE-INVISIBLE arg set to `t', so
+       (org-table-insert-hline, org-table-kill-row):
+       Use `org-move-to-column' with the IGNORE-INVISIBLE arg set to `t', so
        that abbreviated rows don't interfer with setting the cursor back
        at the correct position.
 
        * org-table.el (org-table-field-info): Throw a user error when not
        at a table.
 
-       * org-agenda.el (org-agenda-drag-line-forward): Call
-       `org-agenda-mark-clocking-task' when done.
+       * org-agenda.el (org-agenda-drag-line-forward):
+       Call `org-agenda-mark-clocking-task' when done.
        (org-agenda-mark-clocking-task): Small refactoring.
 
        * org-compat.el (org-set-transient-map): Alias pointing at
 
 2014-04-22  Markus Hauck  <markus1189@gmail.com>  (tiny change)
 
-       * org-agenda.el (org-agenda-get-scheduled): If
-       `org-agenda-skip-scheduled-if-deadline-is-shown' is set to
+       * org-agenda.el (org-agenda-get-scheduled):
+       If `org-agenda-skip-scheduled-if-deadline-is-shown' is set to
        'repeated-after-deadline, still show tasks without any deadline
 
 2014-04-22  Michael Brand  <michael.ch.brand@gmail.com>
        followed by multiple blank lines.
 
        * ox.el (org-export-insert-default-template): Only insert
-       keywords and options relatives to the selected back-end.  Ignore
-       those relatives to its parent in the case of a derived back-end.
+       keywords and options relatives to the selected back-end.
+       Ignore those relatives to its parent in the case of a derived back-end.
 
        * ox-beamer.el: Remove unnecessary package definitions in default
        class.
        docstring.
        (org-entry-get): Minor docstring enhancement.
        (org-set-startup-visibility): Bugfix.
-       (org-shiftcontrolup, org-shiftcontroldown): When
-       `org-support-shift-select' is not `nil', let-bind it to nil if
+       (org-shiftcontrolup, org-shiftcontroldown):
+       When `org-support-shift-select' is not `nil', let-bind it to nil if
        point is on a clock log.  Otherwise throw an error.
 
        * ob-lob.el (org-babel-lob-files): Fix custom type.
 
        * ox-html.el: Clean up "FIXME" comments.
 
-       * ox-publish.el (org-publish-resolve-external-fuzzy-link): Fix
-       docstring.
+       * ox-publish.el (org-publish-resolve-external-fuzzy-link):
+       Fix docstring.
 
        * ox.el (org-export-smart-quotes-regexps): Fix smart quote
        detection when it is followed by an open parenthesis syntax class.
 
-       * org-element.el (org-element-inline-babel-call-successor): Use
-       original regexp to stay up-to-date with Babel changes.
+       * org-element.el (org-element-inline-babel-call-successor):
+       Use original regexp to stay up-to-date with Babel changes.
        (org-element--affiliated-re): Fix affiliated keyword regexp.
 
        * ox-org.el (org-org-identity): Since back-end specific keywords
        are stripped from output, also remove attr_backend keywords.
        (org-babel-exp-process-buffer): Fix duplicate evaluation with
        :wrap src.
-       (org-babel-exp-non-block-elements): Removed function.
+       (org-babel-exp-non-block-elements): Remove function.
 
 2013-01-07  Ted Wiles  <thewiles@wharton.upenn.edu>  (tiny change)
 
        (org-texinfo-drawer): Always use
        `org-texinfo-format-drawer-function' as it is now a function
        by default.
-       (org-texinfo-headline): Compare
-       `org-texinfo-format-headline-function' against 'ignore.
-       (org-texinfo-inlinetask): Compare
-       `org-texinfo-format-inlinetask-function' against 'ignore.
+       (org-texinfo-headline):
+       Compare `org-texinfo-format-headline-function' against 'ignore.
+       (org-texinfo-inlinetask):
+       Compare `org-texinfo-format-inlinetask-function' against 'ignore.
 
        * ox-odt.el (org-odt-format-drawer-function): Use a function as
        the default value.  Update docstring.
        (org-odt-format-inlinetask-function): Fix default value.
        (org-odt-drawer): Always use `org-odt-format-drawer-function'
        as it is now a function by default.
-       (org-odt-format-headline--wrap): Compare
-       `org-odt-format-headline-function' against 'ignore.
+       (org-odt-format-headline--wrap):
+       Compare `org-odt-format-headline-function' against 'ignore.
 
        * ox-latex.el (org-latex-format-drawer-function): Use a function
        as the default value.  Update docstring.
        (org-latex-drawer): Always use
        `org-latex-format-drawer-function' as it is now a function by
        default.
-       (org-latex-inlinetask): Compare
-       `org-latex-format-inlinetask-function' against 'ignore.
+       (org-latex-inlinetask):
+       Compare `org-latex-format-inlinetask-function' against 'ignore.
 
        * ox-html.el (org-html-format-drawer-function): Use a function as
        the default value.  Update docstring.
        (org-html-format-headline-function)
        (org-html-format-inlinetask-function): Fix default value.
        (org-html--format-toc-headline)
-       (org-html-format-headline--wrap): Compare
-       `org-html-format-headline-function' against 'ignore.
-       (org-html-inlinetask): Compare
-       `org-html-format-inlinetask-function' against 'ignore.
+       (org-html-format-headline--wrap):
+       Compare `org-html-format-headline-function' against 'ignore.
+       (org-html-inlinetask):
+       Compare `org-html-format-inlinetask-function' against 'ignore.
 
        * ox-ascii.el (org-ascii-format-drawer-function): Use a
        function as the default value.  Update docstring.
        `org-ascii-format-drawer-function' as it is now a function by
        default.
        (org-ascii-format-inlinetask-default): New function.
-       (org-ascii-format-inlinetask-function): Use
-       `org-ascii-format-inlinetask-default' as the default.
+       (org-ascii-format-inlinetask-function):
+       Use `org-ascii-format-inlinetask-default' as the default.
 
        * org.el (org-mouse-1-follows-link): Use :set to set the default
        value.  Update custom type.
        type.
        (orgstruct-heading-prefix-regexp): Use an empty string as the
        default value.  Use 'regexp as the custom type.
-       (orgstruct-make-binding): Tiny docstring enhancement.  Assume
-       `orgstruct-heading-prefix-regexp' is a string.
+       (orgstruct-make-binding): Tiny docstring enhancement.
+       Assume `orgstruct-heading-prefix-regexp' is a string.
 
-       * org-agenda.el (org-agenda-search-view-max-outline-level): Set
-       default value to 0.  Update docstring.
+       * org-agenda.el (org-agenda-search-view-max-outline-level):
+       Set default value to 0.  Update docstring.
        (org-agenda-deadline-leaders): Fix custom type.
-       (org-search-view): Assume
-       `org-agenda-search-view-max-outline-level' is a number.
+       (org-search-view):
+       Assume `org-agenda-search-view-max-outline-level' is a number.
 
        * ob-ruby.el (org-babel-ruby-nil-to): Fix custom type.
 
        * ox-html.el (org-html-format-latex): Add an argument.  Ensure
        latex header is the same as specified in the original buffer when
        exporting a LaTeX fragment or environment.
-       (org-html-latex-environment, org-html-latex-fragment): Apply
-       signature change.
+       (org-html-latex-environment, org-html-latex-fragment):
+       Apply signature change.
 
        * ox-publish.el (org-publish-cache-ctime-of-src): Return an error
        when publishing a non-existent file.
        * org.el (org-format-latex): Do not re-generate a LaTeX preview if
        the image already exists.
 
-       * org-agenda.el (org-agenda-search-view-max-outline-level): New
-       option to define the max level for the entries shown by the search
+       * org-agenda.el (org-agenda-search-view-max-outline-level):
+       New option to define the max level for the entries shown by the search
        view.  A value of 1 means to show the top parent of the entries.
 
        * org.el (org-create-formula-image-with-dvipng): Fix bug that made
        (org-babel-get-rownames, org-table.el)
        (org-table-transpose-table-at-point): Replace the inadvertent use
        of mapcar* (from cl) by plain mapcar and direct cons manipulation.
-       (org-babel-params-from-properties): Use
-       `org-babel-current-src-block-location' for evaluating new-style
+       (org-babel-params-from-properties):
+       Use `org-babel-current-src-block-location' for evaluating new-style
        header-argument properties.  Remove superfluous save-match-data
        clauses.  Comment which properties get evaluated where.
        (org-babel-insert-header-arg, org-babel-parse-src-block-match):
        `org-re-property'.
        (org-re-property-keyword): Remove, functionality is subsumed by
        `org-re-property'.
-       (org-property-re): Define using `org-re-property'.  Improve
-       definition so that this regex can be
+       (org-property-re): Define using `org-re-property'.
+       Improve definition so that this regex can be
        (org-entry-get, org-property-values): Adjust match number for
        PROPVAL.  (org-entry-put): Use `org-re-property' instead of
        `org-re-property-keyword'.
        (define-obsolete-function-alias): Actually remove the third (and
        any following) argument from the argument list before calling the
        advised function.  Extend eval-and-compile clause and add advices
-       for functions that have different parameter lists in XEmacs.  Add
-       variable definitions that XEmacs lacks .
+       for functions that have different parameter lists in XEmacs.
+       Add variable definitions that XEmacs lacks .
 
        * ob-fortran.el (org-every): Declare.
 
-       * org-element.el (org-element-node-property-parser): Use
-       `org-property-re' and adjust match group numbers accordingly.
+       * org-element.el (org-element-node-property-parser):
+       Use `org-property-re' and adjust match group numbers accordingly.
        Move `looking-at' out of the let clause to not rely on the
        unspecified evaluation order inside the let.
 
        argument list that XEmacs complains about by adding parenthesis.
 
        * ob-octave.el (org-babel-octave-initiate-session): If octave-inf
-       can't be loaded, try octave instead before giving up.  Emacs
-       24.3.50 and upwards replaces octave-inf with just plain octave.
+       can't be loaded, try octave instead before giving up.
+       Emacs 24.3.50 and upwards replaces octave-inf with just plain octave.
 
        * org-id.el (org-id-update-id-locations): Autoload interactive
        function.
        * org-table.el (org-table-colgroup-info): Remove unused defvar for
        `org-table-colgroup-info'.
        (org-table-clean-before-export): Let-bind regular expression
-       strings and remove unused matching group.  Use
-       `org-table-clean-did-remove-column' in cond statement rather than
+       strings and remove unused matching group.
+       Use `org-table-clean-did-remove-column' in cond statement rather than
        branching via if to avoid code duplication.  Remove the code
        associated with the removed `org-table-colgroup-info'.
        (orgtbl-export): Remove unused internal function.
        * ob-perl.el (org-babel-execute:perl): Pass `result-params´
        through to `org-babel-perl-evaluate´.
        (org-babel-variable-assignments:perl): Add "my" to variable
-       declaration so that it becomes compatible with "use strict;".  Use
-       new internal formatting function `org-babel-perl--var-to-perl´.
+       declaration so that it becomes compatible with "use strict;".
+       Use new internal formatting function `org-babel-perl--var-to-perl´.
        (org-babel-perl--var-to-perl): New internal function, uses Perl
        non-interpolating quoting on the string that defines the variable
        to suppress spurious interpretation of it as Perl syntax.
        * ob-eval.el (org-babel-eval): Use simplified version of
        `org-babel--shell-command-on-region´, we are the only caller of
        this function.
-       (org-babel--shell-command-on-region): Replace
-       `org-babel-shell-command-on-region´ with a much more simplified
+       (org-babel--shell-command-on-region):
+       Replace `org-babel-shell-command-on-region´ with a much more simplified
        internal version, remove superfluous DOCSTRING and interactive
        clause, strip out all conditionals which were never used.  Prevent
        deletion of temporary input file to aid debugging when the symbol
        * org-macs.el: New macro to allow the 5-argument form of load to
        be used where possible without breaking compatibility with XEmacs.
 
-       * org.el (org-version, org-reload): Use
-       `org-load-noerror-mustsuffix´ instead of adding a fifth argument
+       * org.el (org-version, org-reload):
+       Use `org-load-noerror-mustsuffix´ instead of adding a fifth argument
        to load directly.  Guard against undefined variable load-suffixes,
        which doesn't exist in XEmacs.
 
 
 2013-11-12  Alan Schmitt  <alan.schmitt@polytechnique.org>
 
-       * ob-ocaml.el (org-babel-prep-session:ocaml): Use
-       `save-window-excursion' around the code starting the tuareg
+       * ob-ocaml.el (org-babel-prep-session:ocaml):
+       Use `save-window-excursion' around the code starting the tuareg
        process.
        (org-babel-ocaml-command): New option to specify the name of the
        toplevel to run.
        when inserting the new time as a text property.
        (org-agenda-filter-make-matcher): When filtering tags and hitting
        space, filter out entries with tags, only keep those without tags.
-       (org-agenda-drag-line-forward, org-agenda-drag-line-backward): Fix
-       bugs: don't drag lines without text and don't drag lines
+       (org-agenda-drag-line-forward, org-agenda-drag-line-backward):
+       Fix bugs: don't drag lines without text and don't drag lines
        before/after hidden lines.
 
        * ox-odt.el (org-odt-table-style-format): Use %s for inserting the
        * org-capture.el (org-capture-set-target-location): Don't throw an
        error when `org-time-was-given' is not bound.
 
-       * org-clock.el (org-clock-modify-effort-estimate): Clarify
-       docstring.
+       * org-clock.el (org-clock-modify-effort-estimate):
+       Clarify docstring.
 
        * org.el (org-set-regexps-and-options-for-tags): Return a list
        with tag-related variables.
        (org-get-outline-path): Remove statistical and checkboxes cookies.
 
        * org-agenda.el (org-agenda, org-search-view, org-tags-view)
-       (org-agenda-get-day-entries, org-agenda-set-restriction-lock): Use
-       (current-buffer) as the value of `org-agenda-restrict'.  Fix a bug
+       (org-agenda-get-day-entries, org-agenda-set-restriction-lock):
+       Use (current-buffer) as the value of `org-agenda-restrict'.  Fix a bug
        about narrowing to wrong region boundaries when
        `org-agenda-restrict' is non-nil.
 
        (org-insert-heading): Fix case when there the first heading starts
        at the beginning of the buffer.
 
-       * ob-core.el (org-babel-expand-src-block): Use
-       `org-called-interactively-p'.
+       * ob-core.el (org-babel-expand-src-block):
+       Use `org-called-interactively-p'.
 
        * org.el (org-agenda-prepare-buffers): Avoid duplicates in
        `org-tag-alist-for-agenda' correctly.
        (org-read-date-minibuffer-local-map): Check if we are at the
-       beginning of the prompt, not if we are after a whitespace.  Bind
-       C-. to `calendar-goto-today'.
+       beginning of the prompt, not if we are after a whitespace.
+       Bind C-. to `calendar-goto-today'.
 
        * org-clock.el (org-clock-in): Don't forward by one character when
        setting the marker in the clock history.
 
-       * org.el (org-read-date-minibuffer-local-map): Call
-       `calendar-goto-today' only if there is a space before point in the
+       * org.el (org-read-date-minibuffer-local-map):
+       Call `calendar-goto-today' only if there is a space before point in the
        minibuffer prompt.
        (org-insert-heading): Reveal context when called interactively.
        Fix bug about wrong conversion of lines with :END: or #+end_ into
        (org-mark-subtree, org-kill-line, org-first-sibling-p)
        (org-up-element, org-down-element)
        (org-drag-element-backward, org-drag-element-forward)
-       (org-unindent-buffer, org-speedbar-set-agenda-restriction): Use
-       `user-error' instead of `error'.
+       (org-unindent-buffer, org-speedbar-set-agenda-restriction):
+       Use `user-error' instead of `error'.
 
        * ox-latex.el (latex): Don't force exporting with smart quotes.
 
        values.
 
        * org.el (org-shifttab): Show the correct number of empty
-       headlines when called with a numeric prefix argument.  Enhance
-       docstring.
+       headlines when called with a numeric prefix argument.
+       Enhance docstring.
        (org-uniquify): Use `copy-sequence'.
        (org-adaptive-fill-function, org-fill-paragraph): Throw a useful
        error message when parse an element fails in the current buffer.
        (org-cycle-emulate-tab, org-file-apps)
        (org-set-font-lock-defaults)
        (org-translate-link-from-planner, org-link-search)
-       (org-refile-get-targets, org-read-date-get-relative): Minor
-       code clean-up: fix dangling parentheses.
+       (org-refile-get-targets, org-read-date-get-relative):
+       Minor code clean-up: fix dangling parentheses.
 
        * org-agenda.el (org-agenda-entry-text-mode): Also check against
        regexp filters.
        * org-mouse.el (org-mouse-agenda-context-menu): Fix a function's
        name.
 
-       * ox.el (org-export-options-alist, org-export--skip-p): Use
-       `:with-planning' instead of `:with-plannings', to keep in sync
+       * ox.el (org-export-options-alist, org-export--skip-p):
+       Use `:with-planning' instead of `:with-plannings', to keep in sync
        with the corresponding option's name.
 
        * ob-core.el (org-babel-confirm-evaluate): Fix typo in docstring.
        (org-re-timestamp): Handle closed time-stamps.
        (org-closed-in-range): Delete.
 
-       * org-capture.el (org-capture-import-remember-templates): Take
-       care of adding :jump-to-captured option if needed.
+       * org-capture.el (org-capture-import-remember-templates):
+       Take care of adding :jump-to-captured option if needed.
 
        * org.el (org-toggle-pretty-entities): Enhance messages.
        (org-raise-scripts): Handle scripts like "a_b^c".
        information for filtering in the agenda buffer.
        (org-uniquify-alist): New function.
 
-       * org-pcomplete.el (pcomplete/org-mode/file-option/tags): Handle
-       :grouptags.
+       * org-pcomplete.el (pcomplete/org-mode/file-option/tags):
+       Handle :grouptags.
 
        * org-faces.el (mode-line): New face for group tags.
 
        * ox-ascii.el (ascii): Use `org-export-define-backend' and
        `org-export-define-derived-backend' as defuns, not macros.
 
-       * org.el (org-set-regexps-and-options): Use
-       `org-table-set-constants'.
+       * org.el (org-set-regexps-and-options):
+       Use `org-table-set-constants'.
 
        * org-table.el (org-table-set-constants): New function.
        (orgtbl-ctrl-c-ctrl-c): Use it.
        * ox-publish.el (org-publish-org-to)
        (org-publish-org-sitemap, org-publish-find-title)
        (org-publish-find-date)
-       (org-publish-cache-file-needs-publishing): Set
-       `org-inhibit-startup' to t when visiting files for
+       (org-publish-cache-file-needs-publishing):
+       Set `org-inhibit-startup' to t when visiting files for
        publication.
 
        * ox-org.el (org-org-publish-to-org): Kill buffers not visited at
        (org-agenda-filter-remove-all): New command.
        (org-agenda-filter-show-all-re): Rename from
        `org-agenda-filter-show-all-regexp'.
-       (org-agenda-filter-by-regexp): Call
-       `org-agenda-filter-show-all-re'.
+       (org-agenda-filter-by-regexp):
+       Call `org-agenda-filter-show-all-re'.
 
        * org-list.el (org-insert-item): Don't ask for a definition term
        when insert an item in a description list.
        * ox.el (org-export--copy-to-kill-ring-p): New function.
        (org-export-copy-to-kill-ring): Use 'if-interactive as the
        default.
-       (org-export-to-buffer, org-export-to-file): Use
-       `org-export--copy-to-kill-ring-p' and fix docstrings.
+       (org-export-to-buffer, org-export-to-file):
+       Use `org-export--copy-to-kill-ring-p' and fix docstrings.
 
-       * ox-odt.el (org-odt-export-as-odf): Use
-       `org-export--copy-to-kill-ring-p'.
+       * ox-odt.el (org-odt-export-as-odf):
+       Use `org-export--copy-to-kill-ring-p'.
 
        * org.el (org-set-font-lock-defaults): Fontify macros.
 
        (org-scheduled-time-hour-regexp): New buffer local variables.
        (org-set-regexps-and-options): Set the new variables.
 
-       * org-agenda.el (org-agenda-custom-commands-local-options): Add
-       :deadline* and :scheduled* to the list of possible agenda entry
+       * org-agenda.el (org-agenda-custom-commands-local-options):
+       Add :deadline* and :scheduled* to the list of possible agenda entry
        types.
        (org-agenda): Implement a new agenda type agenda* with :scheduled*
        and :deadline* replacing :scheduled and :deadline respectively in
        (org-agenda-list): New parameter `with-hour'.  Use :scheduled* and
        :deadline*.
        (org-agenda-get-day-entries): Handle :scheduled* and :deadline*.
-       (org-agenda-get-deadlines, org-agenda-get-scheduled): New
-       parameter `with-hour'.  Use `org-deadline-time-hour-regexp' or
+       (org-agenda-get-deadlines, org-agenda-get-scheduled):
+       New parameter `with-hour'.  Use `org-deadline-time-hour-regexp' or
        `org-scheduled-time-hour-regexp' as the search string if needed.
        (org-agenda-to-appt): Use :scheduled* and :deadline* by default,
        as other scheduled and deadline items don't have a time spec and
        cannot be turned into appointments.  Trim bracket links and use
        only the description as the appointment text.
-       (org-agenda-get-restriction-and-command): Add
-       default description for the agenda* view.
+       (org-agenda-get-restriction-and-command):
+       Add default description for the agenda* view.
        (org-agenda-run-series): Handle agenda* views.
 
        * org-faces.el (org-agenda-filter-tags)
        (org-agenda-filter-category): Docstring fix.
        (org-agenda-filter-category): New face.
 
-       * org-agenda.el (org-agenda-local-vars): Add
-       `org-agenda-re-filter-overlays' and `org-agenda-regexp-filter'.
+       * org-agenda.el (org-agenda-local-vars):
+       Add `org-agenda-re-filter-overlays' and `org-agenda-regexp-filter'.
        (org-agenda-mode-map): Use "|" for
        `org-agenda-filtered-by-regexp'.
        (org-agenda-re-filter-overlays): New variable.
-       (org-agenda-mark-filtered-text): Use
-       `org-agenda-re-filter-overlays'.
+       (org-agenda-mark-filtered-text):
+       Use `org-agenda-re-filter-overlays'.
        (org-agenda-finalize, org-agenda-redo): Allow regexp filtering.
        (org-agenda-filter-by-category): Set `org-agenda-category-filter'
        here instead of within `org-agenda-apply-filter'.
        (org-agenda-filter-make-matcher): Make matcher for regexp filters.
        (org-agenda-filter-apply): Don't set `org-agenda-tag-filter' and
        `org-agenda-category-filter'.  Maybe apply regexp filter.
-       (org-agenda-filter-hide-line): Add docstring.  Hide
-       regexp-filtered lines.
+       (org-agenda-filter-hide-line): Add docstring.
+       Hide regexp-filtered lines.
        (org-agenda-filter-show-all-tag, org-agenda-filter-show-all-cat):
        Add docstring.
        (org-agenda-filter-show-all-regexp): New function.
        (org-agenda-regexp-filter-preset): New variable.
        (org-agenda-prepare): Use the new variable.
 
-       * ox-odt.el (org-odt-code, org-odt-verbatim): Use
-       `org-odt--encode-plain-text'.
+       * ox-odt.el (org-odt-code, org-odt-verbatim):
+       Use `org-odt--encode-plain-text'.
 
        * ox-html.el (org-html-link): Minor code clean-up.
 
        a universal prefix arg will only convert the first line.  This is
        more consistent with `org-toggle-item'.
        (orgstruct-setup): Add `org-ctrl-c-minus' and `org-ctrl-c-star'.
-       (customize-package-emacs-version-alist): Update
-       `customize-package-emacs-version-alist'.
+       (customize-package-emacs-version-alist):
+       Update `customize-package-emacs-version-alist'.
 
        * ox-texinfo.el (org-export-texinfo)
        (org-texinfo-filename, org-texinfo-classes)
        docstring.
 
        * ox-latex.el:
-       (org-latex-table-scientific-notation, org-latex-verse-block): Fix
-       typos in docstrings.
+       (org-latex-table-scientific-notation, org-latex-verse-block):
+       Fix typos in docstrings.
 
        * ox-html.el (org-html-text-markup-alist)
        (org-html-pretty-output, org-html-link-org-files-as-html)
        (org-html-format-list-item, org-html-format-latex)
        (org-html-encode-plain-text)
        (org-html-table-first-row-data-cells)
-       (org-html-table--table.el-table, org-html-final-function): Fix
-       or add docstring.
+       (org-html-table--table.el-table, org-html-final-function):
+       Fix or add docstring.
 
        * org.el (org-insert-heading): If the current item has a checkbox,
        insert the new item with a checkbox.
        known as HTML_STYLE_EXTRA.
        (org-html-head): Enhance docstring.
        (org-html-head-extra): Reintroduce.  Was `org-html-style-extra'.
-       (org-html--build-head): Rename from `org-html--build-head'.  Add
-       information from `org-html-head-extra'.
+       (org-html--build-head): Rename from `org-html--build-head'.
+       Add information from `org-html-head-extra'.
        (org-html-template): Use `org-html--build-head'.
 
        * ox-html.el (org-html-display-buffer-mode): Delete.
        (org-insert-heading-respect-content): New optional argument
        arg, passed to `org-insert-heading'.
 
-       * org.el (org-mode): Remove syntax entries.  Use
-       `org-backward-element' and `org-forward-element' for
+       * org.el (org-mode): Remove syntax entries.
+       Use `org-backward-element' and `org-forward-element' for
        `beginning-of-defun-function' and `end-of-defun-function': this
        allows using C-M-a and C-M-e before the first headline.
 
        publishing projects.
 
        * ox-html.el (org-html-style-default): Update docstring.
-       (org-html-infojs-install-script, org-html--build-style): Update
-       property names.
+       (org-html-infojs-install-script, org-html--build-style):
+       Update property names.
        (org-html-head-include-scripts)
        (org-html-head-include-default-style, org-html-head):
        Respectively rename from `org-html-style-include-scripts',
        * ob-tangle.el (org-babel-tangle): Remove unused attempt of
        prompting the user of the tangle file name since :tangle is always
        set.  Don't prompt for a tangle file name when called with two
-       universal prefix arg outside of a src block.  Use
-       `org-babel-tangle-single-block'.
+       universal prefix arg outside of a src block.
+       Use `org-babel-tangle-single-block'.
        (org-babel-tangle-single-block): New function.
        (org-babel-tangle-collect-blocks): Use the new function.
 
        universal prefix arguments, set the warning time or the delay
        relatively to the current timestamp, not to today's date.
 
-       * org-agenda.el (org-agenda-filter-apply): Deactive
-       `org-agenda-entry-text-mode' when filtering.
+       * org-agenda.el (org-agenda-filter-apply):
+       Deactive `org-agenda-entry-text-mode' when filtering.
        (org-agenda-entry-text-mode): Don't allow in filtered views.
        Don't show the maximum number of lines when turning off.
 
        * org-macs.el (org-unmodified): Update comment.  Don't define
        `with-silent-modifications' for emacsen that don't have it.
 
-       * org-compat.el (org-with-silent-modifications): New
-       compatibility macro.
+       * org-compat.el (org-with-silent-modifications):
+       New compatibility macro.
 
        * org.el (org-refresh-category-properties)
        (org-refresh-properties, org-entry-blocked-p)
        * ox-publish.el (org-publish-sitemap-date-format): Small docstring
        enhancement.
 
-       * ox-latex.el (org-latex-format-headline-default-function): New
-       option.
+       * ox-latex.el (org-latex-format-headline-default-function):
+       New option.
        (org-latex-format-headline-function): Use the new option as
        the default value.
        (org-latex-toc-command): Don't add vertical space after the table
        (org-html-htmlized-org-css-url)
        (org-html-htmlize-region-for-paste): Rename from
        org-export-htmlize-*.
-       (org-html-htmlize-generate-css, org-html-fontify-code): Use
-       the correct names.
+       (org-html-htmlize-generate-css, org-html-fontify-code):
+       Use the correct names.
 
        * org-compat.el (org-file-equal-p): New compatibility function.
 
        (org-clock-in, org-clock-out): Set and delete
        `org-clock-current-task'.  Minor code clean-up.
 
-       * org-clock.el (org-clock-in, org-clock-in-last): Tell
-       `org-current-time' to always return a past time.
+       * org-clock.el (org-clock-in, org-clock-in-last):
+       Tell `org-current-time' to always return a past time.
 
        * org.el (org-current-time): New argument `past' to force
        returning a past time when rounding.
        `org-emphasis-alist' word constituents.
        (org-mode-transpose-word-syntax-table): Rename from
        `org-syntax-table'.
-       (org-transpose-words): Use
-       `org-mode-transpose-word-syntax-table'.
+       (org-transpose-words):
+       Use `org-mode-transpose-word-syntax-table'.
 
        * ox.el (org-export--dispatch-ui)
        (org-export--dispatch-action): Use integers for control chars.
        (org-edit-src-exit): Inconditionally kill the src/example
        editing buffer.
 
-       * org-pcomplete.el (pcomplete/org-mode/file-option): Require
-       'org-element.  This fixes a bug about unbound variable
+       * org-pcomplete.el (pcomplete/org-mode/file-option):
+       Require 'org-element.  This fixes a bug about unbound variable
        `org-element-affiliated-keywords' when trying to complete a
        keyword before 'org-element was required.
 
 
        * org.el (org-syntax-table, org-transpose-words): Delete.
        (org-mode): Syntactically Define {} and <> as parentheses.
-       (org-drag-line-forward, org-drag-line-backward): New
-       functions.
+       (org-drag-line-forward, org-drag-line-backward):
+       New functions.
        (org-shiftmetaup, org-shiftmetadown): Fall back on the new
        functions instead of throwing an error.
        (org-make-org-heading-search-string): Don't use statistic or [x/y]
        * org.el (org-emphasis-alist, org-protecting-blocks):
        * org-src.el (org-edit-src-find-region-and-lang):
        * org-list.el (org-list-forbidden-blocks):
-       * org-footnote.el (org-footnote-forbidden-blocks): Remove
-       references to the deleted DocBook exporter.
+       * org-footnote.el (org-footnote-forbidden-blocks):
+       Remove references to the deleted DocBook exporter.
 
        * org.el (org-end-of-line): Don't throw an error outside elements.
 
        (org-transpose-words): New command, simply wrapping the new
        syntax table around `transpose-words'.
        (org-mode-map): Bind `org-transpose-words' to `M-t'.
-       (org-store-link): Use keyword at point as the search string.  Use
-       `delq nil' instead of `delete nil'.
+       (org-store-link): Use keyword at point as the search string.
+       Use `delq nil' instead of `delete nil'.
        (org-make-org-heading-search-string): Rewrite using
        org-element.el.  Not an interactive function anymore.
 
        these list HTML tags: <ul> <dl> and <ol>.
 
        * org-clock.el (org-clock-timestamps-up)
-       (org-clock-timestamps-down, org-clock-timestamps-change): Add
-       an optional argument N to change timestamps by several units.
+       (org-clock-timestamps-down, org-clock-timestamps-change):
+       Add an optional argument N to change timestamps by several units.
 
        * org.el (org-shiftcontrolup, org-shiftcontroldown): Ditto.
 
        * org.el (org-block-entry-blocking): New variable.
        (org-todo): Use it.  Also use `user-error' when a TODO state
        change is blocked.
-       (org-block-todo-from-children-or-siblings-or-parent): Display
-       `org-block-entry-blocking' in the user-error message.
+       (org-block-todo-from-children-or-siblings-or-parent):
+       Display `org-block-entry-blocking' in the user-error message.
 
        * org.el (org-get-cursor-date): New optional argument WITH-TIME to
        add the time of the day.
        (org-use-last-clock-out-time-as-effective-time): New option.
        (org-current-effective-time): Use the new option.
 
-       * org-clock.el (org-clock-get-last-clock-out-time): New
-       function.
+       * org-clock.el (org-clock-get-last-clock-out-time):
+       New function.
 
        * org.el (org-toggle-inline-images): Only send a message when
        called interactively.
        (org-agenda-get-blocks, org-agenda-change-all-lines): Add a
        new text property 'level, a string with as many whitespaces as
        the level of the item.
-       (org-agenda-format-item, org-compile-prefix-format): Handle
-       the new `%l' specifier.
+       (org-agenda-format-item, org-compile-prefix-format):
+       Handle the new `%l' specifier.
 
        * org-colview.el (org-columns-next-allowed-value): Add the
        CLOCKSUM property to the list of properties that can be
        * org-agenda.el (org-agenda-custom-commands-local-options):
        (org-agenda-span, org-agenda-ndays-to-span)
        (org-agenda-span-to-ndays, org-agenda-list, org-agenda-later)
-       (org-agenda-change-time-span, org-agenda-compute-starting-span): Add
-       support for fortnight view.
+       (org-agenda-change-time-span, org-agenda-compute-starting-span):
+       Add support for fortnight view.
        (org-agenda-menu): Add fortnight view command.
        (org-agenda-fortnight-view): New command.
 
        * org-timer.el (org-clock-sound): Silence compiler.
 
-       * org.el (org-beginning-of-line, org-end-of-line): Bind
-       deactivate-mark to avoid that this command deactivates it.
+       * org.el (org-beginning-of-line, org-end-of-line):
+       Bind deactivate-mark to avoid that this command deactivates it.
        (org-make-tags-matcher): Do not interpret / in property value as
        starter of TODO match.
        (org-overview): Preserve point.
 
        * org.el (org-unlogged-message): New function.
        (org-cycle, org-cycle-internal-global, org-cycle-internal-local)
-       (org-global-cycle, org-display-outline-path): Use
-       `org-unlogged-message'.
+       (org-global-cycle, org-display-outline-path):
+       Use `org-unlogged-message'.
 
-       * org-pcomplete.el (org-make-org-heading-search-string): Fix
-       function declaration.
+       * org-pcomplete.el (org-make-org-heading-search-string):
+       Fix function declaration.
        (pcomplete/org-mode/searchhead): Remove incorrect second arguments
        to `org-make-org-heading-search-string'.
 
        (org-display-outline-path): Do not log outline path in Message
        buffer.
        (org-agenda-ignore-drawer-properties): New option.
-       (org-agenda-prepare-buffers): Honour
-       `org-agenda-ignore-drawer-properties'.
+       (org-agenda-prepare-buffers):
+       Honour `org-agenda-ignore-drawer-properties'.
 
        * org-clock.el (org-clock-goto): Recenter to thrd line
 
        (org-set-regexps-and-options-for-tags): Use `org-bookmark-names-plist'.
        (org-refile): Use `org-bookmark-names-plist'.
 
-       * org-capture.el (org-capture-bookmark-last-stored-position): Use
-       `org-bookmark-names-plist'.
+       * org-capture.el (org-capture-bookmark-last-stored-position):
+       Use `org-bookmark-names-plist'.
 
        * org.el (org-insert-heading): Rewritten from scratch.
        (org-N-empty-lines-before-current): New function
 
        * org-ctags.el (org-ctags-path-to-ctags): Avoid usine `case'.
 
-       * org.el (org-beginning-of-line, org-end-of-line): Set
-       disable-point-adjustment when the command ends next to invisible
+       * org.el (org-beginning-of-line, org-end-of-line):
+       Set disable-point-adjustment when the command ends next to invisible
        text.
 
        * ob-lob.el (org-babel-lob-files): Fix custom type.
 
 2013-11-12  Christian Moe  <mail@christianmoe.com>
 
-       * ox-odt.el (org-odt-line-break, org-odt-plain-text): Remove
-       newline after line-break tag.
+       * ox-odt.el (org-odt-line-break, org-odt-plain-text):
+       Remove newline after line-break tag.
 
 2013-11-12  Christophe Junke  <christophe.junke@inria.fr>  (tiny change)
 
        property.
        (org-heading-components): Use `org-heading-regexp' in
        orgstruct-mode.
-       (orgstruct-heading-prefix-regexp, orgstruct-setup-hook): New
-       options.
+       (orgstruct-heading-prefix-regexp, orgstruct-setup-hook):
+       New options.
        (orgstruct-initialized): New variable.
        (org-get-local-variables): Honour state property.
        (org-run-like-in-org-mode): Use `let' instead of `progv'.  Do not
        override variables with non-default values.
        (org-forward-heading-same-level): Do not skip to headlines on
        another level.  Handle negative prefix argument correctly.
-       (org-backward-heading-same-level): Use
-       `org-forward-heading-same-level'.
+       (org-backward-heading-same-level):
+       Use `org-forward-heading-same-level'.
 
 2013-11-12  Craig Tanis  <craig-tanis@utc.edu>  (tiny change)
 
 
        * ox-html.el (org-html-doctype-alist): New variable holding an
        alist of (X)HTML doctypes
-       (org-html-xhtml-p, org-html-html5-p, org-html-close-tag): New
-       function.
+       (org-html-xhtml-p, org-html-html5-p, org-html-close-tag):
+       New function.
        (org-html-html5-fancy): New export option, determining whether or
        not to use HTML5-specific elements.
        (org-html-html5-elements): New variable, new HTML5 elements.
        (org-html-format-list-item, org-html-line-break, org-html-table)
        (org-html-verse-block): Changes to allow flavored export.
 
-       * ox-latex.el (org-latex--org-table, org-latex-table-row): Allow
-       use of the "tabu" and "longtabu" table environments.  New table
+       * ox-latex.el (org-latex--org-table, org-latex-table-row):
+       Allow use of the "tabu" and "longtabu" table environments.  New table
        attribute :spread handles the width specification syntax of "tabu"
        and "longtabu" table environments.
 
        * ob-sh.el (org-babel-sh-evaluate):
        * ob-shen.el (org-babel-execute:shen):
        * ob-sql.el (org-babel-execute:sql):
-       * ob-sqlite.el (org-babel-execute:sqlite): Use
-       `org-babel-result-cond'.
+       * ob-sqlite.el (org-babel-execute:sqlite):
+       Use `org-babel-result-cond'.
 
        * ob.el (org-babel-common-header-args-w-values): Add a new "none"
        header argument.
        :padnewlines to "yes".  Either way lets just remove this which
        shouldn't have any functional effect.
 
-       * ob-haskell.el (org-babel-default-header-args:haskell): Set
-       :padlines to "no" by default.
+       * ob-haskell.el (org-babel-default-header-args:haskell):
+       Set :padlines to "no" by default.
 
        * ob-exp.el (org-babel-exp-non-block-elements): Ignore inline
        source block on #+ prefixed lines.
        * ob-sh.el (org-babel-sh-var-to-string): Fix bug in ob-sh when
        dealing with list variables.
 
-       * ob-core.el (org-babel-demarcate-block): Include
-       `org-src-lang-modes' in block demarcation options.
+       * ob-core.el (org-babel-demarcate-block):
+       Include `org-src-lang-modes' in block demarcation options.
 
        * ob-C.el: Don't modify `org-babel-load-languages' from ob-*
        files.
        * ob-gnuplot.el (org-babel-header-args:gnuplot): Term is a gnuplot
        header argument.
 
-       * ob-tangle.el (org-babel-tangle): Fixed bug in tangle-file.
+       * ob-tangle.el (org-babel-tangle): Fix bug in tangle-file.
        Collect tangle modes, and only apply them to the file after all
        tangling has completed, including the post-tangle-hook.
 
        * ob-core.el (org-babel-current-src-block-location):
        (org-babel-execute-src-block):
        * ob-exp.el (org-babel-exp-results):
-       * ob-lob.el (org-babel-lob-execute): Rename
-       `org-babel-current-exec-src-block-head' to
+       * ob-lob.el (org-babel-lob-execute):
+       Rename `org-babel-current-exec-src-block-head' to
        `org-babel-current-src-block-location'.
 
        * ob-core.el (org-babel-common-header-args-w-values): Adding the
        `org-babel-current-exec-src-block-head' variable when executing
        inline or lob style code.
 
-       * ob-core.el (org-babel-execute-src-block): The
-       `org-babel-current-exec-src-block-head' variable should point to
+       * ob-core.el (org-babel-execute-src-block):
+       The `org-babel-current-exec-src-block-head' variable should point to
        the outermost code block.
 
        * org.el (org-some): An org-mode version of the cl some function.
        * org.el (org-every): An Org-mode version of the cl every
        function.
 
-       * ob-tangle.el (org-babel-tangle-jump-to-org): Use
-       `org-src-switch-to-buffer' to jump from src to org.  Use the
+       * ob-tangle.el (org-babel-tangle-jump-to-org):
+       Use `org-src-switch-to-buffer' to jump from src to org.  Use the
        existing `org-edit-src' functionality to jump back to the correct
        point in the code block in the original Org-mode buffer.
 
        * ob-js.el (org-babel-execute:js): Use `org-babel-result-cond' in
        JavaScript code blocks.
 
-       * ob-scheme.el (org-babel-execute:scheme): Use
-       `org-babel-result-cond' in scheme code blocks.
+       * ob-scheme.el (org-babel-execute:scheme):
+       Use `org-babel-result-cond' in scheme code blocks.
 
-       * ob-ocaml.el (org-babel-execute:ocaml): Use
-       `org-babel-result-cond' in OCaml code blocks.
+       * ob-ocaml.el (org-babel-execute:ocaml):
+       Use `org-babel-result-cond' in OCaml code blocks.
 
-       * ob-haskell.el (org-babel-execute:haskell): Use
-       `org-babel-result-cond' in Haskell code blocks.
+       * ob-haskell.el (org-babel-execute:haskell):
+       Use `org-babel-result-cond' in Haskell code blocks.
 
        * ob-core.el (org-babel-result-cond): The "raw", "org" and
        "drawer" :results header argument values preclude table processing
        (org-babel-insert-result): Cycle tables for :results org and
        :results wrap.
 
-       * ob-python.el (org-babel-python-initiate-session-by-key): Fixed a
+       * ob-python.el (org-babel-python-initiate-session-by-key): Fix a
        bug pointed out by Gary Oberbrunner.
        (org-babel-python-initiate-session-by-key): Add "-i" to the python
        command on windows sessions.  Actually setting new session names.
        (org-babel-confirm-evaluate): Fix whitespaces.
        (org-babel-execute-src-block): A cond makes it more clear that we
        definitely do not execute without user confirmation.
-       (org-babel-call-process-region-original): Fixed line over 80 chars
+       (org-babel-call-process-region-original): Fix line over 80 chars
        long.
 
        * ob-tangle.el (org-babel-tangle-collect-blocks): Update comment
        * ox-html.el (org-html-latex-environment)
        (org-html-latex-fragment): Fix imagemagick support.
 
-       * org.el (org-create-formula-image-with-imagemagick): Generate
-       correct size formula image.
+       * org.el (org-create-formula-image-with-imagemagick):
+       Generate correct size formula image.
        (org-format-latex-header): Change pagestyle command position.
 
        * ox-latex.el (org-latex--caption/label-string): Allow to build a
 
        * org.el (org-reftex-citation): Fix contrib package name in the
        docstring.
-       (org-preview-latex-fragment, org-display-inline-images): Detect
-       whether a graphic display is available before inlining images to
+       (org-preview-latex-fragment, org-display-inline-images):
+       Detect whether a graphic display is available before inlining images to
        prevent an error.
        (org-startup-with-latex-preview): New option.
        (org-startup-options): New startup keywords for the new option.
        (org-reverse-string): Add `org-reverse-string' to reverse a
        string.
 
-       * org-id.el (org-id-new, org-id-decode): Replace
-       `org-id-reverse-string' by `org-reverse-string'.
+       * org-id.el (org-id-new, org-id-decode):
+       Replace `org-id-reverse-string' by `org-reverse-string'.
 
        * ob-core.el (org-babel-trim): Replace `org-babel-reverse-string'
        by `org-reverse-string' and declare it.
        * ox-md.el: Remove comments at the beginning of the file since
        the library is documented in Org manual.
 
-       * org-element.el (org-element--list-struct): Use
-       `org-match-string-no-properties'.  Fix block parsing in lists.
+       * org-element.el (org-element--list-struct):
+       Use `org-match-string-no-properties'.  Fix block parsing in lists.
 
        * ox-publish.el (org-publish-all): Fix compilation problem.
 
-       * org-element.el (org-element-timestamp-interpreter): Correctly
-       interpret timestamps with delays.
+       * org-element.el (org-element-timestamp-interpreter):
+       Correctly interpret timestamps with delays.
        (org-element-timestamp-parser)
        (org-element-timestamp-interpreter): Parse warning delays.
 
        Fix infloop when called on a blank line at the end of the buffer
        after a headline.
 
-       * org.el (org-forward-paragraph, org-backward-paragraph): New
-       functions.
+       * org.el (org-forward-paragraph, org-backward-paragraph):
+       New functions.
 
        * org.el (org-meta-return): Allow M-RET to insert items within
        drawers.  Rewrite function.
 
-       * org-element.el (org-element-footnote-definition-parser): Fix
-       value for :contents-begin when first line of footnote definition
+       * org-element.el (org-element-footnote-definition-parser):
+       Fix value for :contents-begin when first line of footnote definition
        is empty besides the label.
        (org-element-at-point): Return correct element when point is on a
        blank line just below a headline.
-       (org-element-paragraph-parser): Use
-       `org-match-string-no-properties'.  Small fixes to paragraph
+       (org-element-paragraph-parser):
+       Use `org-match-string-no-properties'.  Small fixes to paragraph
        parsing.
 
        * org.el (org-adaptive-fill-function): Do not handle
 
        * ox-publish.el (project-plist): Remove variable.
 
-       * ox.el (org-export-to-buffer, org-export-to-file): Fix
-       docstrings.
+       * ox.el (org-export-to-buffer, org-export-to-file):
+       Fix docstrings.
 
        * ox-org.el (org-export-as-org): Add missing BODY-ONLY argument,
        which is always nil in this back-end.
        (org-export--dispatch-action): Maintain compatibility with Emacs
        23.
 
-       * org.el (org-adaptive-fill-function, org-fill-paragraph): Add
-       support for `adaptive-fill-regexp' in paragraphs and comments.
+       * org.el (org-adaptive-fill-function, org-fill-paragraph):
+       Add support for `adaptive-fill-regexp' in paragraphs and comments.
        (org-indent-line): Fix indentation after a list.
 
        * ox.el (org-export--get-inbuffer-options): Multiple options can
        * ox-latex.el (org-latex-template): Fix missing newlines in
        header.
 
-       * ox.el (org-export-insert-default-template): Fix
-       "wrong-type-argument" error in template insertion.
+       * ox.el (org-export-insert-default-template):
+       Fix "wrong-type-argument" error in template insertion.
 
        * org.el (org-fill-paragraph): Use empty commented lines as
        separators when filling comments.  This mimics default behavior
 
        * ox-latex.el (org-latex-listings): Update docstring.
 
-       * org-pcomplete.el (pcomplete/org-mode/file-option/options): Apply
-       changes to export back-end definiton.
+       * org-pcomplete.el (pcomplete/org-mode/file-option/options):
+       Apply changes to export back-end definiton.
 
        * org.el (org-get-export-keywords): Apply changes to export
        back-end definiton.
        (org-odt-format-headline--wrap): Use `org-export-with-backend'
        instead of `org-export-with-translations'.
 
-       * ox.el (org-export--registered-backends): Renamed from
+       * ox.el (org-export--registered-backends): Rename from
        `org-export-registered-backends'.
-       (org-export-invisible-backends): Removed variable.
+       (org-export-invisible-backends): Remove variable.
        (org-export-get-backend, org-export-get-all-transcoders
-       org-export-get-all-options, org-export-get-all-filters): New
-       functions.  It replaces `org-export-backend-translate-table'.
+       org-export-get-all-options, org-export-get-all-filters):
+       New functions.  It replaces `org-export-backend-translate-table'.
        (org-export-barf-if-invalid-backend, org-export-derived-backend-p,
        org-export-define-backend, org-export-define-derived-backend):
        Rewrite functions using new representation.
        org-export--get-inbuffer-options, org-export--get-global-options,
        org-export-to-buffer org-export-to-file, org-export-string-as
        org-export-replace-region-by): Update docstring.
-       (org-export-data-with-translations): Remove function.  Use
-       `org-export-data-with-backend' with a temporary back-end instead.
+       (org-export-data-with-translations): Remove function.
+       Use `org-export-data-with-backend' with a temporary back-end instead.
        (org-export-data-with-backend, org-export-as): Reflect new definition
        for back-ends.
        (org-export--dispatch-action, org-export--dispatch-ui): Reflect new
 
        * ox-html.el (org-html-link): Small refactoring.
 
-       * org-element.el (org-element--current-element): Fix
-       org-meta-return error at the end of buffer.
+       * org-element.el (org-element--current-element):
+       Fix org-meta-return error at the end of buffer.
 
        * ox-odt.el (org-odt-category-map-alist): Fix internationalization
        of "Table" and "Listing".
        (org-latex-long-listings): Remove variable.
 
        * org-element.el (org-element--list-struct): New function.
-       (org-element-plain-list-parser, org-element--current-element): Use
-       new function.
+       (org-element-plain-list-parser, org-element--current-element):
+       Use new function.
 
        * ox-man.el (org-man-compile):
        * ox-texinfo.el (org-texinfo-compile): Use appropriate argument.
 
        * ox-md.el (md): Delegate underscore transcoding to HTML back-end.
 
-       * org-element.el (org-element--remove-indentation): Small
-       optimization.
+       * org-element.el (org-element--remove-indentation):
+       Small optimization.
        (org-element--remove-indentation): New function.
        (org-element-example-block-parser, org-element-src-block-parser):
        Use new function.
        `org-list-allow-alphabetical' when changed after org.el has been
        loaded.
 
-       * org-element.el (org-element-fixed-width-interpreter): Fix
-       interpretation of fixed-width elements with a nil or empty string
+       * org-element.el (org-element-fixed-width-interpreter):
+       Fix interpretation of fixed-width elements with a nil or empty string
        value.
 
        * ox-html.el (org-html-link): Don't skip the link description when
        * ox-icalendar.el (icalendar): Ignore footnotes.
        (org-icalendar--combine-files): Small refactoring.
 
-       * ox.el (org-export--skip-p, org-export--interpret-p): When
-       `org-export-with-footnotes' is nil, ignore completely footnotes
+       * ox.el (org-export--skip-p, org-export--interpret-p):
+       When `org-export-with-footnotes' is nil, ignore completely footnotes
        references and definitions instead of exporting them verbatim.
 
        * ox-beamer.el (org-beamer--frame-level): Small refactoring.
        * ox-html.el (html): Rename :html-table-tag property into
        :org-table-attributes.
        (org-html-table-default-attributes): New variable.
-       (org-html-table-tag): Removed variable.
+       (org-html-table-tag): Remove variable.
        (org-html--make-attribute-string): New function.
        (org-html-link--inline-image, org-html-table): Use new function.
-       (org-html-splice-attributes, org-export-splice-style): Remove
-       functions.
+       (org-html-splice-attributes, org-export-splice-style):
+       Remove functions.
        (org-html-inline-image-rules): Remove out of context part of the
        docstring.
 
        (org-export-with-sub-superscripts, org-export-with-toc)
        (org-export-with-tables, org-export-with-tags)
        (org-export-with-tasks, org-export-time-stamp-file)
-       (org-export-with-timestamps, org-export-with-todo-keywords): Fix
-       docstrings.
+       (org-export-with-timestamps, org-export-with-todo-keywords):
+       Fix docstrings.
 
        * ox-html.el (org-html-postamble-format): Slightly change default
        value so "Generated by" string doesn't get duplicated.
        (org-export--dispatch-ui, org-export--dispatch-action): Access to
        the function through the dispatcher.
 
-       * ox-icalendar.el (org-icalendar-convert-timestamp): Update
-       docstring.
+       * ox-icalendar.el (org-icalendar-convert-timestamp):
+       Update docstring.
        (org-icalendar-dtstamp): New function.
        (org-icalendar--vevent, org-icalendar--vtodo): Use new function.
 
        (org-macro-initialize-templates): Apply signature change from function
        above.
 
-       * ox.el (org-export--list-bound-variables): Renamed from
+       * ox.el (org-export--list-bound-variables): Rename from
        `org-export--install-letbind-maybe'.  Though, only return list of
        bound variables instead of installing them as buffer-local
        variables.
        * ox-man.el (org-man-table--org-table): Use new attribute syntax.
        Small refactoring.
 
-       * ox-odt.el (org-odt-link--inline-image, org-odt-table-cell): Use
-       new attribute syntax.
+       * ox-odt.el (org-odt-link--inline-image, org-odt-table-cell):
+       Use new attribute syntax.
 
        * ox.el (org-export-async-start): Remove code evaluation queries
        from asynchronous export.
        * ox-latex.el (org-latex-inline-image-rules)
        (org-latex-default-table-environment)
        (org-latex-default-table-mode, org-latex-tables-booktabs)
-       (org-latex-table-scientific-notation, org-latex-known-errors): Add
-       :version and :package-version.
+       (org-latex-table-scientific-notation, org-latex-known-errors):
+       Add :version and :package-version.
 
        * ox-md.el (org-md-headline-style): Add :version and
        :package-version.
        * ox.el (org-export-with-drawers, org-export-with-latex)
        (org-export-with-inlinetasks, org-export-with-planning)
        (org-export-with-smart-quotes, org-export-with-statistics-cookies)
-       (org-export-allow-bind-keywords, org-export-async-init-file): Add
-       :version and :package-version.
+       (org-export-allow-bind-keywords, org-export-async-init-file):
+       Add :version and :package-version.
 
        * ox-icalendar.el (org-icalendar-export-to-ics): Change back-end
        name from `e-ascii' to `ascii'.
        * org.el (org-fill-paragraph): Small refactoring to
        `org-fill-paragraph'.  Do not look for table cells in a paragraph.
 
-       * org-element.el (org-element-object-restrictions): Simplify
-       restrictions within secondary strings and objects.
+       * org-element.el (org-element-object-restrictions):
+       Simplify restrictions within secondary strings and objects.
 
        * org-list.el (org-list-send-list): Do not rely on
        `org-list-parse-list'.
-       (org-list-to-latex, org-list-to-html, org-list-to-texinfo): Use
-       appropriate export back-end instead of using
+       (org-list-to-latex, org-list-to-html, org-list-to-texinfo):
+       Use appropriate export back-end instead of using
        `org-list-to-generic'.
 
        * ox-html.el (org-html-inner-template): Remove contents div and
        (org-icalendar-export-current-agenda): Integrate previous
        functions.
 
-       * ox-latex.el (org-latex-format-headline-default-function): Use
-       declarative shape to nest makup for TODO keywords.  Previous
-       syntax generated errors during export.
+       * ox-latex.el (org-latex-format-headline-default-function):
+       Use declarative shape to nest makup for TODO keywords.
+       Previous syntax generated errors during export.
 
        * ox.el (org-export-async-start): Ignore `org-mode-hook' and
        `kill-emacs-hook'.  The first one has been run in the original
        computing minimal headline level.
 
        * org.el (org-do-latex-and-related): Fix infloop when user
-       provides a wrong value for `org-highlight-latex-and-related'.  In
-       this case, `org-latex-and-related-regexp' is the empty string and
+       provides a wrong value for `org-highlight-latex-and-related'.
+       In this case, `org-latex-and-related-regexp' is the empty string and
        generates an infloop since matching it doesn't move point.
 
-       * org-element.el (org-element-headline-parser): Rename
-       :optional-title into :alt-title.
+       * org-element.el (org-element-headline-parser):
+       Rename :optional-title into :alt-title.
 
-       * ox.el (org-export-get-alt-title): Renamed from
+       * ox.el (org-export-get-alt-title): Rename from
        `org-export-get-optional-title'.
 
        * ox-ascii.el (org-ascii--build-title):
        * ox-latex.el (org-latex-compile): Add an optional argument for
        latex snippet previewing.
 
-       * org.el (org-create-formula-image-with-imagemagick): Use
-       `org-latex-compile' instead of rewriting it.
+       * org.el (org-create-formula-image-with-imagemagick):
+       Use `org-latex-compile' instead of rewriting it.
 
        * ox-html.el (org-html-fontify-code): Do not use [^\000] in
        regexps that may match large strings.
        (org-element-plain-link-successor): New function.
 
        * org.el (org-match-substring-regexp)
-       (org-match-substring-with-braces-regexp): Update regexp.  A
-       sub/superscript cannot start anymore at the beginning of the line
+       (org-match-substring-with-braces-regexp): Update regexp.
+       sub/superscript cannot start anymore at the beginning of the line
        or after a space.
 
        * org-element.el (org-element--get-next-object-candidates):
 
        * ox-html.el (org-html--format-toc-headline): Fix function name.
        (org-html-toc, org-html--toc-text): Change to docstring.
-       (org-html-list-of-listings, org-html-list-of-tables): New
-       functions.
+       (org-html-list-of-listings, org-html-list-of-tables):
+       New functions.
        (org-html-keyword): Use new functions.
        (org-html-src-block): Add an ID attribute when a name is given.
 
-       * org-element.el (org-element-footnote-definition-parser): Require
-       2 blank lines to separate footnote definition.
+       * org-element.el (org-element-footnote-definition-parser):
+       Require 2 blank lines to separate footnote definition.
 
        * org-footnote.el (org-footnote-at-definition-p): Require 2 blank
        lines to separate footnote definition.
        (org-export-stack-refresh): Refactor.
        (org-export-stack-remove, org-export-stack-view): Apply renaming.
        (org-export-stack-mode-map): Use tabulated list map as a basis.
-       (org-export-stack--generate, org-export-stack--num-predicate): New
-       function.
+       (org-export-stack--generate, org-export-stack--num-predicate):
+       New function.
        (org-export-get-optional-title): Return regular title when no
        optional title is found.
 
        * ox-latex.el (org-latex-headline): Apply change to
        `org-export-get-optional-title'.
 
-       * ox-ascii.el (org-ascii--build-title): Add an argument.  Use
-       optional title when building a toc line.
+       * ox-ascii.el (org-ascii--build-title): Add an argument.
+       Use optional title when building a toc line.
        (org-ascii--build-toc): Call `org-ascii--build-title' with
        appropriate arguments.
 
        * ox-latex.el (org-latex-headline): Use optional title for table
        of contents.
 
-       * ox-html.el (org-html--toc-text): Renamed from
+       * ox-html.el (org-html--toc-text): Rename from
        `org-html-toc-text'.  Add docstring.
-       (org-html--format-toc-headline): Renamed from
+       (org-html--format-toc-headline): Rename from
        `org-html-format-toc-headline'.  Add docstring.  Use optional
        title if possible.
        (org-html-toc): Add docstring.
 
        * ox.el (org-export-get-optional-title): New function.
 
-       * ox-latex.el (org-latex-format-headline-default-function): Make
-       the variable a function.
+       * ox-latex.el (org-latex-format-headline-default-function):
+       Make the variable a function.
 
-       * ox-publish.el (org-publish-resolve-external-fuzzy-link): No
-       error when resolving external fuzzy links outside publishing.
+       * ox-publish.el (org-publish-resolve-external-fuzzy-link):
+       No error when resolving external fuzzy links outside publishing.
        Though search option for these links will not be resolved.
 
        * ox-latex.el (org-latex-guess-inputenc): Set inputenc option
        according to `org-export-coding-system'.
 
-       * ox.el (org-export--generate-copy-script): Clone
-       `buffer-file-coding-system' when creating a buffer copy.
+       * ox.el (org-export--generate-copy-script):
+       Clone `buffer-file-coding-system' when creating a buffer copy.
 
        * ox-html.el (org-html-link): Resolve external links with search
        options like [[file.org::#custom-id]] or
 
        * ox-latex.el (org-latex-property-drawer): Remove function.
 
-       * ox-ascii.el (org-ascii-filter-paragraph-spacing): Remove
-       reference to now renamed `e-ascii' back-end.
+       * ox-ascii.el (org-ascii-filter-paragraph-spacing):
+       Remove reference to now renamed `e-ascii' back-end.
 
        * ox-beamer.el (org-beamer-template): Allow to span documentclass
        options accross multiple lines in template.
        * org-element.el (org-element-map): Allow to map over any list.
        Do not restrict mapping to object types.
 
-       * org-faces.el (org-latex-and-related): Renamed from
+       * org-faces.el (org-latex-and-related): Rename from
        `org-latex-and-export-specials', which wasn't appropriate anymore.
 
        * org.el (org-highlight-latex-and-related)
        (org-latex-and-related-regexp): New variables.
-       (org-compute-latex-and-related-regexp, org-do-latex-and-related): New
-       function, revived from a previous commit.
+       (org-compute-latex-and-related-regexp, org-do-latex-and-related):
+       New function, revived from a previous commit.
        (org-set-regexps-and-options, org-set-font-lock-defaults): Use new
        functions.
        (org-set-regexps-and-options): Remove reference to LATEX_CLASS and
        * org-element.el (org-element-link-parser): Do not remove newlines
        characters in paths anymore, since this is not required.
 
-       * ox.el (org-export--dispatch-ui): Renamed from
+       * ox.el (org-export--dispatch-ui): Rename from
        `org-export-dispatch-ui'.  Handle scrolling.
-       (org-export--dispatch-action): Renamed from
+       (org-export--dispatch-action): Rename from
        `org-export-dispatch-action'.  Implement scrolling.
        (org-export-dispatch): Apply renaming.
 
 
        * ox.el (org-export-stack-mode): Fix docstring.
 
-       * org-pcomplete.el (pcomplete/org-mode/file-option): Allow
-       completion for ATTR_ prefixed keywords.
+       * org-pcomplete.el (pcomplete/org-mode/file-option):
+       Allow completion for ATTR_ prefixed keywords.
 
        * org.el (org-options-keywords): Add missing colons.
 
-       * org-macs.el (org-default-options): Removed function.
+       * org-macs.el (org-default-options): Remove function.
 
        * org-pcomplete.el (org-command-at-point): Fix bug with some file
        options.
-       (pcomplete/org-mode/file-option/x): Removed macro.
+       (pcomplete/org-mode/file-option/x): Remove macro.
        (pcomplete/org-mode/file-option): Refactor code.
        (pcomplete/org-mode/file-option/author)
        (pcomplete/org-mode/file-option/date)
 
        * ox-ascii.el (org-ascii-inner-template): New function.
        (org-ascii-template): Use new function.
-       (org-ascii-export-as-ascii, org-ascii-export-to-ascii): Update
-       docstring.
+       (org-ascii-export-as-ascii, org-ascii-export-to-ascii):
+       Update docstring.
 
        * org-element.el (org-element-link-parser): Take into
        consideration links filled and indented.
        * org-element.el (org-element-nested-p): Do not inline function.
 
        * ox.el (org-export-copy-buffer, org-export-with-buffer-copy)
-       (org-export--generate-copy-script): Moved earlier in the file.
+       (org-export--generate-copy-script): Move earlier in the file.
 
        * ox-texinfo.el (org-texinfo-link): Do not transform path part of
        internal links.
        required in the external process.
 
        * org.el (org-format-latex-header-extra, org-export-have-math):
-       Removed variables.
-       (org-latex-default-packages-alist): Renamed from
+       Remove variables.
+       (org-latex-default-packages-alist): Rename from
        `org-export-latex-default-packages-alist'.
-       (org-latex-packages-alist): Renamed from
+       (org-latex-packages-alist): Rename from
        `org-export-latex-packages-alist'.
        (org-try-cdlatex-tab, org-cdlatex-underscore-caret,
        org-cdlatex-math-modify): Reorder in file.
 
        * org-entities.el (org-entities-user): Update docstring.
 
-       * ox-latex.el (org-latex-classes, org-latex-listings): Update
-       docstring.
-       (org-latex-guess-inputenc): Renamed from `org-latex--guess-inputenc'.
-       (org-latex-guess-babel-language): Renamed from
+       * ox-latex.el (org-latex-classes, org-latex-listings):
+       Update docstring.
+       (org-latex-guess-inputenc): Rename from `org-latex--guess-inputenc'.
+       (org-latex-guess-babel-language): Rename from
        `org-latex--guess-babel-language'.
        (org-latex-template): Apply renaming.
 
        copying it.
 
        * org-macs.el (org-if-unprotected, org-if-unprotected-1)
-       (org-if-unprotected-at): Removed macros.
-       (org-re-search-forward-unprotected): Removed function.
+       (org-if-unprotected-at): Remove macros.
+       (org-re-search-forward-unprotected): Remove function.
 
        * org.el (org-format-latex):
        * org-list.el (org-list-struct):
        * org-capture.el (org-capture-fill-template): Remove reference to
        `org-protected'.
 
-       * ob-exp.el (org-babel-exp-process-buffer): Renamed from
+       * ob-exp.el (org-babel-exp-process-buffer): Rename from
        `org-export-blocks-preprocess'.
 
        * ox.el (org-export-execute-babel-code): Apply previous renaming.
        framework.
        (pcomplete/org-mode/file-option/options): Rewrite using new export
        framework.  Only complete up to the colon.
-       (pcomplete/org-mode/file-option/x): Removed macro.
+       (pcomplete/org-mode/file-option/x): Remove macro.
        (pcomplete/org-mode/file-option/title)
        (pcomplete/org-mode/file-option/author)
        (pcomplete/org-mode/file-option/email)
-       (pcomplete/org-mode/file-option/date): Removed functions.
+       (pcomplete/org-mode/file-option/date): Remove functions.
        (pcomplete/org-mode/file-option/infojs_opt): New function.
 
        * org-clock.el (org-clocktable-defaults)
        function.
 
        * org-inlinetask.el (org-inlinetask-export)
-       (org-inlinetask-export-templates): Removed variables.
-       (org-inlinetask-export-handler): Removed function.
+       (org-inlinetask-export-templates): Remove variables.
+       (org-inlinetask-export-handler): Remove function.
 
        * org-plot.el: Remove dependency on `org-exp' library.
 
        * org-agenda.el (org-agenda-menu, org-agenda-write): Use new
        iCalendar export back-end.
 
-       * org-table.el (org-table-export, orgtbl-export): Remove
-       dependency on `org-exp' library.
+       * org-table.el (org-table-export, orgtbl-export):
+       Remove dependency on `org-exp' library.
        (org-table-clean-before-export): New function.
        (org-table-colgroup-info): New variable.
        (orgtbl-to-html): Use to new HTML export back-end.
        Elements.
 
        * org-element.el (org-element-at-point): When point is before any
-       element, in the first blank lines of the buffer, return nil.  When
-       point is within blank lines just after a headline, return that
+       element, in the first blank lines of the buffer, return nil.
+       When point is within blank lines just after a headline, return that
        headline.
        (org-element-context): Return nil when point is within the blank at
        the beginning of the buffer.
 
        * org.el (org-edit-special): Fix regression.
        (org-timestamp-has-time-p, org-timestamp-format)
-       (org-timestamp-split-range, org-timestamp-translate): New
-       functions.
+       (org-timestamp-split-range, org-timestamp-translate):
+       New functions.
 
-       * org-element.el (org-element-timestamp-interpreter): Interpret
-       timestamps ranges with repeaters.
+       * org-element.el (org-element-timestamp-interpreter):
+       Interpret timestamps ranges with repeaters.
 
        * org.el (org-edit-special): Rewrite `org-edit-special' using Org
        Elements tools.  Behavior should be unchanged.
        * org.el (org-all-targets): Fix radio targets detection when
        object is directly followed by a non-whitespace character.
 
-       * ob.el (org-babel-use-quick-and-dirty-noweb-expansion): Renamed
-       from `org-babel-use-quick-and-dirty-noweb-expansion'.
+       * ob.el (org-babel-use-quick-and-dirty-noweb-expansion):
+       Rename from `org-babel-use-quick-and-dirty-noweb-expansion'.
        (org-babel-expand-noweb-references): Use new variable name.
 
-       * org-element.el (org-element-timestamp-interpreter): Fix
-       timestamp interpreter when raw value isn't available.
+       * org-element.el (org-element-timestamp-interpreter):
+       Fix timestamp interpreter when raw value isn't available.
 
        * ob-exp.el (org-babel-exp-non-block-elements): Make sure to parse
        inline babel call or inline src block instead of the following
        (org-element-horizontal-rule-parser, org-element-keyword-parser)
        (org-element-latex-environment-parser)
        (org-element-paragraph-parser, org-element-src-block-parser)
-       (org-element-table-parser, org-element-verse-block-parser): Add
-       `:post-affiliated' property to elements.
+       (org-element-table-parser, org-element-verse-block-parser):
+       Add `:post-affiliated' property to elements.
        (org-element-inlinetask-parser): Remove affilated keywords.
 
        * org.el (org-adaptive-fill-function): Use new property.
        (org-element--current-element): Tiny refactoring.
 
        * ob.el (org-babel-where-is-src-block-result): Insert new results
-       keyword in current narrowed part of buffer, if necessary.  Small
-       refactoring.
+       keyword in current narrowed part of buffer, if necessary.
+       Small refactoring.
        (org-babel-insert-result): Do not widen buffer when new results have
        to be inserted.  Therefore, results inserted after the last block of
        a narrowed buffer still belong to the narrowed part of the buffer.
        (org-element-diary-sexp-parser)
        (org-element-diary-sexp-interpreter): New functions.
        (org-element-horizontal-rule-parser)
-       (org-element-keyword-parser, org-element--current-element): Small
-       refactoring.
+       (org-element-keyword-parser, org-element--current-element):
+       Small refactoring.
        (org-element-property): Access to text properties when argument is
        a string.
        (org-element-put-property): Correctly set property when target is
 
        * org.el (org-all-targets): Make sure the regexp really matched a
        radio target.
-       (org-macro-expand, org-macro-replace-all): Change signature.  The
-       function now accepts an alist of templates so it doesn't have to
+       (org-macro-expand, org-macro-replace-all): Change signature.
+       The function now accepts an alist of templates so it doesn't have to
        rely only on `org-macro-templates'.
        (org-macro-initialize-templates): {{{date}}} is not anymore an
        alias for {{{time}}}.  During export, it will provide the value
        * org-exp-blocks.el: Delete.
 
        * ob-exp.el (org-export-blocks-preprocess):
-       * ob-ditaa.el (org-ditaa-jar-path): Moved from
+       * ob-ditaa.el (org-ditaa-jar-path): Move from
        "org-export-blocks.el".
 
        * ob-exp.el (org-babel-exp-src-block): Remove unused argument.
        (org-babel-exp-non-block-elements): Rewrite function using Org
        Element.
 
-       * org-exp-blocks.el (org-export-blocks-preprocess): Rewrite
-       function using Org Element.
+       * org-exp-blocks.el (org-export-blocks-preprocess):
+       Rewrite function using Org Element.
 
        * org-element.el (org-element-recursive-objects)
        (org-element-object-restrictions): Remove `macro' from recursive
        same style.  Make all anchors font-size %100.  Remove margin from
        the content section.
        (org-html-container-element): Fix docstring.
-       (org-html-postamble-format, org-html-preamble-format): Update
-       docstrings.
+       (org-html-postamble-format, org-html-preamble-format):
+       Update docstrings.
        (org-html-template): Use `org-html--build-pre/postamble'.
        (org-html--build-pre/postamble): New function, combining the
        pre/postamble generator.  Merge lists of formatters from the
        (org-html-divs): Change to alist of three entries each containing
        a key ('preamble, 'content, 'postamble), an HTML element type and
        an id to allow setting container elements.
-       (org-html--build-preamble, org-html--build-postamble): Modified to
+       (org-html--build-preamble, org-html--build-postamble): Modify to
        use `org-html-divs'.
-       (org-html-template): Modified to use doctype and container-element
+       (org-html-template): Modify to use doctype and container-element
        settings.
        (org-export-define-backend): Add css url option.
        (org-export-htmlized-org-css-url): Modify docstring and options.
        * ob-tangle.el (org-babel-tangle-collect-blocks): Change argument
        name collid `org-babel-map-src-blocks' variable 'lang'.
 
-       * org-protocol.el (org-protocol-convert-query-to-plist): New
-       function.
+       * org-protocol.el (org-protocol-convert-query-to-plist):
+       New function.
        (org-protocol-do-capture): Use new function.
        (org-protocol-data-separator): Change default separator.
 
 
 2013-11-12  Vitalie Spinu  <spinuvit@gmail.com>
 
-       * ob-tangle.el (org-babel-find-file-noselect-refresh): Call
-       `find-file-noselect' with 'nowarn argument to surpress
+       * ob-tangle.el (org-babel-find-file-noselect-refresh):
+       Call `find-file-noselect' with 'nowarn argument to surpress
        `yes-or-no-p' reversion message.
 
-       * ob-core.el (org-babel-where-is-src-block-head): Return
-       `point-marker' instead of `point'.
+       * ob-core.el (org-babel-where-is-src-block-head):
+       Return `point-marker' instead of `point'.
 
 2013-11-12  Yann Hodique  <yann.hodique@gmail.com>
 
        if result is not a string and not nil.  If the result is nil,
        treat it as if it was the empty string.
 
-       * org-clock.el (org-clock-notify-once-if-expired): Honor
-       `org-clock-sound'.
+       * org-clock.el (org-clock-notify-once-if-expired):
+       Honor `org-clock-sound'.
 
 2013-11-12  Rasmus Pank  <rasmus.pank@gmail.com>
 
        * ob-C.el: Added C++ to `org-babel-load-languages' automatically
        after loading C.
 
-       * org-src.el (org-src-lang-modes): Added association between
+       * org-src.el (org-src-lang-modes): Add association between
        language C++ and `c++-mode'.
 
-       * ox.el (org-export-smart-quotes-alist): Added ("da" "no" "nb"
+       * ox.el (org-export-smart-quotes-alist): Add ("da" "no" "nb"
        "nn" "sv").
-       (org-export-dictionary): Added some entries ("da" "no" "nb" "nn"
+       (org-export-dictionary): Add some entries ("da" "no" "nb" "nn"
        "sv").
        (org-export-default-language): Mention other variables affected by
        language.
 
-       * ox-latex.el (org-latex-babel-language-alist): Added 'nb', 'nn',
+       * ox-latex.el (org-latex-babel-language-alist): Add 'nb', 'nn',
        and 'no' for Norwegian.  Removed 'no-no'.
        (org-latex-pdf-process): let `latexmk' be a preconfigured choice
        and change the wording of the docstring.
        (org-latex-guess-babel-language): Replace AUTO with language if
        AUTO is the option of the LaTeX package Babel.
-       (org-latex-classes): Updated documentation with respect
+       (org-latex-classes): Update documentation with respect
        to `org-latex-guess-babel-language'.
 
 2013-11-12  Дядов Васил Стоянов  <vdyadov@elvees.com>  (tiny change)
        * org-clock.el (org-clock-idle-time): Org-mode assumed that
        x11idle was an available command, and returned an idle time of 0
        if it was not
-       (never idle): Added checks so that org-idle-time will come from
+       (never idle): Add checks so that org-idle-time will come from
        emacs' own current-idle-time if x11idle cannot be found or if it
        cannot retrieve the idle time from X11
 
 
 2011-07-28  Bastien Guerry  <bzg@gnu.org>
 
-       * org-agenda.el (org-agenda-repeating-timestamp-show-all): Allow
-       to use a list of TODO keywords as the value of this variable.
+       * org-agenda.el (org-agenda-repeating-timestamp-show-all):
+       Allow to use a list of TODO keywords as the value of this variable.
        The agenda will show repeating stamps for entries matching these TODO
        keywords.
        (org-agenda-get-timestamps, org-agenda-get-deadlines)
index eef408fd44f0b1ec08c8de796ac7f3c457689058..a83f6b2fe018cb750e248393c9da5074f3eda3dc 100644 (file)
@@ -2040,8 +2040,8 @@ code ---- the results are extracted in the syntax of the source
                                 t info hash indent)))
             (results-switches
              (cdr (assoc :results_switches (nth 2 info))))
-            (visible-beg (copy-marker (point-min)))
-            (visible-end (copy-marker (point-max)))
+            (visible-beg (point-min-marker))
+            (visible-end (point-max-marker))
             ;; When results exist outside of the current visible
             ;; region of the buffer, be sure to widen buffer to
             ;; update them.
index 892ae18108aef4fc688e8cd8746889c38a3088cb..1bbe8506531f466aab7ecd4c87d67777b1894613 100644 (file)
@@ -1927,7 +1927,7 @@ fontified, and then returned."
     (org-mode)
     (org-create-dblock props)
     (org-update-dblock)
-    (font-lock-fontify-buffer)
+    (org-font-lock-ensure)
     (forward-line 2)
     (buffer-substring (point) (progn
                                (re-search-forward "^[ \t]*#\\+END" nil t)
index 90380a8806ca6fa1c963eeb82d36b6c53df381c1..4466b0be80dab928c43a634128078fb4d338126e 100644 (file)
@@ -295,7 +295,7 @@ Works on both Emacs and XEmacs."
       (setq mark-active t)
       (when (and (boundp 'transient-mark-mode)
                 (not transient-mark-mode))
-       (setq transient-mark-mode 'lambda))
+       (set (make-local-variable 'transient-mark-mode) 'lambda))
       (when (boundp 'zmacs-regions)
        (setq zmacs-regions t)))))
 
@@ -478,6 +478,11 @@ LIMIT."
              (looking-at (concat "\\(?:"  regexp "\\)\\'")))))
       (not (null pos)))))
 
+(defalias 'org-font-lock-ensure
+  (if (fboundp 'org-font-lock-ensure)
+      #'font-lock-ensure
+    (lambda (_beg _end) (font-lock-fontify-buffer))))
+
 (defun org-floor* (x &optional y)
   "Return a list of the floor of X and the fractional part of X.
 With two arguments, return floor and remainder of their quotient."
index 74046c73fe316d43bab628427a1686cc1e66395f..718f346670fde653b79841a3cfdb1f188d66ba9b 100644 (file)
@@ -1008,7 +1008,7 @@ This means, between the beginning of line and the point."
        (let ((endmarker (with-current-buffer buffer
                           (org-end-of-subtree nil t)
                           (unless (eobp) (forward-char 1))
-                          (copy-marker (point)))))
+                          (point-marker))))
          (org-with-remote-undo buffer
            (with-current-buffer buffer
              (widen)
@@ -1018,7 +1018,7 @@ This means, between the beginning of line and the point."
                (and (outline-next-heading)
                     (org-flag-heading nil)))   ; show the next heading
              (org-back-to-heading)
-             (setq marker (copy-marker (point)))
+             (setq marker (point-marker))
              (goto-char (max (point-at-bol) (- (point-at-eol) anticol)))
              (funcall command)
              (message "_cmd: %S" org-mouse-cmd)
index 752fa30bd1223f97f9a8314768423e0404c52f5e..26b10cea9c749bada79a8b8e4c938782ef18d161 100644 (file)
@@ -918,7 +918,7 @@ fontification of code blocks see `org-src-fontify-block' and
            (delete-region (point-min) (point-max))
            (insert string " ") ;; so there's a final property change
            (unless (eq major-mode lang-mode) (funcall lang-mode))
-           (font-lock-fontify-buffer)
+            (org-font-lock-ensure)
            (setq pos (point-min))
            (while (setq next (next-single-property-change pos 'face))
              (put-text-property
index 30a66c9c2340a10536a00dd6f8282848275e6ca2..f28e96c694e29b5e881cc5fa0c2e9df8bfb8ed6c 100644 (file)
@@ -3183,9 +3183,9 @@ with the prefix ARG."
     (save-excursion
       ;; Insert a temporary formula at right after the table
       (goto-char (org-table-TBLFM-begin))
-      (setq s (set-marker (make-marker) (point)))
+      (setq s (point-marker))
       (insert (concat formula "\n"))
-      (setq e (set-marker (make-marker) (point)))
+      (setq e (point-marker))
       ;; Recalculate the table
       (beginning-of-line 0)            ; move to the inserted line
       (skip-chars-backward " \r\n\t")
index 2b5603ce5af2b498edbc384430830a3d89ca8de9..1604241f6b39bede449c03ec903ff415478ff2ec 100644 (file)
@@ -6371,7 +6371,7 @@ needs to be inserted at a specific position in the font-lock sequence.")
     (insert s)
     (let ((org-odd-levels-only odd-levels))
       (org-mode)
-      (font-lock-fontify-buffer)
+      (org-font-lock-ensure)
       (buffer-string))))
 
 (defvar org-m nil)
@@ -7571,7 +7571,7 @@ headline or the item and create a new headline/item with the text
 in the current line after point \(see `org-M-RET-may-split-line'
 on how to modify this behavior).
 
-With one universal prefirx argument, set the user option
+With one universal prefix argument, set the user option
 `org-insert-heading-respect-content' to t for the duration of
 the command.  This modifies the behavior described above in this
 ways: on list items and at the beginning of normal lines, force
index 23498b26924a95ab5013252db85a87f94c91096d..21f34810f152be6eb24066e0da18a9e5e19ce2fd 100644 (file)
@@ -1856,7 +1856,7 @@ is the language used for CODE, as a string, or nil."
                       (funcall lang-mode)
                       (insert code)
                       ;; Fontify buffer.
-                      (font-lock-fontify-buffer)
+                      (org-font-lock-ensure)
                       ;; Remove formatting on newline characters.
                       (save-excursion
                         (let ((beg (point-min))
index 03b3214a469155aabe814577eb7c36ccfa093d74..8b61d5c47b69ccfa81aa569831fab3630ea37329 100644 (file)
@@ -3139,7 +3139,7 @@ and prefix with \"OrgSrc\".  For example,
                 (with-temp-buffer
                   (insert code)
                   (funcall lang-mode)
-                  (font-lock-fontify-buffer)
+                  (org-font-lock-ensure)
                   (buffer-string))))
         (fontifier (if use-htmlfontify-p 'org-odt-htmlfontify-string
                      'org-odt--encode-plain-text))
index 195b9d765872d984c73c3b1ba314f581db9c3804..4bee45ab0140e55b14e9a1cc87cd43c140b82b7b 100644 (file)
@@ -251,12 +251,13 @@ Return output file name."
           (html-ext (concat "." (or (plist-get plist :html-extension)
                                     org-html-extension "html")))
           (visitingp (find-buffer-visiting filename))
-          (work-buffer (or visitingp (find-file filename)))
+          (work-buffer (or visitingp (find-file-noselect filename)))
           newbuf)
-      (font-lock-fontify-buffer)
-      (show-all)
-      (org-show-block-all)
-      (setq newbuf (htmlize-buffer))
+      (with-current-buffer work-buffer
+        (org-font-lock-ensure)
+        (show-all)
+        (org-show-block-all)
+        (setq newbuf (htmlize-buffer)))
       (with-current-buffer newbuf
        (when org-org-htmlized-css-url
          (goto-char (point-min))
@@ -265,10 +266,12 @@ Return output file name."
               (replace-match
                (format
                 "<link rel=\"stylesheet\" type=\"text/css\" href=\"%s\">"
-                org-org-htmlized-css-url) t t)))
+                org-org-htmlized-css-url)
+                t t)))
        (write-file (concat pub-dir (file-name-nondirectory filename) html-ext)))
       (kill-buffer newbuf)
       (unless visitingp (kill-buffer work-buffer)))
+    ;; FIXME: Why?  Which buffer is this supposed to apply to?
     (set-buffer-modified-p nil)))
 
 
index e7f5725a0f0f68418066fa29fd7891d66ec72ed8..cae151f0b332bb17188964281b6770dcb8e856db 100644 (file)
@@ -1005,20 +1005,17 @@ Set `bubbles--col-offset' and `bubbles--row-offset'."
     (set-buffer-modified-p nil)
     (erase-buffer)
     (insert " ")
-    (add-text-properties
-     (point-min) (point) (list 'intangible t 'display
-                               (cons 'space
-                                     (list :height bubbles--row-offset))))
+    (put-text-property (point-min) (point)
+                       'display
+                       (cons 'space (list :height bubbles--row-offset)))
     (insert "\n")
     (let ((max-char (length (bubbles--colors))))
       (dotimes (i (bubbles--grid-height))
         (let ((p (point)))
           (insert " ")
-          (add-text-properties
-           p (point) (list 'intangible t
-                           'display (cons 'space
-                                          (list :width
-                                                bubbles--col-offset)))))
+          (put-text-property p (point)
+                             'display
+                             (cons 'space (list :width bubbles--col-offset))))
         (dotimes (j (bubbles--grid-width))
           (let* ((index (random max-char))
                  (char (nth index bubbles-chars)))
@@ -1026,10 +1023,9 @@ Set `bubbles--col-offset' and `bubbles--row-offset'."
             (add-text-properties (1- (point)) (point) (list 'index index))))
         (insert "\n"))
       (insert "\n ")
-      (add-text-properties
-       (1- (point)) (point) (list 'intangible t 'display
-                                  (cons 'space
-                                        (list :width bubbles--col-offset)))))
+      (put-text-property (1- (point)) (point)
+                         'display
+                         (cons 'space (list :width bubbles--col-offset))))
     (put-text-property (point-min) (point-max) 'pointer 'arrow))
   (bubbles-mode)
   (bubbles--reset-score)
@@ -1179,10 +1175,9 @@ Use optional parameter POS instead of point if given."
       (delete-region (point) (point-max))
       (insert (format "Selected: %4d\n" bubbles--neighborhood-score))
       (insert " ")
-      (add-text-properties (1- (point)) (point)
-                           (list 'intangible t 'display
-                                 (cons 'space
-                                       (list :width bubbles--col-offset))))
+      (put-text-property (1- (point)) (point)
+                         'display
+                         (cons 'space (list :width bubbles--col-offset)))
       (insert (format "Score:    %4d" bubbles--score))
       (put-text-property pos (point) 'status t))))
 
@@ -1200,10 +1195,9 @@ Use optional parameter POS instead of point if given."
   (goto-char (point-max))
   (let* ((inhibit-read-only t))
     (insert "\n ")
-    (add-text-properties (1- (point)) (point)
-                         (list 'intangible t 'display
-                               (cons 'space
-                                     (list :width bubbles--col-offset))))
+    (put-text-property (1- (point)) (point)
+                       'display
+                       (cons 'space (list :width bubbles--col-offset)))
     (insert "Game Over!"))
   ;; save score
   (gamegrid-add-score (format "bubbles-%s-%d-%d-%d-scores"
index 0028b7258aec5d79753a458daa256a8ccc9e76e8..3f4b8e8c5b8671a57f7af51da527d5896cd84fc2 100644 (file)
 
 (defun dun-describe-room (room)
   (if (and (not (member (abs room) dun-light-rooms))
-          (not (member obj-lamp dun-inventory)))
+          (not (member obj-lamp dun-inventory))
+          (not (member obj-lamp (nth dun-current-room dun-room-objects))))
       (dun-mprincl "It is pitch dark.  You are likely to be eaten by a grue.")
     (dun-mprincl (cadr (nth (abs room) dun-rooms)))
     (if (and (and (or (member room dun-visited)
@@ -615,7 +616,8 @@ just try dropping it.")
 
 (defun dun-move (dir)
   (if (and (not (member dun-current-room dun-light-rooms))
-          (not (member obj-lamp dun-inventory)))
+          (not (member obj-lamp dun-inventory))
+          (not (member obj-lamp (nth dun-current-room dun-room-objects))))
       (progn
        (dun-mprinc
 "You trip over a grue and fall into a pit and break every bone in your
@@ -896,7 +898,7 @@ to swim.")
 
 (defun dun-help (args)
   (dun-mprincl
-"Welcome to dunnet (2.01), by Ron Schnell (ronnie@driver-aces.com).
+"Welcome to dunnet (2.02), by Ron Schnell (ronnie@driver-aces.com - @RonnieSchnell).
 Here is some useful information (read carefully because there are one
 or more clues in here):
 - If you have a key that can open a door, you do not need to explicitly
@@ -1385,8 +1387,8 @@ for a moment, then straighten yourself up.
 (setq dungeon-mode 'dungeon)
 (setq dun-unix-verbs '((ls . dun-ls) (ftp . dun-ftp) (echo . dun-echo)
                       (exit . dun-uexit) (cd . dun-cd) (pwd . dun-pwd)
-                      (rlogin . dun-rlogin) (uncompress . dun-uncompress)
-                      (cat . dun-cat)))
+                      (rlogin . dun-rlogin) (ssh . dun-rlogin)
+                      (uncompress . dun-uncompress) (cat . dun-cat)))
 
 (setq dun-dos-verbs '((dir . dun-dos-dir) (type . dun-dos-type)
                      (exit . dun-dos-exit) (command . dun-dos-spawn)
@@ -2537,25 +2539,31 @@ treasures for points?" "4" "four")
          (dun-mprincl "Incorrect.")))
 
     (let (varname epoint afterq i value)
-      (setq varname (substring line 0 esign))
-      (if (not (setq epoint (string-match ")" line)))
-         (if (string= (substring line (1+ esign) (+ esign 2))
-                      "\"")
-             (progn
-               (setq afterq (substring line (+ esign 2)))
-               (setq epoint (+
-                             (string-match "\"" afterq)
-                             (+ esign 3))))
-
-           (if (not (setq epoint (string-match " " line)))
-               (setq epoint (length line))))
-       (setq epoint (1+ epoint))
-       (while (and
-               (not (= epoint (length line)))
-               (setq i (string-match ")" (substring line epoint))))
-         (setq epoint (+ epoint i 1))))
-      (setq value (substring line (1+ esign) epoint))
-      (dun-eval varname value))))
+      (setq varname (replace-regexp-in-string " " "" (substring line 0 esign)))
+
+      (if (or (= (length varname) 0) (< (- (length line) esign) 2))
+         (progn
+           (dun-mprinc line)
+           (dun-mprincl " : not found."))
+
+       (if (not (setq epoint (string-match ")" line)))
+           (if (string= (substring line (1+ esign) (+ esign 2))
+                        "\"")
+               (progn
+                 (setq afterq (substring line (+ esign 2)))
+                 (setq epoint (+
+                               (string-match "\"" afterq)
+                               (+ esign 3))))
+
+             (if (not (setq epoint (string-match " " line)))
+                 (setq epoint (length line))))
+         (setq epoint (1+ epoint))
+         (while (and
+                 (not (= epoint (length line)))
+                 (setq i (string-match ")" (substring line epoint))))
+           (setq epoint (+ epoint i 1))))
+       (setq value (substring line (1+ esign) epoint))
+       (dun-eval varname value)))))
 
 (defun dun-eval (varname value)
   (let (eval-error)
@@ -2739,16 +2747,20 @@ drwxr-xr-x  3 root     staff          2048 Jan 1 1970 ..")
                  (if dun-batch-mode
                      (dun-mprincl "Login failed.")
                    (dun-mprincl "\nLogin failed."))
-               (if dun-batch-mode
-                  (dun-mprincl
-                   "Guest login okay, user access restrictions apply.")
-                 (dun-mprincl
-                  "\nGuest login okay, user access restrictions apply."))
-               (dun-ftp-commands)
-               (setq newlist
+               (if (= (length ident) 0)
+                   (if dun-batch-mode
+                       (dun-mprincl "Password is required.")
+                     (dun-mprincl "\nPassword is required."))
+                 (if dun-batch-mode
+                     (dun-mprincl
+                      "Guest login okay, user access restrictions apply.")
+                   (dun-mprincl
+                    "\nGuest login okay, user access restrictions apply."))
+                 (dun-ftp-commands)
+                 (setq newlist
 '("What password did you use during anonymous ftp to gamma?"))
-               (setq newlist (append newlist (list ident)))
-               (rplaca (nthcdr 1 dun-endgame-questions) newlist)))))))))
+                 (setq newlist (append newlist (list ident)))
+                 (rplaca (nthcdr 1 dun-endgame-questions) newlist))))))))))
 
 (defun dun-ftp-commands ()
     (setq dun-exitf nil)
index a2a93730cf0906b69d31544b3a4f3fd2d7888a9b..b71eb562f084eb2f5ac96b5aa8b8380b342e6e0f 100644 (file)
@@ -590,31 +590,30 @@ shogi, etc.) players, it is a slightly modified version of Outline mode.
   (add-hook 'write-contents-hooks 'gametree-save-and-hack-layout))
 
 ;;;; Goodies for mousing users
-(and (fboundp 'track-mouse)
-     (defun gametree-mouse-break-line-here (event)
-       (interactive "e")
-       (mouse-set-point event)
-       (gametree-break-line-here))
-     (defun gametree-mouse-show-children-and-entry (event)
-       (interactive "e")
-       (mouse-set-point event)
-       (gametree-show-children-and-entry))
-     (defun gametree-mouse-show-subtree (event)
-       (interactive "e")
-       (mouse-set-point event)
-       (show-subtree))
-     (defun gametree-mouse-hide-subtree (event)
-       (interactive "e")
-       (mouse-set-point event)
-       (hide-subtree))
-     (define-key gametree-mode-map [M-down-mouse-2 M-mouse-2]
-       'gametree-mouse-break-line-here)
-     (define-key gametree-mode-map [S-down-mouse-1 S-mouse-1]
-       'gametree-mouse-show-children-and-entry)
-     (define-key gametree-mode-map [S-down-mouse-2 S-mouse-2]
-       'gametree-mouse-show-subtree)
-     (define-key gametree-mode-map [S-down-mouse-3 S-mouse-3]
-       'gametree-mouse-hide-subtree))
+(defun gametree-mouse-break-line-here (event)
+  (interactive "e")
+  (mouse-set-point event)
+  (gametree-break-line-here))
+(defun gametree-mouse-show-children-and-entry (event)
+  (interactive "e")
+  (mouse-set-point event)
+  (gametree-show-children-and-entry))
+(defun gametree-mouse-show-subtree (event)
+  (interactive "e")
+  (mouse-set-point event)
+  (show-subtree))
+(defun gametree-mouse-hide-subtree (event)
+  (interactive "e")
+  (mouse-set-point event)
+  (hide-subtree))
+(define-key gametree-mode-map [M-down-mouse-2 M-mouse-2]
+  'gametree-mouse-break-line-here)
+(define-key gametree-mode-map [S-down-mouse-1 S-mouse-1]
+  'gametree-mouse-show-children-and-entry)
+(define-key gametree-mode-map [S-down-mouse-2 S-mouse-2]
+  'gametree-mouse-show-subtree)
+(define-key gametree-mode-map [S-down-mouse-3 S-mouse-3]
+  'gametree-mouse-hide-subtree)
 
 (provide 'gametree)
 
index f1bd87ce847c46d1e38c7710287763c34e2f06d6..c11759449175922ce8fb4290f4220f57477a82ec 100644 (file)
@@ -1,10 +1,11 @@
-;;; landmark.el --- neural-network robot that learns landmarks
+;;; landmark.el --- Neural-network robot that learns landmarks  -*- lexical-binding:t -*-
 
 ;; Copyright (C) 1996-1997, 2000-2014 Free Software Foundation, Inc.
 
 ;; Author: Terrence Brannon (was: <brannon@rana.usc.edu>)
 ;; Created: December 16, 1996 - first release to usenet
 ;; Keywords: games, neural network, adaptive search, chemotaxis
+;; Version: 1.0
 
 ;; This file is part of GNU Emacs.
 
                   'landmark-font-lock-face-X)))
   "Font lock rules for Landmark.")
 
-(put 'landmark-mode 'front-sticky
-     (put 'landmark-mode 'rear-nonsticky '(intangible)))
-(put 'landmark-mode 'intangible 1)
 ;; This one is for when they set view-read-only to t: Landmark cannot
 ;; allow View Mode to be activated in its buffer.
 (define-derived-mode landmark-mode special-mode "Lm"
@@ -244,7 +242,8 @@ Entry to this mode calls the value of `landmark-mode-hook' if that value
 is non-nil.  One interesting value is `turn-on-font-lock'."
   (landmark-display-statistics)
   (setq-local font-lock-defaults '(landmark-font-lock-keywords t))
-  (setq buffer-read-only t))
+  (setq buffer-read-only t)
+  (add-hook 'post-command-hook #'landmark--intangible nil t))
 
 
 ;;;_ +  THE SCORE TABLE.
@@ -679,8 +678,8 @@ along the DX, DY direction, considering that DVAL has been added on SQUARE."
     (landmark-prompt-for-other-game))
    (t
     (message "Let me think...")
-    (let (square score)
-      (setq square (landmark-strongest-square))
+    (let ((square (landmark-strongest-square))
+          score)
       (cond ((null square)
             (landmark-terminate-game 'nobody-won))
            (t
@@ -722,8 +721,7 @@ along the DX, DY direction, considering that DVAL has been added on SQUARE."
        (min (max (/ (+ (- (cdr click)
                           landmark-y-offset
                           1)
-                       (let ((inhibit-point-motion-hooks t))
-                         (count-lines 1 (window-start)))
+                        (count-lines (point-min) (window-start))
                        landmark-square-height
                        (% landmark-square-height 2)
                        (/ landmark-square-height 2))
@@ -749,8 +747,8 @@ If the game is finished, this command requests for another game."
    ((not landmark-game-in-progress)
     (landmark-prompt-for-other-game))
    (t
-    (let (square score)
-      (setq square (landmark-point-square))
+    (let ((square (landmark-point-square))
+          score)
       (cond ((null square)
             (error "Your point is not on a square. Retry!"))
            ((not (zerop (aref landmark-board square)))
@@ -844,16 +842,15 @@ If the game is finished, this command requests for another game."
 
 (defun landmark-point-y ()
   "Return the board row where point is."
-  (let ((inhibit-point-motion-hooks t))
-    (1+ (/ (- (count-lines 1 (point)) landmark-y-offset (if (bolp) 0 1))
-          landmark-square-height))))
+  (1+ (/ (- (count-lines (point-min) (point))
+            landmark-y-offset (if (bolp) 0 1))
+         landmark-square-height)))
 
 (defun landmark-point-square ()
   "Return the index of the square point is on."
-  (let ((inhibit-point-motion-hooks t))
     (landmark-xy-to-index (1+ (/ (- (current-column) landmark-x-offset)
                               landmark-square-width))
-                       (landmark-point-y))))
+                      (landmark-point-y)))
 
 (defun landmark-goto-square (index)
   "Move point to square number INDEX."
@@ -861,23 +858,21 @@ If the game is finished, this command requests for another game."
 
 (defun landmark-goto-xy (x y)
   "Move point to square at X, Y coords."
-  (let ((inhibit-point-motion-hooks t))
     (goto-char (point-min))
-    (forward-line (+ landmark-y-offset (* landmark-square-height (1- y)))))
+  (forward-line (+ landmark-y-offset (* landmark-square-height (1- y))))
   (move-to-column (+ landmark-x-offset (* landmark-square-width (1- x)))))
 
 (defun landmark-plot-square (square value)
   "Draw 'X', 'O' or '.' on SQUARE depending on VALUE, leave point there."
   (or (= value 1)
       (landmark-goto-square square))
-  (let ((inhibit-read-only t)
-       (inhibit-point-motion-hooks t))
-    (insert-and-inherit (cond ((= value 1) ?.)
-                             ((= value 2) ?N)
-                             ((= value 3) ?S)
-                             ((= value 4) ?E)
-                             ((= value 5) ?W)
-                             ((= value 6) ?^)))
+  (let ((inhibit-read-only t))
+    (insert (cond ((= value 1) ?.)
+                  ((= value 2) ?N)
+                  ((= value 3) ?S)
+                  ((= value 4) ?E)
+                  ((= value 5) ?W)
+                  ((= value 6) ?^)))
 
     (and (zerop value)
         (add-text-properties (1- (point)) (point)
@@ -892,8 +887,7 @@ mouse-1: get robot moving, mouse-2: play on this square")))
   "Display an N by M Landmark board."
   (buffer-disable-undo (current-buffer))
   (let ((inhibit-read-only t)
-       (point 1) opoint
-       (intangible t)
+       (point (point-min)) opoint
        (i m) j x)
     ;; Try to minimize number of chars (because of text properties)
     (setq tab-width
@@ -902,7 +896,7 @@ mouse-1: get robot moving, mouse-2: play on this square")))
            (max (/ (+ (% landmark-x-offset landmark-square-width)
                       landmark-square-width 1) 2) 2)))
     (erase-buffer)
-    (newline landmark-y-offset)
+    (insert-char ?\n landmark-y-offset)
     (while (progn
             (setq j n
                   x (- landmark-x-offset landmark-square-width))
@@ -910,9 +904,7 @@ mouse-1: get robot moving, mouse-2: play on this square")))
               (insert-char ?\t (/ (- (setq x (+ x landmark-square-width))
                                      (current-column))
                                   tab-width))
-              (insert-char ?  (- x (current-column)))
-              (if (setq intangible (not intangible))
-                  (put-text-property point (point) 'intangible 2))
+               (insert-char ?\s (- x (current-column)))
               (and (zerop j)
                    (= i (- m 2))
                    (progn
@@ -929,14 +921,7 @@ mouse-1: get robot moving, mouse-2: play on this square")))
       (if (= i (1- m))
          (setq opoint point))
       (insert-char ?\n landmark-square-height))
-    (or (eq (char-after 1) ?.)
-       (put-text-property 1 2 'point-entered
-                          (lambda (_x _y) (if (bobp) (forward-char)))))
-    (or intangible
-       (put-text-property point (point) 'intangible 2))
-    (put-text-property point (point) 'point-entered
-                      (lambda (_x _y) (if (eobp) (backward-char))))
-    (put-text-property (point-min) (point) 'category 'landmark-mode))
+    (insert-char ?\n))
   (landmark-goto-xy (/ (1+ n) 2) (/ (1+ m) 2)) ; center of the board
   (sit-for 0))                         ; Display NOW
 
@@ -998,8 +983,7 @@ mouse-1: get robot moving, mouse-2: play on this square")))
   "Cross every square between SQUARE1 and SQUARE2 in the DX, DY direction."
   (save-excursion                      ; Not moving point from last square
     (let ((depl (landmark-xy-to-index dx dy))
-         (inhibit-read-only t)
-         (inhibit-point-motion-hooks t))
+         (inhibit-read-only t))
       ;; WARNING: this function assumes DEPL > 0 and SQUARE2 > SQUARE1
       (while (/= square1 square2)
        (landmark-goto-square square1)
@@ -1018,20 +1002,40 @@ mouse-1: get robot moving, mouse-2: play on this square")))
               (setq landmark-n (1+ landmark-n))
               (forward-line 1)
               (indent-to column)
-              (insert-and-inherit ?|))))
+              (insert ?|))))
          ((= dx -1)                    ; 1st Diagonal
           (indent-to (prog1 (- (current-column) (/ landmark-square-width 2))
                        (forward-line (/ landmark-square-height 2))))
-          (insert-and-inherit ?/))
+          (insert ?/))
          (t                            ; 2nd Diagonal
           (indent-to (prog1 (+ (current-column) (/ landmark-square-width 2))
                        (forward-line (/ landmark-square-height 2))))
-          (insert-and-inherit ?\\))))))
+          (insert ?\\))))))
   (sit-for 0))                         ; Display NOW
 
 
 ;;;_ + CURSOR MOTION.
 
+(defvar-local landmark--last-pos 0)
+
+(defconst landmark--intangible-chars "- \t\n|/\\\\")
+
+(defun landmark--intangible ()
+  (when (or (eobp)
+            (save-excursion
+              (not (zerop (skip-chars-forward landmark--intangible-chars)))))
+    (if (<= landmark--last-pos (point))   ;Moving forward.
+        (progn
+          (skip-chars-forward landmark--intangible-chars)
+          (when (eobp)
+            (skip-chars-backward landmark--intangible-chars)
+            (forward-char -1)))
+      (skip-chars-backward landmark--intangible-chars)
+      (if (bobp)
+          (skip-chars-forward landmark--intangible-chars)
+        (forward-char -1))))
+  (setq landmark--last-pos (point)))
+
 ;; previous-line and next-line don't work right with intangible newlines
 (defun landmark-move-down ()
   "Move point down one row on the Landmark board."
@@ -1138,7 +1142,7 @@ because it is overwritten by \"One moment please\"."
 
 
 (defun landmark-print-distance ()
-  (insert (format "tree: %S \n" (calc-distance-of-robot-from 'landmark-tree)))
+  (insert (format "tree: %S \n" (landmark-calc-distance-of-robot-from 'landmark-tree)))
   (mapc 'landmark-print-distance-int landmark-directions))
 
 
@@ -1303,9 +1307,9 @@ After this limit is reached, landmark-random-move is called to push him out of i
 ;;;_  - landmark-plot-internal (sym)
 (defun landmark-plot-internal (sym)
   (landmark-plot-square (landmark-xy-to-index
-                  (get sym 'x)
-                  (get sym 'y))
-                  (get sym 'sym)))
+                         (get sym 'x)
+                         (get sym 'y))
+                        (get sym 'sym)))
 ;;;_  - landmark-plot-landmarks ()
 (defun landmark-plot-landmarks ()
   (setq landmark-cx (/ landmark-board-width  2))
@@ -1336,26 +1340,24 @@ After this limit is reached, landmark-random-move is called to push him out of i
 
 
 ;;;_ + Distance-calculation functions
-;;;_  - square (a)
-(defun square (a)
-  (* a a))
 
 ;;;_  - distance (x x0 y y0)
-(defun distance (x x0 y y0)
-  (sqrt (+ (square (- x x0)) (square (- y y0)))))
+(defun landmark--distance (x x0 y y0)
+  (let ((dx (- x x0)) (dy (- y y0)))
+    (sqrt (+ (* dx dx) (* dy dy)))))
 
-;;;_  - calc-distance-of-robot-from (direction)
-(defun calc-distance-of-robot-from (direction)
+;;;_  - landmark-calc-distance-of-robot-from (direction)
+(defun landmark-calc-distance-of-robot-from (direction)
   (put direction 'distance
-       (distance (get direction 'x)
-                (landmark-index-to-x (landmark-point-square))
-                (get direction 'y)
-                (landmark-index-to-y (landmark-point-square)))))
+       (landmark--distance (get direction 'x)
+                           (landmark-index-to-x (landmark-point-square))
+                           (get direction 'y)
+                           (landmark-index-to-y (landmark-point-square)))))
 
-;;;_  - calc-smell-internal (sym)
-(defun calc-smell-internal (sym)
+;;;_  - landmark-calc-smell-internal (sym)
+(defun landmark-calc-smell-internal (sym)
   (let ((r (get sym 'r))
-       (d (calc-distance-of-robot-from sym)))
+       (d (landmark-calc-distance-of-robot-from sym)))
     (if (> (* 0.5 (- 1 (/ d r))) 0)
        (* 0.5 (- 1 (/ d r)))
       0)))
@@ -1402,12 +1404,12 @@ After this limit is reached, landmark-random-move is called to push him out of i
 
 (defun landmark-calc-current-smells ()
   (mapc (lambda (direction)
-            (put direction 'smell (calc-smell-internal direction)))
+            (put direction 'smell (landmark-calc-smell-internal direction)))
          landmark-directions))
 
 (defun landmark-calc-payoff ()
   (put 'z 't-1 (get 'z 't))
-  (put 'z 't (calc-smell-internal 'landmark-tree))
+  (put 'z 't (landmark-calc-smell-internal 'landmark-tree))
   (if (= (- (get 'z 't) (get 'z 't-1)) 0.0)
       (cl-incf landmark-no-payoff)
     (setf landmark-no-payoff 0)))
@@ -1448,8 +1450,9 @@ After this limit is reached, landmark-random-move is called to push him out of i
            (message "e-w normalization"))))
 
   (mapc (lambda (pair)
-            (if (> (get (car pair) 'y_t) 0)
-                (funcall (car (cdr pair)))))
+            (when (> (get (car pair) 'y_t) 0)
+               (funcall (car (cdr pair)))
+               (landmark--intangible)))
          '(
            (landmark-n landmark-move-up)
            (landmark-s landmark-move-down)
@@ -1471,7 +1474,7 @@ After this limit is reached, landmark-random-move is called to push him out of i
 
 (defun landmark-amble-robot ()
   (interactive)
-  (while (> (calc-distance-of-robot-from 'landmark-tree) 0)
+  (while (> (landmark-calc-distance-of-robot-from 'landmark-tree) 0)
 
     (landmark-store-old-y_t)
     (landmark-calc-current-smells)
@@ -1505,8 +1508,7 @@ If the game is finished, this command requests for another game."
    ((not landmark-game-in-progress)
     (landmark-prompt-for-other-game))
    (t
-    (let (square)
-      (setq square (landmark-point-square))
+    (let ((square (landmark-point-square)))
       (cond ((null square)
             (error "Your point is not on a square. Retry!"))
            ((not (zerop (aref landmark-board square)))
@@ -1517,7 +1519,7 @@ If the game is finished, this command requests for another game."
 
               (landmark-store-old-y_t)
               (landmark-calc-current-smells)
-              (put 'z 't (calc-smell-internal 'landmark-tree))
+              (put 'z 't (landmark-calc-smell-internal 'landmark-tree))
 
               (landmark-random-move)
 
@@ -1590,7 +1592,9 @@ If the game is finished, this command requests for another game."
 ;; distance on scent.
 
 (defun landmark-set-landmark-signal-strengths ()
-  (setq landmark-tree-r (* (sqrt (+ (square landmark-cx) (square landmark-cy))) 1.5))
+  (setq landmark-tree-r (* (sqrt (+ (* landmark-cx landmark-cx)
+                                    (* landmark-cy landmark-cy)))
+                           1.5))
   (mapc (lambda (direction)
             (put direction 'r (* landmark-cx 1.1)))
        landmark-ew)
@@ -1609,7 +1613,7 @@ If the game is finished, this command requests for another game."
   "Run 100 Landmark games, each time saving the weights from the previous game."
   (interactive)
   (landmark 1)
-  (dotimes (scratch-var 100)
+  (dotimes (_ 100)
     (landmark 2)))
 
 ;;;###autoload
index 5b6173ceb350959665cd7f88c6fe90540c6606f8..101c8e2a8e713768b87ffbc52e5f15d87413cb8d 100644 (file)
@@ -1038,20 +1038,27 @@ Please send all bug fixes and enhancements to
 ;; To avoid compilation gripes
 
 
-(or (fboundp 'subst-char-in-string)    ; hacked from subr.el
-    (defun subst-char-in-string (fromchar tochar string &optional inplace)
-      "Replace FROMCHAR with TOCHAR in STRING each time it occurs.
+;; Emacs has this since at least 21.1.
+(when (featurep 'xemacs)
+  (or (fboundp 'subst-char-in-string)  ; hacked from subr.el
+      (defun subst-char-in-string (fromchar tochar string &optional inplace)
+       "Replace FROMCHAR with TOCHAR in STRING each time it occurs.
 Unless optional argument INPLACE is non-nil, return a new string."
-      (let ((i (length string))
-           (newstr (if inplace string (copy-sequence string))))
-       (while (> (setq i (1- i)) 0)
-         (if (eq (aref newstr i) fromchar)
-             (aset newstr i tochar)))
-       newstr)))
-
-
-(or (fboundp 'make-temp-file)          ; hacked from subr.el
-    (defun make-temp-file (prefix &optional dir-flag suffix)
+       (let ((i (length string))
+             (newstr (if inplace string (copy-sequence string))))
+         (while (> (setq i (1- i)) 0)
+           (if (eq (aref newstr i) fromchar)
+               (aset newstr i tochar)))
+         newstr))))
+
+
+;; Emacs has this since at least 21.1, but the SUFFIX argument
+;; (which this file uses) only since 22.1.  So the fboundp test
+;; wasn't even correct/adequate.  Whatever, no-one is using
+;; this file on older Emacs version, so it's irrelevant.
+(when (featurep 'xemacs)
+  (or (fboundp 'make-temp-file)                ; hacked from subr.el
+      (defun make-temp-file (prefix &optional dir-flag suffix)
       "Create a temporary file.
 The returned file name (created by appending some random characters at the end
 of PREFIX, and expanding against `temporary-file-directory' if necessary),
@@ -1086,7 +1093,7 @@ If SUFFIX is non-nil, add that at the end of the file name."
                nil)
              file)
          ;; Reset the umask.
-         (set-default-file-modes umask)))))
+         (set-default-file-modes umask))))))
 
 
 (eval-when-compile
@@ -3164,12 +3171,9 @@ See `pr-ps-printer-alist'.")
 
 
 (defmacro pr-save-file-modes (&rest body)
-  "Set temporally file modes to `pr-file-modes'."
-  `(let ((pr--default-file-modes (default-file-modes)))        ; save default
-     (set-default-file-modes pr-file-modes)
-     ,@body
-     (set-default-file-modes pr--default-file-modes))) ; restore default
-
+  "Execute BODY with file permissions temporarily set to `pr-file-modes'."
+  (declare (obsolete with-file-modes "25.1"))
+  `(with-file-modes pr-file-modes ,@body))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Keys & Menus
@@ -3192,9 +3196,10 @@ See `pr-ps-printer-alist'.")
 
 
 (defalias 'pr-get-symbol
-  (if (fboundp 'easy-menu-intern)      ; hacked from easymenu.el
-      'easy-menu-intern
-    (lambda (s) (if (stringp s) (intern s) s))))
+  (if (featurep 'emacs) 'easy-menu-intern ; since 22.1
+    (if (fboundp 'easy-menu-intern)    ; hacked from easymenu.el
+       'easy-menu-intern
+      (lambda (s) (if (stringp s) (intern s) s)))))
 
 
 (defconst pr-menu-spec
@@ -4364,12 +4369,12 @@ Noninteractively, the argument FILENAME is treated as follows: if it is nil,
 send the image to the printer.  If FILENAME is a string, save the PostScript
 image in a file with that name."
   (interactive (list (ps-print-preprint current-prefix-arg)))
-  (pr-save-file-modes
-   (let ((ps-lpr-command         (pr-command pr-ps-command))
-        (ps-lpr-switches        pr-ps-switches)
-        (ps-printer-name-option pr-ps-printer-switch)
-        (ps-printer-name        pr-ps-printer))
-     (ps-despool filename))))
+  (with-file-modes pr-file-modes
+    (let ((ps-lpr-command         (pr-command pr-ps-command))
+         (ps-lpr-switches        pr-ps-switches)
+         (ps-printer-name-option pr-ps-printer-switch)
+         (ps-printer-name        pr-ps-printer))
+      (ps-despool filename))))
 
 
 ;;;###autoload
@@ -5632,12 +5637,12 @@ If menu binding was not done, calls `pr-menu-bind'."
       (goto-char (point-max))
       (insert (format "%s %S\n" cmd args)))
     ;; *Printing Command Output* == show any return message from command
-    (pr-save-file-modes
-     (setq status
-          (condition-case data
-              (apply 'call-process cmd nil buffer nil args)
-            ((quit error)
-             (error-message-string data)))))
+    (with-file-modes pr-file-modes
+      (setq status
+           (condition-case data
+               (apply 'call-process cmd nil buffer nil args)
+             ((quit error)
+              (error-message-string data)))))
     ;; *Printing Command Output* == show exit status
     (with-current-buffer buffer
       (goto-char (point-max))
@@ -5882,42 +5887,42 @@ If menu binding was not done, calls `pr-menu-bind'."
 
 
 (defun pr-text2ps (kind n-up filename &optional from to)
-  (pr-save-file-modes
-   (let ((ps-n-up-printing n-up)
-        (ps-spool-config (and (eq ps-spool-config 'setpagedevice)
-                              'setpagedevice)))
-     (pr-delete-file-if-exists filename)
-     (cond (pr-faces-p
-           (cond (pr-spool-p
-                  ;; pr-faces-p and pr-spool-p
-                  ;; here FILENAME arg is ignored
-                  (cond ((eq kind 'buffer)
-                         (ps-spool-buffer-with-faces))
-                        ((eq kind 'region)
-                         (ps-spool-region-with-faces (or from (point))
-                                                     (or to (mark))))
-                        ))
-                 ;; pr-faces-p and not pr-spool-p
-                 ((eq kind 'buffer)
-                  (ps-print-buffer-with-faces filename))
-                 ((eq kind 'region)
-                  (ps-print-region-with-faces (or from (point))
-                                              (or to (mark)) filename))
-                 ))
-          (pr-spool-p
-           ;; not pr-faces-p and pr-spool-p
-           ;; here FILENAME arg is ignored
-           (cond ((eq kind 'buffer)
-                  (ps-spool-buffer))
-                 ((eq kind 'region)
-                  (ps-spool-region (or from (point)) (or to (mark))))
-                 ))
-          ;; not pr-faces-p and not pr-spool-p
-          ((eq kind 'buffer)
-           (ps-print-buffer filename))
-          ((eq kind 'region)
-           (ps-print-region (or from (point)) (or to (mark)) filename))
-          ))))
+  (with-file-modes pr-file-modes
+    (let ((ps-n-up-printing n-up)
+         (ps-spool-config (and (eq ps-spool-config 'setpagedevice)
+                               'setpagedevice)))
+      (pr-delete-file-if-exists filename)
+      (cond (pr-faces-p
+            (cond (pr-spool-p
+                   ;; pr-faces-p and pr-spool-p
+                   ;; here FILENAME arg is ignored
+                   (cond ((eq kind 'buffer)
+                          (ps-spool-buffer-with-faces))
+                         ((eq kind 'region)
+                          (ps-spool-region-with-faces (or from (point))
+                                                      (or to (mark))))
+                         ))
+                  ;; pr-faces-p and not pr-spool-p
+                  ((eq kind 'buffer)
+                   (ps-print-buffer-with-faces filename))
+                  ((eq kind 'region)
+                   (ps-print-region-with-faces (or from (point))
+                                               (or to (mark)) filename))
+                  ))
+           (pr-spool-p
+            ;; not pr-faces-p and pr-spool-p
+            ;; here FILENAME arg is ignored
+            (cond ((eq kind 'buffer)
+                   (ps-spool-buffer))
+                  ((eq kind 'region)
+                   (ps-spool-region (or from (point)) (or to (mark))))
+                  ))
+           ;; not pr-faces-p and not pr-spool-p
+           ((eq kind 'buffer)
+            (ps-print-buffer filename))
+           ((eq kind 'region)
+            (ps-print-region (or from (point)) (or to (mark)) filename))
+           ))))
 
 
 (defun pr-command (command)
@@ -6543,8 +6548,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
 
 
 (defun pr-i-directory ()
-  (or (and (file-directory-p pr-i-directory)
-          (file-readable-p pr-i-directory))
+  (or (file-accessible-directory-p pr-i-directory)
       (error "Please specify be a readable directory")))
 
 
@@ -6552,8 +6556,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order."
   (and pr-buffer-verbose
        (message "You can use M-TAB or ESC TAB for file completion"))
   (let ((dir (widget-value widget)))
-    (and (file-directory-p dir)
-        (file-readable-p dir)
+    (and (file-accessible-directory-p dir)
         (setq pr-i-directory dir))))
 
 
index 68b6c872d3fdf05b51cd94ea49cfd69de51f6386..0d07d57315555c34203fcd3ef9712f340f505990 100644 (file)
 ;; independent from the GNU Ada compiler GNAT, distributed by Ada
 ;; Core Technologies.  All the other files rely heavily on features
 ;; provided only by GNAT.
-;;
-;; Note: this mode will not work with Emacs 19. If you are on a VMS
-;; system, where the latest version of Emacs is 19.28, you will need
-;; another file, called ada-vms.el, that provides some required
-;; functions.
 
 ;;; Usage:
 ;; Emacs should enter Ada mode automatically when you load an Ada file.
index 7cad848fda80de098cbdfdc8a5bdb4aad9084a6e..4bc37451e6eeefe265485ade1b723184b145ffb0 100644 (file)
@@ -651,12 +651,6 @@ Call `ada-require-project-file' first to ensure a project exists."
        (find-file (car (cdr pos)))
        (goto-char (car pos)))))
 
-(defun ada-convert-file-name (name)
-  "Convert from NAME to a name that can be used by the compilation commands.
-This is overridden on VMS to convert from VMS filenames to Unix filenames."
-  name)
-;; FIXME: use convert-standard-filename instead
-
 (defun ada-set-default-project-file (file)
   "Set FILE as the current project file."
   (interactive "fProject file:")
@@ -1465,7 +1459,7 @@ by replacing the file extension with `.ali'."
           (get-file-buffer ali-file-name))
       (kill-buffer (get-file-buffer ali-file-name)))
 
-  (let* ((name      (ada-convert-file-name file))
+  (let* ((name      (convert-standard-filename file))
         (body-name (or (ada-get-body-name name) name)))
 
     ;; Always recompile the body when we can.  We thus temporarily switch to a
diff --git a/lisp/progmodes/cap-words.el b/lisp/progmodes/cap-words.el
deleted file mode 100644 (file)
index b03daf4..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-;;; cap-words.el --- minor mode for motion in CapitalizedWordIdentifiers
-
-;; Copyright (C) 2002-2014 Free Software Foundation, Inc.
-
-;; Author: Dave Love <fx@gnu.org>
-;; Keywords: languages
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;; Provides Capitalized Words minor mode for word movement in
-;; identifiers CapitalizedLikeThis.
-
-;; Note that the same effect could be obtained by frobbing the
-;; category of upper case characters to produce word boundaries, but
-;; the necessary processing isn't done for ASCII characters.
-
-;; Fixme: This doesn't work properly for mouse double clicks.
-
-;;; Code:
-
-(defun capitalized-find-word-boundary (pos limit)
-  "Function for use in `find-word-boundary-function-table'.
-Looks for word boundaries before capitals."
-  (save-excursion
-    (goto-char pos)
-    (let (case-fold-search)
-      (if (<= pos limit)
-         ;; Fixme: Are these regexps the best?
-         (or (and (re-search-forward "\\=.\\w*[[:upper:]]"
-                                     limit t)
-                  (progn (backward-char)
-                         t))
-             (re-search-forward "\\>" limit t))
-       (or (re-search-backward "[[:upper:]]\\w*\\=" limit t)
-           (re-search-backward "\\<" limit t))))
-    (point)))
-
-
-(defconst capitalized-find-word-boundary-function-table
-  (let ((tab (make-char-table nil)))
-    (set-char-table-range tab t #'capitalized-find-word-boundary)
-    tab)
-  "Assigned to `find-word-boundary-function-table' in Capitalized Words mode.")
-
-;;;###autoload
-(define-minor-mode capitalized-words-mode
-  "Toggle Capitalized Words mode.
-With a prefix argument ARG, enable Capitalized Words mode if ARG
-is positive, and disable it otherwise.  If called from Lisp,
-enable the mode if ARG is omitted or nil.
-
-Capitalized Words mode is a buffer-local minor mode.  When
-enabled, a word boundary occurs immediately before an uppercase
-letter in a symbol.  This is in addition to all the normal
-boundaries given by the syntax and category tables.  There is no
-restriction to ASCII.
-
-E.g. the beginning of words in the following identifier are as marked:
-
-  capitalizedWorDD
-  ^          ^  ^^
-
-Note that these word boundaries only apply for word motion and
-marking commands such as \\[forward-word].  This mode does not affect word
-boundaries found by regexp matching (`\\>', `\\w' &c).
-
-This style of identifiers is common in environments like Java ones,
-where underscores aren't trendy enough.  Capitalization rules are
-sometimes part of the language, e.g. Haskell, which may thus encourage
-such a style.  It is appropriate to add `capitalized-words-mode' to
-the mode hook for programming language modes in which you encounter
-variables like this, e.g. `java-mode-hook'.  It's unlikely to cause
-trouble if such identifiers aren't used.
-
-See also `glasses-mode' and `studlify-word'.
-Obsoletes `c-forward-into-nomenclature'."
-  nil " Caps" nil :group 'programming
-  (set (make-local-variable 'find-word-boundary-function-table)
-       capitalized-find-word-boundary-function-table))
-
-(provide 'cap-words)
-
-;;; cap-words.el ends here
index 44d69d7d0f1e653d25dddd2cad1dbde4f8b61997..d57d601cd7aa5935a8b00486af7b782c5ab2e08a 100644 (file)
@@ -61,7 +61,6 @@
 (cc-bytecomp-defun c-backward-token-1)
 (cc-bytecomp-defun c-beginning-of-statement-1)
 (cc-bytecomp-defun c-backward-sws)
-(cc-bytecomp-defun c-forward-sws)
 
 (defvar awk-mode-syntax-table
   (let ((st (make-syntax-table)))
index 4f205d62a4cd3f714ac4a06ca035ddde120640d7..afbd577b10dc71fb503c9891ba7760343bd70d7d 100644 (file)
@@ -1090,7 +1090,7 @@ numeric argument is supplied, or the point is inside a literal."
 
   (interactive "*P")
   (let ((c-echo-syntactic-information-p nil)
-       final-pos close-paren-inserted found-delim case-fold-search)
+       final-pos found-delim case-fold-search)
 
     (self-insert-command (prefix-numeric-value arg))
     (setq final-pos (point))
index 1606cfb33575df70fb66ab9f13a7d8fe011f4880..dc31fde131dce09288cddaabac41d200aece6c2d 100644 (file)
               font-lock-keywords)))
       (cc-load "cc-fix")))
 
+;; XEmacs 21.4 doesn't have `delete-dups'.
+(eval-and-compile
+  (if (and (not (fboundp 'delete-dups))
+          (not (featurep 'cc-fix)))
+      (cc-load "cc-fix")))
 \f
 ;;; Variables also used at compile time.
 
@@ -823,6 +828,8 @@ be after it."
 (defmacro c-with-syntax-table (table &rest code)
   ;; Temporarily switches to the specified syntax table in a failsafe
   ;; way to execute code.
+  ;; Maintainers' note: If TABLE is `c++-template-syntax-table', DON'T call
+  ;; any forms inside this that call `c-parse-state'.  !!!!
   `(let ((c-with-syntax-table-orig-table (syntax-table)))
      (unwind-protect
         (progn
@@ -911,6 +918,12 @@ MODE is either a mode symbol or a list of mode symbols."
                               (cc-bytecomp-fboundp 'delete-extent)
                               (cc-bytecomp-fboundp 'map-extents))))
 
+(defconst c-<-as-paren-syntax '(4 . ?>))
+(put 'c-<-as-paren-syntax 'syntax-table c-<-as-paren-syntax)
+
+(defconst c->-as-paren-syntax '(5 . ?<))
+(put 'c->-as-paren-syntax 'syntax-table c->-as-paren-syntax)
+
 ;; `c-put-char-property' is complex enough in XEmacs and Emacs < 21 to
 ;; make it a function.
 (defalias 'c-put-char-property-fun
@@ -1186,9 +1199,6 @@ been put there by c-put-char-property.  POINT remains unchanged."
     (if (< (point) start)
        (goto-char (point-max)))))
 
-(defconst c-<-as-paren-syntax '(4 . ?>))
-(put 'c-<-as-paren-syntax 'syntax-table c-<-as-paren-syntax)
-
 (defsubst c-mark-<-as-paren (pos)
   ;; Mark the "<" character at POS as a template opener using the
   ;; `syntax-table' property via the `category' property.
@@ -1199,9 +1209,6 @@ been put there by c-put-char-property.  POINT remains unchanged."
   ;; cheaply.  We use this, for instance, in `c-parse-state'.
   (c-put-char-property pos 'category 'c-<-as-paren-syntax))
 
-(defconst c->-as-paren-syntax '(5 . ?<))
-(put 'c->-as-paren-syntax 'syntax-table c->-as-paren-syntax)
-
 (defsubst c-mark->-as-paren (pos)
   ;; Mark the ">" character at POS as an sexp list closer using the
   ;; syntax-table property.
@@ -1417,8 +1424,8 @@ Notably, null elements in LIST are ignored."
 
 (defun c-make-keywords-re (adorn list &optional mode)
   "Make a regexp that matches all the strings the list.
-Duplicates and nil elements in the list are removed.  The resulting
-regexp may contain zero or more submatch expressions.
+Duplicates and nil elements in the list are removed.  The
+resulting regexp may contain zero or more submatch expressions.
 
 If ADORN is t there will be at least one submatch and the first
 surrounds the matched alternative, and the regexp will also not match
@@ -1436,11 +1443,7 @@ The optional MODE specifies the language to get `c-nonsymbol-key' from
 when it's needed.  The default is the current language taken from
 `c-buffer-is-cc-mode'."
 
-  (let (unique)
-    (dolist (elt list)
-      (unless (member elt unique)
-       (push elt unique)))
-    (setq list (delete nil unique)))
+  (setq list (delete nil (delete-dups list)))
   (if list
       (let (re)
 
@@ -1554,6 +1557,8 @@ non-nil, a caret is prepended to invert the set."
 
 (cc-bytecomp-defvar open-paren-in-column-0-is-defun-start)
 
+(defvar lookup-syntax-properties)       ;XEmacs.
+
 (defconst c-emacs-features
   (let (list)
 
@@ -1634,13 +1639,13 @@ non-nil, a caret is prepended to invert the set."
                  "support for the `syntax-table' text property "
                  "is required.")))
 
-       ;; Find out if generic comment delimiters work.
+       ;; Find out if "\\s!" (generic comment delimiters) work.
        (c-safe
          (modify-syntax-entry ?x "!")
          (if (string-match "\\s!" "x")
              (setq list (cons 'gen-comment-delim list))))
 
-       ;; Find out if generic string delimiters work.
+       ;; Find out if "\\s|" (generic string delimiters) work.
        (c-safe
          (modify-syntax-entry ?x "|")
          (if (string-match "\\s|" "x")
@@ -1687,7 +1692,8 @@ non-nil, a caret is prepended to invert the set."
       (kill-buffer buf))
 
     ;; See if `parse-partial-sexp' returns the eighth element.
-    (if (c-safe (>= (length (save-excursion (parse-partial-sexp (point) (point))))
+    (if (c-safe (>= (length (save-excursion
+                             (parse-partial-sexp (point) (point))))
                    10))
        (setq list (cons 'pps-extended-state list))
       (error (concat
@@ -1703,9 +1709,8 @@ might be present:
 
 '8-bit              8 bit syntax entry flags (XEmacs style).
 '1-bit              1 bit syntax entry flags (Emacs style).
-'argumentative-bod-function         beginning-of-defun passes ARG through
-                    to a non-null beginning-of-defun-function.  It is assumed
-                   the end-of-defun does the same thing.
+'argumentative-bod-function        beginning-of-defun and end-of-defun pass
+                   ARG through to beginning/end-of-defun-function.
 'syntax-properties  It works to override the syntax for specific characters
                    in the buffer with the 'syntax-table property.  It's
                    always set - CC Mode no longer works in emacsen without
@@ -1800,11 +1805,11 @@ system."
   (put mode 'c-fallback-mode base-mode))
 
 (defvar c-lang-constants (make-vector 151 0))
-;; This obarray is a cache to keep track of the language constants
-;; defined by `c-lang-defconst' and the evaluated values returned by
-;; `c-lang-const'.  It's mostly used at compile time but it's not
+;;   Obarray used as a cache to keep track of the language constants.
+;; The constants stored are those defined by `c-lang-defconst' and the values
+;; computed by `c-lang-const'.  It's mostly used at compile time but it's not
 ;; stored in compiled files.
-;;
+
 ;; The obarray contains all the language constants as symbols.  The
 ;; value cells hold the evaluated values as alists where each car is
 ;; the mode name symbol and the corresponding cdr is the evaluated
@@ -1827,19 +1832,18 @@ system."
               (t
                ;; Being evaluated interactively.
                (buffer-file-name)))))
-    (and file (file-name-base file))))
+    (and file
+        (file-name-sans-extension
+         (file-name-nondirectory file)))))
 
 (defmacro c-lang-defconst-eval-immediately (form)
   "Can be used inside a VAL in `c-lang-defconst' to evaluate FORM
 immediately, i.e. at the same time as the `c-lang-defconst' form
 itself is evaluated."
   ;; Evaluate at macro expansion time, i.e. in the
-  ;; `cl-macroexpand-all' inside `c-lang-defconst'.
+  ;; `macroexpand-all' inside `c-lang-defconst'.
   (eval form))
 
-;; Only used at compile time - suppress "might not be defined at runtime".
-(declare-function cl-macroexpand-all "cl" (form &optional env))
-
 (defmacro c-lang-defconst (name &rest args)
   "Set the language specific values of the language constant NAME.
 The second argument can optionally be a docstring.  The rest of the
@@ -1881,7 +1885,7 @@ constant.  A file is identified by its base name."
 
   (let* ((sym (intern (symbol-name name) c-lang-constants))
         ;; Make `c-lang-const' expand to a straightforward call to
-        ;; `c-get-lang-constant' in `cl-macroexpand-all' below.
+        ;; `c-get-lang-constant' in `macroexpand-all' below.
         ;;
         ;; (The default behavior, i.e. to expand to a call inside
         ;; `eval-when-compile' should be equivalent, since that macro
@@ -1898,7 +1902,7 @@ constant.  A file is identified by its base name."
         pre-files)
 
     (or (symbolp name)
-       (error "Not a symbol: %s" name))
+       (error "Not a symbol: %S" name))
 
     (when (stringp (car-safe args))
       ;; The docstring is hardly used anywhere since there's no normal
@@ -1908,7 +1912,7 @@ constant.  A file is identified by its base name."
       (setq args (cdr args)))
 
     (or args
-       (error "No assignments in `c-lang-defconst' for %s" name))
+       (error "No assignments in `c-lang-defconst' for %S" name))
 
     ;; Rework ARGS to an association list to make it easier to handle.
     ;; It's reversed at the same time to make it easier to implement
@@ -1922,17 +1926,17 @@ constant.  A file is identified by its base name."
                   ((listp (car args))
                    (mapcar (lambda (lang)
                              (or (symbolp lang)
-                                 (error "Not a list of symbols: %s"
+                                 (error "Not a list of symbols: %S"
                                         (car args)))
                              (intern (concat (symbol-name lang)
                                              "-mode")))
                            (car args)))
-                  (t (error "Not a symbol or a list of symbols: %s"
+                  (t (error "Not a symbol or a list of symbols: %S"
                             (car args)))))
            val)
 
        (or (cdr args)
-           (error "No value for %s" (car args)))
+           (error "No value for %S" (car args)))
        (setq args (cdr args)
              val (car args))
 
@@ -1944,9 +1948,9 @@ constant.  A file is identified by its base name."
        ;; reason, but we also use this expansion handle
        ;; `c-lang-defconst-eval-immediately' and to register
        ;; dependencies on the `c-lang-const's in VAL.)
-       (setq val (cl-macroexpand-all val))
+       (setq val (macroexpand-all val))
 
-       (setq bindings (cons (cons assigned-mode val) bindings)
+       (setq bindings `(cons (cons ',assigned-mode (lambda () ,val)) ,bindings)
              args (cdr args))))
 
     ;; Compile in the other files that have provided source
@@ -1958,7 +1962,7 @@ constant.  A file is identified by its base name."
                     (mapcar 'car (get sym 'source))))
 
     `(eval-and-compile
-       (c-define-lang-constant ',name ',bindings
+       (c-define-lang-constant ',name ,bindings
                               ,@(and pre-files `(',pre-files))))))
 
 (put 'c-lang-defconst 'lisp-indent-function 1)
@@ -2023,19 +2027,16 @@ language.  NAME and LANG are not evaluated so they should not be
 quoted."
 
   (or (symbolp name)
-      (error "Not a symbol: %s" name))
+      (error "Not a symbol: %S" name))
   (or (symbolp lang)
-      (error "Not a symbol: %s" lang))
+      (error "Not a symbol: %S" lang))
 
   (let ((sym (intern (symbol-name name) c-lang-constants))
-       mode source-files args)
+       (mode (when lang (intern (concat (symbol-name lang) "-mode")))))
 
-    (when lang
-      (setq mode (intern (concat (symbol-name lang) "-mode")))
-      (unless (get mode 'c-mode-prefix)
-       (error
-        "Unknown language %S since it got no `c-mode-prefix' property"
-        (symbol-name lang))))
+    (or (get mode 'c-mode-prefix) (null mode)
+        (error "Unknown language %S: no `c-mode-prefix' property"
+               lang))
 
     (if (eq c-lang-const-expansion 'immediate)
        ;; No need to find out the source file(s) when we evaluate
@@ -2043,49 +2044,56 @@ quoted."
        ;; `source' property.
        `',(c-get-lang-constant name nil mode)
 
-      (let ((file (c-get-current-file)))
-       (if file (setq file (intern file)))
-       ;; Get the source file(s) that must be loaded to get the value
-       ;; of the constant.  If the symbol isn't defined yet we assume
-       ;; that its definition will come later in this file, and thus
-       ;; are no file dependencies needed.
-       (setq source-files (nreverse
-                           ;; Reverse to get the right load order.
-                           (apply 'nconc
-                                  (mapcar (lambda (elem)
-                                            (if (eq file (car elem))
-                                                nil ; Exclude our own file.
-                                              (list (car elem))))
-                                          (get sym 'source))))))
-
-      ;; Make some effort to do a compact call to
-      ;; `c-get-lang-constant' since it will be compiled in.
-      (setq args (and mode `(',mode)))
-      (if (or source-files args)
-         (setq args (cons (and source-files `',source-files)
-                          args)))
-
-      (if (or (eq c-lang-const-expansion 'call)
-             (and (not c-lang-const-expansion)
-                  (not mode))
-             load-in-progress
-             (not (boundp 'byte-compile-dest-file))
-             (not (stringp byte-compile-dest-file)))
-         ;; Either a straight call is requested in the context, or
-         ;; we're in an "uncontrolled" context and got no language,
-         ;; or we're not being byte compiled so the compile time
-         ;; stuff below is unnecessary.
-         `(c-get-lang-constant ',name ,@args)
-
-       ;; Being compiled.  If the loading and compiling version is
-       ;; the same we use a value that is evaluated at compile time,
-       ;; otherwise it's evaluated at runtime.
-       `(if (eq c-version-sym ',c-version-sym)
-            (cc-eval-when-compile
-              (c-get-lang-constant ',name ,@args))
-          (c-get-lang-constant ',name ,@args))))))
-
-(defvar c-lang-constants-under-evaluation nil)
+      (let ((source-files
+             (let ((file (c-get-current-file)))
+               (if file (setq file (intern file)))
+               ;; Get the source file(s) that must be loaded to get the value
+               ;; of the constant.  If the symbol isn't defined yet we assume
+               ;; that its definition will come later in this file, and thus
+               ;; are no file dependencies needed.
+               (nreverse
+                ;; Reverse to get the right load order.
+                (apply 'nconc
+                       (mapcar (lambda (elem)
+                                 (if (eq file (car elem))
+                                     nil ; Exclude our own file.
+                                   (list (car elem))))
+                               (get sym 'source))))))
+            ;; Make some effort to do a compact call to
+            ;; `c-get-lang-constant' since it will be compiled in.
+            (args (and mode `(',mode))))
+
+        (if (or source-files args)
+            (push (and source-files `',source-files) args))
+
+        (if (or (eq c-lang-const-expansion 'call)
+                (and (not c-lang-const-expansion)
+                     (not mode))
+                load-in-progress
+                (not (boundp 'byte-compile-dest-file))
+                (not (stringp byte-compile-dest-file)))
+            ;; Either a straight call is requested in the context, or
+            ;; we're in an "uncontrolled" context and got no language,
+            ;; or we're not being byte compiled so the compile time
+            ;; stuff below is unnecessary.
+            `(c-get-lang-constant ',name ,@args)
+
+          ;; Being compiled.  If the loading and compiling version is
+          ;; the same we use a value that is evaluated at compile time,
+          ;; otherwise it's evaluated at runtime.
+          `(if (eq c-version-sym ',c-version-sym)
+               (cc-eval-when-compile
+                 (c-get-lang-constant ',name ,@args))
+             (c-get-lang-constant ',name ,@args)))))))
+
+(defvar c-lang-constants-under-evaluation nil
+  "Alist of constants in the process of being evaluated.
+The `cdr' of each entry indicates how far we've looked in the list
+of definitions, so that the def for var FOO in c-mode can be defined in
+terms of the def for that same var FOO (which will then rely on the
+fallback definition for all modes, to break the cycle).")
+
+(defconst c-lang--novalue "novalue")
 
 (defun c-get-lang-constant (name &optional source-files mode)
   ;; Used by `c-lang-const'.
@@ -2151,7 +2159,7 @@ quoted."
                   ;; mode might have an explicit entry before that.
                   (eq (setq value (c-find-assignment-for-mode
                                    (cdr source-pos) mode nil name))
-                      c-lang-constants)
+                      c-lang--novalue)
                   ;; Try again with the fallback mode from the
                   ;; original position.  Note that
                   ;; `c-buffer-is-cc-mode' still is the real mode if
@@ -2159,22 +2167,22 @@ quoted."
                   (eq (setq value (c-find-assignment-for-mode
                                    (setcdr source-pos backup-source-pos)
                                    fallback t name))
-                      c-lang-constants)))
+                      c-lang--novalue)))
              ;; A simple lookup with no fallback mode.
              (eq (setq value (c-find-assignment-for-mode
                               (cdr source-pos) mode t name))
-                 c-lang-constants))
+                 c-lang--novalue))
            (error
-            "`%s' got no (prior) value in %s (might be a cyclic reference)"
+            "`%s' got no (prior) value in %S (might be a cyclic reference)"
             name mode))
 
        (condition-case err
-           (setq value (eval value))
+           (setq value (funcall value))
          (error
           ;; Print a message to aid in locating the error.  We don't
           ;; print the error itself since that will be done later by
           ;; some caller higher up.
-          (message "Eval error in the `c-lang-defconst' for `%s' in %s:"
+          (message "Eval error in the `c-lang-defconst' for `%S' in %s:"
                    sym mode)
           (makunbound sym)
           (signal (car err) (cdr err))))
@@ -2182,13 +2190,13 @@ quoted."
        (set sym (cons (cons mode value) (symbol-value sym)))
        value))))
 
-(defun c-find-assignment-for-mode (source-pos mode match-any-lang name)
+(defun c-find-assignment-for-mode (source-pos mode match-any-lang _name)
   ;; Find the first assignment entry that applies to MODE at or after
   ;; SOURCE-POS.  If MATCH-ANY-LANG is non-nil, entries with `t' as
   ;; the language list are considered to match, otherwise they don't.
   ;; On return SOURCE-POS is updated to point to the next assignment
   ;; after the returned one.  If no assignment is found,
-  ;; `c-lang-constants' is returned as a magic value.
+  ;; `c-lang--novalue' is returned as a magic value.
   ;;
   ;; SOURCE-POS is a vector that points out a specific assignment in
   ;; the double alist that's used in the `source' property.  The first
@@ -2244,7 +2252,7 @@ quoted."
                match-any-lang)
          (throw 'found (cdr assignment))))
 
-      c-lang-constants)))
+      c-lang--novalue)))
 
 (defun c-lang-major-mode-is (mode)
   ;; `c-major-mode-is' expands to a call to this function inside
index f86e4b2c48a4e3fc985b9dfe0ffe8d19829d5b7f..9a2531d1e9933b731b54a4a1426d9c21e99703da 100644 (file)
 (cc-require-when-compile 'cc-langs)
 (cc-require 'cc-vars)
 
+(eval-when-compile (require 'cl))
+
 \f
 ;; Make declarations for all the `c-lang-defvar' variables in cc-langs.
 
 (defmacro c-declare-lang-variables ()
   `(progn
-     ,@(apply 'nconc
-             (mapcar (lambda (init)
-                       `(,(if (elt init 2)
-                              `(defvar ,(car init) nil ,(elt init 2))
-                            `(defvar ,(car init) nil))
-                         (make-variable-buffer-local ',(car init))))
-                     (cdr c-lang-variable-inits)))))
+     ,@(mapcan (lambda (init)
+                `(,(if (elt init 2)
+                       `(defvar ,(car init) nil ,(elt init 2))
+                     `(defvar ,(car init) nil))
+                  (make-variable-buffer-local ',(car init))))
+              (cdr c-lang-variable-inits))))
 (c-declare-lang-variables)
 
 \f
@@ -826,7 +827,6 @@ comment at the start of cc-engine.el for more info."
            ;; Record this as the first token if not starting inside it.
            (setq tok start))
 
-
        ;; The following while loop goes back one sexp (balanced parens,
        ;; etc. with contents, or symbol or suchlike) each iteration.  This
        ;; movement is accomplished with a call to c-backward-sexp approx 170
@@ -1033,7 +1033,10 @@ comment at the start of cc-engine.el for more info."
                         ;; Just gone back over a brace block?
                         ((and
                           (eq (char-after) ?{)
-                          (not (c-looking-at-inexpr-block lim nil t)))
+                          (not (c-looking-at-inexpr-block lim nil t))
+                          (save-excursion
+                            (c-backward-token-2 1 t nil)
+                            (not (looking-at "=\\([^=]\\|$\\)"))))
                          (save-excursion
                            (c-forward-sexp) (point)))
                         ;; Just gone back over some paren block?
@@ -2156,7 +2159,6 @@ comment at the start of cc-engine.el for more info."
 ;; the middle of the desert, as long as it is not within a brace pair
 ;; recorded in `c-state-cache' or a paren/bracket pair.
 
-
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; We maintain a simple cache of positions which aren't in a literal, so as to
 ;; speed up testing for non-literality.
@@ -2219,7 +2221,8 @@ comment at the start of cc-engine.el for more info."
        ((and (not not-in-delimiter)    ; inside a comment starter
             (not (bobp))
             (progn (backward-char)
-                   (and (not (looking-at "\\s!"))
+                   (and (not (and (memq 'category-properties c-emacs-features)
+                                  (looking-at "\\s!")))
                         (looking-at c-comment-start-regexp))))
        (setq ty (if (looking-at c-block-comment-start-regexp) 'c 'c++)
              co-st (point))
@@ -2776,7 +2779,7 @@ comment at the start of cc-engine.el for more info."
        paren+1               ; Pos after some opening or closing paren.
        paren+1s              ; A list of `paren+1's; used to determine a
                              ; good-pos.
-       bra+1 ce+1            ; just after L/R bra-ces.
+       bra+1                 ; just after L bra-ce.
        bra+1s                ; list of OLD values of bra+1.
        mstart)               ; start of a macro.
 
@@ -3292,7 +3295,7 @@ comment at the start of cc-engine.el for more info."
       (setq res (c-remove-stale-state-cache start-point here here-bopl))
       (setq cache-pos (car res)
            scan-backward-pos (cadr res)
-           cons-separated (car (cddr res)) 
+           cons-separated (car (cddr res))
            bopl-state (cadr (cddr res))) ; will be nil if (< here-bopl
                                        ; start-point)
       (if (and scan-backward-pos
@@ -3388,6 +3391,7 @@ comment at the start of cc-engine.el for more info."
 
 (defvar c-parse-state-point nil)
 (defvar c-parse-state-state nil)
+(make-variable-buffer-local 'c-parse-state-state)
 (defun c-record-parse-state-state ()
   (setq c-parse-state-point (point))
   (setq c-parse-state-state
@@ -4162,7 +4166,7 @@ comment at the start of cc-engine.el for more info."
   ;; Use `parse-partial-sexp' from a safe position down to the point to check
   ;; if it's outside comments and strings.
   (save-excursion
-    (let ((pos (point)) safe-pos state pps-end-pos)
+    (let ((pos (point)) safe-pos state)
       ;; Pick a safe position as close to the point as possible.
       ;;
       ;; FIXME: Consult `syntax-ppss' here if our cache doesn't give a good
@@ -4244,16 +4248,18 @@ comment at the start of cc-engine.el for more info."
          ;; loops when it hasn't succeeded.
          (while
              (and
-              (< (skip-chars-backward skip-chars limit) 0)
+              (let ((pos (point)))
+                (while (and
+                        (< (skip-chars-backward skip-chars limit) 0)
+                        ;; Don't stop inside a literal.
+                        (when (setq lit-beg (c-ssb-lit-begin))
+                          (goto-char lit-beg)
+                          t)))
+                (< (point) pos))
 
               (let ((pos (point)) state-2 pps-end-pos)
 
                 (cond
-                 ;; Don't stop inside a literal
-                 ((setq lit-beg (c-ssb-lit-begin))
-                  (goto-char lit-beg)
-                  t)
-
                  ((and paren-level
                        (save-excursion
                          (setq state-2 (parse-partial-sexp
@@ -4854,14 +4860,17 @@ comment at the start of cc-engine.el for more info."
   ;; it should return non-nil to ensure that the next search will find them.
   ;;
   ;; Such a spot is:
-  ;; o  The first token after bob.
-  ;; o  The first token after the end of submatch 1 in
-  ;;    `c-decl-prefix-or-start-re' when that submatch matches.
-  ;; o  The start of each `c-decl-prefix-or-start-re' match when
-  ;;    submatch 1 doesn't match.
-  ;; o  The first token after the end of each occurrence of the
-  ;;    `c-type' text property with the value `c-decl-end', provided
-  ;;    `c-type-decl-end-used' is set.
+  ;; o The first token after bob.
+  ;; o The first token after the end of submatch 1 in
+  ;;   `c-decl-prefix-or-start-re' when that submatch matches.  This
+  ;;   submatch is typically a (L or R) brace or paren, a ;, or a ,.
+  ;; o The start of each `c-decl-prefix-or-start-re' match when
+  ;;   submatch 1 doesn't match.  This is, for example, the keyword
+  ;;   "class" in Pike.
+  ;; o The start of a previously recognized declaration; "recognized"
+  ;;   means that the last char of the previous token has a `c-type'
+  ;;   text property with the value `c-decl-end'; this only holds
+  ;;   when `c-type-decl-end-used' is set.
   ;;
   ;; Only a spot that match CFD-DECL-RE and whose face is in the
   ;; CFD-FACE-CHECKLIST list causes CFD-FUN to be called.  The face
@@ -4893,7 +4902,7 @@ comment at the start of cc-engine.el for more info."
   ;;
   ;; This function might do hidden buffer changes.
 
-  (let ((cfd-start-pos (point))
+  (let ((cfd-start-pos (point))                ; never changed
        (cfd-buffer-end (point-max))
        ;; The end of the token preceding the decl spot last found
        ;; with `c-decl-prefix-or-start-re'.  `cfd-limit' if there's
@@ -4932,10 +4941,20 @@ comment at the start of cc-engine.el for more info."
       ;; statement or declaration, which is earlier than the first
       ;; returned match.
 
+      ;; This `cond' moves back over any literals or macros.  It has special
+      ;; handling for when the region being searched is entirely within a
+      ;; macro.  It sets `cfd-continue-pos' (unless we've reached
+      ;; `cfd-limit').
       (cond
        ;; First we need to move to a syntactically relevant position.
        ;; Begin by backing out of comment or string literals.
+       ;;
+       ;; This arm of the cond actually triggers if we're in a literal,
+       ;; and cfd-limit is at most at BONL.
        ((and
+        ;; This arm of the `and' moves backwards out of a literal when
+        ;; the face at point is a literal face.  In this case, its value
+        ;; is always non-nil.
         (when (c-got-face-at (point) c-literal-faces)
           ;; Try to use the faces to back up to the start of the
           ;; literal.  FIXME: What if the point is on a declaration
@@ -4964,7 +4983,7 @@ comment at the start of cc-engine.el for more info."
             (let ((range (c-literal-limits)))
               (if range (goto-char (car range)))))
 
-          (setq start-in-literal (point)))
+          (setq start-in-literal (point))) ; end of `and' arm.
 
         ;; The start is in a literal.  If the limit is in the same
         ;; one we don't have to find a syntactic position etc.  We
@@ -4979,18 +4998,18 @@ comment at the start of cc-engine.el for more info."
                                (point) 'face nil cfd-limit))
                    (and (< (point) cfd-limit)
                         (c-got-face-at (point) c-literal-faces))))
-          (= (point) cfd-limit)))
+          (= (point) cfd-limit)))      ; end of `cond' arm condition
 
        ;; Completely inside a literal.  Set up variables to trig the
        ;; (< cfd-continue-pos cfd-start-pos) case below and it'll
        ;; find a suitable start position.
-       (setq cfd-continue-pos start-in-literal))
+       (setq cfd-continue-pos start-in-literal)) ; end of `cond' arm
 
        ;; Check if the region might be completely inside a macro, to
        ;; optimize that like the completely-inside-literal above.
        ((save-excursion
          (and (= (forward-line 1) 0)
-              (bolp)                   ; forward-line has funny behavior at eob.
+              (bolp)                 ; forward-line has funny behavior at eob.
               (>= (point) cfd-limit)
               (progn (backward-char)
                      (eq (char-before) ?\\))))
@@ -5000,6 +5019,8 @@ comment at the start of cc-engine.el for more info."
        (setq cfd-continue-pos (1- cfd-start-pos)
              start-in-macro t))
 
+       ;; The default arm of the `cond' moves back over any macro we're in
+       ;; and over any syntactic WS.  It sets `c-find-decl-syntactic-pos'.
        (t
        ;; Back out of any macro so we don't miss any declaration
        ;; that could follow after it.
@@ -5046,10 +5067,10 @@ comment at the start of cc-engine.el for more info."
                  (< (point) cfd-limit))
            ;; Do an initial search now.  In the bob case above it's
            ;; only done to search for a `c-decl-end' spot.
-           (c-find-decl-prefix-search))
+           (c-find-decl-prefix-search)) ; sets cfd-continue-pos
 
          (setq c-find-decl-match-pos (and (< cfd-match-pos cfd-start-pos)
-                                          cfd-match-pos)))))
+                                          cfd-match-pos))))) ; end of `cond'
 
       ;; Advance `cfd-continue-pos' if it's before the start position.
       ;; The closest continue position that might have effect at or
@@ -5108,7 +5129,7 @@ comment at the start of cc-engine.el for more info."
          ;; `cfd-match-pos' so we can continue at the start position.
          ;; (Note that we don't get here if the first match is below
          ;; it.)
-         (goto-char cfd-start-pos)))
+         (goto-char cfd-start-pos)))   ; end of `cond'
 
        ;; Delete found matches if they are before our new continue
        ;; position, so that `c-find-decl-prefix-search' won't back up
@@ -5117,7 +5138,7 @@ comment at the start of cc-engine.el for more info."
        (when (and cfd-re-match (< cfd-re-match cfd-continue-pos))
          (setq cfd-re-match nil))
        (when (and cfd-prop-match (< cfd-prop-match cfd-continue-pos))
-         (setq cfd-prop-match nil)))
+         (setq cfd-prop-match nil)))   ; end of `when'
 
       (if syntactic-pos
          ;; This is the normal case and we got a proper syntactic
@@ -5138,9 +5159,10 @@ comment at the start of cc-engine.el for more info."
        ;; good start position for the search, so do it.
        (c-find-decl-prefix-search)))
 
-    ;; Now loop.  Round what?  (ACM, 2006/7/5).  We already got the first match.
-
+    ;; Now loop, one decl spot per iteration.  We already have the first
+    ;; match in `cfd-match-pos'.
     (while (progn
+            ;; Go forward over "false matches", one per iteration.
             (while (and
                     (< cfd-match-pos cfd-limit)
 
@@ -5181,10 +5203,10 @@ comment at the start of cc-engine.el for more info."
                          (goto-char cfd-continue-pos)
                          t)))
 
-                    (< (point) cfd-limit))
-              (c-find-decl-prefix-search))
+                    (< (point) cfd-limit)) ; end of "false matches" condition
+              (c-find-decl-prefix-search)) ; end of "false matches" loop
 
-            (< (point) cfd-limit))
+            (< (point) cfd-limit))   ; end of condition for "decl-spot" while
 
       (when (and
             (>= (point) cfd-start-pos)
@@ -5212,7 +5234,7 @@ comment at the start of cc-engine.el for more info."
                   ;; The matched token was the last thing in the macro,
                   ;; so the whole match is bogus.
                   (setq cfd-macro-end 0)
-                  nil))))
+                  nil))))              ; end of when condition
 
        (c-debug-put-decl-spot-faces cfd-match-pos (point))
        (if (funcall cfd-fun cfd-match-pos (/= cfd-macro-end 0))
@@ -5525,8 +5547,6 @@ comment at the start of cc-engine.el for more info."
       (when need-new-end
        (and (> new-end c-new-END) (setq c-new-END new-end))))))
 
-
-
 (defun c-after-change-check-<>-operators (beg end)
   ;; This is called from `after-change-functions' when
   ;; c-recognize-<>-arglists' is set.  It ensures that no "<" or ">"
@@ -5861,7 +5881,6 @@ comment at the start of cc-engine.el for more info."
   ;; Recursive part of `c-forward-<>-arglist'.
   ;;
   ;; This function might do hidden buffer changes.
-
   (let ((start (point)) res pos tmp
        ;; Cover this so that any recorded found type ranges are
        ;; automatically lost if it turns out to not be an angle
@@ -5938,7 +5957,7 @@ comment at the start of cc-engine.el for more info."
                  ;; Either an operator starting with '>' or the end of
                  ;; the angle bracket arglist.
 
-                 (if (looking-at c->-op-cont-regexp)
+                 (if (looking-at c->-op-without->-cont-regexp)
                      (progn
                        (goto-char (match-end 0))
                        t)              ; Continue the loop.
@@ -5987,7 +6006,6 @@ comment at the start of cc-engine.el for more info."
                                       (c-keyword-member
                                        (c-keyword-sym (match-string 1))
                                        'c-<>-type-kwds)))))))
-
                      ;; It was an angle bracket arglist.
                      (setq c-record-found-types subres)
 
@@ -6280,7 +6298,8 @@ comment at the start of cc-engine.el for more info."
   ;;     `*-font-lock-extra-types');
   ;;   o - 'prefix if it's a known prefix of a type;
   ;;   o - 'found if it's a type that matches one in `c-found-types';
-  ;;   o - 'maybe if it's an identifier that might be a type; or
+  ;;   o - 'maybe if it's an identifier that might be a type;
+  ;;   o - 'decltype if it's a decltype(variable) declaration; - or
   ;;   o -  nil if it can't be a type (the point isn't moved then).
   ;;
   ;; The point is assumed to be at the beginning of a token.
@@ -6310,6 +6329,16 @@ comment at the start of cc-engine.el for more info."
        (setq res 'prefix)))
 
     (cond
+     ((looking-at c-typeof-key) ; e.g. C++'s "decltype".
+      (goto-char (match-end 1))
+      (c-forward-syntactic-ws)
+      (setq res (and (eq (char-after) ?\()
+                    (c-safe (c-forward-sexp))
+                    'decltype))
+      (if res
+         (c-forward-syntactic-ws)
+       (goto-char start)))
+
      ((looking-at c-type-prefix-key) ; e.g. "struct", "class", but NOT
                                     ; "typedef".
       (goto-char (match-end 1))
@@ -6436,7 +6465,7 @@ comment at the start of cc-engine.el for more info."
       ;; of these alter the classification of the found type, since
       ;; these operators typically are allowed in normal expressions
       ;; too.
-      (when c-opt-type-suffix-key
+      (when c-opt-type-suffix-key      ; e.g. "..."
        (while (looking-at c-opt-type-suffix-key)
          (goto-char (match-end 1))
          (c-forward-syntactic-ws)))
@@ -6648,6 +6677,13 @@ comment at the start of cc-engine.el for more info."
   ;;     Foo::Foo (int b) : Base (b) {}
   ;; car ^                ^ point
   ;;
+  ;;     auto foo = 5;
+  ;;      car ^   ^ point
+  ;;     auto cplusplus_11 (int a, char *b) -> decltype (bar):
+  ;;      car ^                             ^ point
+  ;;
+  ;;
+  ;;
   ;;   The cdr of the return value is non-nil when a
   ;;   `c-typedef-decl-kwds' specifier is found in the declaration.
   ;;   Specifically it is a dotted pair (A . B) where B is t when a
@@ -6713,6 +6749,10 @@ comment at the start of cc-engine.el for more info."
        ;; If `backup-at-type' is nil then the other variables have
        ;; undefined values.
        backup-at-type backup-type-start backup-id-start
+       ;; This stores `kwd-sym' of the symbol before the current one.
+       ;; This is needed to distinguish the C++11 version of "auto" from
+       ;; the pre C++11 meaning.
+       backup-kwd-sym
        ;; Set if we've found a specifier (apart from "typedef") that makes
        ;; the defined identifier(s) types.
        at-type-decl
@@ -6721,6 +6761,10 @@ comment at the start of cc-engine.el for more info."
        ;; Set if we've found a specifier that can start a declaration
        ;; where there's no type.
        maybe-typeless
+       ;; Save the value of kwd-sym between loops of the "Check for a
+       ;; type" loop.  Needed to distinguish a C++11 "auto" from a pre
+       ;; C++11 one.
+       prev-kwd-sym
        ;; If a specifier is found that also can be a type prefix,
        ;; these flags are set instead of those above.  If we need to
        ;; back up an identifier, they are copied to the real flag
@@ -6738,6 +6782,8 @@ comment at the start of cc-engine.el for more info."
        backup-if-not-cast
        ;; For casts, the return position.
        cast-end
+       ;; Have we got a new-style C++11 "auto"?
+       new-style-auto
        ;; Save `c-record-type-identifiers' and
        ;; `c-record-ref-identifiers' since ranges are recorded
        ;; speculatively and should be thrown away if it turns out
@@ -6756,11 +6802,12 @@ comment at the start of cc-engine.el for more info."
        (let* ((start (point)) kwd-sym kwd-clause-end found-type)
 
          ;; Look for a specifier keyword clause.
-         (when (or (looking-at c-prefix-spec-kwds-re)
+         (when (or (looking-at c-prefix-spec-kwds-re) ;FIXME!!! includes auto
                    (and (c-major-mode-is 'java-mode)
                         (looking-at "@[A-Za-z0-9]+")))
-           (if (looking-at c-typedef-key)
-               (setq at-typedef t))
+           (save-match-data
+             (if (looking-at c-typedef-key)
+               (setq at-typedef t)))
            (setq kwd-sym (c-keyword-sym (match-string 1)))
            (save-excursion
              (c-forward-keyword-clause 1)
@@ -6768,6 +6815,12 @@ comment at the start of cc-engine.el for more info."
 
          (when (setq found-type (c-forward-type t)) ; brace-block-too
            ;; Found a known or possible type or a prefix of a known type.
+           (when (and (c-major-mode-is 'c++-mode) ; C++11 style "auto"?
+                      (eq prev-kwd-sym (c-keyword-sym "auto"))
+                      (looking-at "[=(]")) ; FIXME!!! proper regexp.
+             (setq new-style-auto t)
+             (setq found-type nil)
+             (goto-char start))        ; position of foo in "auto foo"
 
            (when at-type
              ;; Got two identifiers with nothing but whitespace
@@ -6786,6 +6839,7 @@ comment at the start of cc-engine.el for more info."
            (setq backup-at-type at-type
                  backup-type-start type-start
                  backup-id-start id-start
+                 backup-kwd-sym kwd-sym
                  at-type found-type
                  type-start start
                  id-start (point)
@@ -6841,6 +6895,7 @@ comment at the start of cc-engine.el for more info."
                    ;; specifier keyword and we know we're in a
                    ;; declaration.
                    (setq at-decl-or-cast t)
+                   (setq prev-kwd-sym kwd-sym)
 
                    (goto-char kwd-clause-end))))
 
@@ -7032,50 +7087,60 @@ comment at the start of cc-engine.el for more info."
 
        (c-forward-syntactic-ws))
 
-      (when (and (or maybe-typeless backup-maybe-typeless)
-                (not got-identifier)
-                (not got-prefix)
-                at-type)
+      (when (or (and new-style-auto
+                    (looking-at c-auto-ops-re))
+               (and (or maybe-typeless backup-maybe-typeless)
+                    (not got-identifier)
+                    (not got-prefix)
+                    at-type))
        ;; Have found no identifier but `c-typeless-decl-kwds' has
        ;; matched so we know we're inside a declaration.  The
        ;; preceding type must be the identifier instead.
        (c-fdoc-shift-type-backward))
 
+      ;; Prepare the "-> type;" for fontification later on.
+      (when (and new-style-auto
+                (looking-at c-haskell-op-re))
+       (save-excursion
+         (goto-char (match-end 0))
+         (c-forward-syntactic-ws)
+         (setq type-start (point))
+         (setq at-type (c-forward-type))))
+
       (setq
        at-decl-or-cast
        (catch 'at-decl-or-cast
 
         ;; CASE 1
-       (when (> paren-depth 0)
-         ;; Encountered something inside parens that isn't matched by
-         ;; the `c-type-decl-*' regexps, so it's not a type decl
-         ;; expression.  Try to skip out to the same paren depth to
-         ;; not confuse the cast check below.
-         (c-safe (goto-char (scan-lists (point) 1 paren-depth)))
-         ;; If we've found a specifier keyword then it's a
-         ;; declaration regardless.
-         (throw 'at-decl-or-cast (eq at-decl-or-cast t)))
-
-       (setq at-decl-end
-             (looking-at (cond ((eq context '<>) "[,>]")
-                               (context "[,\)]")
-                               (t "[,;]"))))
-
-       ;; Now we've collected info about various characteristics of
-       ;; the construct we're looking at.  Below follows a decision
-       ;; tree based on that.  It's ordered to check more certain
-       ;; signs before less certain ones.
-
-       (if got-identifier
-           (progn
-
-             ;; CASE 2
-             (when (and (or at-type maybe-typeless)
-                        (not (or got-prefix got-parens)))
-               ;; Got another identifier directly after the type, so it's a
-               ;; declaration.
-               (throw 'at-decl-or-cast t))
+        (when (> paren-depth 0)
+          ;; Encountered something inside parens that isn't matched by
+          ;; the `c-type-decl-*' regexps, so it's not a type decl
+          ;; expression.  Try to skip out to the same paren depth to
+          ;; not confuse the cast check below.
+          (c-safe (goto-char (scan-lists (point) 1 paren-depth)))
+          ;; If we've found a specifier keyword then it's a
+          ;; declaration regardless.
+          (throw 'at-decl-or-cast (eq at-decl-or-cast t)))
+
+        (setq at-decl-end
+              (looking-at (cond ((eq context '<>) "[,>]")
+                                (context "[,\)]")
+                                (t "[,;]"))))
+
+        ;; Now we've collected info about various characteristics of
+        ;; the construct we're looking at.  Below follows a decision
+        ;; tree based on that.  It's ordered to check more certain
+        ;; signs before less certain ones.
+
+        (if got-identifier
+            (progn
 
+              ;; CASE 2
+              (when (and (or at-type maybe-typeless)
+                         (not (or got-prefix got-parens)))
+                ;; Got another identifier directly after the type, so it's a
+                ;; declaration.
+                (throw 'at-decl-or-cast t))
 
               (when (and got-parens
                          (not got-prefix)
@@ -7097,9 +7162,9 @@ comment at the start of cc-engine.el for more info."
                 (c-fdoc-shift-type-backward)))
 
           ;; Found no identifier.
-         (if backup-at-type
-             (progn
 
+          (if backup-at-type
+              (progn
 
                 ;; CASE 3
                 (when (= (point) start)
@@ -7122,250 +7187,251 @@ comment at the start of cc-engine.el for more info."
                     (setq backup-if-not-cast t)
                     (throw 'at-decl-or-cast t)))
 
-               ;; CASE 4
-               (when (and got-suffix
-                          (not got-prefix)
-                          (not got-parens))
-                 ;; Got a plain list of identifiers followed by some suffix.
-                 ;; If this isn't a cast then the last identifier probably is
-                 ;; the declared one and we should back up to the previous
-                 ;; type.
-                 (setq backup-if-not-cast t)
-                 (throw 'at-decl-or-cast t)))
-
-           ;; CASE 5
-           (when (eq at-type t)
-             ;; If the type is known we know that there can't be any
-             ;; identifier somewhere else, and it's only in declarations in
-             ;; e.g. function prototypes and in casts that the identifier may
-             ;; be left out.
-             (throw 'at-decl-or-cast t))
-
-           (when (= (point) start)
-             ;; Only got a single identifier (parsed as a type so far).
-             ;; CASE 6
-             (if (and
-                  ;; Check that the identifier isn't at the start of an
-                  ;; expression.
-                  at-decl-end
-                  (cond
-                   ((eq context 'decl)
-                    ;; Inside an arglist that contains declarations.  If K&R
-                    ;; style declarations and parenthesis style initializers
-                    ;; aren't allowed then the single identifier must be a
-                    ;; type, else we require that it's known or found
-                    ;; (primitive types are handled above).
-                    (or (and (not c-recognize-knr-p)
-                             (not c-recognize-paren-inits))
-                        (memq at-type '(known found))))
-                   ((eq context '<>)
-                    ;; Inside a template arglist.  Accept known and found
-                    ;; types; other identifiers could just as well be
-                    ;; constants in C++.
-                    (memq at-type '(known found)))))
-                 (throw 'at-decl-or-cast t)
-               ;; CASE 7
-               ;; Can't be a valid declaration or cast, but if we've found a
-               ;; specifier it can't be anything else either, so treat it as
-               ;; an invalid/unfinished declaration or cast.
-               (throw 'at-decl-or-cast at-decl-or-cast))))
-
-         (if (and got-parens
-                  (not got-prefix)
-                  (not context)
-                  (not (eq at-type t))
-                  (or backup-at-type
-                      maybe-typeless
-                      backup-maybe-typeless
-                      (when c-recognize-typeless-decls
-                        (or (not got-suffix)
-                            (not (looking-at
-                                  c-after-suffixed-type-maybe-decl-key))))))
-             ;; Got an empty paren pair and a preceding type that probably
-             ;; really is the identifier.  Shift the type backwards to make
-             ;; the last one the identifier.  This is analogous to the
-             ;; "backtracking" done inside the `c-type-decl-suffix-key' loop
-             ;; above.
-             ;;
-             ;; Exception: In addition to the conditions in that
-             ;; "backtracking" code, do not shift backward if we're not
-             ;; looking at either `c-after-suffixed-type-decl-key' or "[;,]".
-             ;; Since there's no preceding type, the shift would mean that
-             ;; the declaration is typeless.  But if the regexp doesn't match
-             ;; then we will simply fall through in the tests below and not
-             ;; recognize it at all, so it's better to try it as an abstract
-             ;; declarator instead.
-             (c-fdoc-shift-type-backward)
-
-           ;; Still no identifier.
-           ;; CASE 8
-           (when (and got-prefix (or got-parens got-suffix))
-             ;; Require `got-prefix' together with either `got-parens' or
-             ;; `got-suffix' to recognize it as an abstract declarator:
-             ;; `got-parens' only is probably an empty function call.
-             ;; `got-suffix' only can build an ordinary expression together
-             ;; with the preceding identifier which we've taken as a type.
-             ;; We could actually accept on `got-prefix' only, but that can
-             ;; easily occur temporarily while writing an expression so we
-             ;; avoid that case anyway.  We could do a better job if we knew
-             ;; the point when the fontification was invoked.
-             (throw 'at-decl-or-cast t))
-
-           ;; CASE 9
-           (when (and at-type
-                      (not got-prefix)
-                      (not got-parens)
-                      got-suffix-after-parens
-                      (eq (char-after got-suffix-after-parens) ?\())
-             ;; Got a type, no declarator but a paren suffix. I.e. it's a
-             ;; normal function call after all (or perhaps a C++ style object
-             ;; instantiation expression).
-             (throw 'at-decl-or-cast nil))))
-
-       ;; CASE 10
-       (when at-decl-or-cast
-         ;; By now we've located the type in the declaration that we know
-         ;; we're in.
-         (throw 'at-decl-or-cast t))
-
-       ;; CASE 11
-       (when (and got-identifier
-                  (not context)
-                  (looking-at c-after-suffixed-type-decl-key)
-                  (if (and got-parens
+                ;; CASE 4
+                (when (and got-suffix
                            (not got-prefix)
-                           (not got-suffix)
-                           (not (eq at-type t)))
-                      ;; Shift the type backward in the case that there's a
-                      ;; single identifier inside parens.  That can only
-                      ;; occur in K&R style function declarations so it's
-                      ;; more likely that it really is a function call.
-                      ;; Therefore we only do this after
-                      ;; `c-after-suffixed-type-decl-key' has matched.
-                      (progn (c-fdoc-shift-type-backward) t)
-                    got-suffix-after-parens))
-         ;; A declaration according to `c-after-suffixed-type-decl-key'.
-         (throw 'at-decl-or-cast t))
-
-       ;; CASE 12
-       (when (and (or got-prefix (not got-parens))
-                  (memq at-type '(t known)))
-         ;; It's a declaration if a known type precedes it and it can't be a
-         ;; function call.
-         (throw 'at-decl-or-cast t))
-
-       ;; If we get here we can't tell if this is a type decl or a normal
-       ;; expression by looking at it alone.  (That's under the assumption
-       ;; that normal expressions always can look like type decl expressions,
-       ;; which isn't really true but the cases where it doesn't hold are so
-       ;; uncommon (e.g. some placements of "const" in C++) it's not worth
-       ;; the effort to look for them.)
+                           (not got-parens))
+                  ;; Got a plain list of identifiers followed by some suffix.
+                  ;; If this isn't a cast then the last identifier probably is
+                  ;; the declared one and we should back up to the previous
+                  ;; type.
+                  (setq backup-if-not-cast t)
+                  (throw 'at-decl-or-cast t)))
+
+            ;; CASE 5
+            (when (eq at-type t)
+              ;; If the type is known we know that there can't be any
+              ;; identifier somewhere else, and it's only in declarations in
+              ;; e.g. function prototypes and in casts that the identifier may
+              ;; be left out.
+              (throw 'at-decl-or-cast t))
+
+            (when (= (point) start)
+              ;; Only got a single identifier (parsed as a type so far).
+              ;; CASE 6
+              (if (and
+                   ;; Check that the identifier isn't at the start of an
+                   ;; expression.
+                   at-decl-end
+                   (cond
+                    ((eq context 'decl)
+                     ;; Inside an arglist that contains declarations.  If K&R
+                     ;; style declarations and parenthesis style initializers
+                     ;; aren't allowed then the single identifier must be a
+                     ;; type, else we require that it's known or found
+                     ;; (primitive types are handled above).
+                     (or (and (not c-recognize-knr-p)
+                              (not c-recognize-paren-inits))
+                         (memq at-type '(known found))))
+                    ((eq context '<>)
+                     ;; Inside a template arglist.  Accept known and found
+                     ;; types; other identifiers could just as well be
+                     ;; constants in C++.
+                     (memq at-type '(known found)))))
+                  (throw 'at-decl-or-cast t)
+                ;; CASE 7
+                ;; Can't be a valid declaration or cast, but if we've found a
+                ;; specifier it can't be anything else either, so treat it as
+                ;; an invalid/unfinished declaration or cast.
+                (throw 'at-decl-or-cast at-decl-or-cast))))
+
+          (if (and got-parens
+                   (not got-prefix)
+                   (not context)
+                   (not (eq at-type t))
+                   (or backup-at-type
+                       maybe-typeless
+                       backup-maybe-typeless
+                       (when c-recognize-typeless-decls
+                         (or (not got-suffix)
+                             (not (looking-at
+                                   c-after-suffixed-type-maybe-decl-key))))))
+              ;; Got an empty paren pair and a preceding type that probably
+              ;; really is the identifier.  Shift the type backwards to make
+              ;; the last one the identifier.  This is analogous to the
+              ;; "backtracking" done inside the `c-type-decl-suffix-key' loop
+              ;; above.
+              ;;
+              ;; Exception: In addition to the conditions in that
+              ;; "backtracking" code, do not shift backward if we're not
+              ;; looking at either `c-after-suffixed-type-decl-key' or "[;,]".
+              ;; Since there's no preceding type, the shift would mean that
+              ;; the declaration is typeless.  But if the regexp doesn't match
+              ;; then we will simply fall through in the tests below and not
+              ;; recognize it at all, so it's better to try it as an abstract
+              ;; declarator instead.
+              (c-fdoc-shift-type-backward)
+
+            ;; Still no identifier.
+            ;; CASE 8
+            (when (and got-prefix (or got-parens got-suffix))
+              ;; Require `got-prefix' together with either `got-parens' or
+              ;; `got-suffix' to recognize it as an abstract declarator:
+              ;; `got-parens' only is probably an empty function call.
+              ;; `got-suffix' only can build an ordinary expression together
+              ;; with the preceding identifier which we've taken as a type.
+              ;; We could actually accept on `got-prefix' only, but that can
+              ;; easily occur temporarily while writing an expression so we
+              ;; avoid that case anyway.  We could do a better job if we knew
+              ;; the point when the fontification was invoked.
+              (throw 'at-decl-or-cast t))
+
+            ;; CASE 9
+            (when (and at-type
+                       (not got-prefix)
+                       (not got-parens)
+                       got-suffix-after-parens
+                       (eq (char-after got-suffix-after-parens) ?\())
+              ;; Got a type, no declarator but a paren suffix. I.e. it's a
+              ;; normal function call after all (or perhaps a C++ style object
+              ;; instantiation expression).
+              (throw 'at-decl-or-cast nil))))
+
+        ;; CASE 10
+        (when at-decl-or-cast
+          ;; By now we've located the type in the declaration that we know
+          ;; we're in.
+          (throw 'at-decl-or-cast t))
+
+        ;; CASE 11
+        (when (and got-identifier
+                   (not context)
+                   (looking-at c-after-suffixed-type-decl-key)
+                   (if (and got-parens
+                            (not got-prefix)
+                            (not got-suffix)
+                            (not (eq at-type t)))
+                       ;; Shift the type backward in the case that there's a
+                       ;; single identifier inside parens.  That can only
+                       ;; occur in K&R style function declarations so it's
+                       ;; more likely that it really is a function call.
+                       ;; Therefore we only do this after
+                       ;; `c-after-suffixed-type-decl-key' has matched.
+                       (progn (c-fdoc-shift-type-backward) t)
+                     got-suffix-after-parens))
+          ;; A declaration according to `c-after-suffixed-type-decl-key'.
+          (throw 'at-decl-or-cast t))
+
+        ;; CASE 12
+        (when (and (or got-prefix (not got-parens))
+                   (memq at-type '(t known)))
+          ;; It's a declaration if a known type precedes it and it can't be a
+          ;; function call.
+          (throw 'at-decl-or-cast t))
+
+        ;; If we get here we can't tell if this is a type decl or a normal
+        ;; expression by looking at it alone.  (That's under the assumption
+        ;; that normal expressions always can look like type decl expressions,
+        ;; which isn't really true but the cases where it doesn't hold are so
+        ;; uncommon (e.g. some placements of "const" in C++) it's not worth
+        ;; the effort to look for them.)
 
 ;;; 2008-04-16: commented out the next form, to allow the function to recognize
 ;;; "foo (int bar)" in CC (an implicit type (in class foo) without a semicolon)
 ;;; as a(n almost complete) declaration, enabling it to be fontified.
-       ;; CASE 13
-       ;; (unless (or at-decl-end (looking-at "=[^=]"))
-       ;; If this is a declaration it should end here or its initializer(*)
-       ;; should start here, so check for allowed separation tokens.  Note
-       ;; that this rule doesn't work e.g. with a K&R arglist after a
-       ;; function header.
-       ;;
-       ;; *) Don't check for C++ style initializers using parens
-       ;; since those already have been matched as suffixes.
-       ;;
-       ;; If `at-decl-or-cast' is then we've found some other sign that
-       ;; it's a declaration or cast, so then it's probably an
-       ;; invalid/unfinished one.
-       ;;  (throw 'at-decl-or-cast at-decl-or-cast))
-
-       ;; Below are tests that only should be applied when we're certain to
-       ;; not have parsed halfway through an expression.
-
-       ;; CASE 14
-       (when (memq at-type '(t known))
-         ;; The expression starts with a known type so treat it as a
-         ;; declaration.
-         (throw 'at-decl-or-cast t))
-
-       ;; CASE 15
-       (when (and (c-major-mode-is 'c++-mode)
-                  ;; In C++ we check if the identifier is a known type, since
-                  ;; (con|de)structors use the class name as identifier.
-                  ;; We've always shifted over the identifier as a type and
-                  ;; then backed up again in this case.
-                  identifier-type
-                  (or (memq identifier-type '(found known))
-                      (and (eq (char-after identifier-start) ?~)
-                           ;; `at-type' probably won't be 'found for
-                           ;; destructors since the "~" is then part of the
-                           ;; type name being checked against the list of
-                           ;; known types, so do a check without that
-                           ;; operator.
-                           (or (save-excursion
-                                 (goto-char (1+ identifier-start))
-                                 (c-forward-syntactic-ws)
-                                 (c-with-syntax-table
-                                     c-identifier-syntax-table
-                                   (looking-at c-known-type-key)))
-                               (save-excursion
-                                 (goto-char (1+ identifier-start))
-                                 ;; We have already parsed the type earlier,
-                                 ;; so it'd be possible to cache the end
-                                 ;; position instead of redoing it here, but
-                                 ;; then we'd need to keep track of another
-                                 ;; position everywhere.
-                                 (c-check-type (point)
-                                               (progn (c-forward-type)
-                                                      (point))))))))
-         (throw 'at-decl-or-cast t))
-
-       (if got-identifier
-           (progn
-             ;; CASE 16
-             (when (and got-prefix-before-parens
-                        at-type
-                        (or at-decl-end (looking-at "=[^=]"))
-                        (not context)
-                        (not got-suffix))
-               ;; Got something like "foo * bar;".  Since we're not inside an
-               ;; arglist it would be a meaningless expression because the
-               ;; result isn't used.  We therefore choose to recognize it as
-               ;; a declaration.  Do not allow a suffix since it could then
-               ;; be a function call.
-               (throw 'at-decl-or-cast t))
-
-             ;; CASE 17
-             (when (and (or got-suffix-after-parens
-                            (looking-at "=[^=]"))
-                        (eq at-type 'found)
-                        (not (eq context 'arglist)))
-               ;; Got something like "a (*b) (c);" or "a (b) = c;".  It could
-               ;; be an odd expression or it could be a declaration.  Treat
-               ;; it as a declaration if "a" has been used as a type
-               ;; somewhere else (if it's a known type we won't get here).
-               (throw 'at-decl-or-cast t)))
-
-         ;; CASE 18
-         (when (and context
-                    (or got-prefix
-                        (and (eq context 'decl)
-                             (not c-recognize-paren-inits)
-                             (or got-parens got-suffix))))
-           ;; Got a type followed by an abstract declarator.  If `got-prefix'
-           ;; is set it's something like "a *" without anything after it.  If
-           ;; `got-parens' or `got-suffix' is set it's "a()", "a[]", "a()[]",
-           ;; or similar, which we accept only if the context rules out
-           ;; expressions.
-           (throw 'at-decl-or-cast t)))
-
-       ;; If we had a complete symbol table here (which rules out
-       ;; `c-found-types') we should return t due to the disambiguation rule
-       ;; (in at least C++) that anything that can be parsed as a declaration
-       ;; is a declaration.  Now we're being more defensive and prefer to
-       ;; highlight things like "foo (bar);" as a declaration only if we're
-       ;; inside an arglist that contains declarations.
-       (eq context 'decl))))
+        ;; CASE 13
+        ;;     (unless (or at-decl-end (looking-at "=[^=]"))
+        ;; If this is a declaration it should end here or its initializer(*)
+        ;; should start here, so check for allowed separation tokens.  Note
+        ;; that this rule doesn't work e.g. with a K&R arglist after a
+        ;; function header.
+        ;;
+        ;; *) Don't check for C++ style initializers using parens
+        ;; since those already have been matched as suffixes.
+        ;;
+        ;; If `at-decl-or-cast' is then we've found some other sign that
+        ;; it's a declaration or cast, so then it's probably an
+        ;; invalid/unfinished one.
+        ;;       (throw 'at-decl-or-cast at-decl-or-cast))
+
+        ;; Below are tests that only should be applied when we're certain to
+        ;; not have parsed halfway through an expression.
+
+        ;; CASE 14
+        (when (memq at-type '(t known))
+          ;; The expression starts with a known type so treat it as a
+          ;; declaration.
+          (throw 'at-decl-or-cast t))
+
+        ;; CASE 15
+        (when (and (c-major-mode-is 'c++-mode)
+                   ;; In C++ we check if the identifier is a known type, since
+                   ;; (con|de)structors use the class name as identifier.
+                   ;; We've always shifted over the identifier as a type and
+                   ;; then backed up again in this case.
+                   identifier-type
+                   (or (memq identifier-type '(found known))
+                       (and (eq (char-after identifier-start) ?~)
+                            ;; `at-type' probably won't be 'found for
+                            ;; destructors since the "~" is then part of the
+                            ;; type name being checked against the list of
+                            ;; known types, so do a check without that
+                            ;; operator.
+                            (or (save-excursion
+                                  (goto-char (1+ identifier-start))
+                                  (c-forward-syntactic-ws)
+                                  (c-with-syntax-table
+                                      c-identifier-syntax-table
+                                    (looking-at c-known-type-key)))
+                                (save-excursion
+                                  (goto-char (1+ identifier-start))
+                                  ;; We have already parsed the type earlier,
+                                  ;; so it'd be possible to cache the end
+                                  ;; position instead of redoing it here, but
+                                  ;; then we'd need to keep track of another
+                                  ;; position everywhere.
+                                  (c-check-type (point)
+                                                (progn (c-forward-type)
+                                                       (point))))))))
+          (throw 'at-decl-or-cast t))
+
+        (if got-identifier
+            (progn
+              ;; CASE 16
+              (when (and got-prefix-before-parens
+                         at-type
+                         (or at-decl-end (looking-at "=[^=]"))
+                         (not context)
+                         (not got-suffix))
+                ;; Got something like "foo * bar;".  Since we're not inside an
+                ;; arglist it would be a meaningless expression because the
+                ;; result isn't used.  We therefore choose to recognize it as
+                ;; a declaration.  Do not allow a suffix since it could then
+                ;; be a function call.
+                (throw 'at-decl-or-cast t))
+
+              ;; CASE 17
+              (when (and (or got-suffix-after-parens
+                             (looking-at "=[^=]"))
+                         (eq at-type 'found)
+                         (not (eq context 'arglist)))
+                ;; Got something like "a (*b) (c);" or "a (b) = c;".  It could
+                ;; be an odd expression or it could be a declaration.  Treat
+                ;; it as a declaration if "a" has been used as a type
+                ;; somewhere else (if it's a known type we won't get here).
+                (throw 'at-decl-or-cast t)))
+
+          ;; CASE 18
+          (when (and context
+                     (or got-prefix
+                         (and (eq context 'decl)
+                              (not c-recognize-paren-inits)
+                              (or got-parens got-suffix))))
+            ;; Got a type followed by an abstract declarator.  If `got-prefix'
+            ;; is set it's something like "a *" without anything after it.  If
+            ;; `got-parens' or `got-suffix' is set it's "a()", "a[]", "a()[]",
+            ;; or similar, which we accept only if the context rules out
+            ;; expressions.
+            (throw 'at-decl-or-cast t)))
+
+        ;; If we had a complete symbol table here (which rules out
+        ;; `c-found-types') we should return t due to the disambiguation rule
+        ;; (in at least C++) that anything that can be parsed as a declaration
+        ;; is a declaration.  Now we're being more defensive and prefer to
+        ;; highlight things like "foo (bar);" as a declaration only if we're
+        ;; inside an arglist that contains declarations.
+         ;; CASE 19
+        (eq context 'decl))))
 
     ;; The point is now after the type decl expression.
 
@@ -7454,6 +7520,8 @@ comment at the start of cc-engine.el for more info."
        ;; interactive refontification.
        (c-put-c-type-property (point) 'c-decl-arg-start))
 
+      ;; Record the type's coordinates in `c-record-type-identifiers' for
+      ;; later fontification.
       (when (and c-record-type-identifiers at-type ;; (not (eq at-type t))
                 ;; There seems no reason to exclude a token from
                 ;; fontification just because it's "a known type that can't
@@ -7552,10 +7620,10 @@ comment at the start of cc-engine.el for more info."
                    (c-put-c-type-property (1- (point)) 'c-decl-end)
                    t)
 
-             ;; It's an unfinished label.  We consider the keyword enough
-             ;; to recognize it as a label, so that it gets fontified.
-             ;; Leave the point at the end of it, but don't put any
-             ;; `c-decl-end' marker.
+               ;; It's an unfinished label.  We consider the keyword enough
+               ;; to recognize it as a label, so that it gets fontified.
+               ;; Leave the point at the end of it, but don't put any
+               ;; `c-decl-end' marker.
                (goto-char kwd-end)
                t))))
 
@@ -7740,69 +7808,69 @@ comment at the start of cc-engine.el for more info."
   ;;
   ;; This function might do hidden buffer changes.
 
-    (let ((start (point))
-         start-char
-         (c-promote-possible-types t)
-         lim
-         ;; Turn off recognition of angle bracket arglists while parsing
-         ;; types here since the protocol reference list might then be
-         ;; considered part of the preceding name or superclass-name.
-         c-recognize-<>-arglists)
-
-      (if (or
-          (when (looking-at
-                 (eval-when-compile
-                   (c-make-keywords-re t
-                     (append (c-lang-const c-protection-kwds objc)
-                             '("@end"))
-                     'objc-mode)))
-            (goto-char (match-end 1))
-            t)
+  (let ((start (point))
+       start-char
+       (c-promote-possible-types t)
+       lim
+       ;; Turn off recognition of angle bracket arglists while parsing
+       ;; types here since the protocol reference list might then be
+       ;; considered part of the preceding name or superclass-name.
+       c-recognize-<>-arglists)
+
+    (if (or
+        (when (looking-at
+               (eval-when-compile
+                 (c-make-keywords-re t
+                   (append (c-lang-const c-protection-kwds objc)
+                           '("@end"))
+                   'objc-mode)))
+          (goto-char (match-end 1))
+          t)
 
-          (and
-           (looking-at
-            (eval-when-compile
-              (c-make-keywords-re t
-                '("@interface" "@implementation" "@protocol")
-                'objc-mode)))
+        (and
+         (looking-at
+          (eval-when-compile
+            (c-make-keywords-re t
+              '("@interface" "@implementation" "@protocol")
+              'objc-mode)))
 
-           ;; Handle the name of the class itself.
-           (progn
-;            (c-forward-token-2) ; 2006/1/13 This doesn't move if the token's
-;            at EOB.
-             (goto-char (match-end 0))
-             (setq lim (point))
-             (c-skip-ws-forward)
-             (c-forward-type))
-
-           (catch 'break
-             ;; Look for ": superclass-name" or "( category-name )".
-             (when (looking-at "[:\(]")
-               (setq start-char (char-after))
+         ;; Handle the name of the class itself.
+         (progn
+            ;; (c-forward-token-2) ; 2006/1/13 This doesn't move if the token's
+            ;; at EOB.
+           (goto-char (match-end 0))
+           (setq lim (point))
+           (c-skip-ws-forward)
+           (c-forward-type))
+
+         (catch 'break
+           ;; Look for ": superclass-name" or "( category-name )".
+           (when (looking-at "[:\(]")
+             (setq start-char (char-after))
+             (forward-char)
+             (c-forward-syntactic-ws)
+             (unless (c-forward-type) (throw 'break nil))
+             (when (eq start-char ?\()
+               (unless (eq (char-after) ?\)) (throw 'break nil))
                (forward-char)
-               (c-forward-syntactic-ws)
-               (unless (c-forward-type) (throw 'break nil))
-               (when (eq start-char ?\()
-                 (unless (eq (char-after) ?\)) (throw 'break nil))
-                 (forward-char)
-                 (c-forward-syntactic-ws)))
-
-             ;; Look for a protocol reference list.
-             (if (eq (char-after) ?<)
-                 (let ((c-recognize-<>-arglists t)
-                       (c-parse-and-markup-<>-arglists t)
-                       c-restricted-<>-arglists)
-                   (c-forward-<>-arglist t))
-               t))))
+               (c-forward-syntactic-ws)))
 
-         (progn
-           (c-backward-syntactic-ws lim)
-           (c-clear-c-type-property start (1- (point)) 'c-decl-end)
-           (c-put-c-type-property (1- (point)) 'c-decl-end)
-           t)
+           ;; Look for a protocol reference list.
+           (if (eq (char-after) ?<)
+               (let ((c-recognize-<>-arglists t)
+                     (c-parse-and-markup-<>-arglists t)
+                     c-restricted-<>-arglists)
+                 (c-forward-<>-arglist t))
+             t))))
 
-       (c-clear-c-type-property start (point) 'c-decl-end)
-       nil)))
+       (progn
+         (c-backward-syntactic-ws lim)
+         (c-clear-c-type-property start (1- (point)) 'c-decl-end)
+         (c-put-c-type-property (1- (point)) 'c-decl-end)
+         t)
+
+      (c-clear-c-type-property start (point) 'c-decl-end)
+      nil)))
 
 (defun c-beginning-of-inheritance-list (&optional lim)
   ;; Go to the first non-whitespace after the colon that starts a
@@ -7889,7 +7957,7 @@ comment at the start of cc-engine.el for more info."
   ;;
   ;; This function might do hidden buffer changes.
 
-  (let ((beg (point)) end id-start)
+  (let ((beg (point)) id-start)
     (and
      (eq (c-beginning-of-statement-1 lim) 'same)
 
@@ -7979,54 +8047,54 @@ comment at the start of cc-engine.el for more info."
                   (throw 'knr nil)))
 
            (if after-rparen
-           ;; We're inside a paren.  Could it be our argument list....?
-             (if
-                 (and
-                  (progn
-                    (goto-char after-rparen)
-                    (unless (c-go-list-backward) (throw 'knr nil)) ;
-               ;; FIXME!!!  What about macros between the parens?  2007/01/20
-                    (setq before-lparen (point)))
+               ;; We're inside a paren.  Could it be our argument list....?
+               (if
+                   (and
+                    (progn
+                      (goto-char after-rparen)
+                      (unless (c-go-list-backward) (throw 'knr nil)) ;
+                      ;; FIXME!!!  What about macros between the parens?  2007/01/20
+                      (setq before-lparen (point)))
 
-                  ;; It can't be the arg list if next token is ; or {
-                  (progn (goto-char after-rparen)
-                         (c-forward-syntactic-ws)
-                         (not (memq (char-after) '(?\; ?\{ ?\=))))
+                    ;; It can't be the arg list if next token is ; or {
+                    (progn (goto-char after-rparen)
+                           (c-forward-syntactic-ws)
+                           (not (memq (char-after) '(?\; ?\{ ?\=))))
 
-                  ;; Is the thing preceding the list an identifier (the
-                  ;; function name), or a macro expansion?
-                  (progn
-                    (goto-char before-lparen)
-                    (eq (c-backward-token-2) 0)
-                    (or (eq (c-on-identifier) (point))
-                        (and (eq (char-after) ?\))
-                             (c-go-up-list-backward)
-                             (eq (c-backward-token-2) 0)
-                             (eq (c-on-identifier) (point)))))
-
-                  ;; Have we got a non-empty list of comma-separated
-                  ;; identifiers?
-                  (progn
-                    (goto-char before-lparen)
-                    (c-forward-token-2) ; to first token inside parens
-                    (and
-                     (c-on-identifier)
-                     (c-forward-token-2)
-                     (catch 'id-list
-                       (while (eq (char-after) ?\,)
-                         (c-forward-token-2)
-                         (unless (c-on-identifier) (throw 'id-list nil))
-                         (c-forward-token-2))
-                       (eq (char-after) ?\))))))
-
-                 ;; ...Yes.  We've identified the function's argument list.
-                 (throw 'knr
-                      (progn (goto-char after-rparen)
-                             (c-forward-syntactic-ws)
-                             (point)))
-
-               ;; ...No.  The current parens aren't the function's arg list.
-               (goto-char before-lparen))
+                    ;; Is the thing preceding the list an identifier (the
+                    ;; function name), or a macro expansion?
+                    (progn
+                      (goto-char before-lparen)
+                      (eq (c-backward-token-2) 0)
+                      (or (eq (c-on-identifier) (point))
+                          (and (eq (char-after) ?\))
+                               (c-go-up-list-backward)
+                               (eq (c-backward-token-2) 0)
+                               (eq (c-on-identifier) (point)))))
+
+                    ;; Have we got a non-empty list of comma-separated
+                    ;; identifiers?
+                    (progn
+                      (goto-char before-lparen)
+                      (c-forward-token-2) ; to first token inside parens
+                      (and
+                       (c-on-identifier)
+                       (c-forward-token-2)
+                       (catch 'id-list
+                         (while (eq (char-after) ?\,)
+                           (c-forward-token-2)
+                           (unless (c-on-identifier) (throw 'id-list nil))
+                           (c-forward-token-2))
+                         (eq (char-after) ?\))))))
+
+                   ;; ...Yes.  We've identified the function's argument list.
+                   (throw 'knr
+                          (progn (goto-char after-rparen)
+                                 (c-forward-syntactic-ws)
+                                 (point)))
+
+                 ;; ...No.  The current parens aren't the function's arg list.
+                 (goto-char before-lparen))
 
              (or (c-go-list-backward)  ; backwards over [ .... ]
                  (throw 'knr nil)))))))))
@@ -8232,7 +8300,7 @@ comment at the start of cc-engine.el for more info."
                   (and
                    (progn
                      (while  ; keep going back to "[;={"s until we either find
-                           ; no more, or get to one which isn't an "operator ="
+                           ; no more, or get to one which isn't an "operator ="
                          (and (c-syntactic-re-search-forward "[;={]" start t t t)
                               (eq (char-before) ?=)
                               c-overloadable-operators-regexp
@@ -8555,86 +8623,86 @@ comment at the start of cc-engine.el for more info."
        (while (and (not bufpos)
                   containing-sexp)
         (when paren-state
-            (if (consp (car paren-state))
-                (setq lim (cdr (car paren-state))
-                      paren-state (cdr paren-state))
-              (setq lim (car paren-state)))
-            (when paren-state
-              (setq next-containing (car paren-state)
-                    paren-state (cdr paren-state))))
-          (goto-char containing-sexp)
-          (if (c-looking-at-inexpr-block next-containing next-containing)
-              ;; We're in an in-expression block of some kind.  Do not
-              ;; check nesting.  We deliberately set the limit to the
-              ;; containing sexp, so that c-looking-at-inexpr-block
-              ;; doesn't check for an identifier before it.
-              (setq containing-sexp nil)
-            ;; see if the open brace is preceded by = or [...] in
-            ;; this statement, but watch out for operator=
-            (setq braceassignp 'dontknow)
-            (c-backward-token-2 1 t lim)
-            ;; Checks to do only on the first sexp before the brace.
-            (when (and c-opt-inexpr-brace-list-key
-                       (eq (char-after) ?\[))
-              ;; In Java, an initialization brace list may follow
-              ;; directly after "new Foo[]", so check for a "new"
-              ;; earlier.
-              (while (eq braceassignp 'dontknow)
-                (setq braceassignp
-                      (cond ((/= (c-backward-token-2 1 t lim) 0) nil)
-                            ((looking-at c-opt-inexpr-brace-list-key) t)
-                            ((looking-at "\\sw\\|\\s_\\|[.[]")
-                             ;; Carry on looking if this is an
-                             ;; identifier (may contain "." in Java)
-                             ;; or another "[]" sexp.
-                             'dontknow)
-                            (t nil)))))
-            ;; Checks to do on all sexps before the brace, up to the
-            ;; beginning of the statement.
+          (if (consp (car paren-state))
+              (setq lim (cdr (car paren-state))
+                    paren-state (cdr paren-state))
+            (setq lim (car paren-state)))
+          (when paren-state
+            (setq next-containing (car paren-state)
+                  paren-state (cdr paren-state))))
+        (goto-char containing-sexp)
+        (if (c-looking-at-inexpr-block next-containing next-containing)
+            ;; We're in an in-expression block of some kind.  Do not
+            ;; check nesting.  We deliberately set the limit to the
+            ;; containing sexp, so that c-looking-at-inexpr-block
+            ;; doesn't check for an identifier before it.
+            (setq containing-sexp nil)
+          ;; see if the open brace is preceded by = or [...] in
+          ;; this statement, but watch out for operator=
+          (setq braceassignp 'dontknow)
+          (c-backward-token-2 1 t lim)
+          ;; Checks to do only on the first sexp before the brace.
+          (when (and c-opt-inexpr-brace-list-key
+                     (eq (char-after) ?\[))
+            ;; In Java, an initialization brace list may follow
+            ;; directly after "new Foo[]", so check for a "new"
+            ;; earlier.
             (while (eq braceassignp 'dontknow)
-              (cond ((eq (char-after) ?\;)
-                     (setq braceassignp nil))
-                    ((and class-key
-                          (looking-at class-key))
-                     (setq braceassignp nil))
-                    ((eq (char-after) ?=)
-                     ;; We've seen a =, but must check earlier tokens so
-                     ;; that it isn't something that should be ignored.
-                     (setq braceassignp 'maybe)
-                     (while (and (eq braceassignp 'maybe)
-                                 (zerop (c-backward-token-2 1 t lim)))
-                       (setq braceassignp
-                             (cond
-                              ;; Check for operator =
-                              ((and c-opt-op-identifier-prefix
-                                    (looking-at c-opt-op-identifier-prefix))
-                               nil)
-                              ;; Check for `<opchar>= in Pike.
-                              ((and (c-major-mode-is 'pike-mode)
-                                    (or (eq (char-after) ?`)
-                                        ;; Special case for Pikes
-                                        ;; `[]=, since '[' is not in
-                                        ;; the punctuation class.
-                                        (and (eq (char-after) ?\[)
-                                             (eq (char-before) ?`))))
-                               nil)
-                              ((looking-at "\\s.") 'maybe)
-                              ;; make sure we're not in a C++ template
-                              ;; argument assignment
-                              ((and
-                                (c-major-mode-is 'c++-mode)
-                                (save-excursion
-                                  (let ((here (point))
-                                        (pos< (progn
-                                                (skip-chars-backward "^<>")
-                                                (point))))
-                                    (and (eq (char-before) ?<)
-                                         (not (c-crosses-statement-barrier-p
-                                               pos< here))
-                                         (not (c-in-literal))
-                                         ))))
-                               nil)
-                              (t t))))))
+              (setq braceassignp
+                    (cond ((/= (c-backward-token-2 1 t lim) 0) nil)
+                          ((looking-at c-opt-inexpr-brace-list-key) t)
+                          ((looking-at "\\sw\\|\\s_\\|[.[]")
+                           ;; Carry on looking if this is an
+                           ;; identifier (may contain "." in Java)
+                           ;; or another "[]" sexp.
+                           'dontknow)
+                          (t nil)))))
+          ;; Checks to do on all sexps before the brace, up to the
+          ;; beginning of the statement.
+          (while (eq braceassignp 'dontknow)
+            (cond ((eq (char-after) ?\;)
+                   (setq braceassignp nil))
+                  ((and class-key
+                        (looking-at class-key))
+                   (setq braceassignp nil))
+                  ((eq (char-after) ?=)
+                   ;; We've seen a =, but must check earlier tokens so
+                   ;; that it isn't something that should be ignored.
+                   (setq braceassignp 'maybe)
+                   (while (and (eq braceassignp 'maybe)
+                               (zerop (c-backward-token-2 1 t lim)))
+                     (setq braceassignp
+                           (cond
+                            ;; Check for operator =
+                            ((and c-opt-op-identifier-prefix
+                                  (looking-at c-opt-op-identifier-prefix))
+                             nil)
+                            ;; Check for `<opchar>= in Pike.
+                            ((and (c-major-mode-is 'pike-mode)
+                                  (or (eq (char-after) ?`)
+                                      ;; Special case for Pikes
+                                      ;; `[]=, since '[' is not in
+                                      ;; the punctuation class.
+                                      (and (eq (char-after) ?\[)
+                                           (eq (char-before) ?`))))
+                             nil)
+                            ((looking-at "\\s.") 'maybe)
+                            ;; make sure we're not in a C++ template
+                            ;; argument assignment
+                            ((and
+                              (c-major-mode-is 'c++-mode)
+                              (save-excursion
+                                (let ((here (point))
+                                      (pos< (progn
+                                              (skip-chars-backward "^<>")
+                                              (point))))
+                                  (and (eq (char-before) ?<)
+                                       (not (c-crosses-statement-barrier-p
+                                             pos< here))
+                                       (not (c-in-literal))
+                                       ))))
+                             nil)
+                            (t t))))))
             (if (and (eq braceassignp 'dontknow)
                      (/= (c-backward-token-2 1 t lim) 0))
                 (setq braceassignp nil)))
@@ -9157,7 +9225,7 @@ comment at the start of cc-engine.el for more info."
                     (max (c-point 'boi paren-pos) (point))))
                   (t (c-add-syntax 'defun-block-intro nil))))
 
-                (c-add-syntax 'statement-block-intro nil)))
+             (c-add-syntax 'statement-block-intro nil)))
 
          (if (= paren-pos boi)
              ;; Always done if the open brace was at boi.  The
@@ -9354,16 +9422,16 @@ comment at the start of cc-engine.el for more info."
                    (not (looking-at c-<-op-cont-regexp))))))
       (c-with-syntax-table c++-template-syntax-table
        (goto-char placeholder)
-       (c-beginning-of-statement-1 containing-sexp t)
-       (if (save-excursion
-             (c-backward-syntactic-ws containing-sexp)
-             (eq (char-before) ?<))
-           ;; In a nested template arglist.
-           (progn
-             (goto-char placeholder)
-             (c-syntactic-skip-backward "^,;" containing-sexp t)
-             (c-forward-syntactic-ws))
-         (back-to-indentation)))
+       (c-beginning-of-statement-1 containing-sexp t))
+      (if (save-excursion
+           (c-backward-syntactic-ws containing-sexp)
+           (eq (char-before) ?<))
+         ;; In a nested template arglist.
+         (progn
+           (goto-char placeholder)
+           (c-syntactic-skip-backward "^,;" containing-sexp t)
+           (c-forward-syntactic-ws))
+       (back-to-indentation))
       ;; FIXME: Should use c-add-stmt-syntax, but it's not yet
       ;; template aware.
       (c-add-syntax 'template-args-cont (point) placeholder))
@@ -10021,16 +10089,16 @@ comment at the start of cc-engine.el for more info."
                            (eq (char-after placeholder) ?<))))))
            (c-with-syntax-table c++-template-syntax-table
              (goto-char placeholder)
-             (c-beginning-of-statement-1 lim t)
-             (if (save-excursion
-                   (c-backward-syntactic-ws lim)
-                   (eq (char-before) ?<))
-                 ;; In a nested template arglist.
-                 (progn
-                   (goto-char placeholder)
-                   (c-syntactic-skip-backward "^,;" lim t)
-                   (c-forward-syntactic-ws))
-               (back-to-indentation)))
+             (c-beginning-of-statement-1 lim t))
+           (if (save-excursion
+                 (c-backward-syntactic-ws lim)
+                 (eq (char-before) ?<))
+               ;; In a nested template arglist.
+               (progn
+                 (goto-char placeholder)
+                 (c-syntactic-skip-backward "^,;" lim t)
+                 (c-forward-syntactic-ws))
+             (back-to-indentation))
            ;; FIXME: Should use c-add-stmt-syntax, but it's not yet
            ;; template aware.
            (c-add-syntax 'template-args-cont (point) placeholder))
@@ -10270,7 +10338,6 @@ comment at the start of cc-engine.el for more info."
          (c-add-syntax 'topmost-intro-cont (c-point 'boi)))
         ))
 
-
        ;; (CASE 6 has been removed.)
 
        ;; CASE 7: line is an expression, not a statement.  Most
@@ -10473,7 +10540,7 @@ comment at the start of cc-engine.el for more info."
          (if (eq (point) (c-point 'boi))
              (c-add-syntax 'brace-list-close (point))
            (setq lim (c-most-enclosing-brace c-state-cache (point)))
-           (c-beginning-of-statement-1 lim)
+           (c-beginning-of-statement-1 lim nil nil t)
            (c-add-stmt-syntax 'brace-list-close nil t lim paren-state)))
 
         (t
index bf5630da0457fa3060229bcea00e140b62660be2..1c389bc36656fc3c55a874b4d662bf23a6e536db 100644 (file)
              (parse-sexp-lookup-properties
               (cc-eval-when-compile
                 (boundp 'parse-sexp-lookup-properties))))
-
-         ;; (while (re-search-forward ,regexp limit t)
-         ;;   (unless (progn
-         ;;          (goto-char (match-beginning 0))
-         ;;          (c-skip-comments-and-strings limit))
-         ;;     (goto-char (match-end 0))
-         ;;     ,@(mapcar
-         ;;     (lambda (highlight)
-         ;;       (if (integerp (car highlight))
-         ;;           (progn
-         ;;             (unless (eq (nth 2 highlight) t)
-         ;;               (error
-         ;;                "The override flag must currently be t in %s"
-         ;;                highlight))
-         ;;             (when (nth 3 highlight)
-         ;;               (error
-         ;;                "The laxmatch flag may currently not be set in %s"
-         ;;                highlight))
-         ;;             `(save-match-data
-         ;;                (c-put-font-lock-face
-         ;;                 (match-beginning ,(car highlight))
-         ;;                 (match-end ,(car highlight))
-         ;;                 ,(elt highlight 1))))
-         ;;         (when (nth 3 highlight)
-         ;;           (error "Match highlights currently not supported in %s"
-         ;;                  highlight))
-         ;;         `(progn
-         ;;            ,(nth 1 highlight)
-         ;;            (save-match-data ,(car highlight))
-         ;;            ,(nth 2 highlight))))
-         ;;     highlights)))
          ,(c-make-font-lock-search-form regexp highlights))
-
        nil)))
 
   (defun c-make-font-lock-BO-decl-search-function (regexp &rest highlights)
@@ -716,7 +684,11 @@ stuff.  Used on level 1 and higher."
   (let ((start (1- (point))))
     (save-excursion
       (and (eq (elt (parse-partial-sexp start (c-point 'eol)) 8) start)
-          (if (integerp c-multiline-string-start-char)
+          (if (if (eval-when-compile (integerp ?c))
+                  ;; Emacs
+                  (integerp c-multiline-string-start-char)
+                ;; XEmacs
+                (characterp c-multiline-string-start-char))
               ;; There's no multiline string start char before the
               ;; string, so newlines aren't allowed.
               (not (eq (char-before start) c-multiline-string-start-char))
@@ -1037,7 +1009,8 @@ casts and declarations are fontified.  Used on level 2 and higher."
        paren-depth
        id-face got-init
        c-last-identifier-range
-       (separator-prop (if types 'c-decl-type-start 'c-decl-id-start)))
+       (separator-prop (if types 'c-decl-type-start 'c-decl-id-start))
+       brackets-after-id)
 
     ;; The following `while' fontifies a single declarator id each time round.
     ;; It loops only when LIST is non-nil.
@@ -1110,17 +1083,21 @@ casts and declarations are fontified.  Used on level 2 and higher."
            ;; Search syntactically to the end of the declarator (";",
            ;; ",", a closing paren, eob etc) or to the beginning of an
            ;; initializer or function prototype ("=" or "\\s\(").
-           ;; Note that the open paren will match array specs in
-           ;; square brackets, and we treat them as initializers too.
-           (c-syntactic-re-search-forward
-            "[;,]\\|\\s)\\|\\'\\|\\(=\\|\\s(\\)" limit t t))
+           ;; Note that square brackets are now not also treated as
+           ;; initializers, since this broke when there were also
+           ;; initializing brace lists.
+           (let (found)
+             (while
+                 (and (setq found (c-syntactic-re-search-forward
+                            "[;,]\\|\\s)\\|\\'\\|\\(=\\|\\s(\\)" limit t t))
+                      (eq (char-before) ?\[)
+                      (c-go-up-list-forward))
+                    (setq brackets-after-id t))
+             found))
 
       (setq next-pos (match-beginning 0)
            id-face (if (and (eq (char-after next-pos) ?\()
-                            (let (c-last-identifier-range)
-                              (save-excursion
-                                (goto-char next-pos)
-                                (c-at-toplevel-p))))
+                            (not brackets-after-id))
                        'font-lock-function-name-face
                      'font-lock-variable-name-face)
            got-init (and (match-beginning 1)
@@ -1146,7 +1123,6 @@ casts and declarations are fontified.  Used on level 2 and higher."
       (when list
        ;; Jump past any initializer or function prototype to see if
        ;; there's a ',' to continue at.
-
        (cond ((eq id-face 'font-lock-function-name-face)
               ;; Skip a parenthesized initializer (C++) or a function
               ;; prototype.
@@ -1214,8 +1190,8 @@ casts and declarations are fontified.  Used on level 2 and higher."
          ;; o - nil, if not in an arglist at all.  This includes the
          ;;   parenthesized condition which follows "if", "while", etc.
          context
-         ;; The position of the next token after the closing paren of
-         ;; the last detected cast.
+         ;; A list of starting positions of possible type declarations, or of
+         ;; the typedef preceding one, if any.
          last-cast-end
          ;; The result from `c-forward-decl-or-cast-1'.
          decl-or-cast
@@ -1301,14 +1277,15 @@ casts and declarations are fontified.  Used on level 2 and higher."
              (cond ((not (memq (char-before match-pos) '(?\( ?, ?\[ ?<)))
                     (setq context nil
                           c-restricted-<>-arglists nil))
-                   ;; A control flow expression
+                   ;; A control flow expression or a decltype
                    ((and (eq (char-before match-pos) ?\()
                          (save-excursion
                            (goto-char match-pos)
                            (backward-char)
                            (c-backward-token-2)
                            (or (looking-at c-block-stmt-2-key)
-                               (looking-at c-block-stmt-1-2-key))))
+                               (looking-at c-block-stmt-1-2-key)
+                               (looking-at c-typeof-key))))
                     (setq context nil
                           c-restricted-<>-arglists t))
                    ;; Near BOB.
@@ -1486,9 +1463,12 @@ casts and declarations are fontified.  Used on level 2 and higher."
                    c-recognize-knr-p) ; Strictly speaking, bogus, but it
                                       ; speeds up lisp.h tremendously.
                (save-excursion
+                 (unless (or (eobp)
+                             (looking-at "\\s(\\|\\s)"))
+                   (forward-char))
                  (setq bod-res (car (c-beginning-of-decl-1 decl-search-lim)))
                  (if (and (eq bod-res 'same)
-                          (progn
+                          (save-excursion
                             (c-backward-syntactic-ws)
                             (eq (char-before) ?\})))
                      (c-beginning-of-decl-1 decl-search-lim))
@@ -1505,7 +1485,7 @@ casts and declarations are fontified.  Used on level 2 and higher."
                          (goto-char (match-end 0))
                          (c-forward-syntactic-ws))
                        ;; At a real declaration?
-                       (if (memq (c-forward-type t) '(t known found))
+                       (if (memq (c-forward-type t) '(t known found decltype))
                            (progn
                              (c-font-lock-declarators limit t is-typedef)
                              nil)
@@ -1555,9 +1535,7 @@ casts and declarations are fontified.  Used on level 2 and higher."
   ;; Note that this function won't attempt to fontify beyond the end of the
   ;; current enum block, if any.
   (let* ((paren-state (c-parse-state))
-        (encl-pos (c-most-enclosing-brace paren-state))
-        (start (point))
-       )
+        (encl-pos (c-most-enclosing-brace paren-state)))
     (when (and
           encl-pos
           (eq (char-after encl-pos) ?\{)
@@ -2122,7 +2100,7 @@ need for `c-font-lock-extra-types'.")
              ;; Got two parenthesized expressions, so we have to look
              ;; closer at them to decide which is the type.  No need to
              ;; handle `c-record-ref-identifiers' since all references
-             ;; has already been handled by other fontification rules.
+             ;; have already been handled by other fontification rules.
              (let (expr1-res expr2-res)
 
                (goto-char expr1-pos)
@@ -2157,6 +2135,9 @@ need for `c-font-lock-extra-types'.")
                ;; unusual than an initializer.
                (cond ((memq expr1-res '(t known prefix)))
                      ((memq expr2-res '(t known prefix)))
+                     ;; Presumably 'decltype's will be fontified elsewhere.
+                     ((eq expr1-res 'decltype))
+                     ((eq expr2-res 'decltype))
                      ((eq expr1-res 'found)
                       (let ((c-promote-possible-types t))
                         (goto-char expr1-pos)
index abde007cd044225a0219b88e0f21de25ec0892e3..f46ae0ff42683425977e65708590872ac8a09bc2 100644 (file)
@@ -504,8 +504,7 @@ is called with one argument, the guessed style."
                      (cond
                       ((or (and a-guessed? b-guessed?)
                            (not (or a-guessed? b-guessed?)))
-                       (string-lessp (symbol-name (car a))
-                                     (symbol-name (car b))))
+                       (string-lessp (car a) (car b)))
                       (a-guessed? t)
                       (b-guessed? nil)))))))
   style)
@@ -520,7 +519,8 @@ is called with one argument, the guessed style."
       (goto-char (point-min))
       (when (search-forward (concat "("
                                    (symbol-name (car needs-markers))
-                                   " ") nil t)
+                                   " ")
+                            nil t)
        (move-end-of-line 1)
        (comment-dwim nil)
        (insert " Guessed value"))
index d2d2de8801a7f2e6aeda150144cefffdcd1a1969..bab928ac5dd38f6bb790066358e979ed6fe1700a 100644 (file)
 
 
 ;; This file is not always loaded.  See note above.
-;; Except it is always loaded - see bug#17463.
-;;;(cc-external-require 'cl)
-(require 'cl-lib)
+(cc-external-require 'cl)
 
 \f
 ;;; Setup for the `c-lang-defvar' system.
@@ -213,7 +211,6 @@ the evaluated constant value at compile time."
 ;; These are defined in cl as aliases to the cl- versions.
 ;(declare-function delete-duplicates "cl-seq" (cl-seq &rest cl-keys) t)
 ;(declare-function mapcan "cl-extra" (cl-func cl-seq &rest cl-rest) t)
-;(declare-function cl-macroexpand-all "cl" (form &optional env))
 
 (eval-and-compile
   ;; Some helper functions used when building the language constants.
@@ -254,14 +251,14 @@ the evaluated constant value at compile time."
     (unless xlate
       (setq xlate 'identity))
     (c-with-syntax-table (c-lang-const c-mode-syntax-table)
-      (cl-delete-duplicates
-       (cl-mapcan (lambda (opgroup)
+      (delete-duplicates
+       (mapcan (lambda (opgroup)
                 (when (if (symbolp (car opgroup))
                           (when (funcall opgroup-filter (car opgroup))
                             (setq opgroup (cdr opgroup))
                             t)
                         t)
-                  (cl-mapcan (lambda (op)
+                  (mapcan (lambda (op)
                             (when (funcall op-filter op)
                               (let ((res (funcall xlate op)))
                                 (if (listp res) res (list res)))))
@@ -302,7 +299,8 @@ the evaluated constant value at compile time."
        ["Set Style..."                   c-set-style t]
        ["Show Current Style Name"        (message
                                          "Style Name: %s"
-                                         c-indentation-style) t]
+                                         c-indentation-style)
+                                         t]
        ["Guess Style from this Buffer"   c-guess-buffer-no-install t]
        ["Install the Last Guessed Style..." c-guess-install
        (and c-guess-guessed-offsets-alist
@@ -394,7 +392,9 @@ The syntax tables aren't stored directly since they're quite large."
   ;; lists are parsed.  Note that this encourages incorrect parsing of
   ;; templates since they might contain normal operators that uses the
   ;; '<' and '>' characters.  Therefore this syntax table might go
-  ;; away when CC Mode handles templates correctly everywhere.
+  ;; away when CC Mode handles templates correctly everywhere.  WHILE
+  ;; THIS SYNTAX TABLE IS CURRENT, `c-parse-state' MUST _NOT_ BE
+  ;; CALLED!!!
   t   nil
   (java c++) `(lambda ()
         (let ((table (funcall ,(c-lang-const c-make-mode-syntax-table))))
@@ -405,7 +405,7 @@ The syntax tables aren't stored directly since they're quite large."
   (and (c-lang-const c++-make-template-syntax-table)
        (funcall (c-lang-const c++-make-template-syntax-table))))
 
-(c-lang-defconst c-no-parens-syntax-table
+(c-lang-defconst c-make-no-parens-syntax-table
   ;; A variant of the standard syntax table which is used to find matching
   ;; "<"s and ">"s which have been marked as parens using syntax table
   ;; properties.  The other paren characters (e.g. "{", ")" "]") are given a
@@ -413,18 +413,20 @@ The syntax tables aren't stored directly since they're quite large."
   ;; even when there's unbalanced other parens inside them.
   ;;
   ;; This variable is nil for languages which don't have template stuff.
-  t  `(lambda ()
-       (if (c-lang-const c-recognize-<>-arglists)
-           (let ((table (funcall ,(c-lang-const c-make-mode-syntax-table))))
-             (modify-syntax-entry ?\( "." table)
-             (modify-syntax-entry ?\) "." table)
-             (modify-syntax-entry ?\[ "." table)
-             (modify-syntax-entry ?\] "." table)
-             (modify-syntax-entry ?\{ "." table)
-             (modify-syntax-entry ?\} "." table)
-             table))))
+  t  (if (c-lang-const c-recognize-<>-arglists)
+     `(lambda ()
+       ;(if (c-lang-const c-recognize-<>-arglists)
+       (let ((table (funcall ,(c-lang-const c-make-mode-syntax-table))))
+         (modify-syntax-entry ?\( "." table)
+         (modify-syntax-entry ?\) "." table)
+         (modify-syntax-entry ?\[ "." table)
+         (modify-syntax-entry ?\] "." table)
+         (modify-syntax-entry ?\{ "." table)
+         (modify-syntax-entry ?\} "." table)
+         table))))
 (c-lang-defvar c-no-parens-syntax-table
-              (funcall (c-lang-const c-no-parens-syntax-table)))
+  (and (c-lang-const c-make-no-parens-syntax-table)
+       (funcall (c-lang-const c-make-no-parens-syntax-table))))
 
 (c-lang-defconst c-identifier-syntax-modifications
   "A list that describes the modifications that should be done to the
@@ -939,10 +941,13 @@ Note that operators like \".\" and \"->\" which in language references
 often are described as postfix operators are considered binary here,
 since CC Mode treats every identifier as an expression."
 
-  ;; There's currently no code in CC Mode that exploit all the info
+  ;; There's currently no code in CC Mode that exploits all the info
   ;; in this variable; precedence, associativity etc are present as a
   ;; preparation for future work.
 
+  ;; FIXME!!!  C++11's "auto" operators "=" and "->" need to go in here
+  ;; somewhere.  2012-03-24.
+
   t `(;; Preprocessor.
       ,@(when (c-lang-const c-opt-cpp-prefix)
          `((prefix "#"
@@ -1149,7 +1154,7 @@ operators."
 (c-lang-defconst c-all-op-syntax-tokens
   ;; List of all tokens in the punctuation and parenthesis syntax
   ;; classes.
-  t (cl-delete-duplicates (append (c-lang-const c-other-op-syntax-tokens)
+  t (delete-duplicates (append (c-lang-const c-other-op-syntax-tokens)
                               (c-lang-const c-operator-list))
                       :test 'string-equal))
 
@@ -1216,22 +1221,41 @@ operators."
 
 (c-lang-defvar c-<-op-cont-regexp (c-lang-const c-<-op-cont-regexp))
 
+(c-lang-defconst c->-op-cont-tokens
+  ;; A list of second and subsequent characters of all multicharacter tokens
+  ;; that begin with ">".
+  t (c-filter-ops (c-lang-const c-all-op-syntax-tokens)
+                 t
+                 "\\`>."
+                 (lambda (op) (substring op 1)))
+  java (c-filter-ops (c-lang-const c-all-op-syntax-tokens)
+                    t
+                    "\\`>[^>]\\|\\`>>[^>]"
+                    (lambda (op) (substring op 1))))
+
 (c-lang-defconst c->-op-cont-regexp
   ;; Regexp matching the second and subsequent characters of all
   ;; multicharacter tokens that begin with ">".
-  t (c-make-keywords-re nil
-      (c-filter-ops (c-lang-const c-all-op-syntax-tokens)
-                   t
-                   "\\`>."
-                   (lambda (op) (substring op 1))))
-  java (c-make-keywords-re nil
-        (c-filter-ops (c-lang-const c-all-op-syntax-tokens)
-                      t
-                      "\\`>[^>]\\|\\`>>[^>]"
-                      (lambda (op) (substring op 1)))))
+  t (c-make-keywords-re nil (c-lang-const c->-op-cont-tokens)))
 
 (c-lang-defvar c->-op-cont-regexp (c-lang-const c->-op-cont-regexp))
 
+(c-lang-defconst c->-op-without->-cont-regexp
+  ;; Regexp matching the second and subsequent characters of all
+  ;; multicharacter tokens that begin with ">" except for those beginning with
+  ;; ">>".
+  t (c-make-keywords-re nil
+      (set-difference
+       (c-lang-const c->-op-cont-tokens)
+       (c-filter-ops (c-lang-const c-all-op-syntax-tokens)
+                    t
+                    "\\`>>"
+                    (lambda (op) (substring op 1)))
+       :test 'string-equal)))
+
+(c-lang-defvar c->-op-without->-cont-regexp
+  (c-lang-const c->-op-without->-cont-regexp))
+
 (c-lang-defconst c-stmt-delim-chars
   ;; The characters that should be considered to bound statements.  To
   ;; optimize `c-crosses-statement-barrier-p' somewhat, it's assumed to
@@ -1246,6 +1270,21 @@ operators."
 (c-lang-defvar c-stmt-delim-chars-with-comma
   (c-lang-const c-stmt-delim-chars-with-comma))
 
+(c-lang-defconst c-auto-ops
+  ;; Ops which signal C++11's new auto uses.
+  t nil
+  c++ '("=" "->"))
+(c-lang-defconst c-auto-ops-re
+  t (c-make-keywords-re nil (c-lang-const c-auto-ops)))
+(c-lang-defvar c-auto-ops-re (c-lang-const c-auto-ops-re))
+
+(c-lang-defconst c-haskell-op
+  ;; Op used in the new C++11 auto function definition, indicating type.
+  t nil
+  c++ '("->"))
+(c-lang-defconst c-haskell-op-re
+  t (c-make-keywords-re nil (c-lang-const c-haskell-op)))
+(c-lang-defvar c-haskell-op-re (c-lang-const c-haskell-op-re))
 \f
 ;;; Syntactic whitespace.
 
@@ -1547,13 +1586,14 @@ properly."
 (c-lang-defvar c-syntactic-eol (c-lang-const c-syntactic-eol))
 
 \f
-;;; Defun functions
-
-;; The Emacs variables beginning-of-defun-function and
-;; end-of-defun-function will be set so that commands like
-;; `mark-defun' and `narrow-to-defun' work right.  The key sequences
-;; C-M-a and C-M-e are, however, bound directly to the CC Mode
-;; functions, allowing optimization for large n.
+;;; Defun handling.
+
+;; The Emacs variables beginning-of-defun-function and end-of-defun-function
+;; will be set so that commands like `mark-defun' and `narrow-to-defun' work
+;; right.  In older Emacsen, the key sequences C-M-a and C-M-e are, however,
+;; bound directly to the CC Mode functions, allowing optimization for large n.
+;; From Emacs 23, this isn't necessary any more, since n is passed to the two
+;; functions.
 (c-lang-defconst beginning-of-defun-function
   "Function to which beginning-of-defun-function will be set."
   t 'c-beginning-of-defun
@@ -1653,6 +1693,18 @@ of a variable declaration."
   t (c-make-keywords-re t (c-lang-const c-typedef-kwds)))
 (c-lang-defvar c-typedef-key (c-lang-const c-typedef-key))
 
+(c-lang-defconst c-typeof-kwds
+  "Keywords followed by a parenthesized expression, which stands for
+the type of that expression."
+  t nil
+  c '("typeof")                                ; longstanding GNU C(++) extension.
+  c++ '("decltype" "typeof"))
+
+(c-lang-defconst c-typeof-key
+  ;; Adorned regexp matching `c-typeof-kwds'.
+  t (c-make-keywords-re t (c-lang-const c-typeof-kwds)))
+(c-lang-defvar c-typeof-key (c-lang-const c-typeof-key))
+
 (c-lang-defconst c-type-prefix-kwds
   "Keywords where the following name - if any - is a type name, and
 where the keyword together with the symbol works as a type in
@@ -1702,7 +1754,7 @@ not the type face."
 (c-lang-defconst c-type-start-kwds
   ;; All keywords that can start a type (i.e. are either a type prefix
   ;; or a complete type).
-  t (cl-delete-duplicates (append (c-lang-const c-primitive-type-kwds)
+  t (delete-duplicates (append (c-lang-const c-primitive-type-kwds)
                               (c-lang-const c-type-prefix-kwds)
                               (c-lang-const c-type-modifier-kwds))
                       :test 'string-equal))
@@ -1836,6 +1888,7 @@ will be handled."
   ;; {...}").
   t    (append (c-lang-const c-class-decl-kwds)
               (c-lang-const c-brace-list-decl-kwds))
+  c++  (append (c-lang-const c-typeless-decl-kwds) '("auto")) ; C++11.
   ;; Note: "manages" for CORBA CIDL clashes with its presence on
   ;; `c-type-list-kwds' for IDL.
   idl  (append (c-lang-const c-typeless-decl-kwds)
@@ -1945,7 +1998,7 @@ one of `c-type-list-kwds', `c-ref-list-kwds',
   ;; something is a type or just some sort of macro in front of the
   ;; declaration.  They might be ambiguous with types or type
   ;; prefixes.
-  t (cl-delete-duplicates (append (c-lang-const c-class-decl-kwds)
+  t (delete-duplicates (append (c-lang-const c-class-decl-kwds)
                               (c-lang-const c-brace-list-decl-kwds)
                               (c-lang-const c-other-block-decl-kwds)
                               (c-lang-const c-typedef-decl-kwds)
@@ -1985,7 +2038,8 @@ one of `c-type-list-kwds', `c-ref-list-kwds',
   t (c-make-keywords-re t
       (set-difference (c-lang-const c-keywords)
                      (append (c-lang-const c-type-start-kwds)
-                             (c-lang-const c-prefix-spec-kwds))
+                             (c-lang-const c-prefix-spec-kwds)
+                             (c-lang-const c-typeof-kwds))
                      :test 'string-equal)))
 (c-lang-defvar c-not-decl-init-keywords
   (c-lang-const c-not-decl-init-keywords))
@@ -2138,7 +2192,7 @@ type identifiers separated by arbitrary tokens."
   pike '("array" "function" "int" "mapping" "multiset" "object" "program"))
 
 (c-lang-defconst c-paren-any-kwds
-  t (cl-delete-duplicates (append (c-lang-const c-paren-nontype-kwds)
+  t (delete-duplicates (append (c-lang-const c-paren-nontype-kwds)
                               (c-lang-const c-paren-type-kwds))
                       :test 'string-equal))
 
@@ -2164,7 +2218,7 @@ assumed to be set if this isn't nil."
 
 (c-lang-defconst c-<>-sexp-kwds
   ;; All keywords that can be followed by an angle bracket sexp.
-  t (cl-delete-duplicates (append (c-lang-const c-<>-type-kwds)
+  t (delete-duplicates (append (c-lang-const c-<>-type-kwds)
                               (c-lang-const c-<>-arglist-kwds))
                       :test 'string-equal))
 
@@ -2224,7 +2278,7 @@ Keywords here should also be in `c-block-stmt-1-kwds'."
 
 (c-lang-defconst c-block-stmt-kwds
   ;; Union of `c-block-stmt-1-kwds' and `c-block-stmt-2-kwds'.
-  t (cl-delete-duplicates (append (c-lang-const c-block-stmt-1-kwds)
+  t (delete-duplicates (append (c-lang-const c-block-stmt-1-kwds)
                               (c-lang-const c-block-stmt-2-kwds))
                       :test 'string-equal))
 
@@ -2328,7 +2382,7 @@ This construct is \"<keyword> <expression> :\"."
 (c-lang-defconst c-expr-kwds
   ;; Keywords that can occur anywhere in expressions.  Built from
   ;; `c-primary-expr-kwds' and all keyword operators in `c-operators'.
-  t (cl-delete-duplicates
+  t (delete-duplicates
      (append (c-lang-const c-primary-expr-kwds)
             (c-filter-ops (c-lang-const c-operator-list)
                           t
@@ -2432,7 +2486,7 @@ Note that Java specific rules are currently applied to tell this from
 
 (c-lang-defconst c-keywords
   ;; All keywords as a list.
-  t (cl-delete-duplicates
+  t (delete-duplicates
      (c-lang-defconst-eval-immediately
       `(append ,@(mapcar (lambda (kwds-lang-const)
                           `(c-lang-const ,kwds-lang-const))
@@ -2772,7 +2826,7 @@ possible for good performance."
 (c-lang-defvar c-block-prefix-charset (c-lang-const c-block-prefix-charset))
 
 (c-lang-defconst c-type-decl-prefix-key
-  "Regexp matching the declarator operators that might precede the
+  "Regexp matching any declarator operator that might precede the
 identifier in a declaration, e.g. the \"*\" in \"char *argv\".  This
 regexp should match \"(\" if parentheses are valid in declarators.
 The end of the first submatch is taken as the end of the operator.
@@ -2971,7 +3025,8 @@ identifier or one of the keywords on `c-<>-type-kwds' or
 expression is considered to be a type."
   t (or (consp (c-lang-const c-<>-type-kwds))
        (consp (c-lang-const c-<>-arglist-kwds)))
-  java t)
+  java t)          ; 2008-10-19.  This is crude.  The syntax for java
+                   ; generics is not yet coded in CC Mode.
 (c-lang-defvar c-recognize-<>-arglists (c-lang-const c-recognize-<>-arglists))
 
 (c-lang-defconst c-enums-contain-decls
@@ -3183,7 +3238,7 @@ accomplish that conveniently."
       `(lambda ()
 
         ;; This let sets up the context for `c-mode-var' and similar
-        ;; that could be in the result from `cl-macroexpand-all'.
+        ;; that could be in the result from `macroexpand-all'.
         (let ((c-buffer-is-cc-mode ',mode)
               current-var source-eval)
           (c-make-emacs-variables-local)
@@ -3193,9 +3248,9 @@ accomplish that conveniently."
                   (setq ,@(let ((c-buffer-is-cc-mode mode)
                                 (c-lang-const-expansion 'immediate))
                             ;; `c-lang-const' will expand to the evaluated
-                            ;; constant immediately in `cl-macroexpand-all'
+                            ;; constant immediately in `macroexpand-all'
                             ;; below.
-                             (cl-mapcan
+                             (mapcan
                               (lambda (init)
                                 `(current-var ',(car init)
                                   ,(car init) ,(macroexpand-all
index 67425a0c82c9d1a44debb079041161a627f600ef..735c2cbf1ede30e2953bda7195acc13815bacbc0 100644 (file)
@@ -361,7 +361,7 @@ Example:
            p (1+ p))
       (cond
        ;; Is CHAR part of a objc token?
-       ((and (not inargvar)     ; Ignore if CHAR is part of an argument variable.
+       ((and (not inargvar)   ; Ignore if CHAR is part of an argument variable.
             (eq 0 betweenparen) ; Ignore if CHAR is in parentheses.
             (or (and (<= ?a char) (<= char ?z))
                 (and (<= ?A char) (<= char ?Z))
index 1ce076734ff656b03416ffe308c0cac97c1f2a35..cb138d5f8b6ab2d351c5bbf38a1d4a41b1764e3b 100644 (file)
@@ -185,8 +185,7 @@ control).  See \"cc-mode.el\" for more info."
            (run-hooks 'c-initialization-hook)
            ;; Fix obsolete variables.
            (if (boundp 'c-comment-continuation-stars)
-               (setq c-block-comment-prefix
-                     (symbol-value 'c-comment-continuation-stars)))
+               (setq c-block-comment-prefix c-comment-continuation-stars))
            (add-hook 'change-major-mode-hook 'c-leave-cc-mode-mode)
            (setq c-initialization-ok t)
            ;; Connect up with Emacs's electric-indent-mode, for >= Emacs 24.4
@@ -1322,6 +1321,7 @@ This function is called from `c-common-init', once per mode initialization."
 ;;;###autoload (add-to-list 'auto-mode-alist '("\\.i\\'" . c-mode))
 ;;;###autoload (add-to-list 'auto-mode-alist '("\\.ii\\'" . c++-mode))
 
+(unless (fboundp 'prog-mode) (defalias 'prog-mode 'fundamental-mode))
 
 ;;;###autoload
 (define-derived-mode c-mode prog-mode "C"
index a8d627f94d4148052bffd964c8ffd5f37094f391..ac8dbfc4c450f38c8c4595d4d08b27ac0c62967a 100644 (file)
@@ -275,13 +275,18 @@ nil."
   "*Controls the operation of the TAB key.
 If t, hitting TAB always just indents the current line.  If nil, hitting
 TAB indents the current line if point is at the left margin or in the
-line's indentation, otherwise it calls `c-insert-tab-function' to
-insert a `real' tab character.  If some other value (neither nil nor t),
-then inserts a tab only within literals (comments and strings), but
-always reindents the line.
-
-Note: the variable `c-comment-only-line-offset' also controls the
-indentation of lines containing only comments."
+line's indentation, otherwise it inserts a `real' tab character \(see
+note\).         If some other value (not nil or t), then tab is inserted only
+within literals \(comments and strings), but the line is always
+reindented.
+
+Note: The value of `indent-tabs-mode' will determine whether a real
+tab character will be inserted, or the equivalent number of spaces.
+When inserting a tab, actually the function stored in the variable
+`c-insert-tab-function' is called.
+
+Note: indentation of lines containing only comments is also controlled
+by the `c-comment-only-line-offset' variable."
   :type '(radio
          (const :tag "TAB key always indents, never inserts TAB" t)
          (const :tag "TAB key indents in left margin, otherwise inserts TAB" nil)
@@ -920,7 +925,7 @@ Only currently supported behavior is `alignleft'."
 (defcustom c-special-indent-hook nil
   "*Hook for user defined special indentation adjustments.
 This hook gets called after each line is indented by the mode.  It is only
-called if `c-syntactic-indentation' is non-nil."
+called when `c-syntactic-indentation' is non-nil."
   :type 'hook
   :group 'c)
 
@@ -1689,7 +1694,8 @@ as designated in the variable `c-file-style'.")
 ;; It isn't possible to specify a doc-string without specifying an
 ;; initial value with `defvar', so the following two variables have been
 ;; given doc-strings by setting the property `variable-documentation'
-;; directly.  It's really good not to have an initial value for
+;; directly.  C-h v will read this documentation only for versions of GNU
+;; Emacs from 22.1.  It's really good not to have an initial value for
 ;; variables like these that always should be dynamically bound, so it's
 ;; worth the inconvenience.
 
index 7d4f6dc25b92f7273496e7b58a34231597178614..8e43c812470eca3f3627fcb6699ac94a4da5ec91 100644 (file)
@@ -27,9 +27,6 @@
 ;; Provides support for editing GNU Cfengine files, including
 ;; font-locking, Imenu and indentation, but with no special keybindings.
 
-;; The CFEngine 3.x support doesn't have Imenu support but patches are
-;; welcome.
-
 ;; By default, CFEngine 3.x syntax is used.
 
 ;; You can set it up so either `cfengine2-mode' (2.x and earlier) or
@@ -56,7 +53,6 @@
 ;;; Code:
 
 (autoload 'json-read "json")
-(autoload 'regexp-opt "regexp-opt")
 
 (defgroup cfengine ()
   "Editing CFEngine files."
@@ -815,24 +811,18 @@ bundle agent rcfiles
     "List of the action keywords supported by Cfengine.
 This includes those for cfservd as well as cfagent.")
 
-  (defconst cfengine3-defuns
-    (mapcar
-     'symbol-name
-     '(bundle body))
+  (defconst cfengine3-defuns '("bundle" "body")
     "List of the CFEngine 3.x defun headings.")
 
-  (defconst cfengine3-defuns-regex
-    (regexp-opt cfengine3-defuns t)
+  (defconst cfengine3-defuns-regex (regexp-opt cfengine3-defuns t)
     "Regex to match the CFEngine 3.x defuns.")
 
   (defconst cfengine3-class-selector-regex "\\([[:alnum:]_().&|!:]+\\)::")
 
   (defconst cfengine3-category-regex "\\([[:alnum:]_]+\\):")
 
-  (defconst cfengine3-vartypes
-    (mapcar
-     'symbol-name
-     '(string int real slist ilist rlist irange rrange counter data))
+  (defconst cfengine3-vartypes '("string" "int" "real" "slist" "ilist" "rlist"
+                                 "irange" "rrange" "counter" "data")
     "List of the CFEngine 3.x variable types."))
 
 (defvar cfengine2-font-lock-keywords
@@ -1231,29 +1221,32 @@ Should not be necessary unless you reinstall CFEngine."
   (setq cfengine-mode-syntax-cache nil))
 
 (defun cfengine3-make-syntax-cache ()
-  "Build the CFEngine 3 syntax cache.
-Calls `cfengine-cf-promises' with \"-s json\""
-  (let ((syntax (cddr (assoc cfengine-cf-promises cfengine-mode-syntax-cache))))
-    (if cfengine-cf-promises
-        (or syntax
-            (with-demoted-errors
-                (with-temp-buffer
-                  (call-process-shell-command cfengine-cf-promises
-                                              nil   ; no input
-                                              t     ; current buffer
-                                              nil   ; no redisplay
-                                              "-s" "json")
-                  (goto-char (point-min))
-                  (setq syntax (json-read))
-                  (setq cfengine-mode-syntax-cache
-                        (cons (cons cfengine-cf-promises syntax)
-                              cfengine-mode-syntax-cache))
-                  (setq cfengine-mode-syntax-functions-regex
-                        (regexp-opt (mapcar (lambda (def)
-                                              (format "%s" (car def)))
-                                            (cdr (assq 'functions syntax)))
-                                    'symbols))))))
-    cfengine3-fallback-syntax))
+  "Build the CFEngine 3 syntax cache and return the syntax.
+Calls `cfengine-cf-promises' with \"-s json\"."
+  (or (cdr (assoc cfengine-cf-promises cfengine-mode-syntax-cache))
+      (let ((syntax (or (when cfengine-cf-promises
+                          (with-demoted-errors "cfengine3-make-syntax-cache: %S"
+                            (with-temp-buffer
+                              (or (zerop (process-file cfengine-cf-promises
+                                                       nil ; no input
+                                                       t   ; output
+                                                       nil ; no redisplay
+                                                       "-s" "json"))
+                                  (error "%s" (buffer-substring
+                                               (point-min)
+                                               (progn (goto-char (point-min))
+                                                      (line-end-position)))))
+                              (goto-char (point-min))
+                              (json-read))))
+                        cfengine3-fallback-syntax)))
+        (push (cons cfengine-cf-promises syntax)
+              cfengine-mode-syntax-cache)
+        (setq cfengine-mode-syntax-functions-regex
+              (regexp-opt (mapcar (lambda (def)
+                                    (format "%s" (car def)))
+                                  (cdr (assq 'functions syntax)))
+                          'symbols))
+        syntax)))
 
 (defun cfengine3-documentation-function ()
   "Document CFengine 3 functions around point.
@@ -1265,7 +1258,6 @@ Use it by enabling `eldoc-mode'."
 
 (defun cfengine3-completion-function ()
   "Return completions for function name around or before point."
-  (cfengine3-make-syntax-cache)
   (let* ((bounds (save-excursion
                    (let ((p (point)))
                      (skip-syntax-backward "w_" (point-at-bol))
@@ -1306,6 +1298,20 @@ Use it by enabling `eldoc-mode'."
     ("=>"  . ?⇒)
     ("::" . ?∷)))
 
+(defun cfengine3-create-imenu-index ()
+  "A function for `imenu-create-index-function'."
+  (goto-char (point-min))
+  (let ((re (concat "^\\s-*" cfengine3-defuns-regex
+                    "\\s-+\\(\\(?:\\w\\|\\s_\\)+\\)" ;type
+                    "\\s-+\\(\\(?:\\w\\|\\s_\\)+\\)" ;id
+                    ))
+        (defuns ()))
+    (while (re-search-forward re nil t)
+      (push (cons (mapconcat #'match-string '(1 2 3) ".")
+                  (copy-marker (match-beginning 3)))
+            defuns))
+    (nreverse defuns)))
+
 ;;;###autoload
 (define-derived-mode cfengine3-mode prog-mode "CFE3"
   "Major mode for editing CFEngine3 input.
@@ -1332,17 +1338,16 @@ to the action header."
                  (when buffer-file-name
                    (shell-quote-argument buffer-file-name)))))
 
-  (set (make-local-variable 'eldoc-documentation-function)
-       #'cfengine3-documentation-function)
+  (setq-local eldoc-documentation-function #'cfengine3-documentation-function)
 
   (add-hook 'completion-at-point-functions
             #'cfengine3-completion-function nil t)
 
   ;; Use defuns as the essential syntax block.
-  (set (make-local-variable 'beginning-of-defun-function)
-       #'cfengine3-beginning-of-defun)
-  (set (make-local-variable 'end-of-defun-function)
-       #'cfengine3-end-of-defun))
+  (setq-local beginning-of-defun-function #'cfengine3-beginning-of-defun)
+  (setq-local end-of-defun-function #'cfengine3-end-of-defun)
+
+  (setq-local imenu-create-index-function #'cfengine3-create-imenu-index))
 
 ;;;###autoload
 (define-derived-mode cfengine2-mode prog-mode "CFE2"
@@ -1376,15 +1381,18 @@ to the action header."
 
 ;;;###autoload
 (defun cfengine-auto-mode ()
-  "Choose between `cfengine2-mode' and `cfengine3-mode' depending
-on the buffer contents"
-  (let ((v3 nil))
-    (save-restriction
-      (goto-char (point-min))
-      (while (not (or (eobp) v3))
-        (setq v3 (looking-at (concat cfengine3-defuns-regex "\\_>")))
-        (forward-line)))
-    (if v3 (cfengine3-mode) (cfengine2-mode))))
+  "Choose `cfengine2-mode' or `cfengine3-mode' by buffer contents."
+  (interactive)
+  (if (save-excursion
+        (save-restriction
+          (widen)
+          (goto-char (point-min))
+          (forward-comment (point-max))
+          (or (eobp)
+              (re-search-forward
+               (concat "^\\s-*" cfengine3-defuns-regex "\\_>") nil t))))
+      (cfengine3-mode)
+    (cfengine2-mode)))
 
 (defalias 'cfengine-mode 'cfengine3-mode)
 
index 30f30dfe83fa1787ac3552c08e50e0207d54d581..5d3b6878a70601c5c9f5bca1f7f42473e92feddb 100644 (file)
@@ -134,7 +134,7 @@ and a string describing how the process finished.")
 ;; emacs -batch -l compile-tests.el -f ert-run-tests-batch-and-exit
 
 (defvar compilation-error-regexp-alist-alist
-  '((absoft
+  `((absoft
      "^\\(?:[Ee]rror on \\|[Ww]arning on\\( \\)\\)?[Ll]ine[ \t]+\\([0-9]+\\)[ \t]+\
 of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
 
@@ -255,16 +255,46 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
      ;; can be composed of any non-newline char, but it also rules out some
      ;; valid but unlikely cases, such as a trailing space or a space
      ;; followed by a -, or a colon followed by a space.
-
+     ;; 
      ;; The "in \\|from " exception was added to handle messages from Ruby.
-     "^\\(?:[[:alpha:]][-[:alnum:].]+: ?\\|[ \t]+\\(?:in \\|from \\)\\)?\
-\\([0-9]*[^0-9\n]\\(?:[^\n :]\\| [^-/\n]\\|:[^ \n]\\)*?\\): ?\
-\\([0-9]+\\)\\(?:-\\(?4:[0-9]+\\)\\(?:\\.\\(?5:[0-9]+\\)\\)?\
-\\|[.:]\\(?3:[0-9]+\\)\\(?:-\\(?:\\(?4:[0-9]+\\)\\.\\)?\\(?5:[0-9]+\\)\\)?\\)?:\
-\\(?: *\\(\\(?:Future\\|Runtime\\)?[Ww]arning\\|W:\\)\\|\
- *\\([Ii]nfo\\(?:\\>\\|rmationa?l?\\)\\|I:\\|\\[ skipping .+ \\]\\|\
-\\(?:instantiated\\|required\\) from\\|[Nn]ote\\)\\|\
- *[Ee]rror\\|[0-9]?\\(?:[^0-9\n]\\|$\\)\\|[0-9][0-9][0-9]\\)"
+     ,(rx
+       bol
+       (? (| (regexp "[[:alpha:]][-[:alnum:].]+: ?")
+             (regexp "[ \t]+\\(?:in \\|from\\)")))
+       (group-n 1 (: (regexp "[0-9]*[^0-9\n]")
+                     (*? (| (regexp "[^\n :]")
+                            (regexp " [^-/\n]")
+                            (regexp ":[^ \n]")))))
+       (regexp ": ?")
+       (group-n 2 (regexp "[0-9]+"))
+       (? (| (: "-"
+                (group-n 4 (regexp "[0-9]+"))
+                (? "." (group-n 5 (regexp "[0-9]+"))))
+             (: (in ".:")
+                (group-n 3 (regexp "[0-9]+"))
+                (? "-"
+                   (? (group-n 4 (regexp "[0-9]+")) ".")
+                   (group-n 5 (regexp "[0-9]+"))))))
+       ":"
+       (| (: (* " ")
+             (group-n 6 (| "FutureWarning"
+                           "RuntimeWarning"
+                           "Warning"
+                           "warning"
+                           "W:")))
+          (: (* " ")
+             (group-n 7 (| (regexp "[Ii]nfo\\(?:\\>\\|rmationa?l?\\)")
+                           "I:"
+                           (: "[ skipping " (+ ".") " ]")
+                           "instantiated from"
+                           "required from"
+                           (regexp "[Nn]ote"))))
+          (: (* " ")
+             (regexp "[Ee]rror"))
+          (: (regexp "[0-9]?")
+             (| (regexp "[^0-9\n]")
+                eol))
+          (regexp "[0-9][0-9][0-9]")))
      1 (2 . 4) (3 . 5) (6 . 7))
 
     (lcc
@@ -447,6 +477,8 @@ File = \\(.+\\), Line = \\([0-9]+\\)\\(?:, Column = \\([0-9]+\\)\\)?"
      ;;
      "^\\([^ \t\r\n(]+\\) (\\([0-9]+\\):\\([0-9]+\\)) "
      1 2 3)
+    (guile-file "^In \\(.+\\):\n" 1)
+    (guile-line "^ *\\([0-9]+\\): *\\([0-9]+\\)" nil 1 2)
     )
   "Alist of values for `compilation-error-regexp-alist'.")
 
@@ -2039,8 +2071,7 @@ Optional argument MINOR indicates this is called from
   (if minor
       (progn
        (font-lock-add-keywords nil (compilation-mode-font-lock-keywords))
-       (if font-lock-mode
-            (font-lock-fontify-buffer)))
+        (font-lock-flush))
     (setq font-lock-defaults '(compilation-mode-font-lock-keywords t))))
 
 (defun compilation--unsetup ()
@@ -2049,8 +2080,7 @@ Optional argument MINOR indicates this is called from
   (remove-hook 'before-change-functions 'compilation--flush-parse t)
   (kill-local-variable 'compilation--parsed)
   (compilation--remove-properties)
-  (if font-lock-mode
-      (font-lock-fontify-buffer)))
+  (font-lock-flush))
 
 ;;;###autoload
 (define-minor-mode compilation-shell-minor-mode
index c4f2b9ffe517a30845fe10d96f1dc51452b4b76c..cd60475974c59769ea923a4a13ac604cc9f91769 100644 (file)
@@ -4828,9 +4828,9 @@ the sections using `cperl-pod-head-face', `cperl-pod-face',
       (and (memq (char-syntax (preceding-char)) '(?w ?_))
           (progn
             (backward-sexp)
-            ;; sub {BLK}, print {BLK} $data, but NOT `bless', `return', `tr'
+            ;; sub {BLK}, print {BLK} $data, but NOT `bless', `return', `tr', `constant'
             (or (and (looking-at "[a-zA-Z0-9_:]+[ \t\n\f]*[{#]") ; Method call syntax
-                     (not (looking-at "\\(bless\\|return\\|q[wqrx]?\\|tr\\|[smy]\\)\\>")))
+                     (not (looking-at "\\(bless\\|return\\|q[wqrx]?\\|tr\\|[smy]\\|constant\\)\\>")))
                 ;; sub bless::foo {}
                 (progn
                   (cperl-backward-to-noncomment (point-min))
index 4e4fc1388773f629cc9f420d11108afd64a05399..1aa5170591a57a2d64d0bcb675e34c886f33f152 100644 (file)
@@ -188,7 +188,7 @@ and disable it otherwise.  If called from Lisp, enable the mode
 if ARG is omitted or nil."
   :group 'cwarn :lighter cwarn-mode-text
   (cwarn-font-lock-keywords cwarn-mode)
-  (if font-lock-mode (font-lock-fontify-buffer)))
+  (font-lock-flush))
 
 ;;;###autoload
 (define-obsolete-function-alias 'turn-on-cwarn-mode 'cwarn-mode "24.1")
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
new file mode 100644 (file)
index 0000000..900e859
--- /dev/null
@@ -0,0 +1,1297 @@
+;;; elisp-mode.el --- Emacs Lisp mode  -*- lexical-binding:t -*-
+
+;; Copyright (C) 1985-1986, 1999-2014 Free Software Foundation, Inc.
+
+;; Maintainer: emacs-devel@gnu.org
+;; Keywords: lisp, languages
+;; Package: emacs
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; The major mode for editing Emacs Lisp code.
+;; This mode is documented in the Emacs manual.
+
+;;; Code:
+
+(require 'lisp-mode)
+
+(defvar emacs-lisp-mode-abbrev-table nil)
+(define-abbrev-table 'emacs-lisp-mode-abbrev-table ()
+  "Abbrev table for Emacs Lisp mode.
+It has `lisp-mode-abbrev-table' as its parent."
+  :parents (list lisp-mode-abbrev-table))
+
+(defvar emacs-lisp-mode-syntax-table
+  (let ((table (make-syntax-table lisp--mode-syntax-table)))
+    (modify-syntax-entry ?\[ "(]  " table)
+    (modify-syntax-entry ?\] ")[  " table)
+    table)
+  "Syntax table used in `emacs-lisp-mode'.")
+
+(defvar emacs-lisp-mode-map
+  (let ((map (make-sparse-keymap "Emacs-Lisp"))
+       (menu-map (make-sparse-keymap "Emacs-Lisp"))
+       (lint-map (make-sparse-keymap))
+       (prof-map (make-sparse-keymap))
+       (tracing-map (make-sparse-keymap)))
+    (set-keymap-parent map lisp-mode-shared-map)
+    (define-key map "\e\t" 'completion-at-point)
+    (define-key map "\e\C-x" 'eval-defun)
+    (define-key map "\e\C-q" 'indent-pp-sexp)
+    (bindings--define-key map [menu-bar emacs-lisp]
+      (cons "Emacs-Lisp" menu-map))
+    (bindings--define-key menu-map [eldoc]
+      '(menu-item "Auto-Display Documentation Strings" eldoc-mode
+                 :button (:toggle . (bound-and-true-p eldoc-mode))
+                 :help "Display the documentation string for the item under cursor"))
+    (bindings--define-key menu-map [checkdoc]
+      '(menu-item "Check Documentation Strings" checkdoc
+                 :help "Check documentation strings for style requirements"))
+    (bindings--define-key menu-map [re-builder]
+      '(menu-item "Construct Regexp" re-builder
+                 :help "Construct a regexp interactively"))
+    (bindings--define-key menu-map [tracing] (cons "Tracing" tracing-map))
+    (bindings--define-key tracing-map [tr-a]
+      '(menu-item "Untrace All" untrace-all
+                 :help "Untrace all currently traced functions"))
+    (bindings--define-key tracing-map [tr-uf]
+      '(menu-item "Untrace Function..." untrace-function
+                 :help "Untrace function, and possibly activate all remaining advice"))
+    (bindings--define-key tracing-map [tr-sep] menu-bar-separator)
+    (bindings--define-key tracing-map [tr-q]
+      '(menu-item "Trace Function Quietly..." trace-function-background
+                 :help "Trace the function with trace output going quietly to a buffer"))
+    (bindings--define-key tracing-map [tr-f]
+      '(menu-item "Trace Function..." trace-function
+                 :help "Trace the function given as an argument"))
+    (bindings--define-key menu-map [profiling] (cons "Profiling" prof-map))
+    (bindings--define-key prof-map [prof-restall]
+      '(menu-item "Remove Instrumentation for All Functions" elp-restore-all
+                 :help "Restore the original definitions of all functions being profiled"))
+    (bindings--define-key prof-map [prof-restfunc]
+      '(menu-item "Remove Instrumentation for Function..." elp-restore-function
+                 :help "Restore an instrumented function to its original definition"))
+
+    (bindings--define-key prof-map [sep-rem] menu-bar-separator)
+    (bindings--define-key prof-map [prof-resall]
+      '(menu-item "Reset Counters for All Functions" elp-reset-all
+                 :help "Reset the profiling information for all functions being profiled"))
+    (bindings--define-key prof-map [prof-resfunc]
+      '(menu-item "Reset Counters for Function..." elp-reset-function
+                 :help "Reset the profiling information for a function"))
+    (bindings--define-key prof-map [prof-res]
+      '(menu-item "Show Profiling Results" elp-results
+                 :help "Display current profiling results"))
+    (bindings--define-key prof-map [prof-pack]
+      '(menu-item "Instrument Package..." elp-instrument-package
+                 :help "Instrument for profiling all function that start with a prefix"))
+    (bindings--define-key prof-map [prof-func]
+      '(menu-item "Instrument Function..." elp-instrument-function
+                 :help "Instrument a function for profiling"))
+    ;; Maybe this should be in a separate submenu from the ELP stuff?
+    (bindings--define-key prof-map [sep-natprof] menu-bar-separator)
+    (bindings--define-key prof-map [prof-natprof-stop]
+      '(menu-item "Stop Native Profiler" profiler-stop
+                 :help "Stop recording profiling information"
+                 :enable (and (featurep 'profiler)
+                              (profiler-running-p))))
+    (bindings--define-key prof-map [prof-natprof-report]
+      '(menu-item "Show Profiler Report" profiler-report
+                 :help "Show the current profiler report"
+                 :enable (and (featurep 'profiler)
+                              (profiler-running-p))))
+    (bindings--define-key prof-map [prof-natprof-start]
+      '(menu-item "Start Native Profiler..." profiler-start
+                 :help "Start recording profiling information"))
+
+    (bindings--define-key menu-map [lint] (cons "Linting" lint-map))
+    (bindings--define-key lint-map [lint-di]
+      '(menu-item "Lint Directory..." elint-directory
+                 :help "Lint a directory"))
+    (bindings--define-key lint-map [lint-f]
+      '(menu-item "Lint File..." elint-file
+                 :help "Lint a file"))
+    (bindings--define-key lint-map [lint-b]
+      '(menu-item "Lint Buffer" elint-current-buffer
+                 :help "Lint the current buffer"))
+    (bindings--define-key lint-map [lint-d]
+      '(menu-item "Lint Defun" elint-defun
+                 :help "Lint the function at point"))
+    (bindings--define-key menu-map [edebug-defun]
+      '(menu-item "Instrument Function for Debugging" edebug-defun
+                 :help "Evaluate the top level form point is in, stepping through with Edebug"
+                 :keys "C-u C-M-x"))
+    (bindings--define-key menu-map [separator-byte] menu-bar-separator)
+    (bindings--define-key menu-map [disas]
+      '(menu-item "Disassemble Byte Compiled Object..." disassemble
+                 :help "Print disassembled code for OBJECT in a buffer"))
+    (bindings--define-key menu-map [byte-recompile]
+      '(menu-item "Byte-recompile Directory..." byte-recompile-directory
+                 :help "Recompile every `.el' file in DIRECTORY that needs recompilation"))
+    (bindings--define-key menu-map [emacs-byte-compile-and-load]
+      '(menu-item "Byte-compile and Load" emacs-lisp-byte-compile-and-load
+                 :help "Byte-compile the current file (if it has changed), then load compiled code"))
+    (bindings--define-key menu-map [byte-compile]
+      '(menu-item "Byte-compile This File" emacs-lisp-byte-compile
+                 :help "Byte compile the file containing the current buffer"))
+    (bindings--define-key menu-map [separator-eval] menu-bar-separator)
+    (bindings--define-key menu-map [ielm]
+      '(menu-item "Interactive Expression Evaluation" ielm
+                 :help "Interactively evaluate Emacs Lisp expressions"))
+    (bindings--define-key menu-map [eval-buffer]
+      '(menu-item "Evaluate Buffer" eval-buffer
+                 :help "Execute the current buffer as Lisp code"))
+    (bindings--define-key menu-map [eval-region]
+      '(menu-item "Evaluate Region" eval-region
+                 :help "Execute the region as Lisp code"
+                 :enable mark-active))
+    (bindings--define-key menu-map [eval-sexp]
+      '(menu-item "Evaluate Last S-expression" eval-last-sexp
+                 :help "Evaluate sexp before point; print value in echo area"))
+    (bindings--define-key menu-map [separator-format] menu-bar-separator)
+    (bindings--define-key menu-map [comment-region]
+      '(menu-item "Comment Out Region" comment-region
+                 :help "Comment or uncomment each line in the region"
+                 :enable mark-active))
+    (bindings--define-key menu-map [indent-region]
+      '(menu-item "Indent Region" indent-region
+                 :help "Indent each nonblank line in the region"
+                 :enable mark-active))
+    (bindings--define-key menu-map [indent-line]
+      '(menu-item "Indent Line" lisp-indent-line))
+    map)
+  "Keymap for Emacs Lisp mode.
+All commands in `lisp-mode-shared-map' are inherited by this map.")
+
+(defun emacs-lisp-byte-compile ()
+  "Byte compile the file containing the current buffer."
+  (interactive)
+  (if buffer-file-name
+      (byte-compile-file buffer-file-name)
+    (error "The buffer must be saved in a file first")))
+
+(defun emacs-lisp-byte-compile-and-load ()
+  "Byte-compile the current file (if it has changed), then load compiled code."
+  (interactive)
+  (or buffer-file-name
+      (error "The buffer must be saved in a file first"))
+  (require 'bytecomp)
+  ;; Recompile if file or buffer has changed since last compilation.
+  (if (and (buffer-modified-p)
+          (y-or-n-p (format "Save buffer %s first? " (buffer-name))))
+      (save-buffer))
+  (byte-recompile-file buffer-file-name nil 0 t))
+
+(defun emacs-lisp-macroexpand ()
+  "Macroexpand the form after point.
+Comments in the form will be lost."
+  (interactive)
+  (let* ((start (point))
+         (exp (read (current-buffer)))
+         ;; Compute it before, since it may signal errors.
+         (new (macroexpand exp)))
+    (if (equal exp new)
+        (message "Not a macro call, nothing to expand")
+      (delete-region start (point))
+      (pp new (current-buffer))
+      (if (bolp) (delete-char -1))
+      (indent-region start (point)))))
+
+(defcustom emacs-lisp-mode-hook nil
+  "Hook run when entering Emacs Lisp mode."
+  :options '(eldoc-mode imenu-add-menubar-index checkdoc-minor-mode)
+  :type 'hook
+  :group 'lisp)
+
+;;;###autoload
+(define-derived-mode emacs-lisp-mode prog-mode "Emacs-Lisp"
+  "Major mode for editing Lisp code to run in Emacs.
+Commands:
+Delete converts tabs to spaces as it moves back.
+Blank lines separate paragraphs.  Semicolons start comments.
+
+\\{emacs-lisp-mode-map}"
+  :group 'lisp
+  (lisp-mode-variables nil nil 'elisp)
+  (setq imenu-case-fold-search nil)
+  (setq-local eldoc-documentation-function
+              #'elisp-eldoc-documentation-function)
+  (add-hook 'completion-at-point-functions
+            #'elisp-completion-at-point nil 'local))
+
+;;; Completion at point for Elisp
+
+(defun elisp--local-variables-1 (vars sexp)
+  "Return the vars locally bound around the witness, or nil if not found."
+  (let (res)
+    (while
+        (unless
+            (setq res
+                  (pcase sexp
+                    (`(,(or `let `let*) ,bindings)
+                     (let ((vars vars))
+                       (when (eq 'let* (car sexp))
+                         (dolist (binding (cdr (reverse bindings)))
+                           (push (or (car-safe binding) binding) vars)))
+                       (elisp--local-variables-1
+                        vars (car (cdr-safe (car (last bindings)))))))
+                    (`(,(or `let `let*) ,bindings . ,body)
+                     (let ((vars vars))
+                       (dolist (binding bindings)
+                         (push (or (car-safe binding) binding) vars))
+                       (elisp--local-variables-1 vars (car (last body)))))
+                    (`(lambda ,_args)
+                     ;; FIXME: Look for the witness inside `args'.
+                     (setq sexp nil))
+                    (`(lambda ,args . ,body)
+                     (elisp--local-variables-1
+                      (append (remq '&optional (remq '&rest args)) vars)
+                      (car (last body))))
+                    (`(condition-case ,_ ,e) (elisp--local-variables-1 vars e))
+                    (`(condition-case ,v ,_ . ,catches)
+                     (elisp--local-variables-1
+                      (cons v vars) (cdr (car (last catches)))))
+                    (`(quote . ,_)
+                     ;; FIXME: Look for the witness inside sexp.
+                     (setq sexp nil))
+                    ;; FIXME: Handle `cond'.
+                    (`(,_ . ,_)
+                     (elisp--local-variables-1 vars (car (last sexp))))
+                    (`elisp--witness--lisp (or vars '(nil)))
+                    (_ nil)))
+          ;; We didn't find the witness in the last element so we try to
+          ;; backtrack to the last-but-one.
+          (setq sexp (ignore-errors (butlast sexp)))))
+    res))
+
+(defun elisp--local-variables ()
+  "Return a list of locally let-bound variables at point."
+  (save-excursion
+    (skip-syntax-backward "w_")
+    (let* ((ppss (syntax-ppss))
+           (txt (buffer-substring-no-properties (or (car (nth 9 ppss)) (point))
+                                                (or (nth 8 ppss) (point))))
+           (closer ()))
+      (dolist (p (nth 9 ppss))
+        (push (cdr (syntax-after p)) closer))
+      (setq closer (apply #'string closer))
+      (let* ((sexp (condition-case nil
+                       (car (read-from-string
+                             (concat txt "elisp--witness--lisp" closer)))
+                     (end-of-file nil)))
+             (macroexpand-advice (lambda (expander form &rest args)
+                                   (condition-case nil
+                                       (apply expander form args)
+                                     (error form))))
+             (sexp
+              (unwind-protect
+                  (progn
+                    (advice-add 'macroexpand :around macroexpand-advice)
+                    (macroexpand-all sexp))
+                (advice-remove 'macroexpand macroexpand-advice)))
+             (vars (elisp--local-variables-1 nil sexp)))
+        (delq nil
+              (mapcar (lambda (var)
+                        (and (symbolp var)
+                             (not (string-match (symbol-name var) "\\`[&_]"))
+                             ;; Eliminate uninterned vars.
+                             (intern-soft var)
+                             var))
+                      vars))))))
+
+(defvar elisp--local-variables-completion-table
+  ;; Use `defvar' rather than `defconst' since defconst would purecopy this
+  ;; value, which would doubly fail: it would fail because purecopy can't
+  ;; handle the recursive bytecode object, and it would fail because it would
+  ;; move `lastpos' and `lastvars' to pure space where they'd be immutable!
+  (let ((lastpos nil) (lastvars nil))
+    (letrec ((hookfun (lambda ()
+                        (setq lastpos nil)
+                        (remove-hook 'post-command-hook hookfun))))
+      (completion-table-dynamic
+       (lambda (_string)
+         (save-excursion
+           (skip-syntax-backward "_w")
+           (let ((newpos (cons (point) (current-buffer))))
+             (unless (equal lastpos newpos)
+               (add-hook 'post-command-hook hookfun)
+               (setq lastpos newpos)
+               (setq lastvars
+                     (mapcar #'symbol-name (elisp--local-variables))))))
+         lastvars)))))
+
+(defun elisp--expect-function-p (pos)
+  "Return non-nil if the symbol at point is expected to be a function."
+  (or
+   (and (eq (char-before pos) ?')
+        (eq (char-before (1- pos)) ?#))
+   (save-excursion
+     (let ((parent (nth 1 (syntax-ppss pos))))
+       (when parent
+         (goto-char parent)
+         (and
+          (looking-at (concat "(\\(cl-\\)?"
+                              (regexp-opt '("declare-function"
+                                            "function" "defadvice"
+                                            "callf" "callf2"
+                                            "defsetf"))
+                              "[ \t\r\n]+"))
+          (eq (match-end 0) pos)))))))
+
+(defun elisp--form-quoted-p (pos)
+  "Return non-nil if the form at POS is not evaluated.
+It can be quoted, or be inside a quoted form."
+  ;; FIXME: Do some macro expansion maybe.
+  (save-excursion
+    (let ((state (syntax-ppss pos)))
+      (or (nth 8 state)   ; Code inside strings usually isn't evaluated.
+          ;; FIXME: The 9th element is undocumented.
+          (let ((nesting (cons (point) (reverse (nth 9 state))))
+                res)
+            (while (and nesting (not res))
+              (goto-char (pop nesting))
+              (cond
+               ((or (eq (char-after) ?\[)
+                    (progn
+                      (skip-chars-backward " ")
+                      (memq (char-before) '(?' ?`))))
+                (setq res t))
+               ((eq (char-before) ?,)
+                (setq nesting nil))))
+            res)))))
+
+;; FIXME: Support for Company brings in features which straddle eldoc.
+;; We should consolidate this, so that major modes can provide all that
+;; data all at once:
+;; - a function to extract "the reference at point" (may be more complex
+;;     than a mere string, to distinguish various namespaces).
+;; - a function to jump to such a reference.
+;; - a function to show the signature/interface of such a reference.
+;; - a function to build a help-buffer about that reference.
+;; FIXME: Those functions should also be used by the normal completion code in
+;; the *Completions* buffer.
+
+(defun elisp--company-doc-buffer (str)
+  (let ((symbol (intern-soft str)))
+    ;; FIXME: we really don't want to "display-buffer and then undo it".
+    (save-window-excursion
+      ;; Make sure we don't display it in another frame, otherwise
+      ;; save-window-excursion won't be able to undo it.
+      (let ((display-buffer-overriding-action
+             '(nil . ((inhibit-switch-frame . t)))))
+        (ignore-errors
+          (cond
+           ((fboundp symbol) (describe-function symbol))
+           ((boundp symbol) (describe-variable symbol))
+           ((featurep symbol) (describe-package symbol))
+           ((facep symbol) (describe-face symbol))
+           (t (signal 'user-error nil)))
+          (help-buffer))))))
+
+(defun elisp--company-doc-string (str)
+  (let* ((symbol (intern-soft str))
+         (doc (if (fboundp symbol)
+                  (documentation symbol t)
+                (documentation-property symbol 'variable-documentation t))))
+    (and (stringp doc)
+         (string-match ".*$" doc)
+         (match-string 0 doc))))
+
+(declare-function find-library-name "find-func" (library))
+
+(defun elisp--company-location (str)
+  (let ((sym (intern-soft str)))
+    (cond
+     ((fboundp sym) (find-definition-noselect sym nil))
+     ((boundp sym) (find-definition-noselect sym 'defvar))
+     ((featurep sym)
+      (require 'find-func)
+      (cons (find-file-noselect (find-library-name
+                                 (symbol-name sym)))
+            0))
+     ((facep sym) (find-definition-noselect sym 'defface)))))
+
+(defun elisp-completion-at-point ()
+  "Function used for `completion-at-point-functions' in `emacs-lisp-mode'."
+  (with-syntax-table emacs-lisp-mode-syntax-table
+    (let* ((pos (point))
+          (beg (condition-case nil
+                   (save-excursion
+                     (backward-sexp 1)
+                     (skip-syntax-forward "'")
+                     (point))
+                 (scan-error pos)))
+          (end
+           (unless (or (eq beg (point-max))
+                       (member (char-syntax (char-after beg))
+                                '(?\s ?\" ?\( ?\))))
+             (condition-case nil
+                 (save-excursion
+                   (goto-char beg)
+                   (forward-sexp 1)
+                    (skip-chars-backward "'")
+                   (when (>= (point) pos)
+                     (point)))
+               (scan-error pos))))
+           ;; t if in function position.
+           (funpos (eq (char-before beg) ?\()))
+      (when (and end (or (not (nth 8 (syntax-ppss)))
+                         (eq (char-before beg) ?`)))
+        (let ((table-etc
+               (if (not funpos)
+                   ;; FIXME: We could look at the first element of the list and
+                   ;; use it to provide a more specific completion table in some
+                   ;; cases.  E.g. filter out keywords that are not understood by
+                   ;; the macro/function being called.
+                   (cond
+                    ((elisp--expect-function-p beg)
+                     (list nil obarray
+                           :predicate #'fboundp
+                           :company-doc-buffer #'elisp--company-doc-buffer
+                           :company-docsig #'elisp--company-doc-string
+                           :company-location #'elisp--company-location))
+                    ((elisp--form-quoted-p beg)
+                     (list nil obarray
+                           ;; Don't include all symbols
+                           ;; (bug#16646).
+                           :predicate (lambda (sym)
+                                        (or (boundp sym)
+                                            (fboundp sym)
+                                            (symbol-plist sym)))
+                           :annotation-function
+                           (lambda (str) (if (fboundp (intern-soft str)) " <f>"))
+                           :company-doc-buffer #'elisp--company-doc-buffer
+                           :company-docsig #'elisp--company-doc-string
+                           :company-location #'elisp--company-location))
+                    (t
+                     (list nil (completion-table-merge
+                                elisp--local-variables-completion-table
+                                (apply-partially #'completion-table-with-predicate
+                                                 obarray
+                                                 #'boundp
+                                                 'strict))
+                           :company-doc-buffer #'elisp--company-doc-buffer
+                           :company-docsig #'elisp--company-doc-string
+                           :company-location #'elisp--company-location)))
+                 ;; Looks like a funcall position.  Let's double check.
+                 (save-excursion
+                   (goto-char (1- beg))
+                   (let ((parent
+                          (condition-case nil
+                              (progn (up-list -1) (forward-char 1)
+                                     (let ((c (char-after)))
+                                       (if (eq c ?\() ?\(
+                                         (if (memq (char-syntax c) '(?w ?_))
+                                             (read (current-buffer))))))
+                            (error nil))))
+                     (pcase parent
+                       ;; FIXME: Rather than hardcode special cases here,
+                       ;; we should use something like a symbol-property.
+                       (`declare
+                        (list t (mapcar (lambda (x) (symbol-name (car x)))
+                                        (delete-dups
+                                         ;; FIXME: We should include some
+                                         ;; docstring with each entry.
+                                         (append
+                                          macro-declarations-alist
+                                          defun-declarations-alist)))))
+                       ((and (or `condition-case `condition-case-unless-debug)
+                             (guard (save-excursion
+                                      (ignore-errors
+                                        (forward-sexp 2)
+                                        (< (point) beg)))))
+                        (list t obarray
+                              :predicate (lambda (sym) (get sym 'error-conditions))))
+                       ((and ?\(
+                             (guard (save-excursion
+                                      (goto-char (1- beg))
+                                      (up-list -1)
+                                      (forward-symbol -1)
+                                      (looking-at "\\_<let\\*?\\_>"))))
+                        (list t obarray
+                              :predicate #'boundp
+                              :company-doc-buffer #'elisp--company-doc-buffer
+                              :company-docsig #'elisp--company-doc-string
+                              :company-location #'elisp--company-location))
+                       (_ (list nil obarray
+                                :predicate #'fboundp
+                                :company-doc-buffer #'elisp--company-doc-buffer
+                                :company-docsig #'elisp--company-doc-string
+                                :company-location #'elisp--company-location
+                                ))))))))
+          (nconc (list beg end)
+                 (if (null (car table-etc))
+                     (cdr table-etc)
+                   (cons
+                    (if (memq (char-syntax (or (char-after end) ?\s))
+                              '(?\s ?>))
+                        (cadr table-etc)
+                      (apply-partially 'completion-table-with-terminator
+                                       " " (cadr table-etc)))
+                    (cddr table-etc)))))))))
+
+(define-obsolete-function-alias
+  'lisp-completion-at-point 'elisp-completion-at-point "25.1")
+
+;;; Elisp Interaction mode
+
+(defvar lisp-interaction-mode-map
+  (let ((map (make-sparse-keymap))
+       (menu-map (make-sparse-keymap "Lisp-Interaction")))
+    (set-keymap-parent map lisp-mode-shared-map)
+    (define-key map "\e\C-x" 'eval-defun)
+    (define-key map "\e\C-q" 'indent-pp-sexp)
+    (define-key map "\e\t" 'completion-at-point)
+    (define-key map "\n" 'eval-print-last-sexp)
+    (bindings--define-key map [menu-bar lisp-interaction]
+      (cons "Lisp-Interaction" menu-map))
+    (bindings--define-key menu-map [eval-defun]
+      '(menu-item "Evaluate Defun" eval-defun
+                 :help "Evaluate the top-level form containing point, or after point"))
+    (bindings--define-key menu-map [eval-print-last-sexp]
+      '(menu-item "Evaluate and Print" eval-print-last-sexp
+                 :help "Evaluate sexp before point; print value into current buffer"))
+    (bindings--define-key menu-map [edebug-defun-lisp-interaction]
+      '(menu-item "Instrument Function for Debugging" edebug-defun
+                 :help "Evaluate the top level form point is in, stepping through with Edebug"
+                 :keys "C-u C-M-x"))
+    (bindings--define-key menu-map [indent-pp-sexp]
+      '(menu-item "Indent or Pretty-Print" indent-pp-sexp
+                 :help "Indent each line of the list starting just after point, or prettyprint it"))
+    (bindings--define-key menu-map [complete-symbol]
+      '(menu-item "Complete Lisp Symbol" completion-at-point
+                 :help "Perform completion on Lisp symbol preceding point"))
+    map)
+  "Keymap for Lisp Interaction mode.
+All commands in `lisp-mode-shared-map' are inherited by this map.")
+
+(define-derived-mode lisp-interaction-mode emacs-lisp-mode "Lisp Interaction"
+  "Major mode for typing and evaluating Lisp forms.
+Like Lisp mode except that \\[eval-print-last-sexp] evals the Lisp expression
+before point, and prints its value into the buffer, advancing point.
+Note that printing is controlled by `eval-expression-print-length'
+and `eval-expression-print-level'.
+
+Commands:
+Delete converts tabs to spaces as it moves back.
+Paragraphs are separated only by blank lines.
+Semicolons start comments.
+
+\\{lisp-interaction-mode-map}"
+  :abbrev-table nil)
+
+;;; Emacs Lisp Byte-Code mode
+
+(eval-and-compile
+  (defconst emacs-list-byte-code-comment-re
+    (concat "\\(#\\)@\\([0-9]+\\) "
+            ;; Make sure it's a docstring and not a lazy-loaded byte-code.
+            "\\(?:[^(]\\|([^\"]\\)")))
+
+(defun elisp--byte-code-comment (end &optional _point)
+  "Try to syntactically mark the #@NNN ....^_ docstrings in byte-code files."
+  (let ((ppss (syntax-ppss)))
+    (when (and (nth 4 ppss)
+               (eq (char-after (nth 8 ppss)) ?#))
+      (let* ((n (save-excursion
+                  (goto-char (nth 8 ppss))
+                  (when (looking-at emacs-list-byte-code-comment-re)
+                    (string-to-number (match-string 2)))))
+             ;; `maxdiff' tries to make sure the loop below terminates.
+             (maxdiff n))
+        (when n
+          (let* ((bchar (match-end 2))
+                 (b (position-bytes bchar)))
+            (goto-char (+ b n))
+            (while (let ((diff (- (position-bytes (point)) b n)))
+                     (unless (zerop diff)
+                       (when (> diff maxdiff) (setq diff maxdiff))
+                       (forward-char (- diff))
+                       (setq maxdiff (if (> diff 0) diff
+                                       (max (1- maxdiff) 1)))
+                       t))))
+          (if (<= (point) end)
+              (put-text-property (1- (point)) (point)
+                                 'syntax-table
+                                 (string-to-syntax "> b"))
+            (goto-char end)))))))
+
+(defun elisp-byte-code-syntax-propertize (start end)
+  (elisp--byte-code-comment end (point))
+  (funcall
+   (syntax-propertize-rules
+    (emacs-list-byte-code-comment-re
+     (1 (prog1 "< b" (elisp--byte-code-comment end (point))))))
+   start end))
+
+;;;###autoload
+(add-to-list 'auto-mode-alist '("\\.elc\\'" . elisp-byte-code-mode))
+;;;###autoload
+(define-derived-mode elisp-byte-code-mode emacs-lisp-mode
+  "Elisp-Byte-Code"
+  "Major mode for *.elc files."
+  ;; TODO: Add way to disassemble byte-code under point.
+  (setq-local open-paren-in-column-0-is-defun-start nil)
+  (setq-local syntax-propertize-function
+              #'elisp-byte-code-syntax-propertize))
+
+
+;;; Globally accessible functionality
+
+(defun eval-print-last-sexp (&optional eval-last-sexp-arg-internal)
+  "Evaluate sexp before point; print value into current buffer.
+
+Normally, this function truncates long output according to the value
+of the variables `eval-expression-print-length' and
+`eval-expression-print-level'.  With a prefix argument of zero,
+however, there is no such truncation.  Such a prefix argument
+also causes integers to be printed in several additional formats
+\(octal, hexadecimal, and character).
+
+If `eval-expression-debug-on-error' is non-nil, which is the default,
+this command arranges for all errors to enter the debugger."
+  (interactive "P")
+  (let ((standard-output (current-buffer)))
+    (terpri)
+    (eval-last-sexp (or eval-last-sexp-arg-internal t))
+    (terpri)))
+
+
+(defun last-sexp-setup-props (beg end value alt1 alt2)
+  "Set up text properties for the output of `elisp--eval-last-sexp'.
+BEG and END are the start and end of the output in current-buffer.
+VALUE is the Lisp value printed, ALT1 and ALT2 are strings for the
+alternative printed representations that can be displayed."
+  (let ((map (make-sparse-keymap)))
+    (define-key map "\C-m" 'elisp-last-sexp-toggle-display)
+    (define-key map [down-mouse-2] 'mouse-set-point)
+    (define-key map [mouse-2] 'elisp-last-sexp-toggle-display)
+    (add-text-properties
+     beg end
+     `(printed-value (,value ,alt1 ,alt2)
+                    mouse-face highlight
+                    keymap ,map
+                    help-echo "RET, mouse-2: toggle abbreviated display"
+                    rear-nonsticky (mouse-face keymap help-echo
+                                               printed-value)))))
+
+
+(defun elisp-last-sexp-toggle-display (&optional _arg)
+  "Toggle between abbreviated and unabbreviated printed representations."
+  (interactive "P")
+  (save-restriction
+    (widen)
+    (let ((value (get-text-property (point) 'printed-value)))
+      (when value
+       (let ((beg (or (previous-single-property-change (min (point-max) (1+ (point)))
+                                                       'printed-value)
+                      (point)))
+             (end (or (next-single-char-property-change (point) 'printed-value) (point)))
+             (standard-output (current-buffer))
+             (point (point)))
+         (delete-region beg end)
+         (insert (nth 1 value))
+         (or (= beg point)
+             (setq point (1- (point))))
+         (last-sexp-setup-props beg (point)
+                                (nth 0 value)
+                                (nth 2 value)
+                                (nth 1 value))
+         (goto-char (min (point-max) point)))))))
+
+(defun prin1-char (char)                ;FIXME: Move it, e.g. to simple.el.
+  "Return a string representing CHAR as a character rather than as an integer.
+If CHAR is not a character, return nil."
+  (and (integerp char)
+       (eventp char)
+       (let ((c (event-basic-type char))
+            (mods (event-modifiers char))
+            string)
+        ;; Prevent ?A from turning into ?\S-a.
+        (if (and (memq 'shift mods)
+                 (zerop (logand char ?\S-\^@))
+                 (not (let ((case-fold-search nil))
+                        (char-equal c (upcase c)))))
+            (setq c (upcase c) mods nil))
+        ;; What string are we considering using?
+        (condition-case nil
+            (setq string
+                  (concat
+                   "?"
+                   (mapconcat
+                    (lambda (modif)
+                      (cond ((eq modif 'super) "\\s-")
+                            (t (string ?\\ (upcase (aref (symbol-name modif) 0)) ?-))))
+                    mods "")
+                   (cond
+                    ((memq c '(?\; ?\( ?\) ?\{ ?\} ?\[ ?\] ?\" ?\' ?\\)) (string ?\\ c))
+                    ((eq c 127) "\\C-?")
+                    (t
+                     (string c)))))
+          (error nil))
+        ;; Verify the string reads a CHAR, not to some other character.
+        ;; If it doesn't, return nil instead.
+        (and string
+             (= (car (read-from-string string)) char)
+             string))))
+
+(defun elisp--preceding-sexp ()
+  "Return sexp before the point."
+  (let ((opoint (point))
+       ignore-quotes
+       expr)
+    (save-excursion
+      (with-syntax-table emacs-lisp-mode-syntax-table
+       ;; If this sexp appears to be enclosed in `...'
+       ;; then ignore the surrounding quotes.
+       (setq ignore-quotes
+             (or (eq (following-char) ?\')
+                 (eq (preceding-char) ?\')))
+       (forward-sexp -1)
+       ;; If we were after `?\e' (or similar case),
+       ;; use the whole thing, not just the `e'.
+       (when (eq (preceding-char) ?\\)
+         (forward-char -1)
+         (when (eq (preceding-char) ??)
+           (forward-char -1)))
+
+       ;; Skip over hash table read syntax.
+       (and (> (point) (1+ (point-min)))
+            (looking-back "#s" (- (point) 2))
+            (forward-char -2))
+
+       ;; Skip over `#N='s.
+       (when (eq (preceding-char) ?=)
+         (let (labeled-p)
+           (save-excursion
+             (skip-chars-backward "0-9#=")
+             (setq labeled-p (looking-at "\\(#[0-9]+=\\)+")))
+           (when labeled-p
+             (forward-sexp -1))))
+
+       (save-restriction
+         (if (and ignore-quotes (eq (following-char) ?`))
+              ;; vladimir@cs.ualberta.ca 30-Jul-1997: Skip ` in `variable' so
+              ;; that the value is returned, not the name.
+             (forward-char))
+          (when (looking-at ",@?") (goto-char (match-end 0)))
+         (narrow-to-region (point-min) opoint)
+         (setq expr (read (current-buffer)))
+          ;; If it's an (interactive ...) form, it's more useful to show how an
+          ;; interactive call would use it.
+          ;; FIXME: Is it really the right place for this?
+          (when (eq (car-safe expr) 'interactive)
+              (setq expr
+                  `(call-interactively
+                    (lambda (&rest args) ,expr args))))
+         expr)))))
+(define-obsolete-function-alias 'preceding-sexp 'elisp--preceding-sexp "25.1")
+
+(defun elisp--eval-last-sexp (eval-last-sexp-arg-internal)
+  "Evaluate sexp before point; print value in the echo area.
+With argument, print output into current buffer.
+With a zero prefix arg, print output with no limit on the length
+and level of lists, and include additional formats for integers
+\(octal, hexadecimal, and character)."
+  (let ((standard-output (if eval-last-sexp-arg-internal (current-buffer) t)))
+    ;; Setup the lexical environment if lexical-binding is enabled.
+    (elisp--eval-last-sexp-print-value
+     (eval (eval-sexp-add-defvars (elisp--preceding-sexp)) lexical-binding)
+     eval-last-sexp-arg-internal)))
+
+
+(defun elisp--eval-last-sexp-print-value (value &optional eval-last-sexp-arg-internal)
+  (let ((unabbreviated (let ((print-length nil) (print-level nil))
+                        (prin1-to-string value)))
+       (print-length (and (not (zerop (prefix-numeric-value
+                                       eval-last-sexp-arg-internal)))
+                          eval-expression-print-length))
+       (print-level (and (not (zerop (prefix-numeric-value
+                                      eval-last-sexp-arg-internal)))
+                         eval-expression-print-level))
+       (beg (point))
+       end)
+    (prog1
+       (prin1 value)
+      (let ((str (eval-expression-print-format value)))
+       (if str (princ str)))
+      (setq end (point))
+      (when (and (bufferp standard-output)
+                (or (not (null print-length))
+                    (not (null print-level)))
+                (not (string= unabbreviated
+                              (buffer-substring-no-properties beg end))))
+       (last-sexp-setup-props beg end value
+                              unabbreviated
+                              (buffer-substring-no-properties beg end))
+       ))))
+
+
+(defvar elisp--eval-last-sexp-fake-value (make-symbol "t"))
+
+(defun eval-sexp-add-defvars (exp &optional pos)
+  "Prepend EXP with all the `defvar's that precede it in the buffer.
+POS specifies the starting position where EXP was found and defaults to point."
+  (setq exp (macroexpand-all exp))      ;Eager macro-expansion.
+  (if (not lexical-binding)
+      exp
+    (save-excursion
+      (unless pos (setq pos (point)))
+      (let ((vars ()))
+        (goto-char (point-min))
+        (while (re-search-forward
+                "(def\\(?:var\\|const\\|custom\\)[ \t\n]+\\([^; '()\n\t]+\\)"
+                pos t)
+          (let ((var (intern (match-string 1))))
+            (and (not (special-variable-p var))
+                 (save-excursion
+                   (zerop (car (syntax-ppss (match-beginning 0)))))
+              (push var vars))))
+        `(progn ,@(mapcar (lambda (v) `(defvar ,v)) vars) ,exp)))))
+
+(defun eval-last-sexp (eval-last-sexp-arg-internal)
+  "Evaluate sexp before point; print value in the echo area.
+Interactively, with prefix argument, print output into current buffer.
+
+Normally, this function truncates long output according to the value
+of the variables `eval-expression-print-length' and
+`eval-expression-print-level'.  With a prefix argument of zero,
+however, there is no such truncation.  Such a prefix argument
+also causes integers to be printed in several additional formats
+\(octal, hexadecimal, and character).
+
+If `eval-expression-debug-on-error' is non-nil, which is the default,
+this command arranges for all errors to enter the debugger."
+  (interactive "P")
+  (if (null eval-expression-debug-on-error)
+      (elisp--eval-last-sexp eval-last-sexp-arg-internal)
+    (let ((value
+          (let ((debug-on-error elisp--eval-last-sexp-fake-value))
+            (cons (elisp--eval-last-sexp eval-last-sexp-arg-internal)
+                  debug-on-error))))
+      (unless (eq (cdr value) elisp--eval-last-sexp-fake-value)
+       (setq debug-on-error (cdr value)))
+      (car value))))
+
+(defun elisp--eval-defun-1 (form)
+  "Treat some expressions specially.
+Reset the `defvar' and `defcustom' variables to the initial value.
+\(For `defcustom', use the :set function if there is one.)
+Reinitialize the face according to the `defface' specification."
+  ;; The code in edebug-defun should be consistent with this, but not
+  ;; the same, since this gets a macroexpanded form.
+  (cond ((not (listp form))
+        form)
+       ((and (eq (car form) 'defvar)
+             (cdr-safe (cdr-safe form))
+             (boundp (cadr form)))
+        ;; Force variable to be re-set.
+        `(progn (defvar ,(nth 1 form) nil ,@(nthcdr 3 form))
+                (setq-default ,(nth 1 form) ,(nth 2 form))))
+       ;; `defcustom' is now macroexpanded to
+       ;; `custom-declare-variable' with a quoted value arg.
+       ((and (eq (car form) 'custom-declare-variable)
+             (default-boundp (eval (nth 1 form) lexical-binding)))
+        ;; Force variable to be bound, using :set function if specified.
+        (let ((setfunc (memq :set form)))
+          (when setfunc
+            (setq setfunc (car-safe (cdr-safe setfunc)))
+            (or (functionp setfunc) (setq setfunc nil)))
+          (funcall (or setfunc 'set-default)
+                   (eval (nth 1 form) lexical-binding)
+                   ;; The second arg is an expression that evaluates to
+                   ;; an expression.  The second evaluation is the one
+                   ;; normally performed not by normal execution but by
+                   ;; custom-initialize-set (for example), which does not
+                   ;; use lexical-binding.
+                   (eval (eval (nth 2 form) lexical-binding))))
+        form)
+       ;; `defface' is macroexpanded to `custom-declare-face'.
+       ((eq (car form) 'custom-declare-face)
+        ;; Reset the face.
+        (let ((face-symbol (eval (nth 1 form) lexical-binding)))
+          (setq face-new-frame-defaults
+                (assq-delete-all face-symbol face-new-frame-defaults))
+          (put face-symbol 'face-defface-spec nil)
+          (put face-symbol 'face-override-spec nil))
+        form)
+       ((eq (car form) 'progn)
+        (cons 'progn (mapcar #'elisp--eval-defun-1 (cdr form))))
+       (t form)))
+
+(defun elisp--eval-defun ()
+  "Evaluate defun that point is in or before.
+The value is displayed in the echo area.
+If the current defun is actually a call to `defvar',
+then reset the variable using the initial value expression
+even if the variable already has some other value.
+\(Normally `defvar' does not change the variable's value
+if it already has a value.\)
+
+Return the result of evaluation."
+  ;; FIXME: the print-length/level bindings should only be applied while
+  ;; printing, not while evaluating.
+  (let ((debug-on-error eval-expression-debug-on-error)
+       (print-length eval-expression-print-length)
+       (print-level eval-expression-print-level))
+    (save-excursion
+      ;; Arrange for eval-region to "read" the (possibly) altered form.
+      ;; eval-region handles recording which file defines a function or
+      ;; variable.
+      (let ((standard-output t)
+            beg end form)
+        ;; Read the form from the buffer, and record where it ends.
+        (save-excursion
+          (end-of-defun)
+          (beginning-of-defun)
+          (setq beg (point))
+          (setq form (read (current-buffer)))
+          (setq end (point)))
+        ;; Alter the form if necessary.
+        (let ((form (eval-sexp-add-defvars
+                     (elisp--eval-defun-1 (macroexpand form)))))
+          (eval-region beg end standard-output
+                       (lambda (_ignore)
+                         ;; Skipping to the end of the specified region
+                         ;; will make eval-region return.
+                         (goto-char end)
+                         form))))))
+  (let ((str (eval-expression-print-format (car values))))
+    (if str (princ str)))
+  ;; The result of evaluation has been put onto VALUES.  So return it.
+  (car values))
+
+(defun eval-defun (edebug-it)
+  "Evaluate the top-level form containing point, or after point.
+
+If the current defun is actually a call to `defvar' or `defcustom',
+evaluating it this way resets the variable using its initial value
+expression (using the defcustom's :set function if there is one), even
+if the variable already has some other value.  \(Normally `defvar' and
+`defcustom' do not alter the value if there already is one.)  In an
+analogous way, evaluating a `defface' overrides any customizations of
+the face, so that it becomes defined exactly as the `defface' expression
+says.
+
+If `eval-expression-debug-on-error' is non-nil, which is the default,
+this command arranges for all errors to enter the debugger.
+
+With a prefix argument, instrument the code for Edebug.
+
+If acting on a `defun' for FUNCTION, and the function was
+instrumented, `Edebug: FUNCTION' is printed in the echo area.  If not
+instrumented, just FUNCTION is printed.
+
+If not acting on a `defun', the result of evaluation is displayed in
+the echo area.  This display is controlled by the variables
+`eval-expression-print-length' and `eval-expression-print-level',
+which see."
+  (interactive "P")
+  (cond (edebug-it
+        (require 'edebug)
+        (eval-defun (not edebug-all-defs)))
+       (t
+        (if (null eval-expression-debug-on-error)
+            (elisp--eval-defun)
+          (let (new-value value)
+            (let ((debug-on-error elisp--eval-last-sexp-fake-value))
+              (setq value (elisp--eval-defun))
+              (setq new-value debug-on-error))
+            (unless (eq elisp--eval-last-sexp-fake-value new-value)
+              (setq debug-on-error new-value))
+            value)))))
+
+;;; ElDoc Support
+
+(defvar elisp--eldoc-last-data (make-vector 3 nil)
+  "Bookkeeping; elements are as follows:
+  0 - contains the last symbol read from the buffer.
+  1 - contains the string last displayed in the echo area for variables,
+      or argument string for functions.
+  2 - 'function if function args, 'variable if variable documentation.")
+
+(defun elisp-eldoc-documentation-function ()
+  "`eldoc-documentation-function' (which see) for Emacs Lisp."
+  (let ((current-symbol (elisp--current-symbol))
+       (current-fnsym  (elisp--fnsym-in-current-sexp)))
+    (cond ((null current-fnsym)
+          nil)
+         ((eq current-symbol (car current-fnsym))
+          (or (apply #'elisp--get-fnsym-args-string current-fnsym)
+              (elisp--get-var-docstring current-symbol)))
+         (t
+          (or (elisp--get-var-docstring current-symbol)
+              (apply #'elisp--get-fnsym-args-string current-fnsym))))))
+
+(defun elisp--get-fnsym-args-string (sym &optional index)
+  "Return a string containing the parameter list of the function SYM.
+If SYM is a subr and no arglist is obtainable from the docstring
+or elsewhere, return a 1-line docstring."
+  (let ((argstring
+        (cond
+         ((not (and sym (symbolp sym) (fboundp sym))) nil)
+         ((and (eq sym (aref elisp--eldoc-last-data 0))
+               (eq 'function (aref elisp--eldoc-last-data 2)))
+          (aref elisp--eldoc-last-data 1))
+         (t
+          (let* ((advertised (gethash (indirect-function sym)
+                                       advertised-signature-table t))
+                  doc
+                 (args
+                  (cond
+                   ((listp advertised) advertised)
+                   ((setq doc (help-split-fundoc (documentation sym t) sym))
+                    (car doc))
+                   (t (help-function-arglist sym)))))
+             ;; Stringify, and store before highlighting, downcasing, etc.
+             ;; FIXME should truncate before storing.
+            (elisp--last-data-store sym (elisp--function-argstring args)
+                                    'function))))))
+    ;; Highlight, truncate.
+    (if argstring
+       (elisp--highlight-function-argument sym argstring index))))
+
+(defun elisp--highlight-function-argument (sym args index)
+  "Highlight argument INDEX in ARGS list for function SYM.
+In the absence of INDEX, just call `elisp--docstring-format-sym-doc'."
+  ;; FIXME: This should probably work on the list representation of `args'
+  ;; rather than its string representation.
+  ;; FIXME: This function is much too long, we need to split it up!
+  (let ((start          nil)
+       (end            0)
+       (argument-face  'eldoc-highlight-function-argument)
+        (args-lst (mapcar (lambda (x)
+                            (replace-regexp-in-string
+                             "\\`[(]\\|[)]\\'" "" x))
+                          (split-string args))))
+    ;; Find the current argument in the argument string.  We need to
+    ;; handle `&rest' and informal `...' properly.
+    ;;
+    ;; FIXME: What to do with optional arguments, like in
+    ;;        (defun NAME ARGLIST [DOCSTRING] BODY...) case?
+    ;;        The problem is there is no robust way to determine if
+    ;;        the current argument is indeed a docstring.
+
+    ;; When `&key' is used finding position based on `index'
+    ;; would be wrong, so find the arg at point and determine
+    ;; position in ARGS based on this current arg.
+    (when (string-match "&key" args)
+      (let* (case-fold-search
+             key-have-value
+             (sym-name (symbol-name sym))
+             (cur-w (current-word))
+             (args-lst-ak (cdr (member "&key" args-lst)))
+             (limit (save-excursion
+                      (when (re-search-backward sym-name nil t)
+                        (match-end 0))))
+             (cur-a (if (and cur-w (string-match ":\\([^ ()]*\\)" cur-w))
+                        (substring cur-w 1)
+                      (save-excursion
+                        (let (split)
+                          (when (re-search-backward ":\\([^()\n]*\\)" limit t)
+                            (setq split (split-string (match-string 1) " " t))
+                            (prog1 (car split)
+                              (when (cdr split)
+                                (setq key-have-value t))))))))
+             ;; If `cur-a' is not one of `args-lst-ak'
+             ;; assume user is entering an unknown key
+             ;; referenced in last position in signature.
+             (other-key-arg (and (stringp cur-a)
+                                 args-lst-ak
+                                 (not (member (upcase cur-a) args-lst-ak))
+                                 (upcase (car (last args-lst-ak))))))
+        (unless (string= cur-w sym-name)
+          ;; The last keyword have already a value
+          ;; i.e :foo a b and cursor is at b.
+          ;; If signature have also `&rest'
+          ;; (assume it is after the `&key' section)
+          ;; go to the arg after `&rest'.
+          (if (and key-have-value
+                   (save-excursion
+                     (not (re-search-forward ":.*" (point-at-eol) t)))
+                   (string-match "&rest \\([^ ()]*\\)" args))
+              (setq index nil ; Skip next block based on positional args.
+                    start (match-beginning 1)
+                    end   (match-end 1))
+            ;; If `cur-a' is nil probably cursor is on a positional arg
+            ;; before `&key', in this case, exit this block and determine
+            ;; position with `index'.
+            (when (and cur-a     ; A keyword arg (dot removed) or nil.
+                       (or (string-match
+                            (concat "\\_<" (upcase cur-a) "\\_>") args)
+                           (string-match
+                            (concat "\\_<" other-key-arg "\\_>") args)))
+              (setq index nil ; Skip next block based on positional args.
+                    start (match-beginning 0)
+                    end   (match-end 0)))))))
+    ;; Handle now positional arguments.
+    (while (and index (>= index 1))
+      (if (string-match "[^ ()]+" args end)
+         (progn
+           (setq start (match-beginning 0)
+                 end   (match-end 0))
+           (let ((argument (match-string 0 args)))
+             (cond ((string= argument "&rest")
+                    ;; All the rest arguments are the same.
+                    (setq index 1))
+                   ((string= argument "&optional"))         ; Skip.
+                    ((string= argument "&allow-other-keys")) ; Skip.
+                    ;; Back to index 0 in ARG1 ARG2 ARG2 ARG3 etc...
+                    ;; like in `setq'.
+                   ((or (and (string-match-p "\\.\\.\\.$" argument)
+                              (string= argument (car (last args-lst))))
+                         (and (string-match-p "\\.\\.\\.$"
+                                              (substring args 1 (1- (length args))))
+                              (= (length (remove "..." args-lst)) 2)
+                              (> index 1) (eq (logand index 1) 1)))
+                     (setq index 0))
+                   (t
+                    (setq index (1- index))))))
+       (setq end           (length args)
+             start         (1- end)
+             argument-face 'font-lock-warning-face
+             index         0)))
+    (let ((doc args))
+      (when start
+       (setq doc (copy-sequence args))
+       (add-text-properties start end (list 'face argument-face) doc))
+      (setq doc (elisp--docstring-format-sym-doc
+                sym doc (if (functionp sym) 'font-lock-function-name-face
+                           'font-lock-keyword-face)))
+      doc)))
+
+;; Return a string containing a brief (one-line) documentation string for
+;; the variable.
+(defun elisp--get-var-docstring (sym)
+  (cond ((not sym) nil)
+        ((and (eq sym (aref elisp--eldoc-last-data 0))
+              (eq 'variable (aref elisp--eldoc-last-data 2)))
+         (aref elisp--eldoc-last-data 1))
+        (t
+         (let ((doc (documentation-property sym 'variable-documentation t)))
+           (when doc
+             (let ((doc (elisp--docstring-format-sym-doc
+                         sym (elisp--docstring-first-line doc)
+                         'font-lock-variable-name-face)))
+               (elisp--last-data-store sym doc 'variable)))))))
+
+(defun elisp--last-data-store (symbol doc type)
+  (aset elisp--eldoc-last-data 0 symbol)
+  (aset elisp--eldoc-last-data 1 doc)
+  (aset elisp--eldoc-last-data 2 type)
+  doc)
+
+;; Note that any leading `*' in the docstring (which indicates the variable
+;; is a user option) is removed.
+(defun elisp--docstring-first-line (doc)
+  (and (stringp doc)
+       (substitute-command-keys
+        (save-match-data
+         ;; Don't use "^" in the regexp below since it may match
+         ;; anywhere in the doc-string.
+         (let ((start (if (string-match "\\`\\*" doc) (match-end 0) 0)))
+            (cond ((string-match "\n" doc)
+                   (substring doc start (match-beginning 0)))
+                  ((zerop start) doc)
+                  (t (substring doc start))))))))
+
+(defvar eldoc-echo-area-use-multiline-p)
+
+;; If the entire line cannot fit in the echo area, the symbol name may be
+;; truncated or eliminated entirely from the output to make room for the
+;; description.
+(defun elisp--docstring-format-sym-doc (sym doc face)
+  (save-match-data
+    (let* ((name (symbol-name sym))
+           (ea-multi eldoc-echo-area-use-multiline-p)
+           ;; Subtract 1 from window width since emacs will not write
+           ;; any chars to the last column, or in later versions, will
+           ;; cause a wraparound and resize of the echo area.
+           (ea-width (1- (window-width (minibuffer-window))))
+           (strip (- (+ (length name) (length ": ") (length doc)) ea-width)))
+      (cond ((or (<= strip 0)
+                 (eq ea-multi t)
+                 (and ea-multi (> (length doc) ea-width)))
+             (format "%s: %s" (propertize name 'face face) doc))
+            ((> (length doc) ea-width)
+             (substring (format "%s" doc) 0 ea-width))
+            ((>= strip (length name))
+             (format "%s" doc))
+            (t
+             ;; Show the end of the partial symbol name, rather
+             ;; than the beginning, since the former is more likely
+             ;; to be unique given package namespace conventions.
+             (setq name (substring name strip))
+             (format "%s: %s" (propertize name 'face face) doc))))))
+
+\f
+;; Return a list of current function name and argument index.
+(defun elisp--fnsym-in-current-sexp ()
+  (save-excursion
+    (let ((argument-index (1- (elisp--beginning-of-sexp))))
+      ;; If we are at the beginning of function name, this will be -1.
+      (when (< argument-index 0)
+       (setq argument-index 0))
+      ;; Don't do anything if current word is inside a string.
+      (if (= (or (char-after (1- (point))) 0) ?\")
+         nil
+       (list (elisp--current-symbol) argument-index)))))
+
+;; Move to the beginning of current sexp.  Return the number of nested
+;; sexp the point was over or after.
+(defun elisp--beginning-of-sexp ()
+  (let ((parse-sexp-ignore-comments t)
+       (num-skipped-sexps 0))
+    (condition-case _
+       (progn
+         ;; First account for the case the point is directly over a
+         ;; beginning of a nested sexp.
+         (condition-case _
+             (let ((p (point)))
+               (forward-sexp -1)
+               (forward-sexp 1)
+               (when (< (point) p)
+                 (setq num-skipped-sexps 1)))
+           (error))
+         (while
+             (let ((p (point)))
+               (forward-sexp -1)
+               (when (< (point) p)
+                 (setq num-skipped-sexps (1+ num-skipped-sexps))))))
+      (error))
+    num-skipped-sexps))
+
+;; returns nil unless current word is an interned symbol.
+(defun elisp--current-symbol ()
+  (let ((c (char-after (point))))
+    (and c
+         (memq (char-syntax c) '(?w ?_))
+         (intern-soft (current-word)))))
+
+(defun elisp--function-argstring (arglist)
+  "Return ARGLIST as a string enclosed by ().
+ARGLIST is either a string, or a list of strings or symbols."
+  (let ((str (cond ((stringp arglist) arglist)
+                   ((not (listp arglist)) nil)
+                   (t (format "%S" (help-make-usage 'toto arglist))))))
+    (if (and str (string-match "\\`([^ )]+ ?" str))
+        (replace-match "(" t t str)
+      str)))
+
+(provide 'elisp-mode)
+;;; elisp-mode.el ends here
index 215b8d8358e3564cf74e36e195077bb302ef3bd6..c7f018f5f155037661d0b69fad737939687dc82b 100644 (file)
@@ -830,7 +830,7 @@ Can be overridden by the value of `font-lock-maximum-decoration'.")
   (font-lock-mode 1)
   (setq font-lock-keywords
         (symbol-value (intern-soft (format "f90-font-lock-keywords-%d" n))))
-  (font-lock-fontify-buffer))
+  (font-lock-flush))
 
 (defun f90-font-lock-1 ()
   "Set `font-lock-keywords' to `f90-font-lock-keywords-1'."
index 99629450c1b88d7b02fc9d67569bdbaa4f55a24b..fd48adc70c654477737059997c402fd5d9d7e569 100644 (file)
@@ -1,7 +1,6 @@
-;;; grep.el --- run `grep' and display the results
+;;; grep.el --- run `grep' and display the results  -*- lexical-binding:t -*-
 
-;; Copyright (C) 1985-1987, 1993-1999, 2001-2014 Free Software
-;; Foundation, Inc.
+;; Copyright (C) 1985-1987, 1993-1999, 2001-2014 Free Software Foundation, Inc.
 
 ;; Author: Roland McGrath <roland@gnu.org>
 ;; Maintainer: emacs-devel@gnu.org
@@ -77,11 +76,10 @@ in grep buffers, so if you have globally disabled font-lock-mode,
 you will not get highlighting.
 
 This option sets the environment variable GREP_COLORS to specify
-markers for highlighting and GREP_OPTIONS to add the --color
-option in front of any explicit grep options before starting
-the grep.
+markers for highlighting and adds the --color option in front of
+any explicit grep options before starting the grep.
 
-When this option is `auto', grep uses `--color=auto' to highlight
+When this option is `auto', grep uses `--color' to highlight
 matches only when it outputs to a terminal (when `grep' is the last
 command in the pipe), thus avoiding the use of any potentially-harmful
 escape sequences when standard output goes to a file or pipe.
@@ -97,7 +95,7 @@ To change the default value, use Customize or call the function
   :type '(choice (const :tag "Do not highlight matches with grep markers" nil)
                 (const :tag "Highlight matches with grep markers" t)
                 (const :tag "Use --color=always" always)
-                (const :tag "Use --color=auto" auto)
+                (const :tag "Use --color" auto)
                 (other :tag "Not Set" auto-detect))
   :set 'grep-apply-setting
   :version "22.1"
@@ -345,16 +343,11 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies
 ;;;###autoload
 (defconst grep-regexp-alist
   '(
-    ;; Rule to match column numbers is commented out since no known grep
-    ;; produces them
-    ;; ("^\\(.+?\\)\\(:[ \t]*\\)\\([1-9][0-9]*\\)\\2\\(?:\\([1-9][0-9]*\\)\\(?:-\\([1-9][0-9]*\\)\\)?\\2\\)?"
-    ;;  1 3 (4 . 5))
-    ;; Note that we want to use as tight a regexp as we can to try and
-    ;; handle weird file names (with colons in them) as well as possible.
-    ;; E.g. we use [1-9][0-9]* rather than [0-9]+ so as to accept ":034:"
-    ;; in file names.
-    ("^\\(.+?\\)\\(:[ \t]*\\)\\([1-9][0-9]*\\)\\2"
-     1 3
+    ;; Use a tight regexp to handle weird file names (with colons
+    ;; in them) as well as possible.  E.g., use [1-9][0-9]* rather
+    ;; than [0-9]+ so as to accept ":034:" in file names.
+    ("^\\(.*?[^/\n]\\):[ \t]*\\([1-9][0-9]*\\)[ \t]*:"
+     1 2
      ;; Calculate column positions (col . end-col) of first grep match on a line
      ((lambda ()
        (when grep-highlight-matches
@@ -467,10 +460,6 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'."
     ;; `setenv' modifies `process-environment' let-bound in `compilation-start'
     ;; Any TERM except "dumb" allows GNU grep to use `--color=auto'
     (setenv "TERM" "emacs-grep")
-    (setenv "GREP_OPTIONS"
-           (concat (getenv "GREP_OPTIONS")
-                   " --color=" (if (eq grep-highlight-matches 'always)
-                                   "always" "auto")))
     ;; GREP_COLOR is used in GNU grep 2.5.1, but deprecated in later versions
     (setenv "GREP_COLOR" "01;31")
     ;; GREP_COLORS is used in GNU grep 2.5.2 and later versions
@@ -570,7 +559,13 @@ This function is called from `compilation-filter-hook'."
     (unless (and grep-command grep-find-command
                 grep-template grep-find-template)
       (let ((grep-options
-            (concat (if grep-use-null-device "-n" "-nH")
+            (concat (and grep-highlight-matches
+                         (grep-probe grep-program
+                                     `(nil nil nil "--color" "x" ,null-device)
+                                     nil 1)
+                         (if (eq grep-highlight-matches 'always)
+                             "--color=always " "--color "))
+                    (if grep-use-null-device "-n" "-nH")
                     (if (grep-probe grep-program
                                     `(nil nil nil "-e" "foo" ,null-device)
                                     nil 1)
@@ -805,16 +800,20 @@ substitution string.  Note dynamic scoping of variables.")
 
 (defun grep-expand-template (template &optional regexp files dir excl)
   "Patch grep COMMAND string replacing <C>, <D>, <F>, <R>, and <X>."
-  (let ((command template)
-       (cf case-fold-search)
-       (case-fold-search nil))
+  (let* ((command template)
+         (env `((cf . ,case-fold-search)
+                (excl . ,excl)
+                (dir . ,dir)
+                (files . ,files)
+                (regexp . ,regexp)))
+         (case-fold-search nil))
     (dolist (kw grep-expand-keywords command)
       (if (string-match (car kw) command)
          (setq command
                (replace-match
                 (or (if (symbolp (cdr kw))
-                        (symbol-value (cdr kw))
-                      (save-match-data (eval (cdr kw))))
+                        (eval (cdr kw) env)
+                      (save-match-data (eval (cdr kw) env)))
                     "")
                 t t command))))))
 
@@ -901,7 +900,7 @@ This command shares argument histories with \\[rgrep] and \\[grep]."
                (confirm (equal current-prefix-arg '(4))))
           (list regexp files dir confirm))))))
   (when (and (stringp regexp) (> (length regexp) 0))
-    (unless (and dir (file-directory-p dir) (file-readable-p dir))
+    (unless (and dir (file-accessible-directory-p dir))
       (setq dir default-directory))
     (let ((command regexp))
       (if (null files)
@@ -982,7 +981,7 @@ to specify a command to run."
                (confirm (equal current-prefix-arg '(4))))
           (list regexp files dir confirm))))))
   (when (and (stringp regexp) (> (length regexp) 0))
-    (unless (and dir (file-directory-p dir) (file-readable-p dir))
+    (unless (and dir (file-accessible-directory-p dir))
       (setq dir default-directory))
     (if (null files)
        (if (not (string= regexp (if (consp grep-find-command)
@@ -1055,7 +1054,7 @@ to specify a command to run."
              (setq default-directory dir)))))))
 
 ;;;###autoload
-(defun zrgrep (regexp &optional files dir confirm grep-find-template)
+(defun zrgrep (regexp &optional files dir confirm template)
   "Recursively grep for REGEXP in gzipped FILES in tree rooted at DIR.
 Like `rgrep' but uses `zgrep' for `grep-program', sets the default
 file name to `*.gz', and sets `grep-highlight-matches' to `always'."
@@ -1090,10 +1089,8 @@ file name to `*.gz', and sets `grep-highlight-matches' to `always'."
             (list regexp files dir confirm grep-find-template)))))))
   ;; Set `grep-highlight-matches' to `always'
   ;; since `zgrep' puts filters in the grep output.
-  (let ((grep-highlight-matches 'always))
-    ;; `rgrep' uses the dynamically bound value `grep-find-template'
-    ;; from the argument `grep-find-template' whose value is computed
-    ;; in the `interactive' spec.
+  (let ((grep-find-template template)
+        (grep-highlight-matches 'always))
     (rgrep regexp files dir confirm)))
 
 ;;;###autoload
index 98912ca5acb835d4fb2f9d2a2a0f291b334fc226..24d5469adc38623ddb205db515fff8e3d4004d32 100644 (file)
@@ -34,7 +34,8 @@
 ;; and added a menu. Brian D. Carlstrom <bdc@ai.mit.edu> combined the IRIX
 ;; kluge with the gud-xdb-directories hack producing gud-dbx-directories.
 ;; Derek L. Davies <ddavies@world.std.com> added support for jdb (Java
-;; debugger.)
+;; debugger.)  Jan Nieuwenhuizen added support for the Guile REPL (Guile
+;; debugger).
 
 ;;; Code:
 
@@ -140,7 +141,7 @@ Used to gray out relevant toolbar icons.")
                               (display-graphic-p)
                               (fboundp 'x-show-tip))
                  :visible (memq gud-minor-mode
-                               '(gdbmi dbx sdb xdb pdb))
+                               '(gdbmi guiler dbx sdb xdb pdb))
                  :button (:toggle . gud-tooltip-mode))
     ([refresh] "Refresh" . gud-refresh)
     ([run]     menu-item "Run" gud-run
@@ -170,11 +171,11 @@ Used to gray out relevant toolbar icons.")
     ([up]      menu-item "Up Stack" gud-up
                  :enable (not gud-running)
                  :visible (memq gud-minor-mode
-                                '(gdbmi gdb dbx xdb jdb pdb)))
+                                '(gdbmi gdb guiler dbx xdb jdb pdb)))
     ([down]    menu-item "Down Stack" gud-down
                  :enable (not gud-running)
                  :visible (memq gud-minor-mode
-                                '(gdbmi gdb dbx xdb jdb pdb)))
+                                '(gdbmi gdb guiler dbx xdb jdb pdb)))
     ([pp]      menu-item "Print S-expression" gud-pp
                   :enable (and (not gud-running)
                                  (bound-and-true-p gdb-active-process))
@@ -195,7 +196,7 @@ Used to gray out relevant toolbar icons.")
     ([finish]  menu-item "Finish Function" gud-finish
                   :enable (not gud-running)
                  :visible (memq gud-minor-mode
-                                '(gdbmi gdb xdb jdb pdb)))
+                                '(gdbmi gdb guiler xdb jdb pdb)))
     ([stepi]   menu-item "Step Instruction" gud-stepi
                   :enable (not gud-running)
                  :visible (memq gud-minor-mode '(gdbmi gdb dbx)))
@@ -255,9 +256,8 @@ Used to gray out relevant toolbar icons.")
        ([menu-bar file] . undefined))))
   "Map used in visited files.")
 
-(let ((m (assq 'gud-minor-mode minor-mode-map-alist)))
-  (if m (setcdr m gud-minor-mode-map)
-    (push (cons 'gud-minor-mode gud-minor-mode-map) minor-mode-map-alist)))
+(setf (alist-get 'gud-minor-mode minor-mode-map-alist)
+      gud-minor-mode-map)
 
 (defvar gud-mode-map
   ;; Will inherit from comint-mode via define-derived-mode.
@@ -1699,6 +1699,83 @@ and source-file directory for your debugger."
   (run-hooks 'pdb-mode-hook))
 \f
 ;; ======================================================================
+;; Guile REPL (guiler) functions
+
+;; History of argument lists passed to guiler.
+(defvar gud-guiler-history nil)
+
+(defvar gud-guiler-lastfile nil)
+
+(defun gud-guiler-marker-filter (string)
+  (setq gud-marker-acc (if gud-marker-acc (concat gud-marker-acc string) string))
+
+  (let ((start 0))
+    (while
+       (cond
+        ((string-match "^In \\(.*\\):" gud-marker-acc start)
+          (setq gud-guiler-lastfile (match-string 1 gud-marker-acc)))
+        ((string-match "^\\([^:\n]+\\):\\([0-9]+\\):\\([0-9]+\\):[^\n]*"
+                       gud-marker-acc start)
+          (setq gud-guiler-lastfile (match-string 1 gud-marker-acc))
+          (setq gud-last-frame
+                (cons gud-guiler-lastfile
+                      (string-to-number (match-string 2 gud-marker-acc)))))
+        ((string-match "^[ ]*\\([0-9]+\\):\\([0-9]+\\)  [^\n]*"
+                       gud-marker-acc start)
+          (if gud-guiler-lastfile
+              (setq gud-last-frame
+                    (cons gud-guiler-lastfile
+                          (string-to-number (match-string 1 gud-marker-acc))))))
+        ((string-match comint-prompt-regexp gud-marker-acc start) t)
+         ((string= (substring gud-marker-acc start) "") nil)
+         (t nil))
+      (setq start (match-end 0)))
+
+    ;; Search for the last incomplete line in this chunk
+    (while (string-match "\n" gud-marker-acc start)
+      (setq start (match-end 0)))
+
+    ;; If we have an incomplete line, store it in gud-marker-acc.
+    (setq gud-marker-acc (substring gud-marker-acc (or start 0))))
+  string)
+
+
+(defcustom gud-guiler-command-name "guile"
+  "File name for executing the Guile debugger.
+This should be an executable on your path, or an absolute file name."
+  :type 'string
+  :group 'gud)
+
+;;;###autoload
+(defun guiler (command-line)
+  "Run guiler on program FILE in buffer `*gud-FILE*'.
+The directory containing FILE becomes the initial working directory
+and source-file directory for your debugger."
+  (interactive
+   (list (gud-query-cmdline 'guiler)))
+
+  (gud-common-init command-line nil 'gud-guiler-marker-filter)
+  (setq-local gud-minor-mode 'guiler)
+
+;; FIXME: absolute file-names are not grokked yet by Guile's ,break-at-source
+;; and relative file names only when relative to %load-path.
+;;  (gud-def gud-break  ",break-at-source %d%f %l"  "\C-b" "Set breakpoint at current line.")
+  (gud-def gud-break  ",break-at-source %f %l"  "\C-b" "Set breakpoint at current line.")
+;; FIXME: remove breakpoint with file-line not yet supported by Guile
+;;  (gud-def gud-remove ",delete ---> %d%f:%l"  "\C-d" "Remove breakpoint at current line")
+  (gud-def gud-step   ",step"         "\C-s" "Step one source line with display.")
+  (gud-def gud-next   ",next"         "\C-n" "Step one line (skip functions).")
+;;  (gud-def gud-cont   "continue"     "\C-r" "Continue with display.")
+  (gud-def gud-finish ",finish"       "\C-f" "Finish executing current function.")
+  (gud-def gud-up     ",up"           "<" "Up one stack frame.")
+  (gud-def gud-down   ",down"         ">" "Down one stack frame.")
+  (gud-def gud-print  "%e"            "\C-p" "Evaluate Guile expression at point.")
+
+  (setq comint-prompt-regexp "^scheme@([^>]+> ")
+  (setq paragraph-start comint-prompt-regexp)
+  (run-hooks 'guiler-mode-hook))
+\f
+;; ======================================================================
 ;;
 ;; JDB support.
 ;;
@@ -3445,6 +3522,7 @@ With arg, dereference expr if ARG is positive, otherwise do not dereference."
   "Return a suitable command to print the expression EXPR."
   (pcase gud-minor-mode
     (`gdbmi (concat "-data-evaluate-expression \"" expr "\""))
+    (`guiler expr)
     (`dbx (concat "print " expr))
     ((or `xdb `pdb) (concat "p " expr))
     (`sdb (concat expr "/"))))
index 506f2c2364eafb362600a995e47e1f9e1bea1c4f..cda421fbc866463e613260b7b6c61b2f469c39fa 100644 (file)
@@ -1,10 +1,10 @@
-;;; hideif.el --- hides selected code within ifdef
+;;; hideif.el --- hides selected code within ifdef  -*- lexical-binding:t -*-
 
 ;; Copyright (C) 1988, 1994, 2001-2014 Free Software Foundation, Inc.
 
 ;; Author: Brian Marick
 ;;     Daniel LaLiberte <liberte@holonexus.org>
-;; Maintainer: emacs-devel@gnu.org
+;; Maintainer: Luke Lee <luke.yx.lee@gmail.com>
 ;; Keywords: c, outlines
 
 ;; This file is part of GNU Emacs.
@@ -36,6 +36,8 @@
 ;;
 ;; Hide-ifdef suppresses the display of code that the preprocessor wouldn't
 ;; pass through.  Support complete C/C++ expression and precedence.
+;; It will automatically scan for new #define symbols and macros on the way
+;; parsing.
 ;;
 ;; The hidden code is marked by ellipses (...).  Be
 ;; cautious when editing near ellipses, since the hidden text is
 ;; Extensively modified by Daniel LaLiberte (while at Gould).
 ;;
 ;; Extensively modified by Luke Lee in 2013 to support complete C expression
-;; evaluation.
+;; evaluation and argumented macro expansion.
 
 ;;; Code:
 
 (require 'cc-mode)
+(require 'cl-lib)
 
 (defgroup hide-ifdef nil
   "Hide selected code within `ifdef'."
   :group 'hide-ifdef
   :version "23.1")
 
+(defcustom hide-ifdef-exclude-define-regexp nil
+  "Ignore #define names if those names match this exclusion pattern."
+  :type 'string
+  :version "25.1")
+
+(defcustom hide-ifdef-expand-reinclusion-protection t
+  "Non-nil means don't hide an entire header file enclosed by #ifndef...#endif.
+Most C/C++ headers are usually wrapped with ifdefs to prevent re-inclusion:
+
+  ----- beginning of file -----
+  #ifndef _XXX_HEADER_FILE_INCLUDED_
+  #define _XXX_HEADER_FILE_INCLUDED_
+     xxx
+     xxx
+     xxx...
+  #endif
+  ----- end of file -----
+
+The first time we visit such a file, _XXX_HEADER_FILE_INCLUDED_ is
+undefined, and so nothing is hidden.  The next time we visit it, everything will
+be hidden.
+
+This behavior is generally undesirable.  If this option is non-nil, the outermost
+#if is always visible."
+  :type 'boolean
+  :version "25.1")
+
+(defcustom hide-ifdef-header-regexp
+  "\\.h\\(h\\|xx\\|pp\\)?\\'"
+  "C/C++ header file name patterns to determine if current buffer is a header.
+Effective only if `hide-ifdef-expand-reinclusion-protection' is t."
+  :type 'string
+  :group 'hide-ifdef
+  :version "25.1")
 
 (defvar hide-ifdef-mode-submap
   ;; Set up the submap that goes after the prefix key.
     (define-key map "s" 'show-ifdefs)
     (define-key map "\C-d" 'hide-ifdef-block)
     (define-key map "\C-s" 'show-ifdef-block)
+    (define-key map "e" 'hif-evaluate-macro)
+    (define-key map "C" 'hif-clear-all-ifdef-defined)
 
     (define-key map "\C-q" 'hide-ifdef-toggle-read-only)
     (define-key map "\C-w" 'hide-ifdef-toggle-shadowing)
           (cons '(hide-ifdef-hiding " Hiding")
                 minor-mode-alist)))
 
-;; fix c-mode syntax table so we can recognize whole symbols.
+;; Fix c-mode syntax table so we can recognize whole symbols.
 (defvar hide-ifdef-syntax-table
   (let ((st (copy-syntax-table c-mode-syntax-table)))
     (modify-syntax-entry ?_ "w" st)
 (defvar hide-ifdef-env nil
   "An alist of defined symbols and their values.")
 
+(defvar hide-ifdef-env-backup nil
+  "This variable is a backup of the previously cleared `hide-ifdef-env'.
+This backup prevents any accidental clearance of `hide-fidef-env' by
+`hif-clear-all-ifdef-defined'.")
+
 (defvar hif-outside-read-only nil
   "Internal variable.  Saves the value of `buffer-read-only' while hiding.")
 
@@ -229,53 +273,75 @@ that the C preprocessor would eliminate may be hidden from view.
 Several variables affect how the hiding is done:
 
 `hide-ifdef-env'
-       An association list of defined and undefined symbols for the
-       current buffer.  Initially, the global value of `hide-ifdef-env'
-       is used.
+        An association list of defined and undefined symbols for the
+        current project.  Initially, the global value of `hide-ifdef-env'
+        is used.  This variable was a buffer-local variable, which limits
+        hideif to parse only one C/C++ file at a time.  We've extended
+        hideif to support parsing a C/C++ project containing multiple C/C++
+        source files opened simultaneously in different buffers.  Therefore
+        `hide-ifdef-env' can no longer be buffer local but must be global.
 
 `hide-ifdef-define-alist'
-       An association list of defined symbol lists.
+        An association list of defined symbol lists.
         Use `hide-ifdef-set-define-alist' to save the current `hide-ifdef-env'
         and `hide-ifdef-use-define-alist' to set the current `hide-ifdef-env'
         from one of the lists in `hide-ifdef-define-alist'.
 
 `hide-ifdef-lines'
-       Set to non-nil to not show #if, #ifdef, #ifndef, #else, and
-       #endif lines when hiding.
+        Set to non-nil to not show #if, #ifdef, #ifndef, #else, and
+        #endif lines when hiding.
 
 `hide-ifdef-initially'
-       Indicates whether `hide-ifdefs' should be called when Hide-Ifdef mode
-       is activated.
+        Indicates whether `hide-ifdefs' should be called when Hide-Ifdef mode
+        is activated.
 
 `hide-ifdef-read-only'
-       Set to non-nil if you want to make buffers read only while hiding.
-       After `show-ifdefs', read-only status is restored to previous value.
+        Set to non-nil if you want to make buffers read only while hiding.
+        After `show-ifdefs', read-only status is restored to previous value.
 
 \\{hide-ifdef-mode-map}"
   :group 'hide-ifdef :lighter " Ifdef"
   (if hide-ifdef-mode
       (progn
-       ;; inherit global values
-       (set (make-local-variable 'hide-ifdef-env)
-            (default-value 'hide-ifdef-env))
-       (set (make-local-variable 'hide-ifdef-hiding)
-            (default-value 'hide-ifdef-hiding))
-       (set (make-local-variable 'hif-outside-read-only) buffer-read-only)
-       (set (make-local-variable 'line-move-ignore-invisible) t)
-       (add-hook 'change-major-mode-hook
-                 (lambda () (hide-ifdef-mode -1)) nil t)
-
-       (add-to-invisibility-spec '(hide-ifdef . t))
-
-       (if hide-ifdef-initially
-           (hide-ifdefs)
-         (show-ifdefs)))
+        ;; inherit global values
+
+        ;; `hide-ifdef-env' is now a global variable.
+        ;; We can still simulate the behavior of older hideif versions (i.e.
+        ;; `hide-ifdef-env' being buffer local) by clearing this variable
+        ;; (C-c @ C) everytime before hiding current buffer.
+;;      (set (make-local-variable 'hide-ifdef-env)
+;;           (default-value 'hide-ifdef-env))
+        (set 'hide-ifdef-env (default-value 'hide-ifdef-env))
+        ;; Some C/C++ headers might have other ways to prevent reinclusion and
+        ;; thus would like `hide-ifdef-expand-reinclusion-protection' to be nil.
+        (set (make-local-variable 'hide-ifdef-expand-reinclusion-protection)
+             (default-value 'hide-ifdef-expand-reinclusion-protection))
+        (set (make-local-variable 'hide-ifdef-hiding)
+             (default-value 'hide-ifdef-hiding))
+        (set (make-local-variable 'hif-outside-read-only) buffer-read-only)
+        (set (make-local-variable 'line-move-ignore-invisible) t)
+        (add-hook 'change-major-mode-hook
+                  (lambda () (hide-ifdef-mode -1)) nil t)
+
+        (add-to-invisibility-spec '(hide-ifdef . t))
+
+        (if hide-ifdef-initially
+            (hide-ifdefs)
+          (show-ifdefs)))
     ;; else end hide-ifdef-mode
     (kill-local-variable 'line-move-ignore-invisible)
     (remove-from-invisibility-spec '(hide-ifdef . t))
     (when hide-ifdef-hiding
       (show-ifdefs))))
 
+(defun hif-clear-all-ifdef-defined ()
+  "Clears all symbols defined in `hide-ifdef-env'.
+It will backup this variable to `hide-ifdef-env-backup' before clearing to
+prevent accidental clearance."
+  (interactive)
+  (when (y-or-n-p "Clear all #defined symbols? ")
+    (setq hide-ifdef-env-backup hide-ifdef-env)
+    (setq hide-ifdef-env nil)))
 
 (defun hif-show-all ()
   "Show all of the text in the current buffer."
@@ -295,16 +361,64 @@ Several variables affect how the hiding is done:
   (while (= (logand 1 (skip-chars-backward "\\\\")) 1)
     (end-of-line 2)))
 
+(defun hif-merge-ifdef-region (start end)
+  "This function merges nearby ifdef regions to form a bigger overlay.
+The region is defined by START and END.  This will decrease the number of
+overlays created."
+  ;; Generally there is no need to call itself recursively since there should
+  ;; originally exists no un-merged regions; however, if a part of the file is
+  ;; hidden with `hide-ifdef-lines' equals to nil while another part with 't,
+  ;; this case happens.
+  ;; TODO: Should we merge? or just create a container overlay? -- this can
+  ;; prevent `hideif-show-ifdef' expanding too many hidden contents since there
+  ;; is only a big overlay exists there without any smaller overlays.
+  (save-restriction
+    (widen) ; Otherwise `point-min' and `point-max' will be restricted and thus
+                                        ; fail to find neighbor overlays
+    (let ((begovrs (overlays-in
+                    (max (- start 2) (point-min))
+                    (max (- start 1) (point-min))))
+          (endovrs (overlays-in
+                    (min (+ end 1) (point-max))
+                    (min (+ end 2) (point-max))))
+          (ob nil)
+          (oe nil)
+          b e)
+      ;; Merge overlays before START
+      (dolist (o begovrs)
+        (when (overlay-get o 'hide-ifdef)
+          (setq b (min start (overlay-start o))
+                e (max end (overlay-end o)))
+          (move-overlay o b e)
+          (hif-merge-ifdef-region b e)
+          (setq ob o)))
+      ;; Merge overlays after END
+      (dolist (o endovrs)
+        (when (overlay-get o 'hide-ifdef)
+          (setq b (min start (overlay-start o))
+                e (max end (overlay-end o)))
+          (move-overlay o b e)
+          (hif-merge-ifdef-region b e)
+          (setf oe o)))
+      ;; If both START and END merging happens, merge into bigger one
+      (when (and ob oe)
+        (let ((b (min (overlay-start ob) (overlay-start oe)))
+              (e (max (overlay-end ob) (overlay-end oe))))
+          (delete-overlay oe)
+          (move-overlay ob b e)
+          (hif-merge-ifdef-region b e)))
+      (or ob oe))))
+
 (defun hide-ifdef-region-internal (start end)
-  (remove-overlays start end 'hide-ifdef t)
+  (unless (hif-merge-ifdef-region start end)
   (let ((o (make-overlay start end)))
     (overlay-put o 'hide-ifdef t)
     (if hide-ifdef-shadow
-       (overlay-put o 'face 'hide-ifdef-shadow)
-      (overlay-put o 'invisible 'hide-ifdef))))
+        (overlay-put o 'face 'hide-ifdef-shadow)
+        (overlay-put o 'invisible 'hide-ifdef)))))
 
 (defun hide-ifdef-region (start end)
-  "START is the start of a #if or #else form.  END is the ending part.
+  "START is the start of a #if, #elif, or #else form.  END is the ending part.
 Everything including these lines is made invisible."
   (save-excursion
     (goto-char start) (hif-end-of-line) (setq start (point))
@@ -313,7 +427,9 @@ Everything including these lines is made invisible."
 
 (defun hif-show-ifdef-region (start end)
   "Everything between START and END is made visible."
-  (remove-overlays start end 'hide-ifdef t))
+  (let ((onum (length (overlays-in start end))))
+    (remove-overlays start end 'hide-ifdef t)
+    (/= onum (length (overlays-in start end)))))
 
 
 ;;===%%SF%% evaluation (Start)  ===
@@ -330,7 +446,7 @@ that form should be displayed.")
 
 
 (defun hif-set-var (var value)
-  "Prepend (var value) pair to `hide-ifdef-env'."
+  "Prepend (VAR VALUE) pair to `hide-ifdef-env'."
   (setq hide-ifdef-env (cons (cons var value) hide-ifdef-env)))
 
 (declare-function semantic-c-hideif-lookup  "semantic/bovine/c" (var))
@@ -338,11 +454,11 @@ that form should be displayed.")
 
 (defun hif-lookup (var)
   (or (when (bound-and-true-p semantic-c-takeover-hideif)
-       (semantic-c-hideif-lookup var))
+        (semantic-c-hideif-lookup var))
       (let ((val (assoc var hide-ifdef-env)))
-       (if val
-           (cdr val)
-         hif-undefined-symbol))))
+        (if val
+            (cdr val)
+          hif-undefined-symbol))))
 
 (defun hif-defined (var)
   (cond
@@ -358,25 +474,43 @@ that form should be displayed.")
 ;;===%%SF%% parsing (Start)  ===
 ;;;  The code that understands what ifs and ifdef in files look like.
 
-(defconst hif-cpp-prefix "\\(^\\|\r\\)[ \t]*#[ \t]*")
-(defconst hif-ifndef-regexp (concat hif-cpp-prefix "ifndef"))
-(defconst hif-ifx-regexp (concat hif-cpp-prefix "if\\(n?def\\)?[ \t]+"))
-(defconst hif-else-regexp (concat hif-cpp-prefix "else"))
-(defconst hif-endif-regexp (concat hif-cpp-prefix "endif"))
+(defconst hif-cpp-prefix      "\\(^\\|\r\\)[ \t]*#[ \t]*")
+(defconst hif-ifxdef-regexp   (concat hif-cpp-prefix "if\\(n\\)?def"))
+(defconst hif-ifndef-regexp   (concat hif-cpp-prefix "ifndef"))
+(defconst hif-ifx-regexp      (concat hif-cpp-prefix "if\\(n?def\\)?[ \t]+"))
+(defconst hif-elif-regexp     (concat hif-cpp-prefix "elif"))
+(defconst hif-else-regexp     (concat hif-cpp-prefix "else"))
+(defconst hif-endif-regexp    (concat hif-cpp-prefix "endif"))
 (defconst hif-ifx-else-endif-regexp
-  (concat hif-ifx-regexp "\\|" hif-else-regexp "\\|" hif-endif-regexp))
-
-;; Used to store the current token and the whole token list during parsing.
-;; Only bound dynamically.
+  (concat hif-ifx-regexp "\\|" hif-elif-regexp "\\|" hif-else-regexp "\\|"
+          hif-endif-regexp))
+(defconst hif-macro-expr-prefix-regexp
+  (concat hif-cpp-prefix "\\(if\\(n?def\\)?\\|elif\\|define\\)[ \t]+"))
+
+(defconst hif-white-regexp    "[ \t]*")
+(defconst hif-define-regexp   (concat hif-cpp-prefix "\\(define\\|undef\\)"))
+(defconst hif-id-regexp       (concat "[[:alpha:]_][[:alnum:]_]*"))
+(defconst hif-macroref-regexp
+  (concat hif-white-regexp "\\(" hif-id-regexp "\\)" hif-white-regexp
+          "\\("
+          "(" hif-white-regexp
+          "\\(" hif-id-regexp "\\)?" hif-white-regexp
+          "\\(" "," hif-white-regexp hif-id-regexp hif-white-regexp "\\)*"
+          "\\(\\.\\.\\.\\)?" hif-white-regexp
+          ")"
+          "\\)?" ))
+
+;; Store the current token and the whole token list during parsing.
+;; Bound dynamically.
 (defvar hif-token)
 (defvar hif-token-list)
 
 (defconst hif-token-alist
   '(("||"  . hif-or)
     ("&&"  . hif-and)
-    ("|"  . hif-logior)
+    ("|"   . hif-logior)
     ("^"   . hif-logxor)
-    ("&"  . hif-logand)
+    ("&"   . hif-logand)
     ("<<"  . hif-shiftleft)
     (">>"  . hif-shiftright)
     ("=="  . hif-equal)
@@ -384,23 +518,28 @@ that form should be displayed.")
     ;; expression syntax, because they are still relevant for the tokenizer,
     ;; especially in conjunction with ##.
     ("="   . hif-assign)
-    ("!=" . hif-notequal)
+    ("!="  . hif-notequal)
     ("##"  . hif-token-concat)
     ("!"   . hif-not)
     ("~"   . hif-lognot)
     ("("   . hif-lparen)
     (")"   . hif-rparen)
-    (">"  . hif-greater)
-    ("<"  . hif-less)
-    (">=" . hif-greater-equal)
-    ("<=" . hif-less-equal)
-    ("+"  . hif-plus)
-    ("-"  . hif-minus)
+    (">"   . hif-greater)
+    ("<"   . hif-less)
+    (">="  . hif-greater-equal)
+    ("<="  . hif-less-equal)
+    ("+"   . hif-plus)
+    ("-"   . hif-minus)
     ("*"   . hif-multiply)
     ("/"   . hif-divide)
     ("%"   . hif-modulo)
-    ("?"  . hif-conditional)
-    (":"  . hif-colon)))
+    ("?"   . hif-conditional)
+    (":"   . hif-colon)
+    (","   . hif-comma)
+    ("#"   . hif-stringify)
+    ("..." . hif-etc)))
+
+(defconst hif-valid-token-list (mapcar 'cdr hif-token-alist))
 
 (defconst hif-token-regexp
   (concat (regexp-opt (mapcar 'car hif-token-alist))
@@ -410,47 +549,71 @@ that form should be displayed.")
 
 (defconst hif-string-literal-regexp  "\\(\"\\(?:[^\"\\]\\|\\\\.\\)*\"\\)")
 
+(defun hif-string-to-number (string &optional base)
+  "Like `string-to-number', but it understands non-decimal floats."
+  (if (or (not base) (= base 10))
+      (string-to-number string base)
+    (let* ((parts (split-string string "\\." t "[ \t]+"))
+           (frac (cadr parts))
+           (fraclen (length frac))
+           (quot (expt (if (zerop fraclen)
+                           base
+                           (* base 1.0)) fraclen)))
+      (/ (string-to-number (concat (car parts) frac) base) quot))))
+
+;; The dynamic binding variable `hif-simple-token-only' is shared only by
+;; `hif-tokenize' and `hif-find-define'. The purpose is to prevent `hif-tokenize'
+;; from returning one more value to indicate a simple token is scanned. This help
+;; speeding up macro evaluation on those very simple cases like integers or
+;; literals.
+;; Check the long comments before `hif-find-define' for more details. [lukelee]
+(defvar hif-simple-token-only)
 
 (defun hif-tokenize (start end)
   "Separate string between START and END into a list of tokens."
   (let ((token-list nil))
+    (setq hif-simple-token-only t)
     (with-syntax-table hide-ifdef-syntax-table
       (save-excursion
-       (goto-char start)
-       (while (progn (forward-comment (point-max)) (< (point) end))
-         ;; (message "expr-start = %d" expr-start) (sit-for 1)
-         (cond
-          ((looking-at "\\\\\n")
-           (forward-char 2))
+        (goto-char start)
+        (while (progn (forward-comment (point-max)) (< (point) end))
+          ;; (message "expr-start = %d" expr-start) (sit-for 1)
+          (cond
+           ((looking-at "\\\\\n")
+            (forward-char 2))
 
            ((looking-at hif-string-literal-regexp)
             (push (substring-no-properties (match-string 1)) token-list)
             (goto-char (match-end 0)))
-          ((looking-at hif-token-regexp)
-           (let ((token (buffer-substring (point) (match-end 0))))
-             (goto-char (match-end 0))
-             ;; (message "token: %s" token) (sit-for 1)
-             (push
+
+           ((looking-at hif-token-regexp)
+            (let ((token (buffer-substring-no-properties
+                          (point) (match-end 0))))
+              (goto-char (match-end 0))
+              ;; (message "token: %s" token) (sit-for 1)
+              (push
                (or (cdr (assoc token hif-token-alist))
                    (if (string-equal token "defined") 'hif-defined)
                    ;; TODO:
                    ;; 1. postfix 'l', 'll', 'ul' and 'ull'
-                   ;; 2. floating number formats
-                   ;; 3. hexadecimal/octal floats
-                   ;; 4. 098 is interpreted as octal conversion error
-                   ;; FIXME: string-to-number does not convert hex floats
+                   ;; 2. floating number formats (like 1.23e4)
+                   ;; 3. 098 is interpreted as octal conversion error
                    (if (string-match "0x\\([0-9a-fA-F]+\\.?[0-9a-fA-F]*\\)"
                                      token)
-                       (string-to-number (match-string 1 token) 16)) ;; hex
-                   ;; FIXME: string-to-number does not convert octal floats
+                       (hif-string-to-number (match-string 1 token) 16)) ;; hex
                    (if (string-match "\\`0[0-9]+\\(\\.[0-9]+\\)?\\'" token)
-                       (string-to-number token 8)) ;; octal
+                       (hif-string-to-number token 8)) ;; octal
                    (if (string-match "\\`[1-9][0-9]*\\(\\.[0-9]+\\)?\\'"
                                      token)
                        (string-to-number token)) ;; decimal
-                   (intern token))
+                   (prog1 (intern token)
+                     (setq hif-simple-token-only nil)))
                token-list)))
-          (t (error "Bad #if expression: %s" (buffer-string)))))))
+
+           ((looking-at "\r") ; Sometimes MS-Windows user will leave CR in
+            (forward-char 1)) ;  the source code. Let's not get stuck here.
+           (t (error "Bad #if expression: %s" (buffer-string)))))))
+
     (nreverse token-list)))
 
 ;;------------------------------------------------------------------------
@@ -485,9 +648,116 @@ that form should be displayed.")
   "Pop the next token from token-list into the let variable `hif-token'."
   (setq hif-token (pop hif-token-list)))
 
-(defun hif-parse-if-exp (token-list)
-  "Parse the TOKEN-LIST.  Return translated list in prefix form."
-  (let ((hif-token-list token-list))
+(defsubst hif-if-valid-identifier-p (id)
+  (not (or (numberp id)
+           (stringp id))))
+
+(defun hif-define-operator (tokens)
+  "`Upgrade' hif-define xxx to '(hif-define xxx)' so it won't be substituted."
+  (let ((result nil)
+        (tok nil))
+    (while (setq tok (pop tokens))
+      (push
+       (if (eq tok 'hif-defined)
+           (progn
+             (setq tok (cadr tokens))
+             (if (eq (car tokens) 'hif-lparen)
+                 (if (and (hif-if-valid-identifier-p tok)
+                          (eq (cl-caddr tokens) 'hif-rparen))
+                     (setq tokens (cl-cdddr tokens))
+                   (error "#define followed by non-identifier: %S" tok))
+               (setq tok (car tokens)
+                     tokens (cdr tokens))
+               (unless (hif-if-valid-identifier-p tok)
+                 (error "#define followed by non-identifier: %S" tok)))
+             (list 'hif-defined 'hif-lparen tok 'hif-rparen))
+         tok)
+       result))
+    (nreverse result)))
+
+(defun hif-flatten (l)
+  "Flatten a tree."
+  (apply #'nconc
+         (mapcar (lambda (x) (if (listp x)
+                                 (hif-flatten x)
+                               (list x))) l)))
+
+(defun hif-expand-token-list (tokens &optional macroname expand_list)
+  "Perform expansion on TOKENS till everything expanded.
+Self-reference (directly or indirectly) tokens are not expanded.
+EXPAND_LIST is the list of macro names currently being expanded, used for
+detecting self-reference."
+  (catch 'self-referencing
+    (let ((expanded nil)
+          (remains (hif-define-operator
+                    (hif-token-concatenation
+                     (hif-token-stringification tokens))))
+          tok rep)
+      (if macroname
+          (setq expand_list (cons macroname expand_list)))
+      ;; Expanding all tokens till list exhausted
+      (while (setq tok (pop remains))
+        (if (memq tok expand_list)
+            ;; For self-referencing tokens, don't expand it
+            (throw 'self-referencing tokens))
+        (push
+         (cond
+          ((or (memq tok hif-valid-token-list)
+               (numberp tok)
+               (stringp tok))
+           tok)
+
+          ((setq rep (hif-lookup tok))
+           (if (and (listp rep)
+                    (eq (car rep) 'hif-define-macro)) ; A defined macro
+               ;; Recursively expand it
+               (if (cadr rep) ; Argument list is not nil
+                   (if (not (eq (car remains) 'hif-lparen))
+                       ;; No argument, no invocation
+                       tok
+                     ;; Argumented macro, get arguments and invoke it.
+                     ;; Dynamically bind hif-token-list and hif-token
+                     ;; for hif-macro-supply-arguments
+                     (let* ((hif-token-list (cdr remains))
+                            (hif-token nil)
+                            (parmlist (mapcar #'hif-expand-token-list
+                                              (hif-get-argument-list)))
+                            (result
+                             (hif-expand-token-list
+                              (hif-macro-supply-arguments tok parmlist)
+                              tok expand_list)))
+                       (setq remains (cons hif-token hif-token-list))
+                       result))
+                 ;; Argument list is nil, direct expansion
+                 (setq rep (hif-expand-token-list
+                            (cl-caddr rep) ; Macro's token list
+                            tok expand_list))
+                 ;; Replace all remaining references immediately
+                 (setq remains (cl-substitute tok rep remains))
+                 rep)
+             ;; Lookup tok returns an atom
+             rep))
+
+          ;;[2013-10-22 16:06:12 +0800] Must keep the token, removing
+          ;; this token might results in an incomplete expression that
+          ;; cannot be parsed further.
+          ;;((= 1 (hif-defined tok)) ; defined (hif-defined tok)=1,
+          ;;  ;;but empty (hif-lookup tok)=nil, thus remove this token
+          ;; (setq remains (delete tok remains))
+          ;; nil)
+
+          (t ; Usual IDs
+           tok))
+
+         expanded))
+
+      (hif-flatten (nreverse expanded)))))
+
+(defun hif-parse-exp (token-list &optional macroname)
+  "Parse the TOKEN-LIST.
+Return translated list in prefix form.  MACRONAME is applied when invoking
+macros to prevent self-reference."
+  (let ((hif-token-list (hif-expand-token-list token-list macroname)))
     (hif-nexttoken)
     (prog1
         (and hif-token
@@ -496,31 +766,31 @@ that form should be displayed.")
           (error "Error: unexpected token: %s" hif-token)))))
 
 (defun hif-exprlist ()
-  "Parse an exprlist: expr { ',' expr}"
+  "Parse an exprlist: expr { ',' expr}."
   (let ((result (hif-expr)))
     (if (eq hif-token 'hif-comma)
-       (let ((temp (list result)))
-         (while
-           (progn
-             (hif-nexttoken)
-             (push (hif-expr) temp)
-             (eq hif-token 'hif-comma)))
-         (cons 'hif-comma (nreverse temp)))
+        (let ((temp (list result)))
+          (while
+            (progn
+              (hif-nexttoken)
+              (push (hif-expr) temp)
+              (eq hif-token 'hif-comma)))
+          (cons 'hif-comma (nreverse temp)))
       result)))
 
 (defun hif-expr ()
   "Parse an expression as found in #if.
-       expr : or-expr | or-expr '?' expr ':' expr."
+expr : or-expr | or-expr '?' expr ':' expr."
   (let ((result (hif-or-expr))
-       middle)
+        middle)
     (while (eq hif-token 'hif-conditional)
       (hif-nexttoken)
       (setq middle (hif-expr))
       (if (eq hif-token 'hif-colon)
-         (progn
-           (hif-nexttoken)
-           (setq result (list 'hif-conditional result middle (hif-expr))))
-       (error "Error: unexpected token: %s" hif-token)))
+          (progn
+            (hif-nexttoken)
+            (setq result (list 'hif-conditional result middle (hif-expr))))
+        (error "Error: unexpected token: %s" hif-token)))
     result))
 
 (defun hif-or-expr ()
@@ -577,7 +847,8 @@ that form should be displayed.")
   "Parse a comp-expr : logshift | comp-expr `<'|`>'|`>='|`<=' logshift."
   (let ((result (hif-logshift-expr))
         (comp-token nil))
-    (while (memq hif-token '(hif-greater hif-less hif-greater-equal hif-less-equal))
+    (while (memq hif-token '(hif-greater hif-less hif-greater-equal
+                                         hif-less-equal))
       (setq comp-token hif-token)
       (hif-nexttoken)
       (setq result (list comp-token result (hif-logshift-expr))))
@@ -608,7 +879,7 @@ that form should be displayed.")
   "Parse an expression with *,/,%.
        muldiv : factor | muldiv '*|/|%' factor."
   (let ((result (hif-factor))
-       (math-op nil))
+        (math-op nil))
     (while (memq hif-token '(hif-multiply hif-divide hif-modulo))
       (setq math-op hif-token)
       (hif-nexttoken)
@@ -616,7 +887,9 @@ that form should be displayed.")
   result))
 
 (defun hif-factor ()
-  "Parse a factor: '!' factor | '~' factor | '(' expr ')' | 'defined(' id ')' | 'id(parmlist)' | strings | id."
+  "Parse a factor.
+factor : '!' factor | '~' factor | '(' expr ')' | 'defined(' id ')' |
+         'id(parmlist)' | strings | id."
   (cond
    ((eq hif-token 'hif-not)
     (hif-nexttoken)
@@ -630,36 +903,119 @@ that form should be displayed.")
     (hif-nexttoken)
     (let ((result (hif-exprlist)))
       (if (not (eq hif-token 'hif-rparen))
-         (error "Bad token in parenthesized expression: %s" hif-token)
-       (hif-nexttoken)
-       result)))
+          (error "Bad token in parenthesized expression: %s" hif-token)
+        (hif-nexttoken)
+        result)))
 
    ((eq hif-token 'hif-defined)
     (hif-nexttoken)
     (let ((paren (when (eq hif-token 'hif-lparen) (hif-nexttoken) t))
-         (ident hif-token))
+          (ident hif-token))
       (if (memq hif-token '(or and not hif-defined hif-lparen hif-rparen))
-         (error "Error: unexpected token: %s" hif-token))
+          (error "Error: unexpected token: %s" hif-token))
       (when paren
-       (hif-nexttoken)
+        (hif-nexttoken)
         (unless (eq hif-token 'hif-rparen)
-         (error "Error: expected \")\" after identifier")))
+          (error "Error: expected \")\" after identifier")))
       (hif-nexttoken)
       `(hif-defined (quote ,ident))))
 
    ((numberp hif-token)
     (prog1 hif-token (hif-nexttoken)))
+   ((stringp hif-token)
+    (hif-string-concatenation))
 
    ;; Unary plus/minus.
    ((memq hif-token '(hif-minus hif-plus))
     (list (prog1 hif-token (hif-nexttoken)) 0 (hif-factor)))
 
-   (t                                  ; identifier
+   (t                                   ; identifier
     (let ((ident hif-token))
-      (if (memq ident '(or and))
-         (error "Error: missing identifier"))
       (hif-nexttoken)
-      `(hif-lookup (quote ,ident))))))
+      (if (eq hif-token 'hif-lparen)
+          (hif-place-macro-invocation ident)
+        `(hif-lookup (quote ,ident)))))))
+
+(defun hif-get-argument-list ()
+  (let ((nest 0)
+        (parmlist nil) ; A "token" list of parameters, will later be parsed
+        (parm nil))
+
+    (while (or (not (eq (hif-nexttoken) 'hif-rparen))
+               (/= nest 0))
+      (if (eq (car (last parm)) 'hif-comma)
+          (setq parm nil))
+      (cond
+       ((eq hif-token 'hif-lparen)
+        (setq nest (1+ nest)))
+       ((eq hif-token 'hif-rparen)
+        (setq nest (1- nest)))
+       ((and (eq hif-token 'hif-comma)
+             (= nest 0))
+        (push (nreverse parm) parmlist)
+        (setq parm nil)))
+      (push hif-token parm))
+
+    (push (nreverse parm) parmlist) ; Okay even if PARM is nil
+    (hif-nexttoken) ; Drop the `hif-rparen', get next token
+    (nreverse parmlist)))
+
+(defun hif-place-macro-invocation (ident)
+  (let ((parmlist (hif-get-argument-list)))
+    `(hif-invoke (quote ,ident) (quote ,parmlist))))
+
+(defun hif-string-concatenation ()
+  "Parse concatenated strings: string | strings string."
+  (let ((result (substring-no-properties hif-token)))
+    (while (stringp (hif-nexttoken))
+      (setq result (concat
+                    (substring result 0 -1)    ; remove trailing '"'
+                    (substring hif-token 1)))) ; remove leading  '"'
+    result))
+
+(defun hif-define-macro (_parmlist _token-body)
+  "A marker for defined macro with arguments.
+This macro cannot be evaluated alone without parameters input."
+  ;;TODO: input arguments at run time, use minibuffer to query all arguments
+  (error
+   "Argumented macro cannot be evaluated without passing any parameter"))
+
+(defun hif-stringify (a)
+  "Stringify a number, string or symbol."
+  (cond
+   ((numberp a)
+    (number-to-string a))
+   ((atom a)
+    (symbol-name a))
+   ((stringp a)
+    (concat "\"" a "\""))
+   (t
+    (error "Invalid token to stringify"))))
+
+(defun intern-safe (str)
+  (if (stringp str)
+      (intern str)))
+
+(defun hif-token-concat (a b)
+  "Concatenate two tokens into a longer token.
+Currently support only simple token concatenation.  Also support weird (but
+valid) token concatenation like '>' ## '>' becomes '>>'.  Here we take care only
+those that can be evaluated during preprocessing time and ignore all those that
+can only be evaluated at C(++) runtime (like '++', '--' and '+='...)."
+  (if (or (memq a hif-valid-token-list)
+          (memq b hif-valid-token-list))
+      (let* ((ra (car (rassq a hif-token-alist)))
+             (rb (car (rassq b hif-token-alist)))
+             (result (and ra rb
+                          (cdr (assoc (concat ra rb) hif-token-alist)))))
+        (or result
+            ;;(error "Invalid token to concatenate")
+            (error "Concatenating \"%s\" and \"%s\" does not give a valid \
+preprocessing token"
+                   (or ra (symbol-name a))
+                   (or rb (symbol-name b)))))
+    (intern-safe (concat (hif-stringify a)
+                         (hif-stringify b)))))
 
 (defun hif-mathify (val)
   "Treat VAL as a number: if it's t or nil, use 1 or 0."
@@ -715,30 +1071,159 @@ that form should be displayed.")
 
 
 (defun hif-comma (&rest expr)
-  "Evaluate a list of expr, return the result of the last item."
+  "Evaluate a list of EXPR, return the result of the last item."
   (let ((result nil))
     (dolist (e expr)
       (ignore-errors
         (setq result (funcall hide-ifdef-evaluator e))))
     result))
 
+(defun hif-token-stringification (l)
+  "Scan token list for `hif-stringify' ('#') token and stringify the next token."
+  (let (result)
+    (while l
+      (push (if (eq (car l) 'hif-stringify)
+                (prog1
+                    (if (cadr l)
+                        (hif-stringify (cadr l))
+                      (error "No token to stringify"))
+                  (setq l (cdr l)))
+              (car l))
+            result)
+      (setq l (cdr l)))
+    (nreverse result)))
+
+(defun hif-token-concatenation (l)
+  "Scan token list for `hif-token-concat' ('##') token and concatenate two tokens."
+  (let ((prev nil)
+        result)
+    (while l
+      (while (eq (car l) 'hif-token-concat)
+        (unless prev
+          (error "No token before ## to concatenate"))
+        (unless (cdr l)
+          (error "No token after ## to concatenate"))
+        (setq prev (hif-token-concat prev (cadr l)))
+        (setq l (cddr l)))
+      (if prev
+          (setq result (append result (list prev))))
+      (setq prev (car l)
+            l (cdr l)))
+    (if prev
+        (append result (list prev))
+      result)))
+
+(defun hif-delimit (lis atom)
+  (nconc (cl-mapcan (lambda (l) (list l atom))
+                    (butlast lis))
+         (last lis)))
+
+;; Perform token replacement:
+(defun hif-macro-supply-arguments (macro-name actual-parms)
+  "Expand a macro call, replace ACTUAL-PARMS in the macro body."
+  (let* ((SA                   (assoc macro-name hide-ifdef-env))
+         (macro                (and SA
+                                    (cdr SA)
+                                    (eq (cadr SA) 'hif-define-macro)
+                                    (cddr SA)))
+         (formal-parms         (and macro (car macro)))
+         (macro-body           (and macro (cadr macro)))
+         actual-count
+         formal-count
+         formal
+         etc)
+
+    (when (and actual-parms formal-parms macro-body)
+      ;; For each actual parameter, evaluate each one and associate it
+      ;; with an actual parameter, put it into local table and finally
+      ;; evaluate the macro body.
+      (if (setq etc (eq (car formal-parms) 'hif-etc))
+          ;; Take care of `hif-etc' first. Prefix `hif-comma' back if needed.
+          (setq formal-parms (cdr formal-parms)))
+      (setq formal-count (length formal-parms)
+            actual-count (length actual-parms))
+
+      (if (> formal-count actual-count)
+          (error "Too few parameters for macro %S" macro-name)
+        (if (< formal-count actual-count)
+            (or etc
+                (error "Too many parameters for macro %S" macro-name))))
+
+      ;; Perform token replacement on the MACRO-BODY with the parameters
+      (while (setq formal (pop formal-parms))
+        ;; Prevent repetitive substitution, thus cannot use `subst'
+        ;; for example:
+        ;; #define mac(a,b) (a+b)
+        ;; #define testmac mac(b,y)
+        ;; testmac should expand to (b+y): replace of argument a and b
+        ;; occurs simultaneously, not sequentially. If sequentially,
+        ;; according to the argument order, it will become:
+        ;; 1. formal parm #1 'a' replaced by actual parm 'b', thus (a+b)
+        ;;    becomes (b+b)
+        ;; 2. formal parm #2 'b' replaced by actual parm 'y', thus (b+b)
+        ;;    becomes (y+y).
+        (setq macro-body
+              ;; Unlike `subst', `substitute' replace only the top level
+              ;; instead of the whole tree; more importantly, it's not
+              ;; destructive.
+              (cl-substitute (if (and etc (null formal-parms))
+                                 (hif-delimit actual-parms 'hif-comma)
+                               (car actual-parms))
+                             formal macro-body))
+        (setq actual-parms (cdr actual-parms)))
+
+      ;; Replacement completed, flatten the whole token list
+      (setq macro-body (hif-flatten macro-body))
+
+      ;; Stringification and token concatenation happens here
+      (hif-token-concatenation (hif-token-stringification macro-body)))))
+
+(defun hif-invoke (macro-name actual-parms)
+  "Invoke a macro by expanding it, reparse macro-body and finally invoke it."
+  ;; Reparse the macro body and evaluate it
+  (funcall hide-ifdef-evaluator
+           (hif-parse-exp
+            (hif-macro-supply-arguments macro-name actual-parms)
+            macro-name)))
 
 ;;;----------- end of parser -----------------------
 
 
-(defun hif-canonicalize ()
-  "When at beginning of #ifX, return a Lisp expression for its condition."
+(defun hif-canonicalize-tokens (regexp) ; For debugging
+  "Return the expanded result of the scanned tokens."
   (save-excursion
-    (let ((negate (looking-at hif-ifndef-regexp)))
-      (re-search-forward hif-ifx-regexp)
-      (let* ((tokens (hif-tokenize (point)
-                                  (progn (hif-end-of-line) (point))))
-            (expr (hif-parse-if-exp tokens)))
-       ;; (message "hif-canonicalized: %s" expr)
-       (if negate
-           (list 'hif-not expr)
-         expr)))))
-
+    (re-search-forward regexp)
+    (let* ((curr-regexp (match-string 0))
+           (defined (string-match hif-ifxdef-regexp curr-regexp))
+           (negate (and defined
+                        (string= (match-string 2 curr-regexp) "n")))
+           (hif-simple-token-only nil) ;; Dynamic binding var for `hif-tokenize'
+           (tokens (hif-tokenize (point)
+                                 (progn (hif-end-of-line) (point)))))
+      (if defined
+          (setq tokens (list 'hif-defined tokens)))
+      (if negate
+          (setq tokens (list 'hif-not tokens)))
+      tokens)))
+
+(defun hif-canonicalize (regexp)
+  "Return a Lisp expression for its condition by scanning current buffer.
+Do this when cursor is at the beginning of `regexp' (i.e. #ifX)."
+  (let ((case-fold-search nil))
+    (save-excursion
+      (re-search-forward regexp)
+      (let* ((curr-regexp (match-string 0))
+             (defined (string-match hif-ifxdef-regexp curr-regexp))
+             (negate (and defined
+                          (string= (match-string 2 curr-regexp) "n")))
+             (hif-simple-token-only nil) ; Dynamic binding for `hif-tokenize'
+             (tokens (hif-tokenize (point)
+                                   (progn (hif-end-of-line) (point)))))
+        (if defined
+            (setq tokens (list 'hif-defined tokens)))
+        (if negate
+            (setq tokens (list 'hif-not tokens)))
+        (hif-parse-exp tokens)))))
 
 (defun hif-find-any-ifX ()
   "Move to next #if..., or #ifndef, at point or after."
@@ -749,10 +1234,10 @@ that form should be displayed.")
 
 
 (defun hif-find-next-relevant ()
-  "Move to next #if..., #else, or #endif, after the current line."
+  "Move to next #if..., #elif..., #else, or #endif, after the current line."
   ;; (message "hif-find-next-relevant at %d" (point))
   (end-of-line)
-  ;; avoid infinite recursion by only going to beginning of line if match found
+  ;; Avoid infinite recursion by only going to line-beginning if match found
   (if (re-search-forward hif-ifx-else-endif-regexp (point-max) t)
       (beginning-of-line)))
 
@@ -760,33 +1245,37 @@ that form should be displayed.")
   "Move to previous #if..., #else, or #endif, before the current line."
   ;; (message "hif-find-previous-relevant at %d" (point))
   (beginning-of-line)
-  ;; avoid infinite recursion by only going to beginning of line if match found
+  ;; Avoid infinite recursion by only going to line-beginning if match found
   (if (re-search-backward hif-ifx-else-endif-regexp (point-min) t)
      (beginning-of-line)))
 
 
-(defun hif-looking-at-ifX ()           ;; Should eventually see #if
-  (looking-at hif-ifx-regexp))
+(defun hif-looking-at-ifX ()
+  (looking-at hif-ifx-regexp))   ; Should eventually see #if
 (defun hif-looking-at-endif ()
   (looking-at hif-endif-regexp))
 (defun hif-looking-at-else ()
   (looking-at hif-else-regexp))
 
+(defun hif-looking-at-elif ()
+  (looking-at hif-elif-regexp))
 
 
 (defun hif-ifdef-to-endif ()
-  "If positioned at #ifX or #else form, skip to corresponding #endif."
+  "If positioned at #ifX, #elif, or #else form, skip to corresponding #endif."
   ;; (message "hif-ifdef-to-endif at %d" (point)) (sit-for 1)
   (hif-find-next-relevant)
   (cond ((hif-looking-at-ifX)
-        (hif-ifdef-to-endif) ; find endif of nested if
-        (hif-ifdef-to-endif)) ; find outer endif or else
-       ((hif-looking-at-else)
-        (hif-ifdef-to-endif)) ; find endif following else
-       ((hif-looking-at-endif)
-        'done)
-       (t
-        (error "Mismatched #ifdef #endif pair"))))
+         (hif-ifdef-to-endif) ; Find endif of nested if
+         (hif-ifdef-to-endif)) ; Find outer endif or else
+        ((hif-looking-at-elif)
+         (hif-ifdef-to-endif))
+        ((hif-looking-at-else)
+         (hif-ifdef-to-endif)) ; Find endif following else
+        ((hif-looking-at-endif)
+         'done)
+        (t
+         (error "Mismatched #ifdef #endif pair"))))
 
 
 (defun hif-endif-to-ifdef ()
@@ -795,15 +1284,18 @@ that form should be displayed.")
   (let ((start (point)))
     (hif-find-previous-relevant)
     (if (= start (point))
-       (error "Mismatched #ifdef #endif pair")))
+        (error "Mismatched #ifdef #endif pair")))
   (cond ((hif-looking-at-endif)
-        (hif-endif-to-ifdef) ; find beginning of nested if
-        (hif-endif-to-ifdef)) ; find beginning of outer if or else
-       ((hif-looking-at-else)
-        (hif-endif-to-ifdef))
-       ((hif-looking-at-ifX)
-        'done)
-       (t)))                   ; never gets here
+         (hif-endif-to-ifdef) ; Find beginning of nested if
+         (hif-endif-to-ifdef)) ; Find beginning of outer if or else
+        ((hif-looking-at-elif)
+         (hif-endif-to-ifdef))
+        ((hif-looking-at-else)
+         (hif-endif-to-ifdef))
+        ((hif-looking-at-ifX)
+         'done)
+        (t
+         (error "Mismatched #endif"))))                 ; never gets here
 
 
 (defun forward-ifdef (&optional arg)
@@ -897,26 +1389,25 @@ With argument, do this that many times."
 ;;===%%SF%% hide-ifdef-hiding (Start)  ===
 
 
-;;; A range is a structure with four components:
-;;; ELSE-P     True if there was an else clause for the ifdef.
-;;; START      The start of the range. (beginning of line)
-;;; ELSE       The else marker (beginning of line)
-;;;                    Only valid if ELSE-P is true.
-;;; END                The end of the range.  (beginning of line)
+;; A range is a structure with four components:
+;; START       The start of the range. (beginning of line)
+;; ELSE        The else marker (beginning of line)
+;; END         The end of the range.  (beginning of line)
+;; ELIF        A sequence of #elif markers (beginning of line)
 
-(defsubst hif-make-range (start end &optional else)
-  (list start else end))
+(defsubst hif-make-range (start end &optional else elif)
+  (list start else end elif))
 
 (defsubst hif-range-start (range) (elt range 0))
 (defsubst hif-range-else (range) (elt range 1))
 (defsubst hif-range-end (range) (elt range 2))
+(defsubst hif-range-elif (range) (elt range 3))
 
 
-
-;;; Find-Range
-;;; The workhorse, it delimits the #if region.  Reasonably simple:
-;;; Skip until an #else or #endif is found, remembering positions.  If
-;;; an #else was found, skip some more, looking for the true #endif.
+;; Find-Range
+;; The workhorse, it delimits the #if region.  Reasonably simple:
+;; Skip until an #else or #endif is found, remembering positions.  If
+;; an #else was found, skip some more, looking for the true #endif.
 
 (defun hif-find-range ()
   "Return a Range structure describing the current #if region.
@@ -925,35 +1416,40 @@ Point is left unchanged."
   (save-excursion
     (beginning-of-line)
     (let ((start (point))
-         (else nil)
-         (end nil))
-      ;; Part one.  Look for either #endif or #else.
+          (elif nil)
+          (else nil)
+          (end nil))
+      ;; Part one.  Look for either #elif, #else or #endif.
       ;; This loop-and-a-half dedicated to E. Dijkstra.
-      (while (progn
-              (hif-find-next-relevant)
-              (hif-looking-at-ifX))            ; Skip nested ifdef
-       (hif-ifdef-to-endif))
-      ;; Found either a #else or an #endif.
-      (cond ((hif-looking-at-else)
-            (setq else (point)))
-           (t
-            (setq end (point)))) ; (line-end-position)
+      (while (and (not else) (not end))
+        (while (progn
+                 (hif-find-next-relevant)
+                 (hif-looking-at-ifX))            ; Skip nested ifdef
+          (hif-ifdef-to-endif))
+        ;; Found either a #else, #elif, or an #endif.
+        (cond ((hif-looking-at-elif)
+               (setq elif (nconc elif (list (point)))))
+              ((hif-looking-at-else)
+               (setq else (point)))
+              (t
+               (setq end (point)))))
       ;; If found #else, look for #endif.
       (when else
-       (while (progn
-                (hif-find-next-relevant)
-                (hif-looking-at-ifX))  ; Skip nested ifdef
-         (hif-ifdef-to-endif))
-       (if (hif-looking-at-else)
-           (error "Found two elses in a row?  Broken!"))
-       (setq end (point)))            ; (line-end-position)
-      (hif-make-range start end else))))
+        (while (progn
+                 (hif-find-next-relevant)
+                 (hif-looking-at-ifX))  ; Skip nested ifdef
+          (hif-ifdef-to-endif))
+        (if (hif-looking-at-else)
+            (error "Found two elses in a row?  Broken!"))
+        (setq end (point)))            ; (line-end-position)
+      (hif-make-range start end else elif))))
 
 
-;;; A bit slimy.
+;; A bit slimy.
 
 (defun hif-hide-line (point)
-  "Hide the line containing point.  Does nothing if `hide-ifdef-lines' is nil."
+  "Hide the line containing point.
+Does nothing if `hide-ifdef-lines' is nil."
   (when hide-ifdef-lines
     (save-excursion
       (goto-char point)
@@ -961,80 +1457,323 @@ Point is left unchanged."
        (line-beginning-position) (progn (hif-end-of-line) (point))))))
 
 
-;;;  Hif-Possibly-Hide
-;;;  There are four cases.  The #ifX expression is "taken" if it
-;;;  the hide-ifdef-evaluator returns T.  Presumably, this means the code
-;;;  inside the #ifdef would be included when the program was
-;;;  compiled.
-;;;
-;;;  Case 1:  #ifX taken, and there's an #else.
-;;;    The #else part must be hidden.  The #if (then) part must be
-;;;    processed for nested #ifX's.
-;;;  Case 2:  #ifX taken, and there's no #else.
-;;;    The #if part must be processed for nested #ifX's.
-;;;  Case 3:  #ifX not taken, and there's an #else.
-;;;    The #if part must be hidden.  The #else part must be processed
-;;;    for nested #ifs.
-;;;  Case 4:  #ifX not taken, and there's no #else.
-;;;    The #ifX part must be hidden.
-;;;
-;;;  Further processing is done by narrowing to the relevant region
-;;;  and just recursively calling hide-ifdef-guts.
-;;;
-;;;  When hif-possibly-hide returns, point is at the end of the
-;;;  possibly-hidden range.
-
-(defun hif-recurse-on (start end)
+;;  Hif-Possibly-Hide
+;;  There are four cases.  The #ifX expression is "taken" if it
+;;  the hide-ifdef-evaluator returns T.  Presumably, this means the code
+;;  inside the #ifdef would be included when the program was
+;;  compiled.
+;;
+;;  Case 1:  #ifX taken, and there's an #else.
+;;     The #else part must be hidden.  The #if (then) part must be
+;;     processed for nested #ifX's.
+;;  Case 2:  #ifX taken, and there's no #else.
+;;     The #if part must be processed for nested #ifX's.
+;;  Case 3:  #ifX not taken, and there's an #elif
+;;     The #if part must be hidden, and then evaluate
+;;     the #elif condition like a new #ifX.
+;;  Case 4:  #ifX not taken, and there's just an #else.
+;;     The #if part must be hidden.  The #else part must be processed
+;;     for nested #ifs.
+;;  Case 5:  #ifX not taken, and there's no #else.
+;;     The #ifX part must be hidden.
+;;
+;;  Further processing is done by narrowing to the relevant region
+;;  and just recursively calling hide-ifdef-guts.
+;;
+;;  When hif-possibly-hide returns, point is at the end of the
+;;  possibly-hidden range.
+
+(defvar hif-recurse-level 0)
+
+(defun hif-recurse-on (start end &optional dont-go-eol)
   "Call `hide-ifdef-guts' after narrowing to end of START line and END line."
   (save-excursion
     (save-restriction
       (goto-char start)
-      (end-of-line)
+      (unless dont-go-eol
+        (end-of-line))
       (narrow-to-region (point) end)
-      (hide-ifdef-guts))))
+      (let ((hif-recurse-level (1+ hif-recurse-level)))
+        (hide-ifdef-guts)))))
 
-(defun hif-possibly-hide ()
+(defun hif-possibly-hide (expand-reinclusion)
   "Called at #ifX expression, this hides those parts that should be hidden.
-It uses the judgment of `hide-ifdef-evaluator'."
+It uses the judgment of `hide-ifdef-evaluator'.  EXPAND-REINCLUSION is a flag
+indicating that we should expand the #ifdef even if it should be hidden.
+Refer to `hide-ifdef-expand-reinclusion-protection' for more details."
   ;; (message "hif-possibly-hide") (sit-for 1)
-  (let ((test (hif-canonicalize))
-       (range (hif-find-range)))
+  (let* ((case-fold-search nil)
+         (test (hif-canonicalize hif-ifx-regexp))
+         (range (hif-find-range))
+         (elifs (hif-range-elif range))
+         (if-part t) ; Everytime we start from if-part
+         (complete nil))
     ;; (message "test = %s" test) (sit-for 1)
 
     (hif-hide-line (hif-range-end range))
-    (if (not (hif-not (funcall hide-ifdef-evaluator test)))
-       (cond ((hif-range-else range)   ; case 1
-              (hif-hide-line (hif-range-else range))
-              (hide-ifdef-region (hif-range-else range)
-                                 (1- (hif-range-end range)))
-              (hif-recurse-on (hif-range-start range)
-                              (hif-range-else range)))
-             (t                        ; case 2
-              (hif-recurse-on (hif-range-start range)
-                              (hif-range-end range))))
-      (cond ((hif-range-else range)    ; case 3
-            (hif-hide-line (hif-range-else range))
-            (hide-ifdef-region (hif-range-start range)
-                               (1- (hif-range-else range)))
-            (hif-recurse-on (hif-range-else range)
-                            (hif-range-end range)))
-           (t                          ; case 4
-            (hide-ifdef-region (point)
-                               (1- (hif-range-end range))))))
+    (while (not complete)
+      (if (and (not (and expand-reinclusion if-part))
+               (hif-not (funcall hide-ifdef-evaluator test)))
+          ;; ifX/elif is FALSE
+          (if elifs
+              ;; Case 3 - Hide the #ifX and eval #elif
+              (let ((newstart (car elifs)))
+                (hif-hide-line (hif-range-start range))
+                (hide-ifdef-region (hif-range-start range)
+                                   (1- newstart))
+                (setcar range newstart)
+                (goto-char newstart)
+                (setq elifs (cdr elifs))
+                (setq test (hif-canonicalize hif-elif-regexp)))
+
+            ;; Check for #else
+            (cond ((hif-range-else range)
+                   ;; Case 4 - #else block visible
+                   (hif-hide-line (hif-range-else range))
+                   (hide-ifdef-region (hif-range-start range)
+                                      (1- (hif-range-else range)))
+                   (hif-recurse-on (hif-range-else range)
+                                   (hif-range-end range)))
+                  (t
+                   ;; Case 5 - No #else block, hide #ifX
+                   (hide-ifdef-region (point)
+                                      (1- (hif-range-end range)))))
+            (setq complete t))
+
+        ;; ifX/elif is TRUE
+        (cond (elifs
+               ;; Luke fix: distinguish from #elif..#elif to #elif..#else
+               (let ((elif (car elifs)))
+                 ;; hide all elifs
+                 (hif-hide-line elif)
+                 (hide-ifdef-region elif (1- (hif-range-end range)))
+                 (hif-recurse-on (hif-range-start range)
+                                 elif)))
+              ((hif-range-else range)
+               ;; Case 1 - Hide #elif and #else blocks, recurse #ifX
+               (hif-hide-line (hif-range-else range))
+               (hide-ifdef-region (hif-range-else range)
+                                  (1- (hif-range-end range)))
+               (hif-recurse-on (hif-range-start range)
+                               (hif-range-else range)))
+              (t
+               ;; Case 2 - No #else, just recurse #ifX
+               (hif-recurse-on (hif-range-start range)
+                               (hif-range-end range))))
+        (setq complete t))
+      (setq if-part nil))
+
+    ;; complete = t
     (hif-hide-line (hif-range-start range)) ; Always hide start.
     (goto-char (hif-range-end range))
     (end-of-line)))
 
+(defun hif-evaluate-region (start end)
+  (let* ((tokens (ignore-errors ; Prevent C statement things like
+                                ; 'do { ... } while (0)'
+                   (hif-tokenize start end)))
+         (expr (and tokens
+                    (condition-case nil
+                        (hif-parse-exp tokens)
+                      (error
+                       tokens))))
+         (result (funcall hide-ifdef-evaluator expr)))
+    result))
 
+(defun hif-evaluate-macro (rstart rend)
+  "Evaluate the macro expansion result for a region.
+If no region active, find the current #ifdefs and evaluate the result.
+Currently it supports only math calculations, strings or argumented macros can
+not be expanded."
+  (interactive "r")
+  (let ((case-fold-search nil))
+    (save-excursion
+      (unless mark-active
+        (setq rstart nil rend nil)
+        (beginning-of-line)
+        (when (and (re-search-forward hif-macro-expr-prefix-regexp nil t)
+                   (string= "define" (match-string 2)))
+          (re-search-forward hif-macroref-regexp nil t)))
+      (let* ((start (or rstart (point)))
+             (end   (or rend (progn (hif-end-of-line) (point))))
+             (defined nil)
+             (simple 't)
+             (tokens (ignore-errors ; Prevent C statement things like
+                                        ; 'do { ... } while (0)'
+                       (hif-tokenize start end)))
+             (expr (or (and (<= (length tokens) 1) ; Simple token
+                            (setq defined (assoc (car tokens) hide-ifdef-env))
+                            (setq simple (atom (hif-lookup (car tokens))))
+                            (hif-lookup (car tokens)))
+                       (and tokens
+                            (condition-case nil
+                                (hif-parse-exp tokens)
+                              (error
+                               nil)))))
+             (result (funcall hide-ifdef-evaluator expr))
+             (exprstring (replace-regexp-in-string
+                          ;; Trim off leading/trailing whites
+                          "^[ \t]*\\([^ \t]+\\)[ \t]*" "\\1"
+                          (replace-regexp-in-string
+                           "\\(//.*\\)" "" ; Trim off end-of-line comments
+                           (buffer-substring-no-properties start end)))))
+        (cond
+         ((and (<= (length tokens) 1) simple) ; Simple token
+          (if defined
+              (message "%S <= `%s'" result exprstring)
+            (message "`%s' is not defined" exprstring)))
+         ((integerp result)
+          (if (or (= 0 result) (= 1 result))
+              (message "%S <= `%s'" result exprstring)
+            (message "%S (0x%x) <= `%s'" result result exprstring)))
+         ((null result) (message "%S <= `%s'" 'false exprstring))
+         ((eq t result) (message "%S <= `%s'" 'true exprstring))
+         (t (message "%S <= `%s'" result exprstring)))
+        result))))
+
+(defun hif-parse-macro-arglist (str)
+  "Parse argument list formatted as '( arg1 [ , argn] [...] )'.
+The '...' is also included.  Return a list of the arguments, if '...' exists the
+first arg will be `hif-etc'."
+  (let* ((hif-simple-token-only nil) ; Dynamic binding var for `hif-tokenize'
+         (tokenlist
+          (cdr (hif-tokenize
+                (- (point) (length str)) (point)))) ; Remove `hif-lparen'
+         etc result token)
+    (while (not (eq (setq token (pop tokenlist)) 'hif-rparen))
+      (cond
+       ((eq token 'hif-etc)
+        (setq etc t))
+       ((eq token 'hif-comma)
+        t)
+       (t
+        (push token result))))
+    (if etc
+        (cons 'hif-etc (nreverse result))
+      (nreverse result))))
+
+;; The original version of hideif evaluates the macro early and store the
+;; final values for the defined macro into the symbol database (aka
+;; `hide-ifdef-env'). The evaluation process is "strings -> tokens -> parsed
+;; tree -> [value]". (The square bracket refers to what's stored in in our
+;; `hide-ifdef-env'.)
+;;
+;; This forbids the evaluation of an argumented macro since the parameters
+;; are applied at run time. In order to support argumented macro I then
+;; postponed the evaluation process one stage and store the "parsed tree"
+;; into symbol database. The evaluation process was then "strings -> tokens
+;; -> [parsed tree] -> value". Hideif therefore run slower since it need to
+;; evaluate the parsed tree everytime when trying to expand the symbol. These
+;; temporarily code changes are obsolete and not in Emacs source repository.
+;;
+;; Furthermore, CPP did allow partial expression to be defined in several
+;; macros and later got concatenated into a complete expression and then
+;; evaluate it. In order to match this behavior I had to postpone one stage
+;; further, otherwise those partial expression will be fail on parsing and
+;; we'll miss all macros that reference it. The evaluation process thus
+;; became "strings -> [tokens] -> parsed tree -> value." This degraded the
+;; performance since we need to parse tokens and evaluate them everytime
+;; when that symbol is referenced.
+;;
+;; In real cases I found a lot portion of macros are "simple macros" that
+;; expand to literals like integers or other symbols. In order to enhance
+;; the performance I use this `hif-simple-token-only' to notify my code and
+;; save the final [value] into symbol database. [lukelee]
+
+(defun hif-find-define (&optional min max)
+  "Parse texts and retrieve all defines within the region MIN and MAX."
+  (interactive)
+  (and min (goto-char min))
+  (and (re-search-forward hif-define-regexp max t)
+       (or
+        (let* ((defining (string= "define" (match-string 2)))
+               (name (and (re-search-forward hif-macroref-regexp max t)
+                          (match-string 1)))
+               (parmlist (and (match-string 3) ; First arg id found
+                              (hif-parse-macro-arglist (match-string 2)))))
+          (if defining
+              ;; Ignore name (still need to return 't), or define the name
+              (or (and hide-ifdef-exclude-define-regexp
+                       (string-match hide-ifdef-exclude-define-regexp
+                                     name))
+
+                  (let* ((start (point))
+                         (end   (progn (hif-end-of-line) (point)))
+                         (hif-simple-token-only nil) ; Dynamic binding
+                         (tokens
+                          (and name
+                               ;; `hif-simple-token-only' is set/clear
+                               ;; only in this block
+                               (condition-case nil
+                                   ;; Prevent C statements like
+                                   ;; 'do { ... } while (0)'
+                                   (hif-tokenize start end)
+                                 (error
+                                  ;; We can't just return nil here since
+                                  ;; this will stop hideif from searching
+                                  ;; for more #defines.
+                                  (setq hif-simple-token-only t)
+                                  (buffer-substring-no-properties
+                                   start end)))))
+                         ;; For simple tokens we save only the parsed result;
+                         ;; otherwise we save the tokens and parse it after
+                         ;; parameter replacement
+                         (expr (and tokens
+                                    ;; `hif-simple-token-only' is checked only
+                                    ;; here.
+                                    (or (and hif-simple-token-only
+                                             (listp tokens)
+                                             (= (length tokens) 1)
+                                             (hif-parse-exp tokens))
+                                        `(hif-define-macro ,parmlist
+                                                           ,tokens))))
+                         (SA (and name
+                                  (assoc (intern name) hide-ifdef-env))))
+                    (and name
+                         (if SA
+                             (or (setcdr SA expr) t)
+                           ;; Lazy evaluation, eval only if hif-lookup find it.
+                           ;; Define it anyway, even if nil it's still in list
+                           ;; and therefore considered defined.
+                           (push (cons (intern name) expr) hide-ifdef-env)))))
+            ;; #undef
+            (and name
+                 (hif-undefine-symbol (intern name))))))
+       t))
+
+
+(defun hif-add-new-defines (&optional min max)
+  "Scan and add all #define macros between MIN and MAX."
+  (interactive)
+  (save-excursion
+    (save-restriction
+      ;; (mark-region min max) ;; for debugging
+      (while (hif-find-define min max)
+        (setf min (point)))
+      (if max (goto-char max)
+        (goto-char (point-max))))))
 
 (defun hide-ifdef-guts ()
   "Does most of the work of `hide-ifdefs'.
 It does not do the work that's pointless to redo on a recursive entry."
   ;; (message "hide-ifdef-guts")
   (save-excursion
-    (goto-char (point-min))
-    (while (hif-find-any-ifX)
-      (hif-possibly-hide))))
+    (let* ((case-fold-search t) ; Ignore case for `hide-ifdef-header-regexp'
+           (expand-header (and hide-ifdef-expand-reinclusion-protection
+                               (string-match hide-ifdef-header-regexp
+                                             (buffer-file-name))
+                               (zerop hif-recurse-level)))
+           (case-fold-search nil)
+           min max)
+      (goto-char (point-min))
+      (setf min (point))
+      (cl-loop do
+               (setf max (hif-find-any-ifX))
+               (hif-add-new-defines min max)
+               (if max
+                   (hif-possibly-hide expand-header))
+               (setf min (point))
+               while max))))
 
 ;;===%%SF%% hide-ifdef-hiding (End)  ===
 
@@ -1048,7 +1787,8 @@ It does not do the work that's pointless to redo on a recursive entry."
   (message "Hide-Read-Only %s"
           (if hide-ifdef-read-only "ON" "OFF"))
   (if hide-ifdef-hiding
-      (setq buffer-read-only (or hide-ifdef-read-only hif-outside-read-only)))
+      (setq buffer-read-only (or hide-ifdef-read-only
+                                 hif-outside-read-only)))
   (force-mode-line-update))
 
 (defun hide-ifdef-toggle-outside-read-only ()
@@ -1078,38 +1818,67 @@ It does not do the work that's pointless to redo on a recursive entry."
          (overlay-put overlay 'face nil)
          (overlay-put overlay 'invisible 'hide-ifdef))))))
 
-(defun hide-ifdef-define (var)
-  "Define a VAR so that #ifdef VAR would be included."
-  (interactive "SDefine what? ")
-  (hif-set-var var 1)
+(defun hide-ifdef-define (var &optional val)
+  "Define a VAR to VAL (default 1) in `hide-ifdef-env'.
+This allows #ifdef VAR to be hidden."
+  (interactive
+   (let* ((default (save-excursion
+                     (beginning-of-line)
+                     (cond ((looking-at hif-ifx-else-endif-regexp)
+                            (forward-word 2)
+                            (current-word 'strict))
+                           (t
+                            nil))))
+          (var (read-minibuffer "Define what? " default))
+          (val (read-from-minibuffer (format "Set %s to? (default 1): " var)
+                                     nil nil t nil "1")))
+     (list var val)))
+  (hif-set-var var (or val 1))
+  (message "%s set to %s" var (or val 1))
+  (sleep-for 1)
   (if hide-ifdef-hiding (hide-ifdefs)))
 
-(defun hide-ifdef-undef (var)
-  "Undefine a VAR so that #ifdef VAR would not be included."
-  (interactive "SUndefine what? ")
-  (hif-set-var var nil)
-  (if hide-ifdef-hiding (hide-ifdefs)))
+(defun hif-undefine-symbol (var)
+  (setq hide-ifdef-env
+        (delete (assoc var hide-ifdef-env) hide-ifdef-env)))
 
+(defun hide-ifdef-undef (start end)
+  "Undefine a VAR so that #ifdef VAR would not be included."
+  (interactive "r")
+  (let* ((symstr
+          (or (and mark-active
+                   (buffer-substring-no-properties start end))
+              (read-string "Undefine what? " (current-word))))
+         (sym (and symstr
+                   (intern symstr))))
+    (if (zerop (hif-defined sym))
+        (message "`%s' not defined, no need to undefine it" symstr)
+      (hif-undefine-symbol sym)
+      (if hide-ifdef-hiding (hide-ifdefs))
+      (message "`%S' undefined" sym))))
 
 (defun hide-ifdefs (&optional nomsg)
   "Hide the contents of some #ifdefs.
 Assume that defined symbols have been added to `hide-ifdef-env'.
 The text hidden is the text that would not be included by the C
 preprocessor if it were given the file with those symbols defined.
+With prefix command presents it will also hide the #ifdefs themselves.
 
 Turn off hiding by calling `show-ifdefs'."
 
   (interactive)
-  (message "Hiding...")
-  (setq hif-outside-read-only buffer-read-only)
-  (unless hide-ifdef-mode (hide-ifdef-mode 1)) ; turn on hide-ifdef-mode
-  (if hide-ifdef-hiding
-      (show-ifdefs))                   ; Otherwise, deep confusion.
-  (setq hide-ifdef-hiding t)
-  (hide-ifdef-guts)
-  (setq buffer-read-only (or hide-ifdef-read-only hif-outside-read-only))
-  (or nomsg
-      (message "Hiding done")))
+  (let ((hide-ifdef-lines current-prefix-arg))
+    (or nomsg
+        (message "Hiding..."))
+    (setq hif-outside-read-only buffer-read-only)
+    (unless hide-ifdef-mode (hide-ifdef-mode 1)) ; Turn on hide-ifdef-mode
+    (if hide-ifdef-hiding
+        (show-ifdefs))                    ; Otherwise, deep confusion.
+    (setq hide-ifdef-hiding t)
+    (hide-ifdef-guts)
+    (setq buffer-read-only (or hide-ifdef-read-only hif-outside-read-only))
+    (or nomsg
+        (message "Hiding done"))))
 
 
 (defun show-ifdefs ()
@@ -1125,46 +1894,74 @@ Turn off hiding by calling `show-ifdefs'."
 Return as (TOP . BOTTOM) the extent of ifdef block."
   (let (max-bottom)
     (cons (save-excursion
-           (beginning-of-line)
-           (unless (or (hif-looking-at-else) (hif-looking-at-ifX))
-             (up-ifdef))
-           (prog1 (point)
-             (hif-ifdef-to-endif)
-             (setq max-bottom (1- (point)))))
-         (save-excursion
-           (beginning-of-line)
-           (unless (hif-looking-at-endif)
-             (hif-find-next-relevant))
-           (while (hif-looking-at-ifX)
-             (hif-ifdef-to-endif)
-             (hif-find-next-relevant))
-           (min max-bottom (1- (point)))))))
-
-
-(defun hide-ifdef-block ()
-  "Hide the ifdef block (true or false part) enclosing or before the cursor."
-  (interactive)
-  (unless hide-ifdef-mode (hide-ifdef-mode 1))
-  (let ((top-bottom (hif-find-ifdef-block)))
-    (hide-ifdef-region (car top-bottom) (cdr top-bottom))
-    (when hide-ifdef-lines
-      (hif-hide-line (car top-bottom))
-      (hif-hide-line (1+ (cdr top-bottom))))
-    (setq hide-ifdef-hiding t))
-  (setq buffer-read-only (or hide-ifdef-read-only hif-outside-read-only)))
-
-(defun show-ifdef-block ()
+            (beginning-of-line)
+            (unless (or (hif-looking-at-else) (hif-looking-at-ifX))
+              (up-ifdef))
+            (prog1 (point)
+              (hif-ifdef-to-endif)
+              (setq max-bottom (1- (point)))))
+          (save-excursion
+            (beginning-of-line)
+            (unless (hif-looking-at-endif)
+              (hif-find-next-relevant))
+            (while (hif-looking-at-ifX)
+              (hif-ifdef-to-endif)
+              (hif-find-next-relevant))
+              (min max-bottom (1- (point)))))))
+
+
+(defun hide-ifdef-block (&optional arg start end)
+  "Hide the ifdef block (true or false part) enclosing or before the cursor.
+With optional prefix argument ARG, also hide the #ifdefs themselves."
+  (interactive "P\nr")
+  (let ((hide-ifdef-lines arg))
+    (if mark-active
+        (let ((hif-recurse-level (1+ hif-recurse-level)))
+          (hif-recurse-on start end t)
+          (setq mark-active nil))
+      (unless hide-ifdef-mode (hide-ifdef-mode 1))
+      (let ((top-bottom (hif-find-ifdef-block)))
+        (hide-ifdef-region (car top-bottom) (cdr top-bottom))
+        (when hide-ifdef-lines
+          (hif-hide-line (car top-bottom))
+          (hif-hide-line (1+ (cdr top-bottom))))
+        (setq hide-ifdef-hiding t))
+      (setq buffer-read-only
+            (or hide-ifdef-read-only hif-outside-read-only)))))
+
+(defun show-ifdef-block (&optional start end)
   "Show the ifdef block (true or false part) enclosing or before the cursor."
-  (interactive)
-  (let ((top-bottom (hif-find-ifdef-block)))
+  (interactive "r")
+  (if mark-active
+      (progn
+        (dolist (o (overlays-in start end))
+          (if (overlay-get o 'hide-ifdef)
+              (delete-overlay o)))
+        (setq mark-active nil))
+    (let ((top-bottom (condition-case nil
+                          (hif-find-ifdef-block)
+                        (error
+                         nil)))
+          (ovrs (overlays-in (max (point-min) (1- (point)))
+                             (min (point-max) (1+ (point)))))
+          (del nil))
+      (if top-bottom
     (if hide-ifdef-lines
-       (hif-show-ifdef-region
-        (save-excursion
-          (goto-char (car top-bottom)) (line-beginning-position))
-        (save-excursion
-          (goto-char (1+ (cdr top-bottom)))
-          (hif-end-of-line) (point)))
-      (hif-show-ifdef-region (1- (car top-bottom)) (cdr top-bottom)))))
+        (hif-show-ifdef-region
+         (save-excursion
+           (goto-char (car top-bottom)) (line-beginning-position))
+         (save-excursion
+           (goto-char (1+ (cdr top-bottom)))
+           (hif-end-of-line) (point)))
+      (setf del (hif-show-ifdef-region
+                 (1- (car top-bottom)) (cdr top-bottom)))))
+      (if (not (and top-bottom
+                    del))
+          (dolist (o ovrs)
+            ;;(dolist (o (overlays-in (1- (point)) (1+ (point))))
+            ;;   (if (overlay-get o 'hide-ifdef) (message "%S" o)))
+            (if (overlay-get o 'hide-ifdef)
+                (delete-overlay o)))))))
 
 
 ;;;  definition alist support
index e9349b655b0bd5fdeb0fb1e86cbed0d8f344a371..a016c3283ebe9a0d1a61876569da741dd9353bd0 100644 (file)
@@ -390,37 +390,31 @@ Use the command `hs-minor-mode' to toggle or set this variable.")
       :help "Do not hidden code or comment blocks when isearch matches inside them"
       :active t :style radio :selected (eq hs-isearch-open nil)])))
 
-(defvar hs-c-start-regexp nil
+(defvar-local hs-c-start-regexp nil
   "Regexp for beginning of comments.
 Differs from mode-specific comment regexps in that
 surrounding whitespace is stripped.")
-(make-variable-buffer-local 'hs-c-start-regexp)
 
-(defvar hs-block-start-regexp nil
+(defvar-local hs-block-start-regexp nil
   "Regexp for beginning of block.")
-(make-variable-buffer-local 'hs-block-start-regexp)
 
-(defvar hs-block-start-mdata-select nil
+(defvar-local hs-block-start-mdata-select nil
   "Element in `hs-block-start-regexp' match data to consider as block start.
 The internal function `hs-forward-sexp' moves point to the beginning of this
 element (using `match-beginning') before calling `hs-forward-sexp-func'.")
-(make-variable-buffer-local 'hs-block-start-mdata-select)
 
-(defvar hs-block-end-regexp nil
+(defvar-local hs-block-end-regexp nil
   "Regexp for end of block.")
-(make-variable-buffer-local 'hs-block-end-regexp)
 
-
-(defvar hs-forward-sexp-func 'forward-sexp
+(defvar-local hs-forward-sexp-func 'forward-sexp
   "Function used to do a `forward-sexp'.
 Should change for Algol-ish modes.  For single-character block
 delimiters -- ie, the syntax table regexp for the character is
 either `(' or `)' -- `hs-forward-sexp-func' would just be
 `forward-sexp'.  For other modes such as simula, a more specialized
 function is necessary.")
-(make-variable-buffer-local 'hs-forward-sexp-func)
 
-(defvar hs-adjust-block-beginning nil
+(defvar-local hs-adjust-block-beginning nil
   "Function used to tweak the block beginning.
 The block is hidden from the position returned by this function,
 as opposed to hiding it from the position returned when searching
@@ -439,7 +433,6 @@ It should return the position from where we should start hiding.
 It should not move the point.
 
 See `hs-c-like-adjust-block-beginning' for an example of using this.")
-(make-variable-buffer-local 'hs-adjust-block-beginning)
 
 (defvar hs-headline nil
   "Text of the line where a hidden block begins, set during isearch.
@@ -789,6 +782,7 @@ If `hs-hide-comments-when-hiding-all' is non-nil, also hide the comments."
      (unless hs-allow-nesting
        (hs-discard-overlays (point-min) (point-max)))
      (goto-char (point-min))
+     (syntax-propertize (point-max))
      (let ((spew (make-progress-reporter "Hiding all blocks..."
                                          (point-min) (point-max)))
            (re (concat "\\("
index cd17600182fce4065f66187e3553fd8caad5570d..3d42fe231bdd8b0bd574a102ce286025ee8ec54c 100644 (file)
@@ -1177,15 +1177,13 @@ Useful when source code is displayed as help.  See the option
   (if (featurep 'font-lock)
       (let ((major-mode 'idlwave-mode)
            (font-lock-verbose
-            (if (called-interactively-p 'interactive) font-lock-verbose nil))
-           (syntax-table (syntax-table)))
-       (unwind-protect
-           (progn
-             (set-syntax-table idlwave-mode-syntax-table)
-             (set (make-local-variable 'font-lock-defaults)
-                  idlwave-font-lock-defaults)
-             (font-lock-fontify-buffer))
-         (set-syntax-table syntax-table)))))
+            (if (called-interactively-p 'interactive) font-lock-verbose nil)))
+       (with-syntax-table idlwave-mode-syntax-table
+          (set (make-local-variable 'font-lock-defaults)
+               idlwave-font-lock-defaults)
+          (if (fboundp 'font-lock-ensure)
+              (font-lock-ensure)
+            (font-lock-fontify-buffer))))))
 
 
 (defun idlwave-help-error (name type class keyword)
index 5d43edc2fc885f16d942a93a3ee4e944936f19de..876695b0809bbd461a6f226d59fe1535ddcc52e1 100644 (file)
@@ -590,27 +590,28 @@ TYPE is either 'pro' or 'rinfo', and `idlwave-shell-temp-pro-file' or
 
 (defun idlwave-shell-make-temp-file (prefix)
   "Create a temporary file."
-  ; Hard coded make-temp-file for Emacs<21
-  (if (fboundp 'make-temp-file)
+  (if (featurep 'emacs)
       (make-temp-file prefix)
-    (let (file
-         (temp-file-dir (if (boundp 'temporary-file-directory)
-                            temporary-file-directory
-                          "/tmp")))
-      (while (condition-case ()
-                (progn
-                  (setq file
-                        (make-temp-name
-                         (expand-file-name prefix temp-file-dir)))
-                   (if (featurep 'xemacs)
-                      (write-region "" nil file nil 'silent nil)
-                    (write-region "" nil file nil 'silent nil 'excl))
-                  nil)
-              (file-already-exists t))
-       ;; the file was somehow created by someone else between
-       ;; `make-temp-name' and `write-region', let's try again.
-       nil)
-      file)))
+    (if (fboundp 'make-temp-file)
+       (make-temp-file prefix)
+      (let (file
+           (temp-file-dir (if (boundp 'temporary-file-directory)
+                              temporary-file-directory
+                            "/tmp")))
+       (while (condition-case ()
+                  (progn
+                    (setq file
+                          (make-temp-name
+                           (expand-file-name prefix temp-file-dir)))
+                    (if (featurep 'xemacs)
+                        (write-region "" nil file nil 'silent nil)
+                      (write-region "" nil file nil 'silent nil 'excl))
+                    nil)
+                (file-already-exists t))
+         ;; the file was somehow created by someone else between
+         ;; `make-temp-name' and `write-region', let's try again.
+         nil)
+       file))))
 
 
 (defvar idlwave-shell-dirstack-query "cd,current=___cur & print,___cur"
index 5419a6dbdb82254138d5058b35b7531ba413a7a8..ba64ae318444307e168cee451623555bb67aa73e 100644 (file)
@@ -112,6 +112,8 @@ mode.  Default is whitespace followed by 0 or 1 single-letter colon-keyword
 (define-key lisp-mode-map "\C-x\C-e" 'lisp-eval-last-sexp) ; Gnu convention
 (define-key lisp-mode-map "\C-c\C-e" 'lisp-eval-defun)
 (define-key lisp-mode-map "\C-c\C-r" 'lisp-eval-region)
+(define-key lisp-mode-map "\C-c\C-n" 'lisp-eval-form-and-next)
+(define-key lisp-mode-map "\C-c\C-p" 'lisp-eval-paragraph)
 (define-key lisp-mode-map "\C-c\C-c" 'lisp-compile-defun)
 (define-key lisp-mode-map "\C-c\C-z" 'switch-to-lisp)
 (define-key lisp-mode-map "\C-c\C-l" 'lisp-load-file)
@@ -311,6 +313,14 @@ of `inferior-lisp-program').  Runs the hooks from
 ;;;###autoload
 (defalias 'run-lisp 'inferior-lisp)
 
+(defun lisp-eval-paragraph (&optional and-go)
+  "Send the current paragraph to the inferior Lisp process.
+Prefix argument means switch to the Lisp buffer afterwards."
+  (interactive "P")
+  (save-excursion
+    (mark-paragraph)
+    (lisp-eval-region (point) (mark) and-go)))
+
 (defun lisp-eval-region (start end &optional and-go)
   "Send the current region to the inferior Lisp process.
 Prefix argument means switch to the Lisp buffer afterwards."
@@ -361,6 +371,14 @@ Prefix argument means switch to the Lisp buffer afterwards."
   (interactive "P")
   (lisp-eval-region (save-excursion (backward-sexp) (point)) (point) and-go))
 
+(defun lisp-eval-form-and-next ()
+  "Send the previous sexp to the inferior Lisp process and move to the next one."
+  (interactive "")
+  (while (not (zerop (car (syntax-ppss))))
+    (up-list))
+  (lisp-eval-last-sexp)
+  (forward-sexp))
+
 (defun lisp-compile-region (start end &optional and-go)
   "Compile the current region in the inferior Lisp process.
 Prefix argument means switch to the Lisp buffer afterwards."
index a8f0d556ec417e96f93beb3acd4cac087ba182fb..d7017e9eed1e3f4c68485c403fe0d666b3c83a12 100644 (file)
@@ -3479,6 +3479,10 @@ If one hasn't been set, or if it's stale, prompt for a new one."
   '(when (fboundp 'folding-add-to-marks-list)
      (folding-add-to-marks-list 'js-mode "// {{{" "// }}}" )))
 
+;;;###autoload
+(dolist (name (list "node" "nodejs" "gjs" "rhino"))
+  (add-to-list 'interpreter-mode-alist (cons (purecopy name) 'js-mode)))
+
 (provide 'js)
 
 ;; js.el ends here
index ef372a34fdb11a6dd153b71e0f2664d3a778c820..b4a96e741b78a648917e7eb5967395588c05e5a3 100644 (file)
 ;; a rich language; writing a more suitable parser would be a big job):
 ;; 2)  The globbing syntax <pattern> is not recognized, so special
 ;;       characters in the pattern string must be backslashed.
-;; 3)  The << quoting operators are not recognized; see below.
-;; 5)  To make '$' work correctly, $' is not recognized as a variable.
-;;     Use "$'" or $POSTMATCH instead.
 ;;
-;; If you don't use font-lock, additional problems will appear:
-;; 1)  Regular expression delimiters do not act as quotes, so special
-;;       characters such as `'"#:;[](){} may need to be backslashed
-;;       in regular expressions and in both parts of s/// and tr///.
-;; 4)  The q and qq quoting operators are not recognized; see below.
-;; 5)  To make variables such a $' and $#array work, perl-mode treats
-;;       $ just like backslash, so '$' is not treated correctly.
-;; 6)  Unfortunately, treating $ like \ makes ${var} be treated as an
-;;       unmatched }.  See below.
-;; 7)  When ' (quote) is used as a package name separator, perl-mode
-;;       doesn't understand, and thinks it is seeing a quoted string.
-
 ;; Here are some ugly tricks to bypass some of these problems:  the perl
 ;; expression /`/ (that's a back-tick) usually evaluates harmlessly,
 ;; but will trick perl-mode into starting a quoted string, which
 (defvar perl-quote-like-pairs
   '((?\( . ?\)) (?\[ . ?\]) (?\{ . ?\}) (?\< . ?\>)))
 
+(eval-and-compile
+  (defconst perl--syntax-exp-intro-regexp
+    (concat "\\(?:\\(?:^\\|[^$@&%[:word:]]\\)"
+            (regexp-opt '("split" "if" "unless" "until" "while" "print"
+                          "grep" "map" "not" "or" "and" "for" "foreach"))
+            "\\|[-?:.,;|&+*=!~({[]\\|\\(^\\)\\)[ \t\n]*")))
+
 ;; FIXME: handle here-docs and regexps.
 ;; <<EOF <<"EOF" <<'EOF' (no space)
 ;; see `man perlop'
        (1 (prog1 "\"" (perl-syntax-propertize-special-constructs end))))
       ;; Funny things in `sub' arg-specs like `sub myfun ($)' or `sub ($)'.
       ;; Be careful not to match "sub { (...) ... }".
-      ("\\<sub\\(?:[[:space:]]+[^{}[:punct:][:space:]]+\\)?[[:space:]]*(\\([^)]+\\))"
+      ("\\<sub\\(?:[\s\t\n]+\\(?:\\sw\\|\\s_\\)+\\)?[\s\t\n]*(\\([^)]+\\))"
        (1 "."))
       ;; Turn __DATA__ trailer into a comment.
       ("^\\(_\\)_\\(?:DATA\\|END\\)__[ \t]*\\(?:\\(\n\\)#.-\\*-.*perl.*-\\*-\\|\n.*\\)"
       ;; *opening* slash.  We can afford to mis-match the closing ones
       ;; here, because they will be re-treated separately later in
       ;; perl-font-lock-special-syntactic-constructs.
-      ((concat "\\(?:\\(?:^\\|[^$@&%[:word:]]\\)"
-               (regexp-opt '("split" "if" "unless" "until" "while" "split"
-                             "grep" "map" "not" "or" "and" "for" "foreach"))
-               "\\|[-?:.,;|&+*=!~({[]\\|\\(^\\)\\)[ \t\n]*\\(/\\)")
+      ((concat perl--syntax-exp-intro-regexp "\\(/\\)")
        (2 (ignore
            (if (and (match-end 1)       ; / at BOL.
                     (save-excursion
                                   (string-to-syntax "\"")))
              (perl-syntax-propertize-special-constructs end)))))
       ;; Here documents.
-      ;; TODO: Handle <<WORD.  These are trickier because you need to
-      ;; disambiguate with the shift operator.
-      ("<<[ \t]*\\('[^'\n]*'\\|\"[^\"\n]*\"\\|\\\\[[:alpha:]][[:alnum:]]*\\).*\\(\n\\)"
-       (2 (let* ((st (get-text-property (match-beginning 2) 'syntax-table))
+      ((concat
+        "\\(?:"
+        ;; << "EOF", << 'EOF', or << \EOF
+        "<<[ \t]*\\('[^'\n]*'\\|\"[^\"\n]*\"\\|\\\\[[:alpha:]][[:alnum:]]*\\)"
+        ;; The <<EOF case which needs perl--syntax-exp-intro-regexp, to
+        ;; disambiguate with the left-bitshift operator.
+        "\\|" perl--syntax-exp-intro-regexp "<<\\(?1:\\sw+\\)\\)"
+        ".*\\(\n\\)")
+       (3 (let* ((st (get-text-property (match-beginning 3) 'syntax-table))
                  (name (match-string 1)))
             (goto-char (match-end 1))
             (if (save-excursion (nth 8 (syntax-ppss (match-beginning 0))))
                     ;; Remember the names of heredocs found on this line.
                     (cons (pcase (aref name 0)
                             (`?\\ (substring name 1))
-                            (_ (substring name 1 -1)))
+                            ((or `?\" `?\' `?\`) (substring name 1 -1))
+                            (_ name))
                           (cdr st)))))))
       ;; We don't call perl-syntax-propertize-special-constructs directly
       ;; from the << rule, because there might be other elements (between
@@ -753,7 +748,7 @@ following list:
                (bof (perl-beginning-of-function))
                (delta (progn
                         (goto-char oldpnt)
-                        (perl-indent-line "\f\\|;?#" bof))))
+                        (perl-indent-line "\f\\|;?#"))))
           (and perl-tab-to-comment
                (= oldpnt (point))   ; done if point moved
                (if (listp delta)    ; if line starts in a quoted string
@@ -791,28 +786,23 @@ following list:
                         (ding t)))))))))
 (make-obsolete 'perl-indent-command 'indent-according-to-mode "24.4")
 
-(defun perl-indent-line (&optional nochange parse-start)
+(defun perl-indent-line (&optional nochange)
   "Indent current line as Perl code.
 Return the amount the indentation
 changed by, or (parse-state) if line starts in a quoted string."
   (let ((case-fold-search nil)
        (pos (- (point-max) (point)))
-       (bof (or parse-start (save-excursion
-                               ;; Don't consider text on this line as a
-                               ;; valid BOF from which to indent.
-                              (goto-char (line-end-position 0))
-                              (perl-beginning-of-function))))
        beg indent shift-amt)
     (beginning-of-line)
     (setq beg (point))
     (setq shift-amt
-         (cond ((eq (char-after bof) ?=) 0)
-               ((listp (setq indent (perl-calculate-indent bof))) indent)
+         (cond ((eq 1 (nth 7 (syntax-ppss))) 0) ;For doc sections!
+               ((listp (setq indent (perl-calculate-indent))) indent)
                 ((eq 'noindent indent) indent)
                ((looking-at (or nochange perl-nochange)) 0)
                (t
                 (skip-chars-forward " \t\f")
-                (setq indent (perl-indent-new-calculate nil indent bof))
+                (setq indent (perl-indent-new-calculate nil indent))
                 (- indent (current-column)))))
     (skip-chars-forward " \t\f")
     (if (and (numberp shift-amt) (/= 0 shift-amt))
@@ -824,23 +814,21 @@ changed by, or (parse-state) if line starts in a quoted string."
        (goto-char (- (point-max) pos)))
     shift-amt))
 
-(defun perl-continuation-line-p (limit)
+(defun perl-continuation-line-p ()
   "Move to end of previous line and return non-nil if continued."
   ;; Statement level.  Is it a continuation or a new statement?
   ;; Find previous non-comment character.
   (perl-backward-to-noncomment)
   ;; Back up over label lines, since they don't
   ;; affect whether our line is a continuation.
-  (while (or (eq (preceding-char) ?\,)
-            (and (eq (preceding-char) ?:)
-                 (memq (char-syntax (char-after (- (point) 2)))
-                       '(?w ?_))))
-    (if (eq (preceding-char) ?\,)
-       (perl-backward-to-start-of-continued-exp limit)
-      (beginning-of-line))
+  (while (and (eq (preceding-char) ?:)
+              (memq (char-syntax (char-after (- (point) 2)))
+                    '(?w ?_)))
+    (beginning-of-line)
     (perl-backward-to-noncomment))
   ;; Now we get the answer.
-  (not (memq (preceding-char) '(?\; ?\} ?\{))))
+  (unless (memq (preceding-char) '(?\; ?\} ?\{))
+    (preceding-char)))
 
 (defun perl-hanging-paren-p ()
   "Non-nil if we are right after a hanging parenthesis-like char."
@@ -848,173 +836,151 @@ changed by, or (parse-state) if line starts in a quoted string."
        (save-excursion
         (skip-syntax-backward " (") (not (bolp)))))
 
-(defun perl-indent-new-calculate (&optional virtual default parse-start)
+(defun perl-indent-new-calculate (&optional virtual default)
   (or
    (and virtual (save-excursion (skip-chars-backward " \t") (bolp))
        (current-column))
    (and (looking-at "\\(\\w\\|\\s_\\)+:[^:]")
-       (max 1 (+ (or default (perl-calculate-indent parse-start))
+       (max 1 (+ (or default (perl-calculate-indent))
                  perl-label-offset)))
    (and (= (char-syntax (following-char)) ?\))
        (save-excursion
          (forward-char 1)
           (when (condition-case nil (progn (forward-sexp -1) t)
                   (scan-error nil))
-            (perl-indent-new-calculate
-             ;; Recalculate the parsing-start, since we may have jumped
-             ;; dangerously close (typically in the case of nested functions).
-             'virtual nil (save-excursion (perl-beginning-of-function))))))
+            (perl-indent-new-calculate 'virtual))))
    (and (and (= (following-char) ?{)
             (save-excursion (forward-char) (perl-hanging-paren-p)))
-       (+ (or default (perl-calculate-indent parse-start))
+       (+ (or default (perl-calculate-indent))
           perl-brace-offset))
-   (or default (perl-calculate-indent parse-start))))
+   (or default (perl-calculate-indent))))
 
-(defun perl-calculate-indent (&optional parse-start)
+(defun perl-calculate-indent ()
   "Return appropriate indentation for current line as Perl code.
 In usual case returns an integer: the column to indent to.
-Returns (parse-state) if line starts inside a string.
-Optional argument PARSE-START should be the position of `beginning-of-defun'."
+Returns (parse-state) if line starts inside a string."
   (save-excursion
     (let ((indent-point (point))
          (case-fold-search nil)
          (colon-line-end 0)
+          prev-char
          state containing-sexp)
-      (if parse-start                  ;used to avoid searching
-         (goto-char parse-start)
-       (perl-beginning-of-function))
-      ;; We might be now looking at a local function that has nothing to
-      ;; do with us because `indent-point' is past it.  In this case
-      ;; look further back up for another `perl-beginning-of-function'.
-      (while (and (looking-at "{")
-                 (save-excursion
-                   (beginning-of-line)
-                   (looking-at "\\s-+sub\\>"))
-                 (> indent-point (save-excursion
-                                   (condition-case nil
-                                       (forward-sexp 1)
-                                     (scan-error nil))
-                                   (point))))
-       (perl-beginning-of-function))
-      (while (< (point) indent-point)  ;repeat until right sexp
-       (setq state (parse-partial-sexp (point) indent-point 0))
-       ;; state = (depth_in_parens innermost_containing_list
-       ;;          last_complete_sexp string_terminator_or_nil inside_commentp
-       ;;          following_quotep minimum_paren-depth_this_scan)
-       ;; Parsing stops if depth in parentheses becomes equal to third arg.
-       (setq containing-sexp (nth 1 state)))
+      (setq containing-sexp (nth 1 (syntax-ppss indent-point)))
       (cond
        ;; Don't auto-indent in a quoted string or a here-document.
        ((or (nth 3 state) (eq 2 (nth 7 state))) 'noindent)
-           ((null containing-sexp)     ; Line is at top level.
-            (skip-chars-forward " \t\f")
-            (if (memq (following-char)
-                      (if perl-indent-parens-as-block '(?\{ ?\( ?\[) '(?\{)))
-                0  ; move to beginning of line if it starts a function body
-              ;; indent a little if this is a continuation line
-              (perl-backward-to-noncomment)
-              (if (or (bobp)
-                      (memq (preceding-char) '(?\; ?\})))
-                  0 perl-continued-statement-offset)))
-           ((/= (char-after containing-sexp) ?{)
-            ;; line is expression, not statement:
-            ;; indent to just after the surrounding open.
-            (goto-char (1+ containing-sexp))
-            (if (perl-hanging-paren-p)
-                ;; We're indenting an arg of a call like:
-                ;;    $a = foobarlongnamefun (
-                ;;             arg1
-                ;;             arg2
-                ;;         );
-                (progn
-                  (skip-syntax-backward "(")
-                  (condition-case nil
-                      (while (save-excursion
-                               (skip-syntax-backward " ") (not (bolp)))
-                        (forward-sexp -1))
-                    (scan-error nil))
-                  (+ (current-column) perl-indent-level))
-              (if perl-indent-continued-arguments
-                  (+ perl-indent-continued-arguments (current-indentation))
-                (skip-chars-forward " \t")
-                (current-column))))
-           (t
-            ;; Statement level.  Is it a continuation or a new statement?
-            (if (perl-continuation-line-p containing-sexp)
-                ;; This line is continuation of preceding line's statement;
-                ;; indent  perl-continued-statement-offset  more than the
-                ;; previous line of the statement.
-                (progn
-                  (perl-backward-to-start-of-continued-exp containing-sexp)
-                  (+ (if (save-excursion
-                           (perl-continuation-line-p containing-sexp))
-                         ;; If the continued line is itself a continuation
-                         ;; line, then align, otherwise add an offset.
-                         0 perl-continued-statement-offset)
-                     (current-column)
-                     (if (save-excursion (goto-char indent-point)
-                                         (looking-at
-                                          (if perl-indent-parens-as-block
-                                              "[ \t]*[{(\[]" "[ \t]*{")))
-                         perl-continued-brace-offset 0)))
-              ;; This line starts a new statement.
-              ;; Position at last unclosed open.
-              (goto-char containing-sexp)
-              (or
-               ;; Is line first statement after an open-brace?
-               ;; If no, find that first statement and indent like it.
-               (save-excursion
-                 (forward-char 1)
-                 ;; Skip over comments and labels following openbrace.
-                 (while (progn
-                          (skip-chars-forward " \t\f\n")
-                          (cond ((looking-at ";?#")
-                                 (forward-line 1) t)
-                                ((looking-at "\\(\\w\\|\\s_\\)+:[^:]")
-                                 (setq colon-line-end (line-end-position))
-                                 (search-forward ":")))))
-                 ;; The first following code counts
-                 ;; if it is before the line we want to indent.
-                 (and (< (point) indent-point)
-                      (if (> colon-line-end (point))
-                          (- (current-indentation) perl-label-offset)
-                        (current-column))))
-               ;; If no previous statement,
-               ;; indent it relative to line brace is on.
-               ;; For open paren in column zero, don't let statement
-               ;; start there too.  If perl-indent-level is zero,
-               ;; use perl-brace-offset + perl-continued-statement-offset
-               ;; For open-braces not the first thing in a line,
-               ;; add in perl-brace-imaginary-offset.
-               (+ (if (and (bolp) (zerop perl-indent-level))
-                      (+ perl-brace-offset perl-continued-statement-offset)
-                    perl-indent-level)
-                  ;; Move back over whitespace before the openbrace.
-                  ;; If openbrace is not first nonwhite thing on the line,
-                  ;; add the perl-brace-imaginary-offset.
-                  (progn (skip-chars-backward " \t")
-                         (if (bolp) 0 perl-brace-imaginary-offset))
-                  ;; If the openbrace is preceded by a parenthesized exp,
-                  ;; move to the beginning of that;
-                  ;; possibly a different line
-                  (progn
-                    (if (eq (preceding-char) ?\))
-                        (forward-sexp -1))
-                    ;; Get initial indentation of the line we are on.
-                    (current-indentation))))))))))
+       ((null containing-sexp)          ; Line is at top level.
+        (skip-chars-forward " \t\f")
+        (if (memq (following-char)
+                  (if perl-indent-parens-as-block '(?\{ ?\( ?\[) '(?\{)))
+            0          ; move to beginning of line if it starts a function body
+          ;; indent a little if this is a continuation line
+          (perl-backward-to-noncomment)
+          (if (or (bobp)
+                  (memq (preceding-char) '(?\; ?\})))
+              0 perl-continued-statement-offset)))
+       ((/= (char-after containing-sexp) ?{)
+        ;; line is expression, not statement:
+        ;; indent to just after the surrounding open.
+        (goto-char (1+ containing-sexp))
+        (if (perl-hanging-paren-p)
+            ;; We're indenting an arg of a call like:
+            ;;    $a = foobarlongnamefun (
+            ;;             arg1
+            ;;             arg2
+            ;;         );
+            (progn
+              (skip-syntax-backward "(")
+              (condition-case nil
+                  (while (save-excursion
+                           (skip-syntax-backward " ") (not (bolp)))
+                    (forward-sexp -1))
+                (scan-error nil))
+              (+ (current-column) perl-indent-level))
+          (if perl-indent-continued-arguments
+              (+ perl-indent-continued-arguments (current-indentation))
+            (skip-chars-forward " \t")
+            (current-column))))
+       ;; Statement level.  Is it a continuation or a new statement?
+       ((setq prev-char (perl-continuation-line-p))
+        ;; This line is continuation of preceding line's statement;
+        ;; indent  perl-continued-statement-offset  more than the
+        ;; previous line of the statement.
+        (perl-backward-to-start-of-continued-exp)
+        (+ (if (or (save-excursion
+                     (perl-continuation-line-p))
+                   (and (eq prev-char ?\,)
+                        (looking-at "[[:alnum:]_]+[ \t\n]*=>")))
+               ;; If the continued line is itself a continuation
+               ;; line, then align, otherwise add an offset.
+               0 perl-continued-statement-offset)
+           (current-column)
+           (if (save-excursion (goto-char indent-point)
+                               (looking-at
+                                (if perl-indent-parens-as-block
+                                    "[ \t]*[{(\[]" "[ \t]*{")))
+               perl-continued-brace-offset 0)))
+       (t
+        ;; This line starts a new statement.
+        ;; Position at last unclosed open.
+        (goto-char containing-sexp)
+        (or
+         ;; Is line first statement after an open-brace?
+         ;; If no, find that first statement and indent like it.
+         (save-excursion
+           (forward-char 1)
+           ;; Skip over comments and labels following openbrace.
+           (while (progn
+                    (skip-chars-forward " \t\f\n")
+                    (cond ((looking-at ";?#")
+                           (forward-line 1) t)
+                          ((looking-at "\\(\\w\\|\\s_\\)+:[^:]")
+                           (setq colon-line-end (line-end-position))
+                           (search-forward ":")))))
+           ;; The first following code counts
+           ;; if it is before the line we want to indent.
+           (and (< (point) indent-point)
+                (if (> colon-line-end (point))
+                    (- (current-indentation) perl-label-offset)
+                  (current-column))))
+         ;; If no previous statement,
+         ;; indent it relative to line brace is on.
+         ;; For open paren in column zero, don't let statement
+         ;; start there too.  If perl-indent-level is zero,
+         ;; use perl-brace-offset + perl-continued-statement-offset
+         ;; For open-braces not the first thing in a line,
+         ;; add in perl-brace-imaginary-offset.
+         (+ (if (and (bolp) (zerop perl-indent-level))
+                (+ perl-brace-offset perl-continued-statement-offset)
+              perl-indent-level)
+            ;; Move back over whitespace before the openbrace.
+            ;; If openbrace is not first nonwhite thing on the line,
+            ;; add the perl-brace-imaginary-offset.
+            (progn (skip-chars-backward " \t")
+                   (if (bolp) 0 perl-brace-imaginary-offset))
+            ;; If the openbrace is preceded by a parenthesized exp,
+            ;; move to the beginning of that;
+            ;; possibly a different line
+            (progn
+              (if (eq (preceding-char) ?\))
+                  (forward-sexp -1))
+              ;; Get initial indentation of the line we are on.
+              (current-indentation)))))))))
 
 (defun perl-backward-to-noncomment ()
   "Move point backward to after the first non-white-space, skipping comments."
-  (interactive)
   (forward-comment (- (point-max))))
 
-(defun perl-backward-to-start-of-continued-exp (lim)
-  (if (= (preceding-char) ?\))
-      (forward-sexp -1))
-  (beginning-of-line)
-  (if (<= (point) lim)
-      (goto-char (1+ lim)))
-  (skip-chars-forward " \t\f"))
+(defun perl-backward-to-start-of-continued-exp ()
+  (while
+      (let ((c (preceding-char)))
+      (cond
+        ((memq c '(?\; ?\{ ?\[ ?\()) (forward-comment (point-max)) nil)
+        ((memq c '(?\) ?\] ?\} ?\"))
+         (forward-sexp -1) (forward-comment (- (point))) t)
+        ((eq ?w (char-syntax c))
+         (forward-word -1) (forward-comment (- (point))) t)
+        (t (forward-char -1) (forward-comment (- (point))) t)))))
 \f
 ;; note: this may be slower than the c-mode version, but I can understand it.
 (defalias 'indent-perl-exp 'perl-indent-exp)
@@ -1039,7 +1005,7 @@ Optional argument PARSE-START should be the position of `beginning-of-defun'."
       (setq lsexp-mark bof-mark)
       (beginning-of-line)
       (while (< (point) (marker-position last-mark))
-       (setq delta (perl-indent-line nil (marker-position bof-mark)))
+       (setq delta (perl-indent-line nil))
        (if (numberp delta)             ; unquoted start-of-line?
            (progn
              (if (eolp)
index 407466932d9cf049daf7d916137939dd81aa9b46..5037020f94e403bc9c5753741bde3cff5d204f92 100644 (file)
   "Generic programming mode, from which others derive."
   :group 'languages)
 
+(defcustom prog-mode-hook nil
+  "Normal hook run when entering programming modes."
+  :type 'hook
+  :options '(flyspell-prog-mode abbrev-mode flymake-mode linum-mode
+                                prettify-symbols-mode)
+  :group 'prog-mode)
+
 (defvar prog-mode-map
   (let ((map (make-sparse-keymap)))
     (define-key map [?\C-\M-q] 'prog-indent-sexp)
@@ -116,7 +123,7 @@ support it."
         (font-lock-add-keywords nil prettify-symbols--keywords)
         (setq-local font-lock-extra-managed-props
                     (cons 'composition font-lock-extra-managed-props))
-        (font-lock-fontify-buffer))
+        (font-lock-flush))
     ;; Turn off
     (when prettify-symbols--keywords
       (font-lock-remove-keywords nil prettify-symbols--keywords)
index 42904720d6336450977a1e895c82cbc138d54e70..3f98708e2e326029fd6de242812588b81b87475f 100644 (file)
@@ -3342,8 +3342,6 @@ PREFIX is the prefix of the search regexp."
     ["Mark clause" prolog-mark-clause t]
     ["Mark predicate" prolog-mark-predicate t]
     ["Mark paragraph" mark-paragraph t]
-    ;;"---"
-    ;;["Fontify buffer" font-lock-fontify-buffer t]
     ))
 
 (defun prolog-menu ()
index f7de331f73bfc45b98c5248518615115e66832b4..7cf53cbe45cadf51df1a88052e8ea3fef7371701 100644 (file)
@@ -41,6 +41,7 @@
 
 (require 'comint)
 (require 'easymenu)
+(require 'smie)
 
 ;; Define core `PostScript' group.
 (defgroup PostScript nil
 
 ;; User variables.
 
-(defcustom ps-mode-auto-indent t
-  "Should we use autoindent?"
-  :group 'PostScript-edit
-  :type 'boolean)
+(make-obsolete-variable 'ps-mode-auto-indent 'electric-indent-mode "24.5")
 
 (defcustom ps-mode-tab 4
   "Number of spaces to use when indenting."
@@ -204,7 +202,7 @@ If nil, use `temporary-file-directory'."
               "bind" "null"
               "gsave" "grestore" "grestoreall"
               "showpage")))
-    (concat "\\<" (regexp-opt ops t) "\\>"))
+    (concat "\\_<" (regexp-opt ops t) "\\_>"))
   "Regexp of PostScript operators that will be fontified.")
 
 ;; Level 1 font-lock:
@@ -214,13 +212,9 @@ If nil, use `temporary-file-directory'."
 ;;  - 8bit characters (warning face)
 ;; Multiline strings are not supported. Strings with nested brackets are.
 (defconst ps-mode-font-lock-keywords-1
-  '(("\\`%!PS.*" . font-lock-constant-face)
+  '(("\\`%!PS.*" (0 font-lock-constant-face t))
     ("^%%BoundingBox:[ \t]+-?[0-9]+[ \t]+-?[0-9]+[ \t]+-?[0-9]+[ \t]+-?[0-9]+[ \t]*$"
-     . font-lock-constant-face)
-    (ps-mode-match-string-or-comment
-     (1 font-lock-comment-face nil t)
-     (2 font-lock-string-face nil t))
-    ("([^()\n%]*\\|[^()\n]*)" . font-lock-warning-face)
+     (0 font-lock-constant-face t))
     ("[\200-\377]+" (0 font-lock-warning-face prepend nil)))
   "Subdued level highlighting for PostScript mode.")
 
@@ -255,19 +249,17 @@ If nil, use `temporary-file-directory'."
 ;; Names are fontified before PostScript operators, allowing the use of
 ;; a more simple (efficient) regexp than the one used in level 2.
 (defconst ps-mode-font-lock-keywords-3
-  (append
-   ps-mode-font-lock-keywords-1
-   (list
-    '("//\\w+" . font-lock-type-face)
-    `(,(concat
-       "^\\(/\\w+\\)\\>"
-       "\\([[ \t]*\\(%.*\\)?\r?$"      ; Nothing but `[' or comment after the name.
-       "\\|[ \t]*\\({\\|<<\\)"         ; `{' or `<<' following the name.
-       "\\|[ \t]+[0-9]+[ \t]+dict\\>"  ; `[0-9]+ dict' following the name.
-       "\\|.*\\<def\\>\\)")            ; `def' somewhere on the same line.
-      . (1 font-lock-function-name-face))
-    '("/\\w+" . font-lock-variable-name-face)
-    (cons ps-mode-operators 'font-lock-keyword-face)))
+  `(,@ps-mode-font-lock-keywords-1
+    ("//\\(?:\\sw\\|\\s_\\)+" . font-lock-type-face)
+    (,(concat
+       "^\\(/\\(?:\\sw\\|\\s_\\)+\\)\\_>"
+       "\\([[ \t]*\\(%.*\\)?\r?$"  ; Nothing but `[' or comment after the name.
+       "\\|[ \t]*\\({\\|<<\\)"     ; `{' or `<<' following the name.
+       "\\|[ \t]+[0-9]+[ \t]+dict\\_>" ; `[0-9]+ dict' following the name.
+       "\\|.*\\_<def\\_>\\)")          ; `def' somewhere on the same line.
+     . (1 font-lock-function-name-face))
+    ("/\\(?:\\sw\\|\\s_\\)+" . font-lock-variable-name-face)
+    (,ps-mode-operators . font-lock-keyword-face))
   "High level highlighting for PostScript mode.")
 
 (defconst ps-mode-font-lock-keywords ps-mode-font-lock-keywords-1
@@ -289,13 +281,68 @@ If nil, use `temporary-file-directory'."
 \f
 ;; Variables.
 
-(defvar ps-mode-map nil
+(defvar ps-mode-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map "\C-c\C-v" 'ps-run-boundingbox)
+    (define-key map "\C-c\C-u" 'ps-mode-uncomment-region)
+    (define-key map "\C-c\C-t" 'ps-mode-epsf-rich)
+    (define-key map "\C-c\C-s" 'ps-run-start)
+    (define-key map "\C-c\C-r" 'ps-run-region)
+    (define-key map "\C-c\C-q" 'ps-run-quit)
+    (define-key map "\C-c\C-p" 'ps-mode-print-buffer)
+    (define-key map "\C-c\C-o" 'ps-mode-comment-out-region)
+    (define-key map "\C-c\C-k" 'ps-run-kill)
+    (define-key map "\C-c\C-j" 'ps-mode-other-newline)
+    (define-key map "\C-c\C-l" 'ps-run-clear)
+    (define-key map "\C-c\C-b" 'ps-run-buffer)
+    ;; FIXME: Add `indent' to backward-delete-char-untabify-method instead?
+    (define-key map "\177" 'ps-mode-backward-delete-char)
+    map)
   "Local keymap to use in PostScript mode.")
 
-(defvar ps-mode-syntax-table nil
+(defvar ps-mode-syntax-table
+  (let ((st (make-syntax-table)))
+
+    (modify-syntax-entry ?\% "< " st)
+    (modify-syntax-entry ?\n "> " st)
+    (modify-syntax-entry ?\r "> " st)
+    (modify-syntax-entry ?\f "> " st)
+    (modify-syntax-entry ?\< "(>" st)
+    (modify-syntax-entry ?\> ")<" st)
+
+    (modify-syntax-entry ?\! "_ " st)
+    (modify-syntax-entry ?\" "_ " st)
+    (modify-syntax-entry ?\# "_ " st)
+    (modify-syntax-entry ?\$ "_ " st)
+    (modify-syntax-entry ?\& "_ " st)
+    (modify-syntax-entry ?\' "_ " st)
+    (modify-syntax-entry ?\* "_ " st)
+    (modify-syntax-entry ?\+ "_ " st)
+    (modify-syntax-entry ?\, "_ " st)
+    (modify-syntax-entry ?\- "_ " st)
+    (modify-syntax-entry ?\. "_ " st)
+    (modify-syntax-entry ?\: "_ " st)
+    (modify-syntax-entry ?\; "_ " st)
+    (modify-syntax-entry ?\= "_ " st)
+    (modify-syntax-entry ?\? "_ " st)
+    (modify-syntax-entry ?\@ "_ " st)
+    (modify-syntax-entry ?\\ "\\" st)
+    (modify-syntax-entry ?^  "_ " st)   ; NOT: ?\^
+    (modify-syntax-entry ?\_ "_ " st)
+    (modify-syntax-entry ?\` "_ " st)
+    (modify-syntax-entry ?\| "_ " st)
+    (modify-syntax-entry ?\~ "_ " st)
+    st)
   "Syntax table used while in PostScript mode.")
 
-(defvar ps-run-mode-map nil
+(defvar ps-run-mode-map
+  (let ((map (make-sparse-keymap)))
+    (set-keymap-parent map comint-mode-map)
+    (define-key map "\C-c\C-q" 'ps-run-quit)
+    (define-key map "\C-c\C-k" 'ps-run-kill)
+    (define-key map "\C-c\C-e" 'ps-run-goto-error)
+    (define-key map [mouse-2] 'ps-run-mouse-goto-error)
+    map)
   "Local keymap to use in PostScript run mode.")
 
 (defvar ps-mode-tmp-file nil
@@ -365,9 +412,6 @@ If nil, use `temporary-file-directory'."
     ["8-bit to Octal Buffer" ps-mode-octal-buffer t]
     ["8-bit to Octal Region" ps-mode-octal-region (mark t)]
     "---"
-    ["Auto Indent" (setq ps-mode-auto-indent (not ps-mode-auto-indent))
-     :style toggle :selected ps-mode-auto-indent]
-    "---"
     ["Start PostScript"
      ps-run-start
      t]
@@ -404,79 +448,7 @@ If nil, use `temporary-file-directory'."
      ps-mode-submit-bug-report
      t]))
 
-\f
-;; Mode maps for PostScript edit mode and PostScript interaction mode.
-
-(unless ps-mode-map
-  (setq ps-mode-map (make-sparse-keymap))
-  (define-key ps-mode-map "\C-c\C-v" 'ps-run-boundingbox)
-  (define-key ps-mode-map "\C-c\C-u" 'ps-mode-uncomment-region)
-  (define-key ps-mode-map "\C-c\C-t" 'ps-mode-epsf-rich)
-  (define-key ps-mode-map "\C-c\C-s" 'ps-run-start)
-  (define-key ps-mode-map "\C-c\C-r" 'ps-run-region)
-  (define-key ps-mode-map "\C-c\C-q" 'ps-run-quit)
-  (define-key ps-mode-map "\C-c\C-p" 'ps-mode-print-buffer)
-  (define-key ps-mode-map "\C-c\C-o" 'ps-mode-comment-out-region)
-  (define-key ps-mode-map "\C-c\C-k" 'ps-run-kill)
-  (define-key ps-mode-map "\C-c\C-j" 'ps-mode-other-newline)
-  (define-key ps-mode-map "\C-c\C-l" 'ps-run-clear)
-  (define-key ps-mode-map "\C-c\C-b" 'ps-run-buffer)
-  (define-key ps-mode-map ">" 'ps-mode-r-gt)
-  (define-key ps-mode-map "]" 'ps-mode-r-angle)
-  (define-key ps-mode-map "}" 'ps-mode-r-brace)
-  (define-key ps-mode-map "\177" 'ps-mode-backward-delete-char)
-  (define-key ps-mode-map "\t" 'ps-mode-tabkey)
-  (define-key ps-mode-map "\r" 'ps-mode-newline)
-  (easy-menu-define ps-mode-main ps-mode-map "PostScript" ps-mode-menu-main))
-
-(unless ps-run-mode-map
-  (setq ps-run-mode-map (make-sparse-keymap))
-  (set-keymap-parent ps-run-mode-map comint-mode-map)
-  (define-key ps-run-mode-map "\C-c\C-q" 'ps-run-quit)
-  (define-key ps-run-mode-map "\C-c\C-k" 'ps-run-kill)
-  (define-key ps-run-mode-map "\C-c\C-e" 'ps-run-goto-error)
-  (define-key ps-run-mode-map [mouse-2] 'ps-run-mouse-goto-error))
-
-\f
-;; Syntax table.
-
-(unless ps-mode-syntax-table
-  (setq ps-mode-syntax-table (make-syntax-table))
-
-  (modify-syntax-entry ?\% "< " ps-mode-syntax-table)
-  (modify-syntax-entry ?\n "> " ps-mode-syntax-table)
-  (modify-syntax-entry ?\r "> " ps-mode-syntax-table)
-  (modify-syntax-entry ?\f "> " ps-mode-syntax-table)
-  (modify-syntax-entry ?\< "(>" ps-mode-syntax-table)
-  (modify-syntax-entry ?\> ")<" ps-mode-syntax-table)
-
-  (modify-syntax-entry ?\! "w " ps-mode-syntax-table)
-  (modify-syntax-entry ?\" "w " ps-mode-syntax-table)
-  (modify-syntax-entry ?\# "w " ps-mode-syntax-table)
-  (modify-syntax-entry ?\$ "w " ps-mode-syntax-table)
-  (modify-syntax-entry ?\& "w " ps-mode-syntax-table)
-  (modify-syntax-entry ?\' "w " ps-mode-syntax-table)
-  (modify-syntax-entry ?\* "w " ps-mode-syntax-table)
-  (modify-syntax-entry ?\+ "w " ps-mode-syntax-table)
-  (modify-syntax-entry ?\, "w " ps-mode-syntax-table)
-  (modify-syntax-entry ?\- "w " ps-mode-syntax-table)
-  (modify-syntax-entry ?\. "w " ps-mode-syntax-table)
-  (modify-syntax-entry ?\: "w " ps-mode-syntax-table)
-  (modify-syntax-entry ?\; "w " ps-mode-syntax-table)
-  (modify-syntax-entry ?\= "w " ps-mode-syntax-table)
-  (modify-syntax-entry ?\? "w " ps-mode-syntax-table)
-  (modify-syntax-entry ?\@ "w " ps-mode-syntax-table)
-  (modify-syntax-entry ?\\ "w " ps-mode-syntax-table)
-  (modify-syntax-entry ?^  "w " ps-mode-syntax-table) ; NOT: ?\^
-  (modify-syntax-entry ?\_ "w " ps-mode-syntax-table)
-  (modify-syntax-entry ?\` "w " ps-mode-syntax-table)
-  (modify-syntax-entry ?\| "w " ps-mode-syntax-table)
-  (modify-syntax-entry ?\~ "w " ps-mode-syntax-table)
-
-  (let ((i 128))
-    (while (< i 256)
-      (modify-syntax-entry i "w " ps-mode-syntax-table)
-      (setq i (1+ i)))))
+(easy-menu-define ps-mode-main ps-mode-map "PostScript" ps-mode-menu-main)
 
 \f
 
@@ -484,6 +456,13 @@ If nil, use `temporary-file-directory'."
 
 ;; PostScript mode.
 
+(defun ps-mode-smie-rules (kind token)
+  (pcase (cons kind token)
+    (`(:after . "<") (when (smie-rule-next-p "<") 0))
+    (`(:elem . basic) ps-mode-tab)
+    (`(:close-all . ">") t)
+    (`(:list-intro . ,_) t)))
+
 ;;;###autoload
 (define-derived-mode ps-mode prog-mode "PostScript"
   "Major mode for editing PostScript with GNU Emacs.
@@ -493,7 +472,6 @@ Entry to this mode calls `ps-mode-hook'.
 The following variables hold user options, and can
 be set through the `customize' command:
 
-  `ps-mode-auto-indent'
   `ps-mode-tab'
   `ps-mode-paper-size'
   `ps-mode-print-function'
@@ -523,12 +501,16 @@ with a file position. Clicking mouse-2 on this number will bring
 point to the corresponding spot in the PostScript window, if input
 to the interpreter was sent from that window.
 Typing \\<ps-run-mode-map>\\[ps-run-goto-error] when the cursor is at the number has the same effect."
+  (setq-local syntax-propertize-function #'ps-mode-syntax-propertize)
   (set (make-local-variable 'font-lock-defaults)
        '((ps-mode-font-lock-keywords
          ps-mode-font-lock-keywords-1
          ps-mode-font-lock-keywords-2
          ps-mode-font-lock-keywords-3)
-        t))
+        nil))
+  (smie-setup nil #'ps-mode-smie-rules)
+  (setq-local electric-indent-chars
+              (append '(?> ?\] ?\}) electric-indent-chars))
   (set (make-local-variable 'comment-start) "%")
   ;; NOTE: `\' has a special meaning in strings only
   (set (make-local-variable 'comment-start-skip) "%+[ \t]*")
@@ -555,8 +537,7 @@ Typing \\<ps-run-mode-map>\\[ps-run-goto-error] when the cursor is at the number
       (reporter-submit-bug-report
        ps-mode-maintainer-address
        (format "ps-mode.el %s [%s]" ps-mode-version system-type)
-       '(ps-mode-auto-indent
-        ps-mode-tab
+       '(ps-mode-tab
         ps-mode-paper-size
         ps-mode-print-function
         ps-run-prompt
@@ -570,53 +551,54 @@ Typing \\<ps-run-mode-map>\\[ps-run-goto-error] when the cursor is at the number
 \f
 ;; Helper functions for font-lock.
 
-;; When this function is called, point is at an opening bracket.
-;; This function should test if point is at the start of a string
-;; with nested brackets.
-;; If true:  move point to end of string
-;;           set string to match data nr 2
-;;           return new point
-;; If false: return nil
-(defun ps-mode-looking-at-nested (limit)
-  (let ((first (point))
-       (level 1)
-       pos)
-    ;; Move past opening bracket.
-    (forward-char 1)
-    (setq pos (point))
-    (while (and (> level 0) (< pos limit))
-      ;; Search next bracket, stepping over escaped brackets.
-      (if (not (looking-at "\\([^()\\\n]\\|\\\\.\\)*\\([()]\\)"))
-          (setq level -1)
-       (setq level (+ level (if (string= "(" (match-string 2)) 1 -1)))
-       (goto-char (setq pos (match-end 0)))))
-    (if (not (= level 0))
-        nil
-      ;; Found string with nested brackets, now set match data nr 2.
-      (set-match-data (list first pos nil nil first pos))
-      pos)))
-
-;; This function should search for a string or comment
-;; If comment, return as match data nr 1
-;; If string, return as match data nr 2
-(defun ps-mode-match-string-or-comment (limit)
-  ;; Find the first potential match.
-  (if (not (re-search-forward "[%(]" limit t))
-      ;; Nothing found: return failure.
-      nil
-    (let ((end (match-end 0)))
-      (goto-char (match-beginning 0))
-      (cond ((looking-at "\\(%.*\\)\\|\\((\\([^()\\\n]\\|\\\\.\\)*)\\)")
-            ;; It's a comment or string without nested, unescaped brackets.
-            (goto-char (match-end 0))
-            (point))
-           ((ps-mode-looking-at-nested limit)
-            ;; It's a string with nested brackets.
-            (point))
-           (t
-            ;; Try next match.
-            (goto-char end)
-            (ps-mode-match-string-or-comment limit))))))
+(defconst ps-mode--string-syntax-table
+  (let ((st (make-syntax-table ps-mode-syntax-table)))
+    (modify-syntax-entry ?% "." st)
+    (modify-syntax-entry ?< "." st)
+    (modify-syntax-entry ?> "." st)
+    (modify-syntax-entry ?\{ "." st)
+    (modify-syntax-entry ?\} "." st)
+    (modify-syntax-entry ?\[ "." st)
+    (modify-syntax-entry ?\] "." st)
+    st))
+
+(defun ps-mode--syntax-propertize-special (end)
+  (let ((ppss (syntax-ppss))
+        char)
+    (cond
+     ((not (nth 3 ppss)))          ;Not in (...), <~..base85..~>, or <..hex..>.
+     ((eq ?\( (setq char (char-after (nth 8 ppss))))
+      (save-restriction
+        (narrow-to-region (point-min) end)
+        (goto-char (nth 8 ppss))
+        (condition-case nil
+            (with-syntax-table ps-mode--string-syntax-table
+              (let ((parse-sexp-lookup-properties nil))
+                (forward-sexp 1))
+              (put-text-property (1- (point)) (point)
+                                 'syntax-table (string-to-syntax "|")))
+          (scan-error (goto-char end)))))
+     ((eq char ?<)
+      (when (re-search-forward (if (eq ?~ (char-after (1+ (nth 8 ppss))))
+                                   "~>" ">")
+                               end 'move)
+        (put-text-property (1- (point)) (point)
+                           'syntax-table (string-to-syntax "|")))))))
+
+(defun ps-mode-syntax-propertize (start end)
+  (goto-char start)
+  (ps-mode--syntax-propertize-special end)
+  (funcall
+   (syntax-propertize-rules
+    ("\\(<\\)\\(?:~\\|[ \n\t]*[[:xdigit:]]\\)\\|\\(?1:(\\)"
+     (1 (unless (or (eq (char-after (match-beginning 0))
+                        (char-before (match-beginning 0))) ;Avoid "<<".
+                    (nth 8 (save-excursion (syntax-ppss (match-beginning 1)))))
+          (put-text-property (match-beginning 1) (match-end 1)
+                             'syntax-table (string-to-syntax "|"))
+          (ps-mode--syntax-propertize-special end)
+          nil))))
+   (point) end))
 
 \f
 ;; Key-handlers.
@@ -654,34 +636,12 @@ defines the beginning of a group. These tokens are:  {  [  <<"
              (setq target (+ target ps-mode-tab)))
          target)))))
 
-(defun ps-mode-newline ()
-  "Insert newline with proper indentation."
-  (interactive)
-  (delete-horizontal-space)
-  (insert "\n")
-  (if ps-mode-auto-indent
-      (indent-to (ps-mode-target-column))))
-
-(defun ps-mode-tabkey ()
-  "Indent/reindent current line, or insert tab."
-  (interactive)
-  (let ((column (current-column))
-       target)
-    (if (or (not ps-mode-auto-indent)
-           (< ps-mode-tab 1)
-           (not (re-search-backward "^[ \t]*\\=" nil t)))
-       (insert "\t")
-      (setq target (ps-mode-target-column))
-      (while (<= target column)
-       (setq target (+ target ps-mode-tab)))
-      (indent-line-to target))))
-
 (defun ps-mode-backward-delete-char ()
   "Delete backward indentation, or delete backward character."
   (interactive)
   (let ((column (current-column))
        target)
-    (if (or (not ps-mode-auto-indent)
+    (if (or (not electric-indent-mode)
            (< ps-mode-tab 1)
            (not (re-search-backward "^[ \t]+\\=" nil t)))
        (call-interactively 'delete-backward-char)
@@ -694,32 +654,6 @@ defines the beginning of a group. These tokens are:  {  [  <<"
          (setq target 0))
       (indent-line-to target))))
 
-(defun ps-mode-r-brace ()
-  "Insert `}' and perform balance."
-  (interactive)
-  (insert "}")
-  (ps-mode-r-balance "}"))
-
-(defun ps-mode-r-angle ()
-  "Insert `]' and perform balance."
-  (interactive)
-  (insert "]")
-  (ps-mode-r-balance "]"))
-
-(defun ps-mode-r-gt ()
-  "Insert `>' and perform balance."
-  (interactive)
-  (insert ">")
-  (ps-mode-r-balance ">>"))
-
-(defun ps-mode-r-balance (right)
-  "Adjust indenting if point after RIGHT."
-  (if ps-mode-auto-indent
-      (save-excursion
-       (when (re-search-backward (concat "^[ \t]*" (regexp-quote right) "\\=") nil t)
-         (indent-line-to (ps-mode-target-column)))))
-  (blink-matching-open))
-
 (defun ps-mode-other-newline ()
   "Perform newline in `*ps-run*' buffer."
   (interactive)
index a564acc3075eebd3f6ba4bfd4c6709530f74aa23..b230992fc98fcf5e061b28aa39910433e4564756 100644 (file)
@@ -31,9 +31,9 @@
 ;; found in GNU/Emacs.
 
 ;; Implements Syntax highlighting, Indentation, Movement, Shell
-;; interaction, Shell completion, Shell virtualenv support, Pdb
-;; tracking, Symbol completion, Skeletons, FFAP, Code Check, Eldoc,
-;; Imenu.
+;; interaction, Shell completion, Shell virtualenv support, Shell
+;; package support, Shell syntax highlighting, Pdb tracking, Symbol
+;; completion, Skeletons, FFAP, Code Check, Eldoc, Imenu.
 
 ;; Syntax highlighting: Fontification of code is provided and supports
 ;; python's triple quoted strings properly.
 ;; introduced as simple way of adding paths to the PYTHONPATH without
 ;; affecting existing values.
 
+;; Shell package support: you can enable a package in the current
+;; shell so that relative imports work properly using the
+;; `python-shell-package-enable' command.
+
+;; Shell syntax highlighting: when enabled current input in shell is
+;; highlighted.  The variable `python-shell-font-lock-enable' controls
+;; activation of this feature globally when shells are started.
+;; Activation/deactivation can be also controlled on the fly via the
+;; `python-shell-font-lock-toggle' command.
+
 ;; Pdb tracking: when you execute a block of code that contains some
 ;; call to pdb (or ipdb) it will prompt the block of code and will
 ;; follow the execution of pdb marking the current line with an arrow.
 ;; the shell completion in background so you should run
 ;; `python-shell-send-buffer' from time to time to get better results.
 
-;; Skeletons: 6 skeletons are provided for simple inserting of class,
-;; def, for, if, try and while.  These skeletons are integrated with
-;; abbrev.  If you have `abbrev-mode' activated and
+;; Skeletons: skeletons are provided for simple inserting of things like class,
+;; def, for, import, if, try, and while.  These skeletons are
+;; integrated with abbrev.  If you have `abbrev-mode' activated and
 ;; `python-skeleton-autoinsert' is set to t, then whenever you type
 ;; the name of any of those defined and hit SPC, they will be
 ;; automatically expanded.  As an alternative you can use the defined
-;; skeleton commands: `python-skeleton-class', `python-skeleton-def'
-;; `python-skeleton-for', `python-skeleton-if', `python-skeleton-try'
-;; and `python-skeleton-while'.
+;; skeleton commands: `python-skeleton-<foo>'.
 
 ;; FFAP: You can find the filename for a given module when using ffap
 ;; out of the box.  This feature needs an inferior python shell
     (define-key map "\C-c\C-td" 'python-skeleton-def)
     (define-key map "\C-c\C-tf" 'python-skeleton-for)
     (define-key map "\C-c\C-ti" 'python-skeleton-if)
+    (define-key map "\C-c\C-tm" 'python-skeleton-import)
     (define-key map "\C-c\C-tt" 'python-skeleton-try)
     (define-key map "\C-c\C-tw" 'python-skeleton-while)
     ;; Shell interaction
@@ -536,7 +545,7 @@ The type returned can be `comment', `string' or `paren'."
               (res nil))
           (while (and (setq res (re-search-forward re limit t))
                       (or (python-syntax-context 'paren)
-                          (equal (char-after (point-marker)) ?=))))
+                          (equal (char-after (point)) ?=))))
           res))
      (1 font-lock-variable-name-face nil nil))
     ;; support for a, b, c = (1, 2, 3)
@@ -1033,9 +1042,9 @@ See `python-indent-line' for details."
   "De-indent current line."
   (interactive "*")
   (when (and (not (python-syntax-comment-or-string-p))
-             (<= (point-marker) (save-excursion
+             (<= (point) (save-excursion
                                   (back-to-indentation)
-                                  (point-marker)))
+                           (point)))
              (> (current-column) 0))
     (python-indent-line t)
     t))
@@ -1102,12 +1111,10 @@ any lines in the region are indented less than COUNT columns."
         (while (< (point) end)
           (if (and (< (current-indentation) count)
                    (not (looking-at "[ \t]*$")))
-              (error "Can't shift all lines enough"))
+              (user-error "Can't shift all lines enough"))
           (forward-line))
         (indent-rigidly start end (- count))))))
 
-(add-to-list 'debug-ignored-errors "^Can't shift all lines enough")
-
 (defun python-indent-shift-right (start end &optional count)
   "Shift lines contained in region START END by COUNT columns to the right.
 COUNT defaults to `python-indent-offset'.  If region isn't
@@ -1757,6 +1764,7 @@ position, else returns nil."
 (defcustom python-shell-prompt-input-regexps
   '(">>> " "\\.\\.\\. "                 ; Python
     "In \\[[0-9]+\\]: "                 ; IPython
+    "   \\.\\.\\.: "                    ; IPython
     ;; Using ipdb outside IPython may fail to cleanup and leave static
     ;; IPython prompts activated, this adds some safeguard for that.
     "In : " "\\.\\.\\.: ")
@@ -1792,7 +1800,10 @@ It should not contain a caret (^) at the beginning."
 It should not contain a caret (^) at the beginning."
   :type 'string)
 
-(defcustom python-shell-enable-font-lock t
+(define-obsolete-variable-alias
+  'python-shell-enable-font-lock 'python-shell-font-lock-enable "25.1")
+
+(defcustom python-shell-font-lock-enable t
   "Should syntax highlighting be enabled in the Python shell buffer?
 Restart the Python shell after changing this variable for it to take effect."
   :type 'boolean
@@ -1928,7 +1939,9 @@ detection and just returns nil."
               nil)))
       (when (and (not prompts)
                  python-shell-prompt-detect-failure-warning)
-        (warn
+        (lwarn
+         '(python python-shell-prompt-regexp)
+         :warning
          (concat
           "Python shell prompts cannot be detected.\n"
           "If your emacs session hangs when starting python shells\n"
@@ -2065,6 +2078,16 @@ uniqueness for different types of configurations."
             (executable-find python-shell-interpreter)
             python-shell-interpreter-args)))
 
+(defun python-new-pythonpath ()
+  "Calculate the new PYTHONPATH value from `python-shell-extra-pythonpaths'."
+  (let ((pythonpath (getenv "PYTHONPATH"))
+        (extra (mapconcat 'identity
+                          python-shell-extra-pythonpaths
+                          path-separator)))
+    (if pythonpath
+        (concat extra path-separator pythonpath)
+      extra)))
+
 (defun python-shell-calculate-process-environment ()
   "Calculate process environment given `python-shell-virtualenv-path'."
   (let ((process-environment (append
@@ -2074,13 +2097,7 @@ uniqueness for different types of configurations."
                         (directory-file-name python-shell-virtualenv-path)
                       nil)))
     (when python-shell-extra-pythonpaths
-      (setenv "PYTHONPATH"
-              (format "%s%s%s"
-                      (mapconcat 'identity
-                                 python-shell-extra-pythonpaths
-                                 path-separator)
-                      path-separator
-                      (or (getenv "PYTHONPATH") ""))))
+      (setenv "PYTHONPATH" (python-new-pythonpath)))
     (if (not virtualenv)
         process-environment
       (setenv "PYTHONHOME" nil)
@@ -2099,26 +2116,242 @@ uniqueness for different types of configurations."
       (cons (expand-file-name "bin" python-shell-virtualenv-path)
             path))))
 
-(defun python-comint-output-filter-function (output)
-  "Hook run after content is put into comint buffer.
-OUTPUT is a string with the contents of the buffer."
-  (ansi-color-filter-apply output))
+(defvar python-shell--package-depth 10)
+
+(defun python-shell-package-enable (directory package)
+  "Add DIRECTORY parent to $PYTHONPATH and enable PACKAGE."
+  (interactive
+   (let* ((dir (expand-file-name
+                (read-directory-name
+                 "Package root: "
+                 (file-name-directory
+                  (or (buffer-file-name) default-directory)))))
+          (name (completing-read
+                 "Package: "
+                 (python-util-list-packages
+                  dir python-shell--package-depth))))
+     (list dir name)))
+  (python-shell-send-string
+   (format
+    (concat
+     "import os.path;import sys;"
+     "sys.path.append(os.path.dirname(os.path.dirname('''%s''')));"
+     "__package__ = '''%s''';"
+     "import %s")
+    directory package package)
+   (python-shell-get-process)))
+
+(defun python-shell-accept-process-output (process &optional timeout regexp)
+  "Accept PROCESS output with TIMEOUT until REGEXP is found.
+Optional argument TIMEOUT is the timeout argument to
+`accept-process-output' calls.  Optional argument REGEXP
+overrides the regexp to match the end of output, defaults to
+`comint-prompt-regexp.'.  Returns non-nil when output was
+properly captured.
+
+This utility is useful in situations where the output may be
+received in chunks, since `accept-process-output' gives no
+guarantees they will be grabbed in a single call.  An example use
+case for this would be the CPython shell start-up, where the
+banner and the initial prompt are received separately."
+  (let ((regexp (or regexp comint-prompt-regexp)))
+    (catch 'found
+      (while t
+        (when (not (accept-process-output process timeout))
+          (throw 'found nil))
+        (when (looking-back regexp)
+          (throw 'found t))))))
+
+(defun python-shell-comint-end-of-output-p (output)
+  "Return non-nil if OUTPUT is ends with input prompt."
+  (string-match
+   ;; XXX: It seems on OSX an extra carriage return is attached
+   ;; at the end of output, this handles that too.
+   (concat
+    "\r?\n?"
+    ;; Remove initial caret from calculated regexp
+    (replace-regexp-in-string
+     (rx string-start ?^) ""
+     python-shell--prompt-calculated-input-regexp)
+    (rx eos))
+   output))
+
+(define-obsolete-function-alias
+  'python-comint-output-filter-function
+  'ansi-color-filter-apply
+  "25.1")
+
+(defun python-comint-postoutput-scroll-to-bottom (output)
+  "Faster version of `comint-postoutput-scroll-to-bottom'.
+Avoids `recenter' calls until OUTPUT is completely sent."
+  (when (and (not (string= "" output))
+             (python-shell-comint-end-of-output-p
+              (ansi-color-filter-apply output)))
+    (comint-postoutput-scroll-to-bottom output))
+  output)
 
 (defvar python-shell--parent-buffer nil)
 
-(defvar python-shell-output-syntax-table
-  (let ((table (make-syntax-table python-dotty-syntax-table)))
-    (modify-syntax-entry ?\' "." table)
-    (modify-syntax-entry ?\" "." table)
-    (modify-syntax-entry ?\( "." table)
-    (modify-syntax-entry ?\[ "." table)
-    (modify-syntax-entry ?\{ "." table)
-    (modify-syntax-entry ?\) "." table)
-    (modify-syntax-entry ?\] "." table)
-    (modify-syntax-entry ?\} "." table)
-    table)
-  "Syntax table for shell output.
-It makes parens and quotes be treated as punctuation chars.")
+(defmacro python-shell-with-shell-buffer (&rest body)
+  "Execute the forms in BODY with the shell buffer temporarily current.
+Signals an error if no shell buffer is available for current buffer."
+  (declare (indent 0) (debug t))
+  (let ((shell-buffer (make-symbol "shell-buffer")))
+    `(let ((,shell-buffer (python-shell-get-buffer)))
+       (when (not ,shell-buffer)
+         (error "No inferior Python buffer available."))
+       (with-current-buffer ,shell-buffer
+         ,@body))))
+
+(defvar python-shell--font-lock-buffer nil)
+
+(defun python-shell-font-lock-get-or-create-buffer ()
+  "Get or create a font-lock buffer for current inferior process."
+  (python-shell-with-shell-buffer
+    (if python-shell--font-lock-buffer
+        python-shell--font-lock-buffer
+      (let ((process-name
+             (process-name (get-buffer-process (current-buffer)))))
+        (generate-new-buffer
+         (format "*%s-font-lock*" process-name))))))
+
+(defun python-shell-font-lock-kill-buffer ()
+  "Kill the font-lock buffer safely."
+  (python-shell-with-shell-buffer
+    (when (and python-shell--font-lock-buffer
+               (buffer-live-p python-shell--font-lock-buffer))
+      (kill-buffer python-shell--font-lock-buffer)
+      (when (eq major-mode 'inferior-python-mode)
+        (setq python-shell--font-lock-buffer nil)))))
+
+(defmacro python-shell-font-lock-with-font-lock-buffer (&rest body)
+  "Execute the forms in BODY in the font-lock buffer.
+The value returned is the value of the last form in BODY.  See
+also `with-current-buffer'."
+  (declare (indent 0) (debug t))
+  `(python-shell-with-shell-buffer
+     (save-current-buffer
+       (when (not (and python-shell--font-lock-buffer
+                       (get-buffer python-shell--font-lock-buffer)))
+         (setq python-shell--font-lock-buffer
+               (python-shell-font-lock-get-or-create-buffer)))
+       (set-buffer python-shell--font-lock-buffer)
+       (set (make-local-variable 'delay-mode-hooks) t)
+       (let ((python-indent-guess-indent-offset nil))
+         (when (not (eq major-mode 'python-mode))
+           (python-mode))
+         ,@body))))
+
+(defun python-shell-font-lock-cleanup-buffer ()
+  "Cleanup the font-lock buffer.
+Provided as a command because this might be handy if something
+goes wrong and syntax highlighting in the shell gets messed up."
+  (interactive)
+  (python-shell-with-shell-buffer
+    (python-shell-font-lock-with-font-lock-buffer
+      (delete-region (point-min) (point-max)))))
+
+(defun python-shell-font-lock-comint-output-filter-function (output)
+  "Clean up the font-lock buffer after any OUTPUT."
+  (when (and (not (string= "" output))
+             ;; Is end of output and is not just a prompt.
+             (not (member
+                   (python-shell-comint-end-of-output-p
+                    (ansi-color-filter-apply output))
+                   '(nil 0))))
+    ;; If output is other than an input prompt then "real" output has
+    ;; been received and the font-lock buffer must be cleaned up.
+    (python-shell-font-lock-cleanup-buffer))
+  output)
+
+(defun python-shell-font-lock-post-command-hook ()
+  "Fontifies current line in shell buffer."
+  (if (eq this-command 'comint-send-input)
+      ;; Add a newline when user sends input as this may be a block.
+      (python-shell-font-lock-with-font-lock-buffer
+        (goto-char (line-end-position))
+        (newline))
+    (when (and (python-util-comint-last-prompt)
+               (> (point) (cdr (python-util-comint-last-prompt))))
+      (let ((input (buffer-substring-no-properties
+                    (cdr (python-util-comint-last-prompt)) (point-max)))
+            (old-input (python-shell-font-lock-with-font-lock-buffer
+                         (buffer-substring-no-properties
+                          (line-beginning-position) (point-max))))
+            (current-point (point))
+            (buffer-undo-list t))
+        ;; When input hasn't changed, do nothing.
+        (when (not (string= input old-input))
+          (delete-region (cdr (python-util-comint-last-prompt)) (point-max))
+          (insert
+           (python-shell-font-lock-with-font-lock-buffer
+             (delete-region (line-beginning-position)
+                            (line-end-position))
+             (insert input)
+             ;; Ensure buffer is fontified, keeping it
+             ;; compatible with Emacs < 24.4.
+             (if (fboundp 'font-lock-ensure)
+                 (funcall 'font-lock-ensure)
+               (font-lock-default-fontify-buffer))
+             ;; Replace FACE text properties with FONT-LOCK-FACE so
+             ;; they are not overwritten by comint buffer's font lock.
+             (python-util-text-properties-replace-name
+              'face 'font-lock-face)
+             (buffer-substring (line-beginning-position)
+                               (line-end-position))))
+          (goto-char current-point))))))
+
+(defun python-shell-font-lock-turn-on (&optional msg)
+  "Turn on shell font-lock.
+With argument MSG show activation message."
+  (interactive "p")
+  (python-shell-with-shell-buffer
+    (python-shell-font-lock-kill-buffer)
+    (set (make-local-variable 'python-shell--font-lock-buffer) nil)
+    (add-hook 'post-command-hook
+              #'python-shell-font-lock-post-command-hook nil 'local)
+    (add-hook 'kill-buffer-hook
+              #'python-shell-font-lock-kill-buffer nil 'local)
+    (add-hook 'comint-output-filter-functions
+              #'python-shell-font-lock-comint-output-filter-function
+              'append 'local)
+    (when msg
+      (message "Shell font-lock is enabled"))))
+
+(defun python-shell-font-lock-turn-off (&optional msg)
+  "Turn off shell font-lock.
+With argument MSG show deactivation message."
+  (interactive "p")
+  (python-shell-with-shell-buffer
+    (python-shell-font-lock-kill-buffer)
+    (when (python-util-comint-last-prompt)
+      ;; Cleanup current fontification
+      (remove-text-properties
+       (cdr (python-util-comint-last-prompt))
+       (line-end-position)
+       '(face nil font-lock-face nil)))
+    (set (make-local-variable 'python-shell--font-lock-buffer) nil)
+    (remove-hook 'post-command-hook
+                 #'python-shell-font-lock-post-command-hook'local)
+    (remove-hook 'kill-buffer-hook
+                 #'python-shell-font-lock-kill-buffer 'local)
+    (remove-hook 'comint-output-filter-functions
+                 #'python-shell-font-lock-comint-output-filter-function
+                 'local)
+    (when msg
+      (message "Shell font-lock is disabled"))))
+
+(defun python-shell-font-lock-toggle (&optional msg)
+  "Toggle font-lock for shell.
+With argument MSG show activation/deactivation message."
+  (interactive "p")
+  (python-shell-with-shell-buffer
+    (set (make-local-variable 'python-shell-font-lock-enable)
+         (not python-shell-font-lock-enable))
+    (if python-shell-font-lock-enable
+        (python-shell-font-lock-turn-on msg)
+      (python-shell-font-lock-turn-off msg))
+    python-shell-font-lock-enable))
 
 (define-derived-mode inferior-python-mode comint-mode "Inferior Python"
   "Major mode for Python inferior process.
@@ -2129,13 +2362,17 @@ interpreter is run.  Variables
 `python-shell-prompt-regexp',
 `python-shell-prompt-output-regexp',
 `python-shell-prompt-block-regexp',
-`python-shell-enable-font-lock',
+`python-shell-font-lock-enable',
 `python-shell-completion-setup-code',
 `python-shell-completion-string-code',
 `python-eldoc-setup-code', `python-eldoc-string-code',
 `python-ffap-setup-code' and `python-ffap-string-code' can
 customize this mode for different Python interpreters.
 
+This mode resets `comint-output-filter-functions' locally, so you
+may want to re-add custom functions to it using the
+`inferior-python-mode-hook'.
+
 You can also add additional setup code to be run at
 initialization of the interpreter via `python-shell-setup-codes'
 variable.
@@ -2153,50 +2390,27 @@ variable.
   (set (make-local-variable 'python-shell--prompt-calculated-input-regexp) nil)
   (set (make-local-variable 'python-shell--prompt-calculated-output-regexp) nil)
   (python-shell-prompt-set-calculated-regexps)
-  (setq comint-prompt-regexp python-shell--prompt-calculated-input-regexp)
+  (setq comint-prompt-regexp python-shell--prompt-calculated-input-regexp
+        comint-prompt-read-only t)
   (setq mode-line-process '(":%s"))
-  (make-local-variable 'comint-output-filter-functions)
-  (add-hook 'comint-output-filter-functions
-            'python-comint-output-filter-function)
-  (add-hook 'comint-output-filter-functions
-            'python-pdbtrack-comint-output-filter-function)
+  (set (make-local-variable 'comint-output-filter-functions)
+       '(ansi-color-process-output
+         python-pdbtrack-comint-output-filter-function
+         python-comint-postoutput-scroll-to-bottom))
   (set (make-local-variable 'compilation-error-regexp-alist)
        python-shell-compilation-regexp-alist)
-  (define-key inferior-python-mode-map [remap complete-symbol]
-    'completion-at-point)
   (add-hook 'completion-at-point-functions
-            'python-shell-completion-complete-at-point nil 'local)
-  (add-to-list (make-local-variable 'comint-dynamic-complete-functions)
-               'python-shell-completion-complete-at-point)
+            #'python-shell-completion-at-point nil 'local)
   (define-key inferior-python-mode-map "\t"
     'python-shell-completion-complete-or-indent)
   (make-local-variable 'python-pdbtrack-buffers-to-kill)
   (make-local-variable 'python-pdbtrack-tracked-buffer)
   (make-local-variable 'python-shell-internal-last-output)
-  (when python-shell-enable-font-lock
-    (set-syntax-table python-mode-syntax-table)
-    (set (make-local-variable 'font-lock-defaults)
-         '(python-font-lock-keywords nil nil nil nil))
-    (set (make-local-variable 'syntax-propertize-function)
-         (eval
-          ;; XXX: Unfortunately eval is needed here to make use of the
-          ;; dynamic value of `comint-prompt-regexp'.
-          `(syntax-propertize-rules
-            (,comint-prompt-regexp
-             (0 (ignore
-                 (put-text-property
-                  comint-last-input-start end 'syntax-table
-                  python-shell-output-syntax-table)
-                 ;; XXX: This might look weird, but it is the easiest
-                 ;; way to ensure font lock gets cleaned up before the
-                 ;; current prompt, which is needed for unclosed
-                 ;; strings to not mess up with current input.
-                 (font-lock-unfontify-region comint-last-input-start end))))
-            (,(python-rx string-delimiter)
-             (0 (ignore
-                 (and (not (eq (get-text-property start 'field) 'output))
-                      (python-syntax-stringify)))))))))
-  (compilation-shell-minor-mode 1))
+  (when python-shell-font-lock-enable
+    (python-shell-font-lock-turn-on))
+  (compilation-shell-minor-mode 1)
+  (python-shell-accept-process-output
+   (get-buffer-process (current-buffer))))
 
 (defun python-shell-make-comint (cmd proc-name &optional pop internal)
   "Create a Python shell comint buffer.
@@ -2232,7 +2446,6 @@ killed."
                 (mapconcat #'identity args " ")))
           (with-current-buffer buffer
             (inferior-python-mode))
-          (accept-process-output process)
           (and pop (pop-to-buffer buffer t))
           (and internal (set-process-query-on-exit-flag process nil))))
       proc-buffer-name)))
@@ -2255,7 +2468,7 @@ process buffer for a list of commands.)"
   (interactive
    (if current-prefix-arg
        (list
-        (read-string "Run Python: " (python-shell-parse-command))
+        (read-shell-command "Run Python: " (python-shell-parse-command))
         (y-or-n-p "Make dedicated process? ")
         (= (prefix-numeric-value current-prefix-arg) 4))
      (list (python-shell-parse-command) nil t)))
@@ -2275,10 +2488,10 @@ difference with global or dedicated shells is that these ones are
 attached to a configuration, not a buffer.  This means that can
 be used for example to retrieve the sys.path and other stuff,
 without messing with user shells.  Note that
-`python-shell-enable-font-lock' and `inferior-python-mode-hook'
+`python-shell-font-lock-enable' and `inferior-python-mode-hook'
 are set to nil for these shells, so setup codes are not sent at
 startup."
-  (let ((python-shell-enable-font-lock nil)
+  (let ((python-shell-font-lock-enable nil)
         (inferior-python-mode-hook nil))
     (get-buffer-process
      (python-shell-make-comint
@@ -2286,16 +2499,19 @@ startup."
       (python-shell-internal-get-process-name) nil t))))
 
 (defun python-shell-get-buffer ()
-  "Return inferior Python buffer for current buffer."
-  (let* ((dedicated-proc-name (python-shell-get-process-name t))
-         (dedicated-proc-buffer-name (format "*%s*" dedicated-proc-name))
-         (global-proc-name  (python-shell-get-process-name nil))
-         (global-proc-buffer-name (format "*%s*" global-proc-name))
-         (dedicated-running (comint-check-proc dedicated-proc-buffer-name))
-         (global-running (comint-check-proc global-proc-buffer-name)))
-    ;; Always prefer dedicated
-    (or (and dedicated-running dedicated-proc-buffer-name)
-        (and global-running global-proc-buffer-name))))
+  "Return inferior Python buffer for current buffer.
+If current buffer is in `inferior-python-mode', return it."
+  (if (eq major-mode 'inferior-python-mode)
+      (current-buffer)
+    (let* ((dedicated-proc-name (python-shell-get-process-name t))
+           (dedicated-proc-buffer-name (format "*%s*" dedicated-proc-name))
+           (global-proc-name  (python-shell-get-process-name nil))
+           (global-proc-buffer-name (format "*%s*" global-proc-name))
+           (dedicated-running (comint-check-proc dedicated-proc-buffer-name))
+           (global-running (comint-check-proc global-proc-buffer-name)))
+      ;; Always prefer dedicated
+      (or (and dedicated-running dedicated-proc-buffer-name)
+          (and global-running global-proc-buffer-name)))))
 
 (defun python-shell-get-process ()
   "Return inferior Python process for current buffer."
@@ -2307,25 +2523,14 @@ Arguments CMD, DEDICATED and SHOW are those of `run-python' and
 are used to start the shell.  If those arguments are not
 provided, `run-python' is called interactively and the user will
 be asked for their values."
-  (let* ((dedicated-proc-name (python-shell-get-process-name t))
-         (dedicated-proc-buffer-name (format "*%s*" dedicated-proc-name))
-         (global-proc-name  (python-shell-get-process-name nil))
-         (global-proc-buffer-name (format "*%s*" global-proc-name))
-         (dedicated-running (comint-check-proc dedicated-proc-buffer-name))
-         (global-running (comint-check-proc global-proc-buffer-name))
-         (current-prefix-arg 16))
-    (when (and (not dedicated-running) (not global-running))
-      (if (if (not cmd)
-              ;; XXX: Refactor code such that calling `run-python'
-              ;; interactively is not needed anymore.
-              (call-interactively 'run-python)
-            (run-python cmd dedicated show))
-          (setq dedicated-running t)
-        (setq global-running t)))
-    ;; Always prefer dedicated
-    (get-buffer-process (if dedicated-running
-                            dedicated-proc-buffer-name
-                          global-proc-buffer-name))))
+  (let ((shell-process (python-shell-get-process)))
+    (when (not shell-process)
+      (if (not cmd)
+          ;; XXX: Refactor code such that calling `run-python'
+          ;; interactively is not needed anymore.
+          (call-interactively 'run-python)
+        (run-python cmd dedicated show)))
+    (or shell-process (python-shell-get-process))))
 
 (defvar python-shell-internal-buffer nil
   "Current internal shell buffer for the current buffer.
@@ -2343,13 +2548,7 @@ there for compatibility with CEDET.")
          (proc-buffer-name (format " *%s*" proc-name)))
     (when (not (process-live-p proc-name))
       (run-python-internal)
-      (setq python-shell-internal-buffer proc-buffer-name)
-      ;; XXX: Why is this `sit-for' needed?
-      ;; `python-shell-make-comint' calls `accept-process-output'
-      ;; already but it is not helping to get proper output on
-      ;; 'gnu/linux when the internal shell process is not running and
-      ;; a call to `python-shell-internal-send-string' is issued.
-      (sit-for 0.1 t))
+      (setq python-shell-internal-buffer proc-buffer-name))
     (get-buffer-process proc-buffer-name)))
 
 (define-obsolete-function-alias
@@ -2399,16 +2598,7 @@ detecting a prompt at the end of the buffer."
    string (ansi-color-filter-apply string)
    python-shell-output-filter-buffer
    (concat python-shell-output-filter-buffer string))
-  (when (string-match
-         ;; XXX: It seems on OSX an extra carriage return is attached
-         ;; at the end of output, this handles that too.
-         (concat
-          "\r?\n"
-          ;; Remove initial caret from calculated regexp
-          (replace-regexp-in-string
-           (rx string-start ?^) ""
-           python-shell--prompt-calculated-input-regexp)
-          "$")
+  (when (python-shell-comint-end-of-output-p
          python-shell-output-filter-buffer)
     ;; Output ends when `python-shell-output-filter-buffer' contains
     ;; the prompt attached at the end of it.
@@ -2608,18 +2798,24 @@ If DELETE is non-nil, delete the file afterwards."
 (defun python-shell-switch-to-shell ()
   "Switch to inferior Python process buffer."
   (interactive)
-  (pop-to-buffer (process-buffer (python-shell-get-or-create-process)) t))
+  (process-buffer (python-shell-get-or-create-process)) t)
 
 (defun python-shell-send-setup-code ()
   "Send all setup code for shell.
 This function takes the list of setup code to send from the
 `python-shell-setup-codes' list."
-  (let ((process (get-buffer-process (current-buffer))))
-    (dolist (code python-shell-setup-codes)
-      (when code
-        (message "Sent %s" code)
-        (python-shell-send-string
-         (symbol-value code) process)))))
+  (let ((process (python-shell-get-process))
+        (code (concat
+               (mapconcat
+                (lambda (elt)
+                  (cond ((stringp elt) elt)
+                        ((symbolp elt) (symbol-value elt))
+                        (t "")))
+                python-shell-setup-codes
+                "\n\n")
+               "\n\nprint ('python.el: sent setup code')")))
+    (python-shell-send-string code process)
+    (python-shell-accept-process-output process)))
 
 (add-hook 'inferior-python-mode-hook
           #'python-shell-send-setup-code)
@@ -2678,15 +2874,16 @@ the full statement in the case of imports."
   "24.4"
   "Completion string code must also autocomplete modules.")
 
-(defcustom python-shell-completion-pdb-string-code
-  "';'.join(globals().keys() + locals().keys())"
-  "Python code used to get completions separated by semicolons for [i]pdb."
-  :type 'string
-  :group 'python)
+(define-obsolete-variable-alias
+  'python-shell-completion-pdb-string-code
+  'python-shell-completion-string-code
+  "25.1"
+  "Completion string code must work for (i)pdb.")
 
-(defun python-shell-completion-get-completions (process line input)
-  "Do completion at point for PROCESS.
-LINE is used to detect the context on how to complete given INPUT."
+(defun python-shell-completion-get-completions (process import input)
+  "Do completion at point using PROCESS for IMPORT or INPUT.
+When IMPORT is non-nil takes precedence over INPUT for
+completion."
   (with-current-buffer (process-buffer process)
     (let* ((prompt
             ;; Get last prompt of the inferior process buffer (this
@@ -2700,63 +2897,61 @@ LINE is used to detect the context on how to complete given INPUT."
             ;; Check whether a prompt matches a pdb string, an import
             ;; statement or just the standard prompt and use the
             ;; correct python-shell-completion-*-code string
-            (cond ((and (> (length python-shell-completion-pdb-string-code) 0)
-                        (string-match
+            (cond ((and (string-match
                          (concat "^" python-shell-prompt-pdb-regexp) prompt))
-                   python-shell-completion-pdb-string-code)
+                   ;; Since there are no guarantees the user will remain
+                   ;; in the same context where completion code was sent
+                   ;; (e.g. user steps into a function), safeguard
+                   ;; resending completion setup continuously.
+                   (concat python-shell-completion-setup-code
+                           "\nprint (" python-shell-completion-string-code ")"))
                   ((string-match
                     python-shell--prompt-calculated-input-regexp prompt)
                    python-shell-completion-string-code)
                   (t nil)))
-           (input
-            (if (string-match
-                 (python-rx line-start (* space) (or "from" "import") space)
-                 line)
-                line
-              input)))
+           (subject (or import input)))
       (and completion-code
            (> (length input) 0)
            (let ((completions
                   (python-util-strip-string
                    (python-shell-send-string-no-output
-                    (format completion-code input) process))))
+                    (format completion-code subject) process))))
              (and (> (length completions) 2)
                   (split-string completions
                                 "^'\\|^\"\\|;\\|'$\\|\"$" t)))))))
 
-(defun python-shell-completion-complete-at-point (&optional process)
-  "Perform completion at point in inferior Python.
+(defun python-shell-completion-at-point (&optional process)
+  "Function for `completion-at-point-functions' in `inferior-python-mode'.
 Optional argument PROCESS forces completions to be retrieved
 using that one instead of current buffer's process."
   (setq process (or process (get-buffer-process (current-buffer))))
-  (let* ((start
+  (let* ((last-prompt-end (cdr (python-util-comint-last-prompt)))
+         (import-statement
+          (when (string-match-p
+                 (rx (* space) word-start (or "from" "import") word-end space)
+                 (buffer-substring-no-properties last-prompt-end (point)))
+            (buffer-substring-no-properties last-prompt-end (point))))
+         (start
           (save-excursion
-            (with-syntax-table python-dotty-syntax-table
-              (let* ((paren-depth (car (syntax-ppss)))
-                     (syntax-string "w_")
-                     (syntax-list (string-to-syntax syntax-string)))
-                ;; Stop scanning for the beginning of the completion
-                ;; subject after the char before point matches a
-                ;; delimiter
-                (while (member
-                        (car (syntax-after (1- (point)))) syntax-list)
-                  (skip-syntax-backward syntax-string)
-                  (when (or (equal (char-before) ?\))
-                            (equal (char-before) ?\"))
-                    (forward-char -1))
-                  (while (or
-                          ;; honor initial paren depth
-                          (> (car (syntax-ppss)) paren-depth)
-                          (python-syntax-context 'string))
-                    (forward-char -1)))
-                (point)))))
+            (if (not (re-search-backward
+                      (python-rx
+                       (or whitespace open-paren close-paren string-delimiter))
+                      last-prompt-end
+                      t 1))
+                last-prompt-end
+              (forward-char (length (match-string-no-properties 0)))
+              (point))))
          (end (point)))
     (list start end
           (completion-table-dynamic
            (apply-partially
             #'python-shell-completion-get-completions
-            process (buffer-substring-no-properties
-                     (line-beginning-position) end))))))
+            process import-statement)))))
+
+(define-obsolete-function-alias
+  'python-shell-completion-complete-at-point
+  'python-shell-completion-at-point
+  "25.1")
 
 (defun python-shell-completion-complete-or-indent ()
   "Complete or indent depending on the context.
@@ -2765,7 +2960,7 @@ If not try to complete."
   (interactive)
   (if (string-match "^[[:space:]]*$"
                     (buffer-substring (comint-line-beginning-position)
-                                      (point-marker)))
+                                      (point)))
       (indent-for-tab-command)
     (completion-at-point)))
 
@@ -2864,18 +3059,19 @@ Argument OUTPUT is a string with the output from the comint process."
 \f
 ;;; Symbol completion
 
-(defun python-completion-complete-at-point ()
-  "Complete current symbol at point.
+(defun python-completion-at-point ()
+  "Function for `completion-at-point-functions' in `python-mode'.
 For this to work as best as possible you should call
 `python-shell-send-buffer' from time to time so context in
 inferior Python process is updated properly."
   (let ((process (python-shell-get-process)))
-    (if (not process)
-        (error "Completion needs an inferior Python process running")
-      (python-shell-completion-complete-at-point process))))
+    (when process
+      (python-shell-completion-at-point process))))
 
-(add-to-list 'debug-ignored-errors
-             "^Completion needs an inferior Python process running.")
+(define-obsolete-function-alias
+  'python-completion-complete-at-point
+  'python-completion-at-point
+  "25.1")
 
 \f
 ;;; Fill paragraph
@@ -3095,8 +3291,7 @@ JUSTIFY should be used (if applicable) as in `fill-paragraph'."
   (save-restriction
     (narrow-to-region (progn
                         (while (python-syntax-context 'paren)
-                          (goto-char (1- (point-marker))))
-                        (point-marker)
+                          (goto-char (1- (point))))
                         (line-beginning-position))
                       (progn
                         (when (not (python-syntax-context 'paren))
@@ -3105,8 +3300,8 @@ JUSTIFY should be used (if applicable) as in `fill-paragraph'."
                             (skip-syntax-backward "^)")))
                         (while (and (python-syntax-context 'paren)
                                     (not (eobp)))
-                          (goto-char (1+ (point-marker))))
-                        (point-marker)))
+                          (goto-char (1+ (point))))
+                        (point)))
     (let ((paragraph-start "\f\\|[ \t]*$")
           (paragraph-separate ",")
           (fill-paragraph-function))
@@ -3215,6 +3410,12 @@ The skeleton will be bound to python-skeleton-NAME."
   > _ \n
   '(python-skeleton--else) | ^)
 
+(python-skeleton-define import nil
+  "Import from module: "
+  "from " str & " " | -5
+  "import "
+  ("Identifier: " str ", ") -2 \n _)
+
 (python-skeleton-define try nil
   nil
   "try:" \n
@@ -3241,7 +3442,7 @@ The skeleton will be bound to python-skeleton-NAME."
   "class " str "(" ("Inheritance, %s: "
                     (unless (equal ?\( (char-before)) ", ")
                     str)
-  & ")" | -2
+  & ")" | -1
   ":" \n
   "\"\"\"" - "\"\"\"" \n
   > _ \n)
@@ -3389,8 +3590,7 @@ If not FORCE-INPUT is passed then what `python-info-current-symbol'
 returns will be used.  If not FORCE-PROCESS is passed what
 `python-shell-get-process' returns is used."
   (let ((process (or force-process (python-shell-get-process))))
-    (if (not process)
-        (error "Eldoc needs an inferior Python process running")
+    (when process
       (let ((input (or force-input
                        (python-info-current-symbol t))))
         (and input
@@ -3417,9 +3617,6 @@ Interactively, prompt for symbol."
                         nil nil symbol))))
   (message (python-eldoc--get-doc-at-point symbol)))
 
-(add-to-list 'debug-ignored-errors
-             "^Eldoc needs an inferior Python process running.")
-
 \f
 ;;; Imenu
 
@@ -3913,6 +4110,18 @@ to \"^python-\"."
                (cdr pair))))
    (buffer-local-variables from-buffer)))
 
+(defvar comint-last-prompt-overlay)     ; Shut up, byte compiler.
+
+(defun python-util-comint-last-prompt ()
+  "Return comint last prompt overlay start and end.
+This is for compatibility with Emacs < 24.4."
+  (cond ((bound-and-true-p comint-last-prompt-overlay)
+         (cons (overlay-start comint-last-prompt-overlay)
+               (overlay-end comint-last-prompt-overlay)))
+        ((bound-and-true-p comint-last-prompt)
+         comint-last-prompt)
+        (t nil)))
+
 (defun python-util-forward-comment (&optional direction)
   "Python mode specific version of `forward-comment'.
 Optional argument DIRECTION defines the direction to move to."
@@ -3924,6 +4133,68 @@ Optional argument DIRECTION defines the direction to move to."
       (goto-char comment-start))
     (forward-comment factor)))
 
+(defun python-util-list-directories (directory &optional predicate max-depth)
+  "List DIRECTORY subdirs, filtered by PREDICATE and limited by MAX-DEPTH.
+Argument PREDICATE defaults to `identity' and must be a function
+that takes one argument (a full path) and returns non-nil for
+allowed files.  When optional argument MAX-DEPTH is non-nil, stop
+searching when depth is reached, else don't limit."
+  (let* ((dir (expand-file-name directory))
+         (dir-length (length dir))
+         (predicate (or predicate #'identity))
+         (to-scan (list dir))
+         (tally nil))
+    (while to-scan
+      (let ((current-dir (car to-scan)))
+        (when (funcall predicate current-dir)
+          (setq tally (cons current-dir tally)))
+        (setq to-scan (append (cdr to-scan)
+                              (python-util-list-files
+                               current-dir #'file-directory-p)
+                              nil))
+        (when (and max-depth
+                   (<= max-depth
+                       (length (split-string
+                                (substring current-dir dir-length)
+                                "/\\|\\\\" t))))
+          (setq to-scan nil))))
+    (nreverse tally)))
+
+(defun python-util-list-files (dir &optional predicate)
+  "List files in DIR, filtering with PREDICATE.
+Argument PREDICATE defaults to `identity' and must be a function
+that takes one argument (a full path) and returns non-nil for
+allowed files."
+  (let ((dir-name (file-name-as-directory dir)))
+    (apply #'nconc
+           (mapcar (lambda (file-name)
+                     (let ((full-file-name (expand-file-name file-name dir-name)))
+                       (when (and
+                              (not (member file-name '("." "..")))
+                              (funcall (or predicate #'identity) full-file-name))
+                         (list full-file-name))))
+                   (directory-files dir-name)))))
+
+(defun python-util-list-packages (dir &optional max-depth)
+  "List packages in DIR, limited by MAX-DEPTH.
+When optional argument MAX-DEPTH is non-nil, stop searching when
+depth is reached, else don't limit."
+  (let* ((dir (expand-file-name dir))
+         (parent-dir (file-name-directory
+                      (directory-file-name
+                       (file-name-directory
+                        (file-name-as-directory dir)))))
+         (subpath-length (length parent-dir)))
+    (mapcar
+     (lambda (file-name)
+       (replace-regexp-in-string
+        (rx (or ?\\ ?/)) "." (substring file-name subpath-length)))
+     (python-util-list-directories
+      (directory-file-name dir)
+      (lambda (dir)
+        (file-exists-p (expand-file-name "__init__.py" dir)))
+      max-depth))))
+
 (defun python-util-popn (lst n)
   "Return LST first N elements.
 N should be an integer, when negative its opposite is used.
@@ -3940,6 +4211,23 @@ returned as is."
               n (1- n)))
       (reverse acc))))
 
+(defun python-util-text-properties-replace-name
+  (from to &optional start end)
+  "Replace properties named FROM to TO, keeping its value.
+Arguments START and END narrow the buffer region to work on."
+  (save-excursion
+    (goto-char (or start (point-min)))
+    (while (not (eobp))
+      (let ((plist (text-properties-at (point)))
+            (next-change (or (next-property-change (point) (current-buffer))
+                             (or end (point-max)))))
+        (when (plist-get plist from)
+          (let* ((face (plist-get plist from))
+                 (plist (plist-put plist from nil))
+                 (plist (plist-put plist to face)))
+            (set-text-properties (point) next-change plist (current-buffer))))
+        (goto-char next-change)))))
+
 (defun python-util-strip-string (string)
   "Strip STRING whitespace and newlines from end and beginning."
   (replace-regexp-in-string
@@ -4009,7 +4297,7 @@ returned as is."
        #'python-nav-end-of-defun)
 
   (add-hook 'completion-at-point-functions
-            #'python-completion-complete-at-point nil 'local)
+            #'python-completion-at-point nil 'local)
 
   (add-hook 'post-self-insert-hook
             #'python-indent-post-self-insert-function 'append 'local)
@@ -4034,7 +4322,8 @@ returned as is."
   (add-to-list 'hs-special-modes-alist
                `(python-mode "^\\s-*\\(?:def\\|class\\)\\>" nil "#"
                              ,(lambda (_arg)
-                                (python-nav-end-of-defun)) nil))
+                                (python-nav-end-of-defun))
+                             nil))
 
   (set (make-local-variable 'outline-regexp)
        (python-rx (* space) block-start))
index 5ad5633fa852e103ecbfc07bb6facab7bb74b387..c47a3bd6fbe697fb5ee5a8dfc06f6de0cdd9fcd0 100644 (file)
@@ -1,4 +1,4 @@
-;;; scheme.el --- Scheme (and DSSSL) editing mode
+;;; scheme.el --- Scheme (and DSSSL) editing mode    -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 1986-1988, 1997-1998, 2001-2014 Free Software
 ;; Foundation, Inc.
@@ -280,7 +280,9 @@ See `run-hooks'."
                    "\\|-module"
                   "\\)\\)\\>"
                   ;; Any whitespace and declared object.
-                  "[ \t]*(?"
+                  ;; The "(*" is for curried definitions, e.g.,
+                  ;;  (define ((sum a) b) (+ a b))
+                  "[ \t]*(*"
                   "\\(\\sw+\\)?")
           '(1 font-lock-keyword-face)
           '(6 (cond ((match-beginning 3) font-lock-function-name-face)
@@ -491,20 +493,20 @@ indentation."
 \f
 ;;; Let is different in Scheme
 
-(defun would-be-symbol (string)
-  (not (string-equal (substring string 0 1) "(")))
+;; (defun scheme-would-be-symbol (string)
+;;   (not (string-equal (substring string 0 1) "(")))
 
-(defun next-sexp-as-string ()
-  ;; Assumes that it is protected by a save-excursion
-  (forward-sexp 1)
-  (let ((the-end (point)))
-    (backward-sexp 1)
-    (buffer-substring (point) the-end)))
+;; (defun scheme-next-sexp-as-string ()
+;;   ;; Assumes that it is protected by a save-excursion
+;;   (forward-sexp 1)
+;;   (let ((the-end (point)))
+;;     (backward-sexp 1)
+;;     (buffer-substring (point) the-end)))
 
 ;; This is correct but too slow.
 ;; The one below works almost always.
 ;;(defun scheme-let-indent (state indent-point)
-;;  (if (would-be-symbol (next-sexp-as-string))
+;;  (if (scheme-would-be-symbol (scheme-next-sexp-as-string))
 ;;      (scheme-indent-specform 2 state indent-point)
 ;;      (scheme-indent-specform 1 state indent-point)))
 
index 724d22ab69b633201d44b22d25587a28ed38c98e..5631358b472bcfb4408529892ea45358922edff1 100644 (file)
     (ksh88 . jsh)
     (oash . sh)
     (pdksh . ksh88)
+    (mksh . pdksh)
     (posix . sh)
     (tcsh . csh)
     (wksh . ksh88)
@@ -262,6 +263,7 @@ sh          Bourne Shell
       ksh      Korn Shell '93
        dtksh   CDE Desktop Korn Shell
       pdksh    Public Domain Korn Shell
+        mksh    MirOS BSD Korn Shell
       wksh     Window Korn Shell
       zsh      Z Shell
   oash         SCO OA (curses) Shell
@@ -271,7 +273,6 @@ sh          Bourne Shell
   :version "24.4"                       ; added dash
   :group 'sh-script)
 
-
 (defcustom sh-alias-alist
   (append (if (eq system-type 'gnu/linux)
             '((csh . tcsh)
@@ -279,11 +280,20 @@ sh                Bourne Shell
         ;; for the time being
         '((ksh . ksh88)
            (bash2 . bash)
-          (sh5 . sh)))
+          (sh5 . sh)
+           ;; Android's system shell
+           ("^/system/bin/sh$" . mksh)))
   "Alist for transforming shell names to what they really are.
-Use this where the name of the executable doesn't correspond to the type of
-shell it really is."
-  :type '(repeat (cons symbol symbol))
+Use this where the name of the executable doesn't correspond to
+the type of shell it really is.  Keys are regular expressions
+matched against the full path of the interpreter.  (For backward
+compatibility, keys may also be symbols, which are matched
+against the interpreter's basename.  The values are symbols
+naming the shell."
+  :type '(repeat (cons (radio
+                        (regexp :tag "Regular expression")
+                        (symbol :tag "Basename"))
+                       (symbol :tag "Shell")))
   :group 'sh-script)
 
 
@@ -387,15 +397,20 @@ the car and cdr are the same symbol.")
   "Non-nil if `sh-shell-variables' is initialized.")
 
 (defun sh-canonicalize-shell (shell)
-  "Convert a shell name SHELL to the one we should handle it as."
-  (if (string-match "\\.exe\\'" shell)
-      (setq shell (substring shell 0 (match-beginning 0))))
-  (or (symbolp shell)
-      (setq shell (intern shell)))
-  (or (cdr (assq shell sh-alias-alist))
-      shell))
-
-(defvar sh-shell (sh-canonicalize-shell (file-name-nondirectory sh-shell-file))
+  "Convert a shell name SHELL to the one we should handle it as.
+SHELL is a full path to the shell interpreter; return a shell
+name symbol."
+  (cl-loop
+     with shell = (cond ((string-match "\\.exe\\'" shell)
+                         (substring shell 0 (match-beginning 0)))
+                        (t shell))
+     with shell-base = (intern (file-name-nondirectory shell))
+     for (key . value) in sh-alias-alist
+     if (and (stringp key) (string-match key shell)) return value
+     if (eq key shell-base) return value
+     finally return shell-base))
+
+(defvar sh-shell (sh-canonicalize-shell sh-shell-file)
   "The shell being programmed.  This is set by \\[sh-set-shell].")
 ;;;###autoload(put 'sh-shell 'safe-local-variable 'symbolp)
 
@@ -680,7 +695,7 @@ removed when closing the here document."
           "jobs" "kill" "let" "local" "popd" "printf" "pushd" "shopt"
           "source" "suspend" "typeset" "unalias"
           ;; bash4
-          "mapfile" "readarray")
+          "mapfile" "readarray" "coproc")
 
     ;; The next entry is only used for defining the others
     (bourne sh-append shell
@@ -895,7 +910,7 @@ See `sh-feature'.")
      (:foreground "tan1" ))
     (t
      (:weight bold)))
-  "Face to show a here-document"
+  "Face to show a here-document."
   :group 'sh-indentation)
 
 ;; These colors are probably icky.  It's just a placeholder though.
@@ -906,7 +921,7 @@ See `sh-feature'.")
      (:foreground "magenta"))
     (t
      (:weight bold)))
-  "Face to show quoted execs like ``"
+  "Face to show quoted execs like `blabla`."
   :group 'sh-indentation)
 (define-obsolete-face-alias 'sh-heredoc-face 'sh-heredoc "22.1")
 (defvar sh-heredoc-face 'sh-heredoc)
@@ -1036,13 +1051,11 @@ Point is at the beginning of the next line."
   "Search for a subshell embedded in a string.
 Find all the unescaped \" characters within said subshell, remembering that
 subshells can nest."
-  ;; FIXME: This can (and often does) match multiple lines, yet it makes no
-  ;; effort to handle multiline cases correctly, so it ends up being
-  ;; rather flaky.
   (when (eq ?\" (nth 3 (syntax-ppss))) ; Check we matched an opening quote.
     ;; bingo we have a $( or a ` inside a ""
     (let (;; `state' can be: double-quote, backquote, code.
           (state (if (eq (char-before) ?`) 'backquote 'code))
+          (startpos (point))
           ;; Stacked states in the context.
           (states '(double-quote)))
       (while (and state (progn (skip-chars-forward "^'\\\\\"`$()" limit)
@@ -1073,7 +1086,12 @@ subshells can nest."
                  (`double-quote nil)
                  (_ (setq state (pop states)))))
           (_ (error "Internal error in sh-font-lock-quoted-subshell")))
-        (forward-char 1)))))
+        (forward-char 1))
+      (when (< startpos (line-beginning-position))
+        (put-text-property startpos (point) 'syntax-multiline t)
+        (add-hook 'syntax-propertize-extend-region-functions
+                  'syntax-propertize-multiline nil t))
+      )))
 
 
 (defun sh-is-quoted-p (pos)
@@ -1536,6 +1554,12 @@ When the region is active, send the region instead."
 \f
 ;; mode-command and utility functions
 
+(defun sh-after-hack-local-variables ()
+  (when (assq 'sh-shell file-local-variables-alist)
+    (sh-set-shell (if (symbolp sh-shell)
+                      (symbol-name sh-shell)
+                    sh-shell))))
+
 ;;;###autoload
 (define-derived-mode sh-mode prog-mode "Shell-script"
   "Major mode for editing shell scripts.
@@ -1646,7 +1670,9 @@ with your script for an edit-interpret-debug cycle."
          ((string-match "[.]csh\\>"    buffer-file-name) "csh")
         ((equal (file-name-nondirectory buffer-file-name) ".profile") "sh")
          (t sh-shell-file))
-   nil nil))
+   nil nil)
+  (add-hook 'hack-local-variables-hook
+    #'sh-after-hack-local-variables nil t))
 
 ;;;###autoload
 (defalias 'shell-script-mode 'sh-mode)
@@ -2300,9 +2326,7 @@ Calls the value of `sh-set-shell-hook' if set."
                     t))
   (if (string-match "\\.exe\\'" shell)
       (setq shell (substring shell 0 (match-beginning 0))))
-  (setq sh-shell (intern (file-name-nondirectory shell))
-       sh-shell (or (cdr (assq sh-shell sh-alias-alist))
-                    sh-shell))
+  (setq sh-shell (sh-canonicalize-shell shell))
   (if insert-flag
       (setq sh-shell-file
            (executable-set-magic shell (sh-feature sh-shell-arg)
@@ -2354,7 +2378,7 @@ Calls the value of `sh-set-shell-hook' if set."
   (when font-lock-mode
     (setq font-lock-set-defaults nil)
     (font-lock-set-defaults)
-    (font-lock-fontify-buffer))
+    (font-lock-flush))
   (setq sh-shell-process nil)
   (run-hooks 'sh-set-shell-hook))
 
index 13d4178116e653157578af09a8a13ce981f8a71c..af7cb0dc2f52a18dd9d177d8ee46cdf41ae4f0c6 100644 (file)
 ;; Michael Mauger <michael@mauger.com> -- improved product support
 ;; Drew Adams <drew.adams@oracle.com> -- Emacs 20 support
 ;; Harald Maier <maierh@myself.com> -- sql-send-string
-;; Stefan Monnier <monnier@iro.umontreal.ca> -- font-lock corrections; 
+;; Stefan Monnier <monnier@iro.umontreal.ca> -- font-lock corrections;
 ;;      code polish
 ;; Paul Sleigh <bat@flurf.net> -- MySQL keyword enhancement
 ;; Andrew Schein <andrew@andrewschein.com> -- sql-port bug
-;; Ian Bjorhovde <idbjorh@dataproxy.com> -- db2 escape newlines 
+;; Ian Bjorhovde <idbjorh@dataproxy.com> -- db2 escape newlines
 ;;      incorrectly enabled by default
 ;; Roman Scherer <roman.scherer@nugg.ad> -- Connection documentation
 ;; Mark Wilkinson <wilkinsonmr@gmail.com> -- file-local variables ignored
@@ -282,6 +282,13 @@ file.  Since that is a plaintext file, this could be dangerous."
   :group 'SQL
   :safe 'numberp)
 
+(defcustom sql-default-directory nil
+  "Default directory for SQL processes."
+  :version "25.1"
+  :type '(choice (const nil) string)
+  :group 'SQL
+  :safe 'stringp)
+
 ;; Login parameter type
 
 (define-widget 'sql-login-params 'lazy
@@ -498,6 +505,18 @@ file.  Since that is a plaintext file, this could be dangerous."
      :prompt-length 5
      :syntax-alist ((?@ . "_"))
      :terminator ("^go" . "go"))
+
+    (vertica
+     :name "Vertica"
+     :sqli-program sql-vertica-program
+     :sqli-options sql-vertica-options
+     :sqli-login sql-vertica-login-params
+     :sqli-comint-func sql-comint-vertica
+     :list-all ("\\d" . "\\dS")
+     :list-table "\\d %s"
+     :prompt-regexp "^\\w*=[#>] "
+     :prompt-length 5
+     :prompt-cont-regexp "^\\w*[-(][#>] ")
     )
   "An alist of product specific configuration settings.
 
@@ -1221,7 +1240,9 @@ Based on `comint-mode-map'.")
     (define-key map (kbd "C-c C-r") 'sql-send-region)
     (define-key map (kbd "C-c C-s") 'sql-send-string)
     (define-key map (kbd "C-c C-b") 'sql-send-buffer)
+    (define-key map (kbd "C-c C-n") 'sql-send-line-and-next)
     (define-key map (kbd "C-c C-i") 'sql-product-interactive)
+    (define-key map (kbd "C-c C-z") 'sql-show-sqli-buffer)
     (define-key map (kbd "C-c C-l a") 'sql-list-all)
     (define-key map (kbd "C-c C-l t") 'sql-list-table)
     (define-key map [remap beginning-of-defun] 'sql-beginning-of-statement)
@@ -3050,7 +3071,7 @@ If you call it from anywhere else, it sets the global copy of
   (interactive)
   (let ((default-buffer (sql-find-sqli-buffer)))
     (if (null default-buffer)
-        (user-error "There is no suitable SQLi buffer")
+        (sql-product-interactive)
       (let ((new-buffer (read-buffer "New SQLi buffer: " default-buffer t)))
         (if (null (sql-buffer-live-p new-buffer))
             (user-error "Buffer %s is not a working SQLi buffer" new-buffer)
@@ -3059,21 +3080,20 @@ If you call it from anywhere else, it sets the global copy of
             (run-hooks 'sql-set-sqli-hook)))))))
 
 (defun sql-show-sqli-buffer ()
-  "Show the name of current SQLi buffer.
+  "Display the current SQLi buffer.
 
-This is the buffer SQL strings are sent to.  It is stored in the
-variable `sql-buffer'.  See `sql-help' on how to create such a buffer."
+This is the buffer SQL strings are sent to.
+It is stored in the variable `sql-buffer'.
+I
+See also `sql-help' on how to create such a buffer."
   (interactive)
-  (if (or (null sql-buffer)
-          (null (buffer-live-p (get-buffer sql-buffer))))
-      (user-error "%s has no SQLi buffer set" (buffer-name (current-buffer)))
-    (if (null (get-buffer-process sql-buffer))
-       (user-error "Buffer %s has no process" sql-buffer)
-      (user-error "Current SQLi buffer is %s" sql-buffer))))
+  (unless (and sql-buffer (buffer-live-p (get-buffer sql-buffer))
+               (get-buffer-process sql-buffer))
+    (sql-set-sqli-buffer))
+  (display-buffer sql-buffer))
 
 (defun sql-make-alternate-buffer-name ()
   "Return a string that can be used to rename a SQLi buffer.
-
 This is used to set `sql-alternate-buffer-name' within
 `sql-interactive-mode'.
 
@@ -3323,7 +3343,7 @@ to avoid deleting non-prompt output."
               (setq oline (replace-match "" nil nil oline)
                     sql-output-newline-count (1- sql-output-newline-count)
                     prompt-found t)))
-          
+
           ;; If we've found all the expected prompts, stop looking
           (if (= sql-output-newline-count 0)
               (setq sql-output-newline-count nil
@@ -3403,6 +3423,13 @@ to avoid deleting non-prompt output."
   (interactive)
   (sql-send-region (point-min) (point-max)))
 
+(defun sql-send-line-and-next ()
+  "Send the current line to the SQL process and go to the next line."
+  (interactive)
+  (sql-send-region (line-beginning-position 1) (line-beginning-position 2))
+  (beginning-of-line 2)
+  (while (forward-comment 1)))  ; skip all comments and whitespace
+
 (defun sql-send-magic-terminator (buf str terminator)
   "Send TERMINATOR to buffer BUF if its not present in STR."
   (let (comint-input-sender-no-newline pat term)
@@ -3589,7 +3616,7 @@ buffer is popped into a view window."
          (apply c sqlbuf outbuf enhanced arg nil))
         (t (error "Unknown sql-execute item %s" c))))
    (if (consp command) command (cons command nil)))
-  
+
   (setq outbuf (get-buffer outbuf))
   (if (zerop (buffer-size outbuf))
       (kill-buffer outbuf)
@@ -3597,7 +3624,11 @@ buffer is popped into a view window."
                        (get-lru-window))))
       (with-current-buffer outbuf
         (set-buffer-modified-p nil)
-        (read-only-mode +1))
+        (setq-local revert-buffer-function
+                    (lambda (_ignore-auto _noconfirm)
+                      (sql-execute sqlbuf (buffer-name outbuf)
+                                   command enhanced arg)))
+        (special-mode))
       (pop-to-buffer outbuf)
       (when one-win
         (shrink-window-if-larger-than-buffer)))))
@@ -4164,7 +4195,9 @@ the call to \\[sql-product-interactive] with
                     (sql-password   (default-value 'sql-password))
                     (sql-server     (default-value 'sql-server))
                     (sql-database   (default-value 'sql-database))
-                    (sql-port       (default-value 'sql-port)))
+                    (sql-port       (default-value 'sql-port))
+                    (default-directory (or sql-default-directory
+                                           default-directory)))
                 (funcall (sql-get-product-feature product :sqli-comint-func)
                          product
                          (sql-get-product-feature product :sqli-options)))
@@ -5039,6 +5072,46 @@ buffer.
 
 \f
 
+(defcustom sql-vertica-program "vsql"
+  "Command to start the Vertica client."
+  :version "25.1"
+  :type 'file
+  :group 'SQL)
+
+(defcustom sql-vertica-options '("-P" "pager=off")
+  "List of additional options for `sql-vertica-program'.
+The default value disables the internal pager."
+  :version "25.1"
+  :type '(repeat string)
+  :group 'SQL)
+
+(defcustom sql-vertica-login-params '(user password database server)
+  "List of login parameters needed to connect to Vertica."
+  :version "25.1"
+  :type 'sql-login-params
+  :group 'SQL)
+
+(defun sql-comint-vertica (product options)
+  "Create comint buffer and connect to Vertica."
+  (sql-comint product
+              (nconc
+               (and (not (string= "" sql-server))
+                    (list "-h" sql-server))
+               (and (not (string= "" sql-database))
+                    (list "-d" sql-database))
+               (and (not (string= "" sql-password))
+                    (list "-w" sql-password))
+               (and (not (string= "" sql-user))
+                    (list "-U" sql-user))
+               options)))
+
+;;;###autoload
+(defun sql-vertica (&optional buffer)
+  "Run vsql as an inferior process."
+  (interactive "P")
+  (sql-product-interactive 'vertica buffer))
+
+\f
 (provide 'sql)
 
 ;;; sql.el ends here
index f9efa3732c75e7121adf3a3a5f0d949af16a8d13..e49037e41e7b331e50433a9f27e093916ef9b667 100644 (file)
@@ -1,4 +1,4 @@
-;;; subword.el --- Handling capitalized subwords in a nomenclature
+;;; subword.el --- Handling capitalized subwords in a nomenclature -*- lexical-binding: t -*-
 
 ;; Copyright (C) 2004-2014 Free Software Foundation, Inc.
 
 
 ;;; Commentary:
 
-;; This package was cc-submode.el before it was recognized being
-;; useful in general and not tied to C and c-mode at all.
-
-;; This package provides `subword' oriented commands and a minor mode
-;; (`subword-mode') that substitutes the common word handling
-;; functions with them.  It also provides the `superword-mode' minor
-;; mode that treats symbols as words, the opposite of `subword-mode'.
+;; This package provides the `subword' minor mode, which merges the
+;; old remap-based subword.el (derived from cc-mode code) and
+;; cap-words.el, which takes advantage of core Emacs
+;; word-motion-customization functionality.
 
 ;; In spite of GNU Coding Standards, it is popular to name a symbol by
 ;; mixing uppercase and lowercase letters, e.g. "GtkWidget",
 ;; words.  You also get a mode to treat symbols as words instead,
 ;; called `superword-mode' (the opposite of `subword-mode').
 
-;; In the minor mode, all common key bindings for word oriented
-;; commands are overridden by the subword oriented commands:
-
-;; Key     Word oriented command      Subword oriented command (also superword)
-;; ============================================================
-;; M-f     `forward-word'             `subword-forward'
-;; M-b     `backward-word'            `subword-backward'
-;; M-@     `mark-word'                `subword-mark'
-;; M-d     `kill-word'                `subword-kill'
-;; M-DEL   `backward-kill-word'       `subword-backward-kill'
-;; M-t     `transpose-words'          `subword-transpose'
-;; M-c     `capitalize-word'          `subword-capitalize'
-;; M-u     `upcase-word'              `subword-upcase'
-;; M-l     `downcase-word'            `subword-downcase'
-;;
-;; Note: If you have changed the key bindings for the word oriented
-;; commands in your .emacs or a similar place, the keys you've changed
-;; to are also used for the corresponding subword oriented commands.
-
 ;; To make the mode turn on automatically, put the following code in
 ;; your .emacs:
 ;;
   "Regexp used by `subword-backward-internal'.")
 
 (defvar subword-mode-map
-  (let ((map (make-sparse-keymap)))
-    (dolist (cmd '(forward-word backward-word mark-word kill-word
-                               backward-kill-word transpose-words
-                                capitalize-word upcase-word downcase-word
-                                left-word right-word))
-      (let ((othercmd (let ((name (symbol-name cmd)))
-                        (string-match "\\([[:alpha:]-]+\\)-word[s]?" name)
-                        (intern (concat "subword-" (match-string 1 name))))))
-        (define-key map (vector 'remap cmd) othercmd)))
-    map)
+  ;; We originally remapped motion keys here, but now use Emacs core
+  ;; hooks.  Leave this keymap around so that user additions to it
+  ;; keep working.
+  (make-sparse-keymap)
   "Keymap used in `subword-mode' minor mode.")
 
+;;;###autoload
+(define-obsolete-function-alias
+  'capitalized-words-mode 'subword-mode "25.1")
+
 ;;;###autoload
 (define-minor-mode subword-mode
   "Toggle subword movement and editing (Subword mode).
@@ -121,8 +97,8 @@ With a prefix argument ARG, enable Subword mode if ARG is
 positive, and disable it otherwise.  If called from Lisp, enable
 the mode if ARG is omitted or nil.
 
-Subword mode is a buffer-local minor mode.  Enabling it remaps
-word-based editing commands to subword-based commands that handle
+Subword mode is a buffer-local minor mode.  Enabling it changes
+the definition of a word so that word-based commands stop inside
 symbols with mixed uppercase and lowercase letters,
 e.g. \"GtkWidget\", \"EmacsFrameClass\", \"NSGraphicsContext\".
 
@@ -136,13 +112,13 @@ called a `subword'.  Here are some examples:
   EmacsFrameClass    =>  \"Emacs\", \"Frame\" and \"Class\"
   NSGraphicsContext  =>  \"NS\", \"Graphics\" and \"Context\"
 
-The subword oriented commands activated in this minor mode recognize
-subwords in a nomenclature to move between subwords and to edit them
-as words.
+This mode changes the definition of a word so that word commands
+treat nomenclature boundaries as word boundaries.
 
 \\{subword-mode-map}"
     :lighter " ,"
-    (when subword-mode (superword-mode -1)))
+    (when subword-mode (superword-mode -1))
+    (subword-setup-buffer))
 
 (define-obsolete-function-alias 'c-subword-mode 'subword-mode "23.2")
 
@@ -151,6 +127,13 @@ as words.
   (lambda () (subword-mode 1))
   :group 'convenience)
 
+;; N.B. These commands aren't used unless explicitly invoked; they're
+;; here for compatibility.  Today, subword-mode leaves motion commands
+;; alone and uses `find-word-boundary-function-table' to change how
+;; `forward-word' and other low-level commands detect word boundaries.
+;; This way, all word-related activities, not just the images we
+;; imagine here, get subword treatment.
+
 (defun subword-forward (&optional arg)
   "Do the same as `forward-word' but on subwords.
 See the command `subword-mode' for a description of subwords.
@@ -159,10 +142,10 @@ Optional argument ARG is the same as for `forward-word'."
   (unless arg (setq arg 1))
   (cond
    ((< 0 arg)
-    (dotimes (i arg (point))
+    (dotimes (_i arg (point))
       (funcall subword-forward-function)))
    ((> 0 arg)
-    (dotimes (i (- arg) (point))
+    (dotimes (_i (- arg) (point))
       (funcall subword-backward-function)))
    (t
     (point))))
@@ -262,7 +245,7 @@ Optional argument ARG is the same as for `capitalize-word'."
             (start (point))
             (advance (>= arg 0)))
 
-        (dotimes (i count)
+        (dotimes (_i count)
           (if advance
               (progn
                 (re-search-forward "[[:alpha:]]")
@@ -290,17 +273,15 @@ With a prefix argument ARG, enable Superword mode if ARG is
 positive, and disable it otherwise.  If called from Lisp, enable
 the mode if ARG is omitted or nil.
 
-Superword mode is a buffer-local minor mode.  Enabling it remaps
-word-based editing commands to superword-based commands that
-treat symbols as words, e.g. \"this_is_a_symbol\".
-
-The superword oriented commands activated in this minor mode
-recognize symbols as superwords to move between superwords and to
-edit them as words.
+Superword mode is a buffer-local minor mode.  Enabling it changes
+the definition of words such that symbols characters are treated
+as parts of words: e.g., in `superword-mode',
+\"this_is_a_symbol\" counts as one word.
 
 \\{superword-mode-map}"
     :lighter " ²"
-    (when superword-mode (subword-mode -1)))
+    (when superword-mode (subword-mode -1))
+    (subword-setup-buffer))
 
 ;;;###autoload
 (define-global-minor-mode global-superword-mode superword-mode
@@ -347,9 +328,45 @@ edit them as words.
            (1+ (match-beginning 0)))))
       (backward-word 1))))
 
+(defconst subword-find-word-boundary-function-table
+  (let ((tab (make-char-table nil)))
+    (set-char-table-range tab t #'subword-find-word-boundary)
+    tab)
+  "Assigned to `find-word-boundary-function-table' in
+`subword-mode' and `superword-mode'; defers to
+`subword-find-word-boundary'.")
+
+(defconst subword-empty-char-table
+  (make-char-table nil)
+  "Assigned to `find-word-boundary-function-table' while we're
+searching subwords in order to avoid unwanted reentrancy.")
+
+(defun subword-setup-buffer ()
+  (set (make-local-variable 'find-word-boundary-function-table)
+       (if (or subword-mode superword-mode)
+           subword-find-word-boundary-function-table
+         subword-empty-char-table)))
+
+(defun subword-find-word-boundary (pos limit)
+  "Catch-all handler in `subword-find-word-boundary-function-table'."
+  (let ((find-word-boundary-function-table subword-empty-char-table))
+    (save-match-data
+      (save-excursion
+        (save-restriction
+          (if (< pos limit)
+              (progn
+                (goto-char pos)
+                (narrow-to-region (point-min) limit)
+                (funcall subword-forward-function))
+            (goto-char (1+ pos))
+            (narrow-to-region limit (point-max))
+            (funcall subword-backward-function))
+          (point))))))
+
 \f
 
 (provide 'subword)
 (provide 'superword)
+(provide 'cap-words) ; Obsolete alias
 
 ;;; subword.el ends here
index 069e7119b906c5baaf035ead6fd9872418f68d88..6a88c6ff0ab9413a1f01e3735de5773812dab623 100644 (file)
@@ -138,7 +138,6 @@ If nil, TAB always indents current line."
     (define-key map "\C-c\t"   'indent-according-to-mode)
     (define-key map "\M-\C-\\" 'vera-indent-region)
     (define-key map "\C-c\C-c" 'vera-comment-uncomment-region)
-    (define-key map "\C-c\C-f" 'vera-fontify-buffer)
     (define-key map "\C-c\C-v" 'vera-version)
     (define-key map "\M-\t"    'tab-to-tab-stop)
     ;; Electric key bindings.
@@ -172,8 +171,6 @@ If nil, TAB always indents current line."
     ["Indent Region"           vera-indent-region (mark)]
     ["Indent Buffer"           vera-indent-buffer t]
     "--"
-    ["Fontify Buffer"          vera-fontify-buffer t]
-    "--"
     ["Documentation"           describe-mode]
     ["Version"                 vera-version t]
     ["Bug Report..."           vera-submit-bug-report t]
@@ -686,7 +683,8 @@ Adapted from `font-lock-match-c-style-declaration-item-and-skip-to-next'."
   "Font lock mode face used to highlight interface names."
   :group 'font-lock-highlighting-faces)
 
-(defalias 'vera-fontify-buffer 'font-lock-fontify-buffer)
+(define-obsolete-function-alias 'vera-fontify-buffer
+  'font-lock-fontify-buffer "25.1")
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; Indentation
index 84d7c15f76ceddaaa2ec11144f4c634728f1a03f..71af582578d6ffc4fb5155c59c5c8ca2332c378f 100644 (file)
 ;;; Code:
 
 ;; This variable will always hold the version number of the mode
-(defconst verilog-mode-version "2013-11-05-78e66ba-vpo"
+(defconst verilog-mode-version "2014-10-03-c075a49-vpo"
   "Version of this Verilog mode.")
 (defconst verilog-mode-release-emacs t
   "If non-nil, this version of Verilog mode was released with Emacs itself.")
@@ -1020,6 +1020,20 @@ SystemVerilog designs."
   :type 'string)
 (put 'verilog-assignment-delay 'safe-local-variable 'stringp)
 
+(defcustom verilog-auto-arg-format 'packed
+  "Formatting to use for AUTOARG signal names.
+If 'packed', then as many inputs and outputs that fit within
+`fill-column' will be put onto one line.
+
+If 'single', then a single input or output will be put onto each
+line."
+  :version "25.1"
+  :type '(radio (const :tag "Line up Assignments and Declarations" packed)
+               (const :tag "Line up Assignment statements" single))
+  :group 'verilog-mode-auto)
+(put 'verilog-auto-arg-format 'safe-local-variable
+     '(lambda (x) (memq x '(packed single))))
+
 (defcustom verilog-auto-arg-sort nil
   "Non-nil means AUTOARG signal names will be sorted, not in declaration order.
 Declaration order is advantageous with order based instantiations
@@ -1460,6 +1474,8 @@ If set will become buffer local.")
        :help           "Help on AUTOINPUT - adding inputs from cells"]
       ["AUTOINSERTLISP"                        (describe-function 'verilog-auto-insert-lisp)
        :help           "Help on AUTOINSERTLISP - insert text from a lisp function"]
+      ["AUTOINSERTLAST"                        (describe-function 'verilog-auto-insert-last)
+       :help           "Help on AUTOINSERTLISPLAST - insert text from a lisp function"]
       ["AUTOINST"                      (describe-function 'verilog-auto-inst)
        :help           "Help on AUTOINST - adding pins for cells"]
       ["AUTOINST (.*)"                 (describe-function 'verilog-auto-star)
@@ -1634,7 +1650,7 @@ will break, as the o's continuously replace.  xa -> x works ok though."
     string))
 
 (defsubst verilog-re-search-forward (REGEXP BOUND NOERROR)
-  ; checkdoc-params: (REGEXP BOUND NOERROR)
+  ;; checkdoc-params: (REGEXP BOUND NOERROR)
   "Like `re-search-forward', but skips over match in comments or strings."
   (let ((mdata '(nil nil)))  ;; So match-end will return nil if no matches found
     (while (and
@@ -1650,7 +1666,7 @@ will break, as the o's continuously replace.  xa -> x works ok though."
     (match-end 0)))
 
 (defsubst verilog-re-search-backward (REGEXP BOUND NOERROR)
-  ; checkdoc-params: (REGEXP BOUND NOERROR)
+  ;; checkdoc-params: (REGEXP BOUND NOERROR)
   "Like `re-search-backward', but skips over match in comments or strings."
   (let ((mdata '(nil nil)))  ;; So match-end will return nil if no matches found
     (while (and
@@ -1679,7 +1695,7 @@ so there may be a large up front penalty for the first search."
     pt))
 
 (defsubst verilog-re-search-backward-quick (regexp bound noerror)
-  ; checkdoc-params: (REGEXP BOUND NOERROR)
+  ;; checkdoc-params: (REGEXP BOUND NOERROR)
   "Like `verilog-re-search-backward', including use of REGEXP BOUND and NOERROR,
 but trashes match data and is faster for REGEXP that doesn't match often.
 This uses `verilog-scan' and text properties to ignore comments,
@@ -1748,6 +1764,7 @@ To call on \\[verilog-auto], set `verilog-auto-delete-trailing-whitespace'."
     (unless (bolp) (insert "\n"))))
 
 (defvar compile-command)
+(defvar create-lockfiles)  ;; Emacs 24
 
 ;; compilation program
 (defun verilog-set-compile-command ()
@@ -2250,7 +2267,10 @@ find the errors."
          ;;  "\\(assert\\|assume\\|cover\\)\\s-+property\\>"
 
 (defconst verilog-no-indent-begin-re
-  "\\<\\(if\\|else\\|while\\|for\\|repeat\\|always\\|always_comb\\|always_ff\\|always_latch\\)\\>")
+  (eval-when-compile
+    (verilog-regexp-words
+     '( "if" "else" "while" "for" "repeat" "always" "always_comb" "always_ff" "always_latch"
+       "initial" "final"))))
 
 (defconst verilog-ends-re
   ;; Parenthesis indicate type of keyword found
@@ -2704,9 +2724,9 @@ find the errors."
 (defconst verilog-disable-fork-re "\\(disable\\|wait\\)\\s-+fork\\>")
 (defconst verilog-extended-case-re "\\(\\(unique0?\\s-+\\|priority\\s-+\\)?case[xz]?\\)")
 (defconst verilog-extended-complete-re
-  (concat "\\(\\(\\<extern\\s-+\\|\\<\\(\\<pure\\>\\s-+\\)?virtual\\s-+\\|\\<protected\\s-+\\)*\\(\\<function\\>\\|\\<task\\>\\)\\)"
+  (concat "\\(\\(\\<extern\\s-+\\|\\<\\(\\<\\(pure\\|context\\)\\>\\s-+\\)?virtual\\s-+\\|\\<protected\\s-+\\)*\\(\\<function\\>\\|\\<task\\>\\)\\)"
          "\\|\\(\\(\\<typedef\\>\\s-+\\)*\\(\\<struct\\>\\|\\<union\\>\\|\\<class\\>\\)\\)"
-         "\\|\\(\\(\\<import\\>\\s-+\\)?\\(\"DPI-C\"\\s-+\\)?\\(\\<pure\\>\\s-+\\)?\\(function\\>\\|task\\>\\)\\)"
+         "\\|\\(\\(\\<import\\>\\s-+\\)?\\(\"DPI-C\"\\s-+\\)?\\(\\<\\(pure\\|context\\)\\>\\s-+\\)?\\([A-Za-z_][A-Za-z0-9_]*\\s-+=\\s-+\\)?\\(function\\>\\|task\\>\\)\\)"
          "\\|" verilog-extended-case-re ))
 (defconst verilog-basic-complete-re
   (eval-when-compile
@@ -2788,8 +2808,8 @@ find the errors."
      "sync_reject_on" "unique0" "until" "until_with" "untyped" "weak"
      ;; 1800-2012
      "implements" "interconnect" "nettype" "soft"
- )
- "List of Verilog keywords.")
    )
 "List of Verilog keywords.")
 
 (defconst verilog-comment-start-regexp "//\\|/\\*"
   "Dual comment value for `comment-start-regexp'.")
@@ -2906,7 +2926,7 @@ See also `verilog-font-lock-extra-types'.")
           '(
             "and" "bit" "buf" "bufif0" "bufif1" "cmos" "defparam"
             "event" "genvar" "inout" "input" "integer" "localparam"
-            "logic" "mailbox" "nand" "nmos" "not" "notif0" "notif1" "or"
+            "logic" "mailbox" "nand" "nmos" "nor" "not" "notif0" "notif1" "or"
             "output" "parameter" "pmos" "pull0" "pull1" "pulldown" "pullup"
             "rcmos" "real" "realtime" "reg" "rnmos" "rpmos" "rtran"
             "rtranif0" "rtranif1" "semaphore" "signed" "struct" "supply"
@@ -3332,9 +3352,9 @@ Use filename, if current buffer being edited shorten to just buffer name."
                  (verilog-re-search-backward reg nil 'move))
        (cond
         ((match-end 1) ; matched verilog-end-block-re
-       ; try to leap back to matching outward block by striding across
-       ; indent level changing tokens then immediately
-       ; previous line governs indentation.
+         ;; try to leap back to matching outward block by striding across
+         ;; indent level changing tokens then immediately
+         ;; previous line governs indentation.
          (verilog-leap-to-head))
         ((match-end 2) ; else, we're in deep
          (setq elsec (1+ elsec)))
@@ -3992,7 +4012,7 @@ This puts the mark at the end, and point at the beginning."
     (mark-defun)))
 
 (defun verilog-comment-region (start end)
-  ; checkdoc-params: (start end)
+  ;; checkdoc-params: (start end)
   "Put the region into a Verilog comment.
 The comments that are in this area are \"deformed\":
 `*)' becomes `!(*' and `}' becomes `!{'.
@@ -4223,7 +4243,7 @@ Uses `verilog-scan' cache."
      ((equal (char-after) ?\})
       (forward-char))
 
-      ;; Skip to end of statement
+     ;; Skip to end of statement
      ((condition-case nil
        (setq pos
              (catch 'found
@@ -4285,7 +4305,7 @@ More specifically, point @ in the line foo : @ begin"
                (setq nest (1+ nest)))
               ((match-end 2)
                (if (= nest 1)
-               (throw 'found 1))
+                   (throw 'found 1))
                (setq nest (1- nest)))
               (t
                (throw 'found (= nest 0)))))))
@@ -4430,6 +4450,7 @@ Limit search to point LIM."
          "\\(`ifdef\\>\\)\\|"
          "\\(`ifndef\\>\\)\\|"
          "\\(`elsif\\>\\)"))
+
 (defun verilog-set-auto-endcomments (indent-str kill-existing-comment)
   "Add ending comment with given INDENT-STR.
 With KILL-EXISTING-COMMENT, remove what was there before.
@@ -5078,13 +5099,13 @@ FILENAME to find directory to run in, or defaults to `buffer-file-name`."
    (list
     (let ((default (verilog-expand-command verilog-preprocessor)))
       (set (make-local-variable `verilog-preprocessor)
-             (read-from-minibuffer "Run Preprocessor (like this): "
-                                    default nil nil
-                                     'verilog-preprocess-history default)))))
+          (read-from-minibuffer "Run Preprocessor (like this): "
+                                default nil nil
+                                'verilog-preprocess-history default)))))
   (unless command (setq command (verilog-expand-command verilog-preprocessor)))
   (let* ((fontlocked (and (boundp 'font-lock-mode) font-lock-mode))
-         (dir (file-name-directory (or filename buffer-file-name)))
-          (cmd (concat "cd " dir "; " command)))
+        (dir (file-name-directory (or filename buffer-file-name)))
+        (cmd (concat "cd " dir "; " command)))
     (with-output-to-temp-buffer "*Verilog-Preprocessed*"
       (with-current-buffer (get-buffer "*Verilog-Preprocessed*")
        (insert (concat "// " cmd "\n"))
@@ -5092,7 +5113,11 @@ FILENAME to find directory to run in, or defaults to `buffer-file-name`."
        (verilog-mode)
        ;; Without this force, it takes a few idle seconds
        ;; to get the color, which is very jarring
-       (when fontlocked (font-lock-fontify-buffer))))))
+        (unless (fboundp 'font-lock-ensure)
+          ;; We should use font-lock-ensure in preference to
+          ;; font-lock-fontify-buffer, but IIUC the problem this is supposed to
+          ;; solve only appears in Emacsen older than font-lock-ensure anyway.
+          (when fontlocked (font-lock-fontify-buffer)))))))
 \f
 
 ;;
@@ -5138,23 +5163,29 @@ Save the result unless optional NO-SAVE is t."
    ;; Make sure any sub-files we read get proper mode
    (setq-default major-mode 'verilog-mode)
    ;; Ditto files already read in
-   (mapc (lambda (buf)
-          (when (buffer-file-name buf)
-            (with-current-buffer buf
-              (verilog-mode))))
-        (buffer-list))
-   ;; Process the files
-   (mapcar (lambda (buf)
+   ;; Remember buffer list, so don't later pickup any verilog-getopt files
+   (let ((orig-buffer-list (buffer-list)))
+     (mapc (lambda (buf)
             (when (buffer-file-name buf)
-              (save-excursion
-                (if (not (file-exists-p (buffer-file-name buf)))
-                    (error
-                     (concat "File not found: " (buffer-file-name buf))))
-                (message (concat "Processing " (buffer-file-name buf)))
-                (set-buffer buf)
-                (funcall funref)
-                (unless no-save (save-buffer)))))
-          (buffer-list))))
+              (with-current-buffer buf
+                (verilog-mode)
+                (verilog-auto-reeval-locals)
+                (verilog-getopt-flags))))
+          orig-buffer-list)
+     ;; Process the files
+     (mapcar (lambda (buf)
+              (when (buffer-file-name buf)
+                (save-excursion
+                  (if (not (file-exists-p (buffer-file-name buf)))
+                      (error
+                       (concat "File not found: " (buffer-file-name buf))))
+                  (message (concat "Processing " (buffer-file-name buf)))
+                  (set-buffer buf)
+                  (funcall funref)
+                  (when (and (not no-save)
+                             (buffer-modified-p)) ;; Avoid "no changes to be saved"
+                    (save-buffer)))))
+            orig-buffer-list))))
 
 (defun verilog-batch-auto ()
   "For use with --batch, perform automatic expansions as a stand-alone tool.
@@ -5271,7 +5302,7 @@ Return a list of two elements: (INDENT-TYPE INDENT-LEVEL)."
                   (if (save-excursion (beginning-of-line)
                                       (and (looking-at verilog-directive-re-1)
                                            (not (or (looking-at "[ \t]*`[ou]vm_")
-                                 (looking-at "[ \t]*`vmm_")))))
+                                                    (looking-at "[ \t]*`vmm_")))))
                       (throw 'nesting 'directive))
            ;; indent structs as if there were module level
            (setq structres (verilog-in-struct-nested-p))
@@ -5510,10 +5541,10 @@ Return a list of two elements: (INDENT-TYPE INDENT-LEVEL)."
                                        ; endfunction
              (verilog-beg-of-statement)
              (if (looking-at verilog-beg-block-re-ordered)
-              (throw 'nesting 'block)
-            (throw 'nesting 'defun)))
+                 (throw 'nesting 'block)
+               (throw 'nesting 'defun)))
 
-         ;;
+            ;;
             ((looking-at "\\<property\\>")
                                        ; *sigh*
                                        ;    {assert|assume|cover} property (); are complete
@@ -5704,7 +5735,7 @@ Jump from end to matching begin, from endcase to matching case, and so on."
                    (setq sreg reg)
                    (setq reg "\\(\\<fork\\>\\)\\|\\(\\<join\\(_any\\|_none\\)?\\>\\)" ))
                   )))
-           ;no nesting
+           ;no nesting
            (if (and
                 (verilog-re-search-backward reg nil 'move)
                 (match-end 1)) ; task -> could be virtual and/or protected
@@ -6547,10 +6578,9 @@ Be verbose about progress unless optional QUIET set."
                      endpos (set-marker (make-marker) end)
                      base-ind (progn
                                 (goto-char start)
-                 (forward-char 1)
-                 (skip-chars-forward " \t")
-                 (current-column))
-                     )
+                                (forward-char 1)
+                                (skip-chars-forward " \t")
+                                (current-column)))
              ;; in a declaration block (not in argument list)
              (setq
               start (progn
@@ -8065,7 +8095,7 @@ Optional NUM-PARAM and MAX-PARAM check for a specific number of parameters."
 Return an array of [outputs inouts inputs wire reg assign const]."
   (let ((end-mod-point (or (verilog-get-end-of-defun) (point-max)))
        (functask 0) (paren 0) (sig-paren 0) (v2kargs-ok t)
-       in-modport in-clocking ptype ign-prop
+       in-modport in-clocking in-ign-to-semi ptype ign-prop
        sigs-in sigs-out sigs-inout sigs-var sigs-assign sigs-const
        sigs-gparam sigs-intf sigs-modports
        vec expect-signal keywd newsig rvalue enum io signed typedefed multidim
@@ -8097,19 +8127,24 @@ Return an array of [outputs inouts inputs wire reg assign const]."
          (or (re-search-forward "[^\\]\"" nil t)       ;; don't forward-char first, since we look for a non backslash first
              (error "%s: Unmatched quotes, at char %d" (verilog-point-text) (point))))
         ((eq ?\; (following-char))
-         (when (and in-modport (not (eq in-modport t))) ;; end of a modport declaration
-           (verilog-modport-decls-set
-            in-modport
-            (verilog-decls-new sigs-out sigs-inout sigs-in
-                               nil nil nil nil nil nil))
-           ;; Pop from varstack to restore state to pre-clocking
-           (setq tmp (car varstack)
-                 varstack (cdr varstack)
-                 sigs-out (aref tmp 0)
-                 sigs-inout (aref tmp 1)
-                 sigs-in (aref tmp 2)))
-         (setq vec nil  io nil  expect-signal nil  newsig nil  paren 0  rvalue nil
-               v2kargs-ok nil  in-modport nil  ign-prop nil)
+         (cond (in-ign-to-semi  ;; Such as inside a "import ...;" in a module header
+                (setq in-ign-to-semi nil))
+               ((and in-modport (not (eq in-modport t))) ;; end of a modport declaration
+                (verilog-modport-decls-set
+                 in-modport
+                 (verilog-decls-new sigs-out sigs-inout sigs-in
+                                    nil nil nil nil nil nil))
+                ;; Pop from varstack to restore state to pre-clocking
+                (setq tmp (car varstack)
+                      varstack (cdr varstack)
+                      sigs-out (aref tmp 0)
+                      sigs-inout (aref tmp 1)
+                      sigs-in (aref tmp 2))
+                (setq vec nil  io nil  expect-signal nil  newsig nil  paren 0  rvalue nil
+                      v2kargs-ok nil  in-modport nil  ign-prop nil))
+               (t
+                (setq vec nil  io nil  expect-signal nil  newsig nil  paren 0  rvalue nil
+                      v2kargs-ok nil  in-modport nil  ign-prop nil)))
          (forward-char 1))
         ((eq ?= (following-char))
          (setq rvalue t  newsig nil)
@@ -8212,8 +8247,12 @@ Return an array of [outputs inouts inputs wire reg assign const]."
                 (setq in-modport t))
                ((equal keywd "clocking")
                 (setq in-clocking t))
+               ((equal keywd "import")
+                (if v2kargs-ok  ;; import in module header, not a modport import
+                    (setq in-ign-to-semi t  rvalue t)))
                ((equal keywd "type")
                 (setq ptype t))
+               ((equal keywd "var"))
                ;; Ifdef?  Ignore name of define
                ((member keywd '("`ifdef" "`ifndef" "`elsif"))
                 (setq rvalue t))
@@ -8224,7 +8263,8 @@ Return an array of [outputs inouts inputs wire reg assign const]."
                        (setq typedefed
                              (if typedefed (concat typedefed " " keywd) keywd)))
                       (t (setq vec nil  enum nil  rvalue nil  signed nil
-                               typedefed nil  multidim nil  sig-paren paren
+                               typedefed keywd  ; Have a type
+                               multidim nil  sig-paren paren
                                expect-signal 'sigs-var  modport nil))))
                ;; Interface with optional modport in v2k arglist?
                ;; Skip over parsing modport, and take the interface name as the type
@@ -8285,6 +8325,7 @@ Return an array of [outputs inouts inputs wire reg assign const]."
                      (eq functask 0)
                      (not (member keywd verilog-keywords)))
                 ;; Add new signal to expect-signal's variable
+                ;;(if dbg (setq dbg (concat dbg (format "Pt %s  New sig %s'\n" (point) keywd))))
                 (setq newsig (verilog-sig-new keywd vec nil nil enum signed typedefed multidim modport))
                 (set expect-signal (cons newsig
                                          (symbol-value expect-signal))))))
@@ -9138,7 +9179,7 @@ foo.v (an include file):
        `define _FOO_V
        ... contents of file
        `endif // _FOO_V"
-;;slow:  (verilog-read-defines nil t))
+  ;;slow:  (verilog-read-defines nil t)
   (save-excursion
     (verilog-getopt-flags)
     (goto-char (point-min))
@@ -9527,7 +9568,7 @@ variables to build the path.  With optional CHECK-EXT also check
                   (setq outlist (cons (expand-file-name
                                        fn (file-name-directory current))
                                       outlist)))
-                (setq chkexts (cdr chkexts)))
+              (setq chkexts (cdr chkexts)))
             (setq chkdirs (cdr chkdirs)))
           (setq outlist (nreverse outlist))
           (setq verilog-dir-cache-lib-filenames
@@ -9624,7 +9665,7 @@ Return modi if successful, else print message unless IGNORE-ERROR is true."
                allow-cache
                (setq modi (gethash module verilog-modi-lookup-cache))
                (equal verilog-modi-lookup-last-current current)
-               ;; Iff hit is in current buffer, then tick must match
+               ;; If hit is in current buffer, then tick must match
                (or (equal verilog-modi-lookup-last-tick (buffer-chars-modified-tick))
                    (not (equal current (verilog-modi-file-or-buffer modi)))))
           ;;(message "verilog-modi-lookup: HIT %S" modi)
@@ -10602,7 +10643,7 @@ If FORCE, always reread it."
 ;;
 
 (defun verilog-auto-arg-ports (sigs message indent-pt)
-  "Print a list of ports for an AUTOINST.
+  "Print a list of ports for AUTOARG.
 Takes SIGS list, adds MESSAGE to front and inserts each at INDENT-PT."
   (when sigs
     (when verilog-auto-arg-sort
@@ -10614,13 +10655,20 @@ Takes SIGS list, adds MESSAGE to front and inserts each at INDENT-PT."
     (let ((space ""))
       (indent-to indent-pt)
       (while sigs
-       (cond ((> (+ 2 (current-column) (length (verilog-sig-name (car sigs)))) fill-column)
+       (cond ((equal verilog-auto-arg-format 'single)
+              (insert space)
+              (indent-to indent-pt)
+              (setq space "\n"))
+             ;; verilog-auto-arg-format 'packed
+             ((> (+ 2 (current-column) (length (verilog-sig-name (car sigs)))) fill-column)
               (insert "\n")
-              (indent-to indent-pt))
-             (t (insert space)))
+              (indent-to indent-pt)
+              (setq space " "))
+             (t
+              (insert space)
+              (setq space " ")))
        (insert (verilog-sig-name (car sigs)) ",")
-       (setq sigs (cdr sigs)
-             space " ")))))
+       (setq sigs (cdr sigs))))))
 
 (defun verilog-auto-arg ()
   "Expand AUTOARG statements.
@@ -10655,9 +10703,11 @@ Typing \\[verilog-auto] will make this into:
          output o;
        endmodule
 
-The argument declarations may be printed in declaration order to best suit
-order based instantiations, or alphabetically, based on the
-`verilog-auto-arg-sort' variable.
+The argument declarations may be printed in declaration order to
+best suit order based instantiations, or alphabetically, based on
+the `verilog-auto-arg-sort' variable.
+
+Formatting is controlled with `verilog-auto-arg-format' variable.
 
 Any ports declared between the ( and /*AUTOARG*/ are presumed to be
 predeclared and are not redeclared by AUTOARG.  AUTOARG will make a
@@ -11773,10 +11823,18 @@ Typing \\[verilog-auto] will make this into:
           wire tempa = i;
           wire tempb = tempa;
           wire o = tempb;
-       endmodule"
+       endmodule
+
+You may also provide an optional regular expression, in which case only
+signals matching the regular expression will be included.  For example the
+same expansion will result from only extracting outputs starting with ov:
+
+          /*AUTOOUTPUTEVERY(\"^ov\")*/"
   (save-excursion
     ;;Point must be at insertion point
     (let* ((indent-pt (current-indentation))
+          (params (verilog-read-auto-params 0 1))
+          (regexp (nth 0 params))
           (v2k  (verilog-in-paren-quick))
           (modi (verilog-modi-current))
           (moddecls (verilog-modi-get-decls modi))
@@ -11784,6 +11842,11 @@ Typing \\[verilog-auto] will make this into:
                      (verilog-signals-not-in
                       (verilog-decls-get-signals moddecls)
                       (verilog-decls-get-ports moddecls)))))
+      (when regexp
+       (setq sig-list (verilog-signals-matching-regexp
+                       sig-list regexp)))
+      (setq sig-list (verilog-signals-not-matching-regexp
+                     sig-list verilog-auto-output-ignore-regexp))
       (verilog-forward-or-insert-line)
       (when v2k (verilog-repair-open-comma))
       (when sig-list
@@ -12071,7 +12134,7 @@ against the previous example's module:
                             (verilog-signals-matching-regexp sig-list-if regexp)
                             "interface" direction-re))
          (when v2k (verilog-repair-open-comma))
-         (when (or sig-list-i sig-list-o sig-list-io)
+         (when (or sig-list-i sig-list-o sig-list-io sig-list-if)
            (verilog-insert-indent "// Beginning of automatic in/out/inouts (from specific module)\n")
            ;; Don't sort them so an upper AUTOINST will match the main module
            (verilog-insert-definition modi sig-list-o  "output" indent-pt v2k t)
@@ -12374,9 +12437,13 @@ driver/monitor using AUTOINST in the testbench."
 
 (defun verilog-auto-insert-lisp ()
   "Expand AUTOINSERTLISP statements, as part of \\[verilog-auto].
-The Lisp code provided is called, and the Lisp code calls
-`insert` to insert text into the current file beginning on the
-line after the AUTOINSERTLISP.
+The Lisp code provided is called before other AUTOS are expanded,
+and the Lisp code generally will call `insert` to insert text
+into the current file beginning on the line after the
+AUTOINSERTLISP.
+
+See also AUTOINSERTLAST and `verilog-auto-insert-last' which
+executes after (as opposed to before) other AUTOs.
 
 See also AUTO_LISP, which takes a Lisp expression and evaluates
 it during `verilog-auto-inst' but does not insert any text.
@@ -12433,6 +12500,20 @@ text:
       (setq verilog-scan-cache-tick nil) ;; Clear cache; inserted unknown text
       (verilog-delete-empty-auto-pair))))
 
+(defun verilog-auto-insert-last ()
+  "Expand AUTOINSERTLAST statements, as part of \\[verilog-auto].
+The Lisp code provided is called after all other AUTOS have been
+expanded, and the Lisp code generally will call `insert` to
+insert text into the current file beginning on the line after the
+AUTOINSERTLAST.
+
+Other than when called (after AUTOs are expanded), the functionality
+is otherwise identical to AUTOINSERTLISP and `verilog-auto-insert-lisp' which
+executes before (as opposed to after) other AUTOs.
+
+See `verilog-auto-insert-lisp' for examples."
+  (verilog-auto-insert-lisp))
+
 (defun verilog-auto-sense-sigs (moddecls presense-sigs)
   "Return list of signals for current AUTOSENSE block."
   (let* ((sigss (verilog-read-always-signals))
@@ -13159,6 +13240,7 @@ Using \\[describe-function], see also:
     `verilog-auto-inout-param'  for AUTOINOUTPARAM copying params from elsewhere
     `verilog-auto-input'        for AUTOINPUT making hierarchy inputs
     `verilog-auto-insert-lisp'  for AUTOINSERTLISP insert code from lisp function
+    `verilog-auto-insert-last'  for AUTOINSERTLAST insert code from lisp function
     `verilog-auto-inst'         for AUTOINST instantiation pins
     `verilog-auto-star'         for AUTOINST .* SystemVerilog pins
     `verilog-auto-inst-param'   for AUTOINSTPARAM instantiation params
@@ -13235,7 +13317,6 @@ Wilson Snyder (wsnyder@wsnyder.org)."
                 (verilog-inject-arg))
               ;;
               ;; Do user inserts first, so their code can insert AUTOs
-              ;; We may provide an AUTOINSERTLISPLAST if another cleanup pass is needed
               (verilog-auto-re-search-do "/\\*AUTOINSERTLISP(.*?)\\*/"
                                          'verilog-auto-insert-lisp)
               ;; Expand instances before need the signals the instances input/output
@@ -13269,11 +13350,13 @@ Wilson Snyder (wsnyder@wsnyder.org)."
               (verilog-auto-re-search-do "/\\*AUTOREG\\*/" 'verilog-auto-reg)
               (verilog-auto-re-search-do "/\\*AUTOREGINPUT\\*/" 'verilog-auto-reg-input)
               ;; outputevery needs AUTOOUTPUTs done first
-              (verilog-auto-re-search-do "/\\*AUTOOUTPUTEVERY\\*/" 'verilog-auto-output-every)
+              (verilog-auto-re-search-do "/\\*AUTOOUTPUTEVERY\\((.*?)\\)?\\*/" 'verilog-auto-output-every)
               ;; After we've created all new variables
               (verilog-auto-re-search-do "/\\*AUTOUNUSED\\*/" 'verilog-auto-unused)
               ;; Must be after all inputs outputs are generated
               (verilog-auto-re-search-do "/\\*AUTOARG\\*/" 'verilog-auto-arg)
+              ;; User inserts
+              (verilog-auto-re-search-do "/\\*AUTOINSERTLAST(.*?)\\*/" 'verilog-auto-insert-last)
               ;; Fix line numbers (comments only)
               (when verilog-auto-inst-template-numbers
                 (verilog-auto-templated-rel))
@@ -13442,7 +13525,7 @@ See also `verilog-header' for an alternative format."
   > "`ovm_object_utils_begin(" name ")" \n
   > (- verilog-indent-level) " `ovm_object_utils_end" \n
   > _ \n
-  > "function new(name=\"" name "\");" \n
+  > "function new(string name=\"" name "\");" \n
   > "super.new(name);" \n
   > (- verilog-indent-level) "endfunction" \n
   > _ \n
@@ -13456,7 +13539,7 @@ See also `verilog-header' for an alternative format."
   > "`uvm_object_utils_begin(" name ")" \n
   > (- verilog-indent-level) "`uvm_object_utils_end" \n
   > _ \n
-  > "function new(name=\"" name "\");" \n
+  > "function new(string name=\"" name "\");" \n
   > "super.new(name);" \n
   > (- verilog-indent-level) "endfunction" \n
   > _ \n
@@ -13470,7 +13553,7 @@ See also `verilog-header' for an alternative format."
   > "`uvm_component_utils_begin(" name ")" \n
   > (- verilog-indent-level) "`uvm_component_utils_end" \n
   > _ \n
-  > "function new(name=\"\", uvm_component parent);" \n
+  > "function new(string name=\"\", uvm_component parent);" \n
   > "super.new(name, parent);" \n
   > (- verilog-indent-level) "endfunction" \n
   > _ \n
@@ -13538,8 +13621,7 @@ for sensitivity list."
   ()
   > "begin" '(verilog-sk-prompt-name) \n
   > _ \n
-  > (- verilog-indent-level-behavioral) "end"
-)
+  > (- verilog-indent-level-behavioral) "end" )
 
 (define-skeleton verilog-sk-fork
   "Insert a fork join block."
index b422cf6c989c4061c665c440e8bf689ebda418f3..3d5a3980a94d51a8d2e798b4c9ae657d74a6ec2f 100644 (file)
 ;; filed in the Emacs bug reporting system against this file, a copy
 ;; of the bug report be sent to the maintainer's email address.
 
-(defconst vhdl-version "3.34.2"
+(defconst vhdl-version "3.35.2"
   "VHDL Mode version number.")
 
-(defconst vhdl-time-stamp "2012-11-21"
+(defconst vhdl-time-stamp "2014-03-28"
   "VHDL Mode time stamp for last update.")
 
 ;; This file is part of GNU Emacs.
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Emacs Versions
 
-;; this updated version was only tested on: GNU Emacs 20.4
+;; this updated version was only tested on: GNU Emacs 24.1
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Installation
 
-;; Prerequisites:  GNU Emacs 20.X/21.X/22.X/23.X, XEmacs 20.X/21.X.
+;; Prerequisites:  GNU Emacs 20/21/22/23/24, XEmacs 20/21.
 
 ;; Put `vhdl-mode.el' into the `site-lisp' directory of your Emacs installation
 ;; or into an arbitrary directory that is added to the load path by the
@@ -392,7 +392,8 @@ File message:
 Unit-to-file name mapping: mapping of library unit names to names of files
                      generated by the compiler (used for Makefile generation)
   To string        : string a name is mapped to (\"\\1\" inserts the unit name,
-                     \"\\2\" inserts the entity name for architectures)
+                     \"\\2\" inserts the entity name for architectures,
+                     \"\\3\" inserts the library name)
   Case adjustment  : adjust case of inserted unit names
 
 \(*) The regular expression must match the error message starting from the
@@ -1069,7 +1070,7 @@ NOTE: Activate the new setting in a VHDL buffer by using the menu entry
   "Customizations for sequential processes."
   :group 'vhdl-template)
 
-(defcustom  vhdl-reset-kind 'async
+(defcustom vhdl-reset-kind 'async
   "Specifies which kind of reset to use in sequential processes."
   :type '(choice (const :tag "None" none)
                 (const :tag "Synchronous" sync)
@@ -2125,7 +2126,6 @@ your style, only those that are different from the default.")
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 ;; mandatory
-(require 'assoc)
 (require 'compile)                     ; XEmacs
 (require 'easymenu)
 (require 'hippie-exp)
@@ -2137,6 +2137,73 @@ your style, only those that are different from the default.")
   (require 'ps-print)
     (require 'speedbar)))              ; for speedbar-with-writable
 
+;; functions from obsolete assoc.el package (obsoleted in GNU Emacs 24.3)
+(defun vhdl-asort (alist-symbol key)
+  "Move a specified key-value pair to the head of an alist.
+The alist is referenced by ALIST-SYMBOL.  Key-value pair to move to
+head is one matching KEY.  Returns the sorted list and doesn't affect
+the order of any other key-value pair.  Side effect sets alist to new
+sorted list."
+  (set alist-symbol
+       (sort (copy-alist (symbol-value alist-symbol))
+             (lambda (a _b) (equal (car a) key)))))
+
+(defun vhdl-anot-head-p (alist key)
+  "Find out if a specified key-value pair is not at the head of an alist.
+The alist to check is specified by ALIST and the key-value pair is the
+one matching the supplied KEY.  Returns nil if ALIST is nil, or if
+key-value pair is at the head of the alist.  Returns t if key-value
+pair is not at the head of alist.  ALIST is not altered."
+  (not (equal (car (car alist)) key)))
+
+(defun vhdl-aput (alist-symbol key &optional value)
+  "Insert a key-value pair into an alist.
+The alist is referenced by ALIST-SYMBOL.  The key-value pair is made
+from KEY and optionally, VALUE.  Returns the altered alist.
+
+If the key-value pair referenced by KEY can be found in the alist, and
+VALUE is supplied non-nil, then the value of KEY will be set to VALUE.
+If VALUE is not supplied, or is nil, the key-value pair will not be
+modified, but will be moved to the head of the alist.  If the key-value
+pair cannot be found in the alist, it will be inserted into the head
+of the alist (with value nil if VALUE is nil or not supplied)."
+  (let ((elem (list (cons key value)))
+        alist)
+    (vhdl-asort alist-symbol key)
+    (setq alist (symbol-value alist-symbol))
+    (cond ((null alist) (set alist-symbol elem))
+         ((vhdl-anot-head-p alist key) (set alist-symbol (nconc elem alist)))
+         (value (setcar alist (car elem)) alist)
+         (t alist))))
+
+(defun vhdl-adelete (alist-symbol key)
+  "Delete a key-value pair from the alist.
+Alist is referenced by ALIST-SYMBOL and the key-value pair to remove
+is pair matching KEY.  Returns the altered alist."
+  (vhdl-asort alist-symbol key)
+  (let ((alist (symbol-value alist-symbol)))
+    (cond ((null alist) nil)
+         ((vhdl-anot-head-p alist key) alist)
+         (t (set alist-symbol (cdr alist))))))
+
+(defun vhdl-aget (alist key &optional keynil-p)
+  "Return the value in ALIST that is associated with KEY.
+Optional KEYNIL-P describes what to do if the value associated with
+KEY is nil.  If KEYNIL-P is not supplied or is nil, and the value is
+nil, then KEY is returned.  If KEYNIL-P is non-nil, then nil would be
+returned.
+
+If no key-value pair matching KEY could be found in ALIST, or ALIST is
+nil then nil is returned.  ALIST is not altered."
+  (let ((copy (copy-alist alist)))
+    (cond ((null alist) nil)
+         ((progn (vhdl-asort 'copy key)
+                 (vhdl-anot-head-p copy key)) nil)
+         ((cdr (car copy)))
+         (keynil-p nil)
+         ((car (car copy)))
+         (t nil))))
+
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; Compatibility
@@ -2256,7 +2323,6 @@ Ignore byte-compiler warnings you might see."
   "Wait until idle, then run FUNCTION."
   (if (fboundp 'start-itimer)
       (start-itimer "vhdl-mode" function secs repeat t)
-;    (run-with-idle-timer secs repeat function)))
     ;; explicitly activate timer (necessary when Emacs is already idle)
     (aset (run-with-idle-timer secs repeat function) 0 nil)))
 
@@ -2429,7 +2495,7 @@ specified."
 current buffer if no project is defined."
   (if (vhdl-project-p)
       (expand-file-name (vhdl-resolve-env-variable
-                        (nth 1 (aget vhdl-project-alist vhdl-project))))
+                        (nth 1 (vhdl-aget vhdl-project-alist vhdl-project))))
     default-directory))
 
 (defmacro vhdl-prepare-search-1 (&rest body)
@@ -2537,11 +2603,11 @@ conversion."
       (setq file-list (cdr file-list)))
     dir-list))
 
-(defun vhdl-aput (alist-symbol key &optional value)
+(defun vhdl-aput-delete-if-nil (alist-symbol key &optional value)
   "As `aput', but delete key-value pair if VALUE is nil."
   (if value
-      (aput alist-symbol key value)
-    (adelete alist-symbol key)))
+      (vhdl-aput alist-symbol key value)
+    (vhdl-adelete alist-symbol key)))
 
 (defun vhdl-delete (elt list)
   "Delete by side effect the first occurrence of ELT as a member of LIST."
@@ -2596,11 +2662,6 @@ conversion."
     (set-buffer (marker-buffer marker)))
   (goto-char marker))
 
-(defun vhdl-goto-line (line)
-  "Use this instead of calling user level function `goto-line'."
-  (goto-char (point-min))
-  (forward-line (1- line)))
-
 (defun vhdl-menu-split (list title)
   "Split menu LIST into several submenus, if number of
 elements > `vhdl-menu-max-size'."
@@ -2975,7 +3036,7 @@ STRING are replaced by `-' and substrings are converted to lower case."
 (make-variable-buffer-local 'vhdl-syntactic-context)
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Abbrev ook bindings
+;; Abbrev hook bindings
 
 (defvar vhdl-mode-abbrev-table nil
   "Abbrev table to use in `vhdl-mode' buffers.")
@@ -2985,8 +3046,10 @@ STRING are replaced by `-' and substrings are converted to lower case."
   (define-abbrev-table 'vhdl-mode-abbrev-table
     (append
      (when (memq 'vhdl vhdl-electric-keywords)
-       ;; VHDL'93 keywords
-       (mapcar (lambda (x) (list (car x) "" (cdr x) 0 'system))
+       ;; VHDL'02 keywords
+       (mapcar (if (featurep 'xemacs)
+                  (lambda (x) (list (car x) "" (cdr x) 0))
+                (lambda (x) (list (car x) "" (cdr x) 0 'system)))
                '(
                  ("--"           . vhdl-template-display-comment-hook)
                  ("abs"                  . vhdl-template-default-hook)
@@ -3102,7 +3165,9 @@ STRING are replaced by `-' and substrings are converted to lower case."
                  )))
      ;; VHDL-AMS keywords
      (when (and (memq 'vhdl vhdl-electric-keywords) (vhdl-standard-p 'ams))
-       (mapcar (lambda (x) (list (car x) "" (cdr x) 0 'system))
+       (mapcar (if (featurep 'xemacs)
+                  (lambda (x) (list (car x) "" (cdr x) 0))
+                (lambda (x) (list (car x) "" (cdr x) 0 'system)))
                '(
                  ("across"     . vhdl-template-default-hook)
                  ("break"      . vhdl-template-break-hook)
@@ -4822,7 +4887,7 @@ Key bindings:
 
   ;; set local variables
   (set (make-local-variable 'paragraph-start)
-       "\\s-*\\(--+\\s-*$\\|[^ -]\\|$\\)")
+       "\\s-*\\(--+\\s-*$\\|$\\)")
   (set (make-local-variable 'paragraph-separate) paragraph-start)
   (set (make-local-variable 'paragraph-ignore-fill-prefix) t)
   (set (make-local-variable 'parse-sexp-ignore-comments) t)
@@ -4860,9 +4925,7 @@ Key bindings:
     (set (make-local-variable 'font-lock-support-mode) 'lazy-lock-mode)
     (set (make-local-variable 'lazy-lock-defer-contextually) nil)
     (set (make-local-variable 'lazy-lock-defer-on-the-fly) t)
-;    (set (make-local-variable 'lazy-lock-defer-time) 0.1)
     (set (make-local-variable 'lazy-lock-defer-on-scrolling) t))
-;  (turn-on-font-lock)
 
   ;; variables for source file compilation
   (when vhdl-compile-use-local-error-regexp
@@ -7566,7 +7629,6 @@ indentation is done before aligning."
       (setq end (point-marker))
       (goto-char begin)
       (setq bol (setq begin (progn (beginning-of-line) (point))))
-;      (untabify bol end)
       (when indent
        (indent-region bol end nil))))
   (let ((copy (copy-alist alignment-list)))
@@ -7962,7 +8024,6 @@ end of line, do nothing in comments and strings."
               (and (looking-at "\\s-+") (re-search-forward "\\s-+" end t)
                    (progn (replace-match " " nil nil) t))
               (and (looking-at "-") (re-search-forward "-" end t))
-;             (re-search-forward "[^ \t-]+" end t))))
               (re-search-forward "[^ \t\"-]+" end t))))
   (unless no-message (message "Fixing up whitespace...done")))
 
@@ -8080,7 +8141,7 @@ Currently supported keywords: 'begin', 'if'."
        (while (re-search-forward "\\<\\(for\\|if\\)\\>" end t)
         (goto-char (match-end 1))
         (setq point (point-marker))
-        ;; exception: in literal or preceded by `end' or label
+        ;; exception: in literal or preceded by `end', `wait' or label
         (when (and (not (save-excursion (goto-char (match-beginning 1))
                                         (vhdl-in-literal)))
                    (save-excursion
@@ -8089,7 +8150,7 @@ Currently supported keywords: 'begin', 'if'."
                        (and (re-search-forward "^\\s-*\\([^ \t\n].*\\)"
                                                (match-beginning 1) t)
                             (not (string-match
-                                  "\\(\\<end\\>\\|\\<wait\\>\\|\\w+\\s-*:\\)\\s-*$"
+                                  "\\(\\<end\\>\\|\\<wait .*\\|\\w+\\s-*:\\)\\s-*$"
                                   (match-string 1)))))))
           (goto-char (match-beginning 1))
           (insert "\n")
@@ -8138,10 +8199,12 @@ case fixing to a region.  Calls functions `vhdl-indent-buffer',
   (when (nth 0 vhdl-beautify-options) (vhdl-fixup-whitespace-region beg end t))
   (when (nth 1 vhdl-beautify-options) (vhdl-fix-statement-region beg end))
   (when (nth 2 vhdl-beautify-options) (vhdl-indent-region beg end))
-  (let ((vhdl-align-groups t))
-    (when (nth 3 vhdl-beautify-options) (vhdl-align-region beg end)))
+  (when (nth 3 vhdl-beautify-options)
+    (let ((vhdl-align-groups t)) (vhdl-align-region beg end)))
   (when (nth 4 vhdl-beautify-options) (vhdl-fix-case-region beg end))
-  (when (nth 0 vhdl-beautify-options) (vhdl-remove-trailing-spaces-region beg end)))
+  (when (nth 0 vhdl-beautify-options)
+    (vhdl-remove-trailing-spaces-region beg end)
+    (if vhdl-indent-tabs-mode (tabify beg end) (untabify beg end))))
 
 (defun vhdl-beautify-buffer ()
   "Beautify buffer by applying indentation, whitespace fixup, alignment, and
@@ -8447,11 +8510,11 @@ buffer."
             (setq beg (point))))))
      ;; search for signals declared in surrounding block declarative parts
      (save-excursion
-       (while (and (progn (while (and (setq beg (re-search-backward "^\\s-*\\(\\w+\\s-*:\\s-*block\\|\\(end\\)\\s-+block\\)\\>" nil t))
-                                     (match-string 2))
-                           (goto-char (match-end 2))
+       (while (and (progn (while (and (setq beg (re-search-backward "^\\s-*\\(\\w+\\s-*:\\s-*\\(block\\|\\(for\\|if\\).*\\<generate\\>\\)\\|\\(end\\)\\s-+block\\)\\>" nil t))
+                                     (match-string 4))
+                           (goto-char (match-end 4))
                            (vhdl-backward-sexp)
-                           (re-search-backward "^\\s-*\\w+\\s-*:\\s-*block\\>" nil t))
+                           (re-search-backward "^\\s-*\\w+\\s-*:\\s-*\\(block\\|generate\\)\\>" nil t))
                          beg)
                   (setq end (re-search-forward "^\\s-*begin\\>" nil t)))
         ;; scan for all declared signal names
@@ -8548,7 +8611,8 @@ Used for undoing after template abortion.")
   "Return the working library name of the current project or \"work\" if no
 project is defined."
   (vhdl-resolve-env-variable
-   (or (nth 6 (aget vhdl-project-alist vhdl-project)) vhdl-default-library)))
+   (or (nth 6 (vhdl-aget vhdl-project-alist vhdl-project))
+       vhdl-default-library)))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;  Enabling/disabling
@@ -8966,8 +9030,6 @@ since these are almost equivalent)."
   (interactive)
   (when (vhdl-template-field "target signal")
     (insert " <= ")
-;    (if (not (equal (vhdl-template-field "[GUARDED] [TRANSPORT]") ""))
-;       (insert " "))
     (let ((margin (current-column))
          (start (point))
          position)
@@ -9903,7 +9965,7 @@ otherwise."
 (defun vhdl-template-record (kind &optional name secondary)
   "Insert a record type declaration."
   (interactive)
-  (let ((margin (current-column))
+  (let ((margin (current-indentation))
        (start (point))
        (first t))
     (vhdl-insert-keyword "RECORD\n")
@@ -9965,7 +10027,6 @@ otherwise."
       (insert "\n")
       (indent-to (+ margin vhdl-basic-offset))
       (vhdl-template-field "target signal" " <= ")
-;      (vhdl-template-field "[GUARDED] [TRANSPORT]")
       (insert "\n")
       (indent-to (+ margin vhdl-basic-offset))
       (vhdl-template-field "waveform")
@@ -10466,8 +10527,10 @@ specification, if not already there."
 (defun vhdl-template-replace-header-keywords (beg end &optional file-title
                                                  is-model)
   "Replace keywords in header and footer."
-  (let ((project-title (or (nth 0 (aget vhdl-project-alist vhdl-project)) ""))
-       (project-desc (or (nth 9 (aget vhdl-project-alist vhdl-project)) ""))
+  (let ((project-title (or (nth 0 (vhdl-aget vhdl-project-alist vhdl-project))
+                          ""))
+       (project-desc (or (nth 9 (vhdl-aget vhdl-project-alist vhdl-project))
+                         ""))
        pos)
     (vhdl-prepare-search-2
      (save-excursion
@@ -10525,9 +10588,9 @@ specification, if not already there."
           (replace-match file-title t t))
         (goto-char beg))
        (let (string)
-        (while
-            (re-search-forward "<\\(\\(\\w\\|\\s_\\)*\\) string>" end t)
-          (setq string (read-string (concat (match-string 1) ": ")))
+        (while (re-search-forward "<\\(\\(\\w\\|\\s_\\)*\\) string>" end t)
+          (save-match-data
+            (setq string (read-string (concat (match-string 1) ": "))))
           (replace-match string t t)))
        (goto-char beg)
        (when (and (not is-model) (search-forward "<cursor>" end t))
@@ -10635,14 +10698,7 @@ If starting after end-comment-column, start a new line."
       (if (not (or (and string (progn (insert string) t))
                   (vhdl-template-field "[comment]" nil t)))
          (delete-region position (point))
-       (while (= (preceding-char) ?\ ) (delete-char -1))
-       ;; (when (> (current-column) end-comment-column)
-       ;;   (setq position (point-marker))
-       ;;   (re-search-backward "-- ")
-       ;;   (insert "\n")
-       ;;   (indent-to comment-column)
-       ;;   (goto-char position))
-       ))))
+       (while (= (preceding-char) ?\ ) (delete-char -1))))))
 
 (defun vhdl-comment-block ()
   "Insert comment for code block."
@@ -10882,8 +10938,6 @@ Point is left between them."
 (defun vhdl-template-generate-body (margin label)
   "Insert body for generate template."
   (vhdl-insert-keyword " GENERATE")
-;   (if (not (vhdl-standard-p '87))
-;       (vhdl-template-begin-end "GENERATE" label margin)
   (insert "\n\n")
   (indent-to margin)
   (vhdl-insert-keyword "END GENERATE ")
@@ -11670,7 +11724,6 @@ reflected in a subsequent paste operation."
                                                  comment group-comment))))
              ;; parse group comment and spacing
              (setq group-comment (vhdl-parse-group-comment))))
-;        (vhdl-parse-string "end\\>")
          ;; parse context clause
          (setq context-clause (vhdl-scan-context-clause))
 ;        ;; add surrounding package to context clause
@@ -12622,7 +12675,6 @@ reflected in a subsequent paste operation."
   (while (and he-expand-list
              (or (not (stringp (car he-expand-list)))
                  (he-string-member (car he-expand-list) he-tried-table t)))
-;                (equal (car he-expand-list) he-search-string)))
     (unless (stringp (car he-expand-list))
       (setq vhdl-expand-upper-case (car he-expand-list)))
     (setq he-expand-list (cdr he-expand-list)))
@@ -12908,8 +12960,8 @@ File statistics: \"%s\"\n\
              ";; project name\n"
              "(setq vhdl-project \"" vhdl-project "\")\n\n"
              ";; project setup\n"
-             "(aput 'vhdl-project-alist vhdl-project\n'")
-      (pp (aget vhdl-project-alist vhdl-project) (current-buffer))
+             "(vhdl-aput 'vhdl-project-alist vhdl-project\n'")
+      (pp (vhdl-aget vhdl-project-alist vhdl-project) (current-buffer))
       (insert ")\n")
       (save-buffer)
       (kill-buffer (current-buffer))
@@ -12929,8 +12981,8 @@ File statistics: \"%s\"\n\
     (condition-case ()
        (let ((current-project vhdl-project))
          (load-file file-name)
-         (when (/= (length (aget vhdl-project-alist vhdl-project t)) 10)
-           (adelete 'vhdl-project-alist vhdl-project)
+         (when (/= (length (vhdl-aget vhdl-project-alist vhdl-project t)) 10)
+           (vhdl-adelete 'vhdl-project-alist vhdl-project)
            (error ""))
          (when not-make-current
            (setq vhdl-project current-project))
@@ -12946,7 +12998,7 @@ File statistics: \"%s\"\n\
   "Duplicate setup of current project."
   (interactive)
   (let ((new-name (read-from-minibuffer "New project name: "))
-       (project-entry (aget vhdl-project-alist vhdl-project t)))
+       (project-entry (vhdl-aget vhdl-project-alist vhdl-project t)))
     (setq vhdl-project-alist
          (append vhdl-project-alist
                  (list (cons new-name project-entry))))
@@ -13275,7 +13327,6 @@ This does highlighting of keywords and standard identifiers.")
                    (skip-syntax-backward " ")
                    (skip-syntax-backward "w_")
                    (skip-syntax-backward " ")))
-;                (skip-chars-backward "^-(\n\";")
           (goto-char (match-end 1)) (1 font-lock-variable-name-face)))
 
    ;; highlight formal parameters in component instantiations and subprogram
@@ -13676,8 +13727,6 @@ hierarchy otherwise.")
                                          non-final)
   "Scan contents of VHDL files in directory or file pattern NAME."
   (string-match "\\(.*[/\\]\\)\\(.*\\)" name)
-;   (unless (file-directory-p (match-string 1 name))
-;     (message "No such directory: \"%s\"" (match-string 1 name)))
   (let* ((dir-name (match-string 1 name))
         (file-pattern (match-string 2 name))
         (is-directory (= 0 (length file-pattern)))
@@ -13690,18 +13739,18 @@ hierarchy otherwise.")
               dir-name t (wildcard-to-regexp file-pattern)))))
         (key (or project dir-name))
         (file-exclude-regexp
-         (or (nth 3 (aget vhdl-project-alist project)) ""))
+         (or (nth 3 (vhdl-aget vhdl-project-alist project)) ""))
         (limit-design-file-size (nth 0 vhdl-speedbar-scan-limit))
         (limit-hier-file-size (nth 0 (nth 1 vhdl-speedbar-scan-limit)))
         (limit-hier-inst-no (nth 1 (nth 1 vhdl-speedbar-scan-limit)))
         ent-alist conf-alist pack-alist ent-inst-list file-alist
         tmp-list tmp-entry no-files files-exist big-files)
     (when (or project update)
-      (setq ent-alist (aget vhdl-entity-alist key t)
-           conf-alist (aget vhdl-config-alist key t)
-           pack-alist (aget vhdl-package-alist key t)
-           ent-inst-list (car (aget vhdl-ent-inst-alist key t))
-           file-alist (aget vhdl-file-alist key t)))
+      (setq ent-alist (vhdl-aget vhdl-entity-alist key t)
+           conf-alist (vhdl-aget vhdl-config-alist key t)
+           pack-alist (vhdl-aget vhdl-package-alist key t)
+           ent-inst-list (car (vhdl-aget vhdl-ent-inst-alist key t))
+           file-alist (vhdl-aget vhdl-file-alist key t)))
     (when (and (not is-directory) (null file-list))
       (message "No such file: \"%s\"" name))
     (setq files-exist file-list)
@@ -13743,7 +13792,7 @@ hierarchy otherwise.")
                (while (re-search-forward "^[ \t]*entity[ \t\n\r\f]+\\(\\w+\\)[ \t\n\r\f]+is\\>" nil t)
                  (let* ((ent-name (match-string-no-properties 1))
                         (ent-key (downcase ent-name))
-                        (ent-entry (aget ent-alist ent-key t))
+                        (ent-entry (vhdl-aget ent-alist ent-key t))
                         (lib-alist (vhdl-scan-context-clause)))
                    (if (nth 1 ent-entry)
                        (vhdl-warning-when-idle
@@ -13751,10 +13800,10 @@ hierarchy otherwise.")
                         ent-name  (nth 1 ent-entry) (nth 2 ent-entry)
                         file-name (vhdl-current-line))
                      (push ent-key ent-list)
-                     (aput 'ent-alist ent-key
-                           (list ent-name file-name (vhdl-current-line)
-                                 (nth 3 ent-entry) (nth 4 ent-entry)
-                                 lib-alist)))))
+                     (vhdl-aput 'ent-alist ent-key
+                                (list ent-name file-name (vhdl-current-line)
+                                      (nth 3 ent-entry) (nth 4 ent-entry)
+                                      lib-alist)))))
                ;; scan for architectures
                (goto-char (point-min))
                (while (re-search-forward "^[ \t]*architecture[ \t\n\r\f]+\\(\\w+\\)[ \t\n\r\f]+of[ \t\n\r\f]+\\(\\w+\\)[ \t\n\r\f]+is\\>" nil t)
@@ -13762,9 +13811,9 @@ hierarchy otherwise.")
                         (arch-key (downcase arch-name))
                         (ent-name (match-string-no-properties 2))
                         (ent-key (downcase ent-name))
-                        (ent-entry (aget ent-alist ent-key t))
+                        (ent-entry (vhdl-aget ent-alist ent-key t))
                         (arch-alist (nth 3 ent-entry))
-                        (arch-entry (aget arch-alist arch-key t))
+                        (arch-entry (vhdl-aget arch-alist arch-key t))
                         (lib-arch-alist (vhdl-scan-context-clause)))
                    (if arch-entry
                        (vhdl-warning-when-idle
@@ -13773,20 +13822,20 @@ hierarchy otherwise.")
                         (nth 2 arch-entry) file-name (vhdl-current-line))
                      (setq arch-list (cons arch-key arch-list)
                            arch-ent-list (cons ent-key arch-ent-list))
-                     (aput 'arch-alist arch-key
-                           (list arch-name file-name (vhdl-current-line) nil
-                                 lib-arch-alist))
-                     (aput 'ent-alist ent-key
-                           (list (or (nth 0 ent-entry) ent-name)
-                                 (nth 1 ent-entry) (nth 2 ent-entry)
-                                 (vhdl-sort-alist arch-alist)
-                                 arch-key (nth 5 ent-entry))))))
+                     (vhdl-aput 'arch-alist arch-key
+                                (list arch-name file-name (vhdl-current-line)
+                                      nil lib-arch-alist))
+                     (vhdl-aput 'ent-alist ent-key
+                                (list (or (nth 0 ent-entry) ent-name)
+                                      (nth 1 ent-entry) (nth 2 ent-entry)
+                                      (vhdl-sort-alist arch-alist)
+                                      arch-key (nth 5 ent-entry))))))
                ;; scan for configurations
                (goto-char (point-min))
                (while (re-search-forward "^[ \t]*configuration[ \t\n\r\f]+\\(\\w+\\)[ \t\n\r\f]+of[ \t\n\r\f]+\\(\\w+\\)[ \t\n\r\f]+is\\>" nil t)
                  (let* ((conf-name (match-string-no-properties 1))
                         (conf-key (downcase conf-name))
-                        (conf-entry (aget conf-alist conf-key t))
+                        (conf-entry (vhdl-aget conf-alist conf-key t))
                         (ent-name (match-string-no-properties 2))
                         (ent-key (downcase ent-name))
                         (lib-alist (vhdl-scan-context-clause))
@@ -13827,16 +13876,16 @@ hierarchy otherwise.")
                                              inst-lib-key)
                                        comp-conf-list))
                            (setq inst-key-list (cdr inst-key-list)))))
-                     (aput 'conf-alist conf-key
-                           (list conf-name file-name conf-line ent-key
-                                 arch-key comp-conf-list lib-alist)))))
+                     (vhdl-aput 'conf-alist conf-key
+                                (list conf-name file-name conf-line ent-key
+                                      arch-key comp-conf-list lib-alist)))))
                ;; scan for packages
                (goto-char (point-min))
                (while (re-search-forward "^[ \t]*package[ \t\n\r\f]+\\(body[ \t\n\r\f]+\\)?\\(\\w+\\)[ \t\n\r\f]+is\\>" nil t)
                  (let* ((pack-name (match-string-no-properties 2))
                         (pack-key (downcase pack-name))
                         (is-body (match-string-no-properties 1))
-                        (pack-entry (aget pack-alist pack-key t))
+                        (pack-entry (vhdl-aget pack-alist pack-key t))
                         (pack-line (vhdl-current-line))
                         (end-of-unit (vhdl-get-end-of-unit))
                         comp-name func-name comp-alist func-alist lib-alist)
@@ -13867,7 +13916,7 @@ hierarchy otherwise.")
                      (if is-body
                          (push pack-key pack-body-list)
                        (push pack-key pack-list))
-                     (aput
+                     (vhdl-aput
                       'pack-alist pack-key
                       (if is-body
                           (list (or (nth 0 pack-entry) pack-name)
@@ -13891,9 +13940,9 @@ hierarchy otherwise.")
                         (ent-key (downcase ent-name))
                         (arch-name (match-string-no-properties 1))
                         (arch-key (downcase arch-name))
-                        (ent-entry (aget ent-alist ent-key t))
+                        (ent-entry (vhdl-aget ent-alist ent-key t))
                         (arch-alist (nth 3 ent-entry))
-                        (arch-entry (aget arch-alist arch-key t))
+                        (arch-entry (vhdl-aget arch-alist arch-key t))
                         (beg-of-unit (point))
                         (end-of-unit (vhdl-get-end-of-unit))
                         (inst-no 0)
@@ -13907,7 +13956,10 @@ hierarchy otherwise.")
                                         "\\(\\(for\\|if\\)\\>[^;:]+\\<generate\\>\\|block\\>\\)\\)\\|"
                                         "\\(^[ \t]*end[ \t\n\r\f]+\\(generate\\|block\\)\\>\\)") end-of-unit t)
                                (or (not limit-hier-inst-no)
-                                   (<= (setq inst-no (1+ inst-no))
+                                   (<= (if (or (match-string 14)
+                                               (match-string 16))
+                                           inst-no
+                                         (setq inst-no (1+ inst-no)))
                                        limit-hier-inst-no)))
                      (cond
                       ;; block/generate beginning found
@@ -13988,23 +14040,25 @@ hierarchy otherwise.")
                            (setcar tmp-inst-alist inst-entry))
                          (setq tmp-inst-alist (cdr tmp-inst-alist)))))
                    ;; save in cache
-                   (aput 'arch-alist arch-key
-                         (list (nth 0 arch-entry) (nth 1 arch-entry)
-                               (nth 2 arch-entry) inst-alist
-                               (nth 4 arch-entry)))
-                   (aput 'ent-alist ent-key
-                         (list (nth 0 ent-entry) (nth 1 ent-entry)
-                               (nth 2 ent-entry) (vhdl-sort-alist arch-alist)
-                               (nth 4 ent-entry) (nth 5 ent-entry)))
+                   (vhdl-aput 'arch-alist arch-key
+                              (list (nth 0 arch-entry) (nth 1 arch-entry)
+                                    (nth 2 arch-entry) inst-alist
+                                    (nth 4 arch-entry)))
+                   (vhdl-aput 'ent-alist ent-key
+                              (list (nth 0 ent-entry) (nth 1 ent-entry)
+                                    (nth 2 ent-entry)
+                                    (vhdl-sort-alist arch-alist)
+                                    (nth 4 ent-entry) (nth 5 ent-entry)))
                    (when (and limit-hier-inst-no
                               (> inst-no limit-hier-inst-no))
                      (message "WARNING:  Scan limit (hierarchy: instances per architecture) reached in file:\n  \"%s\"" file-name)
                      (setq big-files t))
                    (goto-char end-of-unit))))
              ;; remember design units for this file
-             (aput 'file-alist file-name
-                   (list ent-list arch-list arch-ent-list conf-list
-                         pack-list pack-body-list inst-list inst-ent-list))
+             (vhdl-aput 'file-alist file-name
+                        (list ent-list arch-list arch-ent-list conf-list
+                              pack-list pack-body-list
+                              inst-list inst-ent-list))
              (setq ent-inst-list (append inst-ent-list ent-inst-list))))))
        (setq file-list (cdr file-list))))
     (when (or (and (not project) files-exist)
@@ -14023,8 +14077,8 @@ hierarchy otherwise.")
       ;; check whether configuration has a corresponding entity/architecture
       (setq tmp-list conf-alist)
       (while tmp-list
-       (if (setq tmp-entry (aget ent-alist (nth 4 (car tmp-list)) t))
-           (unless (aget (nth 3 tmp-entry) (nth 5 (car tmp-list)) t)
+       (if (setq tmp-entry (vhdl-aget ent-alist (nth 4 (car tmp-list)) t))
+           (unless (vhdl-aget (nth 3 tmp-entry) (nth 5 (car tmp-list)) t)
              (setq tmp-entry (car tmp-list))
              (vhdl-warning-when-idle
               "Configuration of non-existing architecture: \"%s\" of \"%s(%s)\"\n  in \"%s\" (line %d)"
@@ -14053,17 +14107,17 @@ hierarchy otherwise.")
       (add-to-list 'vhdl-updated-project-list (or project dir-name)))
     ;; clear directory alists
     (unless project
-      (adelete 'vhdl-entity-alist key)
-      (adelete 'vhdl-config-alist key)
-      (adelete 'vhdl-package-alist key)
-      (adelete 'vhdl-ent-inst-alist key)
-      (adelete 'vhdl-file-alist key))
+      (vhdl-adelete 'vhdl-entity-alist key)
+      (vhdl-adelete 'vhdl-config-alist key)
+      (vhdl-adelete 'vhdl-package-alist key)
+      (vhdl-adelete 'vhdl-ent-inst-alist key)
+      (vhdl-adelete 'vhdl-file-alist key))
     ;; put directory contents into cache
-    (aput 'vhdl-entity-alist key ent-alist)
-    (aput 'vhdl-config-alist key conf-alist)
-    (aput 'vhdl-package-alist key pack-alist)
-    (aput 'vhdl-ent-inst-alist key (list ent-inst-list))
-    (aput 'vhdl-file-alist key file-alist)
+    (vhdl-aput 'vhdl-entity-alist key ent-alist)
+    (vhdl-aput 'vhdl-config-alist key conf-alist)
+    (vhdl-aput 'vhdl-package-alist key pack-alist)
+    (vhdl-aput 'vhdl-ent-inst-alist key (list ent-inst-list))
+    (vhdl-aput 'vhdl-file-alist key file-alist)
     ;; final messages
     (message "Scanning %s %s\"%s\"...done"
             (if is-directory "directory" "files") (or num-string "") name)
@@ -14079,18 +14133,18 @@ hierarchy otherwise.")
 (defun vhdl-scan-project-contents (project)
   "Scan the contents of all VHDL files found in the directories and files
 of PROJECT."
-  (let ((dir-list (or (nth 2 (aget vhdl-project-alist project)) '("")))
+  (let ((dir-list (or (nth 2 (vhdl-aget vhdl-project-alist project)) '("")))
        (default-dir (vhdl-resolve-env-variable
-                     (nth 1 (aget vhdl-project-alist project))))
+                     (nth 1 (vhdl-aget vhdl-project-alist project))))
        (file-exclude-regexp
-         (or (nth 3 (aget vhdl-project-alist project)) ""))
+        (or (nth 3 (vhdl-aget vhdl-project-alist project)) ""))
        dir-list-tmp dir dir-name num-dir act-dir recursive)
     ;; clear project alists
-    (adelete 'vhdl-entity-alist project)
-    (adelete 'vhdl-config-alist project)
-    (adelete 'vhdl-package-alist project)
-    (adelete 'vhdl-ent-inst-alist project)
-    (adelete 'vhdl-file-alist project)
+    (vhdl-adelete 'vhdl-entity-alist project)
+    (vhdl-adelete 'vhdl-config-alist project)
+    (vhdl-adelete 'vhdl-package-alist project)
+    (vhdl-adelete 'vhdl-ent-inst-alist project)
+    (vhdl-adelete 'vhdl-file-alist project)
     ;; expand directory names by default-directory
     (message "Collecting source files...")
     (while dir-list
@@ -14137,7 +14191,7 @@ of PROJECT."
       (add-to-list 'dir-list-tmp (file-name-directory dir-name))
       (setq dir-list (cdr dir-list)
            act-dir (1+ act-dir)))
-    (aput 'vhdl-directory-alist project (list (nreverse dir-list-tmp)))
+    (vhdl-aput 'vhdl-directory-alist project (list (nreverse dir-list-tmp)))
     (message "Scanning project \"%s\"...done" project)))
 
 (defun vhdl-update-file-contents (file-name)
@@ -14150,13 +14204,16 @@ of PROJECT."
       (when (member dir-name (nth 1 (car directory-alist)))
        (let* ((vhdl-project (nth 0 (car directory-alist)))
               (project (vhdl-project-p))
-              (ent-alist (aget vhdl-entity-alist (or project dir-name) t))
-              (conf-alist (aget vhdl-config-alist (or project dir-name) t))
-              (pack-alist (aget vhdl-package-alist (or project dir-name) t))
-              (ent-inst-list (car (aget vhdl-ent-inst-alist
+              (ent-alist (vhdl-aget vhdl-entity-alist
+                                    (or project dir-name) t))
+              (conf-alist (vhdl-aget vhdl-config-alist
+                                     (or project dir-name) t))
+              (pack-alist (vhdl-aget vhdl-package-alist
+                                     (or project dir-name) t))
+              (ent-inst-list (car (vhdl-aget vhdl-ent-inst-alist
                                         (or project dir-name) t)))
-              (file-alist (aget vhdl-file-alist (or project dir-name) t))
-              (file-entry (aget file-alist file-name t))
+              (file-alist (vhdl-aget vhdl-file-alist (or project dir-name) t))
+              (file-entry (vhdl-aget file-alist file-name t))
               (ent-list (nth 0 file-entry))
               (arch-list (nth 1 file-entry))
               (arch-ent-list (nth 2 file-entry))
@@ -14170,57 +14227,57 @@ of PROJECT."
          ;; entities
          (while ent-list
            (setq key (car ent-list)
-                 entry (aget ent-alist key t))
+                 entry (vhdl-aget ent-alist key t))
            (when (equal file-name (nth 1 entry))
              (if (nth 3 entry)
-                 (aput 'ent-alist key
-                       (list (nth 0 entry) nil nil (nth 3 entry) nil))
-               (adelete 'ent-alist key)))
+                 (vhdl-aput 'ent-alist key
+                            (list (nth 0 entry) nil nil (nth 3 entry) nil))
+               (vhdl-adelete 'ent-alist key)))
            (setq ent-list (cdr ent-list)))
          ;; architectures
          (while arch-list
            (setq key (car arch-list)
                  ent-key (car arch-ent-list)
-                 entry (aget ent-alist ent-key t)
+                 entry (vhdl-aget ent-alist ent-key t)
                  arch-alist (nth 3 entry))
-           (when (equal file-name (nth 1 (aget arch-alist key t)))
-             (adelete 'arch-alist key)
+           (when (equal file-name (nth 1 (vhdl-aget arch-alist key t)))
+             (vhdl-adelete 'arch-alist key)
              (if (or (nth 1 entry) arch-alist)
-                 (aput 'ent-alist ent-key
-                       (list (nth 0 entry) (nth 1 entry) (nth 2 entry)
-                             arch-alist (nth 4 entry) (nth 5 entry)))
-               (adelete 'ent-alist ent-key)))
+                 (vhdl-aput 'ent-alist ent-key
+                            (list (nth 0 entry) (nth 1 entry) (nth 2 entry)
+                                  arch-alist (nth 4 entry) (nth 5 entry)))
+               (vhdl-adelete 'ent-alist ent-key)))
            (setq arch-list (cdr arch-list)
                  arch-ent-list (cdr arch-ent-list)))
          ;; configurations
          (while conf-list
            (setq key (car conf-list))
-           (when (equal file-name (nth 1 (aget conf-alist key t)))
-             (adelete 'conf-alist key))
+           (when (equal file-name (nth 1 (vhdl-aget conf-alist key t)))
+             (vhdl-adelete 'conf-alist key))
            (setq conf-list (cdr conf-list)))
          ;; package declarations
          (while pack-list
            (setq key (car pack-list)
-                 entry (aget pack-alist key t))
+                 entry (vhdl-aget pack-alist key t))
            (when (equal file-name (nth 1 entry))
              (if (nth 6 entry)
-                 (aput 'pack-alist key
-                       (list (nth 0 entry) nil nil nil nil nil
-                             (nth 6 entry) (nth 7 entry) (nth 8 entry)
-                             (nth 9 entry)))
-               (adelete 'pack-alist key)))
+                 (vhdl-aput 'pack-alist key
+                            (list (nth 0 entry) nil nil nil nil nil
+                                  (nth 6 entry) (nth 7 entry) (nth 8 entry)
+                                  (nth 9 entry)))
+               (vhdl-adelete 'pack-alist key)))
            (setq pack-list (cdr pack-list)))
          ;; package bodies
          (while pack-body-list
            (setq key (car pack-body-list)
-                 entry (aget pack-alist key t))
+                 entry (vhdl-aget pack-alist key t))
            (when (equal file-name (nth 6 entry))
              (if (nth 1 entry)
-                 (aput 'pack-alist key
-                       (list (nth 0 entry) (nth 1 entry) (nth 2 entry)
-                             (nth 3 entry) (nth 4 entry) (nth 5 entry)
-                             nil nil nil nil))
-               (adelete 'pack-alist key)))
+                 (vhdl-aput 'pack-alist key
+                            (list (nth 0 entry) (nth 1 entry) (nth 2 entry)
+                                  (nth 3 entry) (nth 4 entry) (nth 5 entry)
+                                  nil nil nil nil))
+               (vhdl-adelete 'pack-alist key)))
            (setq pack-body-list (cdr pack-body-list)))
          ;; instantiated entities
          (while inst-ent-list
@@ -14228,10 +14285,10 @@ of PROJECT."
                  (vhdl-delete (car inst-ent-list) ent-inst-list))
            (setq inst-ent-list (cdr inst-ent-list)))
          ;; update caches
-         (vhdl-aput 'vhdl-entity-alist cache-key ent-alist)
-         (vhdl-aput 'vhdl-config-alist cache-key conf-alist)
-         (vhdl-aput 'vhdl-package-alist cache-key pack-alist)
-         (vhdl-aput 'vhdl-ent-inst-alist cache-key (list ent-inst-list))
+         (vhdl-aput-delete-if-nil 'vhdl-entity-alist cache-key ent-alist)
+         (vhdl-aput-delete-if-nil 'vhdl-config-alist cache-key conf-alist)
+         (vhdl-aput-delete-if-nil 'vhdl-package-alist cache-key pack-alist)
+         (vhdl-aput-delete-if-nil 'vhdl-ent-inst-alist cache-key (list ent-inst-list))
          ;; scan file
          (vhdl-scan-directory-contents file-name project t)
          (when (or (and vhdl-speedbar-show-projects project)
@@ -14264,8 +14321,8 @@ of PROJECT."
                                     &optional include-top ent-hier)
   "Get instantiation hierarchy beginning in architecture ARCH-KEY of
 entity ENT-KEY."
-  (let* ((ent-entry (aget ent-alist ent-key t))
-        (arch-entry (if arch-key (aget (nth 3 ent-entry) arch-key t)
+  (let* ((ent-entry (vhdl-aget ent-alist ent-key t))
+        (arch-entry (if arch-key (vhdl-aget (nth 3 ent-entry) arch-key t)
                       (cdar (last (nth 3 ent-entry)))))
         (inst-alist (nth 3 arch-entry))
         inst-entry inst-ent-entry inst-arch-entry inst-conf-entry comp-entry
@@ -14276,9 +14333,6 @@ entity ENT-KEY."
       (setq level (1+ level)))
     (when (member ent-key ent-hier)
       (error "ERROR:  Instantiation loop detected, component instantiates itself: \"%s\"" ent-key))
-    ;; check configured architecture (already checked during scanning)
-;     (unless (or (null conf-inst-alist) (assoc arch-key (nth 3 ent-entry)))
-;       (vhdl-warning-when-idle "Configuration for non-existing architecture used: \"%s\"" conf-key))
     ;; process all instances
     (while inst-alist
       (setq inst-entry (car inst-alist)
@@ -14294,27 +14348,27 @@ entity ENT-KEY."
                                   (downcase (or inst-comp-name ""))))))
        (setq tmp-list (cdr tmp-list)))
       (setq inst-conf-key (or (nth 4 (car tmp-list)) inst-conf-key))
-      (setq inst-conf-entry (aget conf-alist inst-conf-key t))
+      (setq inst-conf-entry (vhdl-aget conf-alist inst-conf-key t))
       (when (and inst-conf-key (not inst-conf-entry))
        (vhdl-warning-when-idle "Configuration not found: \"%s\"" inst-conf-key))
       ;; determine entity
       (setq inst-ent-key
            (or (nth 2 (car tmp-list))  ; from configuration
                (nth 3 inst-conf-entry) ; from subconfiguration
-               (nth 3 (aget conf-alist (nth 7 inst-entry) t))
+               (nth 3 (vhdl-aget conf-alist (nth 7 inst-entry) t))
                                        ; from configuration spec.
                (nth 5 inst-entry)))    ; from direct instantiation
-      (setq inst-ent-entry (aget ent-alist inst-ent-key t))
+      (setq inst-ent-entry (vhdl-aget ent-alist inst-ent-key t))
       ;; determine architecture
       (setq inst-arch-key
            (or (nth 3 (car tmp-list))          ; from configuration
                (nth 4 inst-conf-entry)         ; from subconfiguration
                (nth 6 inst-entry)              ; from direct instantiation
-               (nth 4 (aget conf-alist (nth 7 inst-entry)))
+               (nth 4 (vhdl-aget conf-alist (nth 7 inst-entry)))
                                                ; from configuration spec.
                (nth 4 inst-ent-entry)          ; MRA
                (caar (nth 3 inst-ent-entry)))) ; first alphabetically
-      (setq inst-arch-entry (aget (nth 3 inst-ent-entry) inst-arch-key t))
+      (setq inst-arch-entry (vhdl-aget (nth 3 inst-ent-entry) inst-arch-key t))
       ;; set library
       (setq inst-lib-key
            (or (nth 5 (car tmp-list))          ; from configuration
@@ -14353,7 +14407,8 @@ entity ENT-KEY."
 
 (defun vhdl-get-instantiations (ent-key indent)
   "Get all instantiations of entity ENT-KEY."
-  (let ((ent-alist (aget vhdl-entity-alist (vhdl-speedbar-line-key indent) t))
+  (let ((ent-alist (vhdl-aget vhdl-entity-alist
+                             (vhdl-speedbar-line-key indent) t))
        arch-alist inst-alist ent-inst-list
        ent-entry arch-entry inst-entry)
     (while ent-alist
@@ -14439,29 +14494,29 @@ entity ENT-KEY."
       (insert ")\n")
       (when (member 'hierarchy vhdl-speedbar-save-cache)
        (insert "\n;; entity and architecture cache\n"
-               "(aput 'vhdl-entity-alist " key " '")
-       (print (aget vhdl-entity-alist cache-key t) (current-buffer))
+               "(vhdl-aput 'vhdl-entity-alist " key " '")
+       (print (vhdl-aget vhdl-entity-alist cache-key t) (current-buffer))
        (insert ")\n\n;; configuration cache\n"
-               "(aput 'vhdl-config-alist " key " '")
-       (print (aget vhdl-config-alist cache-key t) (current-buffer))
+               "(vhdl-aput 'vhdl-config-alist " key " '")
+       (print (vhdl-aget vhdl-config-alist cache-key t) (current-buffer))
        (insert ")\n\n;; package cache\n"
-               "(aput 'vhdl-package-alist " key " '")
-       (print (aget vhdl-package-alist cache-key t) (current-buffer))
+               "(vhdl-aput 'vhdl-package-alist " key " '")
+       (print (vhdl-aget vhdl-package-alist cache-key t) (current-buffer))
        (insert ")\n\n;; instantiated entities cache\n"
-               "(aput 'vhdl-ent-inst-alist " key " '")
-       (print (aget vhdl-ent-inst-alist cache-key t) (current-buffer))
+               "(vhdl-aput 'vhdl-ent-inst-alist " key " '")
+       (print (vhdl-aget vhdl-ent-inst-alist cache-key t) (current-buffer))
        (insert ")\n\n;; design units per file cache\n"
-               "(aput 'vhdl-file-alist " key " '")
-       (print (aget vhdl-file-alist cache-key t) (current-buffer))
+               "(vhdl-aput 'vhdl-file-alist " key " '")
+       (print (vhdl-aget vhdl-file-alist cache-key t) (current-buffer))
        (when project
          (insert ")\n\n;; source directories in project cache\n"
-                 "(aput 'vhdl-directory-alist " key " '")
-         (print (aget vhdl-directory-alist cache-key t) (current-buffer)))
+                 "(vhdl-aput 'vhdl-directory-alist " key " '")
+         (print (vhdl-aget vhdl-directory-alist cache-key t) (current-buffer)))
        (insert ")\n"))
       (when (member 'display vhdl-speedbar-save-cache)
        (insert "\n;; shown design units cache\n"
-               "(aput 'vhdl-speedbar-shown-unit-alist " key " '")
-       (print (aget vhdl-speedbar-shown-unit-alist cache-key t)
+               "(vhdl-aput 'vhdl-speedbar-shown-unit-alist " key " '")
+       (print (vhdl-aget vhdl-speedbar-shown-unit-alist cache-key t)
               (current-buffer))
        (insert ")\n"))
       (setq vhdl-updated-project-list
@@ -14528,7 +14583,6 @@ if required."
 (defun vhdl-speedbar-initialize ()
   "Initialize speedbar."
   ;; general settings
-;  (set (make-local-variable 'speedbar-tag-hierarchy-method) nil)
   ;; VHDL file extensions (extracted from `auto-mode-alist')
   (let ((mode-alist auto-mode-alist))
     (while mode-alist
@@ -14626,11 +14680,7 @@ if required."
          (append
           '(("vhdl directory" vhdl-speedbar-update-current-unit)
             ("vhdl project" vhdl-speedbar-update-current-project
-             vhdl-speedbar-update-current-unit)
-;           ("files" (lambda () (setq speedbar-ignored-path-regexp
-;                                     (speedbar-extension-list-to-regex
-;                                      speedbar-ignored-path-expressions))))
-            )
+             vhdl-speedbar-update-current-unit))
           speedbar-stealthy-function-list))
     (when (eq vhdl-speedbar-display-mode 'directory)
       (setq speedbar-initial-expansion-list-name "vhdl directory"))
@@ -14724,10 +14774,7 @@ if required."
               (concat "^\\([0-9]+:\\s-*<\\)[+]>\\s-+" (caar project-alist) "$") nil t)
          (goto-char (match-end 1))
          (speedbar-do-function-pointer)))
-      (setq project-alist (cdr project-alist))))
-;   (vhdl-speedbar-update-current-project)
-;   (vhdl-speedbar-update-current-unit nil t)
-  )
+      (setq project-alist (cdr project-alist)))))
 
 (defun vhdl-speedbar-insert-project-hierarchy (project indent &optional rescan)
   "Insert hierarchy of PROJECT.  Rescan directories if RESCAN is non-nil,
@@ -14737,10 +14784,10 @@ otherwise use cached data."
     (vhdl-scan-project-contents project))
   ;; insert design hierarchy
   (vhdl-speedbar-insert-hierarchy
-   (aget vhdl-entity-alist project t)
-   (aget vhdl-config-alist project t)
-   (aget vhdl-package-alist project t)
-   (car (aget vhdl-ent-inst-alist project t)) indent)
+   (vhdl-aget vhdl-entity-alist project t)
+   (vhdl-aget vhdl-config-alist project t)
+   (vhdl-aget vhdl-package-alist project t)
+   (car (vhdl-aget vhdl-ent-inst-alist project t)) indent)
   (insert (int-to-string indent) ":\n")
   (put-text-property (- (point) 3) (1- (point)) 'invisible t)
   (put-text-property (1- (point)) (point) 'invisible nil)
@@ -14755,13 +14802,13 @@ otherwise use cached data."
     (vhdl-scan-directory-contents directory))
   ;; insert design hierarchy
   (vhdl-speedbar-insert-hierarchy
-   (aget vhdl-entity-alist directory t)
-   (aget vhdl-config-alist directory t)
-   (aget vhdl-package-alist directory t)
-   (car (aget vhdl-ent-inst-alist directory t)) depth)
+   (vhdl-aget vhdl-entity-alist directory t)
+   (vhdl-aget vhdl-config-alist directory t)
+   (vhdl-aget vhdl-package-alist directory t)
+   (car (vhdl-aget vhdl-ent-inst-alist directory t)) depth)
   ;; expand design units
   (vhdl-speedbar-expand-units directory)
-  (aput 'vhdl-directory-alist directory (list (list directory))))
+  (vhdl-aput 'vhdl-directory-alist directory (list (list directory))))
 
 (defun vhdl-speedbar-insert-hierarchy (ent-alist conf-alist pack-alist
                                                 ent-inst-list depth)
@@ -14849,10 +14896,10 @@ otherwise use cached data."
 (defun vhdl-speedbar-expand-units (key)
   "Expand design units in directory/project KEY according to
 `vhdl-speedbar-shown-unit-alist'."
-  (let ((unit-alist (aget vhdl-speedbar-shown-unit-alist key t))
+  (let ((unit-alist (vhdl-aget vhdl-speedbar-shown-unit-alist key t))
        (vhdl-speedbar-update-current-unit nil)
        vhdl-updated-project-list)
-    (adelete 'vhdl-speedbar-shown-unit-alist key)
+    (vhdl-adelete 'vhdl-speedbar-shown-unit-alist key)
     (vhdl-prepare-search-1
      (while unit-alist                 ; expand units
        (vhdl-speedbar-goto-this-unit key (caar unit-alist))
@@ -14902,7 +14949,7 @@ otherwise use cached data."
       (progn (setq vhdl-speedbar-shown-project-list nil)
             (vhdl-speedbar-refresh))
     (let ((key (vhdl-speedbar-line-key)))
-      (adelete 'vhdl-speedbar-shown-unit-alist key)
+      (vhdl-adelete 'vhdl-speedbar-shown-unit-alist key)
       (vhdl-speedbar-refresh (and vhdl-speedbar-show-projects key))
       (when (memq 'display vhdl-speedbar-save-cache)
        (add-to-list 'vhdl-updated-project-list key)))))
@@ -14911,9 +14958,9 @@ otherwise use cached data."
   "Expand all design units in current directory/project."
   (interactive)
   (let* ((key (vhdl-speedbar-line-key))
-        (ent-alist (aget vhdl-entity-alist key t))
-        (conf-alist (aget vhdl-config-alist key t))
-        (pack-alist (aget vhdl-package-alist key t))
+        (ent-alist (vhdl-aget vhdl-entity-alist key t))
+        (conf-alist (vhdl-aget vhdl-config-alist key t))
+        (pack-alist (vhdl-aget vhdl-package-alist key t))
         arch-alist unit-alist subunit-alist)
     (add-to-list 'vhdl-speedbar-shown-project-list key)
     (while ent-alist
@@ -14930,7 +14977,7 @@ otherwise use cached data."
     (while pack-alist
       (push (list (caar pack-alist)) unit-alist)
       (setq pack-alist (cdr pack-alist)))
-    (aput 'vhdl-speedbar-shown-unit-alist key unit-alist)
+    (vhdl-aput 'vhdl-speedbar-shown-unit-alist key unit-alist)
     (vhdl-speedbar-refresh)
     (when (memq 'display vhdl-speedbar-save-cache)
       (add-to-list 'vhdl-updated-project-list key))))
@@ -14965,8 +15012,8 @@ otherwise use cached data."
   (cond
    ((string-match "+" text)            ; expand entity
     (let* ((key (vhdl-speedbar-line-key indent))
-          (ent-alist (aget vhdl-entity-alist key t))
-          (ent-entry (aget ent-alist token t))
+          (ent-alist (vhdl-aget vhdl-entity-alist key t))
+          (ent-entry (vhdl-aget ent-alist token t))
           (arch-alist (nth 3 ent-entry))
           (inst-alist (vhdl-get-instantiations token indent))
           (subpack-alist (nth 5 ent-entry))
@@ -14976,9 +15023,9 @@ otherwise use cached data."
          (speedbar-change-expand-button-char ??)
        (speedbar-change-expand-button-char ?-)
        ;; add entity to `vhdl-speedbar-shown-unit-alist'
-       (let* ((unit-alist (aget vhdl-speedbar-shown-unit-alist key t)))
-         (aput 'unit-alist token nil)
-         (aput 'vhdl-speedbar-shown-unit-alist key unit-alist))
+       (let* ((unit-alist (vhdl-aget vhdl-speedbar-shown-unit-alist key t)))
+         (vhdl-aput 'unit-alist token nil)
+         (vhdl-aput 'vhdl-speedbar-shown-unit-alist key unit-alist))
        (speedbar-with-writable
         (save-excursion
           (end-of-line) (forward-char 1)
@@ -15017,11 +15064,11 @@ otherwise use cached data."
     (speedbar-change-expand-button-char ?+)
     ;; remove entity from `vhdl-speedbar-shown-unit-alist'
     (let* ((key (vhdl-speedbar-line-key indent))
-          (unit-alist (aget vhdl-speedbar-shown-unit-alist key t)))
-      (adelete 'unit-alist token)
+          (unit-alist (vhdl-aget vhdl-speedbar-shown-unit-alist key t)))
+      (vhdl-adelete 'unit-alist token)
       (if unit-alist
-         (aput 'vhdl-speedbar-shown-unit-alist key unit-alist)
-       (adelete 'vhdl-speedbar-shown-unit-alist key))
+         (vhdl-aput 'vhdl-speedbar-shown-unit-alist key unit-alist)
+       (vhdl-adelete 'vhdl-speedbar-shown-unit-alist key))
       (speedbar-delete-subblock indent)
       (when (memq 'display vhdl-speedbar-save-cache)
        (add-to-list 'vhdl-updated-project-list key))))
@@ -15034,23 +15081,24 @@ otherwise use cached data."
   (cond
    ((string-match "+" text)            ; expand architecture
     (let* ((key (vhdl-speedbar-line-key (1- indent)))
-          (ent-alist (aget vhdl-entity-alist key t))
-          (conf-alist (aget vhdl-config-alist key t))
+          (ent-alist (vhdl-aget vhdl-entity-alist key t))
+          (conf-alist (vhdl-aget vhdl-config-alist key t))
           (hier-alist (vhdl-get-hierarchy
                        ent-alist conf-alist (car token) (cdr token) nil nil
                        0 (1- indent)))
-          (ent-entry (aget ent-alist (car token) t))
-          (arch-entry (aget (nth 3 ent-entry) (cdr token) t))
+          (ent-entry (vhdl-aget ent-alist (car token) t))
+          (arch-entry (vhdl-aget (nth 3 ent-entry) (cdr token) t))
           (subpack-alist (nth 4 arch-entry))
           entry)
       (if (not (or hier-alist subpack-alist))
          (speedbar-change-expand-button-char ??)
        (speedbar-change-expand-button-char ?-)
        ;; add architecture to `vhdl-speedbar-shown-unit-alist'
-       (let* ((unit-alist (aget vhdl-speedbar-shown-unit-alist key t))
-              (arch-alist (nth 0 (aget unit-alist (car token) t))))
-         (aput 'unit-alist (car token) (list (cons (cdr token) arch-alist)))
-         (aput 'vhdl-speedbar-shown-unit-alist key unit-alist))
+       (let* ((unit-alist (vhdl-aget vhdl-speedbar-shown-unit-alist key t))
+              (arch-alist (nth 0 (vhdl-aget unit-alist (car token) t))))
+         (vhdl-aput 'unit-alist (car token)
+                    (list (cons (cdr token) arch-alist)))
+         (vhdl-aput 'vhdl-speedbar-shown-unit-alist key unit-alist))
        (speedbar-with-writable
          (save-excursion
            (end-of-line) (forward-char 1)
@@ -15077,10 +15125,10 @@ otherwise use cached data."
     (speedbar-change-expand-button-char ?+)
     ;; remove architecture from `vhdl-speedbar-shown-unit-alist'
     (let* ((key (vhdl-speedbar-line-key (1- indent)))
-          (unit-alist (aget vhdl-speedbar-shown-unit-alist key t))
-          (arch-alist (nth 0 (aget unit-alist (car token) t))))
-      (aput 'unit-alist (car token) (list (delete (cdr token) arch-alist)))
-      (aput 'vhdl-speedbar-shown-unit-alist key unit-alist)
+          (unit-alist (vhdl-aget vhdl-speedbar-shown-unit-alist key t))
+          (arch-alist (nth 0 (vhdl-aget unit-alist (car token) t))))
+      (vhdl-aput 'unit-alist (car token) (list (delete (cdr token) arch-alist)))
+      (vhdl-aput 'vhdl-speedbar-shown-unit-alist key unit-alist)
       (speedbar-delete-subblock indent)
       (when (memq 'display vhdl-speedbar-save-cache)
        (add-to-list 'vhdl-updated-project-list key))))
@@ -15093,9 +15141,9 @@ otherwise use cached data."
   (cond
    ((string-match "+" text)            ; expand configuration
     (let* ((key (vhdl-speedbar-line-key indent))
-          (conf-alist (aget vhdl-config-alist key t))
-          (conf-entry (aget conf-alist token))
-          (ent-alist (aget vhdl-entity-alist key t))
+          (conf-alist (vhdl-aget vhdl-config-alist key t))
+          (conf-entry (vhdl-aget conf-alist token))
+          (ent-alist (vhdl-aget vhdl-entity-alist key t))
           (hier-alist (vhdl-get-hierarchy
                        ent-alist conf-alist (nth 3 conf-entry)
                        (nth 4 conf-entry) token (nth 5 conf-entry)
@@ -15106,9 +15154,9 @@ otherwise use cached data."
          (speedbar-change-expand-button-char ??)
        (speedbar-change-expand-button-char ?-)
        ;; add configuration to `vhdl-speedbar-shown-unit-alist'
-       (let* ((unit-alist (aget vhdl-speedbar-shown-unit-alist key t)))
-         (aput 'unit-alist token nil)
-         (aput 'vhdl-speedbar-shown-unit-alist key unit-alist))
+       (let* ((unit-alist (vhdl-aget vhdl-speedbar-shown-unit-alist key t)))
+         (vhdl-aput 'unit-alist token nil)
+         (vhdl-aput 'vhdl-speedbar-shown-unit-alist key unit-alist))
        (speedbar-with-writable
         (save-excursion
           (end-of-line) (forward-char 1)
@@ -15134,11 +15182,11 @@ otherwise use cached data."
     (speedbar-change-expand-button-char ?+)
     ;; remove configuration from `vhdl-speedbar-shown-unit-alist'
     (let* ((key (vhdl-speedbar-line-key indent))
-          (unit-alist (aget vhdl-speedbar-shown-unit-alist key t)))
-      (adelete 'unit-alist token)
+          (unit-alist (vhdl-aget vhdl-speedbar-shown-unit-alist key t)))
+      (vhdl-adelete 'unit-alist token)
       (if unit-alist
-         (aput 'vhdl-speedbar-shown-unit-alist key unit-alist)
-       (adelete 'vhdl-speedbar-shown-unit-alist key))
+         (vhdl-aput 'vhdl-speedbar-shown-unit-alist key unit-alist)
+       (vhdl-adelete 'vhdl-speedbar-shown-unit-alist key))
       (speedbar-delete-subblock indent)
       (when (memq 'display vhdl-speedbar-save-cache)
        (add-to-list 'vhdl-updated-project-list key))))
@@ -15151,8 +15199,8 @@ otherwise use cached data."
   (cond
    ((string-match "+" text)            ; expand package
     (let* ((key (vhdl-speedbar-line-key indent))
-          (pack-alist (aget vhdl-package-alist key t))
-          (pack-entry (aget pack-alist token t))
+          (pack-alist (vhdl-aget vhdl-package-alist key t))
+          (pack-entry (vhdl-aget pack-alist token t))
           (comp-alist (nth 3 pack-entry))
           (func-alist (nth 4 pack-entry))
           (func-body-alist (nth 8 pack-entry))
@@ -15162,9 +15210,9 @@ otherwise use cached data."
          (speedbar-change-expand-button-char ??)
        (speedbar-change-expand-button-char ?-)
        ;; add package to `vhdl-speedbar-shown-unit-alist'
-       (let* ((unit-alist (aget vhdl-speedbar-shown-unit-alist key t)))
-         (aput 'unit-alist token nil)
-         (aput 'vhdl-speedbar-shown-unit-alist key unit-alist))
+       (let* ((unit-alist (vhdl-aget vhdl-speedbar-shown-unit-alist key t)))
+         (vhdl-aput 'unit-alist token nil)
+         (vhdl-aput 'vhdl-speedbar-shown-unit-alist key unit-alist))
        (speedbar-with-writable
          (save-excursion
            (end-of-line) (forward-char 1)
@@ -15185,7 +15233,8 @@ otherwise use cached data."
              (vhdl-speedbar-make-title-line "Subprograms:" (1+ indent)))
            (while func-alist
              (setq func-entry (car func-alist)
-                   func-body-entry (aget func-body-alist (car func-entry) t))
+                   func-body-entry (vhdl-aget func-body-alist
+                                              (car func-entry) t))
              (when (nth 2 func-entry)
                (vhdl-speedbar-make-subprogram-line
                 (nth 1 func-entry)
@@ -15203,11 +15252,11 @@ otherwise use cached data."
     (speedbar-change-expand-button-char ?+)
     ;; remove package from `vhdl-speedbar-shown-unit-alist'
     (let* ((key (vhdl-speedbar-line-key indent))
-          (unit-alist (aget vhdl-speedbar-shown-unit-alist key t)))
-      (adelete 'unit-alist token)
+          (unit-alist (vhdl-aget vhdl-speedbar-shown-unit-alist key t)))
+      (vhdl-adelete 'unit-alist token)
       (if unit-alist
-         (aput 'vhdl-speedbar-shown-unit-alist key unit-alist)
-       (adelete 'vhdl-speedbar-shown-unit-alist key))
+         (vhdl-aput 'vhdl-speedbar-shown-unit-alist key unit-alist)
+       (vhdl-adelete 'vhdl-speedbar-shown-unit-alist key))
       (speedbar-delete-subblock indent)
       (when (memq 'display vhdl-speedbar-save-cache)
        (add-to-list 'vhdl-updated-project-list key))))
@@ -15217,15 +15266,15 @@ otherwise use cached data."
 
 (defun vhdl-speedbar-insert-subpackages (subpack-alist indent dir-indent)
   "Insert required packages."
-  (let* ((pack-alist (aget vhdl-package-alist
-                          (vhdl-speedbar-line-key dir-indent) t))
+  (let* ((pack-alist (vhdl-aget vhdl-package-alist
+                               (vhdl-speedbar-line-key dir-indent) t))
         pack-key lib-name pack-entry)
     (when subpack-alist
       (vhdl-speedbar-make-title-line "Packages Used:" indent))
     (while subpack-alist
       (setq pack-key (cdar subpack-alist)
            lib-name (caar subpack-alist))
-      (setq pack-entry (aget pack-alist pack-key t))
+      (setq pack-entry (vhdl-aget pack-alist pack-key t))
       (vhdl-speedbar-make-subpack-line
        (or (nth 0 pack-entry) pack-key) lib-name
        (cons (nth 1 pack-entry) (nth 2 pack-entry))
@@ -15283,18 +15332,21 @@ NO-POSITION non-nil means do not re-position cursor."
               (or always (not (equal file-name speedbar-last-selected-file))))
       (if vhdl-speedbar-show-projects
          (while project-list
-           (setq file-alist (append file-alist (aget vhdl-file-alist
-                                                     (car project-list) t)))
+           (setq file-alist (append file-alist
+                                    (vhdl-aget vhdl-file-alist
+                                               (car project-list) t)))
            (setq project-list (cdr project-list)))
-       (setq file-alist (aget vhdl-file-alist
-                              (abbreviate-file-name default-directory) t)))
+       (setq file-alist
+             (vhdl-aget vhdl-file-alist
+                        (abbreviate-file-name default-directory) t)))
       (select-frame speedbar-frame)
       (set-buffer speedbar-buffer)
       (speedbar-with-writable
        (vhdl-prepare-search-1
        (save-excursion
          ;; unhighlight last units
-         (let* ((file-entry (aget file-alist speedbar-last-selected-file t)))
+         (let* ((file-entry (vhdl-aget file-alist
+                                       speedbar-last-selected-file t)))
            (vhdl-speedbar-update-units
             "\\[.\\] " (nth 0 file-entry)
             speedbar-last-selected-file 'vhdl-speedbar-entity-face)
@@ -15314,7 +15366,7 @@ NO-POSITION non-nil means do not re-position cursor."
             "> " (nth 6 file-entry)
             speedbar-last-selected-file 'vhdl-speedbar-instantiation-face))
          ;; highlight current units
-         (let* ((file-entry (aget file-alist file-name t)))
+         (let* ((file-entry (vhdl-aget file-alist file-name t)))
            (setq
             pos (vhdl-speedbar-update-units
                  "\\[.\\] " (nth 0 file-entry)
@@ -15747,7 +15799,8 @@ is already shown in a buffer."
     (let ((buffer (get-file-buffer (car token))))
       (speedbar-find-file-in-frame (car token))
       (when (or vhdl-speedbar-jump-to-unit buffer)
-       (vhdl-goto-line (cdr token))
+       (goto-char (point-min))
+       (forward-line (1- (cdr token)))
        (recenter))
       (vhdl-speedbar-update-current-unit t t)
       (speedbar-set-timer dframe-update-speed)
@@ -15765,7 +15818,8 @@ is already shown in a buffer."
              (let ((token (get-text-property
                            (match-beginning 3) 'speedbar-token)))
                (vhdl-visit-file (car token) t
-                                (progn (vhdl-goto-line (cdr token))
+                                (progn (goto-char (point-min))
+                                       (forward-line (1- (cdr token)))
                                        (end-of-line)
                                        (if is-entity
                                            (vhdl-port-copy)
@@ -15805,9 +15859,11 @@ is already shown in a buffer."
       (error "ERROR:  No architecture under cursor")
     (let* ((arch-key (downcase (vhdl-speedbar-line-text)))
           (ent-key (downcase (vhdl-speedbar-higher-text)))
-          (ent-alist (aget vhdl-entity-alist
-                           (or (vhdl-project-p) default-directory) t))
-          (ent-entry (aget ent-alist ent-key t)))
+          (ent-alist (vhdl-aget
+                      vhdl-entity-alist
+                      (or (vhdl-project-p)
+                          (abbreviate-file-name default-directory)) t))
+          (ent-entry (vhdl-aget ent-alist ent-key t)))
       (setcar (cddr (cddr ent-entry)) arch-key) ; (nth 4 ent-entry)
       (speedbar-refresh))))
 
@@ -15946,15 +16002,14 @@ expansion function)."
 
 ;; add speedbar
 (when (fboundp 'speedbar)
-  (condition-case ()
-      (when (and vhdl-speedbar-auto-open
-                (not (and (boundp 'speedbar-frame)
-                          (frame-live-p speedbar-frame))))
-       (speedbar-frame-mode 1)
-       (if (fboundp 'speedbar-select-attached-frame)
-           (speedbar-select-attached-frame)
-         (select-frame speedbar-attached-frame)))
-    (error (vhdl-warning-when-idle "ERROR:  An error occurred while opening speedbar"))))
+  (let ((current-frame (selected-frame)))
+    (condition-case ()
+       (when (and vhdl-speedbar-auto-open
+                  (not (and (boundp 'speedbar-frame)
+                            (frame-live-p speedbar-frame))))
+         (speedbar-frame-mode 1))
+      (error (vhdl-warning-when-idle "ERROR:  An error occurred while opening speedbar")))
+    (select-frame current-frame)))
 
 ;; initialize speedbar
 (if (not (boundp 'speedbar-frame))
@@ -16217,7 +16272,7 @@ component instantiation."
             (setq constant-entry
                   (cons constant-name
                         (if (match-string 1)
-                            (or (aget generic-alist (match-string 2) t)
+                            (or (vhdl-aget generic-alist (match-string 2) t)
                                 (error "ERROR:  Formal generic \"%s\" mismatch for instance \"%s\"" (match-string 2) inst-name))
                           (cdar generic-alist))))
             (push constant-entry constant-alist)
@@ -16235,11 +16290,12 @@ component instantiation."
         (vhdl-forward-syntactic-ws)
         (while (vhdl-parse-string "\\(\\(\\w+\\)[ \t\n\r\f]*=>[ \t\n\r\f]*\\)?\\(\\w+\\),?" t)
           (setq signal-name (match-string-no-properties 3))
-          (setq signal-entry (cons signal-name
-                                   (if (match-string 1)
-                                       (or (aget port-alist (match-string 2) t)
-                                           (error "ERROR:  Formal port \"%s\" mismatch for instance \"%s\"" (match-string 2) inst-name))
-                                     (cdar port-alist))))
+          (setq signal-entry
+                (cons signal-name
+                      (if (match-string 1)
+                          (or (vhdl-aget port-alist (match-string 2) t)
+                              (error "ERROR:  Formal port \"%s\" mismatch for instance \"%s\"" (match-string 2) inst-name))
+                        (cdar port-alist))))
           (push signal-entry signal-alist)
           (setq signal-name (downcase signal-name))
           (if (equal (upcase (nth 2 signal-entry)) "IN")
@@ -16478,8 +16534,9 @@ current project/directory."
         (pack-file-name
          (concat (vhdl-replace-string vhdl-package-file-name pack-name t)
                  "." (file-name-extension (buffer-file-name))))
-        (ent-alist (aget vhdl-entity-alist
-                         (or project default-directory) t))
+        (ent-alist (vhdl-aget vhdl-entity-alist
+                              (or project
+                                  (abbreviate-file-name default-directory)) t))
         (lazy-lock-minimum-size 0)
         clause-pos component-pos)
     (message "Generating components package \"%s\"..." pack-name)
@@ -16519,7 +16576,8 @@ current project/directory."
     ;; insert component declarations
     (while ent-alist
       (vhdl-visit-file (nth 2 (car ent-alist)) nil
-                      (progn (vhdl-goto-line (nth 3 (car ent-alist)))
+                      (progn (goto-char (point-min))
+                             (forward-line (1- (nth 3 (car ent-alist))))
                              (end-of-line)
                              (vhdl-port-copy)))
       (goto-char component-pos)
@@ -16581,7 +16639,7 @@ current project/directory."
          (when (equal (nth 5 inst-entry) (nth 4 (car tmp-alist)))
            (setq conf-key (nth 0 (car tmp-alist))))
          (setq tmp-alist (cdr tmp-alist)))
-       (setq conf-entry (aget conf-alist conf-key t))
+       (setq conf-entry (vhdl-aget conf-alist conf-key t))
        ;; insert binding indication ...
        ;; ... with subconfiguration (if exists)
        (if (and vhdl-compose-configuration-use-subconfiguration conf-entry)
@@ -16591,7 +16649,7 @@ current project/directory."
              (insert (vhdl-work-library) "." (nth 0 conf-entry))
              (insert ";\n"))
          ;; ... with entity (if exists)
-         (setq ent-entry (aget ent-alist (nth 5 inst-entry) t))
+         (setq ent-entry (vhdl-aget ent-alist (nth 5 inst-entry) t))
          (when ent-entry
            (indent-to (+ margin vhdl-basic-offset))
            (vhdl-insert-keyword "USE ENTITY ")
@@ -16601,9 +16659,9 @@ current project/directory."
              (setq arch-name
                    ;; choose architecture name a) from configuration,
                    ;; b) from mra, or c) from first architecture
-                   (or (nth 0 (aget (nth 3 ent-entry)
-                                    (or (nth 6 inst-entry)
-                                        (nth 4 ent-entry)) t))
+                   (or (nth 0 (vhdl-aget (nth 3 ent-entry)
+                                         (or (nth 6 inst-entry)
+                                             (nth 4 ent-entry)) t))
                        (nth 1 (car (nth 3 ent-entry)))))
              (insert "(" arch-name ")"))
            (insert ";\n")
@@ -16613,7 +16671,7 @@ current project/directory."
              (indent-to (+ margin vhdl-basic-offset))
              (vhdl-compose-configuration-architecture
               (nth 0 ent-entry) arch-name ent-alist conf-alist
-              (nth 3 (aget (nth 3 ent-entry) (downcase arch-name) t))))))
+              (nth 3 (vhdl-aget (nth 3 ent-entry) (downcase arch-name) t))))))
        ;; insert component configuration end
        (indent-to margin)
        (vhdl-insert-keyword "END FOR;\n")
@@ -16635,10 +16693,12 @@ current project/directory."
   "Generate configuration declaration."
   (interactive)
   (vhdl-require-hierarchy-info)
-  (let ((ent-alist (aget vhdl-entity-alist
-                        (or (vhdl-project-p) default-directory) t))
-       (conf-alist (aget vhdl-config-alist
-                         (or (vhdl-project-p) default-directory) t))
+  (let ((ent-alist (vhdl-aget vhdl-entity-alist
+                             (or (vhdl-project-p)
+                                 (abbreviate-file-name default-directory)) t))
+       (conf-alist (vhdl-aget vhdl-config-alist
+                              (or (vhdl-project-p)
+                                  (abbreviate-file-name default-directory)) t))
        (from-speedbar ent-name)
        inst-alist conf-name conf-file-name pos)
     (vhdl-prepare-search-2
@@ -16654,8 +16714,8 @@ current project/directory."
                      vhdl-compose-configuration-name
                      (concat ent-name " " arch-name)))
      (setq inst-alist
-          (nth 3 (aget (nth 3 (aget ent-alist (downcase ent-name) t))
-                       (downcase arch-name) t))))
+          (nth 3 (vhdl-aget (nth 3 (vhdl-aget ent-alist (downcase ent-name) t))
+                            (downcase arch-name) t))))
      (message "Generating configuration \"%s\"..." conf-name)
      (if vhdl-compose-configuration-create-file
         ;; open configuration file
@@ -16721,8 +16781,8 @@ current project/directory."
 (defun vhdl-makefile-name ()
   "Return the Makefile name of the current project or the current compiler if
 no project is defined."
-  (let ((project-alist (aget vhdl-project-alist vhdl-project))
-       (compiler-alist (aget vhdl-compiler-alist vhdl-compiler)))
+  (let ((project-alist (vhdl-aget vhdl-project-alist vhdl-project))
+       (compiler-alist (vhdl-aget vhdl-compiler-alist vhdl-compiler)))
     (vhdl-replace-string
      (cons "\\(.*\\)\n\\(.*\\)"
           (or (nth 8 project-alist) (nth 8 compiler-alist)))
@@ -16730,8 +16790,8 @@ no project is defined."
 
 (defun vhdl-compile-directory ()
   "Return the directory where compilation/make should be run."
-  (let* ((project (aget vhdl-project-alist (vhdl-project-p t)))
-        (compiler (aget vhdl-compiler-alist vhdl-compiler))
+  (let* ((project (vhdl-aget vhdl-project-alist (vhdl-project-p t)))
+        (compiler (vhdl-aget vhdl-compiler-alist vhdl-compiler))
         (directory (vhdl-resolve-env-variable
                     (if project
                         (vhdl-replace-string
@@ -16765,9 +16825,10 @@ no project is defined."
 
 (defun vhdl-compile-init ()
   "Initialize for compilation."
-  (when (or (null compilation-error-regexp-alist)
-           (not (assoc (car (nth 11 (car vhdl-compiler-alist)))
-                       compilation-error-regexp-alist)))
+  (when (and (not vhdl-emacs-22)
+            (or (null compilation-error-regexp-alist)
+                (not (assoc (car (nth 11 (car vhdl-compiler-alist)))
+                            compilation-error-regexp-alist))))
     ;; `compilation-error-regexp-alist'
     (let ((commands-alist vhdl-compiler-alist)
          regexp-alist sublist)
@@ -16810,7 +16871,7 @@ do not print any file names."
                                         &optional file-options-only)
   "Get compiler options.  Returning nil means do not compile this file."
   (let* ((compiler-options (nth 1 compiler))
-        (project-entry (aget (nth 4 project) vhdl-compiler))
+        (project-entry (vhdl-aget (nth 4 project) vhdl-compiler))
         (project-options (nth 0 project-entry))
         (exception-list (and file-name (nth 2 project-entry)))
         (work-library (vhdl-work-library))
@@ -16847,7 +16908,7 @@ do not print any file names."
 (defun vhdl-get-make-options (project compiler)
   "Get make options."
   (let* ((compiler-options (nth 3 compiler))
-        (project-entry (aget (nth 4 project) vhdl-compiler))
+        (project-entry (vhdl-aget (nth 4 project) vhdl-compiler))
         (project-options (nth 1 project-entry))
         (makefile-name (vhdl-makefile-name)))
     ;; insert Makefile name in compiler-specific options
@@ -16868,8 +16929,8 @@ do not print any file names."
 `vhdl-compiler'."
   (interactive)
   (vhdl-compile-init)
-  (let* ((project (aget vhdl-project-alist vhdl-project))
-        (compiler (or (aget vhdl-compiler-alist vhdl-compiler nil)
+  (let* ((project (vhdl-aget vhdl-project-alist vhdl-project))
+        (compiler (or (vhdl-aget vhdl-compiler-alist vhdl-compiler nil)
                       (error "ERROR:  No such compiler: \"%s\"" vhdl-compiler)))
         (command (nth 0 compiler))
         (default-directory (vhdl-compile-directory))
@@ -16910,8 +16971,8 @@ specified by a target."
        (or target (read-from-minibuffer "Target: " vhdl-make-target
                                         vhdl-minibuffer-local-map)))
   (vhdl-compile-init)
-  (let* ((project (aget vhdl-project-alist vhdl-project))
-        (compiler (or (aget vhdl-compiler-alist vhdl-compiler)
+  (let* ((project (vhdl-aget vhdl-project-alist vhdl-project))
+        (compiler (or (vhdl-aget vhdl-compiler-alist vhdl-compiler)
                       (error "ERROR:  No such compiler: \"%s\"" vhdl-compiler)))
         (command (nth 2 compiler))
         (options (vhdl-get-make-options project compiler))
@@ -16928,17 +16989,20 @@ specified by a target."
   (let ((compiler-alist vhdl-compiler-alist)
        (error-regexp-alist '((vhdl-directory "^ *Compiling \"\\(.+\\)\"" 1))))
    (while compiler-alist
-     ;; add error message regexps
-     (setq error-regexp-alist
-          (cons (append (list (make-symbol (concat "vhdl-" (subst-char-in-string ?  ?- (downcase (nth 0 (car compiler-alist)))))))
-                        (nth 11 (car compiler-alist)))
-                error-regexp-alist))
-     ;; add filename regexps
-     (when (/= 0 (nth 1 (nth 12 (car compiler-alist))))
+     ;; only add regexps for currently selected compiler
+     (when (or (not vhdl-compile-use-local-error-regexp)
+              (equal vhdl-compiler (nth 0 (car compiler-alist))))
+       ;; add error message regexps
        (setq error-regexp-alist
-            (cons (append (list (make-symbol (concat "vhdl-" (subst-char-in-string ?  ?- (downcase (nth 0 (car compiler-alist)))) "-file")))
-                          (nth 12 (car compiler-alist)))
-                  error-regexp-alist)))
+            (cons (append (list (make-symbol (concat "vhdl-" (subst-char-in-string ?  ?- (downcase (nth 0 (car compiler-alist)))))))
+                          (nth 11 (car compiler-alist)))
+                  error-regexp-alist))
+       ;; add filename regexps
+       (when (/= 0 (nth 1 (nth 12 (car compiler-alist))))
+        (setq error-regexp-alist
+              (cons (append (list (make-symbol (concat "vhdl-" (subst-char-in-string ?  ?- (downcase (nth 0 (car compiler-alist)))) "-file")))
+                            (nth 12 (car compiler-alist)))
+                    error-regexp-alist))))
      (setq compiler-alist (cdr compiler-alist)))
    error-regexp-alist)
   "List of regexps for VHDL compilers.  For Emacs 22+.")
@@ -16949,6 +17013,10 @@ specified by a target."
   (interactive)
   (when (and (boundp 'compilation-error-regexp-alist-alist)
             (not (assoc 'vhdl-modelsim compilation-error-regexp-alist-alist)))
+    ;; remove all other compilers
+    (when vhdl-compile-use-local-error-regexp
+      (setq compilation-error-regexp-alist nil))
+    ;; add VHDL compilers
     (mapcar
      (lambda (item)
        (push (car item) compilation-error-regexp-alist)
@@ -16964,7 +17032,7 @@ specified by a target."
 (defun vhdl-generate-makefile ()
   "Generate `Makefile'."
   (interactive)
-  (let* ((compiler (or (aget vhdl-compiler-alist vhdl-compiler)
+  (let* ((compiler (or (vhdl-aget vhdl-compiler-alist vhdl-compiler)
                       (error "ERROR:  No such compiler: \"%s\"" vhdl-compiler)))
         (command (nth 4 compiler)))
     ;; generate makefile
@@ -16997,15 +17065,19 @@ specified by a target."
        (vhdl-scan-directory-contents directory))))
   (let* ((directory (abbreviate-file-name (vhdl-default-directory)))
         (project (vhdl-project-p))
-        (ent-alist (aget vhdl-entity-alist (or project directory) t))
-        (conf-alist (aget vhdl-config-alist (or project directory) t))
-        (pack-alist (aget vhdl-package-alist (or project directory) t))
-        (regexp-list (nth 12 (aget vhdl-compiler-alist vhdl-compiler)))
-        (ent-regexp (cons "\\(.*\\)" (nth 0 regexp-list)))
-        (arch-regexp (cons "\\(.*\\) \\(.*\\)" (nth 1 regexp-list)))
-        (conf-regexp (cons "\\(.*\\)" (nth 2 regexp-list)))
-        (pack-regexp (cons "\\(.*\\)" (nth 3 regexp-list)))
-        (pack-body-regexp (cons "\\(.*\\)" (nth 4 regexp-list)))
+        (ent-alist (vhdl-aget vhdl-entity-alist (or project directory) t))
+        (conf-alist (vhdl-aget vhdl-config-alist (or project directory) t))
+        (pack-alist (vhdl-aget vhdl-package-alist (or project directory) t))
+        (regexp-list (or (nth 12 (vhdl-aget vhdl-compiler-alist vhdl-compiler))
+                         '("\\1.vhd" "\\2_\\1.vhd" "\\1.vhd"
+                           "\\1.vhd" "\\1_body.vhd" identity)))
+        (mapping-exist
+         (if (nth 12 (vhdl-aget vhdl-compiler-alist vhdl-compiler)) t nil))
+        (ent-regexp (cons "\\(.*\\) \\(.*\\) \\(.*\\)" (nth 0 regexp-list)))
+        (arch-regexp (cons "\\(.*\\) \\(.*\\) \\(.*\\)" (nth 1 regexp-list)))
+        (conf-regexp (cons "\\(.*\\) \\(.*\\) \\(.*\\)" (nth 2 regexp-list)))
+        (pack-regexp (cons "\\(.*\\) \\(.*\\) \\(.*\\)" (nth 3 regexp-list)))
+        (pack-body-regexp (cons "\\(.*\\) \\(.*\\) \\(.*\\)" (nth 4 regexp-list)))
         (adjust-case (nth 5 regexp-list))
         (work-library (downcase (vhdl-work-library)))
         (compile-directory (expand-file-name (vhdl-compile-directory)
@@ -17022,9 +17094,10 @@ specified by a target."
     ;; check prerequisites
     (unless (file-exists-p compile-directory)
       (make-directory compile-directory t))
-    (unless regexp-list
-      (error "Please contact the VHDL Mode maintainer for support of \"%s\""
-            vhdl-compiler))
+    (unless mapping-exist
+      (vhdl-warning
+       (format "No unit-to-file name mapping found for compiler \"%s\".\n  Directory of dummy files is created instead (to be used as dependencies).\n  Please contact the VHDL Mode maintainer for full support of \"%s\""
+              vhdl-compiler vhdl-compiler) t))
     (message "Generating makefile \"%s\"..." makefile-name)
     ;; rules for all entities
     (setq tmp-list ent-alist)
@@ -17038,13 +17111,15 @@ specified by a target."
                                                  compile-directory))
              arch-alist (nth 4 ent-entry)
              lib-alist (nth 6 ent-entry)
-             rule (aget rule-alist ent-file-name)
+             rule (vhdl-aget rule-alist ent-file-name)
              target-list (nth 0 rule)
              depend-list (nth 1 rule)
              second-list nil
              subcomp-list nil)
        (setq tmp-key (vhdl-replace-string
-                      ent-regexp (funcall adjust-case ent-key)))
+                      ent-regexp
+                      (funcall adjust-case
+                               (concat ent-key "  " work-library))))
        (push (cons ent-key tmp-key) unit-list)
        ;; rule target for this entity
        (push ent-key target-list)
@@ -17053,7 +17128,7 @@ specified by a target."
        (setq depend-list (append depend-list pack-list))
        (setq all-pack-list pack-list)
        ;; add rule
-       (aput 'rule-alist ent-file-name (list target-list depend-list))
+       (vhdl-aput 'rule-alist ent-file-name (list target-list depend-list))
        ;; rules for all corresponding architectures
        (while arch-alist
          (setq arch-entry (car arch-alist)
@@ -17065,12 +17140,14 @@ specified by a target."
                                                     compile-directory))
                inst-alist (nth 4 arch-entry)
                lib-alist (nth 5 arch-entry)
-               rule (aget rule-alist arch-file-name)
+               rule (vhdl-aget rule-alist arch-file-name)
                target-list (nth 0 rule)
                depend-list (nth 1 rule))
          (setq tmp-key (vhdl-replace-string
                         arch-regexp
-                        (funcall adjust-case (concat arch-key " " ent-key))))
+                        (funcall adjust-case
+                                 (concat arch-key " " ent-key " "
+                                         work-library))))
          (setq unit-list
                (cons (cons ent-arch-key tmp-key) unit-list))
          (push ent-arch-key second-list)
@@ -17093,7 +17170,7 @@ specified by a target."
          (setq depend-list (append depend-list pack-list))
          (setq all-pack-list (append all-pack-list pack-list))
          ;; add rule
-         (aput 'rule-alist arch-file-name (list target-list depend-list))
+         (vhdl-aput 'rule-alist arch-file-name (list target-list depend-list))
          (setq arch-alist (cdr arch-alist)))
        (push (list ent-key second-list (append subcomp-list all-pack-list))
              prim-list))
@@ -17112,12 +17189,14 @@ specified by a target."
            arch-key (nth 5 conf-entry)
            inst-alist (nth 6 conf-entry)
            lib-alist (nth 7 conf-entry)
-           rule (aget rule-alist conf-file-name)
+           rule (vhdl-aget rule-alist conf-file-name)
            target-list (nth 0 rule)
            depend-list (nth 1 rule)
            subcomp-list (list ent-key))
       (setq tmp-key (vhdl-replace-string
-                    conf-regexp (funcall adjust-case conf-key)))
+                    conf-regexp
+                    (funcall adjust-case
+                             (concat conf-key "  " work-library))))
       (push (cons conf-key tmp-key) unit-list)
       ;; rule target for this configuration
       (push conf-key target-list)
@@ -17131,20 +17210,17 @@ specified by a target."
       (while inst-alist
        (setq inst-entry (car inst-alist))
        (setq inst-ent-key (nth 2 inst-entry)
-;             comp-arch-key (nth 2 inst-entry))
              inst-conf-key (nth 4 inst-entry))
        (when (equal (downcase (nth 5 inst-entry)) work-library)
          (when inst-ent-key
            (setq depend-list (cons inst-ent-key depend-list)
                  subcomp-list (cons inst-ent-key subcomp-list)))
-;          (when comp-arch-key
-;            (push (concat comp-ent-key "-" comp-arch-key) depend-list))
          (when inst-conf-key
            (setq depend-list (cons inst-conf-key depend-list)
                  subcomp-list (cons inst-conf-key subcomp-list))))
        (setq inst-alist (cdr inst-alist)))
       ;; add rule
-      (aput 'rule-alist conf-file-name (list target-list depend-list))
+      (vhdl-aput 'rule-alist conf-file-name (list target-list depend-list))
       (push (list conf-key nil (append subcomp-list pack-list)) prim-list)
       (setq conf-alist (cdr conf-alist)))
     (setq conf-alist tmp-list)
@@ -17160,10 +17236,12 @@ specified by a target."
                               (file-relative-name (nth 2 pack-entry)
                                                   compile-directory))
              lib-alist (nth 6 pack-entry) lib-body-alist (nth 10 pack-entry)
-             rule (aget rule-alist pack-file-name)
+             rule (vhdl-aget rule-alist pack-file-name)
              target-list (nth 0 rule) depend-list (nth 1 rule))
        (setq tmp-key (vhdl-replace-string
-                      pack-regexp (funcall adjust-case pack-key)))
+                      pack-regexp
+                      (funcall adjust-case
+                               (concat pack-key "  " work-library))))
        (push (cons pack-key tmp-key) unit-list)
        ;; rule target for this package
        (push pack-key target-list)
@@ -17172,7 +17250,7 @@ specified by a target."
        (setq depend-list (append depend-list pack-list))
        (setq all-pack-list pack-list)
        ;; add rule
-       (aput 'rule-alist pack-file-name (list target-list depend-list))
+       (vhdl-aput 'rule-alist pack-file-name (list target-list depend-list))
        ;; rules for this package's body
        (when (nth 7 pack-entry)
          (setq pack-body-key (concat pack-key "-body")
@@ -17180,11 +17258,13 @@ specified by a target."
                                        (nth 7 pack-entry)
                                      (file-relative-name (nth 7 pack-entry)
                                                          compile-directory))
-               rule (aget rule-alist pack-body-file-name)
+               rule (vhdl-aget rule-alist pack-body-file-name)
                target-list (nth 0 rule)
                depend-list (nth 1 rule))
          (setq tmp-key (vhdl-replace-string
-                        pack-body-regexp (funcall adjust-case pack-key)))
+                        pack-body-regexp
+                        (funcall adjust-case
+                                 (concat pack-key "  " work-library))))
          (setq unit-list
                (cons (cons pack-body-key tmp-key) unit-list))
          ;; rule target for this package's body
@@ -17196,8 +17276,8 @@ specified by a target."
          (setq depend-list (append depend-list pack-list))
          (setq all-pack-list (append all-pack-list pack-list))
          ;; add rule
-         (aput 'rule-alist pack-body-file-name
-               (list target-list depend-list)))
+         (vhdl-aput 'rule-alist pack-body-file-name
+                    (list target-list depend-list)))
        (setq prim-list
              (cons (list pack-key (when pack-body-key (list pack-body-key))
                          all-pack-list)
@@ -17205,8 +17285,8 @@ specified by a target."
       (setq pack-alist (cdr pack-alist)))
     (setq pack-alist tmp-list)
     ;; generate Makefile
-    (let* ((project (aget vhdl-project-alist project))
-          (compiler (aget vhdl-compiler-alist vhdl-compiler))
+    (let* ((project (vhdl-aget vhdl-project-alist project))
+          (compiler (vhdl-aget vhdl-compiler-alist vhdl-compiler))
           (compiler-id (nth 9 compiler))
           (library-directory
            (vhdl-resolve-env-variable
@@ -17259,12 +17339,16 @@ specified by a target."
                compile-directory))))
       (insert "\n\n# Define library paths\n"
              "\nLIBRARY-" work-library " = " library-directory "\n")
+      (unless mapping-exist
+       (insert "LIBRARY-" work-library "-make = " "$(LIBRARY-" work-library
+               ")/make" "\n"))
       ;; insert variable definitions for all library unit files
       (insert "\n\n# Define library unit files\n")
       (setq tmp-list unit-list)
       (while unit-list
        (insert "\nUNIT-" work-library "-" (caar unit-list)
-               " = \\\n\t$(LIBRARY-" work-library ")/" (cdar unit-list))
+               " = \\\n\t$(LIBRARY-" work-library
+               (if mapping-exist "" "-make") ")/" (cdar unit-list))
        (setq unit-list (cdr unit-list)))
       ;; insert variable definition for list of all library unit files
       (insert "\n\n\n# Define list of all library unit files\n"
@@ -17287,13 +17371,20 @@ specified by a target."
       ;; insert `make library' rule
       (insert "\n\n# Rule for creating library directory\n"
              "\n" (nth 2 vhdl-makefile-default-targets) " :"
-             " \\\n\t\t$(LIBRARY-" work-library ")\n"
+             " \\\n\t\t$(LIBRARY-" work-library ")"
+             (if mapping-exist ""
+               (concat " \\\n\t\t$(LIBRARY-" work-library "-make)\n"))
+             "\n"
              "\n$(LIBRARY-" work-library ") :"
              "\n\t"
              (vhdl-replace-string
               (cons "\\(.*\\)\n\\(.*\\)" (nth 5 compiler))
               (concat "$(LIBRARY-" work-library ")\n" (vhdl-work-library)))
              "\n")
+      (unless mapping-exist
+       (insert "\n$(LIBRARY-" work-library "-make) :"
+               "\n\t"
+               "mkdir -p $(LIBRARY-" work-library "-make)\n"))
       ;; insert '.PHONY' declaration
       (insert "\n\n.PHONY : "
              (nth 0 vhdl-makefile-default-targets) " "
@@ -17306,9 +17397,9 @@ specified by a target."
        (setq subcomp-list
              (sort (vhdl-uniquify (nth 2 (car prim-list))) 'string<))
        (setq unit-key (caar prim-list)
-             unit-name (or (nth 0 (aget ent-alist unit-key t))
-                           (nth 0 (aget conf-alist unit-key t))
-                           (nth 0 (aget pack-alist unit-key t))))
+             unit-name (or (nth 0 (vhdl-aget ent-alist unit-key t))
+                           (nth 0 (vhdl-aget conf-alist unit-key t))
+                           (nth 0 (vhdl-aget pack-alist unit-key t))))
        (insert "\n" unit-key)
        (unless (equal unit-key unit-name)
          (insert " \\\n" unit-name))
@@ -17358,13 +17449,15 @@ specified by a target."
                    (nth 0 rule)
                    (if (equal vhdl-compile-post-command "") ""
                      " $(POST-COMPILE)") "\n")
+         (insert "\n"))
+       (unless (and options mapping-exist)
          (setq tmp-list target-list)
          (while target-list
-           (insert "\n\t@touch $(UNIT-" work-library "-" (car target-list) ")"
-                   (if (cdr target-list) " \\" "\n"))
+           (insert "\t@touch $(UNIT-" work-library "-" (car target-list) ")\n")
            (setq target-list (cdr target-list)))
          (setq target-list tmp-list))
        (setq rule-alist (cdr rule-alist)))
+
       (insert "\n\n### " makefile-name " ends here\n")
       ;; run Makefile generation hook
       (run-hooks 'vhdl-makefile-generation-hook)
@@ -17374,7 +17467,8 @@ specified by a target."
          (progn (save-buffer)
                 (kill-buffer (current-buffer))
                 (set-buffer orig-buffer)
-                (add-to-history 'file-name-history makefile-path-name))
+                (when (fboundp 'add-to-history)
+                  (add-to-history 'file-name-history makefile-path-name)))
        (vhdl-warning-when-idle
         (format "File not writable: \"%s\""
                 (abbreviate-file-name makefile-path-name)))
index aa68f9fcc1ad3dcf2efe5992e05fb10729d94f33..e62ad271089812c35c36c46fc5b6731911aefe78 100644 (file)
@@ -187,21 +187,20 @@ and you want to simplify them for the mode line
                which-func-unknown))))
 ;;;###autoload (put 'which-func-current 'risky-local-variable t)
 
-(defvar which-func-mode nil
+(defvar-local which-func-mode nil
   "Non-nil means display current function name in mode line.
 This makes a difference only if `which-function-mode' is non-nil.")
-(make-variable-buffer-local 'which-func-mode)
-;;(put 'which-func-mode 'permanent-local t)
 
 (add-hook 'find-file-hook 'which-func-ff-hook t)
 
 (defun which-func-ff-hook ()
   "File find hook for Which Function mode.
 It creates the Imenu index for the buffer, if necessary."
-  (setq which-func-mode
-       (and which-function-mode
-            (or (eq which-func-modes t)
-                (member major-mode which-func-modes))))
+  (unless (local-variable-p 'which-func-mode)
+    (setq which-func-mode
+          (and which-function-mode
+               (or (eq which-func-modes t)
+                   (member major-mode which-func-modes)))))
 
   (condition-case err
       (if (and which-func-mode
@@ -259,15 +258,13 @@ in certain major modes."
       ;;Turn it on
       (progn
         (setq which-func-update-timer
-              (run-with-idle-timer idle-update-delay t 'which-func-update))
+              (run-with-idle-timer idle-update-delay t #'which-func-update))
         (dolist (buf (buffer-list))
           (with-current-buffer buf
-            (setq which-func-mode
-                  (or (eq which-func-modes t)
-                      (member major-mode which-func-modes))))))
-    ;; Turn it off
-    (dolist (buf (buffer-list))
-      (with-current-buffer buf (setq which-func-mode nil)))))
+            (unless (local-variable-p 'which-func-mode)
+              (setq which-func-mode
+                    (or (eq which-func-modes t)
+                        (member major-mode which-func-modes)))))))))
 
 (defvar which-function-imenu-failed nil
   "Locally t in a buffer if `imenu--make-index-alist' found nothing there.")
@@ -347,10 +344,11 @@ If no function name is found, return nil."
 (defvar ediff-window-B)
 (defvar ediff-window-C)
 
+;; FIXME: Why does ediff require special support?
 (defun which-func-update-ediff-windows ()
   "Update Which-Function mode display for Ediff windows.
 This function is meant to be called from `ediff-select-hook'."
-  (when (eq major-mode 'ediff-mode)
+  (when (and (derived-mode-p 'ediff-mode) which-function-mode)
     (when ediff-window-A
       (which-func-update-1 ediff-window-A))
     (when ediff-window-B
index e22581445e5596ec9362dd8eec4a28f309d2a732..4ab882b71fb254cd18dfadd3e9f8d366b5a43cdb 100644 (file)
@@ -1,4 +1,4 @@
-;;; xscheme.el --- run MIT Scheme under Emacs
+;;; xscheme.el --- run MIT Scheme under Emacs        -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 1986-1987, 1989-1990, 2001-2014 Free Software
 ;; Foundation, Inc.
 (defvar xscheme-expressions-ring-max 30
   "Maximum length of Scheme expressions ring.")
 
-(defvar xscheme-expressions-ring nil
+(defvar-local xscheme-expressions-ring nil
   "List of expressions recently transmitted to the Scheme process.")
 
-(defvar xscheme-expressions-ring-yank-pointer nil
+(defvar-local xscheme-expressions-ring-yank-pointer nil
   "The tail of the Scheme expressions ring whose car is the last thing yanked.")
 
-(defvar xscheme-running-p nil
+(defvar-local xscheme-running-p nil
   "This variable, if nil, indicates that the scheme process is
 waiting for input.  Otherwise, it is busy evaluating something.")
 
@@ -64,7 +64,7 @@ waiting for input.  Otherwise, it is busy evaluating something.")
 control-g interrupts were signaled.  Do not allow more control-g's to be
 signaled until the scheme process acknowledges receipt.")
 
-(defvar xscheme-control-g-disabled-p nil
+(defvar-local xscheme-control-g-disabled-p nil
   "This variable, if non-nil, indicates that a control-g is being processed
 by the scheme process, so additional control-g's are to be ignored.")
 
@@ -78,37 +78,26 @@ by the scheme process, so additional control-g's are to be ignored.")
 (defvar xscheme-runlight "")
 (defvar xscheme-runlight-string nil)
 
-(defvar xscheme-process-filter-state 'idle
+(defvar-local xscheme-process-filter-state 'idle
   "State of scheme process escape reader state machine:
 idle                   waiting for an escape sequence
 reading-type           received an altmode but nothing else
 reading-string         reading prompt string")
 
-(defvar xscheme-allow-output-p t
+(defvar-local xscheme-allow-output-p t
   "This variable, if nil, prevents output from the scheme process
 from being inserted into the process-buffer.")
 
-(defvar xscheme-prompt ""
+(defvar-local xscheme-prompt ""
   "The current scheme prompt string.")
 
-(defvar xscheme-string-accumulator ""
+(defvar-local xscheme-string-accumulator ""
   "Accumulator for the string being received from the scheme process.")
 
-(defvar xscheme-mode-string nil)
-(setq-default scheme-mode-line-process
-             '("" xscheme-runlight))
-
-(mapc 'make-variable-buffer-local
-      '(xscheme-expressions-ring
-       xscheme-expressions-ring-yank-pointer
-       xscheme-process-filter-state
-       xscheme-running-p
-       xscheme-control-g-disabled-p
-       xscheme-allow-output-p
-       xscheme-prompt
-       xscheme-string-accumulator
-       xscheme-mode-string
-       scheme-mode-line-process))
+(defvar-local xscheme-mode-string nil)
+(setq-default scheme-mode-line-process '("" xscheme-runlight))
+(make-variable-buffer-local 'scheme-mode-line-process)
+
 \f
 (defgroup xscheme nil
   "Major mode for editing Scheme and interacting with MIT's C-Scheme."
index 83f2cde401085d0491183b5537f939b709326e05..28682f52b0e20b7e10d4ac87135ae670b04d6347 100644 (file)
@@ -3822,6 +3822,7 @@ If `ps-prefix-quote' is nil, it's set to t after generating string."
 
 (defun ps-get (alist-sym key)
   "Return element from association list ALIST-SYM which car is `eq' to KEY."
+  (declare (obsolete alist-get "25.1"))
   (assq key (symbol-value alist-sym)))
 
 
@@ -3829,6 +3830,7 @@ If `ps-prefix-quote' is nil, it's set to t after generating string."
   "Store element (KEY . VALUE) into association list ALIST-SYM.
 If KEY already exists in ALIST-SYM, modify cdr to VALUE.
 It can be retrieved with `(ps-get ALIST-SYM KEY)'."
+  (declare (obsolete "use (setf (alist-get ..) ..) instead" "25.1"))
   (let ((elt: (assq key (symbol-value alist-sym)))) ; to avoid name conflict
     (if elt:
        (setcdr elt: value)
@@ -3839,6 +3841,7 @@ It can be retrieved with `(ps-get ALIST-SYM KEY)'."
 
 (defun ps-del (alist-sym key)
   "Delete by side effect element KEY from association list ALIST-SYM."
+  (declare (obsolete "use (setf (alist-get k alist nil t) nil) instead" "25.1"))
   (let ((a:list: (symbol-value alist-sym)) ; to avoid name conflict
        old)
     (while a:list:
index 319a26d71fc923c068c231bdde0a0deb023282a9..488c9c05a094a643f2c6ad6102e626b40de907c0 100644 (file)
 
 ;;; Commentary:
 
-;; See ps-print.el for documentation.
-
-;;; Code:
-
-
-(require 'ps-print)
-
-\f
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; Sample Setup Code:
-
-
+;; Some example hacks for ps-print.el.
 ;; This stuff is for anybody that's brave enough to look this far,
 ;; and able to figure out how to use it.  It isn't really part of
 ;; ps-print, but I'll leave it here in hopes it might be useful:
 ;; WARNING!!! The following code is *sample* code only.
 ;; Don't use it unless you understand what it does!
 
-;; The key `f22' should probably be replaced by `print'.  --Stef
+;;; Code:
 
-;; A hook to bind to `rmail-mode-hook' to locally bind prsc and set the
-;; `ps-left-headers' specially for mail messages.
-(defun ps-rmail-mode-hook ()
-  (local-set-key [(f22)] 'ps-rmail-print-message-from-summary)
-  (setq ps-header-lines 3
-       ps-left-header
-       ;; The left headers will display the message's subject, its
-       ;; author, and the name of the folder it was in.
-       '(ps-article-subject ps-article-author buffer-name)))
+(require 'ps-print)
+
+\f
 
-;; See `ps-gnus-print-article-from-summary'.  This function does the
-;; same thing for rmail.
+;; A hook to bind to `rmail-mode-hook' to locally bind prsc and set
+;; `ps-left-header' specially for mail messages.
+(defun ps-rmail-mode-hook ()
+  (local-set-key [print] 'ps-rmail-print-message-from-summary)
+  (setq-local ps-header-lines 3)
+  ;; The left header will display the message's subject, its
+  ;; author, and the name of the folder it was in.
+  (setq-local ps-left-header
+             '(ps-article-subject ps-article-author buffer-name)))
+
+;; Like `ps-gnus-print-article-from-summary', but for rmail.
 (defun ps-rmail-print-message-from-summary ()
   (interactive)
   (ps-print-message-from-summary 'rmail-summary-buffer "RMAIL"))
         (with-current-buffer ps-buf
           (ps-spool-buffer-with-faces)))))
 
-;; Look in an article or mail message for the Subject: line.  To be
-;; placed in `ps-left-headers'.
+;; Look in an article or mail message for the Subject: line.
 (defun ps-article-subject ()
   (save-excursion
-    (goto-char (point-min))
-    (if (re-search-forward "^Subject:[ \t]+\\(.*\\)$" nil t)
-       (buffer-substring (match-beginning 1) (match-end 1))
-      "Subject ???")))
+    (save-restriction
+      (narrow-to-region (point-min) (progn (rfc822-goto-eoh) (point)))
+      (concat "Subject: " (or (mail-fetch-field "Subject") "???")))))
 
 ;; Look in an article or mail message for the From: line.  Sorta-kinda
 ;; understands RFC-822 addresses and can pull the real name out where
-;; it's provided.  To be placed in `ps-left-headers'.
+;; it's provided.
 (defun ps-article-author ()
   (save-excursion
-    (goto-char (point-min))
-    (if (re-search-forward "^From:[ \t]+\\(.*\\)$" nil t)
-       (let ((fromstring (buffer-substring (match-beginning 1) (match-end 1))))
-         (cond
-
-          ;; Try first to match addresses that look like
-          ;; thompson@wg2.waii.com (Jim Thompson)
-          ((string-match ".*[ \t]+(\\(.*\\))" fromstring)
-           (substring fromstring (match-beginning 1) (match-end 1)))
-
-          ;; Next try to match addresses that look like
-          ;; Jim Thompson <thompson@wg2.waii.com> or
-          ;; "Jim Thompson" <thompson@wg2.waii.com>
-          ((string-match "\\(\"?\\)\\(.*\\)\\1[ \t]+<.*>" fromstring)
-           (substring fromstring (match-beginning 2) (match-end 2)))
-
-          ;; Couldn't find a real name -- show the address instead.
-          (t fromstring)))
-      "From ???")))
-
-;; A hook to bind to `gnus-article-prepare-hook'.  This will set the
-;; `ps-left-headers' specially for gnus articles.  Unfortunately,
+    (save-restriction
+      (narrow-to-region (point-min) (progn (rfc822-goto-eoh) (point)))
+      (let ((fromstring (mail-fetch-field "From")))
+       (cond
+        ;; Try first to match addresses that look like
+        ;; thompson@wg2.waii.com (Jim Thompson)
+        ((and fromstring (string-match ".*[ \t]+(\\(.*\\))" fromstring))
+         (match-string 1 fromstring))
+        ;; Next try to match addresses that look like
+        ;; Jim Thompson <thompson@wg2.waii.com> or
+        ;; "Jim Thompson" <thompson@wg2.waii.com>
+        ((and fromstring
+              (string-match "\\(\"?\\)\\(.*\\)\\1[ \t]+<.*>" fromstring))
+         (match-string 2 fromstring))
+        ;; Couldn't find a real name -- show the address instead.
+        (fromstring)
+        (t "From ???"))))))
+
+;; A hook to bind to `gnus-article-prepare-hook'.  This will set
+;; `ps-left-header' specially for gnus articles.  Unfortunately,
 ;; `gnus-article-mode-hook' is called only once, the first time the *Article*
 ;; buffer enters that mode, so it would only work for the first time
 ;; we ran gnus.  The second time, this hook wouldn't get set up.  The
 ;; only alternative is `gnus-article-prepare-hook'.
 (defun ps-gnus-article-prepare-hook ()
-  (setq ps-header-lines 3
-       ps-left-header
-       ;; The left headers will display the article's subject, its
-       ;; author, and the newsgroup it was in.
-       '(ps-article-subject ps-article-author gnus-newsgroup-name)))
-
-;; A hook to bind to `vm-mode-hook' to locally bind prsc and set the
-;; `ps-left-headers' specially for mail messages.
+  (setq-local ps-header-lines 3)
+  ;; The left headers will display the article's subject, its
+  ;; author, and the newsgroup it was in.
+  (setq-local ps-left-header
+             '(ps-article-subject ps-article-author gnus-newsgroup-name)))
+
+;; A hook to bind to `vm-mode-hook' to locally bind prsc and set
+;; `ps-left-header' specially for mail messages.
 (defun ps-vm-mode-hook ()
-  (local-set-key [(f22)] 'ps-vm-print-message-from-summary)
-  (setq ps-header-lines 3
-       ps-left-header
-       ;; The left headers will display the message's subject, its
-       ;; author, and the name of the folder it was in.
+  (local-set-key [print] 'ps-vm-print-message-from-summary)
+  (setq-local ps-header-lines 3)
+  ;; The left headers will display the message's subject, its
+  ;; author, and the name of the folder it was in.
+  (setq-local ps-left-header
        '(ps-article-subject ps-article-author buffer-name)))
 
 ;; Every now and then I forget to switch from the *Summary* buffer to
 ;; article subjects shows up at the printer.  This function, bound to
 ;; prsc for the gnus *Summary* buffer means I don't have to switch
 ;; buffers first.
-;; sb:  Updated for Gnus 5.
 (defun ps-gnus-print-article-from-summary ()
   (interactive)
   (ps-print-message-from-summary 'gnus-article-buffer "*Article*"))
 
-;; See `ps-gnus-print-article-from-summary'.  This function does the
-;; same thing for vm.
+;; Like `ps-gnus-print-article-from-summary', but for vm.
 (defun ps-vm-print-message-from-summary ()
   (interactive)
   (ps-print-message-from-summary 'vm-mail-buffer ""))
 
-;; A hook to bind to bind to `gnus-summary-setup-buffer' to locally bind
-;; prsc.
+;; A hook to bind to `gnus-summary-setup-buffer' to locally bind prsc.
 (defun ps-gnus-summary-setup ()
-  (local-set-key [(f22)] 'ps-gnus-print-article-from-summary))
+  (local-set-key [print] 'ps-gnus-print-article-from-summary))
 
-;; Look in an article or mail message for the Subject: line.  To be
-;; placed in `ps-left-headers'.
 (defun ps-info-file ()
   (save-excursion
     (goto-char (point-min))
     (if (re-search-forward "File:[ \t]+\\([^, \t\n]*\\)" nil t)
-       (buffer-substring (match-beginning 1) (match-end 1))
+       (match-string 1)
       "File ???")))
 
-;; Look in an article or mail message for the Subject: line.  To be
-;; placed in `ps-left-headers'.
 (defun ps-info-node ()
   (save-excursion
     (goto-char (point-min))
     (if (re-search-forward "Node:[ \t]+\\([^,\t\n]*\\)" nil t)
-       (buffer-substring (match-beginning 1) (match-end 1))
+       (match-string 1)
       "Node ???")))
 
 (defun ps-info-mode-hook ()
-  (setq ps-left-header
-       ;; The left headers will display the node name and file name.
-       '(ps-info-node ps-info-file)))
-
-;; WARNING! The following function is a *sample* only, and is *not*
-;; meant to be used as a whole unless you understand what the effects
-;; will be!  (In fact, this is a copy of Jim's setup for ps-print --
-;; I'd be very surprised if it was useful to *anybody*, without
-;; modification.)
-
-(defun ps-jts-ps-setup ()
-  (global-set-key [(f22)] 'ps-spool-buffer-with-faces) ;f22 is prsc
-  (global-set-key [(shift f22)] 'ps-spool-region-with-faces)
-  (global-set-key [(control f22)] 'ps-despool)
+  ;; The left headers will display the node name and file name.
+  (setq-local ps-left-header '(ps-info-node ps-info-file)))
+
+;; WARNING! The following function is a *sample* only, and is *not* meant
+;; to be used as a whole unless you understand what the effects will be!
+(defun ps-samp-ps-setup ()
+  (global-set-key [print] 'ps-spool-buffer-with-faces)
+  (global-set-key [S-print] 'ps-spool-region-with-faces)
+  (global-set-key [C-print] 'ps-despool)
   (add-hook 'gnus-article-prepare-hook 'ps-gnus-article-prepare-hook)
   (add-hook 'gnus-summary-mode-hook 'ps-gnus-summary-setup)
   (add-hook 'vm-mode-hook 'ps-vm-mode-hook)
   (setq ps-spool-duplex t
        ps-print-color-p nil
        ps-lpr-command "lpr"
-       ps-lpr-switches '("-Jjct,duplex_long"))
-  'ps-jts-ps-setup)
-
-;; WARNING! The following function is a *sample* only, and is *not*
-;; meant to be used as a whole unless it corresponds to your needs.
-;; (In fact, this is a copy of Jack's setup for ps-print --
-;; I would not be that surprised if it was useful to *anybody*,
-;; without modification.)
-
-(defun ps-jack-setup ()
-  (setq ps-print-color-p  nil
-       ps-lpr-command    "lpr"
-       ps-lpr-switches   nil
-
+       ps-lpr-switches '("-Jjct,duplex_long")
        ps-paper-type        'a4
        ps-landscape-mode    t
        ps-number-of-columns 2
-
        ps-left-margin   (/ (* 72  1.0) 2.54) ;  1.0 cm
        ps-right-margin  (/ (* 72  1.0) 2.54) ;  1.0 cm
        ps-inter-column  (/ (* 72  1.0) 2.54) ;  1.0 cm
        ps-header-lines       2
        ps-show-n-of-n        t
        ps-spool-duplex       nil
-
        ps-font-family             'Courier
        ps-font-size               5.5
        ps-header-font-family      'Helvetica
        ps-header-font-size        6
-       ps-header-title-font-size  8)
-  'ps-jack-setup)
+       ps-header-title-font-size  8))
 
 \f
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
index e798b07b556f46a13ed276ebbff727fc627ef7a9..90c8f94f0abd3b34cc50f521714c193cc036356d 100644 (file)
 
 ;;; Code:
 
+(eval-when-compile (require 'cl-lib))
+
+(defgroup rectangle nil
+  "Operations on rectangles."
+  :version "25.1"
+  :group 'editing)
+
 ;; FIXME: this function should be replaced by `apply-on-rectangle'
 (defun operate-on-rectangle (function start end coerce-tabs)
   "Call FUNCTION for each line of rectangle with corners at START, END.
@@ -42,42 +49,95 @@ FUNCTION is called with three arguments:
  number of columns that belong to rectangle but are before that position,
  number of columns that belong to rectangle but are after point.
 Point is at the end of the segment of this line within the rectangle."
-  (let (startcol startlinepos endcol endlinepos)
-    (save-excursion
-     (goto-char start)
-     (setq startcol (current-column))
-     (beginning-of-line)
-     (setq startlinepos (point)))
-    (save-excursion
-     (goto-char end)
-     (setq endcol (current-column))
-     (forward-line 1)
-     (setq endlinepos (point-marker)))
-    (if (< endcol startcol)
-       (setq startcol (prog1 endcol (setq endcol startcol))))
-    (save-excursion
-     (goto-char startlinepos)
-     (while (< (point) endlinepos)
-       (let (startpos begextra endextra)
-        (if coerce-tabs
-            (move-to-column startcol t)
-          (move-to-column startcol))
-        (setq begextra (- (current-column) startcol))
-        (setq startpos (point))
-        (if coerce-tabs
-            (move-to-column endcol t)
-          (move-to-column endcol))
-        ;; If we overshot, move back one character
-        ;; so that endextra will be positive.
-        (if (and (not coerce-tabs) (> (current-column) endcol))
-            (backward-char 1))
-        (setq endextra (- endcol (current-column)))
-        (if (< begextra 0)
-            (setq endextra (+ endextra begextra)
-                  begextra 0))
-        (funcall function startpos begextra endextra))
-       (forward-line 1)))
-    (- endcol startcol)))
+  (apply-on-rectangle
+   (lambda (startcol endcol)
+     (let (startpos begextra endextra)
+       (move-to-column startcol coerce-tabs)
+       (setq begextra (- (current-column) startcol))
+       (setq startpos (point))
+       (move-to-column endcol coerce-tabs)
+       ;; If we overshot, move back one character
+       ;; so that endextra will be positive.
+       (if (and (not coerce-tabs) (> (current-column) endcol))
+           (backward-char 1))
+       (setq endextra (- endcol (current-column)))
+       (if (< begextra 0)
+           (setq endextra (+ endextra begextra)
+                 begextra 0))
+       (funcall function startpos begextra endextra)))
+   start end))
+
+;;; Crutches to let rectangle's corners be where point can't be
+;; (e.g. in the middle of a TAB, or past the EOL).
+
+(defvar-local rectangle--mark-crutches nil
+  "(POS . COL) to override the column to use for the mark.")
+
+(defun rectangle--pos-cols (start end &optional window)
+  ;; At this stage, we don't know which of start/end is point/mark :-(
+  ;; And in case start=end, it might still be that point and mark have
+  ;; different crutches!
+  (let ((cw (window-parameter window 'rectangle--point-crutches)))
+    (cond
+     ((eq start (car cw))
+      (let ((sc (cdr cw))
+            (ec (if (eq end (car rectangle--mark-crutches))
+                    (cdr rectangle--mark-crutches)
+                  (if rectangle--mark-crutches
+                      (setq rectangle--mark-crutches nil))
+                  (goto-char end) (current-column))))
+        (if (eq start end) (cons (min sc ec) (max sc ec)) (cons sc ec))))
+     ((eq end (car cw))
+      (if (eq start (car rectangle--mark-crutches))
+          (cons (cdr rectangle--mark-crutches) (cdr cw))
+        (if rectangle--mark-crutches (setq rectangle--mark-crutches nil))
+        (cons (progn (goto-char start) (current-column)) (cdr cw))))
+     ((progn
+        (if cw (setf (window-parameter nil 'rectangle--point-crutches) nil))
+        (eq start (car rectangle--mark-crutches)))
+      (let ((sc (cdr rectangle--mark-crutches))
+            (ec (progn (goto-char end) (current-column))))
+        (if (eq start end) (cons (min sc ec) (max sc ec)) (cons sc ec))))
+     ((eq end (car rectangle--mark-crutches))
+      (cons (progn (goto-char start) (current-column))
+            (cdr rectangle--mark-crutches)))
+     (t
+      (if rectangle--mark-crutches (setq rectangle--mark-crutches nil))
+      (cons (progn (goto-char start) (current-column))
+            (progn (goto-char end) (current-column)))))))
+
+(defun rectangle--col-pos (col kind)
+  (let ((c (move-to-column col)))
+    (if (= c col)
+        (if (eq kind 'point)
+            (if (window-parameter nil 'rectangle--point-crutches)
+                (setf (window-parameter nil 'rectangle--point-crutches) nil))
+          (if rectangle--mark-crutches (setq rectangle--mark-crutches nil)))
+      ;; If move-to-column overshot, move back one char so we're
+      ;; at the position where rectangle--highlight-for-redisplay
+      ;; will add the overlay (so that the cursor can be drawn at the
+      ;; right place).
+      (when (> c col) (forward-char -1))
+      (setf (if (eq kind 'point)
+                (window-parameter nil 'rectangle--point-crutches)
+              rectangle--mark-crutches)
+            (cons (point) col)))))
+
+(defun rectangle--point-col (pos)
+  (let ((pc (window-parameter nil 'rectangle--point-crutches)))
+    (if (eq pos (car pc)) (cdr pc)
+      (goto-char pos)
+      (current-column))))
+
+(defun rectangle--crutches ()
+  (cons rectangle--mark-crutches
+        (window-parameter nil 'rectangle--point-crutches)))
+(defun rectangle--reset-crutches ()
+  (kill-local-variable 'rectangle--mark-crutches)
+  (if (window-parameter nil 'rectangle--point-crutches)
+      (setf (window-parameter nil 'rectangle--point-crutches) nil)))
+
+;;; Rectangle operations.
 
 (defun apply-on-rectangle (function start end &rest args)
   "Call FUNCTION for each line of rectangle with corners at START, END.
@@ -85,27 +145,27 @@ FUNCTION is called with two arguments: the start and end columns of the
 rectangle, plus ARGS extra arguments.  Point is at the beginning of line when
 the function is called.
 The final point after the last operation will be returned."
-  (let (startcol startpt endcol endpt final-point)
-    (save-excursion
-      (goto-char start)
-      (setq startcol (current-column))
-      (beginning-of-line)
-      (setq startpt (point))
-      (goto-char end)
-      (setq endcol (current-column))
-      (forward-line 1)
-      (setq endpt (point-marker))
-      ;; ensure the start column is the left one.
+  (save-excursion
+    (let* ((cols (rectangle--pos-cols start end))
+           (startcol (car cols))
+           (endcol (cdr cols))
+           (startpt (progn (goto-char start) (line-beginning-position)))
+           (endpt (progn (goto-char end)
+                         (copy-marker (line-end-position))))
+           final-point)
+      ;; Ensure the start column is the left one.
       (if (< endcol startcol)
          (let ((col startcol))
            (setq startcol endcol endcol col)))
-      ;; start looping over lines
+      ;; Start looping over lines.
       (goto-char startpt)
-      (while (< (point) endpt)
-       (apply function startcol endcol args)
-       (setq final-point (point))
-       (forward-line 1)))
-    final-point))
+      (while
+          (progn
+            (apply function startcol endcol args)
+            (setq final-point (point))
+            (and (zerop (forward-line 1)) (bolp)
+                 (<= (point) endpt))))
+      final-point)))
 
 (defun delete-rectangle-line (startcol endcol fill)
   (when (= (move-to-column startcol (if fill t 'coerce)) startcol)
@@ -310,6 +370,67 @@ With a prefix (or a FILL) argument, also fill too short lines."
       (delete-rectangle-line startcol endcol nil))
   (insert string))
 
+(defvar-local rectangle--string-preview-state nil)
+(defvar-local rectangle--string-preview-window nil)
+
+(defun rectangle--string-flush-preview ()
+  (mapc #'delete-overlay (nthcdr 3 rectangle--string-preview-state))
+  (setf (nthcdr 3 rectangle--string-preview-state) nil))
+
+(defun rectangle--string-erase-preview ()
+  (with-selected-window rectangle--string-preview-window
+    (rectangle--string-flush-preview)))
+
+(defun rectangle--space-to (col)
+  (propertize " " 'display `(space :align-to ,col)))
+
+(defface rectangle-preview-face '((t :inherit region))
+  "The face to use for the `string-rectangle' preview.")
+
+(defcustom rectangle-preview t
+  "If non-nil, `string-rectangle' will show an-the-fly preview."
+  :type 'boolean)
+
+(defun rectangle--string-preview ()
+  (let ((str (minibuffer-contents)))
+    (when (equal str "")
+      (setq str (or (car-safe minibuffer-default)
+                    (if (stringp minibuffer-default) minibuffer-default))))
+    (when str (setq str (propertize str 'face 'region)))
+    (with-selected-window rectangle--string-preview-window
+      (unless (or (null rectangle--string-preview-state)
+                  (equal str (car rectangle--string-preview-state)))
+        (rectangle--string-flush-preview)
+        (apply-on-rectangle
+         (lambda (startcol endcol)
+           (let* ((sc (move-to-column startcol))
+                  (start (if (<= sc startcol) (point)
+                           (forward-char -1)
+                           (setq sc (current-column))
+                           (point)))
+                  (ec (move-to-column endcol))
+                  (end (point))
+                  (ol (make-overlay start end)))
+             (push ol (nthcdr 3 rectangle--string-preview-state))
+             ;; FIXME: The extra spacing doesn't interact correctly with
+             ;; the extra spacing added by the rectangular-region-highlight.
+             (when (< sc startcol)
+               (overlay-put ol 'before-string (rectangle--space-to startcol)))
+             (let ((as (when (< endcol ec)
+                         ;; (rectangle--space-to ec)
+                         (spaces-string (- ec endcol))
+                         )))
+               (if (= start end)
+                   (overlay-put ol 'after-string (if as (concat str as) str))
+                 (overlay-put ol 'display str)
+                 (if as (overlay-put ol 'after-string as))))))
+         (nth 1 rectangle--string-preview-state)
+         (nth 2 rectangle--string-preview-state))))))
+
+;; FIXME: Should this be turned into inhibit-region-highlight and made to apply
+;; to non-rectangular regions as well?
+(defvar rectangle--inhibit-region-highlight nil)
+
 ;;;###autoload
 (defun string-rectangle (start end string)
   "Replace rectangle contents with STRING on each line.
@@ -317,14 +438,31 @@ The length of STRING need not be the same as the rectangle width.
 
 Called from a program, takes three args; START, END and STRING."
   (interactive
-   (progn (barf-if-buffer-read-only)
-         (list
-          (region-beginning)
-          (region-end)
+   (progn
+     (make-local-variable 'rectangle--string-preview-state)
+     (make-local-variable 'rectangle--inhibit-region-highlight)
+     (let* ((buf (current-buffer))
+            (win (if (eq (window-buffer) buf) (selected-window)))
+            (start (region-beginning))
+            (end (region-end))
+            (rectangle--string-preview-state `(nil ,start ,end))
+            ;; Rectangle-region-highlighting doesn't work well in the presence
+            ;; of the preview overlays.  We could work harder to try and make
+            ;; it work better, but it's easier to just disable it temporarily.
+            (rectangle--inhibit-region-highlight t))
+       (barf-if-buffer-read-only)
+       (list start end
+             (minibuffer-with-setup-hook
+                 (lambda ()
+                   (setq rectangle--string-preview-window win)
+                   (add-hook 'minibuffer-exit-hook
+                             #'rectangle--string-erase-preview nil t)
+                   (add-hook 'post-command-hook
+                             #'rectangle--string-preview nil t))
           (read-string (format "String rectangle (default %s): "
                                (or (car string-rectangle-history) ""))
                        nil 'string-rectangle-history
-                       (car string-rectangle-history)))))
+                            (car string-rectangle-history)))))))
   (goto-char
    (apply-on-rectangle 'string-rectangle-line start end string t)))
 
@@ -382,7 +520,7 @@ rectangle which were empty."
   (setq rectangle-number-line-counter
        (1+ rectangle-number-line-counter)))
 
-(defun rectange--default-line-number-format (start end start-at)
+(defun rectangle--default-line-number-format (start end start-at)
   (concat "%"
          (int-to-string (length (int-to-string (+ (count-lines start end)
                                                   start-at))))
@@ -403,11 +541,11 @@ with a prefix argument, prompt for START-AT and FORMAT."
              (start-at (read-number "Number to count from: " 1)))
         (list start end start-at
               (read-string "Format string: "
-                           (rectange--default-line-number-format
+                           (rectangle--default-line-number-format
                             start end start-at))))
      (list (region-beginning) (region-end) 1 nil)))
   (unless format
-    (setq format (rectange--default-line-number-format start end start-at)))
+    (setq format (rectangle--default-line-number-format start end start-at)))
   (let ((rectangle-number-line-counter start-at))
     (apply-on-rectangle 'rectangle-number-line-callback
                        start end format)))
@@ -429,8 +567,12 @@ with a prefix argument, prompt for START-AT and FORMAT."
   (let ((map (make-sparse-keymap)))
     (define-key map [?\C-o] 'open-rectangle)
     (define-key map [?\C-t] 'string-rectangle)
-    ;; (define-key map [remap open-line] 'open-rectangle)
-    ;; (define-key map [remap transpose-chars] 'string-rectangle)
+    (define-key map [remap exchange-point-and-mark]
+      'rectangle-exchange-point-and-mark)
+    (dolist (cmd '(right-char left-char forward-char backward-char
+                   next-line previous-line))
+      (define-key map (vector 'remap cmd)
+        (intern (format "rectangle-%s" cmd))))
     map)
   "Keymap used while marking a rectangular region.")
 
@@ -439,6 +581,7 @@ with a prefix argument, prompt for START-AT and FORMAT."
   "Toggle the region as rectangular.
 Activates the region if needed.  Only lasts until the region is deactivated."
   nil nil nil
+  (rectangle--reset-crutches)
   (when rectangle-mark-mode
     (add-hook 'deactivate-mark-hook
               (lambda () (rectangle-mark-mode -1)))
@@ -447,6 +590,96 @@ Activates the region if needed.  Only lasts until the region is deactivated."
       (activate-mark)
       (message "Mark set (rectangle mode)"))))
 
+(defun rectangle-exchange-point-and-mark (&optional arg)
+  "Like `exchange-point-and-mark' but cycles through the rectangle's corners."
+  (interactive "P")
+  (if arg
+      (progn
+        (setq this-command 'exchange-point-and-mark)
+        (exchange-point-and-mark arg))
+    (let* ((p (point))
+           (repeat (eq this-command last-command))
+          (m (mark))
+           (p<m (< p m))
+           (cols (if p<m (rectangle--pos-cols p m) (rectangle--pos-cols m p)))
+           (cp (if p<m (car cols) (cdr cols)))
+           (cm (if p<m (cdr cols) (car cols))))
+      (if repeat (setq this-command 'exchange-point-and-mark))
+      (rectangle--reset-crutches)
+      (goto-char p)
+      (rectangle--col-pos (if repeat cm cp) 'mark)
+      (set-mark (point))
+      (goto-char m)
+      (rectangle--col-pos (if repeat cp cm) 'point))))
+
+(defun rectangle--*-char (cmd n &optional other-cmd)
+  ;; Part of the complexity here is that I'm trying to avoid making assumptions
+  ;; about the L2R/R2L direction of text around point, but this is largely
+  ;; useless since the rectangles implemented in this file are "logical
+  ;; rectangles" and not "visual rectangles", so in the presence of
+  ;; bidirectional text things won't work well anyway.
+  (if (< n 0) (rectangle--*-char other-cmd (- n))
+    (let ((col (rectangle--point-col (point))))
+      (while (> n 0)
+        (let* ((bol (line-beginning-position))
+               (eol (line-end-position))
+               (curcol (current-column))
+               (nextcol
+                (condition-case nil
+                    (save-excursion
+                      (funcall cmd 1)
+                      (cond
+                       ((> bol (point)) (- curcol 1))
+                       ((< eol (point)) (+ col (1+ n)))
+                       (t (current-column))))
+                  (end-of-buffer (+ col (1+ n)))
+                  (beginning-of-buffer (- curcol 1))))
+               (diff (abs (- nextcol col))))
+          (cond
+           ((and (< nextcol curcol) (< curcol col))
+            (let ((curdiff (- col curcol)))
+              (if (<= curdiff n)
+                (progn (cl-decf n curdiff) (setq col curcol))
+                (setq col (- col n) n 0))))
+           ((< nextcol 0) (ding) (setq n 0 col 0)) ;Bumping into BOL!
+           ((= nextcol curcol) (funcall cmd 1))
+           (t ;; (> nextcol curcol)
+            (if (<= diff n)
+                (progn (cl-decf n diff) (setq col nextcol))
+              (setq col (if (< col nextcol) (+ col n) (- col n)) n 0))))))
+      ;; FIXME: This rectangle--col-pos's move-to-column is wasted!
+      (rectangle--col-pos col 'point))))
+
+(defun rectangle-right-char (&optional n)
+  "Like `right-char' but steps into wide chars and moves past EOL."
+  (interactive "p") (rectangle--*-char #'right-char n #'left-char))
+(defun rectangle-left-char (&optional n)
+  "Like `left-char' but steps into wide chars and moves past EOL."
+  (interactive "p") (rectangle--*-char #'left-char n #'right-char))
+
+(defun rectangle-forward-char (&optional n)
+  "Like `forward-char' but steps into wide chars and moves past EOL."
+  (interactive "p") (rectangle--*-char #'forward-char n #'backward-char))
+(defun rectangle-backward-char (&optional n)
+  "Like `backward-char' but steps into wide chars and moves past EOL."
+  (interactive "p") (rectangle--*-char #'backward-char n #'forward-char))
+
+(defun rectangle-next-line (&optional n)
+  "Like `next-line' but steps into wide chars and moves past EOL.
+Ignores `line-move-visual'."
+  (interactive "p")
+  (let ((col (rectangle--point-col (point))))
+    (forward-line n)
+    (rectangle--col-pos col 'point)))
+(defun rectangle-previous-line (&optional n)
+  "Like `previous-line' but steps into wide chars and moves past EOL.
+Ignores `line-move-visual'."
+  (interactive "p")
+  (let ((col (rectangle--point-col (point))))
+    (forward-line (- n))
+    (rectangle--col-pos col 'point)))
+
+
 (defun rectangle--extract-region (orig &optional delete)
   (if (not rectangle-mark-mode)
       (funcall orig delete)
@@ -476,100 +709,118 @@ Activates the region if needed.  Only lasts until the region is deactivated."
             (while (not (eq pending-undo-list (cdr undo-at-start)))
               (undo-more 1))))))
 
+(defun rectangle--place-cursor (leftcol left str)
+  (let ((pc (window-parameter nil 'rectangle--point-crutches)))
+    (if (and (eq left (car pc)) (eq leftcol (cdr pc)))
+        (put-text-property 0 1 'cursor 1 str))))
+
 (defun rectangle--highlight-for-redisplay (orig start end window rol)
   (cond
    ((not rectangle-mark-mode)
     (funcall orig start end window rol))
+   (rectangle--inhibit-region-highlight
+    (funcall redisplay-unhighlight-region-function rol)
+    nil)
    ((and (eq 'rectangle (car-safe rol))
          (eq (nth 1 rol) (buffer-chars-modified-tick))
          (eq start (nth 2 rol))
-         (eq end (nth 3 rol)))
+         (eq end (nth 3 rol))
+         (equal (rectangle--crutches) (nth 4 rol)))
     rol)
    (t
     (save-excursion
       (let* ((nrol nil)
              (old (if (eq 'rectangle (car-safe rol))
-                      (nthcdr 4 rol)
+                      (nthcdr 5 rol)
                     (funcall redisplay-unhighlight-region-function rol)
-                    nil))
-             (ptcol (progn (goto-char start) (current-column)))
-             (markcol (progn (goto-char end) (current-column)))
-             (leftcol  (min ptcol markcol))
-             (rightcol (max ptcol markcol)))
-        (goto-char start)
-        (while
-            (let* ((mleft (move-to-column leftcol))
-                   (left (point))
-                   (mright (move-to-column rightcol))
-                   (right (point))
-                   (ol
-                    (if (not old)
-                        (let ((ol (make-overlay left right)))
-                          (overlay-put ol 'window window)
-                          (overlay-put ol 'face 'region)
-                          ol)
-                      (let ((ol (pop old)))
-                        (move-overlay ol left right (current-buffer))
-                        ol))))
-              ;; `move-to-column' may stop before the column (if bumping into
-              ;; EOL) or overshoot it a little, when column is in the middle
-              ;; of a char.
-              (cond
-               ((< mleft leftcol)       ;`leftcol' is past EOL.
-                (overlay-put ol 'before-string
-                             (spaces-string (- leftcol mleft)))
-                (setq mright (max mright leftcol)))
-               ((and (> mleft leftcol)  ;`leftcol' is in the middle of a char.
-                     (eq (char-before left) ?\t))
-                (setq left (1- left))
-                (move-overlay ol left right)
-                (goto-char left)
-                (overlay-put ol 'before-string
-                             (spaces-string (- leftcol (current-column)))))
-               ((overlay-get ol 'before-string)
-                (overlay-put ol 'before-string nil)))
-              (cond
-               ((< mright rightcol)     ;`rightcol' is past EOL.
-                (let ((str (make-string (- rightcol mright) ?\s)))
-                  (put-text-property 0 (length str) 'face 'region str)
-                  ;; If cursor happens to be here, draw it *before* rather than
-                  ;; after this highlighted pseudo-text.
-                  (put-text-property 0 1 'cursor t str)
-                  (overlay-put ol 'after-string str)))
-               ((and (> mright rightcol) ;`rightcol's in the middle of a char.
-                     (eq (char-before right) ?\t))
-                (setq right (1- right))
-                (move-overlay ol left right)
-                (if (= rightcol leftcol)
-                    (overlay-put ol 'after-string nil)
-                  (goto-char right)
-                  (let ((str (make-string
-                              (- rightcol (max leftcol (current-column)))
-                              ?\s)))
-                    (put-text-property 0 (length str) 'face 'region str)
-                    (when (= left right)
-                      ;; If cursor happens to be here, draw it *before* rather
-                      ;; than after this highlighted pseudo-text.
-                      (put-text-property 0 1 'cursor 1 str))
-                    (overlay-put ol 'after-string str))))
-               ((overlay-get ol 'after-string)
-                (overlay-put ol 'after-string nil)))
-              (when (and (= leftcol rightcol) (display-graphic-p))
-                ;; Make zero-width rectangles visible!
-               (overlay-put ol 'after-string
-                            (concat (propertize " "
-                                                 'face '(region (:height 0.2)))
-                                     (overlay-get ol 'after-string))))
-              (push ol nrol)
-              (and (zerop (forward-line 1))
-                   (<= (point) end))))
+                    nil)))
+        (cl-assert (eq (window-buffer window) (current-buffer)))
+        ;; `rectangle--pos-cols' looks up the `selected-window's parameter!
+        (with-selected-window window
+          (apply-on-rectangle
+           (lambda (leftcol rightcol)
+             (let* ((mleft (move-to-column leftcol))
+                    (left (point))
+                    ;; BEWARE: In the presence of other overlays with
+                    ;; before/after/display-strings, this happens to move to
+                    ;; the column "as if the overlays were not applied", which
+                    ;; is sometimes what we want, tho it can be
+                    ;; considered a bug in move-to-column (it should arguably
+                    ;; pay attention to the before/after-string/display
+                    ;; properties when computing the column).
+                    (mright (move-to-column rightcol))
+                    (right (point))
+                    (ol
+                     (if (not old)
+                         (let ((ol (make-overlay left right)))
+                           (overlay-put ol 'window window)
+                           (overlay-put ol 'face 'region)
+                           ol)
+                       (let ((ol (pop old)))
+                         (move-overlay ol left right (current-buffer))
+                         ol))))
+               ;; `move-to-column' may stop before the column (if bumping into
+               ;; EOL) or overshoot it a little, when column is in the middle
+               ;; of a char.
+               (cond
+                ((< mleft leftcol)      ;`leftcol' is past EOL.
+                 (overlay-put ol 'before-string (rectangle--space-to leftcol))
+                 (setq mright (max mright leftcol)))
+                ((and (> mleft leftcol) ;`leftcol' is in the middle of a char.
+                      (eq (char-before left) ?\t))
+                 (setq left (1- left))
+                 (move-overlay ol left right)
+                 (goto-char left)
+                 (overlay-put ol 'before-string (rectangle--space-to leftcol)))
+                ((overlay-get ol 'before-string)
+                 (overlay-put ol 'before-string nil)))
+               (cond
+                ;; While doing rectangle--string-preview, the two sets of
+                ;; overlays steps on the other's toes.  I fixed some of the
+                ;; problems, but others remain.  The main one is the two
+                ;; (rectangle--space-to rightcol) below which try to virtually
+                ;; insert missing text, but during "preview", the text is not
+                ;; missing (it's provided by preview's own overlay).
+                (rectangle--string-preview-state
+                 (if (overlay-get ol 'after-string)
+                     (overlay-put ol 'after-string nil)))
+                ((< mright rightcol)    ;`rightcol' is past EOL.
+                 (let ((str (rectangle--space-to rightcol)))
+                   (put-text-property 0 (length str) 'face 'region str)
+                   ;; If cursor happens to be here, draw it at the right place.
+                   (rectangle--place-cursor leftcol left str)
+                   (overlay-put ol 'after-string str)))
+                ((and (> mright rightcol) ;`rightcol's in the middle of a char.
+                      (eq (char-before right) ?\t))
+                 (setq right (1- right))
+                 (move-overlay ol left right)
+                 (if (= rightcol leftcol)
+                     (overlay-put ol 'after-string nil)
+                   (goto-char right)
+                   (let ((str (rectangle--space-to rightcol)))
+                     (put-text-property 0 (length str) 'face 'region str)
+                     (when (= left right)
+                       (rectangle--place-cursor leftcol left str))
+                     (overlay-put ol 'after-string str))))
+                ((overlay-get ol 'after-string)
+                 (overlay-put ol 'after-string nil)))
+               (when (and (= leftcol rightcol) (display-graphic-p))
+                 ;; Make zero-width rectangles visible!
+                 (overlay-put ol 'after-string
+                              (concat (propertize " "
+                                                  'face '(region (:height 0.2)))
+                                      (overlay-get ol 'after-string))))
+               (push ol nrol)))
+           start end))
         (mapc #'delete-overlay old)
-        `(rectangle ,(buffer-chars-modified-tick) ,start ,end ,@nrol))))))
+        `(rectangle ,(buffer-chars-modified-tick)
+                    ,start ,end ,(rectangle--crutches)
+                    ,@nrol))))))
 
 (defun rectangle--unhighlight-for-redisplay (orig rol)
   (if (not (eq 'rectangle (car-safe rol)))
       (funcall orig rol)
-    (mapc #'delete-overlay (nthcdr 4 rol))
+    (mapc #'delete-overlay (nthcdr 5 rol))
     (setcar (cdr rol) nil)))
 
 (provide 'rect)
index 1c64a9a8e6414d4ccc1eaf47e63c13827311dd4c..24146065384c882f5a896200876b7282559af443 100644 (file)
 ;; This package of functions emulates and somewhat extends the venerable
 ;; TECO's `register' feature, which permits you to save various useful
 ;; pieces of buffer state to named variables.  The entry points are
-;; documented in the Emacs user's manual.
+;; documented in the Emacs user's manual: (info "(emacs) Registers").
 
 (eval-when-compile (require 'cl-lib))
 
 ;;; Code:
 
+;; FIXME: Clean up namespace usage!
+
 (cl-defstruct
   (registerv (:constructor nil)
             (:constructor registerv--make (&optional data print-func
@@ -98,16 +100,12 @@ If nil, do not show register previews, unless `help-char' (or a member of
 
 (defun get-register (register)
   "Return contents of Emacs register named REGISTER, or nil if none."
-  (cdr (assq register register-alist)))
+  (alist-get register register-alist))
 
 (defun set-register (register value)
   "Set contents of Emacs register named REGISTER to VALUE.  Returns VALUE.
 See the documentation of the variable `register-alist' for possible VALUEs."
-  (let ((aelt (assq register register-alist)))
-    (if aelt
-       (setcdr aelt value)
-      (push (cons register value) register-alist))
-    value))
+  (setf (alist-get register register-alist) value))
 
 (defun register-describe-oneline (c)
   "One-line description of register C."
@@ -161,7 +159,7 @@ display such a window regardless."
                              collect c)))
     (unwind-protect
        (progn
-         (while (memq (read-event (propertize prompt 'face 'minibuffer-prompt))
+         (while (memq (read-key (propertize prompt 'face 'minibuffer-prompt))
                       help-chars)
            (unless (get-buffer-window buffer)
              (register-preview buffer 'show-empty)))
@@ -425,13 +423,14 @@ Interactively, reads the register using `register-read-with-preview'."
   "Insert contents of register REGISTER.  (REGISTER is a character.)
 Normally puts point before and mark after the inserted text.
 If optional second arg is non-nil, puts mark before and point after.
-Interactively, second arg is non-nil if prefix arg is supplied.
+Interactively, second arg is nil if prefix arg is supplied and t
+otherwise.
 
 Interactively, reads the register using `register-read-with-preview'."
   (interactive (progn
                 (barf-if-buffer-read-only)
                 (list (register-read-with-preview "Insert register: ")
-                      current-prefix-arg)))
+                      (not current-prefix-arg))))
   (push-mark)
   (let ((val (get-register register)))
     (cond
index fda2213236bfd2e4daaa89b6bdad3ca9fbda3b02..32cf89b3255eefa3f441b134a3c29d9bce4003a4 100644 (file)
@@ -266,7 +266,7 @@ replace backward.
 
 Fourth and fifth arg START and END specify the region to operate on.
 
-To customize possible responses, change the \"bindings\" in `query-replace-map'."
+To customize possible responses, change the bindings in `query-replace-map'."
   (interactive
    (let ((common
          (query-replace-read-args
@@ -523,6 +523,8 @@ What you probably want is a loop like this:
 which will run faster and will not set the mark or print anything.
 \(You may need a more complex loop if FROM-STRING can match the null string
 and TO-STRING is also null.)"
+  (declare (interactive-only
+           "use `search-forward' and `replace-match' instead."))
   (interactive
    (let ((common
          (query-replace-read-args
@@ -540,8 +542,6 @@ and TO-STRING is also null.)"
               (region-end))
           (nth 3 common))))
   (perform-replace from-string to-string nil nil delimited nil nil start end backward))
-(put 'replace-string 'interactive-only
-     "use `search-forward' and `replace-match' instead.")
 
 (defun replace-regexp (regexp to-string &optional delimited start end backward)
   "Replace things after point matching REGEXP with TO-STRING.
@@ -597,6 +597,8 @@ What you probably want is a loop like this:
   (while (re-search-forward REGEXP nil t)
     (replace-match TO-STRING nil nil))
 which will run faster and will not set the mark or print anything."
+  (declare (interactive-only
+           "use `re-search-forward' and `replace-match' instead."))
   (interactive
    (let ((common
          (query-replace-read-args
@@ -614,8 +616,6 @@ which will run faster and will not set the mark or print anything."
               (region-end))
           (nth 3 common))))
   (perform-replace regexp to-string nil t delimited nil nil start end backward))
-(put 'replace-regexp 'interactive-only
-     "use `re-search-forward' and `replace-match' instead.")
 
 \f
 (defvar regexp-history nil
index f251c05f5eb8b74c9ea2c23b9acb4b1bcbf6e494..8d611ea04df571d77c74859c66099c1398cd5222 100644 (file)
@@ -83,7 +83,8 @@ Each element has the form (WINDOW . OVERLAY).")
                       (cond
                        ((eq (car x) (selected-window)) (cdr x))
                        ((not (and (window-live-p (car x))
-                                  (eq (window-buffer (car x)) (current-buffer))))
+                                  (eq (window-buffer (car x))
+                                      (current-buffer))))
                         ;; Adopt this since it's owned by a window that's
                         ;; either not live or at least not showing this
                         ;; buffer any more.
@@ -135,8 +136,9 @@ Each element has the form (WINDOW . OVERLAY).")
   old-ols)
 
 (defun reveal-close-old-overlays (old-ols)
-  (if (not (eq reveal-last-tick
-               (setq reveal-last-tick (buffer-modified-tick))))
+  (if (or track-mouse                   ;Don't close in the middle of a click.
+          (not (eq reveal-last-tick
+                   (setq reveal-last-tick (buffer-modified-tick)))))
       ;; The buffer was modified since last command: let's refrain from
       ;; closing any overlay because it tends to behave poorly when
       ;; inserting text at the end of an overlay (basically the overlay
index bcd9c5463a161b6285c6905f354aa94cf7215d2d..de31f2ec4ae9880c9fd539ddfa2c26b6e61de912 100644 (file)
@@ -306,7 +306,6 @@ or remove a tab stop.  \\[ruler-mode-toggle-show-tab-stops] or
   "Return a column number relative to the selected window.
 N is a column number relative to selected frame."
   (- n
-     (car (window-edges))
      (or (car (window-margins)) 0)
      (fringe-columns 'left)
      (scroll-bar-columns 'left)))
@@ -321,7 +320,7 @@ START-EVENT is the mouse click event."
     (when (eq start end) ;; mouse click
       (save-selected-window
         (select-window (posn-window start))
-        (setq col (- (car (posn-col-row start)) (car (window-edges))
+        (setq col (- (car (posn-col-row start))
                      (scroll-bar-columns 'left))
               w   (- (ruler-mode-full-window-width)
                      (scroll-bar-columns 'left)
@@ -343,7 +342,7 @@ START-EVENT is the mouse click event."
     (when (eq start end) ;; mouse click
       (save-selected-window
         (select-window (posn-window start))
-        (setq col (- (car (posn-col-row start)) (car (window-edges))
+        (setq col (- (car (posn-col-row start))
                      (scroll-bar-columns 'left))
               w   (- (ruler-mode-full-window-width)
                      (scroll-bar-columns 'left)
index 6abc29cccc24c22b14b7ca214351fe5c34dfac4c..26e9d0b881dbcaf794cd33435acad512e2d19443 100644 (file)
@@ -278,13 +278,6 @@ If AUTO-SAVE is non-nil, compare the saved contents to the one last saved,
          (print-level nil)
          (print-readably t)
          (print-quoted t))
-      ;; During the 24.3 development, read-passwd had a bug which resulted in
-      ;; the passwords being saved by savehist.  Trim them, retroactively.
-      ;; This code can be removed after the 24.3 release.
-      (dolist (sym savehist-minibuffer-history-variables)
-        (if (and (symbolp sym) (equal (symbol-name sym) "forget-history"))
-            (setq savehist-minibuffer-history-variables
-                  (delq sym savehist-minibuffer-history-variables))))
       ;; Save the minibuffer histories, along with the value of
       ;; savehist-minibuffer-history-variables itself.
       (when savehist-save-minibuffer-history
index b56a020c79520a7513964204c915264667116af7..1aa2fc7d2bbfd7d5461cead0077da1e9699ee937 100644 (file)
@@ -3,7 +3,7 @@
 ;; Copyright (C) 1997, 2001-2014 Free Software Foundation, Inc.
 
 ;; Author: Gary D. Foster <Gary.Foster@corp.sun.com>
-;; Keywords: scroll crisp brief lock
+;; Keywords: convenience scroll lock
 
 ;; This file is part of GNU Emacs.
 
index 2990e8e5ffacd82e8f9b7f38aaa7393073e950e3..6de5ee3228eb129452b50d642989eff6c669919e 100644 (file)
@@ -70,10 +70,25 @@ SIDE must be the symbol `left' or `right'."
                (frame-char-width)))
      (0))))
 
+(defun scroll-bar-lines ()
+  "Return the height, measured in lines, of the horizontal scrollbar."
+  (let* ((wsb   (window-scroll-bars))
+         (htype (nth 5 wsb))
+         (lines  (nth 4 wsb)))
+    (cond
+     (htype lines)
+     ((frame-parameter nil 'horizontal-scroll-bars)
+      ;; nil means it's a non-toolkit scroll bar (which is currently
+      ;; impossible), and its height in lines is 14 pixels rounded up.
+      (ceiling (or (frame-parameter nil 'scroll-bar-height) 14)
+               (frame-char-width)))
+     (0))))
+
 \f
 ;;;; Helpful functions for enabling and disabling scroll bars.
 
 (defvar scroll-bar-mode)
+(defvar horizontal-scroll-bar-mode)
 (defvar previous-scroll-bar-mode nil)
 
 (defvar scroll-bar-mode-explicit nil
@@ -126,12 +141,44 @@ This command applies to all frames that exist and frames to be
 created in the future."
   :variable ((get-scroll-bar-mode)
              . (lambda (v) (set-scroll-bar-mode
-                       (if v (or previous-scroll-bar-mode
-                                 default-frame-scroll-bars))))))
+                           (if v (or previous-scroll-bar-mode
+                                     default-frame-scroll-bars))))))
+
+(defun horizontal-scroll-bars-available-p ()
+  "Return non-nil when horizontal scroll bars are available on this system."
+  (and (display-graphic-p)
+       (boundp 'x-toolkit-scroll-bars)
+       x-toolkit-scroll-bars
+       (not (eq (window-system) 'ns))))
+
+(define-minor-mode horizontal-scroll-bar-mode
+  "Toggle horizontal scroll bars on all frames (Horizontal Scroll Bar mode).
+With a prefix argument ARG, enable Horizontal Scroll Bar mode if
+ARG is positive, and disable it otherwise.  If called from Lisp,
+enable the mode if ARG is omitted or nil.
+
+This command applies to all frames that exist and frames to be
+created in the future."
+  :init-value nil
+  :global t
+  :group 'frames
+  (if (and horizontal-scroll-bar-mode
+          (not (horizontal-scroll-bars-available-p)))
+      (progn
+       (setq horizontal-scroll-bar-mode nil)
+       (message "Horizontal scroll bars are not implemented on this system"))
+    (dolist (frame (frame-list))
+      (set-frame-parameter
+       frame 'horizontal-scroll-bars horizontal-scroll-bar-mode))
+    ;; Handle `default-frame-alist' entry.
+    (setq default-frame-alist
+         (cons (cons 'horizontal-scroll-bars horizontal-scroll-bar-mode)
+               (assq-delete-all 'horizontal-scroll-bars
+                                default-frame-alist)))))
 
 (defun toggle-scroll-bar (arg)
   "Toggle whether or not the selected frame has vertical scroll bars.
-With arg, turn vertical scroll bars on if and only if arg is positive.
+With ARG, turn vertical scroll bars on if and only if ARG is positive.
 The variable `scroll-bar-mode' controls which side the scroll bars are on
 when they are turned on; if it is nil, they go on the left."
   (interactive "P")
@@ -147,12 +194,20 @@ when they are turned on; if it is nil, they go on the left."
               (if (> arg 0)
                   (or scroll-bar-mode default-frame-scroll-bars))))))
 
-(defun toggle-horizontal-scroll-bar (_arg)
+(defun toggle-horizontal-scroll-bar (arg)
   "Toggle whether or not the selected frame has horizontal scroll bars.
-With arg, turn horizontal scroll bars on if and only if arg is positive.
-Horizontal scroll bars aren't implemented yet."
+With ARG, turn vertical scroll bars on if and only if ARG is positive."
   (interactive "P")
-  (error "Horizontal scroll bars aren't implemented yet"))
+  (if (null arg)
+      (setq arg
+           (if (cdr (assq 'horizontal-scroll-bars
+                          (frame-parameters (selected-frame))))
+               -1 1))
+    (setq arg (prefix-numeric-value arg)))
+  (modify-frame-parameters
+   (selected-frame)
+   (list (cons 'horizontal-scroll-bars
+              (when (> arg 0) 'bottom)))))
 \f
 ;;;; Buffer navigation using the scroll bar.
 
@@ -249,6 +304,51 @@ If you click outside the slider, the window scrolls to bring the slider there."
     (with-current-buffer (window-buffer window)
       (setq point-before-scroll before-scroll))))
 
+;; Scroll the window to the proper position for EVENT.
+(defun scroll-bar-horizontal-drag-1 (event)
+  (let* ((start-position (event-start event))
+        (window (nth 0 start-position))
+        (portion-whole (nth 2 start-position))
+        (unit (frame-char-width (window-frame window))))
+    (if (eq (current-bidi-paragraph-direction (window-buffer window))
+           'left-to-right)
+       (set-window-hscroll
+        window (/ (+ (car portion-whole) (1- unit)) unit))
+      (set-window-hscroll
+       window (/ (+ (- (cdr portion-whole) (car portion-whole))
+                   (1- unit))
+                unit)))))
+
+(defun scroll-bar-horizontal-drag (event)
+  "Scroll the window horizontally by dragging the scroll bar slider.
+If you click outside the slider, the window scrolls to bring the slider there."
+  (interactive "e")
+  (let* (done
+        (echo-keystrokes 0)
+        (end-position (event-end event))
+        (window (nth 0 end-position))
+        (before-scroll))
+    (with-current-buffer (window-buffer window)
+      (setq before-scroll point-before-scroll))
+    (save-selected-window
+      (select-window window)
+      (setq before-scroll
+           (or before-scroll (point))))
+    (scroll-bar-horizontal-drag-1 event)
+    (track-mouse
+      (while (not done)
+       (setq event (read-event))
+       (if (eq (car-safe event) 'mouse-movement)
+           (setq event (read-event)))
+       (cond ((eq (car-safe event) 'scroll-bar-movement)
+              (scroll-bar-horizontal-drag-1 event))
+             (t
+              ;; Exit when we get the drag event; ignore that event.
+              (setq done t)))))
+    (sit-for 0)
+    (with-current-buffer (window-buffer window)
+      (setq point-before-scroll before-scroll))))
+
 (defun scroll-bar-scroll-down (event)
   "Scroll the window's top line down to the location of the scroll bar click.
 EVENT should be a scroll bar click."
@@ -295,52 +395,109 @@ EVENT should be a scroll bar click."
 ;;; Tookit scroll bars.
 
 (defun scroll-bar-toolkit-scroll (event)
+  "Handle event EVENT on vertical scroll bar."
   (interactive "e")
   (let* ((end-position (event-end event))
         (window (nth 0 end-position))
         (part (nth 4 end-position))
         before-scroll)
-    (cond ((eq part 'end-scroll))
-         (t
-          (with-current-buffer (window-buffer window)
-            (setq before-scroll point-before-scroll))
-          (save-selected-window
-            (select-window window)
-            (setq before-scroll (or before-scroll (point)))
-            (cond ((eq part 'above-handle)
-                   (scroll-up '-))
-                  ((eq part 'below-handle)
-                   (scroll-up nil))
-                  ((eq part 'ratio)
-                   (let* ((portion-whole (nth 2 end-position))
-                          (lines (scroll-bar-scale portion-whole
-                                                   (1- (window-height)))))
-                     (scroll-up (cond ((not (zerop lines)) lines)
-                                      ((< (car portion-whole) 0) -1)
-                                      (t 1)))))
-                  ((eq part 'up)
-                   (scroll-up -1))
-                  ((eq part 'down)
-                   (scroll-up 1))
-                  ((eq part 'top)
-                   (set-window-start window (point-min)))
-                  ((eq part 'bottom)
-                   (goto-char (point-max))
-                   (recenter))
-                  ((eq part 'handle)
-                   (scroll-bar-drag-1 event))))
-          (sit-for 0)
-          (with-current-buffer (window-buffer window)
-            (setq point-before-scroll before-scroll))))))
-
+    (cond
+     ((eq part 'end-scroll))
+     (t
+      (with-current-buffer (window-buffer window)
+       (setq before-scroll point-before-scroll))
+      (save-selected-window
+       (select-window window)
+       (setq before-scroll (or before-scroll (point)))
+       (cond
+        ((eq part 'above-handle)
+         (scroll-up '-))
+        ((eq part 'below-handle)
+         (scroll-up nil))
+        ((eq part 'ratio)
+         (let* ((portion-whole (nth 2 end-position))
+                (lines (scroll-bar-scale portion-whole
+                                         (1- (window-height)))))
+           (scroll-up (cond ((not (zerop lines)) lines)
+                            ((< (car portion-whole) 0) -1)
+                            (t 1)))))
+        ((eq part 'up)
+         (scroll-up -1))
+        ((eq part 'down)
+         (scroll-up 1))
+        ((eq part 'top)
+         (set-window-start window (point-min)))
+        ((eq part 'bottom)
+         (goto-char (point-max))
+         (recenter))
+        ((eq part 'handle)
+         (scroll-bar-drag-1 event))))
+      (sit-for 0)
+      (with-current-buffer (window-buffer window)
+       (setq point-before-scroll before-scroll))))))
 
+(defun scroll-bar-toolkit-horizontal-scroll (event)
+  "Handle event EVENT on horizontal scroll bar."
+  (interactive "e")
+  (let* ((end-position (event-end event))
+        (window (nth 0 end-position))
+        (part (nth 4 end-position))
+        (bidi-factor
+         (if (eq (current-bidi-paragraph-direction (window-buffer window))
+                 'left-to-right)
+             1
+           -1))
+        before-scroll)
+    (cond
+     ((eq part 'end-scroll))
+     (t
+      (with-current-buffer (window-buffer window)
+       (setq before-scroll point-before-scroll))
+      (save-selected-window
+       (select-window window)
+       (setq before-scroll (or before-scroll (point)))
+       (cond
+        ((eq part 'before-handle)
+         (scroll-right (* bidi-factor 4)))
+        ((eq part 'after-handle)
+         (scroll-left (* bidi-factor 4)))
+        ((eq part 'ratio)
+         (let* ((portion-whole (nth 2 end-position))
+                (columns (scroll-bar-scale portion-whole
+                                           (1- (window-width)))))
+           (scroll-right
+            (* (cond
+                ((not (zerop columns))
+                 columns)
+                ((< (car portion-whole) 0) -1)
+                (t 1))
+               bidi-factor))))
+        ((eq part 'left)
+         (scroll-right (* bidi-factor 1)))
+        ((eq part 'right)
+         (scroll-left (* bidi-factor 1)))
+        ((eq part 'leftmost)
+         (goto-char (if (eq bidi-factor 1)
+                        (line-beginning-position)
+                      (line-end-position))))
+        ((eq part 'rightmost)
+         (goto-char (if (eq bidi-factor 1)
+                        (line-end-position)
+                      (line-beginning-position))))
+        ((eq part 'horizontal-handle)
+         (scroll-bar-horizontal-drag-1 event))))
+      (sit-for 0)
+      (with-current-buffer (window-buffer window)
+       (setq point-before-scroll before-scroll))))))
 \f
 ;;;; Bindings.
 
 ;; For now, we'll set things up to work like xterm.
 (cond ((and (boundp 'x-toolkit-scroll-bars) x-toolkit-scroll-bars)
        (global-set-key [vertical-scroll-bar mouse-1]
-                      'scroll-bar-toolkit-scroll))
+                      'scroll-bar-toolkit-scroll)
+       (global-set-key [horizontal-scroll-bar mouse-1]
+                      'scroll-bar-toolkit-horizontal-scroll))
       (t
        (global-set-key [vertical-scroll-bar mouse-1]
                       'scroll-bar-scroll-up)
index c4d020343af89197d6553f2e5024ce5a4ddfd4bd..397b98736c63fade828ef80a2d172460bd2c7dcb 100644 (file)
 
 ;; Based partially on earlier release by Lucid.
 
+;; The functionality here is pretty messy, because there are different
+;; functions that claim to get or set the "selection", with no clear
+;; distinction between them.  Here's my best understanding of it:
+;; - gui-select-text and gui-selection-value go together to access the general
+;;   notion of "GUI selection" for interoperation with other applications.
+;;   This can use either the clipboard or the primary selection, or both or
+;;   none according to gui-select-enable-clipboard and x-select-enable-primary.
+;;   These are the default values of interprogram-cut/paste-function.
+;; - gui-get-primary-selection is used to get the PRIMARY selection,
+;;   specifically for mouse-yank-primary.
+;; - gui-get-selection and gui-set-selection are lower-level functions meant to
+;;   access various kinds of selections (CLIPBOARD, PRIMARY, SECONDARY).
+
+;; Currently gui-select-text and gui-selection-value provide gui-methods so the
+;; actual backend can do it whichever way it wants.  This means for example
+;; that gui-select-enable-clipboard is defined here but implemented in each and
+;; every backend.
+;; Maybe a better structure would be to make gui-select-text and
+;; gui-selection-value have no associated gui-method, and implement
+;; gui-select-enable-clipboard (and x-select-enable-clipboard) themselves.
+;; This would instead rely on gui-get/set-selection being implemented well
+;; (e.g. currently w32's implementation thereof sucks, for example,
+;; since it doesn't access the system's clipboard when setting/getting the
+;; CLIPBOARD selection).
+
 ;;; Code:
 
 (defcustom selection-coding-system nil
@@ -71,13 +96,74 @@ other programs (X Windows clients or MS Windows programs).  But, if this
 variable is set, it is used for the next communication only.
 After the communication, this variable is set to nil.")
 
-(declare-function x-get-selection-internal "xselect.c"
-                 (selection-symbol target-type &optional time-stamp terminal))
-
 ;; Only declared obsolete in 23.3.
 (define-obsolete-function-alias 'x-selection 'x-get-selection "at least 19.34")
 
-(defun x-get-selection (&optional type data-type)
+(defcustom gui-select-enable-clipboard t
+  "Non-nil means cutting and pasting uses the clipboard.
+This can be in addition to, but in preference to, the primary selection,
+if applicable (i.e. under X11)."
+  :type 'boolean
+  :group 'killing
+  ;; The GNU/Linux version changed in 24.1, the MS-Windows version did not.
+  :version "24.1")
+(define-obsolete-variable-alias 'x-select-enable-clipboard
+  'gui-select-enable-clipboard "25.1")
+
+(gui-method-declare gui-select-text #'ignore
+  "Method used to pass the current selection to the system.
+Called with one argument (the text selected).
+Should obey `gui-select-enable-clipboard' where applicable.")
+
+(gui-method-declare gui-get-selection #'ignore
+  "Return selected text.
+Called with 2 arguments: (SELECTION-SYMBOL TARGET-TYPE)
+SELECTION-SYMBOL is typically `PRIMARY', `SECONDARY', or `CLIPBOARD'.
+\(Those are literal upper-case symbol names, since that's what X expects.)
+TARGET-TYPE is the type of data desired, typically `STRING'.")
+
+(defvar gui-last-selected-text nil
+  ;; We keep track of the last text selected here, so we can check the
+  ;; current selection against it, and avoid passing back our own text
+  ;; from gui-selection-value.
+  "Last text passed to `gui-select-text'.")
+
+(defun gui-select-text (text)
+  "Select TEXT, a string, according to the window system.
+if `gui-select-enable-clipboard' is non-nil, copy TEXT to the system's clipboard.
+
+On X, if `x-select-enable-primary' is non-nil, put TEXT in
+the primary selection.
+
+On MS-Windows, make TEXT the current selection."
+  ;; FIXME: We should test gui-select-enable-clipboard here!
+  ;; But that would break the independence between x-select-enable-primary
+  ;; and x-select-enable-clipboard!
+  ;;(when gui-select-enable-clipboard
+    (gui-call gui-select-text text) ;;)
+  (setq gui-last-selected-text text))
+(define-obsolete-function-alias 'x-select-text 'gui-select-text "25.1")
+
+(gui-method-declare gui-selection-value #'ignore
+  "Method to return the GUI's selection.
+Takes no argument, and returns a string.
+Should obey `gui-select-enable-clipboard'.")
+
+(defun gui-selection-value ()
+  (let ((text (gui-call gui-selection-value)))
+    (if (string= text "") (setq text nil))
+    (cond
+     ((not text) nil)
+     ((eq text gui-last-selected-text) nil)
+     ((string= text gui-last-selected-text)
+      ;; Record the newer string, so subsequent calls can use the `eq' test.
+      (setq gui-last-selected-text text)
+      nil)
+     (t
+      (setq gui-last-selected-text text)))))
+(define-obsolete-function-alias 'x-selection-value 'gui-selection-value "25.1")
+
+(defun gui-get-selection (&optional type data-type)
   "Return the value of an X Windows selection.
 The argument TYPE (default `PRIMARY') says which selection,
 and the argument DATA-TYPE (default `STRING') says
@@ -91,39 +177,74 @@ all upper-case names.  The most often used ones, in addition to
 DATA-TYPE is usually `STRING', but can also be one of the symbols
 in `selection-converter-alist', which see.  This argument is
 ignored on MS-Windows and MS-DOS."
-  (let ((data (x-get-selection-internal (or type 'PRIMARY)
-                                       (or data-type 'STRING)))
-       coding)
+  (let ((data (gui-call gui-get-selection (or type 'PRIMARY)
+                        (or data-type 'STRING))))
     (when (and (stringp data)
               (setq data-type (get-text-property 0 'foreign-selection data)))
-      (setq coding (or next-selection-coding-system
-                      selection-coding-system
-                      (cond ((eq data-type 'UTF8_STRING)
-                             'utf-8)
-                            ((eq data-type 'COMPOUND_TEXT)
-                             'compound-text-with-extensions)
-                            ((eq data-type 'C_STRING)
-                             nil)
-                            ((eq data-type 'STRING)
-                             'iso-8859-1)
-                            (t
-                             (error "Unknown selection data type: %S" type))))
-           data (if coding (decode-coding-string data coding)
-                  (string-to-multibyte data)))
+      (let ((coding (or next-selection-coding-system
+                        selection-coding-system
+                        (pcase data-type
+                          ('UTF8_STRING 'utf-8)
+                          ('COMPOUND_TEXT 'compound-text-with-extensions)
+                          ('C_STRING nil)
+                          ('STRING 'iso-8859-1)
+                          (_ (error "Unknown selection data type: %S"
+                                    type))))))
+        (setq data (if coding (decode-coding-string data coding)
+                     (string-to-multibyte data))))
       (setq next-selection-coding-system nil)
       (put-text-property 0 (length data) 'foreign-selection data-type data))
     data))
+(define-obsolete-function-alias 'x-get-selection 'gui-get-selection "25.1")
 
 (defun x-get-clipboard ()
   "Return text pasted to the clipboard."
-  (x-get-selection-internal 'CLIPBOARD 'STRING))
-
-(declare-function x-own-selection-internal "xselect.c"
-                 (selection-name selection-value &optional frame))
-(declare-function x-disown-selection-internal "xselect.c"
-                 (selection &optional time terminal))
-
-(defun x-set-selection (type data)
+  (declare (obsolete gui-get-selection "25.1"))
+  (gui-call gui-get-selection 'CLIPBOARD 'STRING))
+
+(defun gui-get-primary-selection ()
+  "Return the PRIMARY selection, or the best emulation thereof."
+  (or (gui-get-selection 'PRIMARY)
+      (and (fboundp 'w32-get-selection-value)
+           (eq (framep (selected-frame)) 'w32)
+           ;; MS-Windows emulates PRIMARY in x-get-selection, but only
+           ;; within the Emacs session, so consult the clipboard if
+           ;; primary is not found.
+           (w32-get-selection-value))
+      (error "No selection is available")))
+(define-obsolete-function-alias 'x-get-selection-value
+  'gui-get-primary-selection "25.1")
+
+(gui-method-declare gui-own-selection nil
+  "Method to assert a selection of type SELECTION and value VALUE.
+SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'.
+(Those are literal upper-case symbol names, since that's what X expects.)
+VALUE is typically a string, or a cons of two markers, but may be
+anything that the functions on `selection-converter-alist' know about.
+
+Called with 2 args: (SELECTION VALUE).")
+
+(gui-method-declare gui-disown-selection nil
+  "If we own the selection SELECTION, disown it.
+Disowning it means there is no such selection.
+
+Called with one argument: (SELECTION)")
+
+(gui-method-declare gui-selection-owner-p #'ignore
+  "Whether the current Emacs process owns the given X Selection.
+Called with one argument: (SELECTION).
+The arg should be the name of the selection in question, typically one of
+the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'.
+(Those are literal upper-case symbol names, since that's what X expects.)")
+
+(gui-method-declare gui-selection-exists-p #'ignore
+  "Whether there is an owner for the given X Selection.
+Called with one argument: (SELECTION).
+The arg should be the name of the selection in question, typically one of
+the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'.
+(Those are literal upper-case symbol names, since that's what X expects.)")
+
+(defun gui-set-selection (type data)
   "Make an X selection of type TYPE and value DATA.
 The argument TYPE (nil means `PRIMARY') says which selection, and
 DATA specifies the contents.  TYPE must be a symbol.  \(It can also
@@ -151,23 +272,24 @@ are not available to other programs."
                   (list 'PRIMARY (read-string "Set text for pasting: "))
                 (list 'PRIMARY (buffer-substring (region-beginning) (region-end)))))
   (if (stringp type) (setq type (intern type)))
-  (or (x-valid-simple-selection-p data)
+  (or (gui--valid-simple-selection-p data)
       (and (vectorp data)
           (let ((valid t)
                 (i (1- (length data))))
             (while (>= i 0)
-              (or (x-valid-simple-selection-p (aref data i))
+              (or (gui--valid-simple-selection-p (aref data i))
                   (setq valid nil))
               (setq i (1- i)))
             valid))
       (signal 'error (list "invalid selection" data)))
   (or type (setq type 'PRIMARY))
   (if data
-      (x-own-selection-internal type data)
-    (x-disown-selection-internal type))
+      (gui-call gui-own-selection type data)
+    (gui-call gui-disown-selection type))
   data)
+(define-obsolete-function-alias 'x-set-selection 'gui-set-selection "25.1")
 
-(defun x-valid-simple-selection-p (data)
+(defun gui--valid-simple-selection-p (data)
   (or (bufferp data)
       (and (consp data)
           (markerp (car data))
@@ -323,7 +445,7 @@ two markers or an overlay.  Otherwise, it is nil."
     (apply 'vector all)))
 
 (defun xselect-convert-to-delete (selection _type _value)
-  (x-disown-selection-internal selection)
+  (gui-call gui-disown-selection selection)
   ;; A return value of nil means that we do not know how to do this conversion,
   ;; and replies with an "error".  A return value of NULL means that we have
   ;; done the conversion (and any side-effects) but have no value to return.
index 0c645889d754b0517c901d381b57ef6c30b43de6..19c3c050bc537d6d831e7db845c8611a39b814e1 100644 (file)
@@ -642,8 +642,6 @@ server or call `M-x server-force-delete' to forcibly disconnect it.")
        (cl-letf (((default-file-modes) ?\700))
          (add-hook 'suspend-tty-functions 'server-handle-suspend-tty)
          (add-hook 'delete-frame-functions 'server-handle-delete-frame)
-         (add-hook 'kill-buffer-query-functions
-                    'server-kill-buffer-query-function)
          (add-hook 'kill-emacs-query-functions
                     'server-kill-emacs-query-function)
          (add-hook 'kill-emacs-hook 'server-force-stop) ;Cleanup upon exit.
@@ -796,32 +794,33 @@ This handles splitting the command if it would be bigger than
     (error "Invalid terminal type"))
   (add-to-list 'frame-inherited-parameters 'client)
   (let ((frame
-         (server-with-environment (process-get proc 'env)
-                                 '("LANG" "LC_CTYPE" "LC_ALL"
-                                   ;; For tgetent(3); list according to ncurses(3).
-                                   "BAUDRATE" "COLUMNS" "ESCDELAY" "HOME" "LINES"
-                                   "NCURSES_ASSUMED_COLORS" "NCURSES_NO_PADDING"
-                                   "NCURSES_NO_SETBUF" "TERM" "TERMCAP" "TERMINFO"
-                                   "TERMINFO_DIRS" "TERMPATH"
-                                   ;; rxvt wants these
-                                   "COLORFGBG" "COLORTERM")
-                                 (make-frame `((window-system . nil)
-                                               (tty . ,tty)
-                                               (tty-type . ,type)
-                                               ;; Ignore nowait here; we always need to
-                                               ;; clean up opened ttys when the client dies.
-                                               (client . ,proc)
-                                               ;; This is a leftover from an earlier
-                                               ;; attempt at making it possible for process
-                                               ;; run in the server process to use the
-                                               ;; environment of the client process.
-                                               ;; It has no effect now and to make it work
-                                               ;; we'd need to decide how to make
-                                               ;; process-environment interact with client
-                                               ;; envvars, and then to change the
-                                               ;; C functions `child_setup' and
-                                               ;; `getenv_internal' accordingly.
-                                               (environment . ,(process-get proc 'env)))))))
+         (server-with-environment
+             (process-get proc 'env)
+             '("LANG" "LC_CTYPE" "LC_ALL"
+               ;; For tgetent(3); list according to ncurses(3).
+               "BAUDRATE" "COLUMNS" "ESCDELAY" "HOME" "LINES"
+               "NCURSES_ASSUMED_COLORS" "NCURSES_NO_PADDING"
+               "NCURSES_NO_SETBUF" "TERM" "TERMCAP" "TERMINFO"
+               "TERMINFO_DIRS" "TERMPATH"
+               ;; rxvt wants these
+               "COLORFGBG" "COLORTERM")
+           (make-frame `((window-system . nil)
+                         (tty . ,tty)
+                         (tty-type . ,type)
+                         ;; Ignore nowait here; we always need to
+                         ;; clean up opened ttys when the client dies.
+                         (client . ,proc)
+                         ;; This is a leftover from an earlier
+                         ;; attempt at making it possible for process
+                         ;; run in the server process to use the
+                         ;; environment of the client process.
+                         ;; It has no effect now and to make it work
+                         ;; we'd need to decide how to make
+                         ;; process-environment interact with client
+                         ;; envvars, and then to change the
+                         ;; C functions `child_setup' and
+                         ;; `getenv_internal' accordingly.
+                         (environment . ,(process-get proc 'env)))))))
 
     ;; ttys don't use the `display' parameter, but callproc.c does to set
     ;; the DISPLAY environment on subprocesses.
@@ -1472,22 +1471,6 @@ specifically for the clients and did not exist before their request for it."
        (save-buffer)))
     (server-buffer-done (current-buffer))))
 
-;; Ask before killing a server buffer.
-;; It was suggested to release its client instead,
-;; but I think that is dangerous--the client would proceed
-;; using whatever is on disk in that file. -- rms.
-(defun server-kill-buffer-query-function ()
-  "Ask before killing a server buffer."
-  (or (not server-buffer-clients)
-      (let ((res t))
-       (dolist (proc server-buffer-clients)
-          (when (and (memq proc server-clients)
-                     (eq (process-status proc) 'open))
-            (setq res nil)))
-         res)
-      (yes-or-no-p (format "Buffer `%s' still has clients; kill it? "
-                          (buffer-name (current-buffer))))))
-
 (defun server-kill-emacs-query-function ()
   "Ask before exiting Emacs if it has live clients."
   (or (not server-clients)
index 1626147dab477675974dc94043083b96e9d9843b..541c1e1976959dd01b09df1b0accc45251d16a5d 100644 (file)
@@ -1,4 +1,4 @@
-;;; ses.el -- Simple Emacs Spreadsheet  -*- coding: utf-8 -*-
+;;; ses.el -- Simple Emacs Spreadsheet  -*- lexical-binding:t -*-
 
 ;; Copyright (C) 2002-2014 Free Software Foundation, Inc.
 
@@ -239,6 +239,10 @@ Each function is called with ARG=1."
   "\n( ;Global parameters (these are read first)\n 2 ;SES file-format\n 1 ;numrows\n 1 ;numcols\n)\n\n"
   "Initial contents for the three-element list at the bottom of the data area.")
 
+(defconst ses-initial-global-parameters-re
+  "\n( ;Global parameters (these are read first)\n [23] ;SES file-format\n [0-9]+ ;numrows\n [0-9]+ ;numcols\n\\( [0-9]+ ;numlocprn\n\\)?)\n\n"
+  "Match Global parameters for .")
+
 (defconst ses-initial-file-trailer
   ";; Local Variables:\n;; mode: ses\n;; End:\n"
   "Initial contents for the file-trailer area at the bottom of the file.")
@@ -277,6 +281,8 @@ default printer and then modify its output.")
     '(ses--blank-line ses--cells ses--col-printers
       ses--col-widths ses--curcell ses--curcell-overlay
       ses--default-printer
+      (ses--local-printer-hashmap . :hashmap)
+      (ses--numlocprn . 0); count of local printers
       ses--deferred-narrow ses--deferred-recalc
       ses--deferred-write ses--file-format
       ses--named-cell-hashmap
@@ -290,7 +296,11 @@ default printer and then modify its output.")
       ses--renamed-cell-symb-list
       ;; Global variables that we override
       mode-line-process next-line-add-newlines transient-mark-mode)
-    "Buffer-local variables used by SES.")
+    "Buffer-local variables used by SES."))
+
+(defmacro ses--metaprogramming (exp) (declare (debug t)) (eval exp t))
+(ses--metaprogramming
+ `(progn ,@(mapcar (lambda (x) `(defvar ,(or (car-safe x) x))) ses-localvars)))
 
 (defun ses-set-localvars ()
   "Set buffer-local and initialize some SES variables."
@@ -299,11 +309,14 @@ default printer and then modify its output.")
      ((symbolp x)
       (set (make-local-variable x) nil))
      ((consp x)
-      (set (make-local-variable (car x)) (cdr x)))
-     (t (error "Unexpected elements `%S' in list `ses-localvars'" x))))))
-
-(eval-when-compile                     ; silence compiler
-  (ses-set-localvars))
+      (cond
+       ((integerp (cdr x))
+       (set (make-local-variable (car x)) (cdr x)))
+       ((eq (cdr x) :hashmap)
+       (set (make-local-variable (car x)) (make-hash-table :test 'eq)))
+       (t (error "Unexpected initializer `%S' in list `ses-localvars' for entry %S"
+                (cdr x) (car x)) )     ))
+     (t (error "Unexpected elements `%S' in list `ses-localvars'" x)))))
 
 ;;; This variable is documented as being permitted in file-locals:
 (put 'ses--symbolic-formulas 'safe-local-variable 'consp)
@@ -311,10 +324,21 @@ default printer and then modify its output.")
 (defconst ses-paramlines-plist
   '(ses--col-widths  -5 ses--col-printers -4 ses--default-printer -3
     ses--header-row  -2 ses--file-format   1 ses--numrows          2
-    ses--numcols      3)
+    ses--numcols      3 ses--numlocprn     4)
   "Offsets from 'Global parameters' line to various parameter lines in the
 data area of a spreadsheet.")
 
+(defconst ses-paramfmt-plist
+  '(ses--col-widths       "(ses-column-widths %S)"
+    ses--col-printers     "(ses-column-printers %S)"
+    ses--default-printer  "(ses-default-printer %S)"
+    ses--header-row       "(ses-header-row %S)"
+    ses--file-format      " %S ;SES file-format"
+    ses--numrows          " %S ;numrows"
+    ses--numcols          " %S ;numcols"
+    ses--numlocprn        " %S ;numlocprn")
+  "Formats of 'Global parameters' various parameters in the data
+area of a spreadsheet.")
 
 ;;
 ;;  "Side-effect variables".  They are set in one function, altered in
@@ -347,158 +371,88 @@ when to emit a progress message.")
 
 (defmacro ses-get-cell (row col)
   "Return the cell structure that stores information about cell (ROW,COL)."
+  (declare (debug t))
   `(aref (aref ses--cells ,row) ,col))
 
-;; We might want to use defstruct here, but cells are explicitly used as
-;; arrays in ses-set-cell, so we'd need to fix this first.  --Stef
-(defsubst ses-make-cell (&optional symbol formula printer references
-                                  property-list)
-  (vector symbol formula printer references property-list))
+(cl-defstruct (ses-cell
+              (:constructor nil)
+              (:constructor ses-make-cell
+               (&optional symbol formula printer references))
+              (:copier nil)
+              ;; This is treated as an 4-elem array in various places.
+              ;; Mostly in ses-set-cell.
+              (:type vector)           ;Not named.
+              (:conc-name ses-cell--))
+  symbol formula printer references properties)
+
+(cl-defstruct (ses--locprn
+               (:constructor)
+               (:constructor ses-make-local-printer-info
+                (def &optional (compiled (ses-local-printer-compile def))
+                     (number ses--numlocprn))))
+  def
+  compiled
+  number
+  local-printer-list)
 
 (defmacro ses-cell-symbol (row &optional col)
   "From a CELL or a pair (ROW,COL), get the symbol that names the local-variable holding its value.  (0,0) => A1."
-  `(aref ,(if col `(ses-get-cell ,row ,col) row) 0))
+  (declare (debug t))
+  `(ses-cell--symbol ,(if col `(ses-get-cell ,row ,col) row)))
 (put 'ses-cell-symbol 'safe-function t)
 
 (defmacro ses-cell-formula (row &optional col)
   "From a CELL or a pair (ROW,COL), get the function that computes its value."
-  `(aref ,(if col `(ses-get-cell ,row ,col) row) 1))
-
-(defmacro ses-cell-formula-aset (cell formula)
-  "From a CELL set the function that computes its value."
-  `(aset ,cell 1 ,formula))
+  (declare (debug t))
+  `(ses-cell--formula ,(if col `(ses-get-cell ,row ,col) row)))
 
 (defmacro ses-cell-printer (row &optional col)
   "From a CELL or a pair (ROW,COL), get the function that prints its value."
-  `(aref ,(if col `(ses-get-cell ,row ,col) row) 2))
+  (declare (debug t))
+  `(ses-cell--printer ,(if col `(ses-get-cell ,row ,col) row)))
 
 (defmacro ses-cell-references (row &optional col)
   "From a CELL or a pair (ROW,COL), get the list of symbols for cells whose
 functions refer to its value."
-  `(aref ,(if col `(ses-get-cell ,row ,col) row) 3))
-
-(defmacro ses-cell-references-aset (cell references)
-  "From a CELL set the list REFERENCES of symbols for cells the
-function of which refer to its value."
-  `(aset ,cell 3 ,references))
+  (declare (debug t))
+  `(ses-cell--references ,(if col `(ses-get-cell ,row ,col) row)))
 
 (defun ses-cell-p (cell)
-  "Return non `nil' is CELL is a cell of current buffer."
+  "Return non-nil if CELL is a cell of current buffer."
   (and (vectorp cell)
        (= (length cell) 5)
        (eq cell (let ((rowcol (ses-sym-rowcol (ses-cell-symbol cell))))
                  (and (consp rowcol)
                       (ses-get-cell (car rowcol) (cdr rowcol)))))))
 
-(defun ses-cell-property-get-fun (property-name cell)
-  ;; To speed up property fetching, each time a property is found it is placed
-  ;; in the first position.  This way, after the first get, the full property
-  ;; list needs to be scanned only when the property does not exist for that
-  ;; cell.
-  (let* ((plist  (aref cell 4))
-        (ret (plist-member plist property-name)))
-    (if ret
-       ;; Property was found.
-       (let ((val (cadr ret)))
-         (if (eq ret plist)
-             ;; Property found is already in the first position, so just return
-             ;; its value.
-             val
-           ;; Property is not in the first position, the following will move it
-           ;; there before returning its value.
-           (let ((next (cddr ret)))
-             (if next
-                 (progn
-                   (setcdr ret (cdr next))
-                   (setcar ret (car next)))
-               (setcdr (last plist 1) nil)))
-           (aset cell 4
-                 `(,property-name ,val ,@plist))
-           val)))))
-
-(defmacro ses-cell-property-get (property-name row &optional col)
-   "Get property named PROPERTY-NAME from a CELL or a pair (ROW,COL).
+
+(defmacro ses--letref (vars place &rest body)
+  (declare (indent 2) (debug (sexp form &rest body)))
+  (gv-letplace (getter setter) place
+    `(cl-macrolet ((,(nth 0 vars) () ',getter)
+                   (,(nth 1 vars) (v) (funcall ',setter v)))
+       ,@body)))
+
+(defmacro ses-cell-property (property-name row &optional col)
+  "Get property named PROPERTY-NAME from a CELL or a pair (ROW,COL).
 
 When COL is omitted, CELL=ROW is a cell object.  When COL is
 present ROW and COL are the integer coordinates of the cell of
 interest."
-   (declare (debug t))
-   `(ses-cell-property-get-fun
-     ,property-name
-     ,(if col `(ses-get-cell ,row ,col) row)))
-
-(defun ses-cell-property-delq-fun (property-name cell)
-  (let ((ret (plist-get (aref cell 4) property-name)))
-    (if ret
-      (setcdr ret (cddr ret)))))
-
-(defun ses-cell-property-set-fun (property-name property-val cell)
-  (let*        ((plist  (aref cell 4))
-        (ret (plist-member plist property-name)))
-    (if ret
-       (setcar (cdr ret) property-val)
-      (aset cell 4 `(,property-name ,property-val ,@plist)))))
-
-(defmacro ses-cell-property-set (property-name property-value row &optional col)
-   "From a CELL or a pair (ROW,COL), set the property value of
-the corresponding cell with name PROPERTY-NAME to PROPERTY-VALUE."
-   (if property-value
-       `(ses-cell-property-set-fun ,property-name ,property-value
-                                  ,(if col `(ses-get-cell ,row ,col) row))
-       `(ses-cell-property-delq-fun ,property-name
-                                   ,(if col `(ses-get-cell ,row ,col) row))))
-
-(defun ses-cell-property-pop-fun (property-name cell)
-  (let* ((plist  (aref cell 4))
-        (ret (plist-member plist property-name)))
-    (if ret
-       (prog1 (cadr ret)
-         (let ((next (cddr ret)))
-           (if next
-               (progn
-                 (setcdr ret (cdr next))
-                 (setcar ret (car next)))
-             (if (eq plist ret)
-                 (aset cell 4 nil)
-               (setcdr (last plist 2) nil))))))))
-
+  (declare (debug t))
+  `(alist-get ,property-name
+              (ses-cell--properties
+               ,(if col `(ses-get-cell ,row ,col) row))))
 
 (defmacro ses-cell-property-pop (property-name row &optional col)
-   "From a CELL or a pair (ROW,COL), get and remove the property value of
+  "From a CELL or a pair (ROW,COL), get and remove the property value of
 the corresponding cell with name PROPERTY-NAME."
-   `(ses-cell-property-pop-fun  ,property-name
-                               ,(if col `(ses-get-cell ,row ,col) row)))
-
-(defun ses-cell-property-get-handle-fun (property-name cell)
-  (let*        ((plist  (aref cell 4))
-        (ret (plist-member plist property-name)))
-    (if ret
-       (if (eq ret plist)
-           (cdr ret)
-         (let ((val (cadr ret))
-               (next (cddr ret)))
-           (if next
-               (progn
-                 (setcdr ret (cdr next))
-                 (setcar ret (car next)))
-             (setcdr (last plist 2) nil))
-           (setq ret (cons val plist))
-           (aset cell 4 (cons property-name ret))
-           ret))
-      (setq ret (cons nil plist))
-      (aset cell 4 (cons property-name ret))
-      ret)))
-
-(defmacro ses-cell-property-get-handle (property-name row &optional col)
-   "From a CELL or a pair (ROW,COL), get a cons cell whose car is
-the property value of the corresponding cell property with name
-PROPERTY-NAME."
-   `(ses-cell-property-get-handle-fun  ,property-name
-                               ,(if col `(ses-get-cell ,row ,col) row)))
-
-
-(defalias 'ses-cell-property-handle-car 'car)
-(defalias 'ses-cell-property-handle-setcar 'setcar)
+  `(ses--letref (pget pset)
+       (alist-get ,property-name
+                  (ses-cell--properties
+                   ,(if col `(ses-get-cell ,row ,col) row))
+                  nil t)
+     (prog1 (pget) (pset nil))))
 
 (defmacro ses-cell-value (row &optional col)
   "From a CELL or a pair (ROW,COL), get the current value for that cell."
@@ -530,14 +484,14 @@ is nil if SYM is not a symbol that names a cell."
                (< (cdr rowcol) ses--numcols)
                (eq (ses-cell-symbol (car rowcol) (cdr rowcol)) sym))))))
 
-(defmacro ses-cell (sym value formula printer references)
+(defun ses--cell (sym value formula printer references)
   "Load a cell SYM from the spreadsheet file.  Does not recompute VALUE from
-FORMULA, does not reprint using PRINTER, does not check REFERENCES.  This is a
-macro to prevent propagate-on-load viruses.  Safety-checking for FORMULA and
-PRINTER are deferred until first use."
+FORMULA, does not reprint using PRINTER, does not check REFERENCES.
+Safety-checking for FORMULA and PRINTER are deferred until first use."
   (let ((rowcol (ses-sym-rowcol sym)))
     (ses-formula-record formula)
     (ses-printer-record printer)
+    (unless formula (setq formula value))
     (or (atom formula)
        (eq safe-functions t)
        (setq formula `(ses-safe-formula ,formula)))
@@ -545,11 +499,32 @@ PRINTER are deferred until first use."
        (stringp printer)
        (eq safe-functions t)
        (setq printer `(ses-safe-printer ,printer)))
-    (aset (aref ses--cells (car rowcol))
-         (cdr rowcol)
+    (setf (ses-get-cell (car rowcol) (cdr rowcol))
          (ses-make-cell sym formula printer references)))
-  (set sym value)
-  sym)
+  (set sym value))
+
+(defun ses-local-printer-compile (printer)
+  "Convert local printer function into faster printer
+definition."
+  (cond
+   ((functionp printer) printer)
+   ((stringp printer)
+    `(lambda (x) (format ,printer x)))
+   (t (error "Invalid printer %S" printer))))
+
+(defun ses--local-printer (name def)
+  "Define a local printer with name NAME and definition DEF.
+Return the printer info."
+  (or
+   (and (symbolp name)
+       (ses-printer-validate def))
+   (error "Invalid local printer definition"))
+  (and (gethash name ses--local-printer-hashmap)
+       (error "Duplicate printer definition %S" name))
+  (add-to-list 'ses-read-printer-history (symbol-name name))
+  (puthash name
+          (ses-make-local-printer-info (ses-safe-printer def))
+          ses--local-printer-hashmap))
 
 (defmacro ses-column-widths (widths)
   "Load the vector of column widths from the spreadsheet file.  This is a
@@ -559,7 +534,7 @@ macro to prevent propagate-on-load viruses."
   ;;To save time later, we also calculate the total width of each line in the
   ;;print area (excluding the terminating newline)
   (setq ses--col-widths widths
-       ses--linewidth  (apply '+ -1 (mapcar '1+ widths))
+       ses--linewidth  (apply #'+ -1 (mapcar #'1+ widths))
        ses--blank-line (concat (make-string ses--linewidth ?\s) "\n"))
   t)
 
@@ -571,7 +546,7 @@ them for safety.  This is a macro to prevent propagate-on-load viruses."
   (dotimes (x ses--numcols)
     (aset printers x (ses-safe-printer (aref printers x))))
   (setq ses--col-printers printers)
-  (mapc 'ses-printer-record printers)
+  (mapc #'ses-printer-record printers)
   t)
 
 (defmacro ses-default-printer (def)
@@ -605,23 +580,24 @@ variables `minrow', `maxrow', `mincol', and `maxcol'."
        (let ((minrow (car ,min))
             (maxrow (car ,max))
             (mincol (cdr ,min))
-            (maxcol (cdr ,max))
-            row col)
+            (maxcol (cdr ,max)))
         (if (or (> minrow maxrow) (> mincol maxcol))
             (error "Empty range"))
         (dotimes (,r (- maxrow minrow -1))
-          (setq row (+ ,r minrow))
-          (dotimes (,c (- maxcol mincol -1))
-            (setq col (+ ,c mincol))
-            ,@body))))))
+          (let ((row (+ ,r minrow)))
+             (dotimes (,c (- maxcol mincol -1))
+               (let ((col (+ ,c mincol)))
+                 ,@body))))))))
 
 ;;Support for coverage testing.
 (defmacro 1value (form)
   "For code-coverage testing, indicate that FORM is expected to always have
 the same value."
+  (declare (debug t))
   form)
 (defmacro noreturn (form)
   "For code-coverage testing, indicate that FORM will always signal an error."
+  (declare (debug t))
   form)
 
 
@@ -664,9 +640,11 @@ is a vector--if a symbol, the new vector is assigned as the symbol's value."
   "Signal an error if PRINTER is not a valid SES cell printer."
   (or (not printer)
       (stringp printer)
+      ;; printer is a local printer
+      (and (symbolp printer) (gethash printer ses--local-printer-hashmap))
       (functionp printer)
       (and (stringp (car-safe printer)) (not (cdr printer)))
-      (error "Invalid printer function"))
+      (error "Invalid printer function %S" printer))
   printer)
 
 (defun ses-printer-record (printer)
@@ -698,20 +676,22 @@ for this spreadsheet."
   (intern (concat (ses-column-letter col) (number-to-string (1+ row)))))
 
 (defun ses-decode-cell-symbol (str)
-  "Decode a symbol \"A1\" => (0,0). Returns `nil' if STR is not a
-  canonical cell name. Does not save match data."
+  "Decode a symbol \"A1\" => (0,0).  Return nil if STR is not a
+canonical cell name."
   (let (case-fold-search)
     (and (string-match "\\`\\([A-Z]+\\)\\([0-9]+\\)\\'" str)
         (let* ((col-str (match-string-no-properties 1 str))
-              (col 0)
-              (col-base 1)
-              (col-idx (1- (length col-str)))
-              (row (1- (string-to-number (match-string-no-properties 2 str)))))
+                (col 0)
+                (col-base 1)
+                (col-idx (1- (length col-str)))
+                (row (1- (string-to-number
+                          (match-string-no-properties 2 str)))))
           (and (>= row 0)
                (progn
                  (while
                      (progn
-                       (setq col (+ col (* (- (aref col-str col-idx) ?A) col-base))
+                       (setq col (+ col (* (- (aref col-str col-idx) ?A)
+                                            col-base))
                              col-base (* col-base 26)
                              col-idx (1- col-idx))
                        (and (>= col-idx 0)
@@ -772,34 +752,47 @@ updated again."
   (setq ses--header-hscroll -1))
 
 ;;Split this code off into a function to avoid coverage-testing difficulties
-(defun ses-time-check (format arg)
+(defmacro ses--time-check (format &rest args)
   "If `ses-start-time' is more than a second ago, call `message' with FORMAT
-and (eval ARG) and reset `ses-start-time' to the current time."
-  (when (> (- (float-time) ses-start-time) 1.0)
-    (message format (eval arg))
-    (setq ses-start-time (float-time)))
-  nil)
+and ARGS and reset `ses-start-time' to the current time."
+  `(when (> (- (float-time) ses-start-time) 1.0)
+     (message ,format ,@args)
+     (setq ses-start-time (float-time))))
 
 
 ;;----------------------------------------------------------------------------
 ;; The cells
 ;;----------------------------------------------------------------------------
 
-(defun ses-set-cell (row col field val)
+(defmacro ses-set-cell (row col field val)
   "Install VAL as the contents for field FIELD (named by a quoted symbol) of
 cell (ROW,COL).  This is undoable.  The cell's data will be updated through
 `post-command-hook'."
-  (let ((cell (ses-get-cell row col))
-       (elt  (plist-get '(value t symbol 0 formula 1 printer 2 references 3)
-                        field))
-       change)
-    (or elt (signal 'args-out-of-range nil))
-    (setq change (if (eq elt t)
-                    (ses-set-with-undo (ses-cell-symbol cell) val)
-                  (ses-aset-with-undo cell elt val)))
-    (if change
-       (add-to-list 'ses--deferred-write (cons row col))))
-  nil) ; Make coverage-tester happy.
+  `(let ((row ,row)
+         (col ,col)
+         (val ,val))
+     (let* ((cell (ses-get-cell row col))
+            (change
+             ,(let ((field (progn (cl-assert (eq (car field) 'quote))
+                                  (cadr field))))
+                (if (eq field 'value)
+                    `(ses-set-with-undo (ses-cell-symbol cell) val)
+                  ;; (let* ((slots (get 'ses-cell 'cl-struct-slots))
+                  ;;        (slot (or (assq field slots)
+                  ;;                  (error "Unknown field %S" field)))
+                  ;;        (idx (- (length slots)
+                  ;;                (length (memq slot slots)))))
+                  ;;   `(ses-aset-with-undo cell ,idx val))
+                  (let ((getter (intern-soft (format "ses-cell--%s" field))))
+                    `(ses-setter-with-undo
+                      (eval-when-compile
+                        (cons #',getter
+                              (lambda (newval cell)
+                                (setf (,getter cell) newval))))
+                      val cell))))))
+       (if change
+           (add-to-list 'ses--deferred-write (cons row col))))
+     nil)) ; Make coverage-tester happy.
 
 (defun ses-cell-set-formula (row col formula)
   "Store a new formula for (ROW . COL) and enqueue the cell for
@@ -814,7 +807,7 @@ means Emacs will crash if FORMULA contains a circular list."
          (newref (ses-formula-references formula))
          (inhibit-quit t)
          x xrow xcol)
-      (add-to-list 'ses--deferred-recalc sym)
+      (cl-pushnew sym ses--deferred-recalc)
       ;;Delete old references from this cell.  Skip the ones that are also
       ;;in the new list.
       (dolist (ref oldref)
@@ -845,11 +838,11 @@ means Emacs will crash if FORMULA contains a circular list."
       (dotimes (col ses--numcols)
        (let ((references  (ses-cell-property-pop :ses-repair-reference
                                                  row col)))
-       (when references
-         (push (list
-                (ses-cell-symbol row col)
-                :corrupt-property
-                references) errors)))))
+          (when references
+            (push (list (ses-cell-symbol row col)
+                        :corrupt-property
+                        references)
+                  errors)))))
 
     ;; Step 2, build new.
     (dotimes (row ses--numrows)
@@ -859,21 +852,17 @@ means Emacs will crash if FORMULA contains a circular list."
               (formula (ses-cell-formula cell))
               (new-ref (ses-formula-references formula)))
          (dolist (ref new-ref)
-           (let* ((rowcol (ses-sym-rowcol ref))
-                 (h (ses-cell-property-get-handle :ses-repair-reference
-                                                 (car rowcol) (cdr rowcol))))
-             (unless (memq ref (ses-cell-property-handle-car h))
-               (ses-cell-property-handle-setcar
-                h
-                (cons sym
-                      (ses-cell-property-handle-car h)))))))))
+           (let ((rowcol (ses-sym-rowcol ref)))
+              (cl-pushnew sym (ses-cell-property :ses-repair-reference
+                                                 (car rowcol)
+                                                 (cdr rowcol))))))))
 
     ;; Step 3, overwrite with check.
     (dotimes (row ses--numrows)
       (dotimes (col ses--numcols)
        (let* ((cell (ses-get-cell row col))
               (irrelevant (ses-cell-references cell))
-              (new-ref (ses-cell-property-pop  :ses-repair-reference cell))
+              (new-ref (ses-cell-property-pop :ses-repair-reference cell))
               missing)
          (dolist (ref new-ref)
            (if (memq ref irrelevant)
@@ -886,7 +875,7 @@ means Emacs will crash if FORMULA contains a circular list."
                     ,@(and irrelevant  (list :irrelevant irrelevant)))
                  errors)))))
     (if errors
-      (warn "----------------------------------------------------------------
+        (warn "----------------------------------------------------------------
 Some references were corrupted.
 
 The following is a list where each element ELT is such
@@ -917,17 +906,12 @@ the old and FORCE is nil."
     (let ((oldval  (ses-cell-value   cell))
          (formula (ses-cell-formula cell))
          newval
-         this-cell-Dijkstra-attempt-h
-         this-cell-Dijkstra-attempt
-         this-cell-Dijkstra-attempt+1
-         ref-cell-Dijkstra-attempt-h
-         ref-cell-Dijkstra-attempt
-         ref-rowcol)
+         this-cell-Dijkstra-attempt+1)
       (when (eq (car-safe formula) 'ses-safe-formula)
        (setq formula (ses-safe-formula (cadr formula)))
        (ses-set-cell row col 'formula formula))
       (condition-case sig
-         (setq newval (eval formula))
+         (setq newval (eval formula t))
        (error
         ;; Variable `sig' can't be nil.
         (nconc sig (list (ses-cell-symbol cell)))
@@ -938,46 +922,42 @@ the old and FORCE is nil."
          (setq newval '*skip*))
       (catch 'cycle
        (when (or force (not (eq newval oldval)))
-         (add-to-list 'ses--deferred-write (cons row col)) ; In case force=t.
-         (setq this-cell-Dijkstra-attempt-h
-               (ses-cell-property-get-handle :ses-Dijkstra-attempt cell);
-               this-cell-Dijkstra-attempt
-               (ses-cell-property-handle-car this-cell-Dijkstra-attempt-h))
-         (if (null this-cell-Dijkstra-attempt)
-             (ses-cell-property-handle-setcar
-              this-cell-Dijkstra-attempt-h
-              (setq this-cell-Dijkstra-attempt
-                    (cons ses--Dijkstra-attempt-nb 0)))
-           (unless (= ses--Dijkstra-attempt-nb
-                      (car this-cell-Dijkstra-attempt))
-               (setcar this-cell-Dijkstra-attempt ses--Dijkstra-attempt-nb)
-               (setcdr this-cell-Dijkstra-attempt 0)))
-         (setq this-cell-Dijkstra-attempt+1
-               (1+ (cdr this-cell-Dijkstra-attempt)))
+         (cl-pushnew (cons row col) ses--deferred-write :test #'equal) ; In case force=t.
+          (ses--letref (pget pset)
+              (ses-cell-property :ses-Dijkstra-attempt cell)
+            (let ((this-cell-Dijkstra-attempt (pget)))
+              (if (null this-cell-Dijkstra-attempt)
+                  (pset
+                   (setq this-cell-Dijkstra-attempt
+                         (cons ses--Dijkstra-attempt-nb 0)))
+                (unless (= ses--Dijkstra-attempt-nb
+                           (car this-cell-Dijkstra-attempt))
+                  (setcar this-cell-Dijkstra-attempt ses--Dijkstra-attempt-nb)
+                  (setcdr this-cell-Dijkstra-attempt 0)))
+              (setq this-cell-Dijkstra-attempt+1
+                    (1+ (cdr this-cell-Dijkstra-attempt)))))
          (ses-set-cell row col 'value newval)
          (dolist (ref (ses-cell-references cell))
-           (add-to-list 'ses--deferred-recalc ref)
-           (setq ref-rowcol (ses-sym-rowcol ref)
-                 ref-cell-Dijkstra-attempt-h
-                 (ses-cell-property-get-handle
-                  :ses-Dijkstra-attempt
-                  (car ref-rowcol) (cdr ref-rowcol))
-                 ref-cell-Dijkstra-attempt
-                 (ses-cell-property-handle-car ref-cell-Dijkstra-attempt-h))
-
-           (if (null ref-cell-Dijkstra-attempt)
-             (ses-cell-property-handle-setcar
-              ref-cell-Dijkstra-attempt-h
-              (setq ref-cell-Dijkstra-attempt
-                     (cons ses--Dijkstra-attempt-nb
-                           this-cell-Dijkstra-attempt+1)))
-             (if (= (car ref-cell-Dijkstra-attempt) ses--Dijkstra-attempt-nb)
-                 (setcdr ref-cell-Dijkstra-attempt
-                         (max (cdr ref-cell-Dijkstra-attempt)
-                              this-cell-Dijkstra-attempt+1))
-               (setcar ref-cell-Dijkstra-attempt ses--Dijkstra-attempt-nb)
-               (setcdr ref-cell-Dijkstra-attempt
-                       this-cell-Dijkstra-attempt+1)))
+           (cl-pushnew ref ses--deferred-recalc)
+            (ses--letref (pget pset)
+                (let ((ref-rowcol (ses-sym-rowcol ref)))
+                  (ses-cell-property
+                   :ses-Dijkstra-attempt
+                   (car ref-rowcol) (cdr ref-rowcol)))
+              (let ((ref-cell-Dijkstra-attempt (pget)))
+
+                (if (null ref-cell-Dijkstra-attempt)
+                    (pset
+                     (setq ref-cell-Dijkstra-attempt
+                           (cons ses--Dijkstra-attempt-nb
+                                 this-cell-Dijkstra-attempt+1)))
+                  (if (= (car ref-cell-Dijkstra-attempt) ses--Dijkstra-attempt-nb)
+                      (setcdr ref-cell-Dijkstra-attempt
+                              (max (cdr ref-cell-Dijkstra-attempt)
+                                   this-cell-Dijkstra-attempt+1))
+                    (setcar ref-cell-Dijkstra-attempt ses--Dijkstra-attempt-nb)
+                    (setcdr ref-cell-Dijkstra-attempt
+                            this-cell-Dijkstra-attempt+1)))))
 
            (when (> this-cell-Dijkstra-attempt+1 ses--Dijkstra-weight-bound)
              ;; Update print of this cell.
@@ -1036,7 +1016,7 @@ if the cell's value is unchanged and FORCE is nil."
                    (when (or (memq ref curlist)
                              (memq ref ses--deferred-recalc))
                      ;; This cell refers to another that isn't done yet
-                     (add-to-list 'ses--deferred-recalc this-sym)
+                     (cl-pushnew this-sym ses--deferred-recalc :test #'equal)
                      (throw 'ref t)))))
              ;; ses-update-cells is called from post-command-hook, so
              ;; inhibit-quit is implicitly bound to t.
@@ -1045,7 +1025,7 @@ if the cell's value is unchanged and FORCE is nil."
                (error "Quit"))
              (ses-calculate-cell (car this-rowcol) (cdr this-rowcol) force)))
        (dolist (ref ses--deferred-recalc)
-         (add-to-list 'nextlist ref)))
+          (cl-pushnew ref nextlist :test #'equal)))
       (when ses--deferred-recalc
        ;; Just couldn't finish these.
        (dolist (x ses--deferred-recalc)
@@ -1123,6 +1103,9 @@ A single cell is appropriate unless some argument is 'needrange."
    ((memq 'needrange args)
     (error "Need a range"))))
 
+(defvar ses--row)
+(defvar ses--col)
+
 (defun ses-print-cell (row col)
   "Format and print the value of cell (ROW,COL) to the print area.
 Use the cell's printer function.  If the cell's new print form is too wide,
@@ -1150,10 +1133,13 @@ preceding cell has spilled over."
            (ses-set-cell row col 'printer
                          (setq printer (ses-safe-printer (cadr printer)))))
        ;; Print the value.
-       (setq text (ses-call-printer (or printer
-                                        (ses-col-printer col)
-                                        ses--default-printer)
-                                    value))
+       (setq text
+              (let ((ses--row row)
+                    (ses--col col))
+                (ses-call-printer (or printer
+                                      (ses-col-printer col)
+                                      ses--default-printer)
+                                  value)))
        (if (consp ses-call-printer-return)
            ;; Printer returned an error.
            (setq sig ses-call-printer-return))))
@@ -1164,7 +1150,8 @@ preceding cell has spilled over."
         ((< len width)
          ;; Fill field to length with spaces.
          (setq len  (make-string (- width len) ?\s)
-               text (if (eq ses-call-printer-return t)
+               text (if (or (stringp value)
+                            (eq ses-call-printer-return t))
                         (concat text len)
                       (concat len text))))
         ((> len width)
@@ -1261,7 +1248,15 @@ printer signaled one (and \"%s\" is used as the default printer), else nil."
            (format (car printer) value)
          ""))
        (t
-       (setq value (funcall printer (or value "")))
+       (setq value
+              (funcall
+               (or (and (symbolp printer)
+                        (let ((locprn (gethash printer
+                                               ses--local-printer-hashmap)))
+                          (and locprn
+                               (ses--locprn-compiled locprn))))
+                   printer)
+               (or value "")))
        (if (stringp value)
            value
          (or (stringp (car-safe value))
@@ -1334,6 +1329,24 @@ ses--default-printer, ses--numrows, or ses--numcols."
       (goto-char ses--params-marker)
       (forward-line def))))
 
+(defun ses-file-format-extend-parameter-list (new-file-format)
+  "Extend the global parameters list when file format is updated
+from 2 to 3. This happens when local printer function are added
+to a sheet that was created with SES version 2. This is not
+undoable. Return nil when there was no change, and non nil otherwise."
+  (save-excursion
+    (cond
+     ((and (= ses--file-format 2) (= 3 new-file-format))
+      (ses-set-parameter 'ses--file-format 3)
+      (message "Upgrading from SES-2 to SES-3 file format")
+      (ses-widen)
+      (goto-char ses--params-marker)
+      (forward-line   (plist-get ses-paramlines-plist 'ses--numlocprn ))
+      (insert (format (plist-get ses-paramfmt-plist 'ses--numlocprn)
+                      ses--numlocprn)
+             ?\n)
+      t) )))
+
 (defun ses-set-parameter (def value &optional elem)
   "Set parameter DEF to VALUE (with undo) and write the value to the data area.
 See `ses-goto-data' for meaning of DEF.  Newlines in the data are escaped.
@@ -1343,13 +1356,7 @@ If ELEM is specified, it is the array subscript within DEF to be set to VALUE."
     ;; in case one of them is being changed.
     (ses-goto-data def)
     (let ((inhibit-read-only t)
-         (fmt (plist-get '(ses--col-widths      "(ses-column-widths %S)"
-                           ses--col-printers    "(ses-column-printers %S)"
-                           ses--default-printer "(ses-default-printer %S)"
-                           ses--header-row      "(ses-header-row %S)"
-                           ses--file-format     " %S ;SES file-format"
-                           ses--numrows         " %S ;numrows"
-                           ses--numcols         " %S ;numcols")
+         (fmt (plist-get ses-paramfmt-plist
                          def))
          oldval)
       (if elem
@@ -1375,8 +1382,8 @@ Newlines in the data are escaped."
     (with-temp-message " "
       (save-excursion
        (while ses--deferred-write
-         (ses-time-check "Writing... (%d cells left)"
-                         '(length ses--deferred-write))
+         (ses--time-check "Writing... (%d cells left)"
+                           (length ses--deferred-write))
          (setq rowcol  (pop ses--deferred-write)
                row     (car rowcol)
                col     (cdr rowcol)
@@ -1388,24 +1395,17 @@ Newlines in the data are escaped."
              (setq formula (cadr formula)))
          (if (eq (car-safe printer) 'ses-safe-printer)
              (setq printer (cadr printer)))
-         ;; This is noticeably faster than (format "%S %S %S %S %S")
-         (setq text    (concat "(ses-cell "
-                               (symbol-name sym)
-                               " "
-                               (prin1-to-string (symbol-value sym))
-                               " "
-                               (prin1-to-string formula)
-                               " "
-                               (prin1-to-string printer)
-                               " "
-                               (if (atom (ses-cell-references cell))
-                                   "nil"
-                                 (concat "("
-                                         (mapconcat 'symbol-name
-                                                    (ses-cell-references cell)
-                                                    " ")
-                                         ")"))
-                               ")"))
+         (setq text (prin1-to-string
+                      ;; We could shorten it to (ses-cell SYM VAL) when
+                      ;; the other parameters are nil, but in practice most
+                      ;; cells have non-nil `references', so it's
+                      ;; rather pointless.
+                      `(ses-cell ,sym
+                                 ,(symbol-value sym)
+                                 ,(unless (equal formula (symbol-value sym))
+                                    formula)
+                                 ,printer
+                                 ,(ses-cell-references cell))))
          (ses-goto-data row col)
          (delete-region (point) (line-end-position))
          (insert text)))
@@ -1422,8 +1422,8 @@ refers to.  For recursive calls, RESULT-SO-FAR is the list being
 constructed, or t to get a wrong-type-argument error when the
 first reference is found."
   (if (ses-sym-rowcol formula)
-      ;;Entire formula is one symbol
-      (add-to-list 'result-so-far formula)
+      ;; Entire formula is one symbol.
+      (cl-pushnew formula result-so-far :test #'equal)
     (if (consp formula)
        (cond
         ((eq (car formula) 'ses-range)
@@ -1431,7 +1431,7 @@ first reference is found."
                   (cdr (funcall 'macroexpand
                                 (list 'ses-range (nth 1 formula)
                                       (nth 2 formula)))))
-           (add-to-list 'result-so-far cur)))
+           (cl-pushnew cur result-so-far :test #'equal)))
         ((null (eq (car formula) 'quote))
          ;;Recursive call for subformulas
          (dolist (cur formula)
@@ -1600,8 +1600,8 @@ to each symbol."
              ;; This cell referred to a cell that's been deleted or is no
              ;; longer part of the range.  We can't fix that now because
              ;; reference lists cells have been partially updated.
-             (add-to-list 'ses--deferred-recalc
-                          (ses-create-cell-symbol row col)))
+             (cl-pushnew (ses-create-cell-symbol row col)
+                          ses--deferred-recalc :test #'equal))
          (setq newval (ses-relocate-formula (ses-cell-references mycell)
                                             minrow mincol rowincr colincr))
          (ses-set-cell row col 'references newval)
@@ -1673,7 +1673,7 @@ to each symbol."
       (let (row col)
        (setq ses-start-time (float-time))
        (while reform
-         (ses-time-check "Fixing ses-ranges... (%d left)" '(length reform))
+         (ses--time-check "Fixing ses-ranges... (%d left)" (length reform))
          (setq row    (caar reform)
                col    (cdar reform)
                reform (cdr reform))
@@ -1691,36 +1691,30 @@ to each symbol."
     (insert-and-inherit "X")
     (delete-region (1- (point)) (point))))
 
-(defun ses-set-with-undo (sym newval)
-  "Like set, but undoable.  Result is t if value has changed."
-  ;; We try to avoid adding redundant entries to the undo list, but this is
-  ;; unavoidable for strings because equal ignores text properties and there's
-  ;; no easy way to get the whole property list to see if it's different!
-  (unless (and (boundp sym)
-              (equal (symbol-value sym) newval)
-              (not (stringp newval)))
-    (push (if (boundp sym)
-             `(apply ses-set-with-undo ,sym ,(symbol-value sym))
-           `(apply ses-unset-with-undo ,sym))
-         buffer-undo-list)
-    (set sym newval)
-    t))
-
-(defun ses-unset-with-undo (sym)
-  "Set SYM to be unbound.  This is undoable."
-  (when (1value (boundp sym)) ; Always bound, except after a programming error.
-    (push `(apply ses-set-with-undo ,sym ,(symbol-value sym)) buffer-undo-list)
-    (makunbound sym)))
+(defun ses-setter-with-undo (accessors newval &rest args)
+  "Set a field/variable and record it so it can be undone.
+Result is non-nil if field/variable has changed."
+  (let ((oldval (apply (car accessors) args)))
+    (unless (equal-including-properties oldval newval)
+      (push `(apply ses-setter-with-undo ,accessors ,oldval ,@args)
+            buffer-undo-list)
+      (apply (cdr accessors) newval args)
+      t)))
 
 (defun ses-aset-with-undo (array idx newval)
-  "Like `aset', but undoable.
-Result is t if element has changed."
-  (unless (equal (aref array idx) newval)
-    (push `(apply ses-aset-with-undo ,array ,idx
-                 ,(aref array idx)) buffer-undo-list)
-    (aset array idx newval)
-    t))
+  (ses-setter-with-undo (eval-when-compile
+                          (cons #'aref
+                                (lambda (newval array idx) (aset array idx newval))))
+                        newval array idx))
 
+(defun ses-set-with-undo (sym newval)
+  (ses-setter-with-undo
+   (eval-when-compile
+     (cons (lambda (sym) (if (boundp sym) (symbol-value sym) :ses--unbound))
+           (lambda (newval sym) (if (eq newval :ses--unbound)
+                               (makunbound sym)
+                             (set sym newval)))))
+   newval sym))
 
 ;;----------------------------------------------------------------------------
 ;; Startup for major mode
@@ -1735,29 +1729,38 @@ Does not execute cell formulas or print functions."
   (search-backward ";; Local Variables:\n" nil t)
   (backward-list 1)
   (setq ses--params-marker (point-marker))
-  (let ((params (ignore-errors (read (current-buffer)))))
-    (or (and (= (safe-length params) 3)
+  (let* ((params (ignore-errors (read (current-buffer))))
+        (params-len (safe-length params)))
+    (or (and (>=  params-len 3)
+            (<=  params-len 4)
             (numberp (car params))
             (numberp (cadr params))
             (>= (cadr params) 0)
             (numberp (nth 2 params))
-            (> (nth 2 params) 0))
+            (> (nth 2 params) 0)
+            (or (<= params-len 3)
+                (let ((numlocprn (nth 3 params)))
+                  (and (integerp numlocprn) (>= numlocprn 0)))))
        (error "Invalid SES file"))
     (setq ses--file-format (car params)
          ses--numrows     (cadr params)
-         ses--numcols     (nth 2 params))
+         ses--numcols     (nth 2 params)
+         ses--numlocprn (or (nth 3 params) 0))
     (when (= ses--file-format 1)
       (let (buffer-undo-list) ; This is not undoable.
        (ses-goto-data 'ses--header-row)
        (insert "(ses-header-row 0)\n")
-       (ses-set-parameter 'ses--file-format 2)
-       (message "Upgrading from SES-1 file format")))
-    (or (= ses--file-format 2)
+       (ses-set-parameter 'ses--file-format 3)
+       (message "Upgrading from SES-1 to SES-2 file format")))
+    (or (<= ses--file-format 3)
        (error "This file needs a newer version of the SES library code"))
     ;; Initialize cell array.
     (setq ses--cells (make-vector ses--numrows nil))
     (dotimes (row ses--numrows)
-      (aset ses--cells row (make-vector ses--numcols nil))))
+      (aset ses--cells row (make-vector ses--numcols nil)))
+    ;; initialize local printer map.
+    (clrhash ses--local-printer-hashmap))
+
   ;; Skip over print area, which we assume is correct.
   (goto-char (point-min))
   (forward-line ses--numrows)
@@ -1767,8 +1770,23 @@ Does not execute cell formulas or print functions."
   (setq ses--data-marker (point-marker))
   (forward-char (1- (length ses-print-data-boundary)))
   ;; Initialize printer and symbol lists.
-  (mapc 'ses-printer-record ses-standard-printer-functions)
-  (setq ses--symbolic-formulas nil)
+  (mapc #'ses-printer-record ses-standard-printer-functions)
+  (setq ses--symbolic-formulas                   nil)
+
+  ;; Load local printer definitions.
+  ;; This must be loaded *BEFORE* cells and column printers because the latter
+  ;; may call them.
+  (save-excursion
+    (forward-line (* ses--numrows (1+ ses--numcols)))
+    (let ((numlocprn ses--numlocprn))
+      (setq ses--numlocprn 0)
+      (dotimes (_ numlocprn)
+       (let ((x      (read (current-buffer))))
+         (or (and (looking-at-p "\n")
+                  (eq (car-safe x) 'ses-local-printer)
+                  (apply #'ses--local-printer (cdr x)))
+             (error "local printer-def error"))
+         (setq ses--numlocprn (1+ ses--numlocprn))))))
   ;; Load cell definitions.
   (dotimes (row ses--numrows)
     (dotimes (col ses--numcols)
@@ -1778,9 +1796,11 @@ Does not execute cell formulas or print functions."
                 (eq (car-safe x) 'ses-cell)
                 (ses-create-cell-variable sym row col))
            (error "Cell-def error"))
-       (eval x)))
+       (apply #'ses--cell (cdr x))))
     (or (looking-at-p "\n\n")
        (error "Missing blank line between rows")))
+  ;; Skip local printer function declaration --- that were already loaded.
+  (forward-line (+ 2 ses--numlocprn))
   ;; Load global parameters.
   (let ((widths      (read (current-buffer)))
        (n1          (char-after (point)))
@@ -1799,14 +1819,13 @@ Does not execute cell formulas or print functions."
             (eq (car-safe head-row) 'ses-header-row)
             (= n4 ?\n))
        (error "Invalid SES global parameters"))
-    (1value (eval widths))
-    (1value (eval def-printer))
-    (1value (eval printers))
-    (1value (eval head-row)))
+    (1value (eval widths t))
+    (1value (eval def-printer t))
+    (1value (eval printers t))
+    (1value (eval head-row t)))
   ;; Should be back at global-params.
   (forward-char 1)
-  (or (looking-at-p (replace-regexp-in-string "1" "[0-9]+"
-                                             ses-initial-global-parameters))
+  (or (looking-at-p ses-initial-global-parameters-re)
       (error "Problem with column-defs or global-params"))
   ;; Check for overall newline count in definitions area.
   (forward-line 3)
@@ -1822,45 +1841,42 @@ Narrows the buffer to show only the print area.  Gives it `read-only' and
 `intangible' properties.  Sets up highlighting for current cell."
   (interactive)
   (let ((end (point-min))
-       (inhibit-read-only t)
        (inhibit-point-motion-hooks t)
-       (was-modified (buffer-modified-p))
        pos sym)
-    (ses-goto-data 0 0) ; Include marker between print-area and data-area.
-    (set-text-properties (point) (point-max) nil) ; Delete garbage props.
-    (mapc 'delete-overlay (overlays-in (point-min) (point-max)))
-    ;; The print area is read-only (except for our special commands) and uses a
-    ;; special keymap.
-    (put-text-property (point-min) (1- (point)) 'read-only 'ses)
-    (put-text-property (point-min) (1- (point)) 'keymap 'ses-mode-print-map)
-    ;; For the beginning of the buffer, we want the read-only and keymap
-    ;; attributes to be  inherited from the first character.
-    (put-text-property (point-min) (1+ (point-min)) 'front-sticky t)
-    ;; Create intangible properties, which also indicate which cell the text
-    ;; came from.
-    (dotimes-with-progress-reporter (row ses--numrows) "Finding cells..."
-      (dotimes (col ses--numcols)
-       (setq pos  end
-             sym  (ses-cell-symbol row col))
-       ;; Include skipped cells following this one.
-       (while (and (< col (1- ses--numcols))
-                   (eq (ses-cell-value row (1+ col)) '*skip*))
-         (setq end (+ end (ses-col-width col) 1)
-               col (1+ col)))
-       (setq end (save-excursion
-                   (goto-char pos)
-                   (move-to-column (+ (current-column) (- end pos)
-                                      (ses-col-width col)))
-                   (if (eolp)
-                       (+ end (ses-col-width col) 1)
-                     (forward-char)
-                     (point))))
-       (put-text-property pos end 'intangible sym)))
-    ;; Adding these properties did not actually alter the text.
-    (unless was-modified
-      (restore-buffer-modified-p nil)
-      (buffer-disable-undo)
-      (buffer-enable-undo)))
+    (with-silent-modifications
+      (ses-goto-data 0 0)    ; Include marker between print-area and data-area.
+      (set-text-properties (point) (point-max) nil) ; Delete garbage props.
+      (mapc #'delete-overlay (overlays-in (point-min) (point-max)))
+      ;; The print area is read-only (except for our special commands) and
+      ;; uses a special keymap.
+      (put-text-property (point-min) (1- (point)) 'read-only 'ses)
+      (put-text-property (point-min) (1- (point)) 'keymap 'ses-mode-print-map)
+      ;; For the beginning of the buffer, we want the read-only and keymap
+      ;; attributes to be  inherited from the first character.
+      (put-text-property (point-min) (1+ (point-min)) 'front-sticky t)
+      ;; Create intangible properties, which also indicate which cell the text
+      ;; came from.
+      (dotimes-with-progress-reporter (row ses--numrows) "Finding cells..."
+        (dotimes (col ses--numcols)
+          (setq pos  end
+                sym  (ses-cell-symbol row col))
+          (unless (eq (symbol-value sym) '*skip*)
+            ;; Include skipped cells following this one.
+            (while (and (< col (1- ses--numcols))
+                        (eq (ses-cell-value row (1+ col)) '*skip*))
+              (setq end (+ end (ses-col-width col) 1)
+                    ;; Beware: Modifying the iteration variable of `dotimes'
+                    ;; may or may not affect the iteration!
+                    col (1+ col)))
+            (setq end (save-excursion
+                        (goto-char pos)
+                        (move-to-column (+ (current-column) (- end pos)
+                                           (ses-col-width col)))
+                        (if (eolp)
+                            (+ end (ses-col-width col) 1)
+                          (forward-char)
+                          (point))))
+            (put-text-property pos end 'intangible sym))))))
   ;; Create the underlining overlay.  It's impossible for (point) to be 2,
   ;; because column A must be at least 1 column wide.
   (setq ses--curcell-overlay (make-overlay (1+ (point-min)) (1+ (point-min))))
@@ -1880,7 +1896,7 @@ Delete overlays, remove special text properties."
     ;; Delete read-only, keymap, and intangible properties.
     (set-text-properties (point-min) (point-max) nil)
     ;; Delete overlay.
-    (mapc 'delete-overlay (overlays-in (point-min) (point-max)))
+    (mapc #'delete-overlay (overlays-in (point-min) (point-max)))
     (unless was-modified
       (restore-buffer-modified-p nil))))
 
@@ -1938,7 +1954,8 @@ formula:
          ;; calculation).
          indent-tabs-mode       nil)
     (1value (add-hook 'change-major-mode-hook 'ses-cleanup nil t))
-    (1value (add-hook 'before-revert-hook 'ses-cleanup nil t))
+    ;; This makes revert impossible if the buffer is read-only.
+    ;; (1value (add-hook 'before-revert-hook 'ses-cleanup nil t))
     (setq header-line-format   '(:eval (progn
                                         (when (/= (window-hscroll)
                                                   ses--header-hscroll)
@@ -2085,7 +2102,7 @@ Based on the current set of columns and `window-hscroll' position."
        (push (propertize (format "  [row %d]" ses--header-row)
                          'display '((height (- 1))))
              result))
-    (setq ses--header-string (apply 'concat (nreverse result)))))
+    (setq ses--header-string (apply #'concat (nreverse result)))))
 
 
 ;;----------------------------------------------------------------------------
@@ -2122,7 +2139,7 @@ print area if NONARROW is nil."
     (delete-region (point-min) (point))
     ;; Insert all blank lines before printing anything, so ses-print-cell can
     ;; find the data area when inserting or deleting *skip* values for cells.
-    (dotimes (row ses--numrows)
+    (dotimes (_ ses--numrows)
       (insert-and-inherit ses--blank-line))
     (dotimes-with-progress-reporter (row ses--numrows) "Reprinting..."
       (if (eq (ses-cell-value row 0) '*skip*)
@@ -2137,6 +2154,14 @@ print area if NONARROW is nil."
   (setq ses--Dijkstra-attempt-nb (1+ ses--Dijkstra-attempt-nb)
        ses--Dijkstra-weight-bound (* ses--numrows ses--numcols)))
 
+;; These functions use the variables 'row' and 'col' that are dynamically bound
+;; by ses-print-cell.  We define these variables at compile-time to make the
+;; compiler happy.
+;; (defvar row)
+;; (defvar col)
+;; (defvar maxrow)
+;; (defvar maxcol)
+
 (defun ses-recalculate-cell ()
   "Recalculate and reprint the current cell or range.
 
@@ -2154,29 +2179,30 @@ to are recalculated first."
        (when
          (setq cur-rowcol (ses-sym-rowcol ses--curcell)
                sig (progn
-                     (ses-cell-property-set :ses-Dijkstra-attempt
-                                            (cons ses--Dijkstra-attempt-nb 0)
-                                            (car cur-rowcol) (cdr cur-rowcol) )
+                     (setf (ses-cell-property :ses-Dijkstra-attempt
+                                               (car cur-rowcol)
+                                               (cdr cur-rowcol))
+                            (cons ses--Dijkstra-attempt-nb 0))
                      (ses-calculate-cell (car cur-rowcol) (cdr cur-rowcol) t)))
          (nconc sig (list (ses-cell-symbol (car cur-rowcol)
                                            (cdr cur-rowcol)))))
       ;; First, recalculate all cells that don't refer to other cells and
       ;; produce a list of cells with references.
       (ses-dorange ses--curcell
-       (ses-time-check "Recalculating... %s" '(ses-cell-symbol row col))
+       (ses--time-check "Recalculating... %s" (ses-cell-symbol row col))
        (condition-case nil
            (progn
              ;; The t causes an error if the cell has references.  If no
              ;; references, the t will be the result value.
              (1value (ses-formula-references (ses-cell-formula row col) t))
-             (ses-cell-property-set :ses-Dijkstra-attempt
-                                    (cons ses--Dijkstra-attempt-nb 0)
-                                    row col)
+             (setf (ses-cell-property :ses-Dijkstra-attempt row col)
+                    (cons ses--Dijkstra-attempt-nb 0))
              (when (setq sig (ses-calculate-cell row col t))
                (nconc sig (list (ses-cell-symbol row col)))))
          (wrong-type-argument
           ;; The formula contains a reference.
-          (add-to-list 'ses--deferred-recalc (ses-cell-symbol row col))))))
+          (cl-pushnew (ses-cell-symbol row col) ses--deferred-recalc
+                       :test #'equal)))))
     ;; Do the update now, so we can force recalculation.
     (let ((x ses--deferred-recalc))
       (setq ses--deferred-recalc nil)
@@ -2211,8 +2237,10 @@ to are recalculated first."
               (eq (ses-cell-value row (1+ col)) '*skip*))
       ;; This cell has spill-over.  We'll momentarily pretend the following cell
       ;; has a `t' in it.
-      (eval `(let ((,(ses-cell-symbol row (1+ col)) t))
-              (ses-print-cell row col)))
+      (cl-progv
+         (list (ses-cell-symbol row (1+ col)))
+         '(t)
+              (ses-print-cell row col))
       ;; Now remove the *skip*.  ses-print-cell is always nil here.
       (ses-set-cell row (1+ col) 'value nil)
       (1value (ses-print-cell row (1+ col))))))
@@ -2251,7 +2279,7 @@ to are recalculated first."
       (insert ses-initial-file-trailer)
       (goto-char (point-min)))
     ;; Create a blank display area.
-    (dotimes (row ses--numrows)
+    (dotimes (_ ses--numrows)
       (insert ses--blank-line))
     (insert ses-print-data-boundary)
     (backward-char (1- (length ses-print-data-boundary)))
@@ -2321,16 +2349,23 @@ cell formula was unsafe and user declined confirmation."
      (barf-if-buffer-read-only)
      (list (car rowcol)
           (cdr rowcol)
-           (read-from-minibuffer
-            (format "Cell %s: " ses--curcell)
-            (cons (if (equal initial "\"") "\"\""
-                    (if (equal initial "(") "()" initial)) 2)
-            ses-mode-edit-map
-            t                         ; Convert to Lisp object.
-            'ses-read-cell-history
-            (prin1-to-string (if (eq (car-safe curval) 'ses-safe-formula)
-                                (cadr curval)
-                              curval))))))
+           (if (equal initial "\"")
+               (progn
+                 (if (not (stringp curval)) (setq curval nil))
+                 (read-string (if curval
+                                  (format "String Cell %s (default %s): "
+                                          ses--curcell curval)
+                                (format "String Cell %s: " ses--curcell))
+                              nil 'ses-read-string-history curval))
+             (read-from-minibuffer
+              (format "Cell %s: " ses--curcell)
+              (cons (if (equal initial "(") "()" initial) 2)
+              ses-mode-edit-map
+              t                         ; Convert to Lisp object.
+              'ses-read-cell-history
+              (prin1-to-string (if (eq (car-safe curval) 'ses-safe-formula)
+                                   (cadr curval)
+                                 curval)))))))
   (when (ses-edit-cell row col newval)
     (ses-command-hook) ; Update cell widths before movement.
     (dolist (x ses-after-entry-functions)
@@ -2363,7 +2398,7 @@ With prefix, deletes several cells."
       (1value (ses-clear-cell-backward (- count)))
     (ses-check-curcell)
     (ses-begin-change)
-    (dotimes (x count)
+    (dotimes (_ count)
       (ses-set-curcell)
       (let ((rowcol (ses-sym-rowcol ses--curcell)))
        (or rowcol (signal 'end-of-buffer nil))
@@ -2378,7 +2413,7 @@ cells."
       (1value (ses-clear-cell-forward (- count)))
     (ses-check-curcell 'end)
     (ses-begin-change)
-    (dotimes (x count)
+    (dotimes (_ count)
       (backward-char 1) ; Will signal 'beginning-of-buffer if appropriate.
       (ses-set-curcell)
       (let ((rowcol (ses-sym-rowcol ses--curcell)))
@@ -2390,12 +2425,14 @@ cells."
 ;;----------------------------------------------------------------------------
 
 (defun ses-read-printer (prompt default)
-  "Common code for `ses-read-cell-printer', `ses-read-column-printer', and `ses-read-default-printer'.
-PROMPT should end with \": \".  Result is t if operation was canceled."
+  "Common code for functions `ses-read-cell-printer', `ses-read-column-printer',
+`ses-read-default-printer' and `ses-define-local-printer'.
+PROMPT should end with \": \".  Result is t if operation was
+canceled."
   (barf-if-buffer-read-only)
   (if (eq default t)
       (setq default "")
-    (setq prompt (format "%s [currently %S]: "
+    (setq prompt (format "%s (default %S): "
                         (substring prompt 0 -2)
                         default)))
   (let ((new (read-from-minibuffer prompt
@@ -2411,6 +2448,7 @@ PROMPT should end with \": \".  Result is t if operation was canceled."
       (or (not new)
          (stringp new)
          (stringp (car-safe new))
+         (and (symbolp new) (gethash new ses--local-printer-hashmap))
          (ses-warn-unsafe new 'unsafep-function)
          (setq new t)))
     new))
@@ -2425,21 +2463,20 @@ one argument, or a symbol that names a function of one argument.  In the
 latter two cases, the function's result should be either a string (will be
 right-justified) or a list of one string (will be left-justified)."
   (interactive
-   (let ((default t)
-        x)
+   (let ((default t))
      (ses-check-curcell 'range)
      ;;Default is none if not all cells in range have same printer
      (catch 'ses-read-cell-printer
        (ses-dorange ses--curcell
-        (setq x (ses-cell-printer row col))
-        (if (eq (car-safe x) 'ses-safe-printer)
-            (setq x (cadr x)))
-        (if (eq default t)
-            (setq default x)
-          (unless (equal default x)
-            ;;Range contains differing printer functions
-            (setq default t)
-            (throw 'ses-read-cell-printer t)))))
+        (let ((x (ses-cell-printer row col)))
+           (if (eq (car-safe x) 'ses-safe-printer)
+               (setq x (cadr x)))
+           (if (eq default t)
+               (setq default x)
+             (unless (equal default x)
+               ;;Range contains differing printer functions
+               (setq default t)
+               (throw 'ses-read-cell-printer t))))))
      (list (ses-read-printer (format "Cell %S printer: " ses--curcell)
                             default))))
   (unless (eq newval t)
@@ -2718,7 +2755,7 @@ inserts a new row if at bottom of print area.  Repeat COUNT times."
      (list col
           (if current-prefix-arg
               (prefix-numeric-value current-prefix-arg)
-            (read-from-minibuffer (format "Column %s width [currently %d]: "
+            (read-from-minibuffer (format "Column %s width (default %d): "
                                           (ses-column-letter col)
                                           (ses-col-width col))
                                   nil  ; No initial contents.
@@ -2773,7 +2810,7 @@ SES attributes recording the contents of the cell as of the time of copying."
     ;;Avoid overflow situation
     (setq end (1- ses--data-marker)))
   (let* ((inhibit-point-motion-hooks t)
-        (x (mapconcat 'ses-copy-region-helper
+        (x (mapconcat #'ses-copy-region-helper
                       (extract-rectangle beg (1- end)) "\n")))
     (remove-text-properties 0 (length x)
                            '(read-only t
@@ -2957,9 +2994,9 @@ cons of ROW and COL).  Treat plain symbols as strings unless ARG is a list."
       ;; Invalid sexp --- leave it as a string.
       (setq val (substring text from to)))
      ((and (car val) (symbolp (car val)))
-      (if (consp arg)
-         (setq val (list 'quote (car val)))  ; Keep symbol.
-       (setq val (substring text from to)))) ; Treat symbol as text.
+      (setq val (if (consp arg)
+                   (list 'quote (car val))   ; Keep symbol.
+                 (substring text from to)))) ; Treat symbol as text.
      (t
       (setq val (car val))))
     (let ((row (car rowcol))
@@ -3078,7 +3115,7 @@ is non-nil.  Newlines and tabs in the export text are escaped."
        (push "\t" result))
        ((< row maxrow)
        (push "\n" result))))
-    (setq result (apply 'concat (nreverse result)))
+    (setq result (apply #'concat (nreverse result)))
     (kill-new result)))
 
 
@@ -3305,29 +3342,31 @@ highlighted range in the spreadsheet."
        (if (equal new-rowcol rowcol)
          (put new-name 'ses-cell rowcol)
          (error "Not a valid name for this cell location"))
-      (setq ses--named-cell-hashmap (or ses--named-cell-hashmap (make-hash-table :test 'eq)))
+      (setq ses--named-cell-hashmap
+            (or ses--named-cell-hashmap (make-hash-table :test 'eq)))
       (put new-name 'ses-cell :ses-named)
       (puthash new-name rowcol ses--named-cell-hashmap))
     (push `(ses-rename-cell ,old-name ,cell) buffer-undo-list)
-    ;; replace name by new name in formula of cells refering to renamed cell
+    ;; Replace name by new name in formula of cells refering to renamed cell.
     (dolist (ref (ses-cell-references cell))
       (let* ((x (ses-sym-rowcol ref))
             (xcell  (ses-get-cell (car x) (cdr x))))
-       (ses-cell-formula-aset xcell
-                              (ses-replace-name-in-formula
-                               (ses-cell-formula xcell)
-                               sym
-                               new-name))))
-    ;; replace name by new name in reference list of cells to which renamed cell refers to
+       (setf (ses-cell-formula xcell)
+              (ses-replace-name-in-formula
+               (ses-cell-formula xcell)
+               sym
+               new-name))))
+    ;; Replace name by new name in reference list of cells to which renamed
+    ;; cell refers to.
     (dolist (ref (ses-formula-references (ses-cell-formula cell)))
       (let* ((x (ses-sym-rowcol ref))
             (xcell (ses-get-cell (car x) (cdr x))))
-       (ses-cell-references-aset xcell
-                                 (cons new-name (delq sym
-                                                      (ses-cell-references xcell))))))
+       (setf (ses-cell-references xcell)
+              (cons new-name (delq sym
+                                   (ses-cell-references xcell))))))
     (push new-name ses--renamed-cell-symb-list)
     (set new-name (symbol-value sym))
-    (aset cell 0 new-name)
+    (setf (ses-cell--symbol cell) new-name)
     (makunbound sym)
     (and curcell (setq ses--curcell new-name))
     (let* ((pos (point))
@@ -3344,6 +3383,75 @@ highlighted range in the spreadsheet."
                                  (symbol-name new-name)))
     (force-mode-line-update)))
 
+(defun ses-refresh-local-printer (name _compiled-value) ;FIXME: unused arg?
+  "Refresh printout for all cells which use printer NAME.
+NAME should be the name of a locally defined printer.
+Uses the value COMPILED-VALUE for this printer."
+  (message "Refreshing cells using printer %S" name)
+  (let (new-print)
+    (dotimes (row ses--numrows)
+      (dotimes (col ses--numcols)
+       (let ((cell-printer (ses-cell-printer row col)))
+         (when (eq cell-printer name)
+           (unless new-print
+             (setq new-print t)
+             (ses-begin-change))
+           (ses-print-cell row col)))))))
+
+(defun ses-define-local-printer (name)
+  "Define a local printer with name NAME."
+  (interactive "*SEnter printer name: ")
+  (let* ((cur-printer (gethash name ses--local-printer-hashmap))
+        (default (and (vectorp cur-printer) (ses--locprn-def cur-printer)))
+        create-printer
+        (new-def
+          (ses-read-printer (format "Enter definition of printer %S: " name)
+                            default)))
+    (cond
+     ;; cancelled operation => do nothing
+     ((eq new-def t))
+     ;; no change => do nothing
+     ((and (vectorp cur-printer) (equal new-def default)))
+     ;; re-defined printer
+     ((vectorp cur-printer)
+      (setq create-printer 0)
+      (setf (ses--locprn-def cur-printer) new-def)
+      (ses-refresh-local-printer
+       name
+       (setf (ses--locprn-compiled cur-printer)
+             (ses-local-printer-compile new-def))))
+     ;; new definition
+     (t
+      (setq create-printer 1)
+      (puthash name
+              (setq cur-printer
+                    (ses-make-local-printer-info new-def))
+              ses--local-printer-hashmap)))
+    (when create-printer
+      (let ((printer-def-text
+             (concat
+              "(ses-local-printer "
+              (symbol-name name)
+              " "
+              (prin1-to-string (ses--locprn-def cur-printer))
+              ")")))
+        (save-excursion
+          (ses-goto-data ses--numrows
+                         (ses--locprn-number cur-printer))
+          (let ((inhibit-read-only t))
+            ;; Special undo since it's outside the narrowed buffer.
+            (let (buffer-undo-list)
+              (if (= create-printer 0)
+                  (delete-region (point) (line-end-position))
+                (insert ?\n)
+                (backward-char))
+              (insert printer-def-text)
+              (when (= create-printer 1)
+                (ses-file-format-extend-parameter-list 3)
+                (ses-set-parameter 'ses--numlocprn
+                                   (+ ses--numlocprn create-printer))))))))))
+
+
 ;;----------------------------------------------------------------------------
 ;; Checking formulas for safety
 ;;----------------------------------------------------------------------------
@@ -3353,6 +3461,7 @@ highlighted range in the spreadsheet."
   (if (or (stringp printer)
          (stringp (car-safe printer))
          (not printer)
+         (and (symbolp printer) (gethash printer ses--local-printer-hashmap))
          (ses-warn-unsafe printer 'unsafep-function))
       printer
     'ses-unsafe))
@@ -3479,7 +3588,7 @@ Use `math-format-value' as a printer for Calc objects."
        (setcdr (last result 2) nil)
       (setq result (cdr (nreverse result))))
     (unless reorient-x
-      (setq result (mapcar 'nreverse result)))
+      (setq result (mapcar #'nreverse result)))
     (when transpose
       (let ((ret (mapcar (lambda (x) (list x)) (pop result))) iter)
        (while result
@@ -3491,7 +3600,7 @@ Use `math-format-value' as a printer for Calc objects."
 
     (cl-flet ((vectorize-*1
                (clean result)
-               (cons clean (cons (quote 'vec) (apply 'append result))))
+               (cons clean (cons (quote 'vec) (apply #'append result))))
               (vectorize-*2
                (clean result)
                (cons clean (cons (quote 'vec)
@@ -3499,7 +3608,7 @@ Use `math-format-value' as a printer for Calc objects."
                                            (cons  clean (cons (quote 'vec) x)))
                                          result)))))
       (pcase vectorize
-       (`nil (cons clean (apply 'append result)))
+       (`nil (cons clean (apply #'append result)))
        (`*1 (vectorize-*1 clean result))
        (`*2 (vectorize-*2 clean result))
        (`* (funcall (if (cdr result)
@@ -3517,13 +3626,13 @@ Use `math-format-value' as a printer for Calc objects."
 
 (defun ses+ (&rest args)
   "Compute the sum of the arguments, ignoring blanks."
-  (apply '+ (apply 'ses-delete-blanks args)))
+  (apply #'+ (apply #'ses-delete-blanks args)))
 
 (defun ses-average (list)
   "Computes the sum of the numbers in LIST, divided by their length.  Blanks
 are ignored.  Result is always floating-point, even if all args are integers."
-  (setq list (apply 'ses-delete-blanks list))
-  (/ (float (apply '+ list)) (length list)))
+  (setq list (apply #'ses-delete-blanks list))
+  (/ (float (apply #'+ list)) (length list)))
 
 (defmacro ses-select (fromrange test torange)
   "Select cells in FROMRANGE that are `equal' to TEST.
@@ -3532,7 +3641,7 @@ The ranges are macroexpanded but not evaluated so they should be
 either (ses-range BEG END) or (list ...).  The TEST is evaluated."
   (setq fromrange (cdr (macroexpand fromrange))
        torange   (cdr (macroexpand torange))
-       test      (eval test))
+       test      (eval test t))
   (or (= (length fromrange) (length torange))
       (error "ses-select: Ranges not same length"))
   (let (result)
@@ -3552,25 +3661,19 @@ either (ses-range BEG END) or (list ...).  The TEST is evaluated."
 ;; Standard print functions
 ;;----------------------------------------------------------------------------
 
-;; These functions use the variables 'row' and 'col' that are dynamically bound
-;; by ses-print-cell.  We define these variables at compile-time to make the
-;; compiler happy.
-(defvar row)
-(defvar col)
-
 (defun ses-center (value &optional span fill)
   "Print VALUE, centered within column.
 FILL is the fill character for centering (default = space).
 SPAN indicates how many additional rightward columns to include
 in width (default = 0)."
-  (let ((printer (or (ses-col-printer col) ses--default-printer))
-       (width   (ses-col-width col))
+  (let ((printer (or (ses-col-printer ses--col) ses--default-printer))
+       (width   (ses-col-width ses--col))
        half)
     (or fill (setq fill ?\s))
     (or span (setq span 0))
     (setq value (ses-call-printer printer value))
     (dotimes (x span)
-      (setq width (+ width 1 (ses-col-width (+ col span (- x))))))
+      (setq width (+ width 1 (ses-col-width (+ ses--col span (- x))))))
     ;; Set column width.
     (setq width (- width (string-width value)))
     (if (<= width 0)
@@ -3583,11 +3686,11 @@ in width (default = 0)."
   "Print VALUE, centered within the span that starts in the current column
 and continues until the next nonblank column.
 FILL specifies the fill character (default = space)."
-  (let ((end (1+ col)))
+  (let ((end (1+ ses--col)))
     (while (and (< end ses--numcols)
-               (memq (ses-cell-value row end) '(nil *skip*)))
+               (memq (ses-cell-value ses--row end) '(nil *skip*)))
       (setq end (1+ end)))
-    (ses-center value (- end col 1) fill)))
+    (ses-center value (- end ses--col 1) fill)))
 
 (defun ses-dashfill (value &optional span)
   "Print VALUE centered using dashes.
index 9dc9a013f8b23a77dfe7c75ad434911a449bfc91..506f944094bd86a41b4e3fd49acdfb2809e54eb0 100644 (file)
@@ -1,7 +1,6 @@
 ;;; shell.el --- specialized comint.el for running the shell -*- lexical-binding: t -*-
 
-;; Copyright (C) 1988, 1993-1997, 2000-2014 Free Software Foundation,
-;; Inc.
+;; Copyright (C) 1988, 1993-1997, 2000-2014 Free Software Foundation, Inc.
 
 ;; Author: Olin Shivers <shivers@cs.cmu.edu>
 ;;     Simon Marshall <simon@gnu.org>
@@ -584,6 +583,8 @@ buffer."
       (setq shell-dirstack-query
            (cond ((string-equal shell "sh") "pwd")
                  ((string-equal shell "ksh") "echo $PWD ~-")
+                 ;; Bypass any aliases.  TODO all shells could use this.
+                 ((string-equal shell "bash") "command dirs")
                  (t "dirs")))
       ;; Bypass a bug in certain versions of bash.
       (when (string-equal shell "bash")
index 7b505d116450247fedf420f7cdd99ec563c76969..9ce33030865efe19eddef54bb1a0dadb59e0e006 100644 (file)
@@ -813,15 +813,15 @@ If BACKWARD-ONLY is non-nil, only delete them before point."
 If N is negative, delete newlines as well, leaving -N spaces.
 See also `cycle-spacing'."
   (interactive "*p")
-  (cycle-spacing n nil t))
+  (cycle-spacing n nil 'single-shot))
 
 (defvar cycle-spacing--context nil
   "Store context used in consecutive calls to `cycle-spacing' command.
-The first time this function is run, it saves the original point
-position and original spacing around the point in this
-variable.")
+The first time `cycle-spacing' runs, it saves in this variable:
+its N argument, the original point position, and the original spacing
+around point.")
 
-(defun cycle-spacing (&optional n preserve-nl-back single-shot)
+(defun cycle-spacing (&optional n preserve-nl-back mode)
   "Manipulate whitespace around point in a smart way.
 In interactive use, this function behaves differently in successive
 consecutive calls.
@@ -832,25 +832,31 @@ It deletes all spaces and tabs around point, leaving one space
 it deletes newlines as well, leaving -N spaces.
 \(If PRESERVE-NL-BACK is non-nil, it does not delete newlines before point.)
 
-The second call in a sequence (or the first call if the above does
-not result in any changes) deletes all spaces.
+The second call in a sequence deletes all spaces.
 
 The third call in a sequence restores the original whitespace (and point).
 
-If SINGLE-SHOT is non-nil, it only performs the first step in the sequence."
+If MODE is `single-shot', it only performs the first step in the sequence.
+If MODE is `fast' and the first step would not result in any change
+\(i.e., there are exactly (abs N) spaces around point),
+the function goes straight to the second step.
+
+Repeatedly calling the function with different values of N starts a
+new sequence each time."
   (interactive "*p")
   (let ((orig-pos       (point))
        (skip-characters (if (and n (< n 0)) " \t\n\r" " \t"))
-       (n               (abs (or n 1))))
+       (num             (abs (or n 1))))
     (skip-chars-backward (if preserve-nl-back " \t" skip-characters))
     (constrain-to-field nil orig-pos)
     (cond
-     ;; Command run for the first time or single-shot is non-nil.
-     ((or single-shot
+     ;; Command run for the first time, single-shot mode or different argument
+     ((or (eq 'single-shot mode)
          (not (equal last-command this-command))
-         (not cycle-spacing--context))
+         (not cycle-spacing--context)
+         (not (eq (car cycle-spacing--context) n)))
       (let* ((start (point))
-            (n     (- n (skip-chars-forward " " (+ n (point)))))
+            (num   (- num (skip-chars-forward " " (+ num (point)))))
             (mid   (point))
             (end   (progn
                      (skip-chars-forward skip-characters)
@@ -858,12 +864,12 @@ If SINGLE-SHOT is non-nil, it only performs the first step in the sequence."
        (setq cycle-spacing--context  ;; Save for later.
              ;; Special handling for case where there was no space at all.
              (unless (= start end)
-               (cons orig-pos (buffer-substring start (point)))))
+                (cons n (cons orig-pos (buffer-substring start (point))))))
        ;; If this run causes no change in buffer content, delete all spaces,
        ;; otherwise delete all excess spaces.
-       (delete-region (if (and (not single-shot) (zerop n) (= mid end))
+       (delete-region (if (and (eq mode 'fast) (zerop num) (= mid end))
                           start mid) end)
-        (insert (make-string n ?\s))))
+        (insert (make-string num ?\s))))
 
      ;; Command run for the second time.
      ((not (equal orig-pos (point)))
@@ -871,8 +877,8 @@ If SINGLE-SHOT is non-nil, it only performs the first step in the sequence."
 
      ;; Command run for the third time.
      (t
-      (insert (cdr cycle-spacing--context))
-      (goto-char (car cycle-spacing--context))
+      (insert (cddr cycle-spacing--context))
+      (goto-char (cadr cycle-spacing--context))
       (setq cycle-spacing--context nil)))))
 \f
 (defun beginning-of-buffer (&optional arg)
@@ -882,10 +888,8 @@ If the buffer is narrowed, this command uses the beginning of the
 accessible part of the buffer.
 
 If Transient Mark mode is disabled, leave mark at previous
-position, unless a \\[universal-argument] prefix is supplied.
-
-Don't use this command in Lisp programs!
-\(goto-char (point-min)) is faster."
+position, unless a \\[universal-argument] prefix is supplied."
+  (declare (interactive-only "use `(goto-char (point-min))' instead."))
   (interactive "^P")
   (or (consp arg)
       (region-active-p)
@@ -900,8 +904,6 @@ Don't use this command in Lisp programs!
                        (/ (+ 10 (* size (prefix-numeric-value arg))) 10)))
                 (point-min))))
   (if (and arg (not (consp arg))) (forward-line 1)))
-(put 'beginning-of-buffer 'interactive-only
-     "use `(goto-char (point-min))' instead.")
 
 (defun end-of-buffer (&optional arg)
   "Move point to the end of the buffer.
@@ -910,10 +912,8 @@ If the buffer is narrowed, this command uses the end of the
 accessible part of the buffer.
 
 If Transient Mark mode is disabled, leave mark at previous
-position, unless a \\[universal-argument] prefix is supplied.
-
-Don't use this command in Lisp programs!
-\(goto-char (point-max)) is faster."
+position, unless a \\[universal-argument] prefix is supplied."
+  (declare (interactive-only "use `(goto-char (point-max))' instead."))
   (interactive "^P")
   (or (consp arg) (region-active-p) (push-mark))
   (let ((size (- (point-max) (point-min))))
@@ -934,7 +934,6 @@ Don't use this command in Lisp programs!
         ;; then scroll specially to put it near, but not at, the bottom.
         (overlay-recenter (point))
         (recenter -3))))
-(put 'end-of-buffer 'interactive-only "use `(goto-char (point-max))' instead.")
 
 (defcustom delete-active-region t
   "Whether single-char deletion commands delete an active region.
@@ -975,6 +974,7 @@ arg, and KILLFLAG is set if N is explicitly specified.
 In Overwrite mode, single character backward deletion may replace
 tabs with spaces so as to back over columns, unless point is at
 the end of the line."
+  (declare (interactive-only delete-char))
   (interactive "p\nP")
   (unless (integerp n)
     (signal 'wrong-type-argument (list 'integerp n)))
@@ -997,7 +997,6 @@ the end of the line."
             (insert-char ?\s (- ocol (current-column)) nil))))
        ;; Otherwise, do simple deletion.
        (t (delete-char (- n) killflag))))
-(put 'delete-backward-char 'interactive-only 'delete-char)
 
 (defun delete-forward-char (n &optional killflag)
   "Delete the following N characters (previous if N is negative).
@@ -1008,6 +1007,7 @@ To disable this, set variable `delete-active-region' to nil.
 Optional second arg KILLFLAG non-nil means to kill (save in kill
 ring) instead of delete.  Interactively, N is the prefix arg, and
 KILLFLAG is set if N was explicitly specified."
+  (declare (interactive-only delete-char))
   (interactive "p\nP")
   (unless (integerp n)
     (signal 'wrong-type-argument (list 'integerp n)))
@@ -1021,7 +1021,6 @@ KILLFLAG is set if N was explicitly specified."
 
        ;; Otherwise, do simple deletion.
        (t (delete-char n killflag))))
-(put 'delete-forward-char 'interactive-only 'delete-char)
 
 (defun mark-whole-buffer ()
   "Put point at beginning and mark at end of buffer.
@@ -1029,6 +1028,7 @@ If narrowing is in effect, only uses the accessible part of the buffer.
 You probably should not use this function in Lisp programs;
 it is usually a mistake for a Lisp function to use any subroutine
 that uses or sets the mark."
+  (declare (interactive-only t))
   (interactive)
   (push-mark (point))
   (push-mark (point-max) nil t)
@@ -1057,6 +1057,7 @@ What you probably want instead is something like:
   (forward-line (1- N))
 If at all possible, an even better solution is to use char counts
 rather than line counts."
+  (declare (interactive-only forward-line))
   (interactive
    (if (and current-prefix-arg (not (consp current-prefix-arg)))
        (list (prefix-numeric-value current-prefix-arg))
@@ -1096,7 +1097,6 @@ rather than line counts."
     (if (eq selective-display t)
        (re-search-forward "[\n\C-m]" nil 'end (1- line))
       (forward-line (1- line)))))
-(put 'goto-line 'interactive-only 'forward-line)
 
 (defun count-words-region (start end &optional arg)
   "Count the number of words in the region.
@@ -1394,8 +1394,11 @@ display the result of expression evaluation."
   (let ((minibuffer-completing-symbol t))
     (minibuffer-with-setup-hook
         (lambda ()
+          ;; FIXME: call emacs-lisp-mode?
+          (setq-local eldoc-documentation-function
+                      #'elisp-eldoc-documentation-function)
           (add-hook 'completion-at-point-functions
-                    #'lisp-completion-at-point nil t)
+                    #'elisp-completion-at-point nil t)
           (run-hooks 'eval-expression-minibuffer-setup-hook))
       (read-from-minibuffer prompt initial-contents
                             read-expression-map t
@@ -1515,24 +1518,13 @@ to get different commands to edit and resubmit."
          ;; add it to the history.
          (or (equal newcmd (car command-history))
              (setq command-history (cons newcmd command-history)))
-          (unwind-protect
-              (progn
-                ;; Trick called-interactively-p into thinking that `newcmd' is
-                ;; an interactive call (bug#14136).
-                (add-hook 'called-interactively-p-functions
-                          #'repeat-complex-command--called-interactively-skip)
-                (eval newcmd))
-            (remove-hook 'called-interactively-p-functions
-                         #'repeat-complex-command--called-interactively-skip)))
+          (apply #'funcall-interactively
+                (car newcmd)
+                (mapcar (lambda (e) (eval e t)) (cdr newcmd))))
       (if command-history
          (error "Argument %d is beyond length of command history" arg)
        (error "There are no previous complex commands to repeat")))))
 
-(defun repeat-complex-command--called-interactively-skip (i _frame1 frame2)
-  (and (eq 'eval (cadr frame2))
-       (eq 'repeat-complex-command
-           (cadr (backtrace-frame i #'called-interactively-p)))
-       1))
 
 (defvar extended-command-history nil)
 
@@ -2377,91 +2369,115 @@ are ignored.  If BEG and END are nil, all undo elements are used."
            (undo-make-selective-list (min beg end) (max beg end))
          buffer-undo-list)))
 
+;; The positions given in elements of the undo list are the positions
+;; as of the time that element was recorded to undo history.  In
+;; general, subsequent buffer edits render those positions invalid in
+;; the current buffer, unless adjusted according to the intervening
+;; undo elements.
+;;
+;; Undo in region is a use case that requires adjustments to undo
+;; elements.  It must adjust positions of elements in the region based
+;; on newer elements not in the region so as they may be correctly
+;; applied in the current buffer.  undo-make-selective-list
+;; accomplishes this with its undo-deltas list of adjustments.  An
+;; example undo history from oldest to newest:
+;;
+;; buf pos:
+;; 123456789 buffer-undo-list undo-deltas
+;; --------- ---------------- -----------
+;; aaa       (1 . 4)          (1 . -3)
+;; aaba      (3 . 4)          N/A (in region)
+;; ccaaba    (1 . 3)          (1 . -2)
+;; ccaabaddd (7 . 10)         (7 . -3)
+;; ccaabdd   ("ad" . 6)       (6 . 2)
+;; ccaabaddd (6 . 8)          (6 . -2)
+;;  |   |<-- region: "caab", from 2 to 6
+;;
+;; When the user starts a run of undos in region,
+;; undo-make-selective-list is called to create the full list of in
+;; region elements.  Each element is adjusted forward chronologically
+;; through undo-deltas to determine if it is in the region.
+;;
+;; In the above example, the insertion of "b" is (3 . 4) in the
+;; buffer-undo-list.  The undo-delta (1 . -2) causes (3 . 4) to become
+;; (5 . 6).  The next three undo-deltas cause no adjustment, so (5
+;; . 6) is assessed as in the region and placed in the selective list.
+;; Notably, the end of region itself adjusts from "2 to 6" to "2 to 5"
+;; due to the selected element.  The "b" insertion is the only element
+;; fully in the region, so in this example undo-make-selective-list
+;; returns (nil (5 . 6)).
+;;
+;; The adjustment of the (7 . 10) insertion of "ddd" shows an edge
+;; case.  It is adjusted through the undo-deltas: ((6 . 2) (6 . -2)).
+;; Normally an undo-delta of (6 . 2) would cause positions after 6 to
+;; adjust by 2.  However, they shouldn't adjust to less than 6, so (7
+;; . 10) adjusts to (6 . 8) due to the first undo delta.
+;;
+;; More interesting is how to adjust the "ddd" insertion due to the
+;; next undo-delta: (6 . -2), corresponding to reinsertion of "ad".
+;; If the reinsertion was a manual retyping of "ad", then the total
+;; adjustment should be (7 . 10) -> (6 . 8) -> (8 . 10).  However, if
+;; the reinsertion was due to undo, one might expect the first "d"
+;; character would again be a part of the "ddd" text, meaning its
+;; total adjustment would be (7 . 10) -> (6 . 8) -> (7 . 10).
+;;
+;; undo-make-selective-list assumes in this situation that "ad" was a
+;; new edit, even if it was inserted because of an undo.
+;; Consequently, if the user undos in region "8 to 10" of the
+;; "ccaabaddd" buffer, they could be surprised that it becomes
+;; "ccaabad", as though the first "d" became detached from the
+;; original "ddd" insertion.  This quirk is a FIXME.
+
 (defun undo-make-selective-list (start end)
   "Return a list of undo elements for the region START to END.
-The elements come from `buffer-undo-list', but we keep only
-the elements inside this region, and discard those outside this region.
-If we find an element that crosses an edge of this region,
-we stop and ignore all further elements."
-  (let ((undo-list-copy (undo-copy-list buffer-undo-list))
-       (undo-list (list nil))
-       some-rejected
-       undo-elt temp-undo-list delta)
-    (while undo-list-copy
-      (setq undo-elt (car undo-list-copy))
-      (let ((keep-this
-            (cond ((and (consp undo-elt) (eq (car undo-elt) t))
-                   ;; This is a "was unmodified" element.
-                   ;; Keep it if we have kept everything thus far.
-                   (not some-rejected))
-                   ;; Skip over marker adjustments, instead relying on
-                   ;; finding them after (TEXT . POS) elements
-                   ((markerp (car-safe undo-elt))
-                    nil)
-                  (t
-                   (undo-elt-in-region undo-elt start end)))))
-       (if keep-this
-           (progn
-             (setq end (+ end (cdr (undo-delta undo-elt))))
-             ;; Don't put two nils together in the list
-             (when (not (and (eq (car undo-list) nil)
-                              (eq undo-elt nil)))
-                (setq undo-list (cons undo-elt undo-list))
-                ;; If (TEXT . POS), "keep" its subsequent (MARKER
-                ;; . ADJUSTMENT) whose markers haven't moved.
-                (when (and (stringp (car-safe undo-elt))
-                           (integerp (cdr-safe undo-elt)))
-                  (let ((list-i (cdr undo-list-copy)))
+The elements come from `buffer-undo-list', but we keep only the
+elements inside this region, and discard those outside this
+region.  The elements' positions are adjusted so as the returned
+list can be applied to the current buffer."
+  (let ((ulist buffer-undo-list)
+        ;; A list of position adjusted undo elements in the region.
+        (selective-list (list nil))
+        ;; A list of undo-deltas for out of region undo elements.
+        undo-deltas
+        undo-elt)
+    (while ulist
+      (when undo-no-redo
+        (while (gethash ulist undo-equiv-table)
+          (setq ulist (gethash ulist undo-equiv-table))))
+      (setq undo-elt (car ulist))
+      (cond
+       ((null undo-elt)
+        ;; Don't put two nils together in the list
+        (when (car selective-list)
+          (push nil selective-list)))
+       ((and (consp undo-elt) (eq (car undo-elt) t))
+        ;; This is a "was unmodified" element.  Keep it
+        ;; if we have kept everything thus far.
+        (when (not undo-deltas)
+          (push undo-elt selective-list)))
+       ;; Skip over marker adjustments, instead relying
+       ;; on finding them after (TEXT . POS) elements
+       ((markerp (car-safe undo-elt))
+        nil)
+       (t
+        (let ((adjusted-undo-elt (undo-adjust-elt undo-elt
+                                                  undo-deltas)))
+          (if (undo-elt-in-region adjusted-undo-elt start end)
+              (progn
+                (setq end (+ end (cdr (undo-delta adjusted-undo-elt))))
+                (push adjusted-undo-elt selective-list)
+                ;; Keep (MARKER . ADJUSTMENT) if their (TEXT . POS) was
+                ;; kept.  primitive-undo may discard them later.
+                (when (and (stringp (car-safe adjusted-undo-elt))
+                           (integerp (cdr-safe adjusted-undo-elt)))
+                  (let ((list-i (cdr ulist)))
                     (while (markerp (car-safe (car list-i)))
-                      (let* ((adj-elt (pop list-i))
-                             (m (car adj-elt)))
-                        (and (eq (marker-buffer m) (current-buffer))
-                             (= (cdr undo-elt) m)
-                             (push adj-elt undo-list))))))))
-         (if (undo-elt-crosses-region undo-elt start end)
-             (setq undo-list-copy nil)
-           (setq some-rejected t)
-           (setq temp-undo-list (cdr undo-list-copy))
-           (setq delta (undo-delta undo-elt))
-
-           (when (/= (cdr delta) 0)
-             (let ((position (car delta))
-                   (offset (cdr delta)))
-
-               ;; Loop down the earlier events adjusting their buffer
-               ;; positions to reflect the fact that a change to the buffer
-               ;; isn't being undone. We only need to process those element
-               ;; types which undo-elt-in-region will return as being in
-               ;; the region since only those types can ever get into the
-               ;; output
-
-               (while temp-undo-list
-                 (setq undo-elt (car temp-undo-list))
-                 (cond ((integerp undo-elt)
-                        (if (>= undo-elt position)
-                            (setcar temp-undo-list (- undo-elt offset))))
-                       ((atom undo-elt) nil)
-                       ((stringp (car undo-elt))
-                        ;; (TEXT . POSITION)
-                        (let ((text-pos (abs (cdr undo-elt)))
-                              (point-at-end (< (cdr undo-elt) 0 )))
-                          (if (>= text-pos position)
-                              (setcdr undo-elt (* (if point-at-end -1 1)
-                                                  (- text-pos offset))))))
-                       ((integerp (car undo-elt))
-                        ;; (BEGIN . END)
-                        (when (>= (car undo-elt) position)
-                          (setcar undo-elt (- (car undo-elt) offset))
-                          (setcdr undo-elt (- (cdr undo-elt) offset))))
-                       ((null (car undo-elt))
-                        ;; (nil PROPERTY VALUE BEG . END)
-                        (let ((tail (nthcdr 3 undo-elt)))
-                          (when (>= (car tail) position)
-                            (setcar tail (- (car tail) offset))
-                            (setcdr tail (- (cdr tail) offset))))))
-                 (setq temp-undo-list (cdr temp-undo-list))))))))
-      (setq undo-list-copy (cdr undo-list-copy)))
-    (nreverse undo-list)))
+                      (push (pop list-i) selective-list)))))
+            (let ((delta (undo-delta undo-elt)))
+              (when (/= 0 (cdr delta))
+                (push delta undo-deltas)))))))
+      (pop ulist))
+    (nreverse selective-list)))
 
 (defun undo-elt-in-region (undo-elt start end)
   "Determine whether UNDO-ELT falls inside the region START ... END.
@@ -2499,6 +2515,7 @@ marker adjustment's corresponding (TEXT . POS) element."
   "Test whether UNDO-ELT crosses one edge of that region START ... END.
 This assumes we have already decided that UNDO-ELT
 is not *inside* the region START...END."
+  (declare (obsolete nil "25.1"))
   (cond ((atom undo-elt) nil)
        ((null (car undo-elt))
         ;; (nil PROPERTY VALUE BEG . END)
@@ -2510,6 +2527,72 @@ is not *inside* the region START...END."
         (and (< (car undo-elt) end)
              (> (cdr undo-elt) start)))))
 
+(defun undo-adjust-elt (elt deltas)
+  "Return adjustment of undo element ELT by the undo DELTAS
+list."
+  (pcase elt
+    ;; POSITION
+    ((pred integerp)
+     (undo-adjust-pos elt deltas))
+    ;; (BEG . END)
+    (`(,(and beg (pred integerp)) . ,(and end (pred integerp)))
+     (undo-adjust-beg-end beg end deltas))
+    ;; (TEXT . POSITION)
+    (`(,(and text (pred stringp)) . ,(and pos (pred integerp)))
+     (cons text (* (if (< pos 0) -1 1)
+                   (undo-adjust-pos (abs pos) deltas))))
+    ;; (nil PROPERTY VALUE BEG . END)
+    (`(nil . ,(or `(,prop ,val ,beg . ,end) pcase--dontcare))
+     `(nil ,prop ,val . ,(undo-adjust-beg-end beg end deltas)))
+    ;; (apply DELTA START END FUN . ARGS)
+    ;; FIXME
+    ;; All others return same elt
+    (_ elt)))
+
+;; (BEG . END) can adjust to the same positions, commonly when an
+;; insertion was undone and they are out of region, for example:
+;;
+;; buf pos:
+;; 123456789 buffer-undo-list undo-deltas
+;; --------- ---------------- -----------
+;; [...]
+;; abbaa     (2 . 4)          (2 . -2)
+;; aaa       ("bb" . 2)       (2 . 2)
+;; [...]
+;;
+;; "bb" insertion (2 . 4) adjusts to (2 . 2) because of the subsequent
+;; undo.  Further adjustments to such an element should be the same as
+;; for (TEXT . POSITION) elements.  The options are:
+;;
+;;   1: POSITION adjusts using <= (use-< nil), resulting in behavior
+;;      analogous to marker insertion-type t.
+;;
+;;   2: POSITION adjusts using <, resulting in behavior analogous to
+;;      marker insertion-type nil.
+;;
+;; There was no strong reason to prefer one or the other, except that
+;; the first is more consistent with prior undo in region behavior.
+(defun undo-adjust-beg-end (beg end deltas)
+  "Return cons of adjustments to BEG and END by the undo DELTAS
+list."
+  (let ((adj-beg (undo-adjust-pos beg deltas)))
+    ;; Note: option 2 above would be like (cons (min ...) adj-end)
+    (cons adj-beg
+          (max adj-beg (undo-adjust-pos end deltas t)))))
+
+(defun undo-adjust-pos (pos deltas &optional use-<)
+  "Return adjustment of POS by the undo DELTAS list, comparing
+with < or <= based on USE-<."
+  (dolist (d deltas pos)
+    (when (if use-<
+              (< (car d) pos)
+            (<= (car d) pos))
+      (setq pos
+            ;; Don't allow pos to become less than the undo-delta
+            ;; position.  This edge case is described in the overview
+            ;; comments.
+            (max (car d) (- pos (cdr d)))))))
+
 ;; Return the first affected buffer position and the delta for an undo element
 ;; delta is defined as the change in subsequent buffer positions if we *did*
 ;; the undo.
@@ -3293,6 +3376,11 @@ support pty association, if PROGRAM is nil."
 
 (defvar process-menu-query-only nil)
 
+(defvar process-menu-mode-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map [?d] 'process-menu-delete-process)
+    map))
+
 (define-derived-mode process-menu-mode tabulated-list-mode "Process Menu"
   "Major mode for listing the processes called by Emacs."
   (setq tabulated-list-format [("Process" 15 t)
@@ -3305,6 +3393,12 @@ support pty association, if PROGRAM is nil."
   (add-hook 'tabulated-list-revert-hook 'list-processes--refresh nil t)
   (tabulated-list-init-header))
 
+(defun process-menu-delete-process ()
+  "Kill process at point in a `list-processes' buffer."
+  (interactive)
+  (delete-process (tabulated-list-get-id))
+  (revert-buffer))
+
 (defun list-processes--refresh ()
   "Recompute the list of processes for the Process List buffer.
 Also, delete any process that is exited or signaled."
@@ -3535,7 +3629,7 @@ No filtering is done unless a hook says to."
 
 ;;;; Window system cut and paste hooks.
 
-(defvar interprogram-cut-function nil
+(defvar interprogram-cut-function #'gui-select-text
   "Function to call to make a killed region available to other programs.
 Most window systems provide a facility for cutting and pasting
 text between different programs, such as the clipboard on X and
@@ -3546,7 +3640,7 @@ put in the kill ring, to make the new kill available to other
 programs.  The function takes one argument, TEXT, which is a
 string containing the text which should be made available.")
 
-(defvar interprogram-paste-function nil
+(defvar interprogram-paste-function #'gui-selection-value
   "Function to call to get text cut from other programs.
 Most window systems provide a facility for cutting and pasting
 text between different programs, such as the clipboard on X and
@@ -3658,14 +3752,34 @@ argument should still be a \"useful\" string for such uses."
   (if interprogram-cut-function
       (funcall interprogram-cut-function string)))
 
+;; It has been argued that this should work similar to `self-insert-command'
+;; which merges insertions in undo-list in groups of 20 (hard-coded in cmds.c).
+(defcustom kill-append-merge-undo nil
+  "Whether appending to kill ring also makes \\[undo] restore both pieces of text simultaneously."
+  :type 'boolean
+  :group 'killing
+  :version "25.1")
+
 (defun kill-append (string before-p)
   "Append STRING to the end of the latest kill in the kill ring.
 If BEFORE-P is non-nil, prepend STRING to the kill.
+Also removes the last undo boundary in the current buffer,
+ depending on `kill-append-merge-undo'.
 If `interprogram-cut-function' is set, pass the resulting kill to it."
   (let* ((cur (car kill-ring)))
     (kill-new (if before-p (concat string cur) (concat cur string))
              (or (= (length cur) 0)
-                 (equal nil (get-text-property 0 'yank-handler cur))))))
+                 (equal nil (get-text-property 0 'yank-handler cur))))
+    (when (and kill-append-merge-undo (not buffer-read-only))
+      (let ((prev buffer-undo-list)
+            (next (cdr buffer-undo-list)))
+        ;; find the next undo boundary
+        (while (car next)
+          (pop next)
+          (pop prev))
+        ;; remove this undo boundary
+        (when prev
+          (setcdr prev (cdr next)))))))
 
 (defcustom yank-pop-change-selection nil
   "Whether rotating the kill ring changes the window system selection.
@@ -3763,7 +3877,7 @@ some text between BEG and END, but we're killing the region."
          ;; Add that string to the kill ring, one way or another.
          (if (eq last-command 'kill-region)
              (kill-append string (< end beg))
-           (kill-new string nil)))
+           (kill-new string)))
        (when (or string (eq last-command 'kill-region))
          (setq this-command 'kill-region))
        (setq deactivate-mark t)
@@ -4289,10 +4403,8 @@ If ARG is zero, move to the beginning of the current line."
 (defun insert-buffer (buffer)
   "Insert after point the contents of BUFFER.
 Puts mark after the inserted text.
-BUFFER may be a buffer or a buffer name.
-
-This function is meant for the user to run interactively.
-Don't call it from programs: use `insert-buffer-substring' instead!"
+BUFFER may be a buffer or a buffer name."
+  (declare (interactive-only insert-buffer-substring))
   (interactive
    (list
     (progn
@@ -4307,7 +4419,6 @@ Don't call it from programs: use `insert-buffer-substring' instead!"
      (insert-buffer-substring (get-buffer buffer))
      (point)))
   nil)
-(put 'insert-buffer 'interactive-only 'insert-buffer-substring)
 
 (defun append-to-buffer (buffer start end)
   "Append to specified buffer the text of the region.
@@ -4386,10 +4497,6 @@ a mistake; see the documentation of `set-mark'."
     (signal 'mark-inactive nil)))
 
 ;; Behind display-selections-p.
-(declare-function x-selection-owner-p "xselect.c"
-                  (&optional selection terminal))
-(declare-function x-selection-exists-p "xselect.c"
-                  (&optional selection terminal))
 
 (defun deactivate-mark (&optional force)
   "Deactivate the mark.
@@ -4414,21 +4521,23 @@ run `deactivate-mark-hook'."
       ;; the region prior to the last command modifying the buffer.
       ;; Set the selection to that, or to the current region.
       (cond (saved-region-selection
-            (x-set-selection 'PRIMARY saved-region-selection)
+            (gui-set-selection 'PRIMARY saved-region-selection)
             (setq saved-region-selection nil))
            ;; If another program has acquired the selection, region
            ;; deactivation should not clobber it (Bug#11772).
            ((and (/= (region-beginning) (region-end))
-                 (or (x-selection-owner-p 'PRIMARY)
-                     (null (x-selection-exists-p 'PRIMARY))))
-            (x-set-selection 'PRIMARY
-                              (funcall region-extract-function nil)))))
+                 (or (gui-call gui-selection-owner-p 'PRIMARY)
+                     (null (gui-call gui-selection-exists-p 'PRIMARY))))
+            (gui-set-selection 'PRIMARY
+                                (funcall region-extract-function nil)))))
     (when mark-active (force-mode-line-update)) ;Refresh toolbar (bug#16382).
     (cond
      ((eq (car-safe transient-mark-mode) 'only)
-      (setq transient-mark-mode (cdr transient-mark-mode)))
+      (setq transient-mark-mode (cdr transient-mark-mode))
+      (if (eq transient-mark-mode (default-value 'transient-mark-mode))
+          (kill-local-variable 'transient-mark-mode)))
      ((eq transient-mark-mode 'lambda)
-      (setq transient-mark-mode nil)))
+      (kill-local-variable 'transient-mark-mode)))
     (setq mark-active nil)
     (run-hooks 'deactivate-mark-hook)
     (redisplay--update-region-highlight (selected-window))))
@@ -4441,7 +4550,7 @@ If NO-TMM is non-nil, leave `transient-mark-mode' alone."
       (force-mode-line-update) ;Refresh toolbar (bug#16382).
       (setq mark-active t)
       (unless (or transient-mark-mode no-tmm)
-        (setq transient-mark-mode 'lambda))
+        (setq-local transient-mark-mode 'lambda))
       (run-hooks 'activate-mark-hook))))
 
 (defun set-mark (pos)
@@ -4655,7 +4764,7 @@ Novice Emacs Lisp programmers often try to use the mark for the wrong
 purposes.  See the documentation of `set-mark' for more information."
   (interactive "P")
   (cond ((eq transient-mark-mode 'lambda)
-        (setq transient-mark-mode nil))
+        (kill-local-variable 'transient-mark-mode))
        ((eq (car-safe transient-mark-mode) 'only)
         (deactivate-mark)))
   (cond
@@ -4665,16 +4774,14 @@ purposes.  See the documentation of `set-mark' for more information."
     (if arg
        (pop-to-mark-command)
       (push-mark-command t)))
-   ((and set-mark-command-repeat-pop
-        (eq last-command 'pop-to-mark-command))
-    (setq this-command 'pop-to-mark-command)
-    (pop-to-mark-command))
    ((and set-mark-command-repeat-pop
         (eq last-command 'pop-global-mark)
         (not arg))
     (setq this-command 'pop-global-mark)
     (pop-global-mark))
-   (arg
+   ((or (and set-mark-command-repeat-pop
+             (eq last-command 'pop-to-mark-command))
+        arg)
     (setq this-command 'pop-to-mark-command)
     (pop-to-mark-command))
    ((eq last-command 'set-mark-command)
@@ -4749,7 +4856,7 @@ mode temporarily."
     (set-mark (point))
     (goto-char omark)
     (cond (temp-highlight
-          (setq transient-mark-mode (cons 'only transient-mark-mode)))
+          (setq-local transient-mark-mode (cons 'only transient-mark-mode)))
          ((or (and arg (region-active-p)) ; (xor arg (not (region-active-p)))
               (not (or arg (region-active-p))))
           (deactivate-mark))
@@ -4788,13 +4895,15 @@ its earlier value."
   (cond ((and shift-select-mode this-command-keys-shift-translated)
          (unless (and mark-active
                      (eq (car-safe transient-mark-mode) 'only))
-          (setq transient-mark-mode
-                 (cons 'only
-                       (unless (eq transient-mark-mode 'lambda)
-                         transient-mark-mode)))
+          (setq-local transient-mark-mode
+                       (cons 'only
+                             (unless (eq transient-mark-mode 'lambda)
+                               transient-mark-mode)))
            (push-mark nil nil t)))
         ((eq (car-safe transient-mark-mode) 'only)
          (setq transient-mark-mode (cdr transient-mark-mode))
+         (if (eq transient-mark-mode (default-value 'transient-mark-mode))
+             (kill-local-variable 'transient-mark-mode))
          (deactivate-mark))))
 
 (define-minor-mode transient-mark-mode
@@ -4822,7 +4931,7 @@ Transient Mark mode, invoke \\[apropos-documentation] and type \"transient\"
 or \"mark.*active\" at the prompt."
   :global t
   ;; It's defined in C/cus-start, this stops the d-m-m macro defining it again.
-  :variable transient-mark-mode)
+  :variable (default-value 'transient-mark-mode))
 
 (defvar widen-automatically t
   "Non-nil means it is ok for commands to call `widen' when they want to.
@@ -4896,11 +5005,8 @@ this command moves to the specified goal column (or as close as possible).
 The goal column is stored in the variable `goal-column', which is nil
 when there is no goal column.  Note that setting `goal-column'
 overrides `line-move-visual' and causes this command to move by buffer
-lines rather than by display lines.
-
-If you are thinking of using this in a Lisp program, consider
-using `forward-line' instead.  It is usually easier to use
-and more reliable (no dependence on goal column, etc.)."
+lines rather than by display lines."
+  (declare (interactive-only forward-line))
   (interactive "^p\np")
   (or arg (setq arg 1))
   (if (and next-line-add-newlines (= arg 1))
@@ -4917,7 +5023,6 @@ and more reliable (no dependence on goal column, etc.)."
           (signal (car err) (cdr err))))
       (line-move arg nil nil try-vscroll)))
   nil)
-(put 'next-line 'interactive-only 'forward-line)
 
 (defun previous-line (&optional arg try-vscroll)
   "Move cursor vertically up ARG lines.
@@ -4943,11 +5048,9 @@ this command moves to the specified goal column (or as close as possible).
 The goal column is stored in the variable `goal-column', which is nil
 when there is no goal column.  Note that setting `goal-column'
 overrides `line-move-visual' and causes this command to move by buffer
-lines rather than by display lines.
-
-If you are thinking of using this in a Lisp program, consider using
-`forward-line' with a negative argument instead.  It is usually easier
-to use and more reliable (no dependence on goal column, etc.)."
+lines rather than by display lines."
+  (declare (interactive-only
+            "use `forward-line' with negative argument instead."))
   (interactive "^p\np")
   (or arg (setq arg 1))
   (if (called-interactively-p 'interactive)
@@ -4957,8 +5060,6 @@ to use and more reliable (no dependence on goal column, etc.)."
         (signal (car err) (cdr err))))
     (line-move (- arg) nil nil try-vscroll))
   nil)
-(put 'previous-line 'interactive-only
-     "use `forward-line' with negative argument instead.")
 
 (defcustom track-eol nil
   "Non-nil means vertical motion starting at end of line keeps to ends of lines.
@@ -5838,7 +5939,9 @@ With prefix arg ARG, effect is to take character before point
 and drag it forward past ARG other characters (backward if ARG negative).
 If no argument and at end of line, the previous two chars are exchanged."
   (interactive "*P")
-  (and (null arg) (eolp) (forward-char -1))
+  (when (and (null arg) (eolp) (not (bobp))
+            (not (get-text-property (1- (point)) 'read-only)))
+    (forward-char -1))
   (transpose-subr 'forward-char (prefix-numeric-value arg)))
 
 (defun transpose-words (arg)
@@ -6495,6 +6598,7 @@ The function should return non-nil if the two tokens do not match.")
                             (not blink-matching-paren-dont-ignore-comments))))
                   (condition-case ()
                       (progn
+                       (syntax-propertize (point))
                         (forward-sexp -1)
                         ;; backward-sexp skips backward over prefix chars,
                         ;; so move back to the matching paren.
@@ -6609,6 +6713,8 @@ At top-level, as an editor command, this simply beeps."
     (deactivate-mark))
   (if (fboundp 'kmacro-keyboard-quit)
       (kmacro-keyboard-quit))
+  (when completion-in-region-mode
+    (completion-in-region-mode -1))
   ;; Force the next redisplay cycle to remove the "Def" indicator from
   ;; all the mode lines.
   (if defining-kbd-macro
@@ -6905,6 +7011,8 @@ With a prefix argument, set VARIABLE to VALUE buffer-locally."
     (define-key map "\e\e\e" 'delete-completion-window)
     (define-key map [left] 'previous-completion)
     (define-key map [right] 'next-completion)
+    (define-key map [?\t] 'next-completion)
+    (define-key map [backtab] 'previous-completion)
     (define-key map "q" 'quit-window)
     (define-key map "z" 'kill-this-buffer)
     map)
@@ -7468,7 +7576,9 @@ DISPLAY-FLAG non-nil means show the new buffer with `pop-to-buffer'.
 This is always done when called interactively.
 
 Optional third arg NORECORD non-nil means do not put this buffer at the
-front of the list of recently selected ones."
+front of the list of recently selected ones.
+
+Returns the newly created indirect buffer."
   (interactive
    (progn
      (if (get major-mode 'no-clone-indirect)
@@ -7853,31 +7963,6 @@ contains the list of implementations currently supported for this command."
                              command-name)))))))
 
 \f
-;; This is here because files in obsolete/ are not scanned for autoloads.
-
-(defvar iswitchb-mode nil "\
-Non-nil if Iswitchb mode is enabled.
-See the command `iswitchb-mode' for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `iswitchb-mode'.")
-
-(custom-autoload 'iswitchb-mode "iswitchb" nil)
-
-(autoload 'iswitchb-mode "iswitchb" "\
-Toggle Iswitchb mode.
-With a prefix argument ARG, enable Iswitchb mode if ARG is
-positive, and disable it otherwise.  If called from Lisp, enable
-the mode if ARG is omitted or nil.
-
-Iswitchb mode is a global minor mode that enables switching
-between buffers using substrings.  See `iswitchb' for details.
-
-\(fn &optional ARG)" t nil)
-
-(make-obsolete 'iswitchb-mode
-               "use `icomplete-mode' or `ido-mode' instead." "24.4")
-\f
 
 (provide 'simple)
 
index 54dce9e43b7ad39a735a0e92ce396f4cdb950aa5..1c6128a33a5fc1a42834296bf908c5a57476d4be 100644 (file)
@@ -55,22 +55,15 @@ Typical examples might be `upcase' or `capitalize'.")
 When the region is visible (due to `transient-mark-mode' or marking a region
 with the mouse) and this is non-nil and the function was called without an
 explicit ARG, then the ARG defaults to -1, i.e. wrapping around the visible
-region.
-
-We will probably delete this variable in a future Emacs version
-unless we get a substantial number of complaints about the auto-wrap
-feature.")
+region.")
+(make-obsolete-variable 'skeleton-autowrap nil "24.5")
 
 (defvar skeleton-end-newline t
   "If non-nil, make sure that the skeleton inserted ends with a newline.
 This just influences the way the default `skeleton-end-hook' behaves.")
 
-(defvar skeleton-end-hook
-  (lambda ()
-    (or (eolp) (not skeleton-end-newline) (newline-and-indent)))
+(defvar skeleton-end-hook nil
   "Hook called at end of skeleton but before going to point of interest.
-By default this moves out anything following to next line,
-  unless `skeleton-end-newline' is set to nil.
 The variables `v1' and `v2' are still set when calling this.")
 
 
@@ -271,6 +264,7 @@ When done with skeleton, but before going back to `_'-point call
               (mapcar #'car skeleton-further-elements)
               (mapcar (lambda (x) (eval (cadr x))) skeleton-further-elements)
             (skeleton-internal-list skeleton str))
+       (or (eolp) (not skeleton-end-newline) (newline-and-indent))
        (run-hooks 'skeleton-end-hook)
        (sit-for 0)
        (or (pos-visible-in-window-p beg)
index 68970407247b5dc10d09d96693320165a326f6df..11d2d43538397aec788cf4f42462bec9468310f4 100644 (file)
@@ -39,21 +39,9 @@ this version is not backward compatible to 0.14 or earlier.")
 ;;
 ;;; Notes:
 ;;
-;;    Users of really old emacsen without the need timer functions
-;; will not have speedbar updating automatically.  Use "g" to refresh
-;; the display after changing directories.  Remember, do not interrupt
-;; the stealthy updates or your display may not be completely
-;; refreshed.
-;;
 ;;    AUC-TEX users: The imenu tags for AUC-TEX mode don't work very
 ;; well.  Use the imenu keywords from tex-mode.el for better results.
 ;;
-;; This file requires the library package assoc (association lists)
-;;     assoc should be available in all modern versions of Emacs.
-;; The custom package is optional (for easy configuration of speedbar)
-;;     http://www.dina.kvl.dk/~abraham/custom/
-;;     custom is available in all versions of Emacs version 20 or better.
-;;
 ;;; Developing for speedbar
 ;;
 ;; Adding a speedbar specialized display mode:
index 58e970814b9842b3fce1c8329f5211821db29e69..1f524dc119e29bf06312949b67406008e5311000 100644 (file)
@@ -293,8 +293,9 @@ see `tty-setup-hook'.")
 `tty-setup-hook' instead." "24.4")
 
 (defvar inhibit-startup-hooks nil
-  "Non-nil means don't run `term-setup-hook' and `emacs-startup-hook'.
-This is because we already did so.")
+  "Non-nil means don't run some startup hooks, because we already did.
+Currently this applies to: `emacs-startup-hook', `term-setup-hook',
+and `window-setup-hook'.")
 
 (defvar keyboard-type nil
   "The brand of keyboard you are using.
@@ -420,21 +421,6 @@ Warning Warning!!!  Pure space overflow    !!!Warning Warning
   :type 'directory
   :initialize 'custom-initialize-delay)
 
-(defvar package--builtin-versions
-  ;; Mostly populated by loaddefs.el via autoload-builtin-package-versions.
-  (purecopy `((emacs . ,(version-to-list emacs-version))))
-  "Alist giving the version of each versioned builtin package.
-I.e. each element of the list is of the form (NAME . VERSION) where
-NAME is the package name as a symbol, and VERSION is its version
-as a list.")
-
-(defun package--description-file (dir)
-  (concat (let ((subdir (file-name-nondirectory
-                         (directory-file-name dir))))
-            (if (string-match "\\([^.].*?\\)-\\([0-9]+\\(?:[.][0-9]+\\|\\(?:pre\\|beta\\|alpha\\)[0-9]+\\)*\\)" subdir)
-                (match-string 1 subdir) subdir))
-          "-pkg.el"))
-
 (defun normal-top-level-add-subdirs-to-load-path ()
   "Add all subdirectories of `default-directory' to `load-path'.
 More precisely, this uses only the subdirectories whose names
@@ -496,7 +482,7 @@ It sets `command-line-processed', processes the command-line,
 reads the initialization files, etc.
 It is the default value of the variable `top-level'."
   (if command-line-processed
-      (message "Back to top level.")
+      (message internal--top-level-message)
     (setq command-line-processed t)
 
     ;; Look in each dir in load-path for a subdirs.el file.  If we
@@ -648,9 +634,7 @@ It is the default value of the variable `top-level'."
                                       (emacs-pid)
                                       (system-name))))))))
        (unless inhibit-startup-hooks
-         (run-hooks 'emacs-startup-hook)
-         (and term-setup-hook
-              (run-hooks 'term-setup-hook)))
+         (run-hooks 'emacs-startup-hook 'term-setup-hook))
 
        ;; Don't do this if we failed to create the initial frame,
        ;; for instance due to a dense colormap.
@@ -686,8 +670,8 @@ It is the default value of the variable `top-level'."
        ;; Now we know the user's default font, so add it to the menu.
        (if (fboundp 'font-menu-add-default)
            (font-menu-add-default))
-       (and window-setup-hook
-            (run-hooks 'window-setup-hook))))
+       (unless inhibit-startup-hooks
+         (run-hooks 'window-setup-hook))))
     ;; Subprocesses of Emacs do not have direct access to the terminal, so
     ;; unless told otherwise they should only assume a dumb terminal.
     ;; We are careful to do it late (after term-setup-hook), although the
@@ -720,20 +704,17 @@ It is the default value of the variable `top-level'."
 (defconst tool-bar-images-pixel-height 24
   "Height in pixels of images in the tool-bar.")
 
-(defvar tool-bar-originally-present nil
-  "Non-nil if tool-bars are present before user and site init files are read.")
-
-(defvar handle-args-function-alist '((nil . tty-handle-args))
-  "Functions for processing window-system dependent command-line arguments.
+(gui-method-declare handle-args-function #'tty-handle-args
+  "Method for processing window-system dependent command-line arguments.
 Window system startup files should add their own function to this
-alist, which should parse the command line arguments.  Those
+method, which should parse the command line arguments.  Those
 pertaining to the window system should be processed and removed
 from the returned command line.")
 
-(defvar window-system-initialization-alist '((nil . ignore))
-  "Alist of window-system initialization functions.
-Window-system startup files should add their own initialization
-function to this list.  The function should take no arguments,
+(gui-method-declare window-system-initialization #'ignore
+  "Method for window-system initialization.
+Window-system startup files should add their own implementation
+to this method.  The function should take no arguments,
 and initialize the window system environment to prepare for
 opening the first frame (e.g. open a connection to an X server).")
 
@@ -969,13 +950,11 @@ please check its value")
       ;; Process window-system specific command line parameters.
       (setq command-line-args
            (funcall
-            (or (cdr (assq initial-window-system handle-args-function-alist))
-                (error "Unsupported window system `%s'" initial-window-system))
+             (gui-method handle-args-function (or initial-window-system t))
             command-line-args))
       ;; Initialize the window system. (Open connection, etc.)
       (funcall
-       (or (cdr (assq initial-window-system window-system-initialization-alist))
-          (error "Unsupported window system `%s'" initial-window-system)))
+       (gui-method window-system-initialization (or initial-window-system t)))
       (put initial-window-system 'window-system-initialized t))
     ;; If there was an error, print the error message and exit.
     (error
@@ -1043,18 +1022,6 @@ please check its value")
   (or (eq initial-window-system 'pc)
       (tty-register-default-colors))
 
-  ;; Record whether the tool-bar is present before the user and site
-  ;; init files are processed.  frame-notice-user-settings uses this
-  ;; to determine if the tool-bar has been disabled by the init files,
-  ;; and the frame needs to be resized.
-  (when (fboundp 'frame-notice-user-settings)
-    (let ((tool-bar-lines (or (assq 'tool-bar-lines initial-frame-alist)
-                              (assq 'tool-bar-lines default-frame-alist))))
-      (setq tool-bar-originally-present
-            (and tool-bar-lines
-                 (cdr tool-bar-lines)
-                 (not (eq 0 (cdr tool-bar-lines)))))))
-
   (let ((old-scalable-fonts-allowed scalable-fonts-allowed)
        (old-face-ignored-fonts face-ignored-fonts))
 
@@ -1319,7 +1286,11 @@ the `--debug-init' option to view a complete error backtrace."
   (let (warned)
     (dolist (dir load-path)
       (and (not warned)
-          (string-match-p "/[._]emacs\\.d/?\\'" dir)
+          (string-match-p
+           (format "/%s/?\\'"
+                   (regexp-quote
+                    (file-name-nondirectory
+                     (directory-file-name user-emacs-directory)))) dir)
           (string-equal (file-name-as-directory (expand-file-name dir))
                         (expand-file-name user-emacs-directory))
           (setq warned t)
@@ -1327,9 +1298,10 @@ the `--debug-init' option to view a complete error backtrace."
                            (format "Your `load-path' seems to contain
 your `.emacs.d' directory: %s\n\
 This is likely to cause problems...\n\
-Consider using a subdirectory instead, e.g.: %s" dir
-(expand-file-name "lisp" user-emacs-directory))
-                            :warning))))
+Consider using a subdirectory instead, e.g.: %s"
+                                    dir (expand-file-name
+                                         "lisp" user-emacs-directory))
+                            :warning))))
 
   ;; If -batch, terminate after processing the command options.
   (if noninteractive (kill-emacs t))
@@ -1411,8 +1383,9 @@ If this is nil, no message will be displayed."
             `("GNU/Linux"
               ,(lambda (_button) (browse-url "http://www.gnu.org/gnu/linux-and-gnu.html"))
             "Browse http://www.gnu.org/gnu/linux-and-gnu.html")
-          `("GNU" ,(lambda (_button) (describe-gnu-project))
-          "Display info on the GNU project")))
+          `("GNU" ,(lambda (_button)
+                    (browse-url "http://www.gnu.org/gnu/thegnuproject.html"))
+           "Browse http://www.gnu.org/gnu/thegnuproject.html")))
      " operating system.\n\n"
      :face variable-pitch
      :link ("Emacs Tutorial" ,(lambda (_button) (help-with-tutorial)))
@@ -2441,10 +2414,7 @@ A fancy display is used on graphic displays, normal otherwise."
       ;; If there are no switches to process, we might as well
       ;; run this hook now, and there may be some need to do it
       ;; before doing any output.
-      (run-hooks 'emacs-startup-hook)
-      (and term-setup-hook
-          (run-hooks 'term-setup-hook))
-      (setq inhibit-startup-hooks t)
+      (run-hooks 'emacs-startup-hook 'term-setup-hook)
 
       ;; It's important to notice the user settings before we
       ;; display the startup message; otherwise, the settings
@@ -2456,10 +2426,9 @@ A fancy display is used on graphic displays, normal otherwise."
       ;; If there are no switches to process, we might as well
       ;; run this hook now, and there may be some need to do it
       ;; before doing any output.
-      (when window-setup-hook
-       (run-hooks 'window-setup-hook)
-       ;; Don't let the hook be run twice.
-       (setq window-setup-hook nil))
+      (run-hooks 'window-setup-hook)
+
+      (setq inhibit-startup-hooks t)
 
       ;; ;; Do this now to avoid an annoying delay if the user
       ;; ;; clicks the menu bar during the sit-for.
index 12704da149bcb6d44ed6a77358e114b30c860aa0..585f9368c531a71502b0f329215a9291242efe16 100644 (file)
@@ -265,7 +265,9 @@ information about the function or macro; these go into effect
 during the evaluation of the `defun' or `defmacro' form.
 
 The possible values of SPECS are specified by
-`defun-declarations-alist' and `macro-declarations-alist'."
+`defun-declarations-alist' and `macro-declarations-alist'.
+
+For more information, see info node `(elisp)Declare Form'."
   ;; FIXME: edebug spec should pay attention to defun-declarations-alist.
   nil)
 
@@ -332,6 +334,7 @@ Any list whose car is `frame-configuration' is assumed to be a frame
 configuration."
   (and (consp object)
        (eq (car object) 'frame-configuration)))
+
 \f
 ;;;; List functions.
 
@@ -380,6 +383,13 @@ If N is omitted or nil, remove the last element."
           (if (> n 0) (setcdr (nthcdr (- (1- m) n) list) nil))
           list))))
 
+(defun zerop (number)
+  "Return t if NUMBER is zero."
+  ;; Used to be in C, but it's pointless since (= 0 n) is faster anyway because
+  ;; = has a byte-code.
+  (declare (compiler-macro (lambda (_) `(= 0 ,number))))
+  (= 0 number))
+
 (defun delete-dups (list)
   "Destructively remove `equal' duplicates from LIST.
 Store the result in LIST and return it.  LIST must be a proper list.
@@ -545,6 +555,15 @@ Elements of ALIST that are not conses are ignored."
        (setq tail tail-cdr))))
   alist)
 
+(defun alist-get (key alist &optional default remove)
+  "Get the value associated to KEY in ALIST.
+DEFAULT is the value to return if KEY is not found in ALIST.
+REMOVE, if non-nil, means that when setting this element, we should
+remove the entry if the new value is `eql' to DEFAULT."
+  (ignore remove) ;;Silence byte-compiler.
+  (let ((x (assq key alist)))
+    (if x (cdr x) default)))
+
 (defun remove (elt seq)
   "Return a copy of SEQ with all occurrences of ELT removed.
 SEQ must be a list, vector, or string.  The comparison is done with `equal'."
@@ -2008,7 +2027,7 @@ If optional CONFIRM is non-nil, read the password twice to make sure.
 Optional DEFAULT is a default password to use instead of empty input.
 
 This function echoes `.' for each character that the user types.
-Note that in batch mode, the input is not hidden!
+You could let-bind `read-hide-char' to another hiding character, though.
 
 Once the caller uses the password, it can erase the password
 by doing (clear-string STRING)."
@@ -2033,7 +2052,7 @@ by doing (clear-string STRING)."
                                      beg)))
              (dotimes (i (- end beg))
                (put-text-property (+ i beg) (+ 1 i beg)
-                                  'display (string ?.)))))
+                                  'display (string (or read-hide-char ?.))))))
           minibuf)
       (minibuffer-with-setup-hook
           (lambda ()
@@ -2047,12 +2066,9 @@ by doing (clear-string STRING)."
            (setq-local show-paren-mode nil)            ;bug#16091.
             (add-hook 'after-change-functions hide-chars-fun nil 'local))
         (unwind-protect
-            (let ((enable-recursive-minibuffers t))
-              (read-string
-               (if noninteractive
-                   (format "%s[INPUT WILL NOT BE HIDDEN!] " prompt) ; bug#17839
-                 prompt)
-               nil t default)) ; t = "no history"
+            (let ((enable-recursive-minibuffers t)
+                 (read-hide-char (or read-hide-char ?.)))
+              (read-string prompt nil t default)) ; t = "no history"
           (when (buffer-live-p minibuf)
             (with-current-buffer minibuf
               ;; Not sure why but it seems that there might be cases where the
@@ -2187,12 +2203,16 @@ floating point support."
                   (read-event nil t seconds))))
       (or (null read)
          (progn
-           ;; If last command was a prefix arg, e.g. C-u, push this event onto
-           ;; unread-command-events as (t . EVENT) so it will be added to
-           ;; this-command-keys by read-key-sequence.
-           (if (eq overriding-terminal-local-map universal-argument-map)
-               (setq read (cons t read)))
-           (push read unread-command-events)
+            ;; https://lists.gnu.org/archive/html/emacs-devel/2006-10/msg00394.html
+            ;; We want `read' appear in the next command's this-command-event
+            ;; but not in the current one.
+            ;; By pushing (cons t read), we indicate that `read' has not
+            ;; yet been recorded in this-command-keys, so it will be recorded
+            ;; next time it's read.
+            ;; And indeed the `seconds' argument to read-event correctly
+            ;; prevented recording this event in the current command's
+            ;; this-command-keys.
+           (push (cons t read) unread-command-events)
            nil))))))
 
 ;; Behind display-popup-menus-p test.
@@ -2699,14 +2719,6 @@ computing the hash.  If BINARY is non-nil, return a string in binary
 form."
   (secure-hash 'sha1 object start end binary))
 
-(defalias 'function-put #'put
-  ;; This is only really used in Emacs>24.4, but we add it to 24.4 already, so
-  ;; as to ease the pain when people use future autoload files that contain
-  ;; function-put.
-  "Set function F's property PROP to VALUE.
-The namespace for PROP is shared with symbols.
-So far, F can only be a symbol, not a lambda expression.")
-
 (defun function-get (f prop &optional autoload)
   "Return the value of property PROP of function F.
 If AUTOLOAD is non-nil and F is autoloaded, try to autoload it
@@ -2879,23 +2891,21 @@ COMMAND is the shell command to run.
 An old calling convention accepted any number of arguments after COMMAND,
 which were just concatenated to COMMAND.  This is still supported but strongly
 discouraged."
-   ;; We used to use `exec' to replace the shell with the command,
-   ;; but that failed to handle (...) and semicolon, etc.
+  (declare (advertised-calling-convention (name buffer command) "23.1"))
+  ;; We used to use `exec' to replace the shell with the command,
+  ;; but that failed to handle (...) and semicolon, etc.
   (start-process name buffer shell-file-name shell-command-switch
                 (mapconcat 'identity args " ")))
-(set-advertised-calling-convention 'start-process-shell-command
-                                   '(name buffer command) "23.1")
 
 (defun start-file-process-shell-command (name buffer &rest args)
   "Start a program in a subprocess.  Return the process object for it.
 Similar to `start-process-shell-command', but calls `start-file-process'."
+  (declare (advertised-calling-convention (name buffer command) "23.1"))
   (start-file-process
    name buffer
    (if (file-remote-p default-directory) "/bin/sh" shell-file-name)
    (if (file-remote-p default-directory) "-c" shell-command-switch)
    (mapconcat 'identity args " ")))
-(set-advertised-calling-convention 'start-file-process-shell-command
-                                   '(name buffer command) "23.1")
 
 (defun call-process-shell-command (command &optional infile buffer display
                                           &rest args)
@@ -2911,13 +2921,18 @@ STDERR-FILE may be nil (discard standard error output),
 t (mix it with ordinary output), or a file name string.
 
 Fourth arg DISPLAY non-nil means redisplay buffer as output is inserted.
-Remaining arguments are strings passed as additional arguments for COMMAND.
 Wildcards and redirection are handled as usual in the shell.
 
 If BUFFER is 0, `call-process-shell-command' returns immediately with value nil.
 Otherwise it waits for COMMAND to terminate and returns a numeric exit
 status or a signal description string.
-If you quit, the process is killed with SIGINT, or SIGKILL if you quit again."
+If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.
+
+An old calling convention accepted any number of arguments after DISPLAY,
+which were just concatenated to COMMAND.  This is still supported but strongly
+discouraged."
+  (declare (advertised-calling-convention
+            (command &optional infile buffer display) "24.5"))
   ;; We used to use `exec' to replace the shell with the command,
   ;; but that failed to handle (...) and semicolon, etc.
   (call-process shell-file-name
@@ -2929,6 +2944,8 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again."
                                           &rest args)
   "Process files synchronously in a separate process.
 Similar to `call-process-shell-command', but calls `process-file'."
+  (declare (advertised-calling-convention
+            (command &optional infile buffer display) "24.5"))
   (process-file
    (if (file-remote-p default-directory) "/bin/sh" shell-file-name)
    infile buffer display
@@ -2937,6 +2954,14 @@ Similar to `call-process-shell-command', but calls `process-file'."
 \f
 ;;;; Lisp macros to do various things temporarily.
 
+(defmacro track-mouse (&rest body)
+  "Evaluate BODY with mouse movement events enabled.
+Within a `track-mouse' form, mouse motion generates input events that
+ you can read with `read-event'.
+Normally, mouse motion is ignored."
+  (declare (debug t) (indent 0))
+  `(internal--track-mouse (lambda () ,@body)))
+
 (defmacro with-current-buffer (buffer-or-name &rest body)
   "Execute the forms in BODY with BUFFER-OR-NAME temporarily current.
 BUFFER-OR-NAME must be a buffer or the name of an existing buffer.
@@ -3201,12 +3226,7 @@ not really affect the buffer's content."
     `(let* ((,modified (buffer-modified-p))
             (buffer-undo-list t)
             (inhibit-read-only t)
-            (inhibit-modification-hooks t)
-            deactivate-mark
-            ;; Avoid setting and removing file locks and checking
-            ;; buffer's uptodate-ness w.r.t the underlying file.
-            buffer-file-name
-            buffer-file-truename)
+            (inhibit-modification-hooks t))
        (unwind-protect
            (progn
              ,@body)
@@ -3324,6 +3344,19 @@ The value returned is the value of the last form in BODY."
                  ,@body)
         (with-current-buffer ,old-buffer
           (set-case-table ,old-case-table))))))
+
+(defmacro with-file-modes (modes &rest body)
+  "Execute BODY with default file permissions temporarily set to MODES.
+MODES is as for `set-default-file-modes'."
+  (declare (indent 1) (debug t))
+  (let ((umask (make-symbol "umask")))
+    `(let ((,umask (default-file-modes)))
+       (unwind-protect
+           (progn
+             (set-default-file-modes ,modes)
+             ,@body)
+         (set-default-file-modes ,umask)))))
+
 \f
 ;;; Matching and match data.
 
@@ -3675,12 +3708,14 @@ and replace a sub-expression, e.g.
       (setq matches (cons (substring string start l) matches)) ; leftover
       (apply #'concat (nreverse matches)))))
 \f
-(defun string-prefix-p (str1 str2 &optional ignore-case)
-  "Return non-nil if STR1 is a prefix of STR2.
+(defun string-prefix-p (prefix string &optional ignore-case)
+  "Return non-nil if PREFIX is a prefix of STRING.
 If IGNORE-CASE is non-nil, the comparison is done without paying attention
 to case differences."
-  (eq t (compare-strings str1 nil nil
-                         str2 0 (length str1) ignore-case)))
+  (let ((prefix-length (length prefix)))
+    (if (> prefix-length (length string)) nil
+      (eq t (compare-strings prefix 0 prefix-length string
+                            0 prefix-length ignore-case)))))
 
 (defun string-suffix-p (suffix string  &optional ignore-case)
   "Return non-nil if SUFFIX is a suffix of STRING.
@@ -3844,7 +3879,9 @@ This function is called directly from the C code."
       ;; discard the file name regexp
       (mapc #'funcall (cdr a-l-element))))
   ;; Complain when the user uses obsolete files.
-  (when (string-match-p "/obsolete/[^/]*\\'" abs-file)
+  (when (save-match-data
+          (and (string-match "/obsolete/\\([^/]*\\)\\'" abs-file)
+               (not (equal "loaddefs.el" (match-string 1 abs-file)))))
     ;; Maybe we should just use display-warning?  This seems yucky...
     (let* ((file (file-name-nondirectory abs-file))
           (msg (format "Package %s is obsolete!"
@@ -3864,7 +3901,8 @@ This function is called directly from the C code."
            (byte-compile-log-warning msg))
        (run-with-timer 0 nil
                        (lambda (msg)
-                         (message "%s" msg)) msg))))
+                         (message "%s" msg))
+                        msg))))
 
   ;; Finally, run any other hook.
   (run-hook-with-args 'after-load-functions abs-file))
@@ -4181,7 +4219,8 @@ I is the index of the frame after FRAME2.  It should return nil
 if those frames don't seem special and otherwise, it should return
 the number of frames to skip (minus 1).")
 
-(defconst internal--call-interactively (symbol-function 'call-interactively))
+(defconst internal--funcall-interactively
+  (symbol-function 'funcall-interactively))
 
 (defun called-interactively-p (&optional kind)
   "Return t if the containing function was called by `call-interactively'.
@@ -4255,10 +4294,13 @@ command is called from a keyboard macro?"
       (pcase (cons frame nextframe)
         ;; No subr calls `interactive-p', so we can rule that out.
         (`((,_ ,(pred (lambda (f) (subrp (indirect-function f)))) . ,_) . ,_) nil)
-        ;; In case #<subr call-interactively> without going through the
-        ;; `call-interactively' symbol (bug#3984).
-        (`(,_ . (t ,(pred (eq internal--call-interactively)) . ,_)) t)
-        (`(,_ . (t call-interactively . ,_)) t)))))
+        ;; In case #<subr funcall-interactively> without going through the
+        ;; `funcall-interactively' symbol (bug#3984).
+        (`(,_ . (t ,(pred (lambda (f)
+                            (eq internal--funcall-interactively
+                                (indirect-function f))))
+                   . ,_))
+         t)))))
 
 (defun interactive-p ()
   "Return t if the containing function was run directly by user input.
@@ -4319,6 +4361,7 @@ lookup sequence then continues."
     ;; Don't use letrec, because equal (in add/remove-hook) would get trapped
     ;; in a cycle.
     (fset clearfun
+          (suspicious-object
           (lambda ()
             (with-demoted-errors "set-transient-map PCH: %S"
               (unless (cond
@@ -4341,7 +4384,11 @@ lookup sequence then continues."
                        (t (funcall keep-pred)))
                 (internal-pop-keymap map 'overriding-terminal-local-map)
                 (remove-hook 'pre-command-hook clearfun)
-                (when on-exit (funcall on-exit))))))
+                 (when on-exit (funcall on-exit))
+                 ;; Comment out the fset if you want to debug the GC bug.
+;;;            (fset clearfun nil)
+;;;             (set clearfun nil)
+                 )))))
     (add-hook 'pre-command-hook clearfun)
     (internal-push-keymap map 'overriding-terminal-local-map)))
 
@@ -4755,6 +4802,21 @@ which is higher than \"1alpha\", which is higher than \"1snapshot\".
 Also, \"-GIT\", \"-CVS\" and \"-NNN\" are treated as snapshot versions."
   (version-list-= (version-to-list v1) (version-to-list v2)))
 
+(defvar package--builtin-versions
+  ;; Mostly populated by loaddefs.el via autoload-builtin-package-versions.
+  (purecopy `((emacs . ,(version-to-list emacs-version))))
+  "Alist giving the version of each versioned builtin package.
+I.e. each element of the list is of the form (NAME . VERSION) where
+NAME is the package name as a symbol, and VERSION is its version
+as a list.")
+
+(defun package--description-file (dir)
+  (concat (let ((subdir (file-name-nondirectory
+                         (directory-file-name dir))))
+            (if (string-match "\\([^.].*?\\)-\\([0-9]+\\(?:[.][0-9]+\\|\\(?:pre\\|beta\\|alpha\\)[0-9]+\\)*\\)" subdir)
+                (match-string 1 subdir) subdir))
+          "-pkg.el"))
+
 \f
 ;;; Misc.
 (defconst menu-bar-separator '("--")
index 9b6cd75b3138262d2685b512fe7ef76b70fa6b17..15be01dcdf9e84933487ed957c334637d51da4ab 100644 (file)
@@ -611,11 +611,7 @@ function or string that is used by `\\[tempo-complete-tag]' to find a
 string to match the tag against.  It has the same definition as the
 variable `tempo-match-finder'.  In this version, supplying a
 COMPLETION-FUNCTION just sets `tempo-match-finder' locally."
-  (let ((old (assq tag-list tempo-local-tags)))
-    (if old
-       (setcdr old completion-function)
-      (setq tempo-local-tags (cons (cons tag-list completion-function)
-                                  tempo-local-tags))))
+  (setf (alist-get tag-list tempo-local-tags) completion-function)
   (if completion-function
       (setq tempo-match-finder completion-function))
   (tempo-invalidate-collection))
index f361b983e482ece0699d0004ee8313c5007fa75e..282dfe2ea80392bb2d881162401fb7821660c21e 100644 (file)
 ;;  full advantage of this package
 ;;
 ;;  (add-hook 'term-mode-hook
-;;               (function
-;;                (lambda ()
-;;                      (setq term-prompt-regexp "^[^#$%>\n]*[#$%>] *")
-;;                      (make-local-variable 'mouse-yank-at-point)
-;;                      (make-local-variable 'transient-mark-mode)
-;;                      (setq mouse-yank-at-point t)
-;;                      (setq transient-mark-mode nil)
-;;                      (auto-fill-mode -1)
-;;                      (setq tab-width 8 ))))
+;;           (function
+;;            (lambda ()
+;;                  (setq term-prompt-regexp "^[^#$%>\n]*[#$%>] *")
+;;                  (setq-local mouse-yank-at-point t)
+;;                  (setq-local transient-mark-mode nil)
+;;                  (auto-fill-mode -1)
+;;                  (setq tab-width 8 ))))
 ;;
 ;;
 ;;             ----------------------------------------
@@ -1254,16 +1252,7 @@ without any interpretation."
     (run-hooks 'mouse-leave-buffer-hook)
     (setq this-command 'yank)
     (mouse-set-point click)
-    (term-send-raw-string
-     ;; From `mouse-yank-primary':
-     (or (if (fboundp 'x-get-selection-value)
-             (if (eq system-type 'windows-nt)
-                 (or (x-get-selection 'PRIMARY)
-                     (x-get-selection-value))
-               (or (x-get-selection-value)
-                   (x-get-selection 'PRIMARY)))
-          (x-get-selection 'PRIMARY))
-        (error "No selection is available")))))
+    (term-send-raw-string (gui-get-primary-selection))))
 
 (defun term-paste ()
   "Insert the last stretch of killed text at point."
@@ -3635,7 +3624,7 @@ all pending output has been dealt with."))
            (if (< down 0) term-scroll-start term-scroll-end))))
     (when (or (and (< down 0) (< scroll-needed 0))
              (and (> down 0) (> scroll-needed 0)))
-      (let ((save-point (copy-marker (point))) (save-top))
+      (let ((save-point (point-marker)) (save-top))
        (goto-char term-home-marker)
        (cond (term-scroll-with-delete
               (if (< down 0)
index 9750da15c720abd2fcce8e5d8174c803ed490858..dc6899e3835fbddb84b20eba24a4cfb409903eb5 100644 (file)
@@ -22,8 +22,6 @@
 
 ;;; Commentary:
 
-;; Uses the Emacs 19 terminal initialization features --- won't work with 18.
-
 ;;; Code:
 
 (defun terminal-init-AT386 ()
index b8756c3873d8f1204f78381cfbeb58b5ecd2111a..b523063c0fd4bcc372076fc22968082c3d7f1c74 100644 (file)
@@ -5,9 +5,11 @@ See the end of the file for license conditions.
    This directory contains files of elisp that customize Emacs for certain
 terminal types.
 
-   When Emacs opens a new terminal, it checks the TERM environment variable to
-see what type of terminal the user is running on, searches for an elisp file
-named "term/${TERM}.el", and if one exists, loads it.  If Emacs finds no
+   When Emacs opens a new terminal, it checks the TERM environment variable
+to see what type of terminal the user is running on.  (If there is an entry
+for TERM in the `term-file-aliases' variable, Emacs uses the associated value
+in place of TERM in the following.)  Emacs searches for an elisp file named
+"term/${TERM}.el", and if one exists, loads it.  If Emacs finds no
 suitable file, then it strips the last hyphen and what follows it from TERM,
 and tries again.  If that still doesn't yield a file, then the previous hyphen
 is stripped, and so on until all hyphens are gone.  For example, if the
diff --git a/lisp/term/apollo.el b/lisp/term/apollo.el
deleted file mode 100644 (file)
index e4cabac..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-(defun terminal-init-apollo ()
-  "Terminal initialization function for apollo."
-  (tty-run-terminal-initialization (selected-frame) "vt100"))
-
-;;; apollo.el ends here
index ba59c75c4ec785d11bf6c4df8159cc2b9e313b51..d026ee8eabeb1efbc2a27e0fab76df437050d21f 100644 (file)
 
 ;;; Code:
 
-(defcustom x-select-enable-clipboard t
-  "Non-nil means cutting and pasting uses the clipboard.
-This is in addition to, but in preference to, the primary selection.
-
-Note that MS-Windows does not support selection types other than the
-clipboard.  (The primary selection that is set by Emacs is not
-accessible to other programs on MS-Windows.)
-
-This variable is not used by the Nextstep port."
-  :type 'boolean
-  :group 'killing
-  ;; The GNU/Linux version changed in 24.1, the MS-Windows version did not.
-  :version "24.1")
-
-(defvar x-last-selected-text)          ; w32-fns.el
-(declare-function w32-set-clipboard-data "w32select.c"
-                 (string &optional ignored))
-(defvar ns-last-selected-text)         ; ns-win.el
-(declare-function ns-set-pasteboard "ns-win" (string))
-
-(defvar x-select-enable-primary)       ; x-win.el
-(defvar x-last-selected-text-primary)
-(defvar x-last-selected-text-clipboard)
-(defvar saved-region-selection)        ; simple.el
-
-(defun x-select-text (text)
-  "Select TEXT, a string, according to the window system.
-
-On X, if `x-select-enable-clipboard' is non-nil, copy TEXT to the
-clipboard.  If `x-select-enable-primary' is non-nil, put TEXT in
-the primary selection.
-
-On MS-Windows, make TEXT the current selection.  If
-`x-select-enable-clipboard' is non-nil, copy the text to the
-clipboard as well.
-
-On Nextstep, put TEXT in the pasteboard (`x-select-enable-clipboard'
-is not used)."
-  (cond ((eq (framep (selected-frame)) 'w32)
-        (if x-select-enable-clipboard
-            (w32-set-clipboard-data text))
-        (setq x-last-selected-text text))
-       ((featurep 'ns)
-        ;; Don't send the pasteboard too much text.
-        ;; It becomes slow, and if really big it causes errors.
-        (ns-set-pasteboard text)
-        (setq ns-last-selected-text text))
-       (t
-        ;; With multi-tty, this function may be called from a tty frame.
-        (when (eq (framep (selected-frame)) 'x)
-          (when x-select-enable-primary
-            (x-set-selection 'PRIMARY text)
-            (setq x-last-selected-text-primary text))
-          (when x-select-enable-clipboard
-            ;; When cutting, the selection is cleared and PRIMARY set to
-            ;; the empty string.  Prevent that, PRIMARY should not be reset
-            ;; by cut (Bug#16382).
-            (setq saved-region-selection text)
-            (x-set-selection 'CLIPBOARD text)
-            (setq x-last-selected-text-clipboard text))))))
-
 ;;;; Function keys
 
 (defvar x-alternatives-map
@@ -117,9 +56,7 @@ is not used)."
         (set-keymap-parent map (keymap-parent local-function-key-map))
         (set-keymap-parent local-function-key-map map))
       (when (featurep 'ns)
-       (setq interprogram-cut-function 'x-select-text
-             interprogram-paste-function 'x-selection-value
-             system-key-alist
+       (setq system-key-alist
              (list
               ;; These are special "keys" used to pass events from C to lisp.
               (cons (logior (lsh 0 16)   1) 'ns-power-off)
index a58ff76aefee9785b8b658115cca786c96aff726..a1e459a1261ed21ccbe38d72a5c801103343e6e7 100644 (file)
@@ -22,8 +22,6 @@
 
 ;;; Commentary:
 
-;; Uses the Emacs 19 terminal initialization features --- won't work with 18.
-
 ;;; Code:
 
 (defun terminal-init-news ()
index 47d953aebfba76c9a1bef21ee0d7b798925148dc..1b7e0751492e709cd24d2b00bc5b4ac011bb8628 100644 (file)
@@ -736,28 +736,14 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
   (if (not (stringp string)) (error "Nonstring given to pasteboard"))
   (ns-store-selection-internal 'CLIPBOARD string))
 
-;; We keep track of the last text selected here, so we can check the
-;; current selection against it, and avoid passing back our own text
-;; from x-selection-value.
-(defvar ns-last-selected-text nil)
-
 ;; Return the value of the current Nextstep selection.  For
 ;; compatibility with older Nextstep applications, this checks cut
 ;; buffer 0 before retrieving the value of the primary selection.
-(defun x-selection-value ()
-  (let (text)
-    ;; Consult the selection.  Treat empty strings as if they were unset.
-    (or text (setq text (ns-get-pasteboard)))
-    (if (string= text "") (setq text nil))
-    (cond
-     ((not text) nil)
-     ((eq text ns-last-selected-text) nil)
-     ((string= text ns-last-selected-text)
-      ;; Record the newer string, so subsequent calls can use the `eq' test.
-      (setq ns-last-selected-text text)
-      nil)
-     (t
-      (setq ns-last-selected-text text)))))
+(gui-method-define gui-selection-value ns #'ns-selection-value)
+(defun ns-selection-value ()
+  ;; Consult the selection.  Treat empty strings as if they were unset.
+  (if gui-select-enable-clipboard
+      (ns-get-pasteboard)))
 
 (defun ns-copy-including-secondary ()
   (interactive)
@@ -959,10 +945,24 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
 
 ;; Any display name is OK.
 (add-to-list 'display-format-alist '(".*" . ns))
-(add-to-list 'handle-args-function-alist '(ns . x-handle-args))
-(add-to-list 'frame-creation-function-alist '(ns . x-create-frame-with-faces))
-(add-to-list 'window-system-initialization-alist '(ns . ns-initialize-window-system))
-
+(gui-method-define handle-args-function ns #'x-handle-args)
+(gui-method-define frame-creation-function ns #'x-create-frame-with-faces)
+(gui-method-define window-system-initialization ns
+                   #'ns-initialize-window-system)
+
+(declare-function ns-set-pasteboard "ns-win" (string))
+(gui-method-define gui-select-text ns
+                   (lambda (text)
+                     ;; Don't send the pasteboard too much text.
+                     ;; It becomes slow, and if really big it causes errors.
+                     (when gui-select-enable-clipboard
+                       (ns-set-pasteboard text))))
+
+(gui-method-define gui-own-selection ns #'ns-own-selection-internal)
+(gui-method-define gui-disown-selection ns #'ns-disown-selection-internal)
+(gui-method-define gui-selection-owner-p ns #'ns-selection-owner-p)
+(gui-method-define gui-selection-exists-p ns #'x-selection-exists-p)
+(gui-method-define gui-get-selection ns #'x-get-selection-internal) ;FIXME:name!
 
 (provide 'ns-win)
 
index f24a54fbe2889baab00a83177242efeb2e85186a..7c2b8d6dff0a976e370ccccadfa0e50aee7c9a7c 100644 (file)
@@ -219,146 +219,53 @@ the operating system.")
 ;
 ;;;; Selections
 ;
-;;; We keep track of the last text selected here, so we can check the
-;;; current selection against it, and avoid passing back our own text
-;;; from x-selection-value.
-(defvar x-last-selected-text nil)
-
-(defcustom x-select-enable-clipboard t
-  "Non-nil means cutting and pasting uses the clipboard.
-This is in addition to, but in preference to, the primary selection.
-
-Note that MS-Windows does not support selection types other than the
-clipboard.  (The primary selection that is set by Emacs is not
-accessible to other programs on MS-Windows.)
-
-This variable is not used by the Nextstep port."
-  :type 'boolean
-  :group 'killing)
-
-(defun x-select-text (text)
-  "Select TEXT, a string, according to the window system.
-
-On X, if `x-select-enable-clipboard' is non-nil, copy TEXT to the
-clipboard.  If `x-select-enable-primary' is non-nil, put TEXT in
-the primary selection.
-
-On MS-Windows, make TEXT the current selection.  If
-`x-select-enable-clipboard' is non-nil, copy the text to the
-clipboard as well.
-
-On Nextstep, put TEXT in the pasteboard (`x-select-enable-clipboard'
-is not used)."
-  (if x-select-enable-clipboard
-      (w16-set-clipboard-data text))
-  (setq x-last-selected-text text))
-
-(defun x-get-selection-value ()
+(defun w16-get-selection-value ()
   "Return the value of the current selection.
 Consult the selection.  Treat empty strings as if they were unset."
-  (if x-select-enable-clipboard
-      (let (text)
-       ;; Don't die if x-get-selection signals an error.
-       (with-demoted-errors "w16-get-clipboard-data:%s"
-          (setq text (w16-get-clipboard-data)))
-       (if (string= text "") (setq text nil))
-       (cond
-        ((not text) nil)
-        ((eq text x-last-selected-text) nil)
-        ((string= text x-last-selected-text)
-         ;; Record the newer string, so subsequent calls can use the 'eq' test.
-         (setq x-last-selected-text text)
-         nil)
-        (t
-         (setq x-last-selected-text text))))))
-
-;; x-selection-owner-p is used in simple.el.
-(defun x-selection-owner-p (&optional _selection _terminal)
-  "Whether the current Emacs process owns the given X Selection.
-The arg should be the name of the selection in question, typically one of
-the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'.
-\(Those are literal upper-case symbol names, since that's what X expects.)
-For convenience, the symbol nil is the same as `PRIMARY',
-and t is the same as `SECONDARY'.
-
-TERMINAL should be a terminal object or a frame specifying the X
-server to query.  If omitted or nil, that stands for the selected
-frame's display, or the first available X display.
-
-On Nextstep, TERMINAL is unused.
-
-\(fn &optional SELECTION TERMINAL)"
-    (if x-select-enable-clipboard
-      (let (text)
-       ;; Don't die if w16-get-clipboard-data signals an error.
-       (ignore-errors
-         (setq text (w16-get-clipboard-data)))
-       ;; We consider ourselves the owner of the selection if it does
-       ;; not exist, or exists and compares equal with the last text
-       ;; we've put into the Windows clipboard.
-       (cond
-        ((not text) t)
-        ((or (eq text x-last-selected-text)
-             (string= text x-last-selected-text))
-         text)
-        (t nil)))))
-
-;; x-own-selection-internal and x-disown-selection-internal are used
-;; in select.el:x-set-selection.
-(defun x-own-selection-internal (_selection value &optional _frame)
-  "Assert an X selection of the type SELECTION with and value VALUE.
-SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'.
-\(Those are literal upper-case symbol names, since that's what X expects.)
-VALUE is typically a string, or a cons of two markers, but may be
-anything that the functions on `selection-converter-alist' know about.
-
-FRAME should be a frame that should own the selection.  If omitted or
-nil, it defaults to the selected frame.
-
-On Nextstep, FRAME is unused.
-
-\(fn SELECTION VALUE &optional FRAME)"
-  (ignore-errors
-    (x-select-text value))
-  value)
-
-(defun x-disown-selection-internal (selection &optional _time-object _terminal)
-  "If we own the selection SELECTION, disown it.
-Disowning it means there is no such selection.
-
-Sets the last-change time for the selection to TIME-OBJECT (by default
-the time of the last event).
-
-TERMINAL should be a terminal object or a frame specifying the X
-server to query.  If omitted or nil, that stands for the selected
-frame's display, or the first available X display.
-
-On Nextstep, the TIME-OBJECT and TERMINAL arguments are unused.
-On MS-DOS, all this does is return non-nil if we own the selection.
-
-\(fn SELECTION &optional TIME-OBJECT TERMINAL)"
-  (if (x-selection-owner-p selection)
-      t))
-
-;; x-get-selection-internal is used in select.el
-(defun x-get-selection-internal (_selection-symbol _target-type
-                                                 &optional _time-stamp _terminal)
-  "Return text selected from some X window.
-SELECTION-SYMBOL is typically `PRIMARY', `SECONDARY', or `CLIPBOARD'.
-\(Those are literal upper-case symbol names, since that's what X expects.)
-TARGET-TYPE is the type of data desired, typically `STRING'.
-
-TIME-STAMP is the time to use in the XConvertSelection call for foreign
-selections.  If omitted, defaults to the time for the last event.
-
-TERMINAL should be a terminal object or a frame specifying the X
-server to query.  If omitted or nil, that stands for the selected
-frame's display, or the first available X display.
-
-On Nextstep, TIME-STAMP and TERMINAL are unused.
-
-\(fn SELECTION-SYMBOL TARGET-TYPE &optional TIME-STAMP TERMINAL)"
-  (x-get-selection-value))
+  (if gui-select-enable-clipboard
+      ;; Don't die if x-get-selection signals an error.
+      (with-demoted-errors "w16-get-clipboard-data:%s"
+        (w16-get-clipboard-data))))
+
+;; gui-selection-owner-p is used in simple.el.
+(gui-method-define gui-selection-exists-p pc #'x-selection-exists-p)
+(gui-method-define gui-selection-owner-p pc #'w16-selection-owner-p)
+(defun w16-selection-owner-p (_selection)
+  ;; FIXME: Other systems don't obey gui-select-enable-clipboard here.
+  (if gui-select-enable-clipboard
+      (let ((text
+             ;; Don't die if w16-get-clipboard-data signals an error.
+             (ignore-errors
+               (w16-get-clipboard-data))))
+        ;; We consider ourselves the owner of the selection
+        ;; if it does not exist, or exists and compares
+        ;; equal with the last text we've put into the
+        ;; Windows clipboard.
+        (cond
+         ((not text) t)
+         ((or (eq text gui-last-selected-text)
+              (string= text gui-last-selected-text))
+          text)
+         (t nil)))))
+
+;; gui-own-selection and gui-disown-selection are used in gui-set-selection.
+(gui-method-define gui-own-selection pc
+                   (lambda (_selection value)
+                     ;; FIXME: Other systems don't obey
+                     ;; gui-select-enable-clipboard here.
+                     (ignore-errors
+                       (w16--select-text value))
+                     value))
+
+(gui-method-define gui-disown-selection pc
+                   (lambda (selection &optional _time-object _terminal)
+                     (if (w16-selection-owner-p selection)
+                         t)))
+
+;; gui-get-selection is used in select.el
+(gui-method-define gui-get-selection pc
+                   (lambda (selection-symbol target-type)
+                     (w16-get-selection-value)))
 
 ;; From src/fontset.c:
 (fset 'query-fontset 'ignore)
@@ -463,20 +370,27 @@ Errors out because it is not supposed to be called, ever."
   (setq split-window-keep-point t)
   ;; Arrange for the kill and yank functions to set and check the
   ;; clipboard.
-  (setq interprogram-cut-function 'x-select-text)
-  (setq interprogram-paste-function 'x-get-selection-value)
   (menu-bar-enable-clipboard)
   (run-hooks 'terminal-init-msdos-hook))
 
 ;; frame-creation-function-alist is examined by frame.el:make-frame.
-(add-to-list 'frame-creation-function-alist
-            '(pc . msdos-create-frame-with-faces))
+(gui-method-define frame-creation-function
+                   pc #'msdos-create-frame-with-faces)
 ;; window-system-initialization-alist is examined by startup.el:command-line.
-(add-to-list 'window-system-initialization-alist
-            '(pc . msdos-initialize-window-system))
+(gui-method-define window-system-initialization
+                   pc #'msdos-initialize-window-system)
 ;; We don't need anything beyond tty-handle-args for handling
 ;; command-line argument; see startup.el.
-(add-to-list 'handle-args-function-alist '(pc . tty-handle-args))
+(gui-method-define handle-args-function pc #'tty-handle-args)
+
+
+(declare-function w16-set-clipboard-data "w16select.c"
+                 (string &optional ignored))
+(gui-method-define gui-select-text pc #'w16--select-text)
+(gui-method-define gui-selection-value pc #'w16-get-selection-value)
+(defun w16--select-text (text)
+  (when gui-select-enable-clipboard
+    (w16-set-clipboard-data text)))
 
 ;; ---------------------------------------------------------------------------
 
index d37a695086ad1d717d2b3112dfb119a689abde34..69ddda80983c93969a1510e505b7d68750880d08 100644 (file)
@@ -1,12 +1,9 @@
-;; Treat a screen terminal similar to an xterm.
-(load "term/xterm")
-
-(declare-function xterm-register-default-colors "xterm" ())
+;;; screen.el --- terminal initialization for screen and tmux  -*- lexical-binding: t -*-
+;; Copyright (C) 1995, 2001-2014 Free Software Foundation, Inc.
 
 (defun terminal-init-screen ()
   "Terminal initialization function for screen."
-  ;; Use the xterm color initialization code.
-  (xterm-register-default-colors)
-  (tty-set-up-initial-frame-faces))
+  ;; Treat a screen terminal similar to an xterm.
+  (tty-run-terminal-initialization (selected-frame) "xterm"))
 
 ;; screen.el ends here
index 841d88d4e19da8e2083b77600fba6283fc07b1d9..3b77ab4640048ca5fbecb39a8f45c2a305542d59 100644 (file)
@@ -23,8 +23,6 @@
 
 ;;; Commentary:
 
-;; Uses the Emacs 19 terminal initialization features --- won't work with 18.
-
 ;;; Code:
 
 (defvar tvi970-terminal-map
index 19e64d2bd90a1c52ece13fbe729064324b402124..6761e83891e17462ac41074ce2bd5e5e480954db 100644 (file)
@@ -22,8 +22,6 @@
 
 ;;; Commentary:
 
-;; Uses the Emacs 19 terminal initialization features --- won't work with 18.
-
 ;; Handles all VT100 clones, including the Apollo terminal.  Also handles
 ;; the VT200 --- its PF- and arrow- keys are different, but all those
 ;; are really set up by the terminal initialization code, which mines them
diff --git a/lisp/term/vt102.el b/lisp/term/vt102.el
deleted file mode 100644 (file)
index 261b0bb..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-
-(defun terminal-init-vt102 ()
-  "Terminal initialization function for vt102."
-  (tty-run-terminal-initialization (selected-frame) "vt100"))
-
-;;; vt102.el ends here
diff --git a/lisp/term/vt125.el b/lisp/term/vt125.el
deleted file mode 100644 (file)
index 2b2098d..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-
-(defun terminal-init-vt125 ()
-  "Terminal initialization function for vt125."
-  (tty-run-terminal-initialization (selected-frame) "vt100"))
-
-;;; vt125.el ends here
diff --git a/lisp/term/vt201.el b/lisp/term/vt201.el
deleted file mode 100644 (file)
index a65b473..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-;; For our purposes we can treat the vt200 and vt100 almost alike.
-;; Most differences are handled by the termcap entry.
-(defun terminal-init-vt201 ()
-  "Terminal initialization function for vt201."
-  (tty-run-terminal-initialization (selected-frame) "vt100")
-  ;; Make F11 an escape key.
-  (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant.
-  (define-key local-function-key-map [f11] [?\e]))
-
-;;; vt201.el ends here
diff --git a/lisp/term/vt220.el b/lisp/term/vt220.el
deleted file mode 100644 (file)
index 0dd4335..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-;; For our purposes we can treat the vt200 and vt100 almost alike.
-;; Most differences are handled by the termcap entry.
-(defun terminal-init-vt220 ()
-  "Terminal initialization function for vt220."
-  (tty-run-terminal-initialization (selected-frame) "vt100")
-  ;; Make F11 an escape key.
-  (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant.
-  (define-key local-function-key-map [f11] [?\e]))
-
-;;; vt220.el ends here
diff --git a/lisp/term/vt240.el b/lisp/term/vt240.el
deleted file mode 100644 (file)
index b58d421..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-;; For our purposes we can treat the vt200 and vt100 almost alike.
-;; Most differences are handled by the termcap entry.
-(defun terminal-init-vt240 ()
-  "Terminal initialization function for vt240."
-  (tty-run-terminal-initialization (selected-frame) "vt100")
-  ;; Make F11 an escape key.
-  (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant.
-  (define-key local-function-key-map [f11] [?\e]))
-
-;;; vt240.el ends here
diff --git a/lisp/term/vt300.el b/lisp/term/vt300.el
deleted file mode 100644 (file)
index a266455..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-(defun terminal-init-vt300 ()
-  "Terminal initialization function for vt300."
-  (tty-run-terminal-initialization (selected-frame) "vt100")
-  ;; Make F11 an escape key.
-  (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant.
-  (define-key local-function-key-map [f11] [?\e]))
-
-;;; vt300.el ends here
diff --git a/lisp/term/vt320.el b/lisp/term/vt320.el
deleted file mode 100644 (file)
index 08ed9a8..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-(defun terminal-init-vt320 ()
-  "Terminal initialization function for vt320."
-  (tty-run-terminal-initialization (selected-frame) "vt100")
-  ;; Make F11 an escape key.
-  (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant.
-  (define-key local-function-key-map [f11] [?\e]))
-
-;;; vt320.el ends here
diff --git a/lisp/term/vt400.el b/lisp/term/vt400.el
deleted file mode 100644 (file)
index ad4a5fd..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-(defun terminal-init-vt400 ()
-  "Terminal initialization function for vt400."
-  (tty-run-terminal-initialization (selected-frame) "vt100")
-  ;; Make F11 an escape key.
-  (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant.
-  (define-key local-function-key-map [f11] [?\e]))
-
-;;; vt400.el ends here
diff --git a/lisp/term/vt420.el b/lisp/term/vt420.el
deleted file mode 100644 (file)
index f6745a3..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-(defun terminal-init-vt420 ()
-  "Terminal initialization function for vt420."
-  (tty-run-terminal-initialization (selected-frame) "vt100")
-  ;; Make F11 an escape key.
-  (define-key input-decode-map "\e[23~" [f11]) ;Probably redundant.
-  (define-key local-function-key-map [f11] [?\e]))
-
-;;; vt420.el ends here
index e103562ba7acc3586ce1a010f1f04a435d0ef139..5266a45eba7d8b11f45e9f6f718923dd6be07119 100644 (file)
@@ -205,9 +205,8 @@ European languages which are distributed with Windows as
 
 See the documentation of `create-fontset-from-fontset-spec' for the format.")
 
-(defun x-win-suspend-error ()
-  "Report an error when a suspend is attempted.
-This returns an error if any Emacs frames are X frames, or always under W32."
+(defun w32-win-suspend-error ()
+  "Report an error when a suspend is attempted."
   (error "Suspending an Emacs running under W32 makes no sense"))
 
 (defvar dynamic-library-alist)
@@ -353,7 +352,7 @@ This returns an error if any Emacs frames are X frames, or always under W32."
                 (cons '(reverse . t) default-frame-alist)))))
 
   ;; Don't let Emacs suspend under Windows.
-  (add-hook 'suspend-hook 'x-win-suspend-error)
+  (add-hook 'suspend-hook #'w32-win-suspend-error)
 
   ;; Turn off window-splitting optimization; w32 is usually fast enough
   ;; that this is only annoying.
@@ -371,9 +370,76 @@ This returns an error if any Emacs frames are X frames, or always under W32."
   (setq w32-initialized t))
 
 (add-to-list 'display-format-alist '("\\`w32\\'" . w32))
-(add-to-list 'handle-args-function-alist '(w32 . x-handle-args))
-(add-to-list 'frame-creation-function-alist '(w32 . x-create-frame-with-faces))
-(add-to-list 'window-system-initialization-alist '(w32 . w32-initialize-window-system))
+(gui-method-define handle-args-function w32 #'x-handle-args)
+(gui-method-define frame-creation-function w32
+                   #'x-create-frame-with-faces)
+(gui-method-define window-system-initialization w32
+                   #'w32-initialize-window-system)
+
+;;;; Selections
+
+(declare-function w32-set-clipboard-data "w32select.c"
+                 (string &optional ignored))
+(declare-function w32-get-clipboard-data "w32select.c")
+
+(defun w32--select-text (text)
+  (if gui-select-enable-clipboard (w32-set-clipboard-data text)))
+
+(defun w32--get-selection-value ()
+  "Return the value of the current selection.
+Consult the selection.  Treat empty strings as if they were unset."
+  (if gui-select-enable-clipboard
+      ;; Don't die if x-get-selection signals an error.
+      (with-demoted-errors "w32-get-clipboard-data:%S"
+        (w32-get-clipboard-data))))
+
+;; Arrange for the kill and yank functions to set and check the clipboard.
+(gui-method-define gui-select-text w32 #'w32--select-text)
+(gui-method-define gui-selection-value w32 #'w32--get-selection-value)
+
+(when (eq system-type 'windows-nt)
+  ;; Make copy&pasting in w32's console interact with the system's clipboard!
+  (gui-method-define gui-select-text t #'w32--select-text)
+  (gui-method-define gui-selection-value t #'w32--get-selection-value))
+
+;;; Fix interface to (X-specific) mouse.el
+(gui-method-define gui-own-selection w32
+                   (lambda (type value)
+                     (put 'x-selections (or type 'PRIMARY) data)))
+
+(gui-method-define gui-disown-selection w32
+                   (lambda (type)
+                     (put 'x-selections (or type 'PRIMARY) nil)))
+
+(gui-method-define gui-get-selection w32
+                   (lambda (&optional type _data-type)
+                     (get 'x-selections (or type 'PRIMARY))))
+
+;; gui-selection-owner-p is used in simple.el
+(gui-method-define gui-selection-owner-p w32
+                   (lambda (selection)
+                     (and (memq selection '(nil PRIMARY SECONDARY))
+                          (get 'x-selections (or selection 'PRIMARY)))))
+(gui-method-define gui-selection-exists-p w32 #'x-selection-exists-p)
+
+;; The "Windows" keys on newer keyboards bring up the Start menu
+;; whether you want it or not - make Emacs ignore these keystrokes
+;; rather than beep.
+(global-set-key [lwindow] 'ignore)
+(global-set-key [rwindow] 'ignore)
+
+(declare-function x-server-version "w32fns.c" (&optional terminal))
+
+(defun w32-version ()
+  "Return the MS-Windows version numbers.
+The value is a list of three integers: the major and minor version
+numbers, and the build number."
+  (x-server-version))
+
+(defun w32-using-nt ()
+  "Return non-nil if running on a Windows NT descendant.
+That includes all Windows systems except for 9X/Me."
+  (getenv "SystemRoot"))
 
 (provide 'w32-win)
 
index aa9ba43d3d79a859623030529670db55e374c09b..77c1655dfd1a526ed169e3aab9ffa119062b2cc3 100644 (file)
@@ -23,7 +23,6 @@
 
 ;;; Commentary:
 
-;; Uses the Emacs 19 terminal initialization features --- won't work with 18.
 ;; Rewritten for Emacs 19 by jimb,  January 1992
 ;; Cleaned up for new terminal package conventions by esr, March 1993
 ;; Should work well for Televideo TVI 925 although it's overkill.
index 964b91125539d283dca957d2bc9d59a6c03cb89b..4cbcf767c033875c23f7fdfffd3859c0d6cdd9ff 100644 (file)
@@ -1156,7 +1156,7 @@ as returned by `x-server-vendor'."
 
 ;; We keep track of the last text selected here, so we can check the
 ;; current selection against it, and avoid passing back our own text
-;; from x-selection-value.  We track both
+;; from x--selection-value.  We track both
 ;; separately in case another X application only sets one of them
 ;; we aren't fooled by the PRIMARY or CLIPBOARD selection staying the same.
 (defvar x-last-selected-text-clipboard nil
@@ -1217,91 +1217,81 @@ The value nil is the same as the list (UTF8_STRING COMPOUND_TEXT STRING)."
        (remove-text-properties 0 (length text) '(foreign-selection nil) text))
     text))
 
-(defvar x-select-enable-clipboard)     ; common-win
-
 ;; Return the value of the current X selection.
 ;; Consult the selection.  Treat empty strings as if they were unset.
 ;; If this function is called twice and finds the same text,
 ;; it returns nil the second time.  This is so that a single
 ;; selection won't be added to the kill ring over and over.
-(defun x-selection-value ()
+(gui-method-define gui-selection-value x #'x--selection-value)
+(defun x--selection-value ()
   ;; With multi-tty, this function may be called from a tty frame.
-  (when (eq (framep (selected-frame)) 'x)
-    (let (clip-text primary-text)
-      (when x-select-enable-clipboard
-        (setq clip-text (x-selection-value-internal 'CLIPBOARD))
-        (if (string= clip-text "") (setq clip-text nil))
-
-        ;; Check the CLIPBOARD selection for 'newness', is it different
-        ;; from what we remembered them to be last time we did a
-        ;; cut/paste operation.
-        (setq clip-text
-              (cond ;; check clipboard
-               ((or (not clip-text) (string= clip-text ""))
-                (setq x-last-selected-text-clipboard nil))
-               ((eq      clip-text x-last-selected-text-clipboard) nil)
-               ((string= clip-text x-last-selected-text-clipboard)
-                ;; Record the newer string,
-                ;; so subsequent calls can use the `eq' test.
-                (setq x-last-selected-text-clipboard clip-text)
-                nil)
-               (t (setq x-last-selected-text-clipboard clip-text)))))
-
-      (when x-select-enable-primary
-       (setq primary-text (x-selection-value-internal 'PRIMARY))
-       ;; Check the PRIMARY selection for 'newness', is it different
-       ;; from what we remembered them to be last time we did a
-       ;; cut/paste operation.
-       (setq primary-text
-             (cond ;; check primary selection
-              ((or (not primary-text) (string= primary-text ""))
-               (setq x-last-selected-text-primary nil))
-              ((eq      primary-text x-last-selected-text-primary) nil)
-              ((string= primary-text x-last-selected-text-primary)
-               ;; Record the newer string,
-               ;; so subsequent calls can use the `eq' test.
-               (setq x-last-selected-text-primary primary-text)
-               nil)
-              (t
-               (setq x-last-selected-text-primary primary-text)))))
-
-      ;; As we have done one selection, clear this now.
-      (setq next-selection-coding-system nil)
-
-      ;; At this point we have recorded the current values for the
-      ;; selection from clipboard (if we are supposed to) and primary.
-      ;; So return the first one that has changed
-      ;; (which is the first non-null one).
-      ;;
-      ;; NOTE: There will be cases where more than one of these has
-      ;; changed and the new values differ.  This indicates that
-      ;; something like the following has happened since the last time
-      ;; we looked at the selections: Application X set all the
-      ;; selections, then Application Y set only one of them.
-      ;; In this case since we don't have
-      ;; timestamps there is no way to know what the 'correct' value to
-      ;; return is.  The nice thing to do would be to tell the user we
-      ;; saw multiple possible selections and ask the user which was the
-      ;; one they wanted.
-      (or clip-text primary-text)
-      )))
+  (let (clip-text primary-text)
+    (when x-select-enable-clipboard
+      (setq clip-text (x-selection-value-internal 'CLIPBOARD))
+      (if (string= clip-text "") (setq clip-text nil))
+
+      ;; Check the CLIPBOARD selection for 'newness', is it different
+      ;; from what we remembered them to be last time we did a
+      ;; cut/paste operation.
+      (setq clip-text
+            (cond ;; check clipboard
+             ((or (not clip-text) (string= clip-text ""))
+              (setq x-last-selected-text-clipboard nil))
+             ((eq      clip-text x-last-selected-text-clipboard) nil)
+             ((string= clip-text x-last-selected-text-clipboard)
+              ;; Record the newer string,
+              ;; so subsequent calls can use the `eq' test.
+              (setq x-last-selected-text-clipboard clip-text)
+              nil)
+             (t (setq x-last-selected-text-clipboard clip-text)))))
+
+    (when x-select-enable-primary
+      (setq primary-text (x-selection-value-internal 'PRIMARY))
+      ;; Check the PRIMARY selection for 'newness', is it different
+      ;; from what we remembered them to be last time we did a
+      ;; cut/paste operation.
+      (setq primary-text
+            (cond ;; check primary selection
+             ((or (not primary-text) (string= primary-text ""))
+              (setq x-last-selected-text-primary nil))
+             ((eq      primary-text x-last-selected-text-primary) nil)
+             ((string= primary-text x-last-selected-text-primary)
+              ;; Record the newer string,
+              ;; so subsequent calls can use the `eq' test.
+              (setq x-last-selected-text-primary primary-text)
+              nil)
+             (t
+              (setq x-last-selected-text-primary primary-text)))))
+
+    ;; As we have done one selection, clear this now.
+    (setq next-selection-coding-system nil)
+
+    ;; At this point we have recorded the current values for the
+    ;; selection from clipboard (if we are supposed to) and primary.
+    ;; So return the first one that has changed
+    ;; (which is the first non-null one).
+    ;;
+    ;; NOTE: There will be cases where more than one of these has
+    ;; changed and the new values differ.  This indicates that
+    ;; something like the following has happened since the last time
+    ;; we looked at the selections: Application X set all the
+    ;; selections, then Application Y set only one of them.
+    ;; In this case since we don't have
+    ;; timestamps there is no way to know what the 'correct' value to
+    ;; return is.  The nice thing to do would be to tell the user we
+    ;; saw multiple possible selections and ask the user which was the
+    ;; one they wanted.
+    (or clip-text primary-text)
+    ))
 
 (define-obsolete-function-alias 'x-cut-buffer-or-selection-value
   'x-selection-value "24.1")
 
 ;; Arrange for the kill and yank functions to set and check the clipboard.
-(setq interprogram-cut-function 'x-select-text)
-(setq interprogram-paste-function 'x-selection-value)
-
-;; Make paste from other applications use the decoding in x-select-request-type
-;; and not just STRING.
-(defun x-get-selection-value ()
-  "Get the current value of the PRIMARY selection.
-Request data types in the order specified by `x-select-request-type'."
-  (x-selection-value-internal 'PRIMARY))
 
 (defun x-clipboard-yank ()
   "Insert the clipboard contents, or the last stretch of killed text."
+  (declare (obsolete clipboard-yank "25.1"))
   (interactive "*")
   (let ((clipboard-text (x-selection-value-internal 'CLIPBOARD))
        (x-select-enable-clipboard t))
@@ -1327,9 +1317,9 @@ Request data types in the order specified by `x-select-request-type'."
 
 (defun x-win-suspend-error ()
   "Report an error when a suspend is attempted.
-This returns an error if any Emacs frames are X frames, or always under W32."
+This returns an error if any Emacs frames are X frames."
   ;; Don't allow suspending if any of the frames are X frames.
-  (if (memq 'x (mapcar 'window-system (frame-list)))
+  (if (memq 'x (mapcar #'window-system (frame-list)))
       (error "Cannot suspend Emacs while running under X")))
 
 (defvar x-initialized nil
@@ -1463,9 +1453,28 @@ This returns an error if any Emacs frames are X frames, or always under W32."
   (setq x-initialized t))
 
 (add-to-list 'display-format-alist '("\\`[^:]*:[0-9]+\\(\\.[0-9]+\\)?\\'" . x))
-(add-to-list 'handle-args-function-alist '(x . x-handle-args))
-(add-to-list 'frame-creation-function-alist '(x . x-create-frame-with-faces))
-(add-to-list 'window-system-initialization-alist '(x . x-initialize-window-system))
+(gui-method-define handle-args-function x #'x-handle-args)
+(gui-method-define frame-creation-function x #'x-create-frame-with-faces)
+(gui-method-define window-system-initialization x #'x-initialize-window-system)
+
+(defvar x-select-enable-primary)       ; x-win.el
+(gui-method-define gui-select-text x
+                   (lambda (text)
+                     (when x-select-enable-primary
+                       (gui-set-selection 'PRIMARY text)
+                       (setq x-last-selected-text-primary text))
+                     (when x-select-enable-clipboard
+                       ;; When cutting, the selection is cleared and PRIMARY
+                       ;; set to the empty string.  Prevent that, PRIMARY
+                       ;; should not be reset by cut (Bug#16382).
+                       (setq saved-region-selection text)
+                       (gui-set-selection 'CLIPBOARD text)
+                       (setq x-last-selected-text-clipboard text))))
+(gui-method-define gui-own-selection x #'x-own-selection-internal)
+(gui-method-define gui-disown-selection x #'x-disown-selection-internal)
+(gui-method-define gui-selection-owner-p x #'x-selection-owner-p)
+(gui-method-define gui-selection-exists-p x #'x-selection-exists-p)
+(gui-method-define gui-get-selection x #'x-get-selection-internal)
 
 ;; Initiate drag and drop
 (add-hook 'after-make-frame-functions 'x-dnd-init-frame)
index ba017e9938f75d08d8c1121b37be70e7648ab20e..1d085017214e6cbb2d4fe2cdd323fae7b80d98de 100644 (file)
@@ -43,10 +43,40 @@ The relevant features are:
   :type '(choice (const :tag "No" nil)
                  (const :tag "Check" check)
                  ;; NOTE: If you add entries here, make sure to update
-                 ;; `tocheck-capabilities' in `terminal-init-xterm' as well.
+                 ;; `terminal-init-xterm' as well.
                  (set (const :tag "modifyOtherKeys support" modifyOtherKeys)
                       (const :tag "report background" reportBackground))))
 
+(defconst xterm-paste-ending-sequence "\e[201~"
+  "Characters send by the terminal to end a bracketed paste.")
+
+(defun xterm-paste ()
+  "Handle the start of a terminal paste operation."
+  (interactive)
+  (let* ((end-marker-length (length xterm-paste-ending-sequence))
+         (pasted-text (with-temp-buffer
+                        (set-buffer-multibyte nil)
+                        (while (not (search-backward
+                                     xterm-paste-ending-sequence
+                                     (- (point) end-marker-length) t))
+                          (let ((event (read-event
+                                        nil nil
+                                        ;; Use finite timeout to avoid
+                                        ;; glomming the event onto
+                                        ;; this-command-keys.
+                                        most-positive-fixnum)))
+                            (when (eql event ?\r)
+                              (setf event ?\n))
+                            (insert event)))
+                        (let ((last-coding-system-used))
+                          (decode-coding-region
+                           (point-min) (point)
+                           (keyboard-coding-system) t))))
+         (interprogram-paste-function (lambda () pasted-text)))
+    (yank)))
+
+(define-key global-map [xterm-paste] #'xterm-paste)
+
 (defvar xterm-function-map
   (let ((map (make-sparse-keymap)))
 
@@ -248,6 +278,70 @@ The relevant features are:
     (define-key map "\eOx" [kp-8])
     (define-key map "\eOy" [kp-9])
 
+    (define-key map "\eO2j" [S-kp-multiply])
+    (define-key map "\eO2k" [S-kp-add])
+    (define-key map "\eO2l" [S-kp-separator])
+    (define-key map "\eO2m" [S-kp-subtract])
+    (define-key map "\eO2o" [S-kp-divide])
+    (define-key map "\eO2p" [S-kp-0])
+    (define-key map "\eO2q" [S-kp-1])
+    (define-key map "\eO2r" [S-kp-2])
+    (define-key map "\eO2s" [S-kp-3])
+    (define-key map "\eO2t" [S-kp-4])
+    (define-key map "\eO2u" [S-kp-5])
+    (define-key map "\eO2v" [S-kp-6])
+    (define-key map "\eO2w" [S-kp-7])
+    (define-key map "\eO2x" [S-kp-8])
+    (define-key map "\eO2y" [S-kp-9])
+
+    (define-key map "\eO4j" [M-S-kp-multiply])
+    (define-key map "\eO4k" [M-S-kp-add])
+    (define-key map "\eO4l" [M-S-kp-separator])
+    (define-key map "\eO4m" [M-S-kp-subtract])
+    (define-key map "\eO4o" [M-S-kp-divide])
+    (define-key map "\eO4p" [M-S-kp-0])
+    (define-key map "\eO4q" [M-S-kp-1])
+    (define-key map "\eO4r" [M-S-kp-2])
+    (define-key map "\eO4s" [M-S-kp-3])
+    (define-key map "\eO4t" [M-S-kp-4])
+    (define-key map "\eO4u" [M-S-kp-5])
+    (define-key map "\eO4v" [M-S-kp-6])
+    (define-key map "\eO4w" [M-S-kp-7])
+    (define-key map "\eO4x" [M-S-kp-8])
+    (define-key map "\eO4y" [M-S-kp-9])
+
+    (define-key map "\eO6j" [C-S-kp-multiply])
+    (define-key map "\eO6k" [C-S-kp-add])
+    (define-key map "\eO6l" [C-S-kp-separator])
+    (define-key map "\eO6m" [C-S-kp-subtract])
+    (define-key map "\eO6o" [C-S-kp-divide])
+    (define-key map "\eO6p" [C-S-kp-0])
+    (define-key map "\eO6q" [C-S-kp-1])
+    (define-key map "\eO6r" [C-S-kp-2])
+    (define-key map "\eO6s" [C-S-kp-3])
+    (define-key map "\eO6t" [C-S-kp-4])
+    (define-key map "\eO6u" [C-S-kp-5])
+    (define-key map "\eO6v" [C-S-kp-6])
+    (define-key map "\eO6w" [C-S-kp-7])
+    (define-key map "\eO6x" [C-S-kp-8])
+    (define-key map "\eO6y" [C-S-kp-9])
+
+    (define-key map "\eO8j" [C-M-S-kp-multiply])
+    (define-key map "\eO8k" [C-M-S-kp-add])
+    (define-key map "\eO8l" [C-M-S-kp-separator])
+    (define-key map "\eO8m" [C-M-S-kp-subtract])
+    (define-key map "\eO8o" [C-M-S-kp-divide])
+    (define-key map "\eO8p" [C-M-S-kp-0])
+    (define-key map "\eO8q" [C-M-S-kp-1])
+    (define-key map "\eO8r" [C-M-S-kp-2])
+    (define-key map "\eO8s" [C-M-S-kp-3])
+    (define-key map "\eO8t" [C-M-S-kp-4])
+    (define-key map "\eO8u" [C-M-S-kp-5])
+    (define-key map "\eO8v" [C-M-S-kp-6])
+    (define-key map "\eO8w" [C-M-S-kp-7])
+    (define-key map "\eO8x" [C-M-S-kp-8])
+    (define-key map "\eO8y" [C-M-S-kp-9])
+
     ;; These keys are available in xterm starting from version 216
     ;; if the modifyOtherKeys resource is set to 1.
     (dolist (bind '((5 9   [C-tab])
@@ -394,6 +488,11 @@ The relevant features are:
     (define-key map "\e[12~" [f2])
     (define-key map "\e[13~" [f3])
     (define-key map "\e[14~" [f4])
+
+    ;; Recognize the start of a bracketed paste sequence.  The handler
+    ;; internally recognizes the end.
+    (define-key map "\e[200~" [xterm-paste])
+    
     map)
   "Function key map overrides for xterm.")
 
@@ -463,9 +562,6 @@ The relevant features are:
     map)
   "Keymap of possible alternative meanings for some keys.")
 
-;; List of terminals for which modify-other-keys has been turned on.
-(defvar xterm-modify-other-keys-terminal-list nil)
-
 (defun xterm--report-background-handler ()
   (let ((str "")
         chr)
@@ -605,21 +701,23 @@ We run the first FUNCTION whose STRING matches the input events."
     (when (memq 'modifyOtherKeys xterm-extra-capabilities)
       (terminal-init-xterm-modify-other-keys)))
 
+  ;; Unconditionally enable bracketed paste mode: terminals that don't
+  ;; support it just ignore the sequence.
+  (terminal-init-xterm-bracketed-paste-mode)
+
   (run-hooks 'terminal-init-xterm-hook))
 
 (defun terminal-init-xterm-modify-other-keys ()
   "Terminal initialization for xterm's modifyOtherKeys support."
-  ;; Make sure that the modifyOtherKeys state is restored when
-  ;; suspending, resuming and exiting.
-  (add-hook 'suspend-hook 'xterm-turn-off-modify-other-keys)
-  (add-hook 'suspend-resume-hook 'xterm-turn-on-modify-other-keys)
-  (add-hook 'kill-emacs-hook 'xterm-remove-modify-other-keys)
-  (add-hook 'delete-terminal-functions 'xterm-remove-modify-other-keys)
-  ;; Add the selected frame to the list of frames that
-  ;; need to deal with modify-other-keys.
-  (push (frame-terminal)
-      xterm-modify-other-keys-terminal-list)
-  (xterm-turn-on-modify-other-keys))
+  (send-string-to-terminal "\e[>4;1m")
+  (push "\e[>4m" (terminal-parameter nil 'tty-mode-reset-strings))
+  (push "\e[>4;1m" (terminal-parameter nil 'tty-mode-set-strings)))
+
+(defun terminal-init-xterm-bracketed-paste-mode ()
+  "Terminal initialization for bracketed paste mode."
+  (send-string-to-terminal "\e[?2004h")
+  (push "\e[?2004l" (terminal-parameter nil 'tty-mode-reset-strings))
+  (push "\e[?2004h" (terminal-parameter nil 'tty-mode-set-strings)))
 
 ;; Set up colors, for those versions of xterm that support it.
 (defvar xterm-standard-colors
@@ -737,29 +835,6 @@ versions of xterm."
     ;; right colors, so clear them.
     (clear-face-cache)))
 
-(defun xterm-turn-on-modify-other-keys ()
-  "Turn the modifyOtherKeys feature of xterm back on."
-  (let ((terminal (frame-terminal)))
-    (when (and (terminal-live-p terminal)
-              (memq terminal xterm-modify-other-keys-terminal-list))
-      (send-string-to-terminal "\e[>4;1m" terminal))))
-
-(defun xterm-turn-off-modify-other-keys (&optional frame)
-  "Temporarily turn off the modifyOtherKeys feature of xterm."
-  (let ((terminal (when frame (frame-terminal frame))))
-    (when (and (terminal-live-p terminal)
-               (memq terminal xterm-modify-other-keys-terminal-list))
-      (send-string-to-terminal "\e[>4m" terminal))))
-
-(defun xterm-remove-modify-other-keys (&optional terminal)
-  "Turn off the modifyOtherKeys feature of xterm for good."
-  (setq terminal (or terminal (frame-terminal)))
-  (when (and (terminal-live-p terminal)
-            (memq terminal xterm-modify-other-keys-terminal-list))
-    (setq xterm-modify-other-keys-terminal-list
-         (delq terminal xterm-modify-other-keys-terminal-list))
-    (send-string-to-terminal "\e[>4m" terminal)))
-
 (defun xterm-maybe-set-dark-background-mode (redc greenc bluec)
   ;; Use the heuristic in `frame-set-background-mode' to decide if a
   ;; frame is dark.
index 8a99ff2926dda2b20e1dcaaffe1385c59b78bf54..3209980c015f31466e18deb7a9d1358c617500f1 100644 (file)
@@ -4840,7 +4840,7 @@ If optional arg MOVE is non-nil move point to end of field."
 If optional prefix JUSTIFY is non-nil justify as well.
 In BibTeX mode this function is bound to `fill-paragraph-function'."
   (interactive "*P")
-  (let ((pnt (copy-marker (point)))
+  (let ((pnt (point-marker))
         (bounds (bibtex-enclosing-field t)))
     (bibtex-fill-field-bounds bounds justify)
     (goto-char pnt)))
@@ -4852,7 +4852,7 @@ names appear in column `bibtex-field-indentation', field text starts in
 column `bibtex-text-indentation' and continuation lines start here, too.
 If `bibtex-align-at-equal-sign' is non-nil, align equal signs, too."
   (interactive "*")
-  (let ((pnt (copy-marker (point)))
+  (let ((pnt (point-marker))
         (beg (bibtex-beginning-of-entry)) ; move point
         bounds)
     (bibtex-delete-whitespace)
index 7a5bc8afeea4c95420a1c91d728cd1b38ab4c127..05e593ea70fe731c846c9591313e66e1c466b2a2 100644 (file)
@@ -311,8 +311,7 @@ unbalanced, but hey...)"
     (when (or (not arg) (= (prefix-numeric-value arg) 2))
       (modify-syntax-entry ?\" "." table))
     (set-syntax-table table)
-    (when font-lock-mode
-      (font-lock-fontify-buffer))))
+    (font-lock-flush)))
 
 
 (defun conf-outline-level ()
index 5cdae22cc0fc8070108bb2c158f48ce49c50517e..0fc6b4a9995a1daca9886e869540c0690da53536 100644 (file)
@@ -931,16 +931,14 @@ Otherwise returns the library directory name, if that is defined."
 (defun ispell-call-process (&rest args)
   "Like `call-process' but defend against bad `default-directory'."
   (let ((default-directory default-directory))
-    (unless (and (file-directory-p default-directory)
-                (file-readable-p default-directory))
+    (unless (file-accessible-directory-p default-directory)
       (setq default-directory (expand-file-name "~/")))
     (apply 'call-process args)))
 
 (defun ispell-call-process-region (&rest args)
   "Like `call-process-region' but defend against bad `default-directory'."
   (let ((default-directory default-directory))
-    (unless (and (file-directory-p default-directory)
-                (file-readable-p default-directory))
+    (unless (file-accessible-directory-p default-directory)
       (setq default-directory (expand-file-name "~/")))
     (apply 'call-process-region args)))
 
@@ -2939,8 +2937,7 @@ Keeps argument list for future Ispell invocations for no async support."
          (ispell-hunspell-fill-dictionary-entry ispell-current-dictionary)))
 
   (let* ((default-directory
-           (if (and (file-directory-p default-directory)
-                    (file-readable-p default-directory))
+           (if (file-accessible-directory-p default-directory)
                default-directory
              ;; Defend against bad `default-directory'.
              (expand-file-name "~/")))
@@ -2998,8 +2995,7 @@ Keeps argument list for future Ispell invocations for no async support."
           (if (or ispell-really-aspell
                   ispell-really-hunspell
                   ;; Protect against bad default-directory
-                  (not (and (file-directory-p default-directory)
-                            (file-readable-p default-directory)))
+                  (not (file-accessible-directory-p default-directory))
                   ;; Ispell and per-dir personal dicts available
                   (not (or (file-readable-p (concat default-directory
                                                     ".ispell_words"))
index ce69a64f4c0b5a8e183238b86415684aebe88704..2d7093ce81d9e60cfb02f7ee75e838c6fcc8aff7 100644 (file)
@@ -47,6 +47,7 @@
       (and (listp reftex-plug-into-AUCTeX)
            (nth which reftex-plug-into-AUCTeX))))
 
+;;;###autoload
 (defun reftex-arg-label (optional &optional prompt definition)
   "Use `reftex-label', `reftex-reference' or AUCTeX's code to insert label arg.
 What is being used depends upon `reftex-plug-into-AUCTeX'."
@@ -68,6 +69,7 @@ What is being used depends upon `reftex-plug-into-AUCTeX'."
         (LaTeX-add-labels label))
     (TeX-argument-insert label optional)))
 
+;;;###autoload
 (defun reftex-arg-cite (optional &optional prompt definition)
   "Use `reftex-citation' or AUCTeX's code to insert a cite-key macro argument.
 What is being used depends upon `reftex-plug-into-AUCTeX'."
@@ -85,6 +87,7 @@ What is being used depends upon `reftex-plug-into-AUCTeX'."
                         optional)))
 
 
+;;;###autoload
 (defun reftex-arg-index-tag (optional &optional prompt &rest args)
   "Prompt for an index tag with completion.
 This is the name of an index, not the entry."
@@ -104,6 +107,7 @@ This is the name of an index, not the entry."
       (setq tag (read-string prompt)))
     (TeX-argument-insert tag optional)))
 
+;;;###autoload
 (defun reftex-arg-index (optional &optional prompt &rest args)
   "Prompt for an index entry completing with known entries.
 Completion is specific for just one index, if the macro or a tag
@@ -138,6 +142,7 @@ argument identify one of multiple indices."
        (t "idx")))))
 
 (defvar LaTeX-label-function)
+;;;###autoload
 (defun reftex-plug-into-AUCTeX ()
   ;; Replace AUCTeX functions with RefTeX functions.
   ;; Which functions are replaced is controlled by the variable
@@ -162,6 +167,7 @@ argument identify one of multiple indices."
        (fboundp 'TeX-arg-index)
        (fset 'TeX-arg-index 'reftex-arg-index)))
 
+;;;###autoload
 (defun reftex-toggle-plug-into-AUCTeX ()
   "Toggle Interface between AUCTeX and RefTeX on and off."
   (interactive)
@@ -173,6 +179,7 @@ argument identify one of multiple indices."
       (message "RefTeX has been plugged into AUCTeX.")
     (message "RefTeX no longer interacts with AUCTeX.")))
 
+;;;###autoload
 (defun reftex-add-label-environments (entry-list)
   "Add label environment descriptions to `reftex-label-alist-style'.
 The format of ENTRY-LIST is exactly like `reftex-label-alist'.  See there
@@ -197,8 +204,10 @@ the label information is recompiled on next use."
           (push entry list)))
       (when changed
         (put reftex-docstruct-symbol 'reftex-label-alist-style list)))))
+;;;###autoload
 (defalias 'reftex-add-to-label-alist 'reftex-add-label-environments)
 
+;;;###autoload
 (defun reftex-add-section-levels (entry-list)
   "Add entries to the value of `reftex-section-levels'.
 The added values are kept local to the current document.  The format
@@ -219,9 +228,14 @@ of ENTRY-LIST is a list of cons cells (\"MACRONAME\" . LEVEL).  See
       (when changed
         (put reftex-docstruct-symbol 'reftex-section-levels list)))))
 
+;;;###autoload
 (defun reftex-notice-new-section ()
   (reftex-notice-new 1 'force))
 
 (provide 'reftex-auc)
 
 ;;; reftex-auc.el ends here
+
+;; Local Variables:
+;; generated-autoload-file: "reftex.el"
+;; End:
index a36fa17fca5ae3407b198c57022338ea02335b73..8ac0b0b360636d77d58074d6fab9266f7171f38c 100644 (file)
@@ -58,6 +58,7 @@
            ,@body)
        (set-syntax-table saved-syntax))))
 
+;;;###autoload
 (defun reftex-default-bibliography ()
   "Return the expanded value of variable `reftex-default-bibliography'.
 The expanded value is cached."
@@ -70,6 +71,7 @@ The expanded value is cached."
          reftex-default-bibliography))
   (get 'reftex-default-bibliography :reftex-expanded))
 
+;;;###autoload
 (defun reftex-bib-or-thebib ()
   "Test if BibTeX or \begin{thebibliography} should be used for the citation.
 Find the bof of the current file"
@@ -89,6 +91,7 @@ Find the bof of the current file"
         (if bib 'bib nil)
       (if thebib 'thebib nil))))
 
+;;;###autoload
 (defun reftex-get-bibfile-list ()
   "Return list of bibfiles for current document.
 When using the chapterbib or bibunits package you should either
@@ -112,6 +115,7 @@ Then this function will return the applicable database files."
    (error "\\bibliography statement missing or .bib files not found")))
 
 ;;; Find a certain reference in any of the BibTeX files.
+;;;###autoload
 (defun reftex-pop-to-bibtex-entry (key file-list &optional mark-to-kill
                                        highlight item return)
   "Find BibTeX KEY in any file in FILE-LIST in another window.
@@ -161,6 +165,7 @@ If RETURN is non-nil, just return the entry and restore point."
           (error "No \\bibitem with citation key %s" key)
         (error "No BibTeX entry with citation key %s" key)))))
 
+;;;###autoload
 (defun reftex-end-of-bib-entry (item)
   (save-excursion
     (condition-case nil
@@ -452,6 +457,7 @@ If FIELD is empty try \"editor\" field."
       (setq names (replace-match " " nil t names)))
     (split-string names "\n")))
 
+;;;###autoload
 (defun reftex-parse-bibtex-entry (entry &optional from to raw)
   "Parse BibTeX ENTRY.
 If ENTRY is nil then parse the entry in current buffer between FROM and TO.
@@ -604,6 +610,7 @@ If FORMAT is non-nil `format' entry accordingly."
 
 ;;; Make a citation
 
+;; NB this is a global autoload - see reftex.el.
 ;;;###autoload
 (defun reftex-citation (&optional no-insert format-key)
   "Make a citation using BibTeX database files.
@@ -787,11 +794,13 @@ in order to only add another reference in the same cite command."
           (error "No citation format associated with key `%c'" key)))))
     format))
 
+;;;###autoload
 (defun reftex-citep ()
   "Call `reftex-citation' with a format selector `?p'."
   (interactive)
   (reftex-citation nil ?p))
 
+;;;###autoload
 (defun reftex-citet ()
   "Call `reftex-citation' with a format selector `?t'."
   (interactive)
@@ -1058,6 +1067,7 @@ in order to only add another reference in the same cite command."
     (setq format (replace-match "" t t format)))
   format)
 
+;;;###autoload
 (defun reftex-make-cite-echo-string (entry docstruct-symbol)
   "Format a bibtex ENTRY for the echo area and cache the result."
   (let* ((key (reftex-get-bib-field "&key" entry))
@@ -1151,6 +1161,7 @@ recommended for follow mode.  It works OK for individual lookups."
                                                (string-match "^&" (car pair)))
                                              alist))))
 
+;;;###autoload
 (defun reftex-create-bibtex-file (bibfile)
   "Create a new BibTeX database BIBFILE with all entries referenced in document.
 The command prompts for a filename and writes the collected
@@ -1244,3 +1255,7 @@ created files in the variables `reftex-create-bibtex-header' or
 
 (provide 'reftex-cite)
 ;;; reftex-cite.el ends here
+
+;; Local Variables:
+;; generated-autoload-file: "reftex.el"
+;; End:
index dc7448cc993b3df3a427d91574d5eabab25dbf1a..a06492e475905cc21ba124c6267249586bac6dda 100644 (file)
@@ -30,6 +30,7 @@
 
 (require 'reftex)
 
+;;;###autoload
 (defun reftex-view-crossref (&optional arg auto-how fail-quietly)
   "View cross reference of macro at point.  Point must be on the KEY
 argument.  When at a `\\ref' macro, show corresponding `\\label'
@@ -220,6 +221,7 @@ to the functions `reftex-view-cr-cite' and `reftex-view-cr-ref'."
       (when (equal arg 2)
         (select-window pop-win)))))
 
+;;;###autoload
 (defun reftex-mouse-view-crossref (ev)
   "View cross reference of \\ref or \\cite macro where you click.
 If the macro at point is a \\ref, show the corresponding label definition.
@@ -318,6 +320,7 @@ With argument, actually select the window showing the cross reference."
   "Non-nil means use the idle timers in XEmacs for crossref display.
 Currently, idle timer restart is broken and we use the post-command-hook.")
 
+;;;###autoload
 (defun reftex-toggle-auto-view-crossref ()
   "Toggle the automatic display of crossref information in the echo area.
 When active, leaving point idle in the argument of a \\ref or \\cite macro
@@ -355,6 +358,7 @@ will display info in the echo area."
                             'reftex-view-crossref-when-idle
                             reftex-idle-time nil t))))
 
+;;;###autoload
 (defun reftex-view-crossref-from-bibtex (&optional arg)
   "View location in a LaTeX document which cites the BibTeX entry at point.
 Since BibTeX files can be used by many LaTeX documents, this function
@@ -482,3 +486,7 @@ Calling this function several times find successive citation locations."
 (provide 'reftex-dcr)
 
 ;;; reftex-dcr.el ends here
+
+;; Local Variables:
+;; generated-autoload-file: "reftex.el"
+;; End:
index 4311c99923eb47a553f92752f74f7928068be916..e16792ee703162fbf2f4e3a7100e026ca503517d 100644 (file)
@@ -29,6 +29,7 @@
 (require 'reftex)
 ;;;
 
+;;;###autoload
 (defun reftex-create-tags-file ()
   "Create TAGS file by running `etags' on the current document.
 The TAGS file is also immediately visited with `visit-tags-table'."
@@ -48,6 +49,7 @@ The TAGS file is also immediately visited with `visit-tags-table'."
 (defvar reftex-grep-command "grep -n "
   "Last grep command used in \\[reftex-grep-document]; default for next grep.")
 
+;;;###autoload
 (defun reftex-grep-document (grep-cmd)
   "Run grep query through all files related to this document.
 With prefix arg, force to rescan document.
@@ -64,6 +66,7 @@ No active TAGS table is required."
                   (mapconcat 'identity files " "))))
     (grep cmd)))
 
+;;;###autoload
 (defun reftex-search-document (&optional regexp)
   "Regexp search through all files of the current document.
 Starts always in the master file.  Stops when a match is found.
@@ -79,6 +82,7 @@ No active TAGS table is required."
     (reftex-access-scan-info current-prefix-arg)
     (tags-search regexp (list 'reftex-all-document-files))))
 
+;;;###autoload
 (defun reftex-query-replace-document (&optional from to delimited)
   "Do `query-replace-regexp' of FROM with TO over the entire document.
 Third arg DELIMITED (prefix arg) means replace only word-delimited matches.
@@ -100,6 +104,7 @@ No active TAGS table is required."
 (defvar TeX-master)
 (defvar isearch-next-buffer-function)
 
+;;;###autoload
 (defun reftex-find-duplicate-labels ()
   "Produce a list of all duplicate labels in the document."
 
@@ -158,6 +163,7 @@ No active TAGS table is required."
       (delete-window)
       (message "Document does not contain duplicate labels."))))
 
+;;;###autoload
 (defun reftex-change-label (&optional from to)
   "Run `query-replace-regexp' of FROM with TO in all macro arguments.
 Works on the entire multifile document.
@@ -177,6 +183,7 @@ No active TAGS table is required."
      (concat "{" (regexp-quote from) "}")
      (format "{%s}" to))))
 
+;;;###autoload
 (defun reftex-renumber-simple-labels ()
   "Renumber all simple labels in the document to make them sequentially.
 Simple labels are the ones created by RefTeX, consisting only of the
@@ -304,6 +311,7 @@ one with the `xr' package."
                  (t nil))))))))
     n))
 
+;;;###autoload
 (defun reftex-save-all-document-buffers ()
   "Save all documents associated with the current document.
 The function is useful after a global action like replacing or renumbering
@@ -414,6 +422,7 @@ Also checks if buffers visiting the files are in read-only mode."
       (when flist
        (find-file-noselect (car flist))))))
 
+;; NB this is a global autoload - see reftex.el.
 ;;;###autoload
 (defun reftex-isearch-minor-mode (&optional arg)
   "When on, isearch searches the whole document, not only the current file.
@@ -466,3 +475,7 @@ With no argument, this command toggles
                'reftex-isearch-minor-mode)
 
 ;;; reftex-global.el ends here
+
+;; Local Variables:
+;; generated-autoload-file: "reftex.el"
+;; End:
index 4a329b9999e59a98ebc4b9aef9f0fc579a42ba65..f6aa5239dea11b1a5968827a3d11cf4b27c9ad96 100644 (file)
@@ -35,6 +35,7 @@
 (defvar TeX-master)
 ;; END remove for XEmacs release
 
+;;;###autoload
 (defun reftex-index-selection-or-word (&optional arg phrase)
   "Put selection or the word near point into the default index macro.
 This uses the information in `reftex-index-default-macro' to make an index
@@ -87,6 +88,7 @@ which is part of AUCTeX, the string is first processed with the
         (delete-region beg end)
         (reftex-index def-char full-entry def-tag sel)))))
 
+;;;###autoload
 (defun reftex-index (&optional char key tag sel no-insert)
   "Query for an index macro and insert it along with its arguments.
 The index macros available are those defined in `reftex-index-macro' or
@@ -156,6 +158,7 @@ will prompt for other arguments."
                (member tag tag-list)))
       (put reftex-docstruct-symbol 'default-index-tag tag)))
 
+;;;###autoload
 (defun reftex-index-complete-tag (&optional itag opt-args)
   ;; Ask the user for a tag, completing on known tags.
   ;; ITAG is the argument number which contains the tag.
@@ -180,6 +183,7 @@ will prompt for other arguments."
     (reftex-update-default-index tag)
     tag))
 
+;;;###autoload
 (defun reftex-index-select-tag ()
   ;; Have the user select an index tag.
   ;; FIXME: should we cache tag-alist, prompt and help?
@@ -249,6 +253,7 @@ will prompt for other arguments."
             (error "No index tag associated with %c" rpl)))))
      (t (error "This should not happen (reftex-index-select-tag)")))))
 
+;;;###autoload
 (defun reftex-index-complete-key (&optional tag optional initial)
   ;; Read an index key, with completion.
   ;; Restrict completion table on index tag TAG.
@@ -434,6 +439,7 @@ _ ^        Add/Remove parent key (to make this item a subitem).
 } / {      Restrict Index to a single document section / Widen.
 < / >      When restricted, move restriction to previous/next section.")
 
+;;;###autoload
 (defun reftex-index-show-entry (data &optional no-revisit)
   ;; Find an index entry associated with DATA and display it highlighted
   ;; in another window.  NO-REVISIT means we are not allowed to visit
@@ -462,6 +468,7 @@ _ ^        Add/Remove parent key (to make this item a subitem).
       (reftex-highlight 0 (match-beginning 0) (match-end 0) (current-buffer)))
     match))
 
+;;;###autoload
 (defun reftex-display-index (&optional tag overriding-restriction redo
                                        &rest locations)
   "Display a buffer with an index compiled from the current document.
@@ -1244,6 +1251,7 @@ This gets refreshed in every phrases command.")
     table)
   "Syntax table for RefTeX Index Phrases mode.")
 
+;;;###autoload
 (defun reftex-index-phrase-selection-or-word (arg)
   "Add current selection or word at point to the phrases buffer.
 When you are in transient-mark-mode and the region is active, the
@@ -1258,6 +1266,7 @@ You get a chance to edit the entry in the phrases buffer - finish with
        (substitute-command-keys
         "Return to LaTeX with \\[reftex-index-phrases-save-and-return]"))))
 
+;;;###autoload
 (defun reftex-index-visit-phrases-buffer ()
   "Switch to the phrases buffer, initialize if empty."
   (interactive)
@@ -1345,6 +1354,7 @@ If the buffer is non-empty, delete the old header first."
 (defvar reftex-index-phrases-menu)
 (defvar reftex-index-phrases-marker)
 (defvar reftex-index-phrases-restrict-file nil)
+;; NB this is a global autoload - see reftex.el.
 ;;;###autoload
 (define-derived-mode reftex-index-phrases-mode fundamental-mode "Phrases"
   "Major mode for managing the Index phrases of a LaTeX document.
@@ -2096,3 +2106,7 @@ Does not do a save-excursion."
 (provide 'reftex-index)
 
 ;;; reftex-index.el ends here
+
+;; Local Variables:
+;; generated-autoload-file: "reftex.el"
+;; End:
index 71bec89a51dd2a77900539c3e2dad0d83c8f19c7..ce73939ac32bf6127f8861d39cbe06de372b7441 100644 (file)
              ,@body))
        (set-syntax-table saved-syntax))))
 
+;;;###autoload
 (defun reftex-parse-one ()
   "Re-parse this file."
   (interactive)
   (let ((reftex-enable-partial-scans t))
     (reftex-access-scan-info '(4))))
 
+;;;###autoload
 (defun reftex-parse-all ()
   "Re-parse entire document."
   (interactive)
   (reftex-access-scan-info '(16)))
 
+(defvar reftex--index-tags)
+
+;;;###autoload
 (defun reftex-do-parse (rescan &optional file)
   "Do a document rescan.
 When allowed, do only a partial scan from FILE."
@@ -72,7 +77,7 @@ When allowed, do only a partial scan from FILE."
          (file (or file (buffer-file-name)))
          (true-file (file-truename file))
          (bibview-cache (assq 'bibview-cache old-list))
-         (index-tags (cdr (assq 'index-tags old-list)))
+         (reftex--index-tags (cdr (assq 'index-tags old-list)))
          from-file appendix docstruct tmp)
 
     ;; Make sure replacement is really an option here
@@ -92,7 +97,7 @@ When allowed, do only a partial scan from FILE."
                 (t (error "This should not happen (reftex-do-parse)"))))
 
     ;; Reset index-tags if we scan everything
-    (if (equal rescan 1) (setq index-tags nil))
+    (if (equal rescan 1) (setq reftex--index-tags nil))
 
     ;; Find active toc entry and initialize section-numbers
     (setq reftex-active-toc (reftex-last-assoc-before-elt
@@ -137,11 +142,12 @@ When allowed, do only a partial scan from FILE."
            (entry (or (assq 'is-multi docstruct)
                       (car (push (list 'is-multi is-multi) docstruct)))))
       (setcdr entry (cons is-multi nil)))
-    (and index-tags (setq index-tags (sort index-tags 'string<)))
+    (and reftex--index-tags
+         (setq reftex--index-tags (sort reftex--index-tags 'string<)))
     (let ((index-tag-cell (assq 'index-tags docstruct)))
       (if index-tag-cell
-          (setcdr index-tag-cell index-tags)
-        (push (cons 'index-tags index-tags) docstruct)))
+          (setcdr index-tag-cell reftex--index-tags)
+        (push (cons 'index-tags reftex--index-tags) docstruct)))
     (unless (assq 'xr docstruct)
       (let* ((allxr (reftex-all-assq 'xr-doc docstruct))
              (alist (mapcar
@@ -165,11 +171,13 @@ When allowed, do only a partial scan from FILE."
     (set reftex-docstruct-symbol docstruct)
     (put reftex-docstruct-symbol 'modified t)))
 
+;;;###autoload
 (defun reftex-everything-regexp ()
   (if reftex-support-index
       reftex-everything-regexp
     reftex-everything-regexp-no-index))
 
+;; NB this is a global autoload - see reftex.el.
 ;;;###autoload
 (defun reftex-all-document-files (&optional relative)
   "Return a list of all files belonging to the current document.
@@ -189,8 +197,6 @@ of master file."
     (nreverse file-list)))
 
 ;; Bound in the caller, reftex-do-parse.
-(defvar index-tags)
-
 (defun reftex-parse-from-file (file docstruct master-dir)
   "Scan the buffer for labels and save them in a list."
   (let ((regexp (reftex-everything-regexp))
@@ -300,7 +306,7 @@ of master file."
                  (when reftex-support-index
                    (setq index-entry (reftex-index-info file))
                    (when index-entry
-                     (add-to-list 'index-tags (nth 1 index-entry))
+                     (add-to-list 'reftex--index-tags (nth 1 index-entry))
                      (push index-entry docstruct))))
 
                 ((match-end 11)
@@ -357,8 +363,9 @@ of master file."
       (member "biblatex" TeX-active-styles)
     ;; poor-man's check...
     (save-excursion
-      (re-search-forward "^[^%]*\\\\usepackage.*{biblatex}" nil t))))
+      (re-search-forward "^[^%\n]*?\\\\usepackage.*{biblatex}" nil t))))
 
+;;;###autoload
 (defun reftex-locate-bibliography-files (master-dir &optional files)
   "Scan buffer for bibliography macros and return file list."
   (unless files
@@ -421,6 +428,7 @@ This function also makes sure the old toc markers do not point anywhere."
           (setcdr (nthcdr (1- (length new)) new) (cdr eof-list)))
         new))))
 
+;;;###autoload
 (defun reftex-section-info (file)
   "Return a section entry for the current match.
 Careful: This function expects the match-data to be still in place!"
@@ -457,6 +465,7 @@ Careful: This function expects the match-data to be still in place!"
     (list 'toc "toc" text file marker level section-number
           literal (marker-position marker))))
 
+;;;###autoload
 (defun reftex-ensure-index-support (&optional abort)
   "When index support is turned off, ask to turn it on and
 set the current prefix argument so that `reftex-access-scan-info'
@@ -472,11 +481,13 @@ will rescan the entire document."
         (ding)
         (sit-for 1)))))
 
+;;;###autoload
 (defun reftex-index-info-safe (file)
   (reftex-with-special-syntax
    (reftex-index-info file)))
 
 (defvar test-dummy)
+;;;###autoload
 (defun reftex-index-info (file)
   "Return an index entry for the current match.
 Careful: This function expects the match-data to be still in place!"
@@ -525,6 +536,7 @@ Careful: This function expects the match-data to be still in place!"
       ;;       0        1       2      3   4   5  6      7       8      9
       (list 'index index-tag context file bom arg key showkey sortkey key-end))))
 
+;;;###autoload
 (defun reftex-short-context (env parse &optional bound derive)
   "Get about one line of useful context for the label definition at point."
 
@@ -585,6 +597,7 @@ Careful: This function expects the match-data to be still in place!"
     (t
      "INVALID VALUE OF PARSE"))))
 
+;;;###autoload
 (defun reftex-where-am-I ()
   "Return the docstruct entry above point.
 Actually returns a cons cell in which the cdr is a flag indicating
@@ -683,6 +696,7 @@ if the information is exact (t) or approximate (nil)."
             cnt 2))
     (cons rtn (eq cnt 1))))
 
+;;;###autoload
 (defun reftex-notice-new (&optional n force)
   "Hook to handshake with RefTeX after something new has been inserted."
   ;; Add a new entry to the docstruct list.  If it is a section, renumber
@@ -759,7 +773,7 @@ if the information is exact (t) or approximate (nil)."
              ;; Index entry
              (and reftex-support-index
                   (setq entry (reftex-index-info-safe buffer-file-name))
-                  ;; FIXME: (add-to-list 'index-tags (nth 1 index-entry))
+                  ;; FIXME: (add-to-list 'reftex--index-tags (nth 1 index-entry))
                   (push entry (cdr tail))))))))))
 
     (error nil))
@@ -781,11 +795,13 @@ in TeX."
     t)
    (t nil)))
 
+;;;###autoload
 (defun reftex-what-macro-safe (which &optional bound)
   "Call `reftex-what-macro' with special syntax table."
   (reftex-with-special-syntax
    (reftex-what-macro which bound)))
 
+;;;###autoload
 (defun reftex-what-macro (which &optional bound)
   "Find out if point is within the arguments of any TeX-macro.
 The return value is either (\"\\macro\" . (point)) or a list of them.
@@ -848,6 +864,7 @@ considered an argument of macro \\macro."
             (goto-char pos)))
         (nreverse cmd-list)))))
 
+;;;###autoload
 (defun reftex-what-environment (which &optional bound)
   "Find out if point is inside a LaTeX environment.
 The return value is (e.g.) either (\"equation\" . (point)) or a list of
@@ -885,6 +902,7 @@ this point.  If it is nil, limit to nearest \\section - like statement."
             (throw 'exit (cons env (point))))))
         (nreverse env-list)))))
 
+;;;###autoload
 (defun reftex-what-special-env (which &optional bound)
   "Run the special environment parsers and return the matches.
 
@@ -925,7 +943,7 @@ If WHICH is a list of environments, look only for those environments and
             specials
           (car specials))))))
 
-(defsubst reftex-move-to-next-arg (&optional ignore)
+(defsubst reftex-move-to-next-arg (&optional _ignore)
   "Assuming that we are at the end of a macro name or a macro argument,
 move forward to the opening parenthesis of the next argument.
 This function understands the splitting of macros over several lines
@@ -944,6 +962,7 @@ in TeX."
   (let ((entry (assoc key reftex-env-or-mac-alist)))
     (reftex-nth-arg (nth 5 entry) (nth 6 entry))))
 
+;;;###autoload
 (defun reftex-nth-arg (n &optional opt-args)
   "Return the Nth following {} or [] parentheses content.
 OPT-ARGS is a list of argument numbers which are optional."
@@ -982,6 +1001,7 @@ OPT-ARGS is a list of argument numbers which are optional."
           (reftex-context-substring)
         nil))))
 
+;;;###autoload
 (defun reftex-move-over-touching-args ()
   (condition-case nil
       (while (memq (following-char) '(?\[ ?\{))
@@ -1021,6 +1041,7 @@ When point is just after a { or [, limit string to matching parenthesis"
 ;; Variable holding the vector with section numbers
 (defvar reftex-section-numbers (make-vector reftex-max-section-depth 0))
 
+;;;###autoload
 (defun reftex-init-section-numbers (&optional toc-entry appendix)
   "Initialize the section numbers with zeros or with what is found in the TOC-ENTRY."
   (let* ((level  (or (nth 5 toc-entry) -1))
@@ -1039,6 +1060,7 @@ When point is just after a { or [, limit string to matching parenthesis"
       (decf i)))
   (put 'reftex-section-numbers 'appendix appendix))
 
+;;;###autoload
 (defun reftex-section-number (&optional level star)
   "Return a string with the current section number.
 When LEVEL is non-nil, increase section numbers on that level."
@@ -1107,3 +1129,7 @@ When LEVEL is non-nil, increase section numbers on that level."
 (provide 'reftex-parse)
 
 ;;; reftex-parse.el ends here
+
+;; Local Variables:
+;; generated-autoload-file: "reftex.el"
+;; End:
index f2fa815f47977fd0fa88a2c9988d2dc8c78ee531..ac01b6852ec5d8ca235ebd1d379963fb1a1a9932 100644 (file)
@@ -29,6 +29,7 @@
 (require 'reftex)
 (require 'reftex-parse)
 
+;;;###autoload
 (defun reftex-label-location (&optional bound)
   "Return the environment or macro which determines the label type at point.
 If optional BOUND is an integer, limit backward searches to that point."
@@ -62,6 +63,7 @@ If optional BOUND is an integer, limit backward searches to that point."
      (t ;; This should not happen, I think?
       "section"))))
 
+;;;###autoload
 (defun reftex-label-info-update (cell)
   ;; Update information about just one label in a different file.
   ;; CELL contains the old info list
@@ -92,6 +94,7 @@ If optional BOUND is an integer, limit backward searches to that point."
                 (append (reftex-label-info label file) (list note)))
             (list label typekey "" file "LOST LABEL.  RESCAN TO FIX.")))))))
 
+;;;###autoload
 (defun reftex-label-info (label &optional file bound derive env-or-mac)
   ;; Return info list on LABEL at point.
   (let* ((prefix (if (string-match "^[a-zA-Z0-9]+:" label)
@@ -118,6 +121,7 @@ If optional BOUND is an integer, limit backward searches to that point."
 
 ;;; Creating labels ---------------------------------------------------------
 
+;;;###autoload
 (defun reftex-label (&optional environment no-insert)
   "Insert a unique label.  Return the label.
 If ENVIRONMENT is given, don't bother to find out yourself.
@@ -398,6 +402,7 @@ also applies `reftex-translate-to-ascii-function' to the string."
  a / A      Put all marked entries into one/many \\ref commands.
  q / RET    Quit without referencing / Accept current label (also on mouse-2).")
 
+;;;###autoload
 (defun reftex-reference (&optional type no-insert cut)
   "Make a LaTeX reference.  Look only for labels of a certain TYPE.
 With prefix arg, force to rescan buffer for labels.  This should only be
@@ -705,6 +710,7 @@ When called with 2 C-u prefix args, disable magic word recognition."
             (file (nth 3 data)))
         (reftex-access-scan-info arg file)))))
 
+;;;###autoload
 (defun reftex-query-label-type ()
   ;; Ask for label type
   (let ((key (reftex-select-with-char
@@ -713,6 +719,7 @@ When called with 2 C-u prefix args, disable magic word recognition."
       (error "No such label type: %s" (char-to-string key)))
     (char-to-string key)))
 
+;;;###autoload
 (defun reftex-show-label-location (data forward no-revisit
                                         &optional stay error)
   ;; View the definition site of a label in another window.
@@ -833,10 +840,14 @@ package.\n\nThis is a generated function."
 Replace any occurrences of \"\\ref\" with REFSTYLE."
   ;; Replace instances of \ref in `fmt' with the special reference
   ;; style selected by the user.
-  (while (string-match "\\(\\\\ref\\)[ \t]*{" fmt)
-    (setq fmt (replace-match refstyle t t fmt 1)))
+  (cond
+   ((while (string-match "\\(\\\\ref\\)[ \t]*{" fmt)
+      (setq fmt (replace-match refstyle t t fmt 1))))
+   ((string-match "\\(\\\\[[:alpha:]]+\\)[ \t]*{" fmt)
+    (setq fmt (replace-match refstyle t t fmt 1))))
   (format fmt label))
 
+;;;###autoload
 (defun reftex-goto-label (&optional other-window)
   "Prompt for a label (with completion) and jump to the location of this label.
 Optional prefix argument OTHER-WINDOW goes to the label in another window."
@@ -867,3 +878,7 @@ Optional prefix argument OTHER-WINDOW goes to the label in another window."
 (provide 'reftex-ref)
 
 ;;; reftex-ref.el ends here
+
+;; Local Variables:
+;; generated-autoload-file: "reftex.el"
+;; End:
index f589abbc77875d51990e328075671189fe67e0b4..e1fc8bf908e2de46f3108e15a83609309efb5b41 100644 (file)
 This keymap can be used to configure the label selection process which is
 started with the command \\[reftex-reference].")
 
-(define-derived-mode reftex-select-label-mode fundamental-mode "LSelect"
+;;;###autoload
+(define-derived-mode reftex-select-label-mode special-mode "LSelect"
   "Major mode for selecting a label in a LaTeX document.
 This buffer was created with RefTeX.
 It only has a meaningful keymap when you are in the middle of a
@@ -147,7 +148,8 @@ During a selection process, these are the local bindings.
 This keymap can be used to configure the BibTeX selection process which is
 started with the command \\[reftex-citation].")
 
-(define-derived-mode reftex-select-bib-mode fundamental-mode "BSelect"
+;;;###autoload
+(define-derived-mode reftex-select-bib-mode special-mode "BSelect"
   "Major mode for selecting a citation key in a LaTeX document.
 This buffer was created with RefTeX.
 It only has a meaningful keymap when you are in the middle of a
@@ -188,6 +190,7 @@ During a selection process, these are the local bindings.
 ;;           (throw 'exit entry)))
 ;;     nil))))
 
+;;;###autoload
 (defun reftex-get-offset (buf here-am-I &optional typekey toc index file)
   ;; Find the correct offset data, like insert-docstruct would, but faster.
   ;; Buffer BUF knows the correct docstruct to use.
@@ -212,6 +215,7 @@ During a selection process, these are the local bindings.
               (throw 'exit (or lastentry entry))))
         nil))))
 
+;;;###autoload
 (defun reftex-insert-docstruct
   (buf toc labels index-entries files context counter show-commented
             here-I-am xr-prefix toc-buffer)
@@ -292,7 +296,7 @@ During a selection process, these are the local bindings.
           (setq to (point))
           (when font
             (put-text-property from to
-                               'face reftex-file-boundary-face))
+                               'font-lock-face reftex-file-boundary-face))
           (when toc-buffer
             (if mouse-face
                 (put-text-property from (1- to)
@@ -310,7 +314,7 @@ During a selection process, these are the local bindings.
           (setq to (point))
           (when font
             (put-text-property from to
-                               'face reftex-section-heading-face))
+                               'font-lock-face reftex-section-heading-face))
           (when toc-buffer
             (if mouse-face
                 (put-text-property from (1- to)
@@ -349,7 +353,7 @@ During a selection process, these are the local bindings.
             (setq to (point))
             (put-text-property
              (- (point) (length label)) to
-             'face (if comment
+             'font-lock-face (if comment
                        'font-lock-comment-face
                      label-face))
             (goto-char to))
@@ -379,14 +383,14 @@ During a selection process, these are the local bindings.
           (setq index-tag (format "<%s>" (nth 1 cell)))
           (and font
                (put-text-property 0 (length index-tag)
-                                  'face reftex-index-tag-face index-tag))
+                                  'font-lock-face reftex-index-tag-face index-tag))
           (insert label-indent index-tag " " (nth 7 cell))
 
           (when font
             (setq to (point))
             (put-text-property
              (- (point) (length (nth 7 cell))) to
-             'face index-face)
+             'font-lock-face index-face)
             (goto-char to))
           (insert "\n")
           (setq to (point))
@@ -412,6 +416,7 @@ During a selection process, these are the local bindings.
     (run-hooks 'reftex-display-copied-context-hook)
     offset))
 
+;;;###autoload
 (defun reftex-find-start-point (fallback &rest locations)
   ;; Set point to the first available LOCATION.  When a LOCATION is a list,
   ;; search for such a :data text property.  When it is an integer,
@@ -440,6 +445,7 @@ During a selection process, these are the local bindings.
 (defvar reftex-last-line nil)
 (defvar reftex-select-marked nil)
 
+;;;###autoload
 (defun reftex-select-item (reftex-select-prompt help-string keymap
                                   &optional offset
                                   call-back cb-flag)
@@ -684,7 +690,7 @@ Cycle in reverse order if optional argument REVERSE is non-nil."
           eoe (or (next-single-property-change (point) :data) (point-max)))
     (setq ovl (reftex-make-overlay boe eoe))
     (push (list data ovl separator) reftex-select-marked)
-    (reftex-overlay-put ovl 'face reftex-select-mark-face)
+    (reftex-overlay-put ovl 'font-lock-face reftex-select-mark-face)
     (reftex-overlay-put ovl 'before-string
                         (if separator
                             (format "*%c%d* " separator
@@ -737,3 +743,7 @@ Cycle in reverse order if optional argument REVERSE is non-nil."
 (provide 'reftex-sel)
 
 ;;; reftex-sel.el ends here
+
+;; Local Variables:
+;; generated-autoload-file: "reftex.el"
+;; End:
index 59f9de8811127b3b23a21ddd53db6347d4a4ff85..fab558ff2fbd99dabfd531dc015e4a0e2102b63b 100644 (file)
 (defvar reftex-toc-include-index-indicator nil)
 (defvar reftex-toc-max-level-indicator nil)
 
-(define-derived-mode reftex-toc-mode fundamental-mode "TOC"
+(define-derived-mode reftex-toc-mode special-mode "TOC"
   "Major mode for managing Table of Contents for LaTeX files.
 This buffer was created with RefTeX.
 Press `?' for a summary of important key bindings.
@@ -190,6 +190,7 @@ M-%        Global search and replace to rename label at point.
 x          Switch to TOC of external document (with LaTeX package `xr').
 z          Jump to a specific section (e.g. '3 z' goes to section 3).")
 
+;;;###autoload
 (defun reftex-toc (&optional rebuild reuse)
   "Show the table of contents for the current document.
 When called with a raw C-u prefix, rescan the document first."
@@ -240,13 +241,13 @@ When called with a raw C-u prefix, rescan the document first."
                 (< (window-height) (* 2 window-min-height)))
         (delete-other-windows))
 
-      (setq reftex-last-window-width (window-width)
+      (setq reftex-last-window-width (window-total-width)
             reftex-last-window-height (window-height))  ; remember
 
       (unless unsplittable
         (if reftex-toc-split-windows-horizontally
             (split-window-right
-             (floor (* (window-width)
+             (floor (* (window-total-width)
                        reftex-toc-split-windows-fraction)))
           (split-window-below
            (floor (* (window-height)
@@ -278,7 +279,7 @@ SPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help
 " (abbreviate-file-name reftex-last-toc-master)))
 
       (if (reftex-use-fonts)
-          (put-text-property (point-min) (point) 'face reftex-toc-header-face))
+          (put-text-property (point-min) (point) 'font-lock-face reftex-toc-header-face))
       (put-text-property (point-min) (point) 'intangible t)
       (put-text-property (point-min) (1+ (point-min)) 'xr-alist xr-alist)
 
@@ -319,6 +320,7 @@ SPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help
     (reftex-find-start-point (point) offset (get 'reftex-toc :reftex-line))
     (setq reftex-last-follow-point (point))))
 
+;;;###autoload
 (defun reftex-toc-recenter (&optional arg)
   "Display the TOC window and highlight line corresponding to current position."
   (interactive "P")
@@ -372,8 +374,8 @@ SPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help
 (defun reftex-re-enlarge ()
   "Enlarge window to a remembered size."
   (let ((count (if reftex-toc-split-windows-horizontally
-                  (- (or reftex-last-window-width (window-width))
-                     (window-width))
+                  (- (or reftex-last-window-width (window-total-width))
+                     (window-total-width))
                 (- (or reftex-last-window-height (window-height))
                    (window-height)))))
     (when (> count 0)
@@ -1009,6 +1011,7 @@ label prefix determines the wording of a reference."
        (let (current-prefix-arg)
          (reftex-toc-recenter))))
 
+;;;###autoload
 (defun reftex-toggle-auto-toc-recenter ()
   "Toggle the automatic recentering of the TOC window.
 When active, leaving point idle will make the TOC window jump to the correct
@@ -1088,3 +1091,7 @@ always show the current section in connection with the option
       (reftex-toggle-auto-toc-recenter))))
 
 ;;; reftex-toc.el ends here
+
+;; Local Variables:
+;; generated-autoload-file: "reftex.el"
+;; End:
index ec3ab712ce4f29a2f412dd956cb52ca86f61b9ca..31670a9186096a827dbabf339062f2a0addd1128 100644 (file)
 (require 'reftex-vars)
 
 
-;;; Autoloads
-
-;; Parser functions
-(autoload 'reftex-parse-one "reftex-parse"
-  "Re-parse this file." t)
-(autoload 'reftex-parse-all "reftex-parse"
-  "Re-parse entire document." t)
-(autoload 'reftex-do-parse "reftex-parse")
-(autoload 'reftex-where-am-I "reftex-parse")
-(autoload 'reftex-init-section-numbers "reftex-parse")
-(autoload 'reftex-section-info "reftex-parse")
-(autoload 'reftex-section-number "reftex-parse")
-(autoload 'reftex-what-macro "reftex-parse")
-(autoload 'reftex-what-macro-safe "reftex-parse")
-(autoload 'reftex-index-info "reftex-parse")
-(autoload 'reftex-index-info-safe "reftex-parse")
-(autoload 'reftex-short-context "reftex-parse")
-(autoload 'reftex-what-environment "reftex-parse")
-(autoload 'reftex-what-special-env "reftex-parse")
-(autoload 'reftex-move-over-touching-args "reftex-parse")
-(autoload 'reftex-notice-new "reftex-parse")
-(autoload 'reftex-nth-arg "reftex-parse")
-(autoload 'reftex-locate-bibliography-files "reftex-parse")
-(autoload 'reftex-ensure-index-support "reftex-parse")
-(autoload 'reftex-everything-regexp "reftex-parse")
-
-;; Labels and References
-(autoload 'reftex-label-location "reftex-ref")
-(autoload 'reftex-label-info-update "reftex-ref")
-(autoload 'reftex-label-info "reftex-ref")
-(autoload 'reftex-label "reftex-ref"
- "Insert a unique label." t)
-(autoload 'reftex-reference "reftex-ref"
- "Make a LaTeX reference." t)
+;;; Autoloads - see end for automatic autoloads
+
+;; We autoload tons of functions from these files, but some have
+;; a single function that needs to be globally autoloaded.
+;; The alternative is to use a Makefile rule + distinct autoload
+;; cookie (eg ;;;###reftex-autoload) for internal autoloads,
+;; as eg calendar/ does.  But that seemed like overkill for 4 functions.
+
+;;;###autoload(autoload 'reftex-citation "reftex-cite" nil t)
+;;;###autoload(autoload 'reftex-all-document-files "reftex-parse")
+;;;###autoload(autoload 'reftex-isearch-minor-mode "reftex-global" nil t)
+;;;###autoload(autoload 'reftex-index-phrases-mode "reftex-index" nil t)
+
+;; Generated functions.
 (autoload 'reftex-varioref-vref "reftex-ref"
   "Make a varioref reference." t)
 (autoload 'reftex-fancyref-fref "reftex-ref"
   "Make a fancyref \\fref reference." t)
 (autoload 'reftex-fancyref-Fref "reftex-ref"
   "Make a fancyref \\Fref reference." t)
-(autoload 'reftex-show-label-location "reftex-ref")
-(autoload 'reftex-query-label-type "reftex-ref")
-(autoload 'reftex-goto-label "reftex-ref"
-  "Prompt for label name and go to that location." t)
-
-;; Table of contents
-(autoload 'reftex-toc "reftex-toc"
-  "Show the table of contents for the current document." t)
-(autoload 'reftex-toc-recenter "reftex-toc"
-  "Display the TOC window and highlight line corresponding to current position." t)
-(autoload 'reftex-toggle-auto-toc-recenter "reftex-toc"
-  "Toggle automatic recentering of TOC window." t)
-
-;; BibTeX citations.
-(autoload 'reftex-citep "reftex-cite")
-(autoload 'reftex-citet "reftex-cite")
-(autoload 'reftex-make-cite-echo-string "reftex-cite")
-(autoload 'reftex-get-bibfile-list "reftex-cite")
-(autoload 'reftex-pop-to-bibtex-entry "reftex-cite")
-(autoload 'reftex-end-of-bib-entry "reftex-cite")
-(autoload 'reftex-parse-bibtex-entry "reftex-cite")
-(autoload 'reftex-citation "reftex-cite"
- "Make a citation using BibTeX database files." t)
-(autoload 'reftex-default-bibliography "reftex-cite")
-(autoload 'reftex-bib-or-thebib "reftex-cite")
-(autoload 'reftex-create-bibtex-file "reftex-cite"
-  "Create a new BibTeX database BIBFILE with all entries referenced in document."
-  t)
-
-;; Selection
-(autoload 'reftex-select-label-mode "reftex-sel")
-(autoload 'reftex-select-bib-mode "reftex-sel")
-(autoload 'reftex-find-start-point "reftex-sel")
-(autoload 'reftex-insert-docstruct "reftex-sel")
-(autoload 'reftex-get-offset "reftex-sel")
-(autoload 'reftex-select-item "reftex-sel")
-
-;; Index support
-(autoload 'reftex-index "reftex-index"
- "Query for an index macro and insert it along with its arguments." t)
-(autoload 'reftex-index-selection-or-word "reftex-index"
- "Put selection or the word near point into the default index macro." t)
-(autoload 'reftex-index-phrase-selection-or-word "reftex-index"
- "Put selection or the word near point into Index Phrases File." t)
-(autoload 'reftex-display-index "reftex-index"
- "Display a buffer with an index compiled from the current document." t)
-(autoload 'reftex-index-visit-phrases-buffer "reftex-index"
- "Visit the Index Phrases File." t)
-(autoload 'reftex-index-phrases-mode "reftex-index"
- "Major mode for managing the Index phrases of a LaTeX document." t)
-(autoload 'reftex-index-complete-tag "reftex-index")
-(autoload 'reftex-index-complete-key "reftex-index")
-(autoload 'reftex-index-show-entry "reftex-index")
-(autoload 'reftex-index-select-tag "reftex-index")
-
-;; View cross references
-(autoload 'reftex-view-crossref "reftex-dcr"
- "View cross reference of \\ref or \\cite macro at point." t)
-(autoload 'reftex-mouse-view-crossref "reftex-dcr"
- "View cross reference of \\ref or \\cite macro where you click." t)
-(autoload 'reftex-toggle-auto-view-crossref "reftex-dcr")
-(autoload 'reftex-view-crossref-from-bibtex "reftex-dcr"
- "View location in a LaTeX document which cites the BibTeX entry at point." t)
-
-;; Operations on entire Multifile documents
-(autoload 'reftex-create-tags-file "reftex-global"
- "Create TAGS file by running `etags' on the current document." t)
-(autoload 'reftex-grep-document "reftex-global"
- "Run grep query through all files related to this document." t)
-(autoload 'reftex-search-document "reftex-global"
- "Regexp search through all files of the current TeX document." t)
-(autoload 'reftex-query-replace-document "reftex-global"
- "Run a query-replace-regexp of FROM with TO over the entire TeX document." t)
-(autoload 'reftex-find-duplicate-labels "reftex-global"
- "Produce a list of all duplicate labels in the document." t)
-(autoload 'reftex-change-label "reftex-global"
- "Query replace FROM with TO in all \\label and \\ref commands." t)
-(autoload 'reftex-renumber-simple-labels "reftex-global"
- "Renumber all simple labels in the document to make them sequentially." t)
-(autoload 'reftex-save-all-document-buffers "reftex-global"
- "Save all documents associated with the current document." t)
-
-;; AUCTeX Interface
-(autoload 'reftex-arg-label "reftex-auc")
-(autoload 'reftex-arg-cite "reftex-auc")
-(autoload 'reftex-arg-index-tag "reftex-auc")
-(autoload 'reftex-arg-index "reftex-auc")
-(autoload 'reftex-plug-into-AUCTeX "reftex-auc")
-(autoload 'reftex-toggle-plug-into-AUCTeX "reftex-auc"
- "Toggle Interface between AUCTeX and RefTeX on and off." t)
-(autoload 'reftex-add-label-environments "reftex-auc")
-(autoload 'reftex-add-to-label-alist "reftex-auc")
-(autoload 'reftex-add-section-levels "reftex-auc")
-(autoload 'reftex-notice-new-section "reftex-auc")
-
 
 ;;; =========================================================================
 ;;;
@@ -2493,6 +2378,703 @@ Your bug report will be posted to the AUCTeX bug reporting list.
 ;;; That's it! ----------------------------------------------------------------
 
 (setq reftex-tables-dirty t)  ; in case this file is evaluated by hand
+
+\f
+;;; Start of automatically extracted autoloads.
+\f
+;;;### (autoloads nil "reftex-auc" "reftex-auc.el" "16f7e4bde671b5faee975a9ff10838e7")
+;;; Generated autoloads from reftex-auc.el
+
+(autoload 'reftex-arg-label "reftex-auc" "\
+Use `reftex-label', `reftex-reference' or AUCTeX's code to insert label arg.
+What is being used depends upon `reftex-plug-into-AUCTeX'.
+
+\(fn OPTIONAL &optional PROMPT DEFINITION)" nil nil)
+
+(autoload 'reftex-arg-cite "reftex-auc" "\
+Use `reftex-citation' or AUCTeX's code to insert a cite-key macro argument.
+What is being used depends upon `reftex-plug-into-AUCTeX'.
+
+\(fn OPTIONAL &optional PROMPT DEFINITION)" nil nil)
+
+(autoload 'reftex-arg-index-tag "reftex-auc" "\
+Prompt for an index tag with completion.
+This is the name of an index, not the entry.
+
+\(fn OPTIONAL &optional PROMPT &rest ARGS)" nil nil)
+
+(autoload 'reftex-arg-index "reftex-auc" "\
+Prompt for an index entry completing with known entries.
+Completion is specific for just one index, if the macro or a tag
+argument identify one of multiple indices.
+
+\(fn OPTIONAL &optional PROMPT &rest ARGS)" nil nil)
+
+(autoload 'reftex-plug-into-AUCTeX "reftex-auc" "\
+
+
+\(fn)" nil nil)
+
+(autoload 'reftex-toggle-plug-into-AUCTeX "reftex-auc" "\
+Toggle Interface between AUCTeX and RefTeX on and off.
+
+\(fn)" t nil)
+
+(autoload 'reftex-add-label-environments "reftex-auc" "\
+Add label environment descriptions to `reftex-label-alist-style'.
+The format of ENTRY-LIST is exactly like `reftex-label-alist'.  See there
+for details.
+This function makes it possible to support RefTeX from AUCTeX style files.
+The entries in ENTRY-LIST will be processed after the user settings in
+`reftex-label-alist', and before the defaults (specified in
+`reftex-default-label-alist-entries').  Any changes made to
+`reftex-label-alist-style' will raise a flag to the effect that
+the label information is recompiled on next use.
+
+\(fn ENTRY-LIST)" nil nil)
+
+(defalias 'reftex-add-to-label-alist 'reftex-add-label-environments)
+
+(autoload 'reftex-add-section-levels "reftex-auc" "\
+Add entries to the value of `reftex-section-levels'.
+The added values are kept local to the current document.  The format
+of ENTRY-LIST is a list of cons cells (\"MACRONAME\" . LEVEL).  See
+`reftex-section-levels' for an example.
+
+\(fn ENTRY-LIST)" nil nil)
+
+(autoload 'reftex-notice-new-section "reftex-auc" "\
+
+
+\(fn)" nil nil)
+
+;;;***
+\f
+;;;### (autoloads nil "reftex-cite" "reftex-cite.el" "43a70b713b3cd8a225f03431400e54e6")
+;;; Generated autoloads from reftex-cite.el
+
+(autoload 'reftex-default-bibliography "reftex-cite" "\
+Return the expanded value of variable `reftex-default-bibliography'.
+The expanded value is cached.
+
+\(fn)" nil nil)
+
+(autoload 'reftex-bib-or-thebib "reftex-cite" "\
+Test if BibTeX or \begin{thebibliography} should be used for the citation.
+Find the bof of the current file
+
+\(fn)" nil nil)
+
+(autoload 'reftex-get-bibfile-list "reftex-cite" "\
+Return list of bibfiles for current document.
+When using the chapterbib or bibunits package you should either
+use the same database files everywhere, or separate parts using
+different databases into different files (included into the mater file).
+Then this function will return the applicable database files.
+
+\(fn)" nil nil)
+
+(autoload 'reftex-pop-to-bibtex-entry "reftex-cite" "\
+Find BibTeX KEY in any file in FILE-LIST in another window.
+If MARK-TO-KILL is non-nil, mark new buffer to kill.
+If HIGHLIGHT is non-nil, highlight the match.
+If ITEM in non-nil, search for bibitem instead of database entry.
+If RETURN is non-nil, just return the entry and restore point.
+
+\(fn KEY FILE-LIST &optional MARK-TO-KILL HIGHLIGHT ITEM RETURN)" nil nil)
+
+(autoload 'reftex-end-of-bib-entry "reftex-cite" "\
+
+
+\(fn ITEM)" nil nil)
+
+(autoload 'reftex-parse-bibtex-entry "reftex-cite" "\
+Parse BibTeX ENTRY.
+If ENTRY is nil then parse the entry in current buffer between FROM and TO.
+If RAW is non-nil, keep double quotes/curly braces delimiting fields.
+
+\(fn ENTRY &optional FROM TO RAW)" nil nil)
+
+(autoload 'reftex-citation "reftex-cite" "\
+Make a citation using BibTeX database files.
+After prompting for a regular expression, scans the buffers with
+bibtex entries (taken from the \\bibliography command) and offers the
+matching entries for selection.  The selected entry is formatted according
+to `reftex-cite-format' and inserted into the buffer.
+
+If NO-INSERT is non-nil, nothing is inserted, only the selected key returned.
+
+FORMAT-KEY can be used to pre-select a citation format.
+
+When called with a `C-u' prefix, prompt for optional arguments in
+cite macros.  When called with a numeric prefix, make that many
+citations.  When called with point inside the braces of a `\\cite'
+command, it will add another key, ignoring the value of
+`reftex-cite-format'.
+
+The regular expression uses an expanded syntax: && is interpreted as `and'.
+Thus, `aaaa&&bbb' matches entries which contain both `aaaa' and `bbb'.
+While entering the regexp, completion on knows citation keys is possible.
+`=' is a good regular expression to match all entries in all files.
+
+\(fn &optional NO-INSERT FORMAT-KEY)" t nil)
+
+(autoload 'reftex-citep "reftex-cite" "\
+Call `reftex-citation' with a format selector `?p'.
+
+\(fn)" t nil)
+
+(autoload 'reftex-citet "reftex-cite" "\
+Call `reftex-citation' with a format selector `?t'.
+
+\(fn)" t nil)
+
+(autoload 'reftex-make-cite-echo-string "reftex-cite" "\
+Format a bibtex ENTRY for the echo area and cache the result.
+
+\(fn ENTRY DOCSTRUCT-SYMBOL)" nil nil)
+
+(autoload 'reftex-create-bibtex-file "reftex-cite" "\
+Create a new BibTeX database BIBFILE with all entries referenced in document.
+The command prompts for a filename and writes the collected
+entries to that file.  Only entries referenced in the current
+document with any \\cite-like macros are used.  The sequence in
+the new file is the same as it was in the old database.
+
+Entries referenced from other entries must appear after all
+referencing entries.
+
+You can define strings to be used as header or footer for the
+created files in the variables `reftex-create-bibtex-header' or
+`reftex-create-bibtex-footer' respectively.
+
+\(fn BIBFILE)" t nil)
+
+;;;***
+\f
+;;;### (autoloads nil "reftex-dcr" "reftex-dcr.el" "e90640fdd78f4404b29729bf7a5fce30")
+;;; Generated autoloads from reftex-dcr.el
+
+(autoload 'reftex-view-crossref "reftex-dcr" "\
+View cross reference of macro at point.  Point must be on the KEY
+argument.  When at a `\\ref' macro, show corresponding `\\label'
+definition, also in external documents (`xr').  When on a label, show
+a locations where KEY is referenced.  Subsequent calls find additional
+locations.  When on a `\\cite', show the associated `\\bibitem' macro or
+the BibTeX database entry.  When on a `\\bibitem', show a `\\cite' macro
+which uses this KEY. When on an `\\index', show other locations marked
+by the same index entry.
+To define additional cross referencing items, use the option
+`reftex-view-crossref-extra'.  See also `reftex-view-crossref-from-bibtex'.
+With one or two C-u prefixes, enforce rescanning of the document.
+With argument 2, select the window showing the cross reference.
+AUTO-HOW is only for the automatic crossref display and is handed through
+to the functions `reftex-view-cr-cite' and `reftex-view-cr-ref'.
+
+\(fn &optional ARG AUTO-HOW FAIL-QUIETLY)" t nil)
+
+(autoload 'reftex-mouse-view-crossref "reftex-dcr" "\
+View cross reference of \\ref or \\cite macro where you click.
+If the macro at point is a \\ref, show the corresponding label definition.
+If it is a \\cite, show the BibTeX database entry.
+If there is no such macro at point, search forward to find one.
+With argument, actually select the window showing the cross reference.
+
+\(fn EV)" t nil)
+
+(autoload 'reftex-toggle-auto-view-crossref "reftex-dcr" "\
+Toggle the automatic display of crossref information in the echo area.
+When active, leaving point idle in the argument of a \\ref or \\cite macro
+will display info in the echo area.
+
+\(fn)" t nil)
+
+(autoload 'reftex-view-crossref-from-bibtex "reftex-dcr" "\
+View location in a LaTeX document which cites the BibTeX entry at point.
+Since BibTeX files can be used by many LaTeX documents, this function
+prompts upon first use for a buffer in RefTeX mode.  To reset this
+link to a document, call the function with a prefix arg.
+Calling this function several times find successive citation locations.
+
+\(fn &optional ARG)" t nil)
+
+;;;***
+\f
+;;;### (autoloads nil "reftex-global" "reftex-global.el" "a773b46e8b751bca3a82c991f81b5fdd")
+;;; Generated autoloads from reftex-global.el
+
+(autoload 'reftex-create-tags-file "reftex-global" "\
+Create TAGS file by running `etags' on the current document.
+The TAGS file is also immediately visited with `visit-tags-table'.
+
+\(fn)" t nil)
+
+(autoload 'reftex-grep-document "reftex-global" "\
+Run grep query through all files related to this document.
+With prefix arg, force to rescan document.
+No active TAGS table is required.
+
+\(fn GREP-CMD)" t nil)
+
+(autoload 'reftex-search-document "reftex-global" "\
+Regexp search through all files of the current document.
+Starts always in the master file.  Stops when a match is found.
+To continue searching for next match, use command \\[tags-loop-continue].
+No active TAGS table is required.
+
+\(fn &optional REGEXP)" t nil)
+
+(autoload 'reftex-query-replace-document "reftex-global" "\
+Do `query-replace-regexp' of FROM with TO over the entire document.
+Third arg DELIMITED (prefix arg) means replace only word-delimited matches.
+If you exit (\\[keyboard-quit], RET or q), you can resume the query replace
+with the command \\[tags-loop-continue].
+No active TAGS table is required.
+
+\(fn &optional FROM TO DELIMITED)" t nil)
+
+(autoload 'reftex-find-duplicate-labels "reftex-global" "\
+Produce a list of all duplicate labels in the document.
+
+\(fn)" t nil)
+
+(autoload 'reftex-change-label "reftex-global" "\
+Run `query-replace-regexp' of FROM with TO in all macro arguments.
+Works on the entire multifile document.
+If you exit (\\[keyboard-quit], RET or q), you can resume the query replace
+with the command \\[tags-loop-continue].
+No active TAGS table is required.
+
+\(fn &optional FROM TO)" t nil)
+
+(autoload 'reftex-renumber-simple-labels "reftex-global" "\
+Renumber all simple labels in the document to make them sequentially.
+Simple labels are the ones created by RefTeX, consisting only of the
+prefix and a number.  After the command completes, all these labels will
+have sequential numbers throughout the document.  Any references to
+the labels will be changed as well.  For this, RefTeX looks at the
+arguments of any macros which either start or end in the string `ref'.
+This command should be used with care, in particular in multifile
+documents.  You should not use it if another document refers to this
+one with the `xr' package.
+
+\(fn)" t nil)
+
+(autoload 'reftex-save-all-document-buffers "reftex-global" "\
+Save all documents associated with the current document.
+The function is useful after a global action like replacing or renumbering
+labels.
+
+\(fn)" t nil)
+
+(autoload 'reftex-isearch-minor-mode "reftex-global" "\
+When on, isearch searches the whole document, not only the current file.
+This minor mode allows isearch to search through all the files of
+the current TeX document.
+
+With no argument, this command toggles
+`reftex-isearch-minor-mode'.  With a prefix argument ARG, turn
+`reftex-isearch-minor-mode' on if ARG is positive, otherwise turn it off.
+
+\(fn &optional ARG)" t nil)
+
+;;;***
+\f
+;;;### (autoloads nil "reftex-index" "reftex-index.el" "ccf53e4cdf1d7280e4cdb54d23e81854")
+;;; Generated autoloads from reftex-index.el
+
+(autoload 'reftex-index-selection-or-word "reftex-index" "\
+Put selection or the word near point into the default index macro.
+This uses the information in `reftex-index-default-macro' to make an index
+entry.  The phrase indexed is the current selection or the word near point.
+When called with one `C-u' prefix, let the user have a chance to edit the
+index entry.  When called with 2 `C-u' as prefix, also ask for the index
+macro and other stuff.
+When called inside TeX math mode as determined by the `texmathp.el' library
+which is part of AUCTeX, the string is first processed with the
+`reftex-index-math-format', which see.
+
+\(fn &optional ARG PHRASE)" t nil)
+
+(autoload 'reftex-index "reftex-index" "\
+Query for an index macro and insert it along with its arguments.
+The index macros available are those defined in `reftex-index-macro' or
+by a call to `reftex-add-index-macros', typically from an AUCTeX style file.
+RefteX provides completion for the index tag and the index key, and
+will prompt for other arguments.
+
+\(fn &optional CHAR KEY TAG SEL NO-INSERT)" t nil)
+
+(autoload 'reftex-index-complete-tag "reftex-index" "\
+
+
+\(fn &optional ITAG OPT-ARGS)" nil nil)
+
+(autoload 'reftex-index-select-tag "reftex-index" "\
+
+
+\(fn)" nil nil)
+
+(autoload 'reftex-index-complete-key "reftex-index" "\
+
+
+\(fn &optional TAG OPTIONAL INITIAL)" nil nil)
+
+(autoload 'reftex-index-show-entry "reftex-index" "\
+
+
+\(fn DATA &optional NO-REVISIT)" nil nil)
+
+(autoload 'reftex-display-index "reftex-index" "\
+Display a buffer with an index compiled from the current document.
+When the document has multiple indices, first prompts for the correct one.
+When index support is turned off, offer to turn it on.
+With one or two `C-u' prefixes, rescan document first.
+With prefix 2, restrict index to current document section.
+With prefix 3, restrict index to region.
+
+\(fn &optional TAG OVERRIDING-RESTRICTION REDO &rest LOCATIONS)" t nil)
+
+(autoload 'reftex-index-phrase-selection-or-word "reftex-index" "\
+Add current selection or word at point to the phrases buffer.
+When you are in transient-mark-mode and the region is active, the
+selection will be used - otherwise the word at point.
+You get a chance to edit the entry in the phrases buffer - finish with
+`C-c C-c'.
+
+\(fn ARG)" t nil)
+
+(autoload 'reftex-index-visit-phrases-buffer "reftex-index" "\
+Switch to the phrases buffer, initialize if empty.
+
+\(fn)" t nil)
+
+(autoload 'reftex-index-phrases-mode "reftex-index" "\
+Major mode for managing the Index phrases of a LaTeX document.
+This buffer was created with RefTeX.
+
+To insert new phrases, use
+ - `C-c \\' in the LaTeX document to copy selection or word
+ - `\\[reftex-index-new-phrase]' in the phrases buffer.
+
+To index phrases use one of:
+
+\\[reftex-index-this-phrase]     index current phrase
+\\[reftex-index-next-phrase]     index next phrase (or N with prefix arg)
+\\[reftex-index-all-phrases]     index all phrases
+\\[reftex-index-remaining-phrases]     index current and following phrases
+\\[reftex-index-region-phrases]     index the phrases in the region
+
+You can sort the phrases in this buffer with \\[reftex-index-sort-phrases].
+To display information about the phrase at point, use \\[reftex-index-phrases-info].
+
+For more information see the RefTeX User Manual.
+
+Here are all local bindings.
+
+\\{reftex-index-phrases-mode-map}
+
+\(fn)" t nil)
+
+;;;***
+\f
+;;;### (autoloads nil "reftex-parse" "reftex-parse.el" "69a531bd0ac3f97f076b7dda4ec2304d")
+;;; Generated autoloads from reftex-parse.el
+
+(autoload 'reftex-parse-one "reftex-parse" "\
+Re-parse this file.
+
+\(fn)" t nil)
+
+(autoload 'reftex-parse-all "reftex-parse" "\
+Re-parse entire document.
+
+\(fn)" t nil)
+
+(autoload 'reftex-do-parse "reftex-parse" "\
+Do a document rescan.
+When allowed, do only a partial scan from FILE.
+
+\(fn RESCAN &optional FILE)" nil nil)
+
+(autoload 'reftex-everything-regexp "reftex-parse" "\
+
+
+\(fn)" nil nil)
+
+(autoload 'reftex-all-document-files "reftex-parse" "\
+Return a list of all files belonging to the current document.
+When RELATIVE is non-nil, give file names relative to directory
+of master file.
+
+\(fn &optional RELATIVE)" nil nil)
+
+(autoload 'reftex-locate-bibliography-files "reftex-parse" "\
+Scan buffer for bibliography macros and return file list.
+
+\(fn MASTER-DIR &optional FILES)" nil nil)
+
+(autoload 'reftex-section-info "reftex-parse" "\
+Return a section entry for the current match.
+Careful: This function expects the match-data to be still in place!
+
+\(fn FILE)" nil nil)
+
+(autoload 'reftex-ensure-index-support "reftex-parse" "\
+When index support is turned off, ask to turn it on and
+set the current prefix argument so that `reftex-access-scan-info'
+will rescan the entire document.
+
+\(fn &optional ABORT)" nil nil)
+
+(autoload 'reftex-index-info-safe "reftex-parse" "\
+
+
+\(fn FILE)" nil nil)
+
+(autoload 'reftex-index-info "reftex-parse" "\
+Return an index entry for the current match.
+Careful: This function expects the match-data to be still in place!
+
+\(fn FILE)" nil nil)
+
+(autoload 'reftex-short-context "reftex-parse" "\
+Get about one line of useful context for the label definition at point.
+
+\(fn ENV PARSE &optional BOUND DERIVE)" nil nil)
+
+(autoload 'reftex-where-am-I "reftex-parse" "\
+Return the docstruct entry above point.
+Actually returns a cons cell in which the cdr is a flag indicating
+if the information is exact (t) or approximate (nil).
+
+\(fn)" nil nil)
+
+(autoload 'reftex-notice-new "reftex-parse" "\
+Hook to handshake with RefTeX after something new has been inserted.
+
+\(fn &optional N FORCE)" nil nil)
+
+(autoload 'reftex-what-macro-safe "reftex-parse" "\
+Call `reftex-what-macro' with special syntax table.
+
+\(fn WHICH &optional BOUND)" nil nil)
+
+(autoload 'reftex-what-macro "reftex-parse" "\
+Find out if point is within the arguments of any TeX-macro.
+The return value is either (\"\\macro\" . (point)) or a list of them.
+
+If WHICH is nil, immediately return nil.
+If WHICH is 1, return innermost enclosing macro.
+If WHICH is t, return list of all macros enclosing point.
+If WHICH is a list of macros, look only for those macros and return the
+  name of the first macro in this list found to enclose point.
+If the optional BOUND is an integer, bound backwards directed
+  searches to this point.  If it is nil, limit to nearest \\section -
+  like statement.
+
+This function is pretty stable, but can be fooled if the text contains
+things like \\macro{aa}{bb} where \\macro is defined to take only one
+argument.  As RefTeX cannot know this, the string \"bb\" would still be
+considered an argument of macro \\macro.
+
+\(fn WHICH &optional BOUND)" nil nil)
+
+(autoload 'reftex-what-environment "reftex-parse" "\
+Find out if point is inside a LaTeX environment.
+The return value is (e.g.) either (\"equation\" . (point)) or a list of
+them.
+
+If WHICH is nil, immediately return nil.
+If WHICH is 1, return innermost enclosing environment.
+If WHICH is t, return list of all environments enclosing point.
+If WHICH is a list of environments, look only for those environments and
+  return the name of the first environment in this list found to enclose
+  point.
+
+If the optional BOUND is an integer, bound backwards directed searches to
+this point.  If it is nil, limit to nearest \\section - like statement.
+
+\(fn WHICH &optional BOUND)" nil nil)
+
+(autoload 'reftex-what-special-env "reftex-parse" "\
+Run the special environment parsers and return the matches.
+
+The return value is (e.g.) either (\"my-parser-function\" . (point))
+or a list of them.
+
+If WHICH is nil, immediately return nil.
+If WHICH is 1, return innermost enclosing environment.
+If WHICH is t, return list of all environments enclosing point.
+If WHICH is a list of environments, look only for those environments and
+  return the name of the first environment in this list found to enclose
+  point.
+
+\(fn WHICH &optional BOUND)" nil nil)
+
+(autoload 'reftex-nth-arg "reftex-parse" "\
+Return the Nth following {} or [] parentheses content.
+OPT-ARGS is a list of argument numbers which are optional.
+
+\(fn N &optional OPT-ARGS)" nil nil)
+
+(autoload 'reftex-move-over-touching-args "reftex-parse" "\
+
+
+\(fn)" nil nil)
+
+(autoload 'reftex-init-section-numbers "reftex-parse" "\
+Initialize the section numbers with zeros or with what is found in the TOC-ENTRY.
+
+\(fn &optional TOC-ENTRY APPENDIX)" nil nil)
+
+(autoload 'reftex-section-number "reftex-parse" "\
+Return a string with the current section number.
+When LEVEL is non-nil, increase section numbers on that level.
+
+\(fn &optional LEVEL STAR)" nil nil)
+
+;;;***
+\f
+;;;### (autoloads nil "reftex-ref" "reftex-ref.el" "3ad5bfbb747c7f8c5cd5b30e3b6fc342")
+;;; Generated autoloads from reftex-ref.el
+
+(autoload 'reftex-label-location "reftex-ref" "\
+Return the environment or macro which determines the label type at point.
+If optional BOUND is an integer, limit backward searches to that point.
+
+\(fn &optional BOUND)" nil nil)
+
+(autoload 'reftex-label-info-update "reftex-ref" "\
+
+
+\(fn CELL)" nil nil)
+
+(autoload 'reftex-label-info "reftex-ref" "\
+
+
+\(fn LABEL &optional FILE BOUND DERIVE ENV-OR-MAC)" nil nil)
+
+(autoload 'reftex-label "reftex-ref" "\
+Insert a unique label.  Return the label.
+If ENVIRONMENT is given, don't bother to find out yourself.
+If NO-INSERT is non-nil, do not insert label into buffer.
+With prefix arg, force to rescan document first.
+When you are prompted to enter or confirm a label, and you reply with
+just the prefix or an empty string, no label at all will be inserted.
+A new label is also recorded into the label list.
+This function is controlled by the settings of reftex-insert-label-flags.
+
+\(fn &optional ENVIRONMENT NO-INSERT)" t nil)
+
+(autoload 'reftex-reference "reftex-ref" "\
+Make a LaTeX reference.  Look only for labels of a certain TYPE.
+With prefix arg, force to rescan buffer for labels.  This should only be
+necessary if you have recently entered labels yourself without using
+reftex-label.  Rescanning of the buffer can also be requested from the
+label selection menu.
+The function returns the selected label or nil.
+If NO-INSERT is non-nil, do not insert \\ref command, just return label.
+When called with 2 C-u prefix args, disable magic word recognition.
+
+\(fn &optional TYPE NO-INSERT CUT)" t nil)
+
+(autoload 'reftex-query-label-type "reftex-ref" "\
+
+
+\(fn)" nil nil)
+
+(autoload 'reftex-show-label-location "reftex-ref" "\
+
+
+\(fn DATA FORWARD NO-REVISIT &optional STAY ERROR)" nil nil)
+
+(autoload 'reftex-goto-label "reftex-ref" "\
+Prompt for a label (with completion) and jump to the location of this label.
+Optional prefix argument OTHER-WINDOW goes to the label in another window.
+
+\(fn &optional OTHER-WINDOW)" t nil)
+
+;;;***
+\f
+;;;### (autoloads nil "reftex-sel" "reftex-sel.el" "4ffdcf92acf13e0e93cfac51b6e0607c")
+;;; Generated autoloads from reftex-sel.el
+
+(autoload 'reftex-select-label-mode "reftex-sel" "\
+Major mode for selecting a label in a LaTeX document.
+This buffer was created with RefTeX.
+It only has a meaningful keymap when you are in the middle of a
+selection process.
+To select a label, move the cursor to it and press RET.
+Press `?' for a summary of important key bindings.
+
+During a selection process, these are the local bindings.
+
+\\{reftex-select-label-mode-map}
+
+\(fn)" t nil)
+
+(autoload 'reftex-select-bib-mode "reftex-sel" "\
+Major mode for selecting a citation key in a LaTeX document.
+This buffer was created with RefTeX.
+It only has a meaningful keymap when you are in the middle of a
+selection process.
+In order to select a citation, move the cursor to it and press RET.
+Press `?' for a summary of important key bindings.
+
+During a selection process, these are the local bindings.
+
+\\{reftex-select-label-mode-map}
+
+\(fn)" t nil)
+
+(autoload 'reftex-get-offset "reftex-sel" "\
+
+
+\(fn BUF HERE-AM-I &optional TYPEKEY TOC INDEX FILE)" nil nil)
+
+(autoload 'reftex-insert-docstruct "reftex-sel" "\
+
+
+\(fn BUF TOC LABELS INDEX-ENTRIES FILES CONTEXT COUNTER SHOW-COMMENTED HERE-I-AM XR-PREFIX TOC-BUFFER)" nil nil)
+
+(autoload 'reftex-find-start-point "reftex-sel" "\
+
+
+\(fn FALLBACK &rest LOCATIONS)" nil nil)
+
+(autoload 'reftex-select-item "reftex-sel" "\
+
+
+\(fn REFTEX-SELECT-PROMPT HELP-STRING KEYMAP &optional OFFSET CALL-BACK CB-FLAG)" nil nil)
+
+;;;***
+\f
+;;;### (autoloads nil "reftex-toc" "reftex-toc.el" "30e611bd9b33af3e6a5a22cf7497de78")
+;;; Generated autoloads from reftex-toc.el
+
+(autoload 'reftex-toc "reftex-toc" "\
+Show the table of contents for the current document.
+When called with a raw C-u prefix, rescan the document first.
+
+\(fn &optional REBUILD REUSE)" t nil)
+
+(autoload 'reftex-toc-recenter "reftex-toc" "\
+Display the TOC window and highlight line corresponding to current position.
+
+\(fn &optional ARG)" t nil)
+
+(autoload 'reftex-toggle-auto-toc-recenter "reftex-toc" "\
+Toggle the automatic recentering of the TOC window.
+When active, leaving point idle will make the TOC window jump to the correct
+section.
+
+\(fn)" t nil)
+
+;;;***
+\f
+;;; End of automatically extracted autoloads.
+
 (provide 'reftex)
 
 ;;; reftex.el ends here
index 089f5b2d88971fd95cdc6ce5d9733fe6c4bb52f3..95b947481b51e46b716b1f3ae164e28f373fee1b 100644 (file)
@@ -499,6 +499,8 @@ If this is nil, then `diary-file' will be used instead."
   :type '(choice (const :tag "diary-file" nil) file)
   :group 'remember)
 
+(defvar calendar-date-style)            ; calendar.el
+
 (defun remember-diary-convert-entry (entry)
   "Translate MSG to an entry readable by diary."
   (save-match-data
@@ -511,23 +513,17 @@ If this is nil, then `diary-file' will be used instead."
           ;; which requires calendar.
           (require 'calendar)
           (replace-match
-           (let ((style (if (boundp 'calendar-date-style)
-                            calendar-date-style
-                          ;; Don't complain about obsolescence.
-                          (if (with-no-warnings european-calendar-style)
-                              'european
-                            'american))))
-             (cond ((eq style 'european)
-                    (concat (match-string 3 entry) "/"
-                            (match-string 2 entry) "/"
-                            (match-string 1 entry)))
-                   ((eq style 'iso)
-                    (concat (match-string 1 entry) "-"
+           (cond ((eq calendar-date-style 'european)
+                  (concat (match-string 3 entry) "/"
+                          (match-string 2 entry) "/"
+                          (match-string 1 entry)))
+                 ((eq calendar-date-style 'iso)
+                  (concat (match-string 1 entry) "-"
                             (match-string 2 entry) "-"
                             (match-string 3 entry)))
-                   (t (concat (match-string 2 entry) "/"
-                              (match-string 3 entry) "/"
-                              (match-string 1 entry)))))
+                 (t (concat (match-string 2 entry) "/"
+                            (match-string 3 entry) "/"
+                            (match-string 1 entry))))
            t t entry))
       entry)))
 
index b05a5e5a7e3bef847e84599733dce276231463f4..5ea0b419d2298ecb9c7fd103d8cba373df3f51f6 100644 (file)
@@ -3121,7 +3121,7 @@ newlines as mandated by `comment-line-break-function'."
 
 (defun rst-comment-region (beg end &optional arg)
   "Comment or uncomment the current region.
-Region is from from BEG to END.  Uncomment if ARG."
+Region is from BEG to END.  Uncomment if ARG."
   (save-excursion
     (if (consp arg)
        (rst-uncomment-region beg end arg)
index d2f1307b6c930a043eb231daf224e7f6783cbceb..39ac0621733afecebcd06882bd610857163d3095 100644 (file)
@@ -240,12 +240,21 @@ This takes effect when first loading the `sgml-mode' library.")
   "A table for mapping non-ASCII characters into SGML entity names.
 Currently, only Latin-1 characters are supported.")
 
-;; nsgmls is a free SGML parser in the SP suite available from
-;; ftp.jclark.com and otherwise packaged for GNU systems.
-;; Its error messages can be parsed by next-error.
-;; The -s option suppresses output.
-
-(defcustom sgml-validate-command "nsgmls -s" ; replaced old `sgmls'
+(defcustom sgml-validate-command
+  ;; prefer tidy because (o)nsgmls is often built without --enable-http
+  ;; which makes it next to useless
+  (cond ((executable-find "tidy")
+         ;; tidy is available from http://tidy.sourceforge.net/
+         "tidy --gnu-emacs yes -e -q")
+        ((executable-find "nsgmls")
+         ;; nsgmls is a free SGML parser in the SP suite available from
+         ;; ftp.jclark.com, replaced old `sgmls'.
+         "nsgmls -s")
+        ((executable-find "onsgmls")
+         ;; onsgmls is the community version of `nsgmls'
+         ;; hosted on http://openjade.sourceforge.net/
+         "onsgmls -s")
+        (t "Install (o)nsgmls, tidy, or some other SGML validator, and set `sgml-validate-command'"))
   "The command to validate an SGML document.
 The file name of current buffer file name will be appended to this,
 separated by a space."
index 18843bcd15a8f81b94396d0f056fb68b1d429891..bc10eab0498102c1b31c96f672112d56cf09410c 100644 (file)
@@ -2573,18 +2573,28 @@ line LINE of the window, or centered if LINE is nil."
                      (prefix-numeric-value linenum)
                    (/ (window-height) 2)))))))
 
+(defcustom tex-print-file-extension ".dvi"
+  "The TeX-compiled file extension for viewing and printing.
+If you use pdflatex instead of latex, set this to \".pdf\" and modify
+ `tex-dvi-view-command' and `tex-dvi-print-command' appropriately."
+  :type 'string
+  :group 'tex-view
+  :version "25.1")
+
 (defun tex-print (&optional alt)
   "Print the .dvi file made by \\[tex-region], \\[tex-buffer] or \\[tex-file].
 Runs the shell command defined by `tex-dvi-print-command'.  If prefix argument
 is provided, use the alternative command, `tex-alt-dvi-print-command'."
   (interactive "P")
-  (let ((print-file-name-dvi (tex-append tex-print-file ".dvi"))
+  (let ((print-file-name-dvi (tex-append tex-print-file
+                                         tex-print-file-extension))
        test-name)
     (if (and (not (equal (current-buffer) tex-last-buffer-texed))
             (buffer-file-name)
             ;; Check that this buffer's printed file is up to date.
             (file-newer-than-file-p
-             (setq test-name (tex-append (buffer-file-name) ".dvi"))
+             (setq test-name (tex-append (buffer-file-name)
+                                          tex-print-file-extension))
              (buffer-file-name)))
        (setq print-file-name-dvi test-name))
     (if (not (file-exists-p print-file-name-dvi))
index e345f8a502835c1ad1daf1d4663a9df073ada68e..839d7a96b5dec58d4c5e34f7fec3924a32ade200 100644 (file)
@@ -1145,24 +1145,40 @@ For example, \"unnumberedsubsec\".  Return \"top\" for top node.
 Searches forward for a section.  Hence, point must be before the
 section whose type will be found.  Does not move point.  Signal an
 error if the node is not the top node and a section is not found."
-  (let ((case-fold-search t))
-    (save-excursion
-      (cond
-       ((re-search-forward "^@node [ \t]*top[ \t]*\\(,\\|$\\)"
-                          ;; Following search limit by cph but causes a bug
-                          ;;(line-end-position)
-                          nil
-                          t)
-       "top")
-       ((re-search-forward texinfo-section-types-regexp nil t)
-       (buffer-substring-no-properties
-        (progn (beginning-of-line) ; copy its name
-               (1+ (point)))
-        (progn (forward-word 1)
-               (point))))
-       (t
-       (error
-        "texinfo-specific-section-type: Chapter or section not found"))))))
+  (let* ((case-fold-search t)
+        ;; The Texinfo manual has a second Top node inside @verbatim
+        ;; near the end, which dupes us into thinking we are at top
+        ;; level, no matter where we are when invoked.  We don't
+        ;; really grok @verbatim, so we cheat: only consider us to be
+        ;; at top level if the position of the Top node we found is
+        ;; before any other sectioning command.
+        (top-pos (save-excursion
+                   (re-search-forward "^@node [ \t]*top[ \t]*\\(,\\|$\\)"
+                                      ;; Following search limit causes a bug
+                                      ;;(line-end-position)
+                                      nil
+                                      t)))
+        (sec-pos (save-excursion
+                   (re-search-forward texinfo-section-types-regexp nil t)))
+        sec-name)
+    (if sec-pos
+       (save-excursion
+         (goto-char sec-pos)
+         (setq sec-name (buffer-substring-no-properties
+                         (progn (beginning-of-line) ; copy its name
+                                (1+ (point)))
+                         (progn (forward-word 1)
+                                (point))))))
+    (cond
+     ((or sec-pos top-pos)
+      (if (and top-pos sec-pos)
+         (if (< top-pos sec-pos)
+             "top"
+           sec-name)
+       (or sec-name "top")))
+     (t
+      (error
+       "texinfo-specific-section-type: Chapter or section not found")))))
 
 (defun texinfo-hierarchic-level ()
   "Return the general hierarchical level of the next node in a texinfo file.
index 9732e7fa6496d85a87b1e19df986f39220e7e40b..50fee2f4b849d1cdb985de107d895f754785ca4e 100644 (file)
@@ -3,7 +3,8 @@
 ;; Copyright (C) 1997-2014 Free Software Foundation, Inc.
 
 ;; Author:     Milan Zamazal <pdm@zamazal.org>
-;; Version:    4.5
+;;             Michal Nazarewicz <mina86@mina86.com>
+;; Version:    4.5.3
 ;; Keywords:   text, TeX, SGML, wp
 
 ;; This file is part of GNU Emacs.
@@ -77,15 +78,22 @@ by the hard space character.
 The form (MAJOR-MODE . SYMBOL) defines alias item for MAJOR-MODE.  For this
 mode, the item for the mode SYMBOL is looked up in the alist instead."
   :group 'tildify
-  :type '(repeat (choice (list symbol regexp integer) (cons symbol symbol))))
+  :type '(repeat (cons :tag "Entry for major mode"
+                       (choice (const  :tag "Default" t)
+                               (symbol :tag "Major mode"))
+                       (choice (list   :tag "Regexp"
+                                       regexp
+                                       (integer :tag "Group "))
+                               (symbol :tag "Like other")))))
 
 (defcustom tildify-string-alist
   '((latex-mode . "~")
     (tex-mode . latex-mode)
     (plain-tex-mode . latex-mode)
     (sgml-mode . "&nbsp;")
-    (xml-mode . sgml-mode)
     (html-mode . sgml-mode)
+    (xml-mode . "&#160;") ; XML does not define &nbsp; use numeric reference
+    (nxml-mode . xml-mode)
     (t . " "))
   "Alist specifying what is a hard space in the current major mode.
 
@@ -104,41 +112,43 @@ for SGML.
 The form (MAJOR-MODE . SYMBOL) defines alias item for MAJOR-MODE.  For this
 mode, the item for the mode SYMBOL is looked up in the alist instead."
   :group 'tildify
-  :type '(repeat (cons symbol (choice string symbol))))
+  :type '(repeat (cons :tag "Entry for major mode"
+                       (choice (const  :tag "Default" t)
+                               (symbol :tag "Major mode"))
+                       (choice (const  :tag "No-break space (U+00A0)" "\u00A0")
+                               (string :tag "String    ")
+                               (symbol :tag "Like other")))))
 
 (defcustom tildify-ignored-environments-alist
-  '((latex-mode
+  `((latex-mode
      ("\\\\\\\\" . "")         ; do not remove this
-     ("\\\\begin{verbatim}" . "\\\\end{verbatim}")
+     (,(eval-when-compile (concat
+                           "\\\\begin{\\("
+                           (regexp-opt '("verbatim" "math" "displaymath"
+                                         "equation" "eqnarray" "eqnarray*"))
+                           "\\)}"))
+      . ("\\\\end{" 1 "}"))
      ("\\\\verb\\*?\\(.\\)" . (1))
-     ("\\$\\$" . "\\$\\$")
-     ("\\$" . "\\$")
+     ("\\$\\$?" . (0))
      ("\\\\(" . "\\\\)")
      ("\\\\[[]" . "\\\\[]]")
-     ("\\\\begin{math}" . "\\\\end{math}")
-     ("\\\\begin{displaymath}" . "\\\\end{displaymath}")
-     ("\\\\begin{equation}" . "\\\\end{equation}")
-     ("\\\\begin{eqnarray\\*?}" . "\\\\end{eqnarray\\*?}")
      ("\\\\[a-zA-Z]+\\( +\\|{}\\)[a-zA-Z]*" . "")
      ("%" . "$"))
     (plain-tex-mode . latex-mode)
     (html-mode
-     ("<pre[^>]*>" . "</pre>")
-     ("<dfn>" . "</dfn>")
-     ("<code>" . "</code>")
-     ("<samp>" . "</samp>")
-     ("<kbd>" . "</kbd>")
-     ("<var>" . "</var>")
-     ("<PRE[^>]*>" . "</PRE>")
-     ("<DFN>" . "</DFN>")
-     ("<CODE>" . "</CODE>")
-     ("<SAMP>" . "</SAMP>")
-     ("<KBD>" . "</KBD>")
-     ("<VAR>" . "</VAR>")
+     (,(eval-when-compile (concat
+                           "<\\("
+                           (regexp-opt '("pre" "dfn" "code" "samp" "kbd" "var"
+                                         "PRE" "DFN" "CODE" "SAMP" "KBD" "VAR"))
+                           "\\)\\>[^>]*>"))
+      . ("</" 1 ">"))
      ("<! *--" . "-- *>")
      ("<" . ">"))
     (sgml-mode . html-mode)
-    (t nil))
+    (xml-mode
+     ("<! *--" . "-- *>")
+     ("<" . ">"))
+    (nxml-mode . xml-mode))
   "Alist specifying ignored structured text environments.
 Parts of text defined in this alist are skipped without performing hard space
 insertion on them.  These setting allow skipping text parts like verbatim or
@@ -160,133 +170,123 @@ END-REGEX defines end of the corresponding text part and can be either:
   subexpressions of BEG-REGEX (this is used to solve cases like
   \\\\verb<character> in TeX)."
   :group 'tildify
-  :type '(repeat (cons symbol (choice symbol (repeat sexp)))))
-
-
-;;; *** Internal variables ***
-
-(defvar tildify-count nil
-  "Counter for replacements.")
+  :type '(repeat
+          (cons :tag "Entry for major mode"
+                (choice (const  :tag "Default" t)
+                        (symbol :tag "Major mode"))
+                (choice
+                 (const  :tag "None")
+                 (repeat
+                  :tag "Environments"
+                  (cons :tag "Regexp pair"
+                        (regexp :tag "Open ")
+                        (choice :tag "Close"
+                                (regexp :tag "Regexp")
+                                (list :tag "Regexp and groups (concatenated)"
+                                      (choice (regexp  :tag "Regexp")
+                                              (integer :tag "Group "))))))
+                 (symbol :tag "Like other")))))
 
 
 ;;; *** Interactive functions ***
 
 ;;;###autoload
-(defun tildify-region (beg end)
+(defun tildify-region (beg end &optional dont-ask)
   "Add hard spaces in the region between BEG and END.
 See variables `tildify-pattern-alist', `tildify-string-alist', and
 `tildify-ignored-environments-alist' for information about configuration
 parameters.
-This function performs no refilling of the changed text."
-  (interactive "*r")
-  (setq tildify-count 0)
-  (let (a
-       z
-       (marker-end (copy-marker end))
-       end-env
-       finish
-       (ask t)
-       (case-fold-search nil)
-       (regexp (tildify-build-regexp)) ; beginnings of environments
-       aux)
-    (if regexp
-       ;; Yes, ignored environments exist for the current major mode,
-       ;; tildify just texts outside them
-       (save-excursion
-         (save-restriction
-           (widen)
-           (goto-char (point-min))
-           (while (not finish)
-             (setq a (point))
-             (setq end-env (tildify-find-env regexp))
-             (setq z (copy-marker (if end-env (1- (point)) (point-max))))
-             (if (>= (marker-position z) beg)
-                 (progn
-                   (or (>= a beg) (setq a beg))
-                   (or (<= (marker-position z) (marker-position marker-end))
-                       (setq z marker-end))
-                   (setq aux (tildify-tildify a (marker-position z) ask))
-                   (if (eq aux 'force)
-                       (setq ask nil)
-                     (if (eq aux nil)
-                         (setq finish t)))))
-             (if (>= (marker-position z) (marker-position marker-end))
-                 (setq finish t))
-             (or (>= (point) (marker-position z))
-                 (goto-char (marker-position z)))
-             (if (not finish)
-                 (if (re-search-forward end-env nil t)
-                     (if (> (point) (marker-position marker-end))
-                         (setq finish t))
-                   (message
-                    "End of environment not found: %s" end-env)
-                   (setq finish t))))))
-      ;; No ignored environments, tildify directly
-      (tildify-tildify beg end ask)))
-  (message "%d spaces replaced." tildify-count))
+This function performs no refilling of the changed text.
+If DONT-ASK is set, or called interactively with prefix argument, user
+won't be prompted for confirmation of each substitution."
+  (interactive "*rP")
+  (let (case-fold-search (count 0) (ask (not dont-ask)))
+    (tildify-foreach-region-outside-env beg end
+      (lambda (beg end)
+        (let ((aux (tildify-tildify beg end ask)))
+          (setq count (+ count (car aux)))
+          (if (not (eq (cdr aux) 'force))
+              (cdr aux)
+            (setq ask nil)
+            t))))
+    (message "%d spaces replaced." count)))
 
 ;;;###autoload
-(defun tildify-buffer ()
+(defun tildify-buffer (&optional dont-ask)
   "Add hard spaces in the current buffer.
 See variables `tildify-pattern-alist', `tildify-string-alist', and
 `tildify-ignored-environments-alist' for information about configuration
 parameters.
-This function performs no refilling of the changed text."
-  (interactive  "*")
-  (tildify-region (point-min) (point-max)))
+This function performs no refilling of the changed text.
+If DONT-ASK is set, or called interactively with prefix argument, user
+won't be prompted for confirmation of each substitution."
+  (interactive  "*P")
+  (tildify-region (point-min) (point-max) dont-ask))
 
 
 ;;; *** Auxiliary functions ***
 
-(defun tildify-build-regexp ()
-  "Build start of environment regexp."
-  (let ((alist (tildify-mode-alist tildify-ignored-environments-alist))
-       regexp)
-    (when alist
-      (setq regexp (caar alist))
-      (setq alist (cdr alist))
-      (while alist
-       (setq regexp (concat regexp "\\|" (caar alist)))
-       (setq alist (cdr alist)))
-      regexp)))
-
 (defun tildify-mode-alist (mode-alist &optional mode)
   "Return alist item for the MODE-ALIST in the current major MODE."
-  (if (null mode)
-      (setq mode major-mode))
-  (let ((alist (cdr (or (assoc mode mode-alist)
+  (let ((alist (cdr (or (assoc (or mode major-mode) mode-alist)
                        (assoc t mode-alist)))))
     (if (and alist
             (symbolp alist))
        (tildify-mode-alist mode-alist alist)
       alist)))
 
-(defun tildify-find-env (regexp)
+(defun tildify-foreach-region-outside-env (beg end callback)
+  "Scan region from BEG to END calling CALLBACK on portions out of environments.
+Call CALLBACK on each region outside of environment to ignore.
+CALLBACK will only be called for regions which have intersection
+with [BEG END].  It must be a function that takes two point
+arguments specifying the region to operate on.  Stop scanning the
+region as soon as CALLBACK returns nil.  Environments to ignore
+are determined from `tildify-ignored-environments-alist'."
+  (declare (indent 2))
+  (let ((pairs (tildify-mode-alist tildify-ignored-environments-alist)))
+    (if (not pairs)
+        (funcall callback beg end)
+      (let ((func (lambda (b e)
+                    (let ((b (max b beg)) (e (min e end)))
+                    (if (< b e) (funcall callback b e) t))))
+            (beg-re (concat "\\(?:"
+                            (mapconcat 'car pairs "\\)\\|\\(?:")
+                            "\\)"))
+            p end-re)
+        (save-excursion
+          (save-restriction
+            (widen)
+            (goto-char (point-min))
+            (while (and (< (setq p (point)) end)
+                        (if (not (setq end-re
+                                       (tildify-find-env beg-re pairs)))
+                            (progn (funcall func p end) nil)
+                          (funcall func p (match-beginning 0))
+                          (when (< (point) end)
+                            (setq p (point))
+                            (re-search-forward end-re nil t)))))))))))
+
+(defun tildify-find-env (regexp pairs)
   "Find environment using REGEXP.
-Return regexp for the end of the environment or nil if no environment was
-found."
+Return regexp for the end of the environment found in PAIRS or nil if
+no environment was found."
   ;; Find environment
-  (if (re-search-forward regexp nil t)
-      ;; Build end-env regexp
-      (let ((match (match-string 0))
-           (alist (tildify-mode-alist tildify-ignored-environments-alist))
-           expression)
-       (save-match-data
-         (while (not (eq (string-match (caar alist) match) 0))
-           (setq alist (cdr alist))))
-       (if (stringp (setq expression (cdar alist)))
-           expression
-         (let ((result "")
-               aux)
-           (while expression
-             (setq result (concat result
-                                  (if (stringp (setq aux (car expression)))
-                                      expression
-                                    (regexp-quote (match-string aux)))))
-             (setq expression (cdr expression)))
-           result)))
-    ;; Return nil if not found
-    nil))
+  (when (re-search-forward regexp nil t)
+    (save-match-data
+      (let ((match (match-string 0)))
+        (while (not (eq (string-match (caar pairs) match) 0))
+          (setq pairs (cdr pairs)))
+        (let ((expression (cdar pairs)))
+          (if (stringp expression)
+              expression
+            (mapconcat
+             (lambda (expr)
+               (if (stringp expr)
+                   expr
+                 (regexp-quote (match-string expr match))))
+             expression
+             "")))))))
 
 (defun tildify-tildify (beg end ask)
   "Add tilde characters in the region between BEG and END.
@@ -295,8 +295,9 @@ macros.
 
 If ASK is nil, perform replace without asking user for confirmation.
 
-Returns one of symbols: t (all right), nil (quit), force (replace without
-further questions)."
+Returns (count . response) cons where count is number of string
+replacements done and response is one of symbols: t (all right), nil
+(quit), force (replace without further questions)."
   (save-excursion
     (goto-char beg)
     (let* ((alist (tildify-mode-alist tildify-pattern-alist))
@@ -308,7 +309,8 @@ further questions)."
           bad-answer
           replace
           quit
-          (message-log-max nil))
+          (message-log-max nil)
+          (count 0))
       (while (and (not quit)
                  (re-search-forward regexp (marker-position end-marker) t))
        (when (or (not ask)
@@ -335,12 +337,11 @@ further questions)."
                      (setq bad-answer t)))
                    replace))
          (replace-match tilde t t nil match-number)
-         (setq tildify-count (1+ tildify-count))))
+         (setq count (1+ count))))
       ;; Return value
-      (cond
-       (quit nil)
-       ((not ask) 'force)
-       (t t)))))
+      (cons count (cond (quit nil)
+                        ((not ask) 'force)
+                        (t t))))))
 
 
 ;;; *** Announce ***
index 9d0954fc5dcab8e89ba445a01f1f72321d58cafb..26cce418e45a873fe33d0a48deaf66316e47766e 100644 (file)
@@ -215,11 +215,9 @@ This might return nil if the event did not occur over a buffer."
   "Change the value of KEY in alist ALIST to VALUE.
 If there's no association for KEY in ALIST, add one, otherwise
 change the existing association.  Value is the resulting alist."
-  (let ((param (assq key alist)))
-    (if (consp param)
-       (setcdr param value)
-      (push (cons key value) alist))
-    alist))
+  (declare (obsolete "use (setf (alist-get ..) ..) instead" "25.1"))
+  (setf (alist-get key alist) value)
+  alist)
 
 (declare-function x-show-tip "xfns.c"
                  (string &optional frame parms timeout dx dy))
@@ -244,10 +242,10 @@ in echo area."
              (fg (face-attribute 'tooltip :foreground))
              (bg (face-attribute 'tooltip :background)))
          (when (stringp fg)
-           (setq params (tooltip-set-param params 'foreground-color fg))
-           (setq params (tooltip-set-param params 'border-color fg)))
+           (setf (alist-get 'foreground-color params) fg)
+           (setf (alist-get 'border-color params) fg))
          (when (stringp bg)
-           (setq params (tooltip-set-param params 'background-color bg)))
+           (setf (alist-get 'background-color params) bg))
          (x-show-tip (propertize text 'face 'tooltip)
                      (selected-frame)
                      params
index 8b0765291c10c17590dffae4753c1d2cb6c6f134..21a779f85b38db932f54934ad145673074aae4a9 100644 (file)
@@ -1,9 +1,39 @@
-2014-09-19  Dmitry Gutov  <dgutov@yandex.ru>
+2014-10-07  Eli Zaretskii  <eliz@gnu.org>
+
+       * url-http.el (url-http-create-request): Recheck zlib availability
+       on windows-nt each time it might be required.  (Bug#18650)
+
+2014-09-28  Ulf Jasper  <ulf.jasper@web.de>
+
+       * url-gw.el (url-open-stream): New optional parameter
+       `gateway-method'.  If non-nil use it instead of global variable
+       `url-gateway-method'.
+
+       * url/url-http.el (url-http): New optional parameter
+       `gateway-method', pass it to `url-http-find-free-connection'.
+       (url-http-find-free-connection): New optional parameter
+       gateway-method, pass it to `url-open-stream'.
+       (url-https-create-secure-wrapper): Do not modify
+       `url-gateway-method' but explicitly provide 'tls as gateway-method
+       parameter to `url-https'.
+
+2014-09-22  Dmitry Gutov  <dgutov@yandex.ru>
 
        * url.el (url-retrieve-internal): Clarify the docstring.
 
        * url-http.el (url-http): Same.  (Bug#18116)
 
+2014-08-07  Reuben Thomas  <rrt@sc3d.org>
+
+       * url-handlers.el: Remove a comment about VMS, which we no longer
+       support.
+
+2014-08-03  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Don't mishandle dates in the year 9999 (Bug#18176).
+       * url-cookie.el (url-cookie-expired-p): Treat out-of-range
+       expiration dates as if they were far in the future.
+
 2014-06-26  Leo Liu  <sdl.web@gmail.com>
 
        * url-http.el (url-http-end-of-headers): Remove duplicate defvar.
        (url-insert-file-contents): Condition on url-http-response-status
        for the HTTP/S specific part.  (Bug#17549)
 
-2014-05-09  Michael Albinus  <michael.albinus@gmx.de>
+2014-05-14  Glenn Morris  <rgm@gnu.org>
+
+       * url-util.el (url-make-private-file): Use with-file-modes.
+
+2014-05-12  Michael Albinus  <michael.albinus@gmx.de>
 
        * url-handlers.el (url-file-handler-load-in-progress): New defvar.
        (url-file-handler): Use it, in order to avoid recursive load.
 
-2014-05-01  Glenn Morris  <rgm@gnu.org>
+2014-05-04  Glenn Morris  <rgm@gnu.org>
 
        * url-parse.el (url-generic-parse-url): Doc fix (replace `iff').
 
+2014-04-01  Michael Albinus  <michael.albinus@gmx.de>
+
+       * url-tramp.el: New file.
+
+       * url-handlers.el (url-handler-regexp): Add ssh, scp, rsync and telnet.
+       Add :version.
+       (url-file-handler): Call `url-tramp-file-handler' if appropriate.
+
+2014-03-28  Glenn Morris  <rgm@gnu.org>
+
+       * url-vars.el (url-bug-address): Make into an obsolete alias.
+       * url-http.el (url-http-handle-authentication):
+       * url-news.el (url-news-fetch-message-id):
+       Use M-x report-emacs-bug in help messages.
+
 2014-03-26  Juanma Barranquero  <lekktu@gmail.com>
 
        * url-handlers.el (url-http-parse-response): Add autoload.
index 55e0fb33951da94d5a607b373d98a12a1d2a0874..f89886b95dd4a50da775497881cbfff5161ede2b 100644 (file)
@@ -158,7 +158,9 @@ telling Microsoft that."
   "Return non-nil if COOKIE is expired."
   (let ((exp (url-cookie-expires cookie)))
     (and (> (length exp) 0)
-        (> (float-time) (float-time (date-to-time exp))))))
+        (condition-case ()
+            (> (float-time) (float-time (date-to-time exp)))
+          (error nil)))))
 
 (defun url-cookie-retrieve (host &optional localpart secure)
   "Retrieve all cookies for a specified HOST and LOCALPART."
index fcb6e70f4d7c836b802116225dc622d2dd12f63c..6adb2d978af18cf398c3fc2078ddcf58f50b0f5b 100644 (file)
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2001, 2004-2014 Free Software Foundation, Inc.
 
 ;; Author: Bill Perry <wmperry@gnu.org>
-;; Maintainer: Bill Perry <wmperry@gnu.org>
+;; Maintainer: emacs-devel@gnu.org
 ;; Keywords: url, vc
 
 ;; This file is part of GNU Emacs.
index 2a9c6ead029dd5eb0727d0005e38ce191f27f3e1..4a6189dcfeab3c032e2779e65b55a9ec32122a58 100644 (file)
@@ -3,6 +3,7 @@
 ;; Copyright (C) 1997-1998, 2004-2014 Free Software Foundation, Inc.
 
 ;; Author: Bill Perry <wmperry@gnu.org>
+;; Maintainer: emacs-devel@gnu.org
 ;; Keywords: comm, data, processes
 
 ;; This file is part of GNU Emacs.
@@ -202,20 +203,24 @@ linked Emacs under SunOS 4.x."
       proc)))
 
 ;;;###autoload
-(defun url-open-stream (name buffer host service)
+(defun url-open-stream (name buffer host service &optional gateway-method)
   "Open a stream to HOST, possibly via a gateway.
 Args per `open-network-stream'.
 Will not make a connection if `url-gateway-unplugged' is non-nil.
-Might do a non-blocking connection; use `process-status' to check."
+Might do a non-blocking connection; use `process-status' to check.
+
+Optional arg GATEWAY-METHOD specifies the gateway to be used,
+overriding the value of `url-gateway-method'."
   (unless url-gateway-unplugged
-    (let ((gw-method (if (and url-gateway-local-host-regexp
-                             (not (eq 'tls url-gateway-method))
-                             (not (eq 'ssl url-gateway-method))
-                             (string-match
-                              url-gateway-local-host-regexp
-                              host))
-                        'native
-                      url-gateway-method))
+    (let* ((gwm (or gateway-method url-gateway-method))
+           (gw-method (if (and url-gateway-local-host-regexp
+                               (not (eq 'tls gwm))
+                               (not (eq 'ssl gwm))
+                               (string-match
+                                url-gateway-local-host-regexp
+                                host))
+                          'native
+                        gwm))
          ;; An attempt to deal with denied connections, and attempt
          ;; to reconnect
          (cur-retries 0)
index 0572e6eec8b8bc527c74ba7f875670aafd026db8..56a0986b41c2c74d47699665fda1e5f479e8dd4c 100644 (file)
@@ -51,7 +51,7 @@
 ;; delete-directory                    Finished (DAV)
 ;; delete-file                         Finished (DAV)
 ;; diff-latest-backup-file
-;; directory-file-name                 unnecessary (what about VMS)?
+;; directory-file-name                 unnecessary
 ;; directory-files                     Finished (DAV)
 ;; dired-call-process
 ;; dired-compress-file
@@ -111,7 +111,7 @@ the mode if ARG is omitted or nil."
       (push (cons url-handler-regexp 'url-file-handler)
            file-name-handler-alist)))
 
-(defcustom url-handler-regexp "\\`\\(https?\\|ftp\\|file\\|nfs\\)://"
+(defcustom url-handler-regexp "\\`\\(https?\\|ftp\\|file\\|nfs\\|ssh\\|scp\\|rsync\\|telnet\\)://"
   "Regular expression for URLs handled by `url-handler-mode'.
 When URL Handler mode is enabled, this regular expression is
 added to `file-name-handler-alist'.
@@ -122,6 +122,7 @@ regular expression avoids conflicts with local files that look
 like URLs \(Gnus is particularly bad at this\)."
   :group 'url
   :type 'regexp
+  :version "25.1"
   :set (lambda (symbol value)
         (let ((enable url-handler-mode))
           (url-handler-mode 0)
@@ -147,21 +148,30 @@ the arguments that would have been passed to OPERATION."
   ;; Avoid recursive load.
   (if (and load-in-progress url-file-handler-load-in-progress)
       (url-run-real-handler operation args)
-    (let ((url-file-handler-load-in-progress load-in-progress)
-         (fn (get operation 'url-file-handlers))
-         (val nil)
-         (hooked nil))
-      (if (and (not fn) (intern-soft (format "url-%s" operation))
-              (fboundp (intern-soft (format "url-%s" operation))))
-         (error "Missing URL handler mapping for %s" operation))
-      (if fn
-         (setq hooked t
-               val (save-match-data (apply fn args)))
-       (setq hooked nil
-             val (url-run-real-handler operation args)))
-      (url-debug 'handlers "%s %S%S => %S" (if hooked "Hooked" "Real")
-                operation args val)
-      val)))
+    (let ((url-file-handler-load-in-progress load-in-progress))
+      ;; Check, whether there are arguments we want pass to Tramp.
+      (if (catch :do
+            (dolist (url (cons default-directory args))
+              (and (member
+                    (url-type (url-generic-parse-url (and (stringp url) url)))
+                    url-tramp-protocols)
+                   (throw :do t))))
+          (apply 'url-tramp-file-handler operation args)
+        ;; Otherwise, let's do the job.
+        (let ((fn (get operation 'url-file-handlers))
+              (val nil)
+              (hooked nil))
+          (if (and (not fn) (intern-soft (format "url-%s" operation))
+                   (fboundp (intern-soft (format "url-%s" operation))))
+              (error "Missing URL handler mapping for %s" operation))
+          (if fn
+              (setq hooked t
+                    val (save-match-data (apply fn args)))
+            (setq hooked nil
+                  val (url-run-real-handler operation args)))
+          (url-debug 'handlers "%s %S%S => %S" (if hooked "Hooked" "Real")
+                     operation args val)
+          val)))))
 
 (defun url-file-handler-identity (&rest args)
   ;; Identity function
index b0a3b688a55d751bd568f30134ed0e98b2bbdae0..f9fbea1ba743e2884f6f3de011d47336021d76e2 100644 (file)
@@ -3,6 +3,7 @@
 ;; Copyright (C) 1999, 2001, 2004-2014 Free Software Foundation, Inc.
 
 ;; Author: Bill Perry <wmperry@gnu.org>
+;; Maintainer: emacs-devel@gnu.org
 ;; Keywords: comm, data, processes
 
 ;; This file is part of GNU Emacs.
@@ -170,7 +171,7 @@ request.")
             url-http-open-connections))
   nil)
 
-(defun url-http-find-free-connection (host port)
+(defun url-http-find-free-connection (host port &optional gateway-method)
   (let ((conns (gethash (cons host port) url-http-open-connections))
        (connection nil))
     (while (and conns (not connection))
@@ -192,7 +193,7 @@ request.")
        ;; `url-open-stream' needs a buffer in which to do things
        ;; like authentication.  But we use another buffer afterwards.
        (unwind-protect
-           (let ((proc (url-open-stream host buf host port)))
+           (let ((proc (url-open-stream host buf host port gateway-method)))
              ;; url-open-stream might return nil.
              (when (processp proc)
                ;; Drop the temp buffer link before killing the buffer.
@@ -312,7 +313,14 @@ request.")
                  (concat
                   "From: " url-personal-mail-address "\r\n"))
              ;; Encodings we understand
-             (if url-mime-encoding-string
+             (if (or url-mime-encoding-string
+                    ;; MS-Windows loads zlib dynamically, so recheck
+                    ;; in case they made it available since
+                    ;; initialization in url-vars.el.
+                    (and (eq 'system-type 'windows-nt)
+                         (fboundp 'zlib-available-p)
+                         (zlib-available-p)
+                         (setq url-mime-encoding-string "gzip")))
                  (concat
                   "Accept-encoding: " url-mime-encoding-string "\r\n"))
              (if url-mime-charset-string
@@ -413,7 +421,7 @@ Return the number of characters removed."
          (goto-char (point-max))
          (insert "<hr>Sorry, but I do not know how to handle " type
                  " authentication.  If you'd like to write it,"
-                 " send it to " url-bug-address ".<hr>")
+                 " please use M-x report-emacs-bug RET.<hr>")
           ;; We used to set a `status' var (declared "special") but I can't
           ;; find the corresponding let-binding, so it's probably an error.
           ;; FIXME: Maybe it was supposed to set `success', i.e. to return t?
@@ -1166,7 +1174,7 @@ the end of the document."
     (when (eq process-buffer (current-buffer))
       (goto-char (point-max)))))
 
-(defun url-http (url callback cbargs &optional retry-buffer)
+(defun url-http (url callback cbargs &optional retry-buffer gateway-method)
   "Retrieve URL via HTTP asynchronously.
 URL must be a parsed URL.  See `url-generic-parse-url' for details.
 
@@ -1177,11 +1185,14 @@ request, as described in the docstring of `url-retrieve' (if in
 doubt, specify nil).
 
 Optional arg RETRY-BUFFER, if non-nil, specifies the buffer of a
-previous `url-http' call, which is being re-attempted."
+previous `url-http' call, which is being re-attempted.
+
+Optional arg GATEWAY-METHOD specifies the gateway to be used,
+overriding the value of `url-gateway-method'."
   (cl-check-type url vector "Need a pre-parsed URL.")
   (let* ((host (url-host (or url-using-proxy url)))
         (port (url-port (or url-using-proxy url)))
-        (connection (url-http-find-free-connection host port))
+        (connection (url-http-find-free-connection host port gateway-method))
         (buffer (or retry-buffer
                     (generate-new-buffer
                       (format " *http %s:%d*" host port)))))
@@ -1439,9 +1450,8 @@ p3p
 (defmacro url-https-create-secure-wrapper (method args)
   `(defun ,(intern (format (if method "url-https-%s" "url-https") method)) ,args
     ,(format "HTTPS wrapper around `%s' call." (or method "url-http"))
-    (let ((url-gateway-method 'tls))
-      (,(intern (format (if method "url-http-%s" "url-http") method))
-       ,@(remove '&rest (remove '&optional args))))))
+    (,(intern (format (if method "url-http-%s" "url-http") method))
+     ,@(remove '&rest (remove '&optional (append args (if method nil '(nil 'tls))))))))
 
 ;;;###autoload (autoload 'url-https "url-http")
 (url-https-create-secure-wrapper nil (url callback cbargs))
index 105fb67737463438a4fdcf23f989506f7a593069..0ce6d2e6cd1c356537428b6190f728c8e1b255f4 100644 (file)
@@ -70,8 +70,7 @@
                "    </xmp>\n"
                "   </p>\n"
                "   <p>\n"
-               "    If you If you feel this is an error, <a href=\""
-               "mailto:" url-bug-address "\">send mail</a>\n"
+               "    If you feel this is an error, M-x report-emacs-bug RET.\n"
                "   </p>\n"
                "  </div>\n"
                " </body>\n"
diff --git a/lisp/url/url-tramp.el b/lisp/url/url-tramp.el
new file mode 100644 (file)
index 0000000..9cc17a3
--- /dev/null
@@ -0,0 +1,79 @@
+;;; url-tramp.el --- file-name-handler magic invoking Tramp for some protocols
+
+;; Copyright (C) 2014 Free Software Foundation, Inc.
+
+;; Author: Michael Albinus <michael.albinus@gmx.de>
+;; Keywords: comm, data, processes, hypermedia
+
+;; This file is part of GNU Emacs.
+;;
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;; Code:
+
+(require 'url-parse)
+(require 'tramp)
+(require 'password-cache)
+
+;;;###autoload
+(defcustom url-tramp-protocols '("ftp" "ssh" "scp" "rsync" "telnet")
+  "List of URL protocols the work is handled by Tramp.
+They must also be covered by `url-handler-regexp'."
+  :group 'url
+  :version "25.1"
+  :type '(list string))
+
+(defun url-tramp-convert-url-to-tramp (url)
+  "Convert URL to a Tramp file name."
+  (let ((obj (url-generic-parse-url (and (stringp url) url))))
+    (if (member (url-type obj) url-tramp-protocols)
+       (progn
+         (if (url-password obj)
+             (password-cache-add
+              (tramp-make-tramp-file-name
+               (url-type obj) (url-user obj) (url-host obj) "")
+              (url-password obj))
+           (tramp-make-tramp-file-name
+            (url-type obj) (url-user obj) (url-host obj) (url-filename obj))))
+      url)))
+
+(defun url-tramp-convert-tramp-to-url (file)
+  "Convert FILE, a Tramp file name, to a URL."
+  (let ((obj (ignore-errors (tramp-dissect-file-name file))))
+    (if (member (tramp-file-name-method obj) url-tramp-protocols)
+       (url-recreate-url
+        (url-parse-make-urlobj
+         (tramp-file-name-method obj)
+         (tramp-file-name-user obj)
+         nil ; password.
+         (tramp-file-name-host obj)
+         nil ; port.
+         (tramp-file-name-localname obj)
+         nil nil t)) ; target attributes fullness.
+      file)))
+
+;;;###autoload
+(defun url-tramp-file-handler (operation &rest args)
+  "Function called from the `file-name-handler-alist' routines.
+OPERATION is what needs to be done.  ARGS are the arguments that
+would have been passed to OPERATION."
+  (let ((default-directory (url-tramp-convert-url-to-tramp default-directory))
+       (args (mapcar 'url-tramp-convert-url-to-tramp args)))
+    (url-tramp-convert-tramp-to-url (apply operation args))))
+
+(provide 'url-tramp)
+
+;;; url-tramp.el ends here
index a7d7e3e0fedd2939c262f836b770996de16c7894..b796e769c60c1874c331220c3538e431c7e14e24 100644 (file)
@@ -1,9 +1,9 @@
 ;;; url-util.el --- Miscellaneous helper routines for URL library
 
-;; Copyright (C) 1996-1999, 2001, 2004-2014 Free Software Foundation,
-;; Inc.
+;; Copyright (C) 1996-1999, 2001, 2004-2014 Free Software Foundation, Inc.
 
 ;; Author: Bill Perry <wmperry@gnu.org>
+;; Maintainer: emacs-devel@gnu.org
 ;; Keywords: comm, data, processes
 
 ;; This file is part of GNU Emacs.
@@ -628,14 +628,9 @@ Creates FILE and its parent directories if they do not exist."
       (make-directory dir t)))
   ;; Based on doc-view-make-safe-dir.
   (condition-case nil
-      (let ((umask (default-file-modes)))
-        (unwind-protect
-            (progn
-              (set-default-file-modes #o0600)
-              (with-temp-buffer
-                (write-region (point-min) (point-max)
-                              file nil 'silent nil 'excl)))
-          (set-default-file-modes umask)))
+      (with-file-modes #o0600
+        (with-temp-buffer
+          (write-region (point-min) (point-max) file nil 'silent nil 'excl)))
     (file-already-exists
      (if (file-symlink-p file)
          (error "Danger: `%s' is a symbolic link" file))
index 4cdb59deb27808055097c54879680e9415fd6b8c..62b7b855533cfe5d1af36e4118639e6b72b5ba0d 100644 (file)
@@ -1,7 +1,6 @@
 ;;; url-vars.el --- Variables for Uniform Resource Locator tool
 
-;; Copyright (C) 1996-1999, 2001, 2004-2014 Free Software Foundation,
-;; Inc.
+;; Copyright (C) 1996-1999, 2001, 2004-2014 Free Software Foundation, Inc.
 
 ;; Keywords: comm, data, processes, hypermedia
 
@@ -82,8 +81,8 @@ If non-nil and not t, the user will be asked for each refresh request."
   :type 'boolean
   :group 'url-cache)
 
-(defconst url-bug-address "bug-gnu-emacs@gnu.org"
-  "Where to send bug reports.")
+(define-obsolete-variable-alias 'url-bug-address
+  'report-emacs-bug-address "24.5")
 
 (defcustom url-personal-mail-address nil
   "Your full email address.
index ca18d718dcbf3577d519f5c846e800f30a5ff52a..4594ab6a7f7d40723e020360e03240411cabe2ec 100644 (file)
@@ -1,9 +1,9 @@
 ;;; url.el --- Uniform Resource Locator retrieval tool  -*- lexical-binding: t -*-
 
-;; Copyright (C) 1996-1999, 2001, 2004-2014 Free Software Foundation,
-;; Inc.
+;; Copyright (C) 1996-1999, 2001, 2004-2014 Free Software Foundation, Inc.
 
 ;; Author: Bill Perry <wmperry@gnu.org>
+;; Maintainer: emacs-devel@gnu.org
 ;; Keywords: comm, data, processes, hypermedia
 
 ;; This file is part of GNU Emacs.
index 8e44c024dc4d0cc95347f39ef4b117277c950653..cd6fcaec28e664b98df3294768bce620b1f0bb4f 100644 (file)
@@ -1097,12 +1097,17 @@ file were isearch was started."
                                    (ignore-errors
                                      (version< (substring b (length name))
                                                (substring a (length name))))))))
-        (files (if isearch-forward files (reverse files))))
-    (find-file-noselect
-     (if wrap
-        (car files)
-       (cadr (member (file-name-nondirectory (buffer-file-name buffer))
-                    files))))))
+        (files (if isearch-forward files (reverse files)))
+        (file (if wrap
+                  (car files)
+                (cadr (member (file-name-nondirectory (buffer-file-name buffer))
+                              files)))))
+    ;; If there are no files that match the default pattern ChangeLog.[0-9],
+    ;; return the current buffer to force isearch wrapping to its beginning.
+    ;; If file is nil, multi-isearch-search-fun will signal "end of multi".
+    (if (file-exists-p file)
+       (find-file-noselect file)
+      (current-buffer))))
 
 (defun change-log-fill-forward-paragraph (n)
   "Cut paragraphs so filling preserves open parentheses at beginning of lines."
index 923de9a0ca6261cd6f2e38c61ac50f158343e334..9afb9f47e9124230bb201eda5ec32bc19c2652c4 100644 (file)
@@ -302,14 +302,9 @@ well."
 (defvar diff-added-face 'diff-added)
 
 (defface diff-changed
-  ;; We normally apply a `shadow'-based face on the `diff-context'
-  ;; face, and keep `diff-changed' the default.
-  '((((class color grayscale) (min-colors 88)))
-    ;; If the terminal lacks sufficient colors for shadowing,
-    ;; highlight changed lines explicitly.
-    (((class color))
-     :foreground "yellow"))
+  '((t nil))
   "`diff-mode' face used to highlight changed lines."
+  :version "25.1"
   :group 'diff-mode)
 (define-obsolete-face-alias 'diff-changed-face 'diff-changed "22.1")
 (defvar diff-changed-face 'diff-changed)
@@ -343,8 +338,12 @@ well."
 (defvar diff-function-face 'diff-function)
 
 (defface diff-context
-  '((((class color grayscale) (min-colors 88)) :inherit shadow))
+  '((((class color grayscale) (min-colors 88) (background light))
+     :foreground "#333333")
+    (((class color grayscale) (min-colors 88) (background dark))
+     :foreground "#dddddd"))
   "`diff-mode' face used to highlight context and other side-information."
+  :version "25.1"
   :group 'diff-mode)
 (define-obsolete-face-alias 'diff-context-face 'diff-context "22.1")
 (defvar diff-context-face 'diff-context)
@@ -1221,6 +1220,9 @@ else cover the whole buffer."
                (?- (cl-incf minus))
                (?! (cl-incf bang))
                ((or ?\\ ?#) nil)
+               (?\n (if diff-valid-unified-empty-line
+                        (cl-incf space)
+                      (setq space 0 plus 0 minus 0 bang 0)))
                (_  (setq space 0 plus 0 minus 0 bang 0)))
            (cond
             ((looking-at diff-hunk-header-re-unified)
@@ -1916,7 +1918,7 @@ For use in `add-log-current-defun-function'."
 
 ;;; Fine change highlighting.
 
-(defface diff-refine-change
+(defface diff-refine-changed
   '((((class color) (min-colors 88) (background light))
      :background "#ffff55")
     (((class color) (min-colors 88) (background dark))
@@ -1924,6 +1926,7 @@ For use in `add-log-current-defun-function'."
     (t :inverse-video t))
   "Face used for char-based changes shown by `diff-refine-hunk'."
   :group 'diff-mode)
+(define-obsolete-face-alias 'diff-refine-change 'diff-refine-changed "24.5")
 
 (defface diff-refine-removed
   '((default
index dd0d76485bf75e7d97fd8a9d4e358962e2a349d9..589ea454965ff2efc105e61f13d398e20661f3d4 100644 (file)
@@ -949,7 +949,9 @@ this variable represents.")
 
 (defface ediff-current-diff-Ancestor
   (if (featurep 'emacs)
-      '((((class color) (min-colors 16))
+      '((((class color) (min-colors 88))
+        (:background "VioletRed"))
+       (((class color) (min-colors 16))
         (:foreground "Black" :background "VioletRed"))
        (((class color))
         (:foreground "black" :background "magenta3"))
@@ -1057,7 +1059,9 @@ this variable represents.")
 
 (defface ediff-fine-diff-Ancestor
   (if (featurep 'emacs)
-      '((((class color) (min-colors 16))
+      '((((class color) (min-colors 88))
+        (:background "Green"))
+       (((class color) (min-colors 16))
         (:foreground "Black" :background "Green"))
        (((class color))
         (:foreground "red3" :background "green"))
@@ -1091,6 +1095,8 @@ this variable represents.")
   (if (featurep 'emacs)
       `((((type pc))
         (:foreground "green3" :background "light grey"))
+       (((class color) (min-colors 88))
+        (:background "light grey"))
        (((class color) (min-colors 16))
         (:foreground "Black" :background "light grey"))
        (((class color))
@@ -1115,7 +1121,9 @@ this variable represents.")
 
 (defface ediff-even-diff-B
   (if (featurep 'emacs)
-      `((((class color) (min-colors 16))
+      `((((class color) (min-colors 88))
+        (:background "Grey"))
+       (((class color) (min-colors 16))
         (:foreground "White" :background "Grey"))
        (((class color))
         (:foreground "blue3" :background "Grey" :weight bold))
@@ -1138,6 +1146,8 @@ this variable represents.")
   (if (featurep 'emacs)
       `((((type pc))
         (:foreground "yellow3" :background "light grey"))
+       (((class color) (min-colors 88))
+        (:background "light grey"))
        (((class color) (min-colors 16))
         (:foreground "Black" :background "light grey"))
        (((class color))
@@ -1164,6 +1174,8 @@ this variable represents.")
   (if (featurep 'emacs)
       `((((type pc))
         (:foreground "cyan3" :background "light grey"))
+       (((class color) (min-colors 88))
+        (:background "Grey"))
        (((class color) (min-colors 16))
         (:foreground "White" :background "Grey"))
        (((class color))
@@ -1197,6 +1209,8 @@ this variable represents.")
   (if (featurep 'emacs)
       '((((type pc))
         (:foreground "green3" :background "gray40"))
+       (((class color) (min-colors 88))
+        (:background "Grey"))
        (((class color) (min-colors 16))
         (:foreground "White" :background "Grey"))
        (((class color))
@@ -1222,6 +1236,8 @@ this variable represents.")
   (if (featurep 'emacs)
       '((((type pc))
         (:foreground "White" :background "gray40"))
+       (((class color) (min-colors 88))
+        (:background "light grey"))
        (((class color) (min-colors 16))
         (:foreground "Black" :background "light grey"))
        (((class color))
@@ -1246,6 +1262,8 @@ this variable represents.")
   (if (featurep 'emacs)
       '((((type pc))
         (:foreground "yellow3" :background "gray40"))
+       (((class color) (min-colors 88))
+        (:background "Grey"))
        (((class color) (min-colors 16))
         (:foreground "White" :background "Grey"))
        (((class color))
@@ -1268,7 +1286,9 @@ this variable represents.")
 
 (defface ediff-odd-diff-Ancestor
   (if (featurep 'emacs)
-      '((((class color) (min-colors 16))
+      '((((class color) (min-colors 88))
+        (:background "gray40"))
+       (((class color) (min-colors 16))
         (:foreground "cyan3" :background "gray40"))
        (((class color))
         (:foreground "green3" :background "black" :weight bold))
@@ -1326,7 +1346,7 @@ this variable represents.")
 (ediff-defvar-local ediff-current-diff-overlay-Ancestor nil
   "Overlay for the current difference region in the ancestor buffer.")
 
-(defvar ediff-toggle-read-only-function 'toggle-read-only
+(defvar ediff-toggle-read-only-function 'read-only-mode
   "Function to be used to toggle read-only status of the buffer.
 If nil, Ediff tries using the command bound to C-x C-q.")
 
index dbf5247952727f80aa0da5adec929e32c8043882..9ca9effbfd4297647f4cf953f08c77ffb752f076 100644 (file)
@@ -1027,8 +1027,8 @@ of the current buffer."
                                 (file-writable-p file)))
             (toggle-ro-cmd (cond (ediff-toggle-read-only-function)
                                  ((ediff-file-checked-out-p file)
-                                  'toggle-read-only)
-                                 (file-writable 'toggle-read-only)
+                                  'read-only-mode)
+                                 (file-writable 'read-only-mode)
                                  (t (key-binding "\C-x\C-q")))))
        ;; If the file is checked in, make sure we don't make buffer modifiable
        ;; without warning the user.  The user can fool our checks by making the
@@ -1039,7 +1039,7 @@ of the current buffer."
                 ;; non-interactively, in which case don't ask questions
                 ctl-buf)
            (cond ((not buffer-read-only)
-                  (setq toggle-ro-cmd 'toggle-read-only))
+                  (setq toggle-ro-cmd 'read-only-mode))
                  ((and (or (beep 1) t) ; always beep
                        (y-or-n-p
                         (format
@@ -1054,13 +1054,13 @@ of the current buffer."
                     (ediff-change-saved-variable
                      'buffer-read-only nil buf-type)))
                  (t
-                  (setq toggle-ro-cmd 'toggle-read-only)
+                  (setq toggle-ro-cmd 'read-only-mode)
                   (beep 1) (beep 1)
                   (message
                    "Boy, this is risky! Don't modify this file...")
                   (sit-for 3)))) ; let the user see the warning
        (if (and toggle-ro-cmd
-                (string-match "toggle-read-only" (symbol-name toggle-ro-cmd)))
+                (string-match "read-only-mode" (symbol-name toggle-ro-cmd)))
            (save-excursion
              (save-window-excursion
                (select-window (ediff-get-visible-buffer-window buf))
index d4638616dd746580576c936206e9438cdf53885f..b17d11d34a43fd2f589a32fc48c8ebd595c4a3c1 100644 (file)
@@ -2883,17 +2883,11 @@ keymap.  Leaves merge in fast mode."
     (setq vars (cdr vars))
     (setq values (cdr values))))
 
-;; Make a temporary file that only we have access to.
-;; PREFIX is appended to emerge-temp-file-prefix to make the filename prefix.
+;; When the pointless option emerge-temp-file-prefix goes,
+;; make this function obsolete too, and just use make-temp-file.
 (defun emerge-make-temp-file (prefix)
-  (let (f (old-modes (default-file-modes)))
-    (unwind-protect
-       (progn
-         ;; This has no effect, since make-temp-file sets umask = 700.
-         (set-default-file-modes emerge-temp-file-mode)
-         (setq f (make-temp-file (concat emerge-temp-file-prefix prefix))))
-      (set-default-file-modes old-modes))
-    f))
+  "Make a private temporary file based on `emerge-temp-file-prefix'."
+  (make-temp-file (concat emerge-temp-file-prefix prefix)))
 
 ;;; Functions that query the user before he can write out the current buffer.
 
index cc9c4673345a4778ee90581812766b817476f31d..771281555ab054b81bbc12c4d70597a03467b8ba 100644 (file)
@@ -116,9 +116,10 @@ Used in `smerge-diff-base-mine' and related functions."
 (define-obsolete-face-alias 'smerge-markers-face 'smerge-markers "22.1")
 (defvar smerge-markers-face 'smerge-markers)
 
-(defface smerge-refined-change
+(defface smerge-refined-changed
   '((t nil))
   "Face used for char-based changes shown by `smerge-refine'.")
+(define-obsolete-face-alias 'smerge-refined-change 'smerge-refined-changed "24.5")
 
 (defface smerge-refined-removed
   '((default
index 424b48a4ffaadf0b7b07f730a2a2309c53fe4a27..580e7727a06b946dda1f76c28ebb4acddc8d5318 100644 (file)
                         :value "20.5"))
   :group 'vc)
 
+(defcustom vc-annotate-background-mode
+  (not (or (eq (or frame-background-mode
+                  (frame-parameter nil 'background-mode))
+              'dark)
+          (and (tty-display-color-p) (<= (display-color-cells) 8))))
+  "Non-nil means `vc-annotate-color-map' is applied to the background.
+
+When non-nil, the color range from `vc-annotate-color-map' is applied
+to the background, while the foreground remains default.
+
+When nil, the color range from `vc-annotate-color-map' is applied
+to the foreground, and the color from the option `vc-annotate-background'
+is applied to the background."
+  :type 'boolean
+  :set (lambda (symbol value)
+        (set-default symbol value)
+        (when (boundp 'vc-annotate-color-map)
+          (with-demoted-errors
+            ;; Update the value of the dependent variable.
+            (custom-reevaluate-setting 'vc-annotate-color-map))))
+  :version "25.1"
+  :group 'vc)
+
 (defcustom vc-annotate-color-map
   (if (and (tty-display-color-p) (<= (display-color-cells) 8))
       ;; A custom sorted TTY colormap
                  (prog1
                      (cons date x)
                    (setq date (+ date delta)))) colors))
-    ;; Normal colormap: hue stepped from 0-240deg, value=1., saturation=0.75
-    '(( 20. . "#FF3F3F")
-      ( 40. . "#FF6C3F")
-      ( 60. . "#FF993F")
-      ( 80. . "#FFC63F")
-      (100. . "#FFF33F")
-      (120. . "#DDFF3F")
-      (140. . "#B0FF3F")
-      (160. . "#83FF3F")
-      (180. . "#56FF3F")
-      (200. . "#3FFF56")
-      (220. . "#3FFF83")
-      (240. . "#3FFFB0")
-      (260. . "#3FFFDD")
-      (280. . "#3FF3FF")
-      (300. . "#3FC6FF")
-      (320. . "#3F99FF")
-      (340. . "#3F6CFF")
-      (360. . "#3F3FFF")))
+    (cond
+     ;; Normal colormap for background colors with dark foreground:
+     ;; hue stepped from 0-240deg, value=1., saturation=0.20
+     (vc-annotate-background-mode
+      '(( 20. . "#FFCCCC")
+       ( 40. . "#FFD8CC")
+       ( 60. . "#FFE4CC")
+       ( 80. . "#FFF0CC")
+       (100. . "#FFFCCC")
+       (120. . "#F6FFCC")
+       (140. . "#EAFFCC")
+       (160. . "#DEFFCC")
+       (180. . "#D2FFCC")
+       (200. . "#CCFFD2")
+       (220. . "#CCFFDE")
+       (240. . "#CCFFEA")
+       (260. . "#CCFFF6")
+       (280. . "#CCFCFF")
+       (300. . "#CCF0FF")
+       (320. . "#CCE4FF")
+       (340. . "#CCD8FF")
+       (360. . "#CCCCFF")))
+     ;; Normal colormap for foreground colors on dark background:
+     ;; hue stepped from 0-240deg, value=1., saturation=0.75
+     (t
+      '(( 20. . "#FF3F3F")
+       ( 40. . "#FF6C3F")
+       ( 60. . "#FF993F")
+       ( 80. . "#FFC63F")
+       (100. . "#FFF33F")
+       (120. . "#DDFF3F")
+       (140. . "#B0FF3F")
+       (160. . "#83FF3F")
+       (180. . "#56FF3F")
+       (200. . "#3FFF56")
+       (220. . "#3FFF83")
+       (240. . "#3FFFB0")
+       (260. . "#3FFFDD")
+       (280. . "#3FF3FF")
+       (300. . "#3FC6FF")
+       (320. . "#3F99FF")
+       (340. . "#3F6CFF")
+       (360. . "#3F3FFF")))))
   "Association list of age versus color, for \\[vc-annotate].
 Ages are given in units of fractional days.  Default is eighteen
 steps using a twenty day increment, from red to blue.  For TTY
@@ -98,12 +145,12 @@ all other colors between (excluding black and white)."
   :type 'alist
   :group 'vc)
 
-(defcustom vc-annotate-very-old-color "#3F3FFF"
+(defcustom vc-annotate-very-old-color (if vc-annotate-background-mode "#CCCCFF" "#3F3FFF")
   "Color for lines older than the current color range in \\[vc-annotate]."
   :type 'string
   :group 'vc)
 
-(defcustom vc-annotate-background "black"
+(defcustom vc-annotate-background nil
   "Background color for \\[vc-annotate].
 Default color is used if nil."
   :type '(choice (const :tag "Default background" nil) (color))
@@ -347,7 +394,9 @@ Customization variables:
 `vc-annotate-menu-elements' customizes the menu elements of the
 mode-specific menu.  `vc-annotate-color-map' and
 `vc-annotate-very-old-color' define the mapping of time to colors.
-`vc-annotate-background' specifies the background color."
+`vc-annotate-background' specifies the background color.
+`vc-annotate-background-mode' specifies whether the color map
+should be applied to the background or to the foreground."
   (interactive
    (save-current-buffer
      (vc-ensure-vc-buffer)
@@ -666,10 +715,13 @@ The annotations are relative to the current time, unless overridden by OFFSET."
                ;; Make the face if not done.
                (face (or (intern-soft face-name)
                          (let ((tmp-face (make-face (intern face-name))))
-                           (set-face-foreground tmp-face (cdr color))
-                           (when vc-annotate-background
-                            (set-face-background tmp-face
-                                                 vc-annotate-background))
+                           (cond
+                            (vc-annotate-background-mode
+                             (set-face-background tmp-face (cdr color)))
+                            (t
+                             (set-face-foreground tmp-face (cdr color))
+                             (when vc-annotate-background
+                              (set-face-background tmp-face vc-annotate-background))))
                            tmp-face))))        ; Return the face
           (put-text-property start end 'face face)))))
   ;; Pretend to font-lock there were no matches.
index 0730a9c72ce3be97a176d3b9f3a166033a51027a..4693998dfaf04260b708a8f71612b315caa05604 100644 (file)
@@ -1132,11 +1132,12 @@ stream.  Standard error output is discarded."
                   (file &optional keep noquery reset-vc-info))
 
 (defun vc-bzr-shelve (name)
-  "Create a shelve."
+  "Shelve the changes of the selected files."
   (interactive "sShelf name: ")
-  (let ((root (vc-bzr-root default-directory)))
+  (let ((root (vc-bzr-root default-directory))
+        (fileset (vc-deduce-fileset)))
     (when root
-      (vc-bzr-command "shelve" nil 0 nil "--all" "-m" name)
+      (vc-bzr-command "shelve" nil 0 (nth 1 fileset) "--all" "-m" name)
       (vc-resynch-buffer root t t))))
 
 (defun vc-bzr-shelve-show (name)
index 9c8ab3ba3934d23293de3ae87f6aaf61f85a07d0..afcfd6660824210964596fea09ba7ba620c8e667 100644 (file)
 ;; - clear-headers ()                              NOT NEEDED
 ;; - delete-file (file)                            OK
 ;; - rename-file (old new)                         OK
-;; - find-file-hook ()                             NOT NEEDED
+;; - find-file-hook ()                             OK
+;; - conflicted-files                              OK
 
 ;;; Code:
 
@@ -769,6 +770,47 @@ This prompts for a branch to merge from."
     (with-current-buffer buffer (vc-run-delayed (vc-compilation-mode 'git)))
     (vc-set-async-update buffer)))
 
+(defun vc-git-conflicted-files (directory)
+  "Return the list of files with conflicts in DIRECTORY."
+  (let* ((status
+          (vc-git--run-command-string directory "status" "--porcelain" "--"))
+         (lines (when status (split-string status "\n" 'omit-nulls)))
+         files)
+    (dolist (line lines files)
+      (when (string-match "\\([ MADRCU?!][ MADRCU?!]\\) \\(.+\\)\\(?: -> \\(.+\\)\\)?"
+                          line)
+        (let ((state (match-string 1 line))
+              (file (match-string 2 line)))
+          ;; See git-status(1).
+          (when (member state '("AU" "UD" "UA" ;; "DD"
+                                "DU" "AA" "UU"))
+            (push file files)))))))
+
+(defun vc-git-resolve-when-done ()
+  "Call \"git add\" if the conflict markers have been removed."
+  (save-excursion
+    (goto-char (point-min))
+    (unless (re-search-forward "^<<<<<<< " nil t)
+      (vc-git-command nil 0 buffer-file-name "add")
+      ;; Remove the hook so that it is not called multiple times.
+      (remove-hook 'after-save-hook 'vc-git-resolve-when-done t))))
+
+(defun vc-git-find-file-hook ()
+  "Activate `smerge-mode' if there is a conflict."
+  (when (and buffer-file-name
+             ;; FIXME
+             ;; 1) the net result is to call git twice per file.
+             ;; 2) v-g-c-f is documented to take a directory.
+             ;; http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01126.html
+             (vc-git-conflicted-files buffer-file-name)
+             (save-excursion
+               (goto-char (point-min))
+               (re-search-forward "^<<<<<<< " nil 'noerror)))
+    (vc-file-setprop buffer-file-name 'vc-state 'conflict)
+    (smerge-start-session)
+    (add-hook 'after-save-hook 'vc-git-resolve-when-done nil 'local)
+    (message "There are unresolved conflicts in this file")))
+
 ;;; HISTORY FUNCTIONS
 
 (autoload 'vc-setup-buffer "vc-dispatcher")
index b800c64c8697a92a42f12dc765b9fbb53a5bb6c3..df61006ad51c132c487aaa09eabd75210ef984f5 100644 (file)
@@ -82,8 +82,8 @@
 ;; - annotate-current-time ()                  NOT NEEDED
 ;; - annotate-extract-revision-at-line ()      OK
 ;; TAG SYSTEM
-;; - create-tag (dir name branchp)             NEEDED
-;; - retrieve-tag (dir name update)            NEEDED
+;; - create-tag (dir name branchp)             OK
+;; - retrieve-tag (dir name update)            OK FIXME UPDATE BUFFERS
 ;; MISCELLANEOUS
 ;; - make-version-backups-p (file)             ??
 ;; - repository-hostname (dirname)             ??
@@ -146,12 +146,19 @@ If nil, use the value of `vc-diff-switches'.  If t, use no switches."
   :group 'vc-hg)
 
 (defcustom vc-hg-root-log-format
-  '("{rev}:{tags}: {author|person} {date|shortdate} {desc|firstline}\\n"
-    "^\\([0-9]+\\):\\([^:]*\\): \\(.*?\\)[ \t]+\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}\\)"
+  `(,(concat "{rev}:{ifeq(branch, 'default','', '{branch}')}"
+             ":{bookmarks}:{tags}:{author|person}"
+             " {date|shortdate} {desc|firstline}\\n")
+    ,(concat "^\\(?:[+@o x|-]*\\)"      ;Graph data.
+             "\\([0-9]+\\):\\([^:]*\\)"
+             ":\\([^:]*\\):\\([^:]*\\):\\(.*?\\)"
+             "[ \t]+\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}\\)")
     ((1 'log-view-message-face)
-     (2 'change-log-list)
-     (3 'change-log-name)
-     (4 'change-log-date)))
+     (2 'change-log-file)
+     (3 'change-log-list)
+     (4 'change-log-conditionals)
+     (5 'change-log-name)
+     (6 'change-log-date)))
   "Mercurial log template for `vc-hg-print-log' short format.
 This should be a list (TEMPLATE REGEXP KEYWORDS), where TEMPLATE
 is the \"--template\" argument string to pass to Mercurial,
@@ -160,7 +167,7 @@ output, and KEYWORDS is a list of `font-lock-keywords' for
 highlighting the Log View buffer."
   :type '(list string string (repeat sexp))
   :group 'vc-hg
-  :version "24.1")
+  :version "24.5")
 
 \f
 ;;; Properties of the backend
@@ -244,6 +251,9 @@ highlighting the Log View buffer."
 
 (autoload 'vc-setup-buffer "vc-dispatcher")
 
+(defvar vc-hg-log-graph nil
+  "If non-nil, use `--graph' in the short log output.")
+
 (defun vc-hg-print-log (files buffer &optional shortlog start-revision limit)
   "Print commit log associated with FILES into specified BUFFER.
 If SHORTLOG is non-nil, use a short format based on `vc-hg-root-log-format'.
@@ -261,7 +271,9 @@ If LIMIT is non-nil, show no more than this many entries."
             (nconc
              (when start-revision (list (format "-r%s:0" start-revision)))
              (when limit (list "-l" (format "%s" limit)))
-             (when shortlog (list "--template" (car vc-hg-root-log-format)))
+             (when shortlog `(,@(if vc-hg-log-graph '("--graph"))
+                               "--template"
+                               ,(car vc-hg-root-log-format)))
              vc-hg-log-switches)))))
 
 (defvar log-view-message-re)
@@ -376,8 +388,26 @@ Optional arg REVISION is a revision to annotate from."
       (if (match-beginning 3)
          (match-string-no-properties 1)
        (cons (match-string-no-properties 1)
-             (expand-file-name (match-string-no-properties 4)
-                               (vc-hg-root default-directory)))))))
+      (expand-file-name (match-string-no-properties 4)
+ (vc-hg-root default-directory)))))))
+
+;;; Tag system
+
+(defun vc-hg-create-tag (dir name branchp)
+  "Attach the tag NAME to the state of the working copy."
+  (let ((default-directory dir))
+    (and (vc-hg-command nil 0 nil "status")
+         (vc-hg-command nil 0 nil (if branchp "bookmark" "tag") name))))
+
+(defun vc-hg-retrieve-tag (dir name update)
+  "Retrieve the version tagged by NAME of all registered files at or below DIR."
+  (let ((default-directory dir))
+    (vc-hg-command nil 0 nil "update" name)
+    ;; FIXME: update buffers if `update' is true
+    ;; TODO: update *vc-change-log* buffer so can see @ if --graph
+    ))
+
+;;; Miscellaneous
 
 (defun vc-hg-previous-revision (_file rev)
   (let ((newrev (1- (string-to-number rev))))
index fb10edca06dd0096d0f41ae8941892c790b05dff..df660d193e281540b2735a6a9c3e247da38dfa19 100644 (file)
@@ -190,6 +190,11 @@ individually should stay local."
 (make-variable-buffer-local 'vc-mode)
 (put 'vc-mode 'permanent-local t)
 
+;;; We signal this error when we try to do something a VC backend
+;;; doesn't support.  Two arguments: the method that's not supported
+;;; and the backend
+(define-error 'vc-not-supported "VC method not implemented for backend")
+
 (defun vc-mode (&optional _arg)
   ;; Dummy function for C-h m
   "Version Control minor mode.
@@ -268,10 +273,10 @@ It is usually called via the `vc-call' macro."
       (setq f (vc-find-backend-function backend function-name))
       (push (cons function-name f) (get backend 'vc-functions)))
     (cond
-     ((null f)
-      (error "Sorry, %s is not implemented for %s" function-name backend))
-     ((consp f)        (apply (car f) (cdr f) args))
-     (t                (apply f args)))))
+      ((null f)
+       (signal 'vc-not-supported (list function-name backend)))
+      ((consp f)       (apply (car f) (cdr f) args))
+      (t               (apply f args)))))
 
 (defmacro vc-call (fun file &rest args)
   "A convenience macro for calling VC backend functions.
index 4a536900eb3967e9a5cb03ca645fb853da7c3047..5491d67e700fb9db61fdf174e3a1dfbff06d5747 100644 (file)
@@ -1878,6 +1878,19 @@ saving the buffer."
         t (list backend (list rootdir) working-revision) nil nil
         (called-interactively-p 'interactive))))))
 
+;;;###autoload
+(defun vc-root-dir ()
+  "Return the root directory for the current VC tree.
+Return nil if the root directory cannot be identified."
+  (let ((backend (vc-deduce-backend)))
+    (if backend
+        (condition-case err
+            (vc-call-backend backend 'root default-directory)
+          (vc-not-supported
+           (unless (eq (cadr err) 'root)
+             (signal (car err) (cdr err)))
+           nil)))))
+
 ;;;###autoload
 (defun vc-revision-other-window (rev)
   "Visit revision REV of the current file in another window.
@@ -2450,7 +2463,7 @@ depending on the underlying version-control system."
        (error "Please revert all modified workfiles before rollback")))
     ;; Accumulate changes associated with the fileset
     (vc-setup-buffer "*vc-diff*")
-    (not-modified)
+    (set-buffer-modified-p nil)
     (message "Finding changes...")
     (let* ((tip (vc-working-revision (car files)))
            ;; FIXME: `previous-revision' should take the fileset.
diff --git a/lisp/w32-common-fns.el b/lisp/w32-common-fns.el
deleted file mode 100644 (file)
index d149500..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-;;; w32-common-fns.el --- Lisp routines for Windows and Cygwin-w32
-
-;; Copyright (C) 1994, 2001-2014 Free Software Foundation, Inc.
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
-
-;;; Commentary:
-;;;
-;;; This file contains functions that are used by both native NT Emacs
-;;; and Cygwin Emacs compiled to use the native Windows widget
-;;; library.
-
-(declare-function x-server-version "w32fns.c" (&optional terminal))
-
-(defun w32-version ()
-  "Return the MS-Windows version numbers.
-The value is a list of three integers: the major and minor version
-numbers, and the build number."
-  (x-server-version))
-
-(defun w32-using-nt ()
-  "Return non-nil if running on a Windows NT descendant.
-That includes all Windows systems except for 9X/Me."
-  (getenv "SystemRoot"))
-
-(declare-function w32-get-clipboard-data "w32select.c")
-(declare-function w32-set-clipboard-data "w32select.c")
-(declare-function x-server-version "w32fns.c" (&optional display))
-
-;;; Fix interface to (X-specific) mouse.el
-(defun x-set-selection (type data)
-  "Make an X selection of type TYPE and value DATA.
-The argument TYPE (nil means `PRIMARY') says which selection, and
-DATA specifies the contents.  TYPE must be a symbol.  \(It can also
-be a string, which stands for the symbol with that name, but this
-is considered obsolete.)  DATA may be a string, a symbol, an
-integer (or a cons of two integers or list of two integers).
-
-The selection may also be a cons of two markers pointing to the same buffer,
-or an overlay.  In these cases, the selection is considered to be the text
-between the markers *at whatever time the selection is examined*.
-Thus, editing done in the buffer after you specify the selection
-can alter the effective value of the selection.
-
-The data may also be a vector of valid non-vector selection values.
-
-The return value is DATA.
-
-Interactively, this command sets the primary selection.  Without
-prefix argument, it reads the selection in the minibuffer.  With
-prefix argument, it uses the text of the region as the selection value.
-
-Note that on MS-Windows, primary and secondary selections set by Emacs
-are not available to other programs."
-  (put 'x-selections (or type 'PRIMARY) data))
-
-(defun x-get-selection (&optional type _data-type)
-  "Return the value of an X Windows selection.
-The argument TYPE (default `PRIMARY') says which selection,
-and the argument DATA-TYPE (default `STRING') says
-how to convert the data.
-
-TYPE may be any symbol \(but nil stands for `PRIMARY').  However,
-only a few symbols are commonly used.  They conventionally have
-all upper-case names.  The most often used ones, in addition to
-`PRIMARY', are `SECONDARY' and `CLIPBOARD'.
-
-DATA-TYPE is usually `STRING', but can also be one of the symbols
-in `selection-converter-alist', which see.  This argument is
-ignored on MS-Windows and MS-DOS."
-  (get 'x-selections (or type 'PRIMARY)))
-
-;; x-selection-owner-p is used in simple.el
-(defun x-selection-owner-p (&optional selection _terminal)
-  "" ; placeholder for doc.c
-  (and (memq selection '(nil PRIMARY SECONDARY))
-       (get 'x-selections (or selection 'PRIMARY))))
-
-;; The "Windows" keys on newer keyboards bring up the Start menu
-;; whether you want it or not - make Emacs ignore these keystrokes
-;; rather than beep.
-(global-set-key [lwindow] 'ignore)
-(global-set-key [rwindow] 'ignore)
-
-(defvar w32-charset-info-alist)                ; w32font.c
-
-\f
-;;;; Selections
-
-;; We keep track of the last text selected here, so we can check the
-;; current selection against it, and avoid passing back our own text
-;; from x-selection-value.
-(defvar x-last-selected-text nil)
-(defvar x-select-enable-clipboard)
-
-(defun x-get-selection-value ()
-  "Return the value of the current selection.
-Consult the selection.  Treat empty strings as if they were unset."
-  (if x-select-enable-clipboard
-      (let (text)
-       ;; Don't die if x-get-selection signals an error.
-       (with-demoted-errors "w32-get-clipboard-data:%s"
-         (setq text (w32-get-clipboard-data)))
-       (if (string= text "") (setq text nil))
-       (cond
-        ((not text) nil)
-        ((eq text x-last-selected-text) nil)
-        ((string= text x-last-selected-text)
-         ;; Record the newer string, so subsequent calls can use the 'eq' test.
-         (setq x-last-selected-text text)
-         nil)
-        (t
-         (setq x-last-selected-text text))))))
-\f
-(defalias 'x-selection-value 'x-get-selection-value)
-
-;; Arrange for the kill and yank functions to set and check the clipboard.
-(setq interprogram-cut-function 'x-select-text)
-(setq interprogram-paste-function 'x-get-selection-value)
-
-(provide 'w32-common-fns)
index fda51b1532b52ae6dc35affbe1699942f5eef681..2cbeb49d543b6d01e915c3888827e66f55ed68f9 100644 (file)
@@ -26,7 +26,6 @@
 
 ;;; Code:
 (require 'w32-vars)
-(require 'w32-common-fns)
 
 (defvar explicit-shell-file-name)
 
index 83bd4e0607476953a0784e01ef9faac59885023b..917f0432ef2b11475c9b99affc54d67916392461 100644 (file)
@@ -1204,6 +1204,8 @@ SYMBOL    is a valid symbol associated with CHAR.
 (defvar whitespace-point (point)
   "Used to save locally current point value.
 Used by function `whitespace-trailing-regexp' (which see).")
+(defvar-local whitespace-point--used nil
+  "Region whose highlighting depends on `whitespace-point'.")
 
 (defvar whitespace-font-lock-refontify nil
   "Used to save locally the font-lock refontify state.
@@ -1717,43 +1719,7 @@ It is a cons of strings, where the car part is used when
 (defun whitespace-report (&optional force report-if-bogus)
   "Report some whitespace problems in buffer.
 
-Return nil if there is no whitespace problem; otherwise, return
-non-nil.
-
-If FORCE is non-nil or \\[universal-argument] was pressed just
-before calling `whitespace-report' interactively, it forces
-`whitespace-style' to have:
-
-   empty
-   trailing
-   indentation
-   space-before-tab
-   space-after-tab
-
-If REPORT-IF-BOGUS is non-nil, it reports only when there are any
-whitespace problems in buffer.
-
-Report if some of the following whitespace problems exist:
-
-* If `indent-tabs-mode' is non-nil:
-   empty               1. empty lines at beginning of buffer.
-   empty               2. empty lines at end of buffer.
-   trailing            3. SPACEs or TABs at end of line.
-   indentation         4. 8 or more SPACEs at beginning of line.
-   space-before-tab    5. SPACEs before TAB.
-   space-after-tab     6. 8 or more SPACEs after TAB.
-
-* If `indent-tabs-mode' is nil:
-   empty               1. empty lines at beginning of buffer.
-   empty               2. empty lines at end of buffer.
-   trailing            3. SPACEs or TABs at end of line.
-   indentation         4. TABS at beginning of line.
-   space-before-tab    5. SPACEs before TAB.
-   space-after-tab     6. 8 or more SPACEs after TAB.
-
-See `whitespace-style' for documentation.
-See also `whitespace-cleanup' and `whitespace-cleanup-region' for
-cleaning up these problems."
+Perform `whitespace-report-region' on the current buffer."
   (interactive (list current-prefix-arg))
   (whitespace-report-region (point-min) (point-max)
                            force report-if-bogus))
@@ -1771,13 +1737,14 @@ before calling `whitespace-report-region' interactively, it
 forces `whitespace-style' to have:
 
    empty
+   trailing
    indentation
    space-before-tab
-   trailing
    space-after-tab
 
-If REPORT-IF-BOGUS is non-nil, it reports only when there are any
-whitespace problems in buffer.
+If REPORT-IF-BOGUS is t, it reports only when there are any
+whitespace problems in buffer; if it is `never', it does not
+report problems.
 
 Report if some of the following whitespace problems exist:
 
@@ -1832,7 +1799,7 @@ cleaning up these problems."
                     (and (re-search-forward regexp rend t)
                          (setq has-bogus t))))
               whitespace-report-list)))
-       (when (if report-if-bogus has-bogus t)
+       (when (pcase report-if-bogus (`nil t) (`never nil) (_ has-bogus))
          (whitespace-kill-buffer whitespace-report-buffer-name)
          ;; `whitespace-indent-tabs-mode' is local to current buffer
          ;; `whitespace-tab-width' is local to current buffer
@@ -2155,7 +2122,10 @@ resultant list will be returned."
   (when (whitespace-style-face-p)
     ;; save current point and refontify when necessary
     (set (make-local-variable 'whitespace-point)
-        (point))
+         (point))
+    (setq whitespace-point--used
+          (let ((ol (make-overlay (point) (point) nil nil t)))
+            (delete-overlay ol) ol))
     (set (make-local-variable 'whitespace-font-lock-refontify)
         0)
     (set (make-local-variable 'whitespace-bob-marker)
@@ -2170,6 +2140,7 @@ resultant list will be returned."
     (setq
      whitespace-font-lock-keywords
      `(
+       (whitespace-point--flush-used)
        ,@(when (memq 'spaces whitespace-active-style)
            ;; Show SPACEs.
            `((,whitespace-space-regexp 1 whitespace-space t)
@@ -2247,26 +2218,47 @@ resultant list will be returned."
                  (whitespace-space-after-tab-regexp 'space)))
               1 whitespace-space-after-tab t)))))
     (font-lock-add-keywords nil whitespace-font-lock-keywords t)
-    (when font-lock-mode
-      (font-lock-fontify-buffer))))
+    (font-lock-flush)))
 
 
 (defun whitespace-color-off ()
   "Turn off color visualization."
   ;; turn off font lock
+  (kill-local-variable 'whitespace-point--used)
   (when (whitespace-style-face-p)
     (remove-hook 'post-command-hook #'whitespace-post-command-hook t)
     (remove-hook 'before-change-functions #'whitespace-buffer-changed t)
     (font-lock-remove-keywords nil whitespace-font-lock-keywords)
-    (when font-lock-mode
-      (font-lock-fontify-buffer))))
-
+    (font-lock-flush)))
+
+(defun whitespace-point--used (start end)
+  (let ((ostart (overlay-start whitespace-point--used)))
+    (if ostart
+        (move-overlay whitespace-point--used
+                      (min start ostart)
+                      (max end (overlay-end whitespace-point--used)))
+      (move-overlay whitespace-point--used start end))))
+
+(defun whitespace-point--flush-used (limit)
+  (let ((ostart (overlay-start whitespace-point--used)))
+    ;; Strip parts of whitespace-point--used we're about to refresh.
+    (when ostart
+      (let ((oend (overlay-end whitespace-point--used)))
+        (if (<= (point) ostart)
+            (if (<= oend limit)
+                (delete-overlay whitespace-point--used)
+              (move-overlay whitespace-point--used limit oend)))
+        (if (<= oend limit)
+            (move-overlay whitespace-point--used ostart (point))))))
+  nil)
 
 (defun whitespace-trailing-regexp (limit)
   "Match trailing spaces which do not contain the point at end of line."
   (let ((status t))
     (while (if (re-search-forward whitespace-trailing-regexp limit t)
-              (= whitespace-point (match-end 1)) ;; loop if point at eol
+              (when (= whitespace-point (match-end 1)) ; Loop if point at eol.
+                 (whitespace-point--used (match-beginning 0) (match-end 0))
+                 t)
             (setq status nil)))                  ;; end of buffer
     status))
 
@@ -2279,8 +2271,11 @@ beginning of buffer."
     (cond
      ;; at bob
      ((= b 1)
-      (setq r (and (/= whitespace-point 1)
-                  (looking-at whitespace-empty-at-bob-regexp)))
+      (setq r (and (looking-at whitespace-empty-at-bob-regexp)
+                   (or (/= whitespace-point 1)
+                       (progn (whitespace-point--used (match-beginning 0)
+                                                      (match-end 0))
+                              nil))))
       (set-marker whitespace-bob-marker (if r (match-end 1) b)))
      ;; inside bob empty region
      ((<= limit whitespace-bob-marker)
@@ -2318,9 +2313,11 @@ buffer."
     (cond
      ;; at eob
      ((= limit e)
-      (when (/= whitespace-point e)
-       (goto-char limit)
-       (setq r (whitespace-looking-back whitespace-empty-at-eob-regexp b)))
+      (goto-char limit)
+      (setq r (whitespace-looking-back whitespace-empty-at-eob-regexp b))
+      (when (and r (= whitespace-point e))
+        (setq r nil)
+        (whitespace-point--used (match-beginning 0) (match-end 0)))
       (if r
          (set-marker whitespace-eob-marker (match-beginning 1))
        (set-marker whitespace-eob-marker limit)
@@ -2356,43 +2353,57 @@ buffer."
 (defun whitespace-post-command-hook ()
   "Save current point into `whitespace-point' variable.
 Also refontify when necessary."
-  (setq whitespace-point (point))      ; current point position
-  (let ((refontify
-        (or
-         ;; it is at end of line ...
-         (and (eolp)
-              ;; ... with trailing SPACE or TAB
-              (or (= (preceding-char) ?\ )
-                  (= (preceding-char) ?\t)))
-         ;; it is at beginning of buffer (bob)
-         (= whitespace-point 1)
-         ;; the buffer was modified and ...
-         (and whitespace-buffer-changed
-              (or
-               ;; ... or inside bob whitespace region
-               (<= whitespace-point whitespace-bob-marker)
-               ;; ... or at bob whitespace region border
-               (and (= whitespace-point (1+ whitespace-bob-marker))
-                    (= (preceding-char) ?\n))))
-         ;; it is at end of buffer (eob)
-         (= whitespace-point (1+ (buffer-size)))
-         ;; the buffer was modified and ...
-         (and whitespace-buffer-changed
-              (or
-               ;; ... or inside eob whitespace region
-               (>= whitespace-point whitespace-eob-marker)
-               ;; ... or at eob whitespace region border
-               (and (= whitespace-point (1- whitespace-eob-marker))
-                    (= (following-char) ?\n)))))))
-    (when (or refontify (> whitespace-font-lock-refontify 0))
-      (setq whitespace-buffer-changed nil)
-      ;; adjust refontify counter
-      (setq whitespace-font-lock-refontify
-           (if refontify
-               1
-             (1- whitespace-font-lock-refontify)))
-      ;; refontify
-      (jit-lock-refontify))))
+  (unless (and (eq whitespace-point (point))
+               (not whitespace-buffer-changed))
+    (setq whitespace-point (point))    ; current point position
+    (let ((refontify
+           (cond
+            ;; It is at end of buffer (eob).
+            ((= whitespace-point (1+ (buffer-size)))
+             (when (whitespace-looking-back whitespace-empty-at-eob-regexp
+                                            nil)
+               (match-beginning 0)))
+            ;; It is at end of line ...
+            ((and (eolp)
+                  ;; ... with trailing SPACE or TAB
+                  (or (memq (preceding-char) '(?\s ?\t))))
+             (line-beginning-position))
+            ;; It is at beginning of buffer (bob).
+            ((and (= whitespace-point 1)
+                  (looking-at whitespace-empty-at-bob-regexp))
+             (match-end 0))))
+          (ostart (overlay-start whitespace-point--used)))
+      (cond
+       ((not refontify)
+        ;; New point does not affect highlighting: just refresh the
+        ;; highlighting of old point, if needed.
+        (when ostart
+          (font-lock-flush ostart
+                           (overlay-end whitespace-point--used))
+          (delete-overlay whitespace-point--used)))
+       ((not ostart)
+        ;; Old point did not affect highlighting, but new one does: refresh the
+        ;; highlighting of new point.
+        (font-lock-flush (min refontify (point)) (max refontify (point))))
+       ((save-excursion
+          (goto-char ostart)
+          (setq ostart (line-beginning-position))
+          (and (<= ostart (max refontify (point)))
+               (progn
+                 (goto-char (overlay-end whitespace-point--used))
+                 (let ((oend (line-beginning-position 2)))
+                   (<= (min refontify (point)) oend)))))
+        ;; The old point highlighting and the new point highlighting
+        ;; cover a contiguous region: do a single refresh.
+        (font-lock-flush (min refontify (point) ostart)
+                         (max refontify (point)
+                              (overlay-end whitespace-point--used)))
+        (delete-overlay whitespace-point--used))
+       (t
+        (font-lock-flush (min refontify (point))
+                         (max refontify (point)))
+        (font-lock-flush ostart (overlay-end whitespace-point--used))
+        (delete-overlay whitespace-point--used))))))
 
 \f
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
index a857407820c41a7bf44128e4541c433b7a23f36b..92e52bff55e970c7a21127c85ef79ba6e8eae7f9 100644 (file)
@@ -2626,7 +2626,7 @@ Return an alist of (TYPE MATCH)."
   (let* ((value (widget-get widget :value))
         (type (nth 0 (widget-get widget :args)))
         children)
-    (widget-put widget :value-pos (copy-marker (point)))
+    (widget-put widget :value-pos (point-marker))
     (set-marker-insertion-type (widget-get widget :value-pos) t)
     (while value
       (let ((answer (widget-match-inline type value)))
index 7692c797afe5da74337a925fcc476d7cb4380b57..91a0e159a8442e2f2be936d98a555eb4130fe484 100644 (file)
@@ -108,7 +108,7 @@ Return the buffer."
       ;; Return the buffer.
       buffer)))
 
-(defun temp-buffer-window-show (&optional buffer action)
+(defun temp-buffer-window-show (buffer &optional action)
   "Show temporary buffer BUFFER in a window.
 Return the window showing BUFFER.  Pass ACTION as action argument
 to `display-buffer'."
@@ -185,16 +185,19 @@ argument replaces this)."
   (let ((buffer (make-symbol "buffer"))
        (window (make-symbol "window"))
        (value (make-symbol "value")))
-    `(let* ((,buffer (temp-buffer-window-setup ,buffer-or-name))
-           (standard-output ,buffer)
-           ,window ,value)
-       (setq ,value (progn ,@body))
-       (with-current-buffer ,buffer
-        (setq ,window (temp-buffer-window-show ,buffer ,action)))
-
-       (if (functionp ,quit-function)
-          (funcall ,quit-function ,window ,value)
-        ,value))))
+    (macroexp-let2 nil vbuffer-or-name buffer-or-name
+      (macroexp-let2 nil vaction action
+       (macroexp-let2 nil vquit-function quit-function
+         `(let* ((,buffer (temp-buffer-window-setup ,vbuffer-or-name))
+                 (standard-output ,buffer)
+                 ,window ,value)
+            (setq ,value (progn ,@body))
+            (with-current-buffer ,buffer
+              (setq ,window (temp-buffer-window-show ,buffer ,vaction)))
+
+            (if (functionp ,vquit-function)
+                (funcall ,vquit-function ,window ,value)
+              ,value)))))))
 
 (defmacro with-current-buffer-window (buffer-or-name action quit-function &rest body)
   "Evaluate BODY with a buffer BUFFER-OR-NAME current and show that buffer.
@@ -205,16 +208,50 @@ BODY."
   (let ((buffer (make-symbol "buffer"))
        (window (make-symbol "window"))
        (value (make-symbol "value")))
-    `(let* ((,buffer (temp-buffer-window-setup ,buffer-or-name))
-           (standard-output ,buffer)
-           ,window ,value)
-       (with-current-buffer ,buffer
-        (setq ,value (progn ,@body))
-        (setq ,window (temp-buffer-window-show ,buffer ,action)))
+    (macroexp-let2 nil vbuffer-or-name buffer-or-name
+      (macroexp-let2 nil vaction action
+       (macroexp-let2 nil vquit-function quit-function
+         `(let* ((,buffer (temp-buffer-window-setup ,vbuffer-or-name))
+                 (standard-output ,buffer)
+                 ,window ,value)
+            (with-current-buffer ,buffer
+              (setq ,value (progn ,@body))
+              (setq ,window (temp-buffer-window-show ,buffer ,vaction)))
+
+            (if (functionp ,vquit-function)
+                (funcall ,vquit-function ,window ,value)
+              ,value)))))))
+
+(defmacro with-displayed-buffer-window (buffer-or-name action quit-function &rest body)
+  "Show a buffer BUFFER-OR-NAME and evaluate BODY in that buffer.
+This construct is like `with-current-buffer-window' but unlike that
+displays the buffer specified by BUFFER-OR-NAME before running BODY."
+  (declare (debug t))
+  (let ((buffer (make-symbol "buffer"))
+       (window (make-symbol "window"))
+       (value (make-symbol "value")))
+    (macroexp-let2 nil vbuffer-or-name buffer-or-name
+      (macroexp-let2 nil vaction action
+       (macroexp-let2 nil vquit-function quit-function
+         `(let* ((,buffer (temp-buffer-window-setup ,vbuffer-or-name))
+                 (standard-output ,buffer)
+                 ,window ,value)
+            (with-current-buffer ,buffer
+              (setq ,window (temp-buffer-window-show ,buffer ,vaction)))
+
+            (let ((inhibit-read-only t)
+                  (inhibit-modification-hooks t))
+              (setq ,value (progn ,@body)))
 
-       (if (functionp ,quit-function)
-          (funcall ,quit-function ,window ,value)
-        ,value))))
+            (set-window-point ,window (point-min))
+
+            (when (functionp (cdr (assq 'window-height (cdr ,vaction))))
+              (ignore-errors
+                (funcall (cdr (assq 'window-height (cdr ,vaction))) ,window)))
+
+            (if (functionp ,vquit-function)
+                (funcall ,vquit-function ,window ,value)
+              ,value)))))))
 
 ;; The following two functions are like `window-next-sibling' and
 ;; `window-prev-sibling' but the WINDOW argument is _not_ optional (so
@@ -341,9 +378,9 @@ Anything less might crash Emacs.")
 (defcustom window-min-height 4
   "The minimum total height, in lines, of any window.
 The value has to accommodate one text line, a mode and header
-line, and a bottom divider, if present.  A value less than
-`window-safe-min-height' is ignored.  The value of this variable
-is honored when windows are resized or split.
+line, a horizontal scroll bar and a bottom divider, if present.
+A value less than `window-safe-min-height' is ignored.  The value
+of this variable is honored when windows are resized or split.
 
 Applications should never rebind this variable.  To resize a
 window to a height less than the one specified here, an
@@ -706,6 +743,15 @@ number of slots on that side."
      (integer :tag "Number" :value 3 :size 5)))
   :group 'windows)
 
+(defun window--side-window-p (window)
+  "Return non-nil if WINDOW is a side window or the parent of one."
+  (or (window-parameter window 'window-side)
+      (and (window-child window)
+          (or (window-parameter
+               (window-child window) 'window-side)
+              (window-parameter
+               (window-last-child window) 'window-side)))))
+
 (defun window--major-non-side-window (&optional frame)
   "Return the major non-side window of frame FRAME.
 The optional argument FRAME must be a live frame and defaults to
@@ -1100,11 +1146,12 @@ dumping to it."
        (format "frame text pixel: %s x %s   cols/lines: %s x %s\n"
               (frame-text-width frame) (frame-text-height frame)
               (frame-text-cols frame) (frame-text-lines frame))
-       (format "tool: %s  scroll: %s  fringe: %s  border: %s  right: %s  bottom: %s\n\n"
+       (format "tool: %s  scroll: %s/%s  fringe: %s  border: %s  right: %s  bottom: %s\n\n"
               (if (fboundp 'tool-bar-height)
                   (tool-bar-height frame t)
                 "0")
               (frame-scroll-bar-width frame)
+              (frame-scroll-bar-height frame)
               (frame-fringe-width frame)
               (frame-border-width frame)
               (frame-right-divider-width frame)
@@ -1234,12 +1281,14 @@ of WINDOW."
          value)
       (with-current-buffer (window-buffer window)
        (cond
+        ((window-minibuffer-p window)
+         (if pixelwise (frame-char-height (window-frame window)) 1))
         ((and (not (window--size-ignore-p window ignore))
               (window-size-fixed-p window horizontal))
          ;; The minimum size of a fixed size window is its size.
          (window-size window horizontal pixelwise))
-        ((or (eq ignore 'safe) (eq ignore window))
-         ;; If IGNORE equals `safe' or WINDOW return the safe values.
+        ((eq ignore 'safe)
+         ;; If IGNORE equals `safe' return the safe value.
          (window-safe-min-size window horizontal pixelwise))
         (horizontal
          ;; For the minimum width of a window take fringes and
@@ -1250,8 +1299,11 @@ of WINDOW."
          ;; `window-min-width'.
          (let* ((char-size (frame-char-size window t))
                 (fringes (window-fringes window))
+                (margins (window-margins window))
                 (pixel-width
                  (+ (window-safe-min-size window t t)
+                    (* (or (car margins) 0) char-size)
+                    (* (or (cdr margins) 0) char-size)
                     (car fringes) (cadr fringes)
                     (window-scroll-bar-width window)
                     (window-right-divider-width window))))
@@ -1263,7 +1315,7 @@ of WINDOW."
                   (* (ceiling pixel-width char-size) char-size))
                 (if (window--size-ignore-p window ignore)
                     0
-                  (window-min-pixel-width)))
+                  (window-min-pixel-width window)))
              (max
               (ceiling pixel-width char-size)
               (if (window--size-ignore-p window ignore)
@@ -1273,6 +1325,7 @@ of WINDOW."
                (pixel-height
                 (+ (window-safe-min-size window nil t)
                    (window-header-line-height window)
+                   (window-scroll-bar-height window)
                    (window-mode-line-height window)
                    (window-bottom-divider-width window))))
            (if pixelwise
@@ -1283,7 +1336,7 @@ of WINDOW."
                   (* (ceiling pixel-height char-size) char-size))
                 (if (window--size-ignore-p window ignore)
                     0
-                  (window-min-pixel-height)))
+                  (window-min-pixel-height window)))
              (max (ceiling pixel-height char-size)
                   (if (window--size-ignore-p window ignore)
                       0
@@ -1480,6 +1533,18 @@ by which WINDOW can be shrunk."
       (window--min-delta-1
        window (- size minimum) horizontal ignore trail noup pixelwise)))))
 
+(defun frame-windows-min-size (&optional frame horizontal pixelwise)
+  "Return minimum number of lines of FRAME's windows.
+HORIZONTAL non-nil means return number of columns of FRAME's
+windows.  PIXELWISE non-nil means return sizes in pixels."
+  (setq frame (window-normalize-frame frame))
+  (let* ((root (frame-root-window frame))
+        (mini (window-next-sibling root)))
+    (+ (window-min-size root horizontal nil pixelwise)
+       (if (and mini (not horizontal))
+          (window-min-size mini horizontal nil pixelwise)
+        0))))
+
 (defun window--max-delta-1 (window delta &optional horizontal ignore trail noup pixelwise)
   "Internal function of `window-max-delta'."
   (if (not (window-parent window))
@@ -1680,9 +1745,6 @@ doc-string of `window-resizable'."
 (defalias 'window-height 'window-total-height)
 (defalias 'window-width 'window-body-width)
 
-;; Eventually the following two should work pixelwise.
-
-;; See discussion in bug#4543.
 (defun window-full-height-p (&optional window)
   "Return t if WINDOW is as high as its containing frame.
 More precisely, return t if and only if the total height of
@@ -1690,8 +1752,10 @@ WINDOW equals the total height of the root window of WINDOW's
 frame.  WINDOW must be a valid window and defaults to the
 selected one."
   (setq window (window-normalize-window window))
-  (= (window-pixel-height window)
-     (window-pixel-height (frame-root-window window))))
+  (if (window-minibuffer-p window)
+      (eq window (frame-root-window (window-frame window)))
+    (= (window-pixel-height window)
+       (window-pixel-height (frame-root-window window)))))
 
 (defun window-full-width-p (&optional window)
   "Return t if WINDOW is as wide as its containing frame.
@@ -1715,28 +1779,26 @@ optional argument PIXELWISE is passed to the functions."
     (window-body-height window pixelwise)))
 
 (defun window-current-scroll-bars (&optional window)
-  "Return the current scroll bar settings for WINDOW.
+  "Return the current scroll bar types for WINDOW.
 WINDOW must be a live window and defaults to the selected one.
 
 The return value is a cons cell (VERTICAL . HORIZONTAL) where
 VERTICAL specifies the current location of the vertical scroll
-bars (`left', `right', or nil), and HORIZONTAL specifies the
-current location of the horizontal scroll bars (`top', `bottom',
-or nil).
+bar (`left', `right' or nil), and HORIZONTAL specifies the
+current location of the horizontal scroll bar (`bottom' or nil).
 
 Unlike `window-scroll-bars', this function reports the scroll bar
 type actually used, once frame defaults and `scroll-bar-mode' are
 taken into account."
   (setq window (window-normalize-window window t))
-  (let ((vert (nth 2 (window-scroll-bars window)))
-       (hor nil))
-    (when (or (eq vert t) (eq hor t))
-      (let ((fcsb (frame-current-scroll-bars (window-frame window))))
-       (if (eq vert t)
-           (setq vert (car fcsb)))
-       (if (eq hor t)
-           (setq hor (cdr fcsb)))))
-    (cons vert hor)))
+  (let ((vertical (nth 2 (window-scroll-bars window)))
+       (horizontal (nth 5 (window-scroll-bars window)))
+       (inherited (frame-current-scroll-bars (window-frame window))))
+    (when (eq vertical t)
+      (setq vertical (car inherited)))
+    (when (eq horizontal t)
+      (setq horizontal (cdr inherited)))
+    (cons vertical (and horizontal 'bottom))))
 
 (defun walk-windows (fun &optional minibuf all-frames)
   "Cycle through all live windows, calling FUN for each one.
@@ -2956,6 +3018,28 @@ routines."
         pixel-delta
        (/ pixel-delta (frame-char-height frame)))))
 
+(defun window--sanitize-window-sizes (frame horizontal)
+  "Assert that all windows on FRAME are large enough.
+If necessary and possible, make sure that every window on frame
+FRAME has its minimum height.  Optional argument HORIZONTAL
+non-nil means to make sure that every window on frame FRAME has
+its minimum width.  The minimum height/width of a window is the
+respective value returned by `window-min-size' for that window.
+
+Return t if all windows were resized appropriately.  Return nil
+if at least one window could not be resized as requested, which
+may happen when the FRAME is not large enough to accommodate it."
+  (let ((value t))
+    (walk-window-tree
+     (lambda (window)
+       (let  ((delta (- (window-min-size window horizontal nil t)
+                       (window-size window horizontal t))))
+        (when (> delta 0)
+          (if (window-resizable-p window delta horizontal nil t)
+              (window-resize window delta horizontal nil t)
+            (setq value nil))))))
+    value))
+
 (defun adjust-window-trailing-edge (window delta &optional horizontal pixelwise)
   "Move WINDOW's bottom edge by DELTA lines.
 Optional argument HORIZONTAL non-nil means move WINDOW's right
@@ -4213,20 +4297,6 @@ showing BUFFER-OR-NAME."
        ;; If a window doesn't show BUFFER, unrecord BUFFER in it.
        (unrecord-window-buffer window buffer)))))
 \f
-;;; Splitting windows.
-(defun window-split-min-size (&optional horizontal pixelwise)
-  "Return minimum height of any window when splitting windows.
-Optional argument HORIZONTAL non-nil means return minimum width."
-  (cond
-   (pixelwise
-    (if horizontal
-       (window-min-pixel-width)
-      (window-min-pixel-height)))
-   (horizontal
-    (max window-min-width window-safe-min-width))
-   (t
-    (max window-min-height window-safe-min-height))))
-
 (defun split-window (&optional window size side pixelwise)
   "Make a new window adjacent to WINDOW.
 WINDOW must be a valid window and defaults to the selected one.
@@ -4290,6 +4360,9 @@ frame.  The selected window is not changed by this function."
         (pixel-size
          (when (numberp size)
            (window--size-to-pixel window size horizontal pixelwise t)))
+        (divider-width (if horizontal
+                           (frame-right-divider-width frame)
+                         (frame-bottom-divider-width frame)))
         atom-root)
     (window--check frame)
     (catch 'done
@@ -4311,12 +4384,7 @@ frame.  The selected window is not changed by this function."
        ;; side window, throw an error unless `window-combination-resize'
        ;; equals 'side.
        ((and (not (eq window-combination-resize 'side))
-            (or (window-parameter window 'window-side)
-                (and (window-child window)
-                     (or (window-parameter
-                          (window-child window) 'window-side)
-                         (window-parameter
-                          (window-last-child window) 'window-side)))))
+            (window--side-window-p window))
        (error "Cannot split side window or parent of side window"))
        ;; If `window-combination-resize' is 'side and window has a side
        ;; window sibling, bind `window-combination-limit' to t.
@@ -4391,19 +4459,14 @@ frame.  The selected window is not changed by this function."
          (cond
           (resize
            ;; SIZE unspecified, resizing.
-           (when (and (not (window-sizable-p
-                            parent (- new-pixel-size) horizontal nil t))
-                      ;; Try again with minimum split size.
-                      (setq new-pixel-size
-                            (max new-pixel-size
-                                 (window-split-min-size horizontal t)))
-                      (not (window-sizable-p
-                            parent (- new-pixel-size) horizontal nil t)))
-             (error "Window %s too small for splitting 1" parent)))
-          ((> (+ new-pixel-size (window-min-size window horizontal nil t))
+           (unless (window-sizable-p
+                    parent (- new-pixel-size divider-width) horizontal nil t)
+             (error "Window %s too small for splitting (1)" parent)))
+          ((> (+ new-pixel-size divider-width
+                 (window-min-size window horizontal nil t))
               old-pixel-size)
            ;; SIZE unspecified, no resizing.
-           (error "Window %s too small for splitting 2" window))))
+           (error "Window %s too small for splitting (2)" window))))
         ((and (>= pixel-size 0)
               (or (>= pixel-size old-pixel-size)
                   (< new-pixel-size
@@ -4411,19 +4474,19 @@ frame.  The selected window is not changed by this function."
          ;; SIZE specified as new size of old window.  If the new size
          ;; is larger than the old size or the size of the new window
          ;; would be less than the safe minimum, signal an error.
-         (error "Window %s too small for splitting 3" window))
+         (error "Window %s too small for splitting (3)" window))
         (resize
          ;; SIZE specified, resizing.
          (unless (window-sizable-p
-                  parent (- new-pixel-size) horizontal nil t)
+                  parent (- new-pixel-size divider-width) horizontal nil t)
            ;; If we cannot resize the parent give up.
-           (error "Window %s too small for splitting 4" parent)))
+           (error "Window %s too small for splitting (4)" parent)))
         ((or (< new-pixel-size
                 (window-safe-min-pixel-size window horizontal))
              (< (- old-pixel-size new-pixel-size)
                 (window-safe-min-pixel-size window horizontal)))
          ;; SIZE specification violates minimum size restrictions.
-         (error "Window %s too small for splitting 5" window)))
+         (error "Window %s too small for splitting (5)" window)))
 
        (window--resize-reset frame horizontal)
 
@@ -4494,6 +4557,9 @@ frame.  The selected window is not changed by this function."
              (set-window-parameter (window-parent new) 'window-atom t))
            (set-window-parameter new 'window-atom t)))
 
+         ;; Sanitize sizes.
+         (window--sanitize-window-sizes frame horizontal)
+
          (run-window-configuration-change-hook frame)
          (run-window-scroll-functions new)
          (window--check frame)
@@ -5065,7 +5131,7 @@ value can be also stored on disk and read back in a new session."
                (let ((scroll-bars (cdr (assq 'scroll-bars state))))
                  (set-window-scroll-bars
                   window (car scroll-bars) (nth 2 scroll-bars)
-                  (nth 3 scroll-bars)))
+                  (or (nth 3 scroll-bars) 0) (nth 5 scroll-bars)))
                (set-window-vscroll window (cdr (assq 'vscroll state)))
                ;; Adjust vertically.
                (if (memq window-size-fixed '(t height))
@@ -5733,7 +5799,7 @@ hold:
   wide as `split-width-threshold'.
 - When WINDOW is split evenly, the emanating windows are at least
   `window-min-width' or two (whichever is larger) columns wide."
-  (when (window-live-p window)
+  (when (and (window-live-p window) (not (window--side-window-p window)))
     (with-current-buffer (window-buffer window)
       (if horizontal
          ;; A window can be split horizontally when its width is not
@@ -5989,6 +6055,8 @@ The actual non-nil value of this variable will be copied to the
           (const display-buffer-pop-up-window)
           (const display-buffer-same-window)
           (const display-buffer-pop-up-frame)
+          (const display-buffer-below-selected)
+          (const display-buffer-at-bottom)
           (const display-buffer-in-previous-window)
           (const display-buffer-use-some-window)
           (function :tag "Other function"))
@@ -6398,13 +6466,26 @@ the selected one."
 
 (defun display-buffer-at-bottom (buffer alist)
   "Try displaying BUFFER in a window at the bottom of the selected frame.
-This either splits the window at the bottom of the frame or the
-frame's root window, or reuses an existing window at the bottom
-of the selected frame."
-  (let (bottom-window window)
+This either reuses such a window provided it shows BUFFER
+already, splits a window at the bottom of the frame or the
+frame's root window, or reuses some window at the bottom of the
+selected frame."
+  (let (bottom-window bottom-window-shows-buffer window)
     (walk-window-tree
-     (lambda (window) (setq bottom-window window)) nil nil 'nomini)
-    (or (and (not (frame-parameter nil 'unsplittable))
+     (lambda (window)
+       (cond
+       ((window-in-direction 'below window))
+       ((and (not bottom-window-shows-buffer)
+             (eq buffer (window-buffer window)))
+        (setq bottom-window-shows-buffer t)
+        (setq bottom-window window))
+       ((not bottom-window)
+        (setq bottom-window window)))
+       nil nil 'nomini))
+    (or (and bottom-window-shows-buffer
+            (window--display-buffer
+             buffer bottom-window 'reuse alist display-buffer-mark-dedicated))
+     (and (not (frame-parameter nil 'unsplittable))
             (let (split-width-threshold)
               (setq window (window--try-to-split-window bottom-window alist)))
             (window--display-buffer
@@ -7089,7 +7170,10 @@ FRAME."
             (value (window-text-pixel-size
                     nil t t workarea-width workarea-height t))
             (width (+ (car value) (window-right-divider-width)))
-            (height (+ (cdr value) (window-bottom-divider-width))))
+            (height
+             (+ (cdr value)
+                (window-bottom-divider-width)
+                (window-scroll-bar-height))))
        ;; Don't change height or width when the window's size is fixed
        ;; in either direction or ONLY forbids it.
        (cond
@@ -7248,6 +7332,7 @@ accessible position."
          ;; height.  Its width remains fixed.
          (setq height (+ (cdr (window-text-pixel-size
                                nil nil t nil (frame-pixel-height) t))
+                         (window-scroll-bar-height window)
                          (window-bottom-divider-width)))
          ;; Round height.
          (unless pixelwise
index 1e32a7f4085164f99611f8493b518c7e28aabf7c..c202402a6e90f1334daf9f2c7e9b16d6b1be5777 100644 (file)
@@ -112,10 +112,7 @@ You may want to include buffer names such as *Help*, *Apropos*,
 ;; Save current configuration.
 ;; (Called below by `winner-save-old-configurations').
 (defun winner-remember ()
-  (let ((entry (assq (selected-frame) winner-currents)))
-    (if entry (setcdr entry (winner-conf))
-      (push (cons (selected-frame) (winner-conf))
-           winner-currents))))
+  (setf (alist-get (selected-frame) winner-currents) (winner-conf)))
 
 ;; Consult `winner-currents'.
 (defun winner-configuration (&optional frame)
index 88510517b25fb511d6d4d8db1a4d63af49182bf4..2dda211200d14e62440bd4eba4edc67a690738c8 100644 (file)
               (substring arg 0 (match-end 1))
             arg))))
 
+(require 'cl-lib)
+
 (eval-when-compile                     ; to avoid compiler warnings
   (require 'dired)
-  (require 'cl-lib)
   (require 'apropos))
 
-(defun woman-mapcan (fn x)
-  "Return concatenated list of FN applied to successive `car' elements of X.
-FN must return a list, cons or nil.  Useful for splicing into a list."
-  ;; Based on the Standard Lisp function MAPCAN but with args swapped!
-  ;; More concise implementation than the recursive one.  -- dak
-  (apply #'nconc (mapcar fn x)))
-
 (defun woman-parse-colon-path (paths)
   "Explode search path string PATHS into a list of directory names.
 Allow Cygwin colon-separated search paths on Microsoft platforms.
@@ -440,7 +434,7 @@ As a special case, if PATHS is nil then replace it by calling
             (mapcar 'woman-Cyg-to-Win (woman-parse-man.conf)))
            ((string-match-p ";" paths)
             ;; Assume DOS-style path-list...
-            (woman-mapcan              ; splice list into list
+            (cl-mapcan                 ; splice list into list
              (lambda (x)
                (if x
                    (list x)
@@ -451,14 +445,14 @@ As a special case, if PATHS is nil then replace it by calling
             (list paths))
            (t
             ;; Assume UNIX/Cygwin-style path-list...
-            (woman-mapcan              ; splice list into list
+            (cl-mapcan                 ; splice list into list
              (lambda (x)
                (mapcar 'woman-Cyg-to-Win
                        (if x (list x) (woman-parse-man.conf))))
              (let ((path-separator ":"))
                (parse-colon-path paths)))))
     ;; Assume host-default-style path-list...
-    (woman-mapcan                      ; splice list into list
+    (cl-mapcan                         ; splice list into list
      (lambda (x) (if x (list x) (woman-parse-man.conf)))
      (parse-colon-path (or paths "")))))
 
index 59ed68a60c738ff36f3b8b48f46297263844c61b..cad3151b244c73bfd4c9dc5b6b2e1b8d1089f619 100644 (file)
 
 (defvar xterm-mouse-debug-buffer nil)
 
-(defvar xterm-mouse-last)
-
 ;; Mouse events symbols must have an 'event-kind property with
 ;; the value 'mouse-click.
-(dolist (event-type '(mouse-1 mouse-2 mouse-3
-                     M-down-mouse-1 M-down-mouse-2 M-down-mouse-3))
-  (put event-type 'event-kind 'mouse-click))
+(dolist (event '(mouse-1 mouse-2 mouse-3 mouse-4 mouse-5))
+  (let ((M-event (intern (concat "M-" (symbol-name event)))))
+    (put event 'event-kind 'mouse-click)
+    (put M-event 'event-kind 'mouse-click)))
 
 (defun xterm-mouse-translate (_event)
   "Read a click and release event from XTerm."
@@ -63,61 +62,44 @@ http://invisible-island.net/xterm/ctlseqs/ctlseqs.html)."
 
 (defun xterm-mouse-translate-1 (&optional extension)
   (save-excursion
-    (save-window-excursion              ;FIXME: Why?
-      (deactivate-mark)                 ;FIXME: Why?
-      (let* ((xterm-mouse-last nil)
-            (down (xterm-mouse-event extension))
-            (down-command (nth 0 down))
-            (down-data    (nth 1 down))
-            (down-where   (nth 1 down-data))
-            (down-binding (key-binding (if (symbolp down-where)
-                                           (vector down-where down-command)
-                                         (vector down-command))))
-            (is-down (string-match "down" (symbol-name (car down)))))
-
-       ;; Retrieve the expected preface for the up-event.
-       (when is-down
-         (unless (cond ((null extension)
-                        (and (eq (read-event) ?\e)
-                             (eq (read-event) ?\[)
-                             (eq (read-event) ?M)))
-                       ((eq extension 1006)
-                        (and (eq (read-event) ?\e)
-                             (eq (read-event) ?\[)
-                             (eq (read-event) ?<))))
-           (error "Unexpected escape sequence from XTerm")))
-
-       ;; Process the up-event.
-       (let* ((click (if is-down (xterm-mouse-event extension) down))
-              (click-data  (nth 1 click))
-              (click-where (nth 1 click-data)))
-          (cond
-           ((null down) nil)
-           ((memq down-binding '(nil ignore))
-            (if (and (symbolp click-where)
-                     (consp click-where))
-                (vector (list click-where click-data) click)
-              (vector click)))
+    (let* ((event (xterm-mouse-event extension))
+          (ev-command (nth 0 event))
+          (ev-data    (nth 1 event))
+          (ev-where   (nth 1 ev-data))
+          (vec (vector event))
+          (is-down (string-match "down-" (symbol-name ev-command))))
+
+      (cond
+       ((null event) nil)              ;Unknown/bogus byte sequence!
+       (is-down
+       (setf (terminal-parameter nil 'xterm-mouse-last-down) event)
+       vec)
+       (t
+       (let* ((down (terminal-parameter nil 'xterm-mouse-last-down))
+              (down-data (nth 1 down))
+              (down-where (nth 1 down-data)))
+         (setf (terminal-parameter nil 'xterm-mouse-last-down) nil)
+         (cond
+          ((null down)
+           ;; This is an "up-only" event.  Pretend there was an up-event
+           ;; right before and keep the up-event for later.
+           (push event unread-command-events)
+           (vector (cons (intern (replace-regexp-in-string
+                                  "\\`\\([ACMHSs]-\\)*" "\\&down-"
+                                  (symbol-name ev-command) t))
+                         (cdr event))))
+          ((equal ev-where down-where) vec)
            (t
-           (setq unread-command-events
-                 (append (if (eq down-where click-where)
-                             (list click)
-                           (list
-                            ;; Cheat `mouse-drag-region' with move event.
-                            (list 'mouse-movement click-data)
-                            ;; Generate a drag event.
-                            (if (symbolp down-where)
-                                0
-                              (list (intern (format "drag-mouse-%d"
-                                                    (1+ xterm-mouse-last)))
-                                    down-data click-data))))
-                         unread-command-events))
-           (if xterm-mouse-debug-buffer
-               (print unread-command-events xterm-mouse-debug-buffer))
-           (if (and (symbolp down-where)
-                    (consp down-where))
-               (vector (list down-where down-data) down)
-             (vector down)))))))))
+           (let ((drag (if (symbolp ev-where)
+                           0           ;FIXME: Why?!?
+                         (list (intern (replace-regexp-in-string
+                                        "\\`\\([ACMHSs]-\\)*" "\\&drag-"
+                                        (symbol-name ev-command) t))
+                               down-data ev-data))))
+             (if (null track-mouse)
+                 (vector drag)
+               (push drag unread-command-events)
+               (vector (list 'mouse-movement ev-data))))))))))))
 
 ;; These two variables have been converted to terminal parameters.
 ;;
@@ -158,23 +140,21 @@ http://invisible-island.net/xterm/ctlseqs/ctlseqs.html)."
 (defun xterm-mouse--read-event-sequence-1000 ()
   (let* ((code (- (read-event) 32))
          (type
-          ;; For buttons > 3, the release-event looks differently
-          ;; (see xc/programs/xterm/button.c, function EditorButton),
-          ;; and come in a release-event only, no down-event.
-          (cond ((>= code 64)
-                 (format "mouse-%d" (- code 60)))
-                ((memq code '(8 9 10))
-                 (setq xterm-mouse-last (- code 8))
-                 (format "M-down-mouse-%d" (- code 7)))
-                ((and (= code 11) xterm-mouse-last)
-                 (format "M-mouse-%d" (1+ xterm-mouse-last)))
-                ((and (= code 3) xterm-mouse-last)
-                 ;; For buttons > 5 xterm only reports a button-release event.
-                 ;; Drop them since they're not usable and can be spurious.
-                 (format "mouse-%d" (1+ xterm-mouse-last)))
-                ((memq code '(0 1 2))
-                 (setq xterm-mouse-last code)
-                 (format "down-mouse-%d" (+ 1 code)))))
+         ;; For buttons > 3, the release-event looks differently
+         ;; (see xc/programs/xterm/button.c, function EditorButton),
+         ;; and come in a release-event only, no down-event.
+         (cond ((>= code 64)
+                (format "mouse-%d" (- code 60)))
+               ((memq code '(8 9 10))
+                (format "M-down-mouse-%d" (- code 7)))
+               ((memq code '(3 11))
+                 (let ((down (car (terminal-parameter
+                                   nil 'xterm-mouse-last-down))))
+                   (when (and down (string-match "[0-9]" (symbol-name down)))
+                     (format (if (eq code 3) "mouse-%s" "M-mouse-%s")
+                             (match-string 0 (symbol-name down))))))
+               ((memq code '(0 1 2))
+                (format "down-mouse-%d" (+ 1 code)))))
          (x (- (read-event) 33))
          (y (- (read-event) 33)))
     (and type (wholenump x) (wholenump y)
@@ -211,10 +191,20 @@ http://invisible-island.net/xterm/ctlseqs/ctlseqs.html)."
                            (if down "down-" "")
                            (if wheel
                                (- code 60)
-                             (1+ (setq xterm-mouse-last (mod code 4)))))))
+                             (1+ (mod code 4))))))
          (1- (string-to-number (apply 'string (nreverse x-bytes))))
          (1- (string-to-number (apply 'string (nreverse y-bytes)))))))
 
+(defun xterm-mouse--set-click-count (event click-count)
+  (setcdr (cdr event) (list click-count))
+  (let ((name (symbol-name (car event))))
+    (when (string-match "\\(.*?\\)\\(\\(?:down-\\)?mouse-.*\\)" name)
+      (setcar event
+              (intern (concat (match-string 1 name)
+                              (if (= click-count 2)
+                                  "double-" "triple-")
+                              (match-string 2 name)))))))
+
 (defun xterm-mouse-event (&optional extension)
   "Convert XTerm mouse event to Emacs mouse event.
 EXTENSION, if non-nil, means to use an extension to the usual
@@ -240,18 +230,42 @@ which is the \"1006\" extension implemented in Xterm >= 277."
              (w (window-at x y))
              (ltrb (window-edges w))
              (left (nth 0 ltrb))
-             (top (nth 1 ltrb)))
-        (set-terminal-parameter nil 'xterm-mouse-x x)
-        (set-terminal-parameter nil 'xterm-mouse-y y)
-        (setq
-         last-input-event
-         (list type
-               (let ((event (if w
+             (top (nth 1 ltrb))
+             (posn (if w
                                 (posn-at-x-y (- x left) (- y top) w t)
                               (append (list nil 'menu-bar)
-                                      (nthcdr 2 (posn-at-x-y x y))))))
-                 (setcar (nthcdr 3 event) timestamp)
-                 event)))))))
+                             (nthcdr 2 (posn-at-x-y x y)))))
+             (event (list type posn)))
+        (setcar (nthcdr 3 posn) timestamp)
+
+        ;; Try to handle double/triple clicks.
+        (let* ((last-click (terminal-parameter nil 'xterm-mouse-last-click))
+               (last-type (nth 0 last-click))
+               (last-name (symbol-name last-type))
+               (last-time (nth 1 last-click))
+               (click-count (nth 2 last-click))
+               (this-time (float-time))
+               (name (symbol-name type)))
+          (cond
+           ((not (string-match "down-" name))
+            ;; For up events, make the up side match the down side.
+            (setq this-time last-time)
+            (when (and click-count (> click-count 1)
+                       (string-match "down-" last-name)
+                       (equal name (replace-match "" t t last-name)))
+              (xterm-mouse--set-click-count event click-count)))
+           ((not last-time) nil)
+           ((and (> double-click-time (* 1000 (- this-time last-time)))
+                 (equal last-name (replace-match "" t t name)))
+            (setq click-count (1+ click-count))
+            (xterm-mouse--set-click-count event click-count))
+           (t (setq click-count 1)))
+          (set-terminal-parameter nil 'xterm-mouse-last-click
+                                  (list type this-time click-count)))
+
+        (set-terminal-parameter nil 'xterm-mouse-x x)
+        (set-terminal-parameter nil 'xterm-mouse-y y)
+        (setq last-input-event event)))))
 
 ;;;###autoload
 (define-minor-mode xterm-mouse-mode
@@ -267,69 +281,79 @@ single clicks are supported.  When turned on, the normal xterm
 mouse functionality for such clicks is still available by holding
 down the SHIFT key while pressing the mouse button."
   :global t :group 'mouse
-  (let ((do-hook (if xterm-mouse-mode 'add-hook 'remove-hook)))
-    (funcall do-hook 'terminal-init-xterm-hook
-             'turn-on-xterm-mouse-tracking-on-terminal)
-    (funcall do-hook 'delete-terminal-functions
-             'turn-off-xterm-mouse-tracking-on-terminal)
-    (funcall do-hook 'suspend-tty-functions
-             'turn-off-xterm-mouse-tracking-on-terminal)
-    (funcall do-hook 'resume-tty-functions
-             'turn-on-xterm-mouse-tracking-on-terminal)
-    (funcall do-hook 'suspend-hook 'turn-off-xterm-mouse-tracking)
-    (funcall do-hook 'suspend-resume-hook 'turn-on-xterm-mouse-tracking)
-    (funcall do-hook 'kill-emacs-hook 'turn-off-xterm-mouse-tracking))
+  (funcall (if xterm-mouse-mode 'add-hook 'remove-hook)
+           'terminal-init-xterm-hook
+           'turn-on-xterm-mouse-tracking-on-terminal)
   (if xterm-mouse-mode
       ;; Turn it on
       (progn
        (setq mouse-position-function #'xterm-mouse-position-function)
-       (turn-on-xterm-mouse-tracking))
+        (mapc #'turn-on-xterm-mouse-tracking-on-terminal (terminal-list)))
     ;; Turn it off
-    (turn-off-xterm-mouse-tracking 'force)
+    (mapc #'turn-off-xterm-mouse-tracking-on-terminal (terminal-list))
     (setq mouse-position-function nil)))
 
-(defun turn-on-xterm-mouse-tracking ()
-  "Enable Emacs mouse tracking in xterm."
-  (dolist (terminal (terminal-list))
-    (turn-on-xterm-mouse-tracking-on-terminal terminal)))
+(defconst xterm-mouse-tracking-enable-sequence
+  "\e[?1000h\e[?1006h"
+  "Control sequence to enable xterm mouse tracking.
+Enables basic tracking, then extended tracking on
+terminals that support it.")
 
-(defun turn-off-xterm-mouse-tracking (&optional _force)
-  "Disable Emacs mouse tracking in xterm."
-  (dolist (terminal (terminal-list))
-    (turn-off-xterm-mouse-tracking-on-terminal terminal)))
+(defconst xterm-mouse-tracking-disable-sequence
+  "\e[?1006l\e[?1000l"
+  "Reset the modes set by `xterm-mouse-tracking-enable-sequence'.")
 
 (defun turn-on-xterm-mouse-tracking-on-terminal (&optional terminal)
   "Enable xterm mouse tracking on TERMINAL."
   (when (and xterm-mouse-mode (eq t (terminal-live-p terminal))
             ;; Avoid the initial terminal which is not a termcap device.
-            ;; FIXME: is there more elegant way to detect the initial terminal?
+            ;; FIXME: is there more elegant way to detect the initial
+             ;; terminal?
             (not (string= (terminal-name terminal) "initial_terminal")))
     (unless (terminal-parameter terminal 'xterm-mouse-mode)
       ;; Simulate selecting a terminal by selecting one of its frames
+      ;; so that we can set the terminal-local `input-decode-map'.
       (with-selected-frame (car (frames-on-display-list terminal))
         (define-key input-decode-map "\e[M" 'xterm-mouse-translate)
         (define-key input-decode-map "\e[<" 'xterm-mouse-translate-extended))
-      (set-terminal-parameter terminal 'xterm-mouse-mode t))
-    (send-string-to-terminal "\e[?1000h" terminal)
-    ;; Request extended mouse support, if available (xterm >= 277).
-    (send-string-to-terminal "\e[?1006h" terminal)))
+      (condition-case err
+          (send-string-to-terminal xterm-mouse-tracking-enable-sequence
+                                   terminal)
+        ;; FIXME: This should use a dedicated error signal.
+        (error (if (equal (cadr err) "Terminal is currently suspended")
+                   nil                  ;The sequence will be sent upon resume.
+                 (signal (car err) (cdr err)))))
+      (push xterm-mouse-tracking-enable-sequence
+            (terminal-parameter nil 'tty-mode-set-strings))
+      (push xterm-mouse-tracking-disable-sequence
+            (terminal-parameter nil 'tty-mode-reset-strings))
+      (set-terminal-parameter terminal 'xterm-mouse-mode t))))
 
 (defun turn-off-xterm-mouse-tracking-on-terminal (terminal)
   "Disable xterm mouse tracking on TERMINAL."
   ;; Only send the disable command to those terminals to which we've already
   ;; sent the enable command.
   (when (and (terminal-parameter terminal 'xterm-mouse-mode)
-             (eq t (terminal-live-p terminal))
-            ;; Avoid the initial terminal which is not a termcap device.
-            ;; FIXME: is there more elegant way to detect the initial terminal?
-            (not (string= (terminal-name terminal) "initial_terminal")))
+             (eq t (terminal-live-p terminal)))
     ;; We could remove the key-binding and unset the `xterm-mouse-mode'
     ;; terminal parameter, but it seems less harmful to send this escape
     ;; command too many times (or to catch an unintended key sequence), than
     ;; to send it too few times (or to fail to let xterm-mouse events
     ;; pass by untranslated).
-    (send-string-to-terminal "\e[?1000l" terminal)
-    (send-string-to-terminal "\e[?1006l" terminal)))
+    (condition-case err
+        (send-string-to-terminal xterm-mouse-tracking-disable-sequence
+                                 terminal)
+      ;; FIXME: This should use a dedicated error signal.
+      (error (if (equal (cadr err) "Terminal is currently suspended")
+                 nil
+               (signal (car err) (cdr err)))))
+    (setf (terminal-parameter nil 'tty-mode-set-strings)
+          (remq xterm-mouse-tracking-enable-sequence
+                (terminal-parameter nil 'tty-mode-set-strings)))
+    (setf (terminal-parameter nil 'tty-mode-reset-strings)
+          (remq xterm-mouse-tracking-disable-sequence
+                (terminal-parameter nil 'tty-mode-reset-strings)))
+    (set-terminal-parameter terminal 'xterm-mouse-mode nil)))
 
 (provide 'xt-mouse)
 
index 2a865f7165c4179c16cc3ce972ada41ee6b7f349..f6b29ca421a193ea9efe7388f39f8c19ecf8d538 100644 (file)
@@ -1,3 +1,85 @@
+2014-09-01  Paul Eggert  <eggert@cs.ucla.edu>
+
+       --enable-silent-rules now suppresses more chatter.
+       * Makefile.in (AM_DEFAULT_VERBOSITY, AM_V_CC, am__v_CC_)
+       (am__v_CC_0, am__v_CC_1): New macros, taken from Automake.
+       (.c.o): Use them.
+
+2014-07-15  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * lwlib.h (toplevel): Use unsigned int for LWLIB_ID.
+
+2014-06-28  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in: Use gcc auto-dependency information.
+       Move old dependency information to new file deps.mk.
+       (MKDIR_P, DEPFLAGS, MKDEPDIR, lwlib_deps_frag):
+       New, set by configure.
+       (DEPDIR): New variable.
+       (ALL_CFLAGS): Add DEPFLAGS.
+       (.c.o): Add MKDEPDIR.
+       (clean, mostlyclean): Delete DEPDIR.
+       * deps.mk, autodeps.mk: New files.
+
+2014-06-17  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Omit redundant extern decls.
+       From Dmitry Antipov.
+       * lwlib-Xm.c (lw_motif_widget_p, xm_update_one_value)
+       (xm_create_dialog, xm_destroy_instance, xm_popup_menu)
+       (xm_set_keyboard_focus, xm_set_main_areas): Remove decls.
+
+2014-06-15  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in ($(globals_h)): Use `make -C' rather than `cd && make'.
+
+       * Makefile.in (mostlyclean, clean, distclean, maintainer-clean):
+       Declare as PHONY.
+       (bootstrap-clean): New.
+
+2014-06-13  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in ($(globals_h)):
+       GNU make automatically passes command-line arguments to sub-makes.
+
+2014-06-04  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * lwlib-widget.h (widget_value) [USE_X_TOOLKIT]: Use X toolkit
+       fields conditionally.
+
+2014-06-03  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Do not require libXt-devel when building with gtk.
+       * lwlib-widget.h: New file, with contents taken from lwlib.h.
+       (widget_value) [HAVE_NTGUI]: New member 'title'.
+       * lwlib.h: Include lwlib-widget.h.
+       (change_type, enum button_type, widget_value):
+       Move to lwlib-widget.h.
+
+2014-06-03  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * xlwmenu.c (openXftFont): Do not load regular X font here.
+       (XlwMenuInitialize): Remove ancient #if 0 code.
+       (XlwMenuDestroy): Likewise.  Free regular X font here.
+
+2014-06-02  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Use common memory management functions for widgets.
+       * lwlib.h (widget_value): Do not maintain a free list any more.
+       (malloc_widget_value, free_widget_value): Remove prototypes.
+       * lwlib.c (malloc_widget_value, free_widget_value):
+       (widget_value_free_list, malloc_cpt): Remove.
+       (free_widget_value_tree, copy_widget_value_tree): Adjust users.
+
+2014-05-30  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Use common string allocation and freeing functions where applicable.
+       * lwlib.h (safe_strdup): Remove prototype.
+       * lwlib.c (safe_strdup, safe_free_str): Remove.
+       (copy_widget_value_tree, allocate_widget_info, free_widget_info):
+       (merge_widget_value): Prefer xstrdup, xfree and dupstring.
+       * lwlib-Xm.c (make_destroyed_instance, xm_update_one_value): Ditto.
+
 2013-12-14  Paul Eggert  <eggert@cs.ucla.edu>
 
        Use bool for boolean, focusing on headers.
index 8bdd2bbbf3d8a127e881e6ab719c7cbe3cc734b4..b01e69c43924e92465d839097d3628a0f916fef1 100644 (file)
@@ -41,6 +41,7 @@ RANLIB=@RANLIB@
 
 AR = @AR@
 ARFLAGS = @ARFLAGS@
+MKDIR_P = @MKDIR_P@
 
 LUCID_OBJS = lwlib-Xlw.o xlwmenu.o lwlib-Xaw.o
 MOTIF_OBJS = lwlib-Xm.o
@@ -50,13 +51,27 @@ TOOLKIT_OBJS = $(@X_TOOLKIT_TYPE@_OBJS)
 
 OBJS = lwlib.o $(TOOLKIT_OBJS) lwlib-utils.o
 
+# 'make' verbosity.
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 =
+
+DEPDIR = deps
+## -MMD -MF $(DEPDIR)/$*.d if AUTO_DEPEND; else empty.
+DEPFLAGS = @DEPFLAGS@
+## ${MKDIR_P} ${DEPDIR} (if AUTO_DEPEND); else ':'.
+MKDEPDIR = @MKDEPDIR@
+
 ## ../src is where the generated file (config.h, globals.h) are.
 ## $(srcdir)/../src is where the non-generated files (lisp.h) are.
 ## (In an out-of-tree build, these two are not the same.)
 ## $(srcdir) is where the lwlib sources are.
 ## There are no generated lwlib files, hence no need for -I.
 ALL_CFLAGS= $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \
-  $(C_SWITCH_MACHINE) \
+  $(C_SWITCH_MACHINE) $(DEPFLAGS) \
   $(WARN_CFLAGS) $(WERROR_CFLAGS) $(PROFILING_CFLAGS) $(CFLAGS) \
   -Demacs -I../src \
   -I$(srcdir) -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib
@@ -65,39 +80,31 @@ all: liblw.a
 .PHONY: all
 
 .c.o:
-       $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
+       @$(MKDEPDIR)
+       $(AM_V_CC)$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
 
 liblw.a: $(OBJS)
        rm -f $@
        $(AR) $(ARFLAGS) $@ $(OBJS)
        $(RANLIB) $@
 
-## Generated files in ../src, non-generated in $(srcdir)/../src.
-config_h = ../src/config.h $(srcdir)/../src/conf_post.h
-lisp_h = $(srcdir)/../src/lisp.h
-## lisp.h includes this.
 globals_h = ../src/globals.h
-src_h = $(config_h) $(lisp_h) $(globals_h)
-
 $(globals_h):
-       cd ../src && $(MAKE) $(MFLAGS) globals.h
-
-lwlib-utils.o: $(src_h) lwlib-utils.c lwlib-utils.h lwlib.h
-lwlib.o:       $(src_h) lwlib.c lwlib.h lwlib-int.h lwlib-utils.h \
-  lwlib-Xlw.h lwlib-Xm.h lwlib-Xaw.h
-lwlib-Xlw.o:   $(src_h) lwlib-Xlw.c lwlib.h lwlib-int.h lwlib-Xlw.h xlwmenu.h
-lwlib-Xaw.o:   $(src_h) lwlib-Xaw.c lwlib-Xaw.h lwlib.h lwlib-int.h
-lwlib-Xm.o:    $(src_h) lwlib-Xm.c lwlib-Xm.h lwlib.h lwlib-int.h lwlib-utils.h
-xlwmenu.o:     $(src_h) xlwmenu.c xlwmenu.h lwlib.h xlwmenuP.h \
-  $(srcdir)/../src/xterm.h
-
-mostlyclean:
+       $(MAKE) -C ../src globals.h
+
+## Insert either autodeps.mk (if AUTO_DEPEND), else deps.mk.
+@lwlib_deps_frag@
+
+.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean
+
+clean mostlyclean:
        rm -f *.o liblw.a \#*
+       -rm -rf ${DEPDIR}
 
-clean: mostlyclean
 distclean: clean
        rm -f Makefile
-maintainer-clean: distclean
+
+bootstrap-clean maintainer-clean: distclean
        rm -f TAGS
 
 
diff --git a/lwlib/autodeps.mk b/lwlib/autodeps.mk
new file mode 100644 (file)
index 0000000..f710929
--- /dev/null
@@ -0,0 +1,5 @@
+### autodeps.mk --- lwlib/Makefile fragment for GNU Emacs
+
+## This is inserted in lwlib/Makefile if AUTO_DEPEND=yes.
+
+-include $(ALLOBJS:%.o=${DEPDIR}/%.d)
diff --git a/lwlib/deps.mk b/lwlib/deps.mk
new file mode 100644 (file)
index 0000000..6355ec6
--- /dev/null
@@ -0,0 +1,43 @@
+### deps.mk --- lwlib/Makefile fragment for GNU Emacs
+
+# Copyright (C) 1992, 1993 Lucid, Inc.
+# Copyright (C) 1994, 2001-2014 Free Software Foundation, Inc.
+#
+# This file is part of the Lucid Widget Library.
+#
+# The Lucid Widget Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 1, or (at your option)
+# any later version.
+#
+# The Lucid Widget Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+### Commentary:
+
+## This file is inserted in lwlib/Makefile if AUTO_DEPEND=no.
+## It defines static dependencies between the various source files.
+
+### Code:
+
+## Generated files in ../src, non-generated in $(srcdir)/../src.
+config_h = ../src/config.h $(srcdir)/../src/conf_post.h
+lisp_h = $(srcdir)/../src/lisp.h
+## lisp.h includes this.
+src_h = $(config_h) $(lisp_h) $(globals_h)
+
+lwlib-utils.o: $(src_h) lwlib-utils.c lwlib-utils.h lwlib.h
+lwlib.o:       $(src_h) lwlib.c lwlib.h lwlib-int.h lwlib-utils.h \
+  lwlib-Xlw.h lwlib-Xm.h lwlib-Xaw.h
+lwlib-Xlw.o:   $(src_h) lwlib-Xlw.c lwlib.h lwlib-int.h lwlib-Xlw.h xlwmenu.h
+lwlib-Xaw.o:   $(src_h) lwlib-Xaw.c lwlib-Xaw.h lwlib.h lwlib-int.h
+lwlib-Xm.o:    $(src_h) lwlib-Xm.c lwlib-Xm.h lwlib.h lwlib-int.h lwlib-utils.h
+xlwmenu.o:     $(src_h) xlwmenu.c xlwmenu.h lwlib.h xlwmenuP.h \
+  $(srcdir)/../src/xterm.h
+
+### deps.mk ends here
index bbb9657d7a19e5df009b3e2e349d982b0fdcf252..4d48e64cb1411e3cfc1a7dd77f379bd5ee1b95af 100644 (file)
@@ -79,7 +79,6 @@ static destroyed_instance *make_destroyed_instance (char *, char *,
                                                     Boolean);
 static void free_destroyed_instance (destroyed_instance*);
 Widget first_child (Widget);
-Boolean lw_motif_widget_p (Widget);
 static XmString resource_motif_string (Widget, char *);
 static void destroy_all_children (Widget, int);
 static void xm_update_label (widget_instance *, Widget, widget_value *);
@@ -99,7 +98,6 @@ static void xm_update_menu (widget_instance *, Widget, widget_value *,
 static void xm_update_text (widget_instance *, Widget, widget_value *);
 static void xm_update_text_field (widget_instance *, Widget,
                                   widget_value *);
-void xm_update_one_value (widget_instance *, Widget, widget_value *);
 static void activate_button (Widget, XtPointer, XtPointer);
 static Widget make_dialog (char *, Widget, Boolean, char *, char *,
                            Boolean, Boolean, Boolean, int, int);
@@ -107,21 +105,16 @@ static destroyed_instance* find_matching_instance (widget_instance*);
 static void mark_dead_instance_destroyed (Widget, XtPointer, XtPointer);
 static void recenter_widget (Widget);
 static Widget recycle_instance (destroyed_instance*);
-Widget xm_create_dialog (widget_instance*);
 static Widget make_menubar (widget_instance*);
 static void remove_grabs (Widget, XtPointer, XtPointer);
 static Widget make_popup_menu (widget_instance*);
 static Widget make_main (widget_instance*);
-void xm_destroy_instance (widget_instance*);
-void xm_popup_menu (Widget, XEvent *);
 static void set_min_dialog_size (Widget);
 static void do_call (Widget, XtPointer, enum do_call_type);
 static void xm_generic_callback (Widget, XtPointer, XtPointer);
 static void xm_nosel_callback (Widget, XtPointer, XtPointer);
 static void xm_pull_down_callback (Widget, XtPointer, XtPointer);
 static void xm_pop_down_callback (Widget, XtPointer, XtPointer);
-void xm_set_keyboard_focus (Widget, Widget);
-void xm_set_main_areas (Widget, Widget, Widget);
 static void xm_internal_update_other_instances (Widget, XtPointer,
                                                 XtPointer);
 static void xm_arm_callback (Widget, XtPointer, XtPointer);
@@ -170,8 +163,8 @@ make_destroyed_instance (char* name,
 {
   destroyed_instance* instance =
     (destroyed_instance*) xmalloc (sizeof (destroyed_instance));
-  instance->name = safe_strdup (name);
-  instance->type = safe_strdup (type);
+  instance->name = xstrdup (name);
+  instance->type = xstrdup (type);
   instance->widget = widget;
   instance->parent = parent;
   instance->pop_up_p = pop_up_p;
@@ -953,10 +946,7 @@ xm_update_one_value (widget_instance* instance,
 
              XtVaGetValues (toggle, XmNset, &set, NULL);
              if (set)
-               {
-                 xfree (val->value);
-                 val->value = safe_strdup (XtName (toggle));
-               }
+               dupstring (&val->value, XtName (toggle));
            }
          val->edited = True;
        }
@@ -979,7 +969,7 @@ xm_update_one_value (widget_instance* instance,
                  if (pos_list [j] == i)
                    {
                      cur->selected = True;
-                     val->value = safe_strdup (cur->name);
+                     val->value = xstrdup (cur->name);
                    }
              }
          val->edited = 1;
index 570dcf5f11b14c722db725104e19e5510ad025b3..f2def4cdd0eb4f28cc9fca1253cadf6d5239bc83 100644 (file)
@@ -23,8 +23,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "lwlib.h"
 
-extern char *safe_strdup (const char *);
-
 struct widget_xft_data;
 
 typedef struct _widget_instance
diff --git a/lwlib/lwlib-widget.h b/lwlib/lwlib-widget.h
new file mode 100644 (file)
index 0000000..8901964
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+Copyright (C) 1992, 1993 Lucid, Inc.
+Copyright (C) 1994, 1999-2014 Free Software Foundation, Inc.
+
+This file is part of the Lucid Widget Library.
+
+The Lucid Widget Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 1, or (at your option)
+any later version.
+
+The Lucid Widget Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* This part is separate from lwlib.h because it does not need X,
+   and thus can be used by non-X code in Emacs proper.  */
+
+#ifndef LWLIB_WIDGET_H
+#define LWLIB_WIDGET_H
+
+typedef enum
+{
+  NO_CHANGE = 0,
+  INVISIBLE_CHANGE = 1,
+  VISIBLE_CHANGE = 2,
+  STRUCTURAL_CHANGE = 3
+} change_type;
+
+enum button_type
+{
+  BUTTON_TYPE_NONE,
+  BUTTON_TYPE_TOGGLE,
+  BUTTON_TYPE_RADIO
+};
+
+typedef struct _widget_value
+{
+  /* Name of widget.  */
+  Lisp_Object lname;
+  char *name;
+
+  /* Value (meaning depend on widget type).  */
+  char *value;
+
+  /* Keyboard equivalent. no implications for XtTranslations.  */
+  Lisp_Object lkey;
+  char *key;
+
+  /* Help string or nil if none.
+     GC finds this string through the frame's menu_bar_vector
+     or through menu_items.  */
+  Lisp_Object help;
+
+  /* True if enabled.  */
+  bool enabled;
+
+  /* True if selected.  */
+  bool selected;
+
+  /* True if was edited (maintained by get_value).  */
+  bool edited;
+
+#ifdef HAVE_NTGUI
+  /* True if menu title.  */
+  bool title;
+#endif
+
+  /* The type of a button.  */
+  enum button_type button_type;
+
+  /* Contents of the sub-widgets, also selected slot for checkbox.  */
+  struct _widget_value *contents;
+
+  /* Data passed to callback.  */
+  void *call_data;
+
+  /* Next one in the list.  */
+  struct _widget_value *next;
+
+#ifdef USE_X_TOOLKIT
+  /* Type of change (maintained by lw library).  */
+  change_type change;
+
+  /* Type of this widget's change, but not counting the other widgets
+     found in the `next' field.  */
+  change_type this_one_change;
+
+  /* Slot for the toolkit dependent part.  Always initialize to NULL.  */
+  void *toolkit_data;
+
+  /* Whether we should free the toolkit data slot when freeing the
+     widget_value itself.  */
+  bool free_toolkit_data;
+#endif  
+
+} widget_value;
+
+#endif
index f3e80160ebf5e7ffc720774f02c2755860aa7bb9..7f2f753c1d4b36feeda1d6e8fc3592295469b371 100644 (file)
@@ -71,7 +71,6 @@ static widget_value *merge_widget_value (widget_value *,
                                          widget_value *,
                                          int, int *);
 static void instantiate_widget_instance (widget_instance *);
-static void safe_free_str (char *);
 static void free_widget_value_tree (widget_value *);
 static widget_value *copy_widget_value_tree (widget_value *,
                                              change_type);
@@ -99,63 +98,6 @@ static void destroy_one_instance (widget_instance *);
 static void lw_pop_all_widgets (LWLIB_ID, Boolean);
 static Boolean get_one_value (widget_instance *, widget_value *);
 static void show_one_widget_busy (Widget, Boolean);
-\f/* utility functions for widget_instance and widget_info */
-char *
-safe_strdup (const char *s)
-{
-  return s ? xstrdup (s) : 0;
-}
-
-static void
-safe_free_str (char *s)
-{
-  xfree (s);
-}
-
-static widget_value *widget_value_free_list = 0;
-static int malloc_cpt = 0;
-
-widget_value *
-malloc_widget_value (void)
-{
-  widget_value *wv;
-  if (widget_value_free_list)
-    {
-      wv = widget_value_free_list;
-      widget_value_free_list = wv->free_list;
-      wv->free_list = 0;
-    }
-  else
-    {
-      wv = (widget_value *) xmalloc (sizeof (widget_value));
-      malloc_cpt++;
-    }
-  memset ((void*) wv, 0, sizeof (widget_value));
-  return wv;
-}
-
-/* this is analogous to free().  It frees only what was allocated
-   by malloc_widget_value(), and no substructures.
- */
-void
-free_widget_value (widget_value *wv)
-{
-  if (wv->free_list)
-    abort ();
-
-  if (malloc_cpt > 25)
-    {
-      /* When the number of already allocated cells is too big,
-        We free it.  */
-      xfree (wv);
-      malloc_cpt--;
-    }
-  else
-    {
-      wv->free_list = widget_value_free_list;
-      widget_value_free_list = wv;
-    }
-}
 
 static void
 free_widget_value_tree (widget_value *wv)
@@ -185,7 +127,7 @@ free_widget_value_tree (widget_value *wv)
       free_widget_value_tree (wv->next);
       wv->next = (widget_value *) 0xDEADBEEF;
     }
-  free_widget_value (wv);
+  xfree (wv);
 }
 
 static widget_value *
@@ -198,10 +140,11 @@ copy_widget_value_tree (widget_value *val, change_type change)
   if (val == (widget_value *) 1)
     return val;
 
-  copy = malloc_widget_value ();
-  copy->name = safe_strdup (val->name);
-  copy->value = safe_strdup (val->value);
-  copy->key = safe_strdup (val->key);
+  copy = xmalloc (sizeof (widget_value));
+  copy->lname = copy->lkey = Qnil;
+  copy->name = xstrdup (val->name);
+  copy->value = val->value ? xstrdup (val->value) : NULL;
+  copy->key = val->key ? xstrdup (val->key) : NULL;
   copy->help = val->help;
   copy->enabled = val->enabled;
   copy->button_type = val->button_type;
@@ -228,8 +171,8 @@ allocate_widget_info (const char* type,
                       lw_callback highlight_cb)
 {
   widget_info* info = (widget_info*) xmalloc (sizeof (widget_info));
-  info->type = safe_strdup (type);
-  info->name = safe_strdup (name);
+  info->type = xstrdup (type);
+  info->name = xstrdup (name);
   info->id = id;
   info->val = copy_widget_value_tree (val, STRUCTURAL_CHANGE);
   info->busy = False;
@@ -248,8 +191,8 @@ allocate_widget_info (const char* type,
 static void
 free_widget_info (widget_info *info)
 {
-  safe_free_str (info->type);
-  safe_free_str (info->name);
+  xfree (info->type);
+  xfree (info->name);
   free_widget_value_tree (info->val);
   memset ((void*)info, 0xDEADBEEF, sizeof (widget_info));
   xfree (info);
@@ -431,24 +374,21 @@ merge_widget_value (widget_value *val1,
       EXPLAIN (val1->name, change, STRUCTURAL_CHANGE, "name change",
               val1->name, val2->name);
       change = max (change, STRUCTURAL_CHANGE);
-      safe_free_str (val1->name);
-      val1->name = safe_strdup (val2->name);
+      dupstring (&val1->name, val2->name);
     }
   if (safe_strcmp (val1->value, val2->value))
     {
       EXPLAIN (val1->name, change, VISIBLE_CHANGE, "value change",
               val1->value, val2->value);
       change = max (change, VISIBLE_CHANGE);
-      safe_free_str (val1->value);
-      val1->value = safe_strdup (val2->value);
+      dupstring (&val1->value, val2->value);
     }
   if (safe_strcmp (val1->key, val2->key))
     {
       EXPLAIN (val1->name, change, VISIBLE_CHANGE, "key change",
               val1->key, val2->key);
       change = max (change, VISIBLE_CHANGE);
-      safe_free_str (val1->key);
-      val1->key = safe_strdup (val2->key);
+      dupstring (&val1->key, val2->key);
     }
   if (! EQ (val1->help, val2->help))
     {
index 0e646a26b99a3a3db837722abb39cfd234840dbb..7d87facb90354feb8b404f37a5557035da216a43 100644 (file)
@@ -42,22 +42,9 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 ** main:     ("name")
 */
 
-typedef unsigned long LWLIB_ID;
+#include "lwlib-widget.h"
 
-typedef enum _change_type
-{
-  NO_CHANGE = 0,
-  INVISIBLE_CHANGE = 1,
-  VISIBLE_CHANGE = 2,
-  STRUCTURAL_CHANGE = 3
-} change_type;
-
-enum button_type
-{
-  BUTTON_TYPE_NONE,
-  BUTTON_TYPE_TOGGLE,
-  BUTTON_TYPE_RADIO
-};
+typedef unsigned int LWLIB_ID;
 
 /* Menu separator types.  */
 
@@ -81,51 +68,6 @@ enum menu_separator
   SEPARATOR_SHADOW_DOUBLE_ETCHED_OUT_DASH
 };
 
-typedef struct _widget_value
-{
-  /* name of widget */
-  Lisp_Object   lname;
-  char*                name;
-  /* value (meaning depend on widget type) */
-  char*                value;
-  /* keyboard equivalent. no implications for XtTranslations */
-  Lisp_Object   lkey;
-  char*                key;
-  /* Help string or nil if none.
-     GC finds this string through the frame's menu_bar_vector
-     or through menu_items.  */
-  Lisp_Object  help;
-  /* true if enabled */
-  Boolean      enabled;
-  /* true if selected */
-  Boolean      selected;
-  /* true if was edited (maintained by get_value) */
-  Boolean      edited;
-  /* The type of a button.  */
-  enum button_type button_type;
-  /* true if has changed (maintained by lw library) */
-  change_type  change;
-  /* true if this widget itself has changed,
-     but not counting the other widgets found in the `next' field.  */
-  change_type   this_one_change;
-  /* Contents of the sub-widgets, also selected slot for checkbox */
-  struct _widget_value*        contents;
-  /* data passed to callback */
-  XtPointer    call_data;
-  /* next one in the list */
-  struct _widget_value*        next;
-  /* slot for the toolkit dependent part.  Always initialize to NULL. */
-  void* toolkit_data;
-  /* tell us if we should free the toolkit data slot when freeing the
-     widget_value itself. */
-  Boolean free_toolkit_data;
-
-  /* we resource the widget_value structures; this points to the next
-     one on the free list if this one has been deallocated.
-   */
-  struct _widget_value *free_list;
-} widget_value;
-
 
 typedef void (*lw_callback) (Widget w, LWLIB_ID id, void* data);
 
@@ -153,8 +95,6 @@ widget_value* lw_get_all_values (LWLIB_ID id);
 Boolean lw_get_some_values (LWLIB_ID id, widget_value* val);
 void lw_pop_up_all_widgets (LWLIB_ID id);
 void lw_pop_down_all_widgets (LWLIB_ID id);
-widget_value *malloc_widget_value (void);
-void free_widget_value (widget_value *);
 void lw_popup_menu (Widget, XEvent *);
 
 /* Toolkit independent way of focusing on a Widget at the Xt level. */
index a4a18f0ba456a4e1d451cc256b3590f91e4dddbe..6f4db562e0ba6833737b81a557b97574844c3ae7 100644 (file)
@@ -1863,16 +1863,9 @@ openXftFont (XlwMenuWidget mw)
           fname[i] = '-';
         }
 
-      mw->menu.font = XLoadQueryFont (XtDisplay (mw), fname);
-      if (!mw->menu.font)
-        {
-          mw->menu.xft_font = XftFontOpenName (XtDisplay (mw), screen, fname);
-          if (!mw->menu.xft_font)
-            {
-              fprintf (stderr, "Can't find font '%s'\n", fname);
-              mw->menu.xft_font = getDefaultXftFont (mw);
-            }
-        }
+      mw->menu.xft_font = XftFontOpenName (XtDisplay (mw), screen, fname);
+      if (!mw->menu.xft_font)
+       mw->menu.xft_font = getDefaultXftFont (mw);
     }
 
   if (fname != mw->menu.fontName) xfree (fname);
@@ -1889,15 +1882,6 @@ XlwMenuInitialize (Widget request, Widget w, ArgList args, Cardinal *num_args)
   Window window = RootWindowOfScreen (DefaultScreenOfDisplay (XtDisplay (mw)));
   Display* display = XtDisplay (mw);
 
-#if 0
-  widget_value *tem = (widget_value *) XtMalloc (sizeof (widget_value));
-
-  /* _XtCreate is freeing the object that was passed to us,
-     so make a copy that we will actually keep.  */
-  memcpy (tem, mw->menu.contents, sizeof (widget_value));
-  mw->menu.contents = tem;
-#endif
-
   /*  mw->menu.cursor = XCreateFontCursor (display, mw->menu.cursor_shape); */
   mw->menu.cursor = mw->menu.cursor_shape;
 
@@ -2074,19 +2058,15 @@ XlwMenuDestroy (Widget w)
   XFreePixmap (XtDisplay (mw), mw->menu.gray_pixmap);
   mw->menu.gray_pixmap = (Pixmap) -1;
 
-#if 0
-  /* Do free mw->menu.contents because nowadays we copy it
-     during initialization.  */
-  XtFree (mw->menu.contents);
-#endif
-
   /* Don't free mw->menu.contents because that comes from our creator.
      The `*_stack' elements are just pointers into `contents' so leave
      that alone too.  But free the stacks themselves. */
   if (mw->menu.old_stack) XtFree ((char *) mw->menu.old_stack);
   if (mw->menu.new_stack) XtFree ((char *) mw->menu.new_stack);
 
-  /* Remember, you can't free anything that came from the resource
+  /* Original comment was:
+
+     Remember, you can't free anything that came from the resource
      database.  This includes:
          mw->menu.cursor
          mw->menu.top_shadow_pixmap
@@ -2095,7 +2075,11 @@ XlwMenuDestroy (Widget w)
      Also the color cells of top_shadow_color, bottom_shadow_color,
      foreground, and button_foreground will never be freed until this
      client exits.  Nice, eh?
-   */
+
+     But now I can free font without any visible glitches.  */
+
+  if (mw->menu.font)
+    XFreeFont (XtDisplay (mw), mw->menu.font);
 
 #ifdef HAVE_XFT
   if (mw->menu.windows [0].xft_draw)
index 240150efbc73ae400b8e00017f8a4c9c836e565e..7f1bb397c4f06afc85244470f9eb2e4626c81418 100644 (file)
@@ -19,13 +19,28 @@ AC_DEFUN([gl_EXTERN_INLINE],
    'reference to static identifier "f" in extern inline function'.
    This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
 
-   Suppress the use of extern inline on problematic Apple configurations.
-   OS X 10.8 and earlier mishandle it; see, e.g.,
-   <http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>.
+   Suppress extern inline (with or without __attribute__ ((__gnu_inline__)))
+   on configurations that mistakenly use 'static inline' to implement
+   functions or macros in standard C headers like <ctype.h>.  For example,
+   if isdigit is mistakenly implemented via a static inline function,
+   a program containing an extern inline function that calls isdigit
+   may not work since the C standard prohibits extern inline functions
+   from calling static functions.  This bug is known to occur on:
+
+     OS X 10.8 and earlier; see:
+     http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html
+
+     DragonFly; see
+     http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log
+
+     FreeBSD; see:
+     http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html
+
    OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and
    for clang but remains for g++; see <http://trac.macports.org/ticket/41033>.
-   Perhaps Apple will fix this some day.  */
-#if (defined __APPLE__ \
+   Assume DragonFly and FreeBSD will be similar.  */
+#if (((defined __APPLE__ && defined __MACH__) \
+      || defined __DragonFly__ || defined __FreeBSD__) \
      && (defined __header_inline \
          ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \
             && ! defined __clang__) \
@@ -33,19 +48,19 @@ AC_DEFUN([gl_EXTERN_INLINE],
              && (defined __GNUC__ || defined __cplusplus)) \
             || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \
                 && defined __GNUC__ && ! defined __cplusplus))))
-# define _GL_EXTERN_INLINE_APPLE_BUG
+# define _GL_EXTERN_INLINE_STDHEADER_BUG
 #endif
 #if ((__GNUC__ \
       ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
       : (199901L <= __STDC_VERSION__ \
          && !defined __HP_cc \
          && !(defined __SUNPRO_C && __STDC__))) \
-     && !defined _GL_EXTERN_INLINE_APPLE_BUG)
+     && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
 # define _GL_INLINE inline
 # define _GL_EXTERN_INLINE extern inline
 # define _GL_EXTERN_INLINE_IN_USE
 #elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
-       && !defined _GL_EXTERN_INLINE_APPLE_BUG)
+       && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
 # if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__
    /* __gnu_inline__ suppresses a GCC 4.2 diagnostic.  */
 #  define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
index 20ce40e7441dcab0c3ccb5ca902e1f04b37d4e39..31e5f9499e0064d548b899ec0848fa552bedd22c 100644 (file)
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 34
+# gnulib-common.m4 serial 36
 dnl Copyright (C) 2007-2014 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -49,6 +49,16 @@ AC_DEFUN([gl_COMMON_BODY], [
    is a misnomer outside of parameter lists.  */
 #define _UNUSED_PARAMETER_ _GL_UNUSED
 
+/* gcc supports the "unused" attribute on possibly unused labels, and
+   g++ has since version 4.5.  Note to support C++ as well as C,
+   _GL_UNUSED_LABEL should be used with a trailing ;  */
+#if !defined __cplusplus || __GNUC__ > 4 \
+    || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
+# define _GL_UNUSED_LABEL _GL_UNUSED
+#else
+# define _GL_UNUSED_LABEL
+#endif
+
 /* The __pure__ attribute was added in gcc 2.96.  */
 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
 # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
@@ -309,26 +319,28 @@ m4_ifdef([AC_PROG_MKDIR_P], [
 ])
 
 # AC_C_RESTRICT
-# This definition overrides the AC_C_RESTRICT macro from autoconf 2.60..2.61,
-# so that mixed use of GNU C and GNU C++ and mixed use of Sun C and Sun C++
-# works.
-# This definition can be removed once autoconf >= 2.62 can be assumed.
-# AC_AUTOCONF_VERSION was introduced in 2.62, so use that as the witness.
-m4_ifndef([AC_AUTOCONF_VERSION],[
+# This definition is copied from post-2.69 Autoconf and overrides the
+# AC_C_RESTRICT macro from autoconf 2.60..2.69.  It can be removed
+# once autoconf >= 2.70 can be assumed.  It's painful to check version
+# numbers, and in practice this macro is more up-to-date than Autoconf
+# is, so override Autoconf unconditionally.
 AC_DEFUN([AC_C_RESTRICT],
 [AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict],
   [ac_cv_c_restrict=no
    # The order here caters to the fact that C++ does not require restrict.
    for ac_kw in __restrict __restrict__ _Restrict restrict; do
-     AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-      [[typedef int * int_ptr;
-        int foo (int_ptr $ac_kw ip) {
-        return ip[0];
-       }]],
-      [[int s[1];
-        int * $ac_kw t = s;
-        t[0] = 0;
-        return foo(t)]])],
+     AC_COMPILE_IFELSE(
+      [AC_LANG_PROGRAM(
+        [[typedef int *int_ptr;
+          int foo (int_ptr $ac_kw ip) { return ip[0]; }
+          int bar (int [$ac_kw]); /* Catch GCC bug 14050.  */
+          int bar (int ip[$ac_kw]) { return ip[0]; }
+        ]],
+        [[int s[1];
+          int *$ac_kw t = s;
+          t[0] = 0;
+          return foo (t) + bar (t);
+        ]])],
       [ac_cv_c_restrict=$ac_kw])
      test "$ac_cv_c_restrict" != no && break
    done
@@ -338,21 +350,21 @@ AC_DEFUN([AC_C_RESTRICT],
    nothing if this is not supported.  Do not define if restrict is
    supported directly.  */
 #undef restrict
-/* Work around a bug in Sun C++: it does not support _Restrict, even
-   though the corresponding Sun C compiler does, which causes
-   "#define restrict _Restrict" in the previous line.  Perhaps some future
-   version of Sun C++ will work with _Restrict; if so, it'll probably
-   define __RESTRICT, just as Sun C does.  */
+/* Work around a bug in Sun C++: it does not support _Restrict or
+   __restrict__, even though the corresponding Sun C compiler ends up with
+   "#define restrict _Restrict" or "#define restrict __restrict__" in the
+   previous line.  Perhaps some future version of Sun C++ will work with
+   restrict; if so, hopefully it defines __RESTRICT like Sun C does.  */
 #if defined __SUNPRO_CC && !defined __RESTRICT
 # define _Restrict
+# define __restrict__
 #endif])
  case $ac_cv_c_restrict in
    restrict) ;;
    no) AC_DEFINE([restrict], []) ;;
    *)  AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;;
  esac
-])
-])
+])# AC_C_RESTRICT
 
 # gl_BIGENDIAN
 # is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd.
index 0ba2d7950af45c0ddf5f3cb8a2073719db2b8c06..7b6b5c00f9d0801efc2ac439b8168d5dff18d77b 100644 (file)
@@ -119,13 +119,6 @@ AC_DEFUN([gl_EARLY],
   # Code from module stat:
   # Code from module stat-time:
   # Code from module stdalign:
-  # Code from module stdarg:
-  dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode
-  dnl for the builtin va_copy to work.  With Autoconf 2.60 or later,
-  dnl gl_PROG_CC_C99 arranges for this.  With older Autoconf gl_PROG_CC_C99
-  dnl shouldn't hurt, though installers are on their own to set c99 mode.
-  gl_PROG_CC_C99
-  # Code from module stdbool:
   # Code from module stddef:
   # Code from module stdint:
   # Code from module stdio:
@@ -153,7 +146,9 @@ AC_DEFUN([gl_EARLY],
   # Code from module unsetenv:
   # Code from module update-copyright:
   # Code from module utimens:
+  # Code from module vararrays:
   # Code from module verify:
+  # Code from module vla:
   # Code from module warnings:
   # Code from module xalloc-oversized:
 ])
@@ -342,8 +337,6 @@ AC_DEFUN([gl_INIT],
   gl_STAT_TIME
   gl_STAT_BIRTHTIME
   gl_STDALIGN_H
-  gl_STDARG_H
-  AM_STDBOOL_H
   gl_STDDEF_H
   gl_STDINT_H
   gl_STDIO_H
@@ -392,6 +385,7 @@ AC_DEFUN([gl_INIT],
   fi
   gl_STDLIB_MODULE_INDICATOR([unsetenv])
   gl_UTIMENS
+  AC_C_VARARRAYS
   gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=false
   gl_gnulib_enabled_dosname=false
   gl_gnulib_enabled_euidaccess=false
@@ -891,8 +885,6 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/stat-time.h
   lib/stat.c
   lib/stdalign.in.h
-  lib/stdarg.in.h
-  lib/stdbool.in.h
   lib/stddef.in.h
   lib/stdint.in.h
   lib/stdio.in.h
@@ -927,6 +919,7 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/utimens.c
   lib/utimens.h
   lib/verify.h
+  lib/vla.h
   lib/xalloc-oversized.h
   m4/00gnulib.m4
   m4/absolute-header.m4
@@ -998,8 +991,6 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/stat-time.m4
   m4/stat.m4
   m4/stdalign.m4
-  m4/stdarg.m4
-  m4/stdbool.m4
   m4/stddef_h.m4
   m4/stdint.m4
   m4/stdio_h.m4
@@ -1026,6 +1017,7 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/utimbuf.m4
   m4/utimens.m4
   m4/utimes.m4
+  m4/vararrays.m4
   m4/warn-on-use.m4
   m4/warnings.m4
   m4/wchar_t.m4
index e1cee6cf9d1105e17db161c1f5da4303be18ba9b..3e6dd215ced4b4cec993d84d60f428da4fe3205b 100644 (file)
@@ -1,4 +1,4 @@
-# manywarnings.m4 serial 6
+# manywarnings.m4 serial 7
 dnl Copyright (C) 2008-2014 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -93,6 +93,14 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
   fi
 
   # List all gcc warning categories.
+  # To compare this list to your installed GCC's, run this Bash command:
+  #
+  # comm -3 \
+  #  <(sed -n 's/^  *\(-[^ ]*\) .*/\1/p' manywarnings.m4 | sort) \
+  #  <(gcc --help=warnings | sed -n 's/^  \(-[^ ]*\) .*/\1/p' | sort |
+  #      grep -v -x -f <(
+  #         awk '/^[^#]/ {print $1}' ../build-aux/gcc-warning.spec))
+
   gl_manywarn_set=
   for gl_manywarn_item in \
     -W \
@@ -111,6 +119,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
     -Wcomments \
     -Wcoverage-mismatch \
     -Wcpp \
+    -Wdate-time \
     -Wdeprecated \
     -Wdeprecated-declarations \
     -Wdisabled-optimization \
@@ -150,9 +159,9 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
     -Wnarrowing \
     -Wnested-externs \
     -Wnonnull \
-    -Wnormalized=nfc \
     -Wold-style-declaration \
     -Wold-style-definition \
+    -Wopenmp-simd \
     -Woverflow \
     -Woverlength-strings \
     -Woverride-init \
@@ -203,13 +212,26 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
     -Wvla \
     -Wvolatile-register-var \
     -Wwrite-strings \
-    -fdiagnostics-show-option \
-    -funit-at-a-time \
     \
     ; do
     gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
   done
 
+  # gcc --help=warnings outputs an unusual form for this option; list
+  # it here so that the above 'comm' command doesn't report a false match.
+  gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc"
+
+  # These are needed for older GCC versions.
+  if test -n "$GCC"; then
+    case `($CC --version) 2>/dev/null` in
+      'gcc (GCC) '[[0-3]].* | \
+      'gcc (GCC) '4.[[0-7]].*)
+        gl_manywarn_set="$gl_manywarn_set -fdiagnostics-show-option"
+        gl_manywarn_set="$gl_manywarn_set -funit-at-a-time"
+          ;;
+    esac
+  fi
+
   # Disable specific options as needed.
   if test "$gl_cv_cc_nomfi_needed" = yes; then
     gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
diff --git a/m4/pkg.m4 b/m4/pkg.m4
new file mode 100644 (file)
index 0000000..c5b26b5
--- /dev/null
+++ b/m4/pkg.m4
@@ -0,0 +1,214 @@
+# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+# serial 1 (pkg-config-0.24)
+# 
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
+m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+       AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+       _pkg_min_version=m4_default([$1], [0.9.0])
+       AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+               AC_MSG_RESULT([yes])
+       else
+               AC_MSG_RESULT([no])
+               PKG_CONFIG=""
+       fi
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists.  Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+# only at the first occurence in configure.ac, so if the first place
+# it's called might be skipped (such as if it is within an "if", you
+# have to call PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+  m4_default([$2], [:])
+m4_ifvaln([$3], [else
+  $3])dnl
+fi])
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+    pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+    PKG_CHECK_EXISTS([$3],
+                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
+                     test "x$?" != "x0" && pkg_failed=yes ],
+                    [pkg_failed=yes])
+ else
+    pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+       AC_MSG_RESULT([no])
+        _PKG_SHORT_ERRORS_SUPPORTED
+        if test $_pkg_short_errors_supported = yes; then
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
+        else 
+               $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+       m4_default([$4], [AC_MSG_ERROR(
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT])[]dnl
+        ])
+elif test $pkg_failed = untried; then
+       AC_MSG_RESULT([no])
+       m4_default([$4], [AC_MSG_FAILURE(
+[The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
+        ])
+else
+       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+        AC_MSG_RESULT([yes])
+       $3
+fi[]dnl
+])# PKG_CHECK_MODULES
+
+
+# PKG_INSTALLDIR(DIRECTORY)
+# -------------------------
+# Substitutes the variable pkgconfigdir as the location where a module
+# should install pkg-config .pc files. By default the directory is
+# $libdir/pkgconfig, but the default can be changed by passing
+# DIRECTORY. The user can override through the --with-pkgconfigdir
+# parameter.
+AC_DEFUN([PKG_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+    [pkg-config installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([pkgconfigdir],
+    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
+    [with_pkgconfigdir=]pkg_default)
+AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+]) dnl PKG_INSTALLDIR
+
+
+# PKG_NOARCH_INSTALLDIR(DIRECTORY)
+# -------------------------
+# Substitutes the variable noarch_pkgconfigdir as the location where a
+# module should install arch-independent pkg-config .pc files. By
+# default the directory is $datadir/pkgconfig, but the default can be
+# changed by passing DIRECTORY. The user can override through the
+# --with-noarch-pkgconfigdir parameter.
+AC_DEFUN([PKG_NOARCH_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([noarch-pkgconfigdir],
+    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
+    [with_noarch_pkgconfigdir=]pkg_default)
+AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+]) dnl PKG_NOARCH_INSTALLDIR
+
+
+# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# -------------------------------------------
+# Retrieves the value of the pkg-config variable for the given module.
+AC_DEFUN([PKG_CHECK_VAR],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
+
+_PKG_CONFIG([$1], [variable="][$3]["], [$2])
+AS_VAR_COPY([$1], [pkg_cv_][$1])
+
+AS_VAR_IF([$1], [""], [$5], [$4])dnl
+])# PKG_CHECK_VAR
index 4ba073231f9af5648b1fa0107a63a4f280249bcc..5153828a969ec6fb1bbd35b0cb6008d16f8808ed 100644 (file)
@@ -1,4 +1,4 @@
-# pthread_sigmask.m4 serial 13
+# pthread_sigmask.m4 serial 15
 dnl Copyright (C) 2011-2014 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -40,7 +40,7 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
              LIBS="$gl_save_LIBS"
             ])
           if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
-            dnl pthread_sigmask is available with -lpthread.
+            dnl pthread_sigmask is available with -pthread or -lpthread.
             LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
           else
             dnl pthread_sigmask is not available at all.
@@ -86,7 +86,7 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
   AC_SUBST([LIB_PTHREAD_SIGMASK])
   dnl We don't need a variable LTLIB_PTHREAD_SIGMASK, because when
   dnl "$gl_threads_api" = posix, $LTLIBMULTITHREAD and $LIBMULTITHREAD are the
-  dnl same: either both empty or both "-lpthread".
+  dnl same.
 
   dnl Now test for some bugs in the system function.
   if test $HAVE_PTHREAD_SIGMASK = 1; then
@@ -97,39 +97,44 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
     dnl with -lpthread, the pthread_sigmask() function always returns 0 and has
     dnl no effect.
     if test -z "$LIB_PTHREAD_SIGMASK"; then
-      AC_CACHE_CHECK([whether pthread_sigmask works without -lpthread],
-        [gl_cv_func_pthread_sigmask_in_libc_works],
-        [
-          AC_RUN_IFELSE(
-            [AC_LANG_SOURCE([[
-#include <pthread.h>
-#include <signal.h>
-#include <stddef.h>
-int main ()
-{
-  sigset_t set;
-  sigemptyset (&set);
-  return pthread_sigmask (1729, &set, NULL) != 0;
-}]])],
-            [gl_cv_func_pthread_sigmask_in_libc_works=no],
-            [gl_cv_func_pthread_sigmask_in_libc_works=yes],
-            [
-changequote(,)dnl
-             case "$host_os" in
-               freebsd* | hpux* | solaris | solaris2.[2-9]*)
-                 gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
-               *)
-                 gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
-             esac
-changequote([,])dnl
-            ])
-        ])
-      case "$gl_cv_func_pthread_sigmask_in_libc_works" in
-        *no)
-          REPLACE_PTHREAD_SIGMASK=1
-          AC_DEFINE([PTHREAD_SIGMASK_INEFFECTIVE], [1],
-            [Define to 1 if pthread_sigmask() may returns 0 and have no effect.])
-          ;;
+      case " $LIBS " in
+        *' -pthread '*) ;;
+        *' -lpthread '*) ;;
+       *)
+         AC_CACHE_CHECK([whether pthread_sigmask works without -lpthread],
+           [gl_cv_func_pthread_sigmask_in_libc_works],
+           [
+             AC_RUN_IFELSE(
+               [AC_LANG_SOURCE([[
+                  #include <pthread.h>
+                  #include <signal.h>
+                  #include <stddef.h>
+                  int main ()
+                  {
+                    sigset_t set;
+                    sigemptyset (&set);
+                    return pthread_sigmask (1729, &set, NULL) != 0;
+                  }]])],
+               [gl_cv_func_pthread_sigmask_in_libc_works=no],
+               [gl_cv_func_pthread_sigmask_in_libc_works=yes],
+               [
+                changequote(,)dnl
+                case "$host_os" in
+                  freebsd* | hpux* | solaris | solaris2.[2-9]*)
+                    gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
+                  *)
+                    gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
+                esac
+                changequote([,])dnl
+               ])
+           ])
+         case "$gl_cv_func_pthread_sigmask_in_libc_works" in
+           *no)
+             REPLACE_PTHREAD_SIGMASK=1
+             AC_DEFINE([PTHREAD_SIGMASK_INEFFECTIVE], [1],
+               [Define to 1 if pthread_sigmask may return 0 and have no effect.])
+             ;;
+         esac;;
       esac
     fi
 
@@ -184,11 +189,12 @@ int main ()
           *)
             gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
         esac
-        dnl Here we link against $LIBMULTITHREAD, not only $LIB_PTHREAD_SIGMASK,
-        dnl otherwise we get a false positive on those platforms where
-        dnl $gl_cv_func_pthread_sigmask_in_libc_works is "no".
-        gl_save_LIBS="$LIBS"
-        LIBS="$LIBS $LIBMULTITHREAD"
+        m4_ifdef([gl_][THREADLIB],
+          [dnl Link against $LIBMULTITHREAD, not only $LIB_PTHREAD_SIGMASK.
+           dnl Otherwise we get a false positive on those platforms where
+           dnl $gl_cv_func_pthread_sigmask_in_libc_works is "no".
+           gl_save_LIBS=$LIBS
+           LIBS="$LIBS $LIBMULTITHREAD"])
         AC_RUN_IFELSE(
           [AC_LANG_SOURCE([[
 #include <pthread.h>
@@ -227,7 +233,7 @@ int main ()
           [:],
           [gl_cv_func_pthread_sigmask_unblock_works=no],
           [:])
-        LIBS="$gl_save_LIBS"
+        m4_ifdef([gl_][THREADLIB], [LIBS=$gl_save_LIBS])
       ])
     case "$gl_cv_func_pthread_sigmask_unblock_works" in
       *no)
diff --git a/m4/stdarg.m4 b/m4/stdarg.m4
deleted file mode 100644 (file)
index 732aa31..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-# stdarg.m4 serial 6
-dnl Copyright (C) 2006, 2008-2014 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-dnl Provide a working va_copy in combination with <stdarg.h>.
-
-AC_DEFUN([gl_STDARG_H],
-[
-  STDARG_H=''
-  NEXT_STDARG_H='<stdarg.h>'
-  AC_MSG_CHECKING([for va_copy])
-  AC_CACHE_VAL([gl_cv_func_va_copy], [
-    AC_COMPILE_IFELSE(
-      [AC_LANG_PROGRAM(
-         [[#include <stdarg.h>]],
-         [[
-#ifndef va_copy
-void (*func) (va_list, va_list) = va_copy;
-#endif
-         ]])],
-      [gl_cv_func_va_copy=yes],
-      [gl_cv_func_va_copy=no])])
-  AC_MSG_RESULT([$gl_cv_func_va_copy])
-  if test $gl_cv_func_va_copy = no; then
-    dnl Provide a substitute.
-    dnl Usually a simple definition in <config.h> is enough. Not so on AIX 5
-    dnl with some versions of the /usr/vac/bin/cc compiler. It has an <stdarg.h>
-    dnl which does '#undef va_copy', leading to a missing va_copy symbol. For
-    dnl this platform, we use an <stdarg.h> substitute. But we cannot use this
-    dnl approach on other platforms, because <stdarg.h> often defines only
-    dnl preprocessor macros and gl_ABSOLUTE_HEADER, gl_CHECK_NEXT_HEADERS do
-    dnl not work in this situation.
-    AC_EGREP_CPP([vaccine],
-      [#if defined _AIX && !defined __GNUC__
-        AIX vaccine
-       #endif
-      ], [gl_aixcc=yes], [gl_aixcc=no])
-    if test $gl_aixcc = yes; then
-      dnl Provide a substitute <stdarg.h> file.
-      STDARG_H=stdarg.h
-      gl_NEXT_HEADERS([stdarg.h])
-      dnl Fallback for the case when <stdarg.h> contains only macro definitions.
-      if test "$gl_cv_next_stdarg_h" = '""'; then
-        gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
-        NEXT_STDARG_H="$gl_cv_next_stdarg_h"
-      fi
-    else
-      dnl Provide a substitute in <config.h>, either __va_copy or as a simple
-      dnl assignment.
-      gl_CACHE_VAL_SILENT([gl_cv_func___va_copy], [
-        AC_COMPILE_IFELSE(
-          [AC_LANG_PROGRAM(
-             [[#include <stdarg.h>]],
-             [[
-#ifndef __va_copy
-error, bail out
-#endif
-             ]])],
-          [gl_cv_func___va_copy=yes],
-          [gl_cv_func___va_copy=no])])
-      if test $gl_cv_func___va_copy = yes; then
-        AC_DEFINE([va_copy], [__va_copy],
-          [Define as a macro for copying va_list variables.])
-      else
-        AH_VERBATIM([gl_VA_COPY], [/* A replacement for va_copy, if needed.  */
-#define gl_va_copy(a,b) ((a) = (b))])
-        AC_DEFINE([va_copy], [gl_va_copy],
-          [Define as a macro for copying va_list variables.])
-      fi
-    fi
-  fi
-  AC_SUBST([STDARG_H])
-  AM_CONDITIONAL([GL_GENERATE_STDARG_H], [test -n "$STDARG_H"])
-  AC_SUBST([NEXT_STDARG_H])
-])
diff --git a/m4/stdbool.m4 b/m4/stdbool.m4
deleted file mode 100644 (file)
index 006ed52..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-# Check for stdbool.h that conforms to C99.
-
-dnl Copyright (C) 2002-2006, 2009-2014 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-#serial 5
-
-# Prepare for substituting <stdbool.h> if it is not supported.
-
-AC_DEFUN([AM_STDBOOL_H],
-[
-  AC_REQUIRE([AC_CHECK_HEADER_STDBOOL])
-
-  # Define two additional variables used in the Makefile substitution.
-
-  if test "$ac_cv_header_stdbool_h" = yes; then
-    STDBOOL_H=''
-  else
-    STDBOOL_H='stdbool.h'
-  fi
-  AC_SUBST([STDBOOL_H])
-  AM_CONDITIONAL([GL_GENERATE_STDBOOL_H], [test -n "$STDBOOL_H"])
-
-  if test "$ac_cv_type__Bool" = yes; then
-    HAVE__BOOL=1
-  else
-    HAVE__BOOL=0
-  fi
-  AC_SUBST([HAVE__BOOL])
-])
-
-# AM_STDBOOL_H will be renamed to gl_STDBOOL_H in the future.
-AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H])
-
-# This version of the macro is needed in autoconf <= 2.68.
-
-AC_DEFUN([AC_CHECK_HEADER_STDBOOL],
-  [AC_CACHE_CHECK([for stdbool.h that conforms to C99],
-     [ac_cv_header_stdbool_h],
-     [AC_COMPILE_IFELSE(
-        [AC_LANG_PROGRAM(
-           [[
-             #include <stdbool.h>
-             #ifndef bool
-              "error: bool is not defined"
-             #endif
-             #ifndef false
-              "error: false is not defined"
-             #endif
-             #if false
-              "error: false is not 0"
-             #endif
-             #ifndef true
-              "error: true is not defined"
-             #endif
-             #if true != 1
-              "error: true is not 1"
-             #endif
-             #ifndef __bool_true_false_are_defined
-              "error: __bool_true_false_are_defined is not defined"
-             #endif
-
-             struct s { _Bool s: 1; _Bool t; } s;
-
-             char a[true == 1 ? 1 : -1];
-             char b[false == 0 ? 1 : -1];
-             char c[__bool_true_false_are_defined == 1 ? 1 : -1];
-             char d[(bool) 0.5 == true ? 1 : -1];
-             /* See body of main program for 'e'.  */
-             char f[(_Bool) 0.0 == false ? 1 : -1];
-             char g[true];
-             char h[sizeof (_Bool)];
-             char i[sizeof s.t];
-             enum { j = false, k = true, l = false * true, m = true * 256 };
-             /* The following fails for
-                HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
-             _Bool n[m];
-             char o[sizeof n == m * sizeof n[0] ? 1 : -1];
-             char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
-             /* Catch a bug in an HP-UX C compiler.  See
-                http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
-                http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
-              */
-             _Bool q = true;
-             _Bool *pq = &q;
-           ]],
-           [[
-             bool e = &s;
-             *pq |= q;
-             *pq |= ! q;
-             /* Refer to every declared value, to avoid compiler optimizations.  */
-             return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
-                     + !m + !n + !o + !p + !q + !pq);
-           ]])],
-        [ac_cv_header_stdbool_h=yes],
-        [ac_cv_header_stdbool_h=no])])
-   AC_CHECK_TYPES([_Bool])
-])
index 03b448b94f4ec640d1f6550a2cffbada5a658349..86aff16eb05218164789eafe78468ea9301daab2 100644 (file)
@@ -55,6 +55,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
   GNULIB_PTSNAME=0;       AC_SUBST([GNULIB_PTSNAME])
   GNULIB_PTSNAME_R=0;     AC_SUBST([GNULIB_PTSNAME_R])
   GNULIB_PUTENV=0;        AC_SUBST([GNULIB_PUTENV])
+  GNULIB_QSORT_R=0;       AC_SUBST([GNULIB_QSORT_R])
   GNULIB_RANDOM=0;        AC_SUBST([GNULIB_RANDOM])
   GNULIB_RANDOM_R=0;      AC_SUBST([GNULIB_RANDOM_R])
   GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX])
@@ -107,6 +108,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
   REPLACE_PTSNAME=0;         AC_SUBST([REPLACE_PTSNAME])
   REPLACE_PTSNAME_R=0;       AC_SUBST([REPLACE_PTSNAME_R])
   REPLACE_PUTENV=0;          AC_SUBST([REPLACE_PUTENV])
+  REPLACE_QSORT_R=0;         AC_SUBST([REPLACE_QSORT_R])
   REPLACE_RANDOM_R=0;        AC_SUBST([REPLACE_RANDOM_R])
   REPLACE_REALLOC=0;         AC_SUBST([REPLACE_REALLOC])
   REPLACE_REALPATH=0;        AC_SUBST([REPLACE_REALPATH])
index 8e2c921cbef74aceab5626d3f33bd166e25485c1..578ebe0809a1032eca1318cb67c7e411dc4fd12e 100644 (file)
@@ -1,4 +1,4 @@
-# timer_time.m4 serial 2
+# timer_time.m4 serial 3
 dnl Copyright (C) 2011-2014 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -11,7 +11,12 @@ AC_DEFUN([gl_TIMER_TIME],
   dnl Based on clock_time.m4. See details there.
 
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
-  AC_REQUIRE([gl_THREADLIB])
+
+  dnl Test whether the gnulib module 'threadlib' is in use.
+  dnl Some packages like Emacs use --avoid=threadlib.
+  dnl Write the symbol in such a way that it does not cause 'aclocal' to pick
+  dnl the threadlib.m4 file that is installed in $PREFIX/share/aclocal/.
+  m4_ifdef([gl_][THREADLIB], [AC_REQUIRE([gl_][THREADLIB])])
 
   LIB_TIMER_TIME=
   AC_SUBST([LIB_TIMER_TIME])
@@ -19,21 +24,21 @@ AC_DEFUN([gl_TIMER_TIME],
     AC_SEARCH_LIBS([timer_settime], [rt posix4],
                    [test "$ac_cv_search_timer_settime" = "none required" ||
                     LIB_TIMER_TIME=$ac_cv_search_timer_settime])
-    dnl GLIBC uses threads to emulate posix timers when kernel support
-    dnl is not available (like Linux < 2.6 or when used with kFreeBSD)
-    dnl Now the pthread lib is linked automatically in the normal case,
-    dnl but when linking statically, it needs to be explicitly specified.
-    AC_EGREP_CPP([Thread],
-      [
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || (__GLIBC__ > 2)) \
-     && !(__UCLIBC__ && __HAS_NO_THREADS__)
-  Thread emulation available
- #endif
-#endif
-      ],
-      [LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBMULTITHREAD"])
+    m4_ifdef([gl_][THREADLIB],
+      [dnl GLIBC uses threads to emulate posix timers when kernel support
+       dnl is not available (like Linux < 2.6 or when used with kFreeBSD)
+       dnl Now the pthread lib is linked automatically in the normal case,
+       dnl but when linking statically, it needs to be explicitly specified.
+       AC_EGREP_CPP([Thread],
+         [#include <features.h>
+          #ifdef __GNU_LIBRARY__
          #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || (__GLIBC__ > 2)) \
+               && !(__UCLIBC__ && __HAS_NO_THREADS__)
+            Thread emulation available
          #endif
+          #endif
+         ],
+         [LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBMULTITHREAD"])])
     AC_CHECK_FUNCS([timer_settime])
   LIBS=$gl_saved_libs
 ])
diff --git a/m4/vararrays.m4 b/m4/vararrays.m4
new file mode 100644 (file)
index 0000000..cbda525
--- /dev/null
@@ -0,0 +1,68 @@
+# Check for variable-length arrays.
+
+# serial 5
+
+# From Paul Eggert
+
+# Copyright (C) 2001, 2009-2014 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This is a copy of AC_C_VARARRAYS from a recent development version
+# of Autoconf.  It replaces Autoconf's version, or for pre-2.61 autoconf
+# it defines the macro that Autoconf lacks.
+AC_DEFUN([AC_C_VARARRAYS],
+[
+  AC_CACHE_CHECK([for variable-length arrays],
+    ac_cv_c_vararrays,
+    [AC_EGREP_CPP([defined],
+       [#ifdef __STDC_NO_VLA__
+       defined
+       #endif
+       ],
+       [ac_cv_c_vararrays='no: __STDC_NO_VLA__ is defined'],
+       [AC_COMPILE_IFELSE(
+         [AC_LANG_PROGRAM(
+            [[/* Test for VLA support.  This test is partly inspired
+                 from examples in the C standard.  Use at least two VLA
+                 functions to detect the GCC 3.4.3 bug described in:
+                 http://lists.gnu.org/archive/html/bug-gnulib/2014-08/msg00014.html
+                 */
+              #ifdef __STDC_NO_VLA__
+               syntax error;
+              #else
+                extern int n;
+                int B[100];
+                int fvla (int m, int C[m][m]);
+
+                int
+                simple (int count, int all[static count])
+                {
+                  return all[count - 1];
+                }
+
+                int
+                fvla (int m, int C[m][m])
+                {
+                  typedef int VLA[m][m];
+                  VLA x;
+                  int D[m];
+                  static int (*q)[m] = &B;
+                  int (*s)[n] = q;
+                  return C && &x[0][0] == &D[0] && &D[0] == s[0];
+                }
+              #endif
+              ]])],
+         [ac_cv_c_vararrays=yes],
+         [ac_cv_c_vararrays=no])])])
+  if test "$ac_cv_c_vararrays" = yes; then
+    dnl This is for compatibility with Autoconf 2.61-2.69.
+    AC_DEFINE([HAVE_C_VARARRAYS], 1,
+      [Define to 1 if C supports variable-length arrays.])
+  elif test "$ac_cv_c_vararrays" = no; then
+    AC_DEFINE([__STDC_NO_VLA__], 1,
+      [Define to 1 if C does not support variable-length arrays, and
+       if the compiler does not already define this.])
+  fi
+])
index aed5b17c0e2b3af99da41e57010a086eb5d675c0..3202f1f0e69b9efa2817fb43788b831067ea05ca 100755 (executable)
--- a/make-dist
+++ b/make-dist
@@ -1,8 +1,7 @@
 #!/bin/sh
 ### make-dist: create an Emacs distribution tar file from current srcdir
 
-## Copyright (C) 1995, 1997-1998, 2000-2014 Free Software Foundation,
-## Inc.
+## Copyright (C) 1995, 1997-1998, 2000-2014 Free Software Foundation, Inc.
 
 ## This file is part of GNU Emacs.
 
@@ -160,7 +159,7 @@ fi
 
 ### Find out which version of Emacs this is.
 version=`
-  sed -n 's/^AC_INIT(emacs,[    ]*\([^  )]*\).*/\1/p' <configure.ac
+  sed -n 's/^AC_INIT(GNU Emacs,[        ]*\([^  ,)]*\).*/\1/p' <configure.ac
 ` || version=
 if [ ! "${version}" ]; then
   echo "${progname}: can't find current Emacs version in \`./src/emacs.c'" >&2
@@ -383,7 +382,7 @@ echo "Making links to \`lib'"
 echo "Making links to \`lib-src'"
 (cd lib-src
  ln [a-zA-Z]*.[ch] ../${tempdir}/lib-src
- ln ChangeLog Makefile.in README testfile ../${tempdir}/lib-src
+ ln ChangeLog Makefile.in README ../${tempdir}/lib-src
  ln grep-changelog rcs2log ../${tempdir}/lib-src
  ln makefile.w32-in ../${tempdir}/lib-src
  ln update-game-score.exe.manifest ../${tempdir}/lib-src)
@@ -415,7 +414,7 @@ echo "Making links to \`msdos'"
 (cd msdos
  ln ChangeLog INSTALL README emacs.ico emacs.pif ../${tempdir}/msdos
  ln depfiles.bat inttypes.h ../${tempdir}/msdos
- ln is_exec.c sigaction.c mainmake.v2 sed*.inp ../${tempdir}/msdos)
+ ln mainmake.v2 sed*.inp ../${tempdir}/msdos)
 
 echo "Making links to \`nextstep'"
 (cd nextstep
@@ -439,12 +438,12 @@ echo "Making links to \`nextstep/GNUstep/Emacs.base/Resources'"
 
 echo "Making links to \`oldXMenu'"
 (cd oldXMenu
- ln *.[ch] *.in ../${tempdir}/oldXMenu
+ ln *.[ch] *.in *.mk ../${tempdir}/oldXMenu
  ln README ChangeLog ../${tempdir}/oldXMenu)
 
 echo "Making links to \`lwlib'"
 (cd lwlib
- ln *.[ch] *.in ../${tempdir}/lwlib
+ ln *.[ch] *.in *.mk ../${tempdir}/lwlib
  ln README ChangeLog ../${tempdir}/lwlib)
 
 ## It is important to distribute admin/ because it contains sources
@@ -461,6 +460,7 @@ if [ "$with_tests" = "yes" ]; then
   echo "Making links to \`test' and its subdirectories"
   for f in `find test -type f`; do
     case $f in
+      test/automated/*.log) continue ;;
       test/automated/flymake/warnpred/a.out) continue ;;
       test/automated/Makefile) continue ;;
     esac
index 3dd5476910e5b8b15c48fde210762fa754d42a76..6fa40a145957adda1b741108d83371bdb9def5d9 100644 (file)
@@ -1,15 +1,30 @@
-2014-08-25  Eli Zaretskii  <eliz@gnu.org>
+2014-09-29  Eli Zaretskii  <eliz@gnu.org>
+
+       * sed2v2.inp: Bump version to 25.0.50.
+
+2014-08-28  Eli Zaretskii  <eliz@gnu.org>
 
        * sedlibmk.inp (gl_LIBOBJS): Add execinfo.o.  Reported by Juan
        Manuel Guerrero <juan.guerrero@gmx.de>.
 
-2014-08-23  Eli Zaretskii  <eliz@gnu.org>
-
        * sed2v2.inp [DJGPP <= 2.03]: Add a prototype for snprintf, to
        avoid compilation warning from newer GCC versions that have
        snprintf as a built-in.  Reported by Juan Manuel Guerrero
        <juan.guerrero@gmx.de>.
 
+2014-08-09  Eli Zaretskii  <eliz@gnu.org>
+
+       * INSTALL: Fix last change.
+
+2014-08-09  Reuben Thomas  <rrt@sc3d.org>
+
+       * is_exec.c, sigaction.c: Remove files.
+       * sed2v2.inp: Remove support for DJGPP 2.01.
+       * INSTALL: Don't mention removed files msdos/is_exec.c and
+       sigaction.c, and increase minimum version of DJGPP to 2.02.
+       * README: Remove note on legal status of removed files
+       is_exec.c and sigaction.c.
+
 2014-04-16  Eli Zaretskii  <eliz@gnu.org>
 
        * sedlisp.inp:
index de950b89def817b3edbf479ba35d958dcd8e5762..cba9f651b72454746773b72a454054946dd26864 100644 (file)
@@ -11,12 +11,13 @@ Building on plain MS-DOS is supported only if long file names are
 supported (e.g., with a specialized driver such as doslfn).
 
 To build and install the DJGPP port, you need to have the DJGPP ports
-of GCC (the GNU C compiler), GNU Make, rm, mv, cp, and sed.  See the
-remarks in CONFIG.BAT for more information about locations and
-versions.  The Emacs FAQ (see info/efaq.info) includes pointers to
-Internet sites where you can find the necessary utilities; search for
-"MS-DOS".  The configuration step (see below) will test for these
-utilities and will refuse to continue if any of them isn't found.
+of GCC (the GNU C compiler), GNU Make, rm, mv, cp, and sed, and
+version 2.02 or later of DJGPP itself.  See the remarks in CONFIG.BAT
+for more information about locations and versions.  The Emacs FAQ (see
+info/efaq.info) includes pointers to Internet sites where you can find
+the necessary utilities; search for "MS-DOS".  The configuration step
+(see below) will test for these utilities and will refuse to continue
+if any of them isn't found.
 
 Bootstrapping Emacs or recompiling Lisp files in the `lisp'
 subdirectory using the various targets in the lisp/Makefile file
@@ -28,14 +29,13 @@ are distributed in byte-compiled form as well.  As for bootstrapping
 itself, you will only need that if you check-out development sources
 from the Emacs source repository.
 
-Building the DJGPP version of Emacs is currently supported only on
-systems which support long file names (e.g. Windows 9X or Windows XP).
-You need to unpack Emacs distribution in a way that doesn't truncate
-the original long filenames to the DOS 8.3 namespace; the easiest way
-to do this is to use djtar program which comes with DJGPP, since it
-will behave consistently with the rest of DJGPP tools.  Do _not_
-disable the DJGPP long-file-name support (a.k.a. "LFN") while building
-Emacs.
+Building the DJGPP version of Emacs is supported only on systems which
+support long file names (e.g. Windows 9X or Windows XP).  You need to
+unpack Emacs distribution in a way that doesn't truncate the original
+long filenames to the DOS 8.3 namespace; the easiest way to do this is
+to use djtar program which comes with DJGPP, since it will behave
+consistently with the rest of DJGPP tools.  Do _not_ disable the DJGPP
+long-file-name support (a.k.a. "LFN") while building Emacs.
 
 (By the time you read this, you have already unpacked the Emacs
 distribution, but if the explanations above imply that you should have
@@ -68,13 +68,7 @@ type these commands:
 
 Running "config msdos" checks for several programs that are required
 to configure and build Emacs; if one of those programs is not found,
-CONFIG.BAT stops and prints an error message.  If you have DJGPP
-version 2.0 or 2.01, it will complain about a program called
-DJECHO.EXE.  These old versions of DJGPP shipped that program under
-the name ECHO.EXE, so you can simply copy ECHO.EXE to DJECHO.EXE and
-rerun CONFIG.BAT.  If you have neither ECHO.EXE nor DJECHO.EXE, you
-should be able to find them in your djdevNNN.zip archive (where NNN is
-the DJGPP version number).
+CONFIG.BAT stops and prints an error message.
 
 On Windows NT and Windows 2000/XP/Vista/7, running "config msdos"
 might print an error message like "VDM has been already loaded".  This
@@ -143,12 +137,6 @@ multitasking do not work in the DJGPP port.  Synchronous subprocesses
 do work, so features such as compilation, grep, and Ispell run
 synchronously, unlike on other platforms.
 
-Version 2.0 of djgpp has two bugs that affect Emacs.  We've included
-corrected versions of two files from djgpp in the msdos subdirectory:
-is_exec.c and sigaction.c.  To work around the bugs, compile these
-files and link them into temacs.  Djgpp versions 2.01 and later have
-these bugs fixed, so upgrade if you can before building Emacs.
-
 \f
 This file is part of GNU Emacs.
 
index 1cc424735fd32b2db5ff87a140157ea95e5840f6..07be34a5e2689b2db5b3e9d56df5f8e825a860d9 100644 (file)
@@ -24,129 +24,6 @@ reproduced here:
 #
 # ----------------------------------------------------------------------
 
-
-NOTE ON THE LEGAL STATUS OF THE FILES IS_EXEC.C, SIGACTION.C
-
-As distributed with GNU Emacs, the files is_exec.c and sigaction.c are
-Copyright (C) 1995 DJ Delorie, and are licensed under the terms of the
-GNU General Public License version 3 (see COPYING), or (at your
-option) any later version.
-
-Here we record the details of the legal history of these files.
-
-The files is_exec.c and sigaction.c were originally part of DJGPP,
-distributed by DJ Delorie. The versions of these files in DJGPP
-contain the following license notice:
-
-  Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details
-
-The contents of the file COPYING.DJ (as available at, for example, the
-URL: <http://www.delorie.com/bin/cvsweb.cgi/djgpp/copying.dj>) are as
-follows:
-
--- COPYING.DJ STARTS HERE --
-
-This is the file "COPYING.DJ".  It does NOT apply to any sources or
-binaries copyrighted by UCB Berkeley, the Free Software Foundation, or
-any other agency besides DJ Delorie and others who have agreed to
-allow their sources to be distributed under these terms.
-
-   Copyright Information for sources and executables that are marked
-   Copyright (C) DJ Delorie
-                 334 North Rd
-                 Deerfield NH 03037-1110
-
-This document is Copyright (C) DJ Delorie and may be distributed
-verbatim, but changing it is not allowed.
-
-Source code copyright DJ Delorie is distributed under the terms of the
-GNU General Public License, with the following exceptions:
-
-* Sources used to build crt0.o, gcrt0.o, libc.a, libdbg.a, and
-  libemu.a are distributed under the terms of the GNU Library General
-  Public License, rather than the GNU GPL.
-
-* Any existing copyright or authorship information in any given source
-  file must remain intact.  If you modify a source file, a notice to that
-  effect must be added to the authorship information in the source file.
-
-* Runtime binaries, as provided by DJ in DJGPP, may be distributed
-  without sources ONLY if the recipient is given sufficient information
-  to obtain a copy of djgpp themselves.  This primarily applies to
-  go32-v2.exe, emu387.dxe, and stubedit.exe.
-
-* Runtime objects and libraries, as provided by DJ in DJGPP, when
-  linked into an application, may be distributed without sources ONLY
-  if the recipient is given sufficient information to obtain a copy of
-  djgpp themselves.  This primarily applies to crt0.o and libc.a.
-
------
-
-Changes to source code copyright BSD, FSF, or others, by DJ Delorie
-fall under the terms of the original copyright.  Such files usually
-have multiple copyright notices in them.
-
-A copy of the files "COPYING" and "COPYING.LIB" are included with this
-document.  If you did not receive a copy of these files, you may
-obtain one from whence this document was obtained, or by writing:
-
-      Free Software Foundation, Inc.
-      51 Franklin Street,
-      Fifth Floor,
-      Boston, MA 02110-1301,
-      USA
-
--- COPYING.DJ ENDS HERE --
-
-Both is_exec.c and sigaction.c are parts of DJGPP's libc.a, therefore
-according to exception 1 in the above terms their "base" license is
-the GNU Library General Public License [now known as the GNU Lesser
-General Public License].
-
-The terms of the GNU LGPL, specifically clause 3, which begins:
-
-    3. You may opt to apply the terms of the ordinary GNU General
-    Public License instead of this License to a given copy of the
-    Library.
-
-permit us to relicense the files is_exec.c and sigaction.c as used in
-GNU Emacs under the terms of the GNU GPL.
-
-COPYING.DJ, however, lists extra exceptions 2-4 to the GNU licenses.
-Items 3 and 4 are not relevant in the case of GNU Emacs, since they
-can only apply to copies of DJGPP [confirmed by email from DJ Delorie
-to rms at gnu.org and others, 2007/01/31].
-
-Exception 2 of COPYING.DJ, when viewed as an added restriction, rather
-than as an interpretation of the GPL, leads to problems. The added
-requirement makes the overall license of the file incompatible with
-the GNU GPL.
-
-As a solution to this problem, DJ Delorie has kindly granted (February
-2007) GNU Emacs an exception, and permits us to license the files
-is_exec.c and sigaction.c solely under the terms of the GNU GPL. This
-exception applies _only_ to these files as distributed with GNU Emacs.
-This solution was arrived at in an email discussion between DJ Delorie
-<dj at delorie.com> and Richard Stallman <rms at gnu.org> in
-January/February 2007. We record below a summary of the relevant final
-email in this discussion:
-
-    From: DJ Delorie <dj at delorie.com>
-    To: rms at gnu.org
-    Subject: Re: COPYING.DJ and Emacsn
-
-    I have no problem with whatever you wish to do with those files in
-    emacs (as long as djgpp itself doesn't need to change).
-
-
-Accordingly, in February 2007 we relicensed the files is_exec.c and
-sigaction.c as used in GNU Emacs under the GNU GPL.
-
-Copies of both the GNU General Public License and GNU Lesser (Library)
-Public License may be obtained from <http://www.gnu.org/licenses/>, or:
-the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-Boston, MA 02110-1301, USA.
-
 \f
 This file is part of GNU Emacs.
 
diff --git a/msdos/is_exec.c b/msdos/is_exec.c
deleted file mode 100644 (file)
index 16b01c5..0000000
+++ /dev/null
@@ -1,238 +0,0 @@
-/* IS_EXEC.C
- *
- * Copyright (C) 1995 DJ Delorie
- * Copyright (C) 1994 Eli Zaretskii <eliz@is.elta.co.il>
- *
- * (See the README file in this directory for the copyright and license
- * history of this file.)
- *
- * This file is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This file is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this file.  If not, see <http://www.gnu.org/licenses/>.
- *
- * Commentary:
- *
- * Given a filename or a file handle, and the extension of the file,
- * determine if the file is executable.
- * First, the file extension is checked in case it uniquely identifies
- * the file as either an executable or not.  Failing this, the first
- * two bytes of the file are tested for known signatures of executable
- * files.
- *
- */
-
-#include <libc/stubs.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <errno.h>
-#include <dpmi.h>
-#include <go32.h>
-#include <io.h>
-#include <libc/farptrgs.h>
-#include <libc/dosio.h>
-
-extern unsigned short _djstat_flags;
-unsigned short        _get_magic(const char *, int);
-int                   _is_executable(const char *, int, const char *);
-
-/*
- * Read a MAGIC NUMBER from a given file.  These are the first
- * two bytes of the file, if we look at them as an unsigned short. */
-
-#define _STAT_EXEC_EXT      2   /* get execute bits from file extension? */
-#define _STAT_EXEC_MAGIC    4   /* get execute bits from magic signature? */
-
-unsigned short
-_get_magic(const char *s, int fh)
-{
-  __dpmi_regs          regs;
-  unsigned short       retval;
-  unsigned short       fpos_high = 0, fpos_low = 0;
-  int                  read_fail = 0;
-
-  /* If given a pathname, open the file. */
-  if (s)
-  {
-    int handle;
-    if((handle = _open(s,0)) == -1)
-      return 0;
-    regs.x.bx = handle;
-  }
-  /* Else file already open.  Remember its current file position
-     and move to beginning of file. */
-  else
-  {
-    regs.x.ax = 0x4201;                /* set pointer from current position */
-    regs.x.bx = fh;
-    regs.x.cx = regs.x.dx = 0; /* move 0 bytes (i.e., stay put) */
-    __dpmi_int(0x21, &regs);
-    if (regs.x.flags & 1)
-    {
-      errno = __doserr_to_errno(regs.x.ax);
-      return 0;
-    }
-    fpos_high = regs.x.dx;     /* got current position */
-    fpos_low  = regs.x.ax;
-
-    regs.x.ax = 0x4200;                /* set pointer from the beginning of file */
-    regs.x.cx = regs.x.dx = 0; /* move to beginning of file */
-    __dpmi_int(0x21, &regs);
-    if (regs.x.flags & 1)
-    {
-      errno = __doserr_to_errno(regs.x.ax);
-      return 0;
-    }
-  }
-  regs.x.ds = __tb_segment;
-  regs.x.dx = __tb_offset;
-
-  /* Read 2 bytes from the file. */
-  regs.x.ax = 0x3f00;
-  regs.x.cx = 2;
-  __dpmi_int(0x21, &regs);
-
-  /* We can either (1) succeed, (2) read less than 2 bytes,
-     or (3) fail to read at all.  */
-  if (regs.x.ax != 2)
-    read_fail = (regs.x.flags & 1) ? regs.x.ax : -1;
-
-  /* If called with filename, close the file. */
-  if (s)
-  {
-    regs.x.ax = 0x3e00;
-    __dpmi_int(0x21, &regs);
-    if (regs.x.flags & 1)
-      errno = __doserr_to_errno(regs.x.ax);
-  }
-  /* Else leave file pointer where we found it. */
-  else
-  {
-    regs.x.ax = 0x4200;                /* set pointer from the beginning of file */
-    regs.x.bx = fh;
-    regs.x.cx = fpos_high;
-    regs.x.dx = fpos_low;
-    __dpmi_int(0x21, &regs);
-    if (regs.x.flags & 1)
-    {
-      errno = __doserr_to_errno(regs.x.ax);
-      return 0;
-    }
-  }
-
-  if (read_fail == 0)
-    retval = _farpeekw(_dos_ds, __tb);
-  else
-  {
-    /* The file couldn't be read: assume non-executable.  If the file
-       *is* executable, but was passed as a file-handle, and the user
-       opened it in write-only mode, they lose...  */
-    retval = 0;
-    if (read_fail != -1)
-      errno = __doserr_to_errno(read_fail);
-  }
-
-  return retval;
-}
-
-/* A list of extensions which designate executable files.  These
-   are NOT tested for the magic number.  */
-static char executables[] = "|EXE|COM|BAT|BTM|DLL|VXD|";
-
-/* A list of extensions which belong to files known to NEVER be
-   executables.  These exist to minimize read()'ing files while
-   detecting executables by magic number.  You are welcome to
-   add to this list, but remember: only extensions which could
-   NEVER be present in executables should go here.  */
-static char non_executables[] = "\
-|A|A01|A02|A03|A04|A05|ADL|ARC|ARJ|ASC|ASM|AUX|AWK\
-|BAS|BIB|BGI|BMP\
-|C|CC|CFG|CGZ|CH3|CHR|CI|CLP|CMF|CPI|CPP|CXX\
-|DAT|DBF|DIZ|DOC|DVI\
-|E|EL|ELC\
-|F77|FN3\
-|GIF|GZ\
-|H|HLP|HPP|HXX\
-|ICO|IN|INC|INF|INI\
-|JPG\
-|L|LEX|LF|LIB|LOG|LST|LZH\
-|M|MAK|MAP|MF|MID|MPG\
-|O|OBJ\
-|PAK|PAS|PBM|PCD|PCX|PDS|PIC|PIF|PN3|PRJ|PS\
-|RAS|RGB|RLE\
-|S|SND|SY3\
-|TAR|TAZ|TEX|TGA|TGZ|TIF|TXH|TXI|TXT\
-|VOC\
-|WAV|WK1|WK3|WKB|WQ1|WQ3|WQ4|WQ5|WQ6|WQ!\
-|XBM\
-|Y\
-|ZIP|ZOO|";
-
-int
-_is_executable(const char *filename, int fhandle, const char *extension)
-{
-  if (!extension && filename)
-  {
-    const char *cp, *ep=0;
-    for (cp=filename; *cp; cp++)
-    {
-      if (*cp == '.')
-       ep = cp;
-      if (*cp == '/' || *cp == '\\' || *cp == ':')
-       ep = 0;
-    }
-    extension = ep;
-  }
-  if ((_djstat_flags & _STAT_EXEC_EXT) == 0
-      && extension
-      && *extension
-      && strlen(extension) <= ((extension[0]=='.') ? 4 : 3))
-    {
-      /* Search the list of extensions in executables[]. */
-      char tmp_buf[6], *tp = tmp_buf;
-
-      *tp++ = '|';
-      if (*extension == '.')
-       extension++;
-      while (*extension)
-       *tp++ = toupper (*extension++);
-      *tp++ = '|';
-      *tp = '\0';
-      if (strstr(non_executables, tmp_buf))
-        return 0;
-      else if (strstr(executables, tmp_buf))
-        return 1;
-    }
-
-  /* No extension, or extension doesn't define execute
-     bits unambiguously.  We are in for some dirty work.
-     Read the first two bytes of the file and see if they
-     are any of the known magic numbers which designate
-     executable files.
-     Unix-like shells, which have executable shell scripts
-     without extensions and DON'T have "#!" as their FIRST
-     TWO CHARACTERS, lose here.  Sorry, folks.  */
-  if ( (_djstat_flags & _STAT_EXEC_MAGIC) == 0 )
-    {
-      switch (_get_magic(filename, fhandle))
-        {
-          case 0x5a4d:      /* "MZ" */
-          case 0x010b:
-          case 0x014c:
-          case 0x2123:      /* "#!" */
-              return 1;
-        }
-    }
-
-  return 0;
-}
-
index ea6c2c6aef119f151b96eedbdad42eb19571e9b5..658a384a46bb402822c6e7fe5a448d0135356587 100644 (file)
 #include <sys/version.h>\
 /* In DJGPP v2.x almost everything is already defined in a system header.  */\
 #include <sys/config.h>\
-/* For those who still use DJGPP v2.01  */\
-#if __DJGPP__ == 2 && __DJGPP_MINOR__ == 1\
-#define NSIG 320\
-#endif
 
 /^#undef MSDOS *$/c\
 #ifndef MSDOS\
@@ -70,7 +66,7 @@
 /^#undef PACKAGE_TARNAME/s/^.*$/#define PACKAGE_TARNAME ""/
 /^#undef PACKAGE_VERSION/s/^.*$/#define PACKAGE_VERSION ""/
 /^#undef PENDING_OUTPUT_COUNT/s/^.*$/#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_ptr - (FILE)->_base)/
-/^#undef VERSION/s/^.*$/#define VERSION "24.3.94"/
+/^#undef VERSION/s/^.*$/#define VERSION "25.0.50"/
 /^#undef SYSTEM_TYPE/s/^.*$/#define SYSTEM_TYPE "ms-dos"/
 /^#undef HAVE_DECL_GETENV/s/^.*$/#define HAVE_DECL_GETENV 1/
 /^#undef SYS_SIGLIST_DECLARED/s/^.*$/#define SYS_SIGLIST_DECLARED 1/
diff --git a/msdos/sigaction.c b/msdos/sigaction.c
deleted file mode 100644 (file)
index 44f7954..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/* sigaction.c
- *
- * Copyright (C) 1995 DJ Delorie
- *
- * (See the README file in this directory for the copyright and license
- * history of this file.)
- *
- * This file is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This file is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this file.  If not, see <http://www.gnu.org/licenses/>.
- */
-#include <signal.h>
-#include <errno.h>
-
-int
-sigaction(int _sig, const struct sigaction *_act, struct sigaction *_oact)
-{
-  int retval = 0;
-
-  if (_oact)
-  {
-    void (*installed_sig)(int) = signal (_sig, SIG_IGN);
-
-    /* FIXME */
-    if (installed_sig == SIG_ERR)
-    {
-      retval = -1;
-      errno = EINVAL;
-    }
-    else
-      signal (_sig, installed_sig);
-    _oact->sa_handler = installed_sig;
-    retval = sigemptyset (&_oact->sa_mask);
-    _oact->sa_flags = 0;
-  }
-  if (_act)
-  {
-    if (signal (_sig, _act->sa_handler) == SIG_ERR)
-    {
-      retval = -1;
-      errno = EINVAL;
-    }
-  }
-  return 0;
-}
-
-
-
index ad869f1a19aa1b0cc58ede610b633201543f8c8d..e45326735fad94e93546350ab7e4d3fc8ee506f2 100644 (file)
@@ -1,3 +1,16 @@
+2014-10-12  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * README: Mac OS X 10.6 or later now required.
+
+2014-06-25  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (${ns_appbindir}): New.
+       (${ns_appbindir}/Emacs): Use order-only prereq to create output dir.
+
+2014-06-15  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (bootstrap-clean): New.
+
 2014-03-13  Glenn Morris  <rgm@gnu.org>
 
        * templates/Info.plist.in: Make it strictly valid xml.  (Bug#17002)
index fe570d13ee894d81a1c930456baacd7e6954e1b9..52f321109b77cb5dbbd13f7e635ff34a0ef0b433 100644 (file)
@@ -43,16 +43,19 @@ ${ns_check_file} ${ns_appdir}: ${srcdir}/${ns_appsrc} ${ns_appsrc}
            ( cd ${ns_appdir} ; umask 022; tar xf - )
        touch ${ns_appdir}
 
-${ns_appbindir}/Emacs: ${ns_appdir} ${ns_check_file} ../src/emacs${EXEEXT}
-       ${MKDIR_P} ${ns_appbindir}
-       cp -f ../src/emacs${EXEEXT} ${ns_appbindir}/Emacs
+${ns_appbindir}:
+       ${MKDIR_P} $@
+
+${ns_appbindir}/Emacs: ${ns_appdir} ${ns_check_file} ../src/emacs${EXEEXT} | \
+  ${ns_appbindir}
+       cp -f ../src/emacs${EXEEXT} $@
 
 .PHONY: all
 
 all: ${ns_appdir} ${ns_appbindir}/Emacs
 
 
-.PHONY: clean distclean maintainer-clean
+.PHONY: clean distclean bootstrap-clean maintainer-clean
 
 clean:
        rm -rf ${ns_appdir}
@@ -64,6 +67,6 @@ distclean: clean
          Cocoa/Emacs.base/Contents/Info.plist \
          Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings
 
-maintainer-clean: distclean
+bootstrap-clean maintainer-clean: distclean
 
 ### Makefile.in ends here
index fdfa15ffd9d8eab98a1f8f53dfa8ae410e825c37..07f0d897e134ec3fdc32c251988edcc4bb7e5ac8 100644 (file)
@@ -12,7 +12,7 @@ See the INSTALL file in this directory for compilation instructions.
 
 Requirements
 ------------
-MacOS X 10.4 or later
+Mac OS X 10.6 or later
 
 - or -
 
index 299879ccba87bd77702101d290824d6d171985a3..abd62d35a96f09fecf6419770b5078cf078e2594 100644 (file)
@@ -1,18 +1,78 @@
-2014-04-26  Eli Zaretskii  <eliz@gnu.org>
+2014-09-29  Eli Zaretskii  <eliz@gnu.org>
+
+       * makefile.w32-in (VERSION): Bump version to 25.0.50.
+
+       * emacsclient.rc: Bump version to 25.0.50.
+
+       * emacs.rc: Bump version to 25.0.50.
+
+       * config.nt (VERSION): Bump version to 25.0.50.
+
+2014-09-01  Eli Zaretskii  <eliz@gnu.org>
+
+       * gnulib.mk: Synchronize with lib/gnulib.mk.
+
+2014-06-15  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (LDFLAGS): Explicitly set via configure.
+
+2014-06-15  Eli Zaretskii  <eliz@gnu.org>
+
+       * Makefile.in (CPPFLAGS): Define.
+
+2014-06-15  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (bootstrap-clean): New.
+
+2014-06-05  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * inc/ms-w32.h (POLL_FOR_INPUT): Define with HAVE_WINDOW_SYSTEM.
+
+2014-05-29  Eli Zaretskii  <eliz@gnu.org>
+
+       * Makefile.in (DONT_INSTALL): Now empty.
+       (addsection${EXEEXT}): Remove target.
+       * addsection.c: Remove file.
+
+2014-05-27  Fabrice Popineau  <fabrice.popineau@gmail.com>
+
+       * inc/ms-w32.h: Switch to the system heap allocation scheme
+       instead of GNU malloc and ralloc.
+
+       * inc/sys/mman.h: New file.
+
+       * INSTALL: Update for the new build requirements.
+
+2014-05-17  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Assume C99 or later (Bug#17487).
+       * gnulib.mk: Remove stdarg and stdbool modules.
+
+2014-05-16  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Don't require pkg-config when building from repository.
+       * INSTALL: Remove no-longer-needed notes about pkg-config.
+
+2014-05-05  Eli Zaretskii  <eliz@gnu.org>
+
+       * INSTALL: Update to the effect that pkg-config is now required
+       for building from the repository.
+
+2014-04-30  Eli Zaretskii  <eliz@gnu.org>
 
        * cmdproxy.c (make_absolute): Don't copy more characters from PATH
        than a single directory name can hold.  (Bug#17334)
 
-2014-04-21  Eli Zaretskii  <eliz@gnu.org>
+2014-04-22  Eli Zaretskii  <eliz@gnu.org>
 
        * inc/ms-w32.h (lseek): Define only if not already a macro.
        Suggested by Fabrice Popineau <fabrice.popineau@gmail.com>.
 
-2014-04-09  Ken Brown  <kbrown@cornell.edu>
+2014-04-11  Ken Brown  <kbrown@cornell.edu>
 
        * emacs.rc: Revert last change.
 
-2014-04-03  Ken Brown  <kbrown@cornell.edu>
+2014-04-07  Ken Brown  <kbrown@cornell.edu>
 
        * emacs.rc: Don't use manifest on Cygwin.  (Bug#17176)
 
index f43912f6a1fc0413d99b5748abf7770ff4c02fdc..8b764f7ba2a85da5f42c82793ace8cdc8f5c3a49 100644 (file)
@@ -5,9 +5,9 @@
   See the end of the file for license conditions.
 
 The MSYS/MinGW build described here is supported on versions of
-Windows starting with Windows 2000 and newer.  Windows 9X are not
-supported (but the Emacs binary produced by this build will run on
-Windows 9X as well).
+Windows starting with Windows XP and newer.  Building on Windows 2000
+and Windows 9X is not supported (but the Emacs binary produced by this
+build will run on Windows 9X and newer systems).
 
   Do not use this recipe with Cygwin.  For building on Cygwin, use the
   normal installation instructions, ../INSTALL.
@@ -173,14 +173,14 @@ Windows 9X as well).
 
      Available from http://sourceforge.net/projects/ezwinports/files/.
 
-   . gzip (needed to compress files during "make install")
+   . pkg-config (invoked by the configure script to look for optional
+     packages)
 
-     Available from http://gnuwin32.sourceforge.net/packages/gzip.htm.
+     Available from http://www.gtk.org/download/win32.php
 
-   . pkg-config (needed for building with some optional libraries,
-     such as GnuTLS and libxml2)
+   . gzip (needed to compress files during "make install")
 
-     Available from http://www.gtk.org/download/win32.php
+     Available from http://gnuwin32.sourceforge.net/packages/gzip.htm.
 
   Each package might list other packages as prerequisites on its
   download page (under "Runtime requirements"); download those as
@@ -235,6 +235,12 @@ Windows 9X as well).
   For example, use D:\MSYS or D:\usr\MSYS as the top-level directory
   from which you unpack all of the MSYS packages.
 
+  After installing Automake and Autoconf, make sure any of the *.m4
+  files you might have in your MinGW installation also exist in the
+  MSYS installation tree, in the share/aclocal directory.  Those *.m4
+  files which exist in the MinGW tree, but not in the MSYS tree should
+  be copied there.
+
   If/when you are confident in your MinGW/MSYS installation, and want
   to speed up the builds, we recommend installing a pre-release
   version of Make from here:
@@ -396,9 +402,10 @@ Windows 9X as well).
 
        Where should the build process find the source code?    /path/to/emacs/sources
        What compiler should emacs be built with?               gcc  -std=gnu99 -O0 -g3
-       Should Emacs use the GNU version of malloc?             yes
-       Should Emacs use a relocating allocator for buffers?    yes
-       Should Emacs use mmap(2) for buffer allocation?         no
+       Should Emacs use the GNU version of malloc?             no
+        (The GNU allocators don't work with this system configuration.)
+       Should Emacs use a relocating allocator for buffers?    no
+       Should Emacs use mmap(2) for buffer allocation?         yes
        What window system should Emacs use?                    w32
        What toolkit should Emacs use?                          none
        Where do we find X Windows header files?                NONE
@@ -408,13 +415,16 @@ Windows 9X as well).
        Does Emacs use -ljpeg?                                  yes
        Does Emacs use -ltiff?                                  yes
        Does Emacs use a gif library?                           yes
-       Does Emacs use -lpng?                                   yes
-       Does Emacs use -lrsvg-2?                                no
+       Does Emacs use a png library?                           yes
+       Does Emacs use -lrsvg-2?                                yes
        Does Emacs use imagemagick?                             no
+       Does Emacs support sound?                               no
        Does Emacs use -lgpm?                                   no
        Does Emacs use -ldbus?                                  no
        Does Emacs use -lgconf?                                 no
        Does Emacs use GSettings?                               no
+       Does Emacs use a file notification library?             yes (w32)
+       Does Emacs use access control lists?                    yes
        Does Emacs use -lselinux?                               no
        Does Emacs use -lgnutls?                                yes
        Does Emacs use -lxml2?                                  yes
@@ -422,6 +432,7 @@ Windows 9X as well).
        Does Emacs use -lm17n-flt?                              no
        Does Emacs use -lotf?                                   no
        Does Emacs use -lxft?                                   no
+       Does Emacs directly use zlib?                           yes
        Does Emacs use toolkit scroll bars?                     yes
 
   You are almost there, hang on.
index f498928bfcece508616ba7a7ccccced8dd300ef7..be5bae536f14667820717421e11153da1cbf3a15 100644 (file)
@@ -25,6 +25,9 @@ SHELL = /bin/sh
 
 CC=@CC@
 CFLAGS=@CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+
 version=@version@
 ## Used in $archlibdir.
 configuration=@configuration@
@@ -120,7 +123,7 @@ INSTALLABLES = runemacs${EXEEXT} addpm${EXEEXT}
 UTILITIES = cmdproxy${EXEEXT} ddeclient${EXEEXT}
 
 # Things that Emacs runs during the build process.
-DONT_INSTALL = addsection${EXEEXT}
+DONT_INSTALL =
 
 # All files that are created by the linker, i.e., whose names end in ${EXEEXT}.
 EXE_FILES = ${INSTALLABLES} ${UTILITIES} ${DONT_INSTALL}
@@ -141,7 +144,9 @@ BASE_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \
              -I. -I${srcdir}
 
 ALL_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${LDFLAGS} ${CPPFLAGS} ${CFLAGS}
+## Unused.
 LINK_CFLAGS = ${BASE_CFLAGS} ${LDFLAGS} ${CFLAGS}
+## Unused.
 CPP_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${CPPFLAGS} ${CFLAGS}
 
 all: ${EXE_FILES}
@@ -162,7 +167,7 @@ $(DESTDIR)${archlibdir}: all
         fi
 
 .PHONY: install uninstall mostlyclean clean distclean maintainer-clean
-.PHONY: extraclean check tags
+.PHONY: bootstrap-clean extraclean check tags
 
 install: $(DESTDIR)${archlibdir}
        @echo
@@ -193,7 +198,7 @@ distclean: clean
        -rm -f TAGS
        -rm -f Makefile
 
-maintainer-clean: distclean
+bootstrap-clean maintainer-clean: distclean
        true
 
 extraclean: maintainer-clean
@@ -208,9 +213,6 @@ TAGS: ${EXE_FILES:${EXEEXT}=.c}
        ../lib-src/etags *.[ch]
 
 ## Build the programs
-addsection${EXEEXT}: ${srcdir}/addsection.c
-       $(CC) ${ALL_CFLAGS} ${srcdir}/addsection.c -o addsection${EXEEXT}
-
 addpm${EXEEXT}: ${srcdir}/addpm.c ../src/epaths.h
        $(CC) ${ALL_CFLAGS} ${srcdir}/addpm.c $(LIBS_ADDPM) -o addpm${EXEEXT}
 
diff --git a/nt/addsection.c b/nt/addsection.c
deleted file mode 100644 (file)
index a897573..0000000
+++ /dev/null
@@ -1,544 +0,0 @@
-/* Add an uninitialized data section to an executable.
-   Copyright (C) 1999, 2001-2014 Free Software Foundation, Inc.
-
-This file is part of GNU Emacs.
-
-GNU Emacs is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-GNU Emacs is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
-
-
-   Andrew Innes <andrewi@harlequin.co.uk>       04-Jan-1999
-     based on code from unexw32.c
-*/
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <time.h>
-#if defined(__GNUC__) && !defined(_W64)
-#define _ANONYMOUS_UNION
-#define _ANONYMOUS_STRUCT
-#endif
-#include <windows.h>
-
-/* Include relevant definitions from IMAGEHLP.H, which can be found
-   in \\win32sdk\mstools\samples\image\include\imagehlp.h. */
-
-PIMAGE_NT_HEADERS
-(__stdcall * pfnCheckSumMappedFile) (PVOID BaseAddress,
-                                    DWORD_PTR FileLength,
-                                    PDWORD_PTR HeaderSum,
-                                    PDWORD_PTR CheckSum);
-
-#undef min
-#undef max
-#define min(x, y) (((x) < (y)) ? (x) : (y))
-#define max(x, y) (((x) > (y)) ? (x) : (y))
-
-
-/* File handling.  */
-
-typedef struct file_data {
-  const char    *name;
-  unsigned long  size;
-  HANDLE         file;
-  HANDLE         file_mapping;
-  unsigned char *file_base;
-} file_data;
-
-int
-open_input_file (file_data *p_file, const char *filename)
-{
-  HANDLE file;
-  HANDLE file_mapping;
-  void  *file_base;
-  unsigned long size, upper_size;
-
-  file = CreateFile (filename, GENERIC_READ, FILE_SHARE_READ, NULL,
-                    OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
-  if (file == INVALID_HANDLE_VALUE)
-    return FALSE;
-
-  size = GetFileSize (file, &upper_size);
-  file_mapping = CreateFileMapping (file, NULL, PAGE_READONLY,
-                                   0, size, NULL);
-  if (!file_mapping)
-    return FALSE;
-
-  file_base = MapViewOfFile (file_mapping, FILE_MAP_READ, 0, 0, size);
-  if (file_base == 0)
-    return FALSE;
-
-  p_file->name = filename;
-  p_file->size = size;
-  p_file->file = file;
-  p_file->file_mapping = file_mapping;
-  p_file->file_base = file_base;
-
-  return TRUE;
-}
-
-int
-open_output_file (file_data *p_file, const char *filename, unsigned long size)
-{
-  HANDLE file;
-  HANDLE file_mapping;
-  void  *file_base;
-
-  file = CreateFile (filename, GENERIC_READ | GENERIC_WRITE, 0, NULL,
-                    CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
-  if (file == INVALID_HANDLE_VALUE)
-    return FALSE;
-
-  file_mapping = CreateFileMapping (file, NULL, PAGE_READWRITE,
-                                   0, size, NULL);
-  if (!file_mapping)
-    return FALSE;
-
-  file_base = MapViewOfFile (file_mapping, FILE_MAP_WRITE, 0, 0, size);
-  if (file_base == 0)
-    return FALSE;
-
-  p_file->name = filename;
-  p_file->size = size;
-  p_file->file = file;
-  p_file->file_mapping = file_mapping;
-  p_file->file_base = file_base;
-
-  return TRUE;
-}
-
-/* Close the system structures associated with the given file.  */
-void
-close_file_data (file_data *p_file)
-{
-  UnmapViewOfFile (p_file->file_base);
-  CloseHandle (p_file->file_mapping);
-  /* For the case of output files, set final size.  */
-  SetFilePointer (p_file->file, p_file->size, NULL, FILE_BEGIN);
-  SetEndOfFile (p_file->file);
-  CloseHandle (p_file->file);
-}
-
-
-/* Routines to manipulate NT executable file sections.  */
-
-unsigned long
-get_unrounded_section_size (PIMAGE_SECTION_HEADER p_section)
-{
-  /* The true section size, before rounding, for an initialized data or
-     code section.  (Supposedly some linkers swap the meaning of these
-     two values.)  */
-  return min (p_section->SizeOfRawData,
-             p_section->Misc.VirtualSize);
-}
-
-/* Return pointer to section header for named section. */
-IMAGE_SECTION_HEADER *
-find_section (const char *name, IMAGE_NT_HEADERS *nt_header)
-{
-  PIMAGE_SECTION_HEADER section;
-  int i;
-
-  section = IMAGE_FIRST_SECTION (nt_header);
-
-  for (i = 0; i < nt_header->FileHeader.NumberOfSections; i++)
-    {
-      if (strcmp (section->Name, name) == 0)
-       return section;
-      section++;
-    }
-  return NULL;
-}
-
-/* Return pointer to section header for section containing the given
-   relative virtual address. */
-IMAGE_SECTION_HEADER *
-rva_to_section (DWORD_PTR rva, IMAGE_NT_HEADERS * nt_header)
-{
-  PIMAGE_SECTION_HEADER section;
-  int i;
-
-  section = IMAGE_FIRST_SECTION (nt_header);
-
-  for (i = 0; i < nt_header->FileHeader.NumberOfSections; i++)
-    {
-      /* Some linkers (eg. the NT SDK linker I believe) swapped the
-        meaning of these two values - or rather, they ignored
-        VirtualSize entirely and always set it to zero.  This affects
-        some very old exes (eg. gzip dated Dec 1993).  Since
-        w32_executable_type relies on this function to work reliably,
-        we need to cope with this.  */
-      DWORD_PTR real_size = max (section->SizeOfRawData,
-                            section->Misc.VirtualSize);
-      if (rva >= section->VirtualAddress
-         && rva < section->VirtualAddress + real_size)
-       return section;
-      section++;
-    }
-  return NULL;
-}
-
-/* Return pointer to section header for section containing the given
-   offset in its raw data area. */
-IMAGE_SECTION_HEADER *
-offset_to_section (DWORD_PTR offset, IMAGE_NT_HEADERS * nt_header)
-{
-  PIMAGE_SECTION_HEADER section;
-  int i;
-
-  section = IMAGE_FIRST_SECTION (nt_header);
-
-  for (i = 0; i < nt_header->FileHeader.NumberOfSections; i++)
-    {
-      if (offset >= section->PointerToRawData
-         && offset < section->PointerToRawData + section->SizeOfRawData)
-       return section;
-      section++;
-    }
-  return NULL;
-}
-
-/* Return offset to an object in dst, given offset in src.  We assume
-   there is at least one section in both src and dst images, and that
-   the some sections may have been added to dst (after sections in src).  */
-static DWORD_PTR
-relocate_offset (DWORD_PTR offset,
-                IMAGE_NT_HEADERS * src_nt_header,
-                IMAGE_NT_HEADERS * dst_nt_header)
-{
-  PIMAGE_SECTION_HEADER src_section = IMAGE_FIRST_SECTION (src_nt_header);
-  PIMAGE_SECTION_HEADER dst_section = IMAGE_FIRST_SECTION (dst_nt_header);
-  int i = 0;
-
-  while (offset >= src_section->PointerToRawData)
-    {
-      if (offset < src_section->PointerToRawData + src_section->SizeOfRawData)
-       break;
-      i++;
-      if (i == src_nt_header->FileHeader.NumberOfSections)
-       {
-         /* Handle offsets after the last section.  */
-         dst_section = IMAGE_FIRST_SECTION (dst_nt_header);
-         dst_section += dst_nt_header->FileHeader.NumberOfSections - 1;
-         while (dst_section->PointerToRawData == 0)
-           dst_section--;
-         while (src_section->PointerToRawData == 0)
-           src_section--;
-         return offset
-           + (dst_section->PointerToRawData + dst_section->SizeOfRawData)
-           - (src_section->PointerToRawData + src_section->SizeOfRawData);
-       }
-      src_section++;
-      dst_section++;
-    }
-  return offset +
-    (dst_section->PointerToRawData - src_section->PointerToRawData);
-}
-
-#define OFFSET_TO_RVA(offset, section) \
-         (section->VirtualAddress + ((DWORD_PTR)(offset) - section->PointerToRawData))
-
-#define RVA_TO_OFFSET(rva, section) \
-         (section->PointerToRawData + ((DWORD_PTR)(rva) - section->VirtualAddress))
-
-#define RVA_TO_SECTION_OFFSET(rva, section) \
-         ((DWORD_PTR)(rva) - section->VirtualAddress)
-
-/* Convert address in executing image to RVA.  */
-#define PTR_TO_RVA(ptr) ((DWORD_PTR)(ptr) - (DWORD_PTR) GetModuleHandle (NULL))
-
-#define PTR_TO_OFFSET(ptr, pfile_data) \
-          ((unsigned const char *)(ptr) - (pfile_data)->file_base)
-
-#define OFFSET_TO_PTR(offset, pfile_data) \
-          ((pfile_data)->file_base + (DWORD_PTR)(offset))
-
-#define ROUND_UP(p, align) \
-         (((DWORD_PTR)(p) + (align)-1) & ~((DWORD_PTR)(align)-1))
-#define ROUND_DOWN(p, align) ((DWORD_PTR)(p) & ~((DWORD_PTR)(align)-1))
-
-
-static void
-copy_executable_and_add_section (file_data *p_infile,
-                                file_data *p_outfile,
-                                const char *new_section_name,
-                                DWORD_PTR new_section_size)
-{
-  unsigned char *dst;
-  PIMAGE_DOS_HEADER dos_header;
-  PIMAGE_NT_HEADERS nt_header;
-  PIMAGE_NT_HEADERS dst_nt_header;
-  PIMAGE_SECTION_HEADER section;
-  PIMAGE_SECTION_HEADER dst_section;
-  DWORD_PTR offset;
-  int i;
-  int be_verbose = GetEnvironmentVariable ("DEBUG_DUMP", NULL, 0) > 0;
-
-#define COPY_CHUNK(message, src, size, verbose)                                        \
-  do {                                                                         \
-    unsigned const char *s = (void *)(src);                                            \
-    unsigned long count = (size);                                              \
-    if (verbose)                                                               \
-      {                                                                                \
-       printf ("%s\n", (message));                                             \
-       printf ("\t0x%08x Offset in input file.\n", s - p_infile->file_base);   \
-       printf ("\t0x%08x Offset in output file.\n", dst - p_outfile->file_base); \
-       printf ("\t0x%08x Size in bytes.\n", count);                            \
-      }                                                                                \
-    memcpy (dst, s, count);                                                    \
-    dst += count;                                                              \
-  } while (0)
-
-#define DST_TO_OFFSET()  PTR_TO_OFFSET (dst, p_outfile)
-#define ROUND_UP_DST_AND_ZERO(align)                                           \
-  do {                                                                         \
-    unsigned char *newdst = p_outfile->file_base                               \
-      + ROUND_UP (DST_TO_OFFSET (), (align));                                  \
-    /* Zero the alignment slop; it may actually initialize real data.  */      \
-    memset (dst, 0, newdst - dst);                                             \
-    dst = newdst;                                                              \
-  } while (0)
-
-  /* Copy the source image sequentially, ie. section by section after
-     copying the headers and section table, to simplify the process of
-     adding an extra section table entry (which might force the raw
-     section data to be relocated).
-
-     Note that dst is updated implicitly by each COPY_CHUNK.  */
-
-  dos_header = (PIMAGE_DOS_HEADER) p_infile->file_base;
-  nt_header = (PIMAGE_NT_HEADERS) (((unsigned char *) dos_header) +
-                                  dos_header->e_lfanew);
-  section = IMAGE_FIRST_SECTION (nt_header);
-
-  dst = (unsigned char *) p_outfile->file_base;
-
-  COPY_CHUNK ("Copying DOS header...", dos_header,
-             (DWORD_PTR) nt_header - (DWORD_PTR) dos_header, be_verbose);
-  dst_nt_header = (PIMAGE_NT_HEADERS) dst;
-  COPY_CHUNK ("Copying NT header...", nt_header,
-             (DWORD_PTR) section - (DWORD_PTR) nt_header, be_verbose);
-  dst_section = (PIMAGE_SECTION_HEADER) dst;
-  COPY_CHUNK ("Copying section table...", section,
-             nt_header->FileHeader.NumberOfSections * sizeof (*section),
-             be_verbose);
-
-  /* To improve the efficiency of demand loading, make the file
-     alignment match the section alignment (VC++ 6.0 does this by
-     default anyway).  */
-  dst_nt_header->OptionalHeader.FileAlignment =
-    dst_nt_header->OptionalHeader.SectionAlignment;
-
-  /* Add an uninitialized data section at the end, of the specified name
-     and virtual size.  */
-  if (find_section (new_section_name, nt_header) == NULL)
-    /* Leave room for extra section table entry; filled in below.  */
-    dst += sizeof (*section);
-  else
-    new_section_name = NULL;
-
-  /* Align the first section's raw data area, and set the header size
-     field accordingly.  */
-  ROUND_UP_DST_AND_ZERO (dst_nt_header->OptionalHeader.FileAlignment);
-  dst_nt_header->OptionalHeader.SizeOfHeaders = DST_TO_OFFSET ();
-
-  for (i = 0; i < nt_header->FileHeader.NumberOfSections; i++)
-    {
-      char msg[100];
-      /* Windows section names are fixed 8-char strings, only
-        zero-terminated if the name is shorter than 8 characters.  */
-      sprintf (msg, "Copying raw data for %.8s...", section->Name);
-
-      /* Update the file-relative offset for this section's raw data (if
-         it has any) in case things have been relocated; we will update
-         the other offsets below once we know where everything is.  */
-      if (dst_section->PointerToRawData)
-       dst_section->PointerToRawData = DST_TO_OFFSET ();
-
-      /* Can always copy the original raw data.  */
-      COPY_CHUNK
-       (msg, OFFSET_TO_PTR (section->PointerToRawData, p_infile),
-        section->SizeOfRawData, be_verbose);
-
-      /* Round up the raw data size to the new alignment.  */
-      dst_section->SizeOfRawData =
-       ROUND_UP (dst_section->SizeOfRawData,
-                 dst_nt_header->OptionalHeader.FileAlignment);
-
-      /* Align the next section's raw data area.  */
-      ROUND_UP_DST_AND_ZERO (dst_nt_header->OptionalHeader.FileAlignment);
-
-      section++;
-      dst_section++;
-    }
-
-  /* Add the extra section entry (which adds no raw data).  */
-  if (new_section_name != NULL)
-    {
-      dst_nt_header->FileHeader.NumberOfSections++;
-      dst_nt_header->OptionalHeader.SizeOfImage += new_section_size;
-      strncpy (dst_section->Name, new_section_name, sizeof (dst_section->Name));
-      dst_section->VirtualAddress =
-       section[-1].VirtualAddress
-       + ROUND_UP (section[-1].Misc.VirtualSize,
-                   dst_nt_header->OptionalHeader.SectionAlignment);
-      dst_section->Misc.VirtualSize = new_section_size;
-      dst_section->PointerToRawData = 0;
-      dst_section->SizeOfRawData = 0;
-      dst_section->Characteristics =
-       IMAGE_SCN_CNT_UNINITIALIZED_DATA
-       | IMAGE_SCN_MEM_READ
-       | IMAGE_SCN_MEM_WRITE;
-    }
-
-  /* Copy remainder of source image.  */
-  section--;
-  offset = ROUND_UP (section->PointerToRawData + section->SizeOfRawData,
-                    nt_header->OptionalHeader.FileAlignment);
-  COPY_CHUNK
-    ("Copying remainder of executable...",
-     OFFSET_TO_PTR (offset, p_infile),
-     p_infile->size - offset, be_verbose);
-
-  /* Final size for new image.  */
-  p_outfile->size = DST_TO_OFFSET ();
-
-  /* Now patch up remaining file-relative offsets.  */
-  section = IMAGE_FIRST_SECTION (nt_header);
-  dst_section = IMAGE_FIRST_SECTION (dst_nt_header);
-
-#define ADJUST_OFFSET(var)                                             \
-  do {                                                                 \
-    if ((var) != 0)                                                    \
-      (var) = relocate_offset ((var), nt_header, dst_nt_header);       \
-  } while (0)
-
-  dst_nt_header->OptionalHeader.SizeOfInitializedData = 0;
-  dst_nt_header->OptionalHeader.SizeOfUninitializedData = 0;
-  for (i = 0; i < dst_nt_header->FileHeader.NumberOfSections; i++)
-    {
-      /* Recompute data sizes for completeness.  */
-      if (dst_section[i].Characteristics & IMAGE_SCN_CNT_INITIALIZED_DATA)
-       dst_nt_header->OptionalHeader.SizeOfInitializedData +=
-         ROUND_UP (dst_section[i].Misc.VirtualSize, dst_nt_header->OptionalHeader.FileAlignment);
-      else if (dst_section[i].Characteristics & IMAGE_SCN_CNT_UNINITIALIZED_DATA)
-       dst_nt_header->OptionalHeader.SizeOfUninitializedData +=
-         ROUND_UP (dst_section[i].Misc.VirtualSize, dst_nt_header->OptionalHeader.FileAlignment);
-
-      ADJUST_OFFSET (dst_section[i].PointerToLinenumbers);
-    }
-
-  ADJUST_OFFSET (dst_nt_header->FileHeader.PointerToSymbolTable);
-
-  /* Update offsets in debug directory entries. */
-  {
-    IMAGE_DATA_DIRECTORY debug_dir =
-      dst_nt_header->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_DEBUG];
-    PIMAGE_DEBUG_DIRECTORY debug_entry;
-
-    section = rva_to_section (debug_dir.VirtualAddress, dst_nt_header);
-    if (section)
-      {
-       debug_entry = (PIMAGE_DEBUG_DIRECTORY)
-         (RVA_TO_OFFSET (debug_dir.VirtualAddress, section) + p_outfile->file_base);
-       debug_dir.Size /= sizeof (IMAGE_DEBUG_DIRECTORY);
-
-       for (i = 0; i < debug_dir.Size; i++, debug_entry++)
-         ADJUST_OFFSET (debug_entry->PointerToRawData);
-      }
-  }
-}
-
-
-int
-main (int argc, char **argv)
-{
-  file_data in_file, out_file;
-  char out_filename[MAX_PATH], in_filename[MAX_PATH];
-  unsigned long size;
-  PIMAGE_DOS_HEADER dos_header;
-  PIMAGE_NT_HEADERS nt_header;
-
-#define OLD_NAME        argv[1]
-#define NEW_NAME        argv[2]
-#define SECTION_NAME    argv[3]
-#define SECTION_SIZE    argv[4]
-
-  strcpy (in_filename, OLD_NAME);
-  strcpy (out_filename, NEW_NAME);
-
-  printf ("Dumping from %s\n", in_filename);
-  printf ("          to %s\n", out_filename);
-
-  /* Open the undumped executable file.  */
-  if (!open_input_file (&in_file, in_filename))
-    {
-      printf ("Failed to open %s (%d)...bailing.\n",
-             in_filename, GetLastError ());
-      exit (1);
-    }
-  dos_header = (PIMAGE_DOS_HEADER) in_file.file_base;
-  nt_header = (PIMAGE_NT_HEADERS) ((char *) dos_header + dos_header->e_lfanew);
-  /* Allow for expansion due to increasing file align to section align.
-     We can overestimate here, since close_file_data will update the
-     size exactly.  */
-  size = in_file.size
-    + nt_header->OptionalHeader.SectionAlignment
-    * nt_header->FileHeader.NumberOfSections;
-  if (!open_output_file (&out_file, out_filename, size))
-    {
-      printf ("Failed to open %s (%d)...bailing.\n",
-             out_filename, GetLastError ());
-      exit (1);
-    }
-
-  copy_executable_and_add_section (&in_file, &out_file,
-                                  SECTION_NAME,
-                                  atoi (SECTION_SIZE) * 1024 * 1024);
-
-  /* Patch up header fields; profiler is picky about this. */
-  {
-    HANDLE hImagehelp = LoadLibrary ("imagehlp.dll");
-    DWORD_PTR  headersum;
-    DWORD_PTR  checksum;
-
-    dos_header = (PIMAGE_DOS_HEADER) out_file.file_base;
-    nt_header = (PIMAGE_NT_HEADERS) ((char *) dos_header + dos_header->e_lfanew);
-
-    nt_header->OptionalHeader.CheckSum = 0;
-//    nt_header->FileHeader.TimeDateStamp = time (NULL);
-//    dos_header->e_cp = size / 512;
-//    nt_header->OptionalHeader.SizeOfImage = size;
-
-    pfnCheckSumMappedFile = (void *) GetProcAddress (hImagehelp, "CheckSumMappedFile");
-    if (pfnCheckSumMappedFile)
-      {
-//     nt_header->FileHeader.TimeDateStamp = time (NULL);
-       pfnCheckSumMappedFile (out_file.file_base,
-                              out_file.size,
-                              &headersum,
-                              &checksum);
-       nt_header->OptionalHeader.CheckSum = checksum;
-      }
-    FreeLibrary (hImagehelp);
-  }
-
-  close_file_data (&in_file);
-  close_file_data (&out_file);
-
-  return 0;
-}
-
-/* eof */
-
index 477363de934107730beb373bd49b94419e2b3bbd..8040ecc373ed2989beea54f0fed427f57f9a5f24 100644 (file)
@@ -1576,7 +1576,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #undef USG_SUBTTY_WORKS
 
 /* Version number of package */
-#define VERSION "24.3.94"
+#define VERSION "25.0.50"
 
 /* Define to 1 if unsetenv returns void instead of int. */
 #undef VOID_UNSETENV
index 5d9c5f74643fb9d2c90fc7198b2df5bf39dbd6bc..15455d982a727ef84d7be22f9b7c1f61225015f5 100644 (file)
@@ -11,8 +11,8 @@ Emacs ICON   icons/emacs.ico
 #endif
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 24,3,94,0
- PRODUCTVERSION 24,3,94,0
+ FILEVERSION 25,0,50,0
+ PRODUCTVERSION 25,0,50,0
  FILEFLAGSMASK 0x3FL
 #ifdef EMACSDEBUG
  FILEFLAGS 0x1L
@@ -29,12 +29,12 @@ BEGIN
        BEGIN
            VALUE "CompanyName", "Free Software Foundation\0"
            VALUE "FileDescription", "GNU Emacs: The extensible self-documenting text editor\0"
-           VALUE "FileVersion", "24, 3, 94, 0\0"
+           VALUE "FileVersion", "25, 0, 50, 0\0"
            VALUE "InternalName", "Emacs\0"
            VALUE "LegalCopyright", "Copyright (C) 2001-2014\0"
            VALUE "OriginalFilename", "emacs.exe"
            VALUE "ProductName", "Emacs\0"
-           VALUE "ProductVersion", "24, 3, 94, 0\0"
+           VALUE "ProductVersion", "25, 0, 50, 0\0"
            VALUE "OLESelfRegister", "\0"
         END
      END
index c70dd0cb4e1c8028fe0d454b20904b19e13e7761..9318492a342b48288a229aa84f34f3f4a50ef3f6 100644 (file)
@@ -5,8 +5,8 @@ Emacs ICON   icons\emacs.ico
 #endif
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 24,3,94,0
- PRODUCTVERSION 24,3,94,0
+ FILEVERSION 25,0,50,0
+ PRODUCTVERSION 25,0,50,0
  FILEFLAGSMASK 0x3FL
 #ifdef EMACSDEBUG
  FILEFLAGS 0x1L
@@ -23,12 +23,12 @@ BEGIN
        BEGIN
            VALUE "CompanyName", "Free Software Foundation\0"
            VALUE "FileDescription", "GNU EmacsClient: Client for the extensible self-documenting text editor\0"
-           VALUE "FileVersion", "24, 3, 94, 0\0"
+           VALUE "FileVersion", "25, 0, 50, 0\0"
            VALUE "InternalName", "EmacsClient\0"
            VALUE "LegalCopyright", "Copyright (C) 2001-2014\0"
            VALUE "OriginalFilename", "emacsclientw.exe"
            VALUE "ProductName", "EmacsClient\0"
-           VALUE "ProductVersion", "24, 3, 94, 0\0"
+           VALUE "ProductVersion", "25, 0, 50, 0\0"
            VALUE "OLESelfRegister", "\0"
         END
      END
index 7877c154b96f205e08688b66dea04742fc39e464..4a06da5fea077124b8308d0f735e3661a91b835c 100644 (file)
@@ -43,7 +43,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt byteswap c-ctype c-strcase careadlinkat close-stream count-one-bits count-trailing-zeros crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv utimens warnings
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=stdarg --avoid=stdbool --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt binary-io byteswap c-ctype c-strcase careadlinkat close-stream count-one-bits count-trailing-zeros crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen stat-time stdalign stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv update-copyright utimens vla warnings
 
 
 MOSTLYCLEANFILES += core *.stackdump
@@ -55,6 +55,15 @@ libgnu_a_LIBADD = $(gl_LIBOBJS)
 libgnu_a_DEPENDENCIES = $(gl_LIBOBJS)
 EXTRA_libgnu_a_SOURCES =
 
+## begin gnulib module absolute-header
+
+# Use this preprocessor expression to decide whether #include_next works.
+# Do not rely on a 'configure'-time test for this, since the expression
+# might appear in an installed header, which is used by some other compiler.
+HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER)
+
+## end   gnulib module absolute-header
+
 ## begin gnulib module alloca-opt
 
 BUILT_SOURCES += $(ALLOCA_H)
@@ -78,6 +87,12 @@ EXTRA_DIST += alloca.in.h
 
 ## end   gnulib module alloca-opt
 
+## begin gnulib module binary-io
+
+libgnu_a_SOURCES += binary-io.h binary-io.c
+
+## end   gnulib module binary-io
+
 ## begin gnulib module byteswap
 
 BUILT_SOURCES += $(BYTESWAP_H)
@@ -141,7 +156,7 @@ EXTRA_DIST += count-trailing-zeros.h
 
 libgnu_a_SOURCES += md5.c
 
-EXTRA_DIST += md5.h
+EXTRA_DIST += gl_openssl.h md5.h
 
 ## end   gnulib module crypto/md5
 
@@ -149,7 +164,7 @@ EXTRA_DIST += md5.h
 
 libgnu_a_SOURCES += sha1.c
 
-EXTRA_DIST += sha1.h
+EXTRA_DIST += gl_openssl.h sha1.h
 
 ## end   gnulib module crypto/sha1
 
@@ -157,7 +172,7 @@ EXTRA_DIST += sha1.h
 
 libgnu_a_SOURCES += sha256.c
 
-EXTRA_DIST += sha256.h
+EXTRA_DIST += gl_openssl.h sha256.h
 
 ## end   gnulib module crypto/sha256
 
@@ -165,7 +180,7 @@ EXTRA_DIST += sha256.h
 
 libgnu_a_SOURCES += sha512.c
 
-EXTRA_DIST += sha512.h
+EXTRA_DIST += gl_openssl.h sha512.h
 
 ## end   gnulib module crypto/sha512
 
@@ -335,6 +350,17 @@ EXTRA_libgnu_a_SOURCES += fsync.c
 
 ## end   gnulib module fsync
 
+## begin gnulib module getdtablesize
+
+if gl_GNULIB_ENABLED_getdtablesize
+
+endif
+EXTRA_DIST += getdtablesize.c
+
+EXTRA_libgnu_a_SOURCES += getdtablesize.c
+
+## end   gnulib module getdtablesize
+
 ## begin gnulib module getgroups
 
 if gl_GNULIB_ENABLED_getgroups
@@ -416,13 +442,6 @@ EXTRA_libgnu_a_SOURCES += group-member.c
 
 ## end   gnulib module group-member
 
-## begin gnulib module ignore-value
-
-
-EXTRA_DIST += ignore-value.h
-
-## end   gnulib module ignore-value
-
 ## begin gnulib module intprops
 
 
@@ -671,57 +690,6 @@ EXTRA_DIST += stdalign.in.h
 
 ## end   gnulib module stdalign
 
-## begin gnulib module stdarg
-
-BUILT_SOURCES += $(STDARG_H)
-
-# We need the following in order to create <stdarg.h> when the system
-# doesn't have one that works with the given compiler.
-if GL_GENERATE_STDARG_H
-stdarg.h: stdarg.in.h $(top_builddir)/config.status
-       $(AM_V_GEN)rm -f $@-t $@ && \
-       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
-         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
-             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-             -e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \
-             < $(srcdir)/stdarg.in.h; \
-       } > $@-t && \
-       mv $@-t $@
-else
-stdarg.h: $(top_builddir)/config.status
-       rm -f $@
-endif
-MOSTLYCLEANFILES += stdarg.h stdarg.h-t
-
-EXTRA_DIST += stdarg.in.h
-
-## end   gnulib module stdarg
-
-## begin gnulib module stdbool
-
-BUILT_SOURCES += $(STDBOOL_H)
-
-# We need the following in order to create <stdbool.h> when the system
-# doesn't have one that works.
-if GL_GENERATE_STDBOOL_H
-stdbool.h: stdbool.in.h $(top_builddir)/config.status
-       $(AM_V_GEN)rm -f $@-t $@ && \
-       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \
-       } > $@-t && \
-       mv $@-t $@
-else
-stdbool.h: $(top_builddir)/config.status
-       rm -f $@
-endif
-MOSTLYCLEANFILES += stdbool.h stdbool.h-t
-
-EXTRA_DIST += stdbool.in.h
-
-## end   gnulib module stdbool
-
 ## begin gnulib module stddef
 
 BUILT_SOURCES += $(STDDEF_H)
@@ -905,6 +873,13 @@ EXTRA_libgnu_a_SOURCES += unsetenv.c
 
 ## end   gnulib module unsetenv
 
+## begin gnulib module update-copyright
+
+
+EXTRA_DIST += $(top_srcdir)/build-aux/update-copyright
+
+## end   gnulib module update-copyright
+
 ## begin gnulib module utimens
 
 libgnu_a_SOURCES += utimens.c
@@ -919,6 +894,13 @@ EXTRA_DIST += verify.h
 
 ## end   gnulib module verify
 
+## begin gnulib module vla
+
+
+EXTRA_DIST += vla.h
+
+## end   gnulib module vla
+
 ## begin gnulib module xalloc-oversized
 
 if gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec
index 8f7c36ab1eef70daeae05cfae00bf8cc59bb152d..edb143c68d4c74aad97e5cb80cc42559c661f5b1 100644 (file)
@@ -140,6 +140,7 @@ extern char *getenv ();
    in its system headers, and is not really compatible with values
    lower than 0x0500, so leave it alone.  */
 #ifndef _W64
+# undef _WIN32_WINNT
 # define _WIN32_WINNT 0x0400
 #endif
 
@@ -158,6 +159,7 @@ extern char *getenv ();
 #ifdef HAVE_NTGUI
 # ifndef HAVE_WINDOW_SYSTEM
 #  define HAVE_WINDOW_SYSTEM 1
+#  define POLL_FOR_INPUT 1
 # endif
 #endif
 
@@ -427,20 +429,36 @@ extern char *get_emacs_configuration_options (void);
 #define _WINSOCK_H
 
 /* Defines size_t and alloca ().  */
-#ifdef emacs
-#define malloc e_malloc
-#define free   e_free
-#define realloc e_realloc
-#define calloc e_calloc
-#endif
+#include <stdlib.h>
+#include <sys/stat.h>
 #ifdef _MSC_VER
 #define alloca _alloca
 #else
 #include <malloc.h>
 #endif
 
-#include <stdlib.h>
-#include <sys/stat.h>
+#ifdef emacs
+
+typedef void * (* malloc_fn)(size_t);
+typedef void * (* realloc_fn)(void *, size_t);
+typedef void (* free_fn)(void *);
+
+extern void *malloc_before_dump(size_t);
+extern void *realloc_before_dump(void *, size_t);
+extern void free_before_dump(void *);
+extern void *malloc_after_dump(size_t);
+extern void *realloc_after_dump(void *, size_t);
+extern void free_after_dump(void *);
+
+extern malloc_fn the_malloc_fn;
+extern realloc_fn the_realloc_fn;
+extern free_fn the_free_fn;
+
+#define malloc(size) (*the_malloc_fn)(size)
+#define free(ptr)   (*the_free_fn)(ptr)
+#define realloc(ptr, size) (*the_realloc_fn)(ptr, size)
+
+#endif
 
 /* Define for those source files that do not include enough NT system files.  */
 #ifndef NULL
diff --git a/nt/inc/sys/mman.h b/nt/inc/sys/mman.h
new file mode 100644 (file)
index 0000000..6990edc
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * sys/mman.h
+ * mman-win32
+ */
+
+#ifndef _SYS_MMAN_H_
+#define _SYS_MMAN_H_
+
+#include <sys/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* We need MAP_ANON in src/buffer.c */
+
+#define MAP_FILE        0
+#define MAP_SHARED      1
+#define MAP_PRIVATE     2
+#define MAP_TYPE        0xf
+#define MAP_FIXED       0x10
+#define MAP_ANONYMOUS   0x20
+#define MAP_ANON        MAP_ANONYMOUS
+
+#define MAP_FAILED      ((void *)-1)
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif /*  _SYS_MMAN_H_ */
index 7213e77293194dab3d1349498f4a1f6a384e3742..0770ad986f659d7a0aef0589096ba60de649b77a 100644 (file)
@@ -22,7 +22,7 @@
 # FIXME: This file uses DOS EOLs.  Convert to Unix after 22.1 is out
 #        (and remove or replace this comment).
 
-VERSION                = 24.3.94
+VERSION                = 25.0.50
 
 TMP_DIST_DIR   = emacs-$(VERSION)
 
index 906fe229a00a96e741eb0d7fdef5567858d8583c..6c0db12e78c17ba77beb16410a541f83ef526dc3 100644 (file)
@@ -1,3 +1,42 @@
+2014-09-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Less chatter in 'make' output.
+       * Makefile.in (clean mostlyclean): Simplify, for shorter command line.
+
+2014-09-01  Paul Eggert  <eggert@cs.ucla.edu>
+
+       --enable-silent-rules now suppresses more chatter.
+       * Makefile.in (AM_DEFAULT_VERBOSITY, AM_V_CC, am__v_CC_)
+       (am__v_CC_0, am__v_CC_1): New macros, taken from Automake.
+       (.c.o): Use them.
+
+2014-07-12  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * XMenuInt.h (XDeleteAssoc): Remove duplicated prototype to
+       pacify -Wredundant-decls.
+
+2014-06-28  Glenn Morris  <rgm@gnu.org>
+
+       * deps.mk (${OBJS}): Depend on ../src/config.h.
+
+       * Makefile.in: Use gcc auto-dependency information.
+       Move old dependency information to new file deps.mk.
+       (MKDIR_P, DEPFLAGS, MKDEPDIR, oldxmenu_deps_frag):
+       New, set by configure.
+       (DEPDIR): New variable.
+       (ALL_CFLAGS): Add DEPFLAGS.
+       (.c.o): Add MKDEPDIR.
+       (clean, mostlyclean): Delete DEPDIR.
+       * deps.mk, autodeps.mk: New files.
+
+2014-06-15  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (CPPFLAGS): Explicitly set via configure.
+
+       * Makefile.in (mostlyclean, clean, distclean, maintainer-clean, tags):
+       Declare as PHONY.
+       (boostrap-clean): New.
+
 2013-10-24  Glenn Morris  <rgm@gnu.org>
 
        * Makefile.in (abs_top_srcdir): New, set by configure.
index c1fdd8244ed5acab0d1208f83e010e158ae2f32c..3e1d49d2ea383607bf5c5ea69e3da644d2cbb912 100644 (file)
@@ -56,11 +56,14 @@ WERROR_CFLAGS = @WERROR_CFLAGS@
 EXTRA=insque.o
 CC=@CC@
 CFLAGS=@CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+
 TAGS = etags
 RM = rm -f
 RANLIB = @RANLIB@
 AR = @AR@
 ARFLAGS = @ARFLAGS@
+MKDIR_P = @MKDIR_P@
 
 OBJS =  Activate.o \
        AddPane.o \
@@ -90,58 +93,49 @@ OBJS =  Activate.o \
 all: libXMenu11.a
 .PHONY: all
 
+# 'make' verbosity.
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 =
+
+DEPDIR = deps
+## -MMD -MF $(DEPDIR)/$*.d if AUTO_DEPEND; else empty.
+DEPFLAGS = @DEPFLAGS@
+## ${MKDIR_P} ${DEPDIR} (if AUTO_DEPEND); else ':'.
+MKDEPDIR = @MKDEPDIR@
+
 ALL_CFLAGS=$(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \
-  $(C_SWITCH_X_SITE) \
+  $(C_SWITCH_X_SITE) $(DEPFLAGS) \
   $(WARN_CFLAGS) $(WERROR_CFLAGS) ${PROFILING_CFLAGS} \
   $(CPPFLAGS) $(CFLAGS) -DEMACS_BITMAP_FILES \
   -I../src -I../lib -I${srcdir} -I${srcdir}/../src -I${srcdir}/../lib
 
 .c.o:
-       $(CC) -c ${ALL_CFLAGS} $<
+       @$(MKDEPDIR)
+       $(AM_V_CC)$(CC) -c ${ALL_CFLAGS} $<
 
 libXMenu11.a: $(OBJS) $(EXTRA)
        $(RM) $@
        $(AR) $(ARFLAGS) $@ $(OBJS) $(EXTRA)
        $(RANLIB) $@
 
-Activate.o: Activate.c XMenuInt.h XMenu.h X10.h
-AddPane.o: AddPane.c XMenuInt.h XMenu.h X10.h
-AddSel.o: AddSel.c XMenuInt.h XMenu.h X10.h
-ChgPane.o: ChgPane.c XMenuInt.h XMenu.h X10.h
-ChgSel.o: ChgSel.c XMenuInt.h XMenu.h X10.h
-Create.o: Create.c XMenuInt.h XMenu.h X10.h
-DelPane.o: DelPane.c XMenuInt.h XMenu.h X10.h
-DelSel.o: DelSel.c XMenuInt.h XMenu.h X10.h
-Destroy.o: Destroy.c XMenuInt.h XMenu.h X10.h
-Error.o: Error.c XMenuInt.h XMenu.h X10.h
-EvHand.o: EvHand.c XMenuInt.h XMenu.h X10.h
-FindPane.o: FindPane.c XMenuInt.h XMenu.h X10.h
-FindSel.o: FindSel.c XMenuInt.h XMenu.h X10.h
-InsPane.o: InsPane.c XMenuInt.h XMenu.h X10.h
-InsSel.o: InsSel.c XMenuInt.h XMenu.h X10.h
-Internal.o: Internal.c XMenuInt.h XMenu.h X10.h
-Locate.o: Locate.c XMenuInt.h XMenu.h X10.h
-Post.o: Post.c XMenuInt.h XMenu.h X10.h
-Recomp.o: Recomp.c XMenuInt.h XMenu.h X10.h
-SetAEQ.o: SetAEQ.c XMenuInt.h XMenu.h X10.h
-SetFrz.o: SetFrz.c XMenuInt.h XMenu.h X10.h
-SetPane.o: SetPane.c XMenuInt.h XMenu.h X10.h
-SetSel.o: SetSel.c XMenuInt.h XMenu.h X10.h
-XDelAssoc.o: XDelAssoc.c X10.h
-XLookAssoc.o: XLookAssoc.c X10.h
-XCrAssoc.o: XCrAssoc.c X10.h
-XDestAssoc.o: XDestAssoc.c X10.h
-XMakeAssoc.o: XMakeAssoc.c X10.h
-insque.o: insque.c
-
-FRC.mostlyclean:
-mostlyclean: FRC.mostlyclean
-       rm -f libXMenu11.a ${OBJS} ${EXTRA}
-clean: mostlyclean
-distclean: clean
+## Insert either autodeps.mk (if AUTO_DEPEND), else deps.mk.
+@oldxmenu_deps_frag@
+
+.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean
+
+clean mostlyclean:
+       rm -f libXMenu11.a *.o
+       -rm -rf ${DEPDIR}
+
+bootstrap-clean maintainer-clean distclean: clean
        rm -f Makefile
-maintainer-clean: distclean
 
+.PHONY: tags
 tags:
        $(TAGS) -t *.[ch]
-.PHONY: tags
+
+### Makefile.in ends here
index 1edef30bc5f8dc4eeeca510d627a997c2bba635c..369b8c1a4a956f2262299417036ce04dcb1be8e2 100644 (file)
@@ -62,7 +62,6 @@ void _XMRefreshPane(Display *display, XMenu *menu, XMPane *pane);
 void _XMRefreshSelection(Display *display, XMenu *menu, XMSelect *select);
 void emacs_insque (void *elem, void *prev);
 void emacs_remque (void *elem);
-void XDeleteAssoc(Display *dpy, XAssocTable *table, XID x_id);
 void XDestroyAssocTable(XAssocTable *table);
 void XMakeAssoc(Display *dpy, XAssocTable *table, XID x_id, void *data);
 void XDeleteAssoc(Display *dpy, XAssocTable *table, XID x_id);
diff --git a/oldXMenu/autodeps.mk b/oldXMenu/autodeps.mk
new file mode 100644 (file)
index 0000000..f710929
--- /dev/null
@@ -0,0 +1,5 @@
+### autodeps.mk --- lwlib/Makefile fragment for GNU Emacs
+
+## This is inserted in lwlib/Makefile if AUTO_DEPEND=yes.
+
+-include $(ALLOBJS:%.o=${DEPDIR}/%.d)
diff --git a/oldXMenu/deps.mk b/oldXMenu/deps.mk
new file mode 100644 (file)
index 0000000..81088c5
--- /dev/null
@@ -0,0 +1,72 @@
+### deps.mk --- oldXMenu/Makefile fragment for GNU Emacs
+
+## Copyright 1985, 1986, 1987 by the Massachusetts Institute of Technology
+
+## Permission to use, copy, modify, and distribute this
+## software and its documentation for any purpose and without
+## fee is hereby granted, provided that the above copyright
+## notice appear in all copies and that both that copyright
+## notice and this permission notice appear in supporting
+## documentation, and that the name of M.I.T. not be used in
+## advertising or publicity pertaining to distribution of the
+## software without specific, written prior permission.
+## M.I.T. makes no representations about the suitability of
+## this software for any purpose.  It is provided "as is"
+## without express or implied warranty.
+
+
+## Copyright (C) 2001-2014 Free Software Foundation, Inc.
+
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+### Commentary:
+
+## This file is inserted in oldXMenu/Makefile if AUTO_DEPEND=no.
+## It defines static dependencies between the various source files.
+
+### Code:
+
+Activate.o: Activate.c XMenuInt.h XMenu.h X10.h
+AddPane.o: AddPane.c XMenuInt.h XMenu.h X10.h
+AddSel.o: AddSel.c XMenuInt.h XMenu.h X10.h
+ChgPane.o: ChgPane.c XMenuInt.h XMenu.h X10.h
+ChgSel.o: ChgSel.c XMenuInt.h XMenu.h X10.h
+Create.o: Create.c XMenuInt.h XMenu.h X10.h
+DelPane.o: DelPane.c XMenuInt.h XMenu.h X10.h
+DelSel.o: DelSel.c XMenuInt.h XMenu.h X10.h
+Destroy.o: Destroy.c XMenuInt.h XMenu.h X10.h
+Error.o: Error.c XMenuInt.h XMenu.h X10.h
+EvHand.o: EvHand.c XMenuInt.h XMenu.h X10.h
+FindPane.o: FindPane.c XMenuInt.h XMenu.h X10.h
+FindSel.o: FindSel.c XMenuInt.h XMenu.h X10.h
+InsPane.o: InsPane.c XMenuInt.h XMenu.h X10.h
+InsSel.o: InsSel.c XMenuInt.h XMenu.h X10.h
+Internal.o: Internal.c XMenuInt.h XMenu.h X10.h
+Locate.o: Locate.c XMenuInt.h XMenu.h X10.h
+Post.o: Post.c XMenuInt.h XMenu.h X10.h
+Recomp.o: Recomp.c XMenuInt.h XMenu.h X10.h
+SetAEQ.o: SetAEQ.c XMenuInt.h XMenu.h X10.h
+SetFrz.o: SetFrz.c XMenuInt.h XMenu.h X10.h
+SetPane.o: SetPane.c XMenuInt.h XMenu.h X10.h
+SetSel.o: SetSel.c XMenuInt.h XMenu.h X10.h
+XDelAssoc.o: XDelAssoc.c X10.h
+XLookAssoc.o: XLookAssoc.c X10.h
+XCrAssoc.o: XCrAssoc.c X10.h
+XDestAssoc.o: XDestAssoc.c X10.h
+XMakeAssoc.o: XMakeAssoc.c X10.h
+insque.o: insque.c
+
+${OBJS}: ../src/config.h
+
+### deps.mk ends here
index a74fe3db7a1d1e67f1217ef912dfe3f5213a816f..c10fe3dddedece16bca66d2b6c99d75493e9709e 100644 (file)
@@ -49,7 +49,7 @@ define xgetptr
   else
     set $bugfix = $arg0
   end
-  set $ptr = ($bugfix & VALMASK) | DATA_SEG_BITS
+  set $ptr = $bugfix & VALMASK
 end
 
 define xgetint
@@ -862,10 +862,8 @@ end
 define xsubchartable
   xgetptr $
   print (struct Lisp_Sub_Char_Table *) $ptr
-  xgetint $->depth
-  set $depth = $int
-  xgetint $->min_char
-  printf "Depth: %d, Min char: %d (0x%x)\n", $depth, $int, $int
+  set $subchartab = (struct Lisp_Sub_Char_Table *) $ptr
+  printf "Depth: %d, Min char: %d (0x%x)\n", $subchartab->depth, $subchartab->min_char, $subchartab->min_char
 end
 document xsubchartable
 Print the address of the sub-char-table $, its depth and min-char.
@@ -1085,8 +1083,8 @@ document xprintsym
 end
 
 define xcoding
-  set $tmp = (struct Lisp_Hash_Table *) ((Vcoding_system_hash_table & VALMASK) | DATA_SEG_BITS)
-  set $tmp = (struct Lisp_Vector *) (($tmp->key_and_value & VALMASK) | DATA_SEG_BITS)
+  set $tmp = (struct Lisp_Hash_Table *) (Vcoding_system_hash_table & VALMASK)
+  set $tmp = (struct Lisp_Vector *) ($tmp->key_and_value & VALMASK)
   set $name = $tmp->contents[$arg0 * 2]
   print $name
   pr
@@ -1098,8 +1096,8 @@ document xcoding
 end
 
 define xcharset
-  set $tmp = (struct Lisp_Hash_Table *) ((Vcharset_hash_table & VALMASK) | DATA_SEG_BITS)
-  set $tmp = (struct Lisp_Vector *) (($tmp->key_and_value & VALMASK) | DATA_SEG_BITS)
+  set $tmp = (struct Lisp_Hash_Table *) (Vcharset_hash_table & VALMASK)
+  set $tmp = (struct Lisp_Vector *) ($tmp->key_and_value & VALMASK)
   p $tmp->contents[charset_table[$arg0].hash_index * 2]
   pr
 end
index 19c553ff7a1ccbc508c764581524cbd2a3a99af9..c1b7c6cc8c3680669001dd0687e3aa01a5308e77 100644 (file)
-2014-10-10  Paul Eggert  <eggert@cs.ucla.edu>
+2014-10-14  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Cleanup terminal handling code.
+       * dispextern.h (get_named_tty): Remove prototype but...
+       * termhooks.h (get_named_terminal): ...resurrect it under
+       more meaningful name.
+       (get_terminal): Likewise, but with...
+       (decode_live_terminal): ...this name.
+       (decode_tty_terminal): Add prototype.
+       * term.c (get_tty_terminal): Remove.
+       (get_named_tty): Remove.
+       (Ftty_display_color_p, Ftty_display_color_cells, Ftty_type)
+       (Fcontrolling_tty_p, Fsuspend_tty, Fresume_tty):
+       Use decode_tty_terminal.
+       (Ftty_no_underline, Ftty_top_frame): Use decode_live_terminal.
+       * terminal.c (get_terminal): Refactor to...
+       (decode_terminal, decode_live_terminal): ...new functions.
+       (decode_tty_terminal): Replacement for get_tty_terminal.
+       (get_named_terminal): Likewise for get_named_tty.
+       * coding.c (Fset_terminal_coding_system_internal)
+       (Fterminal_coding_system, Fset_keyboard_coding_system_internal):
+       (Fkeyboard_coding_system):
+       * composite.c (Fcomposition_get_gstring):
+       * dispnew.c (Fsend_string_to_terminal):
+       * frame.c (Fmake_terminal_frame):
+       * nsfns.m (check_ns_display_info):
+       * w32fns.c, xfns.c (check_x_display_info):
+       * xselect.c (frame_for_x_selection): Use decode_live_terminal.
+       * keyboard.c (handle_interrupt_signal, handle_interrupt)
+       (Fset_quit_char): Use get_named_terminal.
+       (Fset_output_flow_control, Fset_input_meta_mode):
+       Use decode_tty_terminal.
+
+2014-10-13  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32term.h (ALIGN_STACK): Use _WIN64, not _W64, to distinguish
+       between 32-bit and 64-bit MinGW builds.  (Bug#18699)
+
+2014-10-12  Paul Eggert  <eggert@cs.ucla.edu>
 
        Fix port to Debian GNU/kFreeBSD 7 (wheezy) (Bug#18666).
        * process.c (accept4) [!HAVE_ACCEPT4]: New macro.
 
-2014-10-09  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-10-12  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * frame.c (Fmouse_pixel_position): Call Vmouse_position_function
        (bug#18638).
 
-2014-10-08  K. Handa  <handa@gnu.org>
+2014-10-12  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * editfns.c (dump_tz_string): No longer const.
+       It might be modified.
+
+       * nsmenu.m (clear): Assume OS X 10.6 or later.
+
+2014-10-12  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * unexmacosx.c: Remove include ppc/reloc.h.
+       (unrelocate, copy_dysymtab): Remove PPC code.
+       (rebase_reloc_address): Remove, only used for PPC:
+
+       * nsterm.m: Always include macfont.h on COCOA.
+       (ns_update_auto_hide_menu_bar, ns_draw_fringe_bitmap)
+       (ns_dumpglyphs_image, ns_check_menu_open)
+       (applicationDidFinishLaunching)
+       (antialiasThresholdDidChange:)
+       (keyDown:, toggleFullScreen:, setPosition:portion:whole:): Remove
+       checks for OSX <= 10.5/10.6.
+       (changeFont:): Use macfont on COCOA, nsfont on GNUSTEP.
+       (syms_of_nsterm): Call syms_of_macfont on COCOA, syms_of_nsfont on
+       GNUSTEP.
+
+       * nsterm.h (MAC_OS_X_VERSION_10_4, MAC_OS_X_VERSION_10_5): Remove.
+       (NS_HAVE_NSINTEGER): Remove block.
+       Remove >= OSX 10.6 tests.
+
+       * nsmenu.m (NSMenuDidBeginTrackingNotification): Remove.
+       (x_activate_menubar, trackingNotification:): Remove check for
+       OSX >= 10.5.
+       (menuNeedsUpdate:): Remove check for OSX < 10.5.
+
+       * nsimage.m (allocInitFromFile:): Remove code for OSX < 10.6.
+
+       * nsfns.m: Always include macfont.h on COCOA.
+       (ns_filename_from_panel, ns_directory_from_panel)
+       (Fx_create_frame, Fns_popup_font_panel, ns_run_file_dialog)
+       (Fns_read_file_name, Fns_list_services): Remove code for OSX < 10.6
+
+       * macfont.m: Remove >= 1050 check.
+       (macfont_create_family_with_symbol)
+       (macfont_get_glyph_for_character)
+       (mac_font_get_glyphs_for_variants)
+       (mac_ctfont_create_available_families, syms_of_macfont): Remove
+       code for OSX < 10.6.
+       (mac_font_family_group, mac_font_family_compare): Remove, only used
+       for OSX < 10.6.
+
+       * macfont.h (MAC_FONT_FORMAT_ATTRIBUTE, MAC_FONT_FORMAT_BITMAP)
+       (mac_font_copy_non_synthetic_table): Remove versions for OSX < 10.6
+
+       * Makefile.in: Replace nsfont.o macfont.o with ns_fontfile in
+       comment.
+
+2014-10-12  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Fix putenv race conditions with undefined behavior (Bug#8705).
+       Do all putenv calls before Emacs creates any threads.
+       Use a safer way to modify the TZ environment variable in the
+       presence of multiple threads.  For further thread-safety,
+       prefer localtime_r and gmtime_r to localtime and gmtime,
+       and prefer struct tm's tm_gmtoff (if available) to calling
+       both localtime_r and gmtime_r.
+       * dbusbind.c (Fdbus__init_bus): Move xputenv call from here ...
+       (init_dbusbind): ... to this new function.
+       * emacs.c (main) [HAVE_DBUS]: Call it before creating threads.
+       * xterm.c (x_term_init): Move xputenv call from here ...
+       (init_xterm): ... to this new function.
+       * emacs.c (main) [USE_GTK]: Call it before creating threads.
+       * editfns.c (HAVE_TM_GMTOFF): Default to false.
+       (dump_tz_string): New constant.
+       (init_editfns): Use it.  This centralizes the dump_tz stuff.
+       Call set_time_zone_rule here, so that its xputenv is done
+       before Emacs goes multithreaded.
+       (mktime_z) [!HAVE_TZALLOC]: New function, which is typically
+       thread-safe enough for Emacs.
+       (format_time_string, Fdecode_time, Fcurrent_time_string)
+       (Fcurrent_time_zone):
+       Prefer localtime_r and gmtime_r, which are more thread-safe, to
+       localtime and gmtime.  Remove now-unnecessary calls to block_input.
+       (tm_gmtoff): New static function.
+       (Fdecode_time, Fcurrent_time_zone): Use it.
+       (Fencode_time): Use mktime_z, for better thread-safety.
+       (set_time_zone_rule): Now static.  Rewrite to be mostly thread-safe,
+       i.e., not quite thread-safe but good enough for Emacs typical usage.
+       Do not reclaim storage that is in the environment; let it leak.
+       Always call tzset, since localtime_r does not.
+       * emacs.c (dump_tz, Fdump_emacs) [HAVE_TZSET]: Remove dump_tz stuff.
+       This is now done in init_editfns.
+       * systime.h (mktime_z, timezone_t, tzalloc, tzfree) [!HAVE_TZALLOC]:
+       New macros and declarations, for platforms lacking tzalloc & friends.
+
+2014-10-09  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * lisp.h (USE_STACK_STRING): Now true only if USE_STACK CONS.
+       On x86 platforms this works around GCC bug 63495
+       <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63495>,
+       and more generally should fix a portability problem in Emacs.
+       Problem reported by Stefan Monnier in:
+       http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00261.html
+
+2014-10-08  Leo Liu  <sdl.web@gmail.com>
+
+       Enhance terpri to allow conditionally output a newline.  (Bug#18652)
+       * keymap.c (describe_vector_princ):
+       * keyboard.c (Fcommand_error_default_function): Adapt to change to
+       Fterpri.
+
+       * print.c (printchar_stdout_last): Declare.
+       (printchar): Record the last char written to stdout.
+       (Fterpri): Add optional argument ENSURE.
+
+2014-10-08  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32inevt.c (maybe_generate_resize_event): Pass non-zero as the
+       DELAY argument to change_frame_size, so that the frame size
+       changes, if any are needed, are delayed until the next redisplay.
+       This is to avoid a too early QUIT inside change_frame_size, when
+       it calls Lisp in frame_windows_min_size, in case one of the events
+       we've read sets the quit-flag.  (Bug#18649)
+
+       * w32fns.c (check_x_display_info): Accept terminal objects as
+       argument, to follow what xfns.c does.
+
+2014-10-07  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in ($(srcdir)/macuvs.h)
+       ($(lispsource)/international/charprop.el): Add explicit FORCE.
+
+2014-10-07  Eli Zaretskii  <eliz@gnu.org>
+
+       * decompress.c (init_zlib_functions): Move the message about zlib
+       being unavailable from here...
+       (Fzlib_decompress_region): ...to here.  (Bug#18650)
+
+2014-10-07  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * font.c (Ffont_get_glyphs): Use validate_subarray and fix
+       the case where an optional string is used.  Adjust docstring.
+
+2014-10-06  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * lisp.mk (lisp): Remove w32-common-fns.elc.
+
+2014-10-05  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * keyboard.c (Qleft, Qright): Remove duplicate definitions (Bug#9927).
+       These were already defined in buffer.c, and the duplicate
+       definitions cause problems on platforms like 'gcc -fno-common'.
+       Reported by Peter Dyballa in: http://bugs.gnu.org/9927#137
+
+2014-10-05  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * nsterm.m (updateFrameSize:): Only call update_frame_tool_bar
+       if toolbar is visible.
+
+       * nsfont.m (nsfont_draw): Use CGFloat for GNUstep newer than
+       0.23 (Bug#18030).
+
+       * nsterm.m (syms_of_nsterm): ns-use-fullscreen-animation is new.
+       (toggleFullScreen:): Use ns-use-fullscreen-animation for animate.
+       (ns_select, ns_read_socket): Use unwind_protect to decrease
+       apploopnr (Bug#18345).
+       (ns_draw_window_cursor): Adjust y for hbar cursor only if smaller than
+       line height (Bug#17977).
+
+       * macfont.m: Fix indentation and import changes from macport 24.3.94.
+       (macfont_closest_traits_index): New function.
+       (macfont_closest_traits_index_p): Rename from
+       macfont_closest_traits_index.
+       (macfont_list): Use macfont_closest_traits_index_p.
+
+2014-10-05  K. Handa  <handa@gnu.org>
 
        * coding.c (detect_coding_iso_2022): Set coding->rejected
        correctly when an invalid escape sequence is found (Bug#18610).
 
-2014-10-03  Dmitry Antipov  <dmantipov@yandex.ru>
+2014-10-04  Jan Djärv  <jan.h.d@swipnet.se>
 
-       * font.c (font_list_entities): Do not add empty vector to font cache.
-       (font_matching_entity): Likewise.  If matching entity is found, insert
-       1-item vector with this entity instead of an entity itself (Bug#17125).
+       * gtkutil.c (create_menus): Only add tearoffs to empty menus.
+       (xg_update_submenu): Remove has_tearoff_p, pass 1 to create_menus
+       for add_tearoff_p.
 
-2014-10-02  Eli Zaretskii  <eliz@gnu.org>
+2014-10-04  Martin Rudalics  <rudalics@gmx.at>
+
+       * buffer.c (scroll_bar_width, scroll_bar_height):
+       Fix doc-strings.
+       * window.c (Fset_window_scroll_bars): Fix doc-string.
+       (Fwindow_scroll_bars): Have it return what the doc-string says.
+
+2014-10-03  Eli Zaretskii  <eliz@gnu.org>
 
        * xdisp.c (move_it_by_lines): Call reseat_1 after moving the
        iterator backwards, to resync the bidi iterator.  (Bug#18584)
 
-2014-10-01  Jan Djärv  <jan.h.d@swipnet.se>
+2014-10-03  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Consistently use min and max macros from lisp.h.
+       * coding.c (min, max):
+       * font.c (MAX):
+       * unexhp9k800.c (min):
+       * unexw32.c (min, max): Use definitions from lisp.h.
+       * regex.c (MAX, MIN) [!emacs]: Define own max and min as such.
+       Adjust users.
+       * gmalloc.c (min): Tiny style change.
+
+       * fileio.c (emacs_readlinkat, Finsert_file_contents):
+       * w32fns.c, xfns.c (x_create_tip_frame): Use AUTO_STRING.
+
+2014-10-03  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Fix x-focus-frame bug with "Not an in-range integer" (Bug#18586).
+       * xselect.c (X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX, X_LONG_MIN)
+       (X_ULONG_MAX): Move these macros to xterm.h.
+       (x_fill_property_data): Be more generous about allowing either
+       signed or unsigned data of the appropriate width.
+       * xterm.h (x_display_set_last_user_time): New function.
+       All setters of last_user_time changd to use this function.
+       If ENABLE_CHECKING, check that the times are in range.
+
+2014-10-02  Eli Zaretskii  <eliz@gnu.org>
+
+       * dispnew.c (adjust_decode_mode_spec_buffer): Use 'int' instead of
+       'ssize_t'.  Suggested by Paul Eggert <eggert@cs.ucla.edu>.
+
+2014-10-02  Jan Djärv  <jan.h.d@swipnet.se>
 
        * xfaces.c (Finternal_set_lisp_face_attribute): Don't try to
        make a font_object from a tty frame (Bug#18573).
-       (Finternal_set_lisp_face_attribute): Added FIXME comment.
+       (Finternal_set_lisp_face_attribute): Add FIXME comment.
+
+2014-10-02  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * alloc.c (mark_overlay): Assume that overlay boundaries are
+       always markers.  Add comment.
+       * lread.c (read_internal_start): Use convenient validate_subarray.
+       Adjust docstring.
+       (Fread_from_string): Adjust docstring.
+
+2014-10-02  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * lisp.h: Fix up compilation for USE_STACK_LISP_OBJECTS=false.
+
+       * nsselect.m (ns-own-selection-internal, ns-disown-selection-internal):
+       Rename from the "x-" prefix.
+
+2014-10-01  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * xselect.c (selection-converter-alist): Fix docstring.
+
+2014-10-01  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32proc.c (sys_spawnve): Avoid modification of the CMDNAME
+       argument passed by the caller, when we mirror all slashes into
+       backslashes.
+
+2014-10-01  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * gtkutil.c (xg_set_toolkit_horizontal_scroll_bar_thumb):
+       Resurrect old code and fix compilation with GTK < 2.13.6.
+
+2014-10-01  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Use AUTO_CONS instead of SCOPED_CONS, etc.
+       * frame.h (AUTO_FRAME_ARG): Rename from FRAME_PARAMETER.
+       * lisp.h (AUTO_CONS): Rename from scoped_cons.
+       (AUTO_LIST1): Rename from scoped_list1.
+       (AUTO_LIST2): Rename from scoped_list2.
+       (AUTO_LIST3): Rename from scoped_list3.
+       (AUTO_LIST4): Rename from scoped_list4.
+       (AUTO_STRING): Rename from SCOPED_STRING.
+       * frame.h (AUTO_FRAME_ARG):
+       * lisp.h (AUTO_CONS, AUTO_LIST1, AUTO_LIST2, AUTO_LIST3)
+       (AUTO_LIST4, AUTO_STRING):
+       Prepend a new argument 'name'.
+       Declare a variable instead of yielding a value.
+       All uses changed.
+       * lisp.h (STACK_CONS, AUTO_CONS_EXPR): New internal macros.
 
 2014-09-30  Eli Zaretskii  <eliz@gnu.org>
 
        values.
        (my_create_window): Move the calculation of the coordinates of the
        frame's top-left edge here.  Pass them to the input thread via the
-       second parameter of the WM_EMACS_CREATEWINDOW message.  See
-       http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00892.html
+       second parameter of the WM_EMACS_CREATEWINDOW message.
+       See http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00892.html
        for the details.
 
-2014-09-29  Eli Zaretskii  <eliz@gnu.org>
+2014-09-30  Eli Zaretskii  <eliz@gnu.org>
 
        * xdisp.c (cursor_row_fully_visible_p): Update commentary.
        (redisplay_window): Treat the frame's frozen_window_starts flag
        obey it if the glyph row showing point will be fully visible.
        Likewise when the window start is in a continuation line.  If,
        after trying everything under the 'force_start' label, point is
-       still not fully visible, give up and scroll the window.  Add
-       debugging traces.  (Bug#18545)
+       still not fully visible, give up and scroll the window.
+       Add debugging traces.  (Bug#18545)
 
        * window.c (Frecenter): Set the window's redisplay flag.
 
-2014-09-24  Eli Zaretskii  <eliz@gnu.org>
+2014-09-30  Eli Zaretskii  <eliz@gnu.org>
 
        * w32term.c (w32_read_socket): Don't use frame dimensions for
        resizing if GetClientRect returned an empty (0, 0, 0, 0)
        (adjust_decode_mode_spec_buffer): Add assertion to avoid passing
        negative values to xrealloc.  (Bug#18528)
 
+2014-09-30  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * alloc.c: Remove now-unnecessary check.
+       Suggested by Dmitry Antipov in:
+       http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00891.html
+
+       * xterm.c (x_term_init): Allocate temps on stack, not on heap.
+
+       * frame.c (x_set_frame_parameters): Port --enable-gcc-warnings
+       to Ubuntu 14.04.1 x86-64.
+
+       Simplify stack-allocated Lisp objects, and make them more portable.
+       The build_local_string macro was used in two ways: (1) string
+       literals for which scoped allocation suffices, and (2) file name
+       components, where it's not safe in general to assume bounded-size
+       ASCII data.  Simplify by defining a new macro SCOPED_STRING that
+       allocates a block-scope string, and by using SCOPED_STRING for (1)
+       and build_string for (2).  Furthermore, actually use stack
+       allocation only for objects known to have sufficient alignment.
+       This simpler implementation means Emacs can make
+       USE_STACK_LISP_OBJECTS the default unless GC_MARK_STACK !=
+       GC_MAKE_GCPROS_NOOPS.
+       * lisp.h (GCALIGNED): Align even if !USE_STACK_LISP_OBJECTS,
+       for fewer differences among implementations.
+       (struct Lisp_String): Now GCALIGNED.
+       (USE_STACK_LISP_OBJECTS): Default to true, since the
+       implementation no longer insists on a nonempty GCALIGNED.
+       But make it false if GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS.
+       (SCOPED_CONS_INITIALIZER): Remove, since it's no longer needed
+       separately.  Move definiens to scoped_cons.  The old definition
+       was incorrect when GCALIGNED was defined to be empty.
+       (union Aligned_String): New type.
+       (USE_STACK_CONS, USE_STACK_STRING): New constants, so that the
+       implementation ports to compilers that don't align strictly enough.
+       Don't worry about the union sizes; it's not worth bothering about.
+       (scoped_cons, scoped_list1, scoped_list3, scoped_list4):
+       Rewrite using USE_STACK_CONS.
+       (scoped_cons): Assume the use of union Aligned_Cons.
+       (lisp_string_size, make_local_string, build_local_string): Remove.
+       Unless otherwise specified, all callers of build_local_string
+       changed to use SCOPED_STRING.
+       (SCOPED_STRING): New macro.
+       * data.c (wrong_choice):
+       * menu.c (single_menu_item):
+       * process.c (Fformat_network_address):
+       Hoist use of SCOPED_STRING out of a scope, so that its returned
+       object lives long enough.
+       * fileio.c (Fexpand_file_name): Use build_string, not SCOPED_STRING,
+       as the string might be long or might not be ASCII.
+
+2014-09-29  Eli Zaretskii  <eliz@gnu.org>
+
+       * msdos.c (internal_terminal_init): Bump version to 25.
+
+2014-09-29  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Keep stack-allocated Lisp objects fast rather than versatile.
+       * lisp.h (union Aligned_Cons) [!GCALIGNED]: Define as such.
+       (SCOPED_CONS_INITIALIZER): New macro.
+       (scoped_cons) [USE_STACK_LISP_OBJECTS]: Use it.
+       (USE_LOCAL_ALLOCA): Remove.
+       (local_cons, local_list1, local_list2, local_list3, local_list4):
+       Remove.  Stack overflow checking makes them too slow.
+       (make_local_vector): Likewise.  Also we just don't have enough
+       users for it.
+       (enum LISP_STRING_OVERHEAD): Remove.
+       (local_string_init, local_vector_init): Remove prototypes.
+       (make_local_string, build_local_string): Redesign to target short
+       compile-time string constants, fall back to regular string allocation
+       where appropriate.
+       (lisp_string_size): New function.
+       (verify_ascii) [ENABLE_CHECKING]: Add prototype.
+       * alloc.c (local_string_init, local_vector_init): Remove.
+       (verify_ascii) [ENABLE_CHECKING]: New function.
+       * buffer.c, charset.c, chartab.c, data.c, editfns.c, emacs.c, fileio.c:
+       * fns.c, font.c, fontset.c, frame.c, keyboard.c, keymap.c, lread.c:
+       * menu.c, minibuf.c, process.c, textprop.c, xdisp.c, xfns.c, xfont.c:
+       * xselect.c, xterm.c: All related users changed.
+
+2014-09-28  Ken Brown  <kbrown@cornell.edu>
+
+       * sheap.c (bss_sbrk_buffer_beg): Remove redundant variable.
+       * gmalloc.c [CYGWIN]: Adapt to change in sheap.c.
+
+2014-09-27  Ken Brown  <kbrown@cornell.edu>
+
+       Fix implementation of HYBRID_MALLOC on Cygwin.
+       * sheap.c (bss_sbrk_buffer_end): Cast to void *.
+       (bss_sbrk_buffer_beg): New variable.  Use it...
+       * gmalloc.c (ALLOCATED_BEFORE_DUMPING) [CYGWIN]: ...here, to fix
+       incorrect definition.
+
+2014-09-27  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * keyboard.c (track-mouse): Rename to internal--track-mouse.
+       Make it into a function and change arg to be a function.
+
+       * lisp.mk (lisp): Add elisp-mode.elc.
+
+2014-09-26  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * xfns.c (x_default_scroll_bar_color_parameter):
+       Use USE_LOCAL_ALLOCA only if USE_TOOLKIT_SCROLL_BARS,
+       to pacify --enable-gcc-warnings in non-scrollbar builds.
+
+2014-09-26  Ken Brown  <kbrown@cornell.edu>
+
+       * w32term.h (ALIGN_STACK): Fix the cpp condition.
+
+2014-09-25  Eli Zaretskii  <eliz@gnu.org>
+
+       * lisp.h (USE_STACK_LISP_OBJECTS): Default to false for 32-bit
+       MinGW builds that use GCC before 4.2.
+
+       Default to stack objects on DOS_NT platforms as well.
+       * w32term.h (ALIGN_STACK) [__GNUC__]: Define to
+       __attribute__((force_align_arg_pointer)) for GCC 4.2 and later.
+
+       * lisp.h (USE_STACK_LISP_OBJECTS): Remove the !DOS_NT condition.
+
+       * w32proc.c (enum_locale_fn, enum_codepage_fn): Add the
+       ALIGN_STACK attribute.
+
+       * w32fns.c (w32_monitor_enum): Add the ALIGN_STACK attribute.
+
+       * w32uniscribe.c (add_opentype_font_name_to_list): Add the
+       ALIGN_STACK attribute.
+
+       * w32font.c (add_font_name_to_list, add_font_entity_to_list)
+       (add_one_font_entity_to_list): Add the ALIGN_STACK attribute.
+
+2014-09-25  Martin Rudalics  <rudalics@gmx.at>
+
+       * frame.c (frame_inhibit_resize):
+       * widget.c (EmacsFrameResize):
+       * window.c (resize_frame_windows, Fset_window_configuration):
+       * xdisp.c (expose_frame):
+       * xfns.c (x_change_tool_bar_height):
+       * xmenu.c (update_frame_menubar):
+       * xterm.c (handle_one_xevent, x_new_font, x_set_window_size_1):
+       Remove code left dead after 2014-07-27 changes.
+
+2014-09-25  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Fix local_cons etc. to not exhaust the stack when in a loop.
+       Problem reported in:
+       http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00696.html
+       * buffer.c (Fother_buffer, other_buffer_safely, init_buffer):
+       * charset.c (load_charset_map_from_file, Ffind_charset_region)
+       (Ffind_charset_string):
+       * chartab.c (uniprop_encode_value_numeric, uniprop_table):
+       * data.c (wrong_range):
+       * editfns.c (Fpropertize, format2):
+       * emacs.c (init_cmdargs, decode_env_path):
+       * fileio.c (auto_save_error):
+       * fns.c (Fyes_or_no_p):
+       * font.c (font_style_to_value, font_parse_xlfd)
+       (font_parse_family_registry, font_delete_unmatched)
+       (font_add_log):
+       * fontset.c (Fset_fontset_font):
+       * frame.c (x_get_arg):
+       * keyboard.c (echo_dash, safe_run_hooks_error, parse_menu_item)
+       (read_char_minibuf_menu_prompt):
+       * keymap.c (silly_event_symbol_error, describe_vector):
+       * lread.c (load_warn_old_style_backquotes):
+       * menu.c (single_menu_item):
+       * minibuf.c (Fread_buffer):
+       * process.c (status_message, Fformat_network_address)
+       (server_accept_connection):
+       * textprop.c (copy_text_properties):
+       * xdisp.c (Fcurrent_bidi_paragraph_direction):
+       * xfns.c (x_default_scroll_bar_color_parameter):
+       * xfont.c (xfont_open):
+       * xselect.c (x_clipboard_manager_error_1):
+       * xterm.c (x_term_init):
+       Put USE_LOCAL_ALLOCA at the start of the function.
+       * fns.c (maybe_resize_hash_table): Use build_string instead of
+       build_local_string, since we'd otherwise need a conditional
+       USE_LOCAL_ALLOCA here, but this is just debugging output and is
+       not worth the bother of optimization.
+       * font.c (font_delete_unmatched): Remove by-hand code that
+       observed MAX_ALLOCA limit, since it's now done automatically.
+       * keymap.c (Fsingle_key_description): Put USE_SAFE_ALLOCA at top,
+       since build_local_string needs its sa_alloc.
+       * lisp.h (lisp_word_count): New function.
+       (SAFE_ALLOCA_LISP): Use it.
+       (USE_LOCAL_ALLOCA): New macro.
+       (local_cons, make_local_vector, make_local_string):
+       Observe the MAX_ALLOCA limit.
+       (LISP_STRING_OVERHEAD): New constant.
+       (make_local_string): Use it.
+
+2014-09-24  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Default to stack objects on non-GNU/Linux, non-DOS_NT platforms.
+       * lisp.h (USE_STACK_LISP_OBJECTS): Also default to true
+       if !defined DOS_NT && !defined GNU_LINUX.  I've tested this on AIX
+       and Solaris and it's likely to work on similar platforms.
+
+       Avoid signed integer overflow when converting Time to ptrdiff_t.
+       * keyboard.c (INPUT_EVENT_POS_MAX, INPUT_EVENT_POS_MIN):
+       New macros.
+       (position_to_Time, Time_to_position): New functions.
+       (gen_help_event, kbd_buffer_get_event): Use them.
+       * systime.h (Time) [emacs && !HAVE_X_WINDOWS]:
+       Go back to plain 'unsigned long', so that 'Time' is the same
+       for both X and non-X builds; this is less likely to cause surprise.
+       * termhooks.h: Remove compile-time check that Time and ptrdiff_t
+       are the same size; this is no longer required.
+
+       * keyboard.c (make_lispy_event): Avoid unnecessary tests
+       of bit 28 and of whether an unsigned value is negative.
+       This simplifies the code a bit, and pacifies clang 3.4.
+
+2014-09-24  Eli Zaretskii  <eliz@gnu.org>
+
+       * systime.h (Time): Define as size_t, to be consistent with 64-bit
+       Windows builds, where 'long' is a 32-bit type.
+
+       * w32inevt.h (w32_console_mouse_position): Update the argument
+       types to use 'Time'.
+
+       * w32term.c (w32_mouse_position)
+       (x_horizontal_scroll_bar_report_motion)
+       (x_scroll_bar_report_motion): Update the argument types to use
+       'Time'.
+
+2014-09-24  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * termhooks.h (enum scroll_bar_part): Begin from 0 to allow...
+       (struct input_event): ...unsigned bitfields.  Likewise for
+       `event_kind' member.  Prefer unsigned for `code' and 'modifiers'.
+       Use `timestamp' for HELP_EVENT position.  Add compile-time assert.
+       * keyboard.c (gen_help_event, kbd_buffer_store_help_event)
+       (kbd_buffer_get_event): Adjust users.
+       (scroll_bar_parts): Add Qnil to match scroll_bar_nowhere.
+       (make_scroll_bar_position): New function, refactored out of...
+       (make_lispy_event): ...adjusted user.
+       * nsterm.h (EmacsScroller): Use enum for `last_hit_part' member.
+       * nsterm.m (ns_mouse_position, mouseUp):
+       * term.c (term_mouse_position):
+       * w32inevt.c (w32_console_mouse_position):
+       * w32term.c (w32_mouse_position):
+       * xterm.c (XTmouse_position): Use scroll_bar_above_handle.
+       (x_send_scroll_bar_event, xm_scroll_callback, xg_scroll_callback):
+       Prefer enum and explicit enum members to integers and numeric values.
+
+       * chartab.c (uniprop_encode_value_numeric):
+       * font.c (font_style_to_value): Use make_local_vector.
+       (font_delete_unmatched): Use local_cons but respect MAX_ALLOCA.
+       * keymap.c (append_key): Use scoped_list1.
+
+       * lisp.h (USE_STACK_LISP_OBJECTS): Enable by default if GNU_LINUX
+       && __GNUC__ && !__clang__.  Mention known problems.  Adjust comment.
+
+2014-09-24  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Fix some slow uses and misuses of strcat.
+       * doc.c (get_doc_string):
+       * gtkutil.c (get_utf8_string):
+       * xsmfns.c (x_session_initialize):
+       Avoid recomputation of string length.
+       * ftfont.c (ftfont_spec_pattern):
+       * xfns.c (xic_create_fontsetname):
+       Don't assume output buffer is initially zero.
+
+2014-09-23  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * lisp.h (lispstpcpy): Rename from lispstrcpy, and act like stpcpy.
+       All callers changed.
+       * xterm.c (x_term_init): Use new functionality to avoid two needs
+       to compute a string length.
+
+       * dispextern.h, xdisp.c (window_box_right_offset): Now static.
+
+2014-09-23  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Use known length of a Lisp string to copy it faster.
+       * lisp.h (lispstrcpy): New function.  Add comment.
+       * callproc.c (child_setup):
+       * dbusbind.c (xd_append_arg):
+       * doc.c (get_doc_string):
+       * font.c (Ffont_xlfd_name):
+       * frame.c (xrdb_get_resource):
+       * process.c (Fmake_network_process, network_interface_info):
+       * w32fns.c (Fx_open_connection):
+       * w32proc.c (sys_spawnve):
+       * xfns.c (select_visual):
+       * xfont.c (xfont_list):
+       * xsmfns.c (x_session_initialize):
+       * xterm.c (x_term_init): Use it.
+
+2014-09-23  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Fix SAFE_ALLOCA to not exhaust the stack when in a loop.
+       Problem reported by Dmitry Antipov in thread leading to:
+       http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00713.html
+       This patch fixes only SAFE_ALLOCA, SAFE_NALLOCA, and SAFE_ALLOCA_LISP;
+       the experimental local_* macros enabled by USE_LOCAL_ALLOCATORS
+       remain unfixed.
+       * callproc.c (call_process): Save and restore sa_avail.
+       * lisp.h (USE_SAFE_ALLOCA): Define sa_avail.
+       (AVAIL_ALLOCA): New macro.
+       (SAFE_ALLOCA, SAFE_NALLOCA, SAFE_ALLOCA_LISP):
+       Use it, and check against sa_avail rather than MAX_ALLOCA.
+
 2014-09-22  Dmitry Antipov  <dmantipov@yandex.ru>
 
        On OSX, do not free font-specific data more than once (Bug#18501).
        * macfont.m (macfont_close): Release and free font-specific data
        only if it wasn't previously freed.
 
-2014-09-21  David Caldwell <david@porkrind.org>  (tiny change)
+2014-09-22  David Caldwell <david@porkrind.org>  (tiny change)
 
        * unexmacosx.c (dump_it): Improve error message.
 
-2014-09-18  Juri Linkov  <juri@jurta.org>
+2014-09-22  Juri Linkov  <juri@jurta.org>
 
        * image.c (imagemagick_load_image): Add delay to imagemagick metadata.
        (Bug#10747, bug#18334)
 
-2014-09-18  Eli Zaretskii  <eliz@gnu.org>
+2014-09-22  Eli Zaretskii  <eliz@gnu.org>
 
        * frame.c (Fmouse_position, Fset_mouse_position): Clarify the
        units in which the position is measured.  (Bug#18493)
        * xdisp.c (redisplay_internal): Force redisplay of all windows
        that show a buffer whose narrowing has changed.  (Bug#18490)
 
-2014-09-16  Eli Zaretskii  <eliz@gnu.org>
+2014-09-22  Eli Zaretskii  <eliz@gnu.org>
 
        * xterm.c (x_draw_hollow_cursor, x_draw_bar_cursor):
        * w32term.c (x_draw_hollow_cursor, x_draw_bar_cursor): In R2L
        every window except the leftmost one.  Reported by Martin Rudalics
        <rudalics@gmx.at>.
 
-2014-09-16  Dmitry Antipov  <dmantipov@yandex.ru>
+2014-09-22  Dmitry Antipov  <dmantipov@yandex.ru>
 
        Always use matched specpdl entry to record call arguments (Bug#18473).
        * lisp.h (record_in_backtrace): Adjust prototype.
        overflow on string size calculation.
        * data.c (Faset): Likewise for byte index.
 
-2014-09-15  Eli Zaretskii  <eliz@gnu.org>
+2014-09-22  Eli Zaretskii  <eliz@gnu.org>
 
        Fix display of R2L lines in partial-width windows.
        * xdisp.c (init_iterator): Don't use it->bidi_p before it is
        of the right one.
        (produce_special_glyphs): Fix bogus assignments.
 
-2014-09-14  Eli Zaretskii  <eliz@gnu.org>
+2014-09-22  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32.c (fcntl): Support O_NONBLOCK fcntl on the write side of pipes.
+
+2014-09-22  Eli Zaretskii  <eliz@gnu.org>
+
+       * fileio.c (Fexpand_file_name) [DOS_NT]: Make sure newdirlim is
+       always set to a valid value.  Make sure the size passed to alloca
+       is always positive.  (Bug#18516)
+
+2014-09-22  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Avoid extra call to oblookup when interning symbols.
+       * lisp.h (intern_driver): Add prototype.
+       * lread.c (intern_driver): New function.
+       (intern1, intern_c_string_1, Fintern):
+       * font.c (font_intern_prop):
+       * w32font.c (intern_font_name): Use it.
+
+2014-09-21  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Minor improvements to new stack-allocated Lisp objects.
+       * frame.h (FRAME_PARAMETER):
+       Prefer scoped_list1 to local_list1 where either would do.
+       * lisp.h (scoped_list4): New macro.
+       (local_cons, local_list1, local_list2, local_list3, local_list4)
+       (make_local_vector, make_local_string, build_local_string):
+       Prefer functions to macros where either would do.
+       * xdisp.c (build_desired_tool_bar_string):
+       Prefer scoped_list4 to local_list4 where either would do.
+
+2014-09-18  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       More and more stack-allocated Lisp objects if USE_LOCAL_ALLOCATORS.
+       * lisp.h (local_list4) [USE_LOCAL_ALLOCATORS]: New macro.
+       [!USE_LOCAL_ALLOCATORS]: Fall back to regular list4.
+       * frame.h (FRAME_PARAMETER): New macro.
+       * dispnew.c (init_display):
+       * fontset.c (Fset_fontset_font):
+       * frame.c (x_default_parameter):
+       * xfaces.c (set_font_frame_param, Finternal_merge_in_global_face):
+       * xfns.c (x_default_scroll_bar_color_parameter)
+       (x_default_font_parameter, x_create_tip_frame): Use it.
+       * editfns.c (Fpropertize): Use local_cons.
+       * process.c (status_message): Use build_local_string.
+       * xfont.c (xfont_open): Use make_local_string.
+       * xdisp.c (build_desired_tool_bar_string): Use local_list4.
+
+2014-09-18  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Port USE_LOCAL_ALLOCATORS code to clang 3.4 x86-64.
+       * lisp.h (USE_LOCAL_ALLOCATORS): Define only if __GNUC__ &&
+       !__clang__.  This works with GCC and with clang and is safer for
+       compilers we don't know about.
+       (local_cons): Rename parameter to make capture less likely.
+
+2014-09-17  Samuel Bronson  <naesten@gmail.com>
+
+       * unexmacosx.c (copy_data_segment): Port to GCC 4.6+ (Bug#9927).
+
+2014-09-17  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Fix minor problems found by static checking.
+       * alloc.c, lisp.h (SAVE_TYPE_INT_OBJ, make_save_int_obj):
+       Remove; now unused.
+       * buffer.h (decode_buffer): Doc and indentation fixes.
+       * fns.c (Qstring_collate_lessp, Qstring_collate_equalp): Now static.
+
+2014-09-17  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Avoid clang-specific warnings.
+       * buffer.c (init_buffer): Shut up -Wself-assign.
+       * process.c (server_accept_connection): Shut up -Wunsequenced.
+
+2014-09-16  Daniel Colascione  <dancol@dancol.org>
+
+       * fns.c (sxhash): For symbols, use address as hash code.
+
+2014-09-16  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       If USE_LOCAL_ALLOCATORS, allocate even more Lisp objects on stack.
+       * charset.c (load_charset_map_from_file): Use scoped_list2
+       and build_local_string.
+       * buffer.c (Fother_buffer, other_buffer_safely, init_buffer):
+       * emacs.c (init_cmdargs, decode_env_path):
+       * fileio.c (Fexpand_file_name):
+       * fns.c (maybe_resize_hash_table) [ENABLE_CHECKING]:
+       * frame.c (x_get_arg):
+       * keyboard.c (safe_run_hooks_error):
+       * lread.c (load_warn_old_style_backquotes):
+       * xdisp.c (Fcurrent_bidi_paragraph_direction):
+       * xfns.c (x_default_scroll_bar_color_parameter, select_visual):
+       * xselect.c (x_clipboard_manager_error_1)
+       (x_clipboard_manager_save_all):
+       * xterm.c (x_term_init): Use build_local_string.
+
+       Avoid more integer overflows on string size calculations.
+       * category.c (Fmake_category_set):
+       * xdisp.c (get_overlay_arrow_glyph_row):
+       * w32font.c (intern_font_name): Prefer ptrdiff_t to int.
+
+2014-09-15  Eli Zaretskii  <eliz@gnu.org>
+
+       * sound.c [WINDOWSNT]: Include w32common.h and mbstring.h.
+       (SOUND_WARNING) [WINDOWSNT]: Include in do..while and improve the
+       error message format.  Use message_with_string to have non-ASCII
+       file names properly displayed.
+       (do_play_sound) [WINDOWSNT]: Use Unicode APIs to play sound files
+       when w32-unicode-filenames is non-nil, but not on Windows 9X,
+       where these APIs are not available even in UNICOWS.DLL.
+       Improve the format of error messages and include the file name in them
+       where appropriate.
+       (Fplay_sound_internal) [WINDOWSNT]: Make the MS-Windows branch
+       call play-sound-functions, per documentation.
+
+       * w32.c (w32_get_long_filename, w32_get_short_filename):
+       Constify the input file name arguments.
+
+       * w32.h (w32_get_long_filename, w32_get_short_filename):
+       Update prototypes.
+
+2014-09-15  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       If USE_LOCAL_ALLOCATORS, allocate some Lisp objects on stack.
+       * lisp.h (local_cons, local_list1, local_list2, local_list3)
+       [USE_LOCAL_ALLOCATORS]: New macros.
+       [!USE_LOCAL_ALLOCATORS]: Fall back to regular functions.
+       (build_local_string): Avoid argument name expansion clash with
+       make_local_string.
+       * alloc.c (toplevel)
+       [USE_LOCAL_ALLOCATORS && GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS]:
+       Preprocessor guard to avoid impossible configuration.
+       * charset.c (Ffind_charset_region, Ffind_charset_string):
+       Use make_local_vector.
+       * lread.c (read1, substitute_object_recurse): Use scoped_cons.
+       * textprop.c (Fput_text_property, Fadd_face_text_property):
+       Use scoped_list2.
+       (copy_text_properties): Use local_cons and local_list3.
+       * chartab.c (uniprop_table):
+       * data.c (wrong_choice, wrong_range):
+       * doc.c (get_doc_string):
+       * editfns.c (format2):
+       * fileio.c (Fexpand_file_name, auto_save_error):
+       * fns.c (Fyes_or_no_p):
+       * font.c (font_parse_xlfd, font_parse_family_registry, font_add_log):
+       * fontset.c (Fset_fontset_font):
+       * keyboard.c (echo_add_key, echo_dash, parse_menu_item)
+       (read_char_minibuf_menu_prompt):
+       * keymap.c (silly_event_symbol_error, describe_vector):
+       * menu.c (single_menu_item):
+       * minibuf.c (Fread_buffer):
+       * process.c (status_message, Fformat_network_address)
+       (server_accept_connection): Use make_local_string and
+       build_local_string.  Prefer compound literals where appropriate.
+
+2014-09-15  Daniel Colascione  <dancol@dancol.org>
+
+       * fns.c (Fsort): Tweak sort docstring.
 
-       * w32.c (fcntl): Support O_NONBLOCK fcntl on the write side of
-       pipes.
+2014-09-15  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32.c (fcntl): Support O_NONBLOCK fcntl on the write side of pipes.
        (sys_write): When a write to a non-blocking pipe returns ENOSPC,
        set errno to EAGAIN instead, to allow the caller to retry the
        write after some waiting.  Fixes deadlocks when Emacs exchanges a
        lot of data through the pipe.  (Bug#18420)
 
-2014-09-13  Eli Zaretskii  <eliz@gnu.org>
-
        * sound.c (Fplay_sound_internal): Encode the sound file name in
        the ANSI codepage.  Expand it against data-directory, as per docs,
        not against the current directory.  No need to make a local copy
        the string with "?" replacement characters, which will fail the
        caller.  This avoids returning a random value in that case.
 
-2014-09-11  Martin Rudalics  <rudalics@gmx.at>
+2014-09-15  Martin Rudalics  <rudalics@gmx.at>
 
        * window.c (Fresize_mini_window_internal): Set w->total_lines
        from w->pixel_height (Bug#18422).
 
-2014-09-09  Jan Djärv  <jan.h.d@swipnet.se>
+2014-09-15  Jan Djärv  <jan.h.d@swipnet.se>
 
        * nsterm.m (updateFrameSize:, initFrameFromEmacs:)
        (toggleFullScreen:): Take frame_resize_pixelwise into account when
        setting resize increments (Bug#18435).
 
-2014-09-09  Eli Zaretskii  <eliz@gnu.org>
+2014-09-15  Eli Zaretskii  <eliz@gnu.org>
 
        * xdisp.c (pos_visible_p): Properly save and restore the iterator
        state around the call to line_bottom, since it can move the
        iterator to another screen line.  This fixes off-by-one errors in
        the reported row in some rare cases.
 
-2014-09-07  Eli Zaretskii  <eliz@gnu.org>
+2014-09-14  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * callproc.c (init_callproc): Fix bug introduced at
+       2014-09-07 (Bug#18474).
+
+2014-09-13  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Prefer ptrdiff_t to int and avoid integer overflows.
+       * fileio.c (make_temp_name):
+       * font.c (font_parse_family_registry): Avoid integer
+       overflow on string size calculation.
+       * data.c (Faset): Likewise for byte index.
+
+2014-09-12  Detlev Zundel  <dzu@member.fsf.org>
+
+       * buffer.c (syms_of_buffer): DEFSYM Qchoice (Bug#18337).
+
+2014-09-11  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * lisp.h (make_local_string): Nitpick indent.
+       * print.c (Fprin1_to_string): Remove unused GCPROs.
+
+       More debugging aids around GCPROs.
+       * lisp.h (struct gcpro) [DEBUG_GCPRO]: Add extra members.
+       (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, GCPRO7):
+       Minor restyle.  If DEBUG_GCPRO, initialize extra fields.
+
+       * lread.c (readevalloop_eager_expand_eval): Add GCPRO and fix
+       bootstrap broken if GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.
+
+       Remove redundant GCPROs around Ffuncall and Fapply calls.
+       This is safe because Ffuncall protects all of its arguments by itself.
+       * charset.c (map_charset_for_dump): Remove redundant GCPRO.
+       * eval.c (Fapply, apply1, call0, call1, call2, call3, call4, call5)
+       (call6, call7): Likewise.  Use compound literals where applicable.
+       (run_hook_with_args_2): Use compound literal.
+
+2014-09-11  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Pacify --enable-gcc-warnings when no window system is used.
+       These warnings found that subscript error, so they seem worthwhile.
+       * composite.c (char_composable_p): Simplify a bit.
+       * frame.c (x_set_frame_parameters): Add an IF_LINT.
+       * frame.c (x_set_horizontal_scroll_bars, x_set_scroll_bar_height):
+       * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS):
+       * window.c (set_window_scroll_bars):
+       Use USE_HORIZONTAL_SCROLL_BARS for simplicity.
+       * frame.h [! USE_HORIZONTAL_SCROLL_BARS]:
+       Ignore -Wsuggest-attribute=const.
+       * window.h (USE_HORIZONTAL_SCROLL_BARS): New macro.
+       (WINDOW_HAS_HORIZONTAL_SCROLL_BAR): Use it.
+
+2014-09-10  Paul Eggert  <eggert@penguin.cs.ucla.edu>
+
+       * charset.c (Fget_unused_iso_final_char): Fix subscript error.
+       Use check_iso_charset_parameter instead of doing the checks by hand.
+       (check_iso_charset_parameter): Move up.  Check parameters a bit
+       more carefully, and return true for 96-char sets.  All callers changed.
+
+2014-09-10  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Simplify lisp.h by removing the __COUNTER__ business.
+       Problem reported by Dmitry Antipov in:
+       http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00220.html
+       * lisp.h (make_local_vector, make_local_string)
+       (build_local_string): Simplify by not bothering with __COUNTER__.
+       The __COUNTER__ business wasn't working properly, and was needed
+       only for hypothetical future expansion anyway.
+
+2014-09-10  Alp Aker  <alp.tekin.aker@gmail.com>
+
+       * nsterm.m (ns_draw_fringe_bitmap): Use the same logic as other
+       terms to determine bitmap color.  (Bug#18437)
+
+2014-09-10  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32.c (sys_write): Use SAFE_NALLOCA for the NL -> CRLF
+       translation buffer.
+
+2014-09-10  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * xterm.c (handle_one_xevent): Add braces to pacify gcc -Wall.
+
+2014-09-10  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * xterm.c (handle_one_xevent): Detect iconified by looking at
+       _NET_WM_STATE_HIDDEN.
+
+2014-09-10  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * lisp.h (DEFINE_GDB_SYMBOL_ENUM): Remove.
+       These can generate a constant with the correct value but the wrong
+       width, which doesn't work as a printf argument.  All uses removed.
+       Problem reported by Dmitry Antipov in:
+       http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00213.html
+       (ENUMABLE): Remove; no longer needed.
+       (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
+       Remove; no longer needed because of the above change.
+       Each definiens moved to the only use.
+
+       Improve the experimental local and scoped allocation.
+       * alloc.c (local_string_init, local_vector_init):
+       New functions, defined if USE_LOCAL_ALLOCATORS.
+       Mostly, these are moved here from lisp.h, as it's not
+       clear it's worth making them inline.
+       * lisp.h (USE_STACK_LISP_OBJECTS): Default to false.
+       (GCALIGNED): Depend on HAVE_STRUCT_ATTRIBUTE_ALIGNED and
+       USE_STACK_LISP_OBJECTS, not on a laundry list.
+       (local_string_init, local_vector_init): New decls.
+       (union Aligned_Cons): New type.
+       (scoped_cons): Use it.  Give up on the char trick, as it's a too
+       much of a maintenance hassle; if someone wants this speedup
+       they'll just need to convince their compiler to align properly.
+       Conversely, use the speedup if struct Lisp_Cons happens to
+       be aligned even without a directive.  Better yet, help it along
+       by using union Aligned_Cons rather than struct Lisp_Cons.
+       (pointer_valid_for_lisp_object): Remove.  This check is not
+       necessary, since make_lisp_ptr is already doing it.  All uses removed.
+       (local_vector_init, local_string_init): Move to alloc.c.
+       (build_local_vector): Remove this awkward macro, replacing with ...
+       (make_local_vector): New macro, which acts more like a function.
+       Use statement expressions and use __COUNTER__ to avoid macro
+       capture.  Fall back on functions if these features are not supported.
+       (build_local_string, make_local_string): Likewise.
+
+2014-09-09  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * xterm.c (x_term_init): Consolidate duplicated code.
+       [USE_LUCID]: Revert 2014-04-02 change (Bug#18403).  Add comment.
+       (x_delete_terminal): Do not close X connection fd (Bug#18403).
+       Add eassert and mark dpyinfo as dead only if it was alive.
+
+       Add macros to allocate temporary Lisp objects with alloca.
+       Respect MAX_ALLOCA and fall back to regular GC for large objects.
+       * character.h (parse_str_as_multibyte): Move prototype to ...
+       * lisp.h (parse_str_as_multibyte): ... here.
+       (struct Lisp_Cons): Add GCALIGNED attribute if supported.
+       (scoped_cons, scoped_list2, build_local_vector, build_local_string):
+       New macros.
+       (scoped_cons_init, pointer_valid_for_lisp_object, local_vector_init)
+       (local_string_init): New functions.
+       * alloc.c (verify_alloca) [ENABLE_CHECKING]: New function.
+       (init_alloc_once): Call it.
+
+       Cleanup last change and make all new stuff conditional.
+       * lisp.h (build_local_string): Rename to ...
+       (make_local_string): ... this macro.
+       (build_local_string, scoped_list1, scoped_list3): New macros.
+       (toplevel) [USE_STACK_LISP_OBJECTS]: Define all new macros
+       and functions as such, use regular fallbacks otherwise.
+       * alloc.c (verify_alloca) [USE_STACK_LISP_OBJECTS]: Define
+       conditionally.
+
+2014-09-08  Eli Zaretskii  <eliz@gnu.org>
 
        * dispnew.c (prepare_desired_row): When MODE_LINE_P is zero,
        always make sure the marginal areas of the row are in sync with
        what the window wants.  (Bug#18419)
 
-2014-09-04  Eli Zaretskii  <eliz@gnu.org>
-
        * data.c (set_internal): Use assq_no_quit, not Fassq, to find an
        existing binding of a variable, to avoid silently aborting
        commands that use specbind.  (Bug#18331)
 
-2014-09-02  Eli Zaretskii  <eliz@gnu.org>
+2014-09-07  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Fix bug uncovered by changing alloca to auto buffer (Bug#18410).
+       * coding.c (growable_destination): New function.
+       (produce_chars): Use it for sanity checks.  Do not fiddle with
+       dst_end if the source and destination are both nil, as it's
+       the caller's responsibility to avoid overlap.
+       * keyboard.c (read_decoded_event_from_main_queue):
+       The destination must be MAX_MULTIBYTE_LENGTH times the max source
+       length, not 4 times, to prevent decode_coding_c_string from trying
+       to reallocate a destination.  This removes the need for the FIXME.
+
+       * callproc.c (exec_failed) [DOS_NT]: Define a dummy.
+       All callers simplified.  Add a comment about exec_failed, vfork,
+       and alloca.
+
+       Adjust drag-and-drop fix when window is above top (Bug#18303).
+       * xselect.c (x_fill_property_data): Don't let sign bit of negative
+       XCDR bleed into XCAR's encoded value.  Improve checks for
+       out-of-range data while we're at it.
+
+2014-09-07  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * xselect.c (x_fill_property_data): Handle negative XCDR when data
+       is CONSP (Bug#18303).
+
+2014-09-07  Eli Zaretskii  <eliz@gnu.org>
+
+       * callproc.c (child_setup) [WINDOWSNT]: Don't call exec_failed if
+       'alloca' gets passed arguments larger than MAX_ALLOCA.
+
+       * font.c (MAX): Define if not defined elsewhere.
+
+2014-09-07  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * keyboard.c (read_decoded_event_from_main_queue): Reinstitute alloca
+       here for destination buffer, to work around what appears to be a
+       bug in decode_coding_c_string when the source and destination are
+       both C strings.
+
+       Use SAFE_ALLOCA etc. to avoid unbounded stack allocation (Bug#18410).
+       This follows up on the recent thread in emacs-devel on alloca; see:
+       http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00042.html
+       This patch also cleans up alloca-related glitches noted while
+       examining the code looking for unbounded alloca.
+       * alloc.c (listn):
+       * callproc.c (init_callproc):
+       Rewrite to avoid need for alloca.
+       * buffer.c (mouse_face_overlay_overlaps)
+       (report_overlay_modification):
+       * buffer.h (GET_OVERLAYS_AT):
+       * coding.c (make_subsidiaries):
+       * doc.c (Fsnarf_documentation):
+       * editfns.c (Fuser_full_name):
+       * fileio.c (Ffile_name_directory, Fexpand_file_name)
+       (search_embedded_absfilename, Fsubstitute_in_file_name):
+       * fns.c (Fmake_hash_table):
+       * font.c (font_vconcat_entity_vectors, font_update_drivers):
+       * fontset.c (fontset_pattern_regexp, Ffontset_info):
+       * frame.c (Fmake_terminal_frame, x_set_frame_parameters)
+       (xrdb_get_resource, x_get_resource_string):
+       * ftfont.c (ftfont_get_charset, ftfont_check_otf, ftfont_drive_otf):
+       * ftxfont.c (ftxfont_draw):
+       * image.c (xbm_load, xpm_load, jpeg_load_body):
+       * keyboard.c (echo_add_key, menu_bar_items, tool_bar_items)
+
+       * keymap.c (Fdescribe_buffer_bindings, describe_map):
+       * lread.c (openp):
+       * menu.c (digest_single_submenu, find_and_call_menu_selection)
+       (find_and_return_menu_selection):
+       * print.c (PRINTFINISH):
+       * process.c (Fformat_network_address):
+       * scroll.c (do_scrolling, do_direct_scrolling, scrolling_1):
+       * search.c (search_buffer, Fmatch_data, Fregexp_quote):
+       * sound.c (wav_play, au_play):
+       * syntax.c (skip_chars):
+       * term.c (tty_menu_activate, tty_menu_show):
+       * textprop.c (get_char_property_and_overlay):
+       * window.c (Fset_window_configuration):
+       * xdisp.c (safe__call, next_overlay_change, vmessage)
+       (compute_overhangs_and_x, draw_glyphs, note_mouse_highlight):
+       * xfaces.c (face_at_buffer_position):
+       * xmenu.c (x_menu_show):
+       Use SAFE_ALLOCA etc. instead of plain alloca, since the
+       allocation size isn't bounded.
+       * callint.c (Fcall_interactively): Redo memory_full check
+       so that it can be done at compile-time on some platforms.
+       * coding.c (MAX_LOOKUP_MAX): New constant.
+       (get_translation_table): Use it.
+       * callproc.c (call_process): Use SAFE_NALLOCA instead of
+       SAFE_ALLOCA, to catch integer overflows on size calculation.
+       (exec_failed) [!DOS_NT]: New function.
+       (child_setup) [!DOS_NT]: Use it.
+       * editfns.c (Ftranspose_regions):
+       Hoist USE_SAFE_ALLOC + SAFE_FREE out of 'if'.
+       * editfns.c (check_translation):
+       Allocate larger buffers on the heap.
+       * eval.c (internal_lisp_condition_case):
+       Check for MAX_ALLOCA overflow.
+       * fns.c (sort_vector): Use SAFE_ALLOCA_LISP rather than Fmake_vector.
+       (Fbase64_encode_region, Fbase64_decode_region):
+       Avoid unnecessary calls to SAFE_FREE before 'error'.
+       * buffer.c (mouse_face_overlay_overlaps):
+       * editfns.c (Fget_pos_property, check_translation):
+       * eval.c (Ffuncall):
+       * font.c (font_unparse_xlfd, font_find_for_lface):
+       * ftfont.c (ftfont_drive_otf):
+       * keyboard.c (echo_add_key, read_decoded_event_from_main_queue)
+       (menu_bar_items, tool_bar_items):
+       * sound.c (Fplay_sound_internal):
+       * xdisp.c (load_overlay_strings, dump_glyph_row):
+       Use an ordinary auto buffer rather than alloca, since the
+       allocation size is fixed and small.
+       * ftfont.c: Include <c-strcase.h>.
+       (matching_prefix): New function.
+       (get_adstyle_property): Use it, to avoid need for alloca.
+       * keyboard.c (echo_add_key):
+       * keymap.c (describe_map): Use ptrdiff_t, not int.
+       * keyboard.c (echo_add_key): Prefer sizeof to strlen.
+       * keymap.c (Fdescribe_buffer_bindings): Use SBYTES, not SCHARS,
+       when counting bytes.
+       * lisp.h (xlispstrdupa): Remove, replacing with ...
+       (SAFE_ALLOCA_STRING): ... new macro with different API.
+       This fixes a portability problem, namely, alloca result
+       passed to another function.  All uses changed.
+       (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Check for MAX_ALLOCA,
+       not MAX_ALLOCA - 1.
+       * regex.c (REGEX_USE_SAFE_ALLOCA, REGEX_SAFE_FREE)
+       (REGEX_ALLOCATE): New macros.
+       (REGEX_REALLOCATE, REGEX_ALLOCATE_STACK, REGEX_REALLOCATE_STACK)
+       (REGEX_FREE_STACK, FREE_VARIABLES, re_match_2_internal):
+       Use them.
+       * xdisp.c (message3): Use SAFE_ALLOCA_STRING rather than doing it
+       by hand.
+       (decode_mode_spec_coding): Store directly into buf rather than
+       into an alloca temporary and copying the temporary to the buf.
+
+2014-09-06  Eli Zaretskii  <eliz@gnu.org>
+
+       * Makefile.in (EMACS_HEAPSIZE): Remove, no longer used.  (Bug#18416)
+
+2014-09-04  Jan D  <jan.h.d@swipnet.se>
+
+       * xterm.c (x_term_init): Don't call x_session_initialize if running
+       as a daemon (Bug#18375).
+
+       * xsmfns.c: Initialize ice_fd.
+
+2014-09-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Less chatter in 'make' output.
+       * Makefile.in (AM_V_GEN, am__v_GEN_, am__v_GEN_0, am__v_GEN_1, AM_V_at)
+       (am__v_at_, am__v_at_0, am__v_at_1):  New macros, taken from Automake.
+       ($(etc)/DOC, buildobj.h, gl-stamp): Use them.
+
+2014-09-03  Martin Rudalics  <rudalics@gmx.at>
+
+       * buffer.c (scroll-bar-height): Fix typo in doc-string.
+       * frame.c (Vdefault_frame_horizontal_scroll_bars):
+       Remove variable.
+       * nsfns.m (Fx_create_frame):
+       * w32fns.c (Fx_create_frame):
+       * xfns.c (Fx_create_frame): Default horizontal scroll bars to
+       nil.
+
+2014-09-03  Eli Zaretskii  <eliz@gnu.org>
 
        * dispnew.c (buffer_posn_from_coords): Fix an off-by-one error in
        the reported row in the case of a window with a header line, by
        improving on the fix committed in 2011-10-08T10:58:50Z!eliz@gnu.org
        eliz@gnu.org-20111008105850-ht4tvsayohvr1kjc.  (Bug#18384)
 
-2014-09-02  Paul Eggert  <eggert@cs.ucla.edu>
+2014-09-03  Paul Eggert  <eggert@cs.ucla.edu>
 
        * eval.c (internal_lisp_condition_case): Don't overrun the stack
        when configured --with-wide-int on typical 32-bit platforms.
 
-2014-08-31  Eli Zaretskii  <eliz@gnu.org>
+2014-09-03  Eli Zaretskii  <eliz@gnu.org>
 
        * xdisp.c (display_and_set_cursor): Call erase_phys_cursor also
        when HPOS is negative, for the benefit of R2L glyph rows whose
        newline overflows into the fringe.
 
-2014-08-30  Ken Brown  <kbrown@cornell.edu>
+2014-09-03  Ken Brown  <kbrown@cornell.edu>
 
-       * conf_post.h (strnicmp) [CYGWIN && HAVE_NTGUI]: Define.
-       (Bug#18366)
+       * conf_post.h (strnicmp) [CYGWIN && HAVE_NTGUI]: Define.  (Bug#18366)
 
-2014-08-28  Eli Zaretskii  <eliz@gnu.org>
+2014-09-02  Paul Eggert  <eggert@cs.ucla.edu>
 
-       * syntax.c (scan_lists): Don't examine positions before BEGV.
-       (Bug#18339)
+       Minor cleanup of recent strlen-avoiding patch.
+       * fileio.c (CHECK_LENGTH): Remove.
+       Rewrite callers so that they don't need it.
+       (Fexpand_file_name) [DOS_NT]: Fix a case where directory length
+       variable wasn't set.
+
+2014-09-02  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * fileio.c (CHECK_LENGTH): New macro.
+       (Fexpand_file_name): Use it and get rid of a few more calls
+       to strlen and strcat.
+       * callproc.c (egetenv_internal): Add arg and rename from egetenv ...
+       * lisp.h (egetenv): ... because of a new inline function used to
+       avoid calls to strlen for a compile-time constants.
+
+       * buffer.h (decode_buffer): New function.
+       * buffer.c (Fbuffer_name, Fbuffer_file_name, Fbuffer_base_buffer)
+       (Fbuffer_local_variables, Fbuffer_modified_p, Fbuffer_modified_tick)
+       (Fbuffer_chars_modified_tick, Fdelete_all_overlays):
+       * data.c (Flocal_variables_p):
+       * fileio.c (Fverify_visited_file_modtime):
+       * marker.c (live_buffer): Use it.
+
+2014-09-01  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Avoid extra calls to strlen in filesystem I/O routines.
+       * fileio.c (Fexpand_file_name): Avoid calls to strlen if
+       the length of 'newdir' is known or may be precalculated.
+       (file_accessible_directory_p): Prefer to pass Lisp_Object,
+       not 'char *', and so use precalculated length.
+       (Ffile_accessible_directory_p):
+       * callproc.c (encode_current_directory, init_callproc):
+       * charset.c (init_charset):
+       * lread.c (load_path_check, load_path_default): Adjust users.
+       * lisp.h (file_accessible_directory_p): Tweak prototype.
+
+2014-09-01  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32proc.c (w32_compare_strings): Support "C" and "POSIX"
+       locales.
+
+2014-09-01  Paul Eggert  <eggert@cs.ucla.edu>
+
+       --enable-silent-rules now suppresses more chatter.
+       * Makefile.in (AM_DEFAULT_VERBOSITY, AM_V_CC, am__v_CC_)
+       (am__v_CC_0, am__v_CC_1, AM_V_CCLD, am__v_CCLD_, am__v_CCLD_0)
+       (am__v_CCLD_1): New macros, taken from Automake.
+       (.c.o, .m.o, temacs$(EXEEXT)): Use them.
+
+       Clean up extern decls a bit.
+       * bytecode.c: Include blockinput.h and keyboard.h rather
+       than rolling their APIs by hand.
+       * emacs.c: Include regex.h and rely on its and lisp.h's API
+       rather than rolling them by hand.
+       * lastfile.c: Include lisp.h, to check this file's API.
+       * lisp.h (lisp_eval_depth, my_edata, my_endbss, my_endbss_static):
+       New decls.
+       * regex.h (re_max_failures): New decl.
+       * unexcw.c, unexmacosx.c, unexw32.c:
+       Rely on lisp.h's API rather than rolling it by hand.
+       * vm-limit.c (__after_morecore_hook, __morecore, real_morecore):
+       Declare at top level, to pacify GCC -Wnested-externs.
 
-2014-08-25  Eli Zaretskii  <eliz@gnu.org>
+2014-08-31  Eli Zaretskii  <eliz@gnu.org>
 
-       * conf_post.h (_GL_EXECINFO_INLINE) [MSDOS]: Don't define.
+       * xdisp.c (get_glyph_string_clip_rects): Don't let the width of a
+       clipping rectangle become negative (i.e. large positive, since
+       it's an unsigned data type).  This can happen in R2L hscrolled
+       glyph rows, and caused us to draw the cursor glyph on the fringe.
+       For the details, see
+       http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00543.html.
+
+2014-08-31  Ken Brown  <kbrown@cornell.edu>
 
-2014-08-18  Eli Zaretskii  <eliz@gnu.org>
+       * gmalloc.c: Don't include <stdlib.h>.  Declare system malloc and
+       friends before defining hybrid_malloc and friends if HYBRID_MALLOC
+       is defined.  (Bug#18368)
+
+2014-08-30  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Vector-sorting fixes (Bug#18361).
+       It's not safe to call qsort or qsort_r, since they have undefined
+       behavior if the user-specified predicate is not a total order.
+       Also, watch out for garbage-collection while sorting vectors.
+       * fns.c: Include <vla.h>.
+       (sort_vector_predicate) [!HAVE_QSORT_R]: Remove.
+       (sort_vector_compare): Remove, replacing with ....
+       (inorder, merge_vectors, sort_vector_inplace, sort_vector_copy):
+       ... these new functions.
+       (sort_vector): Rewrite to use the new functions.
+       GCPRO locals, since the predicate can invoke the GC.
+       Since it's in-place return void; caller changed.
+       (merge): Use 'inorder', for clarity.
+
+       * sysdep.c (str_collate): Clear errno just before wcscoll(_l).
+       One can't hoist this out of the 'if', because intervening calls to
+       newlocale, twolower, etc. can change errno.
+
+2014-08-30  Eli Zaretskii  <eliz@gnu.org>
+
+       * sysdep.c (str_collate) [__STDC_ISO_10646__]: Improve the
+       wording of the error messages.
+       (str_collate) [WINDOWSNT]: Signal an error if w32_compare_strings
+       sets errno.
+
+       * w32proc.c (get_lcid_callback): Accept locale specifications
+       without the country part, as in "enu" vs "enu_USA".
+       (w32_compare_strings): Signal an error if a locale was specified,
+       but couldn't be translated into a valid LCID.
+
+2014-08-29  Michael Albinus  <michael.albinus@gmx.de>
+
+       * sysdep.c (str_collate) [__STDC_ISO_10646__]: Move up setting errno.
+
+2014-08-29  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * sysdep.c (str_collate) [__STDC_ISO_10646__]: Do not look at
+       errno after towlower_l.  errno's value is not specified after
+       towlower_l.  Instead, assume that towlower_l returns its argument
+       on failure, which is portable in practice.
+
+2014-08-29  Eli Zaretskii  <eliz@gnu.org>
+
+       * fns.c (Fstring_collate_lessp, Fstring_collate_equalp): Doc fix.
+
+       * w32proc.c (w32_compare_strings): Accept additional argument
+       IGNORE_CASE.  Set up the flags for CompareStringW to ignore case
+       if requested.  If w32-collate-ignore-punctuation is non-nil, add
+       NORM_IGNORESYMBOLS to the flags.
+       (LINGUISTIC_IGNORECASE): Define if not already defined.
+       (syms_of_ntproc) <Vw32_collate_ignore_punctuation>: New variable.
+
+       * sysdep.c (str_collate) [WINDOWSNT]: Adapt to the interface
+       change.
+
+2014-08-29  Michael Albinus  <michael.albinus@gmx.de>
+
+       * sysdep.c (LC_CTYPE, LC_CTYPE_MASK, towlower_l):
+       Define substitutes for platforms that lack them.
+       (str_collate): Add arguments locale and ignore_case.
+
+       * fns.c (Fstring_collate_lessp, Fstring_collate_equalp):
+       Add optional arguments LOCALE and IGNORE-CASE.
+
+       * lisp.h (str_collate): Adapt argument list.
+
+2014-08-29  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Add vectors support to Fsort.
+       * fns.c (sort_vector, sort_vector_compare): New functions.
+       (sort_list): Likewise, refactored out of ...
+       (Fsort): ... adjusted user.  Mention vectors in docstring.
+       (sort_vector_predicate) [!HAVE_QSORT_R]: New variable.
+       * alloc.c (make_save_int_obj): New function.
+       * lisp.h (enum Lisp_Save_Type): New member SAVE_TYPE_INT_OBJ.
+       (make_save_int_obj): Add prototype.
+
+       Fix last change to support Darwin/OSX and FreeBSD (Bug#18354).
+       * sysdep.c (sort_vector_compare) [DARWIN_OS || __FreeBSD__]:
+       Conditionally define to match system's qsort_r signature.
+       (sort_vector) [DARWIN_OS || __FreeBSD__]: Likewise in call to qsort_r.
+
+2014-08-28  Ken Brown  <kbrown@cornell.edu>
+
+       Add support for HYBRID_MALLOC, allowing the use of gmalloc before
+       dumping and the system malloc after dumping.  (Bug#18222)
+
+       * conf_post.h (malloc, realloc, calloc, free) [HYBRID_MALLOC]:
+       Define as macros, expanding to hybrid_malloc, etc.
+       (HYBRID_GET_CURRENT_DIR_NAME): New macro.
+       (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]: Define as
+       macro.
+       * gmalloc.c: Set up the infrastructure for HYBRID_MALLOC, with a
+       full implementation on Cygwin.  Remove Cygwin-specific code that
+       is no longer needed.
+       (malloc, realloc, calloc, free, aligned_alloc) [HYBRID_MALLOC]:
+       Redefine as macros expanding to gmalloc, grealloc, etc.
+       (DUMPED, ALLOCATED_BEFORE_DUMPING) [CYGWIN]: New macros.
+       (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]: Undefine.
+       (USE_PTHREAD, posix_memalign) [HYBRID_MALLOC]: Don't define.
+       (hybrid_malloc, hybrid_calloc, hybrid_free, hybrid_realloc)
+       [HYBRID_MALLOC]:
+       (hybrid_get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]:
+       (hybrid_aligned_alloc) [HYBRID_MALLOC && (HAVE_ALIGNED_ALLOC ||
+       HAVE_POSIX_MEMALIGN)]: New functions.
+       * alloc.c (aligned_alloc) [HYBRID_MALLOC && (ALIGNED_ALLOC ||
+       HAVE_POSIX_MEMALIGN)]: Define as macro expanding to
+       hybrid_aligned_alloc; declare.
+       (USE_ALIGNED_ALLOC) [HYBRID_MALLOC && (ALIGNED_ALLOC ||
+       HAVE_POSIX_MEMALIGN)]: Define.
+       (refill_memory_reserve) [HYBRID_MALLOC]: Do nothing.
+       * sysdep.c (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]:
+       Define as macro, expanding to gget_current_dir_name, and define
+       the latter.
+       * emacs.c (main) [HYBRID_MALLOC]: Don't call memory_warnings() or
+       malloc_enable_thread().  Don't initialize malloc.
+       * lisp.h (NONPOINTER_BITS) [CYGWIN]: Define (because GNU_MALLOC is
+       no longer defined on Cygwin).
+       (refill_memory_reserve) [HYBRID_MALLOC]: Don't declare.
+       * sheap.c (bss_sbrk_buffer_end): New variable.
+       * unexcw.c (__malloc_initialized): Remove variable.
+       * ralloc.c: Throughout, treat HYBRID_MALLOC the same as
+       SYSTEM_MALLOC.
+       * xdisp.c (decode_mode_spec) [HYBRID_MALLOC]: Don't check
+       Vmemory_full.
+
+2014-08-28  Martin Rudalics  <rudalics@gmx.at>
+
+       * w32term.c (w32_horizontal_scroll_bar_handle_click):
+       In `event->y' return entire range (the size of the scroll bar minus
+       that of the thumb).
+       * xterm.c (xm_scroll_callback, xaw_jump_callback): In `whole'
+       return entire range (the scaled size of the scroll bar minus
+       that of the slider).  In `portion' return the scaled position of
+       the slider.
+       (xaw_jump_callback): Restore part of code for vertical scroll
+       bar broken in change from 2014-07-27.
+       (xaw_scroll_callback): Provide incremental scrolling with
+       horizontal scroll bars.
+
+2014-08-28  Eli Zaretskii  <eliz@gnu.org>
 
-       * xdisp.c (handle_stop): Improve commentary.
+       * conf_post.h (_GL_EXECINFO_INLINE) [MSDOS]: Don't define.
 
        * indent.c (Fvertical_motion): Fix vertical motion up through a
        display property after a newline.  (Bug#18276)
 
-2014-08-17  Eli Zaretskii  <eliz@gnu.org>
-
        * xdisp.c (display_line): Don't assume that the call to
        reseat_at_next_visible_line_start ends up at a character
-       immediately following the newline on the previous line.  Avoids
-       setting the ends_at_zv_p flag on screen lines that are not at or
+       immediately following the newline on the previous line.
+       Avoids setting the ends_at_zv_p flag on screen lines that are not at or
        beyond ZV, which causes infloop in redisplay.  For the details, see
        http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00368.html.
 
        * dispnew.c (buffer_posn_from_coords): Fix mirroring of X
        coordinate for hscrolled R2L screen lines.  (Bug#18277)
 
-2014-08-11  Ken Brown  <kbrown@cornell.edu>
+2014-08-28  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * sysdep.c (LC_COLLATE, LC_COLLATE_MASK): Give individual defaults
+       (Bug#18051).
+
+2014-08-27  Eli Zaretskii  <eliz@gnu.org>
+
+       * syntax.c (scan_lists): Don't examine positions before BEGV.
+       (Bug#18339)
+
+2014-08-27  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Improve robustness of new string-collation code (Bug#18051).
+       * sysdep.c (LC_COLLATE, LC_COLLATE_MASK, freelocale, locale_t)
+       (newlocale, wcscoll_l): Define substitutes for platforms that
+       lack them, so as to simplify the mainline code.
+       (str_collate): Simplify the code by assuming the above definitions.
+       Use wcscoll_l, not uselocale, as uselocale is too fragile.
+       For example, the old version left the Emacs in the wrong locale if
+       wcscoll reported an error.  Use 'int', not ptrdiff_t, for the int
+       result.  Report an error if newlocale fails.
+
+2014-08-27  Michael Albinus  <michael.albinus@gmx.de>
+
+       * lisp.h (str_collate):
+       * sysdep.c (str_collate): Return int.
+       (str_collate) [__STDC_ISO_10646__]: Propagate error of wcscoll.
+
+2014-08-27  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Fix some glitches in previous change.
+       * sysdep.c (stack_direction): Replace stack_grows_down
+       to simplify calculation of stack boundaries.
+       (handle_sigsegv): Check whether we really crash somewhere near
+       to stack boundary, and handle fatal signal as usual if not.
+       (init_sigsegv): Adjust accordingly.
+       * keyboard.c (Vtop_level_message): Rename to
+       Vinternal__top_level_message, as suggested by Stefan Monnier in
+       http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00493.html
+       All related users changed.
+
+2014-08-26  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Handle C stack overflow caused by too nested Lisp evaluation.
+       * lisp.h (toplevel) [HAVE_STACK_OVERFLOW_HANDLING]: Declare
+       siglongjmp point to transfer control from SIGSEGV handler.
+       * keyboard.c (return_to_command_loop, recover_top_level_message)
+       [HAVE_STACK_OVERFLOW_HANDLING]: New variables.
+       (regular_top_level_message): New variable.
+       (command_loop) [HAVE_STACK_OVERFLOW_HANDLING]: Handle non-local
+       exit from SIGSEGV handler and adjust message displayed by Vtop_level
+       if appropriate.
+       (syms_of_keyboard): DEFVAR Vtop_level_message and initialize
+       new variables described above.
+       * sysdep.c [HAVE_SYS_RESOURCE_H]: Include sys/resource.h as such.
+       (stack_grows_down, sigsegv_stack, handle_sigsegv)
+       [HAVE_STACK_OVERFLOW_HANDLING]: New variables and function.
+       (init_sigsegv): New function.
+       (init_signals): Use it.
+
+2014-08-25  Ken Brown  <kbrown@cornell.edu>
+
+       * emacs.c (main): Remove use of obsolete macro
+       G_SLICE_ALWAYS_MALLOC.
+
+2014-08-25  Eli Zaretskii  <eliz@gnu.org>
+
+       Implement locale-sensitive string collation for MS-Windows.
+       * w32proc.c (get_lcid_callback, get_lcid, w32_compare_strings):
+       New functions.  (Bug#18051)
+
+       * w32.h (w32_compare_strings): Add prototype.
+
+       * w32.c <g_b_init_compare_string_w>: New global flag.
+       (globals_of_w32): Initialize it.
+
+       * sysdep.c (str_collate) [WINDOWSNT]: Implementation for MS-Windows.
+
+       * fns.c (Fstring_collate_lessp, Fstring_collate_equalp)
+       [WINDOWSNT]: Call str_collate on MS-Windows.
+
+2014-08-25  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       One more minor cleanup of font subsystem.
+       * font.h (struct font_driver): Convert text_extents to
+       return void because returned value is never actually used.
+       * macfont.m (macfont_text_extents):
+       * w32font.c (w32font_text_extents):
+       * xftfont.c (xftfont_text_extents): Adjust to return void
+       and assume that 'metrics' argument is always non-NULL.
+       * ftfont.c (ftfont_text_extents):
+       * xfont.c (xfont_text_extents): Likewise.  Avoid redundant memset.
+
+2014-08-25  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Minor cleanups of str_collate fix (Bug#18051).
+       * fns.c (str_collate): Move decl from here ...
+       * lisp.h (str_collate): ... to here.
+       * sysdep.c (str_collate): Prune away some of the forest of ifdefs.
+       Remove unnecessary casts.  Use SAFE_NALLOCA to avoid
+       potential problems with integer overflow.  Don't assume
+       setlocale succeeds.  Remove unnecessary test before restoring
+       locale via setlocale, and free the copied setlocale string
+       when done with it.
+
+2014-08-24  Michael Albinus  <michael.albinus@gmx.de>
+
+       * fns.c (Fstring_collate_lessp, Fstring_collate_equalp): New DEFUNs.
+
+       * sysdep.c (str_collate): New function.  (Bug#18051)
+
+2014-08-23  Karol Ostrovsky  <karol.ostrovsky@gmail.com>  (tiny change)
+
+       * Makefile.in (emacs$(EXEEXT)): Retry deletion of bootstrap-emacs
+       if the initial "rm -f" fails.  This is for MinGW builds, where
+       MS-Windows will not allow deleting the executable file of a
+       running program.
+
+2014-08-20  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32term.c (w32_scroll_bar_handle_click)
+       (w32_horizontal_scroll_bar_handle_click)
+       (x_scroll_bar_report_motion)
+       (x_horizontal_scroll_bar_report_motion): For SB_THUMBPOSITION and
+       SB_THUMBTRACK, use the 32-bit position information returned by
+       GetScrollInfo, not the 16-bit information returned in the Windows
+       message sent to us.
+
+2014-08-19  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32term.c (w32_horizontal_scroll_bar_handle_click): Fix the
+       second coordinate ('y') reported for dragging the horizontal
+       scroll bar thumb.
+
+2014-08-19  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+       * xdisp.c (erase_phys_cursor): Fix confusion between window-relative
+       and text area-relative x-coordinates.
+
+2014-08-17  Eli Zaretskii  <eliz@gnu.org>
+
+       Avoid overwriting the reversed_p flags in the glyph matrices when
+       init_iterator or start_display are called.
+       * xdisp.c (init_iterator): Don't initialize the reversed_p flag of
+       the glyph row here.
+       (tool_bar_height, redisplay_tool_bar, try_window)
+       (try_window_reusing_current_matrix, try_window_id)
+       (get_overlay_arrow_glyph_row, display_menu_bar): Initialize the
+       reversed_p flag of the iterator's glyph row where the glyph row
+       is going to be redrawn.
+
+2014-08-16  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * xdisp.c (set_horizontal_scroll_bar): Don't use uninitialized local.
+
+2014-08-16  Martin Rudalics  <rudalics@gmx.at>
+
+       * w32term.c (w32_horizontal_scroll_bar_handle_click): In y part
+       of emacs_event return length from si.nPage to si.nMax.
+       * xdisp.c (set_horizontal_scroll_bar): For right-to-left text
+       interchange start and end of thumb.
+
+2014-08-15  Ken Brown  <kbrown@cornell.edu>
 
        * gmalloc.c (_malloc_mutex, _aligned_blocks_mutex) [CYGWIN]: Use
        ERRORCHECK mutexes.  (Bug#18222)
 
+2014-08-12  Martin Rudalics  <rudalics@gmx.at>
+
+       * frame.c (set_menu_bar_lines_1): Remove.
+       (set_menu_bar_lines): Call change_frame_size instead of
+       set_menu_bar_lines_1.
+
+2014-08-11  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * nsfns.m (Fx_create_frame): Call adjust_frame_size,
+       set f->official.
+
 2014-08-11  Glenn Morris  <rgm@gnu.org>
 
        * fileio.c: Revert 2013-01-31 change, which chose coding system for
        Move last piece back here from Fwrite_region.
        (Fwrite_region, syms_of_fileio): Update for above changes.
 
-2014-08-09  Martin Rudalics  <rudalics@gmx.at>
-
-       * window.c (Fwindow_new_total, Fwindow_new_normal)
-       (Fwindow_new_pixel, Fset_window_new_pixel)
-       (Fset_window_new_total, Fset_window_new_normal): Second attempt
-       to fix the doc-strings of these functions.  See:
-       http://lists.gnu.org/archive/html/bug-gnu-emacs/2014-08/msg00287.html
-
-2014-08-08  Martin Rudalics  <rudalics@gmx.at>
+2014-08-11  Martin Rudalics  <rudalics@gmx.at>
 
        * window.c (Fwindow_valid_p): Fix doc-string (Bug#18194).
        (Fwindow_new_total, Fwindow_normal_size, Fwindow_new_normal)
        (Fwindow_new_pixel, Fset_window_new_pixel)
        (Fset_window_new_total, Fset_window_new_normal)
        (Fwindow_resize_apply): Fix doc-strings (see Bug#18112).
+       See also:
+       http://lists.gnu.org/archive/html/bug-gnu-emacs/2014-08/msg00287.html
 
-2014-08-07  Eli Zaretskii  <eliz@gnu.org>
+2014-08-11  Eli Zaretskii  <eliz@gnu.org>
 
        * fontset.c (Finternal_char_font): Recompute basic faces if the
        frame's face cache was cleared.  (Bug#18162)
 
-2014-08-05  Dmitry Antipov  <dmantipov@yandex.ru>
+2014-08-11  Dmitry Antipov  <dmantipov@yandex.ru>
 
        Fix bug with uninitialized undo list of an indirect buffer (Bug#18180).
        * buffer.c (Fmake_indirect_buffer): Initialize undo list with the
        base buffer's undo list.
 
-2014-08-03  Dmitry Antipov  <dmantipov@yandex.ru>
+2014-08-10  Reuben Thomas  <rrt@sc3d.org>
+
+       Fix a couple of recent inadvertent breaks of the MSDOS port.
+       * msdos.c: include required menu.h
+       * term.c: set correct menu_show_hook on MSDOS.
 
-       Fix bug with an attempt to select uninitialized frame (Bug#18161).
-       * xfns.c (Fx_create_frame): Move call to change_frame_size to
-       a section where Lisp evaluation is disabled.  This way a pointer
-       to uninitialized frame is not accessible from Lisp, which becomes
-       critical if following call to x_figure_window_size throws an error.
+2014-08-10  Martin Rudalics  <rudalics@gmx.at>
+
+       Fix handling of menu bar line on TTY frames (Bug#18136)
+       (Bug#18196).
+       * dispnew.c (handle_window_change_signal):
+       * keyboard.c (Fsuspend_emacs): Call change_frame_size with
+       frame's menu bar lines subtracted from height.
+       * frame.c (frame_inhibit_resize): Inhibit resizing of TTY
+       frames.
+       (adjust_frame_size): Count in menu bar when setting FrameRows.
+       (make_terminal_frame): When setting up the frame's lines and
+       text height don't count in the menu bar.
+       (Fmake_terminal_frame): Call adjust_frame_size with menu bar
+       lines subtracted from height.
+       (do_switch_frame): Set tty's FrameRows to number of total lines
+       of frame.
+       (Fframe_pixel_height, Fframe_pixel_width): If no window system
+       is used, return total number of lines and columns.
+       * menu.c (emulate_dialog_with_menu): Use FRAME_TOTAL_LINES instead
+       of FRAME_LINES.
+       * term.c (OUTPUT, tty_set_terminal_modes)
+       (tty_set_terminal_window, tty_set_scroll_region)
+       (tty_clear_to_end, tty_write_glyphs, tty_write_glyphs_with_face)
+       (tty_ins_del_lines, tty_menu_display, tty_menu_activate):
+       Use FRAME_TOTAL_LINES instead of FRAME_LINES.
+       (Fresume_tty): Use FRAME_TOTAL_LINES instead of FRAME_LINES.
+       Call change_frame_size with frame's menu bar lines subtracted
+       from height.
+       * w32console.c (w32con_clear_to_end, w32con_clear_frame)
+       (w32con_ins_del_lines): Use FRAME_TOTAL_LINES instead of
+       FRAME_LINES.
 
-2014-08-02  Paul Eggert  <eggert@cs.ucla.edu>
+2014-08-09  Reuben Thomas  <rrt@sc3d.org>
+
+       * alloc.c (Fmemory_info): Remove a stray brace.
+
+       * process.c: Fix a comment typo.
+
+       * msdos.c, dosfns.c (init_dosfns): Remove support for DJGPP < 2.02.
+
+2014-08-09  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * widgetprv.h (EmacsFramePart): Remove font.
+
+       * widget.c (DEFAULT_FACE_FONT, EmacsFrameSetValues, setup_frame_gcs)
+       (resources, setup_frame_cursor_bits): Remove unused variables and
+       functions, esp. wrt. font (Bug#18227).
+
+2014-08-07  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * xterm.c (x_delete_terminal): Plug file descriptor leak (Bug#17691).
+
+2014-08-07  Reuben Thomas  <rrt@sc3d.org>
+
+       Refer to MS-DOS using the same name everywhere.
+
+       * editfns.c: Fix a couple of ``MS-DOG''s missed in the previous
+       commit.
+       * xfaces.c: ditto.
+
+2014-08-05  Martin Rudalics  <rudalics@gmx.at>
+
+       * w32term.c (w32_redeem_scroll_bar):
+       * xterm.c (XTredeem_scroll_bar): Revert part of last change by
+       not redeeming scroll bars that have been turned off.
+
+2014-08-05 Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * keyboard.c (safe_run_hooks): Follow the convenient style to bind
+       inhibit-quit to t and pass 2 args to safe_run_hook_funcall.  See
+       <http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00077.html>.
+       (safe_run_hook_funcall): Adjust accordingly.
+
+2014-08-04  Martin Rudalics  <rudalics@gmx.at>
+
+       * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS):
+       Condition correctly according to toolkit used.
+       * frame.c (make_initial_frame, make_terminal_frame)
+       (x_set_horizontal_scroll_bars, x_set_scroll_bar_height)
+       (Vdefault_frame_horizontal_scroll_bars): Correctly condition
+       assignments according to presence of toolkit scrollbars.
+       * window.h (WINDOW_HAS_HORIZONTAL_SCROLL_BAR):
+       Condition correctly according to toolkit used.
+       * window.c (set_window_scroll_bars): Set horizontal scroll bar
+       only if toolkit supports it.
+       * w32term.c (w32_redeem_scroll_bar): Always redeem scroll bar if
+       present.
+       * xterm.c (x_scroll_bar_create): Initialize horizontal slot for
+       non-toolkit builds.
+       (XTredeem_scroll_bar): Always redeem scroll bar if present.
+
+2014-08-04 Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * keyboard.c (safe_run_hook_funcall): Avoid consing around
+       Vinhibit_quit and prefer internal_condition_case_n to pass args.
+       (safe_run_hooks_error, safe_run_hooks_1): Adjust accordingly.
+       (safe_run_hooks): Remove comment which is not relevant any more.
+
+2014-08-03  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Don't let big frames overrun the stack.
+       * dispnew.c (mirrored_line_dance, mirror_line_dance, scrolling):
+       Use SAFE_NALLOCA, not alloca.
 
        Fix bug with clang + directory_files_internal + GC (Bug#16986).
        * dired.c (directory_files_internal): Use a volatile variable
        so that x_delete_terminal has a file descriptor to pass to
        delete_keyboard_wait_descriptor.
 
-2014-08-01  Eli Zaretskii  <eliz@gnu.org>
+       Don't mishandle year-9999 dates (Bug#18176).
+       * editfns.c (decode_time_components): Store an invalid timespec
+       on overflow, instead of returning false, so that the caller can
+       distinguish overflow from other errors.
+       (lisp_time_argument, lisp_seconds_argument): If the time is out
+       of range, signal a time overflow instead of an invalid time spec.
+       * keyboard.c (decode_timer): Treat time overflow like other
+       timespec errors.
+
+       Avoid undefined behavior with signed left shift.
+       Caught by 'gcc -fsanitize=undefined'.
+       * dispextern.h, scroll.c (scrolling_max_lines_saved, scrolling_1):
+       * dispnew.c (line_hash_code, scrolling):
+       * scroll.c (calculate_scrolling, calculate_direct_scrolling):
+       Use 'unsigned', not 'int', for line hashes.
+       (scrolling_max_lines_saved): Avoid mystery constants for hash sizes.
 
-       Fix display of R2L lines when the last character fits only partially.
-       See http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00476.html
-       for the details.
-       * xdisp.c (extend_face_to_end_of_line): If the last glyph of an
-       R2L row is visible only partially, give the row a negative x
+2014-08-02  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Make compare-strings more compatible with old behavior (Bug#17903).
+       * fns.c (Fcompare_strings): Silently bring too-large ends into range.
+
+2014-08-02  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * gtkutil.c (create_dialog): Force min spacing 10 between buttons.
+       Don't add label between left and right buttons (Bug#18129).
+
+2014-08-01  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Make functions static that no longer need to be extern.
+       * frame.c, frame.h (set_menu_bar_lines):
+       * keyboard.c (Qleftmost, Qrightmost):
+       * xfns.c, frame.h, menu.h (x_set_menu_bar_lines, x_set_tool_bar_lines)
+       (x_set_internal_border_width):
+       Now static.
+
+2014-08-01  Eli Zaretskii  <eliz@gnu.org>
+
+       Fix display of R2L lines when the last character fits only partially.
+       See http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00476.html
+       for the details.
+       * xdisp.c (extend_face_to_end_of_line): If the last glyph of an
+       R2L row is visible only partially, give the row a negative x
        offset.
        (display_line): Fix the calculation of the glyph whose pixel width
        is used to decide whether the last produced glyph fits on the
        line.  When the last glyph fits only partially, give the row a
        negative x offset.
 
-2014-07-29  Eli Zaretskii  <eliz@gnu.org>
-
        Fix hscroll of R2L lines that begin with a TAB or another wide glyph.
        * xdisp.c (append_stretch_glyph): In a R2L glyph row, decrease the
        pixel width of the first glyph that is hscrolled from display.
        (display_line): In R2L glyph rows, don't give a negative offset to
        row->x when the first glyph begins before first_visible_x.
 
-2014-07-29  Andreas Schwab  <schwab@suse.de>
+       * xdisp.c (display_line): If called with iterator set up to write
+       to a marginal area, delay the call to handle_line_prefix until we
+       switch back to the text area.  (Bug#18035)
+
+       * .gdbinit (xwindow): The members total_cols, total_lines,
+       left_col, and top_line are C integers (and has been so for the
+       last 1.5 years).
+
+2014-08-01  Andreas Schwab  <schwab@suse.de>
 
        * macros.c (Fstart_kbd_macro): Initialize kbd_macro_ptr and
        kbd_macro_end together with kbd_macro_buffer.  (Bug#18140)
 
-2014-07-28  Eli Zaretskii  <eliz@gnu.org>
+2014-08-01  Dmitry Antipov  <dmantipov@yandex.ru>
 
-       * xdisp.c (display_line): If called with iterator set up to write
-       to a marginal area, delay the call to handle_line_prefix until we
-       switch back to the text area.  (Bug#18035)
+       * atimer.c (toplevel) [HAVE_TIMERFD]: Include errno.h.
+       (timerfd_callback): Ignore weird events with no data.  Add tight
+       assertions and comments.
+       (init_atimer) [HAVE_TIMERFD]: Add environment variable to optionally
+       disable timerfd-based timer.  Use TFD_NONBLOCK for timer descriptor.
+
+2014-08-01  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * frame.c (x_set_frame_parameters): Fix typo in previous patch.
+       I had confused && with ||.
+
+2014-07-31  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Simplify timerfd configuration and fix some minor glitches.
+       * atimer.c (TIMERFD_CREATE_FLAGS): Remove; we now assume TFD_CLOEXEC.
+       (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
+       Fall back on timer_create if timerfd_create fails at runtime.
+       (resolution) [HAVE_CLOCK_GETRES]: Remove; we now rely on the
+       kernel primitives to do resolution.  All uses removed.
+       (timerfd) [!HAVE_TIMERFD]: Define to be -1, for convenience.
+       (turn_on_atimers): Clear timer_create-based timers too,
+       for consistency.
+
+       * frame.c (x_set_frame_parameters): Don't use uninitialized locals.
+       Without this change, the code can access the local variable 'width'
+       even when it has not been initialized, and likewise for 'height';
+       in either case this leads to undefined behavior.
+
+2014-07-30  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * xrdb.c (x_load_resources) [USE_MOTIF]: Although not strictly
+       necessary, put horizontal scroll bar resources as well.  See
+       <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00430.html>.
+       * xterm.c (x_sync_with_move): Really wait 0.5s, not 0.0005s.
+
+2014-07-29  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * xrdb.c (x_load_resources) [!USE_MOTIF]: Put horizontal scroll bar
+       background value to match the resource of its vertical counterpart.
+
+2014-07-29  Martin Rudalics  <rudalics@gmx.at>
+
+       * frame.c (adjust_frame_size): Use FRAME_WINDOW_P instead of
+       FRAME_X_WINDOW when calling x_set_window_size (Bug#18138).
+
+2014-07-28  Martin Rudalics  <rudalics@gmx.at>
+
+       * frame.c (x_set_frame_parameters): Revert part of 2014-07-24
+       change that added the top margin height to the requested height
+       and revert (undocumented) part of 2014-07-28 change that changed
+       the logic of whether a size change occurred.
+
+2014-07-28  Eli Zaretskii  <eliz@gnu.org>
 
        * .gdbinit (xwindow): The members total_cols, total_lines,
        left_col, and top_line are C integers (and has been so for the
        last 1.5 years).
 
-2014-07-20  Jan Djärv  <jan.h.d@swipnet.se>
+       * .gdbinit (xsubchartable): The members 'depth' and 'min_char' are
+       now C integers.
+
+2014-07-28  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       On GNU/Linux, use timerfd for asynchronous timers.
+       * atimer.c (toplevel) [HAVE_TIMERFD]: Include sys/timerfd.h.
+       (toplevel): Rename alarm_timer_ok to special_timer_available.
+       [HAVE_TIMERFD]: Declare timerfd.
+       [HAVE_CLOCK_GETRES]: Declare resolution.
+       (start_atimer) [HAVE_CLOCK_GETRES]: Round up timestamp to
+       system timer resolution.
+       (set_alarm) [HAVE_TIMERFD]: Use timerfd_settime.
+       (timerfd_callback) [HAVE_TIMERFD]: New function.
+       (atimer_result, debug_timer_callback, Fdebug_timer_check)
+       [ENABLE_CHECKING]: New function for the sake of automated tests.
+       (init_atimer) [HAVE_TIMERFD]: Setup timerfd.
+       [HAVE_CLOCK_GETRES]: Likewise for system timer resolution.
+       [ENABLE_CHECKING]: Defsubr test function.
+       * atimer.h (timerfd_callback) [HAVE_TIMERFD]: Add prototype.
+       * lisp.h (add_timer_wait_descriptor) [HAVE_TIMERFD]: Likewise.
+       * process.c (add_timer_wait_descriptor) [HAVE_TIMERFD]: New function.
+
+       Fix --without-x build and pacify --enable-gcc-warnings.
+       Problems reported in Bug#18122 and Bug#18124.
+       * frame.c (get_frame_param): Define even if !HAVE_WINDOW_SYSTEM.
+       (frame_windows_min_size): Now static.
+       * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS) [!HAVE_WINDOW_SYSTEM]:
+       Define as no-op.
+       (adjust_frame_size): Always declare prototype.
+
+       Fix Gnus-related issues reported by David Kastrup <dak@gnu.org> in
+       <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00370.html>.
+       * atimer.c (timerfd_callback): Always read expiration data.
+       Add comment.
+       (turn_on_atimers) [HAVE_TIMERFD]: Disarm timerfd timer.
+       * process.c (add_timer_wait_descriptor): Add timer descriptor
+       to input_wait_mask and non_process_wait_mask as well.
+
+2014-07-28  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * frame.c (x_set_frame_parameters): Don't use uninitialized locals.
+
+2014-07-27  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * nsterm.m (applicationDidFinishLaunching antialiasThresholdDidChange):
+       Reinstate code removed by the prevoius commit to this file.
+
+2014-07-27  Martin Rudalics  <rudalics@gmx.at>
+
+       * buffer.h (struct buffer): New fields scroll_bar_height and
+       horizontal_scroll_bar_type.
+       * buffer.c (bset_scroll_bar_height)
+       (bset_horizontal_scroll_bar_type): New functions.
+       (Fbuffer_swap_text): Handle old_pointm field.
+       (init_buffer_once): Set defaults for scroll_bar_height and
+       horizontal_scroll_bar_type.
+       (syms_of_buffer): New variables scroll_bar_height and
+       horizontal_scroll_bar_type.
+       * dispextern.h (window_part): Rename ON_SCROLL_BAR to
+       ON_VERTICAL_SCROLL_BAR.  Add ON_HORIZONTAL_SCROLL_BAR.
+       (set_vertical_scroll_bar): Remove prototype.
+       (x_change_tool_bar_height): Add prototype.
+       * dispnew.c (adjust_frame_glyphs_for_frame_redisplay)
+       (window_to_frame_vpos, update_frame_1, scrolling, init_display):
+       Use FRAME_TOTAL_COLS and FRAME_TOTAL_LINES instead of FRAME_COLS
+       and FRAME_LINES.
+       (adjust_frame_glyphs_for_window_redisplay): Rearrange lines.
+       (update_window): Start mode_line_row->y after horizontal scroll
+       bar.
+       (change_frame_size_1): Call adjust_frame_size.
+       (init_display): When changing the size of a tty frame do not
+       pass height of menu bar.
+       (Qframe_windows_min_size): New symbol.
+       * frame.h (struct frame): List tool bar fields after menu bar
+       fields.  Add official, total_lines, horizontal_scroll_bars,
+       config_scroll_bar_height and config_scroll_bar_lines fields.
+       (FRAME_HAS_HORIZONTAL_SCROLL_BARS)
+       (FRAME_CONFIG_SCROLL_BAR_HEIGHT, FRAME_CONFIG_SCROLL_BAR_LINES)
+       (FRAME_SCROLL_BAR_AREA_HEIGHT, FRAME_SCROLL_BAR_COLS)
+       (FRAME_SCROLL_BAR_LINES, FRAME_TOTAL_LINES, SET_FRAME_LINES)
+       (FRAME_WINDOWS_HEIGHT): New macros.
+       (SET_FRAME_HEIGHT, FRAME_TEXT_LINES_TO_PIXEL_HEIGHT)
+       (FRAME_PIXEL_Y_TO_LINE, FRAME_PIXEL_HEIGHT_TO_TEXT_LINES)
+       (FRAME_TEXT_TO_PIXEL_HEIGHT): Separately count top margin and
+       horizontal scroll bar.
+       (frame_inhibit_resize, adjust_frame_size)
+       (frame_windows_min_size): Add declarations.
+       (Qscroll_bar_height, Qhorizontal_scroll_bars)
+       (x_set_scroll_bar_default_height, x_set_left_fringe)
+       (x_set_right_fringe, x_set_vertical_scroll_bars)
+       (x_set_horizontal_scroll_bars, x_set_scroll_bar_width)
+       (x_set_scroll_bar_height): Add external declarations.
+       * frame.c: (frame_inhibit_resize, frame_windows_min_size)
+       (adjust_frame_size): New functions.
+       (make_frame): Initial horizontal_scroll_bars field.
+       Use SET_FRAME_LINES.  Don't allow horizontal scroll bar in
+       minibuffer window.
+       (make_initial_frame, make_terminal_frame): No horizontal scroll
+       bar in initial and terminal frames.  Use adjust_frame_size.
+       (Fframe_total_cols): Fix doc-string.
+       (Fframe_total_lines, Fscroll_bar_height): New Lisp functions.
+       (Fset_frame_height, Fset_frame_width, Fset_frame_size):
+       Rewrite using adjust_frame_size.
+       (Qscroll_bar_height, Qhorizontal_scroll_bars)
+       (Qframe_windows_min_size): New symbols.
+       (x_set_frame_parameters): Remove call of check_frame_size.
+       (x_report_frame_params): Return scroll_bar_height value.
+       (x_set_left_fringe, x_set_right_fringe): New functions.
+       (adjust_frame_height, x_set_internal_border_width)
+       (x_set_fringe_width): Remove.
+       (x_set_internal_border_width, x_set_vertical_scroll_bars)
+       (x_set_scroll_bar_width, x_set_right_divider_width)
+       (x_set_bottom_divider_width): Rewrite using adjust_frame_size.
+       (x_set_horizontal_scroll_bars, x_set_scroll_bar_height):
+       New functions.
+       (x_figure_window_size): Rewrite to make frame display the
+       expected number of lines.
+       (Vdefault_frame_scroll_bars): Rewrite doc-string.
+       (Vdefault_frame_horizontal_scroll_bars)
+       (Vframe_initial_frame_tool_bar_height)
+       (frame_inhibit_implied_resize): New variables.
+       * fringe.c (compute_fringe_widths): Remove.
+       * gtkutil.h (YG_SB_MIN, YG_SB_MAX, YG_SB_RANGE): Define.
+       (xg_create_horizontal_scroll_bar)
+       (xg_update_horizontal_scrollbar_pos)
+       (xg_set_toolkit_horizontal_scroll_bar_thumb)
+       (xg_get_default_scrollbar_height)
+       (xg_clear_under_internal_border): Extern.
+       * gtkutil.c (xg_frame_resized): Don't call
+       do_pending_window_change.
+       (xg_frame_set_char_size): Use adjust_frame_size.
+       (style_changed_cb): Call update_theme_scrollbar_height and
+       x_set_scroll_bar_default_height.
+       (x_wm_set_size_hint): Don't call check_frame_size.
+       (update_theme_scrollbar_height)
+       (xg_get_default_scrollbar_height)
+       (xg_create_horizontal_scroll_bar)
+       (xg_update_horizontal_scrollbar_pos)
+       (xg_set_toolkit_horizontal_scroll_bar_thumb): New functions.
+       (xg_create_scroll_bar): Set horizontal slot of bar.
+       (xg_initialize): Call update_theme_scrollbar_height.
+       (xg_clear_under_internal_border): No more static.
+       * insdel.c (adjust_suspend_auto_hscroll): New function.
+       (adjust_markers_for_delete, adjust_markers_for_insert)
+       (adjust_markers_for_replace): Call adjust_suspend_auto_hscroll.
+       * keyboard.c (readable_events, discard_mouse_events)
+       (make_lispy_event): Handle horizontal scroll bar click events.
+       (Fsuspend_emacs): When changing the size of a tty frame do not
+       pass height of menu bar.
+       (Qbefore_handle, Qhorizontal_handle, Qafter_handle, Qleft)
+       (Qright, Qleftmost, Qrightmost): New symbols.
+       * menu.c (Fx_popup_dialog): Use FRAME_TOTAL_LINES instead of
+       FRAME_LINES.
+       * minibuf.c (read_minibuf): Initialize suspend_auto_hscroll.
+       * nsfns.m (x_set_internal_border_width): New function.
+       * nsterm.m (ns_draw_fringe_bitmap, ns_set_vertical_scroll_bar):
+       Remove extended fringe code.
+       (x_set_window_size, x_new_font): Don't call
+       compute_fringe_widths.
+       * term.c (Fresume_tty): When changing the size of a tty frame do
+       not pass height of menu bar.
+       (clear_tty_hooks, set_tty_hooks):
+       Clear horizontal_scroll_bar_hook.
+       (init_tty): Frame has no horizontal scroll bars.
+       * termhooks.h (enum scroll_bar_part): Add scroll_bar_move_ratio,
+       scroll_bar_before_handle, scroll_bar_horizontal_handle,
+       scroll_bar_after_handle, scroll_bar_left_arrow,
+       scroll_bar_right_arrow, scroll_bar_to_leftmost and
+       scroll_bar_to_rightmost entries.
+       (enum event_kind): Add HORIZONTAL_SCROLL_BAR_CLICK_EVENT
+       (struct terminal): Add set_horizontal_scroll_bar_hook.
+       * w32console.c (initialize_w32_display):
+       Clear horizontal_scroll_bar_hook.
+       * w32fns.c (x_set_mouse_color): Use FRAME_W32_DISPLAY instead of
+       FRAME_X_DISPLAY.
+       (x_clear_under_internal_border, x_set_internal_border_width):
+       New functions.
+       (x_set_menu_bar_lines): Rewrite using frame_inhibit_resize.
+       Set windows_or_buffers_changed when adding the menu bar.
+       (x_set_tool_bar_lines): Rewrite using adjust_frame_size.
+       (x_change_tool_bar_height, x_set_scroll_bar_default_height)
+       (w32_createhscrollbar): New functions.
+       (w32_createscrollbar): Rename to w32_createvscrollbar.
+       (w32_createwindow): Init WND_HSCROLLBAR_INDEX.
+       (w32_name_of_message): Replace WM_EMACS_CREATESCROLLBAR by
+       WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR.
+       Add WM_EMACS_SHOWCURSOR.
+       (w32_wnd_proc): Handle WM_HSCROLL case.  In WM_WINDOWPOSCHANGING
+       case do not artificially impose WM size hints.
+       Handle WM_EMACS_SHOWCURSOR case.  Replace WM_EMACS_CREATESCROLLBAR case
+       by WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR
+       cases.
+       (my_create_tip_window): Replace WND_SCROLLBAR_INDEX by
+       WND_VSCROLLBAR_INDEX and WND_HSCROLLBAR_INDEX.
+       (unwind_create_frame_1): Remove.
+       (Fx_create_frame): Make both scrollbars the system standard
+       width and height.  Use official field of frame structure to
+       inhibit running window-configuration-change-hook.
+       (x_create_tip_frame): Call SET_FRAME_LINES and change_frame_size
+       pixelwise.  Handle frame's official field.
+       (w32_frame_parm_handlers): Remove x_set_fringe_width
+       entries. Add x_set_scroll_bar_height,
+       x_set_horizontal_scroll_bars, x_set_left_fringe and
+       x_set_right_fringe.
+       * w32inevt.c (resize_event, maybe_generate_resize_event): Do not
+       pass height of menu bar to change_frame_size.
+       * w32menu.c (set_frame_menubar): Rewrite using
+       frame_inhibit_resize.
+       * w32term.h (struct w32_display_info):
+       Add horizontal_scroll_bar_cursor and cursor_display_counter.
+       (struct scroll_bar): Add horizontal.
+       (HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT)
+       (HORIZONTAL_SCROLL_BAR_LEFT_RANGE)
+       (HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH)
+       (HORIZONTAL_SCROLL_BAR_LEFT_BORDER)
+       (HORIZONTAL_SCROLL_BAR_RIGHT_BORDER)
+       (HORIZONTAL_SCROLL_BAR_TOP_BORDER)
+       (HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER)
+       (HORIZONTAL_SCROLL_BAR_MIN_HANDLE): New macros.
+       (WM_EMACS_CREATEVSCROLLBAR, WM_EMACS_CREATEHSCROLLBAR):
+       Define instead of WM_EMACS_CREATESCROLLBAR.
+       (WND_VSCROLLBAR_INDEX, WND_HSCROLLBAR_INDEX): Define instead of
+       WND_SCROLLBAR_INDEX.
+       * w32term.c (horizontal_scroll_bar_min_handle)
+       (horizontal_scroll_bar_left_border)
+       (horizontal_scroll_bar_right_border): New integers.
+       (x_set_frame_alpha): Replace x_highlight_frame by
+       w32_focus_frame.
+       (x_window_to_scroll_bar): New argument "type".  Update callers
+       accordingly.
+       (w32_set_horizontal_scroll_bar_thumb)
+       (x_horizontal_scroll_bar_report_motion)
+       (w32_set_horizontal_scroll_bar)
+       (w32_horizontal_scroll_bar_handle_click)
+       (x_horizontal_scroll_bar_report_motion): New functions.
+       (w32_mouse_position): Discriminate horizontal and vertical
+       scrollbar cases.
+       (my_create_scrollbar): Replace with two new functions
+       my_create_vscrollbar and my_create_hscrollbar.
+       (x_scroll_bar_create): New argument "horizontal".
+       Update callers accordingly.
+       (x_scroll_bar_remove, w32_condemn_scroll_bars)
+       (w32_redeem_scroll_bar, x_scroll_bar_clear): Handle horizontal
+       scroll bar case.
+       (w32_read_socket): Handle WM_HSCROLL cae.
+       (x_new_font): Don't recompute fringe widths.
+       Use frame_inhibit_resize.  Calculate new menu bar height iff we
+       build without toolkit.  Always clear under internal border.
+       (x_set_window_size): Don't check frame size or recompute
+       fringes.  Reset fullscreen status before applying sizes.
+       Always resize as requested by pixelwise argument.  Don't call
+       do_pending_window_change.
+       (x_wm_set_size_hint): Add call for FRAME_SCROLL_BAR_AREA_HEIGHT.
+       (w32_initialize_display_info): Initialize dpyinfo's
+       horizontal_scroll_bar_cursor entry.
+       (w32_create_terminal): Add set_horizontal_scroll_bar_hook.
+       (w32_initialize): Init horizontal_scroll_bar_min_handle and
+       horizontal_scroll_bar_left_border.
+       (w32fullscreen_hook): Intermittently resize window to normal
+       when switching from fullscreen to maximized state.
+       (run_window_configuration_change_hook): Don't run it if frame is
+       not official yet.
+       (unwind_change_frame): Remove.
+       (Fset_window_configuration): Rewrite using frame's official field.
+       * widget.c (set_frame_size): Don't call compute_fringe_widths.
+       (EmacsFrameSetCharSize): Obey frame_inhibit_resize.
+       * window.h (struct window): New fields old_pointm,
+       horizontal_scroll_bar, horizontal_scroll_bar_type, hscroll_whole,
+       scroll_bar_height and suspend_auto_hscroll.
+       (wset_horizontal_scroll_bar, wset_horizontal_scroll_bar_type):
+       New functions.
+       (sanitize_window_sizes): Extern.
+       (MINI_NON_ONLY_WINDOW_P, MINI_ONLY_WINDOW_P, WINDOW_PSEUDO_P)
+       (WINDOW_TOPMOST_P, WINDOW_HAS_HORIZONTAL_SCROLL_BAR)
+       (WINDOW_CONFIG_SCROLL_BAR_HEIGHT)
+       (WINDOW_CONFIG_SCROLL_BAR_LINES)
+       (WINDOW_SCROLL_BAR_LINES, WINDOW_SCROLL_BAR_AREA_HEIGHT):
+       New macros.
+       (WINDOW_LEFT_FRINGE_COLS, WINDOW_RIGHT_FRINGE_COLS)
+       (WINDOW_FRINGE_COLS, WINDOW_FRINGE_EXTENDED_P): Remove macros.
+       (WINDOW_VERTICAL_SCROLL_BAR_TYPE)
+       (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT)
+       (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT)
+       (WINDOW_HAS_VERTICAL_SCROLL_BAR): Minor rewrite.
+       (WINDOW_BOX_HEIGHT_NO_MODE_LINE, WINDOW_BOX_TEXT_HEIGHT)
+       (WINDOW_SCROLL_BAR_AREA_Y): Count in scroll bar height.
+       * window.c (wset_old_pointm, Fwindow_scroll_bar_height)
+       (Fwindow_old_point, sanitize_window_sizes): New functions.
+       (Qwindow_sanitize_window_sizes): New symbol.
+       (window_body_height): Count in horizontal scroll bar.
+       (set_window_hscroll, Fscroll_left, Fscroll_right):
+       Set suspend_auto_hscroll slot.
+       (Fwindow_inside_edges): Count fringes pixelwise.
+       (coordinates_in_window, Fcoordinates_in_window_p):
+       Consider horizontal scroll bar.
+       (check_frame_size, adjust_window_margins): Remove functions and
+       corresponding calls.
+       (set_window_buffer): Initialize old_pointm and horizontal scroll
+       bars.
+       (temp_output_buffer_show): Reset hscroll related fields.
+       Initialize old_pointm.
+       (make_parent_window): Initialize old_pointm.
+       (make_window): Initialize old_pointm, horizontal scroll bar type,
+       and scroll bar height.
+       (resize_frame_windows): Don't count top margin in new sizes.
+       Don't use safe sizes when shrinking a frame; let the window
+       manager do the clipping.
+       (Fsplit_window_internal): Inherit horizontal scroll bar type and
+       height.
+       (Fdelete_window_internal): Unchain old_pointm marker.
+       (window_scroll_pixel_based, Fscroll_other_window):
+       Adjust old_pointm.
+       (Fwindow_text_width, Fwindow_text_height): New argument
+       "pixelwise".
+       (struct saved_window): New fields, old_pointm, hscroll_whole,
+       suspend_auto_hscroll, scroll_bar_height and
+       horizontal_scroll_bar_type.
+       (Fset_window_configuration, save_window_save): Set new fields of
+       saved_window.
+       (apply_window_adjustment): Don't call adjust_window_margins.
+       (set_window_margins): Don't change margins if new sizes don't
+       fit into window.
+       (set_window_scroll_bars): New argument "horizontal_type".
+       Handle horizontal scroll bars.  Don't change scroll bars if they
+       don't fit into window.
+       (Fset_window_scroll_bars): New argument "horizontal_type".
+       (Fwindow_scroll_bars): Return values for horizontal scroll bars.
+       (compare_window_configurations): Compare horizontal scroll bar
+       settings.
+       * xdisp.c (window_text_bottom_y, window_box_height): Count in
+       horizontal scroll bar height.
+       (pixel_to_glyph_coords, init_xdisp): Use FRAME_TOTAL_LINES
+       instead of FRAME_LINES.
+       (remember_mouse_glyph): Case ON_SCROLL_BAR changed to
+       ON_VERTICAL_SCROLL_BAR.
+       (with_echo_area_buffer): Initialize old_pointm.
+       (with_echo_area_buffer_unwind_data): Store old_pointm values in
+       vector.
+       (unwind_with_echo_area_buffer): Handle old_pointm.
+       (update_tool_bar): Set do_update when the tool bar window has at
+       least one line (since this is what the user sets).
+       (MAX_FRAME_TOOL_BAR_HEIGHT): Remove macro.
+       (redisplay_tool_bar): Return early when toolbar has zero lines.
+       Call x_change_tool_bar_height.  Don't use max_tool_bar_height.
+       (hscroll_window_tree): Handle suspension of auto_hscroll and
+       old_pointm.
+       (set_horizontal_scroll_bar): New function.
+       (redisplay_window): Set ignore_mouse_drag_p when tool bar has
+       more than one line.  Handle horizontal scroll bars.
+       (note_mouse_highlight): Handle horizontal scrol bars.
+       (expose_frame): Set dimensions of XRectangle from frame's text
+       sizes.
+       (Vvoid_text_area_pointer): Update doc-string.
+       * xfns.c (x_set_menu_bar_lines): Use adjust_frame_size.
+       (x_change_tool_bar_height, x_set_scroll_bar_default_height)
+       (x_set_internal_border_width): New functions.
+       (x_set_tool_bar_lines): Call x_change_tool_bar_height.
+       (unwind_create_frame_1): Remove.
+       (Fx_create_frame): Handle horizontal scroll bars.  Use official
+       field of frame structure to inhibit running
+       window-configuration-change-hook.
+       (x_create_tip_frame): Call SET_FRAME_LINES and change_frame_size
+       pixelwise.  Handle frame's official field.
+       (x_frame_parm_handlers): Add x_set_scroll_bar_height,
+       x_set_horizontal_scroll_bars, x_set_left_fringe,
+       x_set_right_fringe.
+       * xmenu.c (update_frame_menubar, free_frame_menubar):
+       Use adjust_frame_size.
+       * xterm.h (struct x_display_info):
+       Add horizontal_scroll_bar_cursor and Xatom_Horizontal_Scrollbar
+       slots.
+       (struct scroll_bar): Add horizontal slot.
+       (HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT)
+       (HORIZONTAL_SCROLL_BAR_LEFT_RANGE)
+       (HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH): New macros.
+       (HORIZONTAL_SCROLL_BAR_LEFT_BORDER)
+       (HORIZONTAL_SCROLL_BAR_RIGHT_BORDER)
+       (HORIZONTAL_SCROLL_BAR_TOP_BORDER)
+       (HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER)
+       (HORIZONTAL_SCROLL_BAR_MIN_HANDLE): Define.
+       (x_clear_under_internal_border): Remove.
+       * xterm.c (XTmouse_position): Handle horizontal scroll bars.
+       (x_window_to_scroll_bar): New argument TYPE.  Update callers.
+       (x_send_scroll_bar_event, x_scroll_bar_create): New arguments
+       HORIZONTAL.  Update callers.
+       (horizontal_action_hook_id): New action hook id.
+       (x_horizontal_scroll_bar_to_input_event)
+       (x_create_horizontal_toolkit_scroll_bar)
+       (xt_horizontal_action_hook)
+       (x_set_toolkit_horizontal_scroll_bar_thumb)
+       (XTset_horizontal_scroll_bar, x_net_wm_state)
+       (x_horizontal_scroll_bar_report_motion): New functions.
+       (xg_scroll_callback, x_scroll_bar_handle_click):
+       Handle horizontal scroll bars.
+       (SCROLL_BAR_HORIZONTAL_NAME): Define.
+       (XTset_vertical_scroll_bar): Attempt to clear areas not covered
+       by scroll bar.
+       (XTcondemn_scroll_bars, XTredeem_scroll_bar): Rewrite.
+       Handle horizontal scroll bars.
+       (handle_one_xevent): Handle horizontal scroll bar events.
+       Call x_net_wm_state.
+       (x_set_window_size_1, x_wm_set_size_hint): Don't call
+       check_frame_size.
+       (x_set_window_size): Don't call check_frame_size and
+       do_pending_window_change.
+       (x_term_init): Init horizontal_scroll_bar_cursor display info.
+       (x_create_terminal): Add set_horizontal_scroll_bar_hook.
+       (x_scroll_bar_set_handle): Add some checks when calling
+       x_clear_area.
+
+2014-07-26  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Revert previous change.
+       There is certainly nothing wrong with writing code like 'lo <= i
+       && i <= hi', even if LO happens to a constant.  There isn't even
+       anything wrong in general with writing 'a <= b' if A happens to
+       be a constant.  At any rate stylistic changes shouldn't
+       be done like this without discussion.
+
+2014-07-26  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * alloc.c (xnmalloc, xnrealloc, xpalloc, make_save_value)
+       (Fgarbage_collect): Reorder conditions that are written backwards.
+       * data.c (cons_to_unsigned): Likewise.
+       * dispnew.c (update_frame_1, sit_for): Likewise.
+       * fileio.c (file_offset): Likewise.
+       * filelock.c (read_lock_data, lock_file): Likewise.
+       * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
+       Likewise.
+       * font.c (font_intern_prop, font_style_symbolic): Likewise.
+       * lisp.h (FIXNUM_OVERFLOW_P): Likewise.
+       * lread.c (read1): Likewise.
+       * minibuf.c (read_minibuf_noninteractive): Likewise.
+       * nsterm.m (x_set_frame_alpha): Likewise.
+       * process.c (wait_reading_process_output): Likewise.
+       * region-cache.c (delete_cache_boundaries): Likewise.
+       * xterm.c (x_set_frame_alpha): Likewise.
+
+2014-07-25  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * dispextern.h, xdisp.c (hourglass_shown_p, hourglass_atimer):
+       Now static.
+
+2014-07-26  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * atimer.c (set_alarm) [HAVE_ITIMERSPEC]: Use TIMER_ABSTIME
+       because atimer expiration is absolute rather than relative.
+
+2014-07-25  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32term.h (current_popup_menu, menubar_in_use):
+       Move declarations from w32term.c.
+
+2014-07-25  Martin Rudalics  <rudalics@gmx.at>
+
+       * w32fns.c (menubar_in_use): No more static.
+       * w32term.c (current_popup_menu, menubar_in_use): Declare.
+
+2014-07-25  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Move hourglass machinery to RIF.
+       * dispextern.h (struct redisplay_interface): New members
+       show_hourglass and hide_hourglass.  Indent comments.
+       (show_hourglass, hide_hourglass): Remove prototypes.
+       * nsterm.m (show_hourgass, hide_hourglass): Refactor to ...
+       (ns_show_hourglass, ns_hide_hourglass): ... new no-ops.
+       (ns_redisplay_interface): Add them.
+       * w32fns.c (show_hourglass, hide_hourglass): Refactor to ...
+       * w32term.c (w32_show_hourglass, w32_hide_hourglass): ... these.
+       (w32_arrow_cursor): New function to hack around non-GUI frames.
+       (w32_redisplay_interface): Add new functions.
+       * w32term.h (w32_arror_cursor): Add prototype.
+       * xdisp.c (show_hourglass): New function, refactored out from
+       platform-dependent code.
+       (cancel_hourglass): Now call to RIF function.
+       * xfns.c (show_hourglass, hide_hourglass): Refactor to ...
+       * xterm.c (x_show_hourglass, x_hide_hourglass): ... these.
+       (x_redisplay_interface): Add new functions.
+
+2014-07-24  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Fix error reported by Angelo Graziosi <angelo.graziosi@alice.it> in
+       <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00274.html>
+       and complete previous change.
+       * frame.c (adjust_frame_height): New function.
+       (Fset_frame_height, Fset_frame_size): Use it.
+       (x_set_frame_parameters): Take frame top margin into account.
+
+2014-07-23  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * frame.c (Fset_frame_height): Take frame top margin into account.
+       Incorrect behavior was reported by Martin Rudalics <rudalics@gmx.at> in
+       <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00258.html>
+
+2014-07-22  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * xterm.h (struct x_output) [USE_X_TOOLKIT || USE_GTK]: Define
+       menubar_height as such.  Tweak comment.
+       [USE_LUCID && USE_TOOLKIT_SCROLL_BARS]: Likewise for
+       scroll_bar_top_shadow_pixel and scroll_bar_bottom_shadow_pixel.
+       All related users changed.
+       (FRAME_MENUBAR_HEIGHT) [!USE_X_TOOLKIT && !USE_GTK]: No-op.
+       * xterm.c (handle_one_xevent):
+       * gtkutil.c (xg_event_is_for_menubar):
+       * xfns.c (x_window) [USE_X_TOOLKIT]:
+       * xmenu.c (set_frame_menubar, free_frame_menubar):
+       Prefer to use FRAME_MENUBAR_HEIGHT.
+
+2014-07-21  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * frame.c (Fframe_parameters): Always report frame height without
+       menu and tool bar lines.
+
+2014-07-21  Jan Djärv  <jan.h.d@swipnet.se>
 
        * nsterm.m (applicationDidFinishLaunching:): Call
        antialiasThresholdDidChange, register for antialias changes (Bug#17534).
 
        * macfont.h (macfont_update_antialias_threshold): Declare.
 
-2014-07-17  Eli Zaretskii  <eliz@gnu.org>
+2014-07-21  Eli Zaretskii  <eliz@gnu.org>
 
-       * w32select.c (setup_windows_coding_system): Apply
-       CODING_ANNOTATION_MASK to the common_flags member of struct
+       * w32select.c (setup_windows_coding_system):
+       Apply CODING_ANNOTATION_MASK to the common_flags member of struct
        coding_system.  Reported by martin rudalics <rudalics@gmx.at>.
 
-       * w16select.c (Fw16_get_clipboard_data): Apply
-       CODING_ANNOTATION_MASK to the common_flags member of struct
+       * w16select.c (Fw16_get_clipboard_data):
+       Apply CODING_ANNOTATION_MASK to the common_flags member of struct
        coding_system.
 
        * xdisp.c (init_iterator): Initialize it->stop_charpos to the
        (handle_invisible_prop): Record in it->stop_charpos the position
        where the invisible text ends.  (Bug#18035)
        (hscroll_window_tree): Don't try hscrolling windows whose cursor
-       row has zero buffer position as their start position.  Reported by
-       martin rudalics <rudalics@gmx.at>.
-
-2014-07-16  Eli Zaretskii  <eliz@gnu.org>
+       row has zero buffer position as their start position.
+       Reported by martin rudalics <rudalics@gmx.at>.
 
        * xdisp.c (move_it_vertically_backward, move_it_by_lines): Prevent
        infinite looping in redisplay when display lines don't have enough
        space to display even a single character.  (Bug#18036)
 
-2014-07-13  Eli Zaretskii  <eliz@gnu.org>
+2014-07-20  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * frame.h (struct frame) [USE_X_TOOLKIT]: New member shell_position.
+       * xfns.c (x_window): Use it to allow xfree later.
+       (x_encode_text): Drop 3rd arg; unused.  Tweak comment and adjust users
+       where appropriate.  Use bool for booleans and remove redundant checks.
+       (Fx_backspace_delete_keys_p): Use XkbFreeKeyboard; explain why.
+       * xterm.c (x_free_frame_resources): Free shell_position.
+
+2014-07-19  K. Handa  <handa@gnu.org>
+
+       * xfaces.c (realize_x_face): Call font_load_for_lface with no
+       mandatory font spec (Bug#17973).
+
+2014-07-19  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * font.c (font_score): Return the worst score if the size of
+       ENTITY is wrong by more than a factor 2 (Bug#17973).
+
+2014-07-18  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * frame.c (frame_unspecified_color): New function
+       refactored out from ...
+       (Fframe_parameters, Fframe_parameter): ... adjusted users.
+       (x_fullscreen_adjust, set_frame_param): Move Windows-specific
+       function to ...
+       * w32term.c (x_fullscreen_adjust, set_frame_param): ... static here.
+       * frame.h (x_fullscreen_adjust) [HAVE_NTGUI]:
+       * lisp.h (set_frame_param): Remove prototype.
+       * xterm.c (x_display_pixel_width, x_display_pixel_height): Now ...
+       * xterm.h (x_display_pixel_width, x_display_pixel_height): ...
+       inlined from here.
+
+       Prefer 'x_display_info *' to 'Display *' in X selection code.
+       This helps to avoid unneeded calls to x_display_info_for_display.
+       * xterm.h (struct selection_input_event): Record 'x_display_info *'
+       instead of 'Display *'.
+       (SELECTION_EVENT_DPYINFO): New macro.
+       (SELECTION_EVENT_DISPLAY): Now inline function to prohibit using
+       it as an lvalue.  Mention this in comment.
+       * xterm.c (handle_one_xevent): Use SELECTION_EVENT_DPYINFO.
+       * xselect.c (x_get_window_property_as_lisp_data, x_atom_to_symbol)
+       (selection_data_to_lisp_data, receive_incremental_selection):
+       Convert to use 'x_display_info *'.  Adjust users where appropriate.
+       (lisp_data_to_selection_data): Likewise.  Also pass 'struct
+       selection data *' as last arg to not return values in args.
+       (unexpect_property_change): Use common removal technique.
+
+2014-07-17  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * print.c (print_preprocess): Adjust to match changed
+       sub char-table structure and avoid crash (Bug#18038).
+
+       * data.c (wrong_choice): Not static any more.
+       * lisp.h (wrong_choice): Add prototype.
+       * frame.h (struct frame) [USE_X_TOOLKIT || HAVE_NTGUI]:
+       Declare namebuf as such.  Tweak comment.
+       [USE_GTK]: Likewise for tool_bar_position.
+       (fset_tool_bar_position) [USE_GTK]: Ditto.
+       (FRAME_TOOL_BAR_POSITION): New macro.
+       * frame.c (x_report_frame_params):
+       * gtkutil.c (update_frame_tool_bar):
+       * xfns.c (Fx_create_frame): Use it.
+       (x_set_tool_bar_position): Add meaningful diagnostic messages.
+
+2014-07-16  Eli Zaretskii  <eliz@gnu.org>
 
        * xdisp.c (decode_mode_spec): Call file-remote-p on the current
        buffer's default-directory only if it is a string.  (Bug#17986)
 
+2014-07-16  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       More precise control over values of some buffer-local variables.
+       * keyboard.c (Qvertical_scroll_bar):
+       * frame.c (Qleft, Qright): Move to ...
+       * buffer.c (Qleft, Qright, Qvertical_scroll_bar): ... here.
+       * buffer.c (Qchoice, Qrange, Qoverwrite_mode, Qfraction): New symbols.
+       (syms_of_buffer): DEFSYM all of the above, attach special properties.
+       Use special symbols to DEFVAR_PER_BUFFER overwrite-mode,
+       vertical-scroll-bar, scroll-up-aggressively
+       and scroll-down-aggressively.
+       * buffer.h (Qchoice, Qrange, Qleft, Qright, Qvertical_scroll_bar):
+       Add declarations.
+       * nsfns.m, frame.h (Qleft, Qright):
+       * nsterm.m (Qleft): Remove declarations.
+       * gtkutil.c (toplevel): Include buffer.h.
+       * data.c (wrong_choice, wrong_range): New functions.
+       (store_symval_forwarding): Handle special properties of buffer-local
+       variables and use functions from the above to signal error, if any.
+
+       * frame.h (enum fullscreen_type) [HAVE_WINDOW_SYSTEM]: Use more natural
+       values.  Add comment.
+       (struct frame): Re-arrange layout to avoid extra padding and use bit
+       fields for output_method, want_fullscreen and vertical_scroll_bar_type.
+       (FRAME_VERTICAL_SCROLL_BAR_TYPE, FRAME_HAS_VERTICAL_SCROLL_BARS)
+       (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT)
+       (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT) [!HAVE_WINDOW_SYSTEM]:
+       Define as no-ops because there are no scroll bars anyway.
+       * frame.c (make_frame, make_terminal_frame, make_initial_frame):
+       Adjust users.
+
+       * font.c (fset_font_data) [HAVE_XFT || HAVE_FREETYPE]:
+       Add convenient setter.
+       (font_put_frame_data, font_get_frame_data): Use it.
+
+2014-07-15  Daiki Ueno  <ueno@gnu.org>
+
+       * nsgui.h (XCHAR2B_BYTE1): Add missing parentheses around
+       pointer argument, before dereferencing.
+       (XCHAR2B_BYTE2): Likewise.
+
+2014-07-15  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * xmenu.c (toplevel): Use LWLIB_ID for next_menubar_widget_id.
+       (pop_down_menu) [USE_X_TOOLKIT]: Accept integer arg.
+       (create_and_show_popup_menu, create_and_show_dialog) [USE_X_TOOLKIT]:
+       Use record_unwind_protect_int and avoid consing.
+       (syms_of_xmenu) [USE_X_TOOLKIT]: Declare WIDGET_ID_TICK_START.
+
+       * regex.c (re_search_2): Use ssize_t to avoid integer overflow.
+
+2014-07-14  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Use binary-io module, O_BINARY, and "b" flag (Bug#18006).
+       * callproc.c (create_temp_file): Use mkostemp's O_BINARY flag.
+       * emacs.c [MSDOS]:
+       * emacs.c (main) [DOS_NT]: Don't mess with _fmode.
+       (main) [MSDOS]: Use SET_BINARY instead of setmode.
+       * minibuf.c: Include binary-io.h instead of fcntl.h.
+       (read_minibuf_noninteractive):
+       Use set_binary_mode instead of handcrafted code.
+       Don't call emacs_set_tty if emacs_get_tty failed.
+       * sysdep.c, systty.h (emacs_get_tty): Return int, not void.
+       * sysdep.c (emacs_open, emacs_pipe): Use O_BINARY.
+       * w32.c (pipe2): Adjust eassert to include O_BINARY.
+
+       * macros.c (Fstart_kbd_macro): Avoid need for overflow check.
+       This works around a GCC compiler bug when Emacs is configured with
+       --enable-gcc-warnings.
+
+2014-07-14  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * lisp.h (CHECK_VECTOR_OR_STRING): Return number of elements
+       or characters in string, respectively.  Add comment.
+       * fringe.c (Fdefine_fringe_bitmap):
+       * fns.c (Fsubstring, substring_both): Use it.
+       * keymap.c (Fdefine_key, Flookup_key):
+       * macros.c (Fstart_kbd_macro): Likewise.  Avoid call to Flength.
+
+       * term.c (tty_menu_add_pane, tty_menu_add_selection):
+       Use menu_item_width.
+       (tty_menu_show): Simplify because tty_menu_create never return NULL.
+
+2014-07-13  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Improve behavior of 'bzr up; cd src; make -k'.
+       * Makefile.in (top_srcdir): New var.
+       (ntsource, lispsource, ALL_CFLAGS, gl-stamp, emacs.res):
+       Use '$(top_srcdir)' instead of '$(srcdir)/..';
+       its expansion is a bit shorter.
+       (../config.status): Actually build config.status instead of
+       just complaining.
+       (ACLOCAL_INPUTS, AUTOCONF_INPUTS):
+       New macros, copied and relocated from ../Makefile.in.
+       ($(top_srcdir)/aclocal.m4, $(top_srcdir)/configure, config.in)
+       (../config.status, Makefile): New dependencies and rules,
+       copied with relocation from ../Makefile.in.  This should be more
+       likely to rebuild the build machinery properly if you do a 'make'
+       in the src directory.
+
 2014-07-12  Eli Zaretskii  <eliz@gnu.org>
 
        * xdisp.c (display_line): Don't call FETCH_BYTE with argument less
        * xfns.c (Fx_file_dialog) [USE_MOTIF, USE_GTK]: Update the doc
        string to match the one in w32fns.c.
 
-2014-07-08  Eli Zaretskii  <eliz@gnu.org>
+       * minibuf.c (read_minibuf_noninteractive) [WINDOWSNT]: Switch
+       stdin to binary mode only if it is connected to a terminal.
+
+2014-07-11  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Coalesce extern decls.
+       * minibuf.c (emacs_get_tty, emacs_set_tty, suppress_echo_on_tty):
+       * sysdep.c (emacs_get_tty, emacs_set_tty):
+       Move duplicate extern decls from here ...
+       * systty.h: ... to here, so that there's just one copy.
+
+2014-07-11  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * nsterm.m (changeFont:): Add ifdef NS_IMPL_COCOA.
+
+       * nsfns.m (Fns_popup_font_panel): Ditto.
+
+2014-07-11  Eli Zaretskii  <eliz@gnu.org>
+
+       * minibuf.c (read_minibuf_noninteractive): Finish reading on '\r',
+       not only on '\n'.
+       [WINDOWSNT]: Switch stdin to binary mode when not echoing input.
+
+       * sysdep.c (emacs_get_tty, emacs_set_tty, suppress_echo_on_tty)
+       [DOS_NT]: Implement for WINDOWSNT.
+
+       * systty.h (struct emacs_tty) [DOS_NT]: The struct member is now
+       unsigned.
+
+2014-07-11  Michael Albinus  <michael.albinus@gmx.de>
+
+       * sysdep.c (suppress_echo_on_tty): New function.
+       * minibuf.c (read_minibuf_noninteractive): Use it.
+
+2014-07-11  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * alloc.c (Fmemory_info) [HAVE_LINUX_SYSINFO]: Return nil if
+       sysinfo failed.  Adjust docstring.
+
+2014-07-11  Eli Zaretskii  <eliz@gnu.org>
+
+       Implement memory-info for MS-DOS.
+       * dosfns.c (dos_memory_info): New function.
+       * dosfns.h (dos_memory_info): Add prototype.
+       * alloc.c (Fmemory_info) [MSDOS]: Call dos_memory_info.
+       * vm-limit.c (get_lim_data) [MSDOS]: Call dos_memory_info, instead
+       of doing some of its job.
+
+       * minibuf.c (read_minibuf_noninteractive) [WINDOWSNT]: Don't
+       reference termios structure members.
+
+2014-07-11  Michael Albinus  <michael.albinus@gmx.de>
+
+       * sysdep.c (emacs_get_tty, emacs_set_tty): Make them externally visible.
+
+       * minibuf.c (top): Include systty.h.  Declare external
+       emacs_get_tty and emacs_set_tty.
+       (Vread_hide_char): New lisp variable.
+       (read_minibuf_noninteractive): Hide characters with
+       Vread_hide_char if it is a character.  (Bug#17839)
+
+2014-07-10  Eli Zaretskii  <eliz@gnu.org>
+
+       Implement memory-info for MS-Windows.
+       * w32.c (w32_memory_info): New function.
+       * w32.h (w32_memory_info): Prototype it.
+       * alloc.c (Fmemory_info) [WINDOWSNT]: Call it.
+
+2014-07-10  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * coding.h (struct coding_system): Remove 'error_positions' (unused)
+       and 'errors' (set but unused) fields.  Use bitfields for 'eol_seen',
+       'mode', 'common_flags' and 'result' fields, adjust layout to avoid
+       extra padding and shrink struct coding_system by 56 bytes (x86_64).
+       * coding.c (decode_coding_utf_8, decode_coding_utf_16)
+       (decode_coding_emacs_mule, decode_coding_iso_2022, decode_coding_sjis)
+       (decode_coding_big5, decode_coding_charset, decode_coding)
+       (encode_coding): Adjust users.
+
+       * alloc.c (Fmemory_info): New function.
+
+2014-07-09  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * syntax.c (back_comment): Use more-natural location for label.
+
+       * font.c, font.h (font_unparse_fcname): Now static.
+       Define only if HAVE_XFT || HAVE_FREETYPE || HAVE_NS.
+
+2014-07-09  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Next minor cleanup of font subsystem.
+       * font.h (enum font_property_index): Remove FONT_ENTITY_INDEX (no
+       users) and FONT_FORMAT_INDEX (set by a few font drivers but never
+       really used).
+       (FONT_ENTITY_NOT_LOADABLE, FONT_ENTITY_SET_NOT_LOADABLE): Remove;
+       unused.
+       * ftfont.h (ftfont_font_format): Remove prototype.
+       * ftfont.c (ftfont_font_format): Remove; now unused.
+       (ftfont_open):
+       * nsfont.m (nsfont_open):
+       * w32font.c (w32font_open_internal):
+       * w32uniscribe.c (uniscribe_open):
+       * xfont.c (xfont_open):
+       * xftfont.c (xftfont_open): All users changed.
+
+       * coding.c (ALLOC_CONVERSION_WORK_AREA): Prefer ptrdiff_t to int and
+       so avoid integer overflow if decoded gap size exceeds INT_MAX bytes.
+
+2014-07-09  Eli Zaretskii  <eliz@gnu.org>
 
        * xdisp.c (move_it_to): Adjust calculation of line_start_x to what
        x_produce_glyphs does when it generates a stretch glyph that
        represents a TAB.  (Bug#17969)
 
-2014-07-05  Eli Zaretskii  <eliz@gnu.org>
-
        * xdisp.c (pos_visible_p): If CHARPOS is at beginning of window,
        and there is a display property at that position, don't call
        move_it_to to move to a position before window start.  (Bug#17942)
        Fix condition for finding CHARPOS by the first call to move_it_to.
        (Bug#17944)
 
-2014-07-05  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-07-09  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * syntax.c (find_defun_start): Try the cache even
        if !open_paren_in_column_0_is_defun_start.
        (back_comment): If find_defun_start was pessimistic, use the
        scan_sexps_forward result to improve the cache (bug#16526).
 
-2014-07-04  Daniel Colascione  <dancol@dancol.org>
-
-       Backport from trunk.
-       * xfns.c (create_frame_xic): Pass XNStatusAttributes to XCreateIC
-       only if xic_style calls for it.  This change allows Emacs to work
-       with ibus.  Also, don't leak resources if create_frame_xic fails,
-       and stop caching xic_style across different displays (Bug#17928).
-       (supported_xim_styles): Make const.
-       (best_xim_style): Remove first parameter: it's always just
-       supported_xim_styles.  Change to look at supported_xim_styles directly.
-
-2014-07-04  Eli Zaretskii  <eliz@gnu.org>
+2014-07-09  Eli Zaretskii  <eliz@gnu.org>
 
        * xdisp.c (redisplay_window): If redisplay of a window ends up
        with point in a partially visible line at end of the window, make
        * w32.c (network_interface_info): Make sure the argument is a
        Lisp string.
 
-2014-07-01  Eli Zaretskii  <eliz@gnu.org>
+2014-07-08  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * process.c (read_and_dispose_of_process_output): Fix typo
+       in previous patch: we want nonnegative fds, not nonzero fds.
+
+2014-07-08  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * chartab.c (char_table_translate): Move to...
+       * character.h (char_table_translate): ... inline function here.
+       Avoid Faref and assume that args are always valid.  This helps to
+       speedup search, which is especially important for a huge buffers.
+       * lisp.h (char_table_translate): Remove prototype.
+
+       * nsfont.m (nsfont_close): Free glyphs and metrics arrays as well.
+       * font.c (font_build_object) [HAVE_XFT || HAVE_FREETYPE || HAVE_NS]:
+       New function, with an intention to avoid code duplication between
+       a few font drivers.
+       * font.h (font_build_object) [HAVE_XFT || HAVE_FREETYPE || HAVE_NS]:
+       Add prototype.
+       * ftfont.c (ftfont_open):
+       * macfont.m (macfont_open):
+       * xftfont.c (xftfont_open): Use it.
+
+2014-07-08  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * process.c: Add sanity checks for file descriptors (Bug#17844).
+       (wait_reading_process_output, Fprocess_filter_multibyte_p):
+       Check that infd is nonnegative before using it as an fd.
+       (read_and_dispose_of_process_output, Fprocess_send_eof):
+       Likewise, for outfd.
+       (wait_reading_process_output): Omit unnecessary check of infd.
+
+2014-07-07  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Minor fixups related to usage of the 'long' type.
+       * gnutls.c (emacs_gnutls_handshake):
+       * xfaces.c (dump_realized_face):
+       Work even if 'long' is narrower than 'void *'.
+       * termcap.c (scan_file):
+       * xselect.c (x_decline_selection_request)
+       (x_reply_selection_request, x_get_window_property):
+       * xterm.c (x_set_frame_alpha):
+       Remove unnecessary 'L' suffixes of integer constants.
+       * xfns.c (hack_wm_protocols):
+       * xselect.c (x_fill_property_data):
+       * xterm.c (x_set_offset, x_set_window_size_1, x_make_frame_invisible):
+       Remove unnecessary casts to 'long'.
+       (set_machine_and_pid_properties): Don't assume pid_t fits in 32 bits.
+
+       Minor ImageMagick safety fixes.
+       * image.c (imagemagick_compute_animated_image):
+       Remove useless assignment to local.  Avoid problems if dest_width is 0.
+       (imagemagick_load_image): Use int for pixel counts that can't
+       exceed INT_MAX.  Avoid problem if PixelGetNextIteratorRow returns
+       a row width greater than the image width (or greater than LONG_MAX!).
+
+2014-07-04  K. Handa  <handa@gnu.org>
+
+       * coding.c (MIN_CHARBUF_SIZE): Delete it.
+       (MAX_CHARBUF_EXTRA_SIZE): New macro.
+       (ALLOC_CONVERSION_WORK_AREA): Use MAX_CHARBUF_EXTRA_SIZE.
+
+2014-07-04  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * font.h (struct font_driver): Remove get_outline and free_outline;
+       not used by any font driver.
+       * ftfont.c (ftfont_driver):
+       * macfont.m (macfont_driver):
+       * nsfont.m (nsfont_driver):
+       * w32font.c (w32font_driver):
+       * w32uniscribe.c (uniscribe_font_driver):
+       * xfont.c (xfont_driver): Related users changed.
+       * xselect.c (x_get_window_property): Use convenient xmalloc.
+       Call to xfree only if some data was really allocated.
+
+2014-07-03  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       On MS-Windows, display busy cursor on all GUI frames.
+       This is similar to what we have on X.  Quickly tested by Dani Moncayo.
+       * w32fns.c (toplevel): Remove hourglass_hwnd; no longer used.
+       (w32_show_hourglass, w32_hide_hourglass, w32_note_current_window):
+       Likewise.
+       (hide_hourglass, show_hourglass): Redesign to match X counterparts.
+       * xdisp.c (start_hourglass): Remove Windows-specific bits.
+
+2014-07-03  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Use convenient alists to manage per-frame font driver-specific data.
+       * frame.h (struct frame): Rename font_data_list to...
+       [HAVE_XFT || HAVE_FREETYPE]: ... font_data, which is a Lisp_Object now.
+       * font.h (struct font_data_list): Remove; no longer need a special
+       data type.
+       (font_put_frame_data, font_get_frame_data) [HAVE_XFT || HAVE_FREETYPE]:
+       Adjust prototypes.
+       * font.c (font_put_frame_data, font_get_frame_data)
+       [HAVE_XFT || HAVE_FREETYPE]: Prefer alist functions to ad-hoc list
+       management.
+       * xftfont.c (xftfont_get_xft_draw, xftfont_end_for_frame):
+       Related users changed.
+       * ftxfont.c (ftxfont_get_gcs, ftxfont_end_for_frame): Likewise.
+       Prefer convenient xmalloc and xfree.
+
+2014-07-03  Eli Zaretskii  <eliz@gnu.org>
 
        * dispnew.c (prepare_desired_row): Accept 2 additional arguments:
        the window whose glyph row is being prepared and a flag whether it
        are in sync with what the window wants.
        (Bug#17892)
 
-       * xdisp.c (display_line, display_mode_line): Call
-       prepare_desired_row with additional arguments, as appropriate.
+       * xdisp.c (display_line, display_mode_line):
+       Call prepare_desired_row with additional arguments, as appropriate.
 
        * dispextern.h (prepare_desired_row): Adjust prototype.
 
-2014-07-01  Dmitry Antipov  <dmantipov@yandex.ru>
+2014-07-03  Dmitry Antipov  <dmantipov@yandex.ru>
 
        * xfaces.c (init_frame_faces): Always realize basic faces (Bug#17889).
        * menu.c (Fx_popup_dialog): Set Vmenu_updating_frame to avoid crash
        caused by xw_popup_dialog in daemon mode (Bug#17891).
 
-2014-06-30  Eli Zaretskii  <eliz@gnu.org>
+2014-07-03  Eli Zaretskii  <eliz@gnu.org>
 
        * frame.c (do_switch_frame): When switching to another TTY frame,
        make sure FrameCols and FrameRows are in sync with the new frame's
        data.  (Bug#17875)
 
+2014-07-02  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Shrink Lisp_Sub_Char_Table by preferring C integers to Lisp_Objects.
+       * lisp.h (struct Lisp_Sub_Char_Table): Use C integers for depth and
+       min_char slots.  Adjust comment.
+       (enum char_table_specials): Rename from CHAR_TABLE_STANDARD_SLOTS.
+       Add SUB_CHAR_TABLE_OFFSET member.
+       (make_uninit_sub_char_table): New function.
+       (toplevel): Add compile-time assert to verify suitable member layout
+       in Lisp_Sub_Char_Table.
+       * alloc.c (mark_char_table): Add extra argument to denote char table
+       subtype.  Adjust to match new layout of sub char-table.
+       (mark_object): Always mark sub char-tables with mark_char_table.
+       * chartab.c (make_sub_char_table, copy_sub_char_table)
+       (sub_char_table_ref, sub_char_table_ref_and_range, sub_char_table_set)
+       (sub_char_table_set_range, optimize_sub_char_table, map_sub_char_table)
+       (map_sub_char_table_for_charset, uniprop_table_uncompress):
+       All related users changed.
+       * lread.c (read1): Adjust to match new layout of sub char-table.
+       * print.c (print_object): Likewise (Bug#17898).
+
+2014-07-02  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * keymap.c (get_keyelt): Simplify.
+       (copy_keymap_item): Remove left-over code for when we had
+       key-shortcut caches.
+
+2014-06-30  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * nsterm.m (judge): EmacsScroller: Move dealloc code here.
+       (dealloc): Remove for EmacsScroller.
+
+       * nsterm.h (EmacsScroller): Remove dealloc.
+
+2014-06-30  Eli Zaretskii  <eliz@gnu.org>
+
+       * coding.c (MIN_CHARBUF_SIZE): Enlarge to 32.  (Bug#17881)
+
+2014-06-30  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * nsmenu.m (update_frame_tool_bar): Set wait_for_tool_bar to NO
+       when setNeedsDisplay is called so we don't trigger redisplay for every
+       tool bar update.
+
+       * nsterm.m (any_help_event_p): New variable.
+       (mouseMoved:): Set any_help_event_p to YES if help event is
+       generated.  Remove else with empty help event that triggered redisplay
+       for every mouse move.
+       (windowDidResignKey:): If any_help_event_p, generate empty help event.
+
+2014-06-29  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * xfns.c (Qsuppress_icon): Remove; no real users.
+       (syms_of_xfns): Don't DEFSYM it.  Remove ancient comments.
+       * w32fns.c (Qsuppress_icon): Remove, for the same reason.
+       (syms_of_w32fns): Don't DEFSYM it.
+
+2014-06-29  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (ns-app): Mark as PHONY.
+
+2014-06-28  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (mostlyclean): There are no libXMenu11.a,
+       liblw.a in this directory.
+
 2014-06-28  Andreas Schwab  <schwab@linux-m68k.org>
 
        * coding.c (encode_coding_utf_8): Correctly count produced_chars
        also in unibyte case.  (Bug#17865)
 
-2014-06-25  Glenn Morris  <rgm@gnu.org>
+2014-06-28  K. Handa  <handa@gnu.org>
+
+       * coding.c (MAX_CHARBUF_SIZE): Rename from CHARBUF_SIZE.
+       (MIN_CHARBUF_SIZE): New macro.
+       (ALLOC_CONVERSION_WORK_AREA): New arg SIZE.  Callers changed.
+
+2014-06-27  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in: Replace BOOTSTRAPEMACS sleight-of-hand
+       with an order-only dependence on bootstrap-emacs.  (Bug#2151)
+       (.el.elc): Replace suffix rule with pattern rule.
+       (%.elc): New pattern rule, with order-only prerequisite.
+       ($(lisp)): No more need to depend on BOOTSTRAPEMACS.
+       ($(lispsource)/loaddefs.el): Use an order-only prerequisite
+       in place of BOOTSTRAPEMACS.
+
+2014-06-26  Dmitry Antipov  <dmantipov@yandex.ru>
 
-       * puresize.h (BASE_PURESIZE): Increase a bit.  (Bug#17846)
+       * fns.c (Fcompare_strings): Use FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE.
+
+2014-06-25  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Consistently use validate_subarray to verify substring.
+       * fns.c (validate_substring): Not static any more.  Adjust to
+       use ptrdiff_t, not EMACS_INT, because string and vector limits
+       can't exceed ptrdiff_t even if EMACS_INT is wider.
+       (Fcompare_strings, Fsubstring, Fsubstring_no_properties)
+       (secure_hash): Adjust user.
+       * lisp.h (validate_subarray): Add prototype.
+       * coding.c (Fundecodable_char_position):
+       * composite.c (Fcomposition_get_gstring, Fcompose_string_internal):
+       Use validate_subarray.  Adjust comment to mention substring.
+
+2014-06-25  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Do not allow out-of-range character position in Fcompare_strings.
+       * fns.c (validate_subarray): Add prototype.
+       (Fcompare_substring): Use validate_subarray to check ranges.
+       Adjust comment to mention that the semantics was changed.  Also see
+       http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00447.html.
+
+2014-06-24  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Be more consistent about the 'Qfoo' naming convention.
+       * image.c (Fimagemagick_types):
+       * lisp.h (lisp_h_CHECK_TYPE, CHECK_TYPE, CHECK_ARRAY):
+       * process.c (Fmake_network_process):
+       Rename C local identifier 'Qfoo to avoid giving the false
+       impression that it stands for the symbol 'foo'.
+
+2014-06-23  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Simplify and cleanup character conversion stuff.
+       * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe):
+       Remove prototypes.
+       * character.c (multibyte_char_to_unibyte)
+       (multibyte_char_to_unibyte_safe): Remove; no longer used.
+       * character.h (make_char): Remove; unused.
+       (CHAR_TO_BYTE8, CHAR_TO_BYTE_SAFE): Simplify.
+       (ASCII_BYTE_P): Remove; ASCII_CHAR_P does the same thing.
+       * buffer.c, charset.c, charset.h, cmds.c, coding.c, editfns.c:
+       * fileio.c, indent.c, insdel.c, keyboard.c, lread.c, print.c:
+       * search.c, term.c, xdisp.c, xterm.c: Related users changed.
+
+2014-06-22  Mario Lang  <mlang@delysid.org>
+
+       * w32fns.c (Fw32_shell_execute): The the -> the.
+
+2014-06-22  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * xmenu.c (mouse_position_for_popup):
+       * xselect.c (mouse_position_for_drop): Do not duplicate ...
+       * xfns.c (x_relative_mouse_position): ... and prefer this function.
+       * menu.c (Fx_popup_menu):
+       * xselect.c (x_handle_dnd_message): Adjust users.
+       * menu.h (mouse_position_for_popup): Remove prototype.
+       * xterm.h (x_relative_mouse_position): Add prototype.
+       * xterm.c (x_find_topmost_parent): Break from the loop and do not
+       call XFree if XQueryTree returns zero.
 
 2014-06-21  Eli Zaretskii  <eliz@gnu.org>
 
        * fileio.c (Ffile_acl): Port to OS X, where acl_get_file (...,
        ACL_TYPE_ACCESS) doesn't work.
 
-2014-06-19  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-06-21  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * keyboard.c (read_key_sequence): Don't invoke Vprefix_help_command
        before checking key-translation-map (bug#17659).
 
-2014-06-19  Dmitry Antipov  <dmantipov@yandex.ru>
+2014-06-21  Dmitry Antipov  <dmantipov@yandex.ru>
 
        * font.c (font_make_object): Avoid dangling pointer which may
        crash GC (Bug#17771).
 
-2014-06-18  Eli Zaretskii  <eliz@gnu.org>
+2014-06-21  Eli Zaretskii  <eliz@gnu.org>
 
        * image.c [5 < GIFLIB_MAJOR + (1 <= GIFLIB_MINOR)]: Declare the
        prototype of DGifCloseFile as appropriate for older and newer
        (gif_load): Call gif_close instead of DGifCloseFile.  Divulge the
        error string where appropriate.  (Bug#17790)
 
-2014-06-16  Eli Zaretskii  <eliz@gnu.org>
-
        * xdisp.c (Fmove_point_visually): Instead of testing for keyboard
        macro execution, make sure point didn't move since last complete
        redisplay, as the condition for using the glyph matrix
        information.  (Bug#17777)
 
-2014-06-14  Eli Zaretskii  <eliz@gnu.org>
+2014-06-19  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Minor cleanup of fonset code.
+       * fontset.c (FONTSET_ID, set_fontset_id, FONTSET_NAME)
+       (set_fontset_name, FONTSET_ASCII, set_fontset_ascii)
+       (FONTSET_BASE, set_fontset_base, FONTSET_FRAME)
+       (set_fontset_frame, FONTSET_NOFONT_FACE, set_fontset_nofont_face)
+       (FONTSET_DEFAULT, set_fontset_default, FONTSET_FALLBACK)
+       (set_fontset_fallback): Reorder extra slots and avoid unused slots.
+       (free_realized_fontset): Remove because a no-op since 2008.
+       (free_face_fontset): Adjust user.
+       (syms_of_fontset): Shrink fontset by one extra slot.
+
+2014-06-17  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Omit redundant extern decls.
+       Most of this patch is from Dmitry Antipov, in:
+       http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00263.html
+       * commands.h (update_mode_lines):
+       * frame.h (Qbackground_color, Qforeground_color)
+       (x_set_menu_bar_lines):
+       * ftfont.c (ftfont_font_format):
+       * intervals.h (Qkeymap, Qfont):
+       * keyboard.c (timer_check, safe_run_hooks, Qregion_extract_function):
+       * lisp.h (Ffboundp, Qnil, Qt, Qlambda, Qintegerp, Qwholenump)
+       (Qsymbolp, Qlisp, Qconsp, Qstringp, Qarrayp, Qbufferp, Qmarkerp)
+       (Qvectorp, Qbuffer_or_string_p, Qchar_table_p, Qvector_or_char_table_p)
+       (Qfloatp, Qnumberp, Qfont_spec, Qfont_entity, Qfont_object)
+       (Fbyteorder, wrong_type_argument, Fmax_char, syms_of_composite)
+       (Fidentity, extract_float, init_display, syms_of_display, Qdisplay):
+       (Qimage, Qbox, redisplay_preserve_echo_area, char_table_ref)
+       (char_table_set, char_table_translate, Qautoload, Qbottom, Qtop)
+       (Qvisible, Qfont, Qfront_sticky, Qrear_nonsticky, init_sigio)
+       (Qtool_bar, Qheader_line):
+       * macros.c (Fexecute_kbd_macro):
+       * xdisp.c (Ftool_bar_height, Ftool_bar_height):
+       * xterm.c (x_delete_terminal, XSetIMValues):
+       * xterm.h (x_set_window_size, x_query_color, x_get_focus_frame)
+       (x_implicitly_set_name, popup_activated)
+       (widget_store_internal_border):
+       Remove redundant decls.
+       * frame.c [USE_X_TOOLKIT]: Include widget.h.
+       * keyboard.c (Fexit_recursive_edit, Fabort_recursive_edit):
+       Remove _Noreturn, as make-docfile now does that for us.
+       * lisp.h (DEFUN): Don't declare fnname here; rely on make-docfile.
+       (Qregion_extract_function): New decl.
+       * window.c, xfns.c: Include menu.h.
+
+2014-06-17  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * callint.c (Fcall_interactively): Fix up last change (bug#17701).
+
+2014-06-17  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * fileio.c (Fread_file_name): Do not pass redundant args and ...
+       * callint.c (read_file_name): ... convert to static here.
+       * lisp.h (Fread_file_name): Do not EXFUN it.
+       (STRING_COPYIN): Remove; unused.
+       * composite.c (CHAR_COMPOSABLE_P): Replace unsafe macro with ...
+       (char_composable_p): ... static function.  All users changed.
+       * eval.c (toplevel): Remove redundant #include directives.
+       * xterm.c (x_initialize): Add static to match prototype.
+       * ccl.c (Fccl_execute_on_string):
+       * font.c (fon_intern_prop): Use make_specified_string.
+
+2014-06-16  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * Makefile.in (ns-app): Fix typo that broke build on OS X.
+       Reported by David Caldwell in:
+       http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00251.html
+
+2014-06-16  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Do not ask for XRender extension each time XFT font is opened.
+       * xftfont.c (xftfont_open): Move call to XRenderQueryExtension ...
+       * xterm.c (x_term_init) [HAVE_XFT]: ... to here.  Adjust comment.
+
+2014-06-15  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in: Use `make -C' rather than `cd && make' throughout.
+
+2014-06-15  Eli Zaretskii  <eliz@gnu.org>
 
        * xdisp.c (Fmove_point_visually): Don't use the glyph matrix
        information if we are in the middle of executing a keyboard macro,
        since redisplay doesn't update the screen until the macro is
        finished.  (Bug#17777)
 
-2014-06-13  Eli Zaretskii  <eliz@gnu.org>
-
        * alloc.c (cleanup_vector): Don't dereference a font driver
        pointer if it is NULL.  (Bug#17771)
 
+2014-06-13  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in ($(leimdir)/leim-list.el, $(srcdir)/macuvs.h)
+       ($(lispsource)/international/charprop.el)
+       ($(libsrc)/make-docfile$(EXEEXT), $(lwlibdir)/liblw.a)
+       ($(oldXMenudir)/libXMenu11.a, ns-app, .el.elc)
+       ($(lispsource)/loaddefs.el, bootstrap-emacs$(EXEEXT)):
+       GNU make automatically passes command-line arguments to sub-makes.
+
+2014-06-13  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Avoid hangs in accept-process-output (Bug#17647).
+       * lisp.h, process.c (wait_reading_process_input):
+       Return int, not bool.  All uses changed.
+       * process.c (SELECT_CANT_DO_WRITE_MASK):
+       Remove macro, replacing with ...
+       (SELECT_CAN_DO_WRITE_MASK): ... new constant, with inverted sense.
+       All uses changed.
+       (status_notify): New arg WAIT_PROC.  Return int, not void.
+       All uses changed.
+
+2014-06-13  Eli Zaretskii  <eliz@gnu.org>
+
+       * menu.c (Fx_popup_menu): Don't call the frame's menu_show_hook if
+       the frame is the initial frame, because the hook is not set up
+       then, and Emacs crashes.
+       Reported by Fabrice Popineau <fabrice.popineau@gmail.com>.
+
+2014-06-12  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * keymap.c (silly_event_symbol_error): Don't recommend the use
+       of strings.
+
 2014-06-11  Eli Zaretskii  <eliz@gnu.org>
 
        * xdisp.c (set_cursor_from_row): Fix an off-by-one error when
        matching overlay strings with 'cursor' property against buffer
        positions traversed in the glyph row.  (Bug#17744)
 
-2014-06-08  Glenn Morris  <rgm@gnu.org>
+2014-06-11  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * nsterm.h (EmacsApp): Always compile in shouldKeepRunning, isFirst
+       on Cocoa.
+
+       * nsterm.m (run): Always compile for Cocoa.  Use runtime check to
+       determine 10.9 (Bug#17751).
+
+       * macfont.m (macfont_draw): Positions were not freed.
+
+2014-06-10  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * dispextern.h (PREPARE_FACE_FOR_DISPLAY): Remove as a duplicate of ...
+       * xfaces.c (prepare_face_for_display) [HAVE_WINDOW_SYSTEM]: ... this
+       function.  Also adjust comment.
+       * fringe.c, w32term.c, xdisp.c, xterm.c: All users changed.
+
+       * dispextern.h (struct face) [HAVE_XFT]: Ifdef 'extra' member.
+       * font.c (font_done_for_face):
+       * xfaces.c (realize_non_ascii_face): Adjust user.
+       * font.h (struct font_driver): Convert 'prepare_face' to return
+       void because its return value is never used anyway.
+       * xfont.c (xfont_prepare_face): Return void.
+       * xftfont.c (xftfont_prepare_face): Likewise.  Use xmalloc.
+       (xftfont_done_face): Use xfree.
+
+       * dispextern.h (last_tool_bar_item): Remove declaration.
+       * frame.h (struct frame): New member last_tool_bar_item.
+       * frame.c (make_frame): Initialize it.
+       * xdisp.c (toplevel): Remove last_tool_bar_item.
+       (handle_tool_bar_click, note_tool_bar_highlight):
+       * w32term.c (w32_read_socket, w32_initialize):
+       * xterm.c (handle_one_xevent, x_initialize): Adjust users.
+
+       * frame.h (window_system_available) [!HAVE_WINDOW_SYSTEM]: Always false.
+       * frame.c (window_system_available) [HAVE_WINDOW_SYSTEM]: Now here.
+
+2014-06-09  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Say (accept-process-output P)'s result pertains to P if P is non-nil.
+       * process.c (Faccept_process_output)
+       (wait_reading_process_output): Mention that if PROCESS is non-nil,
+       the return value is about PROCESS, not about other processes.
+
+2014-06-09  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Further adjustments to mark_object and friends.
+       Now the mark_object's stack is just 32 bytes on a 64-bit
+       system, which means extra 20% off the stack usage.
+       * alloc.c (mark_save_value): As before, refactored out from ...
+       (mark_object): ... adjusted user.  Also add comment.
+
+2014-06-09  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Fix core dump after a dropped X connection (Bug#17704).
+       * sysdep.c (stuff_char): Don't abort merely because the selected frame
+       is dead, as we may be shutting down.
+
+2014-06-08  Glenn Morris  <rgm@gnu.org>
+
+       * fileio.c (write-region-inhibit-fsync): Doc tweak.
+
+       * data.c (Flss, Fgtr, Fleq, Fgeq): Doc tweaks.
+
+2014-06-08  Paul Eggert  <eggert@cs.ucla.edu>
+
+       If a C name must be extern on some platforms, make it extern on all.
+       * dispextern.h (set_vertical_scroll_bar, erase_phys_cursor)
+       (load_color):
+       * font.h (ftxfont_driver) [HAVE_XFT]:
+       * keyboard.h (menu_items_inuse, ignore_mouse_drag_p, make_ctrl_char):
+       * lisp.h (get_frame_param):
+       * menu.h (tty_menu_show):
+       * process.h (conv_sockaddr_to_lisp, catch_child_signal):
+       * termhooks.h (encode_terminal_code):
+       * xterm.h (x_menu_wait_for_event):
+       Always declare.
+       * frame.c (get_frame_param):
+       * fringe.c (max_used_fringe_bitmap):
+       * ftxfont.c (ftxfont_driver):
+       * keyboard.c (ignore_mouse_drag_p, make_ctrl_char):
+       * menu.c (menu_items_inuse):
+       * process.c (conv_sockaddr_to_lisp, catch_child_signal):
+       * term.c (encode_terminal_code, tty_menu_show):
+       * xdisp.c (set_vertical_scroll_bar, erase_phys_cursor):
+       * xfaces.c (load_color):
+       * xmenu.c (x_menu_wait_for_event):
+       Now always extern.
+
+2014-06-08  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Change object marking routines to minimize stack usage.
+       This change moves a few cold paths from mark_object to NO_INLINE
+       functions and adjusts symbol marking loop.  According to GCC 4.8.2
+       -Wstack-usage, this reduces mark_object's stack usage from 80 to
+       48 bytes on a 64-bit system.  For a long byte-force-recompile runs,
+       stack usage at the mark phase is reduced up to 28%.  Surprisingly,
+       it also gains up to 3% in speed (with default '-O2 -g3' flags).
+       * alloc.c (mark_compiled, mark_localized_symbol): New functions,
+       refactored out from ...
+       (mark_object): ... adjusted user.  Also mark symbols in a tight
+       inner loop.
+       (mark_face_cache): Add NO_INLINE.
+
+2014-06-08  Eli Zaretskii  <eliz@gnu.org>
+
+       * sysdep.c (reset_sys_modes): Use cursorX, not curX, as the latter
+       contains garbage on WINDOWSNT (which could potentially infloop at
+       exit).
+
+       Minimize cursor motion during TTY menu updates.
+       * term.c (tty_menu_display): Don't position cursor here.
+       Instead, pass the cursor coordinates to update_frame_with_menu.
+       (tty_menu_activate): Send the hide cursor command only once in an
+       iteration through the outer 'while' loop.
+
+       * dispnew.c (update_frame_1): Accept an additional argument
+       SET_CURSOR_P, and position the cursor at the end of the frame
+       update only if that argument is non-zero.  All callers changed to
+       provide the additional argument as non-zero, except for
+       update_frame_with_menu.
+       (update_frame_with_menu): Accept 2 additional arguments ROW and
+       COL; if they are non-negative, instruct update_frame_1 not to
+       position the cursor, and instead position it according to ROW and COL.
+
+       * dispextern.h (update_frame_with_menu): Update prototype.
+
+2014-06-08  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * callproc.c (call_process): Don't check read-only if we don't insert
+       anything (bug#17666).
+
+2014-06-08  Eli Zaretskii  <eliz@gnu.org>
+
+       * dispnew.c (update_frame_with_menu): Set display_completed.
+
+2014-06-07  Eli Zaretskii  <eliz@gnu.org>
+
+       * term.c (tty_menu_show) [WINDOWSNT]: Make tty_menu_show extern
+       only for WINDOWSNT.
+       * menu.h (tty_menu_show) [WINDOWSNT]: Declare extern only for WINDOWSNT.
+
+2014-06-06  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * term.c (tty_menu_show) [!HAVE_NTGUI]: Now static.
+       * menu.h (tty_menu_show) [!HAVE_NTGUI]: Omit extern decl.
+
+2014-06-06  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * window.c (Frecenter): Signal an error if window-buffer is not
+       current-buffer.
+
+       * keyboard.c (make_lispy_position): Don't include a buffer position in
+       mode/header-line mouse events.
+
+       * keyboard.c (read_char): Handle (t . <event>) in the second use of
+       Vunread_command_events (bug#17650).
+
+2014-06-06  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * xterm.c (x_setup_pointer_blanking):
+       Conditionally probe Xfixes until this stuff is stabilized (Bug#17609).
+
+2014-06-05  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * keyboard.c, process.c: Do not define POLL_FOR_INPUT here
+       because it will be defined in generated config.h if needed.
+
+2014-06-04  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Use terminal-specific hooks to display popup dialogs.
+       * termhooks.h (struct terminal): New field popup_dialog_hook.
+       * menu.c (emulate_dialog_with_menu): New function, refactored from ...
+       (Fx_popup_dialog): ... adjusted user.  Also remove old #if 0
+       code and use popup_dialog_hook.
+       * nsmenu.m (ns_popup_dialog): Make hook-compatible.
+       * nsterm.h (ns_popup_dialog): Adjust prototype.
+       * nsterm.m (ns_create_terminal):
+       * w32term.c (w32_create_terminal):
+       * xterm.c (x_create_terminal) [USE_X_TOOLKIT || USE_GTK]:
+       Setup popup_dialog_hook.
+
+2014-06-04  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32heap.c (report_temacs_memory_usage): Improve the report by
+       reporting the large blocks that are actually occupied at dump time.
+
+       * w32console.c (initialize_w32_display): Set the console
+       menu_show_hook, otherwise TTY menus are broken on w32.
+
+2014-06-04  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Use terminal-specific hooks to display menus.
+       * termhooks.h (struct terminal): New field menu_show_hook.
+       * menu.h (<anonymous enum>): Bit flags for menu hooks.
+       (x_menu_show, w32_menu_show, ns_menu_show, tty_menu_show):
+       Adjust prototypes.
+       * menu.c (Fx_popup_menu): Use bit flags and menu_show_hook.
+       * nsmenu.m (ns_menu_show):
+       * w32menu.c (w32_menu_show):
+       * xmenu.c (x_menu_show):
+       * term.c (tty_menu_show): Adjust to use bit flags.
+       (set_tty_hooks): Set menu_show_hook.
+       * xterm.c (x_create_terminal):
+       * nsterm.m (ns_create_terminal):
+       * msdos.c (initialize_msdos_display):
+       * w32term.c (w32_create_terminal): Likewise.
+
+2014-06-03  Juanma Barranquero  <lekktu@gmail.com>
+
+       * w32heap.c (DUMPED_HEAP_SIZE) [!_WIN64]: Reduce to 11 MB.
+
+2014-06-03  Eli Zaretskii  <eliz@gnu.org>
+
+       * sysselect.h (fd_CLR, fd_ISSET, fd_SET, FD_CLR, FD_ISSET)
+       (FD_SET): Don't define on WINDOWSNT.
+
+2014-06-03  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * emacs.c: Include "sysselect.h", to define its inline functions.
+       Problem reported by Glenn Morris in:
+       http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00077.html
+
+       Do not require libXt-devel when building with gtk.
+       * gtkutil.h, menu.h: Include lwlib-widget.h, not lwlib-h, to avoid
+       dependency on libXt-devel.
+       * menu.h [HAVE_NTGUI]: Include lwlib-widget.h in this case too.
+       (enum button_type, widget_value) [HAVE_NTGUI]: Remove, as
+       lwlib-widget.h now does this.
+       * nsmenu.m (ns_menu_show): "enabled" -> "enable" to fix typo.
+
+2014-06-03  Paul Eggert  <eggert@penguin.cs.ucla.edu>
+
+       If ENABLE_CHECKING, range-check args of FD_CLR, FD_ISSET, FD_SET.
+       * process.c (add_read_fd, delete_read_fd, add_write_fd)
+       (delete_write_fd, wait_reading_process_output):
+       Remove now-redundant easserts.
+       * sysselect.h (SYSSELECT_H): New macro, to avoid double-inclusion woes.
+       Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
+       (fd_CLR, fd_ISSET, fd_SET): New inline functions.
+       (FD_CLR, FD_ISSET, FD_SET): Redefine in terms of these functions.
+
+2014-06-03  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32heap.c (DUMPED_HEAP_SIZE): Move from w32heap.h.  Don't use
+       HEAPSIZE; instead, define separate values for the 32- and 64-bit builds.
+       (calloc): Don't undef, it is never defined.
+       (HEAP_ENTRY_SHIFT): Remove unused macro.
+
+       * Makefile.in (C_HEAP_SWITCH): Remove.
+       (ALL_CFLAGS): Don't use $(C_HEAP_SWITCH).
+
+       Fix MS-Windows build broken by menu changes on 2014-06-02.
+       * w32menu.c (w32_menu_show): Fix a typo that broke compilation.
+
+       * menu.h (enum button_type, struct _widget_value) [HAVE_NTGUI]:
+       Define instead of including ../lwlib/lwlib.h, which causes
+       compilation errors due to missing X11 headers.
+
+2014-06-03  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * process.c (wait_reading_process_output): Omit incorrect test of
+       p->infd against zero.  Add easserts for infd having a plausible value.
+
+2014-06-02  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Adjust to match recent lwlib changes.
+       * menu.h (xmalloc_widget_value): Replace by ...
+       (make_widget_value): ... new prototype.
+       * menu.c (xmalloc_widget_value): Replace by ...
+       (make_widget_value): ... new function.
+       (free_menubar_widget_value_tree, digest_single_submenu): Adjust users.
+       * gtkutil.c (malloc_widget_value, free_widget_value):
+       (widget_value_free_list, malloc_cpt): Remove old lwlib-compatible code.
+       * keyboard.h (enum button_type, struct _widget_value):
+       * gtkutil.h, nsgui.h, w32gui.h (malloc_widget_value, free_widget_value):
+       Likewise.
+       * nsmenu.m (ns_update_menubar, ns_menu_show):
+       * w32menu.c (set_frame_menubar, w32_menu_show, w32_dialog_show):
+       * xmenu.c (set_frame_menubar, xmenu_show, x_dialog_show): Adjust users.
+       * xterm.h (XtParent) [USE_GTK]: Remove unused macro.
+
+2014-06-02  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * image.c (x_query_frame_background_color)
+       [HAVE_PNG || HAVE_NS || HAVE_IMAGEMAGICK || HAVE_RSVG]:
+       Fix --enable-gcc-warnings compilation without image libraries.
+
+2014-06-02  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32heap.c (malloc_after_dump, realloc_after_dump): Update the
+       emulated break value only if it goes up.
+       (sbrk): Add assertion that the INCREMENT argument is strictly
+       zero.  Improve and correct the commentary.
+
+2014-06-02  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Improve AIX-related merge from emacs-24.
+       * conf_post.h (FLEXIBLE_ARRAY_MEMBER): Fix comment.
+       * lisp.h (ENUMABLE) [!_AIX]: Don't define to 0 merely because we're
+       not on AIX; since we're on the trunk we can use enums more broadly.
+
+       * frame.c (x_set_frame_parameters): Don't read uninitialized storage.
+
+2014-06-02  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * xterm.c (xg_scroll_callback): Remove position, for jump set portion
+       to min(value, whole).
+
+2014-06-02  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Bring back the changes to GDB-visible symbols, but only on AIX.
+       And only if it's not pre-4.2 GCC.
+       * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): New macros.
+       (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
+       (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
+       New macros.
+
+2014-06-02  Eli Zaretskii  <eliz@gnu.org>
+
+       * fileio.c (Finsert_file_contents): Call prepare_to_modify_buffer
+       with PT, not GPT.  (Bug#16433)
+
+       Revert last changes to GDB-visible symbols.
+       * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): Delete macros.
+       (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Don't use them.
+       (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
+       Delete macros.
+
+2014-06-02  Glenn Morris  <rgm@gnu.org>
+
+       * cmds.c (Fself_insert_command): Allow zero repeat count.  (Bug#17649)
+
+2014-06-02  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Fix port to 32-bit AIX with xlc (Bug#17598).
+       * alloc.c (gdb_make_enums_visible): Remove FLOAT_TO_STRING_BUFSIZE.
+       * conf_post.h (FLEXIBLE_ARRAY_MEMBER) [__IBMC__]: Don't define to empty.
+       * lisp.h (FLOAT_TO_STRING_BUFSIZE): Make it a macro, instead of an enum,
+       to work around a compiler bug in IBM xlc 12.1.
+
+2014-06-02  Eli Zaretskii  <eliz@gnu.org>
+
+       * xterm.c (x_update_window_end): Don't invalidate the entire
+       mouse-highlight info, just signal frame_up_to_date_hook that mouse
+       highlight needs to be redisplayed.  (Bug#17588)
+
+2014-06-02  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Port the GDB-visible symbols to AIX.
+       Without them, GDB doesn't work to debug Emacs, since the AIX linker
+       optimizes away the relevant external symbols.  Use enums instead;
+       this suffices for the AIX port, which is 32-bit-only anyway.
+       * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): New macros.
+       (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
+       (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
+       New macros.
+
+       Include sources used to create macuvs.h.
+       * Makefile.in ($(srcdir)/macuvs.h): New rule.
+       * macuvs.h: Use automatically-generated header.
+
+2014-06-01  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Port signal-handling to DragonFly BSD (Bug#17646).
+       * callproc.c, sysdep.c (block_child_signal, unblock_child_signal):
+       Move implementations from callproc.c to sysdep.c.
+       * process.h, syssignal.h (block_child_signal, unblock_child_signal):
+       Move declarations from process.h to syssignal.h.
+
+2014-06-01  Juanma Barranquero  <lekktu@gmail.com>
+
+       * callint.c (Ffuncall_interactively): Add usage.
+
+2014-06-01  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * nsfns.m (ns_appkit_version_str): Add os version for Cocoa.
+
+2014-05-30  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32heap.c (malloc_before_dump, malloc_after_dump)
+       (malloc_before_dump, realloc_after_dump, realloc_before_dump)
+       (mmap_alloc, mmap_realloc): Check for errors more thoroughly and
+       set errno where appropriate to emulate CRT functions.
+
+2014-05-30  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Debugging facility to check whether 'const char *' points to
+       relocatable data of non-pure Lisp string.
+       * alloc.c (maybe_lisp_pointer): New function, refactored out of ...
+       (mark_maybe_pointer): ... adjusted user.
+       (relocatable_string_data_p): New function.
+       * lisp.h (relocatable_string_data_p): Add prototype.
+       * xdisp.c (message_with_string): If ENABLE_CHECKING, make sure
+       the pointer to relocatable Lisp data is not used.
+
+2014-05-30  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Don't let SIGINT handling block SIGCHLD indefinitely (Bug#17561).
+       * atimer.c (block_atimers):
+       * callproc.c (block_child_signal): Block SIGINT too;
+       otherwise, its handler might now unblock signals that it shouldn't.
+       * keyboard.c (read_char): Clear signal mask, since we may
+       be in a SIGINT handler, and many signals may be masked.
+       * keyboard.c (handle_interrupt):
+       * sysdep.c (handle_arith_signal):
+       Clear signal mask instead of just unblocking the signal that
+       was received, since several signals may be blocked at this point.
+
+2014-05-29  Eli Zaretskii  <eliz@gnu.org>
+
+       * Makefile.in (TEMACS_POST_LINK): Remove target.
+       (emacs$(EXEEXT)): Remove $(ADDSECTION) from prerequisites.
+       (temacs$(EXEEXT)): Remove $(TEMACS_POST_LINK) from the recipe.
+
+2014-05-29  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * xmenu.c (xdialog_show): Remove prototype, rename to
+       x_dialog_show, remove 2nd arg because it's always zero
+       and simplify accordingly.
+       (xw_popup_dialog): Adjust user.
+       * w32menu.c (w32_dialog_show): Adjust prototype, remove
+       2nd arg because it's always zero and simplify accordingly.
+       (w32_popup_dialog): Adjust user.
+
+2014-05-29  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32heap.c (report_temacs_memory_usage): New function.
+
+       * unexw32.c (unexec) [ENABLE_CHECKING]:
+       Call report_temacs_memory_usage.
+
+       * w32heap.h (report_temacs_memory_usage): Add prototype.
+
+2014-05-29  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Don't substitute sigprocmask for pthread_sigmask (Bug#17561).
+       * Makefile.in (LIB_PTHREAD_SIGMASK): Remove; all uses removed.
+
+2014-05-29  Eli Zaretskii  <eliz@gnu.org>
+
+       * buffer.c (init_buffer): Accept an argument 'initialized'.
+       [USE_MMAP_FOR_BUFFERS]: If 'initialized' is non-zero, reset
+       mmap_regions and mmap_fd, to avoid referencing stale data from the
+       dump phase.  Add an assertion for buffer text of buffers created
+       in temacs before this function is called.  (Bug#17622)
+       (mmap_regions_1, mmap_fd_1): Remove unused variables.
+
+       * lisp.h (init_buffer): Update prototype.
+
+       * emacs.c (main): Pass 'initialized' as the argument to init_buffer.
+
+2014-05-29  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * alloc.c (Fgarbage_collect): Fix compilation with
+       GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.
+
+2014-05-29  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * frame.c, frame.h (frame_char_to_pixel_position)
+       (frame_set_mouse_position): Now static, and made private in
+       frame.c rather than public in frame.h.
+
+2014-05-28  Dmitry Antipov  <dmantipov@yandex.ru>
 
-       * fileio.c (write-region-inhibit-fsync): Doc tweak.
+       Refactor mouse positioning stuff to avoid code duplication.
+       * frame.h (frame_char_to_pixel_position): New function.
+       (x_set_mouse_position): Rename to...
+       (frame_set_mouse_position): ...new function.
+       (frame_set_mouse_pixel_position): Add prototype.
+       * nsterm.m, w32term.c, xterm.c (x_set_mouse_pixel_position):
+       Rename to frame_set_mouse_pixel_position.
+       * frame.c (Fset_mouse_pixel_position, Fset_mouse_position):
+       Adjust users.
+       * xterm.h, w32term.h ( x_set_mouse_position)
+       (x_set_mouse_pixel_position): Remove prototypes.
 
-       * data.c (Flss, Fgtr, Fleq, Fgeq): Doc tweaks.
+2014-05-28  Dmitry Antipov  <dmantipov@yandex.ru>
 
-2014-06-04  Eli Zaretskii  <eliz@gnu.org>
+       On X, always make pointer visible when deleting frame (Bug#17609).
+       * frame.c (frame_make_pointer_visible, frame_make_pointer_invisible):
+       Pass frame as arg.
+       * frame.h (frame_make_pointer_visible, frame_make_pointer_invisible):
+       Adjust prototypes.
+       * cmds.c (Fself_insert_command): Use SELECTED_FRAME.
+       * keyboard.c (gobble_input): If there is no terminal input error,
+       make sure the pointer is visible for all frames on this terminal.
+       * xterm.c (x_free_frame_resources): Enable pointer visibility if
+       it was previously disabled.
 
-       * sysdep.c (reset_sys_modes): Use cursorX, not curX, as the latter
-       contains garbage on WINDOWSNT (which could potentially infloop at
-       exit).
+2014-05-28  Stefan Monnier  <monnier@iro.umontreal.ca>
 
-       Minimize cursor motion during TTY menu updates.
-       * term.c (tty_menu_display): Don't position cursor here.  Instead,
-       pass the cursor coordinates to update_frame_with_menu.
-       (tty_menu_activate): Send the hide cursor command only once in an
-       iteration through the outer 'while' loop.
+       * data.c (Fzerop): Move to Elisp.
+       (syms_of_data): Don't defsubr it.
+       * keyboard.c (echo_keystrokes_p): New function.
+       (read_char, record_menu_key, read_key_sequence): Use it.
 
-       * dispnew.c (update_frame_1): Accept an additional argument
-       SET_CURSOR_P, and position the cursor at the end of the frame
-       update only if that argument is non-zero.  All callers changed to
-       provide the additional argument as non-zero, except for
-       update_frame_with_menu.
-       (update_frame_with_menu): Accept 2 additional arguments ROW and
-       COL; if they are non-negative, instruct update_frame_1 not to
-       position the cursor, and instead position it according to ROW and
-       COL.
+       * callint.c (Qfuncall_interactively): New var.
+       (Qcall_interactively): Remove.
+       (Ffuncall_interactively): New function.
+       (Fcall_interactively): Use it.
+       (syms_of_callint): Defsubr it.
 
-       * dispextern.h (update_frame_with_menu): Update prototype.
+2014-05-27  Stefan Monnier  <monnier@iro.umontreal.ca>
 
-2014-06-02  Stefan Monnier  <monnier@iro.umontreal.ca>
+       * bytecode.c (FETCH) [BYTE_CODE_SAFE]: Check the bytecode wasn't
+       relocated from under us.
 
-       * callproc.c (call_process): Don't check read-only if we don't insert
-       anything (bug#17666).
+2014-05-27  Fabrice Popineau  <fabrice.popineau@gmail.com>
 
-2014-06-02  Eli Zaretskii  <eliz@gnu.org>
+       Use mmap(2) emulation for allocating buffer text on MS-Windows.
+       * Makefile.in (C_HEAP_SWITCH): Get the predefined heap size from
+       configure, not from HEAPSIZE.
+       (ADDSECTION, MINGW_TEMACS_POST_LINK): Remove, no longer used.
 
-       * dispnew.c (update_frame_with_menu): Set display_completed.
+       * lisp.h (NONPOINTER_BITS): Modify the condition to define to zero
+       for MinGW, since it no longer uses gmalloc.
 
-2014-06-01  Paul Eggert  <eggert@cs.ucla.edu>
+       * buffer.c: Do not define mmap allocations functions for Windows.
+       Remove mmap_find which is unused. Remove mmap_set_vars which does
+       nothing useful.
+       [WINDOWSNT]: Include w32heap.h.
+       (init_buffer): Always allocate new memory for buffers.
 
-       * frame.c (x_set_frame_parameters): Don't read uninitialized storage.
+       * emacs.c: Remove mmap_set_vars calls.
 
-2014-06-01  Jan Djärv  <jan.h.d@swipnet.se>
+       * image.c (free_image): Undef free for Windows because it is
+       redirected to our private version.
 
-       * xterm.c (xg_scroll_callback): Remove position, for jump set portion
-       to min(value, whole).
+       * unexw32.c (COPY_PROC_CHUNK): Use %p format for 64bits compatibility.
+       (copy_executable_and_dump_data): Remove dumping the heap section.
+       (unexec): Restore using_dynamic_heap after dumping.
 
-2014-06-01  Paul Eggert  <eggert@cs.ucla.edu>
+       * w32heap.c (dumped_data_commit, malloc_after_dump)
+       (malloc_before_dump, realloc_after_dump, realloc_before_dump)
+       (free_after_dump, free_before_dump, mmap_alloc, mmap_realloc)
+       (mmap_free): New functions.
 
-       Bring back the changes to GDB-visible symbols, but only on AIX.
-       And only if it's not pre-4.2 GCC.
-       * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): New macros.
-       (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
-       (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
-       New macros.
+       * w32heap.h: Declare dumped_data and mmap_* function prototypes.
 
-2014-05-31  Eli Zaretskii  <eliz@gnu.org>
+2014-05-27  Paul Eggert  <eggert@cs.ucla.edu>
 
-       * fileio.c (Finsert_file_contents): Call prepare_to_modify_buffer
-       with PT, not GPT.  (Bug#16433)
+       * image.c (imagemagick_load_image): Use MagickRealType for local
+       'color_scale', instead of double, to avoid a GCC warning about
+       double promotion.
 
-       Revert last changes to GDB-visible symbols.
-       * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): Delete macros.
-       (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Don't use them.
-       (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
-       Delete macros.
+       * xfns.c (Fx_window_property): Remove unused local.
 
-2014-05-31  Glenn Morris  <rgm@gnu.org>
+       Don't kill already-reaped process (Bug#17561).
+       * process.c (process_send_signal): Fix race condition where a
+       subprocess was reaped by a signal handler between the check for
+       liveness and calling 'kill', which meant that Emacs could in
+       theory kill an innocent bystander process.  Do the fix by blocking
+       SIGCHLD in a critical section that checks liveness before killing.
 
-       * cmds.c (Fself_insert_command): Allow zero repeat count.  (Bug#17649)
+2014-05-26  Eli Zaretskii  <eliz@gnu.org>
 
-2014-05-30  Paul Eggert  <eggert@cs.ucla.edu>
+       * w32.c (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT): Define only if undefined.
 
-       Fix port to 32-bit AIX with xlc (Bug#17598).
-       * alloc.c (gdb_make_enums_visible): Remove FLOAT_TO_STRING_BUFSIZE.
-       * conf_post.h (FLEXIBLE_ARRAY_MEMBER) [__IBMC__]: Don't define to empty.
-       * lisp.h (FLOAT_TO_STRING_BUFSIZE): Make it a macro, instead of an enum,
-       to work around a compiler bug in IBM xlc 12.1.
+2014-05-26  Ken Brown  <kbrown@cornell.edu>
 
-2014-05-29  Eli Zaretskii  <eliz@gnu.org>
+       * w32term.c (x_delete_display): Don't free dpyinfo->w32_id_name,
+       even if !CYGWIN (see bug#17510).
 
-       * xterm.c (x_update_window_end): Don't invalidate the entire
-       mouse-highlight info, just signal frame_up_to_date_hook that mouse
-       highlight needs to be redisplayed.  (Bug#17588)
+2014-05-26  Jan Djärv  <jan.h.d@swipnet.se>
 
-2014-05-29  Paul Eggert  <eggert@cs.ucla.edu>
+       * nsfns.m (Fns_do_applescript): Surround NSApp run
+       with calls to ns_init_events, ns_finish_events (Bug#17424).
 
-       Port the GDB-visible symbols to AIX.
-       Without them, GDB doesn't work to debug Emacs, since the AIX linker
-       optimizes away the relevant external symbols.  Use enums instead;
-       this suffices for the AIX port, which is 32-bit-only anyway.
-       * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): New macros.
-       (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
-       (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
-       New macros.
+       * nsterm.h (ns_init_events, ns_finish_events): Declare.
 
-2014-05-26  Paul Eggert  <eggert@cs.ucla.edu>
+       * nsterm.m (ns_init_events, ns_finish_events): New functions.
+       (ns_read_socket, ns_select): Call ns_init_events, ns_finish_events.
 
-       Include sources used to create macuvs.h.
-       * Makefile.in ($(srcdir)/macuvs.h): New rule.
-       * macuvs.h: Use automatically-generated header.
+       * nsfns.m (ns_do_applescript): Surround executeAndReturnError
+       with calls to ns_init_events, ns_finish_events (Bug#17424).
 
-2014-05-25  Eli Zaretskii  <eliz@gnu.org>
+2014-05-26  Eli Zaretskii  <eliz@gnu.org>
 
        * xdisp.c (move_it_in_display_line_to): Don't record wrap position
        if we are iterating over an object that generates glyphs for
        marginal areas.  (Bug#17585)
 
-2014-05-24  Paul Eggert  <eggert@cs.ucla.edu>
+2014-05-26  Paul Eggert  <eggert@cs.ucla.edu>
 
        * xdisp.c (safe__call1, safe__eval): Now static.
 
-2014-05-24  Eli Zaretskii  <eliz@gnu.org>
+2014-05-26  Eli Zaretskii  <eliz@gnu.org>
 
        * xdisp.c (safe__call): Accept va_list argument instead of '...'.
        (safe_call, safe__call1): Construct a va_list argument for safe_call.
        (safe_call1): Call safe_call instead of safe__call directly.
 
-2014-05-24  Ken Brown  <kbrown@cornell.edu>
+2014-05-26  Ken Brown  <kbrown@cornell.edu>
 
        * w32term.c (x_delete_display) [CYGWIN]: Don't free
        dpyinfo->w32_id_name, to make sure it doesn't get freed more than
        once.  (Bug#17510)
 
-2014-05-24  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-05-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * xdisp.c: Bind inhibit-quit during pre-redisplay-function.
        (safe__call, safe__call1, safe__eval): New functions.
        (prepare_menu_bars): Use it for pre-redisplay-function (bug#17577).
        (display_mode_element): Same for `:eval'.
 
-2014-05-22  Paul Eggert  <eggert@cs.ucla.edu>
+2014-05-26  Paul Eggert  <eggert@cs.ucla.edu>
 
        Fix port to 32-bit AIX (Bug#17540).
        * unexaix.c (copy_text_and_data): Don't add text_scnptr to ptr
        twice.  _text already includes this offset.
        (unrelocate_symbols): Don't cast 64-bit integer to pointer.
 
-2014-05-21  Eli Zaretskii  <eliz@gnu.org>
+2014-05-26  Eli Zaretskii  <eliz@gnu.org>
 
        * xdisp.c (move_it_in_display_line_to): Avoid infinite recursion:
        when closest_pos is identical to to_charpos, don't recurse, since
        we already tried that, and failed.  (Bug#17539)
 
-2014-05-20  Eli Zaretskii  <eliz@gnu.org>
-
        * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: If we are
        unwinding when frame's faces were not initialized yet, increment
        the frame's image-cache reference count before calling
        x_free_frame_resources.  Don't dereference
        dpyinfo->terminal->image_cache if it is NULL.  (Bug#17524)
 
-2014-05-11  Glenn Morris  <rgm@gnu.org>
+2014-05-25  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * nsfont.m (nsfont_draw): Simplify as arguments are adjusted in
+       nsterm.m now.
+
+       * nsterm.m (ns_draw_glyph_string): Move isComposite and end from
+       macfont.m, call draw with adjusted arguments so font drivers
+       don't need to do that.
+
+       * macfont.m (macfont_draw): Merge changes from Macport.
+
+2014-05-24  Eli Zaretskii  <eliz@gnu.org>
+
+       * alloc.c (garbage_collect_1): New function, with all of the guts
+       of Fgarbage_collect.
+       (mark_stack): Accept an argument END and don't mark Lisp objects
+       on the stack beyond the address given by END.  Calculation of END
+       was moved to Fgarbage_collect.
+       (Fgarbage_collect): Calculate the end address of the stack portion
+       that needs to be examined by mark_stack, and pass that address to
+       garbage_collect_1, which will pass it to mark_stack.
+       See http://lists.gnu.org/archive/html/emacs-devel/2014-05/msg00270.html
+       for more details about the underlying problems.  In particular,
+       this avoids dumping Emacs with the large hash-table whose value is
+       held in purify-flag for most of the time loadup.el runs.
+
+2014-05-24  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * xfns.c (x_window_property_intern): New function (code from
+       x_window_property).
+       (Fx_window_property): Call x_window_property_intern.  If property
+       not found and NILP (source) and outer window != inner window,
+       check outer window for property (Bug#17537).
+
+2014-05-22  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Supply malloc and alloc_size attributes for extern allocators.
+       This documents the C API, and helps GCC generate a bit better code.
+       * conf_post.h (ATTRIBUTE_MALLOC, ATTRIBUTE_ALLOC_SIZE)
+       (ATTRIBUTE_MALLOC_SIZE): New macros.
+       * gmalloc.c (malloc, realloc, calloc):
+       * gtkutil.h (malloc_widget_value):
+       * lisp.h (ralloc, r_re_alloc, xmalloc, xzalloc, xrealloc, xnmalloc)
+       (xnrealloc, xstrdup, xlispstrdup, record_xmalloc):
+       Use them.
+
+2014-05-21  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Don't assume that ImageMagick uses a 16-bit quantum (Bug#17519).
+       * image.c (imagemagick_load_image): Port to hosts that do not use
+       a 16-bit quantum, i.e., QuantumRange does not equal 65535.
+
+2014-05-21  Leo Liu  <sdl.web@gmail.com>
+
+       * fns.c (Fnreverse): Accept strings for SEQ and update doc-string.
+
+2014-05-20  Michael Albinus  <michael.albinus@gmx.de>
+
+       * dbusbind.c (xd_signature): Revert last 2 patches.
+
+2014-05-19  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Allow any non-nil value to count as true in bool-vector.
+       Likewise for xd_signature in dbusbind.c.
+       This is more consistent with the usual practice in Emacs, which is
+       that any non-nil value counts as true.
+       * alloc.c (Fbool_vector): Don't require args to be t or nil.
+       * dbusbind.c (xd_signature): Likewise, for booleans.
+       * data.c, lisp.h (Qbooleanp):
+       * lisp.h (CHECK_BOOLEAN): Remove.  All uses removed.
+
+2014-05-19  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * lisp.h (CHECK_BOOLEAN): New function.
+       * alloc.c (Fbool_vector): New function.
+       (syms_of_alloc): Defsubr it.
+       * data.c (Qbooleanp): New symbol.
+       (syms_of_data): DEFSYM it.
+       * dbusbind.c (xd_signature): Use CHECK_BOOLEAN.
+
+       * font.c (font_matching_entity): Extract font-entity object
+       from the vector of matching entities (Bug#17486).
+
+2014-05-17  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Assume C99 or later (Bug#17487).
+       * bytecode.c (B__dummy__): Remove.
+       * conf_post.h (bool_bf) [!NS_IMPL_GNUSTEP]: Use bool.
+       (FLEXIBLE_ARRAY_MEMBER): Now always empty.
+       * dbusbind.c (XD_DEBUG_MESSAGE) [!DBUS_DEBUG]:
+       * regex.c (DEBUG_PRINT): Assume varargs macros.
+       * lisp.h (DEFUN_FUNCTION_INIT): Remove.  All uses now assume C99.
+
+2014-05-17  Fabrice Popineau  <fabrice.popineau@gmail.com>
+
+       * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Always map new
+       memory for every buffer that was dumped.
+
+2014-05-15  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * fns.c (Freverse): Allow vectors, bool vectors and strings.
+       (Fnreverse): Allow vectors and bool vectors.
+
+2014-05-14  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Minor cleanup for terminal setup.
+       * termhooks.h (create_terminal): Adjust prototype.
+       * terminal.c (create_terminal): Pass output method and RIF as args.
+       (init_initial_terminal):
+       * nsterm.m (ns_create_terminal):
+       * term.c (init_tty):
+       * w32term.c (w32_create_terminal):
+       * xterm.c (x_create_terminal): Adjust users.
+       Avoid redundant NULL initializers and add comments.
+
+2014-05-13  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * keyboard.c (Qdeactivate_mark): Now static.
+
+2014-05-13  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       If available, use Xfixes extension to do pointer blanking.
+       * Makefile.in (XFIXES_CFLAGS, XFIXES_LIBS): New var.
+       * xfns.c (x_set_mouse_color): Do not call make_invisible_cursor here.
+       (make_invisible_cursor): Move to...
+       * xterm.c (make_invisible_cursor): ...here.
+       (x_probe_xfixes_extension, xfixes_toggle_visible_pointer)
+       (x_toggle_visible_pointer, x_setup_pointer_blanking): New functions.
+       (x_term_init): Call to x_setup_pointer_blanking.
+       (XTtoggle_invisible_pointer): Use blanking specific to this display.
+       * xterm.h (struct x_display_info): New member toggle_visible_pointer.
+
+2014-05-12  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+       * xdisp.c (draw_glyphs): Set clipping to highlight boundaries.
+
+2014-05-12  Glenn Morris  <rgm@gnu.org>
 
        * fileio.c (Ffile_executable_p): Doc tweak.
 
-2014-05-10  Jan Djärv  <jan.h.d@swipnet.se>
+2014-05-12  Jan Djärv  <jan.h.d@swipnet.se>
 
        * xsettings.c (init_gsettings): Use g_settings_schema_source_lookup
        instead of deprecated g_settings_list_schemas if possible (Bug#17434).
 
-2014-05-07  Paul Eggert  <eggert@cs.ucla.edu>
+2014-05-08  Paul Eggert  <eggert@cs.ucla.edu>
 
        * minibuf.c (read_minibuf): Avoid C99ism in previous patch (Bug#17430).
 
-2014-05-07  Jarek Czekalski  <jarekczek@poczta.onet.pl>
+2014-05-08  Jarek Czekalski  <jarekczek@poczta.onet.pl>
 
        Fix initialization of minibuffer history variable (Bug#17430).
        * minibuf.c (read_minibuf): Initialize histval to Qnil if unbound.
        Move the initialization up to prevent any "value void" message.
 
-2014-05-06  Samuel Bronson  <naesten@gmail.com>
+2014-05-08  Samuel Bronson  <naesten@gmail.com>
 
        * keyboard.c (Frecursive_edit): Ensure inc&dec of command_loop_level
        are matched (bug#17413).
 
-2014-05-06  Jarek Czekalski  <jarekczek@poczta.onet.pl>
+2014-05-08  Jarek Czekalski  <jarekczek@poczta.onet.pl>
 
        Stop tooltips pulling Emacs window to front (Bug#17408).
        * w32fns.c (Fx_show_tip): Add SWP_NOOWNERZORDER flag to
        SetWindowPos invocations.
 
-2014-05-05  Jan Djärv  <jan.h.d@swipnet.se>
+2014-05-08  Jan Djärv  <jan.h.d@swipnet.se>
 
        * nsselect.m (Fx_selection_exists_p): Just return Qnil if window system
        not initialized (Bug#17398).
 
+2014-05-07  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * image.c: Include <png.h> before <setjmp.h> (Bug#17429).
+
+2014-05-06  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * image.c: Do not use libpng if HAVE_NS, as NS does its own thing.
+       [HAVE_NS]: Do not include png.h.
+       (x_query_frame_background_color): New function.
+       (png_load_body, imagemagick_load_image, svg_load_image): Use it.
+       (png_load_body): Coalesce duplicate code.
+
 2014-05-04  Paul Eggert  <eggert@cs.ucla.edu>
 
-       Revert recent libpng changes (Bug#17339).
-       * Makefile.in (PNG_CFLAGS): Remove; all uses removed.
-       * image.c [HAVE_LIBPNG_PNG_H]: Include <libpng/png.h>, not <png.h>.
+       Consult libpng-config more consistently (Bug#17339).
+       * Makefile.in (PNG_CFLAGS): New var.
+       (ALL_CFLAGS): Use it.
+       * image.c [HAVE_PNG]: Don't worry about <libpng/png.h>, as
+       CFLAGS now handles this.
 
 2014-05-03  Paul Eggert  <eggert@cs.ucla.edu>
 
 
        * buffer.c (overlay_strings): Fix the wording of the commentary.
 
-2014-05-02  Paul Eggert  <eggert@cs.ucla.edu>
-
-       Consult libpng-config more consistently (Bug#17339).
-       * Makefile.in (PNG_CFLAGS): New var.
-       (ALL_CFLAGS): Use it.
-       * image.c [HAVE_PNG]: Don't worry about <libpng/png.h>, as
-       CFLAGS now handles this.
-
 2014-05-01  Glenn Morris  <rgm@gnu.org>
 
        * floatfns.c (Fisnan):
        GCC 4.9.0 warned about this, and I couldn't easily prove to my own
        satisfaction that they would always be initialized.
 
-2014-04-29  Eli Zaretskii  <eliz@gnu.org>
+2014-04-30  Eli Zaretskii  <eliz@gnu.org>
 
-       * term.c (tty_menu_display): Move the cursor to the active menu
-       item.
+       * term.c (tty_menu_display): Move the cursor to the active menu item.
        (tty_menu_activate): Return the cursor to the active menu item
-       after displaying the menu and after displaying help-echo.  See
-       http://lists.gnu.org/archive/html/emacs-devel/2014-04/msg00402.html
+       after displaying the menu and after displaying help-echo.
+       See http://lists.gnu.org/archive/html/emacs-devel/2014-04/msg00402.html
        for the details of why this is needed by screen readers and
        Braille displays.
 
-2014-04-29  Glenn Morris  <rgm@gnu.org>
+2014-04-30  Glenn Morris  <rgm@gnu.org>
 
        * process.c (handle_child_signal):
        Handle systems without WCONTINUED.  (Bug#15110, 17339)
 
-2014-04-23  Eli Zaretskii  <eliz@gnu.org>
+2014-04-29  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * window.c (struct saved_window): Remove mark.
+       (Fset_window_configuration, save_window_save)
+       (compare_window_configurations): Don't touch marks any more.
+
+2014-04-28  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Use bits_word for gcmarkbits.
+       * alloc.c (struct cons_block, struct float_block): On 64-bit hosts,
+       bits_word is typically a tad more efficient for mark bits than
+       unsigned is, so use bits_word.  All uses changed.
+       * lisp.h (BITS_PER_INT): Remove; no longer used.
+
+       Avoid undefined behavior in signed left shift.
+       This ports to GCC 4.9.0 with -fsanitize=undefined.
+       * alloc.c (bool_vector_fill, SETMARKBIT, UNSETMARKBIT):
+       * data.c (Fash):
+       * regex.c (extract_number):
+       * lisp.h (make_number, XINT):
+       Do not shift a 1 bit left into a sign bit.
+       * alloc.c (struct cons_block, struct float_block): Use unsigned,
+       not int, for gcmarkbits.  All uses changed.
+
+2014-04-25  Eli Zaretskii  <eliz@gnu.org>
 
        * search.c (Fnewline_cache_check): Don't try to count newlines
        outside the buffer's restriction, as find_newline doesn't support that.
 
+2014-04-24  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * window.c (Fset_window_configuration): Deactivate the mark before
+       unsetting the mark.
+       (set_window_buffer): Ignore window_initialized.
+       (window_initialized): Remove.
+       * keyboard.c (Qdeactivate_mark): Not static any more.
+       * buffer.c (buffer_local_value): Rename from buffer_local_value_1.
+       Update all callers.
+
+2014-04-23  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * conf_post.h (ADDRESS_SANITIZER_WORKAROUND): Port to GCC 4.9.0
+       and to clang 3.4, which have fixed the bug.  This should let us
+       run a bit faster on these platforms when address sanitization is
+       in effect.
+
 2014-04-22  Paul Eggert  <eggert@cs.ucla.edu>
 
        Port to GCC 4.9.0 with --enable-gcc-warnings.
        (Fnewline_cache_check): New function.
        (syms_of_search): Defsubr it.
 
-2014-04-21  Jarek Czekalski  <jarekczek@poczta.onet.pl>
+2014-04-22  Jarek Czekalski  <jarekczek@poczta.onet.pl>
 
        Fix freezing with scroll bars of GTK3 Toolkit (bug#15801).
        * keyboard.c (unblock_input): Add comment.
        * xgselect.c (xg_select): Prevent Glib main loop recursion.
 
+2014-04-22  Daniel Colascione  <dancol@dancol.org>
+
+       * lread.c (readevalloop_eager_expand_eval): New function
+       that can recurse into toplevel forms.
+       (readevalloop): Call it.
+       * lisp.h: Declare Qprogn.
+       * callint.c (Qprogn): No longer static.
+
 2014-04-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * intervals.c (rotate_right, rotate_left): Fix up length computation.
        Also change identifiers to match the comments, and add more assertions
        (bug#16234).
 
-2014-04-18  Eli Zaretskii  <eliz@gnu.org>
-
-       * xdisp.c (insert_left_trunc_glyphs): Ensure the left truncation
-       glyph is written to TEXT_AREA of the temporary glyph_row.
-       (Bug#17288)
-
 2014-04-18  Paul Eggert  <eggert@cs.ucla.edu>
 
        * emacs.c (close_output_streams): Don't clear and restore errno.
 
-2014-04-17  Jan Djärv  <jan.h.d@swipnet.se>
+2014-04-18  Jan Djärv  <jan.h.d@swipnet.se>
 
        * xterm.c (x_make_frame_visible): Prevent endless loop when frame
        never becomes visible, i.e. using XMonad  (Bug#17237).
 
-2014-04-17  Eli Zaretskii  <eliz@gnu.org>
+2014-04-18  Eli Zaretskii  <eliz@gnu.org>
 
-       * xdisp.c (Fline_pixel_height): Don't assume that the current
-       buffer and the selected window's buffer are one and the same.
-       (Bug#17281)
+       * xdisp.c (insert_left_trunc_glyphs): Ensure the left truncation
+       glyph is written to TEXT_AREA of the temporary glyph_row.  (Bug#17288)
+       (Fline_pixel_height): Don't assume that the current buffer and the
+       selected window's buffer are one and the same.  (Bug#17281)
 
        * insdel.c (invalidate_buffer_caches): Invalidate the bidi
        paragraph-start cache before the newline cache.  (Bug#17269)
 
+2014-04-17  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * term.c (tty_send_additional_strings): No need to fflush here,
+       as callers fflush.
+       (tty_set_terminal_modes): fflush after sending additional strings,
+       not before.
+
+2014-04-17  Daniel Colascione  <dancol@dancol.org>
+
+       * term.c (Qtty_mode_set_strings, Qtty_mode_reset_strings):
+       New symbols.
+       (tty_send_additional_strings): New function.
+       (tty_set_terminal_modes, tty_reset_terminal_modes): Use it.
+       (syms_of_term): Intern tty-mode-set-strings and
+       tty-mode-reset-strings.
+
 2014-04-16  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * window.c (save_window_save): Lookup window_point_insertion_type in
        Move vfork-related portions under #ifndef MSDOS.
        (syms_of_callproc): Unify templates of MSDOS and WINDOWSNT.
 
-2014-04-15  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-04-16  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * buffer.c (Foverlays_at): Add argument `sorted'.
 
-2014-04-14  Eli Zaretskii  <eliz@gnu.org>
+2014-04-16  Eli Zaretskii  <eliz@gnu.org>
 
        * insdel.c (invalidate_buffer_caches): When deleting or replacing
        text, invalidate the bidi_paragraph_cache upto and including the
        preceding newline.
 
-2014-04-13  Paul Eggert  <eggert@cs.ucla.edu>
+2014-04-16  Paul Eggert  <eggert@cs.ucla.edu>
 
        Port to IRIX 6.5 (Bug#9684).
-       * alloc.c (TAGGABLE_NULL): New constant,
-       for porting to hosts with nontrivial DATA_SEG_BITS settings.
-       (next_vector, set_next_vector): Use it.
        * conf_post.h (INET6) [IRIX6_5]: Define.
        (HAVE_GETADDRINFO) [IRIX6_5]: Undef.
        * data.c (BITS_PER_ULL): Don't assume ULLONG_MAX is defined.
-       * lisp.h (lisp_h_XPNTR): Don't OR in bits that aren't masked out,
-       for consistency with how TAGGABLE_NULL is computed.
 
-2014-04-13  Eli Zaretskii  <eliz@gnu.org>
+2014-04-16  Eli Zaretskii  <eliz@gnu.org>
 
        * keyboard.c (Fopen_dribble_file): Encode the dribble file-name
        before passing it to system APIs.
 
-       * puresize.h (BASE_PURESIZE): Bump by 1K.  (Bug#17255)
-
-2014-04-13  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-04-16  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * bytecode.c (exec_byte_code): Rework the volatiles.  Most importantly,
        make sure stack.byte_string_start is not de-adjusted by pushhandler.
 
-2014-04-12  Paul Eggert  <eggert@cs.ucla.edu>
+2014-04-16  Paul Eggert  <eggert@cs.ucla.edu>
 
        * keyboard.c (Fopen_dribble_file): Avoid some races.  (Bug#17187)
 
+2014-04-15  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Remove DATA_SEG_BITS.
+       The DATA_SEG_BITS hack was needed for older 32 bit platforms.
+       As a result of this change, Emacs won't work on IRIX 6.5 with IRIX
+       cc, but that platform is so old that SGI itself stopped supporting
+       it in December 2013.  If you still need Emacs on IRIX, please
+       either compile with GCC and port the undumping code, or run
+       './configure --with-wide-int'.
+       * alloc.c (gdb_make_enums_visible): Update to match lisp.h.
+       * lisp.h (GCTYPEBITS): Move definition up, and switch to the
+       DEFINE_GDB_SYMBOL_START way to define it.
+       (NONPOINTER_BITS): New macro.
+       (EMACS_INT): Use it.
+       [!USE_LSB_TAG && !WIDE_EMACS_INT]: Fail, and suggest reporting
+       the problem and/or configuring --with-wide-int.
+       (USE_LSB_TAG): Simplify, based on above changes.
+       (gdb_DATA_SEG_BITS): Remove.  All uses removed.
+       * vm-limit.c (exceeds_lisp_ptr): Remove.  All uses removed.
+
 2014-04-12  Eli Zaretskii  <eliz@gnu.org>
 
        * xdisp.c (move_it_by_lines): If a large portion of buffer text is
        * indent.c (Fvertical_motion): Handle correctly the case when the
        display string is preceded by an empty line.
 
-2014-04-11  Eli Zaretskii  <eliz@gnu.org>
-
        * w32.c (sys_umask) <WRITE_USER>: Remove redundant constant, and
        use S_IWRITE instead.
 
 
        * keyboard.c (Fopen_dribble_file): Make file private.  (Bug#17187)
 
-2014-04-09  Ken Brown  <kbrown@cornell.edu>
+2014-04-11  Ken Brown  <kbrown@cornell.edu>
 
        * Makefile.in (EMACS_MANIFEST): Revert last change.
 
+2014-04-10  Daniel Colascione  <dancol@dancol.org>
+
+       * puresize.h (BASE_PURESIZE): Increase.
+
+2014-04-09  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * keyboard.c (syms_of_keyboard): Make deactivate-mark buffer-local.
+
+       * insdel.c (prepare_to_modify_buffer_1): Cancel lock-file checks and
+       region handling (and don't call signal_before_change) if
+       inhibit_modification_hooks is set.
+       (signal_before_change): Don't check inhibit_modification_hooks any more.
+
+2014-04-08  Daniel Colascione  <dancol@dancol.org>
+
+       * alloc.c (sweep_symbols, mark_object): Assert that symbol
+       function cells contain valid lisp objects.  (Modified version of
+       patch from Dmitry).
+
+       * alloc.c (detect_suspicious_free): Split actual stack capturing
+       out into new function for easier breakpoint setting.
+       (note_suspicious_free): New function.
+
 2014-04-07  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * lisp.h (struct Lisp_Symbol): New bitfield `pinned'.
        (Fgarbage_collect): Use it.
        (gc_sweep): Remove hack made unnecessary.
 
-2014-04-05  Glenn Morris  <rgm@gnu.org>
+2014-04-07  Glenn Morris  <rgm@gnu.org>
 
        * keyboard.c (Fopen_dribble_file): Doc tweak.
 
-2014-04-04  Jan Djärv  <jan.h.d@swipnet.se>
+2014-04-07  Ken Brown  <kbrown@cornell.edu>
 
-       Backport from trunk.
-       * nsterm.m (updateFrameSize:): If waiting for the tool bar and tool
-       bar is zero height, just return (Bug#16976).
-       (initFrameFromEmacs:): Initialize wait_for_tool_bar.
-       * nsterm.h (EmacsView): Add wait_for_tool_bar.
-       * nsmenu.m (update_frame_tool_bar): Return early if view or toolbar
-       is nil.  If waiting for toolbar to complete, force a redraw.
-       (free_frame_tool_bar): Set wait_for_tool_bar = NO (Bug#16976).
+       * Makefile.in (EMACS_MANIFEST): Update comment.  (Bug#17176)
 
-2014-04-03  Ken Brown  <kbrown@cornell.edu>
+2014-04-07  Paul Eggert  <eggert@cs.ucla.edu>
 
-       * Makefile.in (EMACS_MANIFEST): Update comment.  (Bug#17176)
+       * alloc.c: Simplify by removing use of HAVE_EXECINFO_H.
+       We have a substitute execinfo.h on hosts that lack it.
+       (suspicious_free_history): Make it EXTERNALLY_VISIBLE so it
+       isn't optimized away.
+
+2014-04-05  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Prefer 'ARRAYELTS (x)' to 'sizeof x / sizeof *x'.
+       * alloc.c (memory_full):
+       * charset.c (syms_of_charset):
+       * doc.c (Fsnarf_documentation):
+       * emacs.c (main):
+       * font.c (BUILD_STYLE_TABLE):
+       * keyboard.c (make_lispy_event):
+       * profiler.c (setup_cpu_timer):
+       * xgselect.c (xg_select):
+       * xterm.c (record_event, STORE_KEYSYM_FOR_DEBUG):
+       Use ARRAYELTS.
+       * font.c (FONT_PROPERTY_TABLE_SIZE): Remove.
+       Replace the only use with ARRAYELTS (font_property_table).
+       * xfaces.c (DIM): Remove.  All uses replaced by ARRAYELTS.
+
+2014-04-03  Daniel Colascione  <dancol@dancol.org>
+
+       * xterm.c (x_term_init):
+       * xfns.c (best_xim_style):
+       * xfaces.c (Fdump_colors):
+       * w32fns.c (w32_default_color_map):
+       * w32.c (init_environment, N_ENV_VARS):
+       * unexcw.c (read_exe_header):
+       * term.c (term_get_fkeys_1):
+       * sysdep.c (init_baud_rate):
+       * nsterm.m (ns_convert_key):
+       * nsfns.m (get_geometry_from_preferences):
+       * msdos.c (dos_set_window_size, init_environment):
+       * macfont.m (mac_font_get_glyph_for_cid)
+       (macfont_store_descriptor_attributes)
+       (macfont_create_attributes_with_spec, mac_ctfont_get_glyph_for_cid):
+       * keyboard.c (command_loop_1, read_menu_command, make_lispy_event)
+       (NUM_MOD_NAMES, read_key_sequence_vs, Fcurrent_input_mode)
+       (syms_of_keyboard):
+       * image.c (xpm_str_to_color_key):
+       * fringe.c (MAX_STANDARD_FRINGE_BITMAPS):
+       * frame.c (x_set_frame_parameters):
+       * fileio.c (Ffile_selinux_context):
+       * emacs.c (sort_args):
+       * dosfns.c (msdos_stdcolor_name):
+       * dired.c (file_attributes):
+       * chartab.c (uniprop_decoder_count, uniprop_encode_count):
+       Change expressions of the form sizeof(arr) / sizeof(arr[0])
+       to ARRAYELTS (arr).
+
+2014-04-02  Daniel Colascione  <dancol@dancol.org>
+
+       * data.c (Ffset): Abort if we're trying to set a function call to
+       a dead lisp object.
+
+       * lisp.h (ARRAYELTS): New macro.
+
+       * alloc.c: Include execinfo.h if available.
+       (SUSPICIOUS_OBJECT_CHECKING): New macro; define unconditionally.
+       (suspicious_free_record): New structure.
+       (suspicious_objects, suspicious_object_index)
+       (suspicious_free_history, suspicious_free_history_index):
+       New variables.
+       (find_suspicious_object_in_range, detect_suspicious_free)
+       (Fsuspicious_object): New functions.
+       (cleanup_vector): Call find_suspicious_object_in_range.
 
 2014-04-02  Martin Rudalics  <rudalics@gmx.at>
 
        * xterm.c (x_new_font): Don't calculate non-toolkit scrollbar
        width from font width (Bug#17163).
 
-2014-03-30  Martin Rudalics  <rudalics@gmx.at>
-
        * frame.c (x_set_frame_parameters): Calculate default values of
        new frame sizes only after all other frame parameters have been
        processed (Bug#17142).
 
-2014-03-28  Ken Brown  <kbrown@cornell.edu>
+2014-04-02  Ken Brown  <kbrown@cornell.edu>
 
        * conf_post.h (SYSTEM_PURESIZE_EXTRA) [CYGWIN]: Set to 10000.
        (Bug#17112)
 
-2014-03-28  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+2014-04-02  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
        * xterm.c (x_draw_image_glyph_string): Adjust image background
        width accordingly when its x position is adjusted.  (Bug#17115)
 
+2014-04-02  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * font.c (font_list_entities): Do not add empty vector to font cache.
+       (font_matching_entity): Likewise.  If matching entity is found, insert
+       1-item vector with this entity instead of entity itself (Bug#17125).
+
+       * xterm.c (x_term_init) [USE_LUCID]: Fix minor memory leak.
+
+2014-04-01  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * fns.c (validate_subarray): Rename from validate_substring,
+       since it works for vectors too.  New arg ARRAY.  Optimize for the
+       non-nil case.  Instead of returning bool, throw an error if out of
+       range, so that the caller needn't do that.  All uses changed.
+       Report original values if out of range.
+       (Fsubstring, Fsubstring_no_properties, secure_hash):
+       Also optimize the case where FROM is 0 or TO is the size.
+
+2014-03-31  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * search.c (Freplace_match): Use make_specified_string.
+       * xterm.c, w32term.c (x_set_glyph_string_gc): Use emacs_abort
+       to catch bogus override face of glyph strings.
+       * fns.c (Fsubstring, Fsubstring_no_properties, secure_hash):
+       Move common substring range checking code to...
+       (validate_substring): ...this function.
+
+2014-03-31  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * nsmenu.m (free_frame_tool_bar): Set wait_for_tool_bar = NO (Bug#16976)
+
+2014-03-30  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * nsterm.m (updateFrameSize:): If waiting for the tool bar and tool
+       bar is zero height, just return (Bug#16976).
+       (initFrameFromEmacs:): Initialize wait_for_tool_bar.
+
+       * nsterm.h (EmacsView): Add wait_for_tool_bar.
+
+       * nsmenu.m (update_frame_tool_bar): Return early if view or toolbar
+       is nil.  If waiting for toolbar to complete, force a redraw.
+
+2014-03-28  Glenn Morris  <rgm@gnu.org>
+
+       * emacs.c (emacs_version): Use PACKAGE_VERSION rather than VERSION.
+       (emacs_bugreport): New variable.
+       (usage_message): Use PACKAGE_BUGREPORT.
+       (syms_of_emacs) <report-emacs-bug-address>: New variable.
+
+       * emacs.c (syms_of_emacs) <system-configuration-features>: New var.
+
+2014-03-27  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Port recent signal-related changes to FreeBSD.
+       Problem reported by Herbert J. Skuhra.
+       * lisp.h (block_tty_out_signal, unblock_tty_out_signal):
+       Move decls from here ...
+       * syssignal.h: ... to here, so that lisp.h doesn't depend on signal.h.
+
 2014-03-27  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
        * w32term.c (x_draw_image_glyph_string): Fix computation of height
        and width of image background when it is displayed with a 'box'
        face.  (Bug#17115)
 
-2014-03-26  Paul Eggert  <eggert@penguin.cs.ucla.edu>
+2014-03-27  Paul Eggert  <eggert@penguin.cs.ucla.edu>
 
        More backward-compatible fix to char-equal core dump (Bug#17011).
        * editfns.c (Fchar_equal): In unibyte buffers, assume values in
        range 128-255 are raw bytes.  Suggested by Eli Zaretskii.
 
+2014-03-27  Juanma Barranquero  <lekktu@gmail.com>
+
+       * image.c (init_svg_functions): When loading SVG-related libraries,
+       free already loaded libraries if the initialization fails.
+       (rsvg_handle_set_size_callback): Remove declaration, unused.
+
+2014-03-26  Paul Eggert  <eggert@cs.ucla.edu>
+
        Fix core dump in char-equal (Bug#17011).
        * editfns.c (Fchar_equal): Do not use MAKE_CHAR_MULTIBYTE in
        unibyte buffers, as we can't tell whether the characters are
 
        * insdel.c (adjust_markers_for_delete): Remove unused local.
 
-2014-03-24  Barry O'Reilly  <gundaetiapo@gmail.com>
+2014-03-26  Barry O'Reilly  <gundaetiapo@gmail.com>
 
        Have (MARKER . ADJUSTMENT) undo records always be immediately
        after their corresponding (TEXT . POS) record in undo list.
        (record_point): at_boundary calculation no longer needs to account
        for marker adjustments.
 
-2014-03-24  Martin Rudalics  <rudalics@gmx.at>
+2014-03-26  Martin Rudalics  <rudalics@gmx.at>
 
        * w32term.c (x_set_window_size): Refine fix from 2014-03-14
        (Bug#17077).
 
-2014-03-23  Glenn Morris  <rgm@gnu.org>
+2014-03-26  Glenn Morris  <rgm@gnu.org>
 
        * fileio.c (Ffile_symlink_p): Doc fix. (Bug#17073)
 
-2014-03-23  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-03-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * buffer.c (struct sortvec): Add field `spriority'.
        (compare_overlays): Use it.
        (sort_overlays): Set it.
 
-2014-03-23  Eli Zaretskii  <eliz@gnu.org>
+2014-03-26  Eli Zaretskii  <eliz@gnu.org>
 
        * xdisp.c (redisplay_window): If all previous attempts to find the
        cursor row failed, try a few alternatives before falling back to
        the top-most row of the window.  Use row_containing_pos.  (Bug#17047)
 
-2014-03-22  Daniel Colascione  <dancol@dancol.org>
+2014-03-26  Juanma Barranquero  <lekktu@gmail.com>
 
-       * process.c (conv_sockaddr_to_lisp): When extracting the string
-       names of AF_LOCAL sockets, stop before reading uninitialized
-       memory.
+       * image.c (x_bitmap_height, x_bitmap_width) [HAVE_X_WINDOWS]:
+       * sysdep.c (reset_sigio) [!DOS_NT]: Declare conditionally.
+
+       * keyboard.c (read_decoded_event_from_main_queue): #ifdef out
+       variables on Windows.
+
+       * w32fns.c (Ffile_system_info): Use parenthesis in and/or expression.
+
+       * w32.c (unsetenv): Remove unused var `retval'.
+       (emacs_gnutls_pull): Remove unused vars `fdset' and `timeout'.
+
+       * w32notify.c (watch_worker): Remove unnecesary var sleep_result.
+       (start_watching): Remove unused var `thr'.
+
+       * w32proc.c (sys_spawnve): Comment out unused vars `first', `last'.
+       (find_child_console): Remove unnecesary var `thread_id'.
+
+       * w32term.c (w32_read_socket): Comment out unused vars `row', `columns'.
+       (x_focus_frame): #ifdef 0 unused variable `dpyinfo'.
+
+2014-03-26  Glenn Morris  <rgm@gnu.org>
+
+       * filelock.c (Flock_buffer): Doc tweak.
+
+       * buffer.c (Frestore_buffer_modified_p, Fkill_buffer):
+       * emacs.c (shut_down_emacs):
+       * fileio.c (Finsert_file_contents, write_region):
+       * filelock.c (top-level, syms_of_filelock):
+       * insdel.c (prepare_to_modify_buffer_1):
+       CLASH_DETECTION is always defined now.
+
+2014-03-25  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32.c (w32_delayed_load): Call DisableThreadLibraryCalls on the
+       DLL handle, to speed up thread startup.
+
+2014-03-25  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Handle sigmask better with nested signal handlers  (Bug#15561).
+       * atimer.c (sigmask_atimers): Remove.
+       Remaining use rewritten to use body of this function.
+       * atimer.c (block_atimers, unblock_atimers):
+       * callproc.c (block_child_signal, unblock_child_signal):
+       * sysdep.c (block_tty_out_signal, unblock_tty_out_signal):
+       New arg OLDSET.  All callers changed.
+       * atimer.c (block_atimers, unblock_atimers):
+       * callproc.c (block_child_signal, unblock_child_signal):
+       * keyboard.c (handle_interrupt):
+       * sound.c (vox_configure, vox_close):
+       Restore the old signal mask rather than unilaterally clearing bits
+       from the mask, in case a handler is running within another
+       handler.  All callers changed.
+       * lisp.h, process.c, process.h, term.c:
+       Adjust decls and callers to match new API.
+       * sysdep.c (emacs_sigaction_init): Don't worry about masking SIGFPE;
+       signal handlers aren't supposed to use floating point anyway.
+       (handle_arith_signal): Unblock just SIGFPE rather than clearing mask.
+
+2014-03-23  Daniel Colascione  <dancol@dancol.org>
+
+       Split gc_sweep into discrete functions for legibility and better
+       stack traces.
+
+       * alloc.c (sweep_strings, sweep_vectors): Add NO_INLINE
+       (sweep_vectors): Fix typo in comment.
+       (sweep_conses, sweep_floats, sweep_intervals)
+       (sweep_symbols, sweep_misc, sweep_buffers): New functions.
+       (gc_sweep): Call new functions, to which existing functionality is
+       moved.
+       * fns.c (sweep_weak_hash_tables): Add NO_INLINE.
+
+2014-03-23  Juanma Barranquero  <lekktu@gmail.com>
+
+       * w32fns.c (Fw32_shell_execute): Declare `result' only on Cygwin.
+
+2014-03-23  Daniel Colascione  <dancol@dancol.org>
+
+       * xfns.c (create_frame_xic): Pass XNStatusAttributes to XCreateIC
+       only if xic_style calls for it.  This change allows Emacs to work
+       with ibus.  Also, don't leak resources if create_frame_xic fails,
+       and stop caching xic_style across different displays.
+       (supported_xim_styles): Make const.
+       (best_xim_style): Remove first parameter: it's always just
+       supported_xim_styles.  Change to look at supported_xim_styles
+       directly.
+
+2014-03-23  Daniel Colascione  <dancol@dancol.org>
+
+       * term.c (init_tty): Rearrange condition for clarity; print
+       appropriate diagnostic.
 
 2014-03-23  Daniel Colascione  <dancol@dancol.org>
 
        * process.c (DATAGRAM_CONN_P): Don't underflow datagram_address
        array.  (ASAN caught.)
 
+2014-03-22  Glenn Morris  <rgm@gnu.org>
+
+       * callproc.c (init_callproc): In etc, look for NEWS rather than GNU.
+
+2014-03-22  Daniel Colascione  <dancol@dancol.org>
+
+       * process.c (conv_sockaddr_to_lisp): When extracting the string
+       names of AF_LOCAL sockets, stop before reading uninitialized memory.
+
 2014-03-21  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
        Fix regression introduced by patch for Bug#10500.
        constrain frame size in SW_SHOWMAXIMIZED case so we can truly
        maximize a frame for odd default fonts.
 
+2014-03-21  Glenn Morris  <rgm@gnu.org>
+
+       * minibuf.c (history-length): Increase default from 30 to 100.
+
+2014-03-21  Daniel Colascione  <dancol@dancol.org>
+
+       * xterm.c (x_bitmap_icon): Stop reading the icon bitmap from disk
+       every time we switch to minibuffer.
+
+       * alloc.c (lisp_align_malloc, allocate_string_data)
+       (allocate_vectorlike): Allow mmap allocation of lisp objects.
+       (pointers_fit_in_lispobj_p, mmap_lisp_allowed_p): New functions.
+
+2014-03-21  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32fns.c (Fw32_shell_execute) [!CYGWIN]: Use ShellExecuteEx, to
+       support more "verbs".
+
+2014-03-21  Daniel Colascione  <dancol@dancol.org>
+
+       Always prohibit dumping a dumped Emacs.
+
+       * emacs.c (might_dump): New variable.
+       (Fdump_emacs): Always prohibit dumping of dumped Emacs.
+       * lisp.h (might_dump): Declare.
+       * unexcw.c (unexec): Remove now-redundant multiple-dump detection code.
+
 2014-03-20  Paul Eggert  <eggert@cs.ucla.edu>
 
        * doc.c (store_function_docstring): Fix pointer signedness mismatch.
        * doc.c (store_function_docstring): Warn when we don't know where to
        put a docstring.
        (Fsubstitute_command_keys): Don't advertise the fact that
-       text-properties are dropped, since we think it's a bug that we'll fix
-       in 24.5.
+       text-properties are dropped, since we think it's a bug that we'll fix.
 
        * frame.h (SET_FRAME_VISIBLE): Keep frame_garbaged up to date.
        * xterm.c (handle_one_xevent) <MapNotify>: Don't garbage the frame.
        (imagemagick_get_animation_cache): Fix a double-free error.
        (imagemagick_load_image): Remove the ping_wand code, which only
        apparently saved time on invalid animated images, and slowed down
-       everything else.  Optimise for the common case.
+       everything else.  Optimize for the common case.
 
 2013-08-16  Xue Fuqiao  <xfq.free@gmail.com>
 
index a483a561d0616c525674f6d61692fabf61030ded..fd8ae6caa2061167853b238653cf2e437f50761c 100644 (file)
@@ -73,8 +73,8 @@
 
        * msdos.c (dos_set_window_size) [__DJGPP__ > 1]: If the frame
        dimensions changed, invalidate the mouse highlight info.
-       (disable_mouse_highlight, help_echo, previous_help_echo): New
-       variables.
+       (disable_mouse_highlight, help_echo, previous_help_echo):
+       New variables.
        (IT_set_mouse_pointer, show_mouse_face, clear_mouse_face)
        (fast_find_position, IT_note_mode_line_highlight)
        (IT_note_mouse_highlight): New functions.
@@ -89,8 +89,8 @@
        (internal_terminal_init): Initialize mouse-highlight related
        members of the_only_x_display.  Assign IT_frame_up_to_date to
        frame_up_to_date_hook.
-       (dos_rawgetc): If the mouse moved, update mouse highlight.  If
-       help_echo changed value, generate a HELP_EVENT event.
+       (dos_rawgetc): If the mouse moved, update mouse highlight.
+       If help_echo changed value, generate a HELP_EVENT event.
        (syms_of_msdos): Staticpro help_echo and previous_help_echo.
 
        * msdos.h (struct display_info): New.
        * lisp.h (GLYPH): Defined as `int', not `unsigned int'.  Now the
        lowest 8 bits are single byte character code, the bits above are
        face ID.
-       (GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the change
+       (GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjust for the change
        above.
        (FAST_MAKE_GLYPH, FSST_GLYPH_FACE): Likewise.
        (GLYPH_MASK_REV_DIR, GLYPH_MASK_PADDING): Macros deleted.
        level members.  Change members in union `u'.
        (GLYPH_EQUAL_P): Check also members face_id and padding_p.
        (GLYPH_CHAR_AND_FACE_EQUAL_P): New macro.
-       (SET_CHAR_GLYPH): Adjusted for the change of struct glyph.
+       (SET_CHAR_GLYPH): Adjust for the change of struct glyph.
        (CHAR_GLYPH_PADDING_P): Likewise.
        (GLYPH_FROM_CHAR_GLYPH): Likewise.  Always return -1 for multibyte
        characters.
 
-       * dispnew.c (line_hash_code, direct_output_for_insert): Adjusted
-       for the change of struct glyph.
-       (line_draw_cost): Adjusted for the change of
+       * dispnew.c (line_hash_code, direct_output_for_insert):
+       Adjust for the change of struct glyph.
+       (line_draw_cost): Adjust for the change of
        GLYPH_FROM_CHAR_GLYPH.
        (count_match): Use macro GLYPH_CHAR_AND_FACE_EQUAL_P.
 
-       * term.c (encode_terminal_code): Adjusted for the change of struct
+       * term.c (encode_terminal_code): Adjust for the change of struct
        glyph and GLYPH_FROM_CHAR_GLYPH.
-       (write_glyphs, insert_glyphs, append_glyph): Adjusted for the
+       (write_glyphs, insert_glyphs, append_glyph): Adjust for the
        change of struct glyph.
 
        * xdisp.c: All codes adjusted for the change of struct glyph.
 
 1999-12-15  Kenichi Handa  <handa@etl.go.jp>
 
-       The following changes are for the new composition mechanism.  We
-       have deleted `composition' charset and composite characters,
+       The following changes are for the new composition mechanism.
+       We have deleted `composition' charset and composite characters,
        instead introduced a special text property `composition'.
 
        * Makefile.in (INTERVAL_SRC): Include composite.h.
        (keyboard.o) (textprop.o) (intervals.o): Depend on INTERVAL_SRC.
        (composite.o): New target.
 
-       * alloc.c (Fmake_string): Adjusted for the change of CHAR_STRING.
+       * alloc.c (Fmake_string): Adjust for the change of CHAR_STRING.
 
        * callproc.c (Fcall_process): Call code_convert_string to encode
        arguments.  Use CODING_REQUIRE_DECODING to check if the process
        (Fmake_category_table): New function.
        (syms_of_category): Defsubr it.
 
-       * ccl.c (CCL_WRITE_CHAR): Adjusted for the change of CHAR_STRING.
+       * ccl.c (CCL_WRITE_CHAR): Adjust for the change of CHAR_STRING.
        (ccl_driver): Delete codes for a composite character.
 
        * charset.h: In this entry, just `Modified' means that codes for a
        (charset_composition) (MIN_CHAR_COMPOSITION)
        (MAX_CHAR_COMPOSITION) (GENERIC_COMPOSITION_CHAR)
        (COMPOSITE_CHAR_P) (MAKE_COMPOSITE_CHAR) (COMPOSITE_CHAR_ID)
-       (PARSE_COMPOSITE_SEQ) (PARSE_CHARACTER_SEQ): Deleted.
+       (PARSE_COMPOSITE_SEQ) (PARSE_CHARACTER_SEQ): Delete.
        (MAX_CHAR) (CHARSET_VALID_P) (CHARSET_DEFINED_P) (CHARSET_AT)
        (FIRST_CHARSET_AT) (SAME_CHARSET_P) (MAKE_NON_ASCII_CHAR)
        (PARSE_MULTIBYTE_SEQ) (SPLIT_NON_ASCII_CHAR) (CHAR_PRINTABLE_P):
-       Modified.
+       Modify.
        (SPLIT_STRING): Call split_string, not split_non_ascii_string.
        (CHAR_STRING): Delete WORKBUF argument.  Call char_string, not
        non_ascii_char_to_string.
        (STRING_CHAR): Call string_to_char, not string_to_non_ascii_char.
        (STRING_CHAR_AND_LENGTH): Likewise.
        (FETCH_CHAR_ADVANCE): New macro.
-       (MAX_COMPONENT_COUNT) (struct cmpchar_info): Deleted.
+       (MAX_COMPONENT_COUNT) (struct cmpchar_info): Delete.
        (MAX_MULTIBYTE_LENGTH): New macro.
-       (MAX_LENGTH_OF_MULTI_BYTE_FORM): Deleted.
+       (MAX_LENGTH_OF_MULTI_BYTE_FORM): Delete.
        (find_charset_in_str): Argument adjusted.
-       (CHAR_LEN): Modified.
+       (CHAR_LEN): Modify.
 
        * charset.c: In this entry, just `Modified' means that codes for a
        composite character is deleted.
        (Qcomposition) (leading_code_composition)
        (charset_composition) (min_composite_char) (cmpchar_table)
-       (cmpchar_table_size) (n_cmpchars): Deleted.
-       (SPLIT_COMPOSITE_SEQ): Deleted.
-       (SPLIT_MULTIBYTE_SEQ): Modified.
-       (char_to_string): Renamed from non_ascii_char_to_string.
+       (cmpchar_table_size) (n_cmpchars): Delete.
+       (SPLIT_COMPOSITE_SEQ): Delete.
+       (SPLIT_MULTIBYTE_SEQ): Modify.
+       (char_to_string): Rename from non_ascii_char_to_string.
        Modified.
-       (string_to_char): Renamed from string_to_non_ascii_char.
-       (split_string): Renamed from split_non_ascii_string.
+       (string_to_char): Rename from string_to_non_ascii_char.
+       (split_string): Rename from split_non_ascii_string.
        (char_printable_p) (Fsplit_char)
        (Ffind_charset_region) (Ffind_charset_string) (char_valid_p)
-       (char_bytes) (Fchar_width) (strwidth): Modified.
+       (char_bytes) (Fchar_width) (strwidth): Modify.
        (find_charset_in_str): Argument CMPCHARP deleted.  Modified.
-       (Fstring): Adjusted for the change of CHAR_STRING.  Modified.
+       (Fstring): Adjust for the change of CHAR_STRING.  Modified.
        (hash_string) (CMPCHAR_HASH_TABLE_SIZE) (cmpchar_hash_table)
        (CMPCHAR_HASH_SIZE) (CMPCHAR_HASH_USED) (CMPCHAR_HASH_CMPCHAR_ID)
        (str_cmpchar_id) (cmpchar_component) (Fcmpcharp)
        (Fcmpchar_component) (Fcmpchar_cmp_rule) (Fcmpchar_cmp_rule_p)
-       (Fcmpchar_cmp_count): Deleted.
+       (Fcmpchar_cmp_count): Delete.
        (Fcompose_string): Implemented by Emacs Lisp in composite.el.
-       (init_charset_once): Modified.
-       (syms_of_charset): Modified.
+       (init_charset_once): Modify.
+       (syms_of_charset): Modify.
 
-       * cmds.c (internal_self_insert): Adjusted for the change of
+       * cmds.c (internal_self_insert): Adjust for the change of
        CHAR_STRING.
 
        * coding.h (emacs_code_class_type): Delete the member
        (COMPOSING_WITH_RULE_TAIL) (COMPOSING_NO_RULE_TAIL)
        (COMPOSING_WITH_RULE_RULE) (COMPOSING_HEAD_P)
        (COMPOSING_WITH_RULE_P): Macros deleted.
-       (COMPOSITION_DATA_SIZE) (COMPOSITION_DATA_MAX_BUNCH_LENGTH): New
-       macros.
+       (COMPOSITION_DATA_SIZE) (COMPOSITION_DATA_MAX_BUNCH_LENGTH):
+       New macros.
        (struct composition_data): New structure.
        (CODING_FINISH_INSUFFICIENT_CMP): New macro.
        (struct coding_system): New members composition_rule_follows,
        EMACS_leading_code_composition to 0x80.
        (detect_coding_iso2022): Handle new composition sequence.
        (DECODE_ISO_CHARACTER): Likewise.
-       (check_composing_code): Deleted.
+       (check_composing_code): Delete.
        (coding_allocate_composition_data): New function.
        (CODING_ADD_COMPOSITION_START) (CODING_ADD_COMPOSITION_END)
        (CODING_ADD_COMPOSITION_COMPONENT) (DECODE_COMPOSITION_START)
        (ENCODE_ISO_CHARACTER): Don't check composition here.
        (ENCODE_COMPOSITION_RULE) (ENCODE_COMPOSITION_START): New macros.
        (ENCODE_COMPOSITION_NO_RULE_START)
-       (ENCODE_COMPOSITION_WITH_RULE_START): Deleted.
+       (ENCODE_COMPOSITION_WITH_RULE_START): Delete.
        (ENCODE_COMPOSITION_END): Handle new composition sequence.
        (ENCODE_COMPOSITION_FAKE_START): New macro.
        (encode_coding_iso2022): Handle new composition sequence.
        coding_system.  Enable composition only when the coding system has
        `composition' property t.
        (coding_free_composition_data) (coding_adjust_composition_offset)
-       (coding_save_composition) (coding_restore_composition): New
-       functions.
+       (coding_save_composition) (coding_restore_composition):
+       New functions.
        (code_convert_region): Call coding_save_composition for encoding
        and coding_allocate_composition_data for decoding.  Don't skip
-       ASCII characters if we handle composition on encoding.  Call
-       signal_after_change with Check_BORDER.
+       ASCII characters if we handle composition on encoding.
+       Call signal_after_change with Check_BORDER.
        (code_convert_string): Call coding_save_composition for encoding
        and coding_allocate_composition_data for decoding.  Don't skip
        ASCII characters if we handle composition on encoding.
        * dispnew.c (direct_output_forward_char): Check point moving into
        or out of a composition.  If so, give up direct method.
 
-       * doprnt.c (doprnt1): Adjusted for the change of CHAR_STRING.
+       * doprnt.c (doprnt1): Adjust for the change of CHAR_STRING.
 
-       * editfns.c (Fchar_to_string): Adjusted for the change of
+       * editfns.c (Fchar_to_string): Adjust for the change of
        CHAR_STRING.
        (general_insert_function): Likewise.
        (Finsert_char): Likewise.
 
        * emacs.c (main): Call syms_of_composite.
 
-       * fileio.c (Fsubstitute_in_file_name): Adjusted for the change of
+       * fileio.c (Fsubstitute_in_file_name): Adjust for the change of
        CHAR_STRING.
        (Finsert_file_contents): Set Vlast_coding_system_used before
        calling signal_after_change.  Call update_compositions if some
        texts are inserted..
-       (Fwrite_region): Adjusted for the change of a_write and e_write.
+       (Fwrite_region): Adjust for the change of a_write and e_write.
        (a_write): Argument changed.  Work based on character position,
        not byte position.
        (e_write): Argument changed.  Handle new way of composition.
 
        * fns.c (Flength): The length of char-table is MAX_CHAR.
-       (concat): Adjusted for the change of CHAR_STRING.
-       (Ffillarray): Adjusted for the change of CHAR_STRING.
+       (concat): Adjust for the change of CHAR_STRING.
+       (Ffillarray): Adjust for the change of CHAR_STRING.
        (Fset_char_table_default): Delete codes for a composite character.
        (hash_put): Return hash index.
 
        (Fmove_to_column): Likewise.
        (compute_motion): Likewise.
 
-       * insdel.c (copy_text): Adjusted for the change of CHAR_STRING.
+       * insdel.c (copy_text): Adjust for the change of CHAR_STRING.
        (insert_char): Likewise.
        (insert): Call update_compositions.
        (insert_and_inherit): Likewise.
        (insert_from_string_before_markers): Likewise.
        (insert_from_buffer): Likewise.
        (replace_range): Likewise.
-       (count_combining_composition): Deleted.
+       (count_combining_composition): Delete.
        (count_combining_before): Delete codes for a composite character.
        (count_combining_after): Likewise.
        (del_range_1): Call update_compositions.
        necessary.
        (adjust_point_for_property): New function.
 
-       * keymap.c (push_key_description): Adjusted for the change of
+       * keymap.c (push_key_description): Adjust for the change of
        CHAR_STRING.
        (Ftext_char_description): Likewise.
 
        * lisp.h (QCtest, QCweakness, Qequal): Extern them.
-       (hash_put): Adjusted for the change of the definition.
+       (hash_put): Adjust for the change of the definition.
        (signal_after_change): Likewise.
        (check_point_in_composition): Extern it.
 
-       * lread.c (readchar): Adjusted for the change of CHAR_STRING.
+       * lread.c (readchar): Adjust for the change of CHAR_STRING.
        Delete a code that handles an invalid too-long multibyte sequence
        because we are now sure that we never encounter with such a
        sequence.
        (init_obarray): Likewise.
        (read1): Likewise.  Adjusted for the change of CHAR_STRING.
 
-       * print.c (printchar): Adjusted for the change of CHAR_STRING.
+       * print.c (printchar): Adjust for the change of CHAR_STRING.
 
        * process.c: Include composite.h.
        (read_process_output): Call update_compositions.
 
-       * regex.c (regex_compile): Adjusted for the change of CHAR_STRING.
+       * regex.c (regex_compile): Adjust for the change of CHAR_STRING.
 
-       * search.c (search_buffer): Adjusted for the change of CHAR_STRING.
+       * search.c (search_buffer): Adjust for the change of CHAR_STRING.
 
        * syntax.h (SYNTAX_ENTRY_INT): Delete codes for a composite
        character.
        (face_before_or_after_it_pos): For composition, check face of a
        character after the composition.
        (handle_composition_prop): New function.
-       (get_next_display_element): Adjusted for the change of
+       (get_next_display_element): Adjust for the change of
        CHAR_STRING.
        (set_iterator_to_next): Handle the case that it->method ==
        next_element_from_composition.
        (next_element_from_composition): New function.
-       (message_dolog): Adjusted for the change of CHAR_STRING.
+       (message_dolog): Adjust for the change of CHAR_STRING.
        (set_message_1): Likewise.
        (check_point_in_composition): New function.
        (reconsider_clip_changes): If point moved into or out of
        composition, set b->clip_changed to 1 to force updating of the
        screen.
        (disp_char_vector): Delete codes for a composite character.
-       (decode_mode_spec_coding): Adjusted for the change of CHAR_STRING.
+       (decode_mode_spec_coding): Adjust for the change of CHAR_STRING.
 
        * xfaces.c (choose_face_fontset_font): Delete codes for a
        composite character.
        * xfns.c: Include intervals.h.
        (syms_of_xfns): Make `display' property nonsticky by default.
 
-       * xselect.c (lisp_data_to_selection_data): Adjusted for the change
+       * xselect.c (lisp_data_to_selection_data): Adjust for the change
        for find_charset_in_str.
 
        * xterm.h (struct x_output): Change member font_baseline to
        (x_draw_composite_glyph_string_foreground): New function.
        (x_draw_glyph_string_box): Check s->cmp, not s->cmpcharp.
        (x_draw_glyph_string): Handle the case of COMPOSITE_GLYPH.
-       (struct work): Deleted.
-       (x_fill_composite_glyph_string): Argument changed.  Mostly
-       rewritten for that.
+       (struct work): Delete.
+       (x_fill_composite_glyph_string): Argument changed.
+       Mostly rewritten for that.
        (x_fill_glyph_string): Don't check CHARSET_COMPOSITION.
        (BUILD_CHAR_GLYPH_STRINGS): Don't handle composition here.
        (BUILD_COMPOSITE_GLYPH_STRING): New macro.
        * frame.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL)
        [!MSDOS && !WINDOWSNT && !macintosh]: Moved here from xterm.h.
 
-       * xterm.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): Moved
-       to frame.h.
+       * xterm.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL):
+       Move to frame.h.
 
 1999-12-09  Stefan Monnier  <monnier@cs.yale.edu>
 
        * xterm.c (#includes): Allow compilation with only Xaw.
        (xaw3d_arrow_scroll, xaw3d_pick_top): New variables.
        (xt_action_hook): Replace XAW3D by XAW.
-       (xaw3d_jump_callback): Renamed to xaw_jump_callback.
-       (xaw_jump_callback): Renamed from xaw3d_jump_callback.
+       (xaw3d_jump_callback): Rename to xaw_jump_callback.
+       (xaw_jump_callback): Rename from xaw3d_jump_callback.
        Determine epsilon dynamically and don't try to be too clever.
-       (xaw3d_scroll_callback): Renamed to xaw_scroll_callback.
-       (xaw_scroll_callback): Renamed from xaw3d_scroll_callback.
+       (xaw3d_scroll_callback): Rename to xaw_scroll_callback.
+       (xaw_scroll_callback): Rename from xaw3d_scroll_callback.
        Handle both Xaw3d with arrow-scrollbars and with Xaw-style
        scrollbar (using `ratio').
        (x_create_toolkit_scroll_bar): Try to detect which style of Xaw3d
 
 1999-12-07  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
-       * unexelf.c: Include <syms.h>, not <sym.h> on IRIX.  Removed
-       duplicate definition of ElfW.
-       (find_section): Copied from unexsgi.c.
+       * unexelf.c: Include <syms.h>, not <sym.h> on IRIX.
+       Removed duplicate definition of ElfW.
+       (find_section): Copy from unexsgi.c.
        (unexec): Use find_section.  Adjust whitespace.  Initialize
        new_data2_offset based on old_data, not sbss (this fixes a bug on
        IRIX6).  Change #ifdef __mips to __sgi, since it's IRIX-specific.
        (FRAME_PARAM_FACES, FRAME_N_PARAM_FACES, FRAME_DEFAULT_PARAM_FACE)
        (FRAME_MODE_LINE_PARAM_FACE, FRAME_COMPUTED_FACES)
        (FRAME_N_COMPUTED_FACES, FRAME_SIZE_COMPUTED_FACES)
-       (FRAME_DEFAULT_FACE, FRAME_MODE_LINE_FACE, unload_color): Remove
-       unused macro definitions.
+       (FRAME_DEFAULT_FACE, FRAME_MODE_LINE_FACE, unload_color):
+       Remove unused macro definitions.
 
        * msdos.c (IT_set_frame_parameters): Don't call
        recompute_basic_faces, the next redisplay will, anyway.
 
        * Makefile.in (lisp, shortlisp): Add lisp/term/tty-colors.elc.
 
-       * xfns.c (x_defined_color): Rename from defined_color.  All
-       callers changed.
-       (Fxw_color_defined_p): Renamed from Fx_color_defined_p;
+       * xfns.c (x_defined_color): Rename from defined_color.
+       All callers changed.
+       (Fxw_color_defined_p): Rename from Fx_color_defined_p;
        all callers changed.
-       (Fxw_color_values): Renamed from Fx_color_values; all callers
+       (Fxw_color_values): Rename from Fx_color_values; all callers
        changed.
-       (Fxw_display_color_p): Renamed from Fx_display_color_p; all
+       (Fxw_display_color_p): Rename from Fx_display_color_p; all
        callers changed.
        (x_window_to_frame, x_any_window_to_frame)
        (x_non_menubar_window_to_frame, x_menubar_window_to_frame)
 
        * w32fns.c (x_window_to_frame): Use FRAME_W32_P instead of
        f->output_data.nothing.
-       (Fxw_color_defined_p): Renamed from Fx_color_defined_p;
+       (Fxw_color_defined_p): Rename from Fx_color_defined_p;
        all callers changed.
-       (Fxw_color_values): Renamed from Fx_color_values; all callers
+       (Fxw_color_values): Rename from Fx_color_values; all callers
        changed.
-       (Fxw_display_color_p): Renamed from Fx_display_color_p; all
+       (Fxw_display_color_p): Rename from Fx_display_color_p; all
        callers changed.
 
        * dispextern.h (tty_color_name): Add prototype.
 
 1999-12-06  Kenichi Handa  <handa@etl.go.jp>
 
-       * fileio.c (decide_coding_unwind): Renamed from
+       * fileio.c (decide_coding_unwind): Rename from
        set_auto_coding_unwind.
        (Finsert_file_contents): Make single unwind protect to call both
        Vset_auto_coding_function and Ffind_operation_coding_system.
        * regex.c (regex_compile): Recognize *?, +? and ?? as non-greedy
        operators and handle them properly.
        * regex.h (RE_ALL_GREEDY): New option.
-       (RE_UNMATCHED_RIGHT_PAREN_ORD): Moved to the end where alphabetic
+       (RE_UNMATCHED_RIGHT_PAREN_ORD): Move to the end where alphabetic
        sorting would put it.
        (RE_SYNTAX_AWK, RE_SYNTAX_GREP, RE_SYNTAX_EGREP)
        (_RE_SYNTAX_POSIX_COMMON): Use the new option to keep old behavior.
 1999-11-28  Gerd Moellmann  <gerd@gnu.org>
 
        * systime.h (EMACS_TIME_CMP, EMACS_TIME_EQ, EMACS_TIME_NE)
-       (EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT, EMACS_TIME_LE): New
-       macros.
+       (EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT, EMACS_TIME_LE):
+       New macros.
 
        * config.in (HAVE_SETITIMER, HAVE_UALARM): New.
 
 
        * puresize.h (BASE_PURESIZE): Increase to 550000.
 
-       * textprop.c (set_text_properties): New function.  Like
-       Fset_text_properties, but with additional parameter
+       * textprop.c (set_text_properties): New function.
+       Like Fset_text_properties, but with additional parameter
        SIGNAL_AFTER_CHANGE_P.  If that is nil, don't signal after
        changes.
        (Fset_text_properties): Use it.
        * fileio.c (strerror): Likewise.
        * process.c (strerror): Likewise.
        * emacs.c (strerror): Likewise.
-       (Vsystem_messages_locale): Renamed from Vmessages_locale.
+       (Vsystem_messages_locale): Rename from Vmessages_locale.
        All uses changed.
        (Vprevious_system_messages_locale): Likewise, from
        Vprevious_messages_locale.
        (FREE_RETURN_TYPE): New macro.
        (free): Return type is now FREE_RETURN_TYPE.
 
-       * lisp.h (synchronize_system_time_locale): Renamed from
+       * lisp.h (synchronize_system_time_locale): Rename from
        synchronize_time_locale.  All uses changed.
        (synchronize_system_messages_locale): Likewise, from
        synchronize_messages_locale.
 
 1999-11-10  Gerd Moellmann  <gerd@gnu.org>
 
-       * xfns.c (QCuser_data): Removed.
+       * xfns.c (QCuser_data): Remove.
        (syms_of_xfns): Initialization of QCuser_data removed.
-       (parse_image_spec): Don't handle :user-data specially.  Allow
-       unknown keys.  Remove parameter ALLOW_OTHER_KEYS.
+       (parse_image_spec): Don't handle :user-data specially.
+       Allow unknown keys.  Remove parameter ALLOW_OTHER_KEYS.
        (xbm_image_p, xbm_load, xpm_image_p, pbm_image_p, png_image_p)
-       (tiff_image_p, jpeg_image_p, gif_image_p, gs_image_p): Call
-       parse_image_spec accordingly.
+       (tiff_image_p, jpeg_image_p, gif_image_p, gs_image_p):
+       Call parse_image_spec accordingly.
 
 1999-11-09  Richard M. Stallman  <rms@gnu.org>
 
        * lisp.h: Add prototype for unmark_byte_stack.
 
        * bytecode.c (mark_byte_stack): Use XMARKBIT and XMARK.
-       (unmark_byte_stack): Renamed from relocate_byte_pcs.  Use
-       XUNMARK.
+       (unmark_byte_stack): Rename from relocate_byte_pcs.
+       Use XUNMARK.
 
        * xdisp.c (resize_mini_window): Fix computation of needed
        mini-window height.
        (byte_stack_list, mark_byte_stack, relocate_byte_pcs): New.
        (BEFORE_POTENTIAL_GC, AFTER_POTENTIAL_GC): New.
        (FETCH, PUSH, POP, DISCARD, TOP, MAYBE_GC): Rewritten.
-       (HANDLE_RELOCATION): Removed.
+       (HANDLE_RELOCATION): Remove.
        (Fbyte_code): Use byte_stack structures.
 
        * filelock.c (Ffile_locked_p): Make FILENAME a required argument.
 
 1999-11-04  Gerd Moellmann  <gerd@gnu.org>
 
-       * editfns.c (Fdelete_field): Renamed from Ferase_field.
+       * editfns.c (Fdelete_field): Rename from Ferase_field.
 
-       * minibuf.c (do_completion, Fminibuffer_complete_word): Use
-       Ferase_field instead of Fdelete_field.
+       * minibuf.c (do_completion, Fminibuffer_complete_word):
+       Use Ferase_field instead of Fdelete_field.
 
 1999-11-03  Gerd Moellmann  <gerd@gnu.org>
 
        * xfns.c (png_load) [PNG_READ_sRGB_SUPPORTED]: Put code using
        png_get_sRGB in #ifdef.
 
-       * dispnew.c (Finternal_show_cursor): Renamed from Fshow_cursor.
+       * dispnew.c (Finternal_show_cursor): Rename from Fshow_cursor.
        (syms_of_display): Use the new name.
 
        * textprop.c (verify_interval_modification): Signal text-read-only
 
 1999-10-27  Richard M. Stallman  <rms@gnu.org>
 
-       * data.c (Qad_activate_internal): Renamed from Qad_activate.
+       * data.c (Qad_activate_internal): Rename from Qad_activate.
        (Ffset): Call Qad_activate_internal.
        (syms_of_data): Initialize Qad_activate_internal.
 
        * editfns.c: Include coding.h.
        (emacs_strftime): Remove decl.
        (emacs_strftimeu): New decl.
-       (emacs_memftimeu): Renamed from emacs_memftime; new arg UT.
+       (emacs_memftimeu): Rename from emacs_memftime; new arg UT.
        Use emacs_strftimeu instead of emacs_strftime.
        (Fformat_time_string): Convert format string using
        Vlocale_coding_system, and convert result back.  Synchronize time
-       locale before invoking lower level function.  Invoke
-       emacs_memftimeu, passing ut, instead of emacs_memftime.
+       locale before invoking lower level function.
+       Invoke emacs_memftimeu, passing ut, instead of emacs_memftime.
 
        * emacs.c: Include <locale.h> if HAVE_SETLOCALE is defined.
        (Vmessages_locale, Vprevious_messages_locale, Vtime_locale)
        (main): Invoke setlocale early, so that initial error messages are
        localized properly.  But skip locale-setting if LC_ALL is "C".
        Fix up locale when it's safe to do so.
-       (fixup_locale): Moved here from xterm.c.
+       (fixup_locale): Move here from xterm.c.
        (synchronize_locale, synchronize_time_locale)
        (synchronize_messages_locale): New functions.
        (syms_of_emacs): Accommodate above changes.
 
        * lread.c (file_offset, file_tell): New macros.  All uses of ftell
        changed to file_tell.
-       (saved_doc_string_position, prev_saved_doc_string_position): Now
-       of type file_offset.
+       (saved_doc_string_position, prev_saved_doc_string_position):
+       Now of type file_offset.
        (init_lread): Do not fix locale here; fixup_locale now does this.
 
        * m/amdahl.h, s/usg5-4.h:
        (emacs_open, emacs_close, emacs_read, emacs_write): Always define;
        the old INTERRUPTIBLE_OPEN, INTERRUPTIBLE_CLOSE, and INTERRUPTIBLE_IO
        macros are no longer used.
-       (emacs_open): Renamed from sys_open.  Merge BSD4_1 version.
-       (emacs_close): Renamed from sys_close.
-       (emacs_read): Renamed from sys_read.
-       (emacs_write): Renamed from sys_write.
+       (emacs_open): Rename from sys_open.  Merge BSD4_1 version.
+       (emacs_close): Rename from sys_close.
+       (emacs_read): Rename from sys_read.
+       (emacs_write): Rename from sys_write.
        (sys_siglist): Do not declare if HAVE_STRSIGNAL.
        (dup2): Do not print error on failure; the real dup2 doesn't.
        (strsignal): New function, defined if !HAVE_STRSIGNAL.
 1999-10-18  Kenichi Handa  <handa@etl.go.jp>
 
        * coding.c (code_convert_string): Add record_unwind_protect to
-       assure setting inhibit_pre_post_conversion back to zero.  Take
-       care of the multibyteness of the working buffer.
+       assure setting inhibit_pre_post_conversion back to zero.
+       Take care of the multibyteness of the working buffer.
 
        * coding.c (inhibit_pre_post_conversion): New variable.
        (setup_coding_system): If inhibit_pre_post_conversion is nonzero,
        * minibuf.c (Fminibuffer_complete_and_exit): Supply value for new
        ESCAPE_FROM_EDGE parameter to Ffield_beginning.
 
-       * editfns.c (text_property_eq, text_property_stickiness): Don't
-       use initializers for auto variables of type Lisp_Object.
+       * editfns.c (text_property_eq, text_property_stickiness):
+       Don't use initializers for auto variables of type Lisp_Object.
        (find_field): Likewise.  Use braces around nested ifs.
        (Fline_end_position): Store the raw eol in a variable, so that the
        final expression doesn't look so ugly.
        (Fconstrain_to_field): Doc fix.
-       (preceding_pos): Renamed from `preceeding_pos'.
+       (preceding_pos): Rename from `preceeding_pos'.
        (text_property_stickiness, find_field): Call preceding_pos,
        not preceeding_pos.
 
        * syntax.c (Fforward_word): Supply new ESCAPE_FROM_EDGE parameter
        to Fconstrain_to_field.
 
-       * minibuf.c (Fminibuffer_complete_word): Use
-       Ffield_beginning to find the prompt end.
+       * minibuf.c (Fminibuffer_complete_word):
+       Use Ffield_beginning to find the prompt end.
 
 1999-10-17  Miles Bader  <miles@gnu.org>
 
 1999-10-16  Gerd Moellmann  <gerd@gnu.org>
 
        * window.c (enum save_restore_action): New.
-       (save_restore_orig_size): Change parameter list.  Add
-       functionality to check for valid orig_top and orig_height members
+       (save_restore_orig_size): Change parameter list.
+       Add functionality to check for valid orig_top and orig_height members
        in a window tree.
        (grow_mini_window): Call save_restore_orig_size with new parameter
        list.
        (Finternal_set_lisp_face_attribute): Ditto.
        (Fpixmap_spec_p): Rewritten.  Extend doc string.
 
-       * xmenu.c (set_frame_menubar, xmenu_show): Call
-       x_set_menu_resources_from_menu_face.
+       * xmenu.c (set_frame_menubar, xmenu_show):
+       Call x_set_menu_resources_from_menu_face.
 
        * dispextern.h (enum face_id): Add MENU_FACE_ID.
        (toplevel): Include X11/Intrinsic.h.
 
 1999-09-29  Gerd Moellmann  <gerd@gnu.org>
 
-       * editfns.c (Fpropertize): Renamed from Fproperties.
+       * editfns.c (Fpropertize): Rename from Fproperties.
 
 1999-09-29  Gerd Moellmann  <gerd@gnu.org>
 
 
        * textprop.c (next_single_char_property_change): New.
 
-       * xdisp.c (display_prop_end, invisible_text_between_p): Use
-       next_single_char_property_change.
+       * xdisp.c (display_prop_end, invisible_text_between_p):
+       Use next_single_char_property_change.
 
 1999-09-25  Gerd Moellmann  <gerd@gnu.org>
 
 
        * xfaces.c (add_to_log): Move to xdisp.c.
 
-       * xdisp.c (add_to_log): Moved from xfaces.c.  Remove frame
+       * xdisp.c (add_to_log): Move from xfaces.c.  Remove frame
        parameter.
 
 1999-09-23  Gerd Moellmann  <gerd@gnu.org>
        (grow_mini_window, shrink_mini_window): New.
        (make_window, replace_window): Initialize orig_top and
        orig_height.
-       (enlarge_window): Renamed from change_window_height.  Make it
+       (enlarge_window): Rename from change_window_height.  Make it
        static.
-       (Fdisplay_buffer, Fenlage_window, Fshrink_window): Call
-       enlarge_window instead of change_window_height.
+       (Fdisplay_buffer, Fenlage_window, Fshrink_window):
+       Call enlarge_window instead of change_window_height.
 
        * window.h (struct window): New members orig_top, orig_height.
        (toplevel): Add prototypes for grow_mini_window and
 
        * xdisp.c (compute_window_start_on_continuation_line): Handle case
        that window start is out of range.
-       (handle_display_prop, handle_single_display_prop): Replace
-       marginal area specifications like `left-margin' with `(margin
+       (handle_display_prop, handle_single_display_prop):
+       Replace marginal area specifications like `left-margin' with `(margin
        left-margin)'.
        (Qmargin): New.
        (syms_of_xdisp): Initialize Qmargin.
        (Fopen_network_stream, create_process): Add parentheses to
        conditional expressions.
        (create_process): Put declaration of sigchld in #if 0.
-       (Fopen_network_stream): Removed unused variables.
+       (Fopen_network_stream): Remove unused variables.
        (Fopen_network_stream, wait_reading_process_input)
        (wait_reading_process_input, send_process, send_process): Ditto.
        (toplevel): Add prototypes for set_waiting_for_input and
 
        * buffer.h: Add prototype for r_re_alloc.
 
-       * insdel.c (copy_text): Removed unused variables.
+       * insdel.c (copy_text): Remove unused variables.
        (count_combining_after, count_combining_after, insert_1_both)
        (insert_from_string_1, insert_from_buffer_1, check_markers): Ditto.
        (adjust_after_replace, replace_range): Add parentheses to logical
        * xdisp.c (resize_mini_window): Don't report changed window
        height if it actually hasn't changed.
 
-       * widget.c (set_frame_size, EmacsFrameSetCharSize): Remove
-       unused variables.
+       * widget.c (set_frame_size, EmacsFrameSetCharSize):
+       Remove unused variables.
        (mark_shell_size_user_specified): Put in #if 0 because not used.
        (create_frame_gcs): Put in #if 0 because currently unused.
        (first_frame_p): Ditto.
        (free_frame_menubar, xmenu_show, xdialog_show): Remove unused
        variables.
 
-       * print.c (PRINTFULLP): Removed because it is no longer used and
+       * print.c (PRINTFULLP): Remove because it is no longer used and
        is misleading.
        (Ferror_message_string): Remove unused variables.
        (print_object): Cast argument of sprintf to long for `%ld'
 
        * xterm.c (XTcursor_to): Change for Lisp_Object selected_frame.
        (x_clear_frame, XTring_bell, XTmouse_position, XTread_socket): Ditto.
-       (XRINGBELL): Removed.
+       (XRINGBELL): Remove.
 
 1999-09-13  Dave Love  <fx@gnu.org>
 
 
 1999-09-13  Gerd Moellmann  <gerd@delysid.gnu.org>
 
-       * xfns.c (QCfile): Moved to xdisp.c.
+       * xfns.c (QCfile): Move to xdisp.c.
        (syms_of_xfns): Don't initialize QCfile.
        (check_x_frame): Change for Lisp_Object selected_frame.
        (check_x_display_info, x_get_resource_string): Ditto.
        * minibuf.c (choose_minibuf_frame): Don't try to set the
        mini-buffer window's buffer, if the buffer is invalid.
 
-       * xfns.c (QCfile): Moved to xdisp.c.
+       * xfns.c (QCfile): Move to xdisp.c.
        (syms_of_xfns): Don't initialize QCfile.
 
        * xdisp.c (QCfile): Move here from xfns.c.
 
        * xterm.c (XTcursor_to): Change for Lisp_Object selected_frame.
        (x_clear_frame, XTring_bell, XTmouse_position, XTread_socket): Ditto.
-       (XRINGBELL): Removed.
+       (XRINGBELL): Remove.
 
        * window.c (Fminibuffer_window): Change for Lisp_Object
        selected_frame.
        * keyboard.c (command_loop_1): Resize mini-window to the
        exact size of a message displayed, if any.
 
-       * xdisp.c (resize_mini_window): Add parameter exact_p.  Resize
-       to exact size if exact_p is non-zero.
+       * xdisp.c (resize_mini_window): Add parameter exact_p.
+       Resize to exact size if exact_p is non-zero.
        (display_echo_area_1): Call resize_mini_window with
        new parameter.
        (redisplay_internal): Ditto.
        (Fkill_buffer): Ditto.
        (Ferase_buffer): Ditto.
 
-       * buffer.h (prompt_end_charpos): Replaces
-       minibuffer_prompt_length.
+       * buffer.h (prompt_end_charpos):
+       Replaces minibuffer_prompt_length.
 
        * minibuf.c (read_minibuf): Return mini-buffer contents
        without the prompt.
        (x_load_font, x_find_ccl_program, x_term_init, x_delete_display):
        Likewise.
 
-       * alloc.c (make_float, make_pure_float, Fpurecopy): Use
-       XFLOAT_DATA.
+       * alloc.c (make_float, make_pure_float, Fpurecopy):
+       Use XFLOAT_DATA.
        * bytecode.c (Fbyte_code): Likewise.
        * floatfns.c (extract_float, Fexpt, Fabs, rounding_driver)
        (fmod_float): Likewise.
 1999-09-10  Keisuke Nishida  <kxn30@po.cwru.edu>
 
        * print.c: Support print-circle and related features.
-       (Vprint_gensym_alist): Removed.
+       (Vprint_gensym_alist): Remove.
        (Vprint_circle, Vprint_continuous_numbering, print_number_index)
        (Vprint_number_table): New variables.
        (PRINT_NUMBER_OBJECT, PRINT_NUMBER_STATUS): New macros.
 
 1999-09-07  Gerd Moellmann  <gerd@gnu.org>
 
-       * xfns.c (x_set_foreground_color): Call
-       update_face_from_frame_parameter.
+       * xfns.c (x_set_foreground_color):
+       Call update_face_from_frame_parameter.
        (x_set_background_color): Ditto.
        (x_set_mouse_color): Ditto.
        (x_set_cursor_color): Ditto.
        (Fset_window_start): Ditto.
 
        * xdisp.c (Vresize_mini_config, resize_mini_frame)
-       (resize_mini_initial_height): Removed.
+       (resize_mini_initial_height): Remove.
        (syms_of_xdisp): Remove references to these variables.
        (resize_mini_window): Don't save window configuration, freeze
        window starts instead.  Enlarge window until displaying an empty
 
        * xterm.c (x_scroll_bar_create): Don't clear under scroll bar
        here.
-       (XTset_vertical_scroll_bar): Clarify position computations.  Clear
-       under newly created scroll bar.  Put toolkit scroll bars in the
+       (XTset_vertical_scroll_bar): Clarify position computations.
+       Clear under newly created scroll bar.  Put toolkit scroll bars in the
        middle of the area reserved for the scroll bar.
 
 1999-09-03  Kenichi Handa  <handa@etl.go.jp>
 
        The following changes are for the new handling of multibyte
        sequence.  Now, except for a composite character, no multibyte
-       character in string/buffer has trailing garbage bytes.  For
-       instance, the length of string "\201\300\300" is now 2, the first
+       character in string/buffer has trailing garbage bytes.
+       For instance, the length of string "\201\300\300" is now 2, the first
        character is Latin-1 A-grave, the second is raw \300.
 
        * charset.h (MAKE_NON_ASCII_CHAR): Handle the case that C1 or C2
        (PARSE_CHARACTER_SEQ): New macro.
        (PARSE_MULTIBYTE_SEQ): New macro.
        (CHAR_PRINTABLE_P): New macro.
-       (STRING_CHAR): Adjusted for the change of string_to_non_ascii_char.
+       (STRING_CHAR): Adjust for the change of string_to_non_ascii_char.
        (STRING_CHAR_AND_LENGTH): Likewise.
        (STRING_CHAR_AND_CHAR_LENGTH): Define it as STRING_CHAR_AND_LENGTH.
        (INC_POS): Use the macro PARSE_MULTIBYTE_SEQ.
 
        * insdel.c (count_combining_composition): New function.
        (count_combining_before): Adjust the way to check byte-combining
-       possibility for the new handling of multibyte sequence.  Call
-       count_combining_composition for a composite character.
+       possibility for the new handling of multibyte sequence.
+       Call count_combining_composition for a composite character.
        (count_combining_after): Likewise.
 
        * print.c (print_string): Use the macro STRING_CHAR_AND_LENGTH.
        (window_box_left): Use FRAME_LEFT_FLAGS_AREA_WIDTH instead of
        FRAME_FLAGS_AREA_WIDTH.
 
-       * window.c (coordinates_in_window): Use
-       FRAME_LEFT_FLAGS_AREA_WIDTH instead of FRAME_FLAGS_AREA_WIDTH.
+       * window.c (coordinates_in_window):
+       Use FRAME_LEFT_FLAGS_AREA_WIDTH instead of FRAME_FLAGS_AREA_WIDTH.
        (window_internal_width): Subtract FRAME_FLAGS_AREA_WIDTH once
        instead of twice.
 
        * dispnew.c (mode_line_string): Add FRAME_LEFT_FLAGS_AREA_WIDTH
        instead of FRAME_FLAGS_AREA_WIDTH.
 
-       * dispextern.h (WINDOW_DISPLAY_PIXEL_WIDTH): Subtract
-       FRAME_FLAGS_AREA_COLS once.
-       (WINDOW_DISPLAY_LEFT_EDGE_PIXEL_X): Add
-       FRAME_LEFT_FLAGS_AREA_WIDTH instead of FRAME_FLAGS_AREA_WIDTH.
+       * dispextern.h (WINDOW_DISPLAY_PIXEL_WIDTH):
+       Subtract FRAME_FLAGS_AREA_COLS once.
+       (WINDOW_DISPLAY_LEFT_EDGE_PIXEL_X):
+       Add FRAME_LEFT_FLAGS_AREA_WIDTH instead of FRAME_FLAGS_AREA_WIDTH.
 
 1999-08-30  Gerd Moellmann  <gerd@gnu.org>
 
-       * s/freebsd.h (C_SWITCH_SYSTEM): Added to let configure find headers
+       * s/freebsd.h (C_SWITCH_SYSTEM): Add to let configure find headers
        in /usr/X11R6/include which are checked for with AC_CHECK_HEADER.
 
 1999-08-30  Gerd Moellmann  <gerd@gnu.org>
 
 1999-08-28  Ken Raeburn  <raeburn@gnu.org>
 
-       * lisp.h (struct Lisp_Cons, XCAR, XCDR, struct Lisp_Float): Change
-       names of structure elements if HIDE_LISP_IMPLEMENTATION is
+       * lisp.h (struct Lisp_Cons, XCAR, XCDR, struct Lisp_Float):
+       Change names of structure elements if HIDE_LISP_IMPLEMENTATION is
        defined, to help detect code that uses knowledge of the Lisp
        internals that it shouldn't have.
        (XFLOAT_DATA): New macro.
 
 1999-08-22  Gerd Moellmann  <gerd@gnu.org>
 
-       * xdisp.c (unwind_with_echo_area_buffer): Use
-       set_buffer_internal_1 instead of set_buffer_internal.
+       * xdisp.c (unwind_with_echo_area_buffer):
+       Use set_buffer_internal_1 instead of set_buffer_internal.
        (with_echo_area_buffer): Ditto.
 
        * buffer.c (set_buffer_internal): Set windows_or_buffers_changed
        (mark_window_display_accurate, redisplay_internal): Set current
        matrix' buffer, begv, zv.
 
-       * window.c (Fset_window_hscroll): Set
-       prevent_redisplay_optimizations_p instead of clip_changed.
+       * window.c (Fset_window_hscroll):
+       Set prevent_redisplay_optimizations_p instead of clip_changed.
        (Fset_window_hscroll): Ditto.
        (temp_output_buffer_show): Ditto.
        (Fset_window_vscroll): Ditto.
        unchanged_modified, overlay_unchanged_modified.
 
        * window.h (beg_unchanged, end_unchanged, unchanged_modified)
-       (overlay_unchanged_modified): Removed.
+       (overlay_unchanged_modified): Remove.
        (with_echo_area_unwind_data): Don't save beg/end_unchanged.
        (unwind_with_echo_area_buffer): Don't restore them.
        (debug_beg_unchanged, debug_end_unchanged) [GLYPH_DEBUG]: Removed.
 
        * lisp.h: Add prototype for copy_hash_table and Fcopy_hash_table.
 
-       * fns.c (Qkey, Qvalue): Renamed from Qkey_weak, and Qvalue_weak.
-       (Qkey_value_weak): Removed.
+       * fns.c (Qkey, Qvalue): Rename from Qkey_weak, and Qvalue_weak.
+       (Qkey_value_weak): Remove.
        (make_hash_table): Use nil, `key', `value', t for weakness.
        (Fmake_hash_table): Ditto.
        (copy_hash_table): New.
        * fns.c (hash_lookup): Test with EQ before calling key comparison
        function.
        (hash_remove): Ditto.
-       (cmpfn_eq): Removed.
+       (cmpfn_eq): Remove.
        (cmpfn_eql): Don't test with EQ.
        (cmpfn_equal): Ditto.
        (make_hash_table): Set comparison function for `eq' to null.
        * buffer.c, cmds.c, editfns.c, indent.c, insdel.c, buffer.h:
        Remove conditional compilation on NO_PROMPT_IN_BUFFER.
 
-       * dispextern.h (NO_PROMPT_IN_BUFFER): Removed.
+       * dispextern.h (NO_PROMPT_IN_BUFFER): Remove.
 
        * window.c, widget.c, process.c, keyboard.c, frame.c, xdisp.c,
        xterm.c: Call change_frame_size and do_pending_window_change with
        NO_PROMPT_IN_BUFFER.
 
        * minibuf.c (Fminibuffer_prompt_end): New.
-       (syms_of_minibuf): Defsubr it.  Remove
-       minibuffer-prompt-in-buffer.
+       (syms_of_minibuf): Defsubr it.
+       Remove minibuffer-prompt-in-buffer.
        (Fminibuffer_prompt_width): Return 0 if not in mini-buffer.
        Extend documentation.
 
 
 1999-08-21  Gerd Moellmann  <gerd@gnu.org>
 
-       * xdisp.c (minibuffer_scroll_overlap): Removed because not used
+       * xdisp.c (minibuffer_scroll_overlap): Remove because not used
        anywhere.
        (unwind_redisplay): Return nil.
        (clear_garbaged_frames): New.
        * xdisp.c (echo_area_glyphs, echo_area_message)
        (echo_area_glyphs_length, previous_echo_glyphs)
        (previous_echo_area_message, previous_echo_area_glyphs_length):
-       Removed.
+       Remove.
        (Vmessage_stack, echo_area_buffer, echo_buffer)
        (display_last_displayed_message_p, Vwith_echo_area_save_vector): New.
        (message2_nolog): Use set_message and clear_message.
        Remove initialization of removed variables.
        (init_xdisp): Remove references to removed variables.
 
-       * dispnew.c (adjust_frame_message_buffer): Removed references
+       * dispnew.c (adjust_frame_message_buffer): Remove references
        to echo_area_glyphs and previous_echo_glyphs.
        (direct_output_for_insert): Check for mini-window displaying
        echo area message differently.
        longer used in that way.
        (PRINTDECLARE): Add multibyte.
        (PRINTPREPARE, PRINTFINISH): Handle printcharfun t differently.
-       (printbufidx): Removed.
+       (printbufidx): Remove.
        (printchar, strout): Rewritten.
 
        * keyboard.c (ok_to_echo_at_next_pause): Make it a pointer to
 
 1999-08-19  Gerd Moellmann  <gerd@gnu.org>
 
-       * xterm.c (XTset_vertical_scroll_bar): Fix previous change.  Clear
-       under scroll bar with width FRAME_SCROLL_BAR_COLS.
+       * xterm.c (XTset_vertical_scroll_bar): Fix previous change.
+       Clear under scroll bar with width FRAME_SCROLL_BAR_COLS.
 
 1999-08-18  Dave Love  <fx@gnu.org>
 
 
        * xfns.c (x_window) [USE_X_TOOLKIT]: Remove test for
        FRAME_X_WINDOW (f) being null at the of the function.  If widgets
-       cannot be created we will already have crashed earlier.  Call
-       lw_set_main_areas with a null menu-bar widget, so that we have
+       cannot be created we will already have crashed earlier.
+       Call lw_set_main_areas with a null menu-bar widget, so that we have
        a reasonable default.
        (Fx_create_frame): Rearranged so that Lisp errors during frame
        initialization cause less damage.  Initialize menu bar widget
 1999-08-17  Gerd Moellmann  <gerd@gnu.org>
 
        * window.c (Fcoordinates_in_window_p): Return `left-bitmap-area'
-       and `right-bitmap-area' if position is in the bitmap areas.  This
-       avoids an error when clicking on the bitmap areas.  Instead, they
+       and `right-bitmap-area' if position is in the bitmap areas.
+       This avoids an error when clicking on the bitmap areas.  Instead, they
        are currently treated like clicks inside the window.
        (coordinates_in_window): Return 5 and 6 for bitmap areas.
        (Qleft_bitmap_area, Qright_bitmap_area): New.
        * dispextern.h (struct it): Remove member
        show_trailing_whitespace_p.
 
-       * dispnew.c (direct_output_for_insert): Use
-       Vshow_trailing_whitespace instead of former iterator member
+       * dispnew.c (direct_output_for_insert):
+       Use Vshow_trailing_whitespace instead of former iterator member
        show_trailing_whitespace_p.
        (direct_output_forward_char): Don't do it if highlighting
        trailing whitespace.
 
-       * xdisp.c (Qshow_trailing_whitespace): Removed.
-       (Vshow_trailing_whitespace): Added.
+       * xdisp.c (Qshow_trailing_whitespace): Remove.
+       (Vshow_trailing_whitespace): Add.
        (init_iterator): Remove initialization code for
        show_trailing_whitespace_p.
        (redisplay_internal): Don't try cursor movement in this_line
 
        * window.c (Fpos_visible_in_window_p): Rewritten.
 
-       * xfaces.c (add_to_log): Renamed from display_message.
+       * xfaces.c (add_to_log): Rename from display_message.
        Don't display messages in echo area.
 
        * xterm.c (x_draw_glyph_string_box): Use the background width
 
 1999-08-13  Gerd Moellmann  <gerd@gnu.org>
 
-       * window.c (MINSIZE): Removed.
+       * window.c (MINSIZE): Remove.
        (window_min_size): New.
        (set_window_height): Use window_min_size.
        (change_window_height): Ditto.
 
        * dispextern.h (MATRIX_ROW_OVERLAPPING_P): New.
 
-       * dispextern.h (struct redisplay_interface): Add
-       fix_overlapping_area.
+       * dispextern.h (struct redisplay_interface):
+       Add fix_overlapping_area.
 
        * xterm.c (x_append_glyph): Set glyph flag overlaps_vertically_p.
 
 
 1999-08-03  Tom Breton  <tob@world.std.com>
 
-       * lread.c (read1): Added circular reading code to #N=.
+       * lread.c (read1): Add circular reading code to #N=.
        (SUBSTITUTE): New macro.
        (seen_list): New variable.
        (substitute_object_in_subtree): New function.
        * ccl.c (ccl_driver) <CCL_Call>: Now CCL program ID to call may be
        stored in the following CCL code.  Adjusted for the change of
        Vccl_program_table.
-       (resolve_symbol_ccl_program): Adjusted for the new style of
+       (resolve_symbol_ccl_program): Adjust for the new style of
        embedded symbols (SYMBOL . PROP) in CCL compiled code.   Return Qt
        is resolving failed.
        (ccl_get_compiled_code): New function.
        (Fccl_execute): Get compiled CCL code by just calling
        setup_ccl_program.
        (Fccl_execute_on_string): Likewise.
-       (Fregister_ccl_program): Adjusted for the change of
+       (Fregister_ccl_program): Adjust for the change of
        Vccl_program_table.
 
        * coding.c (setup_coding_system): Get compiled CCL code by just
        * xrdb.c (x_load_resources): Set double-click time defaults
        for Motif list boxes from double-click-time.
 
-       * fns.c (Vhash_table_tests): Removed.
+       * fns.c (Vhash_table_tests): Remove.
        (Qhash_table_test): New.
        (syms_of_fns): Initialize Qhash_table_test.
        (Fmake_hash_table): Look up user-defined tests in symbol prop
 
 1999-07-16  Gerd Moellmann  <gerd@gnu.org>
 
-       * frame.h (FRAME_WINDOW_REDISPLAY_P): Removed.  Use FRAME_WINDOW_P
+       * frame.h (FRAME_WINDOW_REDISPLAY_P): Remove.  Use FRAME_WINDOW_P
        instead.
 
        * fns.c (cmpfn_eq): Add hash code parameters.
 
 1999-07-15  Gerd Moellmann  <gerd@gnu.org>
 
-       * lisp.h (DEFAULT_REHASH_THRESHOLD): Changed to 0.8.
+       * lisp.h (DEFAULT_REHASH_THRESHOLD): Change to 0.8.
 
        * fns.c (maybe_resize_hash_table): Correct computation of
        index vector size.
        (survives_gc_p): Make it externally visible.
        (mark_object): Ditto.
 
-       * fns.c (remove_hash_entry): Removed.
+       * fns.c (remove_hash_entry): Remove.
        (sweep_weak_hash_tables): New.
 
        * print.c (print): Print more information about hash tables.
 
-       * xfns.c (image_spec_hash): Removed.
+       * xfns.c (image_spec_hash): Remove.
        (lookup_image): Use sxhash instead of image_spec_hash.
-       (image_spec_equal_p): Removed.
+       (image_spec_equal_p): Remove.
        (lookup_image): Use Fequal instead of image_spec_equal_p.
 
 1999-07-14  Gerd Moellmann  <gerd@gnu.org>
 
-       * lisp.h (P_): Moved to top of file.
+       * lisp.h (P_): Move to top of file.
 
        * fns.c (make_hash_table): Set new members.
 
        * lisp.h (struct Lisp_Hash_Table): Add user_cmp_function,
        user_hash_function, cmpfn, and hashfn.
 
-       * fns.c (build_hash): Removed.
-       (hash_test): Removed.
+       * fns.c (build_hash): Remove.
+       (hash_test): Remove.
        (cmpfn_eq, cmpfn_eql, cmpfn_equal, cmpfn_user_defined): New.
        (hashfn_eq, hashfn_eql, hashfn_equal, hashfn_user_defined): New.
 
        properties.
        (handle_single_display_prop): Handle some display property
        forms for terminal frames.
-       (Qimage): Moved here from xfns.c.
+       (Qimage): Move here from xfns.c.
 
        * dispextern.h (struct it): New field string_from_display_prop_p.
 
 
 1999-07-05  Gerd Moellmann  <gerd@gnu.org>
 
-       * term.c (TS_cursor_visible): Renamed from TS_visual_mode.
-       (TS_cursor_normal): Renamed from TS_end_visual_mode.
+       * term.c (TS_cursor_visible): Rename from TS_visual_mode.
+       (TS_cursor_normal): Rename from TS_end_visual_mode.
        (TS_cursor_invisible): New.
        (term_init): Initialize TS_cursor_invisible.
        (tty_hide_cursor): New.
 
 1999-07-02  Gerd Moellmann  <gerd@gnu.org>
 
-       * dispextern.h (HSCROLL_WINDOWS): Removed.
+       * dispextern.h (HSCROLL_WINDOWS): Remove.
 
        * xdisp.c (mark_window_display_accurate): Don't set
        w->region_showing.
        up when cursor is partially visible, make it fully visible.
        (mark_window_display_accurate): Some cleanup.  Record window's
        last cursor information.
-       (debug_method_add): Improved.
+       (debug_method_add): Improve.
        (redisplay_internal): Record last cursor info only if not
        consider_all_windows_p.
 
        * dispnew.c (update_window): Update top line after scrolling.
-       (blank_row): Renamed from make_empty_enabled_row.
+       (blank_row): Rename from make_empty_enabled_row.
        (increment_glyph_row_buffer_positions): Increment positions
        in buffers, only.
 
        * dispextern.h (struct glyph_matrix): Add member window_vscroll.
 
        * xdisp.c (debug_method_add): New.
-       (debug_redisplay_method): Removed.
+       (debug_redisplay_method): Remove.
        (try_window_reusing_current_matrix): Handle case where old
        window start is the same as new window start.
 
        (CURRENT_TOP_LINE_HEIGHT): New.
        (DESIRED_TOP_LINE_HEIGHT): New.
        (WINDOW_DISPLAY_TOP_LINE_HEIGHT): New.
-       (WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE): Replaces
-       WINDOW_DISPLAY_TEXT_AREA_PIXEL_HEIGHT.
+       (WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE):
+       Replaces WINDOW_DISPLAY_TEXT_AREA_PIXEL_HEIGHT.
        (WINDOW_DISPLAY_TEXT_HEIGHT): New.
 
        * xterm.c (x_after_update_window_line): Don't draw bitmaps for top
        x_frame_mode_line_height.
        (x_get_glyph_string_clip_rect): Take top line into account.
        (x_clear_end_of_line): Ditto.
-       (note_mode_line_highlight): Add parameter mode_line_p.  Handle
-       top lines.
+       (note_mode_line_highlight): Add parameter mode_line_p.
+       Handle top lines.
        (note_mouse_highlight): Call note_mode_line_highlight for top lines.
        (x_erase_phys_cursor): Take top line into account.
 
 
        * xterm.c (x_frame_mode_line_height): Add parameter face_id.
 
-       * term.c (estimate_mode_line_height): Renamed from
+       * term.c (estimate_mode_line_height): Rename from
        frame_mode_line_height.  Add parameter face_id.
-       (estimate_mode_line_height_hook): Renamed from
+       (estimate_mode_line_height_hook): Rename from
        frame_mode_line_height_hook.
-       (produce_special_glyphs_hook): Removed.
-       (produce_glyphs_hook): Removed.
+       (produce_special_glyphs_hook): Remove.
+       (produce_glyphs_hook): Remove.
 
 1999-06-23  Gerd Moellmann  <gerd@gnu.org>
 
 
        * buffer.h: Add top_line_format.
 
-       * xdisp.c (overlay_arrow_changed_p): Removed because not used.
+       * xdisp.c (overlay_arrow_changed_p): Remove because not used.
 
 1999-06-17  Dave Love  <fx@gnu.org>
 
 
        * Makefile.in (LIBGIF): Use libungif.
 
-       * xdisp.c (compute_window_start_on_continuation_line): Don't
-       do it if line start is too far away from window start.
+       * xdisp.c (compute_window_start_on_continuation_line):
+       Don't do it if line start is too far away from window start.
 
 1999-06-14  Gerd Moellmann  <gerd@gnu.org>
 
        * xfaces.c (SCALABLE_FONTS): Define this to enable scalable
        font support.
        (Vscalable_fonts_allowed) [SCALABLE_FONTS]: New.
-       (x_face_list_fonts): Add parameter scalable_fonts_p.  Handle
-       scalable fonts depending on the setting of SCALABLE_FONTS.
+       (x_face_list_fonts): Add parameter scalable_fonts_p.
+       Handle scalable fonts depending on the setting of SCALABLE_FONTS.
        (first_font_matching): List more than one font to find the
        first non-scalable matching font.
        (sorted_font_list): Let x_face_list_fonts return scalable fonts
 
 1999-05-26  Gerd Moellmann  <gerd@gnu.org>
 
-       * xfns.c (png_load): Let PNG lib handle gamma.  Construct
-       mask only if image contains simple transparency information.
+       * xfns.c (png_load): Let PNG lib handle gamma.
+       Construct mask only if image contains simple transparency information.
        Otherwise, combine image with frame background color.
 
        * configure.in (--with-png, HAVE_PNG): New.
 
 1999-03-29  Gerd Moellmann  <gerd@gnu.org>
 
-       * xfaces.c (Qraised, Qsunken, QCshadow): Removed.
+       * xfaces.c (Qraised, Qsunken, QCshadow): Remove.
        (QCline_width, QCstyle, Qpressed_button, Qreleased_button): New.
        Use these symbols for the box face attribute instead of the
        removed ones.
        * xfaces.c (x_face_list_fonts): New parameter try_alternatives_p.
        (first_font_matching): New.
        (set_lface_from_font_name): Use it if font name is a pattern.
-       (font_field_wildcard_p): Removed.
+       (font_field_wildcard_p): Remove.
 
        * dispnew.c (shift_glyph_matrix): Add `window' parameter.
        Recompute visible height of rows.
        (update_window_line): Call after_update_window_line_hook
        if visible row height has changed.
 
-       * dispextern.h (MATRIX_ROW_VISIBLE_HEIGHT): Removed.
+       * dispextern.h (MATRIX_ROW_VISIBLE_HEIGHT): Remove.
        (struct glyph_row): New member visible_height.
 
        * xfaces.c (font_field_wildcard_p): New.
-       (set_lface_from_font_name): Remove parameter force_p.  Accept
-       font names containing wildcards.
+       (set_lface_from_font_name): Remove parameter force_p.
+       Accept font names containing wildcards.
 
 1999-03-04  Gerd Moellmann  <gerd@gnu.org>
 
        * dispextern.h (struct face): Add use_box_color_for_shadows_p.
 
        * xterm.c (x_draw_box_rect): New.
-       (x_draw_glyph_string_box): Renamed from
+       (x_draw_glyph_string_box): Rename from
        x_draw_glyph_string_relief.  Call x_draw_box_rect.
 
        * xfns.c (QCrelief): New.
 
        * dispextern.h (struct glyph): Rename left_shadow_p to
        left_box_line_p, right_shadow_p to right_box_line_p.
-       (MAX_RELIEF_THICKNESS): Removed.
+       (MAX_RELIEF_THICKNESS): Remove.
        (struct it): Rename members having `relief' in their names
        to contain `box' instead.
 
        * xfaces.c (realize_x_face): Handle new box attribute values.
-       (QCrelief, Qbox): Removed.
+       (QCrelief, Qbox): Remove.
        (QCshadow, QCcolor, Qraised, Qsunken): New.
        (syms_of_xfaces): Initialize new symbols.
 
 1999-03-02  Gerd Moellmann  <gerd@gnu.org>
 
-       * dispextern.h (LFACE_RELIEF_INDEX): Removed.
+       * dispextern.h (LFACE_RELIEF_INDEX): Remove.
 
-       * xfaces.c (LFACE_RELIEF): Removed.
+       * xfaces.c (LFACE_RELIEF): Remove.
        (merge_face_vector_with_property): Remove handling of `:relief'.
        (Finternal_set_lisp_face_attribute): Ditto.
        (Finternal_set_lisp_face_attribute_from_resource): Ditto.
 
        * xterm.c (x_draw_glyph_string): Draw underline, overline,
        strike-through, and boxes.
-       (x_draw_glyph_string_underline): Removed.
+       (x_draw_glyph_string_underline): Remove.
 
        * xfaces.c (QCoverline, QCstrike_through, QCbox): New.
        (Qoverline, Qstrike_through, Qbox): New.
 1999-01-03  Masatake Yamato  <masata-y@is.aist-nara.ac.jp>
 
        * dispextern.h (UNDERLINE_COLOR): Defined.
-       (struct face): Added two new members.
+       (struct face): Add two new members.
        underline_color, underline_defaulted_p.
 
        * xfaces.c (merge_face_vector_with_property):
 
 1999-02-12  Gerd Moellmann  <gerd@gnu.org>
 
-       * xfns.c (Fx_image_header): Removed.
+       * xfns.c (Fx_image_header): Remove.
 
 1999-02-07  Gerd Moellmann  <gerd@gnu.org>
 
 
        * xdisp.c (handle_single_display_prop): New.
        (handle_display_prop): Call it.
-       (handle_raise_prop): Removed.
-       (handle_height_prop): Removed.
-       (handle_space_width_prop): Removed.
+       (handle_raise_prop): Remove.
+       (handle_height_prop): Remove.
+       (handle_space_width_prop): Remove.
        (handle_face_prop): Remove handling of raised text.
        (handle_display_prop): Do it here.
 
        * dispextern.h (DISPLAY_PROP_IDX): Replaces GLYPH_PROP_IDX.
-       (RAISE_PROP_IDX): Removed.
-       (HEIGHT_PROP_IDX): Removed.
-       (SPACE_WIDTH_PROP_IDX): Removed.
+       (RAISE_PROP_IDX): Remove.
+       (HEIGHT_PROP_IDX): Remove.
+       (SPACE_WIDTH_PROP_IDX): Remove.
 
        * xdisp.c (Qdisplay): Replaces Qglyph.
        (handle_display_prop): Formerly handle_glyph_prop.
 1999-01-11  Gerd Moellmann  <gerd@gnu.org>
 
        * xdisp.c (reseat_to_string): Set position in display vector to -1.
-       (handle_stop): Set position in display vector to -1.  Don't
-       check overlay strings when set up to deliver characters from a
+       (handle_stop): Set position in display vector to -1.
+       Don't check overlay strings when set up to deliver characters from a
        display vector.
        (set_iterator_to_next): At the end of a run of characters from a
        display vector, check whether the display vector display replaces
        * buffer.h (struct buffer): indicate_empty_lines renamed from
        indicate_zv_lines.
 
-       * buffer.c (indicate-empty-lines): Renamed from indicate_zv_lines.
+       * buffer.c (indicate-empty-lines): Rename from indicate_zv_lines.
        (default-indicate-zv-lines): Likewise.
 
        * dispextern.h (struct glyph_row): Rename indicate_zv_line_p
        and `N-'.
 
        * xfns.c (xbm_scan): New.
-       (xbm_read_hexint): Removed.
+       (xbm_read_hexint): Remove.
        (xbm_read_bitmap_file_data): Use xbm_scan.
 
        * fileio.c (Finsert_file_contents): Prevent redisplay optimizations.
 
        * xfaces.c (face_with_height): New.
 
-       * xdisp.c (eval_handler): Renamed from eval_mode_handler.
-       (eval_form): Renamed from eval_mode_element.
+       * xdisp.c (eval_handler): Rename from eval_mode_handler.
+       (eval_form): Rename from eval_mode_element.
        (handle_face_prop): Use it.
        (Qheight): Replaces Qsmaller.
        (handle_height_prop): Replaces handle_smaller_prop.
 
 1998-11-28  Gerd Moellmann  <gerd@gnu.org>
 
-       * config.in (PROTO): Removed.
+       * config.in (PROTO): Remove.
 
        * xterm.h: Change PROTO to P_.
 
 
        * xterm.c (x_scroll_bar_move): Clear to the left and right
        of toolkit scroll bars differently.
-       (x_scroll_bar_move): Removed.
+       (x_scroll_bar_move): Remove.
        (XTset_vertical_scroll_bar): Move code from x_scroll_bar_move here.
 
        * dispextern.h: Make it compilable --with-x=no.
 
 1998-11-23  Gerd Moellmann  <gerd@gnu.org>
 
-       * xdisp.c (restore_overlay_strings): Removed.
-       (restore_dpvec): Removed.
+       * xdisp.c (restore_overlay_strings): Remove.
+       (restore_dpvec): Remove.
        (init_from_display_pos): Inline both functions above.
 
        * xfns.c (IMAGE_NON_NEGATIVE_INTEGER_VALUE): New.
        (gif_format): Ditto.
        (gs_format): Ditto.
 
-       * xdisp.c (set_window_cursor): Removed.
+       * xdisp.c (set_window_cursor): Remove.
        (redisplay_internal): Case cursor motion in cursor line of
        selected window; use set_cursor_from_row.
 
 
        * xdisp.c (redisplay_window): Always resize toolbar window if
        auto_resize_toolbar_p is non-zero.
-       (auto_resize_toolbar_p): Renamed from auto_resize_toolbar.
+       (auto_resize_toolbar_p): Rename from auto_resize_toolbar.
        (window_box): New.
        (window_box_height): New.
        (window_box_width): New.
        * xfns.c (x_laplace): New.
        (x_laplace_read_row): New.
        (x_laplace_write_row): New.
-       (lookup_image): Handle common image attributes here.  New
-       attribute `:algorithm'.
+       (lookup_image): Handle common image attributes here.
+       New attribute `:algorithm'.
 
        * xfaces.c (clear_face_cache): Call clear_image_cache.
 
-       * xterm.c (x_inverted_image_mask): Removed.
+       * xterm.c (x_inverted_image_mask): Remove.
        (x_draw_image_foreground_1): New.
        (x_draw_image_glyph_string): Draw images with mask to a temporary
        pixmap to reduce flickering.
 
        * xfns.c (cache_image): Correct call to xrealloc.
 
-       * dispnew.c (Fset_toolbar_height): Removed.
+       * dispnew.c (Fset_toolbar_height): Remove.
 
        * xdisp.c (init_xdisp): Use FRAME_TOP_MARGIN instead of
        FRAME_MENU_BAR_LINES.
        (clear_image_cache): Additional parameter force_p.
        (Fclear_image_cache): New.
        (x_find_image_file): New.
-       (xbm_load): Handle `:margin' and `:relief'.  Use
-       x_find_image_file.
+       (xbm_load): Handle `:margin' and `:relief'.
+       Use x_find_image_file.
        (xpm_load): Likewise.
        (pbm_load): Likewise.
        (jpeg_load): Likewise.
        * frame.h (struct frame): Add toolbar-related members
        toolbar_window, desired_toolbar_items, current_toolbar_items,
        desired_toolbar_string, current_toolbar_string,
-       n_desired_toolbar_items, n_current_toolbar_items.  Add
-       window_height.
+       n_desired_toolbar_items, n_current_toolbar_items.
+       Add window_height.
 
        * xterm.c (x_after_update_window_line): Don't draw bitmap
        areas for pseudo-windows.
 
 1998-09-06  Gerd Moellmann  <gerd@gnu.org>
 
-       * lisp.h (HAVE_FACES): Removed.
+       * lisp.h (HAVE_FACES): Remove.
 
-       * dispextern.h (HAVE_FACES): Removed.
+       * dispextern.h (HAVE_FACES): Remove.
 
-       * config.in (HAVE_FACES): Removed.
+       * config.in (HAVE_FACES): Remove.
 
-       * dispnew.c (HAVE_FACES): Removed.
+       * dispnew.c (HAVE_FACES): Remove.
 
-       * xdisp.c (HAVE_FACES): Removed.
+       * xdisp.c (HAVE_FACES): Remove.
 
-       * xfaces.c (HAVE_FACES): Removed.
+       * xfaces.c (HAVE_FACES): Remove.
 
 1998-09-05  Gerd Moellmann  <gerd@gnu.org>
 
        free realized faces.
 
        * xfaces.c (free_all_realized_faces): Make it externally visible.
-       (Finternal_set_lisp_face_attribute): Increment
-       windows_or_buffers_changed.
+       (Finternal_set_lisp_face_attribute):
+       Increment windows_or_buffers_changed.
 
        * dispnew.c (direct_output_for_insert): Give up if
        face_change_count is non-zero.
 
        * term.c (OUTPUT_IF): Make replacement text have statement form.
        (OUTPUT1_IF): Ditto.
-       (TS_italic_mode, TS_end_italic_mode): Removed.
-       (TS_bold_mode): Removed.
-       (TS_underscore_mode, TS_end_underscore_mode): Removed.
+       (TS_italic_mode, TS_end_italic_mode): Remove.
+       (TS_bold_mode): Remove.
+       (TS_underscore_mode, TS_end_underscore_mode): Remove.
        (TS_enter_bold_mode, TS_enter_dim_mode, TS_enter_blink_mode): New.
        (TS_enter_reverse_mode): New.
        (TS_enter_underline_mode, TS_exit_underline_mode): New.
 
        * frame.h (FRAME_WINDOW_WIDTH_ARG): Add bitmap area widths.
 
-       * dispnew.c (allocate_matrices_for_window_redisplay): Compute
-       total pixel width of window differently.
+       * dispnew.c (allocate_matrices_for_window_redisplay):
+       Compute total pixel width of window differently.
 
        * xdisp.c (init_iterator): Compute width of mode line differently.
 
        (update_window_tree): Parameter no_scrolling_p removed.
        (update_single_window): Ditto.
 
-       * xterm.c (x_get_char_font_and_encoding): Renamed to
+       * xterm.c (x_get_char_font_and_encoding): Rename to
        x_get_char_face_and_encoding.
 
        * dispnew.c (update_text_area): Don't call get_glyph_overhangs
 
        * xterm.c (note_mouse_highlight): Set BEGV_BYTE, ZV_BYTE.
 
-       * xfaces.c (Vx_unibyte_registry_and_encoding): Removed.  Use
-       face_default_registry instead.
+       * xfaces.c (Vx_unibyte_registry_and_encoding): Remove.
+       Use face_default_registry instead.
 
        * syntax.c (scan_sexps_forward): Set up syntax table before
        jumping to initial state label.
        (struct iterator_stack_entry): Add multibyte_p.
 
        * xdisp.c (string_pos): Use string_char_to_byte.
-       (char_charset): Removed.
+       (char_charset): Remove.
 
 1998-08-03  Gerd Moellmann  <gerd@gnu.org>
 
        * xterm.c (x_draw_image_glyph_string_foreground): Draw a
        rectangle for a block cursor over an image without a mask.
-       (x_stretch_block_cursor): Added.  Non-zero means don't draw
+       (x_stretch_block_cursor): Add.  Non-zero means don't draw
        a block cursor over a stretch as wide as that stretch.
        (x_draw_stretch_glyph_string): Use it.
        (x_draw_hollow_cursor): Ditto.
        * xdisp.c (char_charset): Return charset of a character,
        depending on whether or not multi-byte characters are enabled.
 
-       * xfaces.c (Fset_face_charset_registry): Removed.
+       * xfaces.c (Fset_face_charset_registry): Remove.
        (x_charset_registry): Determine registry from charset plist.
 
 1998-08-02  Gerd Moellmann  <gerd@gnu.org>
        redisplay interface.
        * keyboard.c (detect_input_pending_run_timers): Likewise.
 
-       * dispextern.h (produce_*glyphs_hook): Removed.
+       * dispextern.h (produce_*glyphs_hook): Remove.
        * term.c (produce_*glyphs): Ditto.
        (cursor_to): Remove pixel position parameters.
 
        * xterm.c (x_flush): Flush X output buffer.
        (XTflash): Use it.
 
-       * xfaces.c (lface_from_face_name): Renamed from lface_from_symbol.
+       * xfaces.c (lface_from_face_name): Rename from lface_from_symbol.
        Allow strings as face names.
 
        * xfns.c (forall_images_in_image_cache): Check that frame is
        (Finternal_lisp_face_attribute_values): Ditto.
        (syms_of_xfaces): Define the symbol `:reverse-video'.
 
-       * xdisp.c (get_glyph_property): Renamed from
+       * xdisp.c (get_glyph_property): Rename from
        fill_iterator_from_glyph_property.
        (next_element_from_buffer): Handle case that no `glyph' property
        was found correctly.
 
 1998-07-29  Gerd Moellmann  <gerd@gnu.org>
 
-       * dispnew.c (Fshow_cursor): Renamed from blink_cursor.  Take
-       additional window argument.
+       * dispnew.c (Fshow_cursor): Rename from blink_cursor.
+       Take additional window argument.
 
-       * xdisp.c (reseat_at_previous_visible_line_start): Renamed from
+       * xdisp.c (reseat_at_previous_visible_line_start): Rename from
        set_iterator_to_previous_visible_line_start.
        (reseat_at_next_visible_line_start): Likewise.
-       (compute_stop_pos): Renamed from set_iterator_stop_pos.
-       (face_before_or_after_it_pos): Renamed from get_face_at_it_pos.
-       (compute_face_in_buffer): Renamed from
+       (compute_stop_pos): Rename from set_iterator_stop_pos.
+       (face_before_or_after_it_pos): Rename from get_face_at_it_pos.
+       (compute_face_in_buffer): Rename from
        compute_face_at_iterator_position.
-       (compute_face_in_string): Renamed from
+       (compute_face_in_string): Rename from
        compute_face_at_iterator_string_position.
-       (get_space_width): Renamed from get_iterator_space_width.
-       (next_overlay_string): Renamed from
+       (get_space_width): Rename from get_iterator_space_width.
+       (next_overlay_string): Rename from
        set_iterator_to_next_overlay_string.
-       (get_overlay_strings): Renamed from
+       (get_overlay_strings): Rename from
        get_overlay_strings_at_iterator_position.
-       (restore_overlay_strings): Renamed from
+       (restore_overlay_strings): Rename from
        setup_overlay_strings_from_glyph_pos.
-       (restore_dpvec): Renamed from setup_iterator_dpvec_from_glyph_pos.
-       (init_from_display_pos): Renamed from init_iterator_from_glyph_pos.
-       (init_to_row_start): Renamed from init_iterator_to_row_start.
+       (restore_dpvec): Rename from setup_iterator_dpvec_from_glyph_pos.
+       (init_from_display_pos): Rename from init_iterator_from_glyph_pos.
+       (init_to_row_start): Rename from init_iterator_to_row_start.
        (init_to_row_end): Formerly init_iterator_to_next_row_start.
 
        * xterm.c: Merge with 20.2.97.
        simple charpos.
 
        * xdisp.c (this_line_start_pos): Use struct text_pos.
-       (this_line_end_pos): Renamed from .*endpos; use struct text_pos.
-       (enum move_it_result): Renamed from move_iterator_result.
+       (this_line_end_pos): Rename from .*endpos; use struct text_pos.
+       (enum move_it_result): Rename from move_iterator_result.
        (string_pos_nchars_ahead): Compute text_pos in a string from a
        known text_pos plus a character delta.
        (string_pos): Compute text_pos in string from charpos.
        (c_string_pos): Likewise for a C string.
        (number_of_chars): Return number of characters in a possibly
        multi-byte C string.
-       (check_it): Renamed from check_iterator.  Check that charpos and
+       (check_it): Rename from check_iterator.  Check that charpos and
        bytepos are in sync.
-       (push_it): Renamed from save_iterator_settings.
-       (pop_it): Renamed from restore_iterator_settings.
-       (move_it_.*): Renamed from move_iterator_.*.
+       (push_it): Rename from save_iterator_settings.
+       (pop_it): Rename from restore_iterator_settings.
+       (move_it_.*): Rename from move_iterator_.*.
        (charset_at_position): Take charpos/bytepos into account.
        (back_to_previous_line_start): Set iterator to previous line start.
        (forward_to_next_line_start): Set iterator to next line start.
-       (back_to_previous_visible_line_start): Renamed from
+       (back_to_previous_visible_line_start): Rename from
        move_iterator_previous_visible_line_start.
        (set_iterator_to_next_visible_line_start): Handle charpos/bytepos.
-       (get_face_at_it_pos): Renamed from get_face_from_cursor_pos.
+       (get_face_at_it_pos): Rename from get_face_from_cursor_pos.
        Handle charpos/bytepos.
        (compute_face_at_iterator_position): Handle charpos/bytepos.
        (compute_face_at_iterator_string_position): Likewise.
        (copy_glyph_row_contents): Ditto.
        (check_matrix_invariants): Add additional checks for charpos/
        bytepos consistency.
-       (direct_output_for_insert): Changed for charpos/bytepos.
+       (direct_output_for_insert): Change for charpos/bytepos.
        (buffer_posn_from_coords): Likewise.  Put code dealing with
        `direction-reversed' in #if 0.
 
        (SET_TEXT_POS_FROM_MARKER): Set a text_pos from a marker.
        (SET_MARKER_FROM_TEXT_POS): Set a marker from a text_pos.
        (TEXT_POS_EQUAL_P): Compare two text_pos structures for equality.
-       (struct display_pos): Renamed from glyph_pos.  Use struct text_pos
+       (struct display_pos): Rename from glyph_pos.  Use struct text_pos
        for buffer and string positions.
        (struct glyph): Use text_pos.
-       (struct it): Renamed from display_iterator.  Use text_pos.
+       (struct it): Rename from display_iterator.  Use text_pos.
 
 1998-07-23  Gerd Moellmann  <gerd@gnu.org>
 
        * xfns.c (prepare_image_for_display): Don't set loading_failed_p
        flag of images.
 
-       * dispextern.h (struct image): Removed member loading_failed_p.
+       * dispextern.h (struct image): Remove member loading_failed_p.
        It's probably better to have the chance to try to load an image
        again.
 
        * xfns.c (tiff_image_p, tiff_load): Support TIFF images via
        libtiff34.
 
-       * configure.in (--with-tiff, HAVE_TIFF): Added.
+       * configure.in (--with-tiff, HAVE_TIFF): Add.
 
-       * config.in (HAVE_TIFF): Added.
+       * config.in (HAVE_TIFF): Add.
 
-       * Makefile.in (LIBTIFF): Added.
+       * Makefile.in (LIBTIFF): Add.
 
        * xfns.c (jpeg_image_p, jpeg_load): Support JPEG images.
 
-       * Makefile.in (LIBJPEG): Added.
+       * Makefile.in (LIBJPEG): Add.
 
        * xfns.c (resource_types): Enumerators renamed to RES_TYPE_NUMBER,
        RES_TYPE_BOOLEAN etc. because of conflict of `boolean' with
        jpeglib.h.
 
-       * configure.in (HAVE_JPEG, --with-jpeg): Added.  On systems
+       * configure.in (HAVE_JPEG, --with-jpeg): Add.  On systems
        where the library is installed in /usr/local/lib, e.g. FreeBSD,
        configure must be run with `--x-includes=/usr/X11R6/include:
        /usr/local/include --x-libraries=/usr/X11R6/lib:/usr/local/lib'.
 
 1998-07-18  Gerd Moellmann  <gerd@gnu.org>
 
-       * config.in (HAVE_JPEG): Added.
+       * config.in (HAVE_JPEG): Add.
 
        * xfns.c (ct_init): Initialize color table used to map RGB colors
        from images to X pixel colors.
        (redisplay_window): Case cursor movement.  Don't try it if
        last_cursor.vpos is out of range.
 
-       * xdisp.c (set_cursor_from_row): Set this_line_.* variables.  This
-       way, the display optimization for the line containing the cursor
+       * xdisp.c (set_cursor_from_row): Set this_line_.* variables.
+       This way, the display optimization for the line containing the cursor
        is used more frequently, esp. when we have a blinking cursor.
        (display_line): Don't set this_line_.* variables.
 
-       * xterm.c (x_redraw_cursor): Removed.
+       * xterm.c (x_redraw_cursor): Remove.
        (x_display_and_set_cursor): Set cursor type depending on
        cursor_off_p flag of window.
 
-       * dispnew.c (redraw_cursor_hook): Removed.
+       * dispnew.c (redraw_cursor_hook): Remove.
        (Fblink_cursor): Additional parameter on_p to set the cursor_off_p
        member of the selected window.
 
-       * xfaces.c (Fface_font): Added for compatibility with 20.2.
+       * xfaces.c (Fface_font): Add for compatibility with 20.2.
 
        * xterm.c (x_y_to_hpos_vpos): Return null if not over text.
        Return glyph area under x/y.
 
 1998-06-29  Gerd Moellmann  <gerd@gnu.org>
 
-       * xfaces.c (Finternal_make_lisp_face): Increment
-       lface_id_to_name_size when lface_id_to_name is reallocated.
+       * xfaces.c (Finternal_make_lisp_face):
+       Increment lface_id_to_name_size when lface_id_to_name is reallocated.
 
 1998-06-27  Gerd Moellmann  <gerd@gnu.org>
 
 
 1998-05-09  Gerd Moellmann  <gerd@gnu.org>
 
-       * xdisp.c (set_iterator_to_next_visible_line_start): Don't
-       do anything if iterator is at ZV because scan_buffer doesn't
+       * xdisp.c (set_iterator_to_next_visible_line_start):
+       Don't do anything if iterator is at ZV because scan_buffer doesn't
        work otherwise.
 
        * xterm.c (x_encode_char): Inline it.
-       (x_get_char_font_and_encoding): Simplified.
+       (x_get_char_font_and_encoding): Simplify.
        (x_per_char_metric): Inline it.
 
        * xterm.c (x_draw_glyph_string_relief): Use clipping.
        * xdisp.c (display_line): Compute row height from glyphs in
        marginal areas.
 
-       * xterm.c (x_draw_image_glyph_string_background): Draw
-       background of an image glyph string.
+       * xterm.c (x_draw_image_glyph_string_background):
+       Draw background of an image glyph string.
        (x_draw_glyph_string_bg_rect): Draw a rectangular region of
        the background of a glyph string.
        (x_draw_image_glyph_string_foreground): Draw the foreground of
        an image glyph string.
        (x_inverted_image_mask): Return the inverted mask of an image.
 
-       * xfns.c (x_draw_image): Removed.
+       * xfns.c (x_draw_image): Remove.
 
        * dispextern.h (struct image_type): Remove drawing function.
 
        image drawing function.
 
        * xdisp.c (fill_iterator_from_glyph_property): Use position of
-       first character with `glyph' property as image position.  Set
-       iterator back to that position as long as the image hasn't been
+       first character with `glyph' property as image position.
+       Set iterator back to that position as long as the image hasn't been
        consumed with set_iterator_to_next.
        (set_cursor_from_row): Accept when glyph with given position is
        not found in the row.  Set cursor x to end of line in that case,
 
        * dispextern.h (struct glyph_row): Use unsigned hash value.
 
-       * xdisp.c (display_line): Simplified and made faster by setting
+       * xdisp.c (display_line): Simplify and made faster by setting
        the cursor with set_cursor_from_row.
        (set_cursor_from_row): Handle rows of desired matrix.
 
 
        * xdisp.c (set_cursor_from_row): Don't put cursor on glyphs
        with type != CHAR_GLYPH.
-       (fill_iterator_from_glyph_property): Return void.  Set
-       method to next_element_from_image.
+       (fill_iterator_from_glyph_property): Return void.
+       Set method to next_element_from_image.
        (next_element_from_image): Dummy function for delivering a
        single image id.
        (set_iterator_to_next): Add method next_element_from_image.
 
        * xterm.c (x_produce_glyphs): Use ASCII face for spaces of a TAB.
 
-       * xdisp.c (fill_iterator_from_glyph_property): Renamed from
+       * xdisp.c (fill_iterator_from_glyph_property): Rename from
        setup_iterator_from_glyph_property.  Don't do it for terminal
        frames.
 
 
        * config.in: Add HAVE_XPM.
 
-       * xfns.c (xbm_draw): Removed.
+       * xfns.c (xbm_draw): Remove.
        (x_draw_image): Default implementation for drawing images.
        (xbm_keyword_index): Remove XBM_DEPTH.
        (xbm_format): Remove `:depth'.
-       (xbm_image_spec_from_file): Removed to reduce consing.
-       (xbm_load_image_from_file): Added for the same reason.
+       (xbm_image_spec_from_file): Remove to reduce consing.
+       (xbm_load_image_from_file): Add for the same reason.
 
        * xterm.c (x_fill_image_glyph_string): Don't set ybase of
        glyph string.
 
        * widget.c (widget_store_internal_border): Return void.
 
-       * xfns.c (x_destroy_bitmap): Use xfree instead of free.  Return
-       void.
+       * xfns.c (x_destroy_bitmap): Use xfree instead of free.
+       Return void.
        (init_x_parm_symbols): Return void.
        (x_report_frame_params): Ditto.
        (x_set_border_pixel): Ditto.
        * dispnew.c (adjust_frame_glyphs_for_window_redisplay): Use these
        macros.
 
-       * xterm.c (x_font_min_bounds): Moved here from xfaces.c.
+       * xterm.c (x_font_min_bounds): Move here from xfaces.c.
        (x_compute_min_char_bounds): Formerly min_char_bounds in xfaces.c.
        (x_load_font): Use x_compute_min_char_bounds.
 
        for characters < 0177 in default face.  Prepare face for
        display before returning it.
        (x_produce_glyphs): Use it->charset.
-       (x_get_char_font_and_encoding): Simplified.
+       (x_get_char_font_and_encoding): Simplify.
        (x_encode_char): Remove parameter `font'.
 
        * xfaces.c (choose_face_font): If registry from charset symbol
        * dispextern.h (FACE_FOR_CHARSET): Replacement for function
        lookup_face_for_charset.
 
-       * xfaces.c (free_font_names): Renamed from free_split_font_names.
-       (free_all_realized_faces): Renamed from remove_all_realized_faces.
+       * xfaces.c (free_font_names): Rename from free_split_font_names.
+       (free_all_realized_faces): Rename from remove_all_realized_faces.
 
 1998-04-25  Gerd Moellmann  <gerd@gnu.org>
 
 
 1998-04-24  Gerd Moellmann  <gerd@gnu.org>
 
-       * dispextern.h (struct face): Member
-       fontset_chosen_for_realization_p removed.
+       * dispextern.h (struct face):
+       Member fontset_chosen_for_realization_p removed.
 
        * xfaces.c (cache_face): If face->fontset >= 0, add face to the
        end of the collision list, so that we find more specific faces
        (xlfd_point_size): Return -1 if resolution or point size of
        font unknown.
 
-       * xfaces.c (free_font): Removed.
-       (load_face_font_or_fontset): Renamed from load_font.
+       * xfaces.c (free_font): Remove.
+       (load_face_font_or_fontset): Rename from load_font.
        (load_face_font_or_fontset): Use message2 instead of signaling.
        (load_color): Likewise.
        (load_pixmap): Likewise.
        to -1 so that it will compute the right face for the truncation
        glyphs.
 
-       * xfaces.c (realize_face): Set
-       face->fontset_chosen_for_realization_p.
+       * xfaces.c (realize_face):
+       Set face->fontset_chosen_for_realization_p.
        (lookup_face_for_charset): If fontset wasn't specified originally
        and new charset != CHARSET_COMPOSITION, get a new face for that
        charset.
        (lface_hash): Add weight, slant, swidth and relief to hash value.
        (lface_equal_p): Make it faster.
        (lface_from_symbol): Use assq_no_quit.
-       (Fnote_default_face_changed): Removed.
+       (Fnote_default_face_changed): Remove.
        (cmp_font_names): Use strcmp instead of xstricmp.
-       (face_charset_registries): Removed.
+       (face_charset_registries): Remove.
 
 1998-04-20  Gerd Moellmann  <gerd@gnu.org>
 
 
        * xfaces.c (Finternal_set_lisp_face_attribute): Add :bold
        and :italic for compatibility.
-       (Finternal_set_lisp_face_attribute_from_resource): Handle
-       :bold and :italic.  Handle boolean resource values for
+       (Finternal_set_lisp_face_attribute_from_resource):
+       Handle :bold and :italic.  Handle boolean resource values for
        :underline and :italic.
 
        * xfns.c (display_x_get_resource): Make it externally visible.
        definitions.
        (Finternal_lisp_face_equal_p): Additional frame argument.
        (merge_lisp_face_vector_with_property): Ditto.
-       (Frealize_basic_faces): Removed.
+       (Frealize_basic_faces): Remove.
        (Finternal_get_lisp_face_attribute): Additional frame argument.
        (Finternal_lisp_face_p): Ditto.
        (load_color) [MSDOS]: Removed because it isn't clear how
        * xdisp.c (redisplay_internal, echo_area-display): If realized
        faces have been cleared, call recompute_basic_faces.
 
-       * xfaces.c (recompute_basic_faces): Free realized faces.  Reset
-       face_attributes_changed_p.
+       * xfaces.c (recompute_basic_faces): Free realized faces.
+       Reset face_attributes_changed_p.
        (remove_all_realized_faces): Remove all realized faces on
        all frames.
        (Finternal_set_lisp_face_attribute): Call remove_all_realized_faces.
        changed since the last redisplay, recompute basic faces.
        (echo_area_display): Ditto.
 
-       * xfaces.c (clear_face_gcs): Renamed from clear_realized_face_cache.
+       * xfaces.c (clear_face_gcs): Rename from clear_realized_face_cache.
 
        * xfaces.c (min_char_bounds): If face cache not yet present,
        don't try to get font dimensions from faces.
        * xterm.c (x_frame_mode_line_height): If face cache not present
        set, return default height.
 
-       * alloc.c (mark_face_cache): Check for null faces.  Correct
-       index bug.
+       * alloc.c (mark_face_cache): Check for null faces.
+       Correct index bug.
 
-       * dispextern.h (struct face): Renamed from struct rface.  Member
-       underline renamed underline_p.  Make it a bit-field.
+       * dispextern.h (struct face): Rename from struct rface.
+       Member underline renamed underline_p.  Make it a bit-field.
 
        * xfaces.c (init_frame_faces): Allocate face cache.
        (free_frame_faces): Free face cache.
 
        * frame.c (make_frame): Initialze face cache with null.
 
-       * xfaces.c (same_size_fonts): Removed.
+       * xfaces.c (same_size_fonts): Remove.
 
        * xterm.c (x_set_glyph_string_gc): Add post-condition
        s->gc != 0.
 
        * xfaces.c (syms_of_xfaces): Correct calls to defsubr.
 
-       * xfns.c (Fx_face_fixed_p): Removed.
-       (Fx_list_fonts): Moved to xfaces.c.
+       * xfns.c (Fx_face_fixed_p): Remove.
+       (Fx_list_fonts): Move to xfaces.c.
 
-       * xfaces.c (compute_face_at_buffer_pos): Renamed to
+       * xfaces.c (compute_face_at_buffer_pos): Rename to
        face_at_buffer_position.  Parameter charset removed; always
        compute face for CHARSET_ASCII.
-       (face_at_string_position): Renamed from
+       (face_at_string_position): Rename from
        compute_face_at_string_pos.  Parameter charset removed; always
        compute for CHARSET_ASCII.
        (lookup_face_for_charset): Take frame parameter instead of
        face_cache.
        (lookup_face): Ditto.
-       (compute_char_face): Renamed from compute_glyph_face.
+       (compute_char_face): Rename from compute_glyph_face.
 
        * xdisp.c (init_iterator): Initialize charset member.
        (reseat_iterator_to_string): Ditto.
        (get_charset_at_buffer_position): Determine charset at
        buffer position in current_buffer.
        (reseat_iterator): Call above function.
-       (compute_face_at_iterator_position): Call
-       compute_face_at_buffer_pos.
-       (compute_face_at_iterator_string_position): Call
-       compute_face_at_string_pos.
-       (get_face_from_id): Removed.
+       (compute_face_at_iterator_position):
+       Call compute_face_at_buffer_pos.
+       (compute_face_at_iterator_string_position):
+       Call compute_face_at_string_pos.
+       (get_face_from_id): Remove.
        (get_face_from_cursor_pos): Call compute_face_at_buffer_pos.
        Call get_charset_at_buffer_position.
        (reseat_iterator): Determine face if charset at pos differs
        from iterator's charset.
-       (reseat_iterator_to_glyph_pos): Removed.
+       (reseat_iterator_to_glyph_pos): Remove.
 
        * xfaces.c (compute_face_at_bufpos): Remove parameter charset.
        Determine charset from buffer position.
-       (compute_string_char_face): Renamed to compute_face_at_string_pos.
-       (compute_face_at_bufpos): Renamed to compute_face_at_buffer_pos.
+       (compute_string_char_face): Rename to compute_face_at_string_pos.
+       (compute_face_at_bufpos): Rename to compute_face_at_buffer_pos.
 
        * dispextern.h (struct display_iterator): Add member charset.
 
 1998-04-15  Gerd Moellmann  <gerd@gnu.org>
 
-       * xfaces.c (compute_char_face): Removed.
+       * xfaces.c (compute_char_face): Remove.
 
        * xdisp.c (get_overlay_arrow_glyph_row): Use compute_glyph_face
        with new parameter list.
 
-       * xfaces.c (region_face): Removed.
-       (allocate_face): Removed.
+       * xfaces.c (region_face): Remove.
+       (allocate_face): Remove.
        (copy_face): Ditto.
-       (face_eql): Removed.
-       (intern_face): Removed.
-       (clear_face_cache): Removed.
+       (face_eql): Remove.
+       (intern_face): Remove.
+       (clear_face_cache): Remove.
        (load_font): Ditto.
        (unload_font): Ditto.
        (load_color): Ditto.
        (merge_faces): Ditto.
        (compute_base_face): Ditto.
        (merge_face_list): Ditto.
-       (Fmake_face_internal): Removed.
+       (Fmake_face_internal): Remove.
        (Fset_face_attribute_internal): Ditto.
-       (face_name_id_number): Removed.
+       (face_name_id_number): Remove.
        (Fframe_face_alist): Ditto.
        (Fset_frame_face_alist): Ditto.
        (Finternal_next_face_id): Ditto.
        * fontset.h: Add external declarations for Vfontset_alias_alist
        and Vglobal_fontset_alist.
 
-       * xfaces.c (merge_lisp_face_vector_with_property): Simplified.
+       * xfaces.c (merge_lisp_face_vector_with_property): Simplify.
        (realize_default_face): If frame parameters contain an artificial
        font name naming a fontset, set the family of the default face to
        the fontset name given by the registry.
        * xdisp.c (set_cursor_from_row): If PT is not found in the
        row, display the cursor at the start of the row.
 
-       * dispnew.c (direct_output_forward_char): Call
-       set_cursor_from_row.
+       * dispnew.c (direct_output_forward_char):
+       Call set_cursor_from_row.
 
-       * xdisp.c (setup_iterator_overlay_strings_from_glyph_pos): If
-       position is not in an overlay string, set iterator's position and
+       * xdisp.c (setup_iterator_overlay_strings_from_glyph_pos):
+       If position is not in an overlay string, set iterator's position and
        method explicitly so.
        (set_cursor_from_row): Correct cursor position calculation.
        Make it externally visible.
        * dispnew.c: Make compilable with -Wall.
        * term.c: Ditto.
 
-       * charset.h (CHAR_LEN): Moved here from dispextern.h.
+       * charset.h (CHAR_LEN): Move here from dispextern.h.
 
 1998-03-14  Gerd Moellmann  <gerd@gnu.org>
 
        * xdisp.c (init_iterator): Increase last_visible_x by vertical
        scroll bar width for mode lines.
 
-       * dispnew.c (allocate_matrices_for_window_redisplay): Include
-       vertical scroll bar width in width calculation so that we can
+       * dispnew.c (allocate_matrices_for_window_redisplay):
+       Include vertical scroll bar width in width calculation so that we can
        display mode lines wider.
 
        * xdisp.c (redisplay_window): Restore buffers before returning
        * dispextern.h (struct glyph_row): Member max_ascent renamed
        ascent.  Member max_descent replaced by height.
        (struct display_iterator): Member max_descent replaced by height.
-       (MATRIX_ROW_PIXEL_HEIGHT): Removed.
+       (MATRIX_ROW_PIXEL_HEIGHT): Remove.
 
        * xterm.c (x_alloc_lighter_color): Don't free colors if visual
        class makes it unnecessary or dangerous.
        * xterm.c (x_scroll_run): Don't set updated_window to null.
        This resets updated_window when called from scrolling_window.
 
-       * dispextern.h (scroll_run_hook): Renamed from line_dance_hook.
+       * dispextern.h (scroll_run_hook): Rename from line_dance_hook.
 
-       * xterm.c (x_scroll_run): Additional window parameter.  Set
-       and reset updated_window.
+       * xterm.c (x_scroll_run): Additional window parameter.
+       Set and reset updated_window.
 
        * dispnew.c (line_dance_hook): Additional window parameter.
 
        * dispnew.c (Fblink_cursor): Remove call to detect_input_pending.
        Don't redraw cursor during redisplay.
 
-       * xterm.c (x_scroll_run): Renamed from do_line_dance.
+       * xterm.c (x_scroll_run): Rename from do_line_dance.
 
        * xdisp.c (redisplay_window): For window-based redisplay, always
        try try_window_id.
 
        * xdisp.c (set_next_iterator_stop_pos): No longer static.
 
-       * dispnew.c (direct_output_for_insert): Call
-       set_next_iterator_stop_pos after having changed it2.endpos.
+       * dispnew.c (direct_output_for_insert):
+       Call set_next_iterator_stop_pos after having changed it2.endpos.
 
 1998-02-17  Gerd Moellmann  <gerd@gnu.org>
 
        enough glyphs to display a mode line or menu line which draws over
        flags areas.
 
-       * xterm.c (XTset_vertical_scroll_bar): Use
-       WINDOW_DISPLAY_TEXT_AREA_PIXEL_HEIGHT instead of
+       * xterm.c (XTset_vertical_scroll_bar):
+       Use WINDOW_DISPLAY_TEXT_AREA_PIXEL_HEIGHT instead of
        VERTICAL_SCROLL_BAR_PIXEL_HEIGHT.
        (x_draw_glyphs): Draw over flags areas when drawing a mode line
        or menu.
        (x_set_glyph_string_clipping): Set clipping differently if drawing
        a mode line or menu line.
 
-       * xterm.h (VERTICAL_SCROLL_BAR_PIXEL_HEIGHT): Removed.
+       * xterm.h (VERTICAL_SCROLL_BAR_PIXEL_HEIGHT): Remove.
 
        * xterm.c (expose_line): Don't draw bitmaps for mode lines and
        menu lines.
        (x_scroll_bar_create): Don't clear flags areas.
        (x_draw_row_bitmaps): Clear visible row height, only.
 
-       * dispnew.c (Fblink_cursor): Moved here from xdisp.c.
+       * dispnew.c (Fblink_cursor): Move here from xdisp.c.
 
 1998-02-15  Gerd Moellmann  <gerd@gnu.org>
 
        * dispnew.c (update_window_line): Special handling of inverse
        lines in #if 0 removed.
 
-       * xterm.c (x_write_glyphs): Renamed from XTwrite_glyphs.
-       (x_insert_glyphs): Renamed from XTinsert_glyphs.
-       (x_clear_frame): Renamed from XTclear_frame.
-       (x_clear_end_of_line): Renamed from XTclear_end_of_line.
-       (x_ins_del_lines): Renamed from XTins_del_lines.
-       (x_change_line_height): Renamed from XTchange_line_height.
-       (x_delete_glyphs): Renamed from XTdelete_glyphs.
-       (x_clear_cursor): Renamed from clear_cursor.
-       (x_update_begin): Renamed from XTupdate_begin.
-       (x_update_end): Renamed from XTupdate_end.
-       (x_update_window_begin): Renamed from XTupdate_window_begin.
-       (x_update_window_end): Renamed from XTupdate_window_end.
-       (x_frame_mode_line_height): Renamed from XTframe_mode_line_height.
-       (x_produce_glyphs): Renamed from XTproduce_glyphs.
-       (x_produce_special_glyphs): Renamed from XTproduce_special_glyphs.
+       * xterm.c (x_write_glyphs): Rename from XTwrite_glyphs.
+       (x_insert_glyphs): Rename from XTinsert_glyphs.
+       (x_clear_frame): Rename from XTclear_frame.
+       (x_clear_end_of_line): Rename from XTclear_end_of_line.
+       (x_ins_del_lines): Rename from XTins_del_lines.
+       (x_change_line_height): Rename from XTchange_line_height.
+       (x_delete_glyphs): Rename from XTdelete_glyphs.
+       (x_clear_cursor): Rename from clear_cursor.
+       (x_update_begin): Rename from XTupdate_begin.
+       (x_update_end): Rename from XTupdate_end.
+       (x_update_window_begin): Rename from XTupdate_window_begin.
+       (x_update_window_end): Rename from XTupdate_window_end.
+       (x_frame_mode_line_height): Rename from XTframe_mode_line_height.
+       (x_produce_glyphs): Rename from XTproduce_glyphs.
+       (x_produce_special_glyphs): Rename from XTproduce_special_glyphs.
        (x_produce_special_glyphs): Implementation in #if 0 removed.
 
        * xdisp.c (Fdump_redisplay_state): Display row's fill_line_p
 
        * dispextern.h (struct glyph_matrix): New member window_width.
 
-       * dispnew.c (adjust_glyph_matrix): Set window_width.  Optimize
-       case of changing window height.
+       * dispnew.c (adjust_glyph_matrix): Set window_width.
+       Optimize case of changing window height.
 
        * xterm.c (x_draw_row_bitmaps): Don't clear vertical window
        border to the left.
 
-       * dispextern.h (struct glyph_row): Remove right_to_left_p.  RMS
-       says this aspect of Emacs is currently redesigned.
+       * dispextern.h (struct glyph_row): Remove right_to_left_p.
+       RMS says this aspect of Emacs is currently redesigned.
 
        * xterm.c (x_clip_to_row): Subtract 1 from clip width if we
        have to draw a vertical border.
        removed.
        (struct glyph): Ditto.
 
-       * xterm.c (x_draw_relief): Removed.
-       (x_draw_bitmap): Renamed from draw_bitmap.
+       * xterm.c (x_draw_relief): Remove.
+       (x_draw_bitmap): Rename from draw_bitmap.
        (x_draw_glyphs): Completely new implementation of draw_glyphs
        capable of handling arbitrary lbearing and rbearing values.
        Several sub-functions not mentioned here.
 
 1998-01-25  Gerd Moellmann  <gerd@gnu.org>
 
-       * dispextern.h (DEFAULT_FACE_ID, MODE_LINE_FACE_ID): Symbolic
-       names for face ids of frame default face and mode line face.
+       * dispextern.h (DEFAULT_FACE_ID, MODE_LINE_FACE_ID):
+       Symbolic names for face ids of frame default face and mode line face.
 
-       * xdisp.c (compute_face_at_iterator_string_position): If
-       displaying a mode line use MODE_LINE_FACE_ID instead of
+       * xdisp.c (compute_face_at_iterator_string_position):
+       If displaying a mode line use MODE_LINE_FACE_ID instead of
        DEFAULT_FACE_ID.
 
        * xdisp.c (reseat_iterator_to_string): Additional parameter start.
        (move_iterator_in_display_line_to): If to_pos specified, move
        over before-strings.
 
-       * dispextern.h (MATRIX_ROW_STARTS_IN_MIDDLE_OF_CHAR_P): Test
-       start.string_index > 0.
+       * dispextern.h (MATRIX_ROW_STARTS_IN_MIDDLE_OF_CHAR_P):
+       Test start.string_index > 0.
 
        * xdisp.c (redisplay_internal): Adjust glyphs if fonts_changed_p
        is set.  Retry redisplay if fonts_changed_p is set before update.
 
        * xfaces.c (Fset_face_attribute_internal): Set fonts_changed_p.
 
-       * dispnew.c (adjust_glyphs_for_font_change): Removed.
+       * dispnew.c (adjust_glyphs_for_font_change): Remove.
 
        * xdisp.c (try_window): Check fonts_changed_p.
        (try_window_reusing_current_matrix): Ditto.
        * editfns.c (make_buffer_string): If PROMPT_IN_BUFFER, add prompt
        length to start position.
 
-       * buffer.c (Fget_buffer_create): Initialize
-       minibuffer_prompt_length.
+       * buffer.c (Fget_buffer_create):
+       Initialize minibuffer_prompt_length.
        (Fmake_indirect_buffer): Ditto.
        (Fkill_buffer): Ditto.
 
        * xfaces.c (compute_string_char_face): Compute face for
        arbitrary Lisp string.  Renamed from compute_overlay_string_char_face.
 
-       * xdisp.c (next_element_from_string): Renamed from
+       * xdisp.c (next_element_from_string): Rename from
        next_element_from_overlay_string.
-       (compute_face_at_iterator_string_position): Renamed from
+       (compute_face_at_iterator_string_position): Rename from
        compute_face_at_iterator_overlay_string_position.
 
        * dispextern.h (struct display_iterator): Member overlay_string
        renamed string.
 
-       * xdisp.c (next_element_from_c_string): Renamed from
+       * xdisp.c (next_element_from_c_string): Rename from
        next_element_from_string.
 
        * dispextern.h (struct glyph_pos): Reversed meaning of
 
 1998-01-17  Gerd Moellmann  <gerd@gnu.org>
 
-       * xdisp.c (move_iterator_vertically): Check post-condition.  Move
-       to start of line if ending at ZV and no newline in front.
+       * xdisp.c (move_iterator_vertically): Check post-condition.
+       Move to start of line if ending at ZV and no newline in front.
        (move_iterator_to): If to_y specified, always first move to x = 0,
        so that move stops at line start instead of line end.  This is
        probably what callers would expect to happen.
        try_window_reusing_current_matrix if window scroll functions
        exist.
 
-       * dispextern.h (struct display_iterator): Member
-       redisplay_end_trigger_p removed.
+       * dispextern.h (struct display_iterator):
+       Member redisplay_end_trigger_p removed.
 
        * dispextern.h (WINDOW_DISPLAY_PIXEL_HEIGHT_WITHOUT_MODE_LINE):
-       Renamed to WINDOW_DISPLAY_TEXT_AREA_PIXEL_HEIGHT.
+       Rename to WINDOW_DISPLAY_TEXT_AREA_PIXEL_HEIGHT.
 
 1998-01-16  Gerd Moellmann  <gerd@gnu.org>
 
        * xdisp.c (move_iterator_by_lines): Optimize for truncate-lines
        nil.  Optimize truncate-lines t and moving backward.
        (move_iterator_to_previous_visible_line_start): Contains the heart
-       of the previous set_iterator_to_previous_visible_line_end.  Don't
-       reseat the iterator.  Used by move_iterator_by_lines.
+       of the previous set_iterator_to_previous_visible_line_end.
+       Don't reseat the iterator.  Used by move_iterator_by_lines.
        (set_iterator_to_previous_visible_line_start): Call function
        above.
        (move_iterator_in_display_line_to): Check TO_POS before doing
        (Fset_face_attribute_internal): Use XINT instead of XFASTINT
        to get a relief because they can be negative.
 
-       * xterm.c (x_draw_relief): Correct line drawing positions.  Pixel
-       positions are for the middle of lines under X.
+       * xterm.c (x_draw_relief): Correct line drawing positions.
+       Pixel positions are for the middle of lines under X.
 
        * xdisp.c (try_window_id): Always search for the cursor by setting
        w->cursor.vpos = -1.  Search in unchanged rows at the top and
 
        * xdisp.c (display_line): Bug fix cursor positioning.
 
-       * xfns.c (x-list-fonts): Copied from x-list-fonts.c; #include
+       * xfns.c (x-list-fonts): Copy from x-list-fonts.c; #include
        removed.  x-list-fonts.c is now obsolete.
-       (Qfixed, Qvariable): Moved here from xfaces.c.
+       (Qfixed, Qvariable): Move here from xfaces.c.
 
 1998-01-14  Gerd Moellmann  <gerd@gnu.org>
 
        * xdisp.c (display_line): Set row->ends_at_zv_p based on
        FETCH_BYTE for truncated lines.
        (display_line): Set cursor differently.
-       (display_line): Fixed bug setting last_pos_on_this_line wrong
+       (display_line): Fix bug setting last_pos_on_this_line wrong
        for truncated lines.
 
        * dispnew.c (adjust_glyph_matrix): Always adjust for frame-based
 
        * window.c (Fsplit_window): Adjust glyphs before setting buffer.
 
-       * dispnew.c (adjust_frame_glyphs_for_window_redisplay): Add
-       assertion that character dimensions are not zero.
+       * dispnew.c (adjust_frame_glyphs_for_window_redisplay):
+       Add assertion that character dimensions are not zero.
 
        * xterm.c (x_load_font): adjust_glyphs_for_font_change while
        input is blocked.
 
        * xterm.h (FRAME_FLAGS_BITMAP_WIDTH): Macro giving the width
        in pixels of a flags area of a frame.
-       (FRAME_X_FLAGS_AREA_WIDTH): Removed.
+       (FRAME_X_FLAGS_AREA_WIDTH): Remove.
        (FRAME_X_FLAGS_AREA_COLS): Macro giving the number of columns
        occupied by a flags area.
 
 
        * xdisp.c (display_line): Correct wrong calculation of row->x for
        the case of nglyphs == 1.
-       (hscroll_window_tree): Renamed from hscroll_windows.
+       (hscroll_window_tree): Rename from hscroll_windows.
        (hscroll_windows): New function calling hscroll_window_tree that
        clears desired matrices on a frame when hscroll has been changed.
        (redisplay_p): Global flag set during redisplay.
        * xfaces.c (Qfixed, Qvariable): Symbols for use by x-list-fonts.
        (syms_of_xfaces): Initialize them.
 
-       * xterm.c (x_list_fonts): Include auto-scaled fonts.  Extend
-       cached information.
+       * xterm.c (x_list_fonts): Include auto-scaled fonts.
+       Extend cached information.
 
 1998-01-11  Gerd Moellmann  <gerd@acm.org>
 
 
 1998-01-05  Gerd Moellmann  <gerd@acm.org>
 
-       * xdisp.c (get_row_start_continuation_line_width): Removed.
+       * xdisp.c (get_row_start_continuation_line_width): Remove.
        (init_iterator_to_row_start): Set it.current_x from row.
        (try_window_id): Set it.continuation_lines_width directly from
        row.
 
 1998-01-02  Gerd Moellmann  <gerd@acm.org>
 
-       * xterm.c (x_get_mode_line_face_gc): Renamed from
+       * xterm.c (x_get_mode_line_face_gc): Rename from
        x_get_modeline_face_gc.
 
        * xdisp.c (TEXT_PROP_DISTANCE_LIMIT): Max. distance from current
        * xterm.c (x_get_cursor_gc): Don't return cursor_gc for font ==
        frame font if line height differs from font height.
 
-       * xdisp.c (set_iterator_to_next): Renamed from
+       * xdisp.c (set_iterator_to_next): Rename from
        move_iterator_forward to avoid confusion with other move_.*
        functions.
 
-       * dispextern.h (FACE_RELIEF_P): Renamed from FACE_3D_P.
+       * dispextern.h (FACE_RELIEF_P): Rename from FACE_3D_P.
 
 1997-12-31  Gerd Moellmann  <gerd@acm.org>
 
-       * xterm.c (x_get_cursor_gc): Renamed from x_cursor_gc to use the
+       * xterm.c (x_get_cursor_gc): Rename from x_cursor_gc to use the
        same naming convention as for other GC functions.
        (draw_glyphs): Don't fill background when drawing a cursor and
        font height is less than line height.
 
 1997-12-30  Gerd Moellmann  <gerd@acm.org>
 
-       * xdisp.c (init_display_iterator.*): Renamed to shorter names
+       * xdisp.c (init_display_iterator.*): Rename to shorter names
        init_iterator_.*.
 
        * xdisp.c (move_iterator_forward): Restore it->len from
        (x_get_char_font_and_encoding): Return null if font could not be
        loaded.  Reset font to null if fontset could not be loaded.
        (draw_glyphs): Fill background if font not found.
-       (draw_glyphs): Unused parameter just_foreground_p removed.  New
-       parameter composite_glyph.
+       (draw_glyphs): Unused parameter just_foreground_p removed.
+       New parameter composite_glyph.
        (draw_glyphs): Use enumeration for parameter hl.
        (draw_glyphs): Pass a display area relative x-position to
        draw_glyphs when calling it recursively for composite chars.
        * xterm.c (x_after_update_window_line): Draw continuation line
        bitmap.
 
-       * dispnew.c (update_window_line): Call
-       after_update_window_line_hook when row's continuation_line_p
+       * dispnew.c (update_window_line):
+       Call after_update_window_line_hook when row's continuation_line_p
        changes.
 
        * xterm.c (draw_bitmap): Draw new bitmap CONTINUATION_LINE_BITMAP.
 
 1997-12-14  Gerd Moellmann  <gerd@acm.org>
 
-       * frame.h (FRAME_MODE_LINE_PIXEL_HEIGHT): Removed.
+       * frame.h (FRAME_MODE_LINE_PIXEL_HEIGHT): Remove.
 
        * window.c (coordinates_in_window): Call frame_mode_line_height.
 
-       * xterm.c (x_draw_3d_border): Removed.
-       (x_draw_row_borders): Removed.
+       * xterm.c (x_draw_3d_border): Remove.
+       (x_draw_row_borders): Remove.
 
        * dispnew.c (update_window): References to
        FRAME_MODE_LINE_BORDER_WIDTH removed.
 
-       * xterm.h (FRAME_MODE_LINE_BORDER_WIDTH): Removed.
-       (FRAME_MODE_LINE_HEIGHT): Removed.
+       * xterm.h (FRAME_MODE_LINE_BORDER_WIDTH): Remove.
+       (FRAME_MODE_LINE_HEIGHT): Remove.
 
-       * xterm.c (draw_3d_borders_p): Removed.
+       * xterm.c (draw_3d_borders_p): Remove.
        (draw_glyphs): Ditto.
        (XTwrite_glyphs): Ditto.
        (expose_line): Ditto.
        (x_initialize): Ditto.
 
-       * dispextern.h (WINDOW_DISPLAY_MODE_LINE_HEIGHT): Call
-       frame_mode_line_height.
+       * dispextern.h (WINDOW_DISPLAY_MODE_LINE_HEIGHT):
+       Call frame_mode_line_height.
 
        * term.c (frame_mode_line_height): Get the pixel height of a
        frame's mode line.
        * xdisp.c (compute_face_at_iterator_overlay_string_position):
        Use it.
 
-       * xdisp.c (set_iterator_to_next_overlay_string): Formerly
-       set_iterator_to_next_overlay.
+       * xdisp.c (set_iterator_to_next_overlay_string):
+       Formerly set_iterator_to_next_overlay.
        (struct overlay_entry): Structure used to sort overlay strings.
        (compare_overlay_entries): Compare overlay strings.
        (load_iterator_with_overlay_strings): Load a chunk of overlay
        (get_overlay_strings_at_iterator_position): Call it.
        (next_element_from_overlay_string): Set it->object to the overlay
        string.  Prepare for setting it->position to a string position.
-       (get_overlay_strings_at_iterator_position): Renamed from
+       (get_overlay_strings_at_iterator_position): Rename from
        get_overlays_at_iterator_position.
-       (setup_iterator_overlay_strings_from_glyph_pos): Changed to load
+       (setup_iterator_overlay_strings_from_glyph_pos): Change to load
        chunks of overlay strings.
-       (load_overlay_strings): Renamed from load_iterator_overlay_strings.
+       (load_overlay_strings): Rename from load_iterator_overlay_strings.
 
        * dispextern.h (struct display_iterator): New vector
        overlay_strings and new member n_overlay_strings---formerly
 
        * xdisp.c (copy_iterator): Increment n_iterator_overlay_vectors
        when allocating a vector.
-       (release_iterator): Removed.
-       (restore_iterator): Removed.
-       (copy_iterator): Removed.
+       (release_iterator): Remove.
+       (restore_iterator): Remove.
+       (copy_iterator): Remove.
 
 1997-12-08  Gerd Moellmann  <gerd@acm.org>
 
 
        * xterm.h (struct x_output): trunc_area_extra renamed
        flags_areas_extra.
-       (FRAME_X_FLAGS_AREA_WIDTH): Renamed from FRAME_X_TRUNC_WIDTH.
+       (FRAME_X_FLAGS_AREA_WIDTH): Rename from FRAME_X_TRUNC_WIDTH.
 
-       * dispnew.c (update_window_line): Call
-       after_update_window_line_hook when current row is not enabled
+       * dispnew.c (update_window_line):
+       Call after_update_window_line_hook when current row is not enabled
        which is the case after a frame has been cleared.
 
        * xdisp.c (display_mode_line): Reset row flags for truncation
        face changes and changes in invisible text property.
        (struct glyph_pos): Former ovlen now overlay_string_index.
 
-       * xdisp.c (setup_iterator_overlays_from_glyph_pos): Set
-       overlay_string.
+       * xdisp.c (setup_iterator_overlays_from_glyph_pos):
+       Set overlay_string.
        (set_iterator_to_next_overlay_string): Set overlay_string and
        pos.overlay_string_index.
        (get_overlays_at_iterator_position): Use overlay_string and
        * buffer.h (overlays_at): Function prototype.
 
        * xdisp.c (reseat_iterator_to_string): Clear iterator position.
-       * dispextern.h (GET_NEXT_DISPLAY_ELEMENT): Removed.
+       * dispextern.h (GET_NEXT_DISPLAY_ELEMENT): Remove.
 
        * xdisp.c (release_iterator): Release dynamically allocated
        memory of a display_iterator.
        * buffer.c (overlays_at): Make it work when extending vectors
        and an initial vector of zero size.
 
-       * xdisp.c (set_iterator_to_previous_visible_line_end): Renamed
-       from set_cursor_to_previous_visible_line_end.
-       (set_iterator_to_next_visible_line_start): Renamed from
+       * xdisp.c (set_iterator_to_previous_visible_line_end):
+       Rename from set_cursor_to_previous_visible_line_end.
+       (set_iterator_to_next_visible_line_start): Rename from
        set_cursor_to_next_visible_line_end.
-       (set_next_iterator_stop_pos): Renamed from set_next_stop_pos.
-       (compute_face_at_iterator_position): Renamed from
+       (set_next_iterator_stop_pos): Rename from set_next_stop_pos.
+       (compute_face_at_iterator_position): Rename from
        compute_cursor_face.
-       (set_iterator_to_next_overlay_string): Renamed from
+       (set_iterator_to_next_overlay_string): Rename from
        cursor_to_next_overlay_string.
-       (get_overlays_at_iterator_position): Renamed from
+       (get_overlays_at_iterator_position): Rename from
        get_overlays_for_cursor.
-       (reseat_iterator): Renamed from reseat_cursor.
-       (setup_iterator_overlays_from_glyph_pos): Renamed from
+       (reseat_iterator): Rename from reseat_cursor.
+       (setup_iterator_overlays_from_glyph_pos): Rename from
        setup_overlays_from_pos.
-       (init_string_iterator): Renamed from init_string_cursor.
-       (get_next_display_element): Renamed from next_display_element.
-       (move_iterator_forward): Renamed from advance_display_cursor.
+       (init_string_iterator): Rename from init_string_cursor.
+       (get_next_display_element): Rename from next_display_element.
+       (move_iterator_forward): Rename from advance_display_cursor.
        (get_overlays_at_iterator_position): Allocate overlays vector
        dynamically.
 
 1997-12-01  Gerd Moellmann  <gerd@acm.org>
 
        * window.c (mark_window_cursors_off): Function comment added.
-       (window_topmost_p, window_rightmost_p): Removed because not used.
+       (window_topmost_p, window_rightmost_p): Remove because not used.
 
 1997-11-30  Gerd Moellmann  <gerd@acm.org>
 
        frame_title_buf.
        (init_xdisp): Initialize frame_title_.* variables to null.
 
-       * dispnew.c (quit_error_check): Removed.
+       * dispnew.c (quit_error_check): Remove.
 
        * eval.c (Fsignal): Call to quit_error_check removed.
        * keyboard.c (quit_throw_to_read_char): Ditto.
        * xterm.c (XTupdate_window_end): Don't display cursor if
        pseudo_window_p.
 
-       * dispnew.c (adjust_frame_glyphs_for_window_redisplay): Don't
-       set mini_p.
+       * dispnew.c (adjust_frame_glyphs_for_window_redisplay):
+       Don't set mini_p.
        (update_window): Don't set cursor if pseudo_window_p.
 
        * dispextern.h (WINDOW_WANTS_MODELINE_P): Test pseudo_window_p.
        f->menu_bar_window if appropriate.
        (display_mode_line): Use MATRIX_MODE_LINE_ROW.
 
-       * dispnew.c (adjust_frame_glyphs_for_window_redisplay): Allocate
-       dummy window and window matrices for f->menu_bar_window.
+       * dispnew.c (adjust_frame_glyphs_for_window_redisplay):
+       Allocate dummy window and window matrices for f->menu_bar_window.
        (free_glyphs): Free the dummy window and its glyph matrices.
 
        * frame.h (struct frame): New member menu_bar_window.
        first_row_to_display.  The previous scheme failed if the last row
        was fully visible.
 
-       * dispnew.c (update_window): Remove cost calculations.  Remove
-       redundant preempt_count calculations.
+       * dispnew.c (update_window): Remove cost calculations.
+       Remove redundant preempt_count calculations.
 
        * xterm.c (x_clip_to_row): Set clipping for non-text rows
        differently.
        try_window_id.
        (try_window_reusing_current_matrix): Give up for terminal frames
        if window is not full width or we cannot insert/delete lines.
-       (try_window_reusing_current_matrix): Fixed scrolling for terminal
+       (try_window_reusing_current_matrix): Fix scrolling for terminal
        frames.
 
        * alloc.c (mark_glyph_matrix): Bug fix - pass pointer to
        (update_window_line): Set it.
        (update_marginal_area): Clear to end of line if not in text area.
 
-       * window.c (Fset_window_margins): Increment
-       windows_or_buffer_changed.  Adjust glyphs.
+       * window.c (Fset_window_margins):
+       Increment windows_or_buffer_changed.  Adjust glyphs.
 
        * dispextern.h (WINDOW_TEXT_TO_FRAME_PIXEL_X): Convert text
        area X coordinates to frame coordinates.
 
 1997-10-27  Gerd Moellmann  <gerd@acm.org>
 
-       * dispnew.c (update_window_line): Call
-       after_update_window_line_hook only for interesting constellations.
+       * dispnew.c (update_window_line):
+       Call after_update_window_line_hook only for interesting constellations.
        (free_glyph_matrix): Fix memory leak.
 
        * window.h: Include blocker WINDOW_H_INCLUDED, include
        (replace_window): Ditto.
        * dispnew.c (free_window_matrices): Remove freeing of
        phys_cursor_glyph.
-       (check_matrix_invariants): Renamed from check_current_matrix_...
+       (check_matrix_invariants): Rename from check_current_matrix_...
        * xterm.c: All references to phys_cursor_glyph changed.
 
        * dispextern.h (DISPEXTERN_H_INCLUDED): New include blocker.
 
        * dispextern.h (MATRIX_ROW_FIRST_POS): Use row start.
 
-       * dispnew.c (increment_glyph_row_buffer_positions): Adjust
-       start and end positions in rows.
+       * dispnew.c (increment_glyph_row_buffer_positions):
+       Adjust start and end positions in rows.
        (increment_glyph_row_buffer_positions): Stop adjusting at
        glyphs with positions <= 0.
 
 
 1997-10-21  Gerd Moellmann  <gerd@acm.org>
 
-       * dispnew.c (update_window): Add scrolling_window again.  It's
-       necessary for scroll_step != 0.
+       * dispnew.c (update_window): Add scrolling_window again.
+       It's necessary for scroll_step != 0.
 
        * xdisp.c (redisplay_window): Use vmotion for scroll_step
        scrolling.
 1997-10-19  Gerd Moellmann  <gerd@acm.org>
 
        * dispnew.c (update_window): Remove unused variable.
-       (update_window_line): Simplified.
+       (update_window_line): Simplify.
 
        * xterm.c (x_get_char_font_and_encoding): Handle most common
        case at the beginning.
 
        * xdisp.c (try_window_id): New implementation.
 
-       * dispnew.c (increment_glyph_row_buffer_positions): Capture
-       rows displaying a line end, only.
+       * dispnew.c (increment_glyph_row_buffer_positions):
+       Capture rows displaying a line end, only.
 
 1997-10-18  Gerd Moellmann  <gerd@acm.org>
 
 
        * term.c: Some hooks with function prototypes.
 
-       * xdisp.c (reseat_cursor): Additional argument force_p.  Avoid
-       computing face if possible.
+       * xdisp.c (reseat_cursor): Additional argument force_p.
+       Avoid computing face if possible.
 
        * xdisp.c (next_display_element): Use face from glyph from display
        table only if != 0.
        (init_display_info): Subtract vertical border glyph from
        last_visible_x.
 
-       * scroll.c (scrolling_window_1): Removed.
+       * scroll.c (scrolling_window_1): Remove.
 
        * dispnew.c (adjust_frame_glyphs): Split into two functions,
        based on redisplay method used.
        (adjust_frame_glyphs_for_window_redisplay): Part for purely
        window based redisplay.
 
-       * frame.h (FRAME_WINDOW_REDISPLAY_P): Changed to not depend
+       * frame.h (FRAME_WINDOW_REDISPLAY_P): Change to not depend
        on data structures.
 
        * dispnew.c (adjust_glyph_matrix): Additional parameter W.
        * dispextern.h (struct glyph_matrix): window_top_y,
        window_height.
 
-       * dispnew.c (allocate_matrices_for_window_redisplay): Detect
-       and optimize some common cases of window changes.
+       * dispnew.c (allocate_matrices_for_window_redisplay):
+       Detect and optimize some common cases of window changes.
 
        * emacs.c (main): Remove own profiling code because 0.95 now
        has it in.
        * xterm.c (x_draw_row_borders): Use FRAME_MODE_LINE_HEIGHT height
        value.
        (x_clip_to_row): Use MATRIX_ROW_VISIBLE_HEIGHT.  Simplified.
-       (do_line_dance): Simplified and pixel corrected.
+       (do_line_dance): Simplify and pixel corrected.
 
-       * dispnew.c (scrolling_window): Simplified.
+       * dispnew.c (scrolling_window): Simplify.
 
        * xterm.c (x_draw_3d_border): Insert rectangle by line width.
 
 
        * xterm.h (WINDOW_COL_PIXEL_X etc.) Removed.
 
-       * dispextern.h (WINDOW_TO_FRAME_HPOS/VPOS): Moved to dispnew.c.
+       * dispextern.h (WINDOW_TO_FRAME_HPOS/VPOS): Move to dispnew.c.
 
        * xfns.c (x_contour_region): Use pixel coordinates from window
        cursor instead of WINDOW_TO_FRAME_H/VPOS.
 
        * dispextern.h (FRAME_TO_WINDOW_HPOS, FRAME_TO_WINDOW_VPOS):
-       Removed.
+       Remove.
 
-       * dispnew.c (frame_to_window_hpos, frame_to_window_vpos): Removed.
+       * dispnew.c (frame_to_window_hpos, frame_to_window_vpos): Remove.
 
        * xterm.c (x_y_to_hpos_vpos): Get hpos/vpos from window relative
        pixel coordinates.
        * xfns.c (Fx_create_frame): Don't set PHYS_CURSOR_X to -1.
        I don't believe this is really necessary.
 
-       * dispnew.c (build_frame_matrix_from_leaf_window): Determine
-       border glyph once.
+       * dispnew.c (build_frame_matrix_from_leaf_window):
+       Determine border glyph once.
 
 1997-07-15  Gerd Moellmann  <gerd@acm.org>
 
        * window.c (mark_window_cursors_off): Mark all cursors in
        window tree off.
 
-       * xterm.c (x_display_box_cursor): Window parameter.  Use
-       window matrix.
+       * xterm.c (x_display_box_cursor): Window parameter.
+       Use window matrix.
        (glyph_to_pixel_pos): Convert matrix pos -> pixels.
        (pixel_to_glyph_pos): Convert pixel pos -> matrix pos.
        (x_update_cursor): Work on windows.
 
        * frame.h (struct frame): Cursor information removed.
 
-       * frame.h (FRAME_SCROLL_BAR_WIDTH): Removed because unused.
+       * frame.h (FRAME_SCROLL_BAR_WIDTH): Remove because unused.
        (FRAME_WINDOW_WIDTH_ARG): Don't add scroll bar width.
 
        * window.h (WINDOW_LEFT_MARGIN): Remove FRAME_LEFT_SCROLL_BAR.
        * window.h: CURSOR_VPOS/HPOS added.
 
        * frame.h (struct frame): CURSOR_X/Y removed.
-       (FRAME_CURSOR_X): Removed.
+       (FRAME_CURSOR_X): Remove.
        (FRAME_CURSOR_Y): Ditto.
 
        * dispnew.c (direct_output_for_insert): LAST_POINT_X removed.
 
        * minibuf.c (read_minibuf): Build frame matrix.
 
-       * xdisp.c (this_line_start_hpos): Renamed to
+       * xdisp.c (this_line_start_hpos): Rename to
        THIS_LINE_START_WINDOW_HPOS to make it clear that this is window
        relative.
-       (this_line_vpos): Renamed to THIS_LINE_WINDOW_VPOS for the same
+       (this_line_vpos): Rename to THIS_LINE_WINDOW_VPOS for the same
        reason.
 
        * dispnew.c (build_frame_matrix): Don't clear rows of the
 
        * lisp.h: Prototype for SCAN_BUFFER.
 
-       * xdisp.c (redisplay_windows): Simplified.
+       * xdisp.c (redisplay_windows): Simplify.
 
        * dispnew.c (window_to_frame_vpos): Convert window to frame vpos
        with debug checks.
        * xdisp.c (try_window_id): Use CANCEL_WINDOW_LINE.
        (redisplay_internal): Ditto.
 
-       * dispnew.c (cancel_window_line): Use window matrix.  Changed
-       name to CANCEL_WINDOW_LINE.
+       * dispnew.c (cancel_window_line): Use window matrix.
+       Changed name to CANCEL_WINDOW_LINE.
 
        * xdisp.c (try_window_id): Use DISPLAY_TEXT_LINE with window
        relative VPOS.
        (allocate_leaf_matrix): Add FRAME_MENU_BAR_LINES to the height of
        top-most windows.
 
-       * window.h (WINDOW_TOPMOST_P): Added.
+       * window.h (WINDOW_TOPMOST_P): Add.
 
        * xdisp.c (echo_area_display): Use PREPARE_DESIRED_ROW.
        (redisplay_window): Ditto.
 
        * dispnew.c (check_matrix_pointer_lossage): Check against
        pointer lossage in matrices.
-       (get_glyph_matrix_row): Removed.
+       (get_glyph_matrix_row): Remove.
 
-       * scroll.c (do_scrolling): Simplified.
-       (do_direct_scrolling): Simplified.
+       * scroll.c (do_scrolling): Simplify.
+       (do_direct_scrolling): Simplify.
        (scrolling_1): Pass CURRENT_MATRIX instead of FRAME to
        DO_.*SCROLLING.
 
 
        * dispnew.c (ins_del_glyph_rows): Insert/delete rows in a matrix.
-       (rotate_vector): Removed.
-       (rotate_pointers): Removed.
-       (scroll_frame_lines): Simplified.
+       (rotate_vector): Remove.
+       (rotate_pointers): Remove.
+       (scroll_frame_lines): Simplify.
 
 1997-07-03  Gerd Moellmann  <gerd@acm.org>
 
-       * dispextern.h (MATRIX_ROW_SWAP_CONTENTS): Removed.
+       * dispextern.h (MATRIX_ROW_SWAP_CONTENTS): Remove.
 
-       * dispnew.c (increment_glyph_matrix_buffer_positions): Does
-       what the name says.
+       * dispnew.c (increment_glyph_matrix_buffer_positions):
+       Does what the name says.
        (clear_glyph_row): Make a glyph row structure empty.
        (make_matrix_row_current): Make a glyph row current.
        (make_window_matrix_row_current): Perform analogous row swaps
 
        * All files: Use above new names.
 
-       * dispnew.c (scroll_frame_lines): Simplified.  Use
-       SCROLL_GLYPH_MATRIX.
+       * dispnew.c (scroll_frame_lines): Simplify.
+       Use SCROLL_GLYPH_MATRIX.
        (make_glyph_row_empty): Mark a glyph row empty.
-       (increment_glyph_row_buffer_positions): Increment
-       buffer positions in a glyph row.
+       (increment_glyph_row_buffer_positions):
+       Increment buffer positions in a glyph row.
        (increment_glyph_matrix_buffer_positions): Increment buffer
        positions in a range of rows.
        (scroll_glyph_matrix): Scroll a glyph matrix.
        (MATRIX_ROW_USED): Ditto.
        (MATRIX_ROW_SET_USED): Ditto.
 
-       * dispnew.c (line_hash_code): Simplified.
+       * dispnew.c (line_hash_code): Simplify.
 
 1997-06-30  Gerd Moellmann  <gerd@acm.org>
 
        DO_PENDING_WINDOW_CHANGE, CHANGE_FRAME_SIZE, BITCH_AT_USER,
        SIT_FOR, INIT_DISPLAY, SYMS_OF_DISPLAY,
 
-       * dispnew.c (redraw_frame): FRAME_PTR -> struct frame.  Return
-       void.
+       * dispnew.c (redraw_frame): FRAME_PTR -> struct frame.
+       Return void.
        (cancel_line): Return void.
        (clear_frame_records): Return void.
 
        WRITE_GLYPHS_HOOK, DELETE_GLYPHS_HOOK,
 
        * xdisp.c (redisplay_internal): Remove call to VERIFY_CHARSTARTS.
-       (do_verify_charstarts): Removed.
+       (do_verify_charstarts): Remove.
 
        * frame.c (Fmake_terminal_frame): Adjust glyphs.
        (Fdelete_frame): Free glyphs.
        (make_frame): Initialize matrix fields in frame.
 
-       * config.in (PROTO): Added.
+       * config.in (PROTO): Add.
 
        * emacs.c (shut_down_emacs): Check glyph memory.
 
 
        * emacs.c [DOUG_LEA_MALLOC] (malloc_initialize_hook):
        Move the handling of MALLOC_CHECK_ envvar here.
-       (main): Moved from here.
+       (main): Move from here.
 
 1999-06-29  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
 
 
        * w32console.c (clear_frame): Remember that the window width might
        be smaller than the screen buffer width.
-       (write_glyphs): Remove redundant variable attrs.  Use
-       FillConsoleOutputAttribute instead of WriteConsoleOutputAttribute.
+       (write_glyphs): Remove redundant variable attrs.
+       Use FillConsoleOutputAttribute instead of WriteConsoleOutputAttribute.
 
 1999-05-20  Andrew Innes  <andrewi@gnu.org>
 
        loses focus.
 
        * w32fns.c (w32_wnd_proc): Ensure mouse capture is released if
-       frame loses focus, and that mouse button state is reset.  Ditto
-       when the menu bar is activated.
+       frame loses focus, and that mouse button state is reset.
+       Ditto when the menu bar is activated.
 
 1999-05-18  Richard Stallman  <rms@gnu.org>
 
        (w32_clear_frame, clear_cursor, x_display_bar_cursor)
        (x_display_box_cursor, x_set_window_size): Use phys_cursor_on
        field in frame.
-       (do_line_dance): Updated WRT xterm.c.  Use macros where possible.
+       (do_line_dance): Update WRT xterm.c.  Use macros where possible.
        (dumprectangle): Take into account the width of a left-side
        scroll bar.
 
 
 1999-05-02  Kenichi HANDA  <handa@etl.go.jp>
 
-       * coding.c (setup_raw_text_coding_system): Call
-       setup_coding_system to initialize the fields of struct
+       * coding.c (setup_raw_text_coding_system):
+       Call setup_coding_system to initialize the fields of struct
        coding_system correctly.
 
 1999-04-26  Kenichi HANDA  <handa@etl.go.jp>
 1999-03-25  Andrew Innes  <andrewi@gnu.org>
 
        * makefile.nt (PREPARED_HEADERS): Change name of paths.h to epaths.h.
-       (epaths.h): Renamed from paths.h.
+       (epaths.h): Rename from paths.h.
        (clean):
        ($(BLD)\filelock.obj):
        ($(BLD)\lread.obj):
-       ($(BLD)\w32fns.obj): Renamed paths.h to epaths.h.
+       ($(BLD)\w32fns.obj): Rename paths.h to epaths.h.
 
 1999-03-23  Ken'ichi Handa  <handa@gnu.org>
 
 
 1999-03-20  Kenichi HANDA  <handa@etl.go.jp>
 
-       * coding.c (ENCODE_ISO_CHARACTER): Check validity of CHARSET.  If
-       invalid, produce the buffer internal byte sequence without encoding.
+       * coding.c (ENCODE_ISO_CHARACTER): Check validity of CHARSET.
+       If invalid, produce the buffer internal byte sequence without encoding.
 
 1999-03-19  Karl Heuer  <kwzh@gnu.org>
 
 1999-02-24  Kenichi Handa  <handa@etl.go.jp>
 
        * keymap.c (push_key_description): If enable-multibyte-characters
-       is non-nil, try to convert unibyte character to multibyte.  For
-       invalid multibyte character, show all bits by octal form.
+       is non-nil, try to convert unibyte character to multibyte.
+       For invalid multibyte character, show all bits by octal form.
        (Fsingle_key_description): Check the validity of charset for a
        generic character.
 
 
 1999-02-15  Kenichi Handa  <handa@etl.go.jp>
 
-       * coding.c (Fdecode_sjis_char, Fencode_sjis_char): Handle
-       ASCII correctly.  Signal error on invalid characters.
+       * coding.c (Fdecode_sjis_char, Fencode_sjis_char):
+       Handle ASCII correctly.  Signal error on invalid characters.
        (Fdecode_big5_char, Fencode_big5_char): Likewise.
 
 1999-02-15  Eli Zaretskii  <eliz@gnu.org>
 
 1999-02-04  Eli Zaretskii  <eliz@gnu.org>
 
-       * w16select.c (last_clipboard_text, clipboard_storage_size): New
-       static variables.
+       * w16select.c (last_clipboard_text, clipboard_storage_size):
+       New static variables.
        (set_clipboard_data): Save a copy of the text we put into
        clipboard in last_clipboard_text.
        (get_clipboard_data): If the clipboard text is identical to what
        (x_destroy_bitmap): Returns void not int.
        (x_set_border_pixel): Returns void.
        (w32_load_bdf_font): New function.
-       (w32_load_system_font): New function, was w32_load_font.  List
-       fonts before loading.  Explicitly set encoding for SJIS fonts.
+       (w32_load_system_font): New function, was w32_load_font.
+       List fonts before loading.  Explicitly set encoding for SJIS fonts.
        Set default_ascent to 0 as comment indicates.
        (w32_load_font): Call w32_load_system_font and w32_load_bdf_font.
        (w32_unload_font): Support BDF fonts.
        w32_codepage_for_charset.  Add cast to int where float
        operation is assigned to int.
        (Vw32_charset_to_codepage_alist): New variable.
-       (w32_codepage_for_charset): Removed.
+       (w32_codepage_for_charset): Remove.
        (w32_codepage_for_font): New function, replacing
        w32_codepage_for_charset.
        (syms_of_w32term): Add and initialize
 
        * w32heap.h (ROUND_UP):
        (ROUND_DOWN): New macros.
-       (need_to_recreate_heap): Renamed to using_dynamic_heap.
+       (need_to_recreate_heap): Rename to using_dynamic_heap.
        (init_heap): New extern.
        (data_region_size):
        (recreate_heap):
        (round_to_next): Obsolete function removed.
        (preload_heap_section): New variable.
        (data_region_size): Obsolete variable removed.
-       (allocate_heap): Modified to determine end of static heap section
+       (allocate_heap): Modify to determine end of static heap section
        used during preload, and use that as initial base address for
        dynamic heap instead of hard-coded value.
-       (sbrk): Remove call to allocate_heap; handled by init_heap.  Skip
-       calls to commit or decommit pages when allocating from static heap
+       (sbrk): Remove call to allocate_heap; handled by init_heap.
+       Skip calls to commit or decommit pages when allocating from static heap
        section during preload.
        (recreate_heap): Obsolete function removed.
        (init_heap): New function to initialize internal sbrk heap
        * unexw32.c: Major rewrite to support cleaner method of dumping; a
        static "bss" section is used for heap space during preload, and
        bss data is now written to the proper section area when dumping.
-       (need_to_recreate_heap): Renamed to using_dynamic_heap.
+       (need_to_recreate_heap): Rename to using_dynamic_heap.
        (heap_index_in_executable): Obsolete variable removed.
        (data_section): New variable.
-       (data_start_va): Renamed to data_start.
+       (data_start_va): Rename to data_start.
        (data_start_file): Obsolete variable removed.
        (bss_section):
        (extra_bss_size):
        sections where data will be dumped.  Allows for static and global
        bss data to be in separate ranges.  No longer relies on knowledge
        of section names.
-       (copy_executable_and_dump_data_section): Renamed
-       copy_executable_and_dump_data.  Completely rewritten to copy
+       (copy_executable_and_dump_data_section):
+       Rename copy_executable_and_dump_data.  Completely rewritten to copy
        executable section by section, so that raw data areas can be
        expanded to hold dumped data as necessary.  Allows for bss data to
        be in same section as initialized data.  Reduces size of static
        Return zero in case of success, 1 or 2 otherwise.
        (get_clipboard_data): Only bail out if the null character is in
        the last 32-byte chunk of clipboard data.
-       (Fw16_set_clipboard_data): Make ok and put_status be unsigned.  If
-       they save binary data, print a message in the echo area saying the
+       (Fw16_set_clipboard_data): Make ok and put_status be unsigned.
+       If they save binary data, print a message in the echo area saying the
        text was not put into the clipboard.
 
        * msdos.c (IT_write_glyphs): Move constant expression out of the loop.
        based on VEC.
 
        * charset.c (Qunknown): New variable.
-       (init_charset_once): Intern and staticpro Qunknown.  Initialize
-       all elements of Vcharset_symbol_table to Qunknown.
+       (init_charset_once): Intern and staticpro Qunknown.
+       Initialize all elements of Vcharset_symbol_table to Qunknown.
        (find_charset_in_str): New arg MULTIBYTE.  If it is zero, check
        unibyte characters only.  For an invalid composition sequence, set
        CHARSETS[1] to 1.
        (RIGHT_WIN_PRESSED):
        (APPS_PRESSED): New console keyboard modifier flags.
 
-       * w32term.c (convert_to_key_event): Removed.
-       (is_dead_key): Copied to w32fns.c.
+       * w32term.c (convert_to_key_event): Remove.
+       (is_dead_key): Copy to w32fns.c.
        (w32_read_socket): Generate language_change_event.  Modify to work
        with keyboard handling changes in w32_wnd_proc.
 
        code.
        (is_dead_key): Copy from w32fns.c.
        (w32_kbd_patch_key): Comment attempt to improve handling of
-       dead-keys, and system bug relating to same on Windows NT.  Work
-       around the bug by calling ToUnicode and then converting to the
+       dead-keys, and system bug relating to same on Windows NT.
+       Work around the bug by calling ToUnicode and then converting to the
        correct codepage.
-       (map_virt_key): Removed obsolete variable.
+       (map_virt_key): Remove obsolete variable.
        (lispy_function_keys): Add extern.
        (key_event): Major rework of keyboard input handling: optionally
        recognize Windows keys and Apps key as modifiers; optionally treat
        for given key.
        (w32_get_modifiers): Returns modifier flags for
        non-keyboard input events.
-       (construct_console_modifiers): Renamed from construct_modifiers;
+       (construct_console_modifiers): Rename from construct_modifiers;
        recognize Windows and Apps keys as modifiers.
        (w32_get_key_modifiers): New function.  Returns modifier flags for
        keyboard input events.
 
 1998-11-10  Kenichi Handa  <handa@etl.go.jp>
 
-       * category.h (CATEGORY_SET): Adjusted for the change of
+       * category.h (CATEGORY_SET): Adjust for the change of
        cmpchar_component.
        (CATEGORY_SET): Likewise.
 
-       * charset.c (cmpchar_component): New arg NOERROR.  Check
-       composition char ID more strictly.
+       * charset.c (cmpchar_component): New arg NOERROR.
+       Check composition char ID more strictly.
        (Fcmpchar_component): Call cmpchar_component with NOERROR arg zero.
        (Fcmpchar_cmp_rule): If CHARACTER should be composed relatively,
        return 255.
        (insert_from_buffer_1): Likewise.
        (adjust_after_replace): Inhibit bytes combined across region
        boundary.  Update end_unchanged correctly.
-       (replace_range): Call CHECK_BYTE_COMBINING_FOR_INSERT.  Update
-       end_unchanged correctly.
+       (replace_range): Call CHECK_BYTE_COMBINING_FOR_INSERT.
+       Update end_unchanged correctly.
        (del_range_2): Inhibit bytes combined across region boundary.
        Update end_unchanged correctly.
 
 
 1998-10-27  Dave Love  <fx@gnu.org>
 
-       * fns.c (Fbase64_decode_region, Fbase64_encode_region): Fix
-       newline in doc string.
+       * fns.c (Fbase64_decode_region, Fbase64_encode_region):
+       Fix newline in doc string.
 
 1998-10-27  Kenichi Handa  <handa@etl.go.jp>
 
        * w32fns.c (Vx_pixel_size_width): New global variable.
        (unibyte_display_via_language_environment): New global variable.
        (x_set_font): Add support for setting fontsets.
-       (Fx_create_frame): Add check_w32().  Initialize fontsets.  Fix
-       font names to match xlfd-tight-regexp.
+       (Fx_create_frame): Add check_w32().  Initialize fontsets.
+       Fix font names to match xlfd-tight-regexp.
        (w32_load_font): Rewrite based on x_load_font.
-       (x_to_w32_charset, w32_to_x_charset): Add character sets.  Use
-       `iso8859-1' rather than `ansi'.
+       (x_to_w32_charset, w32_to_x_charset): Add character sets.
+       Use `iso8859-1' rather than `ansi'.
        (w32_to_x_font): Remove `-' from font name.  Remove the `-' off the
        end.  Move charset into `charset registry' field.
        (enum_font_cb2): Check charsets match.  Include width in font list.
        (w32_list_fonts): Rewrite based on x_list_fonts.
        Moved from w32term.c to have access to enumfont_t struct.
-       (Fx_list_fonts): w32 specific version eliminated.  Include
-       `x-list-fonts.c'.
-       (w32_get_font_info, w32_query_font, w32_find_ccl_program): New
-       functions for fontset support - adapted from x_ equivalents.
-       (syms_of_w32fns): New lisp variables initialized.  Function
-       pointers for fontset.c set up.
+       (Fx_list_fonts): w32 specific version eliminated.
+       Include `x-list-fonts.c'.
+       (w32_get_font_info, w32_query_font, w32_find_ccl_program):
+       New functions for fontset support - adapted from x_ equivalents.
+       (syms_of_w32fns): New lisp variables initialized.
+       Function pointers for fontset.c set up.
 
        * w32term.c: Include fontset.h.  Define codepage macros.
        Add ENCODE_BIG5 macro from coding.c.
        (w32_no_unicode_output): New variable.
-       (w32_codepage_for_charset, w32_use_unicode_for_codepage): New
-       functions.
+       (w32_codepage_for_charset, w32_use_unicode_for_codepage):
+       New functions.
        (BUILD_WCHAR_T, BYTE1, BYTE2): New macros.
        (dumpglyphs): Rewrite based on xterm.c equivalent.
        (x_new_font): Use functionality provided in fontset.c.
 
        * lisp.h (clear_string_char_byte_cache): Extern it.
 
-       * xselect.c (lisp_data_to_selection_data): Call
-       find_charset_in_str with CMPCHARP arg 0.
+       * xselect.c (lisp_data_to_selection_data):
+       Call find_charset_in_str with CMPCHARP arg 0.
        * w16select.c (Fw16_set_clipboard_data): Likewise.
        * w32select.c (Fw32_set_clipboard_data): Likewise.
 
 
        * coding.c (check_composing_code): Fix previous change.  Now it
        always returns 0 or -1.
-       (decode_coding_iso2022): Adjusted for the above change.
+       (decode_coding_iso2022): Adjust for the above change.
        (encode_coding_iso2022): When encoding the last block, flush out
        tailing garbage bytes.
        (setup_coding_system): Delete unnecessary code.
 
        * ccl.c (CCL_WRITE_CHAR): Don't use bcopy.
        (ccl_driver): If BUFFER-MAGNIFICATION of the CCL program is 0,
-       cause error if the program is going to output some bytes.  When
-       outputting a string to notify an error, check the case that
+       cause error if the program is going to output some bytes.
+       When outputting a string to notify an error, check the case that
        DST_BYTES is zero.
 
        * coding.h (CODING_FINISH_INTERRUPT): New macro.
        * w16select.c (Vnext_selection_coding_system): New variable.
        (syms_of_win16select): DEFVAR_LISP it.  No need to staticpro
        Vselection_coding_system.
-       (Fw16_set_clipboard_data): Always convert multibyte strings.  Use
-       Vnext_selection_coding_system if non-nil.
+       (Fw16_set_clipboard_data): Always convert multibyte strings.
+       Use Vnext_selection_coding_system if non-nil.
        (Fw16_get_clipboard_data): Always convert a string that includes
        non-ASCII characters.  Use Vnext_selection_coding_system if
        non-nil.
 1998-08-28  Kenichi Handa  <handa@etl.go.jp>
 
        * insdel.c (adjust_after_replace): Fix the code to record undo
-       information for the case that `before combining' happens.  Remove
-       text properties which are added to the new text by
+       information for the case that `before combining' happens.
+       Remove text properties which are added to the new text by
        offset_intervals.
 
        * coding.c (code_convert_region1): Remove all text properties of
index 70e31b50946fb71c10e923a75d74c4568542c207..36e145744b30c0a268fa215f32b052a477fea4df 100644 (file)
@@ -1,7 +1,7 @@
 ### @configure_input@
 
-# Copyright (C) 1985, 1987-1988, 1993-1995, 1999-2014 Free Software
-# Foundation, Inc.
+# Copyright (C) 1985, 1987-1988, 1993-1995, 1999-2014
+#   Free Software Foundation, Inc.
 
 # This file is part of GNU Emacs.
 
@@ -28,9 +28,10 @@ SHELL = @SHELL@
 # Here are the things that we expect ../configure to edit.
 # We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
 srcdir = @srcdir@
+top_srcdir = @top_srcdir@
 # MinGW CPPFLAGS may use this.
 abs_top_srcdir=@abs_top_srcdir@
-ntsource = $(srcdir)/../nt
+ntsource = $(top_srcdir)/nt
 VPATH = $(srcdir)
 CC = @CC@
 WINDRES = @WINDRES@
@@ -48,7 +49,7 @@ MKDIR_P = @MKDIR_P@
 # LIBS = @LIBS@
 LIBOBJS = @LIBOBJS@
 
-lispsource = $(srcdir)/../lisp
+lispsource = $(top_srcdir)/lisp
 lib = ../lib
 libsrc = ../lib-src
 etc = ../etc
@@ -77,6 +78,7 @@ C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
 C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@
 
 GNUSTEP_CFLAGS=@GNUSTEP_CFLAGS@
+PNG_CFLAGS=@PNG_CFLAGS@
 
 ## Define C_SWITCH_X_SITE to contain any special flags your compiler
 ## may need to deal with X Windows.  For instance, if you've defined
@@ -121,7 +123,7 @@ LIBS_SYSTEM=@LIBS_SYSTEM@
 ## -lm, or empty.
 LIB_MATH=@LIB_MATH@
 
-## -lpthreads, or empty.
+## -lpthread, or empty.
 LIB_PTHREAD=@LIB_PTHREAD@
 
 LIBIMAGE=@LIBTIFF@ @LIBJPEG@ @LIBPNG@ @LIBGIF@ @LIBXPM@
@@ -230,6 +232,9 @@ XRANDR_CFLAGS = @XRANDR_CFLAGS@
 XINERAMA_LIBS = @XINERAMA_LIBS@
 XINERAMA_CFLAGS = @XINERAMA_CFLAGS@
 
+XFIXES_LIBS = @XFIXES_LIBS@
+XFIXES_CFLAGS = @XFIXES_CFLAGS@
+
 ## widget.o if USE_X_TOOLKIT, otherwise empty.
 WIDGET_OBJ=@WIDGET_OBJ@
 
@@ -245,7 +250,7 @@ MSDOS_OBJ =
 MSDOS_X_OBJ =
 
 NS_OBJ=@NS_OBJ@
-## nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o macfont.o if HAVE_NS.
+## nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o ns_fontfile if HAVE_NS.
 NS_OBJC_OBJ=@NS_OBJC_OBJ@
 ## Only set if NS_IMPL_GNUSTEP.
 GNU_OBJC_CFLAGS=@GNU_OBJC_CFLAGS@
@@ -286,26 +291,39 @@ LIBSELINUX_LIBS = @LIBSELINUX_LIBS@
 LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@
 LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@
 
-LIB_PTHREAD_SIGMASK = @LIB_PTHREAD_SIGMASK@
-
 INTERVALS_H = dispextern.h intervals.h composite.h
 
 GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
 
 RUN_TEMACS = ./temacs
 
-## Invoke ../nt/addsection for MinGW, ":" elsewhere.
-TEMACS_POST_LINK = @TEMACS_POST_LINK@
-ADDSECTION = @ADDSECTION@
-EMACS_HEAPSIZE = @EMACS_HEAPSIZE@
-MINGW_TEMACS_POST_LINK = \
- mv temacs$(EXEEXT) temacs.tmp; \
- ../nt/addsection temacs.tmp temacs$(EXEEXT) EMHEAP $(EMACS_HEAPSIZE)
-
 UNEXEC_OBJ = @UNEXEC_OBJ@
 
 CANNOT_DUMP=@CANNOT_DUMP@
 
+# 'make' verbosity.
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 =
+
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 =
+
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 =
+
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+
 DEPDIR=deps
 ## -MMD -MF $(DEPDIR)/$*.d if AUTO_DEPEND; else empty.
 DEPFLAGS=@DEPFLAGS@
@@ -322,10 +340,11 @@ MKDEPDIR=@MKDEPDIR@
 ##
 ## FIXME? MYCPPFLAGS only referenced in etc/DEBUG.
 ALL_CFLAGS=-Demacs $(MYCPPFLAGS) -I. -I$(srcdir) \
-  -I$(lib) -I$(srcdir)/../lib \
+  -I$(lib) -I$(top_srcdir)/lib \
   $(C_SWITCH_MACHINE) $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \
   $(GNUSTEP_CFLAGS) $(CFLAGS_SOUND) $(RSVG_CFLAGS) $(IMAGEMAGICK_CFLAGS) \
-  $(LIBXML2_CFLAGS) $(DBUS_CFLAGS) $(XRANDR_CFLAGS) $(XINERAMA_CFLAGS) \
+  $(PNG_CFLAGS) $(LIBXML2_CFLAGS) $(DBUS_CFLAGS) \
+  $(XRANDR_CFLAGS) $(XINERAMA_CFLAGS) $(XFIXES_CFLAGS) \
   $(SETTINGS_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) \
   $(LIBOTF_CFLAGS) $(M17N_FLT_CFLAGS) $(DEPFLAGS) \
   $(LIBGNUTLS_CFLAGS) $(GFILENOTIFY_CFLAGS) \
@@ -335,10 +354,10 @@ ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS)
 .SUFFIXES: .m
 .c.o:
        @$(MKDEPDIR)
-       $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $(PROFILING_CFLAGS) $<
+       $(AM_V_CC)$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $(PROFILING_CFLAGS) $<
 .m.o:
        @$(MKDEPDIR)
-       $(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $(PROFILING_CFLAGS) $<
+       $(AM_V_CC)$(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $(PROFILING_CFLAGS) $<
 
 ## lastfile must follow all files whose initialized data areas should
 ## be dumped as pure by dump-emacs.
@@ -405,29 +424,33 @@ LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \
    $(LIBX_OTHER) $(LIBSOUND) \
    $(RSVG_LIBS) $(IMAGEMAGICK_LIBS) $(LIB_ACL) $(LIB_CLOCK_GETTIME) \
    $(LIB_EACCESS) $(LIB_FDATASYNC) $(LIB_TIMER_TIME) $(DBUS_LIBS) \
-   $(LIB_EXECINFO) $(XRANDR_LIBS) $(XINERAMA_LIBS) \
+   $(LIB_EXECINFO) $(XRANDR_LIBS) $(XINERAMA_LIBS) $(XFIXES_LIBS) \
    $(LIBXML2_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \
    $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) $(SETTINGS_LIBS) $(LIBSELINUX_LIBS) \
    $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \
-   $(LIBGNUTLS_LIBS) $(LIB_PTHREAD) $(LIB_PTHREAD_SIGMASK) \
+   $(LIBGNUTLS_LIBS) $(LIB_PTHREAD) \
    $(GFILENOTIFY_LIBS) $(LIB_MATH) $(LIBZ)
 
 all: emacs$(EXEEXT) $(OTHER_FILES)
 .PHONY: all
 
 $(leimdir)/leim-list.el: bootstrap-emacs$(EXEEXT)
-       cd ../leim && $(MAKE) $(MFLAGS) leim-list.el EMACS="$(bootstrap_exe)"
+       $(MAKE) -C ../leim leim-list.el EMACS="$(bootstrap_exe)"
 
+## FORCE it so that admin/unidata can decide whether these files
+## are up-to-date.  Although since charprop depends on bootstrap-emacs,
+## and emacs (which recreates bootstrap-emacs) depends on charprop,
+## in practice this rule was always run anyway.
 $(srcdir)/macuvs.h $(lispsource)/international/charprop.el: \
-  bootstrap-emacs$(EXEEXT)
-       cd ../admin/unidata && $(MAKE) $(MFLAGS) all EMACS="../$(bootstrap_exe)"
+  bootstrap-emacs$(EXEEXT) FORCE
+       $(MAKE) -C ../admin/unidata all EMACS="../$(bootstrap_exe)"
 
 ## The dumped Emacs is as functional and more efficient than
 ## bootstrap-emacs, so we replace the latter with the former.
 ## Strictly speaking, emacs does not depend directly on all of $lisp,
 ## since not all pieces are used on all platforms.  But DOC depends
 ## on all of $lisp, and emacs depends on DOC, so it is ok to use $lisp here.
-emacs$(EXEEXT): temacs$(EXEEXT) $(ADDSECTION) \
+emacs$(EXEEXT): temacs$(EXEEXT) \
                 $(etc)/DOC $(lisp) $(leimdir)/leim-list.el \
                 $(lispsource)/international/charprop.el
        if test "$(CANNOT_DUMP)" = "yes"; then \
@@ -436,7 +459,9 @@ emacs$(EXEEXT): temacs$(EXEEXT) $(ADDSECTION) \
        else \
          LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump || exit 1; \
          test "X$(PAXCTL)" = X || $(PAXCTL) -zex emacs$(EXEEXT); \
-         rm -f bootstrap-emacs$(EXEEXT); \
+         while test -f bootstrap-emacs$(EXEEXT); do \
+           rm -f bootstrap-emacs$(EXEEXT); \
+         done; \
          ln emacs$(EXEEXT) bootstrap-emacs$(EXEEXT); \
        fi
 
@@ -455,34 +480,37 @@ emacs$(EXEEXT): temacs$(EXEEXT) $(ADDSECTION) \
 ## in the contents of the DOC file.
 ##
 $(etc)/DOC: $(libsrc)/make-docfile$(EXEEXT) $(obj) $(lisp)
-       $(MKDIR_P) $(etc)
-       -rm -f $(etc)/DOC
-       $(libsrc)/make-docfile -d $(srcdir) $(SOME_MACHINE_OBJECTS) $(obj) > $(etc)/DOC
-       $(libsrc)/make-docfile -a $(etc)/DOC -d $(lispsource) `sed -n -e 's| \\\\||' -e 's|^[   ]*$$(lispsource)/||p' $(srcdir)/lisp.mk`
+       $(AM_V_GEN)$(MKDIR_P) $(etc)
+       -$(AM_V_at)rm -f $(etc)/DOC
+       $(AM_V_at)$(libsrc)/make-docfile -d $(srcdir) \
+         $(SOME_MACHINE_OBJECTS) $(obj) > $(etc)/DOC
+       $(AM_V_at)$(libsrc)/make-docfile -a $(etc)/DOC -d $(lispsource) \
+         `sed -n -e 's| \\\\||' -e 's|^[       ]*$$(lispsource)/||p' \
+            $(srcdir)/lisp.mk`
 
 $(libsrc)/make-docfile$(EXEEXT):
-       cd $(libsrc); $(MAKE) $(MFLAGS) make-docfile$(EXEEXT)
+       $(MAKE) -C $(libsrc) make-docfile$(EXEEXT)
 
 buildobj.h: Makefile
-       for i in $(ALLOBJS); do \
+       $(AM_V_GEN)for i in $(ALLOBJS); do \
          echo "$$i" | sed 's,.*/,,; s/\.obj$$/\.o/; s/^/"/; s/$$/",/' \
            || exit; \
        done >$@.tmp
-       mv $@.tmp $@
+       $(AM_V_at)mv $@.tmp $@
 
 globals.h: gl-stamp; @true
 
 GLOBAL_SOURCES = $(base_obj:.o=.c) $(NS_OBJC_OBJ:.o=.m)
 
 gl-stamp: $(libsrc)/make-docfile$(EXEEXT) $(GLOBAL_SOURCES)
-       $(libsrc)/make-docfile -d $(srcdir) -g $(obj) > gl.tmp
-       $(srcdir)/../build-aux/move-if-change gl.tmp globals.h
-       echo timestamp > $@
+       $(AM_V_GEN)$(libsrc)/make-docfile -d $(srcdir) -g $(obj) > gl.tmp
+       $(AM_V_at)$(top_srcdir)/build-aux/move-if-change gl.tmp globals.h
+       $(AM_V_at)echo timestamp > $@
 
 $(ALLOBJS): globals.h
 
 $(lib)/libgnu.a: $(config_h)
-       cd $(lib) && $(MAKE) libgnu.a
+       $(MAKE) -C $(lib) libgnu.a
 
 ## We have to create $(etc) here because init_cmdargs tests its
 ## existence when setting Vinstallation_directory (FIXME?).
@@ -490,10 +518,9 @@ $(lib)/libgnu.a: $(config_h)
 ## to start if Vinstallation_directory has the wrong value.
 temacs$(EXEEXT): $(LIBXMENU) $(ALLOBJS) \
                 $(lib)/libgnu.a $(EMACSRES)
-       $(CC) $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \
+       $(AM_V_CCLD)$(CC) $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \
          -o temacs $(ALLOBJS) $(lib)/libgnu.a $(W32_RES_LINK) $(LIBES)
        $(MKDIR_P) $(etc)
-       $(TEMACS_POST_LINK)
        test "$(CANNOT_DUMP)" = "yes" || \
          test "X$(PAXCTL)" = X || $(PAXCTL) -r temacs$(EXEEXT)
        test "$(CANNOT_DUMP)" = "yes" || test -z "$(SETFATTR)" || \
@@ -502,37 +529,40 @@ temacs$(EXEEXT): $(LIBXMENU) $(ALLOBJS) \
 ## The following oldxmenu-related rules are only (possibly) used if
 ## HAVE_X11 && !USE_GTK, but there is no harm in always defining them.
 $(lwlibdir)/liblw.a: $(config_h) globals.h lisp.h FORCE
-       cd $(lwlibdir) && \
-         $(MAKE) $(MFLAGS) CC='$(CC)' CFLAGS='$(CFLAGS)' MAKE='$(MAKE)' \
-           liblw.a
+       $(MAKE) -C $(lwlibdir) liblw.a
 $(oldXMenudir)/libXMenu11.a: FORCE
-       cd $(oldXMenudir) && \
-         $(MAKE) $(MFLAGS) CC='$(CC)' CFLAGS='$(CFLAGS)' MAKE='$(MAKE)' \
-           libXMenu11.a
+       $(MAKE) -C $(oldXMenudir) libXMenu11.a
 FORCE:
 .PHONY: FORCE
 
-../config.status: config.in epaths.in
-       @echo "The file ${?:.in=.h} needs to be set up from $?."
-       @echo "Please run the 'configure' script again."
-       exit 1
+ACLOCAL_INPUTS = $(top_srcdir)/configure.ac $(wildcard $(top_srcdir)/m4/*.m4)
+AUTOCONF_INPUTS = $(top_srcdir)/configure.ac $(top_srcdir)/aclocal.m4
+$(top_srcdir)/aclocal.m4: $(ACLOCAL_INPUTS)
+$(top_srcdir)/configure config.in: $(AUTOCONF_INPUTS)
+.PRECIOUS: ../config.status Makefile
+../config.status: $(top_srcdir)/configure $(top_srcdir)/lisp/version.el
+Makefile: ../config.status $(srcdir)/Makefile.in
+$(top_srcdir)/aclocal.m4 $(top_srcdir)/configure config.in ../config.status \
+  Makefile:
+       $(MAKE) -C .. am--refresh
 
 doc.o: buildobj.h
 
 emacs.res: $(ntsource)/emacs.rc \
           $(ntsource)/icons/emacs.ico \
           $(ntsource)/$(EMACS_MANIFEST)
-       $(WINDRES) -O COFF --include-dir=$(srcdir)/../nt \
+       $(WINDRES) -O COFF --include-dir=$(top_srcdir)/nt \
          -o $@ $(ntsource)/emacs.rc
 
+.PHONY: ns-app
 ns-app: emacs$(EXEEXT)
-       cd ../nextstep && $(MAKE) $(MFLAGS) all
+       $(MAKE) -C ../nextstep all
 
 .PHONY: mostlyclean clean bootstrap-clean distclean maintainer-clean
 .PHONY: versionclean extraclean
 
 mostlyclean:
-       rm -f temacs$(EXEEXT) core *.core \#* *.o libXMenu11.a liblw.a
+       rm -f temacs$(EXEEXT) core *.core \#* *.o
        rm -f ../etc/DOC
        rm -f bootstrap-emacs$(EXEEXT) emacs-$(version)$(EXEEXT)
        rm -f buildobj.h
@@ -585,10 +615,10 @@ TAGS: $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2) $(srcdir)/$(ctagsfiles3)
 ## Arrange to make tags tables for ../lisp and ../lwlib,
 ## which the above TAGS file for the C files includes by reference.
 ../lisp/TAGS:
-       cd ../lisp && $(MAKE) TAGS ETAGS="$(ETAGS)"
+       $(MAKE) -C ../lisp TAGS ETAGS="$(ETAGS)"
 
 $(lwlibdir)/TAGS:
-       cd $(lwlibdir) && $(MAKE) TAGS ETAGS="$(ETAGS)"
+       $(MAKE) -C $(lwlibdir) TAGS ETAGS="$(ETAGS)"
 
 tags: TAGS ../lisp/TAGS $(lwlibdir)/TAGS
 .PHONY: tags
@@ -601,47 +631,34 @@ tags: TAGS ../lisp/TAGS $(lwlibdir)/TAGS
 ## such as loaddefs.el or *.elc can typically be produced by any old
 ## Emacs executable, so we would like to avoid rebuilding them whenever
 ## we build a new Emacs executable.
+##
+## (In other words, changing a single file src/foo.c would force
+## dumping a new bootstrap-emacs, then re-byte-compiling all preloaded
+## elisp files, and only then dump the actual src/emacs, which is not
+## wrong, but is overkill in 99.99% of the cases.)
+##
 ## To solve the circularity, we use 2 different Emacs executables,
 ## "emacs" is the main target and "bootstrap-emacs" is the one used
 ## to build the *.elc and loaddefs.el files.
-## To solve the freshness issue, we used to use a third file "witness-emacs"
-## which was used to witness the fact that there is a bootstrap-emacs
-## executable, and then have dependencies on witness-emacs rather than
-## bootstrap-emacs, but that lead to problems in parallel builds (because
-## witness-emacs needed to be free from dependencies (to avoid rebuilding
-## it), so it was compiled in parallel, leading typically to having 2
-## processes dumping bootstrap-emacs at the same time).
-## So instead, we replace the witness-emacs dependencies by conditional
-## bootstrap-dependencies (via $(BOOTSTRAPEMACS)).  Of course, since we do
-## not want to rely on GNU Make features, we have to rely on an external
-## script to do the conditional part of the dependency
-## (i.e. see the $(SUBDIR) rule ../Makefile.in).
-
-.SUFFIXES: .elc .el
-
-## These suffix rules do not allow additional dependencies, sadly, so
-## instead of adding a $(BOOTSTRAPEMACS) dependency here, we add it
-## separately below.
-## With GNU Make, we would just say "%.el : %.elc $(BOOTSTRAPEMACS)"
-.el.elc:
-       @cd ../lisp; $(MAKE) $(MFLAGS) compile-onefile \
-                            THEFILE=$< EMACS="$(bootstrap_exe)"
-
-## Since the .el.elc rule cannot specify an extra dependency, we do it here.
-$(lisp): $(BOOTSTRAPEMACS)
+## To solve the freshness issue, in the past we tried various clever tricks,
+## but now that we require GNU make, we can simply specify
+## bootstrap-emacs$(EXEEXT) as an order-only prerequisite.
+
+%.elc: %.el | bootstrap-emacs$(EXEEXT)
+       @$(MAKE) -C ../lisp compile-onefile THEFILE=$< EMACS="$(bootstrap_exe)"
 
 ## VCSWITNESS points to the file that holds info about the current checkout.
 ## We use it as a heuristic to decide when to rebuild loaddefs.el.
 ## If empty it is ignored; the parent makefile can set it to some other value.
 VCSWITNESS =
 
-$(lispsource)/loaddefs.el: $(BOOTSTRAPEMACS) $(VCSWITNESS)
-       cd ../lisp; $(MAKE) $(MFLAGS) autoloads EMACS="$(bootstrap_exe)"
+$(lispsource)/loaddefs.el: $(VCSWITNESS) | bootstrap-emacs$(EXEEXT)
+       $(MAKE) -C ../lisp autoloads EMACS="$(bootstrap_exe)"
 
 ## Dump an Emacs executable named bootstrap-emacs containing the
 ## files from loadup.el in source form.
 bootstrap-emacs$(EXEEXT): temacs$(EXEEXT)
-       cd ../lisp; $(MAKE) $(MFLAGS) update-subdirs
+       $(MAKE) -C ../lisp update-subdirs
        if test "$(CANNOT_DUMP)" = "yes"; then \
          rm -f bootstrap-emacs$(EXEEXT); \
          ln temacs$(EXEEXT) bootstrap-emacs$(EXEEXT); \
@@ -651,7 +668,7 @@ bootstrap-emacs$(EXEEXT): temacs$(EXEEXT)
          mv -f emacs$(EXEEXT) bootstrap-emacs$(EXEEXT); \
        fi
        @: Compile some files earlier to speed up further compilation.
-       cd ../lisp; $(MAKE) $(MFLAGS) compile-first EMACS="$(bootstrap_exe)"
+       $(MAKE) -C ../lisp compile-first EMACS="$(bootstrap_exe)"
 
 ## Insert either autodeps.mk (if AUTO_DEPEND), else deps.mk.
 @deps_frag@
index a3f3f5478cb75f018c2c7537dd26feff3396806b..faad0b59c878e845dc764d19c55b422d0b062cbe 100644 (file)
@@ -47,6 +47,15 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #endif /* HAVE_WINDOW_SYSTEM */
 
 #include <verify.h>
+#include <execinfo.h>           /* For backtrace.  */
+
+#ifdef HAVE_LINUX_SYSINFO
+#include <sys/sysinfo.h>
+#endif
+
+#ifdef MSDOS
+#include "dosfns.h"            /* For dos_memory_info.  */
+#endif
 
 #if (defined ENABLE_CHECKING                   \
      && defined HAVE_VALGRIND_VALGRIND_H       \
@@ -71,7 +80,7 @@ static bool valgrind_p;
    marked objects.  */
 
 #if (defined SYSTEM_MALLOC || defined DOUG_LEA_MALLOC \
-     || defined GC_CHECK_MARKED_OBJECTS)
+     || defined HYBRID_MALLOC || defined GC_CHECK_MARKED_OBJECTS)
 #undef GC_MALLOC_CHECK
 #endif
 
@@ -192,6 +201,35 @@ static ptrdiff_t pure_bytes_used_non_lisp;
 
 const char *pending_malloc_warning;
 
+#if 0 /* Normally, pointer sanity only on request... */
+#ifdef ENABLE_CHECKING
+#define SUSPICIOUS_OBJECT_CHECKING 1
+#endif
+#endif
+
+/* ... but unconditionally use SUSPICIOUS_OBJECT_CHECKING while the GC
+   bug is unresolved.  */
+#define SUSPICIOUS_OBJECT_CHECKING 1
+
+#ifdef SUSPICIOUS_OBJECT_CHECKING
+struct suspicious_free_record
+{
+  void *suspicious_object;
+  void *backtrace[128];
+};
+static void *suspicious_objects[32];
+static int suspicious_object_index;
+struct suspicious_free_record suspicious_free_history[64] EXTERNALLY_VISIBLE;
+static int suspicious_free_history_index;
+/* Find the first currently-monitored suspicious pointer in range
+   [begin,end) or NULL if no such pointer exists.  */
+static void *find_suspicious_object_in_range (void *begin, void *end);
+static void detect_suspicious_free (void *ptr);
+#else
+# define find_suspicious_object_in_range(begin, end) NULL
+# define detect_suspicious_free(ptr) (void)
+#endif
+
 /* Maximum amount of C stack to save when a GC happens.  */
 
 #ifndef MAX_SAVE_STACK
@@ -247,7 +285,7 @@ static void gc_sweep (void);
 static Lisp_Object make_pure_vector (ptrdiff_t);
 static void mark_buffer (struct buffer *);
 
-#if !defined REL_ALLOC || defined SYSTEM_MALLOC
+#if !defined REL_ALLOC || defined SYSTEM_MALLOC || defined HYBRID_MALLOC
 static void refill_memory_reserve (void);
 #endif
 static void compact_small_strings (void);
@@ -403,6 +441,23 @@ XFLOAT_INIT (Lisp_Object f, double n)
   XFLOAT (f)->u.data = n;
 }
 
+static bool
+pointers_fit_in_lispobj_p (void)
+{
+  return (UINTPTR_MAX <= VAL_MAX) || USE_LSB_TAG;
+}
+
+static bool
+mmap_lisp_allowed_p (void)
+{
+  /* If we can't store all memory addresses in our lisp objects, it's
+     risky to let the heap use mmap and give us addresses from all
+     over our address space.  We also can't use mmap for lisp objects
+     if we might dump: unexec doesn't preserve the contents of mmapped
+     regions.  */
+  return pointers_fit_in_lispobj_p () && !might_dump;
+}
+
 \f
 /************************************************************************
                                Malloc
@@ -959,10 +1014,17 @@ lisp_free (void *block)
    clang 3.3 anyway.  */
 
 #if ! ADDRESS_SANITIZER
-# if !defined SYSTEM_MALLOC && !defined DOUG_LEA_MALLOC
+# if !defined SYSTEM_MALLOC && !defined DOUG_LEA_MALLOC && !defined HYBRID_MALLOC
 #  define USE_ALIGNED_ALLOC 1
 /* Defined in gmalloc.c.  */
 void *aligned_alloc (size_t, size_t);
+# elif defined HYBRID_MALLOC
+#  if defined ALIGNED_ALLOC || defined HAVE_POSIX_MEMALIGN
+#   define USE_ALIGNED_ALLOC 1
+#   define aligned_alloc hybrid_aligned_alloc
+/* Defined in gmalloc.c.  */
+void *aligned_alloc (size_t, size_t);
+#  endif
 # elif defined HAVE_ALIGNED_ALLOC
 #  define USE_ALIGNED_ALLOC 1
 # elif defined HAVE_POSIX_MEMALIGN
@@ -1073,10 +1135,8 @@ lisp_align_malloc (size_t nbytes, enum mem_type type)
       intptr_t aligned; /* int gets warning casting to 64-bit pointer.  */
 
 #ifdef DOUG_LEA_MALLOC
-      /* Prevent mmap'ing the chunk.  Lisp data may not be mmap'ed
-        because mapped region contents are not preserved in
-        a dumped Emacs.  */
-      mallopt (M_MMAP_MAX, 0);
+      if (!mmap_lisp_allowed_p ())
+        mallopt (M_MMAP_MAX, 0);
 #endif
 
 #ifdef USE_ALIGNED_ALLOC
@@ -1097,8 +1157,8 @@ lisp_align_malloc (size_t nbytes, enum mem_type type)
        ((void **) abase)[-1] = base;
 
 #ifdef DOUG_LEA_MALLOC
-      /* Back to a reasonable maximum of mmap'ed areas.  */
-      mallopt (M_MMAP_MAX, MMAP_MAX_AREAS);
+      if (!mmap_lisp_allowed_p ())
+          mallopt (M_MMAP_MAX, MMAP_MAX_AREAS);
 #endif
 
 #if ! USE_LSB_TAG
@@ -1733,23 +1793,15 @@ allocate_string_data (struct Lisp_String *s,
       size_t size = offsetof (struct sblock, data) + needed;
 
 #ifdef DOUG_LEA_MALLOC
-      /* Prevent mmap'ing the chunk.  Lisp data may not be mmap'ed
-        because mapped region contents are not preserved in
-        a dumped Emacs.
-
-         In case you think of allowing it in a dumped Emacs at the
-         cost of not being able to re-dump, there's another reason:
-         mmap'ed data typically have an address towards the top of the
-         address space, which won't fit into an EMACS_INT (at least on
-         32-bit systems with the current tagging scheme).  --fx  */
-      mallopt (M_MMAP_MAX, 0);
+      if (!mmap_lisp_allowed_p ())
+        mallopt (M_MMAP_MAX, 0);
 #endif
 
       b = lisp_malloc (size + GC_STRING_EXTRA, MEM_TYPE_NON_LISP);
 
 #ifdef DOUG_LEA_MALLOC
-      /* Back to a reasonable maximum of mmap'ed areas.  */
-      mallopt (M_MMAP_MAX, MMAP_MAX_AREAS);
+      if (!mmap_lisp_allowed_p ())
+        mallopt (M_MMAP_MAX, MMAP_MAX_AREAS);
 #endif
 
       b->next_free = b->data;
@@ -1810,6 +1862,7 @@ allocate_string_data (struct Lisp_String *s,
 
 /* Sweep and compact strings.  */
 
+NO_INLINE /* For better stack traces */
 static void
 sweep_strings (void)
 {
@@ -2093,7 +2146,7 @@ bool_vector_fill (Lisp_Object a, Lisp_Object init)
       unsigned char *data = bool_vector_uchar_data (a);
       int pattern = NILP (init) ? 0 : (1 << BOOL_VECTOR_BITS_PER_CHAR) - 1;
       ptrdiff_t nbytes = bool_vector_bytes (nbits);
-      int last_mask = ~ (~0 << ((nbits - 1) % BOOL_VECTOR_BITS_PER_CHAR + 1));
+      int last_mask = ~ (~0u << ((nbits - 1) % BOOL_VECTOR_BITS_PER_CHAR + 1));
       memset (data, pattern, nbytes - 1);
       data[nbytes - 1] = pattern & last_mask;
     }
@@ -2136,6 +2189,21 @@ LENGTH must be a number.  INIT matters only in whether it is t or nil.  */)
   return bool_vector_fill (val, init);
 }
 
+DEFUN ("bool-vector", Fbool_vector, Sbool_vector, 0, MANY, 0,
+       doc: /* Return a new bool-vector with specified arguments as elements.
+Any number of arguments, even zero arguments, are allowed.
+usage: (bool-vector &rest OBJECTS)  */)
+  (ptrdiff_t nargs, Lisp_Object *args)
+{
+  ptrdiff_t i;
+  Lisp_Object vector;
+
+  vector = make_uninit_bool_vector (nargs);
+  for (i = 0; i < nargs; i++)
+    bool_vector_set (vector, i, !NILP (args[i]));
+
+  return vector;
+}
 
 /* Make a string from NBYTES bytes at CONTENTS, and compute the number
    of characters from the contents.  This string may be unibyte or
@@ -2158,7 +2226,6 @@ make_string (const char *contents, ptrdiff_t nbytes)
   return val;
 }
 
-
 /* Make an unibyte string from LENGTH bytes at CONTENTS.  */
 
 Lisp_Object
@@ -2294,21 +2361,21 @@ make_formatted_string (char *buf, const char *format, ...)
 #define FLOAT_BLOCK_SIZE                                       \
   (((BLOCK_BYTES - sizeof (struct float_block *)               \
      /* The compiler might add padding at the end.  */         \
-     - (sizeof (struct Lisp_Float) - sizeof (int))) * CHAR_BIT) \
+     - (sizeof (struct Lisp_Float) - sizeof (bits_word))) * CHAR_BIT) \
    / (sizeof (struct Lisp_Float) * CHAR_BIT + 1))
 
 #define GETMARKBIT(block,n)                            \
-  (((block)->gcmarkbits[(n) / (sizeof (int) * CHAR_BIT)]       \
-    >> ((n) % (sizeof (int) * CHAR_BIT)))              \
+  (((block)->gcmarkbits[(n) / BITS_PER_BITS_WORD]      \
+    >> ((n) % BITS_PER_BITS_WORD))                     \
    & 1)
 
 #define SETMARKBIT(block,n)                            \
-  (block)->gcmarkbits[(n) / (sizeof (int) * CHAR_BIT)] \
-  |= 1 << ((n) % (sizeof (int) * CHAR_BIT))
+  ((block)->gcmarkbits[(n) / BITS_PER_BITS_WORD]       \
+   |= (bits_word) 1 << ((n) % BITS_PER_BITS_WORD))
 
 #define UNSETMARKBIT(block,n)                          \
-  (block)->gcmarkbits[(n) / (sizeof (int) * CHAR_BIT)] \
-  &= ~(1 << ((n) % (sizeof (int) * CHAR_BIT)))
+  ((block)->gcmarkbits[(n) / BITS_PER_BITS_WORD]       \
+   &= ~((bits_word) 1 << ((n) % BITS_PER_BITS_WORD)))
 
 #define FLOAT_BLOCK(fptr) \
   ((struct float_block *) (((uintptr_t) (fptr)) & ~(BLOCK_ALIGN - 1)))
@@ -2320,7 +2387,7 @@ struct float_block
 {
   /* Place `floats' at the beginning, to ease up FLOAT_INDEX's job.  */
   struct Lisp_Float floats[FLOAT_BLOCK_SIZE];
-  int gcmarkbits[1 + FLOAT_BLOCK_SIZE / (sizeof (int) * CHAR_BIT)];
+  bits_word gcmarkbits[1 + FLOAT_BLOCK_SIZE / BITS_PER_BITS_WORD];
   struct float_block *next;
 };
 
@@ -2401,7 +2468,7 @@ make_float (double float_value)
 #define CONS_BLOCK_SIZE                                                \
   (((BLOCK_BYTES - sizeof (struct cons_block *)                        \
      /* The compiler might add padding at the end.  */         \
-     - (sizeof (struct Lisp_Cons) - sizeof (int))) * CHAR_BIT) \
+     - (sizeof (struct Lisp_Cons) - sizeof (bits_word))) * CHAR_BIT)   \
    / (sizeof (struct Lisp_Cons) * CHAR_BIT + 1))
 
 #define CONS_BLOCK(fptr) \
@@ -2414,7 +2481,7 @@ struct cons_block
 {
   /* Place `conses' at the beginning, to ease up CONS_INDEX's job.  */
   struct Lisp_Cons conses[CONS_BLOCK_SIZE];
-  int gcmarkbits[1 + CONS_BLOCK_SIZE / (sizeof (int) * CHAR_BIT)];
+  bits_word gcmarkbits[1 + CONS_BLOCK_SIZE / BITS_PER_BITS_WORD];
   struct cons_block *next;
 };
 
@@ -2550,29 +2617,28 @@ list5 (Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, Lisp_Object arg4, L
 Lisp_Object
 listn (enum constype type, ptrdiff_t count, Lisp_Object arg, ...)
 {
-  va_list ap;
-  ptrdiff_t i;
-  Lisp_Object val, *objp;
+  Lisp_Object (*cons) (Lisp_Object, Lisp_Object);
+  switch (type)
+    {
+    case CONSTYPE_PURE: cons = pure_cons; break;
+    case CONSTYPE_HEAP: cons = Fcons; break;
+    default: emacs_abort ();
+    }
 
-  /* Change to SAFE_ALLOCA if you hit this eassert.  */
-  eassert (count <= MAX_ALLOCA / word_size);
+  eassume (0 < count);
+  Lisp_Object val = cons (arg, Qnil);
+  Lisp_Object tail = val;
 
-  objp = alloca (count * word_size);
-  objp[0] = arg;
+  va_list ap;
   va_start (ap, arg);
-  for (i = 1; i < count; i++)
-    objp[i] = va_arg (ap, Lisp_Object);
-  va_end (ap);
-
-  for (val = Qnil, i = count - 1; i >= 0; i--)
+  for (ptrdiff_t i = 1; i < count; i++)
     {
-      if (type == CONSTYPE_PURE)
-       val = pure_cons (objp[i], val);
-      else if (type == CONSTYPE_HEAP)
-       val = Fcons (objp[i], val);
-      else
-       emacs_abort ();
+      Lisp_Object elem = cons (va_arg (ap, Lisp_Object), Qnil);
+      XSETCDR (tail, elem);
+      tail = elem;
     }
+  va_end (ap);
+
   return val;
 }
 
@@ -2651,20 +2717,16 @@ DEFUN ("make-list", Fmake_list, Smake_list, 2, 2, 0,
    pointer cannot be tagged, represent it with a Lisp 0.
    Usually you don't want to touch this.  */
 
-enum { TAGGABLE_NULL = (DATA_SEG_BITS & ~VALMASK) == 0 };
-
 static struct Lisp_Vector *
 next_vector (struct Lisp_Vector *v)
 {
-  if (! TAGGABLE_NULL && EQ (v->contents[0], make_number (0)))
-    return 0;
   return XUNTAG (v->contents[0], 0);
 }
 
 static void
 set_next_vector (struct Lisp_Vector *v, struct Lisp_Vector *p)
 {
-  v->contents[0] = TAGGABLE_NULL || p ? make_lisp_ptr (p, 0) : make_number (0);
+  v->contents[0] = make_lisp_ptr (p, 0);
 }
 
 /* This value is balanced well enough to avoid too much internal overhead
@@ -2920,6 +2982,7 @@ vector_nbytes (struct Lisp_Vector *v)
 static void
 cleanup_vector (struct Lisp_Vector *vector)
 {
+  detect_suspicious_free (vector);
   if (PSEUDOVECTOR_TYPEP (&vector->header, PVEC_FONT)
       && ((vector->header.size & PSEUDOVECTOR_SIZE_MASK)
          == FONT_OBJECT_MAX))
@@ -2939,6 +3002,7 @@ cleanup_vector (struct Lisp_Vector *vector)
 
 /* Reclaim space used by unmarked vectors.  */
 
+NO_INLINE /* For better stack traces */
 static void
 sweep_vectors (void)
 {
@@ -2993,7 +3057,7 @@ sweep_vectors (void)
 
              if (vector == (struct Lisp_Vector *) block->data
                  && !VECTOR_IN_BLOCK (next, block))
-               /* This block should be freed because all of it's
+               /* This block should be freed because all of its
                   space was coalesced into the only free vector.  */
                free_this_block = 1;
              else
@@ -3063,10 +3127,8 @@ allocate_vectorlike (ptrdiff_t len)
       size_t nbytes = header_size + len * word_size;
 
 #ifdef DOUG_LEA_MALLOC
-      /* Prevent mmap'ing the chunk.  Lisp data may not be mmap'ed
-        because mapped region contents are not preserved in
-        a dumped Emacs.  */
-      mallopt (M_MMAP_MAX, 0);
+      if (!mmap_lisp_allowed_p ())
+        mallopt (M_MMAP_MAX, 0);
 #endif
 
       if (nbytes <= VBLOCK_BYTES_MAX)
@@ -3083,10 +3145,13 @@ allocate_vectorlike (ptrdiff_t len)
        }
 
 #ifdef DOUG_LEA_MALLOC
-      /* Back to a reasonable maximum of mmap'ed areas.  */
-      mallopt (M_MMAP_MAX, MMAP_MAX_AREAS);
+      if (!mmap_lisp_allowed_p ())
+        mallopt (M_MMAP_MAX, MMAP_MAX_AREAS);
 #endif
 
+      if (find_suspicious_object_in_range (p, (char *) p + nbytes))
+        emacs_abort ();
+
       consing_since_gc += nbytes;
       vector_cells_consed += len;
     }
@@ -3222,7 +3287,6 @@ See also the function `vector'.  */)
   return vector;
 }
 
-
 DEFUN ("vector", Fvector, Svector, 0, MANY, 0,
        doc: /* Return a newly created vector with specified arguments as elements.
 Any number of arguments, even zero arguments, are allowed.
@@ -3741,7 +3805,7 @@ memory_full (size_t nbytes)
       memory_full_cons_threshold = sizeof (struct cons_block);
 
       /* The first time we get here, free the spare memory.  */
-      for (i = 0; i < sizeof (spare_memory) / sizeof (char *); i++)
+      for (i = 0; i < ARRAYELTS (spare_memory); i++)
        if (spare_memory[i])
          {
            if (i == 0)
@@ -3769,7 +3833,7 @@ memory_full (size_t nbytes)
 void
 refill_memory_reserve (void)
 {
-#ifndef SYSTEM_MALLOC
+#if !defined SYSTEM_MALLOC && !defined HYBRID_MALLOC
   if (spare_memory[0] == 0)
     spare_memory[0] = malloc (SPARE_MEMORY);
   if (spare_memory[1] == 0)
@@ -4502,6 +4566,15 @@ mark_maybe_object (Lisp_Object obj)
     }
 }
 
+/* Return true if P can point to Lisp data, and false otherwise.
+   USE_LSB_TAG needs Lisp data to be aligned on multiples of GCALIGNMENT.
+   Otherwise, assume that Lisp data is aligned on even addresses.  */
+
+static bool
+maybe_lisp_pointer (void *p)
+{
+  return !((intptr_t) p % (USE_LSB_TAG ? GCALIGNMENT : 2));
+}
 
 /* If P points to Lisp data, mark that as live if it isn't already
    marked.  */
@@ -4516,10 +4589,7 @@ mark_maybe_pointer (void *p)
     VALGRIND_MAKE_MEM_DEFINED (&p, sizeof (p));
 #endif
 
-  /* Quickly rule out some values which can't point to Lisp data.
-     USE_LSB_TAG needs Lisp data to be aligned on multiples of GCALIGNMENT.
-     Otherwise, assume that Lisp data is aligned on even addresses.  */
-  if ((intptr_t) p % (USE_LSB_TAG ? GCALIGNMENT : 2))
+  if (!maybe_lisp_pointer (p))
     return;
 
   m = mem_find (p);
@@ -4831,61 +4901,8 @@ dump_zombies (void)
    from the stack start.  */
 
 static void
-mark_stack (void)
+mark_stack (void *end)
 {
-  void *end;
-
-#ifdef HAVE___BUILTIN_UNWIND_INIT
-  /* Force callee-saved registers and register windows onto the stack.
-     This is the preferred method if available, obviating the need for
-     machine dependent methods.  */
-  __builtin_unwind_init ();
-  end = &end;
-#else /* not HAVE___BUILTIN_UNWIND_INIT */
-#ifndef GC_SAVE_REGISTERS_ON_STACK
-  /* jmp_buf may not be aligned enough on darwin-ppc64 */
-  union aligned_jmpbuf {
-    Lisp_Object o;
-    sys_jmp_buf j;
-  } j;
-  volatile bool stack_grows_down_p = (char *) &j > (char *) stack_base;
-#endif
-  /* This trick flushes the register windows so that all the state of
-     the process is contained in the stack.  */
-  /* Fixme: Code in the Boehm GC suggests flushing (with `flushrs') is
-     needed on ia64 too.  See mach_dep.c, where it also says inline
-     assembler doesn't work with relevant proprietary compilers.  */
-#ifdef __sparc__
-#if defined (__sparc64__) && defined (__FreeBSD__)
-  /* FreeBSD does not have a ta 3 handler.  */
-  asm ("flushw");
-#else
-  asm ("ta 3");
-#endif
-#endif
-
-  /* Save registers that we need to see on the stack.  We need to see
-     registers used to hold register variables and registers used to
-     pass parameters.  */
-#ifdef GC_SAVE_REGISTERS_ON_STACK
-  GC_SAVE_REGISTERS_ON_STACK (end);
-#else /* not GC_SAVE_REGISTERS_ON_STACK */
-
-#ifndef GC_SETJMP_WORKS  /* If it hasn't been checked yet that
-                           setjmp will definitely work, test it
-                           and print a message with the result
-                           of the test.  */
-  if (!setjmp_tested_p)
-    {
-      setjmp_tested_p = 1;
-      test_setjmp ();
-    }
-#endif /* GC_SETJMP_WORKS */
-
-  sys_setjmp (j.j);
-  end = stack_grows_down_p ? (char *) &j + sizeof j : (char *) &j;
-#endif /* not GC_SAVE_REGISTERS_ON_STACK */
-#endif /* not HAVE___BUILTIN_UNWIND_INIT */
 
   /* This assumes that the stack is a contiguous region in memory.  If
      that's not the case, something has to be done here to iterate
@@ -5015,9 +5032,34 @@ valid_lisp_object_p (Lisp_Object obj)
 #endif
 }
 
+/* If GC_MARK_STACK, return 1 if STR is a relocatable data of Lisp_String
+   (i.e. there is a non-pure Lisp_Object X so that SDATA (X) == STR) and 0
+   if not.  Otherwise we can't rely on valid_lisp_object_p and return -1.
+   This function is slow and should be used for debugging purposes.  */
 
+int
+relocatable_string_data_p (const char *str)
+{
+  if (PURE_POINTER_P (str))
+    return 0;
+#if GC_MARK_STACK
+  if (str)
+    {
+      struct sdata *sdata
+       = (struct sdata *) (str - offsetof (struct sdata, data));
+
+      if (valid_pointer_p (sdata)
+         && valid_pointer_p (sdata->string)
+         && maybe_lisp_pointer (sdata->string))
+       return (valid_lisp_object_p
+               (make_lisp_ptr (sdata->string, Lisp_String))
+               && (const char *) sdata->string->data == str);
+    }
+  return 0;
+#endif /* GC_MARK_STACK */
+  return -1;
+}
 
-\f
 /***********************************************************************
                       Pure Storage Management
  ***********************************************************************/
@@ -5493,22 +5535,15 @@ mark_pinned_symbols (void)
     }
 }
 
-DEFUN ("garbage-collect", Fgarbage_collect, Sgarbage_collect, 0, 0, "",
-       doc: /* Reclaim storage for Lisp objects no longer needed.
-Garbage collection happens automatically if you cons more than
-`gc-cons-threshold' bytes of Lisp data since previous garbage collection.
-`garbage-collect' normally returns a list with info on amount of space in use,
-where each entry has the form (NAME SIZE USED FREE), where:
-- NAME is a symbol describing the kind of objects this entry represents,
-- SIZE is the number of bytes used by each one,
-- USED is the number of those objects that were found live in the heap,
-- FREE is the number of those objects that are not live but that Emacs
-  keeps around for future allocations (maybe because it does not know how
-  to return them to the OS).
-However, if there was overflow in pure space, `garbage-collect'
-returns nil, because real GC can't be done.
-See Info node `(elisp)Garbage Collection'.  */)
-  (void)
+/* Subroutine of Fgarbage_collect that does most of the work.  It is a
+   separate function so that we could limit mark_stack in searching
+   the stack frames below this function, thus avoiding the rare cases
+   where mark_stack finds values that look like live Lisp objects on
+   portions of stack that couldn't possibly contain such live objects.
+   For more details of this, see the discussion at
+   http://lists.gnu.org/archive/html/emacs-devel/2014-05/msg00270.html.  */
+static Lisp_Object
+garbage_collect_1 (void *end)
 {
   struct buffer *nextb;
   char stack_top_variable;
@@ -5606,7 +5641,7 @@ See Info node `(elisp)Garbage Collection'.  */)
 
 #if (GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS \
      || GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS)
-  mark_stack ();
+  mark_stack (end);
 #else
   {
     register struct gcpro *tail;
@@ -5629,7 +5664,7 @@ See Info node `(elisp)Garbage Collection'.  */)
 #endif
 
 #if GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES
-  mark_stack ();
+  mark_stack (end);
 #endif
 
   /* Everything is now marked, except for the data in font caches
@@ -5789,6 +5824,87 @@ See Info node `(elisp)Garbage Collection'.  */)
   return retval;
 }
 
+DEFUN ("garbage-collect", Fgarbage_collect, Sgarbage_collect, 0, 0, "",
+       doc: /* Reclaim storage for Lisp objects no longer needed.
+Garbage collection happens automatically if you cons more than
+`gc-cons-threshold' bytes of Lisp data since previous garbage collection.
+`garbage-collect' normally returns a list with info on amount of space in use,
+where each entry has the form (NAME SIZE USED FREE), where:
+- NAME is a symbol describing the kind of objects this entry represents,
+- SIZE is the number of bytes used by each one,
+- USED is the number of those objects that were found live in the heap,
+- FREE is the number of those objects that are not live but that Emacs
+  keeps around for future allocations (maybe because it does not know how
+  to return them to the OS).
+However, if there was overflow in pure space, `garbage-collect'
+returns nil, because real GC can't be done.
+See Info node `(elisp)Garbage Collection'.  */)
+  (void)
+{
+#if (GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS             \
+     || GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS    \
+     || GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES)
+  void *end;
+
+#ifdef HAVE___BUILTIN_UNWIND_INIT
+  /* Force callee-saved registers and register windows onto the stack.
+     This is the preferred method if available, obviating the need for
+     machine dependent methods.  */
+  __builtin_unwind_init ();
+  end = &end;
+#else /* not HAVE___BUILTIN_UNWIND_INIT */
+#ifndef GC_SAVE_REGISTERS_ON_STACK
+  /* jmp_buf may not be aligned enough on darwin-ppc64 */
+  union aligned_jmpbuf {
+    Lisp_Object o;
+    sys_jmp_buf j;
+  } j;
+  volatile bool stack_grows_down_p = (char *) &j > (char *) stack_base;
+#endif
+  /* This trick flushes the register windows so that all the state of
+     the process is contained in the stack.  */
+  /* Fixme: Code in the Boehm GC suggests flushing (with `flushrs') is
+     needed on ia64 too.  See mach_dep.c, where it also says inline
+     assembler doesn't work with relevant proprietary compilers.  */
+#ifdef __sparc__
+#if defined (__sparc64__) && defined (__FreeBSD__)
+  /* FreeBSD does not have a ta 3 handler.  */
+  asm ("flushw");
+#else
+  asm ("ta 3");
+#endif
+#endif
+
+  /* Save registers that we need to see on the stack.  We need to see
+     registers used to hold register variables and registers used to
+     pass parameters.  */
+#ifdef GC_SAVE_REGISTERS_ON_STACK
+  GC_SAVE_REGISTERS_ON_STACK (end);
+#else /* not GC_SAVE_REGISTERS_ON_STACK */
+
+#ifndef GC_SETJMP_WORKS  /* If it hasn't been checked yet that
+                           setjmp will definitely work, test it
+                           and print a message with the result
+                           of the test.  */
+  if (!setjmp_tested_p)
+    {
+      setjmp_tested_p = 1;
+      test_setjmp ();
+    }
+#endif /* GC_SETJMP_WORKS */
+
+  sys_setjmp (j.j);
+  end = stack_grows_down_p ? (char *) &j + sizeof j : (char *) &j;
+#endif /* not GC_SAVE_REGISTERS_ON_STACK */
+#endif /* not HAVE___BUILTIN_UNWIND_INIT */
+  return garbage_collect_1 (end);
+#elif (GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE)
+  /* Old GCPROs-based method without stack marking.  */
+  return garbage_collect_1 (NULL);
+#else
+  emacs_abort ();
+#endif /* GC_MARK_STACK */
+}
 
 /* Mark Lisp objects in glyph matrix MATRIX.  Currently the
    only interesting objects referenced from glyphs are strings.  */
@@ -5854,14 +5970,15 @@ mark_vectorlike (struct Lisp_Vector *ptr)
    symbols.  */
 
 static void
-mark_char_table (struct Lisp_Vector *ptr)
+mark_char_table (struct Lisp_Vector *ptr, enum pvec_type pvectype)
 {
   int size = ptr->header.size & PSEUDOVECTOR_SIZE_MASK;
-  int i;
+  /* Consult the Lisp_Sub_Char_Table layout before changing this.  */
+  int i, idx = (pvectype == PVEC_SUB_CHAR_TABLE ? SUB_CHAR_TABLE_OFFSET : 0);
 
   eassert (!VECTOR_MARKED_P (ptr));
   VECTOR_MARK (ptr);
-  for (i = 0; i < size; i++)
+  for (i = idx; i < size; i++)
     {
       Lisp_Object val = ptr->contents[i];
 
@@ -5870,13 +5987,26 @@ mark_char_table (struct Lisp_Vector *ptr)
       if (SUB_CHAR_TABLE_P (val))
        {
          if (! VECTOR_MARKED_P (XVECTOR (val)))
-           mark_char_table (XVECTOR (val));
+           mark_char_table (XVECTOR (val), PVEC_SUB_CHAR_TABLE);
        }
       else
        mark_object (val);
     }
 }
 
+NO_INLINE /* To reduce stack depth in mark_object.  */
+static Lisp_Object
+mark_compiled (struct Lisp_Vector *ptr)
+{
+  int i, size = ptr->header.size & PSEUDOVECTOR_SIZE_MASK;
+
+  VECTOR_MARK (ptr);
+  for (i = 0; i < size; i++)
+    if (i != COMPILED_CONSTANTS)
+      mark_object (ptr->contents[i]);
+  return size > COMPILED_CONSTANTS ? ptr->contents[COMPILED_CONSTANTS] : Qnil;
+}
+
 /* Mark the chain of overlays starting at PTR.  */
 
 static void
@@ -5885,8 +6015,9 @@ mark_overlay (struct Lisp_Overlay *ptr)
   for (; ptr && !ptr->gcmarkbit; ptr = ptr->next)
     {
       ptr->gcmarkbit = 1;
-      mark_object (ptr->start);
-      mark_object (ptr->end);
+      /* These two are always markers and can be marked fast.  */
+      XMARKER (ptr->start)->gcmarkbit = 1;
+      XMARKER (ptr->end)->gcmarkbit = 1;
       mark_object (ptr->plist);
     }
 }
@@ -5917,6 +6048,7 @@ mark_buffer (struct buffer *buffer)
 
 /* Mark Lisp faces in the face cache C.  */
 
+NO_INLINE /* To reduce stack depth in mark_object.  */
 static void
 mark_face_cache (struct face_cache *c)
 {
@@ -5939,6 +6071,48 @@ mark_face_cache (struct face_cache *c)
     }
 }
 
+NO_INLINE /* To reduce stack depth in mark_object.  */
+static void
+mark_localized_symbol (struct Lisp_Symbol *ptr)
+{
+  struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (ptr);
+  Lisp_Object where = blv->where;
+  /* If the value is set up for a killed buffer or deleted
+     frame, restore its global binding.  If the value is
+     forwarded to a C variable, either it's not a Lisp_Object
+     var, or it's staticpro'd already.  */
+  if ((BUFFERP (where) && !BUFFER_LIVE_P (XBUFFER (where)))
+      || (FRAMEP (where) && !FRAME_LIVE_P (XFRAME (where))))
+    swap_in_global_binding (ptr);
+  mark_object (blv->where);
+  mark_object (blv->valcell);
+  mark_object (blv->defcell);
+}
+
+NO_INLINE /* To reduce stack depth in mark_object.  */
+static void
+mark_save_value (struct Lisp_Save_Value *ptr)
+{
+  /* If `save_type' is zero, `data[0].pointer' is the address
+     of a memory area containing `data[1].integer' potential
+     Lisp_Objects.  */
+  if (GC_MARK_STACK && ptr->save_type == SAVE_TYPE_MEMORY)
+    {
+      Lisp_Object *p = ptr->data[0].pointer;
+      ptrdiff_t nelt;
+      for (nelt = ptr->data[1].integer; nelt > 0; nelt--, p++)
+       mark_maybe_object (*p);
+    }
+  else
+    {
+      /* Find Lisp_Objects in `data[N]' slots and mark them.  */
+      int i;
+      for (i = 0; i < SAVE_VALUE_SLOTS; i++)
+       if (save_type (ptr, i) == SAVE_OBJECT)
+         mark_object (ptr->data[i].object);
+    }
+}
+
 /* Remove killed buffers or items whose car is a killed buffer from
    LIST, and mark other items.  Return changed LIST, which is marked.  */
 
@@ -5966,7 +6140,13 @@ mark_discard_killed_buffers (Lisp_Object list)
   return list;
 }
 
-/* Determine type of generic Lisp_Object and mark it accordingly.  */
+/* Determine type of generic Lisp_Object and mark it accordingly.
+
+   This function implements a straightforward depth-first marking
+   algorithm and so the recursion depth may be very high (a few
+   tens of thousands is not uncommon).  To minimize stack usage,
+   a few cold paths are moved out to NO_INLINE functions above.
+   In general, inlining them doesn't help you to gain more speed.  */
 
 void
 mark_object (Lisp_Object arg)
@@ -6083,22 +6263,13 @@ mark_object (Lisp_Object arg)
            break;
 
          case PVEC_COMPILED:
-           { /* We could treat this just like a vector, but it is better
-                to save the COMPILED_CONSTANTS element for last and avoid
-                recursion there.  */
-             int size = ptr->header.size & PSEUDOVECTOR_SIZE_MASK;
-             int i;
-
-             VECTOR_MARK (ptr);
-             for (i = 0; i < size; i++)
-               if (i != COMPILED_CONSTANTS)
-                 mark_object (ptr->contents[i]);
-             if (size > COMPILED_CONSTANTS)
-               {
-                 obj = ptr->contents[COMPILED_CONSTANTS];
-                 goto loop;
-               }
-           }
+           /* Although we could treat this just like a vector, mark_compiled
+              returns the COMPILED_CONSTANTS element, which is marked at the
+              next iteration of goto-loop here.  This is done to avoid a few
+              recursive calls to mark_object.  */
+           obj = mark_compiled (ptr);
+           if (!NILP (obj))
+             goto loop;
            break;
 
          case PVEC_FRAME:
@@ -6163,7 +6334,8 @@ mark_object (Lisp_Object arg)
            break;
 
          case PVEC_CHAR_TABLE:
-           mark_char_table (ptr);
+         case PVEC_SUB_CHAR_TABLE:
+           mark_char_table (ptr, (enum pvec_type) pvectype);
            break;
 
          case PVEC_BOOL_VECTOR:
@@ -6186,12 +6358,13 @@ mark_object (Lisp_Object arg)
     case Lisp_Symbol:
       {
        register struct Lisp_Symbol *ptr = XSYMBOL (obj);
-       struct Lisp_Symbol *ptrx;
-
+      nextsym:
        if (ptr->gcmarkbit)
          break;
        CHECK_ALLOCATED_AND_LIVE (live_symbol_p);
        ptr->gcmarkbit = 1;
+       /* Attempt to catch bogus objects.  */
+        eassert (valid_lisp_object_p (ptr->function) >= 1);
        mark_object (ptr->function);
        mark_object (ptr->plist);
        switch (ptr->redirect)
@@ -6205,21 +6378,8 @@ mark_object (Lisp_Object arg)
              break;
            }
          case SYMBOL_LOCALIZED:
-           {
-             struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (ptr);
-             Lisp_Object where = blv->where;
-             /* If the value is set up for a killed buffer or deleted
-                frame, restore it's global binding.  If the value is
-                forwarded to a C variable, either it's not a Lisp_Object
-                var, or it's staticpro'd already.  */
-             if ((BUFFERP (where) && !BUFFER_LIVE_P (XBUFFER (where)))
-                 || (FRAMEP (where) && !FRAME_LIVE_P (XFRAME (where))))
-               swap_in_global_binding (ptr);
-             mark_object (blv->where);
-             mark_object (blv->valcell);
-             mark_object (blv->defcell);
-             break;
-           }
+           mark_localized_symbol (ptr);
+           break;
          case SYMBOL_FORWARDED:
            /* If the value is forwarded to a buffer or keyboard field,
               these are marked when we see the corresponding object.
@@ -6231,14 +6391,10 @@ mark_object (Lisp_Object arg)
        if (!PURE_POINTER_P (XSTRING (ptr->name)))
          MARK_STRING (XSTRING (ptr->name));
        MARK_INTERVAL_TREE (string_intervals (ptr->name));
-
+       /* Inner loop to mark next symbol in this bucket, if any.  */
        ptr = ptr->next;
        if (ptr)
-         {
-           ptrx = ptr;         /* Use of ptrx avoids compiler bug on Sun.  */
-           XSETSYMBOL (obj, ptrx);
-           goto loop;
-         }
+         goto nextsym;
       }
       break;
 
@@ -6259,27 +6415,7 @@ mark_object (Lisp_Object arg)
 
        case Lisp_Misc_Save_Value:
          XMISCANY (obj)->gcmarkbit = 1;
-         {
-           struct Lisp_Save_Value *ptr = XSAVE_VALUE (obj);
-           /* If `save_type' is zero, `data[0].pointer' is the address
-              of a memory area containing `data[1].integer' potential
-              Lisp_Objects.  */
-           if (GC_MARK_STACK && ptr->save_type == SAVE_TYPE_MEMORY)
-             {
-               Lisp_Object *p = ptr->data[0].pointer;
-               ptrdiff_t nelt;
-               for (nelt = ptr->data[1].integer; nelt > 0; nelt--, p++)
-                 mark_maybe_object (*p);
-             }
-           else
-             {
-               /* Find Lisp_Objects in `data[N]' slots and mark them.  */
-               int i;
-               for (i = 0; i < SAVE_VALUE_SLOTS; i++)
-                 if (save_type (ptr, i) == SAVE_OBJECT)
-                   mark_object (ptr->data[i].object);
-             }
-         }
+         mark_save_value (XSAVE_VALUE (obj));
          break;
 
        case Lisp_Misc_Overlay:
@@ -6399,332 +6535,397 @@ survives_gc_p (Lisp_Object obj)
 
 
 \f
-/* Sweep: find all structures not marked, and free them.  */
 
+NO_INLINE /* For better stack traces */
 static void
-gc_sweep (void)
+sweep_conses (void)
 {
-  /* Remove or mark entries in weak hash tables.
-     This must be done before any object is unmarked.  */
-  sweep_weak_hash_tables ();
+  struct cons_block *cblk;
+  struct cons_block **cprev = &cons_block;
+  int lim = cons_block_index;
+  EMACS_INT num_free = 0, num_used = 0;
 
-  sweep_strings ();
-  check_string_bytes (!noninteractive);
+  cons_free_list = 0;
 
-  /* Put all unmarked conses on free list.  */
-  {
-    register struct cons_block *cblk;
-    struct cons_block **cprev = &cons_block;
-    register int lim = cons_block_index;
-    EMACS_INT num_free = 0, num_used = 0;
-
-    cons_free_list = 0;
-
-    for (cblk = cons_block; cblk; cblk = *cprev)
-      {
-       register int i = 0;
-       int this_free = 0;
-       int ilim = (lim + BITS_PER_INT - 1) / BITS_PER_INT;
+  for (cblk = cons_block; cblk; cblk = *cprev)
+    {
+      int i = 0;
+      int this_free = 0;
+      int ilim = (lim + BITS_PER_BITS_WORD - 1) / BITS_PER_BITS_WORD;
 
-       /* Scan the mark bits an int at a time.  */
-       for (i = 0; i < ilim; i++)
-         {
-           if (cblk->gcmarkbits[i] == -1)
-             {
-               /* Fast path - all cons cells for this int are marked.  */
-               cblk->gcmarkbits[i] = 0;
-               num_used += BITS_PER_INT;
-             }
-           else
-             {
-               /* Some cons cells for this int are not marked.
-                  Find which ones, and free them.  */
-               int start, pos, stop;
-
-               start = i * BITS_PER_INT;
-               stop = lim - start;
-               if (stop > BITS_PER_INT)
-                 stop = BITS_PER_INT;
-               stop += start;
-
-               for (pos = start; pos < stop; pos++)
-                 {
-                   if (!CONS_MARKED_P (&cblk->conses[pos]))
-                     {
-                       this_free++;
-                       cblk->conses[pos].u.chain = cons_free_list;
-                       cons_free_list = &cblk->conses[pos];
+      /* Scan the mark bits an int at a time.  */
+      for (i = 0; i < ilim; i++)
+        {
+          if (cblk->gcmarkbits[i] == BITS_WORD_MAX)
+            {
+              /* Fast path - all cons cells for this int are marked.  */
+              cblk->gcmarkbits[i] = 0;
+              num_used += BITS_PER_BITS_WORD;
+            }
+          else
+            {
+              /* Some cons cells for this int are not marked.
+                 Find which ones, and free them.  */
+              int start, pos, stop;
+
+              start = i * BITS_PER_BITS_WORD;
+              stop = lim - start;
+              if (stop > BITS_PER_BITS_WORD)
+                stop = BITS_PER_BITS_WORD;
+              stop += start;
+
+              for (pos = start; pos < stop; pos++)
+                {
+                  if (!CONS_MARKED_P (&cblk->conses[pos]))
+                    {
+                      this_free++;
+                      cblk->conses[pos].u.chain = cons_free_list;
+                      cons_free_list = &cblk->conses[pos];
 #if GC_MARK_STACK
-                       cons_free_list->car = Vdead;
+                      cons_free_list->car = Vdead;
 #endif
-                     }
-                   else
-                     {
-                       num_used++;
-                       CONS_UNMARK (&cblk->conses[pos]);
-                     }
-                 }
-             }
-         }
+                    }
+                  else
+                    {
+                      num_used++;
+                      CONS_UNMARK (&cblk->conses[pos]);
+                    }
+                }
+            }
+        }
 
-       lim = CONS_BLOCK_SIZE;
-       /* If this block contains only free conses and we have already
-          seen more than two blocks worth of free conses then deallocate
-          this block.  */
-       if (this_free == CONS_BLOCK_SIZE && num_free > CONS_BLOCK_SIZE)
-         {
-           *cprev = cblk->next;
-           /* Unhook from the free list.  */
-           cons_free_list = cblk->conses[0].u.chain;
-           lisp_align_free (cblk);
-         }
-       else
-         {
-           num_free += this_free;
-           cprev = &cblk->next;
-         }
-      }
-    total_conses = num_used;
-    total_free_conses = num_free;
-  }
+      lim = CONS_BLOCK_SIZE;
+      /* If this block contains only free conses and we have already
+         seen more than two blocks worth of free conses then deallocate
+         this block.  */
+      if (this_free == CONS_BLOCK_SIZE && num_free > CONS_BLOCK_SIZE)
+        {
+          *cprev = cblk->next;
+          /* Unhook from the free list.  */
+          cons_free_list = cblk->conses[0].u.chain;
+          lisp_align_free (cblk);
+        }
+      else
+        {
+          num_free += this_free;
+          cprev = &cblk->next;
+        }
+    }
+  total_conses = num_used;
+  total_free_conses = num_free;
+}
 
-  /* Put all unmarked floats on free list.  */
-  {
-    register struct float_block *fblk;
-    struct float_block **fprev = &float_block;
-    register int lim = float_block_index;
-    EMACS_INT num_free = 0, num_used = 0;
+NO_INLINE /* For better stack traces */
+static void
+sweep_floats (void)
+{
+  register struct float_block *fblk;
+  struct float_block **fprev = &float_block;
+  register int lim = float_block_index;
+  EMACS_INT num_free = 0, num_used = 0;
 
-    float_free_list = 0;
+  float_free_list = 0;
 
-    for (fblk = float_block; fblk; fblk = *fprev)
-      {
-       register int i;
-       int this_free = 0;
-       for (i = 0; i < lim; i++)
-         if (!FLOAT_MARKED_P (&fblk->floats[i]))
-           {
-             this_free++;
-             fblk->floats[i].u.chain = float_free_list;
-             float_free_list = &fblk->floats[i];
-           }
-         else
-           {
-             num_used++;
-             FLOAT_UNMARK (&fblk->floats[i]);
-           }
-       lim = FLOAT_BLOCK_SIZE;
-       /* If this block contains only free floats and we have already
-          seen more than two blocks worth of free floats then deallocate
-          this block.  */
-       if (this_free == FLOAT_BLOCK_SIZE && num_free > FLOAT_BLOCK_SIZE)
-         {
-           *fprev = fblk->next;
-           /* Unhook from the free list.  */
-           float_free_list = fblk->floats[0].u.chain;
-           lisp_align_free (fblk);
-         }
-       else
-         {
-           num_free += this_free;
-           fprev = &fblk->next;
-         }
-      }
-    total_floats = num_used;
-    total_free_floats = num_free;
-  }
+  for (fblk = float_block; fblk; fblk = *fprev)
+    {
+      register int i;
+      int this_free = 0;
+      for (i = 0; i < lim; i++)
+        if (!FLOAT_MARKED_P (&fblk->floats[i]))
+          {
+            this_free++;
+            fblk->floats[i].u.chain = float_free_list;
+            float_free_list = &fblk->floats[i];
+          }
+        else
+          {
+            num_used++;
+            FLOAT_UNMARK (&fblk->floats[i]);
+          }
+      lim = FLOAT_BLOCK_SIZE;
+      /* If this block contains only free floats and we have already
+         seen more than two blocks worth of free floats then deallocate
+         this block.  */
+      if (this_free == FLOAT_BLOCK_SIZE && num_free > FLOAT_BLOCK_SIZE)
+        {
+          *fprev = fblk->next;
+          /* Unhook from the free list.  */
+          float_free_list = fblk->floats[0].u.chain;
+          lisp_align_free (fblk);
+        }
+      else
+        {
+          num_free += this_free;
+          fprev = &fblk->next;
+        }
+    }
+  total_floats = num_used;
+  total_free_floats = num_free;
+}
 
-  /* Put all unmarked intervals on free list.  */
-  {
-    register struct interval_block *iblk;
-    struct interval_block **iprev = &interval_block;
-    register int lim = interval_block_index;
-    EMACS_INT num_free = 0, num_used = 0;
+NO_INLINE /* For better stack traces */
+static void
+sweep_intervals (void)
+{
+  register struct interval_block *iblk;
+  struct interval_block **iprev = &interval_block;
+  register int lim = interval_block_index;
+  EMACS_INT num_free = 0, num_used = 0;
 
-    interval_free_list = 0;
+  interval_free_list = 0;
 
-    for (iblk = interval_block; iblk; iblk = *iprev)
-      {
-       register int i;
-       int this_free = 0;
+  for (iblk = interval_block; iblk; iblk = *iprev)
+    {
+      register int i;
+      int this_free = 0;
 
-       for (i = 0; i < lim; i++)
-         {
-           if (!iblk->intervals[i].gcmarkbit)
-             {
-               set_interval_parent (&iblk->intervals[i], interval_free_list);
-               interval_free_list = &iblk->intervals[i];
-               this_free++;
-             }
-           else
-             {
-               num_used++;
-               iblk->intervals[i].gcmarkbit = 0;
-             }
-         }
-       lim = INTERVAL_BLOCK_SIZE;
-       /* If this block contains only free intervals and we have already
-          seen more than two blocks worth of free intervals then
-          deallocate this block.  */
-       if (this_free == INTERVAL_BLOCK_SIZE && num_free > INTERVAL_BLOCK_SIZE)
-         {
-           *iprev = iblk->next;
-           /* Unhook from the free list.  */
-           interval_free_list = INTERVAL_PARENT (&iblk->intervals[0]);
-           lisp_free (iblk);
-         }
-       else
-         {
-           num_free += this_free;
-           iprev = &iblk->next;
-         }
-      }
-    total_intervals = num_used;
-    total_free_intervals = num_free;
-  }
+      for (i = 0; i < lim; i++)
+        {
+          if (!iblk->intervals[i].gcmarkbit)
+            {
+              set_interval_parent (&iblk->intervals[i], interval_free_list);
+              interval_free_list = &iblk->intervals[i];
+              this_free++;
+            }
+          else
+            {
+              num_used++;
+              iblk->intervals[i].gcmarkbit = 0;
+            }
+        }
+      lim = INTERVAL_BLOCK_SIZE;
+      /* If this block contains only free intervals and we have already
+         seen more than two blocks worth of free intervals then
+         deallocate this block.  */
+      if (this_free == INTERVAL_BLOCK_SIZE && num_free > INTERVAL_BLOCK_SIZE)
+        {
+          *iprev = iblk->next;
+          /* Unhook from the free list.  */
+          interval_free_list = INTERVAL_PARENT (&iblk->intervals[0]);
+          lisp_free (iblk);
+        }
+      else
+        {
+          num_free += this_free;
+          iprev = &iblk->next;
+        }
+    }
+  total_intervals = num_used;
+  total_free_intervals = num_free;
+}
 
-  /* Put all unmarked symbols on free list.  */
-  {
-    register struct symbol_block *sblk;
-    struct symbol_block **sprev = &symbol_block;
-    register int lim = symbol_block_index;
-    EMACS_INT num_free = 0, num_used = 0;
+NO_INLINE /* For better stack traces */
+static void
+sweep_symbols (void)
+{
+  register struct symbol_block *sblk;
+  struct symbol_block **sprev = &symbol_block;
+  register int lim = symbol_block_index;
+  EMACS_INT num_free = 0, num_used = 0;
 
-    symbol_free_list = NULL;
+  symbol_free_list = NULL;
 
-    for (sblk = symbol_block; sblk; sblk = *sprev)
-      {
-       int this_free = 0;
-       union aligned_Lisp_Symbol *sym = sblk->symbols;
-       union aligned_Lisp_Symbol *end = sym + lim;
+  for (sblk = symbol_block; sblk; sblk = *sprev)
+    {
+      int this_free = 0;
+      union aligned_Lisp_Symbol *sym = sblk->symbols;
+      union aligned_Lisp_Symbol *end = sym + lim;
 
-       for (; sym < end; ++sym)
-         {
-           if (!sym->s.gcmarkbit)
-             {
-               if (sym->s.redirect == SYMBOL_LOCALIZED)
-                 xfree (SYMBOL_BLV (&sym->s));
-               sym->s.next = symbol_free_list;
-               symbol_free_list = &sym->s;
+      for (; sym < end; ++sym)
+        {
+          if (!sym->s.gcmarkbit)
+            {
+              if (sym->s.redirect == SYMBOL_LOCALIZED)
+                xfree (SYMBOL_BLV (&sym->s));
+              sym->s.next = symbol_free_list;
+              symbol_free_list = &sym->s;
 #if GC_MARK_STACK
-               symbol_free_list->function = Vdead;
+              symbol_free_list->function = Vdead;
 #endif
-               ++this_free;
-             }
-           else
-             {
-               ++num_used;
-               eassert (!STRING_MARKED_P (XSTRING (sym->s.name)));
-               sym->s.gcmarkbit = 0;
-             }
-         }
+              ++this_free;
+            }
+          else
+            {
+              ++num_used;
+              sym->s.gcmarkbit = 0;
+              /* Attempt to catch bogus objects.  */
+              eassert (valid_lisp_object_p (sym->s.function) >= 1);
+            }
+        }
 
-       lim = SYMBOL_BLOCK_SIZE;
-       /* If this block contains only free symbols and we have already
-          seen more than two blocks worth of free symbols then deallocate
-          this block.  */
-       if (this_free == SYMBOL_BLOCK_SIZE && num_free > SYMBOL_BLOCK_SIZE)
-         {
-           *sprev = sblk->next;
-           /* Unhook from the free list.  */
-           symbol_free_list = sblk->symbols[0].s.next;
-           lisp_free (sblk);
-         }
-       else
-         {
-           num_free += this_free;
-           sprev = &sblk->next;
-         }
-      }
-    total_symbols = num_used;
-    total_free_symbols = num_free;
-  }
+      lim = SYMBOL_BLOCK_SIZE;
+      /* If this block contains only free symbols and we have already
+         seen more than two blocks worth of free symbols then deallocate
+         this block.  */
+      if (this_free == SYMBOL_BLOCK_SIZE && num_free > SYMBOL_BLOCK_SIZE)
+        {
+          *sprev = sblk->next;
+          /* Unhook from the free list.  */
+          symbol_free_list = sblk->symbols[0].s.next;
+          lisp_free (sblk);
+        }
+      else
+        {
+          num_free += this_free;
+          sprev = &sblk->next;
+        }
+    }
+  total_symbols = num_used;
+  total_free_symbols = num_free;
+}
 
-  /* Put all unmarked misc's on free list.
-     For a marker, first unchain it from the buffer it points into.  */
-  {
-    register struct marker_block *mblk;
-    struct marker_block **mprev = &marker_block;
-    register int lim = marker_block_index;
-    EMACS_INT num_free = 0, num_used = 0;
+NO_INLINE /* For better stack traces */
+static void
+sweep_misc (void)
+{
+  register struct marker_block *mblk;
+  struct marker_block **mprev = &marker_block;
+  register int lim = marker_block_index;
+  EMACS_INT num_free = 0, num_used = 0;
 
-    marker_free_list = 0;
+  /* Put all unmarked misc's on free list.  For a marker, first
+     unchain it from the buffer it points into.  */
 
-    for (mblk = marker_block; mblk; mblk = *mprev)
-      {
-       register int i;
-       int this_free = 0;
+  marker_free_list = 0;
 
-       for (i = 0; i < lim; i++)
-         {
-           if (!mblk->markers[i].m.u_any.gcmarkbit)
-             {
-               if (mblk->markers[i].m.u_any.type == Lisp_Misc_Marker)
-                 unchain_marker (&mblk->markers[i].m.u_marker);
-               /* Set the type of the freed object to Lisp_Misc_Free.
-                  We could leave the type alone, since nobody checks it,
-                  but this might catch bugs faster.  */
-               mblk->markers[i].m.u_marker.type = Lisp_Misc_Free;
-               mblk->markers[i].m.u_free.chain = marker_free_list;
-               marker_free_list = &mblk->markers[i].m;
-               this_free++;
-             }
-           else
-             {
-               num_used++;
-               mblk->markers[i].m.u_any.gcmarkbit = 0;
-             }
-         }
-       lim = MARKER_BLOCK_SIZE;
-       /* If this block contains only free markers and we have already
-          seen more than two blocks worth of free markers then deallocate
-          this block.  */
-       if (this_free == MARKER_BLOCK_SIZE && num_free > MARKER_BLOCK_SIZE)
-         {
-           *mprev = mblk->next;
-           /* Unhook from the free list.  */
-           marker_free_list = mblk->markers[0].m.u_free.chain;
-           lisp_free (mblk);
-         }
-       else
-         {
-           num_free += this_free;
-           mprev = &mblk->next;
-         }
-      }
+  for (mblk = marker_block; mblk; mblk = *mprev)
+    {
+      register int i;
+      int this_free = 0;
 
-    total_markers = num_used;
-    total_free_markers = num_free;
-  }
+      for (i = 0; i < lim; i++)
+        {
+          if (!mblk->markers[i].m.u_any.gcmarkbit)
+            {
+              if (mblk->markers[i].m.u_any.type == Lisp_Misc_Marker)
+                unchain_marker (&mblk->markers[i].m.u_marker);
+              /* Set the type of the freed object to Lisp_Misc_Free.
+                 We could leave the type alone, since nobody checks it,
+                 but this might catch bugs faster.  */
+              mblk->markers[i].m.u_marker.type = Lisp_Misc_Free;
+              mblk->markers[i].m.u_free.chain = marker_free_list;
+              marker_free_list = &mblk->markers[i].m;
+              this_free++;
+            }
+          else
+            {
+              num_used++;
+              mblk->markers[i].m.u_any.gcmarkbit = 0;
+            }
+        }
+      lim = MARKER_BLOCK_SIZE;
+      /* If this block contains only free markers and we have already
+         seen more than two blocks worth of free markers then deallocate
+         this block.  */
+      if (this_free == MARKER_BLOCK_SIZE && num_free > MARKER_BLOCK_SIZE)
+        {
+          *mprev = mblk->next;
+          /* Unhook from the free list.  */
+          marker_free_list = mblk->markers[0].m.u_free.chain;
+          lisp_free (mblk);
+        }
+      else
+        {
+          num_free += this_free;
+          mprev = &mblk->next;
+        }
+    }
 
-  /* Free all unmarked buffers */
-  {
-    register struct buffer *buffer, **bprev = &all_buffers;
+  total_markers = num_used;
+  total_free_markers = num_free;
+}
 
-    total_buffers = 0;
-    for (buffer = all_buffers; buffer; buffer = *bprev)
-      if (!VECTOR_MARKED_P (buffer))
-       {
-         *bprev = buffer->next;
-         lisp_free (buffer);
-       }
-      else
-       {
-         VECTOR_UNMARK (buffer);
-         /* Do not use buffer_(set|get)_intervals here.  */
-         buffer->text->intervals = balance_intervals (buffer->text->intervals);
-         total_buffers++;
-         bprev = &buffer->next;
-       }
-  }
+NO_INLINE /* For better stack traces */
+static void
+sweep_buffers (void)
+{
+  register struct buffer *buffer, **bprev = &all_buffers;
+
+  total_buffers = 0;
+  for (buffer = all_buffers; buffer; buffer = *bprev)
+    if (!VECTOR_MARKED_P (buffer))
+      {
+        *bprev = buffer->next;
+        lisp_free (buffer);
+      }
+    else
+      {
+        VECTOR_UNMARK (buffer);
+        /* Do not use buffer_(set|get)_intervals here.  */
+        buffer->text->intervals = balance_intervals (buffer->text->intervals);
+        total_buffers++;
+        bprev = &buffer->next;
+      }
+}
 
+/* Sweep: find all structures not marked, and free them.  */
+static void
+gc_sweep (void)
+{
+  /* Remove or mark entries in weak hash tables.
+     This must be done before any object is unmarked.  */
+  sweep_weak_hash_tables ();
+
+  sweep_strings ();
+  check_string_bytes (!noninteractive);
+  sweep_conses ();
+  sweep_floats ();
+  sweep_intervals ();
+  sweep_symbols ();
+  sweep_misc ();
+  sweep_buffers ();
   sweep_vectors ();
   check_string_bytes (!noninteractive);
 }
 
+DEFUN ("memory-info", Fmemory_info, Smemory_info, 0, 0, 0,
+       doc: /* Return a list of (TOTAL-RAM FREE-RAM TOTAL-SWAP FREE-SWAP).
+All values are in Kbytes.  If there is no swap space,
+last two values are zero.  If the system is not supported
+or memory information can't be obtained, return nil.  */)
+  (void)
+{
+#if defined HAVE_LINUX_SYSINFO
+  struct sysinfo si;
+  uintmax_t units;
 
+  if (sysinfo (&si))
+    return Qnil;
+#ifdef LINUX_SYSINFO_UNIT
+  units = si.mem_unit;
+#else
+  units = 1;
+#endif
+  return list4i ((uintmax_t) si.totalram * units / 1024,
+                (uintmax_t) si.freeram * units / 1024,
+                (uintmax_t) si.totalswap * units / 1024,
+                (uintmax_t) si.freeswap * units / 1024);
+#elif defined WINDOWSNT
+  unsigned long long totalram, freeram, totalswap, freeswap;
+
+  if (w32_memory_info (&totalram, &freeram, &totalswap, &freeswap) == 0)
+    return list4i ((uintmax_t) totalram / 1024,
+                  (uintmax_t) freeram / 1024,
+                  (uintmax_t) totalswap / 1024,
+                  (uintmax_t) freeswap / 1024);
+  else
+    return Qnil;
+#elif defined MSDOS
+  unsigned long totalram, freeram, totalswap, freeswap;
+
+  if (dos_memory_info (&totalram, &freeram, &totalswap, &freeswap) == 0)
+    return list4i ((uintmax_t) totalram / 1024,
+                  (uintmax_t) freeram / 1024,
+                  (uintmax_t) totalswap / 1024,
+                  (uintmax_t) freeswap / 1024);
+  else
+    return Qnil;
+#else /* not HAVE_LINUX_SYSINFO, not WINDOWSNT, not MSDOS */
+  /* FIXME: add more systems.  */
+  return Qnil;
+#endif /* HAVE_LINUX_SYSINFO, not WINDOWSNT, not MSDOS */
+}
 
-\f
 /* Debugging aids.  */
 
 DEFUN ("memory-limit", Fmemory_limit, Smemory_limit, 0, 0, 0,
@@ -6821,6 +7022,78 @@ which_symbols (Lisp_Object obj, EMACS_INT find_max)
    return found;
 }
 
+#ifdef SUSPICIOUS_OBJECT_CHECKING
+
+static void *
+find_suspicious_object_in_range (void *begin, void *end)
+{
+  char *begin_a = begin;
+  char *end_a = end;
+  int i;
+
+  for (i = 0; i < ARRAYELTS (suspicious_objects); ++i)
+    {
+      char *suspicious_object = suspicious_objects[i];
+      if (begin_a <= suspicious_object && suspicious_object < end_a)
+       return suspicious_object;
+    }
+
+  return NULL;
+}
+
+static void
+note_suspicious_free (void* ptr)
+{
+  struct suspicious_free_record* rec;
+
+  rec = &suspicious_free_history[suspicious_free_history_index++];
+  if (suspicious_free_history_index ==
+      ARRAYELTS (suspicious_free_history))
+    {
+      suspicious_free_history_index = 0;
+    }
+
+  memset (rec, 0, sizeof (*rec));
+  rec->suspicious_object = ptr;
+  backtrace (&rec->backtrace[0], ARRAYELTS (rec->backtrace));
+}
+
+static void
+detect_suspicious_free (void* ptr)
+{
+  int i;
+
+  eassert (ptr != NULL);
+
+  for (i = 0; i < ARRAYELTS (suspicious_objects); ++i)
+    if (suspicious_objects[i] == ptr)
+      {
+        note_suspicious_free (ptr);
+        suspicious_objects[i] = NULL;
+      }
+}
+
+#endif /* SUSPICIOUS_OBJECT_CHECKING */
+
+DEFUN ("suspicious-object", Fsuspicious_object, Ssuspicious_object, 1, 1, 0,
+       doc: /* Return OBJ, maybe marking it for extra scrutiny.
+If Emacs is compiled with suspicious object checking, capture
+a stack trace when OBJ is freed in order to help track down
+garbage collection bugs.  Otherwise, do nothing and return OBJ.   */)
+   (Lisp_Object obj)
+{
+#ifdef SUSPICIOUS_OBJECT_CHECKING
+  /* Right now, we care only about vectors.  */
+  if (VECTORLIKEP (obj))
+    {
+      suspicious_objects[suspicious_object_index++] = XVECTOR (obj);
+      if (suspicious_object_index == ARRAYELTS (suspicious_objects))
+       suspicious_object_index = 0;
+    }
+#endif
+  return obj;
+}
+
 #ifdef ENABLE_CHECKING
 
 bool suppress_checking;
@@ -6832,8 +7105,48 @@ die (const char *msg, const char *file, int line)
           file, line, msg);
   terminate_due_to_signal (SIGABRT, INT_MAX);
 }
-#endif
-\f
+
+#endif /* ENABLE_CHECKING */
+
+#if defined (ENABLE_CHECKING) && USE_STACK_LISP_OBJECTS
+
+/* Debugging check whether STR is ASCII-only.  */
+
+const char *
+verify_ascii (const char *str)
+{
+  const unsigned char *ptr = (unsigned char *) str, *end = ptr + strlen (str);
+  while (ptr < end)
+    {
+      int c = STRING_CHAR_ADVANCE (ptr);
+      if (!ASCII_CHAR_P (c))
+       emacs_abort ();
+    }
+  return str;
+}
+
+/* Stress alloca with inconveniently sized requests and check
+   whether all allocated areas may be used for Lisp_Object.  */
+
+NO_INLINE static void
+verify_alloca (void)
+{
+  int i;
+  enum { ALLOCA_CHECK_MAX = 256 };
+  /* Start from size of the smallest Lisp object.  */
+  for (i = sizeof (struct Lisp_Cons); i <= ALLOCA_CHECK_MAX; i++)
+    {
+      void *ptr = alloca (i);
+      make_lisp_ptr (ptr, Lisp_Cons);
+    }
+}
+
+#else /* not ENABLE_CHECKING && USE_STACK_LISP_OBJECTS */
+
+#define verify_alloca() ((void) 0)
+
+#endif /* ENABLE_CHECKING && USE_STACK_LISP_OBJECTS */
+
 /* Initialization.  */
 
 void
@@ -6843,6 +7156,8 @@ init_alloc_once (void)
   purebeg = PUREBEG;
   pure_size = PURESIZE;
 
+  verify_alloca ();
+
 #if GC_MARK_STACK || defined GC_MALLOC_CHECK
   mem_init ();
   Vdead = make_pure_string ("DEAD", 4, 4, 0);
@@ -6980,6 +7295,7 @@ The time is in seconds as a floating point value.  */);
   defsubr (&Scons);
   defsubr (&Slist);
   defsubr (&Svector);
+  defsubr (&Sbool_vector);
   defsubr (&Smake_byte_code);
   defsubr (&Smake_list);
   defsubr (&Smake_vector);
@@ -6990,7 +7306,9 @@ The time is in seconds as a floating point value.  */);
   defsubr (&Spurecopy);
   defsubr (&Sgarbage_collect);
   defsubr (&Smemory_limit);
+  defsubr (&Smemory_info);
   defsubr (&Smemory_use_counts);
+  defsubr (&Ssuspicious_object);
 
 #if GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES
   defsubr (&Sgc_status);
@@ -7005,11 +7323,10 @@ The time is in seconds as a floating point value.  */);
 union
 {
   enum CHARTAB_SIZE_BITS CHARTAB_SIZE_BITS;
-  enum CHAR_TABLE_STANDARD_SLOTS CHAR_TABLE_STANDARD_SLOTS;
+  enum char_table_specials char_table_specials;
   enum char_bits char_bits;
   enum CHECK_LISP_OBJECT_TYPE CHECK_LISP_OBJECT_TYPE;
   enum DEFAULT_HASH_SIZE DEFAULT_HASH_SIZE;
-  enum enum_USE_LSB_TAG enum_USE_LSB_TAG;
   enum Lisp_Bits Lisp_Bits;
   enum Lisp_Compiled Lisp_Compiled;
   enum maxargs maxargs;
index d98ddac0171c41b785cceb964900e171e439a652..ce782f6adb6e00bd716f001a41df0dc9eeffade5 100644 (file)
@@ -26,6 +26,11 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "atimer.h"
 #include <unistd.h>
 
+#ifdef HAVE_TIMERFD
+#include <errno.h>
+# include <sys/timerfd.h>
+#endif
+
 /* Free-list of atimer structures.  */
 
 static struct atimer *free_atimers;
@@ -40,32 +45,35 @@ static struct atimer *stopped_atimers;
 
 static struct atimer *atimers;
 
+#ifdef HAVE_ITIMERSPEC
 /* The alarm timer and whether it was properly initialized, if
    POSIX timers are available.  */
-#ifdef HAVE_ITIMERSPEC
 static timer_t alarm_timer;
 static bool alarm_timer_ok;
+
+# ifdef HAVE_TIMERFD
+/* File descriptor for timer, or -1 if it could not be created.  */
+static int timerfd;
+# else
+enum { timerfd = -1 };
+# endif
 #endif
 
 /* Block/unblock SIGALRM.  */
 
 static void
-sigmask_atimers (int how)
+block_atimers (sigset_t *oldset)
 {
   sigset_t blocked;
   sigemptyset (&blocked);
   sigaddset (&blocked, SIGALRM);
-  pthread_sigmask (how, &blocked, 0);
-}
-static void
-block_atimers (void)
-{
-  sigmask_atimers (SIG_BLOCK);
+  sigaddset (&blocked, SIGINT);
+  pthread_sigmask (SIG_BLOCK, &blocked, oldset);
 }
 static void
-unblock_atimers (void)
+unblock_atimers (sigset_t const *oldset)
 {
-  sigmask_atimers (SIG_UNBLOCK);
+  pthread_sigmask (SIG_SETMASK, oldset, 0);
 }
 
 /* Function prototypes.  */
@@ -75,20 +83,20 @@ static void schedule_atimer (struct atimer *);
 static struct atimer *append_atimer_lists (struct atimer *,
                                            struct atimer *);
 
-/* Start a new atimer of type TYPE.  TIME specifies when the timer is
+/* Start a new atimer of type TYPE.  TIMESTAMP specifies when the timer is
    ripe.  FN is the function to call when the timer fires.
    CLIENT_DATA is stored in the client_data member of the atimer
    structure returned and so made available to FN when it is called.
 
-   If TYPE is ATIMER_ABSOLUTE, TIME is the absolute time at which the
+   If TYPE is ATIMER_ABSOLUTE, TIMESTAMP is the absolute time at which the
    timer fires.
 
-   If TYPE is ATIMER_RELATIVE, the timer is ripe TIME s/us in the
+   If TYPE is ATIMER_RELATIVE, the timer is ripe TIMESTAMP seconds in the
    future.
 
    In both cases, the timer is automatically freed after it has fired.
 
-   If TYPE is ATIMER_CONTINUOUS, the timer fires every TIME s/us.
+   If TYPE is ATIMER_CONTINUOUS, the timer fires every TIMESTAMP seconds.
 
    Value is a pointer to the atimer started.  It can be used in calls
    to cancel_atimer; don't free it yourself.  */
@@ -98,9 +106,9 @@ start_atimer (enum atimer_type type, struct timespec timestamp,
              atimer_callback fn, void *client_data)
 {
   struct atimer *t;
+  sigset_t oldset;
 
-  /* Round TIME up to the next full second if we don't have
-     itimers.  */
+  /* Round TIMESTAMP up to the next full second if we don't have itimers.  */
 #ifndef HAVE_SETITIMER
   if (timestamp.tv_nsec != 0 && timestamp.tv_sec < TYPE_MAXIMUM (time_t))
     timestamp = make_timespec (timestamp.tv_sec + 1, 0);
@@ -122,7 +130,7 @@ start_atimer (enum atimer_type type, struct timespec timestamp,
   t->fn = fn;
   t->client_data = client_data;
 
-  block_atimers ();
+  block_atimers (&oldset);
 
   /* Compute the timer's expiration time.  */
   switch (type)
@@ -143,7 +151,7 @@ start_atimer (enum atimer_type type, struct timespec timestamp,
 
   /* Insert the timer in the list of active atimers.  */
   schedule_atimer (t);
-  unblock_atimers ();
+  unblock_atimers (&oldset);
 
   /* Arrange for a SIGALRM at the time the next atimer is ripe.  */
   set_alarm ();
@@ -158,8 +166,9 @@ void
 cancel_atimer (struct atimer *timer)
 {
   int i;
+  sigset_t oldset;
 
-  block_atimers ();
+  block_atimers (&oldset);
 
   for (i = 0; i < 2; ++i)
     {
@@ -186,7 +195,7 @@ cancel_atimer (struct atimer *timer)
        }
     }
 
-  unblock_atimers ();
+  unblock_atimers (&oldset);
 }
 
 
@@ -217,7 +226,8 @@ append_atimer_lists (struct atimer *list_1, struct atimer *list_2)
 void
 stop_other_atimers (struct atimer *t)
 {
-  block_atimers ();
+  sigset_t oldset;
+  block_atimers (&oldset);
 
   if (t)
     {
@@ -242,7 +252,7 @@ stop_other_atimers (struct atimer *t)
 
   stopped_atimers = append_atimer_lists (atimers, stopped_atimers);
   atimers = t;
-  unblock_atimers ();
+  unblock_atimers (&oldset);
 }
 
 
@@ -256,8 +266,9 @@ run_all_atimers (void)
     {
       struct atimer *t = atimers;
       struct atimer *next;
+      sigset_t oldset;
 
-      block_atimers ();
+      block_atimers (&oldset);
       atimers = stopped_atimers;
       stopped_atimers = NULL;
 
@@ -268,7 +279,7 @@ run_all_atimers (void)
          t = next;
        }
 
-      unblock_atimers ();
+      unblock_atimers (&oldset);
     }
 }
 
@@ -286,12 +297,20 @@ set_alarm (void)
       struct timespec now, interval;
 
 #ifdef HAVE_ITIMERSPEC
-      if (alarm_timer_ok)
+      if (0 <= timerfd || alarm_timer_ok)
        {
          struct itimerspec ispec;
          ispec.it_value = atimers->expiration;
          ispec.it_interval.tv_sec = ispec.it_interval.tv_nsec = 0;
-         if (timer_settime (alarm_timer, 0, &ispec, 0) == 0)
+# ifdef HAVE_TIMERFD
+         if (timerfd_settime (timerfd, TFD_TIMER_ABSTIME, &ispec, 0) == 0)
+           {
+             add_timer_wait_descriptor (timerfd);
+             return;
+           }
+# endif
+         if (alarm_timer_ok
+             && timer_settime (alarm_timer, TIMER_ABSTIME, &ispec, 0) == 0)
            return;
        }
 #endif
@@ -373,6 +392,37 @@ handle_alarm_signal (int sig)
   pending_signals = 1;
 }
 
+#ifdef HAVE_TIMERFD
+
+/* Called from wait_reading_process_output when FD, which
+   should be equal to TIMERFD, is available for reading.  */
+
+void
+timerfd_callback (int fd, void *arg)
+{
+  ptrdiff_t nbytes;
+  uint64_t expirations;
+
+  eassert (fd == timerfd);
+  nbytes = emacs_read (fd, &expirations, sizeof (expirations));
+
+  if (nbytes == sizeof (expirations))
+    {
+      /* Timer should expire just once.  */
+      eassert (expirations == 1);
+      do_pending_atimers ();
+    }
+  else if (nbytes < 0)
+    /* For some not yet known reason, we may get weird event and no
+       data on timer descriptor.  This can break Gnus at least, see:
+       http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00503.html.  */
+    eassert (errno == EAGAIN);
+  else
+    /* I don't know what else can happen with this descriptor.  */
+    emacs_abort ();
+}
+
+#endif /* HAVE_TIMERFD */
 
 /* Do pending timers.  */
 
@@ -381,9 +431,10 @@ do_pending_atimers (void)
 {
   if (atimers)
     {
-      block_atimers ();
+      sigset_t oldset;
+      block_atimers (&oldset);
       run_timers ();
-      unblock_atimers ();
+      unblock_atimers (&oldset);
     }
 }
 
@@ -397,23 +448,121 @@ turn_on_atimers (bool on)
   if (on)
     set_alarm ();
   else
-    alarm (0);
+    {
+#ifdef HAVE_ITIMERSPEC
+      struct itimerspec ispec;
+      memset (&ispec, 0, sizeof ispec);
+      if (alarm_timer_ok)
+       timer_settime (alarm_timer, TIMER_ABSTIME, &ispec, 0);
+# ifdef HAVE_TIMERFD
+      timerfd_settime (timerfd, TFD_TIMER_ABSTIME, &ispec, 0);
+# endif
+#endif
+      alarm (0);
+    }
 }
 
+/* This is intended to use from automated tests.  */
+
+#ifdef ENABLE_CHECKING
+
+#define MAXTIMERS 10
+
+struct atimer_result
+{
+  /* Time when we expect this timer to trigger.  */
+  struct timespec expected;
+
+  /* Timer status: -1 if not triggered, 0 if triggered
+     too early or too late, 1 if triggered timely.  */
+  int intime;
+};
+
+static void
+debug_timer_callback (struct atimer *t)
+{
+  struct timespec now = current_timespec ();
+  struct atimer_result *r = (struct atimer_result *) t->client_data;
+  int result = timespec_cmp (now, r->expected);
+
+  if (result < 0)
+    /* Too early.  */
+    r->intime = 0;
+  else if (result >= 0)
+    {
+#ifdef HAVE_SETITIMER
+      struct timespec delta = timespec_sub (now, r->expected);
+      /* Too late if later than expected + 0.01s.  FIXME:
+        this should depend from system clock resolution.  */
+      if (timespec_cmp (delta, make_timespec (0, 10000000)) > 0)
+       r->intime = 0;
+      else
+#endif /* HAVE_SETITIMER */
+       r->intime = 1;
+    }
+}
+
+DEFUN ("debug-timer-check", Fdebug_timer_check, Sdebug_timer_check, 0, 0, 0,
+       doc: /* Run internal self-tests to check timers subsystem.
+Return t if all self-tests are passed, nil otherwise.  */)
+  (void)
+{
+  int i, ok;
+  struct atimer *timer;
+  struct atimer_result *results[MAXTIMERS];
+  struct timespec t = make_timespec (0, 0);
+
+  /* Arm MAXTIMERS relative timers to trigger with 0.1s intervals.  */
+  for (i = 0; i < MAXTIMERS; i++)
+    {
+      results[i] = xmalloc (sizeof (struct atimer_result));
+      t = timespec_add (t, make_timespec (0, 100000000));
+      results[i]->expected = timespec_add (current_timespec (), t);
+      results[i]->intime = -1;
+      timer = start_atimer (ATIMER_RELATIVE, t,
+                           debug_timer_callback, results[i]);
+    }
+
+  /* Wait for 1s but process timers.  */
+  wait_reading_process_output (1, 0, 0, false, Qnil, NULL, 0);
+  /* Shut up the compiler by "using" this variable.  */
+  (void) timer;
+
+  for (i = 0, ok = 0; i < MAXTIMERS; i++)
+    ok += results[i]->intime, xfree (results[i]);
+
+  return ok == MAXTIMERS ? Qt : Qnil;
+}
+
+#endif /* ENABLE_CHECKING */
 
 void
 init_atimer (void)
 {
-  struct sigaction action;
 #ifdef HAVE_ITIMERSPEC
-  struct sigevent sigev;
-  sigev.sigev_notify = SIGEV_SIGNAL;
-  sigev.sigev_signo = SIGALRM;
-  sigev.sigev_value.sival_ptr = &alarm_timer;
-  alarm_timer_ok = timer_create (CLOCK_REALTIME, &sigev, &alarm_timer) == 0;
+# ifdef HAVE_TIMERFD
+  /* Until this feature is considered stable, you can ask to not use it.  */
+  timerfd = (egetenv ("EMACS_IGNORE_TIMERFD") ? -1 :
+            timerfd_create (CLOCK_REALTIME, TFD_NONBLOCK | TFD_CLOEXEC));
+# endif
+  if (timerfd < 0)
+    {
+      struct sigevent sigev;
+      sigev.sigev_notify = SIGEV_SIGNAL;
+      sigev.sigev_signo = SIGALRM;
+      sigev.sigev_value.sival_ptr = &alarm_timer;
+      alarm_timer_ok
+       = timer_create (CLOCK_REALTIME, &sigev, &alarm_timer) == 0;
+    }
 #endif
   free_atimers = stopped_atimers = atimers = NULL;
-  /* pending_signals is initialized in init_keyboard.*/
+
+  /* pending_signals is initialized in init_keyboard.  */
+  struct sigaction action;
   emacs_sigaction_init (&action, handle_alarm_signal);
   sigaction (SIGALRM, &action, 0);
+
+#ifdef ENABLE_CHECKING
+  defsubr (&Sdebug_timer_check);
+#endif
 }
index 379787abca79917f4c78faf5984f6c52d64c18fb..2386977cf8717448904ce5dc8fffacdeac18f8ab 100644 (file)
@@ -77,5 +77,8 @@ void init_atimer (void);
 void turn_on_atimers (bool);
 void stop_other_atimers (struct atimer *);
 void run_all_atimers (void);
+#ifdef HAVE_TIMERFD
+void timerfd_callback (int, void *);
+#endif
 
 #endif /* EMACS_ATIMER_H */
index 495f937d83f7f502a4a243e45b1da6caa4a4d072..80791a1fdb1b1c87a18a769707304b06c607b040 100644 (file)
@@ -1,7 +1,6 @@
 /* Buffer manipulation primitives for GNU Emacs.
 
-Copyright (C) 1985-1989, 1993-1995, 1997-2014 Free Software Foundation,
-Inc.
+Copyright (C) 1985-1989, 1993-1995, 1997-2014 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -42,6 +41,10 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "keymap.h"
 #include "frame.h"
 
+#ifdef WINDOWSNT
+#include "w32heap.h"           /* for mmap_* */
+#endif
+
 struct buffer *current_buffer;         /* The current buffer.  */
 
 /* First buffer in chain of all buffers (in reverse order of creation).
@@ -142,6 +145,10 @@ Lisp_Object Qmodification_hooks;
 Lisp_Object Qinsert_in_front_hooks;
 Lisp_Object Qinsert_behind_hooks;
 
+Lisp_Object Qchoice, Qrange, Qleft, Qright;
+Lisp_Object Qvertical_scroll_bar, Qhorizontal_scroll_bar;
+static Lisp_Object Qoverwrite_mode, Qfraction;
+
 static void alloc_buffer_text (struct buffer *, ptrdiff_t);
 static void free_buffer_text (struct buffer *b);
 static struct Lisp_Overlay * copy_overlays (struct buffer *, struct Lisp_Overlay *);
@@ -337,6 +344,11 @@ bset_scroll_bar_width (struct buffer *b, Lisp_Object val)
   b->INTERNAL_FIELD (scroll_bar_width) = val;
 }
 static void
+bset_scroll_bar_height (struct buffer *b, Lisp_Object val)
+{
+  b->INTERNAL_FIELD (scroll_bar_height) = val;
+}
+static void
 bset_scroll_down_aggressively (struct buffer *b, Lisp_Object val)
 {
   b->INTERNAL_FIELD (scroll_down_aggressively) = val;
@@ -362,6 +374,11 @@ bset_vertical_scroll_bar_type (struct buffer *b, Lisp_Object val)
   b->INTERNAL_FIELD (vertical_scroll_bar_type) = val;
 }
 static void
+bset_horizontal_scroll_bar_type (struct buffer *b, Lisp_Object val)
+{
+  b->INTERNAL_FIELD (horizontal_scroll_bar_type) = val;
+}
+static void
 bset_word_wrap (struct buffer *b, Lisp_Object val)
 {
   b->INTERNAL_FIELD (word_wrap) = val;
@@ -1117,10 +1134,7 @@ BUFFER defaults to the current buffer.
 Return nil if BUFFER has been killed.  */)
   (register Lisp_Object buffer)
 {
-  if (NILP (buffer))
-    return BVAR (current_buffer, name);
-  CHECK_BUFFER (buffer);
-  return BVAR (XBUFFER (buffer), name);
+  return BVAR (decode_buffer (buffer), name);
 }
 
 DEFUN ("buffer-file-name", Fbuffer_file_name, Sbuffer_file_name, 0, 1, 0,
@@ -1128,10 +1142,7 @@ DEFUN ("buffer-file-name", Fbuffer_file_name, Sbuffer_file_name, 0, 1, 0,
 No argument or nil as argument means use the current buffer.  */)
   (register Lisp_Object buffer)
 {
-  if (NILP (buffer))
-    return BVAR (current_buffer, filename);
-  CHECK_BUFFER (buffer);
-  return BVAR (XBUFFER (buffer), filename);
+  return BVAR (decode_buffer (buffer), filename);
 }
 
 DEFUN ("buffer-base-buffer", Fbuffer_base_buffer, Sbuffer_base_buffer,
@@ -1141,31 +1152,18 @@ If BUFFER is not indirect, return nil.
 BUFFER defaults to the current buffer.  */)
   (register Lisp_Object buffer)
 {
-  struct buffer *base;
-  Lisp_Object base_buffer;
-
-  if (NILP (buffer))
-    base = current_buffer->base_buffer;
-  else
-    {
-      CHECK_BUFFER (buffer);
-      base = XBUFFER (buffer)->base_buffer;
-    }
-
-  if (! base)
-    return Qnil;
-  XSETBUFFER (base_buffer, base);
-  return base_buffer;
+  struct buffer *base = decode_buffer (buffer)->base_buffer;
+  return base ? (XSETBUFFER (buffer, base), buffer) : Qnil;
 }
 
 DEFUN ("buffer-local-value", Fbuffer_local_value,
        Sbuffer_local_value, 2, 2, 0,
        doc: /* Return the value of VARIABLE in BUFFER.
 If VARIABLE does not have a buffer-local binding in BUFFER, the value
-is the default binding of the variable. */)
+is the default binding of the variable.  */)
   (register Lisp_Object variable, register Lisp_Object buffer)
 {
-  register Lisp_Object result = buffer_local_value_1 (variable, buffer);
+  register Lisp_Object result = buffer_local_value (variable, buffer);
 
   if (EQ (result, Qunbound))
     xsignal1 (Qvoid_variable, variable);
@@ -1178,7 +1176,7 @@ is the default binding of the variable. */)
    locally unbound.  */
 
 Lisp_Object
-buffer_local_value_1 (Lisp_Object variable, Lisp_Object buffer)
+buffer_local_value (Lisp_Object variable, Lisp_Object buffer)
 {
   register struct buffer *buf;
   register Lisp_Object result;
@@ -1278,20 +1276,10 @@ Most elements look like (SYMBOL . VALUE), describing one variable.
 For a symbol that is locally unbound, just the symbol appears in the value.
 Note that storing new VALUEs in these elements doesn't change the variables.
 No argument or nil as argument means use current buffer as BUFFER.  */)
-  (register Lisp_Object buffer)
+  (Lisp_Object buffer)
 {
-  register struct buffer *buf;
-  register Lisp_Object result;
-
-  if (NILP (buffer))
-    buf = current_buffer;
-  else
-    {
-      CHECK_BUFFER (buffer);
-      buf = XBUFFER (buffer);
-    }
-
-  result = buffer_lisp_local_variables (buf, 0);
+  struct buffer *buf = decode_buffer (buffer);
+  Lisp_Object result = buffer_lisp_local_variables (buf, 0);
 
   /* Add on all the variables stored in special slots.  */
   {
@@ -1318,17 +1306,9 @@ DEFUN ("buffer-modified-p", Fbuffer_modified_p, Sbuffer_modified_p,
        0, 1, 0,
        doc: /* Return t if BUFFER was modified since its file was last read or saved.
 No argument or nil as argument means use current buffer as BUFFER.  */)
-  (register Lisp_Object buffer)
+  (Lisp_Object buffer)
 {
-  register struct buffer *buf;
-  if (NILP (buffer))
-    buf = current_buffer;
-  else
-    {
-      CHECK_BUFFER (buffer);
-      buf = XBUFFER (buffer);
-    }
-
+  struct buffer *buf = decode_buffer (buffer);
   return BUF_SAVE_MODIFF (buf) < BUF_MODIFF (buf) ? Qt : Qnil;
 }
 
@@ -1383,7 +1363,6 @@ It is not ensured that mode lines will be updated to show the modified
 state of the current buffer.  Use with care.  */)
   (Lisp_Object flag)
 {
-#ifdef CLASH_DETECTION
   Lisp_Object fn;
 
   /* If buffer becoming modified, lock the file.
@@ -1403,7 +1382,6 @@ state of the current buffer.  Use with care.  */)
       else if (already && NILP (flag))
        unlock_file (fn);
     }
-#endif /* CLASH_DETECTION */
 
   /* Here we have a problem.  SAVE_MODIFF is used here to encode
      buffer-modified-p (as SAVE_MODIFF<MODIFF) as well as
@@ -1436,16 +1414,7 @@ text in that buffer is changed.  It wraps around occasionally.
 No argument or nil as argument means use current buffer as BUFFER.  */)
   (register Lisp_Object buffer)
 {
-  register struct buffer *buf;
-  if (NILP (buffer))
-    buf = current_buffer;
-  else
-    {
-      CHECK_BUFFER (buffer);
-      buf = XBUFFER (buffer);
-    }
-
-  return make_number (BUF_MODIFF (buf));
+  return make_number (BUF_MODIFF (decode_buffer (buffer)));
 }
 
 DEFUN ("buffer-chars-modified-tick", Fbuffer_chars_modified_tick,
@@ -1460,16 +1429,7 @@ between these calls.  No argument or nil as argument means use current
 buffer as BUFFER.  */)
   (register Lisp_Object buffer)
 {
-  register struct buffer *buf;
-  if (NILP (buffer))
-    buf = current_buffer;
-  else
-    {
-      CHECK_BUFFER (buffer);
-      buf = XBUFFER (buffer);
-    }
-
-  return make_number (BUF_CHARS_MODIFF (buf));
+  return make_number (BUF_CHARS_MODIFF (decode_buffer (buffer)));
 }
 \f
 DEFUN ("rename-buffer", Frename_buffer, Srename_buffer, 1, 2,
@@ -1549,7 +1509,7 @@ frame's buffer list.
 The buffer is found by scanning the selected or specified frame's buffer
 list first, followed by the list of all buffers.  If no other buffer
 exists, return the buffer `*scratch*' (creating it if necessary).  */)
-  (register Lisp_Object buffer, Lisp_Object visible_ok, Lisp_Object frame)
+  (Lisp_Object buffer, Lisp_Object visible_ok, Lisp_Object frame)
 {
   struct frame *f = decode_any_frame (frame);
   Lisp_Object tail = f->buffer_list, pred = f->buffer_predicate;
@@ -1592,10 +1552,11 @@ exists, return the buffer `*scratch*' (creating it if necessary).  */)
     return notsogood;
   else
     {
-      buf = Fget_buffer (build_string ("*scratch*"));
+      AUTO_STRING (scratch, "*scratch*");
+      buf = Fget_buffer (scratch);
       if (NILP (buf))
        {
-         buf = Fget_buffer_create (build_string ("*scratch*"));
+         buf = Fget_buffer_create (scratch);
          Fset_buffer_major_mode (buf);
        }
       return buf;
@@ -1615,10 +1576,11 @@ other_buffer_safely (Lisp_Object buffer)
     if (candidate_buffer (buf, buffer))
       return buf;
 
-  buf = Fget_buffer (build_string ("*scratch*"));
+  AUTO_STRING (scratch, "*scratch*");
+  buf = Fget_buffer (scratch);
   if (NILP (buf))
     {
-      buf = Fget_buffer_create (build_string ("*scratch*"));
+      buf = Fget_buffer_create (scratch);
       Fset_buffer_major_mode (buf);
     }
 
@@ -1823,10 +1785,8 @@ cleaning up all windows currently displaying the buffer to be killed. */)
 
   /* Now there is no question: we can kill the buffer.  */
 
-#ifdef CLASH_DETECTION
   /* Unlock this buffer's file, if it is locked.  */
   unlock_buffer (b);
-#endif /* CLASH_DETECTION */
 
   GCPRO1 (buffer);
   kill_buffer_processes (buffer);
@@ -2430,6 +2390,14 @@ DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text,
                       make_number
                       (BUF_BEGV (XBUFFER (XWINDOW (w)->contents))),
                       XWINDOW (w)->contents);
+       /* Blindly copied from pointm part.  */
+       if (MARKERP (XWINDOW (w)->old_pointm)
+           && (EQ (XWINDOW (w)->contents, buf1)
+               || EQ (XWINDOW (w)->contents, buf2)))
+         Fset_marker (XWINDOW (w)->old_pointm,
+                      make_number
+                      (BUF_BEGV (XBUFFER (XWINDOW (w)->contents))),
+                      XWINDOW (w)->contents);
        if (MARKERP (XWINDOW (w)->start)
            && (EQ (XWINDOW (w)->contents, buf1)
                || EQ (XWINDOW (w)->contents, buf2)))
@@ -2534,7 +2502,7 @@ current buffer is cleared.  */)
              p = GAP_END_ADDR;
              stop = Z;
            }
-         if (ASCII_BYTE_P (*p))
+         if (ASCII_CHAR_P (*p))
            p++, pos++;
          else if (CHAR_BYTE8_HEAD_P (*p))
            {
@@ -2606,7 +2574,7 @@ current buffer is cleared.  */)
              stop = Z;
            }
 
-         if (ASCII_BYTE_P (*p))
+         if (ASCII_CHAR_P (*p))
            p++, pos++;
          else if (EQ (flag, Qt)
                   && ! CHAR_BYTE8_HEAD_P (*p)
@@ -3087,13 +3055,15 @@ mouse_face_overlay_overlaps (Lisp_Object overlay)
   ptrdiff_t end = OVERLAY_POSITION (OVERLAY_END (overlay));
   ptrdiff_t n, i, size;
   Lisp_Object *v, tem;
+  Lisp_Object vbuf[10];
+  USE_SAFE_ALLOCA;
 
-  size = 10;
-  v = alloca (size * sizeof *v);
+  size = ARRAYELTS (vbuf);
+  v = vbuf;
   n = overlays_in (start, end, 0, &v, &size, NULL, NULL);
   if (n > size)
     {
-      v = alloca (n * sizeof *v);
+      SAFE_NALLOCA (v, 1, n);
       overlays_in (start, end, 0, &v, &n, NULL, NULL);
     }
 
@@ -3103,6 +3073,7 @@ mouse_face_overlay_overlaps (Lisp_Object overlay)
            !NILP (tem)))
       break;
 
+  SAFE_FREE ();
   return i < n;
 }
 
@@ -4116,17 +4087,7 @@ BUFFER omitted or nil means delete all overlays of the current
 buffer.  */)
   (Lisp_Object buffer)
 {
-  register struct buffer *buf;
-
-  if (NILP (buffer))
-    buf = current_buffer;
-  else
-    {
-      CHECK_BUFFER (buffer);
-      buf = XBUFFER (buffer);
-    }
-
-  delete_all_overlays (buf);
+  delete_all_overlays (decode_buffer (buffer));
   return Qnil;
 }
 \f
@@ -4561,13 +4522,13 @@ report_overlay_modification (Lisp_Object start, Lisp_Object end, bool after,
        First copy the vector contents, in case some of these hooks
        do subsequent modification of the buffer.  */
     ptrdiff_t size = last_overlay_modification_hooks_used;
-    Lisp_Object *copy = alloca (size * sizeof *copy);
+    Lisp_Object *copy;
     ptrdiff_t i;
 
+    USE_SAFE_ALLOCA;
+    SAFE_ALLOCA_LISP (copy, size);
     memcpy (copy, XVECTOR (last_overlay_modification_hooks)->contents,
            size * word_size);
-    gcpro1.var = copy;
-    gcpro1.nvars = size;
 
     for (i = 0; i < size;)
       {
@@ -4576,6 +4537,8 @@ report_overlay_modification (Lisp_Object start, Lisp_Object end, bool after,
        overlay_i = copy[i++];
        call_overlay_mod_hooks (prop_i, overlay_i, after, arg1, arg2, arg3);
       }
+
+    SAFE_FREE ();
   }
   UNGCPRO;
 }
@@ -4640,7 +4603,8 @@ evaporate_overlays (ptrdiff_t pos)
                         Allocation with mmap
  ***********************************************************************/
 
-#ifdef USE_MMAP_FOR_BUFFERS
+/* Note: WINDOWSNT implements this stuff on w32heap.c.  */
+#if defined USE_MMAP_FOR_BUFFERS && !defined WINDOWSNT
 
 #include <sys/mman.h>
 
@@ -4706,11 +4670,6 @@ static struct mmap_region *mmap_regions;
 
 static int mmap_fd;
 
-/* Temporary storage for mmap_set_vars, see there.  */
-
-static struct mmap_region *mmap_regions_1;
-static int mmap_fd_1;
-
 /* Page size on this system.  */
 
 static int mmap_page_size;
@@ -4782,36 +4741,6 @@ mmap_init (void)
   mmap_page_size = getpagesize ();
 }
 
-/* Return a region overlapping address range START...END, or null if
-   none.  END is not including, i.e. the last byte in the range
-   is at END - 1.  */
-
-static struct mmap_region *
-mmap_find (void *start, void *end)
-{
-  struct mmap_region *r;
-  char *s = start, *e = end;
-
-  for (r = mmap_regions; r; r = r->next)
-    {
-      char *rstart = (char *) r;
-      char *rend   = rstart + r->nbytes_mapped;
-
-      if (/* First byte of range, i.e. START, in this region?  */
-         (s >= rstart && s < rend)
-         /* Last byte of range, i.e. END - 1, in this region?  */
-         || (e > rstart && e <= rend)
-         /* First byte of this region in the range?  */
-         || (rstart >= s && rstart < e)
-         /* Last byte of this region in the range?  */
-         || (rend > s && rend <= e))
-       break;
-    }
-
-  return r;
-}
-
-
 /* Unmap a region.  P is a pointer to the start of the user-araa of
    the region.  */
 
@@ -4888,38 +4817,6 @@ mmap_enlarge (struct mmap_region *r, int npages)
 }
 
 
-/* Set or reset variables holding references to mapped regions.
-   If not RESTORE_P, set all variables to null.  If RESTORE_P, set all
-   variables to the start of the user-areas of mapped regions.
-
-   This function is called from Fdump_emacs to ensure that the dumped
-   Emacs doesn't contain references to memory that won't be mapped
-   when Emacs starts.  */
-
-void
-mmap_set_vars (bool restore_p)
-{
-  struct mmap_region *r;
-
-  if (restore_p)
-    {
-      mmap_regions = mmap_regions_1;
-      mmap_fd = mmap_fd_1;
-      for (r = mmap_regions; r; r = r->next)
-       *r->var = MMAP_USER_AREA (r);
-    }
-  else
-    {
-      for (r = mmap_regions; r; r = r->next)
-       *r->var = NULL;
-      mmap_regions_1 = mmap_regions;
-      mmap_regions = NULL;
-      mmap_fd_1 = mmap_fd;
-      mmap_fd = -1;
-    }
-}
-
-
 /* Allocate a block of storage large enough to hold NBYTES bytes of
    data.  A pointer to the data is returned in *VAR.  VAR is thus the
    address of some variable which will use the data area.
@@ -5224,7 +5121,9 @@ init_buffer_once (void)
   bset_right_fringe_width (&buffer_defaults, Qnil);
   bset_fringes_outside_margins (&buffer_defaults, Qnil);
   bset_scroll_bar_width (&buffer_defaults, Qnil);
+  bset_scroll_bar_height (&buffer_defaults, Qnil);
   bset_vertical_scroll_bar_type (&buffer_defaults, Qt);
+  bset_horizontal_scroll_bar_type (&buffer_defaults, Qt);
   bset_indicate_empty_lines (&buffer_defaults, Qnil);
   bset_indicate_buffer_boundaries (&buffer_defaults, Qnil);
   bset_fringe_indicator_alist (&buffer_defaults, Qnil);
@@ -5292,7 +5191,9 @@ init_buffer_once (void)
   XSETFASTINT (BVAR (&buffer_local_flags, right_fringe_width), idx); ++idx;
   XSETFASTINT (BVAR (&buffer_local_flags, fringes_outside_margins), idx); ++idx;
   XSETFASTINT (BVAR (&buffer_local_flags, scroll_bar_width), idx); ++idx;
+  XSETFASTINT (BVAR (&buffer_local_flags, scroll_bar_height), idx); ++idx;
   XSETFASTINT (BVAR (&buffer_local_flags, vertical_scroll_bar_type), idx); ++idx;
+  XSETFASTINT (BVAR (&buffer_local_flags, horizontal_scroll_bar_type), idx); ++idx;
   XSETFASTINT (BVAR (&buffer_local_flags, indicate_empty_lines), idx); ++idx;
   XSETFASTINT (BVAR (&buffer_local_flags, indicate_buffer_boundaries), idx); ++idx;
   XSETFASTINT (BVAR (&buffer_local_flags, fringe_indicator_alist), idx); ++idx;
@@ -5337,26 +5238,61 @@ init_buffer_once (void)
 }
 
 void
-init_buffer (void)
+init_buffer (int initialized)
 {
   char *pwd;
   Lisp_Object temp;
   ptrdiff_t len;
 
 #ifdef USE_MMAP_FOR_BUFFERS
- {
-   /* When using the ralloc implementation based on mmap(2), buffer
-      text pointers will have been set to null in the dumped Emacs.
-      Map new memory.  */
-   struct buffer *b;
-
-   FOR_EACH_BUFFER (b)
-     if (b->text->beg == NULL)
-       enlarge_buffer_text (b, 0);
- }
+  if (initialized)
+    {
+      struct buffer *b;
+
+#ifndef WINDOWSNT
+      /* These must be reset in the dumped Emacs, to avoid stale
+        references to mmap'ed memory from before the dump.
+
+        WINDOWSNT doesn't need this because it doesn't track mmap'ed
+        regions by hand (see w32heap.c, which uses system APIs for
+        that purpose), and thus doesn't use mmap_regions.  */
+      mmap_regions = NULL;
+      mmap_fd = -1;
+#endif
+
+      /* The dumped buffers reference addresses of buffer text
+        recorded by temacs, that cannot be used by the dumped Emacs.
+        We map new memory for their text here.
+
+        Implementation note: the buffers we carry from temacs are:
+        " prin1", "*scratch*", " *Minibuf-0*", "*Messages*", and
+        " *code-conversion-work*".  They are created by
+        init_buffer_once and init_window_once (which are not called
+        in the dumped Emacs), and by the first call to coding.c routines.  */
+      FOR_EACH_BUFFER (b)
+        {
+         b->text->beg = NULL;
+         enlarge_buffer_text (b, 0);
+       }
+    }
+  else
+    {
+      struct buffer *b;
+
+      /* Only buffers with allocated buffer text should be present at
+        this point in temacs.  */
+      FOR_EACH_BUFFER (b)
+        {
+         eassert (b->text->beg != NULL);
+       }
+    }
+#else  /* not USE_MMAP_FOR_BUFFERS */
+  /* Avoid compiler warnings.  */
+  (void) initialized;
 #endif /* USE_MMAP_FOR_BUFFERS */
 
-  Fset_buffer (Fget_buffer_create (build_string ("*scratch*")));
+  AUTO_STRING (scratch, "*scratch*");
+  Fset_buffer (Fget_buffer_create (scratch));
   if (NILP (BVAR (&buffer_defaults, enable_multibyte_characters)))
     Fset_buffer_multibyte (Qnil);
 
@@ -5393,9 +5329,12 @@ init_buffer (void)
         However, it is not necessary to turn / into /:/.
         So avoid doing that.  */
       && strcmp ("/", SSDATA (BVAR (current_buffer, directory))))
-    bset_directory
-      (current_buffer,
-       concat2 (build_string ("/:"), BVAR (current_buffer, directory)));
+    {
+      AUTO_STRING (slash_colon, "/:");
+      bset_directory (current_buffer,
+                     concat2 (slash_colon,
+                              BVAR (current_buffer, directory)));
+    }
 
   temp = get_minibuffer (0);
   bset_directory (XBUFFER (temp), BVAR (current_buffer, directory));
@@ -5458,6 +5397,11 @@ syms_of_buffer (void)
   staticpro (&Qpermanent_local);
   staticpro (&Qkill_buffer_hook);
 
+  DEFSYM (Qchoice, "choice");
+  DEFSYM (Qleft, "left");
+  DEFSYM (Qright, "right");
+  DEFSYM (Qrange, "range");
+
   DEFSYM (Qpermanent_local_hook, "permanent-local-hook");
   DEFSYM (Qoverlayp, "overlayp");
   DEFSYM (Qevaporate, "evaporate");
@@ -5473,6 +5417,18 @@ syms_of_buffer (void)
   DEFSYM (Qafter_change_functions, "after-change-functions");
   DEFSYM (Qkill_buffer_query_functions, "kill-buffer-query-functions");
 
+  DEFSYM (Qvertical_scroll_bar, "vertical-scroll-bar");
+  Fput (Qvertical_scroll_bar, Qchoice, list4 (Qnil, Qt, Qleft, Qright));
+  DEFSYM (Qhorizontal_scroll_bar, "horizontal-scroll-bar");
+
+  DEFSYM (Qfraction, "fraction");
+  Fput (Qfraction, Qrange, Fcons (make_float (0.0), make_float (1.0)));
+
+  DEFSYM (Qoverwrite_mode, "overwrite-mode");
+  Fput (Qoverwrite_mode, Qchoice,
+       list3 (Qnil, intern ("overwrite-mode-textual"),
+              intern ("overwrite-mode-binary")));
+
   Fput (Qprotected_field, Qerror_conditions,
        listn (CONSTYPE_PURE, 2, Qprotected_field, Qerror));
   Fput (Qprotected_field, Qerror_message,
@@ -5878,7 +5834,8 @@ in a file, save the ^M as a newline.  */);
                     Qnil,
                     doc: /* Non-nil means display ... on previous line when a line is invisible.  */);
 
-  DEFVAR_PER_BUFFER ("overwrite-mode", &BVAR (current_buffer, overwrite_mode), Qnil,
+  DEFVAR_PER_BUFFER ("overwrite-mode", &BVAR (current_buffer, overwrite_mode),
+                    Qoverwrite_mode,
                     doc: /* Non-nil if self-insertion should replace existing text.
 The value should be one of `overwrite-mode-textual',
 `overwrite-mode-binary', or nil.
@@ -5968,11 +5925,16 @@ in a window.  To make the change take effect, call `set-window-buffer'.  */);
 
   DEFVAR_PER_BUFFER ("scroll-bar-width", &BVAR (current_buffer, scroll_bar_width),
                     Qintegerp,
-                    doc: /* Width of this buffer's scroll bars in pixels.
+                    doc: /* Width of this buffer's vertical scroll bars in pixels.
 A value of nil means to use the scroll bar width from the window's frame.  */);
 
+  DEFVAR_PER_BUFFER ("scroll-bar-height", &BVAR (current_buffer, scroll_bar_height),
+                    Qintegerp,
+                    doc: /* Height of this buffer's horizontal scroll bars in pixels.
+A value of nil means to use the scroll bar height from the window's frame.  */);
+
   DEFVAR_PER_BUFFER ("vertical-scroll-bar", &BVAR (current_buffer, vertical_scroll_bar_type),
-                    Qnil,
+                    Qvertical_scroll_bar,
                     doc: /* Position of this buffer's vertical scroll bar.
 The value takes effect whenever you tell a window to display this buffer;
 for instance, with `set-window-buffer' or when `display-buffer' displays it.
@@ -5981,6 +5943,17 @@ A value of `left' or `right' means put the vertical scroll bar at that side
 of the window; a value of nil means don't show any vertical scroll bars.
 A value of t (the default) means do whatever the window's frame specifies.  */);
 
+  DEFVAR_PER_BUFFER ("horizontal-scroll-bar", &BVAR (current_buffer, horizontal_scroll_bar_type),
+                    Qnil,
+                    doc: /* Position of this buffer's horizontal scroll bar.
+The value takes effect whenever you tell a window to display this buffer;
+for instance, with `set-window-buffer' or when `display-buffer' displays it.
+
+A value of `bottom' means put the horizontal scroll bar at the bottom of
+the window; a value of nil means don't show any horizontal scroll bars.
+A value of t (the default) means do whatever the window's frame
+specifies.  */);
+
   DEFVAR_PER_BUFFER ("indicate-empty-lines",
                     &BVAR (current_buffer, indicate_empty_lines), Qnil,
                     doc: /* Visually indicate empty lines after the buffer end.
@@ -6047,7 +6020,7 @@ BITMAP is the corresponding fringe bitmap shown for the logical
 cursor type.  */);
 
   DEFVAR_PER_BUFFER ("scroll-up-aggressively",
-                    &BVAR (current_buffer, scroll_up_aggressively), Qfloatp,
+                    &BVAR (current_buffer, scroll_up_aggressively), Qfraction,
                     doc: /* How far to scroll windows upward.
 If you move point off the bottom, the window scrolls automatically.
 This variable controls how far it scrolls.  The value nil, the default,
@@ -6060,7 +6033,7 @@ window scrolls by a full window height.  Meaningful values are
 between 0.0 and 1.0, inclusive.  */);
 
   DEFVAR_PER_BUFFER ("scroll-down-aggressively",
-                    &BVAR (current_buffer, scroll_down_aggressively), Qfloatp,
+                    &BVAR (current_buffer, scroll_down_aggressively), Qfraction,
                     doc: /* How far to scroll windows downward.
 If you move point off the top, the window scrolls automatically.
 This variable controls how far it scrolls.  The value nil, the default,
index de117eb9c61a15a9a42f1e5f5e86f9bd6b93cffd..284cfa7b4a8d2bae2c7ce213109e4785db499485 100644 (file)
@@ -694,10 +694,12 @@ struct buffer
      othersize draw them between margin areas and text.  */
   Lisp_Object INTERNAL_FIELD (fringes_outside_margins);
 
-  /* Width and type of scroll bar areas for windows displaying
+  /* Width, height and types of scroll bar areas for windows displaying
      this buffer.  */
   Lisp_Object INTERNAL_FIELD (scroll_bar_width);
+  Lisp_Object INTERNAL_FIELD (scroll_bar_height);
   Lisp_Object INTERNAL_FIELD (vertical_scroll_bar_type);
+  Lisp_Object INTERNAL_FIELD (horizontal_scroll_bar_type);
 
   /* Non-nil means indicate lines not displaying text (in a style
      like vi).  */
@@ -1079,13 +1081,21 @@ extern ptrdiff_t overlay_strings (ptrdiff_t, struct window *, unsigned char **);
 extern void validate_region (Lisp_Object *, Lisp_Object *);
 extern void set_buffer_internal_1 (struct buffer *);
 extern void set_buffer_temp (struct buffer *);
-extern Lisp_Object buffer_local_value_1 (Lisp_Object, Lisp_Object);
+extern Lisp_Object buffer_local_value (Lisp_Object, Lisp_Object);
 extern void record_buffer (Lisp_Object);
 extern void fix_overlays_before (struct buffer *, ptrdiff_t, ptrdiff_t);
 extern void mmap_set_vars (bool);
 extern void restore_buffer (Lisp_Object);
 extern void set_buffer_if_live (Lisp_Object);
 
+/* Return B as a struct buffer pointer, defaulting to the current buffer.  */
+
+INLINE struct buffer *
+decode_buffer (Lisp_Object b)
+{
+  return NILP (b) ? current_buffer : (CHECK_BUFFER (b), XBUFFER (b));
+}
+
 /* Set the current buffer to B.
 
    We previously set windows_or_buffers_changed here to invalidate
@@ -1118,15 +1128,15 @@ record_unwind_current_buffer (void)
 #define GET_OVERLAYS_AT(posn, overlays, noverlays, nextp, chrq)                \
   do {                                                                 \
     ptrdiff_t maxlen = 40;                                             \
-    overlays = alloca (maxlen * sizeof *overlays);                     \
-    noverlays = overlays_at (posn, false, &overlays, &maxlen,          \
-                            nextp, NULL, chrq);                        \
-    if (noverlays > maxlen)                                            \
+    SAFE_NALLOCA (overlays, 1, maxlen);                                        \
+    (noverlays) = overlays_at (posn, false, &(overlays), &maxlen,      \
+                              nextp, NULL, chrq);                      \
+    if ((noverlays) > maxlen)                                          \
       {                                                                        \
        maxlen = noverlays;                                             \
-       overlays = alloca (maxlen * sizeof *overlays);                  \
-       noverlays = overlays_at (posn, false, &overlays, &maxlen,       \
-                                nextp, NULL, chrq);                    \
+       SAFE_NALLOCA (overlays, 1, maxlen);                             \
+       (noverlays) = overlays_at (posn, false, &(overlays), &maxlen,   \
+                                  nextp, NULL, chrq);                  \
       }                                                                        \
   } while (false)
 
@@ -1135,6 +1145,8 @@ extern Lisp_Object Qbefore_change_functions;
 extern Lisp_Object Qafter_change_functions;
 extern Lisp_Object Qfirst_change_hook;
 extern Lisp_Object Qpriority, Qbefore_string, Qafter_string;
+extern Lisp_Object Qchoice, Qrange, Qleft, Qright;
+extern Lisp_Object Qvertical_scroll_bar, Qhorizontal_scroll_bar;
 
 /* FOR_EACH_LIVE_BUFFER (LIST_VAR, BUF_VAR) followed by a statement is
    a `for' loop which iterates over the buffers from Vbuffer_alist.  */
index f1bdfd9d9c5f28c87851c0f19e4e4a88598d9a57..d3c8b470cc3dc070879dc44c8affd8b3314e6af5 100644 (file)
@@ -36,8 +36,10 @@ by Hallvard:
 #include <config.h>
 
 #include "lisp.h"
+#include "blockinput.h"
 #include "character.h"
 #include "buffer.h"
+#include "keyboard.h"
 #include "syntax.h"
 #include "window.h"
 
@@ -292,8 +294,6 @@ enum byte_code_op
     Bscan_buffer = 0153, /* No longer generated as of v18.  */
     Bset_mark = 0163, /* this loser is no longer generated as of v18 */
 #endif
-
-    B__dummy__ = 0  /* Pacify C89.  */
 };
 
 /* Whether to maintain a `top' and `bottom' field in the stack frame.  */
@@ -390,7 +390,11 @@ unmark_byte_stack (void)
 \f
 /* Fetch the next byte from the bytecode stream.  */
 
+#ifdef BYTE_CODE_SAFE
+#define FETCH (eassert (stack.byte_string_start == SDATA (stack.byte_string)), *stack.pc++)
+#else
 #define FETCH *stack.pc++
+#endif
 
 /* Fetch two bytes from the bytecode stream and make a 16-bit number
    out of them.  */
@@ -1104,9 +1108,6 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
          goto pushhandler;
        CASE (Bpushconditioncase): /* New in 24.4.  */
          {
-           extern EMACS_INT lisp_eval_depth;
-           extern int poll_suppress_count;
-           extern int interrupt_input_blocked;
            struct handler *c;
            Lisp_Object tag;
            int dest;
index 35411bf9b5c08512dc507b7a7d7da7d8f9622782..9a4573c77be7e701e07c4fe3ff259cd1a5b33b86 100644 (file)
@@ -29,7 +29,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "keymap.h"
 
 Lisp_Object Qminus, Qplus;
-static Lisp_Object Qcall_interactively;
+static Lisp_Object Qfuncall_interactively;
 static Lisp_Object Qcommand_debug_status;
 static Lisp_Object Qenable_recursive_minibuffers;
 
@@ -38,8 +38,8 @@ static Lisp_Object Qread_number;
 
 Lisp_Object Qmouse_leave_buffer_hook;
 
-static Lisp_Object Qlist, Qlet, Qletx, Qsave_excursion, Qprogn, Qif;
-Lisp_Object Qwhen;
+static Lisp_Object Qlist, Qlet, Qletx, Qsave_excursion, Qif;
+Lisp_Object Qwhen, Qprogn;
 static Lisp_Object preserved_fns;
 
 /* Marker used within call-interactively to refer to point.  */
@@ -233,6 +233,43 @@ fix_command (Lisp_Object input, Lisp_Object values)
     }
 }
 
+/* Helper function to call `read-file-name' from C.  */
+
+static Lisp_Object
+read_file_name (Lisp_Object default_filename, Lisp_Object mustmatch,
+               Lisp_Object initial, Lisp_Object predicate)
+{
+  struct gcpro gcpro1;
+  Lisp_Object args[7];
+
+  GCPRO1 (default_filename);
+  args[0] = intern ("read-file-name");
+  args[1] = callint_message;
+  args[2] = Qnil;
+  args[3] = default_filename;
+  args[4] = mustmatch;
+  args[5] = initial;
+  args[6] = predicate;
+  RETURN_UNGCPRO (Ffuncall (7, args));
+}
+
+/* BEWARE: Calling this directly from C would defeat the purpose!  */
+DEFUN ("funcall-interactively", Ffuncall_interactively, Sfuncall_interactively,
+       1, MANY, 0, doc: /* Like `funcall' but marks the call as interactive.
+I.e. arrange that within the called function `called-interactively-p' will
+return non-nil.
+usage: (funcall-interactively FUNCTION &rest ARGUMENTS)  */)
+     (ptrdiff_t nargs, Lisp_Object *args)
+{
+  ptrdiff_t speccount = SPECPDL_INDEX ();
+  temporarily_switch_to_single_kboard (NULL);
+
+  /* Nothing special to do here, all the work is inside
+     `called-interactively-p'.  Which will look for us as a marker in the
+     backtrace.  */
+  return unbind_to (speccount, Ffuncall (nargs, args));
+}
+
 DEFUN ("call-interactively", Fcall_interactively, Scall_interactively, 1, 3, 0,
        doc: /* Call FUNCTION, providing args according to its interactive calling specs.
 Return the value FUNCTION returns.
@@ -260,6 +297,7 @@ invoke it.  If KEYS is omitted or nil, the return value of
   Lisp_Object teml;
   Lisp_Object up_event;
   Lisp_Object enable;
+  USE_SAFE_ALLOCA;
   ptrdiff_t speccount = SPECPDL_INDEX ();
 
   /* The index of the next element of this_command_keys to examine for
@@ -329,12 +367,8 @@ invoke it.  If KEYS is omitted or nil, the return value of
       wrong_type_argument (Qcommandp, function);
   }
 
-  /* If SPECS is set to a string, use it as an interactive prompt.  */
-  if (STRINGP (specs))
-    /* Make a copy of string so that if a GC relocates specs,
-       `string' will still be valid.  */
-    string = xlispstrdupa (specs);
-  else
+  /* If SPECS is not a string, invent one.  */
+  if (! STRINGP (specs))
     {
       Lisp_Object input;
       Lisp_Object funval = Findirect_function (function, Qt);
@@ -374,10 +408,21 @@ invoke it.  If KEYS is omitted or nil, the return value of
       Vreal_this_command = save_real_this_command;
       kset_last_command (current_kboard, save_last_command);
 
-      temporarily_switch_to_single_kboard (NULL);
-      return unbind_to (speccount, apply1 (function, specs));
+      {
+       Lisp_Object args[3];
+       args[0] = Qfuncall_interactively;
+       args[1] = function;
+       args[2] = specs;
+       Lisp_Object result = unbind_to (speccount, Fapply (3, args));
+       SAFE_FREE ();
+       return result;
+      }
     }
 
+  /* SPECS is set to a string; use it as an interactive prompt.
+     Copy it so that STRING will be valid even if a GC relocates SPECS.  */
+  SAFE_ALLOCA_STRING (string, specs);
+
   /* Here if function specifies a string to control parsing the defaults.  */
 
   /* Set next_event to point to the first event with parameters.  */
@@ -446,10 +491,11 @@ invoke it.  If KEYS is omitted or nil, the return value of
       else break;
     }
 
-  /* Count the number of arguments, which is one plus the number of arguments
-     the interactive spec would have us give to the function.  */
+  /* Count the number of arguments, which is two (the function itself and
+     `funcall-interactively') plus the number of arguments the interactive spec
+     would have us give to the function.  */
   tem = string;
-  for (nargs = 1; *tem; )
+  for (nargs = 2; *tem; )
     {
       /* 'r' specifications ("point and mark as 2 numeric args")
         produce *two* arguments.  */
@@ -464,14 +510,15 @@ invoke it.  If KEYS is omitted or nil, the return value of
        break;
     }
 
-  if (min (MOST_POSITIVE_FIXNUM,
-          min (PTRDIFF_MAX, SIZE_MAX) / word_size)
-      < nargs)
+  if (MOST_POSITIVE_FIXNUM < min (PTRDIFF_MAX, SIZE_MAX) / word_size
+      && MOST_POSITIVE_FIXNUM < nargs)
     memory_full (SIZE_MAX);
 
-  args = alloca (nargs * sizeof *args);
-  visargs = alloca (nargs * sizeof *visargs);
-  varies = alloca (nargs * sizeof *varies);
+  /* Allocate them all at one go.  This wastes a bit of memory, but
+     it's OK to trade space for speed.  */
+  SAFE_NALLOCA (args, 3, nargs);
+  visargs = args + nargs;
+  varies = (signed char *) (visargs + nargs);
 
   for (i = 0; i < nargs; i++)
     {
@@ -488,13 +535,13 @@ invoke it.  If KEYS is omitted or nil, the return value of
     specbind (Qenable_recursive_minibuffers, Qt);
 
   tem = string;
-  for (i = 1; *tem; i++)
+  for (i = 2; *tem; i++)
     {
-      visargs[0] = make_string (tem + 1, strcspn (tem + 1, "\n"));
-      if (strchr (SSDATA (visargs[0]), '%'))
-       callint_message = Fformat (i, visargs);
+      visargs[1] = make_string (tem + 1, strcspn (tem + 1, "\n"));
+      if (strchr (SSDATA (visargs[1]), '%'))
+       callint_message = Fformat (i - 1, visargs + 1);
       else
-       callint_message = visargs[0];
+       callint_message = visargs[1];
 
       switch (*tem)
        {
@@ -551,25 +598,21 @@ invoke it.  If KEYS is omitted or nil, the return value of
          break;
 
        case 'D':               /* Directory name.  */
-         args[i] = Fread_file_name (callint_message, Qnil,
-                                    BVAR (current_buffer, directory), Qlambda, Qnil,
-                                    Qfile_directory_p);
+         args[i] = read_file_name (BVAR (current_buffer, directory), Qlambda, Qnil,
+                                   Qfile_directory_p);
          break;
 
        case 'f':               /* Existing file name.  */
-         args[i] = Fread_file_name (callint_message,
-                                    Qnil, Qnil, Qlambda, Qnil, Qnil);
+         args[i] = read_file_name (Qnil, Qlambda, Qnil, Qnil);
          break;
 
        case 'F':               /* Possibly nonexistent file name.  */
-         args[i] = Fread_file_name (callint_message,
-                                    Qnil, Qnil, Qnil, Qnil, Qnil);
+         args[i] = read_file_name (Qnil, Qnil, Qnil, Qnil);
          break;
 
        case 'G':               /* Possibly nonexistent file name,
                                   default to directory alone.  */
-         args[i] = Fread_file_name (callint_message,
-                                    Qnil, Qnil, Qnil, empty_unibyte_string, Qnil);
+         args[i] = read_file_name (Qnil, Qnil, empty_unibyte_string, Qnil);
          break;
 
        case 'i':               /* Ignore an argument -- Does not do I/O.  */
@@ -789,21 +832,22 @@ invoke it.  If KEYS is omitted or nil, the return value of
 
   QUIT;
 
-  args[0] = function;
+  args[0] = Qfuncall_interactively;
+  args[1] = function;
 
   if (arg_from_tty || !NILP (record_flag))
     {
       /* We don't need `visargs' any more, so let's recycle it since we need
         an array of just the same size.  */
-      visargs[0] = function;
-      for (i = 1; i < nargs; i++)
+      visargs[1] = function;
+      for (i = 2; i < nargs; i++)
        {
          if (varies[i] > 0)
            visargs[i] = list1 (intern (callint_argfuns[varies[i]]));
          else
            visargs[i] = quotify_arg (args[i]);
        }
-      Vcommand_history = Fcons (Flist (nargs, visargs),
+      Vcommand_history = Fcons (Flist (nargs - 1, visargs + 1),
                                Vcommand_history);
       /* Don't keep command history around forever.  */
       if (INTEGERP (Vhistory_length) && XINT (Vhistory_length) > 0)
@@ -816,7 +860,7 @@ invoke it.  If KEYS is omitted or nil, the return value of
 
   /* If we used a marker to hold point, mark, or an end of the region,
      temporarily, convert it to an integer now.  */
-  for (i = 1; i < nargs; i++)
+  for (i = 2; i < nargs; i++)
     if (varies[i] >= 1 && varies[i] <= 4)
       XSETINT (args[i], marker_position (args[i]));
 
@@ -829,13 +873,11 @@ invoke it.  If KEYS is omitted or nil, the return value of
   kset_last_command (current_kboard, save_last_command);
 
   {
-    Lisp_Object val;
-    specbind (Qcommand_debug_status, Qnil);
-
-    temporarily_switch_to_single_kboard (NULL);
-    val = Ffuncall (nargs, args);
+    Lisp_Object val = Ffuncall (nargs, args);
     UNGCPRO;
-    return unbind_to (speccount, val);
+    val = unbind_to (speccount, val);
+    SAFE_FREE ();
+    return val;
   }
 }
 
@@ -888,7 +930,7 @@ syms_of_callint (void)
   DEFSYM (Qplus, "+");
   DEFSYM (Qhandle_shift_selection, "handle-shift-selection");
   DEFSYM (Qread_number, "read-number");
-  DEFSYM (Qcall_interactively, "call-interactively");
+  DEFSYM (Qfuncall_interactively, "funcall-interactively");
   DEFSYM (Qcommand_debug_status, "command-debug-status");
   DEFSYM (Qenable_recursive_minibuffers, "enable-recursive-minibuffers");
   DEFSYM (Qmouse_leave_buffer_hook, "mouse-leave-buffer-hook");
@@ -946,5 +988,6 @@ a way to turn themselves off when a mouse command switches windows.  */);
 
   defsubr (&Sinteractive);
   defsubr (&Scall_interactively);
+  defsubr (&Sfuncall_interactively);
   defsubr (&Sprefix_numeric_value);
 }
index 7ba3e398b41e9f6cace04b6175444d68c68d8be7..e3dcc7bbccac254476230f9473091f2ad1797bf5 100644 (file)
@@ -105,29 +105,6 @@ enum
 
 static Lisp_Object call_process (ptrdiff_t, Lisp_Object *, int, ptrdiff_t);
 \f
-
-#ifndef MSDOS
-/* Block SIGCHLD.  */
-
-void
-block_child_signal (void)
-{
-  sigset_t blocked;
-  sigemptyset (&blocked);
-  sigaddset (&blocked, SIGCHLD);
-  pthread_sigmask (SIG_BLOCK, &blocked, 0);
-}
-
-/* Unblock SIGCHLD.  */
-
-void
-unblock_child_signal (void)
-{
-  pthread_sigmask (SIG_SETMASK, &empty_mask, 0);
-}
-
-#endif /* !MSDOS */
-
 /* Return the current buffer's working directory, or the home
    directory if it's unreachable, as a string suitable for a system call.
    Signal an error if the result would not be an accessible directory.  */
@@ -152,7 +129,7 @@ encode_current_directory (void)
 
   if (STRING_MULTIBYTE (dir))
     dir = ENCODE_FILE (dir);
-  if (! file_accessible_directory_p (SSDATA (dir)))
+  if (! file_accessible_directory_p (dir))
     report_file_error ("Setting current directory",
                       BVAR (current_buffer, directory));
 
@@ -167,7 +144,8 @@ void
 record_kill_process (struct Lisp_Process *p, Lisp_Object tempfile)
 {
 #ifndef MSDOS
-  block_child_signal ();
+  sigset_t oldset;
+  block_child_signal (&oldset);
 
   if (p->alive)
     {
@@ -176,7 +154,7 @@ record_kill_process (struct Lisp_Process *p, Lisp_Object tempfile)
       kill (- p->pid, SIGKILL);
     }
 
-  unblock_child_signal ();
+  unblock_child_signal (&oldset);
 #endif /* !MSDOS */
 }
 
@@ -321,6 +299,7 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd,
   char *tempfile = NULL;
   int pid;
 #else
+  sigset_t oldset;
   pid_t pid;
 #endif
   int child_errno;
@@ -487,7 +466,7 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd,
       && SREF (path, 1) == ':')
     path = Fsubstring (path, make_number (2), Qnil);
 
-  new_argv = SAFE_ALLOCA ((nargs > 4 ? nargs - 2 : 2) * sizeof *new_argv);
+  SAFE_NALLOCA (new_argv, 1, nargs < 4 ? 2 : nargs - 2);
 
   {
     struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
@@ -637,7 +616,7 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd,
 #ifndef MSDOS
 
   block_input ();
-  block_child_signal ();
+  block_child_signal (&oldset);
 
 #ifdef WINDOWSNT
   pid = child_setup (filefd, fd_output, fd_error, new_argv, 0, current_dir);
@@ -653,6 +632,7 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd,
     int volatile fd_error_volatile = fd_error;
     int volatile filefd_volatile = filefd;
     ptrdiff_t volatile count_volatile = count;
+    ptrdiff_t volatile sa_avail_volatile = sa_avail;
     ptrdiff_t volatile sa_count_volatile = sa_count;
     char **volatile new_argv_volatile = new_argv;
     int volatile callproc_fd_volatile[CALLPROC_FDS];
@@ -669,6 +649,7 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd,
     fd_error = fd_error_volatile;
     filefd = filefd_volatile;
     count = count_volatile;
+    sa_avail = sa_avail_volatile;
     sa_count = sa_count_volatile;
     new_argv = new_argv_volatile;
 
@@ -679,7 +660,7 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd,
 
   if (pid == 0)
     {
-      unblock_child_signal ();
+      unblock_child_signal (&oldset);
 
       setsid ();
 
@@ -715,7 +696,7 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd,
        }
     }
 
-  unblock_child_signal ();
+  unblock_child_signal (&oldset);
   unblock_input ();
 
   if (pid < 0)
@@ -1003,7 +984,7 @@ create_temp_file (ptrdiff_t nargs, Lisp_Object *args,
 
     count = SPECPDL_INDEX ();
     record_unwind_protect_nothing ();
-    fd = mkostemp (tempfile, O_CLOEXEC);
+    fd = mkostemp (tempfile, O_BINARY | O_CLOEXEC);
     if (fd < 0)
       report_file_error ("Failed to open temporary file using pattern",
                         pattern);
@@ -1172,6 +1153,39 @@ add_env (char **env, char **new_env, char *string)
   return new_env;
 }
 
+#ifndef DOS_NT
+
+/* 'exec' failed inside a child running NAME, with error number ERR.
+   Possibly a vforked child needed to allocate a large vector on the
+   stack; such a child cannot fall back on malloc because that might
+   mess up the allocator's data structures in the parent.
+   Report the error and exit the child.  */
+
+static _Noreturn void
+exec_failed (char const *name, int err)
+{
+  /* Avoid deadlock if the child's perror writes to a full pipe; the
+     pipe's reader is the parent, but with vfork the parent can't
+     run until the child exits.  Truncate the diagnostic instead.  */
+  fcntl (STDERR_FILENO, F_SETFL, O_NONBLOCK);
+
+  errno = err;
+  emacs_perror (name);
+  _exit (err == ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE);
+}
+
+#else
+
+/* Do nothing.  There is no need to fail, as DOS_NT platforms do not
+   fork and exec, and handle alloca exhaustion in a different way.  */
+
+static void
+exec_failed (char const *name, int err)
+{
+}
+
+#endif
+
 /* This is the last thing run in a newly forked inferior
    either synchronous or asynchronous.
    Copy descriptors IN, OUT and ERR as descriptors 0, 1 and 2.
@@ -1195,8 +1209,6 @@ child_setup (int in, int out, int err, char **new_argv, bool set_pgrp,
   int cpid;
   HANDLE handles[3];
 #else
-  int exec_errno;
-
   pid_t pid = getpid ();
 #endif /* WINDOWSNT */
 
@@ -1217,11 +1229,13 @@ child_setup (int in, int out, int err, char **new_argv, bool set_pgrp,
        on that.  */
     pwd_var = xmalloc (i + 5);
 #else
+    if (MAX_ALLOCA - 5 < i)
+      exec_failed (new_argv[0], ENOMEM);
     pwd_var = alloca (i + 5);
 #endif
     temp = pwd_var + 4;
     memcpy (pwd_var, "PWD=", 4);
-    strcpy (temp, SSDATA (current_dir));
+    lispstpcpy (temp, current_dir);
 
 #ifndef DOS_NT
     /* We can't signal an Elisp error here; we're in a vfork.  Since
@@ -1283,6 +1297,8 @@ child_setup (int in, int out, int err, char **new_argv, bool set_pgrp,
       }
 
     /* new_length + 2 to include PWD and terminating 0.  */
+    if (MAX_ALLOCA / sizeof *env - 2 < new_length)
+      exec_failed (new_argv[0], ENOMEM);
     env = new_env = alloca ((new_length + 2) * sizeof *env);
     /* If we have a PWD envvar, pass one down,
        but with corrected value.  */
@@ -1291,7 +1307,11 @@ child_setup (int in, int out, int err, char **new_argv, bool set_pgrp,
 
     if (STRINGP (display))
       {
-       char *vdata = alloca (sizeof "DISPLAY=" + SBYTES (display));
+       char *vdata;
+
+       if (MAX_ALLOCA - sizeof "DISPLAY=" < SBYTES (display))
+         exec_failed (new_argv[0], ENOMEM);
+       vdata = alloca (sizeof "DISPLAY=" + SBYTES (display));
        strcpy (vdata, "DISPLAY=");
        strcat (vdata, SSDATA (display));
        new_env = add_env (env, new_env, vdata);
@@ -1366,16 +1386,7 @@ child_setup (int in, int out, int err, char **new_argv, bool set_pgrp,
   tcsetpgrp (0, pid);
 
   execve (new_argv[0], new_argv, env);
-  exec_errno = errno;
-
-  /* Avoid deadlock if the child's perror writes to a full pipe; the
-     pipe's reader is the parent, but with vfork the parent can't
-     run until the child exits.  Truncate the diagnostic instead.  */
-  fcntl (STDERR_FILENO, F_SETFL, O_NONBLOCK);
-
-  errno = exec_errno;
-  emacs_perror (new_argv[0]);
-  _exit (exec_errno == ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE);
+  exec_failed (new_argv[0], errno);
 
 #else /* MSDOS */
   pid = run_msdos_command (new_argv, pwd_var + 4, in, out, err, env);
@@ -1509,14 +1520,14 @@ If optional parameter ENV is a list, then search this list instead of
 }
 
 /* A version of getenv that consults the Lisp environment lists,
-   easily callable from C.  */
+   easily callable from C.  This is usually called from egetenv.  */
 char *
-egetenv (const char *var)
+egetenv_internal (const char *var, ptrdiff_t len)
 {
   char *value;
   ptrdiff_t valuelen;
 
-  if (getenv_internal (var, strlen (var), &value, &valuelen, Qnil))
+  if (getenv_internal (var, len, &value, &valuelen, Qnil))
     return value;
   else
     return 0;
@@ -1564,20 +1575,13 @@ init_callproc_1 (void)
 void
 init_callproc (void)
 {
-  char *data_dir = egetenv ("EMACSDATA");
+  bool data_dir = egetenv ("EMACSDATA") != 0;
 
-  register char * sh;
+  char *sh;
   Lisp_Object tempdir;
 #ifdef HAVE_NS
   if (data_dir == 0)
-    {
-      const char *etc_dir = ns_etc_directory ();
-      if (etc_dir)
-        {
-          data_dir = alloca (strlen (etc_dir) + 1);
-          strcpy (data_dir, etc_dir);
-        }
-    }
+    data_dir = ns_etc_directory () != 0;
 #endif
 
   if (!NILP (Vinstallation_directory))
@@ -1628,13 +1632,13 @@ init_callproc (void)
 
       srcdir = Fexpand_file_name (build_string ("../src/"), lispdir);
 
-      tem = Fexpand_file_name (build_string ("GNU"), Vdata_directory);
+      tem = Fexpand_file_name (build_string ("NEWS"), Vdata_directory);
       tem1 = Ffile_exists_p (tem);
       if (!NILP (Fequal (srcdir, Vinvocation_directory)) || NILP (tem1))
        {
          Lisp_Object newdir;
          newdir = Fexpand_file_name (build_string ("../etc/"), lispdir);
-         tem = Fexpand_file_name (build_string ("GNU"), newdir);
+         tem = Fexpand_file_name (build_string ("NEWS"), newdir);
          tem1 = Ffile_exists_p (tem);
          if (!NILP (tem1))
            Vdata_directory = newdir;
@@ -1646,12 +1650,12 @@ init_callproc (void)
 #endif
     {
       tempdir = Fdirectory_file_name (Vexec_directory);
-      if (! file_accessible_directory_p (SSDATA (tempdir)))
+      if (! file_accessible_directory_p (tempdir))
        dir_warning ("arch-dependent data dir", Vexec_directory);
     }
 
   tempdir = Fdirectory_file_name (Vdata_directory);
-  if (! file_accessible_directory_p (SSDATA (tempdir)))
+  if (! file_accessible_directory_p (tempdir))
     dir_warning ("arch-independent data dir", Vdata_directory);
 
   sh = getenv ("SHELL");
index 851ae1a4c2421a439522279bcce08b6c7c6cefc5..a4610e4d358262fa8fbae946cf7b8f093ca0a0ec 100644 (file)
@@ -96,7 +96,7 @@ those categories.  */)
   (Lisp_Object categories)
 {
   Lisp_Object val;
-  int len;
+  ptrdiff_t len;
 
   CHECK_STRING (categories);
   val = MAKE_CATEGORY_SET;
index 187f60270187f2a3a48efb906d9cf7ab7bf9c287..54093bf5677a33d4c72a791277bdb1609867413a 100644 (file)
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -2160,11 +2160,8 @@ usage: (ccl-execute-on-string CCL-PROGRAM STATUS STRING &optional CONTINUE UNIBY
     ASET (status, i, make_number (ccl.reg[i]));
   ASET (status, 8, make_number (ccl.ic));
 
-  if (NILP (unibyte_p))
-    val = make_multibyte_string ((char *) outbuf, produced_chars,
-                                outp - outbuf);
-  else
-    val = make_unibyte_string ((char *) outbuf, produced_chars);
+  val = make_specified_string ((const char *) outbuf, produced_chars,
+                              outp - outbuf, NILP (unibyte_p));
   xfree (outbuf);
 
   return val;
index 12a95203527a803b82e7462d8a92bcb388d1c1a2..a8e48dfd774231eabd94c3fa7b22054ca1b08745 100644 (file)
@@ -233,32 +233,6 @@ translate_char (Lisp_Object table, int c)
   return c;
 }
 
-/* Convert ASCII or 8-bit character C to unibyte.  If C is none of
-   them, return (C & 0xFF).  */
-
-int
-multibyte_char_to_unibyte (int c)
-{
-  if (c < 0x80)
-    return c;
-  if (CHAR_BYTE8_P (c))
-    return CHAR_TO_BYTE8 (c);
-  return (c & 0xFF);
-}
-
-/* Like multibyte_char_to_unibyte, but return -1 if C is not supported
-   by charset_unibyte.  */
-
-int
-multibyte_char_to_unibyte_safe (int c)
-{
-  if (c < 0x80)
-    return c;
-  if (CHAR_BYTE8_P (c))
-    return CHAR_TO_BYTE8 (c);
-  return -1;
-}
-
 DEFUN ("characterp", Fcharacterp, Scharacterp, 1, 2, 0,
        doc: /* Return non-nil if OBJECT is a character.
 In Emacs Lisp, characters are represented by character codes, which
index 6f243a1392d95086e762645d92960219bf467d02..624f4fff3f0960b784168e6c784194d10d0230db 100644 (file)
@@ -67,20 +67,15 @@ INLINE_HEADER_BEGIN
 #define BYTE8_TO_CHAR(byte) ((byte) + 0x3FFF00)
 
 #define UNIBYTE_TO_CHAR(byte) \
-  (ASCII_BYTE_P (byte) ? (byte) : BYTE8_TO_CHAR (byte))
+  (ASCII_CHAR_P (byte) ? (byte) : BYTE8_TO_CHAR (byte))
 
 /* Return the raw 8-bit byte for character C.  */
-#define CHAR_TO_BYTE8(c)       \
-  (CHAR_BYTE8_P (c)            \
-   ? (c) - 0x3FFF00            \
-   : multibyte_char_to_unibyte (c))
+#define CHAR_TO_BYTE8(c) (CHAR_BYTE8_P (c) ? (c) - 0x3FFF00 : (c & 0xFF))
 
 /* Return the raw 8-bit byte for character C,
    or -1 if C doesn't correspond to a byte.  */
-#define CHAR_TO_BYTE_SAFE(c)   \
-  (CHAR_BYTE8_P (c)            \
-   ? (c) - 0x3FFF00            \
-   : multibyte_char_to_unibyte_safe (c))
+#define CHAR_TO_BYTE_SAFE(c)                                           \
+  (ASCII_CHAR_P (c) ? c : (CHAR_BYTE8_P (c) ? (c) - 0x3FFF00 : -1))
 
 /* Nonzero iff BYTE is the 1st byte of a multibyte form of a character
    that corresponds to a raw 8-bit byte.  */
@@ -101,13 +96,6 @@ INLINE_HEADER_BEGIN
 /* This is the maximum byte length of multibyte form.  */
 #define MAX_MULTIBYTE_LENGTH 5
 
-/* Return a Lisp character whose character code is C.  Assumes C is
-   a valid character code.  */
-#define make_char(c) make_number (c)
-
-/* Nonzero iff C is an ASCII byte.  */
-#define ASCII_BYTE_P(c) UNSIGNED_CMP (c, <, 0x80)
-
 /* Nonzero iff X is a character.  */
 #define CHARACTERP(x) (NATNUMP (x) && XFASTINT (x) <= MAX_CHAR)
 
@@ -222,7 +210,7 @@ INLINE_HEADER_BEGIN
 
 /* Nonzero iff BYTE starts a character in a multibyte form.
    This is equivalent to:
-       (ASCII_BYTE_P (byte) || LEADING_CODE_P (byte))  */
+       (ASCII_CHAR_P (byte) || LEADING_CODE_P (byte))  */
 #define CHAR_HEAD_P(byte) (((byte) & 0xC0) != 0x80)
 
 /* How many bytes a character that starts with BYTE occupies in a
@@ -656,8 +644,6 @@ extern int string_char (const unsigned char *,
                         const unsigned char **, int *);
 
 extern int translate_char (Lisp_Object, int c);
-extern void parse_str_as_multibyte (const unsigned char *,
-                                   ptrdiff_t, ptrdiff_t *, ptrdiff_t *);
 extern ptrdiff_t count_size_as_multibyte (const unsigned char *, ptrdiff_t);
 extern ptrdiff_t str_as_multibyte (unsigned char *, ptrdiff_t, ptrdiff_t,
                                   ptrdiff_t *);
@@ -679,6 +665,20 @@ extern Lisp_Object string_escape_byte8 (Lisp_Object);
 #define GET_TRANSLATION_TABLE(id) \
   (XCDR (XVECTOR (Vtranslation_table_vector)->contents[(id)]))
 
+/* Look up the element in char table OBJ at index CH, and return it as
+   an integer.  If the element is not a character, return CH itself.  */
+
+INLINE int
+char_table_translate (Lisp_Object obj, int ch)
+{
+  /* This internal function is expected to be called with valid arguments,
+     so there is a eassert instead of CHECK_xxx for the sake of speed.  */
+  eassert (CHAR_VALID_P (ch));
+  eassert (CHAR_TABLE_P (obj));
+  obj = CHAR_TABLE_REF (obj, ch);
+  return CHARACTERP (obj) ? XINT (obj) : ch;
+}
+
 INLINE_HEADER_END
 
 #endif /* EMACS_CHARACTER_H */
index 3566b156736939053160394e0e1e563717323980..171a00f23d1116164885dc688a5198cd1a7cdfd1 100644 (file)
@@ -389,12 +389,12 @@ load_charset_map (struct charset *charset, struct charset_map_entries *entries,
        {
          if (ascii_compatible_p)
            {
-             if (! ASCII_BYTE_P (from_c))
+             if (! ASCII_CHAR_P (from_c))
                {
                  if (from_c < nonascii_min_char)
                    nonascii_min_char = from_c;
                }
-             else if (! ASCII_BYTE_P (to_c))
+             else if (! ASCII_CHAR_P (to_c))
                {
                  nonascii_min_char = 0x80;
                }
@@ -485,14 +485,12 @@ load_charset_map_from_file (struct charset *charset, Lisp_Object mapfile,
   unsigned max_code = CHARSET_MAX_CODE (charset);
   int fd;
   FILE *fp;
-  Lisp_Object suffixes;
   struct charset_map_entries *head, *entries;
   int n_entries;
-  ptrdiff_t count;
-
-  suffixes = list2 (build_string (".map"), build_string (".TXT"));
-
-  count = SPECPDL_INDEX ();
+  AUTO_STRING (map, ".map");
+  AUTO_STRING (txt, ".txt");
+  AUTO_LIST2 (suffixes, map, txt);
+  ptrdiff_t count = SPECPDL_INDEX ();
   record_unwind_protect_nothing ();
   specbind (Qfile_name_handler_alist, Qnil);
   fd = openp (Vcharset_map_path, mapfile, suffixes, NULL, Qnil, false);
@@ -667,12 +665,8 @@ map_charset_for_dump (void (*c_function) (Lisp_Object, Lisp_Object),
 {
   int from_idx = CODE_POINT_TO_INDEX (temp_charset_work->current, from);
   int to_idx = CODE_POINT_TO_INDEX (temp_charset_work->current, to);
-  Lisp_Object range;
+  Lisp_Object range = Fcons (Qnil, Qnil);
   int c, stop;
-  struct gcpro gcpro1;
-
-  range = Fcons (Qnil, Qnil);
-  GCPRO1 (range);
 
   c = temp_charset_work->min_char;
   stop = (temp_charset_work->max_char < 0x20000
@@ -715,7 +709,6 @@ map_charset_for_dump (void (*c_function) (Lisp_Object, Lisp_Object),
        }
       c++;
     }
-  UNGCPRO;
 }
 
 void
@@ -1400,6 +1393,32 @@ Optional third argument DEUNIFY, if non-nil, means to de-unify CHARSET.  */)
   return Qnil;
 }
 
+/* Check that DIMENSION, CHARS, and FINAL_CHAR specify a valid ISO charset.
+   Return true if it's a 96-character set, false if 94.  */
+
+static bool
+check_iso_charset_parameter (Lisp_Object dimension, Lisp_Object chars,
+                            Lisp_Object final_char)
+{
+  CHECK_NUMBER (dimension);
+  CHECK_NUMBER (chars);
+  CHECK_CHARACTER (final_char);
+
+  if (! (1 <= XINT (dimension) && XINT (dimension) <= 3))
+    error ("Invalid DIMENSION %"pI"d, it should be 1, 2, or 3",
+          XINT (dimension));
+
+  bool chars_flag = XINT (chars) == 96;
+  if (! (chars_flag || XINT (chars) == 94))
+    error ("Invalid CHARS %"pI"d, it should be 94 or 96", XINT (chars));
+
+  int final_ch = XFASTINT (final_char);
+  if (! ('0' <= final_ch && final_ch <= '~'))
+    error ("Invalid FINAL-CHAR '%c', it should be '0'..'~'", final_ch);
+
+  return chars_flag;
+}
+
 DEFUN ("get-unused-iso-final-char", Fget_unused_iso_final_char,
        Sget_unused_iso_final_char, 2, 2, 0,
        doc: /*
@@ -1412,35 +1431,12 @@ If there's no unused final char for the specified kind of charset,
 return nil.  */)
   (Lisp_Object dimension, Lisp_Object chars)
 {
-  int final_char;
-
-  CHECK_NUMBER (dimension);
-  CHECK_NUMBER (chars);
-  if (XINT (dimension) != 1 && XINT (dimension) != 2 && XINT (dimension) != 3)
-    args_out_of_range_3 (dimension, make_number (1), make_number (3));
-  if (XINT (chars) != 94 && XINT (chars) != 96)
-    args_out_of_range_3 (chars, make_number (94), make_number (96));
-  for (final_char = '0'; final_char <= '?'; final_char++)
-    if (ISO_CHARSET_TABLE (XINT (dimension), XINT (chars), final_char) < 0)
-      break;
-  return (final_char <= '?' ? make_number (final_char) : Qnil);
-}
-
-static void
-check_iso_charset_parameter (Lisp_Object dimension, Lisp_Object chars, Lisp_Object final_char)
-{
-  CHECK_NATNUM (dimension);
-  CHECK_NATNUM (chars);
-  CHECK_CHARACTER (final_char);
-
-  if (XINT (dimension) > 3)
-    error ("Invalid DIMENSION %"pI"d, it should be 1, 2, or 3",
-          XINT (dimension));
-  if (XINT (chars) != 94 && XINT (chars) != 96)
-    error ("Invalid CHARS %"pI"d, it should be 94 or 96", XINT (chars));
-  if (XINT (final_char) < '0' || XINT (final_char) > '~')
-    error ("Invalid FINAL-CHAR %c, it should be `0'..`~'",
-          (int)XINT (final_char));
+  bool chars_flag = check_iso_charset_parameter (dimension, chars,
+                                                make_number ('0'));
+  for (int final_char = '0'; final_char <= '?'; final_char++)
+    if (ISO_CHARSET_TABLE (XINT (dimension), chars_flag, final_char) < 0)
+      return make_number (final_char);
+  return Qnil;
 }
 
 
@@ -1454,12 +1450,10 @@ if CHARSET is designated instead.  */)
   (Lisp_Object dimension, Lisp_Object chars, Lisp_Object final_char, Lisp_Object charset)
 {
   int id;
-  bool chars_flag;
 
   CHECK_CHARSET_GET_ID (charset, id);
-  check_iso_charset_parameter (dimension, chars, final_char);
-  chars_flag = XINT (chars) == 96;
-  ISO_CHARSET_TABLE (XINT (dimension), chars_flag, XINT (final_char)) = id;
+  bool chars_flag = check_iso_charset_parameter (dimension, chars, final_char);
+  ISO_CHARSET_TABLE (XINT (dimension), chars_flag, XFASTINT (final_char)) = id;
   return Qnil;
 }
 
@@ -1522,7 +1516,7 @@ find_charsets_in_text (const unsigned char *ptr, ptrdiff_t nchars,
 
            if (!NILP (table))
              c = translate_char (table, c);
-           if (ASCII_BYTE_P (c))
+           if (ASCII_CHAR_P (c))
              ASET (charsets, charset_ascii, Qt);
            else
              ASET (charsets, charset_eight_bit, Qt);
@@ -2113,13 +2107,9 @@ See the documentation of the function `charset-info' for the meanings of
 DIMENSION, CHARS, and FINAL-CHAR.  */)
   (Lisp_Object dimension, Lisp_Object chars, Lisp_Object final_char)
 {
-  int id;
-  bool chars_flag;
-
-  check_iso_charset_parameter (dimension, chars, final_char);
-  chars_flag = XFASTINT (chars) == 96;
-  id = ISO_CHARSET_TABLE (XFASTINT (dimension), chars_flag,
-                         XFASTINT (final_char));
+  bool chars_flag = check_iso_charset_parameter (dimension, chars, final_char);
+  int id = ISO_CHARSET_TABLE (XINT (dimension), chars_flag,
+                             XFASTINT (final_char));
   return (id >= 0 ? CHARSET_NAME (CHARSET_FROM_ID (id)) : Qnil);
 }
 
@@ -2298,7 +2288,7 @@ init_charset (void)
 {
   Lisp_Object tempdir;
   tempdir = Fexpand_file_name (build_string ("charsets"), Vdata_directory);
-  if (! file_accessible_directory_p (SSDATA (tempdir)))
+  if (! file_accessible_directory_p (tempdir))
     {
       /* This used to be non-fatal (dir_warning), but it should not
          happen, and if it does sooner or later it will cause some
@@ -2386,7 +2376,7 @@ syms_of_charset (void)
   }
 
   charset_table = charset_table_init;
-  charset_table_size = sizeof charset_table_init / sizeof *charset_table_init;
+  charset_table_size = ARRAYELTS (charset_table_init);
   charset_table_used = 0;
 
   defsubr (&Scharsetp);
index 32c624beff8405d122f859719d341a4edc099a5c..4176ce5ecc63d36787552381ea6f9654d41937b4 100644 (file)
@@ -403,7 +403,7 @@ extern Lisp_Object Vchar_charset_set;
    Try some optimization before calling decode_char.  */
 
 #define DECODE_CHAR(charset, code)                                     \
-  ((ASCII_BYTE_P (code) && (charset)->ascii_compatible_p)              \
+  ((ASCII_CHAR_P (code) && (charset)->ascii_compatible_p)              \
    ? (code)                                                            \
    : ((code) < (charset)->min_code || (code) > (charset)->max_code)    \
    ? -1                                                                        \
index 2a8bbc6983a328aa696ae6b5c2fbe20e367b6011..bfbbf798f0c17e88f07e22170df008bf02ab1070 100644 (file)
@@ -140,15 +140,11 @@ the char-table has no extra slot.  */)
 static Lisp_Object
 make_sub_char_table (int depth, int min_char, Lisp_Object defalt)
 {
-  Lisp_Object table;
-  int size = (PSEUDOVECSIZE (struct Lisp_Sub_Char_Table, contents)
-             + chartab_size[depth]);
-
-  table = Fmake_vector (make_number (size), defalt);
-  XSETPVECTYPE (XVECTOR (table), PVEC_SUB_CHAR_TABLE);
-  XSUB_CHAR_TABLE (table)->depth = make_number (depth);
-  XSUB_CHAR_TABLE (table)->min_char = make_number (min_char);
+  int i;
+  Lisp_Object table = make_uninit_sub_char_table (depth, min_char);
 
+  for (i = 0; i < chartab_size[depth]; i++)
+    XSUB_CHAR_TABLE (table)->contents[i] = defalt;
   return table;
 }
 
@@ -172,8 +168,8 @@ char_table_ascii (Lisp_Object table)
 static Lisp_Object
 copy_sub_char_table (Lisp_Object table)
 {
-  int depth = XINT (XSUB_CHAR_TABLE (table)->depth);
-  int min_char = XINT (XSUB_CHAR_TABLE (table)->min_char);
+  int depth = XSUB_CHAR_TABLE (table)->depth;
+  int min_char = XSUB_CHAR_TABLE (table)->min_char;
   Lisp_Object copy = make_sub_char_table (depth, min_char, Qnil);
   int i;
 
@@ -220,10 +216,8 @@ static Lisp_Object
 sub_char_table_ref (Lisp_Object table, int c, bool is_uniprop)
 {
   struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table);
-  int depth = XINT (tbl->depth);
-  int min_char = XINT (tbl->min_char);
   Lisp_Object val;
-  int idx = CHARTAB_IDX (c, depth, min_char);
+  int idx = CHARTAB_IDX (c, tbl->depth, tbl->min_char);
 
   val = tbl->contents[idx];
   if (is_uniprop && UNIPROP_COMPRESSED_FORM_P (val))
@@ -265,8 +259,7 @@ sub_char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to,
                              Lisp_Object defalt, bool is_uniprop)
 {
   struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table);
-  int depth = XINT (tbl->depth);
-  int min_char = XINT (tbl->min_char);
+  int depth = tbl->depth, min_char = tbl->min_char;
   int chartab_idx = CHARTAB_IDX (c, depth, min_char), idx;
   Lisp_Object val;
 
@@ -402,8 +395,7 @@ static void
 sub_char_table_set (Lisp_Object table, int c, Lisp_Object val, bool is_uniprop)
 {
   struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table);
-  int depth = XINT ((tbl)->depth);
-  int min_char = XINT ((tbl)->min_char);
+  int depth = tbl->depth, min_char = tbl->min_char;
   int i = CHARTAB_IDX (c, depth, min_char);
   Lisp_Object sub;
 
@@ -458,8 +450,7 @@ sub_char_table_set_range (Lisp_Object table, int from, int to, Lisp_Object val,
                          bool is_uniprop)
 {
   struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table);
-  int depth = XINT ((tbl)->depth);
-  int min_char = XINT ((tbl)->min_char);
+  int depth = tbl->depth, min_char = tbl->min_char;
   int chars_in_block = chartab_chars[depth];
   int i, c, lim = chartab_size[depth];
 
@@ -672,26 +663,12 @@ or a character code.  Return VALUE.  */)
   return value;
 }
 
-/* Look up the element in TABLE at index CH, and return it as an
-   integer.  If the element is not a character, return CH itself.  */
-
-int
-char_table_translate (Lisp_Object table, int ch)
-{
-  Lisp_Object value;
-  value = Faref (table, make_number (ch));
-  if (! CHARACTERP (value))
-    return ch;
-  return XINT (value);
-}
-
 static Lisp_Object
 optimize_sub_char_table (Lisp_Object table, Lisp_Object test)
 {
   struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table);
-  int depth = XINT (tbl->depth);
+  int i, depth = tbl->depth;
   Lisp_Object elt, this;
-  int i;
   bool optimizable;
 
   elt = XSUB_CHAR_TABLE (table)->contents[0];
@@ -778,8 +755,8 @@ map_sub_char_table (void (*c_function) (Lisp_Object, Lisp_Object, Lisp_Object),
     {
       struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table);
 
-      depth = XINT (tbl->depth);
-      min_char = XINT (tbl->min_char);
+      depth = tbl->depth;
+      min_char = tbl->min_char;
       max_char = min_char + chartab_chars[depth - 1] - 1;
     }
   else
@@ -973,12 +950,10 @@ map_sub_char_table_for_charset (void (*c_function) (Lisp_Object, Lisp_Object),
                                unsigned from, unsigned to)
 {
   struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table);
-  int depth = XINT (tbl->depth);
-  int c, i;
+  int i, c = tbl->min_char, depth = tbl->depth;
 
   if (depth < 3)
-    for (i = 0, c = XINT (tbl->min_char); i < chartab_size[depth];
-        i++, c += chartab_chars[depth])
+    for (i = 0; i < chartab_size[depth]; i++, c += chartab_chars[depth])
       {
        Lisp_Object this;
 
@@ -1000,7 +975,7 @@ map_sub_char_table_for_charset (void (*c_function) (Lisp_Object, Lisp_Object),
          }
       }
   else
-    for (i = 0, c = XINT (tbl->min_char); i < chartab_size[depth]; i++, c ++)
+    for (i = 0; i < chartab_size[depth]; i++, c++)
       {
        Lisp_Object this;
        unsigned code;
@@ -1147,8 +1122,7 @@ static Lisp_Object
 uniprop_table_uncompress (Lisp_Object table, int idx)
 {
   Lisp_Object val = XSUB_CHAR_TABLE (table)->contents[idx];
-  int min_char = (XINT (XSUB_CHAR_TABLE (table)->min_char)
-                 + chartab_chars[2] * idx);
+  int min_char = XSUB_CHAR_TABLE (table)->min_char + chartab_chars[2] * idx;
   Lisp_Object sub = make_sub_char_table (3, min_char, Qnil);
   const unsigned char *p, *pend;
 
@@ -1221,9 +1195,7 @@ uniprop_decode_value_run_length (Lisp_Object table, Lisp_Object value)
 static uniprop_decoder_t uniprop_decoder [] =
   { uniprop_decode_value_run_length };
 
-static int uniprop_decoder_count
-  = (sizeof uniprop_decoder) / sizeof (uniprop_decoder[0]);
-
+static const int uniprop_decoder_count = ARRAYELTS (uniprop_decoder);
 
 /* Return the decoder of char-table TABLE or nil if none.  */
 
@@ -1286,13 +1258,8 @@ uniprop_encode_value_numeric (Lisp_Object table, Lisp_Object value)
       break;
   value = make_number (i);
   if (i == size)
-    {
-      Lisp_Object args[2];
-
-      args[0] = XCHAR_TABLE (table)->extras[4];
-      args[1] = Fmake_vector (make_number (1), value);
-      set_char_table_extras (table, 4, Fvconcat (2, args));
-    }
+    set_char_table_extras (table, 4, Fvconcat (2, ((Lisp_Object []) {
+      XCHAR_TABLE (table)->extras[4], Fmake_vector (make_number (1), value) })));
   return make_number (i);
 }
 
@@ -1301,9 +1268,7 @@ static uniprop_encoder_t uniprop_encoder[] =
     uniprop_encode_value_run_length,
     uniprop_encode_value_numeric };
 
-static int uniprop_encoder_count
-  = (sizeof uniprop_encoder) / sizeof (uniprop_encoder[0]);
-
+static const int uniprop_encoder_count = ARRAYELTS (uniprop_encoder);
 
 /* Return the encoder of char-table TABLE or nil if none.  */
 
@@ -1337,8 +1302,8 @@ uniprop_table (Lisp_Object prop)
     {
       struct gcpro gcpro1;
       GCPRO1 (val);
-      result = Fload (concat2 (build_string ("international/"), table),
-                     Qt, Qt, Qt, Qt);
+      AUTO_STRING (intl, "international/");
+      result = Fload (concat2 (intl, table), Qt, Qt, Qt, Qt);
       UNGCPRO;
       if (NILP (result))
        return Qnil;
index 1a510afa2716c48c24620b55e37e9e1a77c010ad..20234638778ab22a6f722fc7efca2a27fcd193a7 100644 (file)
@@ -315,7 +315,7 @@ At the end, it runs `post-self-insert-hook'.  */)
     int val = internal_self_insert (character, XFASTINT (n));
     if (val == 2)
       nonundocount = 0;
-    frame_make_pointer_invisible ();
+    frame_make_pointer_invisible (SELECTED_FRAME ());
   }
 
   return Qnil;
@@ -359,9 +359,7 @@ internal_self_insert (int c, EMACS_INT n)
     }
   else
     {
-      str[0] = (SINGLE_BYTE_CHAR_P (c)
-               ? c
-               : multibyte_char_to_unibyte (c));
+      str[0] = SINGLE_BYTE_CHAR_P (c) ? c : CHAR_TO_BYTE8 (c);
       len = 1;
     }
   if (!NILP (overwrite)
index b0a9f6ef4cb1ed335f0e502aec670980b95683f3..e4b52f6db484cd0db79666ec9f9413b01060d9af 100644 (file)
@@ -642,15 +642,6 @@ static enum coding_category coding_priorities[coding_category_max];
    Nth coding category.  */
 static struct coding_system coding_categories[coding_category_max];
 
-/*** Commonly used macros and functions ***/
-
-#ifndef min
-#define min(a, b) ((a) < (b) ? (a) : (b))
-#endif
-#ifndef max
-#define max(a, b) ((a) > (b) ? (a) : (b))
-#endif
-
 /* Encode a flag that can be nil, something else, or t as -1, 0, 1.  */
 
 static int
@@ -690,6 +681,14 @@ CHECK_NATNUM_CDR (Lisp_Object x)
   XSETCDR (x, tmp);
 }
 
+/* True if CODING's destination can be grown.  */
+
+static bool
+growable_destination (struct coding_system *coding)
+{
+  return STRINGP (coding->dst_object) || BUFFERP (coding->dst_object);
+}
+
 
 /* Safely get one byte from the source text pointed by SRC which ends
    at SRC_END, and set C to that byte.  If there are not enough bytes
@@ -1485,8 +1484,7 @@ decode_coding_utf_8 (struct coding_system *coding)
       src = src_base;
       consumed_chars = consumed_chars_base;
       ONE_MORE_BYTE (c);
-      *charbuf++ = ASCII_BYTE_P (c) ? c : BYTE8_TO_CHAR (c);
-      coding->errors++;
+      *charbuf++ = ASCII_CHAR_P (c) ? c : BYTE8_TO_CHAR (c);
     }
 
  no_more_source:
@@ -1685,7 +1683,6 @@ decode_coding_utf_16 (struct coding_system *coding)
          /* The first two bytes are not BOM.  Treat them as bytes
             for a normal character.  */
          src = src_base;
-         coding->errors++;
        }
       CODING_UTF_16_BOM (coding) = utf_without_bom;
     }
@@ -1725,7 +1722,7 @@ decode_coding_utf_16 (struct coding_system *coding)
        ONE_MORE_BYTE (c2);
       if (c2 < 0)
        {
-         *charbuf++ = ASCII_BYTE_P (c1) ? c1 : BYTE8_TO_CHAR (c1);
+         *charbuf++ = ASCII_CHAR_P (c1) ? c1 : BYTE8_TO_CHAR (c1);
          *charbuf++ = -c2;
          continue;
        }
@@ -1742,7 +1739,6 @@ decode_coding_utf_16 (struct coding_system *coding)
                c1 = surrogate & 0xFF, c2 = surrogate >> 8;
              *charbuf++ = c1;
              *charbuf++ = c2;
-             coding->errors++;
              if (UTF_16_HIGH_SURROGATE_P (c))
                CODING_UTF_16_SURROGATE (coding) = surrogate = c;
              else
@@ -2108,7 +2104,7 @@ emacs_mule_char (struct coding_system *coding, const unsigned char *src,
 
        case 1:
          code = c;
-         charset_ID = ASCII_BYTE_P (code) ? charset_ascii : charset_eight_bit;
+         charset_ID = ASCII_CHAR_P (code) ? charset_ascii : charset_eight_bit;
          break;
 
        default:
@@ -2596,9 +2592,8 @@ decode_coding_emacs_mule (struct coding_system *coding)
       src = src_base;
       consumed_chars = consumed_chars_base;
       ONE_MORE_BYTE (c);
-      *charbuf++ = ASCII_BYTE_P (c) ? c : BYTE8_TO_CHAR (c);
+      *charbuf++ = ASCII_CHAR_P (c) ? c : BYTE8_TO_CHAR (c);
       char_offset++;
-      coding->errors++;
     }
 
  no_more_source:
@@ -3591,7 +3586,7 @@ decode_coding_iso_2022 (struct coding_system *coding)
 
       if (CODING_ISO_EXTSEGMENT_LEN (coding) > 0)
        {
-         *charbuf++ = ASCII_BYTE_P (c1) ? c1 : BYTE8_TO_CHAR (c1);
+         *charbuf++ = ASCII_CHAR_P (c1) ? c1 : BYTE8_TO_CHAR (c1);
          char_offset++;
          CODING_ISO_EXTSEGMENT_LEN (coding)--;
          continue;
@@ -3618,7 +3613,7 @@ decode_coding_iso_2022 (struct coding_system *coding)
            }
          else
            {
-             *charbuf++ = ASCII_BYTE_P (c1) ? c1 : BYTE8_TO_CHAR (c1);
+             *charbuf++ = ASCII_CHAR_P (c1) ? c1 : BYTE8_TO_CHAR (c1);
              char_offset++;
            }
          continue;
@@ -3992,7 +3987,7 @@ decode_coding_iso_2022 (struct coding_system *coding)
          MAYBE_FINISH_COMPOSITION ();
          for (; src_base < src; src_base++, char_offset++)
            {
-             if (ASCII_BYTE_P (*src_base))
+             if (ASCII_CHAR_P (*src_base))
                *charbuf++ = *src_base;
              else
                *charbuf++ = BYTE8_TO_CHAR (*src_base);
@@ -4022,9 +4017,8 @@ decode_coding_iso_2022 (struct coding_system *coding)
       src = src_base;
       consumed_chars = consumed_chars_base;
       ONE_MORE_BYTE (c);
-      *charbuf++ = c < 0 ? -c : ASCII_BYTE_P (c) ? c : BYTE8_TO_CHAR (c);
+      *charbuf++ = c < 0 ? -c : ASCII_CHAR_P (c) ? c : BYTE8_TO_CHAR (c);
       char_offset++;
-      coding->errors++;
       /* Reset the invocation and designation status to the safest
         one; i.e. designate ASCII to the graphic register 0, and
         invoke that register to the graphic plane 0.  This typically
@@ -4855,7 +4849,6 @@ decode_coding_sjis (struct coding_system *coding)
       ONE_MORE_BYTE (c);
       *charbuf++ = c < 0 ? -c : BYTE8_TO_CHAR (c);
       char_offset++;
-      coding->errors++;
     }
 
  no_more_source:
@@ -4951,7 +4944,6 @@ decode_coding_big5 (struct coding_system *coding)
       ONE_MORE_BYTE (c);
       *charbuf++ = c < 0 ? -c : BYTE8_TO_CHAR (c);
       char_offset++;
-      coding->errors++;
     }
 
  no_more_source:
@@ -5658,9 +5650,8 @@ decode_coding_charset (struct coding_system *coding)
       src = src_base;
       consumed_chars = consumed_chars_base;
       ONE_MORE_BYTE (c);
-      *charbuf++ = c < 0 ? -c : ASCII_BYTE_P (c) ? c : BYTE8_TO_CHAR (c);
+      *charbuf++ = c < 0 ? -c : ASCII_CHAR_P (c) ? c : BYTE8_TO_CHAR (c);
       char_offset++;
-      coding->errors++;
     }
 
  no_more_source:
@@ -6893,6 +6884,11 @@ decode_eol (struct coding_system *coding)
 }
 
 
+/* MAX_LOOKUP's maximum value.  MAX_LOOKUP is an int and so cannot
+   exceed INT_MAX.  Also, MAX_LOOKUP is multiplied by sizeof (int) for
+   alloca, so it cannot exceed MAX_ALLOCA / sizeof (int).  */
+enum { MAX_LOOKUP_MAX = min (INT_MAX, MAX_ALLOCA / sizeof (int)) };
+
 /* Return a translation table (or list of them) from coding system
    attribute vector ATTRS for encoding (if ENCODEP) or decoding (if
    not ENCODEP). */
@@ -6945,7 +6941,7 @@ get_translation_table (Lisp_Object attrs, bool encodep, int *max_lookup)
        {
          val = XCHAR_TABLE (translation_table)->extras[1];
          if (NATNUMP (val) && *max_lookup < XFASTINT (val))
-           *max_lookup = XFASTINT (val);
+           *max_lookup = min (XFASTINT (val), MAX_LOOKUP_MAX);
        }
       else if (CONSP (translation_table))
        {
@@ -6957,7 +6953,7 @@ get_translation_table (Lisp_Object attrs, bool encodep, int *max_lookup)
              {
                Lisp_Object tailval = XCHAR_TABLE (XCAR (tail))->extras[1];
                if (NATNUMP (tailval) && *max_lookup < XFASTINT (tailval))
-                 *max_lookup = XFASTINT (tailval);
+                 *max_lookup = min (XFASTINT (tailval), MAX_LOOKUP_MAX);
              }
        }
     }
@@ -7040,8 +7036,10 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table,
       int *buf = coding->charbuf;
       int *buf_end = buf + coding->charbuf_used;
 
-      if (EQ (coding->src_object, coding->dst_object))
+      if (EQ (coding->src_object, coding->dst_object)
+         && ! NILP (coding->dst_object))
        {
+         eassert (growable_destination (coding));
          coding_set_source (coding);
          dst_end = ((unsigned char *) coding->source) + coding->consumed;
        }
@@ -7080,6 +7078,7 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table,
 
              if ((dst_end - dst) / MAX_MULTIBYTE_LENGTH < to_nchars)
                {
+                 eassert (growable_destination (coding));
                  if (((min (PTRDIFF_MAX, SIZE_MAX) - (buf_end - buf))
                       / MAX_MULTIBYTE_LENGTH)
                      < to_nchars)
@@ -7124,7 +7123,10 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table,
       const unsigned char *src_end = src + coding->consumed;
 
       if (EQ (coding->dst_object, coding->src_object))
-       dst_end = (unsigned char *) src;
+       {
+         eassert (growable_destination (coding));
+         dst_end = (unsigned char *) src;
+       }
       if (coding->src_multibyte != coding->dst_multibyte)
        {
          if (coding->src_multibyte)
@@ -7140,6 +7142,7 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table,
                  ONE_MORE_BYTE (c);
                  if (dst == dst_end)
                    {
+                     eassert (growable_destination (coding));
                      if (EQ (coding->src_object, coding->dst_object))
                        dst_end = (unsigned char *) src;
                      if (dst == dst_end)
@@ -7170,6 +7173,7 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table,
 
                if (dst >= dst_end - 1)
                  {
+                   eassert (growable_destination (coding));
                    if (EQ (coding->src_object, coding->dst_object))
                      dst_end = (unsigned char *) src;
                    if (dst >= dst_end - 1)
@@ -7283,16 +7287,20 @@ produce_charset (struct coding_system *coding, int *charbuf, ptrdiff_t pos)
                      coding->dst_object);
 }
 
+#define MAX_CHARBUF_SIZE 0x4000
+/* How many units decoding functions expect in coding->charbuf at
+   most.  Currently, decode_coding_emacs_mule expects the following
+   size, and that is the largest value.  */
+#define MAX_CHARBUF_EXTRA_SIZE ((MAX_ANNOTATION_LENGTH * 3) + 1)
 
-#define CHARBUF_SIZE 0x4000
-
-#define ALLOC_CONVERSION_WORK_AREA(coding)                             \
-  do {                                                                 \
-    coding->charbuf = SAFE_ALLOCA (CHARBUF_SIZE * sizeof (int));       \
-    coding->charbuf_size = CHARBUF_SIZE;                               \
+#define ALLOC_CONVERSION_WORK_AREA(coding, size)               \
+  do {                                                         \
+    ptrdiff_t units = min ((size) + MAX_CHARBUF_EXTRA_SIZE,    \
+                          MAX_CHARBUF_SIZE);                   \
+    coding->charbuf = SAFE_ALLOCA (units * sizeof (int));      \
+    coding->charbuf_size = units;                              \
   } while (0)
 
-
 static void
 produce_annotation (struct coding_system *coding, ptrdiff_t pos)
 {
@@ -7389,9 +7397,8 @@ decode_coding (struct coding_system *coding)
   coding->produced = coding->produced_char = 0;
   coding->chars_at_source = 0;
   record_conversion_result (coding, CODING_RESULT_SUCCESS);
-  coding->errors = 0;
 
-  ALLOC_CONVERSION_WORK_AREA (coding);
+  ALLOC_CONVERSION_WORK_AREA (coding, coding->src_bytes);
 
   attrs = CODING_ID_ATTRS (coding->id);
   translation_table = get_translation_table (attrs, 0, NULL);
@@ -7785,9 +7792,8 @@ encode_coding (struct coding_system *coding)
   coding->consumed = coding->consumed_char = 0;
   coding->produced = coding->produced_char = 0;
   record_conversion_result (coding, CODING_RESULT_SUCCESS);
-  coding->errors = 0;
 
-  ALLOC_CONVERSION_WORK_AREA (coding);
+  ALLOC_CONVERSION_WORK_AREA (coding, coding->src_chars);
 
   if (coding->encoder == encode_coding_ccl)
     {
@@ -8461,11 +8467,11 @@ from_unicode (Lisp_Object str)
 }
 
 Lisp_Object
-from_unicode_buffer (const wchar_twstr)
+from_unicode_buffer (const wchar_t *wstr)
 {
     return from_unicode (
         make_unibyte_string (
-            (char*) wstr,
+            (char *) wstr,
             /* we get one of the two final 0 bytes for free. */
             1 + sizeof (wchar_t) * wcslen (wstr)));
 }
@@ -9049,13 +9055,13 @@ DEFUN ("find-coding-systems-region-internal",
     p = pbeg = BYTE_POS_ADDR (start_byte);
   pend = p + (end_byte - start_byte);
 
-  while (p < pend && ASCII_BYTE_P (*p)) p++;
-  while (p < pend && ASCII_BYTE_P (*(pend - 1))) pend--;
+  while (p < pend && ASCII_CHAR_P (*p)) p++;
+  while (p < pend && ASCII_CHAR_P (*(pend - 1))) pend--;
 
   work_table = Fmake_char_table (Qnil, Qnil);
   while (p < pend)
     {
-      if (ASCII_BYTE_P (*p))
+      if (ASCII_CHAR_P (*p))
        p++;
       else
        {
@@ -9109,8 +9115,7 @@ DEFUN ("find-coding-systems-region-internal",
 
 DEFUN ("unencodable-char-position", Funencodable_char_position,
        Sunencodable_char_position, 3, 5, 0,
-       doc: /*
-Return position of first un-encodable character in a region.
+       doc: /* Return position of first un-encodable character in a region.
 START and END specify the region and CODING-SYSTEM specifies the
 encoding to check.  Return nil if CODING-SYSTEM does encode the region.
 
@@ -9120,8 +9125,9 @@ list of positions.
 
 If optional 5th argument STRING is non-nil, it is a string to search
 for un-encodable characters.  In that case, START and END are indexes
-to the string.  */)
-  (Lisp_Object start, Lisp_Object end, Lisp_Object coding_system, Lisp_Object count, Lisp_Object string)
+to the string and treated as in `substring'.  */)
+  (Lisp_Object start, Lisp_Object end, Lisp_Object coding_system,
+   Lisp_Object count, Lisp_Object string)
 {
   EMACS_INT n;
   struct coding_system coding;
@@ -9158,12 +9164,7 @@ to the string.  */)
   else
     {
       CHECK_STRING (string);
-      CHECK_NATNUM (start);
-      CHECK_NATNUM (end);
-      if (! (XINT (start) <= XINT (end) && XINT (end) <= SCHARS (string)))
-       args_out_of_range_3 (string, start, end);
-      from = XINT (start);
-      to = XINT (end);
+      validate_subarray (string, start, end, SCHARS (string), &from, &to);
       if (! STRING_MULTIBYTE (string))
        return Qnil;
       p = SDATA (string) + string_char_to_byte (string, from);
@@ -9187,7 +9188,7 @@ to the string.  */)
       int c;
 
       if (ascii_compatible)
-       while (p < stop && ASCII_BYTE_P (*p))
+       while (p < stop && ASCII_CHAR_P (*p))
          p++, from++;
       if (p >= stop)
        {
@@ -9303,12 +9304,12 @@ is nil.  */)
     p = pbeg = BYTE_POS_ADDR (start_byte);
   pend = p + (end_byte - start_byte);
 
-  while (p < pend && ASCII_BYTE_P (*p)) p++, pos++;
-  while (p < pend && ASCII_BYTE_P (*(pend - 1))) pend--;
+  while (p < pend && ASCII_CHAR_P (*p)) p++, pos++;
+  while (p < pend && ASCII_CHAR_P (*(pend - 1))) pend--;
 
   while (p < pend)
     {
-      if (ASCII_BYTE_P (*p))
+      if (ASCII_CHAR_P (*p))
        p++;
       else
        {
@@ -9616,7 +9617,7 @@ Return the corresponding character.  */)
   CHECK_CODING_SYSTEM_GET_SPEC (Vsjis_coding_system, spec);
   attrs = AREF (spec, 0);
 
-  if (ASCII_BYTE_P (ch)
+  if (ASCII_CHAR_P (ch)
       && ! NILP (CODING_ATTR_ASCII_COMPAT (attrs)))
     return code;
 
@@ -9697,7 +9698,7 @@ Return the corresponding character.  */)
   CHECK_CODING_SYSTEM_GET_SPEC (Vbig5_coding_system, spec);
   attrs = AREF (spec, 0);
 
-  if (ASCII_BYTE_P (ch)
+  if (ASCII_CHAR_P (ch)
       && ! NILP (CODING_ATTR_ASCII_COMPAT (attrs)))
     return code;
 
@@ -9758,7 +9759,7 @@ DEFUN ("set-terminal-coding-system-internal", Fset_terminal_coding_system_intern
        doc: /* Internal use only.  */)
   (Lisp_Object coding_system, Lisp_Object terminal)
 {
-  struct terminal *term = get_terminal (terminal, 1);
+  struct terminal *term = decode_live_terminal (terminal);
   struct coding_system *terminal_coding = TERMINAL_TERMINAL_CODING (term);
   CHECK_SYMBOL (coding_system);
   setup_coding_system (Fcheck_coding_system (coding_system), terminal_coding);
@@ -9799,7 +9800,7 @@ frame's terminal device.  */)
   (Lisp_Object terminal)
 {
   struct coding_system *terminal_coding
-    = TERMINAL_TERMINAL_CODING (get_terminal (terminal, 1));
+    = TERMINAL_TERMINAL_CODING (decode_live_terminal (terminal));
   Lisp_Object coding_system = CODING_ID_NAME (terminal_coding->id);
 
   /* For backward compatibility, return nil if it is `undecided'.  */
@@ -9811,7 +9812,7 @@ DEFUN ("set-keyboard-coding-system-internal", Fset_keyboard_coding_system_intern
        doc: /* Internal use only.  */)
   (Lisp_Object coding_system, Lisp_Object terminal)
 {
-  struct terminal *t = get_terminal (terminal, 1);
+  struct terminal *t = decode_live_terminal (terminal);
   CHECK_SYMBOL (coding_system);
   if (NILP (coding_system))
     coding_system = Qno_conversion;
@@ -9830,7 +9831,7 @@ DEFUN ("keyboard-coding-system",
   (Lisp_Object terminal)
 {
   return CODING_ID_NAME (TERMINAL_KEYBOARD_CODING
-                        (get_terminal (terminal, 1))->id);
+                        (decode_live_terminal (terminal))->id);
 }
 
 \f
@@ -10040,7 +10041,8 @@ make_subsidiaries (Lisp_Object base)
 {
   Lisp_Object subsidiaries;
   ptrdiff_t base_name_len = SBYTES (SYMBOL_NAME (base));
-  char *buf = alloca (base_name_len + 6);
+  USE_SAFE_ALLOCA;
+  char *buf = SAFE_ALLOCA (base_name_len + 6);
   int i;
 
   memcpy (buf, SDATA (SYMBOL_NAME (base)), base_name_len);
@@ -10050,6 +10052,7 @@ make_subsidiaries (Lisp_Object base)
       strcpy (buf + base_name_len, suffixes[i]);
       ASET (subsidiaries, i, intern (buf));
     }
+  SAFE_FREE ();
   return subsidiaries;
 }
 
index 4e8b1056e434d67b275d78b9dd9a287f1d1e6625..ffd839f4212f67cad0fb392c89010e0e3552c218 100644 (file)
@@ -434,11 +434,37 @@ struct coding_system
 
   /* Flag bits of the coding system.  The meaning of each bit is common
      to all types of coding systems.  */
-  int common_flags;
+  unsigned common_flags : 14;
 
   /* Mode bits of the coding system.  See the comments of the macros
      CODING_MODE_XXX.  */
-  unsigned int mode;
+  unsigned mode : 5;
+
+  /* The following two members specify how binary 8-bit code 128..255
+     are represented in source and destination text respectively.  True
+     means they are represented by 2-byte sequence, false means they are
+     represented by 1-byte as is (see the comment in character.h).  */
+  bool_bf src_multibyte : 1;
+  bool_bf dst_multibyte : 1;
+
+  /* True if the source of conversion is not in the member
+     `charbuf', but at `src_object'.  */
+  bool_bf chars_at_source : 1;
+
+  /* Nonzero if the result of conversion is in `destination'
+     buffer rather than in `dst_object'.  */
+  bool_bf raw_destination : 1;
+
+  /* Set to true if charbuf contains an annotation.  */
+  bool_bf annotated : 1;
+
+  /* Used internally in coding.c.  See the comment of detect_ascii.  */
+  unsigned eol_seen : 3;
+
+  /* Finish status of code conversion.  */
+  ENUM_BF (coding_result_code) result : 3;
+
+  int max_charset_id;
 
   /* Detailed information specific to each type of coding system.  */
   union
@@ -451,16 +477,8 @@ struct coding_system
       struct undecided_spec undecided;
     } spec;
 
-  int max_charset_id;
   unsigned char *safe_charsets;
 
-  /* The following two members specify how binary 8-bit code 128..255
-     are represented in source and destination text respectively.  True
-     means they are represented by 2-byte sequence, false means they are
-     represented by 1-byte as is (see the comment in character.h).  */
-  bool_bf src_multibyte : 1;
-  bool_bf dst_multibyte : 1;
-
   /* How may heading bytes we can skip for decoding.  This is set to
      -1 in setup_coding_system, and updated by detect_coding.  So,
      when this is equal to the byte length of the text being
@@ -472,21 +490,9 @@ struct coding_system
      sequence.  Set by detect_coding_utf_8.  */
   ptrdiff_t detected_utf8_bytes, detected_utf8_chars;
 
-  /* Used internally in coding.c.  See the comment of detect_ascii.  */
-  int eol_seen;
-
   /* The following members are set by encoding/decoding routine.  */
   ptrdiff_t produced, produced_char, consumed, consumed_char;
 
-  /* Number of error source data found in a decoding routine.  */
-  ptrdiff_t errors;
-
-  /* Store the positions of error source data.  */
-  ptrdiff_t *error_positions;
-
-  /* Finish status of code conversion.  */
-  enum coding_result_code result;
-
   ptrdiff_t src_pos, src_pos_byte, src_chars, src_bytes;
   Lisp_Object src_object;
   const unsigned char *source;
@@ -510,17 +516,6 @@ struct coding_system
   int *charbuf;
   int charbuf_size, charbuf_used;
 
-  /* True if the source of conversion is not in the member
-     `charbuf', but at `src_object'.  */
-  bool_bf chars_at_source : 1;
-
-  /* Nonzero if the result of conversion is in `destination'
-     buffer rather than in `dst_object'.  */
-  bool_bf raw_destination : 1;
-
-  /* Set to true if charbuf contains an annotation.  */
-  bool_bf annotated : 1;
-
   unsigned char carryover[64];
   int carryover_bytes;
 
@@ -743,7 +738,7 @@ extern wchar_t *to_unicode (Lisp_Object str, Lisp_Object *buf);
 extern Lisp_Object from_unicode (Lisp_Object str);
 
 /* Convert WSTR to an Emacs string.  */
-extern Lisp_Object from_unicode_buffer (const wchar_twstr);
+extern Lisp_Object from_unicode_buffer (const wchar_t *wstr);
 
 #endif /* WINDOWSNT || CYGWIN */
 
index 36e3518b5ea30d789e40f80964345ecb4dec9e8a..1a09f683563dd2804316da6e658ccf7a6f1c96bb 100644 (file)
@@ -39,7 +39,3 @@ extern Lisp_Object unread_switch_frame;
 /* Nonzero if input is coming from the keyboard.  */
 
 #define INTERACTIVE (NILP (Vexecuting_kbd_macro) && !noninteractive)
-
-/* Set this nonzero to force reconsideration of mode line.  */
-
-extern int update_mode_lines;
index fa8821419086e53551d924c5c55cdab6bd1f2b1c..8982c904096ec732e6e70ef9b76d0608b122511c 100644 (file)
@@ -921,17 +921,18 @@ autocmp_chars (Lisp_Object rule, ptrdiff_t charpos, ptrdiff_t bytepos,
   return unbind_to (count, lgstring);
 }
 
-static Lisp_Object _work_val;
-
 /* 1 iff the character C is composable.  Characters of general
    category Z? or C? are not composable except for ZWNJ and ZWJ. */
 
-#define CHAR_COMPOSABLE_P(C)                                           \
-  ((C) > ' '                                                           \
-   && ((C) == 0x200C || (C) == 0x200D                                  \
-       || (_work_val = CHAR_TABLE_REF (Vunicode_category_table, (C)),  \
-          (INTEGERP (_work_val)                                        \
-           && (XINT (_work_val) <= UNICODE_CATEGORY_So)))))
+static bool
+char_composable_p (int c)
+{
+  Lisp_Object val;
+  return (c > ' '
+         && (c == 0x200C || c == 0x200D
+             || (val = CHAR_TABLE_REF (Vunicode_category_table, c),
+                 (INTEGERP (val) && (XINT (val) <= UNICODE_CATEGORY_So)))));
+}
 
 /* Update cmp_it->stop_pos to the next position after CHARPOS (and
    BYTEPOS) where character composition may happen.  If BYTEPOS is
@@ -1015,24 +1016,19 @@ composition_compute_stop_pos (struct composition_it *cmp_it, ptrdiff_t charpos,
          val = CHAR_TABLE_REF (Vcomposition_function_table, c);
          if (! NILP (val))
            {
-             Lisp_Object elt;
-             int ridx;
-
-             for (ridx = 0; CONSP (val); val = XCDR (val), ridx++)
+             for (int ridx = 0; CONSP (val); val = XCDR (val), ridx++)
                {
-                 elt = XCAR (val);
+                 Lisp_Object elt = XCAR (val);
                  if (VECTORP (elt) && ASIZE (elt) == 3
                      && NATNUMP (AREF (elt, 1))
                      && charpos - 1 - XFASTINT (AREF (elt, 1)) >= start)
-                   break;
-               }
-             if (CONSP (val))
-               {
-                 cmp_it->rule_idx = ridx;
-                 cmp_it->lookback = XFASTINT (AREF (elt, 1));
-                 cmp_it->stop_pos = charpos - 1 - cmp_it->lookback;
-                 cmp_it->ch = c;
-                 return;
+                   {
+                     cmp_it->rule_idx = ridx;
+                     cmp_it->lookback = XFASTINT (AREF (elt, 1));
+                     cmp_it->stop_pos = charpos - 1 - cmp_it->lookback;
+                     cmp_it->ch = c;
+                     return;
+                   }
                }
            }
        }
@@ -1067,7 +1063,7 @@ composition_compute_stop_pos (struct composition_it *cmp_it, ptrdiff_t charpos,
        p = SDATA (string) + bytepos;
       c = STRING_CHAR_AND_LENGTH (p, len);
       limit = bytepos + len;
-      while (CHAR_COMPOSABLE_P (c))
+      while (char_composable_p (c))
        {
          val = CHAR_TABLE_REF (Vcomposition_function_table, c);
          if (! NILP (val))
@@ -1144,7 +1140,7 @@ composition_compute_stop_pos (struct composition_it *cmp_it, ptrdiff_t charpos,
       /* Skip all uncomposable characters.  */
       if (NILP (string))
        {
-         while (charpos - 1 > endpos && ! CHAR_COMPOSABLE_P (c))
+         while (charpos - 1 > endpos && ! char_composable_p (c))
            {
              DEC_BOTH (charpos, bytepos);
              c = FETCH_MULTIBYTE_CHAR (bytepos);
@@ -1152,7 +1148,7 @@ composition_compute_stop_pos (struct composition_it *cmp_it, ptrdiff_t charpos,
        }
       else
        {
-         while (charpos - 1 > endpos && ! CHAR_COMPOSABLE_P (c))
+         while (charpos - 1 > endpos && ! char_composable_p (c))
            {
              p--;
              while (! CHAR_HEAD_P (*p))
@@ -1486,7 +1482,7 @@ find_automatic_composition (ptrdiff_t pos, ptrdiff_t limit,
                  |-B-|-C-|--D--|
 
      Here, it is known that characters after positions 1 and 9 can
-     never be composed (i.e. ! CHAR_COMPOSABLE_P (CH)), and
+     never be composed (i.e. ! char_composable_p (CH)), and
      composition A is an invalid one because it's partially covered by
      the valid composition C.  And to know whether a composition is
      valid or not, the only way is to start searching forward from a
@@ -1510,7 +1506,7 @@ find_automatic_composition (ptrdiff_t pos, ptrdiff_t limit,
   while (1)
     {
       c = STRING_CHAR (cur.p);
-      if (! CHAR_COMPOSABLE_P (c))
+      if (! char_composable_p (c))
        {
          if (limit <= pos)     /* case (1)  */
            {
@@ -1519,7 +1515,7 @@ find_automatic_composition (ptrdiff_t pos, ptrdiff_t limit,
                  return 0;
                BACKWARD_CHAR (cur, stop);
                c = STRING_CHAR (cur.p);
-             } while (! CHAR_COMPOSABLE_P (c));
+             } while (! char_composable_p (c));
              fore_check_limit = cur.pos + 1;
            }
          else                  /* case (2) */
@@ -1535,7 +1531,7 @@ find_automatic_composition (ptrdiff_t pos, ptrdiff_t limit,
          prev = cur;
          BACKWARD_CHAR (cur, stop);
          c = STRING_CHAR (cur.p);
-         if (! CHAR_COMPOSABLE_P (c))
+         if (! char_composable_p (c))
            {
              cur = prev;
              break;
@@ -1683,9 +1679,10 @@ Otherwise (for terminal display), FONT-OBJECT must be a terminal ID, a
 frame, or nil for the selected frame's terminal device.
 
 If the optional 4th argument STRING is not nil, it is a string
-containing the target characters between indices FROM and TO.
-Otherwise FROM and TO are character positions in current buffer;
-they can be in either order, and can be integers or markers.
+containing the target characters between indices FROM and TO,
+which are treated as in `substring'.  Otherwise FROM and TO are
+character positions in current buffer; they can be in either order,
+and can be integers or markers.
 
 A glyph-string is a vector containing information about how to display
 a specific character sequence.  The format is:
@@ -1722,7 +1719,7 @@ should be ignored.  */)
   if (! FONT_OBJECT_P (font_object))
     {
       struct coding_system *coding;
-      struct terminal *terminal = get_terminal (font_object, 1);
+      struct terminal *terminal = decode_live_terminal (font_object);
 
       coding = ((TERMINAL_TERMINAL_CODING (terminal)->common_flags
                 & CODING_REQUIRE_ENCODING_MASK)
@@ -1741,15 +1738,10 @@ should be ignored.  */)
     }
   else
     {
-      CHECK_NATNUM (from);
-      CHECK_NATNUM (to);
       CHECK_STRING (string);
+      validate_subarray (string, from, to, SCHARS (string), &frompos, &topos);
       if (! STRING_MULTIBYTE (string))
        error ("Attempt to shape unibyte text");
-      if (! (XINT (from) <= XINT (to) && XINT (to) <= SCHARS (string)))
-       args_out_of_range_3 (string, from, to);
-      frompos = XFASTINT (from);
-      topos = XFASTINT (to);
       frombyte = string_char_to_byte (string, frompos);
     }
 
@@ -1794,21 +1786,18 @@ DEFUN ("compose-string-internal", Fcompose_string_internal,
        Scompose_string_internal, 3, 5, 0,
        doc: /* Internal use only.
 
-Compose text between indices START and END of STRING.
-Optional 4th and 5th arguments are COMPONENTS and MODIFICATION-FUNC
+Compose text between indices START and END of STRING, where
+START and END are treated as in `substring'.  Optional 4th
+and 5th arguments are COMPONENTS and MODIFICATION-FUNC
 for the composition.  See `compose-string' for more details.  */)
-  (Lisp_Object string, Lisp_Object start, Lisp_Object end, Lisp_Object components, Lisp_Object modification_func)
+  (Lisp_Object string, Lisp_Object start, Lisp_Object end,
+   Lisp_Object components, Lisp_Object modification_func)
 {
-  CHECK_STRING (string);
-  CHECK_NUMBER (start);
-  CHECK_NUMBER (end);
+  ptrdiff_t from, to;
 
-  if (XINT (start) < 0 ||
-      XINT (start) > XINT (end)
-      || XINT (end) > SCHARS (string))
-    args_out_of_range (start, end);
-
-  compose_text (XINT (start), XINT (end), components, modification_func, string);
+  CHECK_STRING (string);
+  validate_subarray (string, start, end, SCHARS (string), &from, &to);
+  compose_text (from, to, components, modification_func, string);
   return string;
 }
 
index 254e004d655c4567e531f069e5f314c6af03f62f..8667e2554cdb9f2c470335af3b7450e926c15a29 100644 (file)
@@ -34,9 +34,10 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <stdbool.h>
 
-/* The pre-C99 <stdbool.h> emulation doesn't work for bool bitfields.
-   Nor does compiling Objective-C with standard GCC.  */
-#if __STDC_VERSION__ < 199901 || NS_IMPL_GNUSTEP
+/* The type of bool bitfields.  Needed to compile Objective-C with
+   standard GCC.  It was also needed to port to pre-C99 compilers,
+   although we don't care about that any more.  */
+#if NS_IMPL_GNUSTEP
 typedef unsigned int bool_bf;
 #else
 typedef bool bool_bf;
@@ -79,6 +80,23 @@ typedef bool bool_bf;
 #define vfork fork
 #endif  /* DARWIN_OS */
 
+/* If HYBRID_MALLOC is defined (e.g., on Cygwin), emacs will use
+   gmalloc before dumping and the system malloc after dumping.
+   hybrid_malloc and friends, defined in gmalloc.c, are wrappers that
+   accomplish this.  */
+#ifdef HYBRID_MALLOC
+#ifdef emacs
+#define malloc hybrid_malloc
+#define realloc hybrid_realloc
+#define calloc hybrid_calloc
+#define free hybrid_free
+#if defined HAVE_GET_CURRENT_DIR_NAME && !defined BROKEN_GET_CURRENT_DIR_NAME
+#define HYBRID_GET_CURRENT_DIR_NAME 1
+#define get_current_dir_name hybrid_get_current_dir_name
+#endif
+#endif
+#endif /* HYBRID_MALLOC */
+
 /* We have to go this route, rather than the old hpux9 approach of
    renaming the functions via macros.  The system's stdlib.h has fully
    prototyped declarations, which yields a conflicting definition of
@@ -87,10 +105,6 @@ typedef bool bool_bf;
 #ifdef HPUX
 #undef srandom
 #undef random
-/* We try to avoid checking for random and rint on hpux in
-   configure.ac, but some other configure test might check for them as
-   a dependency, so to be safe we also undefine them here.
- */
 #undef HAVE_RANDOM
 #undef HAVE_RINT
 #endif  /* HPUX */
@@ -225,16 +239,30 @@ extern void _DebPrint (const char *fmt, ...);
 
 #define ATTRIBUTE_CONST _GL_ATTRIBUTE_CONST
 
+#if 3 <= __GNUC__
+# define ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
+#else
+# define ATTRIBUTE_MALLOC
+#endif
+
+#if 4 < __GNUC__ + (3 <= __GNUC_MINOR__)
+# define ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args))
+#else
+# define ATTRIBUTE_ALLOC_SIZE(args)
+#endif
+
+#define ATTRIBUTE_MALLOC_SIZE(args) ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE (args)
+
 /* Work around GCC bug 59600: when a function is inlined, the inlined
    code may have its addresses sanitized even if the function has the
-   no_sanitize_address attribute.  This bug is present in GCC 4.8.2
-   and clang 3.3, the latest releases as of December 2013, and the
-   only platforms known to support address sanitization.  When the bug
-   is fixed the #if can be updated accordingly.  */
-#if ADDRESS_SANITIZER
-# define ADDRESS_SANITIZER_WORKAROUND NO_INLINE
+   no_sanitize_address attribute.  This bug is fixed in GCC 4.9.0 and
+   clang 3.4.  */
+#if (! ADDRESS_SANITIZER \
+     || ((4 < __GNUC__ + (9 <= __GNUC_MINOR__)) \
+        || 3 < __clang_major__ + (4 <= __clang_minor__)))
+# define ADDRESS_SANITIZER_WORKAROUND /* No workaround needed.  */
 #else
-# define ADDRESS_SANITIZER_WORKAROUND
+# define ADDRESS_SANITIZER_WORKAROUND NO_INLINE
 #endif
 
 /* Attribute of functions whose code should not have addresses
@@ -296,12 +324,10 @@ extern void _DebPrint (const char *fmt, ...);
      struct s { ...; t name[FLEXIBLE_ARRAY_MEMBER]; };
    and allocate (offsetof (struct s, name) + N * sizeof (t)) bytes.
    IBM xlc 12.1 claims to do C99 but mishandles flexible array members.  */
-#if 199901 <= __STDC_VERSION__ && !defined __IBMC__
-# define FLEXIBLE_ARRAY_MEMBER
-#elif __GNUC__ && !defined __STRICT_ANSI__
-# define FLEXIBLE_ARRAY_MEMBER 0
-#else
+#ifdef __IBMC__
 # define FLEXIBLE_ARRAY_MEMBER 1
+#else
+# define FLEXIBLE_ARRAY_MEMBER
 #endif
 
 /* Use this to suppress gcc's `...may be used before initialized' warnings. */
index f02b4588ad0af951cf03028059d023347b20a6e6..9977a3aaadd6d23f099790518290ab02264abaa7 100644 (file)
@@ -727,6 +727,11 @@ DEFUN ("fset", Ffset, Sfset, 2, 2, 0,
   if (AUTOLOADP (function))
     Fput (symbol, Qautoload, XCDR (function));
 
+  /* Convert to eassert or remove after GC bug is found.  In the
+     meantime, check unconditionally, at a slight perf hit.  */
+  if (valid_lisp_object_p (definition) < 1)
+    emacs_abort ();
+
   set_symbol_function (symbol, definition);
 
   return definition;
@@ -966,6 +971,51 @@ do_symval_forwarding (register union Lisp_Fwd *valcontents)
     }
 }
 
+/* Used to signal a user-friendly error when symbol WRONG is
+   not a member of CHOICE, which should be a list of symbols.  */
+
+void
+wrong_choice (Lisp_Object choice, Lisp_Object wrong)
+{
+  ptrdiff_t i = 0, len = XINT (Flength (choice));
+  Lisp_Object obj, *args;
+  AUTO_STRING (one_of, "One of ");
+  AUTO_STRING (comma, ", ");
+  AUTO_STRING (or, " or ");
+  AUTO_STRING (should_be_specified, " should be specified");
+
+  USE_SAFE_ALLOCA;
+  SAFE_ALLOCA_LISP (args, len * 2 + 1);
+
+  args[i++] = one_of;
+
+  for (obj = choice; !NILP (obj); obj = XCDR (obj))
+    {
+      args[i++] = SYMBOL_NAME (XCAR (obj));
+      args[i++] = (NILP (XCDR (obj)) ? should_be_specified
+                  : NILP (XCDR (XCDR (obj))) ? or : comma);
+    }
+
+  obj = Fconcat (i, args);
+  SAFE_FREE ();
+  xsignal2 (Qerror, obj, wrong);
+}
+
+/* Used to signal a user-friendly error if WRONG is not a number or
+   integer/floating-point number outsize of inclusive MIN..MAX range.  */
+
+static void
+wrong_range (Lisp_Object min, Lisp_Object max, Lisp_Object wrong)
+{
+  AUTO_STRING (value_should_be_from, "Value should be from ");
+  AUTO_STRING (to, " to ");
+  xsignal2 (Qerror,
+           Fconcat (4, ((Lisp_Object [])
+                        {value_should_be_from, Fnumber_to_string (min),
+                         to, Fnumber_to_string (max)})),
+           wrong);
+}
+
 /* Store NEWVAL into SYMBOL, where VALCONTENTS is found in the value cell
    of SYMBOL.  If SYMBOL is buffer-local, VALCONTENTS should be the
    buffer-independent contents of the value cell: forwarded just one
@@ -1022,10 +1072,33 @@ store_symval_forwarding (union Lisp_Fwd *valcontents, register Lisp_Object newva
        int offset = XBUFFER_OBJFWD (valcontents)->offset;
        Lisp_Object predicate = XBUFFER_OBJFWD (valcontents)->predicate;
 
-       if (!NILP (predicate) && !NILP (newval)
-           && NILP (call1 (predicate, newval)))
-         wrong_type_argument (predicate, newval);
+       if (!NILP (newval))
+         {
+           if (SYMBOLP (predicate))
+             {
+               Lisp_Object prop;
+
+               if ((prop = Fget (predicate, Qchoice), !NILP (prop)))
+                 {
+                   if (NILP (Fmemq (newval, prop)))
+                     wrong_choice (prop, newval);
+                 }
+               else if ((prop = Fget (predicate, Qrange), !NILP (prop)))
+                 {
+                   Lisp_Object min = XCAR (prop), max = XCDR (prop);
 
+                   if (!NUMBERP (newval)
+                       || !NILP (arithcompare (newval, min, ARITH_LESS))
+                       || !NILP (arithcompare (newval, max, ARITH_GRTR)))
+                     wrong_range (min, max, newval);
+                 }
+               else if (FUNCTIONP (predicate))
+                 {
+                   if (NILP (call1 (predicate, newval)))
+                     wrong_type_argument (predicate, newval);
+                 }
+             }
+         }
        if (buf == NULL)
          buf = current_buffer;
        set_per_buffer_value (buf, offset, newval);
@@ -1882,19 +1955,11 @@ DEFUN ("local-variable-p", Flocal_variable_p, Slocal_variable_p,
        1, 2, 0,
        doc: /* Non-nil if VARIABLE has a local binding in buffer BUFFER.
 BUFFER defaults to the current buffer.  */)
-  (register Lisp_Object variable, Lisp_Object buffer)
+  (Lisp_Object variable, Lisp_Object buffer)
 {
-  register struct buffer *buf;
+  struct buffer *buf = decode_buffer (buffer);
   struct Lisp_Symbol *sym;
 
-  if (NILP (buffer))
-    buf = current_buffer;
-  else
-    {
-      CHECK_BUFFER (buffer);
-      buf = XBUFFER (buffer);
-    }
-
   CHECK_SYMBOL (variable);
   sym = XSYMBOL (variable);
 
@@ -2327,7 +2392,7 @@ arithcompare_driver (ptrdiff_t nargs, Lisp_Object *args,
   ptrdiff_t argnum;
   for (argnum = 1; argnum < nargs; ++argnum)
     {
-      if (EQ (Qnil, arithcompare (args[argnum-1], args[argnum], comparison)))
+      if (EQ (Qnil, arithcompare (args[argnum - 1], args[argnum], comparison)))
         return Qnil;
     }
   return Qt;
@@ -2379,24 +2444,6 @@ DEFUN ("/=", Fneq, Sneq, 2, 2, 0,
 {
   return arithcompare (num1, num2, ARITH_NOTEQUAL);
 }
-
-DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0,
-       doc: /* Return t if NUMBER is zero.  */)
-  (register Lisp_Object number)
-{
-  CHECK_NUMBER_OR_FLOAT (number);
-
-  if (FLOATP (number))
-    {
-      if (XFLOAT_DATA (number) == 0.0)
-       return Qt;
-      return Qnil;
-    }
-
-  if (!XINT (number))
-    return Qt;
-  return Qnil;
-}
 \f
 /* Convert the cons-of-integers, integer, or float value C to an
    unsigned value with maximum value MAX.  Signal an error if C does not
@@ -2888,7 +2935,7 @@ In this case, the sign bit is duplicated.  */)
   if (XINT (count) >= BITS_PER_EMACS_INT)
     XSETINT (val, 0);
   else if (XINT (count) > 0)
-    XSETINT (val, XINT (value) << XFASTINT (count));
+    XSETINT (val, XUINT (value) << XFASTINT (count));
   else if (XINT (count) <= -BITS_PER_EMACS_INT)
     XSETINT (val, XINT (value) < 0 ? -1 : 0);
   else
@@ -3643,7 +3690,6 @@ syms_of_data (void)
   defsubr (&Sleq);
   defsubr (&Sgeq);
   defsubr (&Sneq);
-  defsubr (&Szerop);
   defsubr (&Splus);
   defsubr (&Sminus);
   defsubr (&Stimes);
index 8ebc56c72c4bf5fb11504759007a7d30a52b683a..4852739d8e4405339b860e4deeb68ec8ea708ecb 100644 (file)
@@ -142,10 +142,7 @@ static bool xd_in_read_queued_messages = 0;
   } while (0)
 
 #else /* !DBUS_DEBUG */
-# if __STDC_VERSION__ < 199901
-#  define XD_DEBUG_MESSAGE (void) /* Pre-C99 compilers cannot debug.  */
-# else
-#  define XD_DEBUG_MESSAGE(...)                                                \
+# define XD_DEBUG_MESSAGE(...)                                         \
   do {                                                                 \
     if (!NILP (Vdbus_debug))                                           \
       {                                                                        \
@@ -154,7 +151,6 @@ static bool xd_in_read_queued_messages = 0;
        message ("%s: %s", __func__, s);                                \
       }                                                                        \
   } while (0)
-# endif
 # define XD_DEBUG_VALID_LISP_OBJECT_P(object)
 #endif
 
@@ -765,7 +761,7 @@ xd_append_arg (int dtype, Lisp_Object object, DBusMessageIter *iter)
                && STRINGP (CAR_SAFE (XD_NEXT_VALUE (object)))
                && NILP (CDR_SAFE (XD_NEXT_VALUE (object))))
              {
-               strcpy (signature, SSDATA (CAR_SAFE (XD_NEXT_VALUE (object))));
+               lispstpcpy (signature, CAR_SAFE (XD_NEXT_VALUE (object)));
                object = CDR_SAFE (XD_NEXT_VALUE (object));
              }
 
@@ -1058,6 +1054,7 @@ xd_remove_watch (DBusWatch *watch, void *data)
 
   /* Unset session environment.  */
 #if 0
+  /* This is buggy, since unsetenv is not thread-safe.  */
   if (XSYMBOL (QCdbus_session_bus) == data)
     {
       XD_DEBUG_MESSAGE ("unsetenv DBUS_SESSION_BUS_ADDRESS");
@@ -1223,9 +1220,6 @@ this connection to those buses.  */)
       XSETFASTINT (val, (intptr_t) connection);
       xd_registered_buses = Fcons (Fcons (bus, val), xd_registered_buses);
 
-      /* We do not want to abort.  */
-      xputenv ("DBUS_FATAL_WARNINGS=0");
-
       /* Cleanup.  */
       dbus_error_free (&derror);
     }
@@ -1741,6 +1735,13 @@ xd_read_queued_messages (int fd, void *data)
 }
 
 \f
+void
+init_dbusbind (void)
+{
+  /* We do not want to abort.  */
+  xputenv ("DBUS_FATAL_WARNINGS=0");
+}
+
 void
 syms_of_dbusbind (void)
 {
index cd8a3d1e9626264e85a38f2456b85a67119b1e4f..24ce852245c99de12c087d7461a39f5664da868e 100644 (file)
@@ -60,10 +60,7 @@ init_zlib_functions (void)
   HMODULE library = w32_delayed_load (Qzlib_dll);
 
   if (!library)
-    {
-      message1 ("zlib library not found");
-      return false;
-    }
+    return false;
 
   LOAD_ZLIB_FN (library, inflateInit2_);
   LOAD_ZLIB_FN (library, inflate);
@@ -150,7 +147,10 @@ This function can be called only in unibyte buffers.  */)
   if (!zlib_initialized)
     zlib_initialized = init_zlib_functions ();
   if (!zlib_initialized)
-    return Qnil;
+    {
+      message1 ("zlib library not found");
+      return Qnil;
+    }
 #endif
 
   /* This is a unibyte buffer, so character positions and bytes are
index 1d67d750983f5de32206c3b7588581a5ea4524e5..3fdbbe6605fe9743f8463fd0a4d85184268124cc 100644 (file)
@@ -1,7 +1,7 @@
 ### deps.mk --- src/Makefile fragment for GNU Emacs
 
-## Copyright (C) 1985, 1987-1988, 1993-1995, 1999-2014 Free Software
-## Foundation, Inc.
+## Copyright (C) 1985, 1987-1988, 1993-1995, 1999-2014
+##   Free Software Foundation, Inc.
 
 ## This file is part of GNU Emacs.
 
@@ -27,8 +27,6 @@
 ## Eg callproc.c only depends on w32.h for WINDOWSNT builds.
 ## One way to fix this would be to replace w32.h (etc) by $(W32_H),
 ## a variable set by configure.  Does not seem worth the trouble.
-## Since the w32 build does not even use this file, you might ask
-## why these dependencies are here at all...
 
 ## nsgui.h: In fact, every .o file depends directly or indirectly on
 ## dispextern.h and hence nsgui.h under NS.  But the ones that actually
index c2db1f02782bceb9b5c8bf573cf8f78cf3b8ab2a..ba6a61a2f5b819c980acc12d944b4f03ece8c9f3 100644 (file)
@@ -995,7 +995,7 @@ file_attributes (int fd, char const *name, Lisp_Object id_format)
   values[10] = INTEGER_TO_CONS (s.st_ino);
   values[11] = INTEGER_TO_CONS (s.st_dev);
 
-  return Flist (sizeof (values) / sizeof (values[0]), values);
+  return Flist (ARRAYELTS (values), values);
 }
 
 DEFUN ("file-attributes-lessp", Ffile_attributes_lessp, Sfile_attributes_lessp, 2, 2, 0,
index 576f22870c2b580665748db8cff615c32c811bf4..228502ca06a02e6579bc33b9d26547c93bac40bf 100644 (file)
@@ -118,7 +118,8 @@ enum window_part
   ON_RIGHT_FRINGE,
   ON_LEFT_MARGIN,
   ON_RIGHT_MARGIN,
-  ON_SCROLL_BAR,
+  ON_VERTICAL_SCROLL_BAR,
+  ON_HORIZONTAL_SCROLL_BAR,
   ON_RIGHT_DIVIDER,
   ON_BOTTOM_DIVIDER
 };
@@ -1716,8 +1717,10 @@ struct face
      attributes except the font.  */
   struct face *ascii_face;
 
+#ifdef HAVE_XFT
   /* Extra member that a font-driver uses privately.  */
   void *extra;
+#endif
 };
 
 
@@ -1795,16 +1798,6 @@ struct face_cache
   bool_bf menu_face_changed_p : 1;
 };
 
-
-/* Prepare face FACE for use on frame F.  This must be called before
-   using X resources of FACE.  */
-
-#define PREPARE_FACE_FOR_DISPLAY(F, FACE)      \
-  do {                                         \
-     if ((FACE)->gc == 0)                      \
-       prepare_face_for_display ((F), (FACE)); \
-  } while (false)
-
 /* Return a pointer to the face with ID on frame F, or null if such a
    face doesn't exist.  */
 
@@ -2831,45 +2824,51 @@ struct redisplay_interface
                                 int h, int wd);
   void (*destroy_fringe_bitmap) (int which);
 
-/* Compute left and right overhang of glyph string S.
-   A NULL pointer if platform does not support this. */
+  /* Compute left and right overhang of glyph string S.
+     A NULL pointer if platform does not support this. */
   void (*compute_glyph_string_overhangs) (struct glyph_string *s);
 
-/* Draw a glyph string S.  */
+  /* Draw a glyph string S.  */
   void (*draw_glyph_string) (struct glyph_string *s);
 
-/* Define cursor CURSOR on frame F.  */
+  /* Define cursor CURSOR on frame F.  */
   void (*define_frame_cursor) (struct frame *f, Cursor cursor);
 
-/* Clear the area at (X,Y,WIDTH,HEIGHT) of frame F.  */
+  /* Clear the area at (X,Y,WIDTH,HEIGHT) of frame F.  */
   void (*clear_frame_area) (struct frame *f, int x, int y,
                             int width, int height);
 
-/* Draw specified cursor CURSOR_TYPE of width CURSOR_WIDTH
-   at row GLYPH_ROW on window W if ON_P is true.  If ON_P is
-   false, don't draw cursor.  If ACTIVE_P is true, system caret
-   should track this cursor (when applicable).  */
+  /* Draw specified cursor CURSOR_TYPE of width CURSOR_WIDTH
+     at row GLYPH_ROW on window W if ON_P is true.  If ON_P is
+     false, don't draw cursor.  If ACTIVE_P is true, system caret
+     should track this cursor (when applicable).  */
   void (*draw_window_cursor) (struct window *w,
                              struct glyph_row *glyph_row,
                              int x, int y,
                              enum text_cursor_kinds cursor_type,
                              int cursor_width, bool on_p, bool active_p);
 
-/* Draw vertical border for window W from (X,Y_0) to (X,Y_1).  */
+  /* Draw vertical border for window W from (X,Y_0) to (X,Y_1).  */
   void (*draw_vertical_window_border) (struct window *w,
                                        int x, int y_0, int y_1);
 
-/* Draw window divider for window W from (X_0, Y_0) to (X_1, ,Y_1).  */
+  /* Draw window divider for window W from (X_0, Y_0) to (X_1, ,Y_1).  */
   void (*draw_window_divider) (struct window *w,
                               int x_0, int x_1, int y_0, int y_1);
 
-/* Shift display of frame F to make room for inserted glyphs.
-   The area at pixel (X,Y) of width WIDTH and height HEIGHT is
-   shifted right by SHIFT_BY pixels.  */
+  /* Shift display of frame F to make room for inserted glyphs.
+     The area at pixel (X,Y) of width WIDTH and height HEIGHT is
+     shifted right by SHIFT_BY pixels.  */
   void (*shift_glyphs_for_insert) (struct frame *f,
                                    int x, int y, int width,
                                    int height, int shift_by);
 
+  /* Start display hourglass cursor on frame F.  */
+  void (*show_hourglass) (struct frame *f);
+
+  /* Cancel hourglass cursor on frame F.  */
+  void (*hide_hourglass) (struct frame *f);
+
 #endif /* HAVE_WINDOW_SYSTEM */
 };
 
@@ -3166,9 +3165,8 @@ int default_line_pixel_height (struct window *);
 int display_prop_intangible_p (Lisp_Object, Lisp_Object, ptrdiff_t, ptrdiff_t);
 void resize_echo_area_exactly (void);
 int resize_mini_window (struct window *, int);
-#if defined USE_TOOLKIT_SCROLL_BARS && !defined USE_GTK
 void set_vertical_scroll_bar (struct window *);
-#endif
+void set_horizontal_scroll_bar (struct window *);
 int try_window (Lisp_Object, struct text_pos, int);
 void window_box (struct window *, enum glyph_row_area,
                 int *, int *, int *, int *);
@@ -3178,7 +3176,6 @@ int window_box_width (struct window *, enum glyph_row_area);
 int window_box_left (struct window *, enum glyph_row_area);
 int window_box_left_offset (struct window *, enum glyph_row_area);
 int window_box_right (struct window *, enum glyph_row_area);
-int window_box_right_offset (struct window *, enum glyph_row_area);
 int estimate_mode_line_height (struct frame *, enum face_id);
 int move_it_to (struct it *, ptrdiff_t, int, int, int, int);
 void pixel_to_glyph_coords (struct frame *, int, int, int *, int *,
@@ -3241,9 +3238,7 @@ extern void draw_phys_cursor_glyph (struct window *,
                                     enum draw_glyphs_face);
 extern void get_phys_cursor_geometry (struct window *, struct glyph_row *,
                                       struct glyph *, int *, int *, int *);
-#if HAVE_NTGUI
 extern void erase_phys_cursor (struct window *);
-#endif
 extern void display_and_set_cursor (struct window *, bool, int, int, int, int);
 extern void x_update_cursor (struct frame *, bool);
 extern void x_clear_cursor (struct window *);
@@ -3282,7 +3277,6 @@ void draw_fringe_bitmap (struct window *, struct glyph_row *, int);
 void draw_row_fringe_bitmaps (struct window *, struct glyph_row *);
 bool draw_window_fringes (struct window *, bool);
 bool update_window_fringes (struct window *, bool);
-void compute_fringe_widths (struct frame *, bool);
 
 #ifdef HAVE_NTGUI
 void w32_init_fringe (struct redisplay_interface *);
@@ -3357,13 +3351,13 @@ void update_face_from_frame_parameter (struct frame *, Lisp_Object,
                                        Lisp_Object);
 Lisp_Object tty_color_name (struct frame *, int);
 void clear_face_cache (int);
-#ifdef MSDOS
 unsigned long load_color (struct frame *, struct face *, Lisp_Object,
                           enum lface_attribute_index);
-#endif
 char *choose_face_font (struct frame *, Lisp_Object *, Lisp_Object,
                         int *);
+#ifdef HAVE_WINDOW_SYSTEM
 void prepare_face_for_display (struct frame *, struct face *);
+#endif
 int lookup_named_face (struct frame *, Lisp_Object, int);
 int lookup_basic_face (struct frame *, int);
 int smaller_face (struct frame *, int, int);
@@ -3399,6 +3393,7 @@ void gamma_correct (struct frame *, COLORREF *);
 #ifdef HAVE_WINDOW_SYSTEM
 
 void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object);
+void x_change_tool_bar_height (struct frame *f, int);
 
 extern Lisp_Object tip_frame;
 extern Window tip_window;
@@ -3406,14 +3401,6 @@ extern frame_parm_handler x_frame_parm_handlers[];
 
 extern void start_hourglass (void);
 extern void cancel_hourglass (void);
-extern bool hourglass_shown_p;
-/* If non-null, an asynchronous timer that, when it expires, displays
-   an hourglass cursor on all frames.  */
-extern struct atimer *hourglass_atimer;
-
-/* Each GUI implements these.  FIXME: move into RIF. */
-extern void show_hourglass (struct atimer *);
-extern void hide_hourglass (void);
 
 /* Returns the background color of IMG, calculating one heuristically if
    necessary.  If non-zero, XIMG is an existing XImage object to use for
@@ -3513,7 +3500,6 @@ extern void calculate_costs (struct frame *);
 extern void produce_glyphs (struct it *);
 extern bool tty_capable_p (struct tty_display_info *, unsigned);
 extern void set_tty_color_mode (struct tty_display_info *, struct frame *);
-extern struct terminal *get_named_tty (const char *);
 extern void create_tty_output (struct frame *);
 extern struct terminal *init_tty (const char *, const char *, bool);
 extern void tty_append_glyph (struct it *);
@@ -3521,13 +3507,13 @@ extern void tty_append_glyph (struct it *);
 
 /* Defined in scroll.c */
 
-extern int scrolling_max_lines_saved (int, int, int *, int *, int *);
+extern int scrolling_max_lines_saved (int, int, unsigned *, unsigned *, int *);
 extern void do_line_insertion_deletion_costs (struct frame *, const char *,
                                               const char *, const char *,
                                              const char *, const char *,
                                              const char *, int);
-void scrolling_1 (struct frame *, int, int, int, int *, int *, int *,
-                  int *, int);
+void scrolling_1 (struct frame *, int, int, int, int *, int *, unsigned *,
+                  unsigned *, int);
 
 /* Defined in frame.c */
 
index 713457750453af06b638cc74be5dd4a049c76071..3ab8bcf3e640322d1d288423bca401b9b4d1e401 100644 (file)
@@ -72,7 +72,6 @@ struct dim
 static void update_frame_line (struct frame *, int);
 static int required_matrix_height (struct window *);
 static int required_matrix_width (struct window *);
-static void change_frame_size_1 (struct frame *, int, int, bool, bool, bool, bool);
 static void increment_row_positions (struct glyph_row *, ptrdiff_t, ptrdiff_t);
 static void build_frame_matrix_from_window_tree (struct glyph_matrix *,
                                                  struct window *);
@@ -1108,10 +1107,10 @@ prepare_desired_row (struct window *w, struct glyph_row *row, bool mode_line_p)
 /* Return a hash code for glyph row ROW, which may
    be from current or desired matrix of frame F.  */
 
-static int
+static unsigned
 line_hash_code (struct frame *f, struct glyph_row *row)
 {
-  int hash = 0;
+  unsigned hash = 0;
 
   if (row->enabled_p)
     {
@@ -2015,12 +2014,12 @@ adjust_frame_glyphs_for_frame_redisplay (struct frame *f)
       /* Size of frame matrices must equal size of frame.  Note
         that we are called for X frames with window widths NOT equal
         to the frame width (from CHANGE_FRAME_SIZE_1).  */
-      if (matrix_dim.width != FRAME_COLS (f)
-         || matrix_dim.height != FRAME_LINES (f))
+      if (matrix_dim.width != FRAME_TOTAL_COLS (f)
+         || matrix_dim.height != FRAME_TOTAL_LINES (f))
        return;
 
-      eassert (matrix_dim.width == FRAME_COLS (f)
-              && matrix_dim.height == FRAME_LINES (f));
+      eassert (matrix_dim.width == FRAME_TOTAL_COLS (f)
+              && matrix_dim.height == FRAME_TOTAL_LINES (f));
 
       /* Pointers to glyph memory in glyph rows are exchanged during
         the update phase of redisplay, which means in general that a
@@ -2122,11 +2121,11 @@ adjust_frame_glyphs_for_window_redisplay (struct frame *f)
     w->left_col = 0;
     w->pixel_top = FRAME_MENU_BAR_HEIGHT (f);
     w->top_line = FRAME_MENU_BAR_LINES (f);
+    w->total_cols = FRAME_TOTAL_COLS (f);
     w->pixel_width = (FRAME_PIXEL_WIDTH (f)
                       - 2 * FRAME_INTERNAL_BORDER_WIDTH (f));
-    w->total_cols = FRAME_TOTAL_COLS (f);
-    w->pixel_height = FRAME_TOOL_BAR_HEIGHT (f);
     w->total_lines = FRAME_TOOL_BAR_LINES (f);
+    w->pixel_height = FRAME_TOOL_BAR_HEIGHT (f);
     allocate_matrices_for_window_redisplay (w);
   }
 #endif
@@ -2138,7 +2137,7 @@ adjust_frame_glyphs_for_window_redisplay (struct frame *f)
 static void
 adjust_decode_mode_spec_buffer (struct frame *f)
 {
-  ssize_t frame_message_buf_size = FRAME_MESSAGE_BUF_SIZE (f);
+  int frame_message_buf_size = FRAME_MESSAGE_BUF_SIZE (f);
 
   eassert (frame_message_buf_size >= 0);
   f->decode_mode_spec_buffer = xrealloc (f->decode_mode_spec_buffer,
@@ -2687,7 +2686,8 @@ mirrored_line_dance (struct glyph_matrix *matrix, int unchanged_at_top, int nlin
   int i;
 
   /* Make a copy of the original rows.  */
-  old_rows = alloca (nlines * sizeof *old_rows);
+  USE_SAFE_ALLOCA;
+  SAFE_NALLOCA (old_rows, 1, nlines);
   memcpy (old_rows, new_rows, nlines * sizeof *old_rows);
 
   /* Assign new rows, maybe clear lines.  */
@@ -2709,6 +2709,8 @@ mirrored_line_dance (struct glyph_matrix *matrix, int unchanged_at_top, int nlin
   if (frame_matrix_frame)
     mirror_line_dance (XWINDOW (frame_matrix_frame->root_window),
                       unchanged_at_top, nlines, copy_from, retained_p);
+
+  SAFE_FREE ();
 }
 
 
@@ -2801,7 +2803,8 @@ mirror_line_dance (struct window *w, int unchanged_at_top, int nlines, int *copy
          struct glyph_row *old_rows;
 
          /* Make a copy of the original rows of matrix m.  */
-         old_rows = alloca (m->nrows * sizeof *old_rows);
+         USE_SAFE_ALLOCA;
+         SAFE_NALLOCA (old_rows, 1, m->nrows);
          memcpy (old_rows, m->rows, m->nrows * sizeof *old_rows);
 
          for (i = 0; i < nlines; ++i)
@@ -2877,6 +2880,8 @@ mirror_line_dance (struct window *w, int unchanged_at_top, int nlines, int *copy
 
          /* Check that no pointers are lost.  */
          CHECK_MATRIX (m);
+
+         SAFE_FREE ();
        }
 
       /* Next window on same level.  */
@@ -2958,7 +2963,7 @@ window_to_frame_vpos (struct window *w, int vpos)
   eassert (!FRAME_WINDOW_P (XFRAME (w->frame)));
   eassert (vpos >= 0 && vpos <= w->desired_matrix->nrows);
   vpos += WINDOW_TOP_EDGE_LINE (w);
-  eassert (vpos >= 0 && vpos <= FRAME_LINES (XFRAME (w->frame)));
+  eassert (vpos >= 0 && vpos <= FRAME_TOTAL_LINES (XFRAME (w->frame)));
   return vpos;
 }
 
@@ -3423,7 +3428,7 @@ update_window (struct window *w, bool force_p)
       mode_line_row = MATRIX_MODE_LINE_ROW (desired_matrix);
       if (mode_line_row->mode_line_p && mode_line_row->enabled_p)
        {
-         mode_line_row->y = yb;
+         mode_line_row->y = yb + WINDOW_SCROLL_BAR_AREA_HEIGHT (w);
          update_window_line (w, MATRIX_ROW_VPOS (mode_line_row,
                                                  desired_matrix),
                              &mouse_face_overwritten_p);
@@ -4539,7 +4544,7 @@ update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p,
        }
     }
 
-  pause_p = 0 < i && i < FRAME_LINES (f) - 1;
+  pause_p = 0 < i && i < FRAME_TOTAL_LINES (f) - 1;
 
   /* Now just clean up termcap drivers and set cursor, etc.  */
   if (!pause_p && set_cursor_p)
@@ -4572,7 +4577,7 @@ update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p,
                 cursor at the end of the prompt.  If the mini-buffer
                 is several lines high, find the last line that has
                 any text on it.  */
-             row = FRAME_LINES (f);
+             row = FRAME_TOTAL_LINES (f);
              do
                {
                  --row;
@@ -4600,7 +4605,7 @@ update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p,
              if (col >= FRAME_CURSOR_X_LIMIT (f))
                {
                  /* If we have another row, advance cursor into it.  */
-                 if (row < FRAME_LINES (f) - 1)
+                 if (row < FRAME_TOTAL_LINES (f) - 1)
                    {
                      col = FRAME_LEFT_SCROLL_BAR_COLS (f);
                      row++;
@@ -4650,14 +4655,19 @@ scrolling (struct frame *frame)
   int unchanged_at_top, unchanged_at_bottom;
   int window_size;
   int changed_lines;
-  int *old_hash = alloca (FRAME_LINES (frame) * sizeof (int));
-  int *new_hash = alloca (FRAME_LINES (frame) * sizeof (int));
-  int *draw_cost = alloca (FRAME_LINES (frame) * sizeof (int));
-  int *old_draw_cost = alloca (FRAME_LINES (frame) * sizeof (int));
-  register int i;
-  int free_at_end_vpos = FRAME_LINES (frame);
+  int i;
+  int height = FRAME_TOTAL_LINES (frame);
+  int free_at_end_vpos = height;
   struct glyph_matrix *current_matrix = frame->current_matrix;
   struct glyph_matrix *desired_matrix = frame->desired_matrix;
+  verify (sizeof (int) <= sizeof (unsigned));
+  verify (alignof (unsigned) % alignof (int) == 0);
+  unsigned *old_hash;
+  USE_SAFE_ALLOCA;
+  SAFE_NALLOCA (old_hash, 4, height);
+  unsigned *new_hash = old_hash + height;
+  int *draw_cost = (int *) (new_hash + height);
+  int *old_draw_cost = draw_cost + height;
 
   eassert (current_matrix);
 
@@ -4666,12 +4676,15 @@ scrolling (struct frame *frame)
      number of unchanged lines at the end.  */
   changed_lines = 0;
   unchanged_at_top = 0;
-  unchanged_at_bottom = FRAME_LINES (frame);
-  for (i = 0; i < FRAME_LINES (frame); i++)
+  unchanged_at_bottom = height;
+  for (i = 0; i < height; i++)
     {
       /* Give up on this scrolling if some old lines are not enabled.  */
       if (!MATRIX_ROW_ENABLED_P (current_matrix, i))
-       return 0;
+       {
+         SAFE_FREE ();
+         return false;
+       }
       old_hash[i] = line_hash_code (frame, MATRIX_ROW (current_matrix, i));
       if (! MATRIX_ROW_ENABLED_P (desired_matrix, i))
        {
@@ -4689,7 +4702,7 @@ scrolling (struct frame *frame)
       if (old_hash[i] != new_hash[i])
        {
          changed_lines++;
-         unchanged_at_bottom = FRAME_LINES (frame) - i - 1;
+         unchanged_at_bottom = height - i - 1;
        }
       else if (i == unchanged_at_top)
        unchanged_at_top++;
@@ -4699,10 +4712,13 @@ scrolling (struct frame *frame)
   /* If changed lines are few, don't allow preemption, don't scroll.  */
   if ((!FRAME_SCROLL_REGION_OK (frame)
        && changed_lines < baud_rate / 2400)
-      || unchanged_at_bottom == FRAME_LINES (frame))
-    return 1;
+      || unchanged_at_bottom == height)
+    {
+      SAFE_FREE ();
+      return true;
+    }
 
-  window_size = (FRAME_LINES (frame) - unchanged_at_top
+  window_size = (height - unchanged_at_top
                 - unchanged_at_bottom);
 
   if (FRAME_SCROLL_REGION_OK (frame))
@@ -4710,27 +4726,25 @@ scrolling (struct frame *frame)
   else if (FRAME_MEMORY_BELOW_FRAME (frame))
     free_at_end_vpos = -1;
 
-  /* If large window, fast terminal and few lines in common between
-     current frame and desired frame, don't bother with i/d calc.  */
-  if (!FRAME_SCROLL_REGION_OK (frame)
-      && window_size >= 18 && baud_rate > 2400
-      && (window_size >=
-         10 * scrolling_max_lines_saved (unchanged_at_top,
-                                         FRAME_LINES (frame) - unchanged_at_bottom,
-                                         old_hash, new_hash, draw_cost)))
-    return 0;
-
-  if (window_size < 2)
-    return 0;
-
-  scrolling_1 (frame, window_size, unchanged_at_top, unchanged_at_bottom,
-              draw_cost + unchanged_at_top - 1,
-              old_draw_cost + unchanged_at_top - 1,
-              old_hash + unchanged_at_top - 1,
-              new_hash + unchanged_at_top - 1,
-              free_at_end_vpos - unchanged_at_top);
-
-  return 0;
+  /* Do id/calc only if small window, or slow terminal, or many lines
+     in common between current frame and desired frame.  But the
+     window size must be at least 2.  */
+  if ((FRAME_SCROLL_REGION_OK (frame)
+       || window_size < 18 || baud_rate <= 2400
+       || (window_size
+          < 10 * scrolling_max_lines_saved (unchanged_at_top,
+                                            height - unchanged_at_bottom,
+                                            old_hash, new_hash, draw_cost)))
+      && 2 <= window_size)
+    scrolling_1 (frame, window_size, unchanged_at_top, unchanged_at_bottom,
+                draw_cost + unchanged_at_top - 1,
+                old_draw_cost + unchanged_at_top - 1,
+                old_hash + unchanged_at_top - 1,
+                new_hash + unchanged_at_top - 1,
+                free_at_end_vpos - unchanged_at_top);
+
+  SAFE_FREE ();
+  return false;
 }
 
 
@@ -5435,7 +5449,9 @@ handle_window_change_signal (int sig)
           /* Record the new sizes, but don't reallocate the data
              structures now.  Let that be done later outside of the
              signal handler.  */
-          change_frame_size (XFRAME (frame), width, height, 0, 1, 0, 0);
+          change_frame_size (XFRAME (frame), width,
+                            height - FRAME_MENU_BAR_LINES (XFRAME (frame)),
+                            0, 1, 0, 0);
     }
   }
 }
@@ -5476,52 +5492,11 @@ do_pending_window_change (bool safe)
     }
 }
 
-/* Change the frame height and/or width.  Values may be given as zero to
-   indicate no change is to take place.
-
-   new_height and new_width refer to the text portion of the frame.  It
-   doesn't matter for new_height, since text and total portion are the
-   same in that case.  But new_width must be enlarged to get the total
-   width of the frame.
-
-   If DELAY, assume we're being called from a signal handler, and
-   queue the change for later - perhaps the next redisplay.
-   Since this tries to resize windows, we can't call it
-   from a signal handler.
-
-   SAFE means this function is called from a place where it's
-   safe to change frame sizes while a redisplay is in progress.  */
-
-void
-change_frame_size (struct frame *f, int new_width, int new_height,
-                  bool pretend, bool delay, bool safe, bool pixelwise)
-{
-  Lisp_Object tail, frame;
-
-  if (FRAME_MSDOS_P (f))
-    {
-      /* On MS-DOS, all frames use the same screen, so a change in
-         size affects all frames.  Termcap now supports multiple
-         ttys. */
-      FOR_EACH_FRAME (tail, frame)
-       if (! FRAME_WINDOW_P (XFRAME (frame)))
-         change_frame_size_1 (XFRAME (frame), new_width, new_height,
-                              pretend, delay, safe, pixelwise);
-    }
-  else
-    change_frame_size_1 (f, new_width, new_height, pretend, delay, safe,
-                        pixelwise);
-}
 
 static void
 change_frame_size_1 (struct frame *f, int new_width, int new_height,
                     bool pretend, bool delay, bool safe, bool pixelwise)
 {
-  int new_text_width, new_text_height, new_root_width;
-  int old_root_width = WINDOW_PIXEL_WIDTH (XWINDOW (FRAME_ROOT_WINDOW (f)));
-  int new_cols, new_lines;
-  ptrdiff_t count = SPECPDL_INDEX ();
-
   /* If we can't deal with the change now, queue it for later.  */
   if (delay || (redisplaying_p && !safe))
     {
@@ -5529,125 +5504,63 @@ change_frame_size_1 (struct frame *f, int new_width, int new_height,
       f->new_height = new_height;
       f->new_pixelwise = pixelwise;
       delayed_size_change = 1;
-      return;
-    }
-
-  /* This size-change overrides any pending one for this frame.  */
-  f->new_height = 0;
-  f->new_width = 0;
-  f->new_pixelwise = 0;
-
-  /* If an argument is zero, set it to the current value.  */
-  if (pixelwise)
-    {
-      new_text_width = (new_width == 0) ? FRAME_TEXT_WIDTH (f) : new_width;
-      new_text_height = (new_height == 0) ? FRAME_TEXT_HEIGHT (f) : new_height;
     }
   else
     {
-      new_cols = (new_width == 0) ? FRAME_COLS (f) : new_width;
-      new_lines = (new_height == 0) ? FRAME_LINES (f) : new_height;
-      new_text_width = new_cols * FRAME_COLUMN_WIDTH (f);
-      new_text_height = new_lines * FRAME_LINE_HEIGHT (f);
-    }
-
-  /* Compute width of windows in F.  */
-  /* Round up to the smallest acceptable size.  */
-  check_frame_size (f, &new_text_width, &new_text_height, 1);
-  /* Recompute the dimensions in character units, since
-     check_frame_size might have changed the pixel dimensions.  */
-  /* Consider rounding here: Currently, the root window can be
-     larger than the frame in terms of columns/lines.  */
-  new_cols = new_text_width / FRAME_COLUMN_WIDTH (f);
-  new_lines = new_text_height / FRAME_LINE_HEIGHT (f);
-
-  /* This is the width of the frame without vertical scroll bars and
-     fringe columns.  Do this after rounding - see discussion of
-     bug#9723.  */
-  new_root_width = (new_text_width
-                   + FRAME_SCROLL_BAR_AREA_WIDTH (f)
-                   + FRAME_TOTAL_FRINGE_WIDTH (f));
-  /* If we're not changing the frame size, quit now.  */
-  /* Frame width may be unchanged but the text portion may change, for
-     example, fullscreen and remove/add scroll bar.  */
-  if (new_text_height == FRAME_TEXT_HEIGHT (f)
-      && new_text_width == FRAME_TEXT_WIDTH (f)
-      && new_root_width == old_root_width
-      && (FRAME_PIXEL_HEIGHT (f) ==
-         FRAME_TEXT_TO_PIXEL_HEIGHT (f, new_text_height))
-      && (FRAME_PIXEL_WIDTH (f) ==
-         FRAME_TEXT_TO_PIXEL_WIDTH (f, new_text_width)))
-    return;
+      /* This size-change overrides any pending one for this frame.  */
+      f->new_height = 0;
+      f->new_width = 0;
+      f->new_pixelwise = 0;
 
-  block_input ();
-
-#ifdef MSDOS
-  /* We only can set screen dimensions to certain values supported
-     by our video hardware.  Try to find the smallest size greater
-     or equal to the requested dimensions.  */
-  dos_set_window_size (&new_lines, &new_cols);
-#endif
-
-  if (new_text_height != FRAME_TEXT_HEIGHT (f))
-    {
-      resize_frame_windows (f, new_text_height, 0, 1);
-
-      /* MSDOS frames cannot PRETEND, as they change frame size by
-        manipulating video hardware.  */
-      if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f))
-       FrameRows (FRAME_TTY (f)) = new_lines;
-    }
-
-  if (new_text_width != FRAME_TEXT_WIDTH (f)
-      || new_root_width != old_root_width)
-    {
-      resize_frame_windows (f, new_root_width, 1, 1);
-
-      /* MSDOS frames cannot PRETEND, as they change frame size by
-        manipulating video hardware.  */
-      if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f))
-       FrameCols (FRAME_TTY (f)) = new_cols;
-
-#if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS)
-      if (WINDOWP (f->tool_bar_window))
+      /* If an argument is zero, set it to the current value.  */
+      if (pixelwise)
        {
-         XWINDOW (f->tool_bar_window)->total_cols = new_cols;
-         XWINDOW (f->tool_bar_window)->pixel_width = new_root_width;
+         new_width = (new_width <= 0) ? FRAME_TEXT_WIDTH (f) : new_width;
+         new_height = (new_height <= 0) ? FRAME_TEXT_HEIGHT (f) : new_height;
+       }
+      else
+       {
+         new_width = (((new_width <= 0) ? FRAME_COLS (f) : new_width)
+                      * FRAME_COLUMN_WIDTH (f));
+         new_height = (((new_height <= 0) ? FRAME_LINES (f) : new_height)
+                       * FRAME_LINE_HEIGHT (f));
        }
-#endif
-    }
-
-  SET_FRAME_COLS (f, new_cols);
-  FRAME_LINES (f) = new_lines;
-  FRAME_TEXT_WIDTH (f) = new_text_width;
-  FRAME_TEXT_HEIGHT (f) = new_text_height;
-  FRAME_PIXEL_WIDTH (f) = FRAME_TEXT_TO_PIXEL_WIDTH (f, new_text_width);
-  FRAME_PIXEL_HEIGHT (f) = FRAME_TEXT_TO_PIXEL_HEIGHT (f, new_text_height);
 
-  {
-    struct window *w = XWINDOW (FRAME_SELECTED_WINDOW (f));
-    int text_area_x, text_area_y, text_area_width, text_area_height;
-
-    window_box (w, TEXT_AREA, &text_area_x, &text_area_y, &text_area_width,
-               &text_area_height);
-    if (w->cursor.x >= text_area_x + text_area_width)
-      w->cursor.hpos = w->cursor.x = 0;
-    if (w->cursor.y >= text_area_y + text_area_height)
-      w->cursor.vpos = w->cursor.y = 0;
-  }
+      /* Adjust frame size but make sure x_set_window_size does not
+        get called.  */
+      adjust_frame_size (f, new_width, new_height, 5, pretend);
+    }
+}
 
-  adjust_frame_glyphs (f);
-  calculate_costs (f);
-  SET_FRAME_GARBAGED (f);
-  f->resized_p = 1;
 
-  unblock_input ();
+/* Change text height/width of frame F.  Values may be given as zero to
+   indicate that no change is needed.
 
-  record_unwind_current_buffer ();
+   If DELAY, assume we're being called from a signal handler, and queue
+   the change for later - perhaps the next redisplay.  Since this tries
+   to resize windows, we can't call it from a signal handler.
 
-  run_window_configuration_change_hook (f);
+   SAFE means this function is called from a place where it's safe to
+   change frame sizes while a redisplay is in progress.  */
+void
+change_frame_size (struct frame *f, int new_width, int new_height,
+                  bool pretend, bool delay, bool safe, bool pixelwise)
+{
+  Lisp_Object tail, frame;
 
-  unbind_to (count, Qnil);
+  if (FRAME_MSDOS_P (f))
+    {
+      /* On MS-DOS, all frames use the same screen, so a change in
+         size affects all frames.  Termcap now supports multiple
+         ttys. */
+      FOR_EACH_FRAME (tail, frame)
+       if (! FRAME_WINDOW_P (XFRAME (frame)))
+         change_frame_size_1 (XFRAME (frame), new_width, new_height,
+                              pretend, delay, safe, pixelwise);
+    }
+  else
+    change_frame_size_1 (f, new_width, new_height, pretend, delay, safe,
+                        pixelwise);
 }
 \f
 /***********************************************************************
@@ -5698,16 +5611,13 @@ the currently selected frame.  In batch mode, STRING is sent to stdout
 when TERMINAL is nil.  */)
   (Lisp_Object string, Lisp_Object terminal)
 {
-  struct terminal *t = get_terminal (terminal, 1);
+  struct terminal *t = decode_live_terminal (terminal);
   FILE *out;
 
   /* ??? Perhaps we should do something special for multibyte strings here.  */
   CHECK_STRING (string);
   block_input ();
 
-  if (!t)
-    error ("Unknown terminal device");
-
   if (t->type == output_initial)
     out = stdout;
   else if (t->type != output_termcap && t->type != output_msdos_raw)
@@ -6178,7 +6088,8 @@ init_display (void)
     t->display_info.tty->top_frame = selected_frame;
     change_frame_size (XFRAME (selected_frame),
                        FrameCols (t->display_info.tty),
-                       FrameRows (t->display_info.tty), 0, 0, 1, 0);
+                       FrameRows (t->display_info.tty)
+                      - FRAME_MENU_BAR_LINES (f), 0, 0, 1, 0);
 
     /* Delete the initial terminal. */
     if (--initial_terminal->reference_count == 0
@@ -6186,21 +6097,18 @@ init_display (void)
       (*initial_terminal->delete_terminal_hook) (initial_terminal);
 
     /* Update frame parameters to reflect the new type. */
-    Fmodify_frame_parameters
-      (selected_frame, list1 (Fcons (Qtty_type,
-                                     Ftty_type (selected_frame))));
-    if (t->display_info.tty->name)
-      Fmodify_frame_parameters
-       (selected_frame,
-        list1 (Fcons (Qtty, build_string (t->display_info.tty->name))));
-    else
-      Fmodify_frame_parameters (selected_frame, list1 (Fcons (Qtty, Qnil)));
+    AUTO_FRAME_ARG (tty_type_arg, Qtty_type, Ftty_type (selected_frame));
+    Fmodify_frame_parameters (selected_frame, tty_type_arg);
+    AUTO_FRAME_ARG (tty_arg, Qtty, (t->display_info.tty->name
+                                   ? build_string (t->display_info.tty->name)
+                                   : Qnil));
+    Fmodify_frame_parameters (selected_frame, tty_arg);
   }
 
   {
     struct frame *sf = SELECTED_FRAME ();
     int width = FRAME_TOTAL_COLS (sf);
-    int height = FRAME_LINES (sf);
+    int height = FRAME_TOTAL_LINES (sf);
 
     /* If these sizes are so big they cause overflow, just ignore the
        change.  It's not clear what better we could do.  The rest of
index b6a4cd0a27b668d594577fe7bf5bbcb1b5e17365..1b87c23e9498088976b69b1792cdd145f35e759c 100644 (file)
--- a/src/doc.c
+++ b/src/doc.c
@@ -121,8 +121,8 @@ get_doc_string (Lisp_Object filepos, bool unibyte, bool definition)
       if (minsize < 8)
        minsize = 8;
       name = SAFE_ALLOCA (minsize + SCHARS (file) + 8);
-      strcpy (name, SSDATA (docdir));
-      strcat (name, SSDATA (file));
+      char *z = lispstpcpy (name, docdir);
+      strcpy (z, SSDATA (file));
     }
   else
     {
@@ -146,8 +146,9 @@ get_doc_string (Lisp_Object filepos, bool unibyte, bool definition)
       if (fd < 0)
        {
          SAFE_FREE ();
-         return concat3 (build_string ("Cannot open doc string file \""),
-                         file, build_string ("\"\n"));
+         AUTO_STRING (cannot_open, "Cannot open doc string file \"");
+         AUTO_STRING (quote_nl, "\"\n");
+         return concat3 (cannot_open, file, quote_nl);
        }
     }
   count = SPECPDL_INDEX ();
@@ -561,6 +562,8 @@ the same file name is found in the `doc-directory'.  */)
   char *p, *name;
   bool skip_file = 0;
   ptrdiff_t count;
+  char const *dirname;
+  ptrdiff_t dirlen;
   /* Preloaded defcustoms using custom-initialize-delay are added to
      this list, but kept unbound.  See http://debbugs.gnu.org/11565  */
   Lisp_Object delayed_init =
@@ -577,15 +580,21 @@ the same file name is found in the `doc-directory'.  */)
       (0)
 #endif /* CANNOT_DUMP */
     {
-      name = alloca (SCHARS (filename) + 14);
-      strcpy (name, "../etc/");
+      static char const sibling_etc[] = "../etc/";
+      dirname = sibling_etc;
+      dirlen = sizeof sibling_etc - 1;
     }
   else
     {
       CHECK_STRING (Vdoc_directory);
-      name = alloca (SCHARS (filename) + SCHARS (Vdoc_directory) + 1);
-      strcpy (name, SSDATA (Vdoc_directory));
+      dirname = SSDATA (Vdoc_directory);
+      dirlen = SBYTES (Vdoc_directory);
     }
+
+  count = SPECPDL_INDEX ();
+  USE_SAFE_ALLOCA;
+  name = SAFE_ALLOCA (dirlen + SBYTES (filename) + 1);
+  strcpy (name, dirname);
   strcat (name, SSDATA (filename));    /*** Add this line ***/
 
   /* Vbuild_files is nil when temacs is run, and non-nil after that.  */
@@ -595,7 +604,7 @@ the same file name is found in the `doc-directory'.  */)
        {
          #include "buildobj.h"
        };
-      int i = sizeof buildobj / sizeof *buildobj;
+      int i = ARRAYELTS (buildobj);
       while (0 <= --i)
        Vbuild_files = Fcons (build_string (buildobj[i]), Vbuild_files);
       Vbuild_files = Fpurecopy (Vbuild_files);
@@ -608,7 +617,6 @@ the same file name is found in the `doc-directory'.  */)
       report_file_errno ("Opening doc string file", build_string (name),
                         open_errno);
     }
-  count = SPECPDL_INDEX ();
   record_unwind_protect_int (close_file_unwind, fd);
   Vdoc_file_name = filename;
   filled = 0;
@@ -637,7 +645,7 @@ the same file name is found in the `doc-directory'.  */)
                   && (end[-1] == 'o' || end[-1] == 'c'))
                 {
                   ptrdiff_t len = end - p - 2;
-                  char *fromfile = alloca (len + 1);
+                  char *fromfile = SAFE_ALLOCA (len + 1);
                   memcpy (fromfile, &p[2], len);
                   fromfile[len] = 0;
                   if (fromfile[len-1] == 'c')
@@ -688,6 +696,8 @@ the same file name is found in the `doc-directory'.  */)
       filled -= end - buf;
       memmove (buf, end, filled);
     }
+
+  SAFE_FREE ();
   return unbind_to (count, Qnil);
 }
 \f
index 071d73ea16ec249d08322f2f56e781f7b3256faf..bdd296bf65888a1df6169bef6bf75795e7cdd76c 100644 (file)
@@ -370,13 +370,6 @@ init_dosfns (void)
      Don't OR it with the previous value, so the value recorded at dump
      time, possibly with `preserve-case' flags set, won't get through.  */
   __opendir_flags = __OPENDIR_FIND_HIDDEN;
-
-#if __DJGPP_MINOR__ == 0
-  /* Under LFN, preserve the case of files as recorded in the directory
-     (in DJGPP 2.01 and later this is automagically done by the library).  */
-  if (!NILP (Fmsdos_long_file_names ()))
-    __opendir_flags |= __OPENDIR_PRESERVE_CASE;
-#endif /* __DJGPP_MINOR__ == 0 */
 }
 \f
 #ifndef HAVE_X_WINDOWS
@@ -402,7 +395,7 @@ msdos_stdcolor_idx (const char *name)
 {
   int i;
 
-  for (i = 0; i < sizeof (vga_colors) / sizeof (vga_colors[0]); i++)
+  for (i = 0; i < ARRAYELTS (vga_colors); i++)
     if (xstrcasecmp (name, vga_colors[i]) == 0)
       return i;
 
@@ -422,7 +415,7 @@ msdos_stdcolor_name (int idx)
     return build_string (unspecified_fg);
   else if (idx == FACE_TTY_DEFAULT_BG_COLOR)
     return build_string (unspecified_bg);
-  else if (idx >= 0 && idx < sizeof (vga_colors) / sizeof (vga_colors[0]))
+  else if (idx >= 0 && idx < ARRAYELTS (vga_colors))
     return build_string (vga_colors[idx]);
   else
     return Qunspecified;       /* meaning the default */
@@ -640,6 +633,48 @@ system_process_attributes (Lisp_Object pid)
 
   return attrs;
 }
+\f
+/* Support for memory-info.  */
+int
+dos_memory_info (unsigned long *totalram, unsigned long *freeram,
+                unsigned long *totalswap, unsigned long *freeswap)
+{
+  _go32_dpmi_meminfo info;
+  unsigned long mem1, mem2, freemem;
+
+  _go32_dpmi_get_free_memory_information (&info);
+  /* DPMI server of Windows NT and its descendants reports in
+     info.available_memory a much lower amount that is really
+     available, which causes bogus "past 95% of memory limit"
+     warnings.  Try to overcome that via circumstantial evidence.  */
+  mem1 = info.available_memory;
+  mem2 = info.available_physical_pages;
+  /* DPMI Spec: "Fields that are unavailable will hold -1."  */
+  if ((long)mem1 == -1L)
+    mem1 = 0;
+  if ((long)mem2 == -1L)
+    mem2 = 0;
+  else
+    mem2 *= 4096;
+  /* Surely, the available memory is at least what we have physically
+     available, right?  */
+  if (mem1 >= mem2)
+    freemem = mem1;
+  else
+    freemem = mem2;
+  *freeram = freemem;
+  *totalswap =
+    ((long)info.max_pages_in_paging_file == -1L)
+    ? 0
+    : info.max_pages_in_paging_file * 4096;
+  *totalram =
+    ((long)info.total_physical_pages == -1L)
+    ? (freemem + (unsigned long)sbrk (0) + *totalswap)
+    : info.total_physical_pages * 4096;
+  *freeswap = 0;
+  return 0;
+}
+
 \f
 void
 dos_cleanup (void)
index 3409b2247b7463191a0d1fc30963b3a12bfadbf8..f32e6342fc93d044eb6d6131e161844aadb74ec0 100644 (file)
@@ -22,7 +22,8 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #define DOS_COUNTRY_INFO 34    /* no of bytes returned by dos int 38h */
 extern unsigned char dos_country_info[DOS_COUNTRY_INFO];
-
+extern int dos_memory_info (unsigned long *, unsigned long *,
+                           unsigned long *, unsigned long *);
 #ifndef HAVE_X_WINDOWS
 extern int         msdos_stdcolor_idx  (const char *);
 extern Lisp_Object msdos_stdcolor_name (int);
index 9c1fcb0b7906f818cbc67a5e957af069a3a6b51c..be1062dbbc55ac8699be3afd90692d20b7032dcc 100644 (file)
@@ -64,11 +64,17 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 extern Lisp_Object w32_get_internal_run_time (void);
 #endif
 
+static void set_time_zone_rule (char const *);
 static Lisp_Object format_time_string (char const *, ptrdiff_t, struct timespec,
                                       bool, struct tm *);
+static long int tm_gmtoff (struct tm *);
 static int tm_diff (struct tm *, struct tm *);
 static void update_buffer_properties (ptrdiff_t, ptrdiff_t);
 
+#ifndef HAVE_TM_GMTOFF
+# define HAVE_TM_GMTOFF false
+#endif
+
 static Lisp_Object Qbuffer_access_fontify_functions;
 
 /* Symbol for the text property used to mark fields.  */
@@ -79,15 +85,12 @@ Lisp_Object Qfield;
 
 static Lisp_Object Qboundary;
 
-/* The startup value of the TZ environment variable so it can be
-   restored if the user calls set-time-zone-rule with a nil
-   argument.  If null, the TZ environment variable was unset.  */
+/* The startup value of the TZ environment variable; null if unset.  */
 static char const *initial_tz;
 
-/* True if the static variable tzvalbuf (defined in
-   set_time_zone_rule) is part of 'environ'.  */
-static bool tzvalbuf_in_environ;
-
+/* A valid but unlikely setting for the TZ environment variable.
+   It is OK (though a bit slower) if the user chooses this value.  */
+static char dump_tz_string[] = "TZ=UtC0";
 
 void
 init_editfns (void)
@@ -101,18 +104,43 @@ init_editfns (void)
   init_system_name ();
 
 #ifndef CANNOT_DUMP
-  /* Don't bother with this on initial start when just dumping out */
+  /* When just dumping out, set the time zone to a known unlikely value
+     and skip the rest of this function.  */
   if (!initialized)
-    return;
-#endif /* not CANNOT_DUMP */
+    {
+# ifdef HAVE_TZSET
+      xputenv (dump_tz_string);
+      tzset ();
+# endif
+      return;
+    }
+#endif
 
-  initial_tz = getenv ("TZ");
-  tzvalbuf_in_environ = 0;
+  char *tz = getenv ("TZ");
+  initial_tz = tz;
+
+#if !defined CANNOT_DUMP && defined HAVE_TZSET
+  /* If the execution TZ happens to be the same as the dump TZ,
+     change it to some other value and then change it back,
+     to force the underlying implementation to reload the TZ info.
+     This is needed on implementations that load TZ info from files,
+     since the TZ file contents may differ between dump and execution.  */
+  if (tz && strcmp (tz, &dump_tz_string[sizeof "TZ=" - 1]) == 0)
+    {
+      ++*tz;
+      tzset ();
+      --*tz;
+    }
+#endif
+
+  /* Call set_time_zone_rule now, so that its call to putenv is done
+     before multiple threads are active.  */
+  set_time_zone_rule (tz);
 
   pw = getpwuid (getuid ());
 #ifdef MSDOS
   /* We let the real user name default to "root" because that's quite
-     accurate on MSDOG and because it lets Emacs find the init file.
+     accurate on MS-DOS and because it lets Emacs find the init file.
      (The DVX libraries override the Djgpp libraries here.)  */
   Vuser_real_login_name = build_string (pw ? pw->pw_name : "root");
 #else
@@ -376,13 +404,14 @@ at POSITION.  */)
       set_buffer_temp (XBUFFER (object));
 
       /* First try with room for 40 overlays.  */
-      noverlays = 40;
-      overlay_vec = alloca (noverlays * sizeof *overlay_vec);
+      Lisp_Object overlay_vecbuf[40];
+      noverlays = ARRAYELTS (overlay_vecbuf);
+      overlay_vec = overlay_vecbuf;
       noverlays = overlays_around (posn, overlay_vec, noverlays);
 
       /* If there are more than 40,
         make enough space for all, and try again.  */
-      if (noverlays > 40)
+      if (ARRAYELTS (overlay_vecbuf) < noverlays)
        {
          SAFE_ALLOCA_LISP (overlay_vec, noverlays);
          noverlays = overlays_around (posn, overlay_vec, noverlays);
@@ -1325,17 +1354,16 @@ name, or nil if there is no such user.  */)
   /* Substitute the login name for the &, upcasing the first character.  */
   if (q)
     {
-      register char *r;
-      Lisp_Object login;
-
-      login = Fuser_login_name (make_number (pw->pw_uid));
-      r = alloca (strlen (p) + SCHARS (login) + 1);
+      Lisp_Object login = Fuser_login_name (make_number (pw->pw_uid));
+      USE_SAFE_ALLOCA;
+      char *r = SAFE_ALLOCA (strlen (p) + SBYTES (login) + 1);
       memcpy (r, p, q - p);
       r[q - p] = 0;
       strcat (r, SSDATA (login));
       r[q - p] = upcase ((unsigned char) r[q - p]);
       strcat (r, q + 1);
       full = build_string (r);
+      SAFE_FREE ();
     }
 #endif /* AMPERSAND_FULL_NAME */
 
@@ -1373,6 +1401,30 @@ time_overflow (void)
   error ("Specified time is not representable");
 }
 
+/* A substitute for mktime_z on platforms that lack it.  It's not
+   thread-safe, but should be good enough for Emacs in typical use.  */
+#ifndef HAVE_TZALLOC
+time_t
+mktime_z (timezone_t tz, struct tm *tm)
+{
+  char *oldtz = getenv ("TZ");
+  USE_SAFE_ALLOCA;
+  if (oldtz)
+    {
+      size_t oldtzsize = strlen (oldtz) + 1;
+      char *oldtzcopy = SAFE_ALLOCA (oldtzsize);
+      oldtz = strcpy (oldtzcopy, oldtz);
+    }
+  block_input ();
+  set_time_zone_rule (tz);
+  time_t t = mktime (tm);
+  set_time_zone_rule (oldtz);
+  unblock_input ();
+  SAFE_FREE ();
+  return t;
+}
+#endif
+
 /* Return the upper part of the time T (everything but the bottom 16 bits).  */
 static EMACS_INT
 hi_time (time_t t)
@@ -1516,7 +1568,8 @@ disassemble_lisp_time (Lisp_Object specified_time, Lisp_Object *phigh,
    list, generate the corresponding time value.
 
    If RESULT is not null, store into *RESULT the converted time;
-   this can fail if the converted time does not fit into struct timespec.
+   if the converted time does not fit into struct timespec,
+   store an invalid timespec to indicate the overflow.
    If *DRESULT is not null, store into *DRESULT the number of
    seconds since the start of the POSIX Epoch.
 
@@ -1529,7 +1582,7 @@ decode_time_components (Lisp_Object high, Lisp_Object low, Lisp_Object usec,
   EMACS_INT hi, lo, us, ps;
   if (! (INTEGERP (high) && INTEGERP (low)
         && INTEGERP (usec) && INTEGERP (psec)))
-    return 0;
+    return false;
   hi = XINT (high);
   lo = XINT (low);
   us = XINT (usec);
@@ -1555,16 +1608,13 @@ decode_time_components (Lisp_Object high, Lisp_Object low, Lisp_Object usec,
          *result = make_timespec ((sec << 16) + lo, us * 1000 + ps / 1000);
        }
       else
-       {
-         /* Overflow in the highest-order component.  */
-         return 0;
-       }
+       *result = invalid_timespec ();
     }
 
   if (dresult)
     *dresult = (us * 1e6 + ps) / 1e12 + lo + hi * 65536.0;
 
-  return 1;
+  return true;
 }
 
 /* Decode a Lisp list SPECIFIED_TIME that represents a time.
@@ -1576,22 +1626,23 @@ decode_time_components (Lisp_Object high, Lisp_Object low, Lisp_Object usec,
 struct timespec
 lisp_time_argument (Lisp_Object specified_time)
 {
-  struct timespec t;
   if (NILP (specified_time))
-    t = current_timespec ();
+    return current_timespec ();
   else
     {
       Lisp_Object high, low, usec, psec;
+      struct timespec t;
       if (! (disassemble_lisp_time (specified_time, &high, &low, &usec, &psec)
             && decode_time_components (high, low, usec, psec, &t, 0)))
        error ("Invalid time specification");
+      if (! timespec_valid_p (t))
+       time_overflow ();
+      return t;
     }
-  return t;
 }
 
 /* Like lisp_time_argument, except decode only the seconds part,
-   do not allow out-of-range time stamps, do not check the subseconds part,
-   and always round down.  */
+   and do not check the subseconds part.  */
 static time_t
 lisp_seconds_argument (Lisp_Object specified_time)
 {
@@ -1605,6 +1656,8 @@ lisp_seconds_argument (Lisp_Object specified_time)
             && decode_time_components (high, low, make_number (0),
                                        make_number (0), &t, 0)))
        error ("Invalid time specification");
+      if (! timespec_valid_p (t))
+       time_overflow ();
       return t.tv_sec;
     }
 }
@@ -1767,39 +1820,28 @@ format_time_string (char const *format, ptrdiff_t formatlen,
   size_t len;
   Lisp_Object bufstring;
   int ns = t.tv_nsec;
-  struct tm *tm;
   USE_SAFE_ALLOCA;
 
-  while (1)
-    {
-      time_t *taddr = &t.tv_sec;
-      block_input ();
-
-      synchronize_system_time_locale ();
-
-      tm = ut ? gmtime (taddr) : localtime (taddr);
-      if (! tm)
-       {
-         unblock_input ();
-         time_overflow ();
-       }
-      *tmp = *tm;
+  tmp = ut ? gmtime_r (&t.tv_sec, tmp) : localtime_r (&t.tv_sec, tmp);
+  if (! tmp)
+    time_overflow ();
+  synchronize_system_time_locale ();
 
+  while (true)
+    {
       buf[0] = '\1';
-      len = emacs_nmemftime (buf, size, format, formatlen, tm, ut, ns);
+      len = emacs_nmemftime (buf, size, format, formatlen, tmp, ut, ns);
       if ((0 < len && len < size) || (len == 0 && buf[0] == '\0'))
        break;
 
       /* Buffer was too small, so make it bigger and try again.  */
-      len = emacs_nmemftime (NULL, SIZE_MAX, format, formatlen, tm, ut, ns);
-      unblock_input ();
+      len = emacs_nmemftime (NULL, SIZE_MAX, format, formatlen, tmp, ut, ns);
       if (STRING_BYTES_BOUND <= len)
        string_overflow ();
       size = len + 1;
       buf = SAFE_ALLOCA (size);
     }
 
-  unblock_input ();
   bufstring = make_unibyte_string (buf, len);
   SAFE_FREE ();
   return code_convert_string_norecord (bufstring, Vlocale_coding_system, 0);
@@ -1823,38 +1865,30 @@ DOW and ZONE.)  */)
   (Lisp_Object specified_time)
 {
   time_t time_spec = lisp_seconds_argument (specified_time);
-  struct tm save_tm;
-  struct tm *decoded_time;
-  Lisp_Object list_args[9];
+  struct tm local_tm, gmt_tm;
 
-  block_input ();
-  decoded_time = localtime (&time_spec);
-  if (decoded_time)
-    save_tm = *decoded_time;
-  unblock_input ();
-  if (! (decoded_time
-        && MOST_NEGATIVE_FIXNUM - TM_YEAR_BASE <= save_tm.tm_year
-        && save_tm.tm_year <= MOST_POSITIVE_FIXNUM - TM_YEAR_BASE))
+  if (! (localtime_r (&time_spec, &local_tm)
+        && MOST_NEGATIVE_FIXNUM - TM_YEAR_BASE <= local_tm.tm_year
+        && local_tm.tm_year <= MOST_POSITIVE_FIXNUM - TM_YEAR_BASE))
     time_overflow ();
-  XSETFASTINT (list_args[0], save_tm.tm_sec);
-  XSETFASTINT (list_args[1], save_tm.tm_min);
-  XSETFASTINT (list_args[2], save_tm.tm_hour);
-  XSETFASTINT (list_args[3], save_tm.tm_mday);
-  XSETFASTINT (list_args[4], save_tm.tm_mon + 1);
-  /* On 64-bit machines an int is narrower than EMACS_INT, thus the
-     cast below avoids overflow in int arithmetics.  */
-  XSETINT (list_args[5], TM_YEAR_BASE + (EMACS_INT) save_tm.tm_year);
-  XSETFASTINT (list_args[6], save_tm.tm_wday);
-  list_args[7] = save_tm.tm_isdst ? Qt : Qnil;
 
-  block_input ();
-  decoded_time = gmtime (&time_spec);
-  if (decoded_time == 0)
-    list_args[8] = Qnil;
-  else
-    XSETINT (list_args[8], tm_diff (&save_tm, decoded_time));
-  unblock_input ();
-  return Flist (9, list_args);
+  /* Avoid overflow when INT_MAX < EMACS_INT_MAX.  */
+  EMACS_INT tm_year_base = TM_YEAR_BASE;
+
+  return Flist (9, ((Lisp_Object [])
+                   {make_number (local_tm.tm_sec),
+                    make_number (local_tm.tm_min),
+                    make_number (local_tm.tm_hour),
+                    make_number (local_tm.tm_mday),
+                    make_number (local_tm.tm_mon + 1),
+                    make_number (local_tm.tm_year + tm_year_base),
+                    make_number (local_tm.tm_wday),
+                    local_tm.tm_isdst ? Qt : Qnil,
+                    (HAVE_TM_GMTOFF
+                     ? make_number (tm_gmtoff (&local_tm))
+                     : gmtime_r (&time_spec, &gmt_tm)
+                     ? make_number (tm_diff (&local_tm, &gmt_tm))
+                     : Qnil)}));
 }
 
 /* Return OBJ - OFFSET, checking that OBJ is a valid fixnum and that
@@ -1910,18 +1944,12 @@ usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE)  */)
   if (CONSP (zone))
     zone = XCAR (zone);
   if (NILP (zone))
-    {
-      block_input ();
-      value = mktime (&tm);
-      unblock_input ();
-    }
+    value = mktime (&tm);
   else
     {
       static char const tzbuf_format[] = "XXX%s%"pI"d:%02d:%02d";
       char tzbuf[sizeof tzbuf_format + INT_STRLEN_BOUND (EMACS_INT)];
-      char *old_tzstring;
       const char *tzstring;
-      USE_SAFE_ALLOCA;
 
       if (EQ (zone, Qt))
        tzstring = "UTC0";
@@ -1938,29 +1966,13 @@ usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE)  */)
          tzstring = tzbuf;
        }
       else
-       error ("Invalid time zone specification");
-
-      old_tzstring = getenv ("TZ");
-      if (old_tzstring)
-       {
-         char *buf = SAFE_ALLOCA (strlen (old_tzstring) + 1);
-         old_tzstring = strcpy (buf, old_tzstring);
-       }
-
-      block_input ();
+       tzstring = 0;
 
-      /* Set TZ before calling mktime; merely adjusting mktime's returned
-        value doesn't suffice, since that would mishandle leap seconds.  */
-      set_time_zone_rule (tzstring);
-
-      value = mktime (&tm);
-
-      set_time_zone_rule (old_tzstring);
-#ifdef LOCALTIME_CACHE
-      tzset ();
-#endif
-      unblock_input ();
-      SAFE_FREE ();
+      timezone_t tz = tzstring ? tzalloc (tzstring) : 0;
+      if (! tz)
+       error ("Invalid time zone specification");
+      value = mktime_z (tz, &tm);
+      tzfree (tz);
     }
 
   if (value == (time_t) -1)
@@ -1986,34 +1998,27 @@ but this is considered obsolete.  */)
   (Lisp_Object specified_time)
 {
   time_t value = lisp_seconds_argument (specified_time);
-  struct tm *tm;
-  char buf[sizeof "Mon Apr 30 12:49:17 " + INT_STRLEN_BOUND (int) + 1];
-  int len IF_LINT (= 0);
 
   /* Convert to a string in ctime format, except without the trailing
      newline, and without the 4-digit year limit.  Don't use asctime
      or ctime, as they might dump core if the year is outside the
      range -999 .. 9999.  */
-  block_input ();
-  tm = localtime (&value);
-  if (tm)
-    {
-      static char const wday_name[][4] =
-       { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
-      static char const mon_name[][4] =
-       { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
-         "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
-      printmax_t year_base = TM_YEAR_BASE;
-
-      len = sprintf (buf, "%s %s%3d %02d:%02d:%02d %"pMd,
-                    wday_name[tm->tm_wday], mon_name[tm->tm_mon], tm->tm_mday,
-                    tm->tm_hour, tm->tm_min, tm->tm_sec,
-                    tm->tm_year + year_base);
-    }
-  unblock_input ();
-  if (! tm)
+  struct tm tm;
+  if (! localtime_r (&value, &tm))
     time_overflow ();
 
+  static char const wday_name[][4] =
+    { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
+  static char const mon_name[][4] =
+    { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
+      "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
+  printmax_t year_base = TM_YEAR_BASE;
+  char buf[sizeof "Mon Apr 30 12:49:17 " + INT_STRLEN_BOUND (int) + 1];
+  int len = sprintf (buf, "%s %s%3d %02d:%02d:%02d %"pMd,
+                    wday_name[tm.tm_wday], mon_name[tm.tm_mon], tm.tm_mday,
+                    tm.tm_hour, tm.tm_min, tm.tm_sec,
+                    tm.tm_year + year_base);
+
   return make_unibyte_string (buf, len);
 }
 
@@ -2040,6 +2045,17 @@ tm_diff (struct tm *a, struct tm *b)
          + (a->tm_sec - b->tm_sec));
 }
 
+/* Yield A's UTC offset, or an unspecified value if unknown.  */
+static long int
+tm_gmtoff (struct tm *a)
+{
+#if HAVE_TM_GMTOFF
+  return a->tm_gmtoff;
+#else
+  return 0;
+#endif
+}
+
 DEFUN ("current-time-zone", Fcurrent_time_zone, Scurrent_time_zone, 0, 1, 0,
        doc: /* Return the offset and name for the local time zone.
 This returns a list of the form (OFFSET NAME).
@@ -2058,32 +2074,30 @@ the data it can't find.  */)
   (Lisp_Object specified_time)
 {
   struct timespec value;
-  int offset;
-  struct tm *t;
-  struct tm localtm;
+  struct tm local_tm, gmt_tm;
   Lisp_Object zone_offset, zone_name;
 
   zone_offset = Qnil;
   value = make_timespec (lisp_seconds_argument (specified_time), 0);
-  zone_name = format_time_string ("%Z", sizeof "%Z" - 1, value, 0, &localtm);
-  block_input ();
-  t = gmtime (&value.tv_sec);
-  if (t)
-    offset = tm_diff (&localtm, t);
-  unblock_input ();
+  zone_name = format_time_string ("%Z", sizeof "%Z" - 1, value, 0, &local_tm);
 
-  if (t)
+  if (HAVE_TM_GMTOFF || gmtime_r (&value.tv_sec, &gmt_tm))
     {
+      long int offset = (HAVE_TM_GMTOFF
+                        ? tm_gmtoff (&local_tm)
+                        : tm_diff (&local_tm, &gmt_tm));
       zone_offset = make_number (offset);
       if (SCHARS (zone_name) == 0)
        {
          /* No local time zone name is available; use "+-NNNN" instead.  */
-         int m = offset / 60;
-         int am = offset < 0 ? - m : m;
-         char buf[sizeof "+00" + INT_STRLEN_BOUND (int)];
-         zone_name = make_formatted_string (buf, "%c%02d%02d",
+         long int m = offset / 60;
+         long int am = offset < 0 ? - m : m;
+         long int hour = am / 60;
+         int min = am % 60;
+         char buf[sizeof "+00" + INT_STRLEN_BOUND (long int)];
+         zone_name = make_formatted_string (buf, "%c%02ld%02d",
                                             (offset < 0 ? '-' : '+'),
-                                            am / 60, am % 60);
+                                            hour, min);
        }
     }
 
@@ -2122,12 +2136,12 @@ only the former.  */)
 
 /* Set the local time zone rule to TZSTRING.
 
-   This function is not thread-safe, partly because putenv, unsetenv
-   and tzset are not, and partly because of the static storage it
-   updates.  Other threads that invoke localtime etc. may be adversely
-   affected while this function is executing.  */
+   This function is not thread-safe, in theory because putenv is not,
+   but mostly because of the static storage it updates.  Other threads
+   that invoke localtime etc. may be adversely affected while this
+   function is executing.  */
 
-void
+static void
 set_time_zone_rule (const char *tzstring)
 {
   /* A buffer holding a string of the form "TZ=value", intended
@@ -2136,75 +2150,47 @@ set_time_zone_rule (const char *tzstring)
   static ptrdiff_t tzvalbufsize;
 
   int tzeqlen = sizeof "TZ=" - 1;
+  ptrdiff_t tzstringlen = tzstring ? strlen (tzstring) : 0;
+  char *tzval = tzvalbuf;
+  bool new_tzvalbuf = tzvalbufsize <= tzeqlen + tzstringlen;
 
-#ifdef LOCALTIME_CACHE
-  /* These two values are known to load tz files in buggy implementations,
-     i.e., Solaris 1 executables running under either Solaris 1 or Solaris 2.
-     Their values shouldn't matter in non-buggy implementations.
-     We don't use string literals for these strings,
-     since if a string in the environment is in readonly
-     storage, it runs afoul of bugs in SVR4 and Solaris 2.3.
-     See Sun bugs 1113095 and 1114114, ``Timezone routines
-     improperly modify environment''.  */
-
-  static char set_time_zone_rule_tz[][sizeof "TZ=GMT+0"]
-    = { "TZ=GMT+0", "TZ=GMT+1" };
-
-  /* In SunOS 4.1.3_U1 and 4.1.4, if TZ has a value like
-     "US/Pacific" that loads a tz file, then changes to a value like
-     "XXX0" that does not load a tz file, and then changes back to
-     its original value, the last change is (incorrectly) ignored.
-     Also, if TZ changes twice in succession to values that do
-     not load a tz file, tzset can dump core (see Sun bug#1225179).
-     The following code works around these bugs.  */
+  if (new_tzvalbuf)
+    {
+      /* Do not attempt to free the old tzvalbuf, since another thread
+        may be using it.  In practice, the first allocation is large
+        enough and memory does not leak.  */
+      tzval = xpalloc (NULL, &tzvalbufsize,
+                      tzeqlen + tzstringlen - tzvalbufsize + 1, -1, 1);
+      tzvalbuf = tzval;
+      tzval[1] = 'Z';
+      tzval[2] = '=';
+    }
 
   if (tzstring)
     {
-      /* Temporarily set TZ to a value that loads a tz file
-        and that differs from tzstring.  */
-      bool eq0 = strcmp (tzstring, set_time_zone_rule_tz[0] + tzeqlen) == 0;
-      xputenv (set_time_zone_rule_tz[eq0]);
+      /* Modify TZVAL in place.  Although this is dicey in a
+        multithreaded environment, we know of no portable alternative.
+        Calling putenv or setenv could crash some other thread.  */
+      tzval[0] = 'T';
+      strcpy (tzval + tzeqlen, tzstring);
     }
   else
     {
-      /* The implied tzstring is unknown, so temporarily set TZ to
-        two different values that each load a tz file.  */
-      xputenv (set_time_zone_rule_tz[0]);
-      tzset ();
-      xputenv (set_time_zone_rule_tz[1]);
+      /* Turn 'TZ=whatever' into an empty environment variable 'tZ='.
+        Although this is also dicey, calling unsetenv here can crash Emacs.
+        See Bug#8705.  */
+      tzval[0] = 't';
+      tzval[tzeqlen] = 0;
     }
-  tzset ();
-  tzvalbuf_in_environ = 0;
-#endif
 
-  if (!tzstring)
-    {
-      unsetenv ("TZ");
-      tzvalbuf_in_environ = 0;
-    }
-  else
+  if (new_tzvalbuf)
     {
-      ptrdiff_t tzstringlen = strlen (tzstring);
-
-      if (tzvalbufsize <= tzeqlen + tzstringlen)
-       {
-         unsetenv ("TZ");
-         tzvalbuf_in_environ = 0;
-         tzvalbuf = xpalloc (tzvalbuf, &tzvalbufsize,
-                             tzeqlen + tzstringlen - tzvalbufsize + 1, -1, 1);
-         memcpy (tzvalbuf, "TZ=", tzeqlen);
-       }
-
-      strcpy (tzvalbuf + tzeqlen, tzstring);
-
-      if (!tzvalbuf_in_environ)
-       {
-         xputenv (tzvalbuf);
-         tzvalbuf_in_environ = 1;
-       }
+      /* Although this is not thread-safe, in practice this runs only
+        on startup when there is only one thread.  */
+      xputenv (tzval);
     }
 
-#ifdef LOCALTIME_CACHE
+#ifdef HAVE_TZSET
   tzset ();
 #endif
 }
@@ -2238,7 +2224,7 @@ general_insert_function (void (*insert_func)
            len = CHAR_STRING (c, str);
          else
            {
-             str[0] = ASCII_CHAR_P (c) ? c : multibyte_char_to_unibyte (c);
+             str[0] = CHAR_TO_BYTE8 (c);
              len = 1;
            }
          (*insert_func) ((char *) str, len);
@@ -2852,7 +2838,7 @@ Both characters must have the same length of multi-byte form.  */)
       len = CHAR_STRING (fromc, fromstr);
       if (CHAR_STRING (toc, tostr) != len)
        error ("Characters in `subst-char-in-region' have different byte-lengths");
-      if (!ASCII_BYTE_P (*tostr))
+      if (!ASCII_CHAR_P (*tostr))
        {
          /* If *TOSTR is in the range 0x80..0x9F and TOCHAR is not a
             complete multibyte character, it may be combined with the
@@ -2945,7 +2931,7 @@ Both characters must have the same length of multi-byte form.  */)
                  : ((pos_byte_next < Z_BYTE
                      && ! CHAR_HEAD_P (FETCH_BYTE (pos_byte_next)))
                     || (pos_byte > BEG_BYTE
-                        && ! ASCII_BYTE_P (FETCH_BYTE (pos_byte - 1))))))
+                        && ! ASCII_CHAR_P (FETCH_BYTE (pos_byte - 1))))))
            {
              Lisp_Object tem, string;
 
@@ -3011,8 +2997,12 @@ static Lisp_Object
 check_translation (ptrdiff_t pos, ptrdiff_t pos_byte, ptrdiff_t end,
                   Lisp_Object val)
 {
-  int buf_size = 16, buf_used = 0;
-  int *buf = alloca (sizeof (int) * buf_size);
+  int initial_buf[16];
+  int *buf = initial_buf;
+  ptrdiff_t buf_size = ARRAYELTS (initial_buf);
+  int *bufalloc = 0;
+  ptrdiff_t buf_used = 0;
+  Lisp_Object result = Qnil;
 
   for (; CONSP (val); val = XCDR (val))
     {
@@ -3037,12 +3027,11 @@ check_translation (ptrdiff_t pos, ptrdiff_t pos_byte, ptrdiff_t end,
 
                  if (buf_used == buf_size)
                    {
-                     int *newbuf;
-
-                     buf_size += 16;
-                     newbuf = alloca (sizeof (int) * buf_size);
-                     memcpy (newbuf, buf, sizeof (int) * buf_used);
-                     buf = newbuf;
+                     bufalloc = xpalloc (bufalloc, &buf_size, 1, -1,
+                                         sizeof *bufalloc);
+                     if (buf == initial_buf)
+                       memcpy (bufalloc, buf, sizeof initial_buf);
+                     buf = bufalloc;
                    }
                  buf[buf_used++] = STRING_CHAR_AND_LENGTH (p, len1);
                  pos_byte += len1;
@@ -3051,10 +3040,15 @@ check_translation (ptrdiff_t pos, ptrdiff_t pos_byte, ptrdiff_t end,
                break;
            }
          if (i == len)
-           return XCAR (val);
+           {
+             result = XCAR (val);
+             break;
+           }
        }
     }
-  return Qnil;
+
+  xfree (bufalloc);
+  return result;
 }
 
 
@@ -3126,7 +3120,7 @@ It returns the number of characters changed.  */)
              else
                {
                  nc = tt[oc];
-                 if (! ASCII_BYTE_P (nc) && multibyte)
+                 if (! ASCII_CHAR_P (nc) && multibyte)
                    {
                      str_len = BYTE8_STRING (nc, buf);
                      str = buf;
@@ -3600,7 +3594,7 @@ specifier truncates the string to the given width.
 usage: (format STRING &rest OBJECTS)  */)
   (ptrdiff_t nargs, Lisp_Object *args)
 {
-  ptrdiff_t n;         /* The number of the next arg to substitute */
+  ptrdiff_t n;         /* The number of the next arg to substitute */
   char initial_buffer[4000];
   char *buf = initial_buffer;
   ptrdiff_t bufsize = sizeof initial_buffer;
@@ -3877,7 +3871,7 @@ usage: (format STRING &rest OBJECTS)  */)
 
                  if (p > buf
                      && multibyte
-                     && !ASCII_BYTE_P (*((unsigned char *) p - 1))
+                     && !ASCII_CHAR_P (*((unsigned char *) p - 1))
                      && STRING_MULTIBYTE (args[n])
                      && !CHAR_HEAD_P (SREF (args[n], 0)))
                    maybe_combine_byte = 1;
@@ -4167,7 +4161,7 @@ usage: (format STRING &rest OBJECTS)  */)
            {
              /* Copy a whole multibyte character.  */
              if (p > buf
-                 && !ASCII_BYTE_P (*((unsigned char *) p - 1))
+                 && !ASCII_CHAR_P (*((unsigned char *) p - 1))
                  && !CHAR_HEAD_P (*format))
                maybe_combine_byte = 1;
 
@@ -4181,7 +4175,7 @@ usage: (format STRING &rest OBJECTS)  */)
          else
            {
              unsigned char uc = *format++;
-             if (! multibyte || ASCII_BYTE_P (uc))
+             if (! multibyte || ASCII_CHAR_P (uc))
                convbytes = 1;
              else
                {
@@ -4353,11 +4347,8 @@ usage: (format STRING &rest OBJECTS)  */)
 Lisp_Object
 format2 (const char *string1, Lisp_Object arg0, Lisp_Object arg1)
 {
-  Lisp_Object args[3];
-  args[0] = build_string (string1);
-  args[1] = arg0;
-  args[2] = arg1;
-  return Fformat (3, args);
+  AUTO_STRING (format, string1);
+  return Fformat (3, (Lisp_Object []) {format, arg0, arg1});
 }
 \f
 DEFUN ("char-equal", Fchar_equal, Schar_equal, 2, 2, 0,
@@ -4616,11 +4607,11 @@ Transposing beyond buffer boundaries is an error.  */)
       if (tmp_interval3)
        set_text_properties_1 (startr1, endr2, Qnil, buf, tmp_interval3);
 
+      USE_SAFE_ALLOCA;
+
       /* First region smaller than second.  */
       if (len1_byte < len2_byte)
         {
-         USE_SAFE_ALLOCA;
-
          temp = SAFE_ALLOCA (len2_byte);
 
          /* Don't precompute these addresses.  We have to compute them
@@ -4632,21 +4623,19 @@ Transposing beyond buffer boundaries is an error.  */)
           memcpy (temp, start2_addr, len2_byte);
           memcpy (start1_addr + len2_byte, start1_addr, len1_byte);
           memcpy (start1_addr, temp, len2_byte);
-         SAFE_FREE ();
         }
       else
        /* First region not smaller than second.  */
         {
-         USE_SAFE_ALLOCA;
-
          temp = SAFE_ALLOCA (len1_byte);
          start1_addr = BYTE_POS_ADDR (start1_byte);
          start2_addr = BYTE_POS_ADDR (start2_byte);
           memcpy (temp, start1_addr, len1_byte);
           memcpy (start1_addr, start2_addr, len2_byte);
           memcpy (start1_addr + len2_byte, temp, len1_byte);
-         SAFE_FREE ();
         }
+
+      SAFE_FREE ();
       graft_intervals_into_buffer (tmp_interval1, start1 + len2,
                                    len1, current_buffer, 0);
       graft_intervals_into_buffer (tmp_interval2, start1,
index fd93324de97740825fd75a7ec4c6909bee4dc687..90182e53e700c93274da45ed1cff88e15b94cb35 100644 (file)
@@ -1,7 +1,7 @@
 /* Fully extensible Emacs, running on Unix, intended for GNU.
 
-Copyright (C) 1985-1987, 1993-1995, 1997-1999, 2001-2014 Free Software
-Foundation, Inc.
+Copyright (C) 1985-1987, 1993-1995, 1997-1999, 2001-2014
+  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -51,6 +51,10 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "cygw32.h"
 #endif
 
+#ifdef MSDOS
+#include <binary-io.h>
+#endif
+
 #ifdef HAVE_WINDOW_SYSTEM
 #include TERM_HEADER
 #endif /* HAVE_WINDOW_SYSTEM */
@@ -79,7 +83,9 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "charset.h"
 #include "composite.h"
 #include "dispextern.h"
+#include "regex.h"
 #include "syntax.h"
+#include "sysselect.h"
 #include "systime.h"
 
 #ifdef HAVE_GNUTLS
@@ -105,8 +111,9 @@ extern void moncontrol (int mode);
 #include <sys/personality.h>
 #endif
 
-static const char emacs_version[] = VERSION;
+static const char emacs_version[] = PACKAGE_VERSION;
 static const char emacs_copyright[] = COPYRIGHT;
+static const char emacs_bugreport[] = PACKAGE_BUGREPORT;
 
 /* Empty lisp strings.  To avoid having to build any others.  */
 Lisp_Object empty_unibyte_string, empty_multibyte_string;
@@ -121,6 +128,9 @@ Lisp_Object Vlibrary_cache;
    on subsequent starts.  */
 bool initialized;
 
+/* Set to true if this instance of Emacs might dump.  */
+bool might_dump;
+
 #ifdef DARWIN_OS
 extern void unexec_init_emacs_zone (void);
 #endif
@@ -132,11 +142,11 @@ static void *malloc_state_ptr;
 /* From glibc, a routine that returns a copy of the malloc internal state.  */
 extern void *malloc_get_state (void);
 /* From glibc, a routine that overwrites the malloc internal state.  */
-extern int malloc_set_state (void*);
+extern int malloc_set_state (void *);
 /* True if the MALLOC_CHECK_ environment variable was set while
    dumping.  Used to work around a bug in glibc's malloc.  */
 static bool malloc_using_checking;
-#elif defined HAVE_PTHREAD && !defined SYSTEM_MALLOC
+#elif defined HAVE_PTHREAD && !defined SYSTEM_MALLOC && !defined HYBRID_MALLOC
 extern void malloc_enable_thread (void);
 #endif
 
@@ -210,7 +220,7 @@ int initial_argc;
 static void sort_args (int argc, char **argv);
 static void syms_of_emacs (void);
 
-/* C89 needs each string be at most 509 characters, so the usage
+/* C99 needs each string to be at most 4095 characters, and the usage
    strings below are split to not overflow this limit.  */
 static char const *const usage_message[] =
   { "\
@@ -321,7 +331,7 @@ abbreviation for a --option.\n\
 Various environment variables and window system resources also affect\n\
 the operation of Emacs.  See the main documentation.\n\
 \n\
-Report bugs to bug-gnu-emacs@gnu.org.  First, please see the Bugs\n\
+Report bugs to " PACKAGE_BUGREPORT ".  First, please see the Bugs\n\
 section of the Emacs manual or the file BUGS.\n"
   };
 
@@ -386,10 +396,11 @@ terminate_due_to_signal (int sig, int backtrace_limit)
 static void
 init_cmdargs (int argc, char **argv, int skip_args, char *original_pwd)
 {
-  register int i;
+  int i;
   Lisp_Object name, dir, handler;
   ptrdiff_t count = SPECPDL_INDEX ();
   Lisp_Object raw_name;
+  AUTO_STRING (slash_colon, "/:");
 
   initial_argv = argv;
   initial_argc = argc;
@@ -413,7 +424,7 @@ init_cmdargs (int argc, char **argv, int skip_args, char *original_pwd)
      if it would otherwise be treated as magic.  */
   handler = Ffind_file_name_handler (raw_name, Qt);
   if (! NILP (handler))
-    raw_name = concat2 (build_string ("/:"), raw_name);
+    raw_name = concat2 (slash_colon, raw_name);
 
   Vinvocation_name = Ffile_name_nondirectory (raw_name);
   Vinvocation_directory = Ffile_name_directory (raw_name);
@@ -431,7 +442,7 @@ init_cmdargs (int argc, char **argv, int skip_args, char *original_pwd)
             if it would otherwise be treated as magic.  */
          handler = Ffind_file_name_handler (found, Qt);
          if (! NILP (handler))
-           found = concat2 (build_string ("/:"), found);
+           found = concat2 (slash_colon, found);
          Vinvocation_directory = Ffile_name_directory (found);
        }
     }
@@ -567,12 +578,6 @@ DEFUN ("invocation-directory", Finvocation_directory, Sinvocation_directory,
 }
 
 \f
-#ifdef HAVE_TZSET
-/* A valid but unlikely value for the TZ environment value.
-   It is OK (though a bit slower) if the user actually chooses this value.  */
-static char const dump_tz[] = "UtC0";
-#endif
-
 /* Test whether the next argument in ARGV matches SSTR or a prefix of
    LSTR (at least MINLEN characters).  If so, then if VALPTR is non-null
    (the argument is supposed to have a value) store in *VALPTR either
@@ -725,18 +730,13 @@ main (int argc, char **argv)
   stack_base = &dummy;
 #endif
 
-#ifdef G_SLICE_ALWAYS_MALLOC
-  /* This is used by the Cygwin build.  It's not needed starting with
-     cygwin-1.7.24, but it doesn't do any harm.  */
-  xputenv ("G_SLICE=always-malloc");
+#ifndef CANNOT_DUMP
+  might_dump = !initialized;
 #endif
 
 #ifdef GNU_LINUX
   if (!initialized)
     {
-      extern char my_endbss[];
-      extern char *my_endbss_static;
-
       if (my_heap_start == 0)
         my_heap_start = sbrk (0);
 
@@ -865,7 +865,6 @@ main (int argc, char **argv)
       && !getrlimit (RLIMIT_STACK, &rlim))
     {
       long newlim;
-      extern size_t re_max_failures;
       /* Approximate the amount regex.c needs per unit of re_max_failures.  */
       int ratio = 20 * sizeof (char *);
       /* Then add 33% to cover the size of the smaller stacks that regex.c
@@ -899,7 +898,7 @@ main (int argc, char **argv)
 
   clearerr (stdin);
 
-#ifndef SYSTEM_MALLOC
+#if !defined SYSTEM_MALLOC && !defined HYBRID_MALLOC
   /* Arrange to get warning messages as memory fills up.  */
   memory_warnings (0, malloc_warning);
 
@@ -907,22 +906,12 @@ main (int argc, char **argv)
      Also call realloc and free for consistency.  */
   free (realloc (malloc (4), 4));
 
-#endif /* not SYSTEM_MALLOC */
-
-#if defined (MSDOS) || defined (WINDOWSNT)
-  /* We do all file input/output as binary files.  When we need to translate
-     newlines, we do that manually.  */
-  _fmode = O_BINARY;
-#endif /* MSDOS || WINDOWSNT */
+#endif /* not SYSTEM_MALLOC and not HYBRID_MALLOC */
 
 #ifdef MSDOS
-  if (!isatty (fileno (stdin)))
-    setmode (fileno (stdin), O_BINARY);
-  if (!isatty (fileno (stdout)))
-    {
-      fflush (stdout);
-      setmode (fileno (stdout), O_BINARY);
-    }
+  SET_BINARY (fileno (stdin));
+  fflush (stdout);
+  SET_BINARY (fileno (stdout));
 #endif /* MSDOS */
 
   /* Skip initial setlocale if LC_ALL is "C", as it's not needed in that case.
@@ -1000,7 +989,7 @@ main (int argc, char **argv)
     {
       int i;
       printf ("Usage: %s [OPTION-OR-FILENAME]...\n", argv[0]);
-      for (i = 0; i < sizeof usage_message / sizeof *usage_message; i++)
+      for (i = 0; i < ARRAYELTS (usage_message); i++)
        fputs (usage_message[i], stdout);
       exit (0);
     }
@@ -1142,12 +1131,13 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
 #endif /* DOS_NT */
     }
 
-#if defined HAVE_PTHREAD && !defined SYSTEM_MALLOC && !defined DOUG_LEA_MALLOC
+#if defined HAVE_PTHREAD && !defined SYSTEM_MALLOC \
+  && !defined DOUG_LEA_MALLOC && !defined HYBRID_MALLOC
 # ifndef CANNOT_DUMP
   /* Do not make gmalloc thread-safe when creating bootstrap-emacs, as
-     that causes an infinite recursive loop with FreeBSD.  But do make
-     it thread-safe when creating emacs, otherwise bootstrap-emacs
-     fails on Cygwin.  See Bug#14569.  */
+     that causes an infinite recursive loop with FreeBSD.  See
+     Bug#14569.  The part of this bug involving Cygwin is no longer
+     relevant, now that Cygwin defines HYBRID_MALLOC.  */
   if (!noninteractive || initialized)
 # endif
     malloc_enable_thread ();
@@ -1368,7 +1358,8 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
   xputenv ("LANG=C");
 #endif
 
-  init_buffer ();      /* Init default directory of main buffer.  */
+  /* Init buffer storage and default directory of main buffer.  */
+  init_buffer (initialized);
 
   init_callproc_1 ();  /* Must precede init_cmdargs and init_sys_modes.  */
 
@@ -1551,8 +1542,23 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
 
   init_charset ();
 
-  init_editfns (); /* init_process_emacs uses Voperating_system_release. */
-  init_process_emacs (); /* init_display uses add_keyboard_wait_descriptor. */
+  /* This calls putenv and so must precede init_process_emacs.  Also,
+     it sets Voperating_system_release, which init_process_emacs uses.  */
+  init_editfns ();
+
+  /* These two call putenv.  */
+#ifdef HAVE_DBUS
+  init_dbusbind ();
+#endif
+#ifdef USE_GTK
+  init_xterm ();
+#endif
+
+  /* This can create a thread that may call getenv, so it must follow
+     all calls to putenv and setenv.  Also, this sets up
+     add_keyboard_wait_descriptor, which init_display uses.  */
+  init_process_emacs ();
+
   init_keyboard ();    /* This too must precede init_sys_modes.  */
   if (!noninteractive)
     init_display ();   /* Determine terminal type.  Calls init_sys_modes.  */
@@ -1589,26 +1595,6 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
                            build_string ("loadup.el"));
     }
 
-  if (initialized)
-    {
-#ifdef HAVE_TZSET
-      {
-       /* If the execution TZ happens to be the same as the dump TZ,
-          change it to some other value and then change it back,
-          to force the underlying implementation to reload the TZ info.
-          This is needed on implementations that load TZ info from files,
-          since the TZ file contents may differ between dump and execution.  */
-       char *tz = getenv ("TZ");
-       if (tz && !strcmp (tz, dump_tz))
-         {
-           ++*tz;
-           tzset ();
-           --*tz;
-         }
-      }
-#endif
-    }
-
   /* Set up for profiling.  This is known to work on FreeBSD,
      GNU/Linux and MinGW.  It might work on some other systems too.
      Give it a try and tell us if it works on your system.  To compile
@@ -1633,15 +1619,6 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
 
   initialized = 1;
 
-#ifdef LOCALTIME_CACHE
-  /* Some versions of localtime have a bug.  They cache the value of the time
-     zone rather than looking it up every time.  Since localtime() is
-     called to bolt the undumping time into the undumped emacs, this
-     results in localtime ignoring the TZ environment variable.
-     This flushes the new TZ value into localtime.  */
-  tzset ();
-#endif /* defined (LOCALTIME_CACHE) */
-
   /* Enter editor command loop.  This never returns.  */
   Frecursive_edit ();
   /* NOTREACHED */
@@ -1809,7 +1786,7 @@ sort_args (int argc, char **argv)
            }
 
          /* Look for a match with a known old-fashioned option.  */
-         for (i = 0; i < sizeof (standard_args) / sizeof (standard_args[0]); i++)
+         for (i = 0; i < ARRAYELTS (standard_args); i++)
            if (!strcmp (argv[from], standard_args[i].name))
              {
                options[from] = standard_args[i].nargs;
@@ -1831,8 +1808,7 @@ sort_args (int argc, char **argv)
 
              match = -1;
 
-             for (i = 0;
-                  i < sizeof (standard_args) / sizeof (standard_args[0]); i++)
+             for (i = 0; i < ARRAYELTS (standard_args); i++)
                if (standard_args[i].longname
                    && !strncmp (argv[from], standard_args[i].longname,
                                 thislen))
@@ -2025,9 +2001,7 @@ shut_down_emacs (int sig, Lisp_Object stuff)
   kill_buffer_processes (Qnil);
   Fdo_auto_save (Qt, Qnil);
 
-#ifdef CLASH_DETECTION
   unlock_all_files ();
-#endif
 
   /* There is a tendency for a SIGIO signal to arrive within exit,
      and cause a SIGHUP because the input descriptor is already closed.  */
@@ -2082,6 +2056,9 @@ You must run Emacs in batch mode in order to dump it.  */)
   if (! noninteractive)
     error ("Dumping Emacs works only in batch mode");
 
+  if (!might_dump)
+    error ("Emacs can be dumped only once");
+
 #ifdef GNU_LINUX
 
   /* Warn if the gap between BSS end and heap start is larger than this.  */
@@ -2122,38 +2099,22 @@ You must run Emacs in batch mode in order to dump it.  */)
   tem = Vpurify_flag;
   Vpurify_flag = Qnil;
 
-#ifdef HAVE_TZSET
-  set_time_zone_rule (dump_tz);
-#ifndef LOCALTIME_CACHE
-  /* Force a tz reload, since set_time_zone_rule doesn't.  */
-  tzset ();
-#endif
-#endif
-
   fflush (stdout);
   /* Tell malloc where start of impure now is.  */
   /* Also arrange for warnings when nearly out of space.  */
-#ifndef SYSTEM_MALLOC
+#if !defined SYSTEM_MALLOC && !defined HYBRID_MALLOC
 #ifndef WINDOWSNT
   /* On Windows, this was done before dumping, and that once suffices.
      Meanwhile, my_edata is not valid on Windows.  */
-  {
-    extern char my_edata[];
-    memory_warnings (my_edata, malloc_warning);
-  }
+  memory_warnings (my_edata, malloc_warning);
 #endif /* not WINDOWSNT */
-#endif /* not SYSTEM_MALLOC */
+#endif /* not SYSTEM_MALLOC and not HYBRID_MALLOC */
 #ifdef DOUG_LEA_MALLOC
   malloc_state_ptr = malloc_get_state ();
 #endif
 
-#ifdef USE_MMAP_FOR_BUFFERS
-  mmap_set_vars (0);
-#endif
   unexec (SSDATA (filename), !NILP (symfile) ? SSDATA (symfile) : 0);
-#ifdef USE_MMAP_FOR_BUFFERS
-  mmap_set_vars (1);
-#endif
+
 #ifdef DOUG_LEA_MALLOC
   free (malloc_state_ptr);
 #endif
@@ -2335,7 +2296,10 @@ decode_env_path (const char *evarname, const char *defalt, bool empty)
             }
 
           if (! NILP (tem))
-            element = concat2 (build_string ("/:"), element);
+           {
+             AUTO_STRING (slash_colon, "/:");
+             element = concat2 (slash_colon, element);
+           }
         } /* !NILP (element) */
 
       lpath = Fcons (element, lpath);
@@ -2452,6 +2416,12 @@ Emacs is running.  */);
               doc: /* String containing the configuration options Emacs was built with.  */);
   Vsystem_configuration_options = build_string (EMACS_CONFIG_OPTIONS);
 
+  DEFVAR_LISP ("system-configuration-features", Vsystem_configuration_features,
+              doc: /* String listing some of the main features this Emacs was compiled with.
+An element of the form \"FOO\" generally means that HAVE_FOO was
+defined during the build.  */);
+  Vsystem_configuration_features = build_string (EMACS_CONFIG_FEATURES);
+
   DEFVAR_BOOL ("noninteractive", noninteractive1,
               doc: /* Non-nil means Emacs is running without interactive terminal.  */);
 
@@ -2529,6 +2499,10 @@ This is nil during initialization.  */);
               doc: /* Version numbers of this version of Emacs.  */);
   Vemacs_version = build_string (emacs_version);
 
+  DEFVAR_LISP ("report-emacs-bug-address", Vreport_emacs_bug_address,
+              doc: /* Address of mailing list for GNU Emacs bugs.  */);
+  Vreport_emacs_bug_address = build_string (emacs_bugreport);
+
   DEFVAR_LISP ("dynamic-library-alist", Vdynamic_library_alist,
     doc: /* Alist of dynamic libraries vs external files implementing them.
 Each element is a list (LIBRARY FILE...), where the car is a symbol
index 929b98e9f7194c0ad3ff36ff2d4fe37f9b2e05ca..77b1db9539742695d5ebd592b039a7566789a0b2 100644 (file)
@@ -27,11 +27,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "commands.h"
 #include "keyboard.h"
 #include "dispextern.h"
-#include "frame.h"             /* For XFRAME.  */
-
-#if HAVE_X_WINDOWS
-#include "xterm.h"
-#endif
 
 /* Chain of condition and catch handlers currently in effect.  */
 
@@ -97,10 +92,8 @@ static EMACS_INT when_entered_debugger;
 /* FIXME: We should probably get rid of this!  */
 Lisp_Object Vsignaling_function;
 
-/* If non-nil, Lisp code must not be run since some part of Emacs is
-   in an inconsistent state.  Currently, x-create-frame uses this to
-   avoid triggering window-configuration-change-hook while the new
-   frame is half-initialized.  */
+/* If non-nil, Lisp code must not be run since some part of Emacs is in
+   an inconsistent state.  Currently unused.  */
 Lisp_Object inhibit_lisp_code;
 
 /* These would ordinarily be static, but they need to be visible to GDB.  */
@@ -1273,7 +1266,10 @@ internal_lisp_condition_case (volatile Lisp_Object var, Lisp_Object bodyform,
 
   { /* The first clause is the one that should be checked first, so it should
        be added to handlerlist last.  So we build in `clauses' a table that
-       contains `handlers' but in reverse order.  */
+       contains `handlers' but in reverse order.  SAFE_ALLOCA won't work
+       here due to the setjmp, so impose a MAX_ALLOCA limit.  */
+    if (MAX_ALLOCA / word_size < clausenb)
+      memory_full (SIZE_MAX);
     Lisp_Object *clauses = alloca (clausenb * sizeof *clauses);
     Lisp_Object *volatile clauses_volatile = clauses;
     int i = clausenb;
@@ -1312,7 +1308,7 @@ internal_lisp_condition_case (volatile Lisp_Object var, Lisp_Object bodyform,
            return val;
          }
       }
-    }
+  }
 
   val = eval_sub (bodyform);
   handlerlist = oldhandlerlist;
@@ -2275,12 +2271,10 @@ Thus, (apply '+ 1 2 '(3 4)) returns 10.
 usage: (apply FUNCTION &rest ARGUMENTS)  */)
   (ptrdiff_t nargs, Lisp_Object *args)
 {
-  ptrdiff_t i;
-  EMACS_INT numargs;
+  ptrdiff_t i, numargs, funcall_nargs;
   register Lisp_Object spread_arg;
   register Lisp_Object *funcall_args;
   Lisp_Object fun, retval;
-  struct gcpro gcpro1;
   USE_SAFE_ALLOCA;
 
   fun = args [0];
@@ -2321,10 +2315,9 @@ usage: (apply FUNCTION &rest ARGUMENTS)  */)
          /* Avoid making funcall cons up a yet another new vector of arguments
             by explicitly supplying nil's for optional values.  */
          SAFE_ALLOCA_LISP (funcall_args, 1 + XSUBR (fun)->max_args);
-         for (i = numargs; i < XSUBR (fun)->max_args;)
+         for (i = numargs; i < XSUBR (fun)->max_args; /* nothing */)
            funcall_args[++i] = Qnil;
-         GCPRO1 (*funcall_args);
-         gcpro1.nvars = 1 + XSUBR (fun)->max_args;
+         funcall_nargs = 1 + XSUBR (fun)->max_args;
        }
     }
  funcall:
@@ -2333,8 +2326,7 @@ usage: (apply FUNCTION &rest ARGUMENTS)  */)
   if (!funcall_args)
     {
       SAFE_ALLOCA_LISP (funcall_args, 1 + numargs);
-      GCPRO1 (*funcall_args);
-      gcpro1.nvars = 1 + numargs;
+      funcall_nargs = 1 + numargs;
     }
 
   memcpy (funcall_args, args, nargs * word_size);
@@ -2347,11 +2339,10 @@ usage: (apply FUNCTION &rest ARGUMENTS)  */)
       spread_arg = XCDR (spread_arg);
     }
 
-  /* By convention, the caller needs to gcpro Ffuncall's args.  */
-  retval = Ffuncall (gcpro1.nvars, funcall_args);
-  UNGCPRO;
-  SAFE_FREE ();
+  /* Ffuncall gcpro's all of its args.  */
+  retval = Ffuncall (funcall_nargs, funcall_args);
 
+  SAFE_FREE ();
   return retval;
 }
 \f
@@ -2559,41 +2550,22 @@ run_hook_with_args (ptrdiff_t nargs, Lisp_Object *args,
 void
 run_hook_with_args_2 (Lisp_Object hook, Lisp_Object arg1, Lisp_Object arg2)
 {
-  Lisp_Object temp[3];
-  temp[0] = hook;
-  temp[1] = arg1;
-  temp[2] = arg2;
-
-  Frun_hook_with_args (3, temp);
+  Frun_hook_with_args (3, ((Lisp_Object []) { hook, arg1, arg2 }));
 }
-\f
+
 /* Apply fn to arg.  */
 Lisp_Object
 apply1 (Lisp_Object fn, Lisp_Object arg)
 {
-  struct gcpro gcpro1;
-
-  GCPRO1 (fn);
-  if (NILP (arg))
-    RETURN_UNGCPRO (Ffuncall (1, &fn));
-  gcpro1.nvars = 2;
-  {
-    Lisp_Object args[2];
-    args[0] = fn;
-    args[1] = arg;
-    gcpro1.var = args;
-    RETURN_UNGCPRO (Fapply (2, args));
-  }
+  return (NILP (arg) ? Ffuncall (1, &fn)
+         : Fapply (2, ((Lisp_Object []) { fn, arg })));
 }
 
 /* Call function fn on no arguments.  */
 Lisp_Object
 call0 (Lisp_Object fn)
 {
-  struct gcpro gcpro1;
-
-  GCPRO1 (fn);
-  RETURN_UNGCPRO (Ffuncall (1, &fn));
+  return Ffuncall (1, &fn);
 }
 
 /* Call function fn with 1 argument arg1.  */
@@ -2601,14 +2573,7 @@ call0 (Lisp_Object fn)
 Lisp_Object
 call1 (Lisp_Object fn, Lisp_Object arg1)
 {
-  struct gcpro gcpro1;
-  Lisp_Object args[2];
-
-  args[0] = fn;
-  args[1] = arg1;
-  GCPRO1 (args[0]);
-  gcpro1.nvars = 2;
-  RETURN_UNGCPRO (Ffuncall (2, args));
+  return Ffuncall (2, ((Lisp_Object []) { fn, arg1 }));
 }
 
 /* Call function fn with 2 arguments arg1, arg2.  */
@@ -2616,14 +2581,7 @@ call1 (Lisp_Object fn, Lisp_Object arg1)
 Lisp_Object
 call2 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2)
 {
-  struct gcpro gcpro1;
-  Lisp_Object args[3];
-  args[0] = fn;
-  args[1] = arg1;
-  args[2] = arg2;
-  GCPRO1 (args[0]);
-  gcpro1.nvars = 3;
-  RETURN_UNGCPRO (Ffuncall (3, args));
+  return Ffuncall (3, ((Lisp_Object []) { fn, arg1, arg2 }));
 }
 
 /* Call function fn with 3 arguments arg1, arg2, arg3.  */
@@ -2631,15 +2589,7 @@ call2 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2)
 Lisp_Object
 call3 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3)
 {
-  struct gcpro gcpro1;
-  Lisp_Object args[4];
-  args[0] = fn;
-  args[1] = arg1;
-  args[2] = arg2;
-  args[3] = arg3;
-  GCPRO1 (args[0]);
-  gcpro1.nvars = 4;
-  RETURN_UNGCPRO (Ffuncall (4, args));
+  return Ffuncall (4, ((Lisp_Object []) { fn, arg1, arg2, arg3 }));
 }
 
 /* Call function fn with 4 arguments arg1, arg2, arg3, arg4.  */
@@ -2648,16 +2598,7 @@ Lisp_Object
 call4 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3,
        Lisp_Object arg4)
 {
-  struct gcpro gcpro1;
-  Lisp_Object args[5];
-  args[0] = fn;
-  args[1] = arg1;
-  args[2] = arg2;
-  args[3] = arg3;
-  args[4] = arg4;
-  GCPRO1 (args[0]);
-  gcpro1.nvars = 5;
-  RETURN_UNGCPRO (Ffuncall (5, args));
+  return Ffuncall (5, ((Lisp_Object []) { fn, arg1, arg2, arg3, arg4 }));
 }
 
 /* Call function fn with 5 arguments arg1, arg2, arg3, arg4, arg5.  */
@@ -2666,17 +2607,7 @@ Lisp_Object
 call5 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3,
        Lisp_Object arg4, Lisp_Object arg5)
 {
-  struct gcpro gcpro1;
-  Lisp_Object args[6];
-  args[0] = fn;
-  args[1] = arg1;
-  args[2] = arg2;
-  args[3] = arg3;
-  args[4] = arg4;
-  args[5] = arg5;
-  GCPRO1 (args[0]);
-  gcpro1.nvars = 6;
-  RETURN_UNGCPRO (Ffuncall (6, args));
+  return Ffuncall (6, ((Lisp_Object []) { fn, arg1, arg2, arg3, arg4, arg5 }));
 }
 
 /* Call function fn with 6 arguments arg1, arg2, arg3, arg4, arg5, arg6.  */
@@ -2685,18 +2616,8 @@ Lisp_Object
 call6 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3,
        Lisp_Object arg4, Lisp_Object arg5, Lisp_Object arg6)
 {
-  struct gcpro gcpro1;
-  Lisp_Object args[7];
-  args[0] = fn;
-  args[1] = arg1;
-  args[2] = arg2;
-  args[3] = arg3;
-  args[4] = arg4;
-  args[5] = arg5;
-  args[6] = arg6;
-  GCPRO1 (args[0]);
-  gcpro1.nvars = 7;
-  RETURN_UNGCPRO (Ffuncall (7, args));
+  return Ffuncall (7, ((Lisp_Object [])
+    { fn, arg1, arg2, arg3, arg4, arg5, arg6 }));
 }
 
 /* Call function fn with 7 arguments arg1, arg2, arg3, arg4, arg5, arg6, arg7.  */
@@ -2705,19 +2626,8 @@ Lisp_Object
 call7 (Lisp_Object fn, Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3,
        Lisp_Object arg4, Lisp_Object arg5, Lisp_Object arg6, Lisp_Object arg7)
 {
-  struct gcpro gcpro1;
-  Lisp_Object args[8];
-  args[0] = fn;
-  args[1] = arg1;
-  args[2] = arg2;
-  args[3] = arg3;
-  args[4] = arg4;
-  args[5] = arg5;
-  args[6] = arg6;
-  args[7] = arg7;
-  GCPRO1 (args[0]);
-  gcpro1.nvars = 8;
-  RETURN_UNGCPRO (Ffuncall (8, args));
+  return Ffuncall (8, ((Lisp_Object [])
+    { fn, arg1, arg2, arg3, arg4, arg5, arg6, arg7 }));
 }
 
 /* The caller should GCPRO all the elements of ARGS.  */
@@ -2793,10 +2703,11 @@ usage: (funcall FUNCTION &rest ARGUMENTS)  */)
        val = (XSUBR (fun)->function.aMANY) (numargs, args + 1);
       else
        {
+         Lisp_Object internal_argbuf[8];
          if (XSUBR (fun)->max_args > numargs)
            {
-             internal_args = alloca (XSUBR (fun)->max_args
-                                     * sizeof *internal_args);
+             eassert (XSUBR (fun)->max_args <= ARRAYELTS (internal_argbuf));
+             internal_args = internal_argbuf;
              memcpy (internal_args, args + 1, numargs * word_size);
              for (i = numargs; i < XSUBR (fun)->max_args; i++)
                internal_args[i] = Qnil;
index b4653017b282fbba1b22f0f4aedb355cdd7a71e9..4ba1c5914e81ff5ca225e300bcb389cdcd3054ab 100644 (file)
@@ -396,13 +396,6 @@ Otherwise return a directory name.
 Given a Unix syntax file name, returns a string ending in slash.  */)
   (Lisp_Object filename)
 {
-#ifndef DOS_NT
-  register const char *beg;
-#else
-  register char *beg;
-  Lisp_Object tem_fn;
-#endif
-  register const char *p;
   Lisp_Object handler;
 
   CHECK_STRING (filename);
@@ -417,12 +410,8 @@ Given a Unix syntax file name, returns a string ending in slash.  */)
       return STRINGP (handled_name) ? handled_name : Qnil;
     }
 
-#ifdef DOS_NT
-  beg = xlispstrdupa (filename);
-#else
-  beg = SSDATA (filename);
-#endif
-  p = beg + SBYTES (filename);
+  char *beg = SSDATA (filename);
+  char const *p = beg + SBYTES (filename);
 
   while (p != beg && !IS_DIRECTORY_SEP (p[-1])
 #ifdef DOS_NT
@@ -438,6 +427,11 @@ Given a Unix syntax file name, returns a string ending in slash.  */)
     return Qnil;
 #ifdef DOS_NT
   /* Expansion of "c:" to drive and default directory.  */
+  Lisp_Object tem_fn;
+  USE_SAFE_ALLOCA;
+  SAFE_ALLOCA_STRING (beg, filename);
+  p = beg + (p - SSDATA (filename));
+
   if (p[-1] == ':')
     {
       /* MAXPATHLEN+1 is guaranteed to be enough space for getdefdir.  */
@@ -481,6 +475,7 @@ Given a Unix syntax file name, returns a string ending in slash.  */)
       dostounix_filename (beg);
       tem_fn = make_specified_string (beg, -1, p - beg, 0);
     }
+  SAFE_FREE ();
   return tem_fn;
 #else  /* DOS_NT */
   return make_specified_string (beg, -1, p - beg, STRING_MULTIBYTE (filename));
@@ -847,8 +842,6 @@ probably use `make-temp-file' instead, except in three circumstances:
   return make_temp_name (prefix, 0);
 }
 
-
-\f
 DEFUN ("expand-file-name", Fexpand_file_name, Sexpand_file_name, 1, 2, 0,
        doc: /* Convert filename NAME to absolute, and canonicalize it.
 Second arg DEFAULT-DIRECTORY is directory to start with if NAME is relative
@@ -878,7 +871,9 @@ filesystem tree, not (expand-file-name ".."  dirname).  */)
   /* These point to SDATA and need to be careful with string-relocation
      during GC (via DECODE_FILE).  */
   char *nm;
+  char *nmlim;
   const char *newdir;
+  const char *newdirlim;
   /* This should only point to alloca'd data.  */
   char *target;
 
@@ -886,10 +881,10 @@ filesystem tree, not (expand-file-name ".."  dirname).  */)
   struct passwd *pw;
 #ifdef DOS_NT
   int drive = 0;
-  bool collapse_newdir = 1;
+  bool collapse_newdir = true;
   bool is_escaped = 0;
 #endif /* DOS_NT */
-  ptrdiff_t length;
+  ptrdiff_t length, nbytes;
   Lisp_Object handler, result, handled_name;
   bool multibyte;
   Lisp_Object hdir;
@@ -989,7 +984,7 @@ filesystem tree, not (expand-file-name ".."  dirname).  */)
        {
          unsigned char *p = SDATA (name);
 
-         while (*p && ASCII_BYTE_P (*p))
+         while (*p && ASCII_CHAR_P (*p))
            p++;
          if (*p == '\0')
            {
@@ -1018,8 +1013,9 @@ filesystem tree, not (expand-file-name ".."  dirname).  */)
     default_directory = Fdowncase (default_directory);
 #endif
 
-  /* Make a local copy of nm[] to protect it from GC in DECODE_FILE below.  */
-  nm = xlispstrdupa (name);
+  /* Make a local copy of NAME to protect it from GC in DECODE_FILE below.  */
+  SAFE_ALLOCA_STRING (nm, name);
+  nmlim = nm + SBYTES (name);
 
 #ifdef DOS_NT
   /* Note if special escape prefix is present, but remove for now.  */
@@ -1104,7 +1100,7 @@ filesystem tree, not (expand-file-name ".."  dirname).  */)
          if (IS_DIRECTORY_SEP (nm[1]))
            {
              if (strcmp (nm, SSDATA (name)) != 0)
-               name = make_specified_string (nm, -1, strlen (nm), multibyte);
+               name = make_specified_string (nm, -1, nmlim - nm, multibyte);
            }
          else
 #endif
@@ -1115,18 +1111,19 @@ filesystem tree, not (expand-file-name ".."  dirname).  */)
 
              name = make_specified_string (nm, -1, p - nm, multibyte);
              temp[0] = DRIVE_LETTER (drive);
-             name = concat2 (build_string (temp), name);
+             AUTO_STRING (drive_prefix, temp);
+             name = concat2 (drive_prefix, name);
            }
 #ifdef WINDOWSNT
          if (!NILP (Vw32_downcase_file_names))
            name = Fdowncase (name);
 #endif
-         return name;
 #else /* not DOS_NT */
-         if (strcmp (nm, SSDATA (name)) == 0)
-           return name;
-         return make_specified_string (nm, -1, strlen (nm), multibyte);
+         if (strcmp (nm, SSDATA (name)) != 0)
+           name = make_specified_string (nm, -1, nmlim - nm, multibyte);
 #endif /* not DOS_NT */
+         SAFE_FREE ();
+         return name;
        }
     }
 
@@ -1146,7 +1143,7 @@ filesystem tree, not (expand-file-name ".."  dirname).  */)
      return an absolute name, if the final prefix is not absolute we
      append it to the current working directory.  */
 
-  newdir = 0;
+  newdir = newdirlim = 0;
 
   if (nm[0] == '~')            /* prefix ~ */
     {
@@ -1156,7 +1153,7 @@ filesystem tree, not (expand-file-name ".."  dirname).  */)
          Lisp_Object tem;
 
          if (!(newdir = egetenv ("HOME")))
-           newdir = "";
+           newdir = newdirlim = "";
          nm++;
          /* `egetenv' may return a unibyte string, which will bite us since
             we expect the directory to be multibyte.  */
@@ -1171,13 +1168,15 @@ filesystem tree, not (expand-file-name ".."  dirname).  */)
          else
 #endif
            tem = build_string (newdir);
+         newdirlim = newdir + SBYTES (tem);
          if (multibyte && !STRING_MULTIBYTE (tem))
            {
              hdir = DECODE_FILE (tem);
              newdir = SSDATA (hdir);
+             newdirlim = newdir + SBYTES (hdir);
            }
 #ifdef DOS_NT
-         collapse_newdir = 0;
+         collapse_newdir = false;
 #endif
        }
       else                     /* ~user/filename */
@@ -1201,14 +1200,16 @@ filesystem tree, not (expand-file-name ".."  dirname).  */)
                 bite us since we expect the directory to be
                 multibyte.  */
              tem = build_string (newdir);
+             newdirlim = newdir + SBYTES (tem);
              if (multibyte && !STRING_MULTIBYTE (tem))
                {
                  hdir = DECODE_FILE (tem);
                  newdir = SSDATA (hdir);
+                 newdirlim = newdir + SBYTES (hdir);
                }
              nm = p;
 #ifdef DOS_NT
-             collapse_newdir = 0;
+             collapse_newdir = false;
 #endif
            }
 
@@ -1234,8 +1235,11 @@ filesystem tree, not (expand-file-name ".."  dirname).  */)
              Lisp_Object tem = build_string (adir);
 
              tem = DECODE_FILE (tem);
+             newdirlim = adir + SBYTES (tem);
              memcpy (adir, SSDATA (tem), SBYTES (tem) + 1);
            }
+         else
+           newdirlim = adir + strlen (adir);
        }
       if (!adir)
        {
@@ -1245,6 +1249,7 @@ filesystem tree, not (expand-file-name ".."  dirname).  */)
          adir[1] = ':';
          adir[2] = '/';
          adir[3] = 0;
+         newdirlim = adir + 3;
        }
       newdir = adir;
     }
@@ -1265,6 +1270,7 @@ filesystem tree, not (expand-file-name ".."  dirname).  */)
       && !newdir)
     {
       newdir = SSDATA (default_directory);
+      newdirlim = newdir + SBYTES (default_directory);
 #ifdef DOS_NT
       /* Note if special escape prefix is present, but remove for now.  */
       if (newdir[0] == '/' && newdir[1] == ':')
@@ -1309,12 +1315,15 @@ filesystem tree, not (expand-file-name ".."  dirname).  */)
            }
          if (!IS_DIRECTORY_SEP (nm[0]))
            {
-             ptrdiff_t newlen = strlen (newdir);
-             char *tmp = alloca (newlen + file_name_as_directory_slop
-                                 + strlen (nm) + 1);
-             file_name_as_directory (tmp, newdir, newlen, multibyte);
-             strcat (tmp, nm);
+             ptrdiff_t nmlen = nmlim - nm;
+             ptrdiff_t newdirlen = newdirlim - newdir;
+             char *tmp = alloca (newdirlen + file_name_as_directory_slop
+                                 + nmlen + 1);
+             ptrdiff_t dlen = file_name_as_directory (tmp, newdir, newdirlen,
+                                                      multibyte);
+             memcpy (tmp + dlen, nm, nmlen + 1);
              nm = tmp;
+             nmlim = nm + dlen + nmlen;
            }
          adir = alloca (adir_size);
          if (drive)
@@ -1329,8 +1338,11 @@ filesystem tree, not (expand-file-name ".."  dirname).  */)
              Lisp_Object tem = build_string (adir);
 
              tem = DECODE_FILE (tem);
+             newdirlim = adir + SBYTES (tem);
              memcpy (adir, SSDATA (tem), SBYTES (tem) + 1);
            }
+         else
+           newdirlim = adir + strlen (adir);
          newdir = adir;
        }
 
@@ -1349,35 +1361,32 @@ filesystem tree, not (expand-file-name ".."  dirname).  */)
          if (IS_DIRECTORY_SEP (newdir[0]) && IS_DIRECTORY_SEP (newdir[1])
              && !IS_DIRECTORY_SEP (newdir[2]))
            {
-             char *adir = strcpy (alloca (strlen (newdir) + 1), newdir);
+             char *adir = strcpy (alloca (newdirlim - newdir + 1), newdir);
              char *p = adir + 2;
              while (*p && !IS_DIRECTORY_SEP (*p)) p++;
              p++;
              while (*p && !IS_DIRECTORY_SEP (*p)) p++;
              *p = 0;
              newdir = adir;
+             newdirlim = newdir + strlen (adir);
            }
          else
 #endif
-           newdir = "";
+           newdir = newdirlim = "";
        }
     }
 #endif /* DOS_NT */
 
-  if (newdir)
-    {
-      /* Ignore any slash at the end of newdir, unless newdir is
-        just "/" or "//".  */
-      length = strlen (newdir);
-      while (length > 1 && IS_DIRECTORY_SEP (newdir[length - 1])
-            && ! (length == 2 && IS_DIRECTORY_SEP (newdir[0])))
-       length--;
-    }
-  else
-    length = 0;
+  /* Ignore any slash at the end of newdir, unless newdir is
+     just "/" or "//".  */
+  length = newdirlim - newdir;
+  while (length > 1 && IS_DIRECTORY_SEP (newdir[length - 1])
+        && ! (length == 2 && IS_DIRECTORY_SEP (newdir[0])))
+    length--;
 
   /* Now concatenate the directory and name to new space in the stack frame.  */
-  tlen = length + file_name_as_directory_slop + strlen (nm) + 1;
+  tlen = length + file_name_as_directory_slop + (nmlim - nm) + 1;
+  eassert (tlen > file_name_as_directory_slop + 1);
 #ifdef DOS_NT
   /* Reserve space for drive specifier and escape prefix, since either
      or both may need to be inserted.  (The Microsoft x86 compiler
@@ -1388,6 +1397,7 @@ filesystem tree, not (expand-file-name ".."  dirname).  */)
   target = SAFE_ALLOCA (tlen);
 #endif /* not DOS_NT */
   *target = 0;
+  nbytes = 0;
 
   if (newdir)
     {
@@ -1405,13 +1415,14 @@ filesystem tree, not (expand-file-name ".."  dirname).  */)
            {
              memcpy (target, newdir, length);
              target[length] = 0;
+             nbytes = length;
            }
        }
       else
-       file_name_as_directory (target, newdir, length, multibyte);
+       nbytes = file_name_as_directory (target, newdir, length, multibyte);
     }
 
-  strcat (target, nm);
+  memcpy (target + nbytes, nm, nmlim - nm + 1);
 
   /* Now canonicalize by removing `//', `/.' and `/foo/..' if they
      appear.  */
@@ -1717,7 +1728,8 @@ search_embedded_absfilename (char *nm, char *endp)
          for (s = p; *s && !IS_DIRECTORY_SEP (*s); s++);
          if (p[0] == '~' && s > p + 1) /* We've got "/~something/".  */
            {
-             char *o = alloca (s - p + 1);
+             USE_SAFE_ALLOCA;
+             char *o = SAFE_ALLOCA (s - p + 1);
              struct passwd *pw;
              memcpy (o, p, s - p);
              o [s - p] = 0;
@@ -1728,6 +1740,7 @@ search_embedded_absfilename (char *nm, char *endp)
              block_input ();
              pw = getpwnam (o + 1);
              unblock_input ();
+             SAFE_FREE ();
              if (pw)
                return p;
            }
@@ -1776,7 +1789,8 @@ those `/' is discarded.  */)
   /* Always work on a copy of the string, in case GC happens during
      decode of environment variables, causing the original Lisp_String
      data to be relocated.  */
-  nm = xlispstrdupa (filename);
+  USE_SAFE_ALLOCA;
+  SAFE_ALLOCA_STRING (nm, filename);
 
 #ifdef DOS_NT
   dostounix_filename (nm);
@@ -1790,8 +1804,13 @@ those `/' is discarded.  */)
     /* Start over with the new string, so we check the file-name-handler
        again.  Important with filenames like "/home/foo//:/hello///there"
        which would substitute to "/:/hello///there" rather than "/there".  */
-    return Fsubstitute_in_file_name
-      (make_specified_string (p, -1, endp - p, multibyte));
+    {
+      Lisp_Object result
+       = (Fsubstitute_in_file_name
+          (make_specified_string (p, -1, endp - p, multibyte)));
+      SAFE_FREE ();
+      return result;
+    }
 
   /* See if any variables are substituted into the string.  */
 
@@ -1813,6 +1832,7 @@ those `/' is discarded.  */)
       if (!NILP (Vw32_downcase_file_names))
        filename = Fdowncase (filename);
 #endif
+      SAFE_FREE ();
       return filename;
     }
 
@@ -1831,14 +1851,14 @@ those `/' is discarded.  */)
     {
       Lisp_Object xname = make_specified_string (xnm, -1, x - xnm, multibyte);
 
-      xname = Fdowncase (xname);
-      return xname;
+      filename = Fdowncase (xname);
     }
   else
 #endif
-  return (xnm == SSDATA (filename)
-         ? filename
-         : make_specified_string (xnm, -1, x - xnm, multibyte));
+  if (xnm != SSDATA (filename))
+    filename = make_specified_string (xnm, -1, x - xnm, multibyte);
+  SAFE_FREE ();
+  return filename;
 }
 \f
 /* A slightly faster and more convenient way to get
@@ -2671,7 +2691,10 @@ emacs_readlinkat (int fd, char const *filename)
 
   val = build_unibyte_string (buf);
   if (buf[0] == '/' && strchr (buf, ':'))
-    val = concat2 (build_unibyte_string ("/:"), val);
+    {
+      AUTO_STRING (slash_colon, "/:");
+      val = concat2 (slash_colon, val);
+    }
   if (buf != readlink_buf)
     xfree (buf);
   val = DECODE_FILE (val);
@@ -2765,23 +2788,24 @@ searchable directory.  */)
     }
 
   absname = ENCODE_FILE (absname);
-  return file_accessible_directory_p (SSDATA (absname)) ? Qt : Qnil;
+  return file_accessible_directory_p (absname) ? Qt : Qnil;
 }
 
 /* If FILE is a searchable directory or a symlink to a
    searchable directory, return true.  Otherwise return
    false and set errno to an error number.  */
 bool
-file_accessible_directory_p (char const *file)
+file_accessible_directory_p (Lisp_Object file)
 {
 #ifdef DOS_NT
   /* There's no need to test whether FILE is searchable, as the
      searchable/executable bit is invented on DOS_NT platforms.  */
-  return file_directory_p (file);
+  return file_directory_p (SSDATA (file));
 #else
   /* On POSIXish platforms, use just one system call; this avoids a
      race and is typically faster.  */
-  ptrdiff_t len = strlen (file);
+  const char *data = SSDATA (file);
+  ptrdiff_t len = SBYTES (file);
   char const *dir;
   bool ok;
   int saved_errno;
@@ -2793,15 +2817,15 @@ file_accessible_directory_p (char const *file)
      "/" and "//" are distinct on some platforms, whereas "/", "///",
      "////", etc. are all equivalent.  */
   if (! len)
-    dir = file;
+    dir = data;
   else
     {
       /* Just check for trailing '/' when deciding whether to append '/'.
         That's simpler than testing the two special cases "/" and "//",
         and it's a safe optimization here.  */
       char *buf = SAFE_ALLOCA (len + 3);
-      memcpy (buf, file, len);
-      strcpy (buf + len, &"/."[file[len - 1] == '/']);
+      memcpy (buf, data, len);
+      strcpy (buf + len, &"/."[data[len - 1] == '/']);
       dir = buf;
     }
 
@@ -2910,7 +2934,7 @@ or if SELinux is disabled, or if Emacs lacks SELinux support.  */)
     }
 #endif
 
-  return Flist (sizeof (values) / sizeof (values[0]), values);
+  return Flist (ARRAYELTS (values), values);
 }
 \f
 DEFUN ("set-file-selinux-context", Fset_file_selinux_context,
@@ -3624,13 +3648,14 @@ by calling `format-decode', which see.  */)
                report_file_error ("Read error", orig_filename);
              else if (nread > 0)
                {
+                 AUTO_STRING (name, " *code-converting-work*");
                  struct buffer *prev = current_buffer;
                  Lisp_Object workbuf;
                  struct buffer *buf;
 
                  record_unwind_current_buffer ();
 
-                 workbuf = Fget_buffer_create (build_string (" *code-converting-work*"));
+                 workbuf = Fget_buffer_create (name);
                  buf = XBUFFER (workbuf);
 
                  delete_all_overlays (buf);
@@ -4082,13 +4107,11 @@ by calling `format-decode', which see.  */)
 
   if (NILP (visit) && total > 0)
     {
-#ifdef CLASH_DETECTION
       if (!NILP (BVAR (current_buffer, file_truename))
          /* Make binding buffer-file-name to nil effective.  */
          && !NILP (BVAR (current_buffer, filename))
          && SAVE_MODIFF >= MODIFF)
        we_locked_file = 1;
-#endif /* CLASH_DETECTION */
       prepare_to_modify_buffer (PT, PT, NULL);
     }
 
@@ -4188,10 +4211,8 @@ by calling `format-decode', which see.  */)
 
   if (inserted == 0)
     {
-#ifdef CLASH_DETECTION
       if (we_locked_file)
        unlock_file (BVAR (current_buffer, file_truename));
-#endif
       Vdeactivate_mark = old_Vdeactivate_mark;
     }
   else
@@ -4340,14 +4361,12 @@ by calling `format-decode', which see.  */)
       SAVE_MODIFF = MODIFF;
       BUF_AUTOSAVE_MODIFF (current_buffer) = MODIFF;
       XSETFASTINT (BVAR (current_buffer, save_length), Z - BEG);
-#ifdef CLASH_DETECTION
       if (NILP (handler))
        {
          if (!NILP (BVAR (current_buffer, file_truename)))
            unlock_file (BVAR (current_buffer, file_truename));
          unlock_file (filename);
        }
-#endif /* CLASH_DETECTION */
       if (not_regular)
        xsignal2 (Qfile_error,
                  build_string ("not a regular file"), orig_filename);
@@ -4806,13 +4825,11 @@ write_region (Lisp_Object start, Lisp_Object end, Lisp_Object filename,
     = choose_write_coding_system (start, end, filename,
                                  append, visit, lockname, &coding);
 
-#ifdef CLASH_DETECTION
   if (open_and_close_file && !auto_saving)
     {
       lock_file (lockname);
       file_locked = 1;
     }
-#endif /* CLASH_DETECTION */
 
   encoded_filename = ENCODE_FILE (filename);
   fn = SSDATA (encoded_filename);
@@ -4834,10 +4851,8 @@ write_region (Lisp_Object start, Lisp_Object end, Lisp_Object filename,
       if (desc < 0)
        {
          int open_errno = errno;
-#ifdef CLASH_DETECTION
          if (file_locked)
            unlock_file (lockname);
-#endif /* CLASH_DETECTION */
          UNGCPRO;
          report_file_errno ("Opening output file", filename, open_errno);
        }
@@ -4852,10 +4867,8 @@ write_region (Lisp_Object start, Lisp_Object end, Lisp_Object filename,
       if (ret < 0)
        {
          int lseek_errno = errno;
-#ifdef CLASH_DETECTION
          if (file_locked)
            unlock_file (lockname);
-#endif /* CLASH_DETECTION */
          UNGCPRO;
          report_file_errno ("Lseek error", filename, lseek_errno);
        }
@@ -4998,10 +5011,8 @@ write_region (Lisp_Object start, Lisp_Object end, Lisp_Object filename,
 
   unbind_to (count, Qnil);
 
-#ifdef CLASH_DETECTION
   if (file_locked)
     unlock_file (lockname);
-#endif /* CLASH_DETECTION */
 
   /* Do this before reporting IO error
      to avoid a "file has changed on disk" warning on
@@ -5306,20 +5317,12 @@ If BUF is omitted or nil, it defaults to the current buffer.
 See Info node `(elisp)Modification Time' for more details.  */)
   (Lisp_Object buf)
 {
-  struct buffer *b;
+  struct buffer *b = decode_buffer (buf);
   struct stat st;
   Lisp_Object handler;
   Lisp_Object filename;
   struct timespec mtime;
 
-  if (NILP (buf))
-    b = current_buffer;
-  else
-    {
-      CHECK_BUFFER (buf);
-      b = XBUFFER (buf);
-    }
-
   if (!STRINGP (BVAR (b, filename))) return Qt;
   if (b->modtime.tv_nsec == UNKNOWN_MODTIME_NSECS) return Qt;
 
@@ -5413,7 +5416,7 @@ An argument specifies the modification time value to use
 static Lisp_Object
 auto_save_error (Lisp_Object error_val)
 {
-  Lisp_Object args[3], msg;
+  Lisp_Object msg;
   int i;
   struct gcpro gcpro1;
 
@@ -5421,10 +5424,10 @@ auto_save_error (Lisp_Object error_val)
 
   ring_bell (XFRAME (selected_frame));
 
-  args[0] = build_string ("Auto-saving %s: %s");
-  args[1] = BVAR (current_buffer, name);
-  args[2] = Ferror_message_string (error_val);
-  msg = Fformat (3, args);
+  AUTO_STRING (format, "Auto-saving %s: %s");
+  msg = Fformat (3, ((Lisp_Object [])
+                    {format, BVAR (current_buffer, name),
+                     Ferror_message_string (error_val)}));
   GCPRO1 (msg);
 
   for (i = 0; i < 3; ++i)
@@ -5767,24 +5770,6 @@ before any other event (mouse or keypress) is handled.  */)
   return Qnil;
 }
 
-Lisp_Object
-Fread_file_name (Lisp_Object prompt, Lisp_Object dir, Lisp_Object default_filename, Lisp_Object mustmatch, Lisp_Object initial, Lisp_Object predicate)
-{
-  struct gcpro gcpro1;
-  Lisp_Object args[7];
-
-  GCPRO1 (default_filename);
-  args[0] = intern ("read-file-name");
-  args[1] = prompt;
-  args[2] = dir;
-  args[3] = default_filename;
-  args[4] = mustmatch;
-  args[5] = initial;
-  args[6] = predicate;
-  RETURN_UNGCPRO (Ffuncall (7, args));
-}
-
-\f
 void
 init_fileio (void)
 {
index 5252db09104dd78ffd260f57e9326245fd825d75..f857c48814359a7e070b013947fe16dc07db44ef 100644 (file)
@@ -55,8 +55,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "w32.h"       /* for dostounix_filename */
 #endif
 
-#ifdef CLASH_DETECTION
-
 #ifdef HAVE_UTMP_H
 #include <utmp.h>
 #endif
@@ -773,7 +771,9 @@ DEFUN ("lock-buffer", Flock_buffer, Slock_buffer,
        0, 1, 0,
        doc: /* Lock FILE, if current buffer is modified.
 FILE defaults to current buffer's visited file,
-or else nothing is done if current buffer isn't visiting a file.  */)
+or else nothing is done if current buffer isn't visiting a file.
+
+If the option `create-lockfiles' is nil, this does nothing.  */)
   (Lisp_Object file)
 {
   if (NILP (file))
@@ -837,8 +837,6 @@ t if it is locked by you, else a string saying which user has locked it.  */)
   return ret;
 }
 
-#endif /* CLASH_DETECTION */
-
 void
 syms_of_filelock (void)
 {
@@ -850,9 +848,7 @@ syms_of_filelock (void)
               doc: /* Non-nil means use lockfiles to avoid editing collisions.  */);
   create_lockfiles = 1;
 
-#ifdef CLASH_DETECTION
   defsubr (&Sunlock_buffer);
   defsubr (&Slock_buffer);
   defsubr (&Sfile_locked_p);
-#endif
 }
index 499e4b490a6f508221d01d15918655d2b5e4510a..e891fdbf1d5ac4251820867a6e16c9a0e5b17d40 100644 (file)
--- a/src/fns.c
+++ b/src/fns.c
@@ -24,6 +24,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <time.h>
 
 #include <intprops.h>
+#include <vla.h>
 
 #include "lisp.h"
 #include "commands.h"
@@ -41,6 +42,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #endif
 
 Lisp_Object Qstring_lessp;
+static Lisp_Object Qstring_collate_lessp, Qstring_collate_equalp;
 static Lisp_Object Qprovide, Qrequire;
 static Lisp_Object Qyes_or_no_p_history;
 Lisp_Object Qcursor_in_echo_area;
@@ -49,8 +51,10 @@ static Lisp_Object Qcodeset, Qdays, Qmonths, Qpaper;
 
 static Lisp_Object Qmd5, Qsha1, Qsha224, Qsha256, Qsha384, Qsha512;
 
+static void sort_vector_copy (Lisp_Object, ptrdiff_t,
+                             Lisp_Object [restrict], Lisp_Object [restrict]);
 static bool internal_equal (Lisp_Object, Lisp_Object, int, bool, Lisp_Object);
-\f
+
 DEFUN ("identity", Fidentity, Sidentity, 1, 1, 0,
        doc: /* Return the argument unchanged.  */)
   (Lisp_Object arg)
@@ -232,6 +236,7 @@ string STR1, compare the part between START1 (inclusive) and END1
 \(exclusive).  If START1 is nil, it defaults to 0, the beginning of
 the string; if END1 is nil, it defaults to the length of the string.
 Likewise, in string STR2, compare the part between START2 and END2.
+Like in `substring', negative values are counted from the end.
 
 The strings are compared by the numeric values of their characters.
 For instance, STR1 is "less than" STR2 if its first differing
@@ -244,75 +249,46 @@ If string STR1 is less, the value is a negative number N;
   - 1 - N is the number of characters that match at the beginning.
 If string STR1 is greater, the value is a positive number N;
   N - 1 is the number of characters that match at the beginning.  */)
-  (Lisp_Object str1, Lisp_Object start1, Lisp_Object end1, Lisp_Object str2, Lisp_Object start2, Lisp_Object end2, Lisp_Object ignore_case)
+  (Lisp_Object str1, Lisp_Object start1, Lisp_Object end1, Lisp_Object str2,
+   Lisp_Object start2, Lisp_Object end2, Lisp_Object ignore_case)
 {
-  register ptrdiff_t end1_char, end2_char;
-  register ptrdiff_t i1, i1_byte, i2, i2_byte;
+  ptrdiff_t from1, to1, from2, to2, i1, i1_byte, i2, i2_byte;
 
   CHECK_STRING (str1);
   CHECK_STRING (str2);
-  if (NILP (start1))
-    start1 = make_number (0);
-  if (NILP (start2))
-    start2 = make_number (0);
-  CHECK_NATNUM (start1);
-  CHECK_NATNUM (start2);
-  if (! NILP (end1))
-    CHECK_NATNUM (end1);
-  if (! NILP (end2))
-    CHECK_NATNUM (end2);
-
-  end1_char = SCHARS (str1);
-  if (! NILP (end1) && end1_char > XINT (end1))
-    end1_char = XINT (end1);
-  if (end1_char < XINT (start1))
-    args_out_of_range (str1, start1);
-
-  end2_char = SCHARS (str2);
-  if (! NILP (end2) && end2_char > XINT (end2))
-    end2_char = XINT (end2);
-  if (end2_char < XINT (start2))
-    args_out_of_range (str2, start2);
-
-  i1 = XINT (start1);
-  i2 = XINT (start2);
+
+  /* For backward compatibility, silently bring too-large positive end
+     values into range.  */
+  if (INTEGERP (end1) && SCHARS (str1) < XINT (end1))
+    end1 = make_number (SCHARS (str1));
+  if (INTEGERP (end2) && SCHARS (str2) < XINT (end2))
+    end2 = make_number (SCHARS (str2));
+
+  validate_subarray (str1, start1, end1, SCHARS (str1), &from1, &to1);
+  validate_subarray (str2, start2, end2, SCHARS (str2), &from2, &to2);
+
+  i1 = from1;
+  i2 = from2;
 
   i1_byte = string_char_to_byte (str1, i1);
   i2_byte = string_char_to_byte (str2, i2);
 
-  while (i1 < end1_char && i2 < end2_char)
+  while (i1 < to1 && i2 < to2)
     {
       /* When we find a mismatch, we must compare the
         characters, not just the bytes.  */
       int c1, c2;
 
-      if (STRING_MULTIBYTE (str1))
-       FETCH_STRING_CHAR_ADVANCE_NO_CHECK (c1, str1, i1, i1_byte);
-      else
-       {
-         c1 = SREF (str1, i1++);
-         MAKE_CHAR_MULTIBYTE (c1);
-       }
-
-      if (STRING_MULTIBYTE (str2))
-       FETCH_STRING_CHAR_ADVANCE_NO_CHECK (c2, str2, i2, i2_byte);
-      else
-       {
-         c2 = SREF (str2, i2++);
-         MAKE_CHAR_MULTIBYTE (c2);
-       }
+      FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE (c1, str1, i1, i1_byte);
+      FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE (c2, str2, i2, i2_byte);
 
       if (c1 == c2)
        continue;
 
       if (! NILP (ignore_case))
        {
-         Lisp_Object tem;
-
-         tem = Fupcase (make_number (c1));
-         c1 = XINT (tem);
-         tem = Fupcase (make_number (c2));
-         c2 = XINT (tem);
+         c1 = XINT (Fupcase (make_number (c1)));
+         c2 = XINT (Fupcase (make_number (c2)));
        }
 
       if (c1 == c2)
@@ -322,15 +298,15 @@ If string STR1 is greater, the value is a positive number N;
         past the character that we are comparing;
         hence we don't add or subtract 1 here.  */
       if (c1 < c2)
-       return make_number (- i1 + XINT (start1));
+       return make_number (- i1 + from1);
       else
-       return make_number (i1 - XINT (start1));
+       return make_number (i1 - from1);
     }
 
-  if (i1 < end1_char)
-    return make_number (i1 - XINT (start1) + 1);
-  if (i2 < end2_char)
-    return make_number (- i1 + XINT (start1) - 1);
+  if (i1 < to1)
+    return make_number (i1 - from1 + 1);
+  if (i2 < to2)
+    return make_number (- i1 + from1 - 1);
 
   return Qt;
 }
@@ -371,6 +347,100 @@ Symbols are also allowed; their print names are used instead.  */)
     }
   return i1 < SCHARS (s2) ? Qt : Qnil;
 }
+
+DEFUN ("string-collate-lessp", Fstring_collate_lessp, Sstring_collate_lessp, 2, 4, 0,
+       doc: /* Return t if first arg string is less than second in collation order.
+Symbols are also allowed; their print names are used instead.
+
+This function obeys the conventions for collation order in your
+locale settings.  For example, punctuation and whitespace characters
+might be considered less significant for sorting:
+
+\(sort '\("11" "12" "1 1" "1 2" "1.1" "1.2") 'string-collate-lessp)
+  => \("11" "1 1" "1.1" "12" "1 2" "1.2")
+
+The optional argument LOCALE, a string, overrides the setting of your
+current locale identifier for collation.  The value is system
+dependent; a LOCALE \"en_US.UTF-8\" is applicable on POSIX systems,
+while it would be, e.g., \"enu_USA.1252\" on MS-Windows systems.
+
+If IGNORE-CASE is non-nil, characters are converted to lower-case
+before comparing them.
+
+To emulate Unicode-compliant collation on MS-Windows systems,
+bind `w32-collate-ignore-punctuation' to a non-nil value, since
+the codeset part of the locale cannot be \"UTF-8\" on MS-Windows.
+
+If your system does not support a locale environment, this function
+behaves like `string-lessp'.  */)
+  (Lisp_Object s1, Lisp_Object s2, Lisp_Object locale, Lisp_Object ignore_case)
+{
+#if defined __STDC_ISO_10646__ || defined WINDOWSNT
+  /* Check parameters.  */
+  if (SYMBOLP (s1))
+    s1 = SYMBOL_NAME (s1);
+  if (SYMBOLP (s2))
+    s2 = SYMBOL_NAME (s2);
+  CHECK_STRING (s1);
+  CHECK_STRING (s2);
+  if (!NILP (locale))
+    CHECK_STRING (locale);
+
+  return (str_collate (s1, s2, locale, ignore_case) < 0) ? Qt : Qnil;
+
+#else  /* !__STDC_ISO_10646__, !WINDOWSNT */
+  return Fstring_lessp (s1, s2);
+#endif /* !__STDC_ISO_10646__, !WINDOWSNT */
+}
+
+DEFUN ("string-collate-equalp", Fstring_collate_equalp, Sstring_collate_equalp, 2, 4, 0,
+       doc: /* Return t if two strings have identical contents.
+Symbols are also allowed; their print names are used instead.
+
+This function obeys the conventions for collation order in your locale
+settings.  For example, characters with different coding points but
+the same meaning might be considered as equal, like different grave
+accent Unicode characters:
+
+\(string-collate-equalp \(string ?\\uFF40) \(string ?\\u1FEF))
+  => t
+
+The optional argument LOCALE, a string, overrides the setting of your
+current locale identifier for collation.  The value is system
+dependent; a LOCALE \"en_US.UTF-8\" is applicable on POSIX systems,
+while it would be \"enu_USA.1252\" on MS Windows systems.
+
+If IGNORE-CASE is non-nil, characters are converted to lower-case
+before comparing them.
+
+To emulate Unicode-compliant collation on MS-Windows systems,
+bind `w32-collate-ignore-punctuation' to a non-nil value, since
+the codeset part of the locale cannot be \"UTF-8\" on MS-Windows.
+
+If your system does not support a locale environment, this function
+behaves like `string-equal'.
+
+Do NOT use this function to compare file names for equality, only
+for sorting them.  */)
+  (Lisp_Object s1, Lisp_Object s2, Lisp_Object locale, Lisp_Object ignore_case)
+{
+#if defined __STDC_ISO_10646__ || defined WINDOWSNT
+  /* Check parameters.  */
+  if (SYMBOLP (s1))
+    s1 = SYMBOL_NAME (s1);
+  if (SYMBOLP (s2))
+    s2 = SYMBOL_NAME (s2);
+  CHECK_STRING (s1);
+  CHECK_STRING (s2);
+  if (!NILP (locale))
+    CHECK_STRING (locale);
+
+  return (str_collate (s1, s2, locale, ignore_case) == 0) ? Qt : Qnil;
+
+#else  /* !__STDC_ISO_10646__, !WINDOWSNT */
+  return Fstring_equal (s1, s2);
+#endif /* !__STDC_ISO_10646__, !WINDOWSNT */
+}
 \f
 static Lisp_Object concat (ptrdiff_t nargs, Lisp_Object *args,
                           enum Lisp_Type target_type, bool last_special);
@@ -1127,7 +1197,48 @@ Elements of ALIST that are not conses are also shared.  */)
   return alist;
 }
 
-DEFUN ("substring", Fsubstring, Ssubstring, 2, 3, 0,
+/* Check that ARRAY can have a valid subarray [FROM..TO),
+   given that its size is SIZE.
+   If FROM is nil, use 0; if TO is nil, use SIZE.
+   Count negative values backwards from the end.
+   Set *IFROM and *ITO to the two indexes used.  */
+
+void
+validate_subarray (Lisp_Object array, Lisp_Object from, Lisp_Object to,
+                  ptrdiff_t size, ptrdiff_t *ifrom, ptrdiff_t *ito)
+{
+  EMACS_INT f, t;
+
+  if (INTEGERP (from))
+    {
+      f = XINT (from);
+      if (f < 0)
+       f += size;
+    }
+  else if (NILP (from))
+    f = 0;
+  else
+    wrong_type_argument (Qintegerp, from);
+
+  if (INTEGERP (to))
+    {
+      t = XINT (to);
+      if (t < 0)
+       t += size;
+    }
+  else if (NILP (to))
+    t = size;
+  else
+    wrong_type_argument (Qintegerp, to);
+
+  if (! (0 <= f && f <= t && t <= size))
+    args_out_of_range_3 (array, from, to);
+
+  *ifrom = f;
+  *ito = t;
+}
+
+DEFUN ("substring", Fsubstring, Ssubstring, 1, 3, 0,
        doc: /* Return a new string whose contents are a substring of STRING.
 The returned string consists of the characters between index FROM
 \(inclusive) and index TO (exclusive) of STRING.  FROM and TO are
@@ -1137,52 +1248,31 @@ to the end of STRING.
 
 The STRING argument may also be a vector.  In that case, the return
 value is a new vector that contains the elements between index FROM
-\(inclusive) and index TO (exclusive) of that vector argument.  */)
-  (Lisp_Object string, register Lisp_Object from, Lisp_Object to)
+\(inclusive) and index TO (exclusive) of that vector argument.
+
+With one argument, just copy STRING (with properties, if any).  */)
+  (Lisp_Object string, Lisp_Object from, Lisp_Object to)
 {
   Lisp_Object res;
-  ptrdiff_t size;
-  EMACS_INT from_char, to_char;
+  ptrdiff_t size, ifrom, ito;
 
-  CHECK_VECTOR_OR_STRING (string);
-  CHECK_NUMBER (from);
+  size = CHECK_VECTOR_OR_STRING (string);
+  validate_subarray (string, from, to, size, &ifrom, &ito);
 
   if (STRINGP (string))
-    size = SCHARS (string);
-  else
-    size = ASIZE (string);
-
-  if (NILP (to))
-    to_char = size;
-  else
     {
-      CHECK_NUMBER (to);
-
-      to_char = XINT (to);
-      if (to_char < 0)
-       to_char += size;
-    }
-
-  from_char = XINT (from);
-  if (from_char < 0)
-    from_char += size;
-  if (!(0 <= from_char && from_char <= to_char && to_char <= size))
-    args_out_of_range_3 (string, make_number (from_char),
-                        make_number (to_char));
-
-  if (STRINGP (string))
-    {
-      ptrdiff_t to_byte =
-       (NILP (to) ? SBYTES (string) : string_char_to_byte (string, to_char));
-      ptrdiff_t from_byte = string_char_to_byte (string, from_char);
+      ptrdiff_t from_byte
+       = !ifrom ? 0 : string_char_to_byte (string, ifrom);
+      ptrdiff_t to_byte
+       = ito == size ? SBYTES (string) : string_char_to_byte (string, ito);
       res = make_specified_string (SSDATA (string) + from_byte,
-                                  to_char - from_char, to_byte - from_byte,
+                                  ito - ifrom, to_byte - from_byte,
                                   STRING_MULTIBYTE (string));
-      copy_text_properties (make_number (from_char), make_number (to_char),
+      copy_text_properties (make_number (ifrom), make_number (ito),
                            string, make_number (0), res, Qnil);
     }
   else
-    res = Fvector (to_char - from_char, aref_addr (string, from_char));
+    res = Fvector (ito - ifrom, aref_addr (string, ifrom));
 
   return res;
 }
@@ -1198,41 +1288,16 @@ If FROM or TO is negative, it counts from the end.
 With one argument, just copy STRING without its properties.  */)
   (Lisp_Object string, register Lisp_Object from, Lisp_Object to)
 {
-  ptrdiff_t size;
-  EMACS_INT from_char, to_char;
-  ptrdiff_t from_byte, to_byte;
+  ptrdiff_t from_char, to_char, from_byte, to_byte, size;
 
   CHECK_STRING (string);
 
   size = SCHARS (string);
+  validate_subarray (string, from, to, size, &from_char, &to_char);
 
-  if (NILP (from))
-    from_char = 0;
-  else
-    {
-      CHECK_NUMBER (from);
-      from_char = XINT (from);
-      if (from_char < 0)
-       from_char += size;
-    }
-
-  if (NILP (to))
-    to_char = size;
-  else
-    {
-      CHECK_NUMBER (to);
-      to_char = XINT (to);
-      if (to_char < 0)
-       to_char += size;
-    }
-
-  if (!(0 <= from_char && from_char <= to_char && to_char <= size))
-    args_out_of_range_3 (string, make_number (from_char),
-                        make_number (to_char));
-
-  from_byte = NILP (from) ? 0 : string_char_to_byte (string, from_char);
+  from_byte = !from_char ? 0 : string_char_to_byte (string, from_char);
   to_byte =
-    NILP (to) ? SBYTES (string) : string_char_to_byte (string, to_char);
+    to_char == size ? SBYTES (string) : string_char_to_byte (string, to_char);
   return make_specified_string (SSDATA (string) + from_byte,
                                to_char - from_char, to_byte - from_byte,
                                STRING_MULTIBYTE (string));
@@ -1246,11 +1311,7 @@ substring_both (Lisp_Object string, ptrdiff_t from, ptrdiff_t from_byte,
                ptrdiff_t to, ptrdiff_t to_byte)
 {
   Lisp_Object res;
-  ptrdiff_t size;
-
-  CHECK_VECTOR_OR_STRING (string);
-
-  size = STRINGP (string) ? SCHARS (string) : ASIZE (string);
+  ptrdiff_t size = CHECK_VECTOR_OR_STRING (string);
 
   if (!(0 <= from && from <= to && to <= size))
     args_out_of_range_3 (string, make_number (from), make_number (to));
@@ -1693,49 +1754,129 @@ changing the value of a sequence `foo'.  */)
 }
 
 DEFUN ("nreverse", Fnreverse, Snreverse, 1, 1, 0,
-       doc: /* Reverse LIST by modifying cdr pointers.
-Return the reversed list.  Expects a properly nil-terminated list.  */)
-  (Lisp_Object list)
+       doc: /* Reverse order of items in a list, vector or string SEQ.
+If SEQ is a list, it should be nil-terminated.
+This function may destructively modify SEQ to produce the value.  */)
+  (Lisp_Object seq)
 {
-  register Lisp_Object prev, tail, next;
+  if (NILP (seq))
+    return seq;
+  else if (STRINGP (seq))
+    return Freverse (seq);
+  else if (CONSP (seq))
+    {
+      Lisp_Object prev, tail, next;
 
-  if (NILP (list)) return list;
-  prev = Qnil;
-  tail = list;
-  while (!NILP (tail))
+      for (prev = Qnil, tail = seq; !NILP (tail); tail = next)
+       {
+         QUIT;
+         CHECK_LIST_CONS (tail, tail);
+         next = XCDR (tail);
+         Fsetcdr (tail, prev);
+         prev = tail;
+       }
+      seq = prev;
+    }
+  else if (VECTORP (seq))
     {
-      QUIT;
-      CHECK_LIST_CONS (tail, tail);
-      next = XCDR (tail);
-      Fsetcdr (tail, prev);
-      prev = tail;
-      tail = next;
+      ptrdiff_t i, size = ASIZE (seq);
+
+      for (i = 0; i < size / 2; i++)
+       {
+         Lisp_Object tem = AREF (seq, i);
+         ASET (seq, i, AREF (seq, size - i - 1));
+         ASET (seq, size - i - 1, tem);
+       }
+    }
+  else if (BOOL_VECTOR_P (seq))
+    {
+      ptrdiff_t i, size = bool_vector_size (seq);
+
+      for (i = 0; i < size / 2; i++)
+       {
+         bool tem = bool_vector_bitref (seq, i);
+         bool_vector_set (seq, i, bool_vector_bitref (seq, size - i - 1));
+         bool_vector_set (seq, size - i - 1, tem);
+       }
     }
-  return prev;
+  else
+    wrong_type_argument (Qarrayp, seq);
+  return seq;
 }
 
 DEFUN ("reverse", Freverse, Sreverse, 1, 1, 0,
-       doc: /* Reverse LIST, copying.  Return the reversed list.
+       doc: /* Return the reversed copy of list, vector, or string SEQ.
 See also the function `nreverse', which is used more often.  */)
-  (Lisp_Object list)
+  (Lisp_Object seq)
 {
   Lisp_Object new;
 
-  for (new = Qnil; CONSP (list); list = XCDR (list))
+  if (NILP (seq))
+    return Qnil;
+  else if (CONSP (seq))
     {
-      QUIT;
-      new = Fcons (XCAR (list), new);
+      for (new = Qnil; CONSP (seq); seq = XCDR (seq))
+       {
+         QUIT;
+         new = Fcons (XCAR (seq), new);
+       }
+      CHECK_LIST_END (seq, seq);
+    }
+  else if (VECTORP (seq))
+    {
+      ptrdiff_t i, size = ASIZE (seq);
+
+      new = make_uninit_vector (size);
+      for (i = 0; i < size; i++)
+       ASET (new, i, AREF (seq, size - i - 1));
     }
-  CHECK_LIST_END (list, list);
+  else if (BOOL_VECTOR_P (seq))
+    {
+      ptrdiff_t i;
+      EMACS_INT nbits = bool_vector_size (seq);
+
+      new = make_uninit_bool_vector (nbits);
+      for (i = 0; i < nbits; i++)
+       bool_vector_set (new, i, bool_vector_bitref (seq, nbits - i - 1));
+    }
+  else if (STRINGP (seq))
+    {
+      ptrdiff_t size = SCHARS (seq), bytes = SBYTES (seq);
+
+      if (size == bytes)
+       {
+         ptrdiff_t i;
+
+         new = make_uninit_string (size);
+         for (i = 0; i < size; i++)
+           SSET (new, i, SREF (seq, size - i - 1));
+       }
+      else
+       {
+         unsigned char *p, *q;
+
+         new = make_uninit_multibyte_string (size, bytes);
+         p = SDATA (seq), q = SDATA (new) + bytes;
+         while (q > SDATA (new))
+           {
+             int ch, len;
+
+             ch = STRING_CHAR_AND_LENGTH (p, len);
+             p += len, q -= len;
+             CHAR_STRING (ch, q);
+           }
+       }
+    }
+  else
+    wrong_type_argument (Qsequencep, seq);
   return new;
 }
-\f
-DEFUN ("sort", Fsort, Ssort, 2, 2, 0,
-       doc: /* Sort LIST, stably, comparing elements using PREDICATE.
-Returns the sorted list.  LIST is modified by side effects.
-PREDICATE is called with two elements of LIST, and should return non-nil
-if the first element should sort before the second.  */)
-  (Lisp_Object list, Lisp_Object predicate)
+
+/* Sort LIST using PREDICATE, preserving original order of elements
+   considered as equal.  */
+
+static Lisp_Object
+sort_list (Lisp_Object list, Lisp_Object predicate)
 {
   Lisp_Object front, back;
   register Lisp_Object len, tem;
@@ -1760,6 +1901,126 @@ if the first element should sort before the second.  */)
   return merge (front, back, predicate);
 }
 
+/* Using PRED to compare, return whether A and B are in order.
+   Compare stably when A appeared before B in the input.  */
+static bool
+inorder (Lisp_Object pred, Lisp_Object a, Lisp_Object b)
+{
+  return NILP (call2 (pred, b, a));
+}
+
+/* Using PRED to compare, merge from ALEN-length A and BLEN-length B
+   into DEST.  Argument arrays must be nonempty and must not overlap,
+   except that B might be the last part of DEST.  */
+static void
+merge_vectors (Lisp_Object pred,
+              ptrdiff_t alen, Lisp_Object const a[restrict VLA_ELEMS (alen)],
+              ptrdiff_t blen, Lisp_Object const b[VLA_ELEMS (blen)],
+              Lisp_Object dest[VLA_ELEMS (alen + blen)])
+{
+  eassume (0 < alen && 0 < blen);
+  Lisp_Object const *alim = a + alen;
+  Lisp_Object const *blim = b + blen;
+
+  while (true)
+    {
+      if (inorder (pred, a[0], b[0]))
+       {
+         *dest++ = *a++;
+         if (a == alim)
+           {
+             if (dest != b)
+               memcpy (dest, b, (blim - b) * sizeof *dest);
+             return;
+           }
+       }
+      else
+       {
+         *dest++ = *b++;
+         if (b == blim)
+           {
+             memcpy (dest, a, (alim - a) * sizeof *dest);
+             return;
+           }
+       }
+    }
+}
+
+/* Using PRED to compare, sort LEN-length VEC in place, using TMP for
+   temporary storage.  LEN must be at least 2.  */
+static void
+sort_vector_inplace (Lisp_Object pred, ptrdiff_t len,
+                    Lisp_Object vec[restrict VLA_ELEMS (len)],
+                    Lisp_Object tmp[restrict VLA_ELEMS (len >> 1)])
+{
+  eassume (2 <= len);
+  ptrdiff_t halflen = len >> 1;
+  sort_vector_copy (pred, halflen, vec, tmp);
+  if (1 < len - halflen)
+    sort_vector_inplace (pred, len - halflen, vec + halflen, vec);
+  merge_vectors (pred, halflen, tmp, len - halflen, vec + halflen, vec);
+}
+
+/* Using PRED to compare, sort from LEN-length SRC into DST.
+   Len must be positive.  */
+static void
+sort_vector_copy (Lisp_Object pred, ptrdiff_t len,
+                 Lisp_Object src[restrict VLA_ELEMS (len)],
+                 Lisp_Object dest[restrict VLA_ELEMS (len)])
+{
+  eassume (0 < len);
+  ptrdiff_t halflen = len >> 1;
+  if (halflen < 1)
+    dest[0] = src[0];
+  else
+    {
+      if (1 < halflen)
+       sort_vector_inplace (pred, halflen, src, dest);
+      if (1 < len - halflen)
+       sort_vector_inplace (pred, len - halflen, src + halflen, dest);
+      merge_vectors (pred, halflen, src, len - halflen, src + halflen, dest);
+    }
+}
+
+/* Sort VECTOR in place using PREDICATE, preserving original order of
+   elements considered as equal.  */
+
+static void
+sort_vector (Lisp_Object vector, Lisp_Object predicate)
+{
+  ptrdiff_t len = ASIZE (vector);
+  if (len < 2)
+    return;
+  ptrdiff_t halflen = len >> 1;
+  Lisp_Object *tmp;
+  struct gcpro gcpro1, gcpro2;
+  GCPRO2 (vector, predicate);
+  USE_SAFE_ALLOCA;
+  SAFE_ALLOCA_LISP (tmp, halflen);
+  for (ptrdiff_t i = 0; i < halflen; i++)
+    tmp[i] = make_number (0);
+  sort_vector_inplace (predicate, len, XVECTOR (vector)->contents, tmp);
+  SAFE_FREE ();
+  UNGCPRO;
+}
+
+DEFUN ("sort", Fsort, Ssort, 2, 2, 0,
+       doc: /* Sort SEQ, stably, comparing elements using PREDICATE.
+Returns the sorted sequence.  SEQ should be a list or vector.  SEQ is
+modified by side effects.  PREDICATE is called with two elements of
+SEQ, and should return non-nil if the first element should sort before
+the second.  */)
+  (Lisp_Object seq, Lisp_Object predicate)
+{
+  if (CONSP (seq))
+    seq = sort_list (seq, predicate);
+  else if (VECTORP (seq))
+    sort_vector (seq, predicate);
+  else if (!NILP (seq))
+    wrong_type_argument (Qsequencep, seq);
+  return seq;
+}
+
 Lisp_Object
 merge (Lisp_Object org_l1, Lisp_Object org_l2, Lisp_Object pred)
 {
@@ -1797,8 +2058,7 @@ merge (Lisp_Object org_l1, Lisp_Object org_l2, Lisp_Object pred)
          Fsetcdr (tail, l1);
          return value;
        }
-      tem = call2 (pred, Fcar (l2), Fcar (l1));
-      if (NILP (tem))
+      if (inorder (pred, Fcar (l1), Fcar (l2)))
        {
          tem = l1;
          l1 = Fcdr (l1);
@@ -2446,8 +2706,7 @@ If dialog boxes are supported, a dialog box will be used
 if `last-nonmenu-event' is nil, and `use-dialog-box' is non-nil.  */)
   (Lisp_Object prompt)
 {
-  register Lisp_Object ans;
-  Lisp_Object args[2];
+  Lisp_Object ans;
   struct gcpro gcpro1;
 
   CHECK_STRING (prompt);
@@ -2466,10 +2725,8 @@ if `last-nonmenu-event' is nil, and `use-dialog-box' is non-nil.  */)
       return obj;
     }
 
-  args[0] = prompt;
-  args[1] = build_string ("(yes or no) ");
-  prompt = Fconcat (2, args);
-
+  AUTO_STRING (yes_or_no, "(yes or no) ");
+  prompt = Fconcat (2, (Lisp_Object []) {prompt, yes_or_no});
   GCPRO1 (prompt);
 
   while (1)
@@ -3027,7 +3284,6 @@ into shorter lines.  */)
   if (encoded_length < 0)
     {
       /* The encoding wasn't possible. */
-      SAFE_FREE ();
       error ("Multibyte character in data for base64 encoding");
     }
 
@@ -3172,7 +3428,6 @@ If the region can't be decoded, signal an error and don't modify the buffer.  */
   if (decoded_length < 0)
     {
       /* The decoding wasn't possible. */
-      SAFE_FREE ();
       error ("Invalid base64 data");
     }
 
@@ -3740,12 +3995,9 @@ maybe_resize_hash_table (struct Lisp_Hash_Table *h)
 #ifdef ENABLE_CHECKING
       if (HASH_TABLE_P (Vpurify_flag)
          && XHASH_TABLE (Vpurify_flag) == h)
-       {
-         Lisp_Object args[2];
-         args[0] = build_string ("Growing hash table to: %d");
-         args[1] = make_number (new_size);
-         Fmessage (2, args);
-       }
+       Fmessage (2, ((Lisp_Object [])
+         { build_string ("Growing hash table to: %d"),
+           make_number (new_size) }));
 #endif
 
       set_hash_key_and_value (h, larger_vector (h->key_and_value,
@@ -4032,6 +4284,7 @@ sweep_weak_table (struct Lisp_Hash_Table *h, bool remove_entries_p)
    current garbage collection.  Remove weak tables that don't survive
    from Vweak_hash_tables.  Called from gc_sweep.  */
 
+NO_INLINE /* For better stack traces */
 void
 sweep_weak_hash_tables (void)
 {
@@ -4224,13 +4477,10 @@ sxhash (Lisp_Object obj, int depth)
       break;
 
     case Lisp_Misc:
+    case Lisp_Symbol:
       hash = XHASH (obj);
       break;
 
-    case Lisp_Symbol:
-      obj = SYMBOL_NAME (obj);
-      /* Fall through.  */
-
     case Lisp_String:
       hash = sxhash_string (SSDATA (obj), SBYTES (obj));
       break;
@@ -4318,12 +4568,12 @@ usage: (make-hash-table &rest KEYWORD-ARGS)  */)
 {
   Lisp_Object test, size, rehash_size, rehash_threshold, weak;
   struct hash_table_test testdesc;
-  char *used;
   ptrdiff_t i;
+  USE_SAFE_ALLOCA;
 
   /* The vector `used' is used to keep track of arguments that
      have been consumed.  */
-  used = alloca (nargs * sizeof *used);
+  char *used = SAFE_ALLOCA (nargs * sizeof *used);
   memset (used, 0, nargs * sizeof *used);
 
   /* See if there's a `:test TEST' among the arguments.  */
@@ -4390,6 +4640,7 @@ usage: (make-hash-table &rest KEYWORD-ARGS)  */)
     if (!used[i])
       signal_error ("Invalid argument list", args[i]);
 
+  SAFE_FREE ();
   return make_hash_table (testdesc, size, rehash_size, rehash_threshold, weak);
 }
 
@@ -4570,12 +4821,12 @@ returns nil, then (funcall TEST x1 x2) also returns nil.  */)
 /* ALGORITHM is a symbol: md5, sha1, sha224 and so on. */
 
 static Lisp_Object
-secure_hash (Lisp_Object algorithm, Lisp_Object object, Lisp_Object start, Lisp_Object end, Lisp_Object coding_system, Lisp_Object noerror, Lisp_Object binary)
+secure_hash (Lisp_Object algorithm, Lisp_Object object, Lisp_Object start,
+            Lisp_Object end, Lisp_Object coding_system, Lisp_Object noerror,
+            Lisp_Object binary)
 {
   int i;
-  ptrdiff_t size;
-  EMACS_INT start_char = 0, end_char = 0;
-  ptrdiff_t start_byte, end_byte;
+  ptrdiff_t size, start_char = 0, start_byte, end_char = 0, end_byte;
   register EMACS_INT b, e;
   register struct buffer *bp;
   EMACS_INT temp;
@@ -4612,36 +4863,12 @@ secure_hash (Lisp_Object algorithm, Lisp_Object object, Lisp_Object start, Lisp_
        object = code_convert_string (object, coding_system, Qnil, 1, 0, 1);
 
       size = SCHARS (object);
+      validate_subarray (object, start, end, size, &start_char, &end_char);
 
-      if (!NILP (start))
-       {
-         CHECK_NUMBER (start);
-
-         start_char = XINT (start);
-
-         if (start_char < 0)
-           start_char += size;
-       }
-
-      if (NILP (end))
-       end_char = size;
-      else
-       {
-         CHECK_NUMBER (end);
-
-         end_char = XINT (end);
-
-         if (end_char < 0)
-           end_char += size;
-       }
-
-      if (!(0 <= start_char && start_char <= end_char && end_char <= size))
-       args_out_of_range_3 (object, make_number (start_char),
-                            make_number (end_char));
-
-      start_byte = NILP (start) ? 0 : string_char_to_byte (object, start_char);
-      end_byte =
-       NILP (end) ? SBYTES (object) : string_char_to_byte (object, end_char);
+      start_byte = !start_char ? 0 : string_char_to_byte (object, start_char);
+      end_byte = (end_char == size
+                 ? SBYTES (object)
+                 : string_char_to_byte (object, end_char));
     }
   else
     {
@@ -4898,6 +5125,8 @@ syms_of_fns (void)
   defsubr (&Sdefine_hash_table_test);
 
   DEFSYM (Qstring_lessp, "string-lessp");
+  DEFSYM (Qstring_collate_lessp, "string-collate-lessp");
+  DEFSYM (Qstring_collate_equalp, "string-collate-equalp");
   DEFSYM (Qprovide, "provide");
   DEFSYM (Qrequire, "require");
   DEFSYM (Qyes_or_no_p_history, "yes-or-no-p-history");
@@ -4951,6 +5180,8 @@ this variable.  */);
   defsubr (&Sstring_equal);
   defsubr (&Scompare_strings);
   defsubr (&Sstring_lessp);
+  defsubr (&Sstring_collate_lessp);
+  defsubr (&Sstring_collate_equalp);
   defsubr (&Sappend);
   defsubr (&Sconcat);
   defsubr (&Svconcat);
index 95b22b2fceb49348b19caf1285e27db045e8be91..08a25455cf851de33df46ad7a517ab65c3558fe0 100644 (file)
@@ -225,7 +225,35 @@ font_make_object (int size, Lisp_Object entity, int pixelsize)
   return font_object;
 }
 
-\f
+#if defined (HAVE_XFT) || defined (HAVE_FREETYPE) || defined (HAVE_NS)
+
+static int font_unparse_fcname (Lisp_Object, int, char *, int);
+
+/* Like above, but also set `type', `name' and `fullname' properties
+   of font-object.  */
+
+Lisp_Object
+font_build_object (int vectorsize, Lisp_Object type,
+                  Lisp_Object entity, double pixelsize)
+{
+  int len;
+  char name[256];
+  Lisp_Object font_object = font_make_object (vectorsize, entity, pixelsize);
+
+  ASET (font_object, FONT_TYPE_INDEX, type);
+  len = font_unparse_xlfd (entity, pixelsize, name, sizeof name);
+  if (len > 0)
+    ASET (font_object, FONT_NAME_INDEX, make_string (name, len));
+  len = font_unparse_fcname (entity, pixelsize, name, sizeof name);
+  if (len > 0)
+    ASET (font_object, FONT_FULLNAME_INDEX, make_string (name, len));
+  else
+    ASET (font_object, FONT_FULLNAME_INDEX,
+         AREF (font_object, FONT_NAME_INDEX));
+  return font_object;
+}
+
+#endif /* HAVE_XFT || HAVE_FREETYPE || HAVE_NS */
 
 static int font_pixel_size (struct frame *f, Lisp_Object);
 static Lisp_Object font_open_entity (struct frame *, Lisp_Object, int);
@@ -245,10 +273,8 @@ static int num_font_drivers;
 Lisp_Object
 font_intern_prop (const char *str, ptrdiff_t len, bool force_symbol)
 {
-  ptrdiff_t i;
-  Lisp_Object tem;
-  Lisp_Object obarray;
-  ptrdiff_t nbytes, nchars;
+  ptrdiff_t i, nbytes, nchars;
+  Lisp_Object tem, name, obarray;
 
   if (len == 1 && *str == '*')
     return Qnil;
@@ -279,14 +305,11 @@ font_intern_prop (const char *str, ptrdiff_t len, bool force_symbol)
   parse_str_as_multibyte ((unsigned char *) str, len, &nchars, &nbytes);
   tem = oblookup (obarray, str,
                  (len == nchars || len != nbytes) ? len : nchars, len);
-
   if (SYMBOLP (tem))
     return tem;
-  if (len == nchars || len != nbytes)
-    tem = make_unibyte_string (str, len);
-  else
-    tem = make_multibyte_string (str, nchars, len);
-  return Fintern (tem, obarray);
+  name = make_specified_string (str, nchars, len,
+                               len != nchars && len == nbytes);
+  return intern_driver (name, obarray, XINT (tem));
 }
 
 /* Return a pixel size of font-spec SPEC on frame F.  */
@@ -340,7 +363,7 @@ font_style_to_value (enum font_property_index prop, Lisp_Object val,
     {
       int i, j;
       char *s;
-      Lisp_Object args[2], elt;
+      Lisp_Object elt;
 
       /* At first try exact match.  */
       for (i = 0; i < len; i++)
@@ -372,9 +395,9 @@ font_style_to_value (enum font_property_index prop, Lisp_Object val,
       eassert (len < 255);
       elt = Fmake_vector (make_number (2), make_number (100));
       ASET (elt, 1, val);
-      args[0] = table;
-      args[1] = Fmake_vector (make_number (1), elt);
-      ASET (font_style_table, prop - FONT_WEIGHT_INDEX, Fvconcat (2, args));
+      ASET (font_style_table, prop - FONT_WEIGHT_INDEX,
+           Fvconcat (2, ((Lisp_Object [])
+             { table, Fmake_vector (make_number (1), elt) })));
       return (100 << 8) | (i << 4);
     }
   else
@@ -665,10 +688,6 @@ static const struct
     { &QCotf, font_prop_validate_otf }
   };
 
-/* Size (number of elements) of the above table.  */
-#define FONT_PROPERTY_TABLE_SIZE \
-  ((sizeof font_property_table) / (sizeof *font_property_table))
-
 /* Return an index number of font property KEY or -1 if KEY is not an
    already known property.  */
 
@@ -677,7 +696,7 @@ get_font_prop_index (Lisp_Object key)
 {
   int i;
 
-  for (i = 0; i < FONT_PROPERTY_TABLE_SIZE; i++)
+  for (i = 0; i < ARRAYELTS (font_property_table); i++)
     if (EQ (key, *font_property_table[i].key))
       return i;
   return -1;
@@ -1164,13 +1183,22 @@ font_parse_xlfd (char *name, ptrdiff_t len, Lisp_Object font)
        {
          val = prop[XLFD_ENCODING_INDEX];
          if (! NILP (val))
-           val = concat2 (build_string ("*-"), SYMBOL_NAME (val));
+           {
+             AUTO_STRING (star_dash, "*-");
+             val = concat2 (star_dash, SYMBOL_NAME (val));
+           }
        }
       else if (NILP (prop[XLFD_ENCODING_INDEX]))
-       val = concat2 (SYMBOL_NAME (val), build_string ("-*"));
+       {
+         AUTO_STRING (dash_star, "-*");
+         val = concat2 (SYMBOL_NAME (val), dash_star);
+       }
       else
-       val = concat3 (SYMBOL_NAME (val), build_string ("-"),
-                      SYMBOL_NAME (prop[XLFD_ENCODING_INDEX]));
+       {
+         AUTO_STRING (dash, "-");
+         val = concat3 (SYMBOL_NAME (val), dash,
+                        SYMBOL_NAME (prop[XLFD_ENCODING_INDEX]));
+       }
       if (! NILP (val))
        ASET (font, FONT_REGISTRY_INDEX, Fintern (val, Qnil));
 
@@ -1277,6 +1305,9 @@ font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes)
 
   val = AREF (font, FONT_SIZE_INDEX);
   eassert (NUMBERP (val) || NILP (val));
+  char font_size_index_buf[sizeof "-*"
+                          + max (INT_STRLEN_BOUND (EMACS_INT),
+                                 1 + DBL_MAX_10_EXP + 1)];
   if (INTEGERP (val))
     {
       EMACS_INT v = XINT (val);
@@ -1284,8 +1315,7 @@ font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes)
        v = pixel_size;
       if (v > 0)
        {
-         f[XLFD_PIXEL_INDEX] = p =
-           alloca (sizeof "-*" + INT_STRLEN_BOUND (EMACS_INT));
+         f[XLFD_PIXEL_INDEX] = p = font_size_index_buf;
          sprintf (p, "%"pI"d-*", v);
        }
       else
@@ -1294,21 +1324,22 @@ font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes)
   else if (FLOATP (val))
     {
       double v = XFLOAT_DATA (val) * 10;
-      f[XLFD_PIXEL_INDEX] = p = alloca (sizeof "*-" + 1 + DBL_MAX_10_EXP + 1);
+      f[XLFD_PIXEL_INDEX] = p = font_size_index_buf;
       sprintf (p, "*-%.0f", v);
     }
   else
     f[XLFD_PIXEL_INDEX] = "*-*";
 
+  char dpi_index_buf[sizeof "-" + 2 * INT_STRLEN_BOUND (EMACS_INT)];
   if (INTEGERP (AREF (font, FONT_DPI_INDEX)))
     {
       EMACS_INT v = XINT (AREF (font, FONT_DPI_INDEX));
-      f[XLFD_RESX_INDEX] = p =
-       alloca (sizeof "-" + 2 * INT_STRLEN_BOUND (EMACS_INT));
+      f[XLFD_RESX_INDEX] = p = dpi_index_buf;
       sprintf (p, "%"pI"d-%"pI"d", v, v);
     }
   else
     f[XLFD_RESX_INDEX] = "*-*";
+
   if (INTEGERP (AREF (font, FONT_SPACING_INDEX)))
     {
       EMACS_INT spacing = XINT (AREF (font, FONT_SPACING_INDEX));
@@ -1320,13 +1351,16 @@ font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes)
     }
   else
     f[XLFD_SPACING_INDEX] = "*";
+
+  char avgwidth_index_buf[INT_BUFSIZE_BOUND (EMACS_INT)];
   if (INTEGERP (AREF (font,  FONT_AVGWIDTH_INDEX)))
     {
-      f[XLFD_AVGWIDTH_INDEX] = p = alloca (INT_BUFSIZE_BOUND (EMACS_INT));
+      f[XLFD_AVGWIDTH_INDEX] = p = avgwidth_index_buf;
       sprintf (p, "%"pI"d", XINT (AREF (font, FONT_AVGWIDTH_INDEX)));
     }
   else
     f[XLFD_AVGWIDTH_INDEX] = "*";
+
   len = snprintf (name, nbytes, "-%s-%s-%s-%s-%s-%s-%s-%s-%s-%s-%s",
                  f[XLFD_FOUNDRY_INDEX], f[XLFD_FAMILY_INDEX],
                  f[XLFD_WEIGHT_INDEX], f[XLFD_SLANT_INDEX],
@@ -1579,11 +1613,14 @@ font_parse_fcname (char *name, ptrdiff_t len, Lisp_Object font)
   return 0;
 }
 
+#if defined HAVE_XFT || defined HAVE_FREETYPE || defined HAVE_NS
+
 /* Store fontconfig's font name of FONT (font-spec or font-entity) in
    NAME (NBYTES length), and return the name length.  If
-   FONT_SIZE_INDEX of FONT is 0, use PIXEL_SIZE instead.  */
+   FONT_SIZE_INDEX of FONT is 0, use PIXEL_SIZE instead.
+   Return a negative value on error.  */
 
-int
+static int
 font_unparse_fcname (Lisp_Object font, int pixel_size, char *name, int nbytes)
 {
   Lisp_Object family, foundry;
@@ -1704,6 +1741,8 @@ font_unparse_fcname (Lisp_Object font, int pixel_size, char *name, int nbytes)
   return (p - name);
 }
 
+#endif
+
 /* Parse NAME (null terminated) and store information in FONT
    (font-spec or font-entity).  If NAME is successfully parsed, return
    0.  Otherwise return -1.  */
@@ -1755,10 +1794,8 @@ font_parse_family_registry (Lisp_Object family, Lisp_Object registry, Lisp_Objec
       p1 = strchr (p0, '-');
       if (! p1)
        {
-         if (SDATA (registry)[len - 1] == '*')
-           registry = concat2 (registry, build_string ("-*"));
-         else
-           registry = concat2 (registry, build_string ("*-*"));
+         AUTO_STRING (extra, ("*-*" + (len && p0[len - 1] == '*')));
+         registry = concat2 (registry, extra);
        }
       registry = Fdowncase (registry);
       ASET (font_spec, FONT_REGISTRY_INDEX, Fintern (registry, Qnil));
@@ -2131,10 +2168,14 @@ font_score (Lisp_Object entity, Lisp_Object *spec_prop)
         lowest bit is set if the DPI is different.  */
       EMACS_INT diff;
       EMACS_INT pixel_size = XINT (spec_prop[FONT_SIZE_INDEX]);
+      EMACS_INT entity_size = XINT (AREF (entity, FONT_SIZE_INDEX));
 
       if (CONSP (Vface_font_rescale_alist))
        pixel_size *= font_rescale_ratio (entity);
-      diff = eabs (pixel_size - XINT (AREF (entity, FONT_SIZE_INDEX))) << 1;
+      if (pixel_size * 2 < entity_size || entity_size * 2 < pixel_size)
+       /* This size is wrong by more than a factor 2: reject it!  */
+       return 0xFFFFFFFF;
+      diff = eabs (pixel_size - entity_size) << 1;
       if (! NILP (spec_prop[FONT_DPI_INDEX])
          && ! EQ (spec_prop[FONT_DPI_INDEX], AREF (entity, FONT_DPI_INDEX)))
        diff |= 1;
@@ -2154,13 +2195,17 @@ font_score (Lisp_Object entity, Lisp_Object *spec_prop)
 static Lisp_Object
 font_vconcat_entity_vectors (Lisp_Object list)
 {
-  int nargs = XINT (Flength (list));
-  Lisp_Object *args = alloca (word_size * nargs);
-  int i;
+  EMACS_INT nargs = XFASTINT (Flength (list));
+  Lisp_Object *args;
+  USE_SAFE_ALLOCA;
+  SAFE_ALLOCA_LISP (args, nargs);
+  ptrdiff_t i;
 
   for (i = 0; i < nargs; i++, list = XCDR (list))
     args[i] = XCAR (list);
-  return Fvconcat (nargs, args);
+  Lisp_Object result = Fvconcat (nargs, args);
+  SAFE_FREE ();
+  return result;
 }
 
 
@@ -2643,7 +2688,7 @@ font_delete_unmatched (Lisp_Object vec, Lisp_Object spec, int size)
 {
   Lisp_Object entity, val;
   enum font_property_index prop;
-  int i;
+  ptrdiff_t i;
 
   for (val = Qnil, i = ASIZE (vec) - 1; i >= 0; i--)
     {
@@ -3188,9 +3233,10 @@ font_find_for_lface (struct frame *f, Lisp_Object *attrs, Lisp_Object spec, int
       val = attrs[LFACE_FAMILY_INDEX];
       val = font_intern_prop (SSDATA (val), SBYTES (val), 1);
     }
+  Lisp_Object familybuf[3];
   if (NILP (val))
     {
-      family = alloca ((sizeof family[0]) * 2);
+      family = familybuf;
       family[0] = Qnil;
       family[1] = zero_vector; /* terminator.  */
     }
@@ -3211,7 +3257,7 @@ font_find_for_lface (struct frame *f, Lisp_Object *attrs, Lisp_Object spec, int
        }
       else
        {
-         family = alloca ((sizeof family[0]) * 3);
+         family = familybuf;
          i = 0;
          family[i++] = val;
          if (NILP (AREF (spec, FONT_FAMILY_INDEX)))
@@ -3344,7 +3390,6 @@ font_done_for_face (struct frame *f, struct face *face)
 {
   if (face->font->driver->done_face)
     face->font->driver->done_face (f, face);
-  face->extra = NULL;
 }
 
 
@@ -3499,8 +3544,9 @@ font_update_drivers (struct frame *f, Lisp_Object new_drivers)
       struct font_driver_list **list_table, **next;
       Lisp_Object tail;
       int i;
+      USE_SAFE_ALLOCA;
 
-      list_table = alloca (sizeof list_table[0] * (num_font_drivers + 1));
+      SAFE_NALLOCA (list_table, 1, num_font_drivers + 1);
       for (i = 0, tail = new_drivers; ! NILP (tail); tail = XCDR (tail))
        {
          for (list = f->font_driver_list; list; list = list->next)
@@ -3521,6 +3567,7 @@ font_update_drivers (struct frame *f, Lisp_Object new_drivers)
          next = &(*next)->next;
        }
       *next = NULL;
+      SAFE_FREE ();
 
       if (! f->font_driver_list->on)
        { /* None of the drivers is enabled: enable them all.
@@ -3546,53 +3593,40 @@ font_update_drivers (struct frame *f, Lisp_Object new_drivers)
   return active_drivers;
 }
 
-int
-font_put_frame_data (struct frame *f, struct font_driver *driver, void *data)
+#if defined (HAVE_XFT) || defined (HAVE_FREETYPE)
+
+static void
+fset_font_data (struct frame *f, Lisp_Object val)
 {
-  struct font_data_list *list, *prev;
+  f->font_data = val;
+}
 
-  for (prev = NULL, list = f->font_data_list; list;
-       prev = list, list = list->next)
-    if (list->driver == driver)
-      break;
-  if (! data)
-    {
-      if (list)
-       {
-         if (prev)
-           prev->next = list->next;
-         else
-           f->font_data_list = list->next;
-         xfree (list);
-       }
-      return 0;
-    }
+void
+font_put_frame_data (struct frame *f, Lisp_Object driver, void *data)
+{
+  Lisp_Object val = assq_no_quit (driver, f->font_data);
 
-  if (! list)
+  if (!data)
+    fset_font_data (f, Fdelq (val, f->font_data));
+  else
     {
-      list = xmalloc (sizeof *list);
-      list->driver = driver;
-      list->next = f->font_data_list;
-      f->font_data_list = list;
+      if (NILP (val))
+       fset_font_data (f, Fcons (Fcons (driver, make_save_ptr (data)),
+                                 f->font_data));
+      else
+       XSETCDR (val, make_save_ptr (data));
     }
-  list->data = data;
-  return 0;
 }
 
-
 void *
-font_get_frame_data (struct frame *f, struct font_driver *driver)
+font_get_frame_data (struct frame *f, Lisp_Object driver)
 {
-  struct font_data_list *list;
-
-  for (list = f->font_data_list; list; list = list->next)
-    if (list->driver == driver)
-      break;
-  if (! list)
-    return NULL;
-  return list->data;
+  Lisp_Object val = assq_no_quit (driver, f->font_data);
+
+  return NILP (val) ? NULL : XSAVE_POINTER (XCDR (val), 0);
 }
 
+#endif /* HAVE_XFT || HAVE_FREETYPE */
 
 /* Sets attributes on a font.  Any properties that appear in ALIST and
    BOOLEAN_PROPERTIES or NON_BOOLEAN_PROPERTIES are set on the font.
@@ -4235,7 +4269,7 @@ the consecutive wildcards are folded into one.  */)
        {
          if (NILP (fold_wildcards))
            return font_name;
-         strcpy (name, SSDATA (font_name));
+         lispstpcpy (name, font_name);
          namelen = SBYTES (font_name);
          goto done;
        }
@@ -4653,9 +4687,10 @@ DEFUN ("font-get-glyphs", Ffont_get_glyphs, Sfont_get_glyphs, 3, 4, 0,
        doc:
        /* Return a vector of FONT-OBJECT's glyphs for the specified characters.
 FROM and TO are positions (integers or markers) specifying a region
-of the current buffer.
-If the optional fourth arg OBJECT is not nil, it is a string or a
-vector containing the target characters.
+of the current buffer, and can be in either order.  If the optional
+fourth arg OBJECT is not nil, it is a string or a vector containing
+the target characters between indices FROM and TO, which are treated
+as in `substring'.
 
 Each element is a vector containing information of a glyph in this format:
   [FROM-IDX TO-IDX C CODE WIDTH LBEARING RBEARING ASCENT DESCENT ADJUSTMENT]
@@ -4698,45 +4733,50 @@ the corresponding element is nil.  */)
   else if (STRINGP (object))
     {
       const unsigned char *p;
+      ptrdiff_t ifrom, ito;
 
-      CHECK_NUMBER (from);
-      CHECK_NUMBER (to);
-      if (XINT (from) < 0 || XINT (from) > XINT (to)
-         || XINT (to) > SCHARS (object))
-       args_out_of_range_3 (object, from, to);
-      if (EQ (from, to))
+      validate_subarray (object, from, to, SCHARS (object), &ifrom, &ito);
+      if (ifrom == ito)
        return Qnil;
-      len = XFASTINT (to) - XFASTINT (from);
+      len = ito - ifrom;
       SAFE_ALLOCA_LISP (chars, len);
       p = SDATA (object);
       if (STRING_MULTIBYTE (object))
-       for (i = 0; i < len; i++)
+       {
+         int c;
+
+         /* Skip IFROM characters from the beginning.  */
+         for (i = 0; i < ifrom; i++)
+           c = STRING_CHAR_ADVANCE (p);
+
+         /* Now fetch an interesting characters.  */
+         for (i = 0; i < len; i++)
          {
-           int c = STRING_CHAR_ADVANCE (p);
+           c = STRING_CHAR_ADVANCE (p);
            chars[i] = make_number (c);
          }
+       }
       else
        for (i = 0; i < len; i++)
-         chars[i] = make_number (p[i]);
+         chars[i] = make_number (p[ifrom + i]);
     }
-  else
+  else if (VECTORP (object))
     {
-      CHECK_VECTOR (object);
-      CHECK_NUMBER (from);
-      CHECK_NUMBER (to);
-      if (XINT (from) < 0 || XINT (from) > XINT (to)
-         || XINT (to) > ASIZE (object))
-       args_out_of_range_3 (object, from, to);
-      if (EQ (from, to))
+      ptrdiff_t ifrom, ito;
+
+      validate_subarray (object, from, to, ASIZE (object), &ifrom, &ito);
+      if (ifrom == ito)
        return Qnil;
-      len = XFASTINT (to) - XFASTINT (from);
+      len = ito - ifrom;
       for (i = 0; i < len; i++)
        {
-         Lisp_Object elt = AREF (object, XFASTINT (from) + i);
+         Lisp_Object elt = AREF (object, ifrom + i);
          CHECK_CHARACTER (elt);
        }
-      chars = aref_addr (object, XFASTINT (from));
+      chars = aref_addr (object, ifrom);
     }
+  else
+    wrong_type_argument (Qarrayp, object);
 
   vec = make_uninit_vector (len);
   for (i = 0; i < len; i++)
@@ -4938,8 +4978,7 @@ If the named font is not yet loaded, return nil.  */)
 #endif
 
 \f
-#define BUILD_STYLE_TABLE(TBL) \
-  build_style_table ((TBL), sizeof TBL / sizeof (struct table_entry))
+#define BUILD_STYLE_TABLE(TBL) build_style_table (TBL, ARRAYELTS (TBL))
 
 static Lisp_Object
 build_style_table (const struct table_entry *entry, int nelement)
@@ -4989,7 +5028,7 @@ font_add_log (const char *action, Lisp_Object arg, Lisp_Object result)
   if (FONTP (arg))
     {
       Lisp_Object tail, elt;
-      Lisp_Object equalstr = build_string ("=");
+      AUTO_STRING (equal, "=");
 
       val = Ffont_xlfd_name (arg, Qt);
       for (tail = AREF (arg, FONT_EXTRA_INDEX); CONSP (tail);
@@ -4999,16 +5038,15 @@ font_add_log (const char *action, Lisp_Object arg, Lisp_Object result)
          if (EQ (XCAR (elt), QCscript)
              && SYMBOLP (XCDR (elt)))
            val = concat3 (val, SYMBOL_NAME (QCscript),
-                          concat2 (equalstr, SYMBOL_NAME (XCDR (elt))));
+                          concat2 (equal, SYMBOL_NAME (XCDR (elt))));
          else if (EQ (XCAR (elt), QClang)
                   && SYMBOLP (XCDR (elt)))
            val = concat3 (val, SYMBOL_NAME (QClang),
-                          concat2 (equalstr, SYMBOL_NAME (XCDR (elt))));
+                          concat2 (equal, SYMBOL_NAME (XCDR (elt))));
          else if (EQ (XCAR (elt), QCotf)
                   && CONSP (XCDR (elt)) && SYMBOLP (XCAR (XCDR (elt))))
            val = concat3 (val, SYMBOL_NAME (QCotf),
-                          concat2 (equalstr,
-                                   SYMBOL_NAME (XCAR (XCDR (elt)))));
+                          concat2 (equal, SYMBOL_NAME (XCAR (XCDR (elt)))));
        }
       arg = val;
     }
@@ -5022,8 +5060,11 @@ font_add_log (const char *action, Lisp_Object arg, Lisp_Object result)
     {
       val = Ffont_xlfd_name (result, Qt);
       if (! FONT_SPEC_P (result))
-       val = concat3 (SYMBOL_NAME (AREF (result, FONT_TYPE_INDEX)),
-                      build_string (":"), val);
+       {
+         AUTO_STRING (colon, ":");
+         val = concat3 (SYMBOL_NAME (AREF (result, FONT_TYPE_INDEX)),
+                        colon, val);
+       }
       result = val;
     }
   else if (CONSP (result))
index e2e36460583b678d25da9e2be675200e7f85385f..52783419ebeff34abdab727b026eb31709de5ff3 100644 (file)
@@ -162,9 +162,6 @@ enum font_property_index
     /* List of font-objects opened from the font-entity.  */
     FONT_OBJLIST_INDEX = FONT_SPEC_MAX,
 
-    /* Font-entity from which the font-object is opened.  */
-    FONT_ENTITY_INDEX = FONT_SPEC_MAX,
-
     /* This value is the length of font-entity vector.  */
     FONT_ENTITY_MAX,
 
@@ -182,9 +179,6 @@ enum font_property_index
        is not available.  */
     FONT_FILE_INDEX,
 
-    /* Format of the font (symbol) or nil if unknown.  */
-    FONT_FORMAT_INDEX,
-
     /* This value is the length of font-object vector.  */
     FONT_OBJECT_MAX
   };
@@ -442,15 +436,6 @@ struct font_bitmap
 #define FONT_OBJECT_P(x)       \
   (FONTP (x) && (ASIZE (x) & PSEUDOVECTOR_SIZE_MASK) == FONT_OBJECT_MAX)
 
-/* True iff ENTITY can't be loaded.  */
-#define FONT_ENTITY_NOT_LOADABLE(entity)       \
-  EQ (AREF (entity, FONT_OBJLIST_INDEX), Qt)
-
-/* Flag ENTITY not loadable.  */
-#define FONT_ENTITY_SET_NOT_LOADABLE(entity)   \
-  ASET (entity, FONT_OBJLIST_INDEX, Qt)
-
-
 /* Check macros for various font-related objects.  */
 
 #define CHECK_FONT(x)  \
@@ -564,11 +549,9 @@ struct font_driver
   /* Close FONT.  NOTE: this can be called by GC.  */
   void (*close) (struct font *font);
 
-  /* Optional (if FACE->extra is not used).
-     Prepare FACE for displaying characters by FONT on frame F by
-     storing some data in FACE->extra.  If successful, return 0.
-     Otherwise, return -1.  */
-  int (*prepare_face) (struct frame *f, struct face *face);
+  /* Prepare FACE for displaying characters by FONT on frame F by
+     storing some data in FACE->extra.  */
+  void (*prepare_face) (struct frame *f, struct face *face);
 
   /* Optional.
      Done FACE for displaying characters by FACE->font on frame F.  */
@@ -587,9 +570,9 @@ struct font_driver
   /* Compute the total metrics of the NGLYPHS glyphs specified by
      the font FONT and the sequence of glyph codes CODE, and store the
      result in METRICS.  */
-  int (*text_extents) (struct font *font,
-                       unsigned *code, int nglyphs,
-                       struct font_metrics *metrics);
+  void (*text_extents) (struct font *font,
+                       unsigned *code, int nglyphs,
+                       struct font_metrics *metrics);
 
 #ifdef HAVE_WINDOW_SYSTEM
 
@@ -615,15 +598,6 @@ struct font_driver
 
 #endif /* HAVE_WINDOW_SYSTEM */
 
-  /* Optional.
-     Return an outline data for glyph-code CODE of FONT.  The format
-     of the outline data depends on the font-driver.  */
-  void *(*get_outline) (struct font *font, unsigned code);
-
-  /* Optional.
-     Free OUTLINE (that is obtained by the above method).  */
-  void (*free_outline) (struct font *font, void *outline);
-
   /* Optional.
      Get coordinates of the INDEXth anchor point of the glyph whose
      code is CODE.  Store the coordinates in *X and *Y.  Return 0 if
@@ -725,25 +699,14 @@ struct font_driver_list
   struct font_driver_list *next;
 };
 
-
-/* Chain of arbitrary data specific to each font driver.
-   Each frame has its own font data list at F->font_data_list.  */
-
-struct font_data_list
-{
-  /* Pointer to the font driver.  */
-  struct font_driver *driver;
-  /* Data specific to the font driver.  */
-  void *data;
-  /* Pointer to the next element of the chain.  */
-  struct font_data_list *next;
-};
-
 extern Lisp_Object copy_font_spec (Lisp_Object);
 extern Lisp_Object merge_font_spec (Lisp_Object, Lisp_Object);
 
 extern Lisp_Object font_make_entity (void);
 extern Lisp_Object font_make_object (int, Lisp_Object, int);
+#if defined (HAVE_XFT) || defined (HAVE_FREETYPE) || defined (HAVE_NS)
+extern Lisp_Object font_build_object (int, Lisp_Object, Lisp_Object, double);
+#endif
 
 extern Lisp_Object find_font_encoding (Lisp_Object);
 extern int font_registry_charsets (Lisp_Object, struct charset **,
@@ -789,8 +752,6 @@ extern void font_parse_family_registry (Lisp_Object family,
 extern int font_parse_xlfd (char *name, ptrdiff_t len, Lisp_Object font);
 extern ptrdiff_t font_unparse_xlfd (Lisp_Object font, int pixel_size,
                                    char *name, int bytes);
-extern int font_unparse_fcname (Lisp_Object font, int pixel_size,
-                                char *name, int bytes);
 extern void register_font_driver (struct font_driver *driver, struct frame *f);
 extern void free_font_driver_list (struct frame *f);
 #ifdef ENABLE_CHECKING
@@ -811,11 +772,10 @@ extern void font_fill_lglyph_metrics (Lisp_Object, Lisp_Object);
 extern Lisp_Object font_put_extra (Lisp_Object font, Lisp_Object prop,
                                    Lisp_Object val);
 
-extern int font_put_frame_data (struct frame *f,
-                                struct font_driver *driver,
-                                void *data);
-extern void *font_get_frame_data (struct frame *f,
-                                  struct font_driver *driver);
+#if defined (HAVE_XFT) || defined (HAVE_FREETYPE)
+extern void font_put_frame_data (struct frame *, Lisp_Object, void *);
+extern void *font_get_frame_data (struct frame *f, Lisp_Object);
+#endif /* HAVE_XFT || HAVE_FREETYPE */
 
 extern void font_filter_properties (Lisp_Object font,
                                    Lisp_Object alist,
@@ -834,7 +794,8 @@ extern void syms_of_ftxfont (void);
 extern Lisp_Object Qxft;
 extern struct font_driver xftfont_driver;
 extern void syms_of_xftfont (void);
-#elif defined HAVE_FREETYPE
+#endif
+#if defined HAVE_FREETYPE || defined HAVE_XFT
 extern struct font_driver ftxfont_driver;
 #endif
 #ifdef HAVE_BDFFONT
index 08413ae15719970cbab7a3fdb6297b339163bce0..c415fdfa8fde1ec1197124f817d792903fcaac07 100644 (file)
@@ -209,27 +209,27 @@ set_fontset_name (Lisp_Object fontset, Lisp_Object name)
   set_char_table_extras (fontset, 1, name);
 }
 
-#define FONTSET_ASCII(fontset) XCHAR_TABLE (fontset)->extras[4]
+#define FONTSET_ASCII(fontset) XCHAR_TABLE (fontset)->extras[2]
 static void
 set_fontset_ascii (Lisp_Object fontset, Lisp_Object ascii)
 {
-  set_char_table_extras (fontset, 4, ascii);
+  set_char_table_extras (fontset, 2, ascii);
 }
 
 /* Access special values of (realized) FONTSET.  */
 
-#define FONTSET_BASE(fontset) XCHAR_TABLE (fontset)->extras[2]
+#define FONTSET_BASE(fontset) XCHAR_TABLE (fontset)->extras[3]
 static void
 set_fontset_base (Lisp_Object fontset, Lisp_Object base)
 {
-  set_char_table_extras (fontset, 2, base);
+  set_char_table_extras (fontset, 3, base);
 }
 
-#define FONTSET_FRAME(fontset) XCHAR_TABLE (fontset)->extras[3]
+#define FONTSET_FRAME(fontset) XCHAR_TABLE (fontset)->extras[4]
 static void
 set_fontset_frame (Lisp_Object fontset, Lisp_Object frame)
 {
-  set_char_table_extras (fontset, 3, frame);
+  set_char_table_extras (fontset, 4, frame);
 }
 
 #define FONTSET_NOFONT_FACE(fontset) XCHAR_TABLE (fontset)->extras[5]
@@ -239,20 +239,20 @@ set_fontset_nofont_face (Lisp_Object fontset, Lisp_Object face)
   set_char_table_extras (fontset, 5, face);
 }
 
-#define FONTSET_DEFAULT(fontset) XCHAR_TABLE (fontset)->extras[7]
+#define FONTSET_DEFAULT(fontset) XCHAR_TABLE (fontset)->extras[6]
 static void
 set_fontset_default (Lisp_Object fontset, Lisp_Object def)
 {
-  set_char_table_extras (fontset, 7, def);
+  set_char_table_extras (fontset, 6, def);
 }
 
 /* For both base and realized fontset.  */
 
-#define FONTSET_FALLBACK(fontset) XCHAR_TABLE (fontset)->extras[8]
+#define FONTSET_FALLBACK(fontset) XCHAR_TABLE (fontset)->extras[7]
 static void
 set_fontset_fallback (Lisp_Object fontset, Lisp_Object fallback)
 {
-  set_char_table_extras (fontset, 8, fallback);
+  set_char_table_extras (fontset, 7, fallback);
 }
 
 #define BASE_FONTSET_P(fontset) (NILP (FONTSET_BASE (fontset)))
@@ -852,21 +852,6 @@ fontset_ascii (int id)
   return elt;
 }
 
-static void
-free_realized_fontset (struct frame *f, Lisp_Object fontset)
-{
-#if 0
-  Lisp_Object tail;
-
-  if (0)
-    for (tail = FONTSET_OBJLIST (fontset); CONSP (tail); tail = XCDR (tail))
-      {
-       eassert (FONT_OBJECT_P (XCAR (tail)));
-       font_close_object (f, XCAR (tail));
-      }
-#endif
-}
-
 /* Free fontset of FACE defined on frame F.  Called from
    free_realized_face.  */
 
@@ -880,7 +865,6 @@ free_face_fontset (struct frame *f, struct face *face)
     return;
   eassert (! BASE_FONTSET_P (fontset));
   eassert (f == XFRAME (FONTSET_FRAME (fontset)));
-  free_realized_fontset (f, fontset);
   ASET (Vfontset_table, face->fontset, Qnil);
   if (face->fontset < next_fontset_id)
     next_fontset_id = face->fontset;
@@ -891,7 +875,6 @@ free_face_fontset (struct frame *f, struct face *face)
       fontset = AREF (Vfontset_table, id);
       eassert (!NILP (fontset) && ! BASE_FONTSET_P (fontset));
       eassert (f == XFRAME (FONTSET_FRAME (fontset)));
-      free_realized_fontset (f, fontset);
       ASET (Vfontset_table, id, Qnil);
       if (id < next_fontset_id)
        next_fontset_id = face->fontset;
@@ -1096,10 +1079,11 @@ fontset_pattern_regexp (Lisp_Object pattern)
       /* If PATTERN is not full XLFD we convert "*" to ".*".  Otherwise
         we convert "*" to "[^-]*" which is much faster in regular
         expression matching.  */
-      if (ndashes < 14)
-       p1 = regex = alloca (SBYTES (pattern) + 2 * nstars + 2 * nescs + 1);
-      else
-       p1 = regex = alloca (SBYTES (pattern) + 5 * nstars + 2 * nescs + 1);
+      ptrdiff_t regexsize = (SBYTES (pattern)
+                            + (ndashes < 14 ? 2 : 5) * nstars
+                            + 2 * nescs + 1);
+      USE_SAFE_ALLOCA;
+      p1 = regex = SAFE_ALLOCA (regexsize);
 
       *p1++ = '^';
       for (p0 = SDATA (pattern); *p0; p0++)
@@ -1127,6 +1111,7 @@ fontset_pattern_regexp (Lisp_Object pattern)
 
       Vcached_fontset_data = Fcons (build_string (SSDATA (pattern)),
                                    build_string ((char *) regex));
+      SAFE_FREE ();
     }
 
   return CACHED_FONTSET_REGEX;
@@ -1477,8 +1462,8 @@ appended.  By default, FONT-SPEC overrides the previous settings.  */)
       registry = AREF (font_spec, FONT_REGISTRY_INDEX);
       if (! NILP (registry))
        registry = Fdowncase (SYMBOL_NAME (registry));
-      encoding = find_font_encoding (concat3 (family, build_string ("-"),
-                                             registry));
+      AUTO_STRING (dash, "-");
+      encoding = find_font_encoding (concat3 (family, dash, registry));
       if (NILP (encoding))
        encoding = Qascii;
 
@@ -1590,7 +1575,7 @@ appended.  By default, FONT-SPEC overrides the previous settings.  */)
 
   if (ascii_changed)
     {
-      Lisp_Object tail, fr, alist;
+      Lisp_Object tail, fr;
       int fontset_id = XINT (FONTSET_ID (fontset));
 
       set_fontset_ascii (fontset, fontname);
@@ -1613,8 +1598,8 @@ appended.  By default, FONT-SPEC overrides the previous settings.  */)
          if (! NILP (font_object))
            {
              update_auto_fontset_alist (font_object, fontset);
-             alist = list1 (Fcons (Qfont, Fcons (name, font_object)));
-             Fmodify_frame_parameters (fr, alist);
+             AUTO_FRAME_ARG (arg, Qfont, Fcons (name, font_object));
+             Fmodify_frame_parameters (fr, arg);
            }
        }
     }
@@ -1909,7 +1894,9 @@ format is the same as above.  */)
 
   /* Recode fontsets realized on FRAME from the base fontset FONTSET
      in the table `realized'.  */
-  realized[0] = alloca (word_size * ASIZE (Vfontset_table));
+  USE_SAFE_ALLOCA;
+  SAFE_ALLOCA_LISP (realized[0], 2 * ASIZE (Vfontset_table));
+  realized[1] = realized[0] + ASIZE (Vfontset_table);
   for (i = j = 0; i < ASIZE (Vfontset_table); i++)
     {
       elt = FONTSET_FROM_ID (i);
@@ -1920,7 +1907,6 @@ format is the same as above.  */)
     }
   realized[0][j] = Qnil;
 
-  realized[1] = alloca (word_size * ASIZE (Vfontset_table));
   for (i = j = 0; ! NILP (realized[0][i]); i++)
     {
       elt = FONTSET_DEFAULT (realized[0][i]);
@@ -2012,6 +1998,7 @@ format is the same as above.  */)
        break;
     }
 
+  SAFE_FREE ();
   return tables[0];
 }
 
@@ -2163,7 +2150,7 @@ void
 syms_of_fontset (void)
 {
   DEFSYM (Qfontset, "fontset");
-  Fput (Qfontset, Qchar_table_extra_slots, make_number (9));
+  Fput (Qfontset, Qchar_table_extra_slots, make_number (8));
   DEFSYM (Qfontset_info, "fontset-info");
   Fput (Qfontset_info, Qchar_table_extra_slots, make_number (1));
 
index e894d218df7e939014bd16dbafde041e40ebbff9..8fac06e2af7d122564e3ade342b2373ae516c754 100644 (file)
@@ -51,6 +51,9 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "msdos.h"
 #include "dosfns.h"
 #endif
+#ifdef USE_X_TOOLKIT
+#include "widget.h"
+#endif
 
 #ifdef HAVE_NS
 Lisp_Object Qns_parse_geometry;
@@ -75,7 +78,6 @@ Lisp_Object Qauto_raise, Qauto_lower;
 Lisp_Object Qborder_color, Qborder_width;
 Lisp_Object Qcursor_color, Qcursor_type;
 Lisp_Object Qheight, Qwidth;
-Lisp_Object Qleft, Qright;
 Lisp_Object Qicon_left, Qicon_top, Qicon_type, Qicon_name;
 Lisp_Object Qtooltip;
 Lisp_Object Qinternal_border_width;
@@ -83,6 +85,7 @@ Lisp_Object Qright_divider_width, Qbottom_divider_width;
 Lisp_Object Qmouse_color;
 Lisp_Object Qminibuffer;
 Lisp_Object Qscroll_bar_width, Qvertical_scroll_bars;
+Lisp_Object Qscroll_bar_height, Qhorizontal_scroll_bars;
 Lisp_Object Qvisibility;
 Lisp_Object Qscroll_bar_foreground, Qscroll_bar_background;
 Lisp_Object Qscreen_gamma;
@@ -114,7 +117,7 @@ Lisp_Object Qface_set_after_frame_default;
 static Lisp_Object Qfocus_in_hook;
 static Lisp_Object Qfocus_out_hook;
 static Lisp_Object Qdelete_frame_functions;
-
+static Lisp_Object Qframe_windows_min_size;
 static Lisp_Object Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource;
 
 /* The currently selected frame.  */
@@ -163,19 +166,16 @@ decode_any_frame (register Lisp_Object frame)
   return XFRAME (frame);
 }
 
+#ifdef HAVE_WINDOW_SYSTEM
+
 bool
 window_system_available (struct frame *f)
 {
-  if (f)
-    return FRAME_WINDOW_P (f) || FRAME_MSDOS_P (f);
-  else
-#ifdef HAVE_WINDOW_SYSTEM
-    return x_display_list != NULL;
-#else
-    return 0;
-#endif
+  return f ? FRAME_WINDOW_P (f) || FRAME_MSDOS_P (f) : x_display_list != NULL;
 }
 
+#endif /* HAVE_WINDOW_SYSTEM */
+
 struct frame *
 decode_window_system_frame (Lisp_Object frame)
 {
@@ -194,30 +194,32 @@ check_window_system (struct frame *f)
           : "Window system is not in use or not initialized");
 }
 
-static void
-set_menu_bar_lines_1 (Lisp_Object window, int n)
+/* Return the value of frame parameter PROP in frame FRAME.  */
+
+Lisp_Object
+get_frame_param (register struct frame *frame, Lisp_Object prop)
 {
-  struct window *w = XWINDOW (window);
-  struct frame *f = XFRAME (WINDOW_FRAME (w));
-
-  w->top_line += n;
-  w->pixel_top += n * FRAME_LINE_HEIGHT (f);
-  w->total_lines -= n;
-  w->pixel_height -= n * FRAME_LINE_HEIGHT (f);
-
-  /* Handle just the top child in a vertical split.  */
-  if (WINDOW_VERTICAL_COMBINATION_P (w))
-    set_menu_bar_lines_1 (w->contents, n);
-  else if (WINDOW_HORIZONTAL_COMBINATION_P (w))
-    /* Adjust all children in a horizontal split.  */
-    for (window = w->contents; !NILP (window); window = w->next)
-      {
-       w = XWINDOW (window);
-       set_menu_bar_lines_1 (window, n);
-      }
+  register Lisp_Object tem;
+
+  tem = Fassq (prop, frame->param_alist);
+  if (EQ (tem, Qnil))
+    return tem;
+  return Fcdr (tem);
 }
 
-void
+/* Return 1 if `frame-inhibit-implied-resize' is non-nil or fullscreen
+   state of frame F would be affected by a vertical (horizontal if
+   HORIZONTAL is true) resize.  */
+bool
+frame_inhibit_resize (struct frame *f, bool horizontal)
+{
+
+  return (frame_inhibit_implied_resize
+         || !NILP (get_frame_param (f, Qfullscreen))
+         || FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f));
+}
+
+static void
 set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
 {
   int nlines;
@@ -238,11 +240,11 @@ set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
   if (nlines != olines)
     {
       windows_or_buffers_changed = 14;
-      FRAME_WINDOW_SIZES_CHANGED (f) = 1;
       FRAME_MENU_BAR_LINES (f) = nlines;
       FRAME_MENU_BAR_HEIGHT (f) = nlines * FRAME_LINE_HEIGHT (f);
-      set_menu_bar_lines_1 (f->root_window, nlines - olines);
-      adjust_frame_glyphs (f);
+      change_frame_size (f, FRAME_COLS (f),
+                        FRAME_LINES (f) + olines - nlines,
+                        0, 1, 0, 0);
     }
 }
 \f
@@ -325,6 +327,247 @@ predicates which report frame's specific UI-related capabilities.  */)
     return type;
 }
 
+static int
+frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal, Lisp_Object pixelwise)
+{
+  return XINT (call3 (Qframe_windows_min_size, frame, horizontal, pixelwise));
+}
+
+
+/* Make sure windows sizes of frame F are OK.  new_width and new_height
+   are in pixels.  A value of -1 means no change is requested for that
+   size (but the frame may still have to be resized to accommodate
+   windows with their minimum sizes.
+
+   The argument INHIBIT can assume the following values:
+
+   0 means to unconditionally call x_set_window_size even if sizes
+   apparently do not change.  Fx_create_frame uses this to pass the
+   initial size to the window manager.
+
+   1 means to call x_set_window_size iff the pixel size really changes.
+   Fset_frame_size, Fset_frame_height, ... use this.
+
+   2 means to unconditionally call x_set_window_size provided
+   frame_inhibit_resize allows it.  The menu bar code uses this.
+
+   3 means call x_set_window_size iff window minimum sizes must be
+   preserved or frame_inhibit_resize allows it, x_set_left_fringe,
+   x_set_scroll_bar_width, ... use this.
+
+   4 means call x_set_window_size iff window minimum sizes must be
+   preserved.  x_set_tool_bar_lines, x_set_right_divider_width, ... use
+   this.  BUT maybe the toolbar code shouldn't ....
+
+   5 means to never call x_set_window_size.  change_frame_size uses
+   this.
+
+   For 2 and 3 note that if frame_inhibit_resize inhibits resizing and
+   minimum sizes are not violated no internal resizing takes place
+   either.  For 2, 3, 4 and 5 note that even if no x_set_window_size
+   call is issued, window sizes may have to be adjusted in order to
+   support minimum size constraints for the frame's windows.
+
+   PRETEND is as for change_frame_size.  */
+void
+adjust_frame_size (struct frame *f, int new_width, int new_height, int inhibit, bool pretend)
+{
+  int unit_width = FRAME_COLUMN_WIDTH (f);
+  int unit_height = FRAME_LINE_HEIGHT (f);
+  int old_pixel_width = FRAME_PIXEL_WIDTH (f);
+  int old_pixel_height = FRAME_PIXEL_HEIGHT (f);
+  int new_pixel_width, new_pixel_height;
+  /* The following two values are calculated from the old frame pixel
+     sizes and any "new" settings for tool bar, menu bar and internal
+     borders.  We do it this way to detect whether we have to call
+     x_set_window_size as consequence of the new settings.  */
+  int windows_width = FRAME_WINDOWS_WIDTH (f);
+  int windows_height = FRAME_WINDOWS_HEIGHT (f);
+  int min_windows_width, min_windows_height;
+  /* These are a bit tedious, maybe we should use a macro.  */
+  struct window *r = XWINDOW (FRAME_ROOT_WINDOW (f));
+  int old_windows_width = WINDOW_PIXEL_WIDTH (r);
+  int old_windows_height
+    = (WINDOW_PIXEL_HEIGHT (r)
+       + (FRAME_HAS_MINIBUF_P (f)
+         ? WINDOW_PIXEL_HEIGHT (XWINDOW (FRAME_MINIBUF_WINDOW (f)))
+         : 0));
+  int new_windows_width, new_windows_height;
+  int old_text_width = FRAME_TEXT_WIDTH (f);
+  int old_text_height = FRAME_TEXT_HEIGHT (f);
+  /* If a size is < 0 use the old value.  */
+  int new_text_width = (new_width >= 0) ? new_width : old_text_width;
+  int new_text_height = (new_height >= 0) ? new_height : old_text_height;
+  int new_cols, new_lines;
+  bool inhibit_horizontal, inhibit_vertical;
+  Lisp_Object frame;
+
+  XSETFRAME (frame, f);
+  /* The following two values are calculated from the old window body
+     sizes and any "new" settings for scroll bars, dividers, fringes and
+     margins (though the latter should have been processed already).  */
+  min_windows_width = frame_windows_min_size (frame, Qt, Qt);
+  min_windows_height = frame_windows_min_size (frame, Qnil, Qt);
+
+  if (inhibit >= 2 && inhibit <= 4)
+    /* If INHIBIT is in [2..4] inhibit if the "old" window sizes stay
+       within the limits and either frame_inhibit_resize tells us to do
+       so or INHIBIT equals 4.  */
+    {
+      inhibit_horizontal = ((windows_width >= min_windows_width
+                            && (inhibit == 4 || frame_inhibit_resize (f, true)))
+                           ? true : false);
+      inhibit_vertical = ((windows_height >= min_windows_height
+                          && (inhibit == 4 || frame_inhibit_resize (f, false)))
+                         ? true : false);
+    }
+  else
+    /* Otherwise inhibit if INHIBIT equals 5.  */
+    inhibit_horizontal = inhibit_vertical = inhibit == 5;
+
+  new_pixel_width = ((inhibit_horizontal && (inhibit < 5))
+                    ? old_pixel_width
+                    : max (FRAME_TEXT_TO_PIXEL_WIDTH (f, new_text_width),
+                           min_windows_width
+                           + 2 * FRAME_INTERNAL_BORDER_WIDTH (f)));
+  new_windows_width = new_pixel_width - 2 * FRAME_INTERNAL_BORDER_WIDTH (f);
+  new_text_width = FRAME_PIXEL_TO_TEXT_WIDTH (f, new_pixel_width);
+  new_cols = new_text_width / unit_width;
+
+  new_pixel_height = ((inhibit_vertical && (inhibit < 5))
+                     ? old_pixel_height
+                     : max (FRAME_TEXT_TO_PIXEL_HEIGHT (f, new_text_height),
+                            min_windows_height
+                            + FRAME_TOP_MARGIN_HEIGHT (f)
+                            + 2 * FRAME_INTERNAL_BORDER_WIDTH (f)));
+  new_windows_height = (new_pixel_height
+                       - FRAME_TOP_MARGIN_HEIGHT (f)
+                       - 2 * FRAME_INTERNAL_BORDER_WIDTH (f));
+  new_text_height = FRAME_PIXEL_TO_TEXT_HEIGHT (f, new_pixel_height);
+  new_lines = new_text_height / unit_height;
+
+#ifdef HAVE_WINDOW_SYSTEM
+  if (FRAME_WINDOW_P (f)
+      && f->official
+      && ((!inhibit_horizontal
+          && (new_pixel_width != old_pixel_width
+              || inhibit == 0 || inhibit == 2))
+         || (!inhibit_vertical
+             && (new_pixel_height != old_pixel_height
+                 || inhibit == 0 || inhibit == 2))))
+    /* We are either allowed to change the frame size or the minimum
+       sizes request such a change.  Do not care for fixing minimum
+       sizes here, we do that eventually when we're called from
+       change_frame_size.  */
+    {
+      /* Make sure we respect fullheight and fullwidth.  */
+      if (inhibit_horizontal)
+       new_text_width = old_text_width;
+      else if (inhibit_vertical)
+       new_text_height = old_text_height;
+
+      x_set_window_size (f, 0, new_text_width, new_text_height, 1);
+      f->resized_p = true;
+
+      return;
+    }
+#endif
+
+  if (new_text_width == old_text_width
+      && new_text_height == old_text_height
+      && new_windows_width == old_windows_width
+      && new_windows_height == old_windows_height
+      && new_pixel_width == old_pixel_width
+      && new_pixel_height == old_pixel_height)
+    /* No change.  Sanitize window sizes and return.  */
+    {
+      sanitize_window_sizes (frame, Qt);
+      sanitize_window_sizes (frame, Qnil);
+
+      return;
+    }
+
+  block_input ();
+
+#ifdef MSDOS
+  /* We only can set screen dimensions to certain values supported
+     by our video hardware.  Try to find the smallest size greater
+     or equal to the requested dimensions.  */
+  dos_set_window_size (&new_lines, &new_cols);
+#endif
+
+  if (new_windows_width != old_windows_width)
+    {
+      resize_frame_windows (f, new_windows_width, 1, 1);
+
+      /* MSDOS frames cannot PRETEND, as they change frame size by
+        manipulating video hardware.  */
+      if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f))
+       FrameCols (FRAME_TTY (f)) = new_cols;
+
+#if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS)
+      if (WINDOWP (f->tool_bar_window))
+       {
+         XWINDOW (f->tool_bar_window)->pixel_width = new_windows_width;
+         XWINDOW (f->tool_bar_window)->total_cols
+           = new_windows_width / unit_width;
+       }
+#endif
+    }
+
+  if (new_windows_height != old_windows_height
+      /* When the top margin has changed we have to recalculate the top
+        edges of all windows.  No such calculation is necessary for the
+        left edges.  */
+      || WINDOW_TOP_PIXEL_EDGE (r) != FRAME_TOP_MARGIN_HEIGHT (f))
+    {
+      resize_frame_windows (f, new_windows_height, 0, 1);
+
+      /* MSDOS frames cannot PRETEND, as they change frame size by
+        manipulating video hardware.  */
+      if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f))
+       FrameRows (FRAME_TTY (f)) = new_lines + FRAME_TOP_MARGIN (f);
+    }
+
+  /* Assign new sizes.  */
+  FRAME_TEXT_WIDTH (f) = new_text_width;
+  FRAME_TEXT_HEIGHT (f) = new_text_height;
+  FRAME_PIXEL_WIDTH (f) = new_pixel_width;
+  FRAME_PIXEL_HEIGHT (f) = new_pixel_height;
+  SET_FRAME_COLS (f, new_cols);
+  SET_FRAME_LINES (f, new_lines);
+
+  {
+    struct window *w = XWINDOW (FRAME_SELECTED_WINDOW (f));
+    int text_area_x, text_area_y, text_area_width, text_area_height;
+
+    window_box (w, TEXT_AREA, &text_area_x, &text_area_y, &text_area_width,
+               &text_area_height);
+    if (w->cursor.x >= text_area_x + text_area_width)
+      w->cursor.hpos = w->cursor.x = 0;
+    if (w->cursor.y >= text_area_y + text_area_height)
+      w->cursor.vpos = w->cursor.y = 0;
+  }
+
+  /* Sanitize window sizes.  */
+  sanitize_window_sizes (frame, Qt);
+  sanitize_window_sizes (frame, Qnil);
+
+  adjust_frame_glyphs (f);
+  calculate_costs (f);
+  SET_FRAME_GARBAGED (f);
+
+  /* A frame was "resized" if one of its pixelsizes changed, even if its
+     X window wasn't resized at all.  */
+  f->resized_p = (new_pixel_width != old_pixel_width
+                 || new_pixel_height != old_pixel_height);
+
+  unblock_input ();
+
+  run_window_configuration_change_hook (f);
+}
+
+
 struct frame *
 make_frame (bool mini_p)
 {
@@ -337,9 +580,11 @@ make_frame (bool mini_p)
   f = allocate_frame ();
   XSETFRAME (frame, f);
 
+#ifdef USE_GTK
   /* Initialize Lisp data.  Note that allocate_frame initializes all
      Lisp data to nil, so do it only for slots which should not be nil.  */
   fset_tool_bar_position (f, Qtop);
+#endif
 
   /* Initialize non-Lisp data.  Note that allocate_frame zeroes out all
      non-Lisp data, so do it only for slots which should not be zero.
@@ -348,11 +593,16 @@ make_frame (bool mini_p)
   f->wants_modeline = true;
   f->redisplay = true;
   f->garbaged = true;
-  f->vertical_scroll_bar_type = vertical_scroll_bar_none;
+  f->official = false;
   f->column_width = 1;  /* !FRAME_WINDOW_P value.  */
   f->line_height = 1;  /* !FRAME_WINDOW_P value.  */
 #ifdef HAVE_WINDOW_SYSTEM
+  f->vertical_scroll_bar_type = vertical_scroll_bar_none;
+  f->horizontal_scroll_bars = false;
   f->want_fullscreen = FULLSCREEN_NONE;
+#if ! defined (USE_GTK) && ! defined (HAVE_NS)
+  f->last_tool_bar_item = -1;
+#endif
 #endif
 
   root_window = make_window ();
@@ -378,10 +628,10 @@ make_frame (bool mini_p)
 
   /* 10 is arbitrary,
      just so that there is "something there."
-     Correct size will be set up later with change_frame_size.  */
+     Correct size will be set up later with adjust_frame_size.  */
 
   SET_FRAME_COLS (f, 10);
-  FRAME_LINES (f) = 10;
+  SET_FRAME_LINES (f, 10);
   SET_FRAME_WIDTH (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f));
   SET_FRAME_HEIGHT (f, FRAME_LINES (f) * FRAME_LINE_HEIGHT (f));
 
@@ -419,11 +669,15 @@ make_frame (bool mini_p)
   }
 
   if (mini_p)
-    set_window_buffer (mini_window,
-                      (NILP (Vminibuffer_list)
-                       ? get_minibuffer (0)
-                       : Fcar (Vminibuffer_list)),
-                      0, 0);
+    {
+      set_window_buffer (mini_window,
+                        (NILP (Vminibuffer_list)
+                         ? get_minibuffer (0)
+                         : Fcar (Vminibuffer_list)),
+                        0, 0);
+      /* No horizontal scroll bars in minibuffers.  */
+      wset_horizontal_scroll_bar (mw, Qnil);
+    }
 
   fset_root_window (f, root_window);
   fset_selected_window (f, root_window);
@@ -567,7 +821,10 @@ make_initial_frame (void)
   FRAME_FOREGROUND_PIXEL (f) = FACE_TTY_DEFAULT_FG_COLOR;
   FRAME_BACKGROUND_PIXEL (f) = FACE_TTY_DEFAULT_BG_COLOR;
 
-  FRAME_VERTICAL_SCROLL_BAR_TYPE (f) = vertical_scroll_bar_none;
+#ifdef HAVE_WINDOW_SYSTEM
+  f->vertical_scroll_bar_type = vertical_scroll_bar_none;
+  f->horizontal_scroll_bars = false;
+#endif
 
   /* The default value of menu-bar-mode is t.  */
   set_menu_bar_lines (f, make_number (1), Qnil);
@@ -617,9 +874,15 @@ make_terminal_frame (struct terminal *terminal)
   FRAME_BACKGROUND_PIXEL (f) = FACE_TTY_DEFAULT_BG_COLOR;
 #endif /* not MSDOS */
 
-  FRAME_VERTICAL_SCROLL_BAR_TYPE (f) = vertical_scroll_bar_none;
+#ifdef HAVE_WINDOW_SYSTEM
+  f->vertical_scroll_bar_type = vertical_scroll_bar_none;
+  f->horizontal_scroll_bars = false;
+#endif
+
   FRAME_MENU_BAR_LINES (f) = NILP (Vmenu_bar_mode) ? 0 : 1;
+  FRAME_LINES (f) = FRAME_LINES (f) - FRAME_MENU_BAR_LINES (f);
   FRAME_MENU_BAR_HEIGHT (f) = FRAME_MENU_BAR_LINES (f) * FRAME_LINE_HEIGHT (f);
+  FRAME_TEXT_HEIGHT (f) = FRAME_TEXT_HEIGHT (f) - FRAME_MENU_BAR_HEIGHT (f);
 
   /* Set the top frame to the newly created frame.  */
   if (FRAMEP (FRAME_TTY (f)->top_frame)
@@ -701,7 +964,7 @@ affects all frames on the same terminal device.  */)
     if (CONSP (terminal))
       {
         terminal = XCDR (terminal);
-        t = get_terminal (terminal, 1);
+        t = decode_live_terminal (terminal);
       }
 #ifdef MSDOS
     if (t && t != the_only_display_info.terminal)
@@ -716,22 +979,24 @@ affects all frames on the same terminal device.  */)
     {
       char *name = 0, *type = 0;
       Lisp_Object tty, tty_type;
+      USE_SAFE_ALLOCA;
 
       tty = get_future_frame_param
         (Qtty, parms, (FRAME_TERMCAP_P (XFRAME (selected_frame))
                        ? FRAME_TTY (XFRAME (selected_frame))->name
                        : NULL));
       if (!NILP (tty))
-       name = xlispstrdupa (tty);
+       SAFE_ALLOCA_STRING (name, tty);
 
       tty_type = get_future_frame_param
         (Qtty_type, parms, (FRAME_TERMCAP_P (XFRAME (selected_frame))
                             ? FRAME_TTY (XFRAME (selected_frame))->type
                             : NULL));
       if (!NILP (tty_type))
-       type = xlispstrdupa (tty_type);
+       SAFE_ALLOCA_STRING (type, tty_type);
 
       t = init_tty (name, type, 0); /* Errors are not fatal.  */
+      SAFE_FREE ();
     }
 
   f = make_terminal_frame (t);
@@ -739,7 +1004,7 @@ affects all frames on the same terminal device.  */)
   {
     int width, height;
     get_tty_size (fileno (FRAME_TTY (f)->input), &width, &height);
-    change_frame_size (f, width, height, 0, 0, 0, 0);
+    adjust_frame_size (f, width, height - FRAME_MENU_BAR_LINES (f), 5, 0);
   }
 
   adjust_frame_glyphs (f);
@@ -870,8 +1135,8 @@ do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object nor
             frame's data.  */
          if (FRAME_COLS (f) != FrameCols (tty))
            FrameCols (tty) = FRAME_COLS (f);
-         if (FRAME_LINES (f) != FrameRows (tty))
-           FrameRows (tty) = FRAME_LINES (f);
+         if (FRAME_TOTAL_LINES (f) != FrameRows (tty))
+           FrameRows (tty) = FRAME_TOTAL_LINES (f);
        }
       tty->top_frame = frame;
     }
@@ -1365,7 +1630,9 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
   fset_buried_buffer_list (f, Qnil);
 
   free_font_driver_list (f);
+#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI)
   xfree (f->namebuf);
+#endif
   xfree (f->decode_mode_spec_buffer);
   xfree (FRAME_INSERT_COST (f));
   xfree (FRAME_DELETEN_COST (f));
@@ -1608,6 +1875,42 @@ and nil for X and Y.  */)
   RETURN_UNGCPRO (retval);
 }
 
+#ifdef HAVE_WINDOW_SYSTEM
+
+/* On frame F, convert character coordinates X and Y to pixel
+   coordinates *PIX_X and *PIX_Y.  */
+
+static void
+frame_char_to_pixel_position (struct frame *f, int x, int y,
+                             int *pix_x, int *pix_y)
+{
+  *pix_x = FRAME_COL_TO_PIXEL_X (f, x) + FRAME_COLUMN_WIDTH (f) / 2;
+  *pix_y = FRAME_LINE_TO_PIXEL_Y (f, y) + FRAME_LINE_HEIGHT (f) / 2;
+
+  if (*pix_x < 0)
+    *pix_x = 0;
+  if (*pix_x > FRAME_PIXEL_WIDTH (f))
+    *pix_x = FRAME_PIXEL_WIDTH (f);
+
+  if (*pix_y < 0)
+    *pix_y = 0;
+  if (*pix_y > FRAME_PIXEL_HEIGHT (f))
+    *pix_y = FRAME_PIXEL_HEIGHT (f);
+}
+
+/* On frame F, reposition mouse pointer to character coordinates X and Y.  */
+
+static void
+frame_set_mouse_position (struct frame *f, int x, int y)
+{
+  int pix_x, pix_y;
+
+  frame_char_to_pixel_position (f, x, y, &pix_x, &pix_y);
+  frame_set_mouse_pixel_position (f, pix_x, pix_y);
+}
+
+#endif /* HAVE_WINDOW_SYSTEM */
+
 DEFUN ("set-mouse-position", Fset_mouse_position, Sset_mouse_position, 3, 3, 0,
        doc: /* Move the mouse pointer to the center of character cell (X,Y) in FRAME.
 Coordinates are relative to the frame, not a window,
@@ -1633,7 +1936,7 @@ before calling this function on it, like this.
 #ifdef HAVE_WINDOW_SYSTEM
   if (FRAME_WINDOW_P (XFRAME (frame)))
     /* Warping the mouse will cause enternotify and focus events.  */
-    x_set_mouse_position (XFRAME (frame), XINT (x), XINT (y));
+    frame_set_mouse_position (XFRAME (frame), XINT (x), XINT (y));
 #else
 #if defined (MSDOS)
   if (FRAME_MSDOS_P (XFRAME (frame)))
@@ -1674,7 +1977,7 @@ before calling this function on it, like this.
 #ifdef HAVE_WINDOW_SYSTEM
   if (FRAME_WINDOW_P (XFRAME (frame)))
     /* Warping the mouse will cause enternotify and focus events.  */
-    x_set_mouse_pixel_position (XFRAME (frame), XINT (x), XINT (y));
+    frame_set_mouse_pixel_position (XFRAME (frame), XINT (x), XINT (y));
 #else
 #if defined (MSDOS)
   if (FRAME_MSDOS_P (XFRAME (frame)))
@@ -1942,24 +2245,6 @@ If there is no window system support, this function does nothing.  */)
 }
 
 \f
-/* Return the value of frame parameter PROP in frame FRAME.  */
-
-#ifdef HAVE_WINDOW_SYSTEM
-#if !HAVE_NS && !HAVE_NTGUI
-static
-#endif
-Lisp_Object
-get_frame_param (register struct frame *frame, Lisp_Object prop)
-{
-  register Lisp_Object tem;
-
-  tem = Fassq (prop, frame->param_alist);
-  if (EQ (tem, Qnil))
-    return tem;
-  return Fcdr (tem);
-}
-#endif
-
 /* Discard BUFFER from the buffer-list and buried-buffer-list of each frame.  */
 
 void
@@ -2043,20 +2328,6 @@ set_term_frame_name (struct frame *f, Lisp_Object name)
   update_mode_lines = 16;
 }
 
-#ifdef HAVE_NTGUI
-void
-set_frame_param (struct frame *f, Lisp_Object prop, Lisp_Object val)
-{
-  register Lisp_Object old_alist_elt;
-
-  old_alist_elt = Fassq (prop, f->param_alist);
-  if (EQ (old_alist_elt, Qnil))
-    fset_param_alist (f, Fcons (Fcons (prop, val), f->param_alist));
-  else
-    Fsetcdr (old_alist_elt, val);
-}
-#endif
-
 void
 store_frame_param (struct frame *f, Lisp_Object prop, Lisp_Object val)
 {
@@ -2148,6 +2419,18 @@ store_frame_param (struct frame *f, Lisp_Object prop, Lisp_Object val)
     }
 }
 
+/* Return color matches UNSPEC on frame F or nil if UNSPEC
+   is not an unspecified foreground or background color.  */
+
+static Lisp_Object
+frame_unspecified_color (struct frame *f, Lisp_Object unspec)
+{
+  return (!strncmp (SSDATA (unspec), unspecified_bg, SBYTES (unspec))
+         ? tty_color_name (f, FRAME_BACKGROUND_PIXEL (f))
+         : (!strncmp (SSDATA (unspec), unspecified_fg, SBYTES (unspec))
+            ? tty_color_name (f, FRAME_FOREGROUND_PIXEL (f)) : Qnil));
+}
+
 DEFUN ("frame-parameters", Fframe_parameters, Sframe_parameters, 0, 1, 0,
        doc: /* Return the parameters-alist of frame FRAME.
 It is a list of elements of the form (PARM . VALUE), where PARM is a symbol.
@@ -2168,8 +2451,6 @@ If FRAME is omitted or nil, return information on the currently selected frame.
 
   if (!FRAME_WINDOW_P (f))
     {
-      int fg = FRAME_FOREGROUND_PIXEL (f);
-      int bg = FRAME_BACKGROUND_PIXEL (f);
       Lisp_Object elt;
 
       /* If the frame's parameter alist says the colors are
@@ -2178,31 +2459,23 @@ If FRAME is omitted or nil, return information on the currently selected frame.
       elt = Fassq (Qforeground_color, alist);
       if (CONSP (elt) && STRINGP (XCDR (elt)))
        {
-         if (strncmp (SSDATA (XCDR (elt)),
-                      unspecified_bg,
-                      SCHARS (XCDR (elt))) == 0)
-           store_in_alist (&alist, Qforeground_color, tty_color_name (f, bg));
-         else if (strncmp (SSDATA (XCDR (elt)),
-                           unspecified_fg,
-                           SCHARS (XCDR (elt))) == 0)
-           store_in_alist (&alist, Qforeground_color, tty_color_name (f, fg));
+         elt = frame_unspecified_color (f, XCDR (elt));
+         if (!NILP (elt))
+           store_in_alist (&alist, Qforeground_color, elt);
        }
       else
-       store_in_alist (&alist, Qforeground_color, tty_color_name (f, fg));
+       store_in_alist (&alist, Qforeground_color,
+                       tty_color_name (f, FRAME_FOREGROUND_PIXEL (f)));
       elt = Fassq (Qbackground_color, alist);
       if (CONSP (elt) && STRINGP (XCDR (elt)))
        {
-         if (strncmp (SSDATA (XCDR (elt)),
-                      unspecified_fg,
-                      SCHARS (XCDR (elt))) == 0)
-           store_in_alist (&alist, Qbackground_color, tty_color_name (f, fg));
-         else if (strncmp (SSDATA (XCDR (elt)),
-                           unspecified_bg,
-                           SCHARS (XCDR (elt))) == 0)
-           store_in_alist (&alist, Qbackground_color, tty_color_name (f, bg));
+         elt = frame_unspecified_color (f, XCDR (elt));
+         if (!NILP (elt))
+           store_in_alist (&alist, Qbackground_color, elt);
        }
       else
-       store_in_alist (&alist, Qbackground_color, tty_color_name (f, bg));
+       store_in_alist (&alist, Qbackground_color,
+                       tty_color_name (f, FRAME_BACKGROUND_PIXEL (f)));
       store_in_alist (&alist, intern ("font"),
                      build_string (FRAME_MSDOS_P (f)
                                    ? "ms-dos"
@@ -2282,29 +2555,7 @@ If FRAME is nil, describe the currently selected frame.  */)
                 important when param_alist's notion of colors is
                 "unspecified".  We need to do the same here.  */
              if (STRINGP (value) && !FRAME_WINDOW_P (f))
-               {
-                 const char *color_name;
-                 ptrdiff_t csz;
-
-                 if (EQ (parameter, Qbackground_color))
-                   {
-                     color_name = SSDATA (value);
-                     csz = SCHARS (value);
-                     if (strncmp (color_name, unspecified_bg, csz) == 0)
-                       value = tty_color_name (f, FRAME_BACKGROUND_PIXEL (f));
-                     else if (strncmp (color_name, unspecified_fg, csz) == 0)
-                       value = tty_color_name (f, FRAME_FOREGROUND_PIXEL (f));
-                   }
-                 else if (EQ (parameter, Qforeground_color))
-                   {
-                     color_name = SSDATA (value);
-                     csz = SCHARS (value);
-                     if (strncmp (color_name, unspecified_fg, csz) == 0)
-                       value = tty_color_name (f, FRAME_FOREGROUND_PIXEL (f));
-                     else if (strncmp (color_name, unspecified_bg, csz) == 0)
-                       value = tty_color_name (f, FRAME_BACKGROUND_PIXEL (f));
-                   }
-               }
+               value = frame_unspecified_color (f, value);
            }
          else
            value = Fcdr (Fassq (parameter, Fframe_parameters (frame)));
@@ -2455,7 +2706,7 @@ to `frame-height'). */)
     return make_number (FRAME_PIXEL_HEIGHT (f));
   else
 #endif
-    return make_number (FRAME_LINES (f));
+    return make_number (FRAME_TOTAL_LINES (f));
 }
 
 DEFUN ("frame-pixel-width", Fframe_pixel_width,
@@ -2472,7 +2723,7 @@ If FRAME is omitted or nil, the selected frame is used.  */)
     return make_number (FRAME_PIXEL_WIDTH (f));
   else
 #endif
-    return make_number (FRAME_COLS (f));
+    return make_number (FRAME_TOTAL_COLS (f));
 }
 
 DEFUN ("tool-bar-pixel-width", Ftool_bar_pixel_width,
@@ -2507,12 +2758,19 @@ DEFUN ("frame-text-lines", Fframe_text_lines, Sframe_text_lines, 0, 1, 0,
 }
 
 DEFUN ("frame-total-cols", Fframe_total_cols, Sframe_total_cols, 0, 1, 0,
-       doc: /* Return total columns of FRAME.  */)
+       doc: /* Return number of total columns of FRAME.  */)
   (Lisp_Object frame)
 {
   return make_number (FRAME_TOTAL_COLS (decode_any_frame (frame)));
 }
 
+DEFUN ("frame-total-lines", Fframe_total_lines, Sframe_total_lines, 0, 1, 0,
+       doc: /* Return number of total lines of FRAME.  */)
+  (Lisp_Object frame)
+{
+  return make_number (FRAME_TOTAL_LINES (decode_any_frame (frame)));
+}
+
 DEFUN ("frame-text-width", Fframe_text_width, Sframe_text_width, 0, 1, 0,
        doc: /* Return text area width of FRAME in pixels.  */)
   (Lisp_Object frame)
@@ -2534,6 +2792,13 @@ DEFUN ("frame-scroll-bar-width", Fscroll_bar_width, Sscroll_bar_width, 0, 1, 0,
   return make_number (FRAME_SCROLL_BAR_AREA_WIDTH (decode_any_frame (frame)));
 }
 
+DEFUN ("frame-scroll-bar-height", Fscroll_bar_height, Sscroll_bar_height, 0, 1, 0,
+       doc: /* Return scroll bar height of FRAME in pixels.  */)
+  (Lisp_Object frame)
+{
+  return make_number (FRAME_SCROLL_BAR_AREA_HEIGHT (decode_any_frame (frame)));
+}
+
 DEFUN ("frame-fringe-width", Ffringe_width, Sfringe_width, 0, 1, 0,
        doc: /* Return fringe width of FRAME in pixels.  */)
   (Lisp_Object frame)
@@ -2561,7 +2826,7 @@ DEFUN ("frame-bottom-divider-width", Fbottom_divider_width, Sbottom_divider_widt
 {
   return make_number (FRAME_BOTTOM_DIVIDER_WIDTH (decode_any_frame (frame)));
 }
-\f
+
 DEFUN ("set-frame-height", Fset_frame_height, Sset_frame_height, 2, 4, 0,
        doc: /* Specify that the frame FRAME has HEIGHT text lines.
 Optional third arg PRETEND non-nil means that redisplay should use
@@ -2570,31 +2835,17 @@ not be changed.  Optional fourth argument PIXELWISE non-nil means that
 FRAME should be HEIGHT pixels high.  */)
   (Lisp_Object frame, Lisp_Object height, Lisp_Object pretend, Lisp_Object pixelwise)
 {
-  register struct frame *f = decode_live_frame (frame);
+  struct frame *f = decode_live_frame (frame);
+  int pixel_height;
 
   CHECK_TYPE_RANGED_INTEGER (int, height);
 
-  /* I think this should be done with a hook.  */
-#ifdef HAVE_WINDOW_SYSTEM
-  if (FRAME_WINDOW_P (f))
-    {
-      if (NILP (pixelwise))
-       {
-         if (XINT (height) != FRAME_LINES (f))
-           x_set_window_size (f, 1, FRAME_COLS (f), XINT (height), 0);
+  pixel_height = (!NILP (pixelwise)
+                 ? XINT (height)
+                 : XINT (height) * FRAME_LINE_HEIGHT (f));
+  if (pixel_height != FRAME_TEXT_HEIGHT (f))
+    adjust_frame_size (f, -1, pixel_height, 1, !NILP (pretend));
 
-         do_pending_window_change (0);
-       }
-      else if (XINT (height) != FRAME_TEXT_HEIGHT (f))
-       {
-         x_set_window_size (f, 1, FRAME_TEXT_WIDTH (f), XINT (height), 1);
-         do_pending_window_change (0);
-       }
-    }
-  else
-#endif
-    change_frame_size (f, 0, XINT (height), !NILP (pretend), 0, 0,
-                      NILP (pixelwise) ? 0 : 1);
   return Qnil;
 }
 
@@ -2606,31 +2857,17 @@ be changed.  Optional fourth argument PIXELWISE non-nil means that FRAME
 should be WIDTH pixels wide.  */)
   (Lisp_Object frame, Lisp_Object width, Lisp_Object pretend, Lisp_Object pixelwise)
 {
-  register struct frame *f = decode_live_frame (frame);
+  struct frame *f = decode_live_frame (frame);
+  int pixel_width;
 
   CHECK_TYPE_RANGED_INTEGER (int, width);
 
-  /* I think this should be done with a hook.  */
-#ifdef HAVE_WINDOW_SYSTEM
-  if (FRAME_WINDOW_P (f))
-    {
-      if (NILP (pixelwise))
-       {
-         if (XINT (width) != FRAME_COLS (f))
-           x_set_window_size (f, 1, XINT (width), FRAME_LINES (f), 0);
+  pixel_width = (!NILP (pixelwise)
+                ? XINT (width)
+                : XINT (width) * FRAME_COLUMN_WIDTH (f));
+  if (pixel_width != FRAME_TEXT_WIDTH (f))
+    adjust_frame_size (f, pixel_width, -1, 1, !NILP (pretend));
 
-         do_pending_window_change (0);
-       }
-      else if (XINT (width) != FRAME_TEXT_WIDTH (f))
-       {
-         x_set_window_size (f, 1, XINT (width), FRAME_TEXT_HEIGHT (f), 1);
-         do_pending_window_change (0);
-       }
-    }
-  else
-#endif
-    change_frame_size (f, XINT (width), 0, !NILP (pretend), 0, 0,
-                      NILP (pixelwise) ? 0 : 1);
   return Qnil;
 }
 
@@ -2639,32 +2876,22 @@ DEFUN ("set-frame-size", Fset_frame_size, Sset_frame_size, 3, 4, 0,
 Optional argument PIXELWISE non-nil means to measure in pixels.  */)
   (Lisp_Object frame, Lisp_Object width, Lisp_Object height, Lisp_Object pixelwise)
 {
-  register struct frame *f = decode_live_frame (frame);
+  struct frame *f = decode_live_frame (frame);
+  int pixel_width, pixel_height;
 
   CHECK_TYPE_RANGED_INTEGER (int, width);
   CHECK_TYPE_RANGED_INTEGER (int, height);
 
-  /* I think this should be done with a hook.  */
-#ifdef HAVE_WINDOW_SYSTEM
-  if (FRAME_WINDOW_P (f))
-    {
-      if (!NILP (pixelwise)
-         ? (XINT (width) != FRAME_TEXT_WIDTH (f)
-            || XINT (height) != FRAME_TEXT_HEIGHT (f)
-            || f->new_height || f->new_width)
-         : (XINT (width) != FRAME_COLS (f)
-            || XINT (height) != FRAME_LINES (f)
-            || f->new_height || f->new_width))
-       {
-         x_set_window_size (f, 1, XINT (width), XINT (height),
-                            NILP (pixelwise) ? 0 : 1);
-         do_pending_window_change (0);
-       }
-    }
-  else
-#endif
-    change_frame_size (f, XINT (width), XINT (height), 0, 0, 0,
-                      NILP (pixelwise) ? 0 : 1);
+  pixel_width = (!NILP (pixelwise)
+                ? XINT (width)
+                : XINT (width) * FRAME_COLUMN_WIDTH (f));
+  pixel_height = (!NILP (pixelwise)
+                 ? XINT (height)
+                 : XINT (height) * FRAME_LINE_HEIGHT (f));
+
+  if (pixel_width != FRAME_TEXT_WIDTH (f)
+      || pixel_height != FRAME_TEXT_HEIGHT (f))
+    adjust_frame_size (f, pixel_width, pixel_height, 1, 0);
 
   return Qnil;
 }
@@ -2729,9 +2956,11 @@ static const struct frame_parm_table frame_parms[] =
   {"mouse-color",              &Qmouse_color},
   {"name",                     &Qname},
   {"scroll-bar-width",         &Qscroll_bar_width},
+  {"scroll-bar-height",                &Qscroll_bar_height},
   {"title",                    &Qtitle},
   {"unsplittable",             &Qunsplittable},
   {"vertical-scroll-bars",     &Qvertical_scroll_bars},
+  {"horizontal-scroll-bars",   &Qhorizontal_scroll_bars},
   {"visibility",               &Qvisibility},
   {"tool-bar-lines",           &Qtool_bar_lines},
   {"scroll-bar-foreground",    &Qscroll_bar_foreground},
@@ -2748,52 +2977,6 @@ static const struct frame_parm_table frame_parms[] =
   {"tool-bar-position",                &Qtool_bar_position},
 };
 
-#ifdef HAVE_NTGUI
-
-/* Calculate fullscreen size.  Return in *TOP_POS and *LEFT_POS the
-   wanted positions of the WM window (not Emacs window).
-   Return in *WIDTH and *HEIGHT the wanted width and height of Emacs
-   window (FRAME_X_WINDOW).
- */
-
-void
-x_fullscreen_adjust (struct frame *f, int *width, int *height, int *top_pos, int *left_pos)
-{
-  int newwidth = FRAME_COLS (f);
-  int newheight = FRAME_LINES (f);
-  Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
-
-  *top_pos = f->top_pos;
-  *left_pos = f->left_pos;
-
-  if (f->want_fullscreen & FULLSCREEN_HEIGHT)
-    {
-      int ph;
-
-      ph = x_display_pixel_height (dpyinfo);
-      newheight = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, ph);
-      ph = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, newheight) - f->y_pixels_diff;
-      newheight = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, ph);
-      *top_pos = 0;
-    }
-
-  if (f->want_fullscreen & FULLSCREEN_WIDTH)
-    {
-      int pw;
-
-      pw = x_display_pixel_width (dpyinfo);
-      newwidth = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, pw);
-      pw = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, newwidth) - f->x_pixels_diff;
-      newwidth = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, pw);
-      *left_pos = 0;
-    }
-
-  *width = newwidth;
-  *height = newheight;
-}
-
-#endif /* HAVE_NTGUI */
-
 #ifdef HAVE_WINDOW_SYSTEM
 
 /* Change the parameters of frame F as specified by ALIST.
@@ -2810,7 +2993,7 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
   /* If both of these parameters are present, it's more efficient to
      set them both at once.  So we wait until we've looked at the
      entire list before we set them.  */
-  int width = 0, height = 0;
+  int width IF_LINT (= 0), height IF_LINT (= 0);
   bool width_change = 0, height_change = 0;
 
   /* Same here.  */
@@ -2827,14 +3010,14 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
 #ifdef HAVE_X_WINDOWS
   bool icon_left_no_change = 0, icon_top_no_change = 0;
 #endif
-  struct gcpro gcpro1, gcpro2;
 
   i = 0;
   for (tail = alist; CONSP (tail); tail = XCDR (tail))
     i++;
 
-  parms = alloca (i * sizeof *parms);
-  values = alloca (i * sizeof *values);
+  USE_SAFE_ALLOCA;
+  SAFE_ALLOCA_LISP (parms, 2 * i);
+  values = parms + i;
 
   /* Extract parm names and values into those vectors.  */
 
@@ -2851,10 +3034,6 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
   /* TAIL and ALIST are not used again below here.  */
   alist = tail = Qnil;
 
-  GCPRO2 (*parms, *values);
-  gcpro1.nvars = i;
-  gcpro2.nvars = i;
-
   /* There is no need to gcpro LEFT, TOP, ICON_LEFT, or ICON_TOP,
      because their values appear in VALUES and strings are not valid.  */
   top = left = Qunbound;
@@ -2883,8 +3062,7 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
 
              param_index = Fget (prop, Qx_frame_parameter);
              if (NATNUMP (param_index)
-                 && (XFASTINT (param_index)
-                     < sizeof (frame_parms)/sizeof (frame_parms[0]))
+                 && XFASTINT (param_index) < ARRAYELTS (frame_parms)
                   && FRAME_RIF (f)->frame_parm_handlers[XINT (param_index)])
                 (*(FRAME_RIF (f)->frame_parm_handlers[XINT (param_index)])) (f, val, old_value);
            }
@@ -2932,8 +3110,7 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
 
          param_index = Fget (prop, Qx_frame_parameter);
          if (NATNUMP (param_index)
-             && (XFASTINT (param_index)
-                 < sizeof (frame_parms)/sizeof (frame_parms[0]))
+             && XFASTINT (param_index) < ARRAYELTS (frame_parms)
              && FRAME_RIF (f)->frame_parm_handlers[XINT (param_index)])
            (*(FRAME_RIF (f)->frame_parm_handlers[XINT (param_index)])) (f, val, old_value);
        }
@@ -2988,15 +3165,11 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
   {
     Lisp_Object frame;
 
-    /* Make this 1, eventually.  */
-    check_frame_size (f, &width, &height, 1);
-
     XSETFRAME (frame, f);
 
-    if ((width_change || height_change)
-        && (width != FRAME_TEXT_WIDTH (f)
-            || height != FRAME_TEXT_HEIGHT (f)
-            || f->new_height || f->new_width))
+    if ((width_change && width != FRAME_TEXT_WIDTH (f))
+       || (height_change && height != FRAME_TEXT_HEIGHT (f))
+       || f->new_height || f->new_width)
       {
        /* If necessary provide default values for HEIGHT and WIDTH.  Do
           that here since otherwise a size change implied by an
@@ -3089,7 +3262,7 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
 #endif /* HAVE_X_WINDOWS */
   }
 
-  UNGCPRO;
+  SAFE_FREE ();
 }
 
 
@@ -3141,6 +3314,14 @@ x_report_frame_params (struct frame *f, Lisp_Object *alistptr)
                      for non-toolkit scroll bar.
                      ruler-mode.el depends on this.  */
                   : Qnil));
+  store_in_alist (alistptr, Qscroll_bar_height,
+                 (! FRAME_HAS_HORIZONTAL_SCROLL_BARS (f)
+                  ? make_number (0)
+                  : FRAME_CONFIG_SCROLL_BAR_HEIGHT (f) > 0
+                  ? make_number (FRAME_CONFIG_SCROLL_BAR_HEIGHT (f))
+                  /* nil means "use default height"
+                     for non-toolkit scroll bar.  */
+                  : Qnil));
   /* FRAME_X_WINDOW is not guaranteed to return an integer.  E.g., on
      MS-Windows it returns a value whose type is HANDLE, which is
      actually a pointer.  Explicit casting avoids compiler
@@ -3170,7 +3351,7 @@ x_report_frame_params (struct frame *f, Lisp_Object *alistptr)
     tem = make_natnum ((uintptr_t) FRAME_X_OUTPUT (f)->parent_desc);
   store_in_alist (alistptr, Qexplicit_name, (f->explicit_name ? Qt : Qnil));
   store_in_alist (alistptr, Qparent_id, tem);
-  store_in_alist (alistptr, Qtool_bar_position, f->tool_bar_position);
+  store_in_alist (alistptr, Qtool_bar_position, FRAME_TOOL_BAR_POSITION (f));
 }
 
 
@@ -3244,8 +3425,7 @@ x_set_screen_gamma (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu
     {
       Lisp_Object parm_index = Fget (Qbackground_color, Qx_frame_parameter);
       if (NATNUMP (parm_index)
-         && (XFASTINT (parm_index)
-             < sizeof (frame_parms)/sizeof (frame_parms[0]))
+         && XFASTINT (parm_index) < ARRAYELTS (frame_parms)
          && FRAME_RIF (f)->frame_parm_handlers[XFASTINT (parm_index)])
          (*FRAME_RIF (f)->frame_parm_handlers[XFASTINT (parm_index)])
            (f, bgcolor, Qnil);
@@ -3418,58 +3598,66 @@ x_set_font_backend (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu
     }
 }
 
-
 void
-x_set_fringe_width (struct frame *f, Lisp_Object new_value, Lisp_Object old_value)
+x_set_left_fringe (struct frame *f, Lisp_Object new_value, Lisp_Object old_value)
 {
-  compute_fringe_widths (f, 1);
-#ifdef HAVE_X_WINDOWS
-  /* Must adjust this so window managers report correct number of columns.  */
-  if (FRAME_X_WINDOW (f) != 0)
-    x_wm_set_size_hint (f, 0, 0);
-#endif
+  int unit = FRAME_COLUMN_WIDTH (f);
+  int old_width = FRAME_LEFT_FRINGE_WIDTH (f);
+  int new_width;
+
+  new_width = (RANGED_INTEGERP (-INT_MAX, new_value, INT_MAX)
+              ? eabs (XINT (new_value)) : 8);
+
+  if (new_width != old_width)
+    {
+      FRAME_LEFT_FRINGE_WIDTH (f) = new_width;
+      FRAME_FRINGE_COLS (f) /* Round up.  */
+       = (new_width + FRAME_RIGHT_FRINGE_WIDTH (f) + unit - 1) / unit;
+
+      if (FRAME_X_WINDOW (f) != 0)
+       adjust_frame_size (f, -1, -1, 3, 0);
+
+      SET_FRAME_GARBAGED (f);
+    }
 }
 
+
 void
-x_set_border_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
+x_set_right_fringe (struct frame *f, Lisp_Object new_value, Lisp_Object old_value)
 {
-  CHECK_TYPE_RANGED_INTEGER (int, arg);
+  int unit = FRAME_COLUMN_WIDTH (f);
+  int old_width = FRAME_RIGHT_FRINGE_WIDTH (f);
+  int new_width;
 
-  if (XINT (arg) == f->border_width)
-    return;
+  new_width = (RANGED_INTEGERP (-INT_MAX, new_value, INT_MAX)
+              ? eabs (XINT (new_value)) : 8);
 
-  if (FRAME_X_WINDOW (f) != 0)
-    error ("Cannot change the border width of a frame");
+  if (new_width != old_width)
+    {
+      FRAME_RIGHT_FRINGE_WIDTH (f) = new_width;
+      FRAME_FRINGE_COLS (f) /* Round up.  */
+       = (new_width + FRAME_LEFT_FRINGE_WIDTH (f) + unit - 1) / unit;
 
-  f->border_width = XINT (arg);
+      if (FRAME_X_WINDOW (f) != 0)
+       adjust_frame_size (f, -1, -1, 3, 0);
+
+      SET_FRAME_GARBAGED (f);
+    }
 }
 
+
 void
-x_set_internal_border_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
+x_set_border_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
-  int old = FRAME_INTERNAL_BORDER_WIDTH (f);
-
   CHECK_TYPE_RANGED_INTEGER (int, arg);
-  FRAME_INTERNAL_BORDER_WIDTH (f) = XINT (arg);
-  if (FRAME_INTERNAL_BORDER_WIDTH (f) < 0)
-    FRAME_INTERNAL_BORDER_WIDTH (f) = 0;
-
-#ifdef USE_X_TOOLKIT
-  if (FRAME_X_OUTPUT (f)->edit_widget)
-    widget_store_internal_border (FRAME_X_OUTPUT (f)->edit_widget);
-#endif
 
-  if (FRAME_INTERNAL_BORDER_WIDTH (f) == old)
+  if (XINT (arg) == f->border_width)
     return;
 
   if (FRAME_X_WINDOW (f) != 0)
-    {
-      x_set_window_size (f, 0, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f), 1);
-      SET_FRAME_GARBAGED (f);
-      do_pending_window_change (0);
-    }
-  else
-    SET_FRAME_GARBAGED (f);
+    error ("Cannot change the border width of a frame");
+
+  f->border_width = XINT (arg);
 }
 
 void
@@ -3481,18 +3669,13 @@ x_set_right_divider_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
   FRAME_RIGHT_DIVIDER_WIDTH (f) = XINT (arg);
   if (FRAME_RIGHT_DIVIDER_WIDTH (f) < 0)
     FRAME_RIGHT_DIVIDER_WIDTH (f) = 0;
-
-  if (FRAME_RIGHT_DIVIDER_WIDTH (f) == old)
-    return;
-
-  if (FRAME_X_WINDOW (f) != 0)
+  if (FRAME_RIGHT_DIVIDER_WIDTH (f) != old)
     {
-      x_set_window_size (f, 0, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f), 1);
+      adjust_frame_size (f, -1, -1, 4, 0);
+      adjust_frame_glyphs (f);
       SET_FRAME_GARBAGED (f);
-      do_pending_window_change (0);
     }
-  else
-    SET_FRAME_GARBAGED (f);
+
 }
 
 void
@@ -3504,18 +3687,12 @@ x_set_bottom_divider_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval
   FRAME_BOTTOM_DIVIDER_WIDTH (f) = XINT (arg);
   if (FRAME_BOTTOM_DIVIDER_WIDTH (f) < 0)
     FRAME_BOTTOM_DIVIDER_WIDTH (f) = 0;
-
-  if (FRAME_BOTTOM_DIVIDER_WIDTH (f) == old)
-    return;
-
-  if (FRAME_X_WINDOW (f) != 0)
+  if (FRAME_BOTTOM_DIVIDER_WIDTH (f) != old)
     {
-      x_set_window_size (f, 0, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f), 1);
+      adjust_frame_size (f, -1, -1, 4, 0);
+      adjust_frame_glyphs (f);
       SET_FRAME_GARBAGED (f);
-      do_pending_window_change (0);
     }
-  else
-    SET_FRAME_GARBAGED (f);
 }
 
 void
@@ -3556,7 +3733,7 @@ x_set_vertical_scroll_bars (struct frame *f, Lisp_Object arg, Lisp_Object oldval
   if ((EQ (arg, Qleft) && FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (f))
       || (EQ (arg, Qright) && FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f))
       || (NILP (arg) && FRAME_HAS_VERTICAL_SCROLL_BARS (f))
-      || (!NILP (arg) && ! FRAME_HAS_VERTICAL_SCROLL_BARS (f)))
+      || (!NILP (arg) && !FRAME_HAS_VERTICAL_SCROLL_BARS (f)))
     {
       FRAME_VERTICAL_SCROLL_BAR_TYPE (f)
        = (NILP (arg)
@@ -3576,12 +3753,33 @@ x_set_vertical_scroll_bars (struct frame *f, Lisp_Object arg, Lisp_Object oldval
         However, if the window hasn't been created yet, we shouldn't
         call x_set_window_size.  */
       if (FRAME_X_WINDOW (f))
-       x_set_window_size (f, 0, FRAME_TEXT_WIDTH (f),
-                          FRAME_TEXT_HEIGHT (f), 1);
-      do_pending_window_change (0);
+       adjust_frame_size (f, -1, -1, 3, 0);
+
+      SET_FRAME_GARBAGED (f);
     }
 }
 
+void
+x_set_horizontal_scroll_bars (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
+{
+#if USE_HORIZONTAL_SCROLL_BARS
+  if ((NILP (arg) && FRAME_HAS_HORIZONTAL_SCROLL_BARS (f))
+      || (!NILP (arg) && !FRAME_HAS_HORIZONTAL_SCROLL_BARS (f)))
+    {
+      f->horizontal_scroll_bars = NILP (arg) ? false : true;
+
+      /* We set this parameter before creating the X window for the
+        frame, so we can get the geometry right from the start.
+        However, if the window hasn't been created yet, we shouldn't
+        call x_set_window_size.  */
+      if (FRAME_X_WINDOW (f))
+       adjust_frame_size (f, -1, -1, 3, 0);
+
+      SET_FRAME_GARBAGED (f);
+    }
+#endif
+}
+
 void
 x_set_scroll_bar_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
@@ -3592,9 +3790,9 @@ x_set_scroll_bar_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
       x_set_scroll_bar_default_width (f);
 
       if (FRAME_X_WINDOW (f))
-        x_set_window_size (f, 0, FRAME_TEXT_WIDTH (f),
-                          FRAME_TEXT_HEIGHT (f), 1);
-      do_pending_window_change (0);
+       adjust_frame_size (f, -1, -1, 3, 0);
+
+      SET_FRAME_GARBAGED (f);
     }
   else if (RANGED_INTEGERP (1, arg, INT_MAX)
           && XFASTINT (arg) != FRAME_CONFIG_SCROLL_BAR_WIDTH (f))
@@ -3602,18 +3800,46 @@ x_set_scroll_bar_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
       FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = XFASTINT (arg);
       FRAME_CONFIG_SCROLL_BAR_COLS (f) = (XFASTINT (arg) + unit - 1) / unit;
       if (FRAME_X_WINDOW (f))
-       x_set_window_size (f, 0, FRAME_TEXT_WIDTH (f),
-                          FRAME_TEXT_HEIGHT (f), 1);
-      do_pending_window_change (0);
+       adjust_frame_size (f, -1, -1, 3, 0);
+
+      SET_FRAME_GARBAGED (f);
     }
 
-  /* Eventually remove the following call.  It should have been done by
-     x_set_window_size already.  */
-  change_frame_size (f, 0, 0, 0, 0, 0, 1);
   XWINDOW (FRAME_SELECTED_WINDOW (f))->cursor.hpos = 0;
   XWINDOW (FRAME_SELECTED_WINDOW (f))->cursor.x = 0;
 }
 
+void
+x_set_scroll_bar_height (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
+{
+#if USE_HORIZONTAL_SCROLL_BARS
+  int unit = FRAME_LINE_HEIGHT (f);
+
+  if (NILP (arg))
+    {
+      x_set_scroll_bar_default_height (f);
+
+      if (FRAME_X_WINDOW (f))
+       adjust_frame_size (f, -1, -1, 3, 0);
+
+      SET_FRAME_GARBAGED (f);
+    }
+  else if (RANGED_INTEGERP (1, arg, INT_MAX)
+          && XFASTINT (arg) != FRAME_CONFIG_SCROLL_BAR_HEIGHT (f))
+    {
+      FRAME_CONFIG_SCROLL_BAR_HEIGHT (f) = XFASTINT (arg);
+      FRAME_CONFIG_SCROLL_BAR_LINES (f) = (XFASTINT (arg) + unit - 1) / unit;
+      if (FRAME_X_WINDOW (f))
+       adjust_frame_size (f, -1, -1, 3, 0);
+
+      SET_FRAME_GARBAGED (f);
+    }
+
+  XWINDOW (FRAME_SELECTED_WINDOW (f))->cursor.vpos = 0;
+  XWINDOW (FRAME_SELECTED_WINDOW (f))->cursor.y = 0;
+#endif
+}
+
 void
 x_set_alpha (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
@@ -3769,10 +3995,6 @@ validate_x_resource_name (void)
 static Lisp_Object
 xrdb_get_resource (XrmDatabase rdb, Lisp_Object attribute, Lisp_Object class, Lisp_Object component, Lisp_Object subclass)
 {
-  register char *value;
-  char *name_key;
-  char *class_key;
-
   CHECK_STRING (attribute);
   CHECK_STRING (class);
 
@@ -3787,22 +4009,25 @@ xrdb_get_resource (XrmDatabase rdb, Lisp_Object attribute, Lisp_Object class, Li
 
   /* Allocate space for the components, the dots which separate them,
      and the final '\0'.  Make them big enough for the worst case.  */
-  name_key = alloca (SBYTES (Vx_resource_name)
-                    + (STRINGP (component)
-                       ? SBYTES (component) : 0)
-                    + SBYTES (attribute)
-                    + 3);
-
-  class_key = alloca (SBYTES (Vx_resource_class)
-                     + SBYTES (class)
-                     + (STRINGP (subclass)
-                        ? SBYTES (subclass) : 0)
-                     + 3);
+  ptrdiff_t name_keysize = (SBYTES (Vx_resource_name)
+                           + (STRINGP (component)
+                              ? SBYTES (component) : 0)
+                           + SBYTES (attribute)
+                           + 3);
+
+  ptrdiff_t class_keysize = (SBYTES (Vx_resource_class)
+                            + SBYTES (class)
+                            + (STRINGP (subclass)
+                               ? SBYTES (subclass) : 0)
+                            + 3);
+  USE_SAFE_ALLOCA;
+  char *name_key = SAFE_ALLOCA (name_keysize + class_keysize);
+  char *class_key = name_key + name_keysize;
 
   /* Start with emacs.FRAMENAME for the name (the specific one)
      and with `Emacs' for the class key (the general one).  */
-  strcpy (name_key, SSDATA (Vx_resource_name));
-  strcpy (class_key, SSDATA (Vx_resource_class));
+  lispstpcpy (name_key, Vx_resource_name);
+  lispstpcpy (class_key, Vx_resource_class);
 
   strcat (class_key, ".");
   strcat (class_key, SSDATA (class));
@@ -3819,7 +4044,8 @@ xrdb_get_resource (XrmDatabase rdb, Lisp_Object attribute, Lisp_Object class, Li
   strcat (name_key, ".");
   strcat (name_key, SSDATA (attribute));
 
-  value = x_get_string_resource (rdb, name_key, class_key);
+  char *value = x_get_string_resource (rdb, name_key, class_key);
+  SAFE_FREE();
 
   if (value && *value)
     return build_string (value);
@@ -3871,8 +4097,10 @@ x_get_resource_string (const char *attribute, const char *class)
 
   /* Allocate space for the components, the dots which separate them,
      and the final '\0'.  */
-  char *name_key = SAFE_ALLOCA (invocation_namelen + strlen (attribute) + 2);
-  char *class_key = alloca ((sizeof (EMACS_CLASS) - 1) + strlen (class) + 2);
+  ptrdiff_t name_keysize = invocation_namelen + strlen (attribute) + 2;
+  ptrdiff_t class_keysize = sizeof (EMACS_CLASS) - 1 + strlen (class) + 2;
+  char *name_key = SAFE_ALLOCA (name_keysize + class_keysize);
+  char *class_key = name_key + name_keysize;
 
   esprintf (name_key, "%s.%s", SSDATA (Vinvocation_name), attribute);
   sprintf (class_key, "%s.%s", EMACS_CLASS, class);
@@ -3899,7 +4127,7 @@ Lisp_Object
 x_get_arg (Display_Info *dpyinfo, Lisp_Object alist, Lisp_Object param,
           const char *attribute, const char *class, enum resource_types type)
 {
-  register Lisp_Object tem;
+  Lisp_Object tem;
 
   tem = Fassq (param, alist);
 
@@ -3925,10 +4153,9 @@ x_get_arg (Display_Info *dpyinfo, Lisp_Object alist, Lisp_Object param,
     {
       if (attribute && dpyinfo)
        {
-         tem = display_x_get_resource (dpyinfo,
-                                       build_string (attribute),
-                                       build_string (class),
-                                       Qnil, Qnil);
+         AUTO_STRING (at, attribute);
+         AUTO_STRING (cl, class);
+         tem = display_x_get_resource (dpyinfo, at, cl, Qnil, Qnil);
 
          if (NILP (tem))
            return Qunbound;
@@ -4038,7 +4265,8 @@ x_default_parameter (struct frame *f, Lisp_Object alist, Lisp_Object prop,
   tem = x_frame_get_arg (f, alist, prop, xprop, xclass, type);
   if (EQ (tem, Qunbound))
     tem = deflt;
-  x_set_frame_parameters (f, list1 (Fcons (prop, tem)));
+  AUTO_FRAME_ARG (arg, prop, tem);
+  x_set_frame_parameters (f, arg);
   return tem;
 }
 
@@ -4215,7 +4443,7 @@ On Nextstep, this just calls `ns-parse-geometry'.  */)
 long
 x_figure_window_size (struct frame *f, Lisp_Object parms, bool toolbar_p)
 {
-  register Lisp_Object tem0, tem1, tem2;
+  Lisp_Object height, width, user_size, top, left, user_position;
   long window_prompting = 0;
   Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
 
@@ -4225,58 +4453,54 @@ x_figure_window_size (struct frame *f, Lisp_Object parms, bool toolbar_p)
   SET_FRAME_WIDTH (f, DEFAULT_COLS * FRAME_COLUMN_WIDTH (f));
   SET_FRAME_COLS (f, DEFAULT_COLS);
   SET_FRAME_HEIGHT (f, DEFAULT_ROWS * FRAME_LINE_HEIGHT (f));
-  FRAME_LINES (f) = DEFAULT_ROWS;
+  SET_FRAME_LINES (f, DEFAULT_ROWS);
 
   /* Window managers expect that if program-specified
      positions are not (0,0), they're intentional, not defaults.  */
   f->top_pos = 0;
   f->left_pos = 0;
 
-  /* Ensure that old new_width and new_height will not override the
-     values set here.  */
-  /* ++KFS: This was specific to W32, but seems ok for all platforms */
-  f->new_width = f->new_height = f->new_pixelwise = 0;
+  /* Ensure that earlier new_width and new_height settings won't
+     override what we specify below.  */
+  f->new_width = f->new_height = 0;
 
-  tem0 = x_get_arg (dpyinfo, parms, Qheight, 0, 0, RES_TYPE_NUMBER);
-  tem1 = x_get_arg (dpyinfo, parms, Qwidth, 0, 0, RES_TYPE_NUMBER);
-  tem2 = x_get_arg (dpyinfo, parms, Quser_size, 0, 0, RES_TYPE_NUMBER);
-  if (! EQ (tem0, Qunbound) || ! EQ (tem1, Qunbound))
+  height = x_get_arg (dpyinfo, parms, Qheight, 0, 0, RES_TYPE_NUMBER);
+  width = x_get_arg (dpyinfo, parms, Qwidth, 0, 0, RES_TYPE_NUMBER);
+  if (!EQ (width, Qunbound) || !EQ (height, Qunbound))
     {
-      if (!EQ (tem0, Qunbound))
+      if (!EQ (width, Qunbound))
        {
-         CHECK_NUMBER (tem0);
-         if (! (0 <= XINT (tem0) && XINT (tem0) <= INT_MAX))
-           xsignal1 (Qargs_out_of_range, tem0);
-         FRAME_LINES (f) = XINT (tem0);
+         CHECK_NUMBER (width);
+         if (! (0 <= XINT (width) && XINT (width) <= INT_MAX))
+           xsignal1 (Qargs_out_of_range, width);
+
+         SET_FRAME_WIDTH (f, XINT (width) * FRAME_COLUMN_WIDTH (f));
        }
-      if (!EQ (tem1, Qunbound))
+
+      if (!EQ (height, Qunbound))
        {
-         CHECK_NUMBER (tem1);
-         if (! (0 <= XINT (tem1) && XINT (tem1) <= INT_MAX))
-           xsignal1 (Qargs_out_of_range, tem1);
-         SET_FRAME_COLS (f, XINT (tem1));
+         CHECK_NUMBER (height);
+         if (! (0 <= XINT (height) && XINT (height) <= INT_MAX))
+           xsignal1 (Qargs_out_of_range, height);
+
+         SET_FRAME_HEIGHT (f, XINT (height) * FRAME_LINE_HEIGHT (f));
        }
-      if (!NILP (tem2) && !EQ (tem2, Qunbound))
+
+      user_size = x_get_arg (dpyinfo, parms, Quser_size, 0, 0, RES_TYPE_NUMBER);
+      if (!NILP (user_size) && !EQ (user_size, Qunbound))
        window_prompting |= USSize;
       else
        window_prompting |= PSize;
     }
 
-
-  /* This used to be done _before_ calling x_figure_window_size, but
-     since the height is reset here, this was really a no-op.  I
-     assume that moving it here does what Gerd intended (although he
-     no longer can remember what that was...  ++KFS, 2003-03-25.  */
-
-  /* Add the tool-bar height to the initial frame height so that the
-     user gets a text display area of the size he specified with -g or
-     via .Xdefaults.  Later changes of the tool-bar height don't
-     change the frame size.  This is done so that users can create
-     tall Emacs frames without having to guess how tall the tool-bar
-     will get.  */
-  if (toolbar_p && FRAME_TOOL_BAR_HEIGHT (f))
+  /* Add a tool bar height to the initial frame height so that the user
+     gets a text display area of the size he specified with -g or via
+     .Xdefaults.  Later changes of the tool bar height don't change the
+     frame size.  This is done so that users can create tall Emacs
+     frames without having to guess how tall the tool bar will get.  */
+  if (toolbar_p && FRAME_TOOL_BAR_LINES (f))
     {
-      int margin, relief, bar_height;
+      int margin, relief;
 
       relief = (tool_bar_button_relief >= 0
                ? tool_bar_button_relief
@@ -4290,78 +4514,73 @@ x_figure_window_size (struct frame *f, Lisp_Object parms, bool toolbar_p)
       else
        margin = 0;
 
-      /* PXW: We should be able to not round here.  */
-      bar_height = DEFAULT_TOOL_BAR_IMAGE_HEIGHT + 2 * margin + 2 * relief;
-      FRAME_LINES (f) += (bar_height + FRAME_LINE_HEIGHT (f) - 1) / FRAME_LINE_HEIGHT (f);
+      FRAME_TOOL_BAR_HEIGHT (f)
+       = DEFAULT_TOOL_BAR_IMAGE_HEIGHT + 2 * margin + 2 * relief;
+      Vframe_initial_frame_tool_bar_height = make_number (FRAME_TOOL_BAR_HEIGHT (f));
     }
 
-  compute_fringe_widths (f, 0);
-
-  SET_FRAME_WIDTH (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f));
-  SET_FRAME_HEIGHT(f, FRAME_LINES (f) * FRAME_LINE_HEIGHT (f));
-
-  tem0 = x_get_arg (dpyinfo, parms, Qtop, 0, 0, RES_TYPE_NUMBER);
-  tem1 = x_get_arg (dpyinfo, parms, Qleft, 0, 0, RES_TYPE_NUMBER);
-  tem2 = x_get_arg (dpyinfo, parms, Quser_position, 0, 0, RES_TYPE_NUMBER);
-  if (! EQ (tem0, Qunbound) || ! EQ (tem1, Qunbound))
+  top = x_get_arg (dpyinfo, parms, Qtop, 0, 0, RES_TYPE_NUMBER);
+  left = x_get_arg (dpyinfo, parms, Qleft, 0, 0, RES_TYPE_NUMBER);
+  user_position = x_get_arg (dpyinfo, parms, Quser_position, 0, 0, RES_TYPE_NUMBER);
+  if (! EQ (top, Qunbound) || ! EQ (left, Qunbound))
     {
-      if (EQ (tem0, Qminus))
+      if (EQ (top, Qminus))
        {
          f->top_pos = 0;
          window_prompting |= YNegative;
        }
-      else if (CONSP (tem0) && EQ (XCAR (tem0), Qminus)
-              && CONSP (XCDR (tem0))
-              && RANGED_INTEGERP (-INT_MAX, XCAR (XCDR (tem0)), INT_MAX))
+      else if (CONSP (top) && EQ (XCAR (top), Qminus)
+              && CONSP (XCDR (top))
+              && RANGED_INTEGERP (-INT_MAX, XCAR (XCDR (top)), INT_MAX))
        {
-         f->top_pos = - XINT (XCAR (XCDR (tem0)));
+         f->top_pos = - XINT (XCAR (XCDR (top)));
          window_prompting |= YNegative;
        }
-      else if (CONSP (tem0) && EQ (XCAR (tem0), Qplus)
-              && CONSP (XCDR (tem0))
-              && TYPE_RANGED_INTEGERP (int, XCAR (XCDR (tem0))))
+      else if (CONSP (top) && EQ (XCAR (top), Qplus)
+              && CONSP (XCDR (top))
+              && TYPE_RANGED_INTEGERP (int, XCAR (XCDR (top))))
        {
-         f->top_pos = XINT (XCAR (XCDR (tem0)));
+         f->top_pos = XINT (XCAR (XCDR (top)));
        }
-      else if (EQ (tem0, Qunbound))
+      else if (EQ (top, Qunbound))
        f->top_pos = 0;
       else
        {
-         CHECK_TYPE_RANGED_INTEGER (int, tem0);
-         f->top_pos = XINT (tem0);
+         CHECK_TYPE_RANGED_INTEGER (int, top);
+         f->top_pos = XINT (top);
          if (f->top_pos < 0)
            window_prompting |= YNegative;
        }
 
-      if (EQ (tem1, Qminus))
+      if (EQ (left, Qminus))
        {
          f->left_pos = 0;
          window_prompting |= XNegative;
        }
-      else if (CONSP (tem1) && EQ (XCAR (tem1), Qminus)
-              && CONSP (XCDR (tem1))
-              && RANGED_INTEGERP (-INT_MAX, XCAR (XCDR (tem1)), INT_MAX))
+      else if (CONSP (left) && EQ (XCAR (left), Qminus)
+              && CONSP (XCDR (left))
+              && RANGED_INTEGERP (-INT_MAX, XCAR (XCDR (left)), INT_MAX))
        {
-         f->left_pos = - XINT (XCAR (XCDR (tem1)));
+         f->left_pos = - XINT (XCAR (XCDR (left)));
          window_prompting |= XNegative;
        }
-      else if (CONSP (tem1) && EQ (XCAR (tem1), Qplus)
-              && CONSP (XCDR (tem1))
-              && TYPE_RANGED_INTEGERP (int, XCAR (XCDR (tem1))))
+      else if (CONSP (left) && EQ (XCAR (left), Qplus)
+              && CONSP (XCDR (left))
+              && TYPE_RANGED_INTEGERP (int, XCAR (XCDR (left))))
        {
-         f->left_pos = XINT (XCAR (XCDR (tem1)));
+         f->left_pos = XINT (XCAR (XCDR (left)));
        }
-      else if (EQ (tem1, Qunbound))
+      else if (EQ (left, Qunbound))
        f->left_pos = 0;
       else
        {
-         CHECK_TYPE_RANGED_INTEGER (int, tem1);
-         f->left_pos = XINT (tem1);
+         CHECK_TYPE_RANGED_INTEGER (int, left);
+         f->left_pos = XINT (left);
          if (f->left_pos < 0)
            window_prompting |= XNegative;
        }
 
-      if (!NILP (tem2) && ! EQ (tem2, Qunbound))
+      if (!NILP (user_position) && ! EQ (user_position, Qunbound))
        window_prompting |= USPosition;
       else
        window_prompting |= PPosition;
@@ -4392,16 +4611,11 @@ x_figure_window_size (struct frame *f, Lisp_Object parms, bool toolbar_p)
 #endif /* HAVE_WINDOW_SYSTEM */
 
 void
-frame_make_pointer_invisible (void)
+frame_make_pointer_invisible (struct frame *f)
 {
   if (! NILP (Vmake_pointer_invisible))
     {
-      struct frame *f;
-      if (!FRAMEP (selected_frame) || !FRAME_LIVE_P (XFRAME (selected_frame)))
-        return;
-
-      f = SELECTED_FRAME ();
-      if (f && !f->pointer_invisible
+      if (f && FRAME_LIVE_P (f) && !f->pointer_invisible
           && FRAME_TERMINAL (f)->toggle_invisible_pointer_hook)
         {
           f->mouse_moved = 0;
@@ -4412,17 +4626,11 @@ frame_make_pointer_invisible (void)
 }
 
 void
-frame_make_pointer_visible (void)
+frame_make_pointer_visible (struct frame *f)
 {
   /* We don't check Vmake_pointer_invisible here in case the
      pointer was invisible when Vmake_pointer_invisible was set to nil.  */
-  struct frame *f;
-
-  if (!FRAMEP (selected_frame) || !FRAME_LIVE_P (XFRAME (selected_frame)))
-    return;
-
-  f = SELECTED_FRAME ();
-  if (f && f->pointer_invisible && f->mouse_moved
+  if (f && FRAME_LIVE_P (f) && f->pointer_invisible && f->mouse_moved
       && FRAME_TERMINAL (f)->toggle_invisible_pointer_hook)
     {
       FRAME_TERMINAL (f)->toggle_invisible_pointer_hook (f, 0);
@@ -4519,6 +4727,7 @@ syms_of_frame (void)
 {
   DEFSYM (Qframep, "framep");
   DEFSYM (Qframe_live_p, "frame-live-p");
+  DEFSYM (Qframe_windows_min_size, "frame-windows-min-size");
   DEFSYM (Qexplicit_name, "explicit-name");
   DEFSYM (Qheight, "height");
   DEFSYM (Qicon, "icon");
@@ -4531,8 +4740,6 @@ syms_of_frame (void)
   DEFSYM (Qicon_left, "icon-left");
   DEFSYM (Qicon_top, "icon-top");
   DEFSYM (Qtooltip, "tooltip");
-  DEFSYM (Qleft, "left");
-  DEFSYM (Qright, "right");
   DEFSYM (Quser_position, "user-position");
   DEFSYM (Quser_size, "user-size");
   DEFSYM (Qwindow_id, "window-id");
@@ -4579,7 +4786,7 @@ syms_of_frame (void)
   {
     int i;
 
-    for (i = 0; i < sizeof (frame_parms) / sizeof (frame_parms[0]); i++)
+    for (i = 0; i < ARRAYELTS (frame_parms); i++)
       {
        Lisp_Object v = intern_c_string (frame_parms[i].name);
        if (frame_parms[i].variable)
@@ -4639,7 +4846,7 @@ Setting this variable does not affect existing frames, only new ones.  */);
   Vdefault_frame_alist = Qnil;
 
   DEFVAR_LISP ("default-frame-scroll-bars", Vdefault_frame_scroll_bars,
-              doc: /* Default position of scroll bars on this window-system.  */);
+              doc: /* Default position of vertical scroll bars on this window-system.  */);
 #ifdef HAVE_WINDOW_SYSTEM
 #if defined (HAVE_NTGUI) || defined (NS_IMPL_COCOA) || (defined (USE_GTK) && defined (USE_TOOLKIT_SCROLL_BARS))
   /* MS-Windows, Mac OS X, and GTK have scroll bars on the right by
@@ -4728,6 +4935,10 @@ or call the function `tool-bar-mode'.  */);
   Vtool_bar_mode = Qnil;
 #endif
 
+  DEFVAR_LISP ("frame-initial-frame-tool-bar-height", Vframe_initial_frame_tool_bar_height,
+               doc: /* Height of tool bar of initial frame.  */);
+  Vframe_initial_frame_tool_bar_height = make_number (0);
+
   DEFVAR_KBOARD ("default-minibuffer-frame", Vdefault_minibuffer_frame,
                 doc: /* Minibufferless frames use this frame's minibuffer.
 Emacs cannot create minibufferless frames unless this is set to an
@@ -4756,11 +4967,19 @@ current values of `frame-char-height' and `frame-char-width'.  If this
 is non-nil, no rounding occurs, hence frame sizes can increase/decrease
 by one pixel.
 
-With some window managers you have to set this to non-nil in order to
-fully maximize frames.  To resize your initial frame pixelwise,
-set this option to a non-nil value in your init file.  */);
+With some window managers you may have to set this to non-nil in order
+to fully maximize frames.  To resize your initial frame pixelwise, set
+this option to a non-nil value in your init file.  */);
   frame_resize_pixelwise = 0;
 
+  DEFVAR_BOOL ("frame-inhibit-implied-resize", frame_inhibit_implied_resize,
+              doc: /* Non-nil means do not resize frame implicitly.
+If this option is nil, setting default font, menubar mode, fringe width,
+or scroll bar mode of a specific frame may resize the frame in order to
+preserve the number of columns or lines it displays.  If this option is
+non-nil, no such resizing is done.  */);
+  frame_inhibit_implied_resize = 0;
+
   staticpro (&Vframe_list);
 
   defsubr (&Sframep);
@@ -4803,9 +5022,11 @@ set this option to a non-nil value in your init file.  */);
   defsubr (&Sframe_text_cols);
   defsubr (&Sframe_text_lines);
   defsubr (&Sframe_total_cols);
+  defsubr (&Sframe_total_lines);
   defsubr (&Sframe_text_width);
   defsubr (&Sframe_text_height);
   defsubr (&Sscroll_bar_width);
+  defsubr (&Sscroll_bar_height);
   defsubr (&Sfringe_width);
   defsubr (&Sborder_width);
   defsubr (&Sright_divider_width);
index ff696df9effdb10965988a64381981328ae6998a..22f2fa7a24c35d196d68c3fe435674109867434e 100644 (file)
@@ -36,16 +36,22 @@ enum vertical_scroll_bar_type
   vertical_scroll_bar_right
 };
 
+#ifdef HAVE_WINDOW_SYSTEM
+
 enum fullscreen_type
 {
   FULLSCREEN_NONE,
-  FULLSCREEN_WIDTH     = 0x001,
-  FULLSCREEN_HEIGHT    = 0x002,
-  FULLSCREEN_BOTH      = 0x003,
-  FULLSCREEN_MAXIMIZED = 0x013,
-  FULLSCREEN_WAIT      = 0x100
+  FULLSCREEN_WIDTH     = 0x1,
+  FULLSCREEN_HEIGHT    = 0x2,
+  FULLSCREEN_BOTH      = 0x3, /* Not a typo but means "width and height".  */
+  FULLSCREEN_MAXIMIZED = 0x4,
+#ifdef HAVE_NTGUI
+  FULLSCREEN_WAIT      = 0x8
+#endif
 };
 
+#endif /* HAVE_WINDOW_SYSTEM */
+
 /* The structure representing a frame.  */
 
 struct frame
@@ -155,21 +161,41 @@ struct frame
   /* Desired and current tool-bar items.  */
   Lisp_Object tool_bar_items;
 
-  /* Where tool bar is, can be left, right, top or bottom.  The native
-     tool bar only supports top.  */
+#ifdef USE_GTK
+  /* Where tool bar is, can be left, right, top or bottom.
+     Except with GTK, the only supported position is `top'.  */
   Lisp_Object tool_bar_position;
+#endif
+
+#if defined (HAVE_XFT) || defined (HAVE_FREETYPE)
+  /* List of data specific to font-driver and frame, but common to faces.  */
+  Lisp_Object font_data;
+#endif
 
   /* Beyond here, there should be no more Lisp_Object components.  */
 
   /* Cache of realized faces.  */
   struct face_cache *face_cache;
 
+#if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS)
+  /* Tool-bar item index of the item on which a mouse button was pressed.  */
+  int last_tool_bar_item;
+#endif
+
   /* Number of elements in `menu_bar_vector' that have meaningful data.  */
   int menu_bar_items_used;
 
-  /* A buffer to hold the frame's name.  We can't use the Lisp
-     string's pointer (`name', above) because it might get relocated.  */
+#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI)
+  /* A buffer to hold the frame's name.  Since this is used by the
+     window system toolkit, we can't use the Lisp string's pointer
+     (`name', above) because it might get relocated.  */
   char *namebuf;
+#endif
+
+#ifdef USE_X_TOOLKIT
+  /* Used to pass geometry parameters to toolkit functions.  */
+  char *shell_position;
+#endif
 
   /* Glyph pool and matrix.  */
   struct glyph_pool *current_pool;
@@ -177,6 +203,8 @@ struct frame
   struct glyph_matrix *desired_matrix;
   struct glyph_matrix *current_matrix;
 
+  /* Bitfield area begins here.  Keep them together to avoid extra padding.  */
+
   /* True means that glyphs on this frame have been initialized so it can
      be used for output.  */
   bool_bf glyphs_initialized_p : 1;
@@ -218,10 +246,100 @@ struct frame
   /* True if it needs to be redisplayed.  */
   bool_bf redisplay : 1;
 
-  /* Margin at the top of the frame.  Used to display the tool-bar.  */
+#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI)    \
+    || defined (HAVE_NS) || defined (USE_GTK)
+  /* True means using a menu bar that comes from the X toolkit.  */
+  bool_bf external_menu_bar : 1;
+#endif
+
+  /* Next two bitfields are mutually exclusive.  They might both be
+     zero if the frame has been made invisible without an icon.  */
+
+  /* Nonzero if the frame is currently displayed; we check
+     it to see if we should bother updating the frame's contents.
+
+     On ttys and on Windows NT/9X, to avoid wasting effort updating
+     visible frames that are actually completely obscured by other
+     windows on the display, we bend the meaning of visible slightly:
+     if equal to 2, then the frame is obscured - we still consider
+     it to be "visible" as seen from lisp, but we don't bother
+     updating it.  */
+  unsigned visible : 2;
+
+  /* True if the frame is currently iconified.  Do not
+     set this directly, use SET_FRAME_ICONIFIED instead.  */
+  bool_bf iconified : 1;
+
+  /* True if this frame should be fully redisplayed.  Disables all
+     optimizations while rebuilding matrices and redrawing.  */
+  bool_bf garbaged : 1;
+
+  /* False means, if this frame has just one window,
+     show no modeline for that window.  */
+  bool_bf wants_modeline : 1;
+
+  /* True means raise this frame to the top of the heap when selected.  */
+  bool_bf auto_raise : 1;
+
+  /* True means lower this frame to the bottom of the stack when left.  */
+  bool_bf auto_lower : 1;
+
+  /* True if frame's root window can't be split.  */
+  bool_bf no_split : 1;
+
+  /* If this is set, then Emacs won't change the frame name to indicate
+     the current buffer, etcetera.  If the user explicitly sets the frame
+     name, this gets set.  If the user sets the name to Qnil, this is
+     cleared.  */
+  bool_bf explicit_name : 1;
+
+  /* True if size of some window on this frame has changed.  */
+  bool_bf window_sizes_changed : 1;
+
+  /* True if the mouse has moved on this display device
+     since the last time we checked.  */
+  bool_bf mouse_moved : 1;
+
+  /* True means that the pointer is invisible.  */
+  bool_bf pointer_invisible : 1;
+
+  /* True means that all windows except mini-window and
+     selected window on this frame have frozen window starts.  */
+  bool_bf frozen_window_starts : 1;
+
+  /* The output method says how the contents of this frame are
+     displayed.  It could be using termcap, or using an X window.
+     This must be the same as the terminal->type. */
+  ENUM_BF (output_method) output_method : 3;
+
+#ifdef HAVE_WINDOW_SYSTEM
+  /* See FULLSCREEN_ enum on top.  */
+  ENUM_BF (fullscreen_type) want_fullscreen : 4;
+
+  /* If not vertical_scroll_bar_none, we should actually
+     display the scroll bars of this type on this frame.  */
+  ENUM_BF (vertical_scroll_bar_type) vertical_scroll_bar_type : 2;
+
+  /* Nonzero if we should actually display horizontal scroll bars on this frame.  */
+  bool_bf horizontal_scroll_bars : 1;
+#endif /* HAVE_WINDOW_SYSTEM */
+
+  /* Whether new_height and new_width shall be interpreted
+     in pixels.  */
+  bool_bf new_pixelwise : 1;
+
+  /* True if frame has been added to Vframe_list and is henceforth
+     considered official.  For in-official frames we neither process
+     x_set_window_size requests nor do we allow running
+     window-configuration-change-hook when resizing windows.  */
+  bool_bf official : 1;
+
+  /* Bitfield area ends here.  */
+
+  /* Number of lines (rounded up) of tool bar.  REMOVE THIS  */
   int tool_bar_lines;
 
-  /* Pixel height of tool bar.  */
+  /* Height of frame internal tool bar in pixels.  */
   int tool_bar_height;
 
   int n_tool_bar_rows;
@@ -240,18 +358,22 @@ struct frame
   /* Cost of deleting n lines on this frame.  */
   int *delete_n_lines_cost;
 
-  /* Text width of this frame (excluding fringes, scroll bars and
-     internal border width) and text height (excluding internal border
-     width) in units of canonical characters.  */
+  /* Text width of this frame (excluding fringes, vertical scroll bar
+     and internal border widths) and text height (excluding menu bar,
+     tool bar, horizontal scroll bar and internal border widths) in
+     units of canonical characters.  */
   int text_cols, text_lines;
 
-  /* Total width of this frame (including fringes and scroll bars) in
+  /* Total width of this frame (including fringes, vertical scroll bar
+     and internal border widths) and total height (including menu bar,
+     tool bar, horizontal scroll bar and internal border widths) in
      units of canonical characters.  */
-  int total_cols;
+  int total_cols, total_lines;
 
-  /* Text width of this frame (excluding fringes, scroll bars and
-     internal border width) and text height (excluding internal border
-     width) in pixels.  */
+  /* Text width of this frame (excluding fringes, vertical scroll bar
+     and internal border widths) and text height (excluding menu bar,
+     tool bar, horizontal scroll bar and internal border widths) in
+     pixels.  */
   int text_width, text_height;
 
   /* New text height and width for pending size change.  0 if no change
@@ -260,14 +382,12 @@ struct frame
      text width/height of the frame.  */
   int new_width, new_height;
 
-  /* Whether new_height and new_width shall be interpreted
-     in pixels.  */
-  bool new_pixelwise;
-
   /* Pixel position of the frame window (x and y offsets in root window).  */
   int left_pos, top_pos;
 
-  /* Size of the frame window (including internal border widths) in
+  /* Total width of this frame (including fringes, vertical scroll bar
+     and internal border widths) and total height (including menu bar,
+     tool bar, horizontal scroll bar and internal border widths) in
      pixels.  */
   int pixel_width, pixel_height;
 
@@ -289,9 +409,21 @@ struct frame
      a highlighting is displayed inside the internal border.  */
   int internal_border_width;
 
-  /* Width of borders between this frame's windows.  */
-  int right_divider_width;
-  int bottom_divider_width;
+  /* Widths of dividers between this frame's windows in pixels.  */
+  int right_divider_width, bottom_divider_width;
+
+  /* Widths of fringes in pixels.  */
+  int left_fringe_width, right_fringe_width;
+
+  /* Total width of fringes reserved for drawing truncation bitmaps,
+     continuation bitmaps and alike - REMOVE THIS !!!!.    */
+  int fringe_cols;
+
+  /* Number of lines of menu bar.  */
+  int menu_bar_lines;
+
+  /* Pixel height of menubar.  */
+  int menu_bar_height;
 
   /* Canonical X unit.  Width of default font, in pixels.  */
   int column_width;
@@ -299,11 +431,6 @@ struct frame
   /* Canonical Y unit.  Height of a line, in pixels.  */
   int line_height;
 
-  /* The output method says how the contents of this frame are
-     displayed.  It could be using termcap, or using an X window.
-     This must be the same as the terminal->type. */
-  enum output_method output_method;
-
   /* The terminal device that this frame uses.  If this is NULL, then
      the frame has been deleted.  */
   struct terminal *terminal;
@@ -323,98 +450,12 @@ struct frame
 
   /* List of font-drivers available on the frame.  */
   struct font_driver_list *font_driver_list;
-  /* List of data specific to font-driver and frame, but common to
-     faces.  */
-  struct font_data_list *font_data_list;
-
-  /* Total width of fringes reserved for drawing truncation bitmaps,
-     continuation bitmaps and alike.  The width is in canonical char
-     units of the frame.  This must currently be the case because window
-     sizes aren't pixel values.  If it weren't the case, we wouldn't be
-     able to split windows horizontally nicely.  */
-  int fringe_cols;
-
-  /* The extra width (in pixels) currently allotted for fringes.  */
-  int left_fringe_width, right_fringe_width;
-
-  /* See FULLSCREEN_ enum below.  */
-  enum fullscreen_type want_fullscreen;
-
-  /* Number of lines of menu bar.  */
-  int menu_bar_lines;
-
-  /* Pixel height of menubar.  */
-  int menu_bar_height;
 
 #if defined (HAVE_X_WINDOWS)
   /* Used by x_wait_for_event when watching for an X event on this frame.  */
   int wait_event_type;
 #endif
 
-#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \
-    || defined (HAVE_NS) || defined (USE_GTK)
-  /* True means using a menu bar that comes from the X toolkit.  */
-  bool_bf external_menu_bar : 1;
-#endif
-
-  /* Next two bitfields are mutually exclusive.  They might both be
-     zero if the frame has been made invisible without an icon.  */
-
-  /* Nonzero if the frame is currently displayed; we check
-     it to see if we should bother updating the frame's contents.
-
-     On ttys and on Windows NT/9X, to avoid wasting effort updating
-     visible frames that are actually completely obscured by other
-     windows on the display, we bend the meaning of visible slightly:
-     if equal to 2, then the frame is obscured - we still consider
-     it to be "visible" as seen from lisp, but we don't bother
-     updating it.  */
-  unsigned visible : 2;
-
-  /* True if the frame is currently iconified.  Do not
-     set this directly, use SET_FRAME_ICONIFIED instead.  */
-  bool_bf iconified : 1;
-
-  /* True if this frame should be fully redisplayed.  Disables all
-     optimizations while rebuilding matrices and redrawing.  */
-  bool_bf garbaged : 1;
-
-  /* False means, if this frame has just one window,
-     show no modeline for that window.  */
-  bool_bf wants_modeline : 1;
-
-  /* True means raise this frame to the top of the heap when selected.  */
-  bool_bf auto_raise : 1;
-
-  /* True means lower this frame to the bottom of the stack when left.  */
-  bool_bf auto_lower : 1;
-
-  /* True if frame's root window can't be split.  */
-  bool_bf no_split : 1;
-
-  /* If this is set, then Emacs won't change the frame name to indicate
-     the current buffer, etcetera.  If the user explicitly sets the frame
-     name, this gets set.  If the user sets the name to Qnil, this is
-     cleared.  */
-  bool_bf explicit_name : 1;
-
-  /* True if size of some window on this frame has changed.  */
-  bool_bf window_sizes_changed : 1;
-
-  /* True if the mouse has moved on this display device
-     since the last time we checked.  */
-  bool_bf mouse_moved : 1;
-
-  /* True means that the pointer is invisible.  */
-  bool_bf pointer_invisible : 1;
-
-  /* True means that all windows except mini-window and
-     selected window on this frame have frozen window starts.  */
-  bool_bf frozen_window_starts : 1;
-
-  /* Nonzero if we should actually display the scroll bars on this frame.  */
-  enum vertical_scroll_bar_type vertical_scroll_bar_type;
-
   /* What kind of text cursor should we draw in the future?
      This should always be filled_box_cursor or bar_cursor.  */
   enum text_cursor_kinds desired_cursor;
@@ -437,6 +478,14 @@ struct frame
   int config_scroll_bar_width;
   int config_scroll_bar_cols;
 
+  /* Configured height of the scroll bar, in pixels and in characters.
+     config_scroll_bar_lines tracks config_scroll_bar_height if the
+     latter is positive; a zero value in config_scroll_bar_height means
+     to compute the actual width on the fly, using
+     config_scroll_bar_lines and the current font width.  */
+  int config_scroll_bar_height;
+  int config_scroll_bar_lines;
+
   /* The baud rate that was used to calculate costs for this frame.  */
   int cost_calculation_baud_rate;
 
@@ -543,11 +592,13 @@ fset_tool_bar_items (struct frame *f, Lisp_Object val)
 {
   f->tool_bar_items = val;
 }
+#ifdef USE_GTK
 INLINE void
 fset_tool_bar_position (struct frame *f, Lisp_Object val)
 {
   f->tool_bar_position = val;
 }
+#endif /* USE_GTK */
 #if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS)
 INLINE void
 fset_tool_bar_window (struct frame *f, Lisp_Object val)
@@ -682,8 +733,7 @@ default_pixels_per_inch_y (void)
 /* Pixel width of frame F.  */
 #define FRAME_PIXEL_WIDTH(f) ((f)->pixel_width)
 
-/* Pixel height of frame F, including non-toolkit menu bar and
-   non-toolkit tool bar lines.  */
+/* Pixel height of frame F.  */
 #define FRAME_PIXEL_HEIGHT(f) ((f)->pixel_height)
 
 /* Width of frame F, measured in canonical character columns,
@@ -699,7 +749,7 @@ default_pixels_per_inch_y (void)
 #define FRAME_TEXT_WIDTH(f) (f)->text_width
 
 /* Height of frame F, measured in pixels not including the height
-   for internal borders.  */
+   for scroll bar and internal borders.  */
 #define FRAME_TEXT_HEIGHT(f) (f)->text_height
 
 /* Number of lines of frame F used for menu bar.
@@ -719,6 +769,13 @@ default_pixels_per_inch_y (void)
 #define FRAME_EXTERNAL_TOOL_BAR(f) false
 #endif
 
+/* This is really supported only with GTK.  */
+#ifdef USE_GTK
+#define FRAME_TOOL_BAR_POSITION(f) (f)->tool_bar_position
+#else
+#define FRAME_TOOL_BAR_POSITION(f) ((void) f, Qtop)
+#endif
+
 /* Number of lines of frame F used for the tool-bar.  */
 #define FRAME_TOOL_BAR_LINES(f) (f)->tool_bar_lines
 
@@ -741,6 +798,8 @@ default_pixels_per_inch_y (void)
 #else
 #define FRAME_EXTERNAL_MENU_BAR(f) false
 #endif
+
+/* True if frame F is currently visible.  */
 #define FRAME_VISIBLE_P(f) (f)->visible
 
 /* True if frame F is currently visible but hidden.  */
@@ -786,6 +845,8 @@ default_pixels_per_inch_y (void)
 #define FRAME_DELETEN_COST(f) (f)->delete_n_lines_cost
 #define FRAME_FOCUS_FRAME(f) f->focus_frame
 
+#ifdef HAVE_WINDOW_SYSTEM
+
 /* This frame slot says whether scroll bars are currently enabled for frame F,
    and which side they are on.  */
 #define FRAME_VERTICAL_SCROLL_BAR_TYPE(f) ((f)->vertical_scroll_bar_type)
@@ -796,66 +857,108 @@ default_pixels_per_inch_y (void)
 #define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT(f) \
   ((f)->vertical_scroll_bar_type == vertical_scroll_bar_right)
 
+#else /* not HAVE_WINDOW_SYSTEM */
+
+/* If there is no window system, there are no scroll bars.  */
+#define FRAME_VERTICAL_SCROLL_BAR_TYPE(f) ((void) f, vertical_scroll_bar_none)
+#define FRAME_HAS_VERTICAL_SCROLL_BARS(f) ((void) f, 0)
+#define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT(f) ((void) f, 0)
+#define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT(f) ((void) f, 0)
+
+#endif /* HAVE_WINDOW_SYSTEM */
+
+/* Whether horizontal scroll bars are currently enabled for frame F.  */
+#if USE_HORIZONTAL_SCROLL_BARS
+#define FRAME_HAS_HORIZONTAL_SCROLL_BARS(f) \
+  ((f)->horizontal_scroll_bars)
+#else
+#define FRAME_HAS_HORIZONTAL_SCROLL_BARS(f) ((void) f, 0)
+#endif
+
 /* Width that a scroll bar in frame F should have, if there is one.
    Measured in pixels.
    If scroll bars are turned off, this is still nonzero.  */
 #define FRAME_CONFIG_SCROLL_BAR_WIDTH(f) ((f)->config_scroll_bar_width)
 
+/* Height that a scroll bar in frame F should have, if there is one.
+   Measured in pixels.
+   If scroll bars are turned off, this is still nonzero.  */
+#define FRAME_CONFIG_SCROLL_BAR_HEIGHT(f) ((f)->config_scroll_bar_height)
+
 /* Width that a scroll bar in frame F should have, if there is one.
    Measured in columns (characters).
    If scroll bars are turned off, this is still nonzero.  */
 #define FRAME_CONFIG_SCROLL_BAR_COLS(f) ((f)->config_scroll_bar_cols)
 
-/* Width of a scroll bar in frame F, measured in columns (characters),
-   but only if scroll bars are on the left.  If scroll bars are on
-   the right in this frame, or there are no scroll bars, value is 0.  */
-
-#define FRAME_LEFT_SCROLL_BAR_COLS(f)                  \
-  (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f)          \
-   ? FRAME_CONFIG_SCROLL_BAR_COLS (f)                  \
-   : 0)
+/* Height that a scroll bar in frame F should have, if there is one.
+   Measured in lines (characters).
+   If scroll bars are turned off, this is still nonzero.  */
+#define FRAME_CONFIG_SCROLL_BAR_LINES(f) ((f)->config_scroll_bar_lines)
 
 /* Width of a left scroll bar in frame F, measured in pixels */
-
 #define FRAME_LEFT_SCROLL_BAR_AREA_WIDTH(f)                            \
   (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f)                          \
    ? FRAME_CONFIG_SCROLL_BAR_WIDTH (f)                                 \
    : 0)
 
-/* Width of a scroll bar in frame F, measured in columns (characters),
-   but only if scroll bars are on the right.  If scroll bars are on
-   the left in this frame, or there are no scroll bars, value is 0.  */
-
-#define FRAME_RIGHT_SCROLL_BAR_COLS(f)                 \
-  (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (f)         \
-   ? FRAME_CONFIG_SCROLL_BAR_COLS (f)                  \
-   : 0)
-
 /* Width of a right scroll bar area in frame F, measured in pixels */
-
 #define FRAME_RIGHT_SCROLL_BAR_AREA_WIDTH(f)                           \
   (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (f)                         \
    ? FRAME_CONFIG_SCROLL_BAR_WIDTH (f)                                 \
    : 0)
 
-/* Actual width of a scroll bar in frame F, measured in columns.  */
+/* Width of a left scroll bar in frame F, measured in columns
+   (characters), but only if scroll bars are on the left.  If scroll
+   bars are on the right in this frame, or there are no scroll bars,
+   value is 0.  */
+#define FRAME_LEFT_SCROLL_BAR_COLS(f)                  \
+  (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f)          \
+   ? FRAME_CONFIG_SCROLL_BAR_COLS (f)                  \
+   : 0)
 
-#define FRAME_SCROLL_BAR_COLS(f)                       \
-  (FRAME_HAS_VERTICAL_SCROLL_BARS (f)                  \
+/* Width of a right scroll bar in frame F, measured in columns
+   (characters), but only if scroll bars are on the right.  If scroll
+   bars are on the left in this frame, or there are no scroll bars,
+   value is 0.  */
+#define FRAME_RIGHT_SCROLL_BAR_COLS(f)                 \
+  (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (f)         \
    ? FRAME_CONFIG_SCROLL_BAR_COLS (f)                  \
    : 0)
 
-/* Actual width of a scroll bar area in frame F, measured in pixels.  */
+/* Width of a vertical scroll bar area in frame F, measured in
+   pixels.  */
+#define FRAME_SCROLL_BAR_AREA_WIDTH(f)         \
+  (FRAME_HAS_VERTICAL_SCROLL_BARS (f)          \
+   ? FRAME_CONFIG_SCROLL_BAR_WIDTH (f)         \
+   : 0)
+
+/* Height of horizontal scroll bar area in frame F, measured in
+   pixels.  */
+#define FRAME_SCROLL_BAR_AREA_HEIGHT(f) \
+  (FRAME_HAS_HORIZONTAL_SCROLL_BARS (f) \
+   ? FRAME_CONFIG_SCROLL_BAR_HEIGHT (f) \
+   : 0)
 
-#define FRAME_SCROLL_BAR_AREA_WIDTH(f)                                 \
-  (FRAME_HAS_VERTICAL_SCROLL_BARS (f)                                  \
-   ? FRAME_CONFIG_SCROLL_BAR_WIDTH (f)                                 \
+/* Width of vertical scroll bar in frame F, measured in columns.  */
+#define FRAME_SCROLL_BAR_COLS(f)      \
+  (FRAME_HAS_VERTICAL_SCROLL_BARS (f) \
+   ? FRAME_CONFIG_SCROLL_BAR_COLS (f) \
+   : 0)
+
+/* Height of horizontal scroll bar in frame F, measured in lines.  */
+#define FRAME_SCROLL_BAR_LINES(f)      \
+  (FRAME_HAS_HORIZONTAL_SCROLL_BARS (f) \
+   ? FRAME_CONFIG_SCROLL_BAR_LINES (f) \
    : 0)
 
 /* Total width of frame F, in columns (characters),
    including the width used by scroll bars if any.  */
 #define FRAME_TOTAL_COLS(f) ((f)->total_cols)
 
+/* Total height of frame F, in lines (characters),
+   including the height used by scroll bars if any.  */
+#define FRAME_TOTAL_LINES(f) ((f)->total_lines)
+
 /* Set the character widths of frame F.  WIDTH specifies a nominal
    character text width.  */
 #define SET_FRAME_COLS(f, width)                                       \
@@ -864,8 +967,16 @@ default_pixels_per_inch_y (void)
                      + FRAME_SCROLL_BAR_COLS (f)                       \
                      + FRAME_FRINGE_COLS (f)))
 
-/* Set the pixel widths of frame F.  WIDTH specifies a nominal pixel
-   text width.  */
+/* Set the character heights of frame F.  HEIGHT specifies a nominal
+   character text height.  */
+#define SET_FRAME_LINES(f, height)                                     \
+  ((f)->text_lines = (height),                                         \
+   (f)->total_lines = ((height)                                                \
+                      + FRAME_TOP_MARGIN (f)                           \
+                      + FRAME_SCROLL_BAR_LINES (f)))
+
+/* Set the widths of frame F.  WIDTH specifies a nominal pixel text
+   width.  */
 #define SET_FRAME_WIDTH(f, width)                                      \
   ((f)->text_width = (width),                                          \
    (f)->pixel_width = ((width)                                         \
@@ -873,21 +984,23 @@ default_pixels_per_inch_y (void)
                       + FRAME_TOTAL_FRINGE_WIDTH (f)                   \
                       + 2 * FRAME_INTERNAL_BORDER_WIDTH (f)))
 
-/* Set the pixel heights of frame F.  HEIGHT specifies a nominal pixel
-   text width.  */
+/* Set the heights of frame F.  HEIGHT specifies a nominal pixel text
+   height.  */
 #define SET_FRAME_HEIGHT(f, height)                                    \
   ((f)->text_height = (height),                                                \
    (f)->pixel_height = ((height)                                       \
-                      + 2 * FRAME_INTERNAL_BORDER_WIDTH (f)))
+                       + FRAME_TOP_MARGIN_HEIGHT (f)                   \
+                       + FRAME_SCROLL_BAR_AREA_HEIGHT (f)              \
+                       + 2 * FRAME_INTERNAL_BORDER_WIDTH (f)))
 
 /* Maximum + 1 legitimate value for FRAME_CURSOR_X.  */
-
 #define FRAME_CURSOR_X_LIMIT(f) \
   (FRAME_COLS (f) + FRAME_LEFT_SCROLL_BAR_COLS (f))
 
+/* Nonzero if frame F has scroll bars.  */
 #define FRAME_SCROLL_BARS(f) (f->scroll_bars)
-
 #define FRAME_CONDEMNED_SCROLL_BARS(f) (f->condemned_scroll_bars)
+
 #define FRAME_MENU_BAR_ITEMS(f) (f->menu_bar_items)
 #define FRAME_COST_BAUD_RATE(f) ((f)->cost_calculation_baud_rate)
 
@@ -947,6 +1060,11 @@ default_pixels_per_inch_y (void)
       }                                                                \
   } while (false)
 
+/* Handy macro to construct an argument to Fmodify_frame_parameters.  */
+
+#define AUTO_FRAME_ARG(name, parameter, value) \
+  AUTO_LIST1 (name, AUTO_CONS_EXPR (parameter, value))
+
 /* False means there are no visible garbaged frames.  */
 extern bool frame_garbaged;
 
@@ -981,7 +1099,6 @@ extern Lisp_Object Qtty_color_mode;
 extern Lisp_Object Qterminal;
 extern Lisp_Object Qnoelisp;
 
-extern void set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
 extern struct frame *decode_window_system_frame (Lisp_Object);
 extern struct frame *decode_live_frame (Lisp_Object);
 extern struct frame *decode_any_frame (Lisp_Object);
@@ -992,12 +1109,16 @@ extern struct frame *make_minibuffer_frame (void);
 extern struct frame *make_frame_without_minibuffer (Lisp_Object,
                                                     struct kboard *,
                                                     Lisp_Object);
-#endif /* HAVE_WINDOW_SYSTEM */
 extern bool window_system_available (struct frame *);
+#else /* not HAVE_WINDOW_SYSTEM */
+#define window_system_available(f) ((void) (f), false)
+#endif /* HAVE_WINDOW_SYSTEM */
 extern void check_window_system (struct frame *);
-extern void frame_make_pointer_invisible (void);
-extern void frame_make_pointer_visible (void);
+extern void frame_make_pointer_invisible (struct frame *);
+extern void frame_make_pointer_visible (struct frame *);
 extern Lisp_Object delete_frame (Lisp_Object, Lisp_Object);
+extern bool frame_inhibit_resize (struct frame *, bool);
+extern void adjust_frame_size (struct frame *, int, int, int, bool);
 
 extern Lisp_Object Vframe_list;
 
@@ -1018,12 +1139,10 @@ extern Lisp_Object Vframe_list;
 /* Canonical y-unit on frame F.
    This value currently equals the line height of the frame (which is
    the height of the default font of F).  */
-
 #define FRAME_LINE_HEIGHT(F) ((F)->line_height)
 
 /* Canonical x-unit on frame F.
    This value currently equals the average width of the default font of F.  */
-
 #define FRAME_COLUMN_WIDTH(F) ((F)->column_width)
 
 /* Pixel width of areas used to display truncation marks, continuation
@@ -1036,7 +1155,6 @@ extern Lisp_Object Vframe_list;
    units of the frame.  This must currently be the case because window
    sizes aren't pixel values.  If it weren't the case, we wouldn't be
    able to split windows horizontally nicely.  */
-
 #define FRAME_FRINGE_COLS(F) ((F)->fringe_cols)
 
 /* Pixel-width of the left and right fringe.  */
@@ -1079,7 +1197,6 @@ extern Lisp_Object Vframe_list;
 /* Convert canonical value X to pixels.  F is the frame whose
    canonical char width is to be used.  X must be a Lisp integer or
    float.  Value is a C integer.  */
-
 #define FRAME_PIXEL_X_FROM_CANON_X(F, X)               \
   (INTEGERP (X)                                                \
    ? XINT (X) * FRAME_COLUMN_WIDTH (F)                 \
@@ -1088,7 +1205,6 @@ extern Lisp_Object Vframe_list;
 /* Convert canonical value Y to pixels.  F is the frame whose
    canonical character height is to be used.  X must be a Lisp integer
    or float.  Value is a C integer.  */
-
 #define FRAME_PIXEL_Y_FROM_CANON_Y(F, Y)               \
   (INTEGERP (Y)                                                \
    ? XINT (Y) * FRAME_LINE_HEIGHT (F)                  \
@@ -1098,7 +1214,6 @@ extern Lisp_Object Vframe_list;
    canonical character width is to be used.  X is a C integer.  Result
    is a Lisp float if X is not a multiple of the canon width,
    otherwise it's a Lisp integer.  */
-
 #define FRAME_CANON_X_FROM_PIXEL_X(F, X)                       \
   ((X) % FRAME_COLUMN_WIDTH (F) != 0                           \
    ? make_float ((double) (X) / FRAME_COLUMN_WIDTH (F))                \
@@ -1108,7 +1223,6 @@ extern Lisp_Object Vframe_list;
    canonical character height is to be used.  Y is a C integer.
    Result is a Lisp float if Y is not a multiple of the canon width,
    otherwise it's a Lisp integer.  */
-
 #define FRAME_CANON_Y_FROM_PIXEL_Y(F, Y)                       \
   ((Y) % FRAME_LINE_HEIGHT (F)                                 \
    ? make_float ((double) (Y) / FRAME_LINE_HEIGHT (F))         \
@@ -1122,7 +1236,6 @@ extern Lisp_Object Vframe_list;
 
    Return the upper/left pixel position of the character cell on frame F
    at ROW/COL.  */
-
 #define FRAME_LINE_TO_PIXEL_Y(f, row)                                  \
   (((row) < FRAME_TOP_MARGIN (f) ? 0 : FRAME_INTERNAL_BORDER_WIDTH (f))        \
    + (row) * FRAME_LINE_HEIGHT (f))
@@ -1133,25 +1246,27 @@ extern Lisp_Object Vframe_list;
 
 /* Return the pixel width/height of frame F if it has
    COLS columns/LINES rows.  */
-
 #define FRAME_TEXT_COLS_TO_PIXEL_WIDTH(f, cols) \
-  (FRAME_COL_TO_PIXEL_X (f, cols)              \
+  ((cols) * FRAME_COLUMN_WIDTH (f)             \
    + FRAME_SCROLL_BAR_AREA_WIDTH (f)           \
    + FRAME_TOTAL_FRINGE_WIDTH (f)              \
-   + FRAME_INTERNAL_BORDER_WIDTH (f))
+   + 2 * FRAME_INTERNAL_BORDER_WIDTH (f))
 
 #define FRAME_TEXT_LINES_TO_PIXEL_HEIGHT(f, lines) \
   ((lines) * FRAME_LINE_HEIGHT (f)                \
+   + FRAME_TOP_MARGIN_HEIGHT (f)                  \
+   + FRAME_SCROLL_BAR_AREA_HEIGHT (f)             \
    + 2 * FRAME_INTERNAL_BORDER_WIDTH (f))
 
 /* Return the row/column (zero-based) of the character cell containing
    the pixel on FRAME at Y/X.  */
-
 #define FRAME_PIXEL_Y_TO_LINE(f, y)                                    \
   (((y) < FRAME_TOP_MARGIN_HEIGHT (f)                                  \
     ? (y)                                                              \
-    : ((y) < FRAME_TOP_MARGIN_HEIGHT (f) + FRAME_INTERNAL_BORDER_WIDTH (f) \
-       ? (y) - (FRAME_TOP_MARGIN_HEIGHT (f) + FRAME_INTERNAL_BORDER_WIDTH (f) \
+    : ((y) < (FRAME_TOP_MARGIN_HEIGHT (f)                              \
+             + FRAME_INTERNAL_BORDER_WIDTH (f))                        \
+       ? (y) - (FRAME_TOP_MARGIN_HEIGHT (f)                            \
+               + FRAME_INTERNAL_BORDER_WIDTH (f)                       \
                /* Arrange for the division to round down.  */          \
                + FRAME_LINE_HEIGHT (f) - 1)                            \
        : (y) - FRAME_INTERNAL_BORDER_WIDTH (f)))                       \
@@ -1162,21 +1277,23 @@ extern Lisp_Object Vframe_list;
    / FRAME_COLUMN_WIDTH (f))
 
 /* How many columns/rows of text can we fit in WIDTH/HEIGHT pixels on
-   frame F?  */
-
+   frame F (so we round down)?  */
 #define FRAME_PIXEL_WIDTH_TO_TEXT_COLS(f, width)                       \
-  (FRAME_PIXEL_X_TO_COL (f, ((width)                                   \
-                            - FRAME_INTERNAL_BORDER_WIDTH (f)          \
-                            - FRAME_TOTAL_FRINGE_WIDTH (f)             \
-                            - FRAME_SCROLL_BAR_AREA_WIDTH (f))))       \
+  (((width)                                                            \
+    - FRAME_TOTAL_FRINGE_WIDTH (f)                                     \
+    - FRAME_SCROLL_BAR_AREA_WIDTH (f)                                  \
+    - 2 * FRAME_INTERNAL_BORDER_WIDTH (f))                             \
+   / FRAME_COLUMN_WIDTH (f))                                           \
 
 #define FRAME_PIXEL_HEIGHT_TO_TEXT_LINES(f, height)                    \
-  (FRAME_PIXEL_Y_TO_LINE (f, ((height)                                 \
-                             - FRAME_INTERNAL_BORDER_WIDTH (f))))
+  (((height)                                                           \
+    - FRAME_TOP_MARGIN_HEIGHT (f)                                      \
+    - FRAME_SCROLL_BAR_AREA_HEIGHT (f)                                 \
+    - 2 * FRAME_INTERNAL_BORDER_WIDTH (f))                             \
+   / FRAME_LINE_HEIGHT (f))
 
 /* Return the pixel width/height of frame F with a text size of
    width/height.  */
-
 #define FRAME_TEXT_TO_PIXEL_WIDTH(f, width)      \
   ((width)                                       \
    + FRAME_SCROLL_BAR_AREA_WIDTH (f)             \
@@ -1184,11 +1301,13 @@ extern Lisp_Object Vframe_list;
    + 2 * FRAME_INTERNAL_BORDER_WIDTH (f))
 
 #define FRAME_TEXT_TO_PIXEL_HEIGHT(f, height)       \
-  ((height) + 2 * FRAME_INTERNAL_BORDER_WIDTH (f))
+  ((height)                                         \
+   + FRAME_TOP_MARGIN_HEIGHT (f)                    \
+   + FRAME_SCROLL_BAR_AREA_HEIGHT (f)               \
+   + 2 * FRAME_INTERNAL_BORDER_WIDTH (f))
 
 /* Return the text width/height of frame F with a pixel size of
    width/height.  */
-
 #define FRAME_PIXEL_TO_TEXT_WIDTH(f, width)      \
   ((width)                                       \
    - FRAME_SCROLL_BAR_AREA_WIDTH (f)             \
@@ -1196,15 +1315,26 @@ extern Lisp_Object Vframe_list;
    - 2 * FRAME_INTERNAL_BORDER_WIDTH (f))
 
 #define FRAME_PIXEL_TO_TEXT_HEIGHT(f, height)          \
-  ((height) - 2 * FRAME_INTERNAL_BORDER_WIDTH (f))
+  ((height)                                            \
+   - FRAME_TOP_MARGIN_HEIGHT (f)                       \
+   - FRAME_SCROLL_BAR_AREA_HEIGHT (f)                  \
+   - 2 * FRAME_INTERNAL_BORDER_WIDTH (f))
 
-/* Value is the smallest width of any character in any font on frame F.  */
+/* Return the width/height reserved for the windows of frame F.  */
+#define FRAME_WINDOWS_WIDTH(f)                 \
+  (FRAME_PIXEL_WIDTH (f)                       \
+   - 2 * FRAME_INTERNAL_BORDER_WIDTH (f))
+
+#define FRAME_WINDOWS_HEIGHT(f)                        \
+  (FRAME_PIXEL_HEIGHT (f)                      \
+   - FRAME_TOP_MARGIN_HEIGHT (f)               \
+   - 2 * FRAME_INTERNAL_BORDER_WIDTH (f))
 
+/* Value is the smallest width of any character in any font on frame F.  */
 #define FRAME_SMALLEST_CHAR_WIDTH(f)           \
   FRAME_DISPLAY_INFO (f)->smallest_char_width
 
 /* Value is the smallest height of any font on frame F.  */
-
 #define FRAME_SMALLEST_FONT_HEIGHT(f)          \
   FRAME_DISPLAY_INFO (f)->smallest_font_height
 
@@ -1217,7 +1347,6 @@ extern Lisp_Object Qborder_color, Qborder_width;
 extern Lisp_Object Qbuffer_predicate;
 extern Lisp_Object Qcursor_color, Qcursor_type;
 extern Lisp_Object Qfont;
-extern Lisp_Object Qbackground_color, Qforeground_color;
 extern Lisp_Object Qicon, Qicon_name, Qicon_type, Qicon_left, Qicon_top;
 extern Lisp_Object Qinternal_border_width;
 extern Lisp_Object Qright_divider_width, Qbottom_divider_width;
@@ -1228,6 +1357,7 @@ extern Lisp_Object Qname, Qtitle;
 extern Lisp_Object Qparent_id;
 extern Lisp_Object Qunsplittable, Qvisibility;
 extern Lisp_Object Qscroll_bar_width, Qvertical_scroll_bars;
+extern Lisp_Object Qscroll_bar_height, Qhorizontal_scroll_bars;
 extern Lisp_Object Qscroll_bar_foreground, Qscroll_bar_background;
 extern Lisp_Object Qscreen_gamma;
 extern Lisp_Object Qline_spacing;
@@ -1247,7 +1377,7 @@ extern Lisp_Object Qdisplay_type;
 
 extern Lisp_Object Qx_resource_name;
 
-extern Lisp_Object Qleft, Qright, Qtop, Qbox, Qbottom;
+extern Lisp_Object Qtop, Qbox, Qbottom;
 extern Lisp_Object Qdisplay;
 
 extern Lisp_Object Qrun_hook_with_args;
@@ -1257,33 +1387,21 @@ extern Lisp_Object Qrun_hook_with_args;
 /* The class of this X application.  */
 #define EMACS_CLASS "Emacs"
 
-/* These are in xterm.c, w32term.c, etc.  */
-
 extern void x_set_scroll_bar_default_width (struct frame *);
+extern void x_set_scroll_bar_default_height (struct frame *);
 extern void x_set_offset (struct frame *, int, int, int);
 extern void x_wm_set_size_hint (struct frame *f, long flags, bool user_position);
-
 extern Lisp_Object x_new_font (struct frame *, Lisp_Object, int);
-
-
 extern Lisp_Object Qface_set_after_frame_default;
-
-#ifdef HAVE_NTGUI
-extern void x_fullscreen_adjust (struct frame *f, int *, int *,
-                                 int *, int *);
-#endif
-
 extern void x_set_frame_parameters (struct frame *, Lisp_Object);
-
 extern void x_set_fullscreen (struct frame *, Lisp_Object, Lisp_Object);
 extern void x_set_line_spacing (struct frame *, Lisp_Object, Lisp_Object);
 extern void x_set_screen_gamma (struct frame *, Lisp_Object, Lisp_Object);
 extern void x_set_font (struct frame *, Lisp_Object, Lisp_Object);
 extern void x_set_font_backend (struct frame *, Lisp_Object, Lisp_Object);
-extern void x_set_fringe_width (struct frame *, Lisp_Object, Lisp_Object);
+extern void x_set_left_fringe (struct frame *, Lisp_Object, Lisp_Object);
+extern void x_set_right_fringe (struct frame *, Lisp_Object, Lisp_Object);
 extern void x_set_border_width (struct frame *, Lisp_Object, Lisp_Object);
-extern void x_set_internal_border_width (struct frame *, Lisp_Object,
-                                         Lisp_Object);
 extern void x_set_right_divider_width (struct frame *, Lisp_Object,
                                       Lisp_Object);
 extern void x_set_bottom_divider_width (struct frame *, Lisp_Object,
@@ -1292,10 +1410,10 @@ extern void x_set_visibility (struct frame *, Lisp_Object, Lisp_Object);
 extern void x_set_autoraise (struct frame *, Lisp_Object, Lisp_Object);
 extern void x_set_autolower (struct frame *, Lisp_Object, Lisp_Object);
 extern void x_set_unsplittable (struct frame *, Lisp_Object, Lisp_Object);
-extern void x_set_vertical_scroll_bars (struct frame *, Lisp_Object,
-                                        Lisp_Object);
-extern void x_set_scroll_bar_width (struct frame *, Lisp_Object,
-                                    Lisp_Object);
+extern void x_set_vertical_scroll_bars (struct frame *, Lisp_Object, Lisp_Object);
+extern void x_set_horizontal_scroll_bars (struct frame *, Lisp_Object, Lisp_Object);
+extern void x_set_scroll_bar_width (struct frame *, Lisp_Object, Lisp_Object);
+extern void x_set_scroll_bar_height (struct frame *, Lisp_Object, Lisp_Object);
 
 extern long x_figure_window_size (struct frame *, Lisp_Object, bool);
 
@@ -1313,14 +1431,11 @@ extern void set_frame_menubar (struct frame *f, bool first_time, bool deep_p);
 extern void x_set_window_size (struct frame *f, int change_grav,
                               int width, int height, bool pixelwise);
 extern Lisp_Object x_get_focus_frame (struct frame *);
-extern void x_set_mouse_position (struct frame *f, int h, int v);
-extern void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y);
+extern void frame_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y);
 extern void x_make_frame_visible (struct frame *f);
 extern void x_make_frame_invisible (struct frame *f);
 extern void x_iconify_frame (struct frame *f);
 extern void x_set_frame_alpha (struct frame *f);
-extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
-extern void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
 extern void x_activate_menubar (struct frame *);
 extern void x_real_positions (struct frame *, int *, int *);
 extern void free_frame_menubar (struct frame *);
@@ -1354,7 +1469,6 @@ x_set_bitmap_icon (struct frame *f)
 }
 
 #endif /* !HAVE_NS */
-
 #endif /* HAVE_WINDOW_SYSTEM */
 
 INLINE void
@@ -1390,4 +1504,11 @@ extern Lisp_Object make_monitor_attribute_list (struct MonitorInfo *monitors,
 
 INLINE_HEADER_END
 
+/* Suppress -Wsuggest-attribute=const if there are no scroll bars.
+   This is for functions like x_set_horizontal_scroll_bars that have
+   no effect in this case.  */
+#if ! USE_HORIZONTAL_SCROLL_BARS && 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
+# pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
+#endif
+
 #endif /* not EMACS_FRAME_H */
index 6325de4128ecedea90dd8c21b946c23661e00635..3c0e883b2e98f3f355720c6b3be95e1dd623c870 100644 (file)
@@ -474,15 +474,12 @@ static struct fringe_bitmap standard_bitmaps[] =
 
 #define NO_FRINGE_BITMAP 0
 #define UNDEF_FRINGE_BITMAP 1
-#define MAX_STANDARD_FRINGE_BITMAPS (sizeof (standard_bitmaps)/sizeof (standard_bitmaps[0]))
+#define MAX_STANDARD_FRINGE_BITMAPS ARRAYELTS (standard_bitmaps)
 
 static struct fringe_bitmap **fringe_bitmaps;
 static Lisp_Object *fringe_faces;
 static int max_fringe_bitmaps;
 
-#ifndef HAVE_NS
-static
-#endif
 int max_used_fringe_bitmap = MAX_STANDARD_FRINGE_BITMAPS;
 
 
@@ -637,7 +634,7 @@ draw_fringe_bitmap_1 (struct window *w, struct glyph_row *row, int left_p, int o
       return;
     }
 
-  PREPARE_FACE_FOR_DISPLAY (f, p.face);
+  prepare_face_for_display (f, p.face);
 
   /* Clear left fringe if no bitmap to draw or if bitmap doesn't fill
      the fringe.  */
@@ -1332,98 +1329,6 @@ update_window_fringes (struct window *w, bool keep_current_p)
 }
 
 
-/* Compute actual fringe widths for frame F.
-
-   If REDRAW is 1, redraw F if the fringe settings was actually
-   modified and F is visible.
-
-   Since the combined left and right fringe must occupy an integral
-   number of columns, we may need to add some pixels to each fringe.
-   Typically, we add an equal amount (+/- 1 pixel) to each fringe,
-   but a negative width value is taken literally (after negating it).
-
-   We never make the fringes narrower than specified.
-*/
-
-void
-compute_fringe_widths (struct frame *f, bool redraw_p)
-{
-  int o_left = FRAME_LEFT_FRINGE_WIDTH (f);
-  int o_right = FRAME_RIGHT_FRINGE_WIDTH (f);
-  int o_cols = FRAME_FRINGE_COLS (f);
-
-  Lisp_Object left_fringe = Fassq (Qleft_fringe, f->param_alist);
-  Lisp_Object right_fringe = Fassq (Qright_fringe, f->param_alist);
-  int left_fringe_width, right_fringe_width;
-
-  if (!NILP (left_fringe))
-    left_fringe = Fcdr (left_fringe);
-  if (!NILP (right_fringe))
-    right_fringe = Fcdr (right_fringe);
-
-  left_fringe_width = ((NILP (left_fringe) || !INTEGERP (left_fringe)) ? 8 :
-                      XINT (left_fringe));
-  right_fringe_width = ((NILP (right_fringe) || !INTEGERP (right_fringe)) ? 8 :
-                       XINT (right_fringe));
-
-  if (left_fringe_width || right_fringe_width)
-    {
-      int left_wid = eabs (left_fringe_width);
-      int right_wid = eabs (right_fringe_width);
-      int conf_wid = left_wid + right_wid;
-      int font_wid = FRAME_COLUMN_WIDTH (f);
-      int cols = (left_wid + right_wid + font_wid-1) / font_wid;
-      int real_wid = cols * font_wid;
-      if (left_wid && right_wid)
-       {
-         if (left_fringe_width < 0)
-           {
-             /* Left fringe width is fixed, adjust right fringe if necessary */
-             FRAME_LEFT_FRINGE_WIDTH (f) = left_wid;
-             FRAME_RIGHT_FRINGE_WIDTH (f) = real_wid - left_wid;
-           }
-         else if (right_fringe_width < 0)
-           {
-             /* Right fringe width is fixed, adjust left fringe if necessary */
-             FRAME_LEFT_FRINGE_WIDTH (f) = real_wid - right_wid;
-             FRAME_RIGHT_FRINGE_WIDTH (f) = right_wid;
-           }
-         else
-           {
-             /* Adjust both fringes with an equal amount.
-                Note that we are doing integer arithmetic here, so don't
-                lose a pixel if the total width is an odd number.  */
-             int fill = real_wid - conf_wid;
-             FRAME_LEFT_FRINGE_WIDTH (f) = left_wid + fill/2;
-             FRAME_RIGHT_FRINGE_WIDTH (f) = right_wid + fill - fill/2;
-           }
-       }
-      else if (left_fringe_width)
-       {
-         FRAME_LEFT_FRINGE_WIDTH (f) = real_wid;
-         FRAME_RIGHT_FRINGE_WIDTH (f) = 0;
-       }
-      else
-       {
-         FRAME_LEFT_FRINGE_WIDTH (f) = 0;
-         FRAME_RIGHT_FRINGE_WIDTH (f) = real_wid;
-       }
-      FRAME_FRINGE_COLS (f) = cols;
-    }
-  else
-    {
-      FRAME_LEFT_FRINGE_WIDTH (f) = 0;
-      FRAME_RIGHT_FRINGE_WIDTH (f) = 0;
-      FRAME_FRINGE_COLS (f) = 0;
-    }
-
-  if (redraw_p && FRAME_VISIBLE_P (f))
-    if (o_left != FRAME_LEFT_FRINGE_WIDTH (f) ||
-       o_right != FRAME_RIGHT_FRINGE_WIDTH (f) ||
-       o_cols != FRAME_FRINGE_COLS (f))
-      redraw_frame (f);
-}
-
 
 /* Free resources used by a user-defined bitmap.  */
 
@@ -1574,13 +1479,7 @@ If BITMAP already exists, the existing definition is replaced.  */)
   int fill1 = 0, fill2 = 0;
 
   CHECK_SYMBOL (bitmap);
-
-  if (STRINGP (bits))
-    h = SCHARS (bits);
-  else if (VECTORP (bits))
-    h = ASIZE (bits);
-  else
-    wrong_type_argument (Qsequencep, bits);
+  h = CHECK_VECTOR_OR_STRING (bits);
 
   if (NILP (height))
     fb.height = h;
index 112adad8a10dcf578e19447b57cff7d6d0eeb7be..4c12ef5d3afe0e467e39e552e33b7df269737cc2 100644 (file)
@@ -24,6 +24,8 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <fontconfig/fontconfig.h>
 #include <fontconfig/fcfreetype.h>
 
+#include <c-strcase.h>
+
 #include "lisp.h"
 #include "dispextern.h"
 #include "frame.h"
@@ -87,8 +89,6 @@ static Lisp_Object ftfont_lookup_cache (Lisp_Object,
 
 static void ftfont_filter_properties (Lisp_Object font, Lisp_Object alist);
 
-Lisp_Object ftfont_font_format (FcPattern *, Lisp_Object);
-
 #define SYMBOL_FcChar8(SYM) (FcChar8 *) SDATA (SYMBOL_NAME (SYM))
 
 static struct
@@ -142,6 +142,12 @@ static struct
     { NULL }
   };
 
+static bool
+matching_prefix (char const *str, ptrdiff_t len, char const *pat)
+{
+  return len == strlen (pat) && c_strncasecmp (str, pat, len) == 0;
+}
+
 /* Dirty hack for handing ADSTYLE property.
 
    Fontconfig (actually the underlying FreeType) gives such ADSTYLE
@@ -173,18 +179,10 @@ get_adstyle_property (FcPattern *p)
     return Qnil;
   str = (char *) fcstr;
   for (end = str; *end && *end != ' '; end++);
-  if (*end)
-    {
-      char *newstr = alloca (end - str + 1);
-      memcpy (newstr, str, end - str);
-      newstr[end - str] = '\0';
-      end = newstr + (end - str);
-      str = newstr;
-    }
-  if (xstrcasecmp (str, "Regular") == 0
-      || xstrcasecmp (str, "Bold") == 0
-      || xstrcasecmp (str, "Oblique") == 0
-      || xstrcasecmp (str, "Italic") == 0)
+  if (matching_prefix (str, end - str, "Regular")
+      || matching_prefix (str, end - str, "Bold")
+      || matching_prefix (str, end - str, "Oblique")
+      || matching_prefix (str, end - str, "Italic"))
     return Qnil;
   adstyle = font_intern_prop (str, end - str, 1);
   if (font_style_to_value (FONT_WIDTH_INDEX, adstyle, 0) >= 0)
@@ -501,8 +499,8 @@ static Lisp_Object ftfont_open (struct frame *, Lisp_Object, int);
 static void ftfont_close (struct font *);
 static int ftfont_has_char (Lisp_Object, int);
 static unsigned ftfont_encode_char (struct font *, int);
-static int ftfont_text_extents (struct font *, unsigned *, int,
-                                struct font_metrics *);
+static void ftfont_text_extents (struct font *, unsigned *, int,
+                                struct font_metrics *);
 static int ftfont_get_bitmap (struct font *, unsigned,
                               struct font_bitmap *, int);
 static int ftfont_anchor_point (struct font *, unsigned, int,
@@ -540,8 +538,6 @@ struct font_driver ftfont_driver =
     NULL,                      /* draw */
     ftfont_get_bitmap,
     NULL,                      /* free_bitmap */
-    NULL,                      /* get_outline */
-    NULL,                      /* free_outline */
     ftfont_anchor_point,
 #ifdef HAVE_LIBOTF
     ftfont_otf_capability,
@@ -577,7 +573,8 @@ static int
 ftfont_get_charset (Lisp_Object registry)
 {
   char *str = SSDATA (SYMBOL_NAME (registry));
-  char *re = alloca (SBYTES (SYMBOL_NAME (registry)) * 2 + 1);
+  USE_SAFE_ALLOCA;
+  char *re = SAFE_ALLOCA (SBYTES (SYMBOL_NAME (registry)) * 2 + 1);
   Lisp_Object regexp;
   int i, j;
 
@@ -593,6 +590,7 @@ ftfont_get_charset (Lisp_Object registry)
     }
   re[j] = '\0';
   regexp = make_unibyte_string (re, j);
+  SAFE_FREE ();
   for (i = 0; fc_charset_table[i].name; i++)
     if (fast_c_string_match_ignore_case
        (regexp, fc_charset_table[i].name,
@@ -806,7 +804,7 @@ ftfont_spec_pattern (Lisp_Object spec, char *otlayout, struct OpenTypeSpec **ots
              *otspec = ftfont_get_open_type_spec (val);
              if (! *otspec)
                return NULL;
-             strcat (otlayout, "otlayout:");
+             strcpy (otlayout, "otlayout:");
              OTF_TAG_STR ((*otspec)->script_tag, otlayout + 9);
              script = (*otspec)->script;
            }
@@ -1187,8 +1185,7 @@ ftfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
   Lisp_Object val, filename, idx, cache, font_object;
   bool scalable;
   int spacing;
-  char name[256];
-  int i, len;
+  int i;
   int upEM;
 
   val = assq_no_quit (QCfont_entity, AREF (entity, FONT_EXTRA_INDEX));
@@ -1225,19 +1222,9 @@ ftfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
       return Qnil;
     }
 
-  font_object = font_make_object (VECSIZE (struct ftfont_info), entity, size);
-  ASET (font_object, FONT_TYPE_INDEX, Qfreetype);
-  len = font_unparse_xlfd (entity, size, name, 256);
-  if (len > 0)
-    ASET (font_object, FONT_NAME_INDEX, make_string (name, len));
-  len = font_unparse_fcname (entity, size, name, 256);
-  if (len > 0)
-    ASET (font_object, FONT_FULLNAME_INDEX, make_string (name, len));
-  else
-    ASET (font_object, FONT_FULLNAME_INDEX,
-         AREF (font_object, FONT_NAME_INDEX));
+  font_object = font_build_object (VECSIZE (struct ftfont_info),
+                                  Qfreetype, entity, size);
   ASET (font_object, FONT_FILE_INDEX, filename);
-  ASET (font_object, FONT_FORMAT_INDEX, ftfont_font_format (NULL, filename));
   font = XFONT_OBJECT (font_object);
   ftfont_info = (struct ftfont_info *) font;
   ftfont_info->ft_size = ft_face->size;
@@ -1386,19 +1373,18 @@ ftfont_encode_char (struct font *font, int c)
   return (code > 0 ? code : FONT_INVALID_CODE);
 }
 
-static int
-ftfont_text_extents (struct font *font, unsigned int *code, int nglyphs, struct font_metrics *metrics)
+static void
+ftfont_text_extents (struct font *font, unsigned int *code,
+                    int nglyphs, struct font_metrics *metrics)
 {
   struct ftfont_info *ftfont_info = (struct ftfont_info *) font;
   FT_Face ft_face = ftfont_info->ft_size->face;
-  int width = 0;
-  int i;
+  int i, width = 0;
   bool first;
 
   if (ftfont_info->ft_size != ft_face->size)
     FT_Activate_Size (ftfont_info->ft_size);
-  if (metrics)
-    memset (metrics, 0, sizeof (struct font_metrics));
+
   for (i = 0, first = 1; i < nglyphs; i++)
     {
       if (FT_Load_Glyph (ft_face, code[i], FT_LOAD_DEFAULT) == 0)
@@ -1407,39 +1393,28 @@ ftfont_text_extents (struct font *font, unsigned int *code, int nglyphs, struct
 
          if (first)
            {
-             if (metrics)
-               {
-                 metrics->lbearing = m->horiBearingX >> 6;
-                 metrics->rbearing = (m->horiBearingX + m->width) >> 6;
-                 metrics->ascent = m->horiBearingY >> 6;
-                 metrics->descent = (m->height - m->horiBearingY) >> 6;
-               }
+             metrics->lbearing = m->horiBearingX >> 6;
+             metrics->rbearing = (m->horiBearingX + m->width) >> 6;
+             metrics->ascent = m->horiBearingY >> 6;
+             metrics->descent = (m->height - m->horiBearingY) >> 6;
              first = 0;
            }
-         if (metrics)
-           {
-             if (metrics->lbearing > width + (m->horiBearingX >> 6))
-               metrics->lbearing = width + (m->horiBearingX >> 6);
-             if (metrics->rbearing
-                 < width + ((m->horiBearingX + m->width) >> 6))
-               metrics->rbearing
-                 = width + ((m->horiBearingX + m->width) >> 6);
-             if (metrics->ascent < (m->horiBearingY >> 6))
-               metrics->ascent = m->horiBearingY >> 6;
-             if (metrics->descent > ((m->height - m->horiBearingY) >> 6))
-               metrics->descent = (m->height - m->horiBearingY) >> 6;
-           }
+         if (metrics->lbearing > width + (m->horiBearingX >> 6))
+           metrics->lbearing = width + (m->horiBearingX >> 6);
+         if (metrics->rbearing
+             < width + ((m->horiBearingX + m->width) >> 6))
+           metrics->rbearing
+             = width + ((m->horiBearingX + m->width) >> 6);
+         if (metrics->ascent < (m->horiBearingY >> 6))
+           metrics->ascent = m->horiBearingY >> 6;
+         if (metrics->descent > ((m->height - m->horiBearingY) >> 6))
+           metrics->descent = (m->height - m->horiBearingY) >> 6;
          width += m->horiAdvance >> 6;
        }
       else
-       {
-         width += font->space_width;
-       }
+       width += font->space_width;
     }
-  if (metrics)
-    metrics->width = width;
-
-  return width;
+  metrics->width = width;
 }
 
 static int
@@ -1715,7 +1690,8 @@ ftfont_check_otf (MFLTFont *font, MFLTOtfSpec *spec)
        else if (! otf)
          return 0;
        for (n = 1; spec->features[i][n]; n++);
-       tags = alloca (sizeof (OTF_Tag) * n);
+       USE_SAFE_ALLOCA;
+       SAFE_NALLOCA (tags, 1, n);
        for (n = 0, negative = 0; spec->features[i][n]; n++)
          {
            if (spec->features[i][n] == 0xFFFFFFFF)
@@ -1725,16 +1701,17 @@ ftfont_check_otf (MFLTFont *font, MFLTOtfSpec *spec)
            else
              tags[n] = spec->features[i][n];
          }
-#ifdef M17N_FLT_USE_NEW_FEATURE
-       if (OTF_check_features (otf, i == 0, spec->script, spec->langsys,
-                               tags, n - negative) != 1)
-         return 0;
-#else  /* not M17N_FLT_USE_NEW_FEATURE */
-       if (n - negative > 0
-           && OTF_check_features (otf, i == 0, spec->script, spec->langsys,
-                                  tags, n - negative) != 1)
+       bool passed = true;
+#ifndef M17N_FLT_USE_NEW_FEATURE
+       passed = n - negative > 0;
+#endif
+       if (passed)
+         passed = (OTF_check_features (otf, i == 0, spec->script,
+                                       spec->langsys, tags, n - negative)
+                   != 1);
+       SAFE_FREE ();
+       if (passed)
          return 0;
-#endif /* not M17N_FLT_USE_NEW_FEATURE */
       }
   return 1;
 #undef FEATURE_NONE
@@ -1826,11 +1803,15 @@ ftfont_drive_otf (MFLTFont *font,
   if (len == 0)
     return from;
   OTF_tag_name (spec->script, script);
+
+  char langsysbuf[5];
   if (spec->langsys)
     {
-      langsys = alloca (5);
+      langsys = langsysbuf;
       OTF_tag_name (spec->langsys, langsys);
     }
+
+  USE_SAFE_ALLOCA;
   for (i = 0; i < 2; i++)
     {
       char *p;
@@ -1838,10 +1819,11 @@ ftfont_drive_otf (MFLTFont *font,
       if (spec->features[i] && spec->features[i][1] != 0xFFFFFFFF)
        {
          for (j = 0; spec->features[i][j]; j++);
+         SAFE_NALLOCA (p, 6, j);
          if (i == 0)
-           p = gsub_features = alloca (6 * j);
+           gsub_features = p;
          else
-           p = gpos_features = alloca (6 * j);
+           gpos_features = p;
          for (j = 0; spec->features[i][j]; j++)
            {
              if (spec->features[i][j] == 0xFFFFFFFF)
@@ -1873,7 +1855,10 @@ ftfont_drive_otf (MFLTFont *font,
                                   gsub_features) < 0)
        goto simple_copy;
       if (out->allocated < out->used + otf_gstring.used)
-       return -2;
+       {
+         SAFE_FREE ();
+         return -2;
+       }
       features = otf->gsub->FeatureList.Feature;
       for (i = 0, otfg = otf_gstring.glyphs; i < otf_gstring.used; )
        {
@@ -1962,7 +1947,10 @@ ftfont_drive_otf (MFLTFont *font,
   else if (out)
     {
       if (out->allocated < out->used + len)
-       return -2;
+       {
+         SAFE_FREE ();
+         return -2;
+       }
       for (i = 0; i < len; i++)
        out->glyphs[out->used++] = in->glyphs[from + i];
     }
@@ -1974,7 +1962,10 @@ ftfont_drive_otf (MFLTFont *font,
 
       if (OTF_drive_gpos_with_log (otf, &otf_gstring, script, langsys,
                                   gpos_features) < 0)
-       return to;
+       {
+         SAFE_FREE ();
+         return to;
+       }
       features = otf->gpos->FeatureList.Feature;
       x_ppem = ft_face->size->metrics.x_ppem;
       y_ppem = ft_face->size->metrics.y_ppem;
@@ -2096,7 +2087,10 @@ ftfont_drive_otf (MFLTFont *font,
     {
       if (OTF_drive_gpos_with_log (otf, &otf_gstring, script, langsys,
                                   gpos_features) < 0)
-       return to;
+       {
+         SAFE_FREE ();
+         return to;
+       }
       features = otf->gpos->FeatureList.Feature;
       for (i = 0, otfg = otf_gstring.glyphs; i < otf_gstring.used;
           i++, otfg++)
@@ -2116,9 +2110,11 @@ ftfont_drive_otf (MFLTFont *font,
              }
          }
     }
+  SAFE_FREE ();
   return to;
 
  simple_copy:
+  SAFE_FREE ();
   if (! out)
     return to;
   if (out->allocated < out->used + len)
@@ -2156,11 +2152,15 @@ ftfont_drive_otf (MFLTFont *font, MFLTOtfSpec *spec, MFLTGlyphString *in,
   if (len == 0)
     return from;
   OTF_tag_name (spec->script, script);
+
+  char langsysbuf[5];
   if (spec->langsys)
     {
-      langsys = alloca (5);
+      langsys = langsysbuf;
       OTF_tag_name (spec->langsys, langsys);
     }
+
+  USE_SAFE_ALLOCA;
   for (i = 0; i < 2; i++)
     {
       char *p;
@@ -2168,10 +2168,11 @@ ftfont_drive_otf (MFLTFont *font, MFLTOtfSpec *spec, MFLTGlyphString *in,
       if (spec->features[i] && spec->features[i][1] != 0xFFFFFFFF)
        {
          for (j = 0; spec->features[i][j]; j++);
+         SAFE_NALLOCA (p, 6, j);
          if (i == 0)
-           p = gsub_features = alloca (6 * j);
+           gsub_features = p;
          else
-           p = gpos_features = alloca (6 * j);
+           gpos_features = p;
          for (j = 0; spec->features[i][j]; j++)
            {
              if (spec->features[i][j] == 0xFFFFFFFF)
@@ -2203,7 +2204,10 @@ ftfont_drive_otf (MFLTFont *font, MFLTOtfSpec *spec, MFLTGlyphString *in,
          < 0)
        goto simple_copy;
       if (out->allocated < out->used + otf_gstring.used)
-       return -2;
+       {
+         SAFE_FREE ();
+         return -2;
+       }
       for (i = 0, otfg = otf_gstring.glyphs; i < otf_gstring.used; )
        {
          MFLTGlyph *g;
@@ -2254,7 +2258,10 @@ ftfont_drive_otf (MFLTFont *font, MFLTOtfSpec *spec, MFLTGlyphString *in,
   else
     {
       if (out->allocated < out->used + len)
-       return -2;
+       {
+         SAFE_FREE ();
+         return -2;
+       }
       for (i = 0; i < len; i++)
        out->glyphs[out->used++] = in->glyphs[from + i];
     }
@@ -2266,7 +2273,10 @@ ftfont_drive_otf (MFLTFont *font, MFLTOtfSpec *spec, MFLTGlyphString *in,
 
       if (OTF_drive_gpos (otf, &otf_gstring, script, langsys, gpos_features)
          < 0)
-       return to;
+       {
+         SAFE_FREE ();
+         return to;
+       }
 
       x_ppem = ft_face->size->metrics.x_ppem;
       y_ppem = ft_face->size->metrics.y_ppem;
@@ -2376,9 +2386,11 @@ ftfont_drive_otf (MFLTFont *font, MFLTOtfSpec *spec, MFLTGlyphString *in,
            base = g;
        }
     }
+  SAFE_FREE ();
   return to;
 
  simple_copy:
+  SAFE_FREE ();
   if (out->allocated < out->used + len)
     return -2;
   font->get_metrics (font, in, from, to);
@@ -2601,46 +2613,6 @@ ftfont_variation_glyphs (struct font *font, int c, unsigned variations[256])
 #endif /* HAVE_OTF_GET_VARIATION_GLYPHS */
 #endif /* HAVE_LIBOTF */
 
-Lisp_Object
-ftfont_font_format (FcPattern *pattern, Lisp_Object filename)
-{
-  FcChar8 *str;
-
-#ifdef FC_FONTFORMAT
-  if (pattern)
-    {
-      if (FcPatternGetString (pattern, FC_FONTFORMAT, 0, &str) != FcResultMatch)
-       return Qnil;
-      if (strcmp ((char *) str, "TrueType") == 0)
-       return intern ("truetype");
-      if (strcmp ((char *) str, "Type 1") == 0)
-       return intern ("type1");
-      if (strcmp ((char *) str, "PCF") == 0)
-       return intern ("pcf");
-      if (strcmp ((char *) str, "BDF") == 0)
-       return intern ("bdf");
-    }
-#endif  /* FC_FONTFORMAT */
-  if (STRINGP (filename))
-    {
-      int len = SBYTES (filename);
-
-      if (len >= 4)
-       {
-         str = (FcChar8 *) (SDATA (filename) + len - 4);
-         if (xstrcasecmp ((char *) str, ".ttf") == 0)
-           return intern ("truetype");
-         if (xstrcasecmp ((char *) str, ".pfb") == 0)
-           return intern ("type1");
-         if (xstrcasecmp ((char *) str, ".pcf") == 0)
-           return intern ("pcf");
-         if (xstrcasecmp ((char *) str, ".bdf") == 0)
-           return intern ("bdf");
-       }
-    }
-  return intern ("unknown");
-}
-
 static const char *const ftfont_booleans [] = {
   ":antialias",
   ":hinting",
index 8c8674f3440a6b3eb524a2c20c92ca0caa4130c0..210b634c0942befd5872cbcffca2cc9785c0594c 100644 (file)
@@ -36,7 +36,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #endif /* HAVE_M17N_FLT */
 #endif /* HAVE_LIBOTF */
 
-extern Lisp_Object ftfont_font_format (FcPattern *, Lisp_Object);
 extern FcCharSet *ftfont_get_fc_charset (Lisp_Object);
 
 #endif /* EMACS_FTFONT_H */
index 9db7cbceb66ae818828d6abb20755617d4692680..7e4608b9b855dfd1ab0b404a18ef4f33e50865c7 100644 (file)
@@ -37,9 +37,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 static Lisp_Object Qftx;
 
-#if defined HAVE_XFT || !defined HAVE_FREETYPE
-static
-#endif
 struct font_driver ftxfont_driver;
 
 struct ftxfont_frame_data
@@ -62,7 +59,7 @@ ftxfont_get_gcs (struct frame *f, unsigned long foreground, unsigned long backgr
   XColor color;
   XGCValues xgcv;
   int i;
-  struct ftxfont_frame_data *data = font_get_frame_data (f, &ftxfont_driver);
+  struct ftxfont_frame_data *data = font_get_frame_data (f, Qftx);
   struct ftxfont_frame_data *prev = NULL, *this = NULL, *new;
 
   if (data)
@@ -81,19 +78,11 @@ ftxfont_get_gcs (struct frame *f, unsigned long foreground, unsigned long backgr
        }
     }
 
-  new = malloc (sizeof *new);
-  if (! new)
-    return NULL;
+  new = xmalloc (sizeof *new);
   new->next = this;
   if (prev)
-    {
       prev->next = new;
-    }
-  else if (font_put_frame_data (f, &ftxfont_driver, new) < 0)
-    {
-      free (new);
-      return NULL;
-    }
+  font_put_frame_data (f, Qftx, new);
 
   new->colors[0].pixel = background;
   new->colors[1].pixel = foreground;
@@ -126,8 +115,8 @@ ftxfont_get_gcs (struct frame *f, unsigned long foreground, unsigned long backgr
       if (prev)
        prev->next = new->next;
       else if (data)
-       font_put_frame_data (f, &ftxfont_driver, new->next);
-      free (new);
+       font_put_frame_data (f, Qftx, new->next);
+      xfree (new);
       return NULL;
     }
   return new->gcs;
@@ -282,10 +271,11 @@ ftxfont_draw (struct glyph_string *s, int from, int to, int x, int y,
 
   n[0] = n[1] = n[2] = n[3] = n[4] = n[5] = n[6] = 0;
 
+  USE_SAFE_ALLOCA;
+  SAFE_NALLOCA (code, 1, len);
   block_input ();
   if (with_background)
     ftxfont_draw_background (f, font, s->gc, x, y, s->width);
-  code = alloca (sizeof (unsigned) * len);
   for (i = 0; i < len; i++)
     code[i] = ((XCHAR2B_BYTE1 (s->char2b + from + i) << 8)
               | XCHAR2B_BYTE2 (s->char2b + from + i));
@@ -333,6 +323,7 @@ ftxfont_draw (struct glyph_string *s, int from, int to, int x, int y,
     }
 
   unblock_input ();
+  SAFE_FREE ();
 
   return len;
 }
@@ -340,7 +331,7 @@ ftxfont_draw (struct glyph_string *s, int from, int to, int x, int y,
 static int
 ftxfont_end_for_frame (struct frame *f)
 {
-  struct ftxfont_frame_data *data = font_get_frame_data (f, &ftxfont_driver);
+  struct ftxfont_frame_data *data = font_get_frame_data (f, Qftx);
 
   block_input ();
   while (data)
@@ -350,11 +341,11 @@ ftxfont_end_for_frame (struct frame *f)
 
       for (i = 0; i < 6; i++)
        XFreeGC (FRAME_X_DISPLAY (f), data->gcs[i]);
-      free (data);
+      xfree (data);
       data = next;
     }
   unblock_input ();
-  font_put_frame_data (f, &ftxfont_driver, NULL);
+  font_put_frame_data (f, Qftx, NULL);
   return 0;
 }
 
index 0e90b5a349845c088b1fb7c2db02ceaf5c922d98..3456ff0ec6f5c100f443d4b5bdeca6efe9cda7e8 100644 (file)
@@ -21,13 +21,18 @@ License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 
 #include <config.h>
 
-#ifdef HAVE_PTHREAD
+#if defined HAVE_PTHREAD && !defined HYBRID_MALLOC
 #define USE_PTHREAD
 #endif
 
 #include <string.h>
 #include <limits.h>
 #include <stdint.h>
+
+#ifdef HYBRID_GET_CURRENT_DIR_NAME
+#undef get_current_dir_name
+#endif
+
 #include <unistd.h>
 
 #ifdef USE_PTHREAD
@@ -42,6 +47,41 @@ License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 extern void emacs_abort (void);
 #endif
 
+/* If HYBRID_MALLOC is defined, then temacs will use malloc,
+   realloc... as defined in this file (and renamed gmalloc,
+   grealloc... via the macros that follow).  The dumped emacs,
+   however, will use the system malloc, realloc....  In other source
+   files, malloc, realloc... are renamed hybrid_malloc,
+   hybrid_realloc... via macros in conf_post.h.  hybrid_malloc and
+   friends are wrapper functions defined later in this file.
+   aligned_alloc is defined as a macro only in alloc.c.
+
+   As of this writing (August 2014), Cygwin is the only platform on
+   which HYBRID_MACRO is defined.  Any other platform that wants to
+   define it will have to define the macros DUMPED and
+   ALLOCATED_BEFORE_DUMPING, defined below for Cygwin.  */
+#ifdef HYBRID_MALLOC
+#undef malloc
+#undef realloc
+#undef calloc
+#undef free
+#define malloc gmalloc
+#define realloc grealloc
+#define calloc gcalloc
+#define aligned_alloc galigned_alloc
+#define free gfree
+#endif  /* HYBRID_MALLOC */
+
+#ifdef CYGWIN
+extern void *bss_sbrk (ptrdiff_t size);
+extern int bss_sbrk_did_unexec;
+extern char bss_sbrk_buffer[];
+extern void *bss_sbrk_buffer_end;
+#define DUMPED bss_sbrk_did_unexec
+#define ALLOCATED_BEFORE_DUMPING(P) \
+  ((P) < bss_sbrk_buffer_end && (P) >= (void *) bss_sbrk_buffer)
+#endif
+
 #ifdef __cplusplus
 extern "C"
 {
@@ -51,12 +91,12 @@ extern "C"
 
 
 /* Allocate SIZE bytes of memory.  */
-extern void *malloc (size_t size);
+extern void *malloc (size_t size) ATTRIBUTE_MALLOC_SIZE ((1));
 /* Re-allocate the previously allocated block
    in ptr, making the new block SIZE bytes long.  */
-extern void *realloc (void *ptr, size_t size);
+extern void *realloc (void *ptr, size_t size) ATTRIBUTE_ALLOC_SIZE ((2));
 /* Allocate NMEMB elements of SIZE bytes each, all initialized to 0.  */
-extern void *calloc (size_t nmemb, size_t size);
+extern void *calloc (size_t nmemb, size_t size) ATTRIBUTE_MALLOC_SIZE ((1,2));
 /* Free a block allocated by `malloc', `realloc' or `calloc'.  */
 extern void free (void *ptr);
 
@@ -306,22 +346,6 @@ License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 
 #include <errno.h>
 
-/* On Cygwin there are two heaps.  temacs uses the static heap
-   (defined in sheap.c and managed with bss_sbrk), and the dumped
-   emacs uses the Cygwin heap (managed with sbrk).  When emacs starts
-   on Cygwin, it reinitializes malloc, and we save the old info for
-   use by free and realloc if they're called with a pointer into the
-   static heap.
-
-   Currently (2011-08-16) the Cygwin build doesn't use ralloc.c; if
-   this is changed in the future, we'll have to similarly deal with
-   reinitializing ralloc. */
-#ifdef CYGWIN
-extern void *bss_sbrk (ptrdiff_t size);
-extern int bss_sbrk_did_unexec;
-char *bss_sbrk_heapbase;       /* _heapbase for static heap */
-malloc_info *bss_sbrk_heapinfo;        /* _heapinfo for static heap */
-#endif
 void *(*__morecore) (ptrdiff_t size) = __default_morecore;
 
 /* Debugging hook for `malloc'.  */
@@ -490,18 +514,8 @@ register_heapinfo (void)
 }
 
 #ifdef USE_PTHREAD
-/* On Cygwin prior to 1.7.31, pthread_mutexes were ERRORCHECK mutexes
-   by default.  When the default changed to NORMAL in Cygwin-1.7.31,
-   deadlocks occurred (bug#18222).  As a temporary workaround, we
-   explicitly set the mutexes to be of ERRORCHECK type, restoring the
-   previous behavior.  */
-#ifdef CYGWIN
-pthread_mutex_t _malloc_mutex = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;
-pthread_mutex_t _aligned_blocks_mutex = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;
-#else  /* not CYGWIN */
 pthread_mutex_t _malloc_mutex = PTHREAD_MUTEX_INITIALIZER;
 pthread_mutex_t _aligned_blocks_mutex = PTHREAD_MUTEX_INITIALIZER;
-#endif /* not CYGWIN */
 int _malloc_thread_enabled_p;
 
 static void
@@ -536,17 +550,8 @@ malloc_enable_thread (void)
      initialized mutexes when they are used first.  To avoid such a
      situation, we initialize mutexes here while their use is
      disabled in malloc etc.  */
-#ifdef CYGWIN
-  /* Use ERRORCHECK mutexes; see comment above. */
-  pthread_mutexattr_t attr;
-  pthread_mutexattr_init (&attr);
-  pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_ERRORCHECK);
-  pthread_mutex_init (&_malloc_mutex, &attr);
-  pthread_mutex_init (&_aligned_blocks_mutex, &attr);
-#else  /* not CYGWIN */
   pthread_mutex_init (&_malloc_mutex, NULL);
   pthread_mutex_init (&_aligned_blocks_mutex, NULL);
-#endif /* not CYGWIN */
   pthread_atfork (malloc_atfork_handler_prepare,
                  malloc_atfork_handler_parent,
                  malloc_atfork_handler_child);
@@ -561,16 +566,6 @@ malloc_initialize_1 (void)
   mcheck (NULL);
 #endif
 
-#ifdef CYGWIN
-  if (bss_sbrk_did_unexec)
-    /* we're reinitializing the dumped emacs */
-    {
-      bss_sbrk_heapbase = _heapbase;
-      bss_sbrk_heapinfo = _heapinfo;
-      memset (_fraghead, 0, BLOCKLOG * sizeof (struct list));
-    }
-#endif
-
   if (__malloc_initialize_hook)
     (*__malloc_initialize_hook) ();
 
@@ -1027,12 +1022,6 @@ _free_internal_nolock (void *ptr)
   if (ptr == NULL)
     return;
 
-#ifdef CYGWIN
-  if ((char *) ptr < _heapbase)
-    /* We're being asked to free something in the static heap. */
-    return;
-#endif
-
   PROTECT_MALLOC_STATE (0);
 
   LOCK_ALIGNED_BLOCKS ();
@@ -1314,30 +1303,7 @@ License along with this library.  If not, see <http://www.gnu.org/licenses/>.
    or (US mail) as Mike Haertel c/o Free Software Foundation.  */
 
 #ifndef min
-#define min(A, B) ((A) < (B) ? (A) : (B))
-#endif
-
-/* On Cygwin the dumped emacs may try to realloc storage allocated in
-   the static heap.  We just malloc space in the new heap and copy the
-   data.  */
-#ifdef CYGWIN
-void *
-special_realloc (void *ptr, size_t size)
-{
-  void *result;
-  int type;
-  size_t block, oldsize;
-
-  block = ((char *) ptr - bss_sbrk_heapbase) / BLOCKSIZE + 1;
-  type = bss_sbrk_heapinfo[block].busy.type;
-  oldsize =
-    type == 0 ? bss_sbrk_heapinfo[block].busy.info.size * BLOCKSIZE
-    : (size_t) 1 << type;
-  result = _malloc_internal_nolock (size);
-  if (result)
-    return memcpy (result, ptr, min (oldsize, size));
-  return result;
-}
+#define min(a, b) ((a) < (b) ? (a) : (b))
 #endif
 
 /* Debugging hook for realloc.  */
@@ -1364,12 +1330,6 @@ _realloc_internal_nolock (void *ptr, size_t size)
   else if (ptr == NULL)
     return _malloc_internal_nolock (size);
 
-#ifdef CYGWIN
-  if ((char *) ptr < _heapbase)
-    /* ptr points into the static heap */
-    return special_realloc (ptr, size);
-#endif
-
   block = BLOCK (ptr);
 
   PROTECT_MALLOC_STATE (0);
@@ -1566,7 +1526,7 @@ __default_morecore (ptrdiff_t increment)
 {
   void *result;
 #if defined (CYGWIN)
-  if (!bss_sbrk_did_unexec)
+  if (!DUMPED)
     {
       return bss_sbrk (increment);
     }
@@ -1689,6 +1649,9 @@ memalign (size_t alignment, size_t size)
   return aligned_alloc (alignment, size);
 }
 
+/* If HYBRID_MALLOC is defined, we may want to use the system
+   posix_memalign below.  */
+#ifndef HYBRID_MALLOC
 int
 posix_memalign (void **memptr, size_t alignment, size_t size)
 {
@@ -1707,6 +1670,7 @@ posix_memalign (void **memptr, size_t alignment, size_t size)
 
   return 0;
 }
+#endif
 
 /* Allocate memory on a page boundary.
    Copyright (C) 1991, 92, 93, 94, 96 Free Software Foundation, Inc.
@@ -1747,6 +1711,113 @@ valloc (size_t size)
   return aligned_alloc (pagesize, size);
 }
 
+#ifdef HYBRID_MALLOC
+#undef malloc
+#undef realloc
+#undef calloc
+#undef aligned_alloc
+#undef free
+
+/* Declare system malloc and friends.  */
+extern void *malloc (size_t size);
+extern void *realloc (void *ptr, size_t size);
+extern void *calloc (size_t nmemb, size_t size);
+extern void free (void *ptr);
+#ifdef HAVE_ALIGNED_ALLOC
+extern void *aligned_alloc (size_t alignment, size_t size);
+#elif defined HAVE_POSIX_MEMALIGN
+extern int posix_memalign (void **memptr, size_t alignment, size_t size);
+#endif
+
+/* See the comments near the beginning of this file for explanations
+   of the following functions. */
+
+void *
+hybrid_malloc (size_t size)
+{
+  if (DUMPED)
+    return malloc (size);
+  return gmalloc (size);
+}
+
+void *
+hybrid_calloc (size_t nmemb, size_t size)
+{
+  if (DUMPED)
+    return calloc (nmemb, size);
+  return gcalloc (nmemb, size);
+}
+
+void
+hybrid_free (void *ptr)
+{
+  if (!DUMPED)
+    gfree (ptr);
+  else if (!ALLOCATED_BEFORE_DUMPING (ptr))
+    free (ptr);
+  /* Otherwise the dumped emacs is trying to free something allocated
+     before dumping; do nothing.  */
+  return;
+}
+
+#if defined HAVE_ALIGNED_ALLOC || defined HAVE_POSIX_MEMALIGN
+void *
+hybrid_aligned_alloc (size_t alignment, size_t size)
+{
+  if (!DUMPED)
+    return galigned_alloc (alignment, size);
+  /* The following is copied from alloc.c */
+#ifdef HAVE_ALIGNED_ALLOC
+  return aligned_alloc (alignment, size);
+#else  /* HAVE_POSIX_MEMALIGN */
+  void *p;
+  return posix_memalign (&p, alignment, size) == 0 ? p : 0;
+#endif
+}
+#endif
+  
+void *
+hybrid_realloc (void *ptr, size_t size)
+{
+  void *result;
+  int type;
+  size_t block, oldsize;
+
+  if (!DUMPED)
+    return grealloc (ptr, size);
+  if (!ALLOCATED_BEFORE_DUMPING (ptr))
+    return realloc (ptr, size);
+
+  /* The dumped emacs is trying to realloc storage allocated before
+   dumping.  We just malloc new space and copy the data.  */
+  if (size == 0 || ptr == NULL)
+    return malloc (size);
+  block = ((char *) ptr - _heapbase) / BLOCKSIZE + 1;
+  type = _heapinfo[block].busy.type;
+  oldsize =
+    type == 0 ? _heapinfo[block].busy.info.size * BLOCKSIZE
+    : (size_t) 1 << type;
+  result = malloc (size);
+  if (result)
+    return memcpy (result, ptr, min (oldsize, size));
+  return result;
+}
+
+#ifdef HYBRID_GET_CURRENT_DIR_NAME
+/* Defined in sysdep.c.  */
+char *gget_current_dir_name (void);
+
+char *
+hybrid_get_current_dir_name (void)
+{
+  if (DUMPED)
+    return get_current_dir_name ();
+  return gget_current_dir_name ();
+}
+#endif
+
+#endif /* HYBRID_MALLOC */
+
 #ifdef GC_MCHECK
 
 /* Standard debugging hooks for `malloc'.
index 03c29d03014646286896b38e98606bdfe0eaf720..5d48f78a6d4c53d9d7d7bda443f6072cf441c50e 100644 (file)
@@ -56,7 +56,7 @@ static Lisp_Object QCgnutls_bootprop_verify_error;
 static Lisp_Object QCgnutls_bootprop_callbacks_verify;
 
 static void gnutls_log_function (int, const char *);
-static void gnutls_log_function2 (int, const char*, const char*);
+static void gnutls_log_function2 (int, const char *, const char *);
 #ifdef HAVE_GNUTLS3
 static void gnutls_audit_log_function (gnutls_session_t, const char *);
 #endif
@@ -267,7 +267,7 @@ init_gnutls_functions (void)
 #ifdef HAVE_GNUTLS3
 /* Function to log a simple audit message.  */
 static void
-gnutls_audit_log_function (gnutls_session_t session, const charstring)
+gnutls_audit_log_function (gnutls_session_t session, const char *string)
 {
   if (global_gnutls_log_level >= 1)
     {
@@ -278,21 +278,21 @@ gnutls_audit_log_function (gnutls_session_t session, const char* string)
 
 /* Function to log a simple message.  */
 static void
-gnutls_log_function (int level, const charstring)
+gnutls_log_function (int level, const char *string)
 {
   message ("gnutls.c: [%d] %s", level, string);
 }
 
 /* Function to log a message and a string.  */
 static void
-gnutls_log_function2 (int level, const char* string, const char* extra)
+gnutls_log_function2 (int level, const char *string, const char *extra)
 {
   message ("gnutls.c: [%d] %s %s", level, string, extra);
 }
 
 /* Function to log a message and an integer.  */
 static void
-gnutls_log_function2i (int level, const charstring, int extra)
+gnutls_log_function2i (int level, const char *string, int extra)
 {
   message ("gnutls.c: [%d] %s %d", level, string, extra);
 }
@@ -336,8 +336,8 @@ emacs_gnutls_handshake (struct Lisp_Process *proc)
         in.  For an Emacs process socket, infd and outfd are the
         same but we use this two-argument version for clarity.  */
       fn_gnutls_transport_set_ptr2 (state,
-                                   (gnutls_transport_ptr_t) (long) proc->infd,
-                                   (gnutls_transport_ptr_t) (long) proc->outfd);
+                                   (void *) (intptr_t) proc->infd,
+                                   (void *) (intptr_t) proc->outfd);
 #endif
 
       proc->gnutls_initstage = GNUTLS_STAGE_TRANSPORT_POINTERS_SET;
@@ -794,7 +794,7 @@ one trustfile (usually a CA bundle).  */)
   Lisp_Object global_init;
   char const *priority_string_ptr = "NORMAL"; /* default priority string.  */
   unsigned int peer_verification;
-  charc_hostname;
+  char *c_hostname;
 
   /* Placeholders for the property list elements.  */
   Lisp_Object priority_string;
index cebff68614ff7a8cfbfd2e97294a5d2720bc4301..445e59c335def0d3f3b98873cbd8c21c8fbbf17d 100644 (file)
@@ -30,6 +30,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "blockinput.h"
 #include "syssignal.h"
 #include "window.h"
+#include "buffer.h"
 #include "gtkutil.h"
 #include "termhooks.h"
 #include "keyboard.h"
@@ -114,6 +115,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #define XG_BIN_CHILD(x) gtk_bin_get_child (GTK_BIN (x))
 
 static void update_theme_scrollbar_width (void);
+static void update_theme_scrollbar_height (void);
 
 #define TB_INFO_KEY "xg_frame_tb_info"
 struct xg_frame_tb_info
@@ -221,57 +223,6 @@ xg_display_close (Display *dpy)
 /***********************************************************************
                       Utility functions
  ***********************************************************************/
-/* The next two variables and functions are taken from lwlib.  */
-static widget_value *widget_value_free_list;
-static int malloc_cpt;
-
-/* Allocate a widget_value structure, either by taking one from the
-   widget_value_free_list or by malloc:ing a new one.
-
-   Return a pointer to the allocated structure.  */
-
-widget_value *
-malloc_widget_value (void)
-{
-  widget_value *wv;
-  if (widget_value_free_list)
-    {
-      wv = widget_value_free_list;
-      widget_value_free_list = wv->free_list;
-      wv->free_list = 0;
-    }
-  else
-    {
-      wv = xmalloc (sizeof *wv);
-      malloc_cpt++;
-    }
-  memset (wv, 0, sizeof (widget_value));
-  return wv;
-}
-
-/* This is analogous to free.  It frees only what was allocated
-   by malloc_widget_value, and no substructures.  */
-
-void
-free_widget_value (widget_value *wv)
-{
-  if (wv->free_list)
-    emacs_abort ();
-
-  if (malloc_cpt > 25)
-    {
-      /* When the number of already allocated cells is too big,
-        We free it.  */
-      xfree (wv);
-      malloc_cpt--;
-    }
-  else
-    {
-      wv->free_list = widget_value_free_list;
-      widget_value_free_list = wv;
-    }
-}
-
 
 /* Create and return the cursor to be used for popup menus and
    scroll bars on display DPY.  */
@@ -557,16 +508,16 @@ get_utf8_string (const char *str)
              && err->code == G_CONVERT_ERROR_ILLEGAL_SEQUENCE)
         {
           memcpy (up, p, bytes_written);
-          sprintf (up + bytes_written, "\\%03o", p[bytes_written]);
-          up += bytes_written+4;
-          p += bytes_written+1;
+          up += bytes_written;
+          up += sprintf (up, "\\%03o", p[bytes_written]);
+          p += bytes_written + 1;
           g_error_free (err);
           err = NULL;
         }
 
       if (cp)
         {
-          strcat (utf8_str, cp);
+          strcpy (up, cp);
           g_free (cp);
         }
       if (err)
@@ -871,7 +822,7 @@ xg_set_geometry (struct frame *f)
 /* Clear under internal border if any.  As we use a mix of Gtk+ and X calls
    and use a GtkFixed widget, this doesn't happen automatically.  */
 
-static void
+void
 xg_clear_under_internal_border (struct frame *f)
 {
   if (FRAME_INTERNAL_BORDER_WIDTH (f) > 0)
@@ -933,6 +884,8 @@ xg_frame_resized (struct frame *f, int pixelwidth, int pixelheight)
       change_frame_size (f, width, height, 0, 1, 0, 1);
       SET_FRAME_GARBAGED (f);
       cancel_mouse_face (f);
+
+      do_pending_window_change (0);
     }
 }
 
@@ -977,7 +930,7 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
       x_wait_for_event (f, ConfigureNotify);
     }
   else
-    change_frame_size (f, width, height, 0, 1, 0, 1);
+    adjust_frame_size (f, -1, -1, 5, 0);
 }
 
 /* Handle height/width changes (i.e. add/remove/move menu/toolbar).
@@ -1067,6 +1020,7 @@ style_changed_cb (GObject *go,
   kbd_buffer_store_event (&event);
 
   update_theme_scrollbar_width ();
+  update_theme_scrollbar_height ();
 
   /* If scroll bar width changed, we need set the new size on all frames
      on this display.  */
@@ -1081,6 +1035,7 @@ style_changed_cb (GObject *go,
               && FRAME_X_DISPLAY (f) == dpy)
             {
               x_set_scroll_bar_default_width (f);
+              x_set_scroll_bar_default_height (f);
               xg_frame_set_char_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f));
             }
         }
@@ -1364,13 +1319,12 @@ x_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
   base_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1)
     + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f);
 
-  check_frame_size (f, &min_cols, &min_rows, 0);
   if (min_cols > 0) --min_cols; /* We used one col in base_width = ... 1); */
   if (min_rows > 0) --min_rows; /* We used one row in base_height = ... 1); */
 
   size_hints.base_width = base_width;
   size_hints.base_height = base_height;
-  size_hints.min_width  = base_width + min_cols * FRAME_COLUMN_WIDTH (f);;
+  size_hints.min_width  = base_width + min_cols * FRAME_COLUMN_WIDTH (f);
   size_hints.min_height = base_height + min_rows * FRAME_LINE_HEIGHT (f);
 
   /* These currently have a one to one mapping with the X values, but I
@@ -1587,6 +1541,7 @@ create_dialog (widget_value *wv,
           gtk_box_set_spacing (wvbox, req.height);
          if (item->value && strlen (item->value) > 0)
             button_spacing = 2*req.width/strlen (item->value);
+          if (button_spacing < 10) button_spacing = 10;
         }
       else
         {
@@ -1603,11 +1558,6 @@ create_dialog (widget_value *wv,
             {
               if (make_two_rows)
                 cur_box = GTK_BOX (whbox_down);
-              else
-                gtk_box_pack_start (cur_box,
-                                    gtk_label_new (""),
-                                    TRUE, TRUE,
-                                    button_spacing);
             }
         }
 
@@ -2604,11 +2554,18 @@ create_menus (widget_value *data,
 #ifdef HAVE_GTK_TEAROFF_MENU_ITEM_NEW
   if (! menu_bar_p && add_tearoff_p)
     {
-      GtkWidget *tearoff = gtk_tearoff_menu_item_new ();
-      gtk_menu_shell_append (GTK_MENU_SHELL (wmenu), tearoff);
+      // Only add tearoff if menu is empty.
+      GList *list = gtk_container_get_children (GTK_CONTAINER (wmenu));
+      if (! list)
+        {
+          GtkWidget *tearoff = gtk_tearoff_menu_item_new ();
+          gtk_menu_shell_append (GTK_MENU_SHELL (wmenu), tearoff);
 
-      g_signal_connect (G_OBJECT (tearoff), "activate",
-                        G_CALLBACK (tearoff_activate), 0);
+          g_signal_connect (G_OBJECT (tearoff), "activate",
+                            G_CALLBACK (tearoff_activate), 0);
+        }
+      else
+        g_list_free (list);
     }
 #endif
 
@@ -3138,7 +3095,6 @@ xg_update_submenu (GtkWidget *submenu,
   GList *list = 0;
   GList *iter;
   widget_value *cur;
-  bool has_tearoff_p = 0;
   GList *first_radio = 0;
 
   if (submenu)
@@ -3154,7 +3110,6 @@ xg_update_submenu (GtkWidget *submenu,
   /* Skip tearoff items, they have no counterpart in val.  */
     if (GTK_IS_TEAROFF_MENU_ITEM (w))
       {
-        has_tearoff_p = 1;
         iter = g_list_next (iter);
         if (iter) w = GTK_WIDGET (iter->data);
         else break;
@@ -3248,7 +3203,7 @@ xg_update_submenu (GtkWidget *submenu,
                              highlight_cb,
                              0,
                              0,
-                             ! has_tearoff_p,
+                             1,
                              submenu,
                              cl_data,
                              0);
@@ -3424,7 +3379,7 @@ xg_event_is_for_menubar (struct frame *f, const XEvent *event)
   if (! (event->xbutton.x >= 0
          && event->xbutton.x < FRAME_PIXEL_WIDTH (f)
          && event->xbutton.y >= 0
-         && event->xbutton.y < f->output_data.x->menubar_height
+         && event->xbutton.y < FRAME_MENUBAR_HEIGHT (f)
          && event->xbutton.same_screen))
     return 0;
 
@@ -3469,9 +3424,9 @@ xg_event_is_for_menubar (struct frame *f, const XEvent *event)
 
 bool xg_ignore_gtk_scrollbar;
 
-/* The width of the scroll bar for the current theme.  */
-
+/* Width and height of scroll bars for the current theme.  */
 static int scroll_bar_width_for_theme;
+static int scroll_bar_height_for_theme;
 
 /* Xlib's `Window' fits in 32 bits.  But we want to store pointers, and they
    may be larger than 32 bits.  Keep a mapping from integer index to widget
@@ -3574,12 +3529,41 @@ update_theme_scrollbar_width (void)
   scroll_bar_width_for_theme = w;
 }
 
+static void
+update_theme_scrollbar_height (void)
+{
+#ifdef HAVE_GTK3
+  GtkAdjustment *hadj;
+#else
+  GtkObject *hadj;
+#endif
+  GtkWidget *wscroll;
+  int w = 0, b = 0;
+
+  hadj = gtk_adjustment_new (YG_SB_MIN, YG_SB_MIN, YG_SB_MAX, 0.1, 0.1, 0.1);
+  wscroll = gtk_scrollbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_ADJUSTMENT (hadj));
+  g_object_ref_sink (G_OBJECT (wscroll));
+  gtk_widget_style_get (wscroll, "slider-width", &w, "trough-border", &b, NULL);
+  gtk_widget_destroy (wscroll);
+  g_object_unref (G_OBJECT (wscroll));
+  w += 2*b;
+  if (w < 12) w = 12;
+  scroll_bar_height_for_theme = w;
+}
+
 int
 xg_get_default_scrollbar_width (void)
 {
   return scroll_bar_width_for_theme;
 }
 
+int
+xg_get_default_scrollbar_height (void)
+{
+  /* Apparently there's no default height for themes.  */
+  return scroll_bar_width_for_theme;
+}
+
 /* Return the scrollbar id for X Window WID on display DPY.
    Return -1 if WID not in id_to_widget.  */
 
@@ -3678,6 +3662,74 @@ xg_create_scroll_bar (struct frame *f,
   xg_set_cursor (webox, FRAME_DISPLAY_INFO (f)->xg_cursor);
 
   bar->x_window = scroll_id;
+  bar->horizontal = 0;
+}
+
+/* Create a horizontal scroll bar widget for frame F.  Store the scroll
+   bar in BAR.  SCROLL_CALLBACK is the callback to invoke when the value
+   of the bar changes.  END_CALLBACK is the callback to invoke when
+   scrolling ends.  SCROLL_BAR_NAME is the name we use for the scroll
+   bar.  Can be used to set resources for the widget.  */
+
+void
+xg_create_horizontal_scroll_bar (struct frame *f,
+                                struct scroll_bar *bar,
+                                GCallback scroll_callback,
+                                GCallback end_callback,
+                                const char *scroll_bar_name)
+{
+  GtkWidget *wscroll;
+  GtkWidget *webox;
+  intptr_t scroll_id;
+#ifdef HAVE_GTK3
+  GtkAdjustment *hadj;
+#else
+  GtkObject *hadj;
+#endif
+
+  /* Page, step increment values are not so important here, they
+     will be corrected in x_set_toolkit_scroll_bar_thumb. */
+  hadj = gtk_adjustment_new (YG_SB_MIN, YG_SB_MIN, YG_SB_MAX,
+                             0.1, 0.1, 0.1);
+
+  wscroll = gtk_scrollbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_ADJUSTMENT (hadj));
+  webox = gtk_event_box_new ();
+  gtk_widget_set_name (wscroll, scroll_bar_name);
+#ifndef HAVE_GTK3
+  gtk_range_set_update_policy (GTK_RANGE (wscroll), GTK_UPDATE_CONTINUOUS);
+#endif
+  g_object_set_data (G_OBJECT (wscroll), XG_FRAME_DATA, (gpointer)f);
+
+  scroll_id = xg_store_widget_in_map (wscroll);
+
+  g_signal_connect (G_OBJECT (wscroll),
+                    "destroy",
+                    G_CALLBACK (xg_gtk_scroll_destroy),
+                    (gpointer) scroll_id);
+  g_signal_connect (G_OBJECT (wscroll),
+                    "change-value",
+                    scroll_callback,
+                    (gpointer) bar);
+  g_signal_connect (G_OBJECT (wscroll),
+                    "button-release-event",
+                    end_callback,
+                    (gpointer) bar);
+
+  /* The scroll bar widget does not draw on a window of its own.  Instead
+     it draws on the parent window, in this case the edit widget.  So
+     whenever the edit widget is cleared, the scroll bar needs to redraw
+     also, which causes flicker.  Put an event box between the edit widget
+     and the scroll bar, so the scroll bar instead draws itself on the
+     event box window.  */
+  gtk_fixed_put (GTK_FIXED (f->output_data.x->edit_widget), webox, -1, -1);
+  gtk_container_add (GTK_CONTAINER (webox), wscroll);
+
+
+  /* Set the cursor to an arrow.  */
+  xg_set_cursor (webox, FRAME_DISPLAY_INFO (f)->xg_cursor);
+
+  bar->x_window = scroll_id;
+  bar->horizontal = 1;
 }
 
 /* Remove the scroll bar represented by SCROLLBAR_ID from the frame F.  */
@@ -3760,6 +3812,73 @@ xg_update_scrollbar_pos (struct frame *f,
     }
 }
 
+
+/* Update the position of the horizontal scroll bar represented by SCROLLBAR_ID
+   in frame F.
+   TOP/LEFT are the new pixel positions where the bar shall appear.
+   WIDTH, HEIGHT is the size in pixels the bar shall have.  */
+
+void
+xg_update_horizontal_scrollbar_pos (struct frame *f,
+                                   ptrdiff_t scrollbar_id,
+                                   int top,
+                                   int left,
+                                   int width,
+                                   int height)
+{
+
+  GtkWidget *wscroll = xg_get_widget_from_map (scrollbar_id);
+
+  if (wscroll)
+    {
+      GtkWidget *wfixed = f->output_data.x->edit_widget;
+      GtkWidget *wparent = gtk_widget_get_parent (wscroll);
+      gint msl;
+
+      /* Clear out old position.  */
+      int oldx = -1, oldy = -1, oldw, oldh;
+      if (gtk_widget_get_parent (wparent) == wfixed)
+        {
+          gtk_container_child_get (GTK_CONTAINER (wfixed), wparent,
+                                   "x", &oldx, "y", &oldy, NULL);
+          gtk_widget_get_size_request (wscroll, &oldw, &oldh);
+        }
+
+      /* Move and resize to new values.  */
+      gtk_fixed_move (GTK_FIXED (wfixed), wparent, left, top);
+      gtk_widget_style_get (wscroll, "min-slider-length", &msl, NULL);
+      if (msl > width)
+        {
+          /* No room.  Hide scroll bar as some themes output a warning if
+             the width is less than the min size.  */
+          gtk_widget_hide (wparent);
+          gtk_widget_hide (wscroll);
+        }
+      else
+        {
+          gtk_widget_show_all (wparent);
+          gtk_widget_set_size_request (wscroll, width, height);
+        }
+      gtk_widget_queue_draw (wfixed);
+      gdk_window_process_all_updates ();
+      if (oldx != -1 && oldw > 0 && oldh > 0)
+       /* Clear under old scroll bar position.  This must be done after
+          the gtk_widget_queue_draw and gdk_window_process_all_updates
+          above.  */
+       x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+                     oldx, oldy, oldw, oldh);
+
+      /* GTK does not redraw until the main loop is entered again, but
+         if there are no X events pending we will not enter it.  So we sync
+         here to get some events.  */
+
+      x_sync (f);
+      SET_FRAME_GARBAGED (f);
+      cancel_mouse_face (f);
+    }
+}
+
+
 /* Get the current value of the range, truncated to an integer.  */
 
 static int
@@ -3854,6 +3973,48 @@ xg_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar,
     }
 }
 
+/* Set the thumb size and position of horizontal scroll bar BAR.  We are
+   currently displaying PORTION out of a whole WHOLE, and our position
+   POSITION.  */
+void
+xg_set_toolkit_horizontal_scroll_bar_thumb (struct scroll_bar *bar,
+                                           int portion,
+                                           int position,
+                                           int whole)
+{
+  GtkWidget *wscroll = xg_get_widget_from_map (bar->x_window);
+
+  if (wscroll && bar->dragging == -1)
+    {
+      GtkAdjustment *adj;
+      int lower = 0;
+      int upper = max (whole - 1, 0);
+      int pagesize = min (upper, max (portion, 0));
+      int value = max (0, min (position, upper - pagesize));
+      /* These should be set to something more <portion, whole>
+        related.  */
+      int page_increment = 4;
+      int step_increment = 1;
+
+      block_input ();
+      adj = gtk_range_get_adjustment (GTK_RANGE (wscroll));
+#if GTK_CHECK_VERSION (2, 3, 16)
+      gtk_adjustment_configure (adj, (gdouble) value, (gdouble) lower,
+                               (gdouble) upper, (gdouble) step_increment,
+                               (gdouble) page_increment, (gdouble) pagesize);
+#else
+      gtk_adjustment_set_lower (adj, (gdouble) lower);
+      gtk_adjustment_set_upper (adj, (gdouble) upper);
+      gtk_adjustment_set_page_size (adj, (gdouble) pagesize);
+      gtk_adjustment_set_value (adj, (gdouble) value);
+      gtk_adjustment_set_page_increment (adj, (gdouble) page_increment);
+      gtk_adjustment_set_step_increment (adj, (gdouble) step_increment);
+#endif
+      gtk_adjustment_changed (adj);
+      unblock_input ();
+    }
+}
+
 /* Return true if EVENT is for a scroll bar in frame F.
    When the same X window is used for several Gtk+ widgets, we cannot
    say for sure based on the X window alone if an event is for the
@@ -4915,7 +5076,7 @@ update_frame_tool_bar (struct frame *f)
   if (f->n_tool_bar_items != 0)
     {
       if (! x->toolbar_is_packed)
-        xg_pack_tool_bar (f, f->tool_bar_position);
+        xg_pack_tool_bar (f, FRAME_TOOL_BAR_POSITION (f));
       gtk_widget_show_all (TOOLBAR_TOP_WIDGET (x));
       if (xg_update_tool_bar_sizes (f))
         xg_height_or_width_changed (f);
@@ -5060,6 +5221,7 @@ xg_initialize (void)
   gtk_binding_entry_add_signal (binding_set, GDK_KEY_g, GDK_CONTROL_MASK,
                                 "cancel", 0);
   update_theme_scrollbar_width ();
+  update_theme_scrollbar_height ();
 
 #ifdef HAVE_FREETYPE
   x_last_font_name = NULL;
index 12bf461fd69f19e04e1a0faacce239e129c690cf..5c7d8b0337984cc2418481db607f989ddac627ef 100644 (file)
@@ -24,6 +24,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifdef USE_GTK
 
 #include <gtk/gtk.h>
+#include "../lwlib/lwlib-widget.h"
 #include "frame.h"
 #include "xterm.h"
 
@@ -32,6 +33,9 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #define XG_SB_MIN 1
 #define XG_SB_MAX 10000000
 #define XG_SB_RANGE (XG_SB_MAX-XG_SB_MIN)
+#define YG_SB_MIN 1
+#define YG_SB_MAX 10000000
+#define YG_SB_RANGE (YG_SB_MAX-YG_SB_MIN)
 
 /* Key for data that is valid for menus and scroll bars in a frame  */
 #define XG_FRAME_DATA "emacs_frame"
@@ -74,9 +78,6 @@ typedef struct xg_menu_item_cb_data_
 
 } xg_menu_item_cb_data;
 
-extern struct _widget_value *malloc_widget_value (void);
-extern void free_widget_value (struct _widget_value *);
-
 extern bool xg_uses_old_file_dialog (void) ATTRIBUTE_CONST;
 
 extern char *xg_get_file_name (struct frame *f,
@@ -116,6 +117,11 @@ extern void xg_create_scroll_bar (struct frame *f,
                                   GCallback scroll_callback,
                                   GCallback end_callback,
                                   const char *scroll_bar_name);
+extern void xg_create_horizontal_scroll_bar (struct frame *f,
+                                            struct scroll_bar *bar,
+                                            GCallback scroll_callback,
+                                            GCallback end_callback,
+                                            const char *scroll_bar_name);
 extern void xg_remove_scroll_bar (struct frame *f, ptrdiff_t scrollbar_id);
 
 extern void xg_update_scrollbar_pos (struct frame *f,
@@ -124,18 +130,30 @@ extern void xg_update_scrollbar_pos (struct frame *f,
                                      int left,
                                      int width,
                                      int height);
+extern void xg_update_horizontal_scrollbar_pos (struct frame *f,
+                                               ptrdiff_t scrollbar_id,
+                                               int top,
+                                               int left,
+                                               int width,
+                                               int height);
 
 extern void xg_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar,
                                              int portion,
                                              int position,
                                              int whole);
+extern void xg_set_toolkit_horizontal_scroll_bar_thumb (struct scroll_bar *bar,
+                                                       int portion,
+                                                       int position,
+                                                       int whole);
 extern bool xg_event_is_for_scrollbar (struct frame *, const XEvent *);
 extern int xg_get_default_scrollbar_width (void);
+extern int xg_get_default_scrollbar_height (void);
 
 extern void update_frame_tool_bar (struct frame *f);
 extern void free_frame_tool_bar (struct frame *f);
 extern void xg_change_toolbar_position (struct frame *f, Lisp_Object pos);
 
+extern void xg_clear_under_internal_border (struct frame *f);
 extern void xg_frame_resized (struct frame *f,
                               int pixelwidth,
                               int pixelheight);
@@ -164,7 +182,6 @@ extern bool xg_prepare_tooltip (struct frame *f,
 extern void xg_show_tooltip (struct frame *f, int root_x, int root_y);
 extern bool xg_hide_tooltip (struct frame *f);
 
-
 /* Mark all callback data that are Lisp_object:s during GC.  */
 extern void xg_mark_data (void);
 
index b47a35dd71382aad087a352b65c434bab5b757d5..4b73a5fe80cded38edda9f2b0d6cb1d3b1625e0e 100644 (file)
@@ -21,13 +21,11 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "sysstdio.h"
 #include <unistd.h>
 
-#ifdef HAVE_PNG
-#if defined HAVE_LIBPNG_PNG_H
-# include <libpng/png.h>
-#else
+/* Include this before including <setjmp.h> to work around bugs with
+   older libpng; see Bug#17429.  */
+#if defined HAVE_PNG && !defined HAVE_NS
 # include <png.h>
 #endif
-#endif
 
 #include <setjmp.h>
 #include <c-ctype.h>
@@ -160,6 +158,7 @@ XPutPixel (XImagePtr ximage, int x, int y, unsigned long pixel)
 
 /* Functions to access the contents of a bitmap, given an id.  */
 
+#ifdef HAVE_X_WINDOWS
 static int
 x_bitmap_height (struct frame *f, ptrdiff_t id)
 {
@@ -171,6 +170,7 @@ x_bitmap_width (struct frame *f, ptrdiff_t id)
 {
   return FRAME_DISPLAY_INFO (f)->bitmaps[id - 1].width;
 }
+#endif
 
 #if defined (HAVE_X_WINDOWS) || defined (HAVE_NTGUI)
 ptrdiff_t
@@ -998,6 +998,11 @@ free_image (struct frame *f, struct image *img)
 
       c->images[img->id] = NULL;
 
+      /* Windows NT redefines 'free', but in this file, we need to
+         avoid the redefinition.  */
+#ifdef WINDOWSNT
+#undef free
+#endif
       /* Free resources, then free IMG.  */
       img->type->free (f, img);
       xfree (img);
@@ -1231,7 +1236,23 @@ image_background_transparent (struct image *img, struct frame *f, XImagePtr_or_D
   return img->background_transparent;
 }
 
-\f
+#if defined (HAVE_PNG) || defined (HAVE_NS) \
+  || defined (HAVE_IMAGEMAGICK) || defined (HAVE_RSVG)
+
+/* Store F's background color into *BGCOLOR.  */
+static void
+x_query_frame_background_color (struct frame *f, XColor *bgcolor)
+{
+#ifndef HAVE_NS
+  bgcolor->pixel = FRAME_BACKGROUND_PIXEL (f);
+  x_query_color (f, bgcolor);
+#else
+  ns_query_color (FRAME_BACKGROUND_COLOR (f), bgcolor, 1);
+#endif
+}
+
+#endif /* HAVE_PNG || HAVE_NS || HAVE_IMAGEMAGICK || HAVE_RSVG */
+
 /***********************************************************************
                  Helper functions for X image types
  ***********************************************************************/
@@ -3016,13 +3037,16 @@ xbm_load (struct frame *f, struct image *img)
                                     + SBYTES (data)));
       else
        {
+         USE_SAFE_ALLOCA;
+
          if (VECTORP (data))
            {
              int i;
              char *p;
              int nbytes = (img->width + BITS_PER_CHAR - 1) / BITS_PER_CHAR;
 
-             p = bits = alloca (nbytes * img->height);
+             SAFE_NALLOCA (bits, nbytes, img->height);
+             p = bits;
              for (i = 0; i < img->height; ++i, p += nbytes)
                {
                  Lisp_Object line = AREF (data, i);
@@ -3043,9 +3067,8 @@ xbm_load (struct frame *f, struct image *img)
             int nbytes, i;
             /* Windows mono bitmaps are reversed compared with X.  */
             invertedBits = bits;
-            nbytes = (img->width + BITS_PER_CHAR - 1) / BITS_PER_CHAR
-              * img->height;
-            bits = alloca (nbytes);
+            nbytes = (img->width + BITS_PER_CHAR - 1) / BITS_PER_CHAR;
+            SAFE_NALLOCA (bits, nbytes, img->height);
             for (i = 0; i < nbytes; i++)
               bits[i] = XBM_BIT_SHUFFLE (invertedBits[i]);
           }
@@ -3067,6 +3090,8 @@ xbm_load (struct frame *f, struct image *img)
                           img->spec, Qnil);
              x_clear_image (f, img);
            }
+
+         SAFE_FREE ();
        }
     }
 
@@ -3473,6 +3498,8 @@ xpm_load (struct frame *f, struct image *img)
   int rc;
   XpmAttributes attrs;
   Lisp_Object specified_file, color_symbols;
+  USE_SAFE_ALLOCA;
+
 #ifdef HAVE_NTGUI
   HDC hdc;
   xpm_XImage * xpm_image = NULL, * xpm_mask = NULL;
@@ -3515,7 +3542,7 @@ xpm_load (struct frame *f, struct image *img)
     {
       Lisp_Object tail;
       XpmColorSymbol *xpm_syms;
-      int i, size;
+      ptrdiff_t i, size;
 
       attrs.valuemask |= XpmColorSymbols;
 
@@ -3525,8 +3552,8 @@ xpm_load (struct frame *f, struct image *img)
        ++attrs.numsymbols;
 
       /* Allocate an XpmColorSymbol array.  */
+      SAFE_NALLOCA (xpm_syms, 1, attrs.numsymbols);
       size = attrs.numsymbols * sizeof *xpm_syms;
-      xpm_syms = alloca (size);
       memset (xpm_syms, 0, size);
       attrs.colorsymbols = xpm_syms;
 
@@ -3548,17 +3575,11 @@ xpm_load (struct frame *f, struct image *img)
          name = XCAR (XCAR (tail));
          color = XCDR (XCAR (tail));
          if (STRINGP (name))
-           {
-             xpm_syms[i].name = alloca (SCHARS (name) + 1);
-             strcpy (xpm_syms[i].name, SSDATA (name));
-           }
+           SAFE_ALLOCA_STRING (xpm_syms[i].name, name);
          else
            xpm_syms[i].name = empty_string;
          if (STRINGP (color))
-           {
-             xpm_syms[i].value = alloca (SCHARS (color) + 1);
-             strcpy (xpm_syms[i].value, SSDATA (color));
-           }
+           SAFE_ALLOCA_STRING (xpm_syms[i].value, color);
          else
            xpm_syms[i].value = empty_string;
        }
@@ -3589,6 +3610,7 @@ xpm_load (struct frame *f, struct image *img)
 #ifdef ALLOC_XPM_COLORS
          xpm_free_color_cache ();
 #endif
+         SAFE_FREE ();
          return 0;
        }
 
@@ -3619,6 +3641,7 @@ xpm_load (struct frame *f, struct image *img)
 #ifdef ALLOC_XPM_COLORS
          xpm_free_color_cache ();
 #endif
+         SAFE_FREE ();
          return 0;
        }
 #ifdef HAVE_NTGUI
@@ -3761,6 +3784,7 @@ xpm_load (struct frame *f, struct image *img)
 #ifdef ALLOC_XPM_COLORS
   xpm_free_color_cache ();
 #endif
+  SAFE_FREE ();
   return rc == XpmSuccess;
 }
 
@@ -3953,9 +3977,7 @@ xpm_str_to_color_key (const char *s)
 {
   int i;
 
-  for (i = 0;
-       i < sizeof xpm_color_key_strings / sizeof xpm_color_key_strings[0];
-       i++)
+  for (i = 0; i < ARRAYELTS (xpm_color_key_strings); i++)
     if (strcmp (xpm_color_key_strings[i], s) == 0)
       return i;
   return -1;
@@ -5506,7 +5528,7 @@ png_image_p (Lisp_Object object)
 #endif /* HAVE_PNG || HAVE_NS */
 
 
-#ifdef HAVE_PNG
+#if defined HAVE_PNG && !defined HAVE_NS
 
 #ifdef WINDOWSNT
 /* PNG library details.  */
@@ -5884,43 +5906,23 @@ png_load_body (struct frame *f, struct image *img, struct png_load_context *c)
       /* png_color_16 *image_bg; */
       Lisp_Object specified_bg
        = image_spec_value (img->spec, QCbackground, NULL);
-      int shift = (bit_depth == 16) ? 0 : 8;
+      XColor color;
 
-      if (STRINGP (specified_bg))
+      /* If the user specified a color, try to use it; if not, use the
+        current frame background, ignoring any default background
+        color set by the image.  */
+      if (STRINGP (specified_bg)
+         ? x_defined_color (f, SSDATA (specified_bg), &color, false)
+         : (x_query_frame_background_color (f, &color), true))
        /* The user specified `:background', use that.  */
        {
-         XColor color;
-         if (x_defined_color (f, SSDATA (specified_bg), &color, 0))
-           {
-             png_color_16 user_bg;
-
-             memset (&user_bg, 0, sizeof user_bg);
-             user_bg.red = color.red >> shift;
-             user_bg.green = color.green >> shift;
-             user_bg.blue = color.blue >> shift;
-
-             fn_png_set_background (png_ptr, &user_bg,
-                                    PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0);
-           }
-       }
-      else
-       {
-         /* We use the current frame background, ignoring any default
-            background color set by the image.  */
-#if defined (HAVE_X_WINDOWS) || defined (HAVE_NTGUI)
-         XColor color;
-         png_color_16 frame_background;
+         int shift = bit_depth == 16 ? 0 : 8;
+         png_color_16 bg = { 0 };
+         bg.red = color.red >> shift;
+         bg.green = color.green >> shift;
+         bg.blue = color.blue >> shift;
 
-         color.pixel = FRAME_BACKGROUND_PIXEL (f);
-         x_query_color (f, &color);
-
-         memset (&frame_background, 0, sizeof frame_background);
-         frame_background.red = color.red >> shift;
-         frame_background.green = color.green >> shift;
-         frame_background.blue = color.blue >> shift;
-#endif /* HAVE_X_WINDOWS */
-
-         fn_png_set_background (png_ptr, &frame_background,
+         fn_png_set_background (png_ptr, &bg,
                                 PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0);
        }
     }
@@ -6062,9 +6064,8 @@ png_load (struct frame *f, struct image *img)
   return png_load_body (f, img, &c);
 }
 
-#else /* HAVE_PNG */
+#elif defined HAVE_NS
 
-#ifdef HAVE_NS
 static bool
 png_load (struct frame *f, struct image *img)
 {
@@ -6072,10 +6073,8 @@ png_load (struct frame *f, struct image *img)
                         image_spec_value (img->spec, QCfile, NULL),
                         image_spec_value (img->spec, QCdata, NULL));
 }
-#endif  /* HAVE_NS */
-
 
-#endif /* !HAVE_PNG */
+#endif /* HAVE_NS */
 
 
 \f
@@ -6466,7 +6465,6 @@ jpeg_file_src (j_decompress_ptr cinfo, FILE *fp)
   src->mgr.next_input_byte = NULL;
 }
 
-
 /* Load image IMG for use on frame F.  Patterned after example.c
    from the JPEG lib.  */
 
@@ -6585,6 +6583,7 @@ jpeg_load_body (struct frame *f, struct image *img,
      colors generated, and mgr->cinfo.colormap is a two-dimensional array
      of color indices in the range 0..mgr->cinfo.actual_number_of_colors.
      No more than 255 colors will be generated.  */
+  USE_SAFE_ALLOCA;
   {
     int i, ir, ig, ib;
 
@@ -6600,7 +6599,7 @@ jpeg_load_body (struct frame *f, struct image *img,
        a default color, and we don't have to care about which colors
        can be freed safely, and which can't.  */
     init_color_table ();
-    colors = alloca (mgr->cinfo.actual_number_of_colors * sizeof *colors);
+    SAFE_NALLOCA (colors, 1, mgr->cinfo.actual_number_of_colors);
 
     for (i = 0; i < mgr->cinfo.actual_number_of_colors; ++i)
       {
@@ -6643,6 +6642,7 @@ jpeg_load_body (struct frame *f, struct image *img,
 
   /* Put ximg into the image.  */
   image_put_x_image (f, img, ximg, 0);
+  SAFE_FREE ();
   return 1;
 }
 
@@ -8064,7 +8064,6 @@ imagemagick_compute_animated_image (MagickWand *super_wand, int ino)
   else
     composite_wand = cache->wand;
 
-  dest_width = MagickGetImageWidth (composite_wand);
   dest_height = MagickGetImageHeight (composite_wand);
 
   for (i = max (1, cache->index + 1); i <= ino; i++)
@@ -8133,13 +8132,12 @@ imagemagick_compute_animated_image (MagickWand *super_wand, int ino)
            {
              /* Sanity check.  This shouldn't happen, but apparently
                 also does in some pictures.  */
-             if (x + source_left > dest_width - 1)
+             if (x + source_left >= dest_width)
                break;
              /* Normally we only copy over non-transparent pixels,
                 but if the disposal method is "Background", then we
                 copy over all pixels.  */
-             if (dispose == BackgroundDispose ||
-                 PixelGetAlpha (source[x]))
+             if (dispose == BackgroundDispose || PixelGetAlpha (source[x]))
                {
                  PixelGetMagickColor (source[x], &pixel);
                  PixelSetMagickColor (dest[x + source_left], &pixel);
@@ -8179,7 +8177,8 @@ imagemagick_load_image (struct frame *f, struct image *img,
                        unsigned char *contents, unsigned int size,
                        char *filename)
 {
-  size_t width, height;
+  int width, height;
+  size_t image_width, image_height;
   MagickBooleanType status;
   XImagePtr ximg;
   int x, y;
@@ -8264,14 +8263,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
     specified_bg = image_spec_value (img->spec, QCbackground, NULL);
     if (!STRINGP (specified_bg)
        || !x_defined_color (f, SSDATA (specified_bg), &bgcolor, 0))
-      {
-#ifndef HAVE_NS
-       bgcolor.pixel = FRAME_BACKGROUND_PIXEL (f);
-       x_query_color (f, &bgcolor);
-#else
-       ns_query_color (FRAME_BACKGROUND_COLOR (f), &bgcolor, 1);
-#endif
-      }
+      x_query_frame_background_color (f, &bgcolor);
 
     bg_wand = NewPixelWand ();
     PixelSetRed   (bg_wand, (double) bgcolor.red   / 65535);
@@ -8362,16 +8354,19 @@ imagemagick_load_image (struct frame *f, struct image *img,
 
   /* Finally we are done manipulating the image.  Figure out the
      resulting width/height and transfer ownership to Emacs.  */
-  height = MagickGetImageHeight (image_wand);
-  width = MagickGetImageWidth (image_wand);
+  image_height = MagickGetImageHeight (image_wand);
+  image_width = MagickGetImageWidth (image_wand);
 
-  if (! (width <= INT_MAX && height <= INT_MAX
-        && check_image_size (f, width, height)))
+  if (! (image_width <= INT_MAX && image_height <= INT_MAX
+        && check_image_size (f, image_width, image_height)))
     {
       image_error ("Invalid image size (see `max-image-size')", Qnil, Qnil);
       goto imagemagick_error;
     }
 
+  width = image_width;
+  height = image_height;
+
   /* We can now get a valid pixel buffer from the imagemagick file, if all
      went ok.  */
 
@@ -8423,6 +8418,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
 #endif /* HAVE_MAGICKEXPORTIMAGEPIXELS */
     {
       size_t image_height;
+      MagickRealType color_scale = 65535.0 / QuantumRange;
 
       /* Try to create a x pixmap to hold the imagemagick pixmap.  */
       if (!image_create_x_image_and_pixmap (f, img, width, height, 0,
@@ -8455,17 +8451,19 @@ imagemagick_load_image (struct frame *f, struct image *img,
       image_height = MagickGetImageHeight (image_wand);
       for (y = 0; y < image_height; y++)
         {
-          pixels = PixelGetNextIteratorRow (iterator, &width);
+         size_t row_width;
+         pixels = PixelGetNextIteratorRow (iterator, &row_width);
           if (! pixels)
             break;
-          for (x = 0; x < (long) width; x++)
+         int xlim = min (row_width, width);
+         for (x = 0; x < xlim; x++)
             {
               PixelGetMagickColor (pixels[x], &pixel);
               XPutPixel (ximg, x, y,
                          lookup_rgb_color (f,
-                                           pixel.red,
-                                           pixel.green,
-                                           pixel.blue));
+                                          color_scale * pixel.red,
+                                          color_scale * pixel.green,
+                                          color_scale * pixel.blue));
             }
         }
       DestroyPixelIterator (iterator);
@@ -8566,7 +8564,6 @@ and `imagemagick-types-inhibit'.  */)
   ExceptionInfo ex;
   char **imtypes;
   size_t i;
-  Lisp_Object Qimagemagicktype;
 
   GetExceptionInfo(&ex);
   imtypes = GetMagickList ("*", &numf, &ex);
@@ -8574,8 +8571,8 @@ and `imagemagick-types-inhibit'.  */)
 
   for (i = 0; i < numf; i++)
     {
-      Qimagemagicktype = intern (imtypes[i]);
-      typelist = Fcons (Qimagemagicktype, typelist);
+      Lisp_Object imagemagicktype = intern (imtypes[i]);
+      typelist = Fcons (imagemagicktype, typelist);
       imtypes[i] = MagickRelinquishMemory (imtypes[i]);
     }
 
@@ -8687,7 +8684,6 @@ DEF_IMGLIB_FN (void, rsvg_handle_get_dimensions, (RsvgHandle *, RsvgDimensionDat
 DEF_IMGLIB_FN (gboolean, rsvg_handle_write, (RsvgHandle *, const guchar *, gsize, GError **));
 DEF_IMGLIB_FN (gboolean, rsvg_handle_close, (RsvgHandle *, GError **));
 DEF_IMGLIB_FN (GdkPixbuf *, rsvg_handle_get_pixbuf, (RsvgHandle *));
-DEF_IMGLIB_FN (void *, rsvg_handle_set_size_callback, (RsvgHandle *, RsvgSizeFunc, gpointer, GDestroyNotify));
 
 DEF_IMGLIB_FN (int, gdk_pixbuf_get_width, (const GdkPixbuf *));
 DEF_IMGLIB_FN (int, gdk_pixbuf_get_height, (const GdkPixbuf *));
@@ -8709,13 +8705,18 @@ Lisp_Object Qgdk_pixbuf, Qglib, Qgobject;
 static bool
 init_svg_functions (void)
 {
-  HMODULE library, gdklib, glib, gobject;
+  HMODULE library, gdklib = NULL, glib = NULL, gobject = NULL;
 
   if (!(glib = w32_delayed_load (Qglib))
       || !(gobject = w32_delayed_load (Qgobject))
       || !(gdklib = w32_delayed_load (Qgdk_pixbuf))
       || !(library = w32_delayed_load (Qsvg)))
-    return 0;
+    {
+      if (gdklib)  FreeLibrary (gdklib);
+      if (gobject) FreeLibrary (gobject);
+      if (glib)    FreeLibrary (glib);
+      return 0;
+    }
 
   LOAD_IMGLIB_FN (library, rsvg_handle_new);
   LOAD_IMGLIB_FN (library, rsvg_handle_get_dimensions);
@@ -8903,14 +8904,7 @@ svg_load_image (struct frame *f,         /* Pointer to emacs frame structure.  *
   specified_bg = image_spec_value (img->spec, QCbackground, NULL);
   if (!STRINGP (specified_bg)
       || !x_defined_color (f, SSDATA (specified_bg), &background, 0))
-    {
-#ifndef HAVE_NS
-      background.pixel = FRAME_BACKGROUND_PIXEL (f);
-      x_query_color (f, &background);
-#else
-      ns_query_color (FRAME_BACKGROUND_COLOR (f), &background, 1);
-#endif
-    }
+    x_query_frame_background_color (f, &background);
 
   /* SVG pixmaps specify transparency in the last byte, so right
      shift 8 bits to get rid of it, since emacs doesn't support
index 026f44ccf9cbd6b4d77d71653c26cb10e1a92509..e6b267a3891dbafe04ea41eb878fcf04f9bd4c99 100644 (file)
@@ -920,7 +920,7 @@ position_indentation (ptrdiff_t pos_byte)
          column += tab_width - column % tab_width;
          break;
        default:
-         if (ASCII_BYTE_P (p[-1])
+         if (ASCII_CHAR_P (p[-1])
              || NILP (BVAR (current_buffer, enable_multibyte_characters)))
            return column;
          {
index 85526d46db1e240b9ac6976fbbd573b270581567..463392dcada70f31b269240ed22010218b8c2439 100644 (file)
@@ -1,6 +1,6 @@
 /* Buffer insertion/deletion and gap motion for GNU Emacs.
-   Copyright (C) 1985-1986, 1993-1995, 1997-2014 Free Software
-   Foundation, Inc.
+
+Copyright (C) 1985-1986, 1993-1995, 1997-2014 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -203,6 +203,25 @@ gap_right (ptrdiff_t charpos, ptrdiff_t bytepos)
   QUIT;
 }
 \f
+/* If the selected window's old pointm is adjacent or covered by the
+   region from FROM to TO, unsuspend auto hscroll in that window.  */
+
+static void
+adjust_suspend_auto_hscroll (ptrdiff_t from, ptrdiff_t to)
+{
+  if (WINDOWP (selected_window))
+    {
+      struct window *w = XWINDOW (selected_window);
+
+      if (BUFFERP (w->contents)
+         && XBUFFER (w->contents) == current_buffer
+         && XMARKER (w->old_pointm)->charpos >= from
+         && XMARKER (w->old_pointm)->charpos <= to)
+       w->suspend_auto_hscroll = 0;
+    }
+}
+
+
 /* Adjust all markers for a deletion
    whose range in bytes is FROM_BYTE to TO_BYTE.
    The range in charpos is FROM to TO.
@@ -217,6 +236,7 @@ adjust_markers_for_delete (ptrdiff_t from, ptrdiff_t from_byte,
   struct Lisp_Marker *m;
   ptrdiff_t charpos;
 
+  adjust_suspend_auto_hscroll (from, to);
   for (m = BUF_MARKERS (current_buffer); m; m = m->next)
     {
       charpos = m->charpos;
@@ -256,6 +276,7 @@ adjust_markers_for_insert (ptrdiff_t from, ptrdiff_t from_byte,
   ptrdiff_t nchars = to - from;
   ptrdiff_t nbytes = to_byte - from_byte;
 
+  adjust_suspend_auto_hscroll (from, to);
   for (m = BUF_MARKERS (current_buffer); m; m = m->next)
     {
       eassert (m->bytepos >= m->charpos
@@ -321,6 +342,7 @@ adjust_markers_for_replace (ptrdiff_t from, ptrdiff_t from_byte,
   ptrdiff_t diff_chars = new_chars - old_chars;
   ptrdiff_t diff_bytes = new_bytes - old_bytes;
 
+  adjust_suspend_auto_hscroll (from, from + old_chars);
   for (m = BUF_MARKERS (current_buffer); m; m = m->next)
     {
       if (m->bytepos >= prev_to_byte)
@@ -701,7 +723,7 @@ count_combining_after (const unsigned char *string,
        (2) POS is the last of the current buffer.
        (3) A character at POS can't be a following byte of multibyte
            character.  */
-  if (length > 0 && ASCII_BYTE_P (string[length - 1])) /* case (1) */
+  if (length > 0 && ASCII_CHAR_P (string[length - 1])) /* case (1) */
     return 0;
   if (pos_byte == Z_BYTE)      /* case (2) */
     return 0;
@@ -1804,26 +1826,18 @@ prepare_to_modify_buffer_1 (ptrdiff_t start, ptrdiff_t end,
   else
     base_buffer = current_buffer;
 
-#ifdef CLASH_DETECTION
+  if (inhibit_modification_hooks)
+    return;
+
   if (!NILP (BVAR (base_buffer, file_truename))
       /* Make binding buffer-file-name to nil effective.  */
       && !NILP (BVAR (base_buffer, filename))
       && SAVE_MODIFF >= MODIFF)
     lock_file (BVAR (base_buffer, file_truename));
-#else
-  /* At least warn if this file has changed on disk since it was visited.  */
-  if (!NILP (BVAR (base_buffer, filename))
-      && SAVE_MODIFF >= MODIFF
-      && NILP (Fverify_visited_file_modtime (Fcurrent_buffer ()))
-      && !NILP (Ffile_exists_p (BVAR (base_buffer, filename))))
-    call1 (intern ("ask-user-about-supersession-threat"),
-          BVAR (base_buffer,filename));
-#endif /* not CLASH_DETECTION */
 
   /* If `select-active-regions' is non-nil, save the region text.  */
   /* FIXME: Move this to Elisp (via before-change-functions).  */
   if (!NILP (BVAR (current_buffer, mark_active))
-      && !inhibit_modification_hooks
       && XMARKER (BVAR (current_buffer, mark))->buffer
       && NILP (Vsaved_region_selection)
       && (EQ (Vselect_active_regions, Qonly)
@@ -1962,9 +1976,6 @@ signal_before_change (ptrdiff_t start_int, ptrdiff_t end_int,
   ptrdiff_t count = SPECPDL_INDEX ();
   struct rvoe_arg rvoe_arg;
 
-  if (inhibit_modification_hooks)
-    return;
-
   start = make_number (start_int);
   end = make_number (end_int);
   preserve_marker = Qnil;
@@ -1975,7 +1986,7 @@ signal_before_change (ptrdiff_t start_int, ptrdiff_t end_int,
   specbind (Qinhibit_modification_hooks, Qt);
 
   /* If buffer is unmodified, run a special hook for that case.  The
-   check for Vfirst_change_hook is just a minor optimization. */
+   check for Vfirst_change_hook is just a minor optimization.  */
   if (SAVE_MODIFF >= MODIFF
       && !NILP (Vfirst_change_hook))
     {
index e901f99747db0b111bfa5cb70ce589edde9bf3fc..4e7a177140eb14b7f1e7d3352c68ae1fed34efc0 100644 (file)
@@ -278,10 +278,8 @@ extern Lisp_Object Qpoint_entered;
 extern Lisp_Object Qmodification_hooks;
 extern Lisp_Object Qcategory;
 extern Lisp_Object Qlocal_map;
-extern Lisp_Object Qkeymap;
 
 /* Visual properties text (including strings) may have.  */
-extern Lisp_Object Qfont;
 extern Lisp_Object Qinvisible, Qintangible;
 
 /* Sticky properties.  */
index eb27d6fefaba06be848f316f204e457bbd416990..e8143f26681c9b2e6b5d7f27c0bccf8d6c29e281 100644 (file)
@@ -133,6 +133,19 @@ static ptrdiff_t this_single_command_key_start;
 static ptrdiff_t before_command_key_count;
 static ptrdiff_t before_command_echo_length;
 
+#ifdef HAVE_STACK_OVERFLOW_HANDLING
+
+/* For longjmp to recover from C stack overflow.  */
+sigjmp_buf return_to_command_loop;
+
+/* Message displayed by Vtop_level when recovering from C stack overflow.  */
+static Lisp_Object recover_top_level_message;
+
+#endif /* HAVE_STACK_OVERFLOW_HANDLING */
+
+/* Message normally displayed by Vtop_level.  */
+static Lisp_Object regular_top_level_message;
+
 /* For longjmp to where kbd input is being done.  */
 
 static sys_jmp_buf getcjmp;
@@ -228,7 +241,7 @@ static Lisp_Object Qbackward_char;
 Lisp_Object Qundefined;
 static Lisp_Object Qtimer_event_handler;
 
-/* read_key_sequence stores here the command definition of the
+/* `read_key_sequence' stores here the command definition of the
    key sequence that it reads.  */
 static Lisp_Object read_key_sequence_cmd;
 static Lisp_Object read_key_sequence_remapped;
@@ -348,7 +361,6 @@ static Lisp_Object Qmodifier_cache;
 Lisp_Object Qmode_line;
 Lisp_Object Qvertical_line;
 Lisp_Object Qright_divider, Qbottom_divider;
-static Lisp_Object Qvertical_scroll_bar;
 Lisp_Object Qmenu_bar;
 
 static Lisp_Object Qecho_keystrokes;
@@ -356,7 +368,6 @@ static Lisp_Object Qecho_keystrokes;
 static void recursive_edit_unwind (Lisp_Object buffer);
 static Lisp_Object command_loop (void);
 static Lisp_Object Qcommand_execute;
-struct timespec timer_check (void);
 
 static void echo_now (void);
 static ptrdiff_t echo_length (void);
@@ -377,12 +388,6 @@ bool interrupt_input;
 /* Nonzero while interrupts are temporarily deferred during redisplay.  */
 bool interrupts_deferred;
 
-/* If we support a window system, turn on the code to poll periodically
-   to detect C-g.  It isn't actually used when doing interrupt input.  */
-#ifdef HAVE_WINDOW_SYSTEM
-#define POLL_FOR_INPUT
-#endif
-
 /* The time when Emacs started being idle.  */
 
 static struct timespec timer_idleness_start_time;
@@ -495,10 +500,12 @@ kset_system_key_syms (struct kboard *kb, Lisp_Object val)
 static void
 echo_add_key (Lisp_Object c)
 {
-  int size = KEY_DESCRIPTION_SIZE + 100;
-  char *buffer = alloca (size);
+  char initbuf[KEY_DESCRIPTION_SIZE + 100];
+  ptrdiff_t size = sizeof initbuf;
+  char *buffer = initbuf;
   char *ptr = buffer;
   Lisp_Object echo_string;
+  USE_SAFE_ALLOCA;
 
   echo_string = KVAR (current_kboard, echo_string);
 
@@ -510,13 +517,13 @@ echo_add_key (Lisp_Object c)
   else if (SYMBOLP (c))
     {
       Lisp_Object name = SYMBOL_NAME (c);
-      int nbytes = SBYTES (name);
+      ptrdiff_t nbytes = SBYTES (name);
 
       if (size - (ptr - buffer) < nbytes)
        {
-         int offset = ptr - buffer;
+         ptrdiff_t offset = ptr - buffer;
          size = max (2 * size, size + nbytes);
-         buffer = alloca (size);
+         buffer = SAFE_ALLOCA (size);
          ptr = buffer + offset;
        }
 
@@ -527,14 +534,14 @@ echo_add_key (Lisp_Object c)
   if ((NILP (echo_string) || SCHARS (echo_string) == 0)
       && help_char_p (c))
     {
-      const char *text = " (Type ? for further options)";
-      int len = strlen (text);
+      static const char text[] = " (Type ? for further options)";
+      int len = sizeof text - 1;
 
       if (size - (ptr - buffer) < len)
        {
-         int offset = ptr - buffer;
+         ptrdiff_t offset = ptr - buffer;
          size += len;
-         buffer = alloca (size);
+         buffer = SAFE_ALLOCA (size);
          ptr = buffer + offset;
        }
 
@@ -544,6 +551,7 @@ echo_add_key (Lisp_Object c)
 
   /* Replace a dash from echo_dash with a space, otherwise add a space
      at the end as a separator between keys.  */
+  AUTO_STRING (space, " ");
   if (STRINGP (echo_string) && SCHARS (echo_string) > 1)
     {
       Lisp_Object last_char, prev_char, idx;
@@ -559,14 +567,15 @@ echo_add_key (Lisp_Object c)
       if (XINT (last_char) == '-' && XINT (prev_char) != ' ')
        Faset (echo_string, idx, make_number (' '));
       else
-       echo_string = concat2 (echo_string, build_string (" "));
+       echo_string = concat2 (echo_string, space);
     }
   else if (STRINGP (echo_string) && SCHARS (echo_string) > 0)
-    echo_string = concat2 (echo_string, build_string (" "));
+    echo_string = concat2 (echo_string, space);
 
   kset_echo_string
     (current_kboard,
      concat2 (echo_string, make_string (buffer, ptr - buffer)));
+  SAFE_FREE ();
 }
 
 /* Add C to the echo string, if echoing is going on.  C can be a
@@ -622,9 +631,9 @@ echo_dash (void)
 
   /* Put a dash at the end of the buffer temporarily,
      but make it go away when the next character is added.  */
-  kset_echo_string
-    (current_kboard,
-     concat2 (KVAR (current_kboard, echo_string), build_string ("-")));
+  AUTO_STRING (dash, "-");
+  kset_echo_string (current_kboard,
+                   concat2 (KVAR (current_kboard, echo_string), dash));
   echo_now ();
 }
 
@@ -1117,7 +1126,7 @@ Default value of `command-error-function'.  */)
     {
       print_error_message (data, Qexternal_debugging_output,
                           SSDATA (context), signal);
-      Fterpri (Qexternal_debugging_output);
+      Fterpri (Qexternal_debugging_output, Qnil);
       Fkill_emacs (make_number (-1));
     }
   else
@@ -1142,6 +1151,17 @@ static Lisp_Object top_level_1 (Lisp_Object);
 Lisp_Object
 command_loop (void)
 {
+#ifdef HAVE_STACK_OVERFLOW_HANDLING
+  /* At least on GNU/Linux, saving signal mask is important here.  */
+  if (sigsetjmp (return_to_command_loop, 1) != 0)
+    {
+      /* Comes here from handle_sigsegv, see sysdep.c.  */
+      init_eval ();
+      Vinternal__top_level_message = recover_top_level_message;
+    }
+  else
+    Vinternal__top_level_message = regular_top_level_message;
+#endif /* HAVE_STACK_OVERFLOW_HANDLING */
   if (command_loop_level > 0 || minibuf_level > 0)
     {
       Lisp_Object val;
@@ -1222,7 +1242,7 @@ user_error (const char *msg)
   xsignal1 (Quser_error, build_string (msg));
 }
 
-_Noreturn
+/* _Noreturn will be added to prototype by make-docfile.  */
 DEFUN ("exit-recursive-edit", Fexit_recursive_edit, Sexit_recursive_edit, 0, 0, "",
        doc: /* Exit from the innermost recursive edit or minibuffer.  */)
   (void)
@@ -1233,7 +1253,7 @@ DEFUN ("exit-recursive-edit", Fexit_recursive_edit, Sexit_recursive_edit, 0, 0,
   user_error ("No recursive edit is in progress");
 }
 
-_Noreturn
+/* _Noreturn will be added to prototype by make-docfile.  */
 DEFUN ("abort-recursive-edit", Fabort_recursive_edit, Sabort_recursive_edit, 0, 0, "",
        doc: /* Abort the command that requested this recursive edit or minibuffer input.  */)
   (void)
@@ -1266,13 +1286,9 @@ tracking_off (Lisp_Object old_value)
     }
 }
 
-DEFUN ("track-mouse", Ftrack_mouse, Strack_mouse, 0, UNEVALLED, 0,
-       doc: /* Evaluate BODY with mouse movement events enabled.
-Within a `track-mouse' form, mouse motion generates input events that
-you can read with `read-event'.
-Normally, mouse motion is ignored.
-usage: (track-mouse BODY...)  */)
-  (Lisp_Object args)
+DEFUN ("internal--track-mouse", Ftrack_mouse, Strack_mouse, 1, 1, 0,
+       doc: /* Call BODYFUN with mouse movement events enabled.  */)
+  (Lisp_Object bodyfun)
 {
   ptrdiff_t count = SPECPDL_INDEX ();
   Lisp_Object val;
@@ -1281,7 +1297,7 @@ usage: (track-mouse BODY...)  */)
 
   do_mouse_tracking = Qt;
 
-  val = Fprogn (args);
+  val = call0 (bodyfun);
   return unbind_to (count, val);
 }
 
@@ -1292,9 +1308,6 @@ usage: (track-mouse BODY...)  */)
    If ignore_mouse_drag_p is non-zero, ignore (implicit) mouse movement
    after resizing the tool-bar window.  */
 
-#if !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS
-static
-#endif
 bool ignore_mouse_drag_p;
 
 static struct frame *
@@ -1323,14 +1336,11 @@ some_mouse_moved (void)
 
 static int read_key_sequence (Lisp_Object *, int, Lisp_Object,
                               bool, bool, bool, bool);
-void safe_run_hooks (Lisp_Object);
 static void adjust_point_for_property (ptrdiff_t, bool);
 
 /* The last boundary auto-added to buffer-undo-list.  */
 Lisp_Object last_undo_boundary;
 
-extern Lisp_Object Qregion_extract_function;
-
 /* FIXME: This is wrong rather than test window-system, we should call
    a new set-selection, which will then dispatch to x-set-selection, or
    tty-set-selection, or w32-set-selection, ...  */
@@ -1449,7 +1459,7 @@ command_loop_1 (void)
       Vthis_command_keys_shift_translated = Qnil;
 
       /* Read next key sequence; i gets its length.  */
-      i = read_key_sequence (keybuf, sizeof keybuf / sizeof keybuf[0],
+      i = read_key_sequence (keybuf, ARRAYELTS (keybuf),
                             Qnil, 0, 1, 1, 0);
 
       /* A filter may have run while we were reading the input.  */
@@ -1697,7 +1707,7 @@ read_menu_command (void)
      menus.  */
   specbind (Qecho_keystrokes, make_number (0));
 
-  i = read_key_sequence (keybuf, sizeof keybuf / sizeof keybuf[0],
+  i = read_key_sequence (keybuf, ARRAYELTS (keybuf),
                         Qnil, 0, 1, 1, 1);
 
   unbind_to (count, Qnil);
@@ -1866,30 +1876,27 @@ adjust_point_for_property (ptrdiff_t last_pt, bool modified)
     }
 }
 
-/* Subroutine for safe_run_hooks: run the hook HOOK.  */
+/* Subroutine for safe_run_hooks: run the hook, which is ARGS[1].  */
 
 static Lisp_Object
-safe_run_hooks_1 (void)
+safe_run_hooks_1 (ptrdiff_t nargs, Lisp_Object *args)
 {
-  eassert (CONSP (Vinhibit_quit));
-  return call0 (XCDR (Vinhibit_quit));
+  eassert (nargs == 2);
+  return call0 (args[1]);
 }
 
 /* Subroutine for safe_run_hooks: handle an error by clearing out the function
    from the hook.  */
 
 static Lisp_Object
-safe_run_hooks_error (Lisp_Object error_data)
+safe_run_hooks_error (Lisp_Object error, ptrdiff_t nargs, Lisp_Object *args)
 {
-  Lisp_Object hook
-    = CONSP (Vinhibit_quit) ? XCAR (Vinhibit_quit) : Vinhibit_quit;
-  Lisp_Object fun = CONSP (Vinhibit_quit) ? XCDR (Vinhibit_quit) : Qnil;
-  Lisp_Object args[4];
-  args[0] = build_string ("Error in %s (%S): %S");
-  args[1] = hook;
-  args[2] = fun;
-  args[3] = error_data;
-  Fmessage (4, args);
+  eassert (nargs == 2);
+  AUTO_STRING (format, "Error in %s (%S): %S");
+  Lisp_Object hook = args[0];
+  Lisp_Object fun = args[1];
+  Fmessage (4, (Lisp_Object []) {format, hook, fun, error});
+
   if (SYMBOLP (hook))
     {
       Lisp_Object val;
@@ -1921,13 +1928,14 @@ safe_run_hooks_error (Lisp_Object error_data)
 static Lisp_Object
 safe_run_hook_funcall (ptrdiff_t nargs, Lisp_Object *args)
 {
-  eassert (nargs == 1);
-  if (CONSP (Vinhibit_quit))
-    XSETCDR (Vinhibit_quit, args[0]);
-  else
-    Vinhibit_quit = Fcons (Vinhibit_quit, args[0]);
+  Lisp_Object iargs[2];
 
-  internal_condition_case (safe_run_hooks_1, Qt, safe_run_hooks_error);
+  eassert (nargs == 2);
+  /* Yes, run_hook_with_args works this way.  */
+  iargs[0] = args[1];
+  iargs[1] = args[0];
+  internal_condition_case_n (safe_run_hooks_1, 2, iargs,
+                            Qt, safe_run_hooks_error);
   return Qnil;
 }
 
@@ -1938,15 +1946,18 @@ safe_run_hook_funcall (ptrdiff_t nargs, Lisp_Object *args)
 void
 safe_run_hooks (Lisp_Object hook)
 {
-  /* FIXME: our `internal_condition_case' does not provide any way to pass data
-     to its body or to its handlers other than via globals such as
-     dynamically-bound variables ;-)  */
+  Lisp_Object args[2];
+  struct gcpro gcpro1;
   ptrdiff_t count = SPECPDL_INDEX ();
-  specbind (Qinhibit_quit, hook);
 
-  run_hook_with_args (1, &hook, safe_run_hook_funcall);
+  args[0] = hook;
+  args[1] = hook;
 
+  GCPRO1 (hook);
+  specbind (Qinhibit_quit, Qt);
+  run_hook_with_args (2, args, safe_run_hook_funcall);
   unbind_to (count, Qnil);
+  UNGCPRO;
 }
 
 \f
@@ -2091,16 +2102,13 @@ bind_polling_period (int n)
 \f
 /* Apply the control modifier to CHARACTER.  */
 
-#ifndef HAVE_NTGUI
-static
-#endif
 int
 make_ctrl_char (int c)
 {
   /* Save the upper bits here.  */
   int upper = c & ~0177;
 
-  if (! ASCII_BYTE_P (c))
+  if (! ASCII_CHAR_P (c))
     return c |= ctrl_modifier;
 
   c &= 0177;
@@ -2302,8 +2310,10 @@ read_decoded_event_from_main_queue (struct timespec *end_time,
                                     bool *used_mouse_menu)
 {
 #define MAX_ENCODED_BYTES 16
+#ifndef WINDOWSNT
   Lisp_Object events[MAX_ENCODED_BYTES];
   int n = 0;
+#endif
   while (true)
     {
       Lisp_Object nextevt
@@ -2336,15 +2346,16 @@ read_decoded_event_from_main_queue (struct timespec *end_time,
            { /* An encoded byte sequence, let's try to decode it.  */
              struct coding_system *coding
                = TERMINAL_KEYBOARD_CODING (terminal);
-             unsigned char *src = alloca (n);
+             unsigned char src[MAX_ENCODED_BYTES];
+             unsigned char dest[MAX_ENCODED_BYTES * MAX_MULTIBYTE_LENGTH];
              int i;
              for (i = 0; i < n; i++)
                src[i] = XINT (events[i]);
              if (meta_key != 2)
                for (i = 0; i < n; i++)
                  src[i] &= ~0x80;
-             coding->destination = alloca (n * 4);
-             coding->dst_bytes = n * 4;
+             coding->destination = dest;
+             coding->dst_bytes = sizeof dest;
              decode_coding_c_string (coding, src, n, Qnil);
              eassert (coding->produced_char <= n);
              if (coding->produced_char == 0)
@@ -2374,6 +2385,13 @@ read_decoded_event_from_main_queue (struct timespec *end_time,
     }
 }
 
+static bool
+echo_keystrokes_p (void)
+{
+  return (FLOATP (Vecho_keystrokes) ? XFLOAT_DATA (Vecho_keystrokes) > 0.0
+         : INTEGERP (Vecho_keystrokes) ? XINT (Vecho_keystrokes) > 0 : false);
+}
+
 /* Read a character from the keyboard; call the redisplay if needed.  */
 /* commandflag 0 means do not autosave, but do redisplay.
    -1 means do not redisplay, but do autosave.
@@ -2431,7 +2449,6 @@ read_char (int commandflag, Lisp_Object map,
 
  retry:
 
-  reread = 0;
   if (CONSP (Vunread_post_input_method_events))
     {
       c = XCAR (Vunread_post_input_method_events);
@@ -2445,9 +2462,12 @@ read_char (int commandflag, Lisp_Object map,
          && NILP (XCDR (c)))
        c = XCAR (c);
 
-      reread = 1;
+      reread = true;
       goto reread_first;
     }
+  else
+    reread = false;
+
 
   if (CONSP (Vunread_command_events))
     {
@@ -2456,17 +2476,13 @@ read_char (int commandflag, Lisp_Object map,
       c = XCAR (Vunread_command_events);
       Vunread_command_events = XCDR (Vunread_command_events);
 
-      reread = 1;
-
       /* Undo what sit-for did when it unread additional keys
         inside universal-argument.  */
 
-      if (CONSP (c)
-         && EQ (XCAR (c), Qt))
-       {
-         reread = 0;
-         c = XCDR (c);
-       }
+      if (CONSP (c) && EQ (XCAR (c), Qt))
+       c = XCDR (c);
+      else
+       reread = true;
 
       /* Undo what read_char_x_menu_prompt did when it unread
         additional keys returned by Fx_popup_menu.  */
@@ -2500,7 +2516,7 @@ read_char (int commandflag, Lisp_Object map,
          && (SYMBOLP (XCAR (c)) || INTEGERP (XCAR (c)))
          && NILP (XCDR (c)))
        c = XCAR (c);
-      reread = 1;
+      reread = true;
       goto reread_for_input_method;
     }
 
@@ -2655,6 +2671,7 @@ read_char (int commandflag, Lisp_Object map,
       /* We must have saved the outer value of getcjmp here,
         so restore it now.  */
       restore_getcjmp (save_jump);
+      pthread_sigmask (SIG_SETMASK, &empty_mask, 0);
       unbind_to (jmpcount, Qnil);
       XSETINT (c, quit_char);
       internal_last_event_frame = selected_frame;
@@ -2709,8 +2726,7 @@ read_char (int commandflag, Lisp_Object map,
       && !current_kboard->immediate_echo
       && this_command_key_count > 0
       && ! noninteractive
-      && (FLOATP (Vecho_keystrokes) || INTEGERP (Vecho_keystrokes))
-      && NILP (Fzerop (Vecho_keystrokes))
+      && echo_keystrokes_p ()
       && (/* No message.  */
          NILP (echo_area_buffer[0])
          /* Or empty message.  */
@@ -2841,6 +2857,11 @@ read_char (int commandflag, Lisp_Object map,
     {
       c = XCAR (Vunread_command_events);
       Vunread_command_events = XCDR (Vunread_command_events);
+
+      if (CONSP (c) && EQ (XCAR (c), Qt))
+       c = XCDR (c);
+      else
+       reread = true;
     }
 
   /* Read something from current KBOARD's side queue, if possible.  */
@@ -2894,8 +2915,8 @@ read_char (int commandflag, Lisp_Object map,
     {
       c = read_decoded_event_from_main_queue (end_time, local_getcjmp,
                                               prev_event, used_mouse_menu);
-      if (NILP(c) && end_time &&
-          timespec_cmp (*end_time, current_timespec ()) <= 0)
+      if (NILP (c) && end_time
+         && timespec_cmp (*end_time, current_timespec ()) <= 0)
         {
           goto exit;
         }
@@ -3171,8 +3192,7 @@ read_char (int commandflag, Lisp_Object map,
     {
 
       /* Don't echo mouse motion events.  */
-      if ((FLOATP (Vecho_keystrokes) || INTEGERP (Vecho_keystrokes))
-         && NILP (Fzerop (Vecho_keystrokes))
+      if (echo_keystrokes_p ()
          && ! (EVENT_HAS_PARAMETERS (c)
                && EQ (EVENT_HEAD_KIND (EVENT_HEAD (c)), Qmouse_movement)))
        {
@@ -3248,8 +3268,7 @@ record_menu_key (Lisp_Object c)
 #endif
 
   /* Don't echo mouse motion events.  */
-  if ((FLOATP (Vecho_keystrokes) || INTEGERP (Vecho_keystrokes))
-      && NILP (Fzerop (Vecho_keystrokes)))
+  if (echo_keystrokes_p ())
     {
       echo_char (c);
 
@@ -3471,7 +3490,8 @@ readable_events (int flags)
                    event->kind == FOCUS_IN_EVENT)
 #ifdef USE_TOOLKIT_SCROLL_BARS
                  && !((flags & READABLE_EVENTS_IGNORE_SQUEEZABLES)
-                      && event->kind == SCROLL_BAR_CLICK_EVENT
+                      && (event->kind == SCROLL_BAR_CLICK_EVENT
+                          || event->kind == HORIZONTAL_SCROLL_BAR_CLICK_EVENT)
                       && event->part == scroll_bar_handle
                       && event->modifiers == 0)
 #endif
@@ -3704,6 +3724,34 @@ kbd_buffer_unget_event (register struct input_event *event)
     }
 }
 
+/* Limit help event positions to this range, to avoid overflow problems.  */
+#define INPUT_EVENT_POS_MAX \
+  ((ptrdiff_t) min (PTRDIFF_MAX, min (TYPE_MAXIMUM (Time) / 2, \
+                                     MOST_POSITIVE_FIXNUM)))
+#define INPUT_EVENT_POS_MIN (-1 - INPUT_EVENT_POS_MAX)
+
+/* Return a Time that encodes position POS.  POS must be in range.  */
+
+static Time
+position_to_Time (ptrdiff_t pos)
+{
+  eassert (INPUT_EVENT_POS_MIN <= pos && pos <= INPUT_EVENT_POS_MAX);
+  return pos;
+}
+
+/* Return the position that ENCODED_POS encodes.
+   Avoid signed integer overflow.  */
+
+static ptrdiff_t
+Time_to_position (Time encoded_pos)
+{
+  if (encoded_pos <= INPUT_EVENT_POS_MAX)
+    return encoded_pos;
+  Time encoded_pos_min = INPUT_EVENT_POS_MIN;
+  eassert (encoded_pos_min <= encoded_pos);
+  ptrdiff_t notpos = -1 - encoded_pos;
+  return -1 - notpos;
+}
 
 /* Generate a HELP_EVENT input_event and store it in the keyboard
    buffer.
@@ -3722,14 +3770,12 @@ gen_help_event (Lisp_Object help, Lisp_Object frame, Lisp_Object window,
 {
   struct input_event event;
 
-  EVENT_INIT (event);
-
   event.kind = HELP_EVENT;
   event.frame_or_window = frame;
   event.arg = object;
   event.x = WINDOWP (window) ? window : frame;
   event.y = help;
-  event.code = pos;
+  event.timestamp = position_to_Time (pos);
   kbd_buffer_store_event (&event);
 }
 
@@ -3746,7 +3792,7 @@ kbd_buffer_store_help_event (Lisp_Object frame, Lisp_Object help)
   event.arg = Qnil;
   event.x = Qnil;
   event.y = help;
-  event.code = 0;
+  event.timestamp = 0;
   kbd_buffer_store_event (&event);
 }
 
@@ -3768,7 +3814,8 @@ discard_mouse_events (void)
 #ifdef HAVE_GPM
          || sp->kind == GPM_CLICK_EVENT
 #endif
-         || sp->kind == SCROLL_BAR_CLICK_EVENT)
+         || sp->kind == SCROLL_BAR_CLICK_EVENT
+         || sp->kind == HORIZONTAL_SCROLL_BAR_CLICK_EVENT)
        {
          sp->kind = NO_EVENT;
        }
@@ -4060,7 +4107,7 @@ kbd_buffer_get_event (KBOARD **kbp,
 
          frame = event->frame_or_window;
          object = event->arg;
-         position = make_number (event->code);
+         position = make_number (Time_to_position (event->timestamp));
          window = event->x;
          help = event->y;
          clear_event (event);
@@ -4375,8 +4422,9 @@ decode_timer (Lisp_Object timer, struct timespec *result)
   if (! NILP (vector[0]))
     return 0;
 
-  return decode_time_components (vector[1], vector[2], vector[3], vector[8],
-                                result, 0);
+  return (decode_time_components (vector[1], vector[2], vector[3], vector[8],
+                                 result, 0)
+         && timespec_valid_p (*result));
 }
 
 
@@ -5167,15 +5215,20 @@ static const char *const lispy_drag_n_drop_names[] =
 
 /* Scroll bar parts.  */
 static Lisp_Object Qabove_handle, Qhandle, Qbelow_handle;
-Lisp_Object Qup, Qdown, Qbottom;
+static Lisp_Object Qbefore_handle, Qhorizontal_handle, Qafter_handle;
+Lisp_Object Qup, Qdown, Qtop, Qbottom;
+static Lisp_Object Qleftmost, Qrightmost;
 static Lisp_Object Qend_scroll;
-Lisp_Object Qtop;
 static Lisp_Object Qratio;
 
-/* An array of scroll bar parts, indexed by an enum scroll_bar_part value.  */
+/* An array of scroll bar parts, indexed by an enum scroll_bar_part value.
+   Note that Qnil corresponds to scroll_bar_nowhere and should not appear
+   in Lisp events.  */
 static Lisp_Object *const scroll_bar_parts[] = {
-  &Qabove_handle, &Qhandle, &Qbelow_handle,
-  &Qup, &Qdown, &Qtop, &Qbottom, &Qend_scroll, &Qratio
+  &Qnil, &Qabove_handle, &Qhandle, &Qbelow_handle,
+  &Qup, &Qdown, &Qtop, &Qbottom, &Qend_scroll, &Qratio,
+  &Qbefore_handle, &Qhorizontal_handle, &Qafter_handle,
+  &Qleft, &Qright, &Qleftmost, &Qrightmost, &Qend_scroll, &Qratio
 };
 
 /* A vector, indexed by button number, giving the down-going location
@@ -5225,7 +5278,7 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y,
       /* It's a click in window WINDOW at frame coordinates (X,Y)  */
       struct window *w = XWINDOW (window);
       Lisp_Object string_info = Qnil;
-      ptrdiff_t textpos = -1;
+      ptrdiff_t textpos = 0;
       int col = -1, row = -1;
       int dx  = -1, dy  = -1;
       int width = -1, height = -1;
@@ -5260,9 +5313,7 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y,
                                     &object, &dx, &dy, &width, &height);
          if (STRINGP (string))
            string_info = Fcons (string, make_number (charpos));
-         textpos = (w == XWINDOW (selected_window)
-                    && current_buffer == XBUFFER (w->contents))
-           ? PT : marker_position (w->pointm);
+         textpos = -1;
 
          xret = wx;
          yret = wy;
@@ -5330,7 +5381,7 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y,
       /* For clicks in the text area, fringes, or margins, call
         buffer_posn_from_coords to extract TEXTPOS, the buffer
         position nearest to the click.  */
-      if (textpos < 0)
+      if (!textpos)
        {
          Lisp_Object string2, object2 = Qnil;
          struct display_pos p;
@@ -5381,15 +5432,15 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y,
        }
 #endif
 
-      /* Object info */
+      /* Object info */
       extra_info
        = list3 (object,
                 Fcons (make_number (dx), make_number (dy)),
                 Fcons (make_number (width), make_number (height)));
 
-      /* String info */
+      /* String info */
       extra_info = Fcons (string_info,
-                         Fcons (make_number (textpos),
+                         Fcons (textpos < 0 ? Qnil : make_number (textpos),
                                 Fcons (Fcons (make_number (col),
                                               make_number (row)),
                                        extra_info)));
@@ -5421,6 +5472,16 @@ toolkit_menubar_in_use (struct frame *f)
 #endif
 }
 
+/* Build the part of Lisp event which represents scroll bar state from
+   EV.  TYPE is one of Qvertical_scroll_bar or Qhorizontal_scroll_bar.  */
+
+static Lisp_Object
+make_scroll_bar_position (struct input_event *ev, Lisp_Object type)
+{
+  return list5 (ev->frame_or_window, type, Fcons (ev->x, ev->y),
+               make_number (ev->timestamp), *scroll_bar_parts[ev->part]);
+}
+
 /* Given a struct input_event, build the lisp event which represents
    it.  If EVENT is 0, build a mouse movement event from the mouse
    movement buffer, which should have a movement event in it.
@@ -5480,14 +5541,13 @@ make_lispy_event (struct input_event *event)
     case NON_ASCII_KEYSTROKE_EVENT:
       button_down_time = 0;
 
-      for (i = 0; i < sizeof (lispy_accent_codes) / sizeof (int); i++)
+      for (i = 0; i < ARRAYELTS (lispy_accent_codes); i++)
        if (event->code == lispy_accent_codes[i])
          return modify_event_symbol (i,
                                      event->modifiers,
                                      Qfunction_key, Qnil,
                                      lispy_accent_keys, &accent_key_syms,
-                                     (sizeof (lispy_accent_keys)
-                                      / sizeof (lispy_accent_keys[0])));
+                                      ARRAYELTS (lispy_accent_keys));
 
 #if 0
 #ifdef XK_kana_A
@@ -5496,8 +5556,7 @@ make_lispy_event (struct input_event *event)
                                    event->modifiers & ~shift_modifier,
                                    Qfunction_key, Qnil,
                                    lispy_kana_keys, &func_key_syms,
-                                   (sizeof (lispy_kana_keys)
-                                    / sizeof (lispy_kana_keys[0])));
+                                    ARRAYELTS (lispy_kana_keys));
 #endif /* XK_kana_A */
 #endif /* 0 */
 
@@ -5508,47 +5567,40 @@ make_lispy_event (struct input_event *event)
                                    event->modifiers,
                                    Qfunction_key, Qnil,
                                    iso_lispy_function_keys, &func_key_syms,
-                                   (sizeof (iso_lispy_function_keys)
-                                    / sizeof (iso_lispy_function_keys[0])));
+                                    ARRAYELTS (iso_lispy_function_keys));
 #endif
 
-      /* Handle system-specific or unknown keysyms.  */
-      if (event->code & (1 << 28)
-         || event->code - FUNCTION_KEY_OFFSET < 0
-         || (event->code - FUNCTION_KEY_OFFSET
-             >= sizeof lispy_function_keys / sizeof *lispy_function_keys)
-         || !lispy_function_keys[event->code - FUNCTION_KEY_OFFSET])
-       {
-         /* We need to use an alist rather than a vector as the cache
-            since we can't make a vector long enough.  */
-         if (NILP (KVAR (current_kboard, system_key_syms)))
-           kset_system_key_syms (current_kboard, Fcons (Qnil, Qnil));
-         return modify_event_symbol (event->code,
-                                     event->modifiers,
-                                     Qfunction_key,
-                                     KVAR (current_kboard, Vsystem_key_alist),
-                                     0, &KVAR (current_kboard, system_key_syms),
-                                     PTRDIFF_MAX);
-       }
-
-      return modify_event_symbol (event->code - FUNCTION_KEY_OFFSET,
+      if ((FUNCTION_KEY_OFFSET <= event->code
+          && (event->code
+              < FUNCTION_KEY_OFFSET + ARRAYELTS (lispy_function_keys)))
+         && lispy_function_keys[event->code - FUNCTION_KEY_OFFSET])
+       return modify_event_symbol (event->code - FUNCTION_KEY_OFFSET,
+                                   event->modifiers,
+                                   Qfunction_key, Qnil,
+                                   lispy_function_keys, &func_key_syms,
+                                   ARRAYELTS (lispy_function_keys));
+
+      /* Handle system-specific or unknown keysyms.
+        We need to use an alist rather than a vector as the cache
+        since we can't make a vector long enough.  */
+      if (NILP (KVAR (current_kboard, system_key_syms)))
+       kset_system_key_syms (current_kboard, Fcons (Qnil, Qnil));
+      return modify_event_symbol (event->code,
                                  event->modifiers,
-                                 Qfunction_key, Qnil,
-                                 lispy_function_keys, &func_key_syms,
-                                 (sizeof (lispy_function_keys)
-                                  / sizeof (lispy_function_keys[0])));
+                                 Qfunction_key,
+                                 KVAR (current_kboard, Vsystem_key_alist),
+                                 0, &KVAR (current_kboard, system_key_syms),
+                                 PTRDIFF_MAX);
 
 #ifdef HAVE_NTGUI
     case MULTIMEDIA_KEY_EVENT:
-      if (event->code < (sizeof (lispy_multimedia_keys)
-                         / sizeof (lispy_multimedia_keys[0]))
+      if (event->code < ARRAYELTS (lispy_multimedia_keys)
           && event->code > 0 && lispy_multimedia_keys[event->code])
         {
           return modify_event_symbol (event->code, event->modifiers,
                                       Qfunction_key, Qnil,
                                       lispy_multimedia_keys, &func_key_syms,
-                                      (sizeof (lispy_multimedia_keys)
-                                       / sizeof (lispy_multimedia_keys[0])));
+                                      ARRAYELTS (lispy_multimedia_keys));
         }
       return Qnil;
 #endif
@@ -5561,6 +5613,7 @@ make_lispy_event (struct input_event *event)
 #endif
 #ifndef USE_TOOLKIT_SCROLL_BARS
     case SCROLL_BAR_CLICK_EVENT:
+    case HORIZONTAL_SCROLL_BAR_CLICK_EVENT:
 #endif
       {
        int button = event->code;
@@ -5643,20 +5696,8 @@ make_lispy_event (struct input_event *event)
          }
 #ifndef USE_TOOLKIT_SCROLL_BARS
        else
-         {
-           /* It's a scrollbar click.  */
-           Lisp_Object window;
-           Lisp_Object portion_whole;
-           Lisp_Object part;
-
-           window = event->frame_or_window;
-           portion_whole = Fcons (event->x, event->y);
-           part = *scroll_bar_parts[(int) event->part];
-
-           position = list5 (window, Qvertical_scroll_bar,
-                             portion_whole, make_number (event->timestamp),
-                             part);
-         }
+         /* It's a scrollbar click.  */
+         position = make_scroll_bar_position (event, Qvertical_scroll_bar);
 #endif /* not USE_TOOLKIT_SCROLL_BARS */
 
        if (button >= ASIZE (button_down_location))
@@ -5933,14 +5974,34 @@ make_lispy_event (struct input_event *event)
 
     case SCROLL_BAR_CLICK_EVENT:
       {
-       Lisp_Object position, head, window, portion_whole, part;
+       Lisp_Object position, head;
+
+       position = make_scroll_bar_position (event, Qvertical_scroll_bar);
+
+       /* Always treat scroll bar events as clicks.  */
+       event->modifiers |= click_modifier;
+       event->modifiers &= ~up_modifier;
+
+       if (event->code >= ASIZE (mouse_syms))
+          mouse_syms = larger_vector (mouse_syms,
+                                     event->code - ASIZE (mouse_syms) + 1,
+                                     -1);
+
+       /* Get the symbol we should use for the mouse click.  */
+       head = modify_event_symbol (event->code,
+                                   event->modifiers,
+                                   Qmouse_click,
+                                   Vlispy_mouse_stem,
+                                   NULL, &mouse_syms,
+                                   ASIZE (mouse_syms));
+       return list2 (head, position);
+      }
 
-       window = event->frame_or_window;
-       portion_whole = Fcons (event->x, event->y);
-       part = *scroll_bar_parts[(int) event->part];
+    case HORIZONTAL_SCROLL_BAR_CLICK_EVENT:
+      {
+       Lisp_Object position, head;
 
-       position = list5 (window, Qvertical_scroll_bar, portion_whole,
-                         make_number (event->timestamp), part);
+       position = make_scroll_bar_position (event, Qhorizontal_scroll_bar);
 
        /* Always treat scroll bar events as clicks.  */
        event->modifiers |= click_modifier;
@@ -6270,7 +6331,7 @@ static const char *const modifier_names[] =
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
   0, 0, "alt", "super", "hyper", "shift", "control", "meta"
 };
-#define NUM_MOD_NAMES (sizeof (modifier_names) / sizeof (modifier_names[0]))
+#define NUM_MOD_NAMES ARRAYELTS (modifier_names)
 
 static Lisp_Object modifier_symbols;
 
@@ -6878,6 +6939,20 @@ gobble_input (void)
              }
             }
 
+         /* If there was no error, make sure the pointer
+            is visible for all frames on this terminal.  */
+         if (nr >= 0)
+           {
+             Lisp_Object tail, frame;
+
+             FOR_EACH_FRAME (tail, frame)
+               {
+                 struct frame *f = XFRAME (frame);
+                 if (FRAME_TERMINAL (f) == t)
+                   frame_make_pointer_visible (f);
+               }
+           }
+
           if (hold_quit.kind != NO_EVENT)
             kbd_buffer_store_event (&hold_quit);
         }
@@ -6888,8 +6963,6 @@ gobble_input (void)
   if (err && !nread)
     nread = -1;
 
-  frame_make_pointer_visible ();
-
   return nread;
 }
 
@@ -7295,7 +7368,7 @@ store_user_signal_events (void)
 }
 
 \f
-static void menu_bar_item (Lisp_Object, Lisp_Object, Lisp_Object, void*);
+static void menu_bar_item (Lisp_Object, Lisp_Object, Lisp_Object, void *);
 static Lisp_Object menu_bar_one_keymap_changed_items;
 
 /* These variables hold the vector under construction within
@@ -7305,7 +7378,7 @@ static Lisp_Object menu_bar_items_vector;
 static int menu_bar_items_index;
 
 
-static const charseparator_names[] = {
+static const char *separator_names[] = {
   "space",
   "no-line",
   "single-line",
@@ -7369,11 +7442,14 @@ menu_bar_items (Lisp_Object old)
      in the current keymaps, or nil where it is not a prefix.  */
   Lisp_Object *maps;
 
+  Lisp_Object mapsbuf[3];
   Lisp_Object def, tail;
 
   ptrdiff_t mapno;
   Lisp_Object oquit;
 
+  USE_SAFE_ALLOCA;
+
   /* In order to build the menus, we need to call the keymap
      accessors.  They all call QUIT.  But this function is called
      during redisplay, during which a quit is fatal.  So inhibit
@@ -7402,7 +7478,7 @@ menu_bar_items (Lisp_Object old)
        && !NILP (Voverriding_local_map))
       {
        /* Yes, use them (if non-nil) as well as the global map.  */
-       maps = alloca (3 * sizeof (maps[0]));
+       maps = mapsbuf;
        nmaps = 0;
        if (!NILP (KVAR (current_kboard, Voverriding_terminal_local_map)))
          maps[nmaps++] = KVAR (current_kboard, Voverriding_terminal_local_map);
@@ -7419,7 +7495,7 @@ menu_bar_items (Lisp_Object old)
        Lisp_Object tem;
        ptrdiff_t nminor;
        nminor = current_minor_maps (NULL, &tmaps);
-       maps = alloca ((nminor + 4) * sizeof *maps);
+       SAFE_NALLOCA (maps, 1, nminor + 4);
        nmaps = 0;
        tem = KVAR (current_kboard, Voverriding_terminal_local_map);
        if (!NILP (tem) && !NILP (Voverriding_local_map_menu_flag))
@@ -7480,8 +7556,8 @@ menu_bar_items (Lisp_Object old)
   {
     int i = menu_bar_items_index;
     if (i + 4 > ASIZE (menu_bar_items_vector))
-      menu_bar_items_vector =
-       larger_vector (menu_bar_items_vector, 4, -1);
+      menu_bar_items_vector
+       larger_vector (menu_bar_items_vector, 4, -1);
     /* Add this item.  */
     ASET (menu_bar_items_vector, i, Qnil); i++;
     ASET (menu_bar_items_vector, i, Qnil); i++;
@@ -7491,6 +7567,7 @@ menu_bar_items (Lisp_Object old)
   }
 
   Vinhibit_quit = oquit;
+  SAFE_FREE ();
   return menu_bar_items_vector;
 }
 \f
@@ -7806,11 +7883,12 @@ parse_menu_item (Lisp_Object item, int inmenubar)
 
   { /* This is a command.  See if there is an equivalent key binding.  */
     Lisp_Object keyeq = AREF (item_properties, ITEM_PROPERTY_KEYEQ);
+    AUTO_STRING (space_space, "  ");
 
     /* The previous code preferred :key-sequence to :keys, so we
        preserve this behavior.  */
     if (STRINGP (keyeq) && !CONSP (keyhint))
-      keyeq = concat2 (build_string ("  "), Fsubstitute_command_keys (keyeq));
+      keyeq = concat2 (space_space, Fsubstitute_command_keys (keyeq));
     else
       {
        Lisp_Object prefix = keyeq;
@@ -7853,8 +7931,7 @@ parse_menu_item (Lisp_Object item, int inmenubar)
                if (STRINGP (XCDR (prefix)))
                  tem = concat2 (tem, XCDR (prefix));
              }
-           keyeq = concat2 (build_string ("  "), tem);
-           /* keyeq = concat3(build_string("  ("),tem,build_string(")")); */
+           keyeq = concat2 (space_space, tem);
          }
        else
          keyeq = Qnil;
@@ -7913,7 +7990,8 @@ static Lisp_Object QCrtl;
 /* Function prototypes.  */
 
 static void init_tool_bar_items (Lisp_Object);
-static void process_tool_bar_item (Lisp_Object, Lisp_Object, Lisp_Object, void*);
+static void process_tool_bar_item (Lisp_Object, Lisp_Object, Lisp_Object,
+                                  void *);
 static bool parse_tool_bar_item (Lisp_Object, Lisp_Object);
 static void append_tool_bar_item (void);
 
@@ -7926,9 +8004,11 @@ Lisp_Object
 tool_bar_items (Lisp_Object reuse, int *nitems)
 {
   Lisp_Object *maps;
+  Lisp_Object mapsbuf[3];
   ptrdiff_t nmaps, i;
   Lisp_Object oquit;
   Lisp_Object *tmaps;
+  USE_SAFE_ALLOCA;
 
   *nitems = 0;
 
@@ -7952,7 +8032,7 @@ tool_bar_items (Lisp_Object reuse, int *nitems)
       && !NILP (Voverriding_local_map))
     {
       /* Yes, use them (if non-nil) as well as the global map.  */
-      maps = alloca (3 * sizeof *maps);
+      maps = mapsbuf;
       nmaps = 0;
       if (!NILP (KVAR (current_kboard, Voverriding_terminal_local_map)))
        maps[nmaps++] = KVAR (current_kboard, Voverriding_terminal_local_map);
@@ -7969,7 +8049,7 @@ tool_bar_items (Lisp_Object reuse, int *nitems)
       Lisp_Object tem;
       ptrdiff_t nminor;
       nminor = current_minor_maps (NULL, &tmaps);
-      maps = alloca ((nminor + 4) * sizeof *maps);
+      SAFE_NALLOCA (maps, 1, nminor + 4);
       nmaps = 0;
       tem = KVAR (current_kboard, Voverriding_terminal_local_map);
       if (!NILP (tem) && !NILP (Voverriding_local_map_menu_flag))
@@ -7998,6 +8078,7 @@ tool_bar_items (Lisp_Object reuse, int *nitems)
 
   Vinhibit_quit = oquit;
   *nitems = ntool_bar_items / TOOL_BAR_ITEM_NSLOTS;
+  SAFE_FREE ();
   return tool_bar_items_vector;
 }
 
@@ -8436,7 +8517,7 @@ static Lisp_Object
 read_char_minibuf_menu_prompt (int commandflag,
                               Lisp_Object map)
 {
-  register Lisp_Object name;
+  Lisp_Object name;
   ptrdiff_t nlength;
   /* FIXME: Use the minibuffer's frame width.  */
   ptrdiff_t width = FRAME_COLS (SELECTED_FRAME ()) - 4;
@@ -8554,10 +8635,14 @@ read_char_minibuf_menu_prompt (int commandflag,
                      /* Insert button prefix.  */
                      Lisp_Object selected
                        = AREF (item_properties, ITEM_PROPERTY_SELECTED);
+                     AUTO_STRING (radio_yes, "(*) ");
+                     AUTO_STRING (radio_no , "( ) ");
+                     AUTO_STRING (check_yes, "[X] ");
+                     AUTO_STRING (check_no , "[ ] ");
                      if (EQ (tem, QCradio))
-                       tem = build_string (NILP (selected) ? "(*) " : "( ) ");
+                       tem = NILP (selected) ? radio_yes : radio_no;
                      else
-                       tem = build_string (NILP (selected) ? "[X] " : "[ ] ");
+                       tem = NILP (selected) ? check_yes : check_no;
                      s = concat2 (tem, s);
                    }
 
@@ -8935,8 +9020,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
          echo_now ();
        }
       else if (cursor_in_echo_area
-              && (FLOATP (Vecho_keystrokes) || INTEGERP (Vecho_keystrokes))
-              && NILP (Fzerop (Vecho_keystrokes)))
+              && echo_keystrokes_p ())
        /* This doesn't put in a dash if the echo buffer is empty, so
           you don't always see a dash hanging out in the minibuffer.  */
        echo_dash ();
@@ -9068,8 +9152,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
        {
          key = keybuf[t];
          add_command_key (key);
-         if ((FLOATP (Vecho_keystrokes) || INTEGERP (Vecho_keystrokes))
-             && NILP (Fzerop (Vecho_keystrokes))
+         if (echo_keystrokes_p ()
              && current_kboard->immediate_echo)
            {
              echo_add_key (key);
@@ -9734,8 +9817,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
      Better ideas?  */
   for (; t < mock_input; t++)
     {
-      if ((FLOATP (Vecho_keystrokes) || INTEGERP (Vecho_keystrokes))
-         && NILP (Fzerop (Vecho_keystrokes)))
+      if (echo_keystrokes_p ())
        echo_char (keybuf[t]);
       add_command_key (keybuf[t]);
     }
@@ -9766,7 +9848,7 @@ read_key_sequence_vs (Lisp_Object prompt, Lisp_Object continue_echo,
 
   memset (keybuf, 0, sizeof keybuf);
   GCPRO1 (keybuf[0]);
-  gcpro1.nvars = (sizeof keybuf / sizeof (keybuf[0]));
+  gcpro1.nvars = ARRAYELTS (keybuf);
 
   if (NILP (continue_echo))
     {
@@ -9780,7 +9862,7 @@ read_key_sequence_vs (Lisp_Object prompt, Lisp_Object continue_echo,
     cancel_hourglass ();
 #endif
 
-  i = read_key_sequence (keybuf, (sizeof keybuf / sizeof (keybuf[0])),
+  i = read_key_sequence (keybuf, ARRAYELTS (keybuf),
                         prompt, ! NILP (dont_downcase_last),
                         ! NILP (can_return_switch_frame), 0, 0);
 
@@ -10182,7 +10264,9 @@ On such systems, Emacs starts a subshell instead of suspending.  */)
      with a window system; but suspend should be disabled in that case.  */
   get_tty_size (fileno (CURTTY ()->input), &width, &height);
   if (width != old_width || height != old_height)
-    change_frame_size (SELECTED_FRAME (), width, height, 0, 0, 0, 0);
+    change_frame_size (SELECTED_FRAME (), width,
+                      height - FRAME_MENU_BAR_LINES (SELECTED_FRAME ()),
+                      0, 0, 0, 0);
 
   /* Run suspend-resume-hook.  */
   hook = intern ("suspend-resume-hook");
@@ -10265,7 +10349,7 @@ static void
 handle_interrupt_signal (int sig)
 {
   /* See if we have an active terminal on our controlling tty.  */
-  struct terminal *terminal = get_named_tty ("/dev/tty");
+  struct terminal *terminal = get_named_terminal ("/dev/tty");
   if (!terminal)
     {
       /* If there are no frames there, let's pretend that we are a
@@ -10319,7 +10403,7 @@ handle_interrupt (bool in_signal_handler)
   cancel_echoing ();
 
   /* XXX This code needs to be revised for multi-tty support.  */
-  if (!NILP (Vquit_flag) && get_named_tty ("/dev/tty"))
+  if (!NILP (Vquit_flag) && get_named_terminal ("/dev/tty"))
     {
       if (! in_signal_handler)
        {
@@ -10531,9 +10615,10 @@ Emacs reads input in CBREAK mode; see `set-input-interrupt-mode'.
 See also `current-input-mode'.  */)
   (Lisp_Object flow, Lisp_Object terminal)
 {
-  struct terminal *t = get_terminal (terminal, 1);
+  struct terminal *t = decode_tty_terminal (terminal);
   struct tty_display_info *tty;
-  if (t == NULL || (t->type != output_termcap && t->type != output_msdos_raw))
+
+  if (!t)
     return Qnil;
   tty = t->display_info.tty;
 
@@ -10573,11 +10658,11 @@ the currently selected frame.
 See also `current-input-mode'.  */)
   (Lisp_Object meta, Lisp_Object terminal)
 {
-  struct terminal *t = get_terminal (terminal, 1);
+  struct terminal *t = decode_tty_terminal (terminal);
   struct tty_display_info *tty;
   int new_meta;
 
-  if (t == NULL || (t->type != output_termcap && t->type != output_msdos_raw))
+  if (!t)
     return Qnil;
   tty = t->display_info.tty;
 
@@ -10614,9 +10699,10 @@ process.
 See also `current-input-mode'.  */)
   (Lisp_Object quit)
 {
-  struct terminal *t = get_named_tty ("/dev/tty");
+  struct terminal *t = get_named_terminal ("/dev/tty");
   struct tty_display_info *tty;
-  if (t == NULL || (t->type != output_termcap && t->type != output_msdos_raw))
+
+  if (!t)
     return Qnil;
   tty = t->display_info.tty;
 
@@ -10693,7 +10779,7 @@ The elements of this list correspond to the arguments of
     }
   XSETFASTINT (val[3], quit_char);
 
-  return Flist (sizeof (val) / sizeof (val[0]), val);
+  return Flist (ARRAYELTS (val), val);
 }
 
 DEFUN ("posn-at-x-y", Fposn_at_x_y, Sposn_at_x_y, 2, 4, 0,
@@ -10959,6 +11045,15 @@ syms_of_keyboard (void)
   Vlispy_mouse_stem = build_pure_c_string ("mouse");
   staticpro (&Vlispy_mouse_stem);
 
+  regular_top_level_message = build_pure_c_string ("Back to top level");
+#ifdef HAVE_STACK_OVERFLOW_HANDLING
+  recover_top_level_message
+    = build_pure_c_string ("Re-entering top level after C stack overflow");
+#endif
+  DEFVAR_LISP ("internal--top-level-message", Vinternal__top_level_message,
+              doc: /* Message displayed by `normal-top-level'.  */);
+  Vinternal__top_level_message = regular_top_level_message;
+
   /* Tool-bars.  */
   DEFSYM (QCimage, ":image");
   DEFSYM (Qhelp_echo, "help-echo");
@@ -11016,7 +11111,6 @@ syms_of_keyboard (void)
 
   DEFSYM (Qmode_line, "mode-line");
   DEFSYM (Qvertical_line, "vertical-line");
-  DEFSYM (Qvertical_scroll_bar, "vertical-scroll-bar");
   DEFSYM (Qmenu_bar, "menu-bar");
   DEFSYM (Qright_divider, "right-divider");
   DEFSYM (Qbottom_divider, "bottom-divider");
@@ -11032,6 +11126,13 @@ syms_of_keyboard (void)
   DEFSYM (Qbottom, "bottom");
   DEFSYM (Qend_scroll, "end-scroll");
   DEFSYM (Qratio, "ratio");
+  DEFSYM (Qbefore_handle, "before-handle");
+  DEFSYM (Qhorizontal_handle, "horizontal-handle");
+  DEFSYM (Qafter_handle, "after-handle");
+  DEFSYM (Qleft, "left");
+  DEFSYM (Qright, "right");
+  DEFSYM (Qleftmost, "leftmost");
+  DEFSYM (Qrightmost, "rightmost");
 
   DEFSYM (Qevent_kind, "event-kind");
   DEFSYM (Qevent_symbol_elements, "event-symbol-elements");
@@ -11061,7 +11162,7 @@ syms_of_keyboard (void)
 
   {
     int i;
-    int len = sizeof (head_table) / sizeof (head_table[0]);
+    int len = ARRAYELTS (head_table);
 
     for (i = 0; i < len; i++)
       {
@@ -11077,14 +11178,13 @@ syms_of_keyboard (void)
   staticpro (&button_down_location);
   mouse_syms = Fmake_vector (make_number (5), Qnil);
   staticpro (&mouse_syms);
-  wheel_syms = Fmake_vector (make_number (sizeof (lispy_wheel_names)
-                                         / sizeof (lispy_wheel_names[0])),
+  wheel_syms = Fmake_vector (make_number (ARRAYELTS (lispy_wheel_names)),
                             Qnil);
   staticpro (&wheel_syms);
 
   {
     int i;
-    int len = sizeof (modifier_names) / sizeof (modifier_names[0]);
+    int len = ARRAYELTS (modifier_names);
 
     modifier_symbols = Fmake_vector (make_number (len), Qnil);
     for (i = 0; i < len; i++)
@@ -11403,6 +11503,7 @@ and tests the value when the command returns.
 Buffer modification stores t in this variable.  */);
   Vdeactivate_mark = Qnil;
   DEFSYM (Qdeactivate_mark, "deactivate-mark");
+  Fmake_variable_buffer_local (Qdeactivate_mark);
 
   DEFVAR_LISP ("pre-command-hook", Vpre_command_hook,
               doc: /* Normal hook run before each command is executed.
index 8bb54dd86e03ee99a72768541307b9a256c6abde..da83b9b01ed9d8d5f2e36dd7733ab15969885642 100644 (file)
@@ -305,9 +305,7 @@ extern Lisp_Object menu_items;
 
 /* If non-nil, means that the global vars defined here are already in use.
    Used to detect cases where we try to re-enter this non-reentrant code.  */
-#if defined USE_GTK || defined USE_MOTIF
 extern Lisp_Object menu_items_inuse;
-#endif
 
 /* Number of slots currently allocated in menu_items.  */
 extern int menu_items_allocated;
@@ -354,57 +352,6 @@ extern void unuse_menu_items (void);
 #define ENCODE_MENU_STRING(str) (str)
 #endif
 
-#if defined (HAVE_NS) || defined (HAVE_NTGUI) || defined (USE_GTK)
-
-/* Definitions copied from lwlib.h */
-
-enum button_type
-{
-  BUTTON_TYPE_NONE,
-  BUTTON_TYPE_TOGGLE,
-  BUTTON_TYPE_RADIO
-};
-
-/* This structure is based on the one in ../lwlib/lwlib.h, with unused portions
-   removed.  No term uses these. */
-typedef struct _widget_value
-{
-  /* name of widget */
-  Lisp_Object   lname;
-  const char*  name;
-  /* value (meaning depend on widget type) */
-  const char*  value;
-  /* keyboard equivalent. no implications for XtTranslations */
-  Lisp_Object   lkey;
-  const char*  key;
-  /* Help string or nil if none.
-     GC finds this string through the frame's menu_bar_vector
-     or through menu_items.  */
-  Lisp_Object  help;
-  /* true if enabled */
-  unsigned char        enabled;
-  /* true if selected */
-  unsigned char selected;
-  /* The type of a button.  */
-  enum button_type button_type;
-#if defined (HAVE_NTGUI)
-  /* true if menu title */
-  unsigned char title;
-#endif
-  /* Contents of the sub-widgets, also selected slot for checkbox */
-  struct _widget_value*        contents;
-  /* data passed to callback */
-  void *call_data;
-  /* next one in the list */
-  struct _widget_value*        next;
-#ifdef USE_GTK
-  struct _widget_value *free_list;
-#endif
-} widget_value;
-
-#endif /* HAVE_NS || HAVE_NTGUI */
-
-\f
 /* Macros for dealing with lispy events.  */
 
 /* True if EVENT has data fields describing it (i.e. a mouse click).  */
@@ -466,9 +413,7 @@ extern bool waiting_for_input;
    happens.  */
 extern struct timespec *input_available_clear_time;
 
-#if defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS
 extern bool ignore_mouse_drag_p;
-#endif
 
 /* The primary selection.  */
 extern Lisp_Object QPRIMARY;
@@ -518,9 +463,7 @@ extern bool input_polling_used (void);
 extern void clear_input_pending (void);
 extern bool requeued_events_pending_p (void);
 extern void bind_polling_period (int);
-#if HAVE_NTGUI
 extern int make_ctrl_char (int) ATTRIBUTE_CONST;
-#endif
 extern void stuff_buffered_input (Lisp_Object);
 extern void clear_waiting_for_input (void);
 extern void swallow_events (bool);
index c1416f8a7807a3f054ff6b4e9a46ff084bb463b2..c7c7d196c22cc78c02e92ae9b3e057a69bf8bef9 100644 (file)
@@ -727,11 +727,6 @@ get_keyelt (Lisp_Object object, bool autoload)
        /* This is really the value.  */
        return object;
 
-      /* If the keymap contents looks like (keymap ...) or (lambda ...)
-        then use itself. */
-      else if (EQ (XCAR (object), Qkeymap) || EQ (XCAR (object), Qlambda))
-       return object;
-
       /* If the keymap contents looks like (menu-item name . DEFN)
         or (menu-item name DEFN ...) then use DEFN.
         This is a new format menu item.  */
@@ -768,25 +763,8 @@ get_keyelt (Lisp_Object object, bool autoload)
         Keymap alist elements like (CHAR MENUSTRING . DEFN)
         will be used by HierarKey menus.  */
       else if (STRINGP (XCAR (object)))
-       {
-         object = XCDR (object);
-         /* Also remove a menu help string, if any,
-            following the menu item name.  */
-         if (CONSP (object) && STRINGP (XCAR (object)))
-           object = XCDR (object);
-         /* Also remove the sublist that caches key equivalences, if any.  */
-         if (CONSP (object) && CONSP (XCAR (object)))
-           {
-             Lisp_Object carcar;
-             carcar = XCAR (XCAR (object));
-             if (NILP (carcar) || VECTORP (carcar))
-               object = XCDR (object);
-           }
-       }
+       object = XCDR (object);
 
-      /* If the contents are (KEYMAP . ELEMENT), go indirect.  */
-      else if (KEYMAPP (XCAR (object)))
-       error ("Wow, indirect keymap entry!!");
       else
        return object;
     }
@@ -990,9 +968,6 @@ copy_keymap_item (Lisp_Object elt)
          if (CONSP (tem) && EQ (XCAR (tem), Qkeymap))
            XSETCAR (elt, Fcopy_keymap (tem));
          tem = XCDR (elt);
-         if (CONSP (tem) && CONSP (XCAR (tem)))
-           /* Delete cache for key equivalences.  */
-           XSETCDR (elt, XCDR (tem));
        }
     }
   else
@@ -1011,16 +986,6 @@ copy_keymap_item (Lisp_Object elt)
              elt = XCDR (elt);
              tem = XCDR (elt);
            }
-         /* There may also be a list that caches key equivalences.
-            Just delete it for the new keymap.  */
-         if (CONSP (tem)
-             && CONSP (XCAR (tem))
-             && (NILP (XCAR (XCAR (tem)))
-                 || VECTORP (XCAR (XCAR (tem)))))
-           {
-             XSETCDR (elt, XCDR (tem));
-             tem = XCDR (tem);
-           }
          if (CONSP (tem) && EQ (XCAR (tem), Qkeymap))
            XSETCDR (elt, Fcopy_keymap (tem));
        }
@@ -1127,9 +1092,7 @@ binding KEY to DEF is added at the front of KEYMAP.  */)
   GCPRO3 (keymap, key, def);
   keymap = get_keymap (keymap, 1, 1);
 
-  CHECK_VECTOR_OR_STRING (key);
-
-  length = XFASTINT (Flength (key));
+  length = CHECK_VECTOR_OR_STRING (key);
   if (length == 0)
     RETURN_UNGCPRO (Qnil);
 
@@ -1283,9 +1246,7 @@ recognize the default bindings, just as `read-key-sequence' does.  */)
   GCPRO2 (keymap, key);
   keymap = get_keymap (keymap, 1, 1);
 
-  CHECK_VECTOR_OR_STRING (key);
-
-  length = XFASTINT (Flength (key));
+  length = CHECK_VECTOR_OR_STRING (key);
   if (length == 0)
     RETURN_UNGCPRO (keymap);
 
@@ -1338,11 +1299,8 @@ define_as_prefix (Lisp_Object keymap, Lisp_Object c)
 static Lisp_Object
 append_key (Lisp_Object key_sequence, Lisp_Object key)
 {
-  Lisp_Object args[2];
-
-  args[0] = key_sequence;
-  args[1] = list1 (key);
-  return Fvconcat (2, args);
+  AUTO_LIST1 (key_list, key);
+  return Fvconcat (2, ((Lisp_Object []) { key_sequence, key_list }));
 }
 
 /* Given a event type C which is a symbol,
@@ -1381,11 +1339,10 @@ silly_event_symbol_error (Lisp_Object c)
       *p = 0;
 
       c = reorder_modifiers (c);
-      keystring = concat2 (build_string (new_mods), XCDR (assoc));
+      AUTO_STRING (new_mods_string, new_mods);
+      keystring = concat2 (new_mods_string, XCDR (assoc));
 
-      error ((modifiers & ~meta_modifier
-             ? "To bind the key %s, use [?%s], not [%s]"
-             : "To bind the key %s, use \"%s\", not [%s]"),
+      error ("To bind the key %s, use [?%s], not [%s]",
             SDATA (SYMBOL_NAME (c)), SDATA (keystring),
             SDATA (SYMBOL_NAME (c)));
     }
@@ -1894,7 +1851,7 @@ struct accessible_keymaps_data {
 
 static void
 accessible_keymaps_1 (Lisp_Object key, Lisp_Object cmd, Lisp_Object args, void *data)
-/* Use void* data to be compatible with map_keymap_function_t.  */
+/* Use void * data to be compatible with map_keymap_function_t.  */
 {
   struct accessible_keymaps_data *d = data; /* Cast! */
   Lisp_Object maps = d->maps;
@@ -2280,14 +2237,19 @@ Optional argument NO-ANGLES non-nil means don't put angle brackets
 around function keys and event symbols.  */)
   (Lisp_Object key, Lisp_Object no_angles)
 {
+  USE_SAFE_ALLOCA;
+
   if (CONSP (key) && lucid_event_type_list_p (key))
     key = Fevent_convert_list (key);
 
   if (CONSP (key) && INTEGERP (XCAR (key)) && INTEGERP (XCDR (key)))
     /* An interval from a map-char-table.  */
-    return concat3 (Fsingle_key_description (XCAR (key), no_angles),
-                   build_string (".."),
-                   Fsingle_key_description (XCDR (key), no_angles));
+    {
+      AUTO_STRING (dot_dot, "..");
+      return concat3 (Fsingle_key_description (XCAR (key), no_angles),
+                     dot_dot,
+                     Fsingle_key_description (XCDR (key), no_angles));
+    }
 
   key = EVENT_HEAD (key);
 
@@ -2303,7 +2265,6 @@ around function keys and event symbols.  */)
       if (NILP (no_angles))
        {
          Lisp_Object result;
-         USE_SAFE_ALLOCA;
          char *buffer = SAFE_ALLOCA (sizeof "<>"
                                      + SBYTES (SYMBOL_NAME (key)));
          esprintf (buffer, "<%s>", SDATA (SYMBOL_NAME (key)));
@@ -2574,9 +2535,8 @@ If FIRSTONLY has another non-nil value, prefer bindings
 that use the modifier key specified in `where-is-preferred-modifier'
 \(or their meta variants) and entirely reject menu bindings.
 
-If optional 4th arg NOINDIRECT is non-nil, don't follow indirections
-to other keymaps or slots.  This makes it possible to search for an
-indirect definition itself.
+If optional 4th arg NOINDIRECT is non-nil, don't extract the commands inside
+menu-items.  This makes it possible to search for a menu-item itself.
 
 The optional 5th arg NO-REMAP alters how command remapping is handled:
 
@@ -2925,13 +2885,14 @@ You type        Translation\n\
          if (!SYMBOLP (modes[i]))
            emacs_abort ();
 
-         p = title = alloca (42 + SCHARS (SYMBOL_NAME (modes[i])));
+         USE_SAFE_ALLOCA;
+         p = title = SAFE_ALLOCA (42 + SBYTES (SYMBOL_NAME (modes[i])));
          *p++ = '\f';
          *p++ = '\n';
          *p++ = '`';
          memcpy (p, SDATA (SYMBOL_NAME (modes[i])),
-                 SCHARS (SYMBOL_NAME (modes[i])));
-         p += SCHARS (SYMBOL_NAME (modes[i]));
+                 SBYTES (SYMBOL_NAME (modes[i])));
+         p += SBYTES (SYMBOL_NAME (modes[i]));
          *p++ = '\'';
          memcpy (p, " Minor Mode Bindings", strlen (" Minor Mode Bindings"));
          p += strlen (" Minor Mode Bindings");
@@ -2940,6 +2901,7 @@ You type        Translation\n\
          describe_map_tree (maps[i], 1, shadow, prefix,
                             title, nomenu, 0, 0, 0);
          shadow = Fcons (maps[i], shadow);
+         SAFE_FREE ();
        }
 
       start1 = get_local_map (BUF_PT (XBUFFER (buffer)),
@@ -3226,10 +3188,10 @@ describe_map (Lisp_Object map, Lisp_Object prefix,
 
   /* These accumulate the values from sparse keymap bindings,
      so we can sort them and handle them in order.  */
-  int length_needed = 0;
+  ptrdiff_t length_needed = 0;
   struct describe_map_elt *vect;
-  int slots_used = 0;
-  int i;
+  ptrdiff_t slots_used = 0;
+  ptrdiff_t i;
 
   suppress = Qnil;
 
@@ -3249,7 +3211,8 @@ describe_map (Lisp_Object map, Lisp_Object prefix,
   for (tail = map; CONSP (tail); tail = XCDR (tail))
     length_needed++;
 
-  vect = alloca (length_needed * sizeof *vect);
+  USE_SAFE_ALLOCA;
+  SAFE_NALLOCA (vect, 1, length_needed);
 
   for (tail = map; CONSP (tail); tail = XCDR (tail))
     {
@@ -3392,6 +3355,7 @@ describe_map (Lisp_Object map, Lisp_Object prefix,
        }
     }
 
+  SAFE_FREE ();
   UNGCPRO;
 }
 
@@ -3400,7 +3364,7 @@ describe_vector_princ (Lisp_Object elt, Lisp_Object fun)
 {
   Findent_to (make_number (16), make_number (1));
   call1 (fun, elt);
-  Fterpri (Qnil);
+  Fterpri (Qnil, Qnil);
 }
 
 DEFUN ("describe-vector", Fdescribe_vector, Sdescribe_vector, 1, 2, 0,
@@ -3480,9 +3444,9 @@ describe_vector (Lisp_Object vector, Lisp_Object prefix, Lisp_Object args,
       /* Call Fkey_description first, to avoid GC bug for the other string.  */
       if (!NILP (prefix) && XFASTINT (Flength (prefix)) > 0)
        {
-         Lisp_Object tem;
-         tem = Fkey_description (prefix, Qnil);
-         elt_prefix = concat2 (tem, build_string (" "));
+         Lisp_Object tem = Fkey_description (prefix, Qnil);
+         AUTO_STRING (space, " ");
+         elt_prefix = concat2 (tem, space);
        }
       prefix = Qnil;
     }
index 4a408c6a2a0f68e3acbbe136107eee9f6b0a26b0..b01886dfa619edfa38a286413ff7ff6d9bab27d9 100644 (file)
@@ -46,7 +46,7 @@ extern void syms_of_keymap (void);
 extern void keys_of_keymap (void);
 
 typedef void (*map_keymap_function_t)
-     (Lisp_Object key, Lisp_Object val, Lisp_Object args, voiddata);
+     (Lisp_Object key, Lisp_Object val, Lisp_Object args, void *data);
 extern void map_keymap (Lisp_Object, map_keymap_function_t, Lisp_Object,
                        void *, bool);
 extern void map_keymap_canonical (Lisp_Object map,
index a900e9541c829dd6b6eecf7581e0e1e6156da8fa..84b28b0311b4f3e41e4e32d805731d7870739b06 100644 (file)
@@ -36,6 +36,8 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
+#include "lisp.h"
+
 char my_edata[] = "End of Emacs initialized data";
 
 /* Help unexec locate the end of the .bss area used by Emacs (which
index 0bcc0ec0e3f5c75a0b95e55a88bf22445befb7bb..89f29ea268b6c68492200b7af716f2dc72935661 100644 (file)
@@ -36,41 +36,15 @@ INLINE_HEADER_BEGIN
 
 /* Define a TYPE constant ID as an externally visible name.  Use like this:
 
-      #define ID_val (some integer preprocessor expression)
-      #if ENUMABLE (ID_val)
-      DEFINE_GDB_SYMBOL_ENUM (ID)
-      #else
       DEFINE_GDB_SYMBOL_BEGIN (TYPE, ID)
-      # define ID ID_val
+      # define ID (some integer preprocessor expression of type TYPE)
       DEFINE_GDB_SYMBOL_END (ID)
-      #endif
 
    This hack is for the benefit of compilers that do not make macro
-   definitions visible to the debugger.  It's used for symbols that
-   .gdbinit needs, symbols whose values may not fit in 'int' (where an
-   enum would suffice).
+   definitions or enums visible to the debugger.  It's used for symbols
+   that .gdbinit needs.  */
 
-   Some GCC versions before GCC 4.2 omit enums in debugging output;
-   see GCC bug 23336.  So don't use enums with older GCC.  */
-
-#if !defined __GNUC__ || 4 < __GNUC__ + (2 <= __GNUC_MINOR__)
-# define ENUMABLE(val) (INT_MIN <= (val) && (val) <= INT_MAX)
-#else
-# define ENUMABLE(val) 0
-#endif
-
-/* On AIX 7.1 ENUMABLE should return true when possible, otherwise the
-   linker can optimize the symbols away, making it harder to debug.
-   This was discovered only late in the release process, so to play it
-   safe for now, non-AIX platforms do not use enums for debugging symbols.
-   FIXME: remove this comment and the following four lines of code.  */
-#ifndef _AIX
-# undef ENUMABLE
-# define ENUMABLE(val) 0
-#endif
-
-#define DEFINE_GDB_SYMBOL_ENUM(id) enum { id = id##_val };
-#if defined MAIN_PROGRAM
+#ifdef MAIN_PROGRAM
 # define DEFINE_GDB_SYMBOL_BEGIN(type, id) type const id EXTERNALLY_VISIBLE
 # define DEFINE_GDB_SYMBOL_END(id) = id;
 #else
@@ -84,6 +58,27 @@ INLINE_HEADER_BEGIN
 #define max(a, b) ((a) > (b) ? (a) : (b))
 #define min(a, b) ((a) < (b) ? (a) : (b))
 
+/* Number of elements in an array.  */
+#define ARRAYELTS(arr) (sizeof (arr) / sizeof (arr)[0])
+
+/* Number of bits in a Lisp_Object tag.  */
+DEFINE_GDB_SYMBOL_BEGIN (int, GCTYPEBITS)
+#define GCTYPEBITS 3
+DEFINE_GDB_SYMBOL_END (GCTYPEBITS)
+
+/* The number of bits needed in an EMACS_INT over and above the number
+   of bits in a pointer.  This is 0 on systems where:
+   1.  We can specify multiple-of-8 alignment on static variables.
+   2.  We know malloc returns a multiple of 8.  */
+#if (defined alignas \
+     && (defined GNU_MALLOC || defined DOUG_LEA_MALLOC || defined __GLIBC__ \
+        || defined DARWIN_OS || defined __sun || defined __MINGW32__ \
+        || defined CYGWIN))
+# define NONPOINTER_BITS 0
+#else
+# define NONPOINTER_BITS GCTYPEBITS
+#endif
+
 /* EMACS_INT - signed integer wide enough to hold an Emacs value
    EMACS_INT_MAX - maximum value of EMACS_INT; can be used in #if
    pI - printf length modifier for EMACS_INT
@@ -91,16 +86,18 @@ INLINE_HEADER_BEGIN
 #ifndef EMACS_INT_MAX
 # if INTPTR_MAX <= 0
 #  error "INTPTR_MAX misconfigured"
-# elif INTPTR_MAX <= INT_MAX && !defined WIDE_EMACS_INT
+# elif INTPTR_MAX <= INT_MAX >> NONPOINTER_BITS && !defined WIDE_EMACS_INT
 typedef int EMACS_INT;
 typedef unsigned int EMACS_UINT;
 #  define EMACS_INT_MAX INT_MAX
 #  define pI ""
-# elif INTPTR_MAX <= LONG_MAX && !defined WIDE_EMACS_INT
+# elif INTPTR_MAX <= LONG_MAX >> NONPOINTER_BITS && !defined WIDE_EMACS_INT
 typedef long int EMACS_INT;
 typedef unsigned long EMACS_UINT;
 #  define EMACS_INT_MAX LONG_MAX
 #  define pI "l"
+/* Check versus LLONG_MAX, not LLONG_MAX >> NONPOINTER_BITS.
+   In theory this is not safe, but in practice it seems to be OK.  */
 # elif INTPTR_MAX <= LLONG_MAX
 typedef long long int EMACS_INT;
 typedef unsigned long long int EMACS_UINT;
@@ -119,7 +116,7 @@ enum {  BOOL_VECTOR_BITS_PER_CHAR =
 };
 
 /* An unsigned integer type representing a fixed-length bit sequence,
-   suitable for words in a Lisp bool vector.  Normally it is size_t
+   suitable for bool vector words, GC mark bits, etc.  Normally it is size_t
    for speed, but it is unsigned char on weird platforms.  */
 #if BOOL_VECTOR_BITS_PER_CHAR == CHAR_BIT
 typedef size_t bits_word;
@@ -137,7 +134,6 @@ enum
   {
     BITS_PER_CHAR      = CHAR_BIT,
     BITS_PER_SHORT     = CHAR_BIT * sizeof (short),
-    BITS_PER_INT       = CHAR_BIT * sizeof (int),
     BITS_PER_LONG      = CHAR_BIT * sizeof (long int),
     BITS_PER_EMACS_INT = CHAR_BIT * sizeof (EMACS_INT)
   };
@@ -241,12 +237,6 @@ extern bool suppress_checking EXTERNALLY_VISIBLE;
 
 enum Lisp_Bits
   {
-    /* Number of bits in a Lisp_Object tag.  This can be used in #if,
-       and for GDB's sake also as a regular symbol.  */
-    GCTYPEBITS =
-#define GCTYPEBITS 3
-       GCTYPEBITS,
-
     /* 2**GCTYPEBITS.  This must be a macro that expands to a literal
        integer constant, for MSVC.  */
 #define GCALIGNMENT 8
@@ -270,31 +260,19 @@ enum Lisp_Bits
    This can be used in #if, e.g., '#if VAL_MAX < UINTPTR_MAX' below.  */
 #define VAL_MAX (EMACS_INT_MAX >> (GCTYPEBITS - 1))
 
-/* Unless otherwise specified, use USE_LSB_TAG on systems where:  */
-#ifndef USE_LSB_TAG
-/* 1.  We know malloc returns a multiple of 8.  */
-# if (defined GNU_MALLOC || defined DOUG_LEA_MALLOC || defined __GLIBC__ \
-      || defined DARWIN_OS || defined __sun)
-/* 2.  We can specify multiple-of-8 alignment on static variables.  */
-#  ifdef alignas
-/* 3.  Pointers-as-ints exceed VAL_MAX.
+/* Whether the least-significant bits of an EMACS_INT contain the tag.
    On hosts where pointers-as-ints do not exceed VAL_MAX, USE_LSB_TAG is:
     a. unnecessary, because the top bits of an EMACS_INT are unused, and
     b. slower, because it typically requires extra masking.
-   So, default USE_LSB_TAG to true only on hosts where it might be useful.  */
-#   if VAL_MAX < UINTPTR_MAX
-#    define USE_LSB_TAG true
-#   endif
-#  endif
-# endif
-#endif
-#ifdef USE_LSB_TAG
-# undef USE_LSB_TAG
-enum enum_USE_LSB_TAG { USE_LSB_TAG = true };
-# define USE_LSB_TAG true
-#else
-enum enum_USE_LSB_TAG { USE_LSB_TAG = false };
-# define USE_LSB_TAG false
+   So, USE_LSB_TAG is true only on hosts where it might be useful.  */
+DEFINE_GDB_SYMBOL_BEGIN (bool, USE_LSB_TAG)
+#define USE_LSB_TAG (EMACS_INT_MAX >> GCTYPEBITS < INTPTR_MAX)
+DEFINE_GDB_SYMBOL_END (USE_LSB_TAG)
+
+#if !USE_LSB_TAG && !defined WIDE_EMACS_INT
+# error "USE_LSB_TAG not supported on this platform; please report this." \
+       "Try 'configure --with-wide-int' to work around the problem."
+error !;
 #endif
 
 #ifndef alignas
@@ -304,6 +282,11 @@ enum enum_USE_LSB_TAG { USE_LSB_TAG = false };
 # endif
 #endif
 
+#ifdef HAVE_STRUCT_ATTRIBUTE_ALIGNED
+# define GCALIGNED __attribute__ ((aligned (GCALIGNMENT)))
+#else
+# define GCALIGNED /* empty */
+#endif
 
 /* Some operations are so commonly executed that they are implemented
    as macros, not functions, because otherwise runtime performance would
@@ -348,8 +331,8 @@ enum enum_USE_LSB_TAG { USE_LSB_TAG = false };
 #define lisp_h_CHECK_LIST_CONS(x, y) CHECK_TYPE (CONSP (x), Qlistp, y)
 #define lisp_h_CHECK_NUMBER(x) CHECK_TYPE (INTEGERP (x), Qintegerp, x)
 #define lisp_h_CHECK_SYMBOL(x) CHECK_TYPE (SYMBOLP (x), Qsymbolp, x)
-#define lisp_h_CHECK_TYPE(ok, Qxxxp, x) \
-   ((ok) ? (void) 0 : (void) wrong_type_argument (Qxxxp, x))
+#define lisp_h_CHECK_TYPE(ok, predicate, x) \
+   ((ok) ? (void) 0 : (void) wrong_type_argument (predicate, x))
 #define lisp_h_CONSP(x) (XTYPE (x) == Lisp_Cons)
 #define lisp_h_EQ(x, y) (XLI (x) == XLI (y))
 #define lisp_h_FLOATP(x) (XTYPE (x) == Lisp_Float)
@@ -369,15 +352,15 @@ enum enum_USE_LSB_TAG { USE_LSB_TAG = false };
 #define lisp_h_XCONS(a) \
    (eassert (CONSP (a)), (struct Lisp_Cons *) XUNTAG (a, Lisp_Cons))
 #define lisp_h_XHASH(a) XUINT (a)
-#define lisp_h_XPNTR(a) \
-   ((void *) (intptr_t) ((XLI (a) & VALMASK) | (DATA_SEG_BITS & ~VALMASK)))
+#define lisp_h_XPNTR(a) ((void *) (intptr_t) (XLI (a) & VALMASK))
 #define lisp_h_XSYMBOL(a) \
    (eassert (SYMBOLP (a)), (struct Lisp_Symbol *) XUNTAG (a, Lisp_Symbol))
 #ifndef GC_CHECK_CONS_LIST
 # define lisp_h_check_cons_list() ((void) 0)
 #endif
 #if USE_LSB_TAG
-# define lisp_h_make_number(n) XIL ((EMACS_INT) (n) << INTTYPEBITS)
+# define lisp_h_make_number(n) \
+    XIL ((EMACS_INT) ((EMACS_UINT) (n) << INTTYPEBITS))
 # define lisp_h_XFASTINT(a) XINT (a)
 # define lisp_h_XINT(a) (XLI (a) >> INTTYPEBITS)
 # define lisp_h_XTYPE(a) ((enum Lisp_Type) (XLI (a) & ~VALMASK))
@@ -395,7 +378,7 @@ enum enum_USE_LSB_TAG { USE_LSB_TAG = false };
 # define CHECK_LIST_CONS(x, y) lisp_h_CHECK_LIST_CONS (x, y)
 # define CHECK_NUMBER(x) lisp_h_CHECK_NUMBER (x)
 # define CHECK_SYMBOL(x) lisp_h_CHECK_SYMBOL (x)
-# define CHECK_TYPE(ok, Qxxxp, x) lisp_h_CHECK_TYPE (ok, Qxxxp, x)
+# define CHECK_TYPE(ok, predicate, x) lisp_h_CHECK_TYPE (ok, predicate, x)
 # define CONSP(x) lisp_h_CONSP (x)
 # define EQ(x, y) lisp_h_EQ (x, y)
 # define FLOATP(x) lisp_h_FLOATP (x)
@@ -597,25 +580,15 @@ LISP_MACRO_DEFUN (XIL, Lisp_Object, (EMACS_INT i), (i))
 
 /* In the size word of a vector, this bit means the vector has been marked.  */
 
-#define ARRAY_MARK_FLAG_val PTRDIFF_MIN
-#if ENUMABLE (ARRAY_MARK_FLAG_val)
-DEFINE_GDB_SYMBOL_ENUM (ARRAY_MARK_FLAG)
-#else
 DEFINE_GDB_SYMBOL_BEGIN (ptrdiff_t, ARRAY_MARK_FLAG)
-# define ARRAY_MARK_FLAG ARRAY_MARK_FLAG_val
+# define ARRAY_MARK_FLAG PTRDIFF_MIN
 DEFINE_GDB_SYMBOL_END (ARRAY_MARK_FLAG)
-#endif
 
 /* In the size word of a struct Lisp_Vector, this bit means it's really
    some other vector-like object.  */
-#define PSEUDOVECTOR_FLAG_val (PTRDIFF_MAX - PTRDIFF_MAX / 2)
-#if ENUMABLE (PSEUDOVECTOR_FLAG_val)
-DEFINE_GDB_SYMBOL_ENUM (PSEUDOVECTOR_FLAG)
-#else
 DEFINE_GDB_SYMBOL_BEGIN (ptrdiff_t, PSEUDOVECTOR_FLAG)
-# define PSEUDOVECTOR_FLAG PSEUDOVECTOR_FLAG_val
+# define PSEUDOVECTOR_FLAG (PTRDIFF_MAX - PTRDIFF_MAX / 2)
 DEFINE_GDB_SYMBOL_END (PSEUDOVECTOR_FLAG)
-#endif
 
 /* In a pseudovector, the size field actually contains a word with one
    PSEUDOVECTOR_FLAG bit set, and one of the following values extracted
@@ -641,18 +614,8 @@ enum pvec_type
   PVEC_FONT /* Should be last because it's used for range checking.  */
 };
 
-/* DATA_SEG_BITS forces extra bits to be or'd in with any pointers
-   which were stored in a Lisp_Object.  */
-#ifndef DATA_SEG_BITS
-# define DATA_SEG_BITS 0
-#endif
-enum { gdb_DATA_SEG_BITS = DATA_SEG_BITS };
-#undef DATA_SEG_BITS
-
 enum More_Lisp_Bits
   {
-    DATA_SEG_BITS = gdb_DATA_SEG_BITS,
-
     /* For convenience, we also store the number of elements in these bits.
        Note that this size is not necessarily the memory-footprint size, but
        only the number of Lisp_Object fields (that need to be traced by GC).
@@ -678,14 +641,9 @@ enum More_Lisp_Bits
    that cons.  */
 
 /* Mask for the value (as opposed to the type bits) of a Lisp object.  */
-#define VALMASK_val (USE_LSB_TAG ? - (1 << GCTYPEBITS) : VAL_MAX)
-#if ENUMABLE (VALMASK_val)
-DEFINE_GDB_SYMBOL_ENUM (VALMASK)
-#else
 DEFINE_GDB_SYMBOL_BEGIN (EMACS_INT, VALMASK)
-# define VALMASK VALMASK_val
+# define VALMASK (USE_LSB_TAG ? - (1 << GCTYPEBITS) : VAL_MAX)
 DEFINE_GDB_SYMBOL_END (VALMASK)
-#endif
 
 /* Largest and smallest representable fixnum values.  These are the C
    values.  They are macros for use in static initializers.  */
@@ -714,7 +672,14 @@ LISP_MACRO_DEFUN (XUNTAG, void *, (Lisp_Object a, int type), (a, type))
 INLINE Lisp_Object
 make_number (EMACS_INT n)
 {
-  return XIL (USE_LSB_TAG ? n << INTTYPEBITS : n & INTMASK);
+  if (USE_LSB_TAG)
+    {
+      EMACS_UINT u = n;
+      n = u << INTTYPEBITS;
+    }
+  else
+    n &= INTMASK;
+  return XIL (n);
 }
 
 /* Extract A's value as a signed integer.  */
@@ -722,7 +687,12 @@ INLINE EMACS_INT
 XINT (Lisp_Object a)
 {
   EMACS_INT i = XLI (a);
-  return (USE_LSB_TAG ? i : i << INTTYPEBITS) >> INTTYPEBITS;
+  if (! USE_LSB_TAG)
+    {
+      EMACS_UINT u = i;
+      i = u << INTTYPEBITS;
+    }
+  return i >> INTTYPEBITS;
 }
 
 /* Like XINT (A), but may be faster.  A must be nonnegative.
@@ -828,7 +798,6 @@ INLINE struct Lisp_Save_Value *XSAVE_VALUE (Lisp_Object);
 /* Defined in chartab.c.  */
 extern Lisp_Object char_table_ref (Lisp_Object, int);
 extern void char_table_set (Lisp_Object, int, Lisp_Object);
-extern int char_table_translate (Lisp_Object, int);
 
 /* Defined in data.c.  */
 extern Lisp_Object Qarrayp, Qbufferp, Qbuffer_or_string_p, Qchar_table_p;
@@ -837,10 +806,13 @@ extern Lisp_Object Qnumberp, Qstringp, Qsymbolp, Qt, Qvectorp;
 extern Lisp_Object Qbool_vector_p;
 extern Lisp_Object Qvector_or_char_table_p, Qwholenump;
 extern Lisp_Object Qwindow;
-extern Lisp_Object Ffboundp (Lisp_Object);
 extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object);
+extern _Noreturn void wrong_choice (Lisp_Object, Lisp_Object);
 
 /* Defined in emacs.c.  */
+extern bool might_dump;
+/* True means Emacs has already been initialized.
+   Used during startup to detect startup of dumped Emacs.  */
 extern bool initialized;
 
 /* Defined in eval.c.  */
@@ -1006,8 +978,9 @@ make_lisp_proc (struct Lisp_Process *p)
 
 /* Type checking.  */
 
-LISP_MACRO_DEFUN_VOID (CHECK_TYPE, (int ok, Lisp_Object Qxxxp, Lisp_Object x),
-                      (ok, Qxxxp, x))
+LISP_MACRO_DEFUN_VOID (CHECK_TYPE,
+                      (int ok, Lisp_Object predicate, Lisp_Object x),
+                      (ok, predicate, x))
 
 /* Deprecated and will be removed soon.  */
 
@@ -1017,7 +990,7 @@ LISP_MACRO_DEFUN_VOID (CHECK_TYPE, (int ok, Lisp_Object Qxxxp, Lisp_Object x),
 
 typedef struct interval *INTERVAL;
 
-struct Lisp_Cons
+struct GCALIGNED Lisp_Cons
   {
     /* Car of this cons cell.  */
     Lisp_Object car;
@@ -1099,7 +1072,7 @@ CDR_SAFE (Lisp_Object c)
 
 /* In a string or vector, the sign bit of the `size' is the gc mark bit.  */
 
-struct Lisp_String
+struct GCALIGNED Lisp_String
   {
     ptrdiff_t size;
     ptrdiff_t size_byte;
@@ -1201,12 +1174,6 @@ STRING_SET_CHARS (Lisp_Object string, ptrdiff_t newsize)
 {
   XSTRING (string)->size = newsize;
 }
-INLINE void
-STRING_COPYIN (Lisp_Object string, ptrdiff_t index, char const *new,
-              ptrdiff_t count)
-{
-  memcpy (SDATA (string) + index, new, count);
-}
 
 /* Header of vector-like objects.  This documents the layout constraints on
    vectors and pseudovectors (objects of PVEC_xxx subtype).  It also prevents
@@ -1415,10 +1382,11 @@ gc_aset (Lisp_Object array, ptrdiff_t idx, Lisp_Object val)
    sense to handle a char-table with type struct Lisp_Vector.  An
    element of a char table can be any Lisp objects, but if it is a sub
    char-table, we treat it a table that contains information of a
-   specific range of characters.  A sub char-table has the same
-   structure as a vector.  A sub char table appears only in an element
-   of a char-table, and there's no way to access it directly from
-   Emacs Lisp program.  */
+   specific range of characters.  A sub char-table is like a vector but
+   with two integer fields between the header and Lisp data, which means
+   that it has to be marked with some precautions (see mark_char_table
+   in alloc.c).  A sub char-table appears only in an element of a char-table,
+   and there's no way to access it directly from Emacs Lisp program.  */
 
 enum CHARTAB_SIZE_BITS
   {
@@ -1473,10 +1441,10 @@ struct Lisp_Sub_Char_Table
        contains 32 elements, and each element covers 128 characters.  A
        sub char-table of depth 3 contains 128 elements, and each element
        is for one character.  */
-    Lisp_Object depth;
+    int depth;
 
     /* Minimum character covered by the sub char-table.  */
-    Lisp_Object min_char;
+    int min_char;
 
     /* Use set_sub_char_table_contents to set this.  */
     Lisp_Object contents[FLEXIBLE_ARRAY_MEMBER];
@@ -1547,12 +1515,16 @@ struct Lisp_Subr
     const char *doc;
   };
 
-/* This is the number of slots that every char table must have.  This
-   counts the ordinary slots and the top, defalt, parent, and purpose
-   slots.  */
-enum CHAR_TABLE_STANDARD_SLOTS
+enum char_table_specials
   {
-    CHAR_TABLE_STANDARD_SLOTS = PSEUDOVECSIZE (struct Lisp_Char_Table, extras)
+    /* This is the number of slots that every char table must have.  This
+       counts the ordinary slots and the top, defalt, parent, and purpose
+       slots.  */
+    CHAR_TABLE_STANDARD_SLOTS = PSEUDOVECSIZE (struct Lisp_Char_Table, extras),
+
+    /* This is an index of first Lisp_Object field in Lisp_Sub_Char_Table
+       when the latter is treated as an ordinary Lisp_Vector.  */
+    SUB_CHAR_TABLE_OFFSET = PSEUDOVECSIZE (struct Lisp_Sub_Char_Table, contents)
   };
 
 /* Return the number of "extra" slots in the char table CT.  */
@@ -1564,7 +1536,11 @@ CHAR_TABLE_EXTRA_SLOTS (struct Lisp_Char_Table *ct)
          - CHAR_TABLE_STANDARD_SLOTS);
 }
 
-\f
+/* Make sure that sub char-table contents slot
+   is aligned on a multiple of Lisp_Objects.  */
+verify ((offsetof (struct Lisp_Sub_Char_Table, contents)
+        - offsetof (struct Lisp_Sub_Char_Table, depth)) % word_size == 0);
+
 /***********************************************************************
                               Symbols
  ***********************************************************************/
@@ -2555,15 +2531,20 @@ CHECK_BOOL_VECTOR (Lisp_Object x)
 {
   CHECK_TYPE (BOOL_VECTOR_P (x), Qbool_vector_p, x);
 }
-INLINE void
+/* This is a bit special because we always need size afterwards.  */
+INLINE ptrdiff_t
 CHECK_VECTOR_OR_STRING (Lisp_Object x)
 {
-  CHECK_TYPE (VECTORP (x) || STRINGP (x), Qarrayp, x);
+  if (VECTORP (x))
+    return ASIZE (x);
+  if (STRINGP (x))
+    return SCHARS (x);
+  wrong_type_argument (Qarrayp, x);
 }
 INLINE void
-CHECK_ARRAY (Lisp_Object x, Lisp_Object Qxxxp)
+CHECK_ARRAY (Lisp_Object x, Lisp_Object predicate)
 {
-  CHECK_TYPE (ARRAYP (x), Qxxxp, x);
+  CHECK_TYPE (ARRAYP (x), predicate, x);
 }
 INLINE void
 CHECK_BUFFER (Lisp_Object x)
@@ -2690,16 +2671,10 @@ CHECK_NUMBER_CDR (Lisp_Object x)
        minargs, maxargs, lname, intspec, 0};                           \
    Lisp_Object fnname
 #else  /* not _MSC_VER */
-# if __STDC_VERSION__ < 199901
-#  define DEFUN_FUNCTION_INIT(fnname, maxargs) (Lisp_Object (*) (void)) fnname
-# else
-#  define DEFUN_FUNCTION_INIT(fnname, maxargs) .a ## maxargs = fnname
-# endif
 #define DEFUN(lname, fnname, sname, minargs, maxargs, intspec, doc)    \
-   Lisp_Object fnname DEFUN_ARGS_ ## maxargs ;                         \
    static struct Lisp_Subr alignas (GCALIGNMENT) sname =               \
      { { PVEC_SUBR << PSEUDOVECTOR_AREA_BITS },                                \
-       { DEFUN_FUNCTION_INIT (fnname, maxargs) },                      \
+       { .a ## maxargs = fnname },                                     \
        minargs, maxargs, lname, intspec, 0};                           \
    Lisp_Object fnname
 #endif
@@ -3036,6 +3011,16 @@ struct gcpro
   ptrdiff_t nvars;
 
 #ifdef DEBUG_GCPRO
+  /* File name where this record is used.  */
+  const char *name;
+
+  /* Line number in this file.  */
+  int lineno;
+
+  /* Index in the local chain of records.  */
+  int idx;
+
+  /* Nesting level.  */
   int level;
 #endif
 };
@@ -3091,122 +3076,150 @@ struct gcpro
 
 #ifndef DEBUG_GCPRO
 
-#define GCPRO1(varname) \
- {gcpro1.next = gcprolist; gcpro1.var = &varname; gcpro1.nvars = 1; \
-  gcprolist = &gcpro1; }
-
-#define GCPRO2(varname1, varname2) \
- {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \
-  gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \
-  gcprolist = &gcpro2; }
-
-#define GCPRO3(varname1, varname2, varname3) \
- {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \
-  gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \
-  gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \
-  gcprolist = &gcpro3; }
-
-#define GCPRO4(varname1, varname2, varname3, varname4) \
- {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \
-  gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \
-  gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \
-  gcpro4.next = &gcpro3; gcpro4.var = &varname4; gcpro4.nvars = 1; \
-  gcprolist = &gcpro4; }
+#define GCPRO1(a)                                                      \
+  { gcpro1.next = gcprolist; gcpro1.var = &(a); gcpro1.nvars = 1;      \
+    gcprolist = &gcpro1; }
+
+#define GCPRO2(a, b)                                                   \
+  { gcpro1.next = gcprolist; gcpro1.var = &(a); gcpro1.nvars = 1;      \
+    gcpro2.next = &gcpro1; gcpro2.var = &(b); gcpro2.nvars = 1;                \
+    gcprolist = &gcpro2; }
+
+#define GCPRO3(a, b, c)                                                        \
+  { gcpro1.next = gcprolist; gcpro1.var = &(a); gcpro1.nvars = 1;      \
+    gcpro2.next = &gcpro1; gcpro2.var = &(b); gcpro2.nvars = 1;                \
+    gcpro3.next = &gcpro2; gcpro3.var = &(c); gcpro3.nvars = 1;                \
+    gcprolist = &gcpro3; }
+
+#define GCPRO4(a, b, c, d)                                             \
+  { gcpro1.next = gcprolist; gcpro1.var = &(a); gcpro1.nvars = 1;      \
+    gcpro2.next = &gcpro1; gcpro2.var = &(b); gcpro2.nvars = 1;                \
+    gcpro3.next = &gcpro2; gcpro3.var = &(c); gcpro3.nvars = 1;                \
+    gcpro4.next = &gcpro3; gcpro4.var = &(d); gcpro4.nvars = 1;                \
+    gcprolist = &gcpro4; }
+
+#define GCPRO5(a, b, c, d, e)                                          \
+  { gcpro1.next = gcprolist; gcpro1.var = &(a); gcpro1.nvars = 1;      \
+    gcpro2.next = &gcpro1; gcpro2.var = &(b); gcpro2.nvars = 1;                \
+    gcpro3.next = &gcpro2; gcpro3.var = &(c); gcpro3.nvars = 1;                \
+    gcpro4.next = &gcpro3; gcpro4.var = &(d); gcpro4.nvars = 1;                \
+    gcpro5.next = &gcpro4; gcpro5.var = &(e); gcpro5.nvars = 1;                \
+    gcprolist = &gcpro5; }
+
+#define GCPRO6(a, b, c, d, e, f)                                       \
+  { gcpro1.next = gcprolist; gcpro1.var = &(a); gcpro1.nvars = 1;      \
+    gcpro2.next = &gcpro1; gcpro2.var = &(b); gcpro2.nvars = 1;                \
+    gcpro3.next = &gcpro2; gcpro3.var = &(c); gcpro3.nvars = 1;                \
+    gcpro4.next = &gcpro3; gcpro4.var = &(d); gcpro4.nvars = 1;                \
+    gcpro5.next = &gcpro4; gcpro5.var = &(e); gcpro5.nvars = 1;                \
+    gcpro6.next = &gcpro5; gcpro6.var = &(f); gcpro6.nvars = 1;                \
+    gcprolist = &gcpro6; }
 
-#define GCPRO5(varname1, varname2, varname3, varname4, varname5) \
- {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \
-  gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \
-  gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \
-  gcpro4.next = &gcpro3; gcpro4.var = &varname4; gcpro4.nvars = 1; \
-  gcpro5.next = &gcpro4; gcpro5.var = &varname5; gcpro5.nvars = 1; \
-  gcprolist = &gcpro5; }
-
-#define GCPRO6(varname1, varname2, varname3, varname4, varname5, varname6) \
- {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \
-  gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \
-  gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \
-  gcpro4.next = &gcpro3; gcpro4.var = &varname4; gcpro4.nvars = 1; \
-  gcpro5.next = &gcpro4; gcpro5.var = &varname5; gcpro5.nvars = 1; \
-  gcpro6.next = &gcpro5; gcpro6.var = &varname6; gcpro6.nvars = 1; \
-  gcprolist = &gcpro6; }
-
-#define GCPRO7(a, b, c, d, e, f, g)                            \
- {gcpro1.next = gcprolist; gcpro1.var = &(a); gcpro1.nvars = 1;        \
-  gcpro2.next = &gcpro1; gcpro2.var = &(b); gcpro2.nvars = 1;  \
-  gcpro3.next = &gcpro2; gcpro3.var = &(c); gcpro3.nvars = 1;  \
-  gcpro4.next = &gcpro3; gcpro4.var = &(d); gcpro4.nvars = 1;  \
-  gcpro5.next = &gcpro4; gcpro5.var = &(e); gcpro5.nvars = 1;  \
-  gcpro6.next = &gcpro5; gcpro6.var = &(f); gcpro6.nvars = 1;  \
-  gcpro7.next = &gcpro6; gcpro7.var = &(g); gcpro7.nvars = 1;  \
-  gcprolist = &gcpro7; }
+#define GCPRO7(a, b, c, d, e, f, g)                                    \
+  { gcpro1.next = gcprolist; gcpro1.var = &(a); gcpro1.nvars = 1;      \
+    gcpro2.next = &gcpro1; gcpro2.var = &(b); gcpro2.nvars = 1;                \
+    gcpro3.next = &gcpro2; gcpro3.var = &(c); gcpro3.nvars = 1;                \
+    gcpro4.next = &gcpro3; gcpro4.var = &(d); gcpro4.nvars = 1;                \
+    gcpro5.next = &gcpro4; gcpro5.var = &(e); gcpro5.nvars = 1;                \
+    gcpro6.next = &gcpro5; gcpro6.var = &(f); gcpro6.nvars = 1;                \
+    gcpro7.next = &gcpro6; gcpro7.var = &(g); gcpro7.nvars = 1;                \
+    gcprolist = &gcpro7; }
 
 #define UNGCPRO (gcprolist = gcpro1.next)
 
-#else
+#else /* !DEBUG_GCPRO */
 
 extern int gcpro_level;
 
-#define GCPRO1(varname) \
- {gcpro1.next = gcprolist; gcpro1.var = &varname; gcpro1.nvars = 1; \
-  gcpro1.level = gcpro_level++; \
-  gcprolist = &gcpro1; }
-
-#define GCPRO2(varname1, varname2) \
- {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \
-  gcpro1.level = gcpro_level; \
-  gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \
-  gcpro2.level = gcpro_level++; \
-  gcprolist = &gcpro2; }
-
-#define GCPRO3(varname1, varname2, varname3) \
- {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \
-  gcpro1.level = gcpro_level; \
-  gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \
-  gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \
-  gcpro3.level = gcpro_level++; \
-  gcprolist = &gcpro3; }
-
-#define GCPRO4(varname1, varname2, varname3, varname4) \
- {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \
-  gcpro1.level = gcpro_level; \
-  gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \
-  gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \
-  gcpro4.next = &gcpro3; gcpro4.var = &varname4; gcpro4.nvars = 1; \
-  gcpro4.level = gcpro_level++; \
-  gcprolist = &gcpro4; }
-
-#define GCPRO5(varname1, varname2, varname3, varname4, varname5) \
- {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \
-  gcpro1.level = gcpro_level; \
-  gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \
-  gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \
-  gcpro4.next = &gcpro3; gcpro4.var = &varname4; gcpro4.nvars = 1; \
-  gcpro5.next = &gcpro4; gcpro5.var = &varname5; gcpro5.nvars = 1; \
-  gcpro5.level = gcpro_level++; \
-  gcprolist = &gcpro5; }
-
-#define GCPRO6(varname1, varname2, varname3, varname4, varname5, varname6) \
- {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \
-  gcpro1.level = gcpro_level; \
-  gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \
-  gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \
-  gcpro4.next = &gcpro3; gcpro4.var = &varname4; gcpro4.nvars = 1; \
-  gcpro5.next = &gcpro4; gcpro5.var = &varname5; gcpro5.nvars = 1; \
-  gcpro6.next = &gcpro5; gcpro6.var = &varname6; gcpro6.nvars = 1; \
-  gcpro6.level = gcpro_level++; \
-  gcprolist = &gcpro6; }
+#define GCPRO1(a)                                                      \
+  { gcpro1.next = gcprolist; gcpro1.var = &(a); gcpro1.nvars = 1;      \
+    gcpro1.name = __FILE__; gcpro1.lineno = __LINE__; gcpro1.idx = 1;  \
+    gcpro1.level = gcpro_level++;                                      \
+    gcprolist = &gcpro1; }
+
+#define GCPRO2(a, b)                                                   \
+  { gcpro1.next = gcprolist; gcpro1.var = &(a); gcpro1.nvars = 1;      \
+    gcpro1.name = __FILE__; gcpro1.lineno = __LINE__; gcpro1.idx = 1;  \
+    gcpro1.level = gcpro_level;                                                \
+    gcpro2.next = &gcpro1; gcpro2.var = &(b); gcpro2.nvars = 1;                \
+    gcpro2.name = __FILE__; gcpro2.lineno = __LINE__; gcpro2.idx = 2;  \
+    gcpro2.level = gcpro_level++;                                      \
+    gcprolist = &gcpro2; }
+
+#define GCPRO3(a, b, c)                                                        \
+  { gcpro1.next = gcprolist; gcpro1.var = &(a); gcpro1.nvars = 1;      \
+    gcpro1.name = __FILE__; gcpro1.lineno = __LINE__; gcpro1.idx = 1;  \
+    gcpro1.level = gcpro_level;                                                \
+    gcpro2.next = &gcpro1; gcpro2.var = &(b); gcpro2.nvars = 1;                \
+    gcpro2.name = __FILE__; gcpro2.lineno = __LINE__; gcpro2.idx = 2;  \
+    gcpro3.next = &gcpro2; gcpro3.var = &(c); gcpro3.nvars = 1;                \
+    gcpro3.name = __FILE__; gcpro3.lineno = __LINE__; gcpro3.idx = 3;  \
+    gcpro3.level = gcpro_level++;                                      \
+    gcprolist = &gcpro3; }
+
+#define GCPRO4(a, b, c, d)                                             \
+  { gcpro1.next = gcprolist; gcpro1.var = &(a); gcpro1.nvars = 1;      \
+    gcpro1.name = __FILE__; gcpro1.lineno = __LINE__; gcpro1.idx = 1;  \
+    gcpro1.level = gcpro_level;                                                \
+    gcpro2.next = &gcpro1; gcpro2.var = &(b); gcpro2.nvars = 1;                \
+    gcpro2.name = __FILE__; gcpro2.lineno = __LINE__; gcpro2.idx = 2;  \
+    gcpro3.next = &gcpro2; gcpro3.var = &(c); gcpro3.nvars = 1;                \
+    gcpro3.name = __FILE__; gcpro3.lineno = __LINE__; gcpro3.idx = 3;  \
+    gcpro4.next = &gcpro3; gcpro4.var = &(d); gcpro4.nvars = 1;                \
+    gcpro4.name = __FILE__; gcpro4.lineno = __LINE__; gcpro4.idx = 4;  \
+    gcpro4.level = gcpro_level++;                                      \
+    gcprolist = &gcpro4; }
+
+#define GCPRO5(a, b, c, d, e)                                          \
+  { gcpro1.next = gcprolist; gcpro1.var = &(a); gcpro1.nvars = 1;      \
+    gcpro1.name = __FILE__; gcpro1.lineno = __LINE__; gcpro1.idx = 1;  \
+    gcpro1.level = gcpro_level;                                                \
+    gcpro2.next = &gcpro1; gcpro2.var = &(b); gcpro2.nvars = 1;                \
+    gcpro2.name = __FILE__; gcpro2.lineno = __LINE__; gcpro2.idx = 2;  \
+    gcpro3.next = &gcpro2; gcpro3.var = &(c); gcpro3.nvars = 1;                \
+    gcpro3.name = __FILE__; gcpro3.lineno = __LINE__; gcpro3.idx = 3;  \
+    gcpro4.next = &gcpro3; gcpro4.var = &(d); gcpro4.nvars = 1;                \
+    gcpro4.name = __FILE__; gcpro4.lineno = __LINE__; gcpro4.idx = 4;  \
+    gcpro5.next = &gcpro4; gcpro5.var = &(e); gcpro5.nvars = 1;                \
+    gcpro5.name = __FILE__; gcpro5.lineno = __LINE__; gcpro5.idx = 5;  \
+    gcpro5.level = gcpro_level++;                                      \
+    gcprolist = &gcpro5; }
+
+#define GCPRO6(a, b, c, d, e, f)                                       \
+  { gcpro1.next = gcprolist; gcpro1.var = &(a); gcpro1.nvars = 1;      \
+    gcpro1.name = __FILE__; gcpro1.lineno = __LINE__; gcpro1.idx = 1;  \
+    gcpro1.level = gcpro_level;                                                \
+    gcpro2.next = &gcpro1; gcpro2.var = &(b); gcpro2.nvars = 1;                \
+    gcpro2.name = __FILE__; gcpro2.lineno = __LINE__; gcpro2.idx = 2;  \
+    gcpro3.next = &gcpro2; gcpro3.var = &(c); gcpro3.nvars = 1;                \
+    gcpro3.name = __FILE__; gcpro3.lineno = __LINE__; gcpro3.idx = 3;  \
+    gcpro4.next = &gcpro3; gcpro4.var = &(d); gcpro4.nvars = 1;                \
+    gcpro4.name = __FILE__; gcpro4.lineno = __LINE__; gcpro4.idx = 4;  \
+    gcpro5.next = &gcpro4; gcpro5.var = &(e); gcpro5.nvars = 1;                \
+    gcpro5.name = __FILE__; gcpro5.lineno = __LINE__; gcpro5.idx = 5;  \
+    gcpro6.next = &gcpro5; gcpro6.var = &(f); gcpro6.nvars = 1;                \
+    gcpro6.name = __FILE__; gcpro6.lineno = __LINE__; gcpro6.idx = 6;  \
+    gcpro6.level = gcpro_level++;                                      \
+    gcprolist = &gcpro6; }
 
 #define GCPRO7(a, b, c, d, e, f, g)                                    \
- {gcpro1.next = gcprolist; gcpro1.var = &(a); gcpro1.nvars = 1;                \
-  gcpro1.level = gcpro_level;                                          \
-  gcpro2.next = &gcpro1; gcpro2.var = &(b); gcpro2.nvars = 1;          \
-  gcpro3.next = &gcpro2; gcpro3.var = &(c); gcpro3.nvars = 1;          \
-  gcpro4.next = &gcpro3; gcpro4.var = &(d); gcpro4.nvars = 1;          \
-  gcpro5.next = &gcpro4; gcpro5.var = &(e); gcpro5.nvars = 1;          \
-  gcpro6.next = &gcpro5; gcpro6.var = &(f); gcpro6.nvars = 1;          \
-  gcpro7.next = &gcpro6; gcpro7.var = &(g); gcpro7.nvars = 1;          \
-  gcpro7.level = gcpro_level++;                                                \
-  gcprolist = &gcpro7; }
+  { gcpro1.next = gcprolist; gcpro1.var = &(a); gcpro1.nvars = 1;      \
+    gcpro1.name = __FILE__; gcpro1.lineno = __LINE__; gcpro1.idx = 1;  \
+    gcpro1.level = gcpro_level;                                                \
+    gcpro2.next = &gcpro1; gcpro2.var = &(b); gcpro2.nvars = 1;                \
+    gcpro2.name = __FILE__; gcpro2.lineno = __LINE__; gcpro2.idx = 2;  \
+    gcpro3.next = &gcpro2; gcpro3.var = &(c); gcpro3.nvars = 1;                \
+    gcpro3.name = __FILE__; gcpro3.lineno = __LINE__; gcpro3.idx = 3;  \
+    gcpro4.next = &gcpro3; gcpro4.var = &(d); gcpro4.nvars = 1;                \
+    gcpro4.name = __FILE__; gcpro4.lineno = __LINE__; gcpro4.idx = 4;  \
+    gcpro5.next = &gcpro4; gcpro5.var = &(e); gcpro5.nvars = 1;                \
+    gcpro5.name = __FILE__; gcpro5.lineno = __LINE__; gcpro5.idx = 5;  \
+    gcpro6.next = &gcpro5; gcpro6.var = &(f); gcpro6.nvars = 1;                \
+    gcpro6.name = __FILE__; gcpro6.lineno = __LINE__; gcpro6.idx = 6;  \
+    gcpro7.next = &gcpro6; gcpro7.var = &(g); gcpro7.nvars = 1;                \
+    gcpro7.name = __FILE__; gcpro7.lineno = __LINE__; gcpro7.idx = 7;  \
+    gcpro7.level = gcpro_level++;                                      \
+    gcprolist = &gcpro7; }
 
 #define UNGCPRO                                        \
   (--gcpro_level != gcpro1.level               \
@@ -3359,7 +3372,7 @@ set_sub_char_table_contents (Lisp_Object table, ptrdiff_t idx, Lisp_Object val)
 }
 
 /* Defined in data.c.  */
-extern Lisp_Object Qnil, Qt, Qquote, Qlambda, Qunbound;
+extern Lisp_Object Qquote, Qunbound;
 extern Lisp_Object Qerror_conditions, Qerror_message, Qtop_level;
 extern Lisp_Object Qerror, Qquit, Qargs_out_of_range;
 extern Lisp_Object Qvoid_variable, Qvoid_function;
@@ -3370,26 +3383,18 @@ extern Lisp_Object Qbeginning_of_buffer, Qend_of_buffer, Qbuffer_read_only;
 extern Lisp_Object Qtext_read_only;
 extern Lisp_Object Qinteractive_form;
 extern Lisp_Object Qcircular_list;
-extern Lisp_Object Qintegerp, Qwholenump, Qsymbolp, Qlistp, Qconsp;
-extern Lisp_Object Qstringp, Qarrayp, Qsequencep, Qbufferp;
-extern Lisp_Object Qchar_or_string_p, Qmarkerp, Qinteger_or_marker_p, Qvectorp;
-extern Lisp_Object Qbuffer_or_string_p;
+extern Lisp_Object Qsequencep;
+extern Lisp_Object Qchar_or_string_p, Qinteger_or_marker_p;
 extern Lisp_Object Qfboundp;
-extern Lisp_Object Qchar_table_p, Qvector_or_char_table_p;
 
 extern Lisp_Object Qcdr;
 
 extern Lisp_Object Qrange_error, Qoverflow_error;
 
-extern Lisp_Object Qfloatp;
-extern Lisp_Object Qnumberp, Qnumber_or_marker_p;
+extern Lisp_Object Qnumber_or_marker_p;
 
 extern Lisp_Object Qbuffer, Qinteger, Qsymbol;
 
-extern Lisp_Object Qfont_spec, Qfont_entity, Qfont_object;
-
-EXFUN (Fbyteorder, 0) ATTRIBUTE_CONST;
-
 /* Defined in data.c.  */
 extern Lisp_Object indirect_function (Lisp_Object);
 extern Lisp_Object find_symbol_value (Lisp_Object);
@@ -3436,7 +3441,6 @@ extern struct Lisp_Symbol *indirect_variable (struct Lisp_Symbol *);
 extern _Noreturn void args_out_of_range (Lisp_Object, Lisp_Object);
 extern _Noreturn void args_out_of_range_3 (Lisp_Object, Lisp_Object,
                                           Lisp_Object);
-extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object);
 extern Lisp_Object do_symval_forwarding (union Lisp_Fwd *);
 extern void set_internal (Lisp_Object, Lisp_Object, Lisp_Object, bool);
 extern void syms_of_data (void);
@@ -3455,11 +3459,8 @@ extern void init_coding_once (void);
 extern void syms_of_coding (void);
 
 /* Defined in character.c.  */
-EXFUN (Fmax_char, 0) ATTRIBUTE_CONST;
 extern ptrdiff_t chars_in_text (const unsigned char *, ptrdiff_t);
 extern ptrdiff_t multibyte_chars_in_text (const unsigned char *, ptrdiff_t);
-extern int multibyte_char_to_unibyte (int) ATTRIBUTE_CONST;
-extern int multibyte_char_to_unibyte_safe (int) ATTRIBUTE_CONST;
 extern void syms_of_character (void);
 
 /* Defined in charset.c.  */
@@ -3469,9 +3470,6 @@ extern void syms_of_charset (void);
 /* Structure forward declarations.  */
 struct charset;
 
-/* Defined in composite.c.  */
-extern void syms_of_composite (void);
-
 /* Defined in syntax.c.  */
 extern void init_syntax_once (void);
 extern void syms_of_syntax (void);
@@ -3479,7 +3477,6 @@ extern void syms_of_syntax (void);
 /* Defined in fns.c.  */
 extern Lisp_Object QCrehash_size, QCrehash_threshold;
 enum { NEXT_ALMOST_PRIME_LIMIT = 11 };
-EXFUN (Fidentity, 1) ATTRIBUTE_CONST;
 extern EMACS_INT next_almost_prime (EMACS_INT) ATTRIBUTE_CONST;
 extern Lisp_Object larger_vector (Lisp_Object, ptrdiff_t, ptrdiff_t);
 extern void sweep_weak_hash_tables (void);
@@ -3494,7 +3491,8 @@ ptrdiff_t hash_lookup (struct Lisp_Hash_Table *, Lisp_Object, EMACS_UINT *);
 ptrdiff_t hash_put (struct Lisp_Hash_Table *, Lisp_Object, Lisp_Object,
                    EMACS_UINT);
 extern struct hash_table_test hashtest_eql, hashtest_equal;
-
+extern void validate_subarray (Lisp_Object, Lisp_Object, Lisp_Object,
+                              ptrdiff_t, ptrdiff_t *, ptrdiff_t *);
 extern Lisp_Object substring_both (Lisp_Object, ptrdiff_t, ptrdiff_t,
                                   ptrdiff_t, ptrdiff_t);
 extern Lisp_Object merge (Lisp_Object, Lisp_Object, Lisp_Object);
@@ -3512,7 +3510,6 @@ extern Lisp_Object string_make_unibyte (Lisp_Object);
 extern void syms_of_fns (void);
 
 /* Defined in floatfns.c.  */
-extern double extract_float (Lisp_Object);
 extern void syms_of_floatfns (void);
 extern Lisp_Object fmod_float (Lisp_Object x, Lisp_Object y);
 
@@ -3533,6 +3530,7 @@ extern void syms_of_image (void);
 
 /* Defined in insdel.c.  */
 extern Lisp_Object Qinhibit_modification_hooks;
+extern Lisp_Object Qregion_extract_function;
 extern void move_gap_both (ptrdiff_t, ptrdiff_t);
 extern _Noreturn void buffer_overflow (void);
 extern void make_gap (ptrdiff_t);
@@ -3585,18 +3583,16 @@ _Noreturn void __executable_start (void);
 #endif
 extern Lisp_Object Vwindow_system;
 extern Lisp_Object sit_for (Lisp_Object, bool, int);
-extern void init_display (void);
-extern void syms_of_display (void);
 
 /* Defined in xdisp.c.  */
 extern Lisp_Object Qinhibit_point_motion_hooks;
-extern Lisp_Object Qinhibit_redisplay, Qdisplay;
+extern Lisp_Object Qinhibit_redisplay;
 extern Lisp_Object Qmenu_bar_update_hook;
 extern Lisp_Object Qwindow_scroll_functions;
 extern Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map;
-extern Lisp_Object Qimage, Qtext, Qboth, Qboth_horiz, Qtext_image_horiz;
+extern Lisp_Object Qtext, Qboth, Qboth_horiz, Qtext_image_horiz;
 extern Lisp_Object Qspace, Qcenter, QCalign_to;
-extern Lisp_Object Qbar, Qhbar, Qbox, Qhollow;
+extern Lisp_Object Qbar, Qhbar, Qhollow;
 extern Lisp_Object Qleft_margin, Qright_margin;
 extern Lisp_Object QCdata, QCfile;
 extern Lisp_Object QCmap;
@@ -3623,7 +3619,6 @@ extern void message_log_maybe_newline (void);
 extern void update_echo_area (void);
 extern void truncate_echo_area (ptrdiff_t);
 extern void redisplay (void);
-extern void redisplay_preserve_echo_area (int);
 
 void set_frame_cursor_types (struct frame *, Lisp_Object);
 extern void syms_of_xdisp (void);
@@ -3638,6 +3633,10 @@ extern void syms_of_xsettings (void);
 /* Defined in vm-limit.c.  */
 extern void memory_warnings (void *, void (*warnfun) (const char *));
 
+/* Defined in character.c.  */
+extern void parse_str_as_multibyte (const unsigned char *, ptrdiff_t,
+                                   ptrdiff_t *, ptrdiff_t *);
+
 /* Defined in alloc.c.  */
 extern void check_pure_size (void);
 extern void free_misc (Lisp_Object);
@@ -3647,7 +3646,7 @@ extern _Noreturn void memory_full (size_t);
 extern _Noreturn void buffer_memory_full (ptrdiff_t);
 extern bool survives_gc_p (Lisp_Object);
 extern void mark_object (Lisp_Object);
-#if defined REL_ALLOC && !defined SYSTEM_MALLOC
+#if defined REL_ALLOC && !defined SYSTEM_MALLOC && !defined HYBRID_MALLOC
 extern void refill_memory_reserve (void);
 #endif
 extern const char *pending_malloc_warning;
@@ -3755,6 +3754,20 @@ make_uninit_vector (ptrdiff_t size)
   return v;
 }
 
+/* Like above, but special for sub char-tables.  */
+
+INLINE Lisp_Object
+make_uninit_sub_char_table (int depth, int min_char)
+{
+  int slots = SUB_CHAR_TABLE_OFFSET + chartab_size[depth];
+  Lisp_Object v = make_uninit_vector (slots);
+
+  XSETPVECTYPE (XVECTOR (v), PVEC_SUB_CHAR_TABLE);
+  XSUB_CHAR_TABLE (v)->depth = depth;
+  XSUB_CHAR_TABLE (v)->min_char = min_char;
+  return v;
+}
+
 extern struct Lisp_Vector *allocate_pseudovector (int, int, enum pvec_type);
 #define ALLOCATE_PSEUDOVECTOR(typ,field,tag)                           \
   ((typ*)                                                              \
@@ -3788,6 +3801,7 @@ extern void init_alloc (void);
 extern void syms_of_alloc (void);
 extern struct buffer * allocate_buffer (void);
 extern int valid_lisp_object_p (Lisp_Object);
+extern int relocatable_string_data_p (const char *);
 #ifdef GC_CHECK_CONS_LIST
 extern void check_cons_list (void);
 #else
@@ -3796,21 +3810,18 @@ INLINE void (check_cons_list) (void) { lisp_h_check_cons_list (); }
 
 #ifdef REL_ALLOC
 /* Defined in ralloc.c.  */
-extern void *r_alloc (void **, size_t);
+extern void *r_alloc (void **, size_t) ATTRIBUTE_ALLOC_SIZE ((2));
 extern void r_alloc_free (void **);
-extern void *r_re_alloc (void **, size_t);
+extern void *r_re_alloc (void **, size_t) ATTRIBUTE_ALLOC_SIZE ((2));
 extern void r_alloc_reset_variable (void **, void **);
 extern void r_alloc_inhibit_buffer_relocation (int);
 #endif
 
 /* Defined in chartab.c.  */
 extern Lisp_Object copy_char_table (Lisp_Object);
-extern Lisp_Object char_table_ref (Lisp_Object, int);
 extern Lisp_Object char_table_ref_and_range (Lisp_Object, int,
                                              int *, int *);
-extern void char_table_set (Lisp_Object, int, Lisp_Object);
 extern void char_table_set_range (Lisp_Object, int, int, Lisp_Object);
-extern int char_table_translate (Lisp_Object, int);
 extern void map_char_table (void (*) (Lisp_Object, Lisp_Object,
                             Lisp_Object),
                             Lisp_Object, Lisp_Object, Lisp_Object);
@@ -3858,6 +3869,7 @@ extern Lisp_Object Qlexical_binding;
 extern Lisp_Object check_obarray (Lisp_Object);
 extern Lisp_Object intern_1 (const char *, ptrdiff_t);
 extern Lisp_Object intern_c_string_1 (const char *, ptrdiff_t);
+extern Lisp_Object intern_driver (Lisp_Object, Lisp_Object, ptrdiff_t);
 extern Lisp_Object oblookup (Lisp_Object, const char *, ptrdiff_t, ptrdiff_t);
 INLINE void
 LOADHIST_ATTACH (Lisp_Object x)
@@ -3888,7 +3900,8 @@ intern_c_string (const char *str)
 }
 
 /* Defined in eval.c.  */
-extern Lisp_Object Qautoload, Qexit, Qinteractive, Qcommandp, Qmacro;
+extern EMACS_INT lisp_eval_depth;
+extern Lisp_Object Qexit, Qinteractive, Qcommandp, Qmacro;
 extern Lisp_Object Qinhibit_quit, Qinternal_interpreter_environment, Qclosure;
 extern Lisp_Object Qand_rest;
 extern Lisp_Object Vautoload_queue;
@@ -3977,7 +3990,6 @@ extern Lisp_Object make_buffer_string_both (ptrdiff_t, ptrdiff_t, ptrdiff_t,
                                            ptrdiff_t, bool);
 extern void init_editfns (void);
 extern void syms_of_editfns (void);
-extern void set_time_zone_rule (const char *);
 
 /* Defined in buffer.c.  */
 extern bool mouse_face_overlay_overlaps (Lisp_Object);
@@ -3991,7 +4003,7 @@ extern bool overlay_touches_p (ptrdiff_t);
 extern Lisp_Object other_buffer_safely (Lisp_Object);
 extern Lisp_Object get_truename_buffer (Lisp_Object);
 extern void init_buffer_once (void);
-extern void init_buffer (void);
+extern void init_buffer (int);
 extern void syms_of_buffer (void);
 extern void keys_of_buffer (void);
 
@@ -4022,7 +4034,6 @@ extern Lisp_Object expand_and_dir_to_file (Lisp_Object, Lisp_Object);
 extern Lisp_Object write_region (Lisp_Object, Lisp_Object, Lisp_Object,
                                 Lisp_Object, Lisp_Object, Lisp_Object,
                                 Lisp_Object, int);
-EXFUN (Fread_file_name, 6);     /* Not a normal DEFUN.  */
 extern void close_file_unwind (int);
 extern void fclose_unwind (void *);
 extern void restore_point_unwind (Lisp_Object);
@@ -4031,7 +4042,7 @@ extern _Noreturn void report_file_error (const char *, Lisp_Object);
 extern bool internal_delete_file (Lisp_Object);
 extern Lisp_Object emacs_readlinkat (int, const char *);
 extern bool file_directory_p (const char *);
-extern bool file_accessible_directory_p (const char *);
+extern bool file_accessible_directory_p (Lisp_Object);
 extern void init_fileio (void);
 extern void syms_of_fileio (void);
 extern Lisp_Object make_temp_name (Lisp_Object, bool);
@@ -4074,6 +4085,7 @@ extern void syms_of_minibuf (void);
 /* Defined in callint.c.  */
 
 extern Lisp_Object Qminus, Qplus;
+extern Lisp_Object Qprogn;
 extern Lisp_Object Qwhen;
 extern Lisp_Object Qmouse_leave_buffer_hook;
 extern void syms_of_callint (void);
@@ -4095,10 +4107,12 @@ extern Lisp_Object echo_message_buffer;
 extern struct kboard *echo_kboard;
 extern void cancel_echoing (void);
 extern Lisp_Object Qdisabled, QCfilter;
-extern Lisp_Object Qup, Qdown, Qbottom;
-extern Lisp_Object Qtop;
+extern Lisp_Object Qup, Qdown;
 extern Lisp_Object last_undo_boundary;
 extern bool input_pending;
+#ifdef HAVE_STACK_OVERFLOW_HANDLING
+extern sigjmp_buf return_to_command_loop;
+#endif
 extern Lisp_Object menu_bar_items (Lisp_Object);
 extern Lisp_Object tool_bar_items (Lisp_Object, int *);
 extern void discard_mouse_events (void);
@@ -4128,14 +4142,10 @@ extern void syms_of_indent (void);
 
 /* Defined in frame.c.  */
 extern Lisp_Object Qonly, Qnone;
-extern Lisp_Object Qvisible;
-extern void set_frame_param (struct frame *, Lisp_Object, Lisp_Object);
 extern void store_frame_param (struct frame *, Lisp_Object, Lisp_Object);
 extern void store_in_alist (Lisp_Object *, Lisp_Object, Lisp_Object);
 extern Lisp_Object do_switch_frame (Lisp_Object, int, int, Lisp_Object);
-#if HAVE_NS || HAVE_NTGUI
 extern Lisp_Object get_frame_param (struct frame *, Lisp_Object);
-#endif
 extern void frames_discard_buffer (Lisp_Object);
 extern void syms_of_frame (void);
 
@@ -4186,10 +4196,8 @@ extern bool running_asynch_code;
 /* Defined in process.c.  */
 extern Lisp_Object QCtype, Qlocal;
 extern void kill_buffer_processes (Lisp_Object);
-extern bool wait_reading_process_output (intmax_t, int, int, bool,
-                                        Lisp_Object,
-                                        struct Lisp_Process *,
-                                        int);
+extern int wait_reading_process_output (intmax_t, int, int, bool, Lisp_Object,
+                                       struct Lisp_Process *, int);
 /* Max value for the first argument of wait_reading_process_output.  */
 #if __GNUC__ == 3 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 5)
 /* Work around a bug in GCC 3.4.2, known to be fixed in GCC 4.6.3.
@@ -4198,6 +4206,9 @@ extern bool wait_reading_process_output (intmax_t, int, int, bool,
 #else
 # define WAIT_READING_MAX INTMAX_MAX
 #endif
+#ifdef HAVE_TIMERFD
+extern void add_timer_wait_descriptor (int);
+#endif
 extern void add_keyboard_wait_descriptor (int);
 extern void delete_keyboard_wait_descriptor (int);
 #ifdef HAVE_GPM
@@ -4252,9 +4263,8 @@ extern void record_property_change (ptrdiff_t, ptrdiff_t,
                                     Lisp_Object);
 extern void syms_of_undo (void);
 /* Defined in textprop.c.  */
-extern Lisp_Object Qfont, Qmouse_face;
+extern Lisp_Object Qmouse_face;
 extern Lisp_Object Qinsert_in_front_hooks, Qinsert_behind_hooks;
-extern Lisp_Object Qfront_sticky, Qrear_nonsticky;
 extern Lisp_Object Qminibuffer_prompt;
 
 extern void report_interval_modification (Lisp_Object, Lisp_Object);
@@ -4277,12 +4287,9 @@ extern char *get_current_dir_name (void);
 #endif
 extern void stuff_char (char c);
 extern void init_foreground_group (void);
-extern void init_sigio (int);
 extern void sys_subshell (void);
 extern void sys_suspend (void);
 extern void discard_tty_input (void);
-extern void block_tty_out_signal (void);
-extern void unblock_tty_out_signal (void);
 extern void init_sys_modes (struct tty_display_info *);
 extern void reset_sys_modes (struct tty_display_info *);
 extern void init_all_sys_modes (void);
@@ -4308,6 +4315,7 @@ extern void lock_file (Lisp_Object);
 extern void unlock_file (Lisp_Object);
 extern void unlock_buffer (struct buffer *);
 extern void syms_of_filelock (void);
+extern int str_collate (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
 
 /* Defined in sound.c.  */
 extern void syms_of_sound (void);
@@ -4364,8 +4372,8 @@ extern void syms_of_w32notify (void);
 #endif
 
 /* Defined in xfaces.c.  */
-extern Lisp_Object Qdefault, Qtool_bar, Qfringe;
-extern Lisp_Object Qheader_line, Qscroll_bar, Qcursor;
+extern Lisp_Object Qdefault, Qfringe;
+extern Lisp_Object Qscroll_bar, Qcursor;
 extern Lisp_Object Qmode_line_inactive;
 extern Lisp_Object Qface;
 extern Lisp_Object Qnormal;
@@ -4389,6 +4397,7 @@ extern void syms_of_xsmfns (void);
 extern void syms_of_xselect (void);
 
 /* Defined in xterm.c.  */
+extern void init_xterm (void);
 extern void syms_of_xterm (void);
 #endif /* HAVE_X_WINDOWS */
 
@@ -4410,6 +4419,7 @@ extern void syms_of_decompress (void);
 
 #ifdef HAVE_DBUS
 /* Defined in dbusbind.c.  */
+void init_dbusbind (void);
 void syms_of_dbusbind (void);
 #endif
 
@@ -4424,34 +4434,49 @@ extern void syms_of_profiler (void);
 /* Defined in msdos.c, w32.c.  */
 extern char *emacs_root_dir (void);
 #endif /* DOS_NT */
-\f
-/* True means Emacs has already been initialized.
-   Used during startup to detect startup of dumped Emacs.  */
-extern bool initialized;
+
+/* Defined in lastfile.c.  */
+extern char my_edata[];
+extern char my_endbss[];
+extern char *my_endbss_static;
 
 /* True means ^G can quit instantly.  */
 extern bool immediate_quit;
 
-extern void *xmalloc (size_t);
-extern void *xzalloc (size_t);
-extern void *xrealloc (void *, size_t);
+extern void *xmalloc (size_t) ATTRIBUTE_MALLOC_SIZE ((1));
+extern void *xzalloc (size_t) ATTRIBUTE_MALLOC_SIZE ((1));
+extern void *xrealloc (void *, size_t) ATTRIBUTE_ALLOC_SIZE ((2));
 extern void xfree (void *);
-extern void *xnmalloc (ptrdiff_t, ptrdiff_t);
-extern void *xnrealloc (void *, ptrdiff_t, ptrdiff_t);
+extern void *xnmalloc (ptrdiff_t, ptrdiff_t) ATTRIBUTE_MALLOC_SIZE ((1,2));
+extern void *xnrealloc (void *, ptrdiff_t, ptrdiff_t)
+  ATTRIBUTE_ALLOC_SIZE ((2,3));
 extern void *xpalloc (void *, ptrdiff_t *, ptrdiff_t, ptrdiff_t, ptrdiff_t);
 
-extern char *xstrdup (const char *);
-extern char *xlispstrdup (Lisp_Object);
+extern char *xstrdup (const char *) ATTRIBUTE_MALLOC;
+extern char *xlispstrdup (Lisp_Object) ATTRIBUTE_MALLOC;
 extern void dupstring (char **, char const *);
-extern void xputenv (const char *);
 
-extern char *egetenv (const char *);
+/* Make DEST a copy of STRING's data.  Return a pointer to DEST's terminating
+   null byte.  This is like stpcpy, except the source is a Lisp string.  */
 
-/* Copy Lisp string to temporary (allocated on stack) C string.  */
+INLINE char *
+lispstpcpy (char *dest, Lisp_Object string)
+{
+  ptrdiff_t len = SBYTES (string);
+  memcpy (dest, SDATA (string), len + 1);
+  return dest + len;
+}
+
+extern void xputenv (const char *);
 
-#define xlispstrdupa(string)                   \
-  memcpy (alloca (SBYTES (string) + 1),                \
-         SSDATA (string), SBYTES (string) + 1)
+extern char *egetenv_internal (const char *, ptrdiff_t);
+
+INLINE char *
+egetenv (const char *var)
+{
+  /* When VAR is a string literal, strlen can be optimized away.  */
+  return egetenv_internal (var, strlen (var));
+}
 
 /* Set up the name of the machine we're running on.  */
 extern void init_system_name (void);
@@ -4473,15 +4498,18 @@ extern void init_system_name (void);
 
 enum MAX_ALLOCA { MAX_ALLOCA = 16 * 1024 };
 
-extern void *record_xmalloc (size_t);
+extern void *record_xmalloc (size_t) ATTRIBUTE_ALLOC_SIZE ((1));
 
 #define USE_SAFE_ALLOCA                        \
+  ptrdiff_t sa_avail = MAX_ALLOCA;     \
   ptrdiff_t sa_count = SPECPDL_INDEX (); bool sa_must_free = false
 
+#define AVAIL_ALLOCA(size) (sa_avail -= (size), alloca (size))
+
 /* SAFE_ALLOCA allocates a simple buffer.  */
 
-#define SAFE_ALLOCA(size) ((size) < MAX_ALLOCA \
-                          ? alloca (size)      \
+#define SAFE_ALLOCA(size) ((size) <= sa_avail                          \
+                          ? AVAIL_ALLOCA (size)                        \
                           : (sa_must_free = true, record_xmalloc (size)))
 
 /* SAFE_NALLOCA sets BUF to a newly allocated array of MULTIPLIER *
@@ -4490,8 +4518,8 @@ extern void *record_xmalloc (size_t);
 
 #define SAFE_NALLOCA(buf, multiplier, nitems)                   \
   do {                                                          \
-    if ((nitems) <= MAX_ALLOCA / sizeof *(buf) / (multiplier))  \
-      (buf) = alloca (sizeof *(buf) * (multiplier) * (nitems));         \
+    if ((nitems) <= sa_avail / sizeof *(buf) / (multiplier))    \
+      (buf) = AVAIL_ALLOCA (sizeof *(buf) * (multiplier) * (nitems)); \
     else                                                        \
       {                                                                 \
        (buf) = xnmalloc (nitems, sizeof *(buf) * (multiplier)); \
@@ -4500,6 +4528,14 @@ extern void *record_xmalloc (size_t);
       }                                                                 \
   } while (false)
 
+/* SAFE_ALLOCA_STRING allocates a C copy of a Lisp string.  */
+
+#define SAFE_ALLOCA_STRING(ptr, string)                        \
+  do {                                                 \
+    (ptr) = SAFE_ALLOCA (SBYTES (string) + 1);         \
+    memcpy (ptr, SDATA (string), SBYTES (string) + 1); \
+  } while (false)
+
 /* SAFE_FREE frees xmalloced memory and enables GC as needed.  */
 
 #define SAFE_FREE()                    \
@@ -4511,13 +4547,29 @@ extern void *record_xmalloc (size_t);
   } while (false)
 
 
+/* Return floor (NBYTES / WORD_SIZE).  */
+
+INLINE ptrdiff_t
+lisp_word_count (ptrdiff_t nbytes)
+{
+  if (-1 >> 1 == -1)
+    switch (word_size)
+      {
+      case 2: return nbytes >> 1;
+      case 4: return nbytes >> 2;
+      case 8: return nbytes >> 3;
+      case 16: return nbytes >> 4;
+      }
+  return nbytes / word_size - (nbytes % word_size < 0);
+}
+
 /* SAFE_ALLOCA_LISP allocates an array of Lisp_Objects.  */
 
 #define SAFE_ALLOCA_LISP(buf, nelt)                           \
   do {                                                        \
-    if ((nelt) < MAX_ALLOCA / word_size)                      \
-      (buf) = alloca ((nelt) * word_size);                    \
-    else if ((nelt) < min (PTRDIFF_MAX, SIZE_MAX) / word_size) \
+    if ((nelt) <= lisp_word_count (sa_avail))                 \
+      (buf) = AVAIL_ALLOCA ((nelt) * word_size);              \
+    else if ((nelt) <= min (PTRDIFF_MAX, SIZE_MAX) / word_size) \
       {                                                               \
        Lisp_Object arg_;                                      \
        (buf) = xmalloc ((nelt) * word_size);                  \
@@ -4529,6 +4581,107 @@ extern void *record_xmalloc (size_t);
       memory_full (SIZE_MAX);                                 \
   } while (false)
 
+
+/* If USE_STACK_LISP_OBJECTS, define macros that and functions that allocate
+   block-scoped conses and strings.  These objects are not
+   managed by the garbage collector, so they are dangerous: passing them
+   out of their scope (e.g., to user code) results in undefined behavior.
+   Conversely, they have better performance because GC is not involved.
+
+   This feature is experimental and requires careful debugging.
+   Build with CPPFLAGS='-DUSE_STACK_LISP_OBJECTS=0' to disable it.  */
+
+#ifndef USE_STACK_LISP_OBJECTS
+# define USE_STACK_LISP_OBJECTS true
+#endif
+
+/* USE_STACK_LISP_OBJECTS requires GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS.  */
+
+#if GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS
+# undef USE_STACK_LISP_OBJECTS
+# define USE_STACK_LISP_OBJECTS false
+#endif
+
+/* Struct inside unions that are typically no larger and aligned enough.  */
+
+union Aligned_Cons
+{
+  struct Lisp_Cons s;
+  double d; intmax_t i; void *p;
+};
+
+union Aligned_String
+{
+  struct Lisp_String s;
+  double d; intmax_t i; void *p;
+};
+
+/* True for stack-based cons and string implementations, respectively.
+   Use stack-based strings only if stack-based cons also works.
+   Otherwise, STACK_CONS would create heap-based cons cells that
+   could point to stack-based strings, which is a no-no.  */
+
+enum
+  {
+    USE_STACK_CONS = (USE_STACK_LISP_OBJECTS
+                     && alignof (union Aligned_Cons) % GCALIGNMENT == 0),
+    USE_STACK_STRING = (USE_STACK_CONS
+                       && alignof (union Aligned_String) % GCALIGNMENT == 0)
+  };
+
+/* Auxiliary macros used for auto allocation of Lisp objects.  Please
+   use these only in macros like AUTO_CONS that declare a local
+   variable whose lifetime will be clear to the programmer.  */
+#define STACK_CONS(a, b) \
+  make_lisp_ptr (&(union Aligned_Cons) { { a, { b } } }.s, Lisp_Cons)
+#define AUTO_CONS_EXPR(a, b) \
+  (USE_STACK_CONS ? STACK_CONS (a, b) : Fcons (a, b))
+
+/* Declare NAME as an auto Lisp cons or short list if possible, a
+   GC-based one otherwise.  This is in the sense of the C keyword
+   'auto'; i.e., the object has the lifetime of the containing block.
+   The resulting object should not be made visible to user Lisp code.  */
+
+#define AUTO_CONS(name, a, b) Lisp_Object name = AUTO_CONS_EXPR (a, b)
+#define AUTO_LIST1(name, a)                                            \
+  Lisp_Object name = (USE_STACK_CONS ? STACK_CONS (a, Qnil) : list1 (a))
+#define AUTO_LIST2(name, a, b)                                         \
+  Lisp_Object name = (USE_STACK_CONS                                   \
+                     ? STACK_CONS (a, STACK_CONS (b, Qnil))            \
+                     : list2 (a, b))
+#define AUTO_LIST3(name, a, b, c)                                      \
+  Lisp_Object name = (USE_STACK_CONS                                   \
+                     ? STACK_CONS (a, STACK_CONS (b, STACK_CONS (c, Qnil))) \
+                     : list3 (a, b, c))
+#define AUTO_LIST4(name, a, b, c, d)                                   \
+    Lisp_Object name                                                   \
+      = (USE_STACK_CONS                                                        \
+        ? STACK_CONS (a, STACK_CONS (b, STACK_CONS (c,                 \
+                                                    STACK_CONS (d, Qnil)))) \
+        : list4 (a, b, c, d))
+
+/* Check whether stack-allocated strings are ASCII-only.  */
+
+#if defined (ENABLE_CHECKING) && USE_STACK_LISP_OBJECTS
+extern const char *verify_ascii (const char *);
+#else
+# define verify_ascii(str) (str)
+#endif
+
+/* Declare NAME as an auto Lisp string if possible, a GC-based one if not.
+   Take its value from STR.  STR is not necessarily copied and should
+   contain only ASCII characters.  The resulting Lisp string should
+   not be modified or made visible to user code.  */
+
+#define AUTO_STRING(name, str)                                         \
+  Lisp_Object name =                                                   \
+    (USE_STACK_STRING                                                  \
+     ? (make_lisp_ptr                                                  \
+       ((&(union Aligned_String)                                       \
+         {{strlen (str), -1, 0, (unsigned char *) verify_ascii (str)}}.s), \
+         Lisp_String))                                                 \
+     : build_string (verify_ascii (str)))
+
 /* Loop over all tails of a list, checking for cycles.
    FIXME: Make tortoise and n internal declarations.
    FIXME: Unroll the loop body so we don't need `n'.  */
index 59d5b86c33aae3d09951a6162e98c1e750378ea0..642e9af225f29c88dc9d67aed9d5bb72e1b92209 100644 (file)
@@ -132,6 +132,7 @@ lisp = \
        $(lispsource)/textmodes/paragraphs.elc \
        $(lispsource)/progmodes/prog-mode.elc \
        $(lispsource)/emacs-lisp/lisp-mode.elc \
+       $(lispsource)/progmodes/elisp-mode.elc \
        $(lispsource)/textmodes/text-mode.elc \
        $(lispsource)/textmodes/fill.elc \
        $(lispsource)/newcomment.elc \
@@ -152,7 +153,6 @@ lisp = \
        $(lispsource)/term/w32-win.elc \
        $(lispsource)/ls-lisp.elc \
        $(lispsource)/disp-table.elc \
-       $(lispsource)/w32-common-fns.elc \
        $(lispsource)/dos-w32.elc \
        $(lispsource)/w32-fns.elc \
        $(lispsource)/dos-fns.elc \
index 4990d25eda1a3f86a61ecc04896951bd97ced252..171a51acb3f40abee55b34ebfeebc4338a555f8f 100644 (file)
@@ -213,7 +213,7 @@ readchar (Lisp_Object readcharfun, bool *multibyte)
       else
        {
          c = BUF_FETCH_BYTE (inbuffer, pt_byte);
-         if (! ASCII_BYTE_P (c))
+         if (! ASCII_CHAR_P (c))
            c = BYTE8_TO_CHAR (c);
          pt_byte++;
        }
@@ -242,7 +242,7 @@ readchar (Lisp_Object readcharfun, bool *multibyte)
       else
        {
          c = BUF_FETCH_BYTE (inbuffer, bytepos);
-         if (! ASCII_BYTE_P (c))
+         if (! ASCII_CHAR_P (c))
            c = BYTE8_TO_CHAR (c);
          bytepos++;
        }
@@ -324,7 +324,7 @@ readchar (Lisp_Object readcharfun, bool *multibyte)
     return c;
   if (multibyte)
     *multibyte = 1;
-  if (ASCII_BYTE_P (c))
+  if (ASCII_CHAR_P (c))
     return c;
   if (emacs_mule_encoding)
     return read_emacs_mule_char (c, readbyte, readcharfun);
@@ -970,10 +970,8 @@ load_warn_old_style_backquotes (Lisp_Object file)
 {
   if (!NILP (Vold_style_backquotes))
     {
-      Lisp_Object args[2];
-      args[0] = build_string ("Loading `%s': old-style backquotes detected!");
-      args[1] = file;
-      Fmessage (2, args);
+      AUTO_STRING (format, "Loading `%s': old-style backquotes detected!");
+      Fmessage (2, (Lisp_Object []) {format, file});
     }
 }
 
@@ -1473,6 +1471,7 @@ openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes,
   ptrdiff_t max_suffix_len = 0;
   int last_errno = ENOENT;
   int save_fd = -1;
+  USE_SAFE_ALLOCA;
 
   /* The last-modified time of the newest matching file found.
      Initialize it to something less than all valid timestamps.  */
@@ -1513,7 +1512,10 @@ openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes,
         this path element/specified file name and any possible suffix.  */
       want_length = max_suffix_len + SBYTES (filename);
       if (fn_size <= want_length)
-       fn = alloca (fn_size = 100 + want_length);
+       {
+         fn_size = 100 + want_length;
+         fn = SAFE_ALLOCA (fn_size);
+       }
 
       /* Loop over suffixes.  */
       for (tail = NILP (suffixes) ? list1 (empty_unibyte_string) : suffixes;
@@ -1579,6 +1581,7 @@ openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes,
                   /* We succeeded; return this descriptor and filename.  */
                   if (storeptr)
                     *storeptr = string;
+                 SAFE_FREE ();
                   UNGCPRO;
                   return -2;
                }
@@ -1651,6 +1654,7 @@ openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes,
                       /* We succeeded; return this descriptor and filename.  */
                       if (storeptr)
                         *storeptr = string;
+                     SAFE_FREE ();
                       UNGCPRO;
                       return fd;
                     }
@@ -1661,6 +1665,7 @@ openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes,
                 {
                   if (storeptr)
                     *storeptr = save_string;
+                 SAFE_FREE ();
                   UNGCPRO;
                   return save_fd;
                 }
@@ -1670,6 +1675,7 @@ openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes,
        break;
     }
 
+  SAFE_FREE ();
   UNGCPRO;
   errno = last_errno;
   return -1;
@@ -1763,6 +1769,31 @@ end_of_file_error (void)
   xsignal0 (Qend_of_file);
 }
 
+static Lisp_Object
+readevalloop_eager_expand_eval (Lisp_Object val, Lisp_Object macroexpand)
+{
+  /* If we macroexpand the toplevel form non-recursively and it ends
+     up being a `progn' (or if it was a progn to start), treat each
+     form in the progn as a top-level form.  This way, if one form in
+     the progn defines a macro, that macro is in effect when we expand
+     the remaining forms.  See similar code in bytecomp.el.  */
+  val = call2 (macroexpand, val, Qnil);
+  if (EQ (CAR_SAFE (val), Qprogn))
+    {
+      struct gcpro gcpro1;
+      Lisp_Object subforms = XCDR (val);
+
+      GCPRO1 (subforms);
+      for (val = Qnil; CONSP (subforms); subforms = XCDR (subforms))
+          val = readevalloop_eager_expand_eval (XCAR (subforms),
+                                                macroexpand);
+      UNGCPRO;
+    }
+  else
+      val = eval_sub (call2 (macroexpand, val, Qt));
+  return val;
+}
+
 /* UNIBYTE specifies how to set load_convert_to_unibyte
    for this invocation.
    READFUN, if non-nil, is used instead of `read'.
@@ -1930,8 +1961,9 @@ readevalloop (Lisp_Object readcharfun,
 
       /* Now eval what we just read.  */
       if (!NILP (macroexpand))
-       val = call1 (macroexpand, val);
-      val = eval_sub (val);
+        val = readevalloop_eager_expand_eval (val, macroexpand);
+      else
+        val = eval_sub (val);
 
       if (printflag)
        {
@@ -2064,9 +2096,10 @@ DEFUN ("read-from-string", Fread_from_string, Sread_from_string, 1, 3, 0,
        doc: /* Read one Lisp expression which is represented as text by STRING.
 Returns a cons: (OBJECT-READ . FINAL-STRING-INDEX).
 FINAL-STRING-INDEX is an integer giving the position of the next
- remaining character in STRING.
-START and END optionally delimit a substring of STRING from which to read;
- they default to 0 and (length STRING) respectively.  */)
+remaining character in STRING.  START and END optionally delimit
+a substring of STRING from which to read;  they default to 0 and
+(length STRING) respectively.  Negative values are counted from
+the end of STRING.  */)
   (Lisp_Object string, Lisp_Object start, Lisp_Object end)
 {
   Lisp_Object ret;
@@ -2077,10 +2110,9 @@ START and END optionally delimit a substring of STRING from which to read;
 }
 
 /* Function to set up the global context we need in toplevel read
-   calls.  */
+   calls.  START and END only used when STREAM is a string.  */
 static Lisp_Object
 read_internal_start (Lisp_Object stream, Lisp_Object start, Lisp_Object end)
-/* `start', `end' only used when stream is a string.  */
 {
   Lisp_Object retval;
 
@@ -2102,25 +2134,9 @@ read_internal_start (Lisp_Object stream, Lisp_Object start, Lisp_Object end)
       else
        string = XCAR (stream);
 
-      if (NILP (end))
-       endval = SCHARS (string);
-      else
-       {
-         CHECK_NUMBER (end);
-         if (! (0 <= XINT (end) && XINT (end) <= SCHARS (string)))
-           args_out_of_range (string, end);
-         endval = XINT (end);
-       }
+      validate_subarray (string, start, end, SCHARS (string),
+                        &startval, &endval);
 
-      if (NILP (start))
-       startval = 0;
-      else
-       {
-         CHECK_NUMBER (start);
-         if (! (0 <= XINT (start) && XINT (start) <= endval))
-           args_out_of_range (string, start);
-         startval = XINT (start);
-       }
       read_from_string_index = startval;
       read_from_string_index_byte = string_char_to_byte (string, startval);
       read_from_string_limit = endval;
@@ -2595,21 +2611,38 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
              c = READCHAR;
              if (c == '[')
                {
-                 Lisp_Object tmp;
-                 int depth;
-                 ptrdiff_t size;
+                 /* Sub char-table can't be read as a regular
+                    vector because of a two C integer fields.  */
+                 Lisp_Object tbl, tmp = read_list (1, readcharfun);
+                 ptrdiff_t size = XINT (Flength (tmp));
+                 int i, depth, min_char;
+                 struct Lisp_Cons *cell;
 
-                 tmp = read_vector (readcharfun, 0);
-                 size = ASIZE (tmp);
                  if (size == 0)
-                   error ("Invalid size char-table");
-                 if (! RANGED_INTEGERP (1, AREF (tmp, 0), 3))
-                   error ("Invalid depth in char-table");
-                 depth = XINT (AREF (tmp, 0));
+                   error ("Zero-sized sub char-table");
+
+                 if (! RANGED_INTEGERP (1, XCAR (tmp), 3))
+                   error ("Invalid depth in sub char-table");
+                 depth = XINT (XCAR (tmp));
                  if (chartab_size[depth] != size - 2)
-                   error ("Invalid size char-table");
-                 XSETPVECTYPE (XVECTOR (tmp), PVEC_SUB_CHAR_TABLE);
-                 return tmp;
+                   error ("Invalid size in sub char-table");
+                 cell = XCONS (tmp), tmp = XCDR (tmp), size--;
+                 free_cons (cell);
+
+                 if (! RANGED_INTEGERP (0, XCAR (tmp), MAX_CHAR))
+                   error ("Invalid minimum character in sub-char-table");
+                 min_char = XINT (XCAR (tmp));
+                 cell = XCONS (tmp), tmp = XCDR (tmp), size--;
+                 free_cons (cell);
+
+                 tbl = make_uninit_sub_char_table (depth, min_char);
+                 for (i = 0; i < size; i++)
+                   {
+                     XSUB_CHAR_TABLE (tbl)->contents[i] = XCAR (tmp);
+                     cell = XCONS (tmp), tmp = XCDR (tmp);
+                     free_cons (cell);
+                   }
+                 return tbl;
                }
              invalid_syntax ("#^^");
            }
@@ -2840,11 +2873,8 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
                  if (c == '=')
                    {
                      /* Make a placeholder for #n# to use temporarily.  */
-                     Lisp_Object placeholder;
-                     Lisp_Object cell;
-
-                     placeholder = Fcons (Qnil, Qnil);
-                     cell = Fcons (make_number (n), placeholder);
+                     AUTO_CONS (placeholder, Qnil, Qnil);
+                     Lisp_Object cell = Fcons (make_number (n), placeholder);
                      read_objects = Fcons (cell, read_objects);
 
                      /* Read the object itself.  */
@@ -3323,7 +3353,7 @@ substitute_object_recurse (Lisp_Object object, Lisp_Object placeholder, Lisp_Obj
           substitute_in_interval contains part of the logic.  */
 
        INTERVAL root_interval = string_intervals (subtree);
-       Lisp_Object arg = Fcons (object, placeholder);
+       AUTO_CONS (arg, object, placeholder);
 
        traverse_intervals_noorder (root_interval,
                                    &substitute_in_interval, arg);
@@ -3630,8 +3660,10 @@ read_list (bool flag, Lisp_Object readcharfun)
               in the installed Lisp directory.
               We don't use Fexpand_file_name because that would make
               the directory absolute now.  */
-           elt = concat2 (build_string ("../lisp/"),
-                        Ffile_name_nondirectory (elt));
+           {
+             AUTO_STRING (dot_dot_lisp, "../lisp/");
+             elt = concat2 (dot_dot_lisp, Ffile_name_nondirectory (elt));
+           }
        }
       else if (EQ (elt, Vload_file_name)
               && ! NILP (elt)
@@ -3759,6 +3791,30 @@ check_obarray (Lisp_Object obarray)
   return obarray;
 }
 
+/* Intern a symbol with name STRING in OBARRAY using bucket INDEX.  */
+
+Lisp_Object
+intern_driver (Lisp_Object string, Lisp_Object obarray, ptrdiff_t index)
+{
+  Lisp_Object *ptr, sym = Fmake_symbol (string);
+
+  XSYMBOL (sym)->interned = (EQ (obarray, initial_obarray)
+                            ? SYMBOL_INTERNED_IN_INITIAL_OBARRAY
+                            : SYMBOL_INTERNED);
+
+  if ((SREF (string, 0) == ':') && EQ (obarray, initial_obarray))
+    {
+      XSYMBOL (sym)->constant = 1;
+      XSYMBOL (sym)->redirect = SYMBOL_PLAINVAL;
+      SET_SYMBOL_VAL (XSYMBOL (sym), sym);
+    }
+
+  ptr = aref_addr (obarray, index);
+  set_symbol_next (sym, SYMBOLP (*ptr) ? XSYMBOL (*ptr) : NULL);
+  *ptr = sym;
+  return sym;
+}
+
 /* Intern the C string STR: return a symbol with that name,
    interned in the current obarray.  */
 
@@ -3768,7 +3824,8 @@ intern_1 (const char *str, ptrdiff_t len)
   Lisp_Object obarray = check_obarray (Vobarray);
   Lisp_Object tem = oblookup (obarray, str, len, len);
 
-  return SYMBOLP (tem) ? tem : Fintern (make_string (str, len), obarray);
+  return SYMBOLP (tem) ? tem : intern_driver (make_string (str, len),
+                                             obarray, XINT (tem));
 }
 
 Lisp_Object
@@ -3777,16 +3834,14 @@ intern_c_string_1 (const char *str, ptrdiff_t len)
   Lisp_Object obarray = check_obarray (Vobarray);
   Lisp_Object tem = oblookup (obarray, str, len, len);
 
-  if (SYMBOLP (tem))
-    return tem;
-
-  if (NILP (Vpurify_flag))
-    /* Creating a non-pure string from a string literal not
-       implemented yet.  We could just use make_string here and live
-       with the extra copy.  */
-    emacs_abort ();
-
-  return Fintern (make_pure_c_string (str, len), obarray);
+  if (!SYMBOLP (tem))
+    {
+      /* Creating a non-pure string from a string literal not implemented yet.
+        We could just use make_string here and live with the extra copy.  */
+      eassert (!NILP (Vpurify_flag));
+      tem = intern_driver (make_pure_c_string (str, len), obarray, XINT (tem));
+    }
+  return tem;
 }
 \f
 DEFUN ("intern", Fintern, Sintern, 1, 2, 0,
@@ -3796,43 +3851,16 @@ A second optional argument specifies the obarray to use;
 it defaults to the value of `obarray'.  */)
   (Lisp_Object string, Lisp_Object obarray)
 {
-  register Lisp_Object tem, sym, *ptr;
-
-  if (NILP (obarray)) obarray = Vobarray;
-  obarray = check_obarray (obarray);
+  Lisp_Object tem;
 
+  obarray = check_obarray (NILP (obarray) ? Vobarray : obarray);
   CHECK_STRING (string);
 
-  tem = oblookup (obarray, SSDATA (string),
-                 SCHARS (string),
-                 SBYTES (string));
-  if (!INTEGERP (tem))
-    return tem;
-
-  if (!NILP (Vpurify_flag))
-    string = Fpurecopy (string);
-  sym = Fmake_symbol (string);
-
-  if (EQ (obarray, initial_obarray))
-    XSYMBOL (sym)->interned = SYMBOL_INTERNED_IN_INITIAL_OBARRAY;
-  else
-    XSYMBOL (sym)->interned = SYMBOL_INTERNED;
-
-  if ((SREF (string, 0) == ':')
-      && EQ (obarray, initial_obarray))
-    {
-      XSYMBOL (sym)->constant = 1;
-      XSYMBOL (sym)->redirect = SYMBOL_PLAINVAL;
-      SET_SYMBOL_VAL (XSYMBOL (sym), sym);
-    }
-
-  ptr = aref_addr (obarray, XINT(tem));
-  if (SYMBOLP (*ptr))
-    set_symbol_next (sym, XSYMBOL (*ptr));
-  else
-    set_symbol_next (sym, NULL);
-  *ptr = sym;
-  return sym;
+  tem = oblookup (obarray, SSDATA (string), SCHARS (string), SBYTES (string));
+  if (!SYMBOLP (tem))
+    tem = intern_driver (NILP (Vpurify_flag) ? string
+                        : Fpurecopy (string), obarray, XINT (tem));
+  return tem;
 }
 
 DEFUN ("intern-soft", Fintern_soft, Sintern_soft, 1, 2, 0,
@@ -4172,7 +4200,7 @@ load_path_check (Lisp_Object lpath)
       if (STRINGP (dirfile))
         {
           dirfile = Fdirectory_file_name (dirfile);
-          if (! file_accessible_directory_p (SSDATA (dirfile)))
+          if (! file_accessible_directory_p (dirfile))
             dir_warning ("Lisp directory", XCAR (path_tail));
         }
     }
index 7421cd63a797501db8f90cbb31dce46490c0ddc0..e6e45ab152c6c1454730a67a4c07176dfd9690c2 100644 (file)
@@ -57,11 +57,7 @@ typedef CTCharacterCollection CharacterCollection;
 #define MAC_FONT_CASCADE_LIST_ATTRIBUTE kCTFontCascadeListAttribute
 #define MAC_FONT_CHARACTER_SET_ATTRIBUTE kCTFontCharacterSetAttribute
 #define MAC_FONT_LANGUAGES_ATTRIBUTE kCTFontLanguagesAttribute
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
 #define MAC_FONT_FORMAT_ATTRIBUTE kCTFontFormatAttribute
-#else
-#define MAC_FONT_FORMAT_ATTRIBUTE (CFSTR ("NSCTFontFormatAttribute"))
-#endif
 #define MAC_FONT_SYMBOLIC_TRAIT kCTFontSymbolicTrait
 #define MAC_FONT_WEIGHT_TRAIT kCTFontWeightTrait
 #define MAC_FONT_WIDTH_TRAIT kCTFontWidthTrait
@@ -79,11 +75,7 @@ enum {
 };
 
 enum {
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
   MAC_FONT_FORMAT_BITMAP = kCTFontFormatBitmap
-#else
-  MAC_FONT_FORMAT_BITMAP = 5
-#endif
 };
 
 enum {
@@ -112,13 +104,8 @@ enum {
 #define mac_font_get_underline_position CTFontGetUnderlinePosition
 #define mac_font_get_underline_thickness CTFontGetUnderlineThickness
 #define mac_font_copy_graphics_font(font) CTFontCopyGraphicsFont (font, NULL)
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
 #define mac_font_copy_non_synthetic_table(font, table) \
   CTFontCopyTable (font, table, kCTFontTableOptionNoOptions)
-#else
-#define mac_font_copy_non_synthetic_table(font, table) \
-  CTFontCopyTable (font, table, kCTFontTableOptionExcludeSynthetic)
-#endif
 
 #define mac_font_create_preferred_family_for_attributes \
   mac_ctfont_create_preferred_family_for_attributes
index 69bde9f66a7dca67e9a011598eafea8f72427e85..366d087f8c208f6f5bb3949918624973fa4a7f78 100644 (file)
@@ -36,13 +36,11 @@ Original author: YAMAMOTO Mitsuharu
 #include "macfont.h"
 #include "macuvs.h"
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
-
 #include <libkern/OSByteOrder.h>
 
 static struct font_driver macfont_driver;
 
-/* Core Text, for Mac OS X 10.5 and later.  */
+/* Core Text, for Mac OS X.  */
 static Lisp_Object Qmac_ct;
 
 static double mac_ctfont_get_advance_width_for_glyph (CTFontRef, CGGlyph);
@@ -50,25 +48,25 @@ static CGRect mac_ctfont_get_bounding_rect_for_glyph (CTFontRef, CGGlyph);
 static CFArrayRef mac_ctfont_create_available_families (void);
 static Boolean mac_ctfont_equal_in_postscript_name (CTFontRef, CTFontRef);
 static CTLineRef mac_ctfont_create_line_with_string_and_font (CFStringRef,
-                                                             CTFontRef);
+                                                              CTFontRef);
 static CFComparisonResult mac_font_family_compare (const void *,
-                                                  const void *, void *);
+                                                   const void *, void *);
 static Boolean mac_ctfont_descriptor_supports_languages (CTFontDescriptorRef,
-                                                        CFArrayRef);
+                                                         CFArrayRef);
 static CFStringRef mac_ctfont_create_preferred_family_for_attributes (CFDictionaryRef);
 static CFIndex mac_ctfont_shape (CTFontRef, CFStringRef,
-                                struct mac_glyph_layout *, CFIndex);
+                                 struct mac_glyph_layout *, CFIndex);
 static CFArrayRef
 mac_font_copy_default_descriptors_for_language (CFStringRef language);
 
 static CFStringRef
 mac_font_copy_default_name_for_charset_and_languages (CFCharacterSetRef charset,
-                                                     CFArrayRef languages);
+                                                      CFArrayRef languages);
 
 #if USE_CT_GLYPH_INFO
 static CGGlyph mac_ctfont_get_glyph_for_cid (CTFontRef,
-                                            CTCharacterCollection,
-                                            CGFontIndex);
+                                             CTCharacterCollection,
+                                             CGFontIndex);
 #endif
 
 /* The font property key specifying the font design destination.  The
@@ -129,26 +127,26 @@ static const CGAffineTransform synthetic_italic_atfm = {1, 0, 0.25, 1, 0, 0};
 static const CGFloat synthetic_bold_factor = 0.024;
 
 static Boolean cfnumber_get_font_symbolic_traits_value (CFNumberRef,
-                                                       FontSymbolicTraits *);
+                                                        FontSymbolicTraits *);
 static void macfont_store_descriptor_attributes (FontDescriptorRef,
-                                                Lisp_Object);
+                                                 Lisp_Object);
 static Lisp_Object macfont_descriptor_entity (FontDescriptorRef,
-                                             Lisp_Object,
-                                             FontSymbolicTraits);
+                                              Lisp_Object,
+                                              FontSymbolicTraits);
 static CFStringRef macfont_create_family_with_symbol (Lisp_Object);
 static int macfont_glyph_extents (struct font *, CGGlyph,
-                                 struct font_metrics *, CGFloat *, int);
+                                  struct font_metrics *, CGFloat *, int);
 static CFMutableDictionaryRef macfont_create_attributes_with_spec (Lisp_Object);
 static Boolean macfont_supports_charset_and_languages_p (FontDescriptorRef,
-                                                        CFCharacterSetRef,
-                                                        Lisp_Object,
-                                                        CFArrayRef);
-static CFIndex macfont_closest_traits_index (CFArrayRef,
-                                            FontSymbolicTraits);
+                                                         CFCharacterSetRef,
+                                                         Lisp_Object,
+                                                         CFArrayRef);
+static Boolean macfont_closest_traits_index_p (CFArrayRef, FontSymbolicTraits,
+                                               CFIndex);
 static CFDataRef mac_font_copy_uvs_table (FontRef);
 static void mac_font_get_glyphs_for_variants (CFDataRef, UTF32Char,
-                                             const UTF32Char [],
-                                             CGGlyph [], CFIndex);
+                                              const UTF32Char [],
+                                              CGGlyph [], CFIndex);
 
 /* From CFData to a lisp string.  Always returns a unibyte string.  */
 
@@ -180,15 +178,15 @@ cfstring_to_lisp_nodecode (CFStringRef string)
       CFIndex i, length = CFStringGetLength (string);
 
       for (i = 0; i < length; i++)
-       if (CFStringGetCharacterAtIndex (string, i) == 0)
-         break;
+        if (CFStringGetCharacterAtIndex (string, i) == 0)
+          break;
 
       if (i == length)
-       return make_unibyte_string (s, strlen (s));
+        return make_unibyte_string (s, strlen (s));
     }
 
   data = CFStringCreateExternalRepresentation (NULL, string,
-                                              kCFStringEncodingUTF8, '?');
+                                               kCFStringEncodingUTF8, '?');
   if (data)
     {
       result = cfdata_to_lisp (data);
@@ -206,12 +204,12 @@ static CFStringRef
 cfstring_create_with_string_noencode (Lisp_Object s)
 {
   CFStringRef string = CFStringCreateWithBytes (NULL, SDATA (s), SBYTES (s),
-                                               kCFStringEncodingUTF8, false);
+                                                kCFStringEncodingUTF8, false);
 
   if (string == NULL)
     /* Failed to interpret as UTF 8.  Fall back on Mac Roman.  */
     string = CFStringCreateWithBytes (NULL, SDATA (s), SBYTES (s),
-                                     kCFStringEncodingMacRoman, false);
+                                      kCFStringEncodingMacRoman, false);
 
   return string;
 }
@@ -226,7 +224,7 @@ mac_screen_font_get_advance_width_for_glyph (ScreenFontRef font, CGGlyph glyph)
 
 static CGGlyph
 mac_font_get_glyph_for_cid (FontRef font, CharacterCollection collection,
-                           CGFontIndex cid)
+                            CGFontIndex cid)
 {
 #if USE_CT_GLYPH_INFO
   return mac_ctfont_get_glyph_for_cid ((CTFontRef) font, collection, cid);
@@ -237,18 +235,17 @@ mac_font_get_glyph_for_cid (FontRef font, CharacterCollection collection,
     unichar characters[] = {0xfffd};
     NSString *string =
       [NSString stringWithCharacters:characters
-                             length:(sizeof (characters)
-                                     / sizeof (characters[0]))];
+                              length:ARRAYELTS (characters)];
     NSGlyphInfo *glyphInfo =
       [NSGlyphInfo glyphInfoWithCharacterIdentifier:cid
-                                        collection:collection
-                                        baseString:string];
+                                         collection:collection
+                                         baseString:string];
     NSDictionary *attributes =
       [NSDictionary dictionaryWithObjectsAndKeys:nsFont,NSFontAttributeName,
-                   glyphInfo,NSGlyphInfoAttributeName,nil];
+                    glyphInfo,NSGlyphInfoAttributeName,nil];
     NSTextStorage *textStorage =
       [[NSTextStorage alloc] initWithString:string
-                                attributes:attributes];
+                                 attributes:attributes];
     NSLayoutManager *layoutManager = [[NSLayoutManager alloc] init];
     NSTextContainer *textContainer = [[NSTextContainer alloc] init];
     NSFont *fontInTextStorage;
@@ -262,14 +259,14 @@ mac_font_get_glyph_for_cid (FontRef font, CharacterCollection collection,
     (void) [layoutManager glyphRangeForTextContainer:textContainer];
 
     fontInTextStorage = [textStorage attribute:NSFontAttributeName atIndex:0
-                               effectiveRange:NULL];
+                                effectiveRange:NULL];
     if (fontInTextStorage == nsFont
-       || [[fontInTextStorage fontName] isEqualToString:[nsFont fontName]])
+        || [[fontInTextStorage fontName] isEqualToString:[nsFont fontName]])
       {
-       NSGlyph glyph = [layoutManager glyphAtIndex:0];
+        NSGlyph glyph = [layoutManager glyphAtIndex:0];
 
-       if (glyph < [nsFont numberOfGlyphs])
-         result = glyph;
+        if (glyph < [nsFont numberOfGlyphs])
+          result = glyph;
       }
 
     [textStorage release];
@@ -293,7 +290,7 @@ mac_screen_font_create_with_name (CFStringRef name, CGFloat size)
 
 static Boolean
 mac_screen_font_get_metrics (ScreenFontRef font, CGFloat *ascent,
-                            CGFloat *descent, CGFloat *leading)
+                             CGFloat *descent, CGFloat *leading)
 {
   NSFont *nsFont = [(NSFont *)font printerFont];
   NSTextStorage *textStorage;
@@ -324,7 +321,7 @@ mac_screen_font_get_metrics (ScreenFontRef font, CGFloat *ascent,
     }
 
   usedRect = [layoutManager lineFragmentUsedRectForGlyphAtIndex:0
-                                                effectiveRange:NULL];
+                                                 effectiveRange:NULL];
   spaceLocation = [layoutManager locationForGlyphAtIndex:0];
   [textStorage release];
 
@@ -343,8 +340,8 @@ mac_screen_font_get_metrics (ScreenFontRef font, CGFloat *ascent,
 
 static CFIndex
 mac_font_shape_1 (NSFont *font, NSString *string,
-                 struct mac_glyph_layout *glyph_layouts, CFIndex glyph_len,
-                 BOOL screen_font_p)
+                  struct mac_glyph_layout *glyph_layouts, CFIndex glyph_len,
+                  BOOL screen_font_p)
 {
   NSUInteger i;
   CFIndex result = 0;
@@ -361,7 +358,7 @@ mac_font_shape_1 (NSFont *font, NSString *string,
 
   /* Append a trailing space to measure baseline position.  */
   [textStorage appendAttributedString:([[[NSAttributedString alloc]
-                                         initWithString:@" "] autorelease])];
+                                          initWithString:@" "] autorelease])];
   [textStorage setFont:font];
   [textContainer setLineFragmentPadding:0];
   [layoutManager setUsesScreenFonts:screen_font_p];
@@ -397,13 +394,13 @@ mac_font_shape_1 (NSFont *font, NSString *string,
     {
       NSRange range;
       NSFont *fontInTextStorage =
-       [textStorage attribute:NSFontAttributeName atIndex:i
-                    longestEffectiveRange:&range
-                      inRange:(NSMakeRange (0, stringLength))];
+        [textStorage attribute:NSFontAttributeName atIndex:i
+                     longestEffectiveRange:&range
+                       inRange:(NSMakeRange (0, stringLength))];
 
       if (!(fontInTextStorage == font
-           || [[fontInTextStorage fontName] isEqualToString:[font fontName]]))
-       break;
+            || [[fontInTextStorage fontName] isEqualToString:[font fontName]]))
+        break;
       i = NSMaxRange (range);
     }
   if (i < stringLength)
@@ -415,12 +412,12 @@ mac_font_shape_1 (NSFont *font, NSString *string,
       NSRange range = NSMakeRange (0, stringLength);
 
       range = [layoutManager glyphRangeForCharacterRange:range
-                                   actualCharacterRange:NULL];
+                                    actualCharacterRange:NULL];
       numberOfGlyphs = NSMaxRange (range);
       used = numberOfGlyphs;
       for (i = 0; i < numberOfGlyphs; i++)
-       if ([layoutManager notShownAttributeForGlyphAtIndex:i])
-         used--;
+        if ([layoutManager notShownAttributeForGlyphAtIndex:i])
+          used--;
     }
 
   if (0 < used && used <= glyph_len)
@@ -433,186 +430,186 @@ mac_font_shape_1 (NSFont *font, NSString *string,
 
       glyphIndex = 0;
       while ([layoutManager notShownAttributeForGlyphAtIndex:glyphIndex])
-       glyphIndex++;
+        glyphIndex++;
 
       /* For now we assume the direction is not changed within the
-        string.  */
+         string.  */
       [layoutManager getGlyphsInRange:(NSMakeRange (glyphIndex, 1))
-                              glyphs:NULL characterIndexes:NULL
-                   glyphInscriptions:NULL elasticBits:NULL
-                          bidiLevels:&bidiLevel];
+                               glyphs:NULL characterIndexes:NULL
+                    glyphInscriptions:NULL elasticBits:NULL
+                           bidiLevels:&bidiLevel];
       if (bidiLevel & 1)
-       permutation = xmalloc (sizeof (NSUInteger) * used);
+        permutation = xmalloc (sizeof (NSUInteger) * used);
       else
-       permutation = NULL;
+        permutation = NULL;
 
 #define RIGHT_TO_LEFT_P permutation
 
       /* Fill the `comp_range' member of struct mac_glyph_layout, and
-        setup a permutation for right-to-left text.  */
+         setup a permutation for right-to-left text.  */
       compRange = NSMakeRange (0, 0);
       for (range = NSMakeRange (0, 0); NSMaxRange (range) < used;
-          range.length++)
-       {
-         struct mac_glyph_layout *gl = glyph_layouts + NSMaxRange (range);
-         NSUInteger characterIndex =
-           [layoutManager characterIndexForGlyphAtIndex:glyphIndex];
-
-         gl->string_index = characterIndex;
-
-         if (characterIndex >= NSMaxRange (compRange))
-           {
-             compRange.location = NSMaxRange (compRange);
-             do
-               {
-                 NSRange characterRange =
-                   [string
-                     rangeOfComposedCharacterSequenceAtIndex:characterIndex];
-
-                 compRange.length =
-                   NSMaxRange (characterRange) - compRange.location;
-                 [layoutManager glyphRangeForCharacterRange:compRange
-                                       actualCharacterRange:&characterRange];
-                 characterIndex = NSMaxRange (characterRange) - 1;
-               }
-             while (characterIndex >= NSMaxRange (compRange));
-
-             if (RIGHT_TO_LEFT_P)
-               for (i = 0; i < range.length; i++)
-                 permutation[range.location + i] = NSMaxRange (range) - i - 1;
-
-             range = NSMakeRange (NSMaxRange (range), 0);
-           }
-
-         gl->comp_range.location = compRange.location;
-         gl->comp_range.length = compRange.length;
-
-         while (++glyphIndex < numberOfGlyphs)
-           if (![layoutManager notShownAttributeForGlyphAtIndex:glyphIndex])
-             break;
-       }
+           range.length++)
+        {
+          struct mac_glyph_layout *gl = glyph_layouts + NSMaxRange (range);
+          NSUInteger characterIndex =
+            [layoutManager characterIndexForGlyphAtIndex:glyphIndex];
+
+          gl->string_index = characterIndex;
+
+          if (characterIndex >= NSMaxRange (compRange))
+            {
+              compRange.location = NSMaxRange (compRange);
+              do
+                {
+                  NSRange characterRange =
+                    [string
+                      rangeOfComposedCharacterSequenceAtIndex:characterIndex];
+
+                  compRange.length =
+                    NSMaxRange (characterRange) - compRange.location;
+                  [layoutManager glyphRangeForCharacterRange:compRange
+                                        actualCharacterRange:&characterRange];
+                  characterIndex = NSMaxRange (characterRange) - 1;
+                }
+              while (characterIndex >= NSMaxRange (compRange));
+
+              if (RIGHT_TO_LEFT_P)
+                for (i = 0; i < range.length; i++)
+                  permutation[range.location + i] = NSMaxRange (range) - i - 1;
+
+              range = NSMakeRange (NSMaxRange (range), 0);
+            }
+
+          gl->comp_range.location = compRange.location;
+          gl->comp_range.length = compRange.length;
+
+          while (++glyphIndex < numberOfGlyphs)
+            if (![layoutManager notShownAttributeForGlyphAtIndex:glyphIndex])
+              break;
+        }
       if (RIGHT_TO_LEFT_P)
-       for (i = 0; i < range.length; i++)
-         permutation[range.location + i] = NSMaxRange (range) - i - 1;
+        for (i = 0; i < range.length; i++)
+          permutation[range.location + i] = NSMaxRange (range) - i - 1;
 
       /* Then fill the remaining members.  */
       glyphIndex = prevGlyphIndex = 0;
       while ([layoutManager notShownAttributeForGlyphAtIndex:glyphIndex])
-       glyphIndex++;
+        glyphIndex++;
 
       if (!RIGHT_TO_LEFT_P)
-       totalAdvance = 0;
+        totalAdvance = 0;
       else
-       {
-         NSUInteger nrects;
-         NSRect *glyphRects =
-           [layoutManager
-             rectArrayForGlyphRange:(NSMakeRange (0, numberOfGlyphs))
-             withinSelectedGlyphRange:(NSMakeRange (NSNotFound, 0))
-                    inTextContainer:textContainer rectCount:&nrects];
-
-         totalAdvance = NSMaxX (glyphRects[0]);
-       }
+        {
+          NSUInteger nrects;
+          NSRect *glyphRects =
+            [layoutManager
+              rectArrayForGlyphRange:(NSMakeRange (0, numberOfGlyphs))
+              withinSelectedGlyphRange:(NSMakeRange (NSNotFound, 0))
+                     inTextContainer:textContainer rectCount:&nrects];
+
+          totalAdvance = NSMaxX (glyphRects[0]);
+        }
 
       for (i = 0; i < used; i++)
-       {
-         struct mac_glyph_layout *gl;
-         NSPoint location;
-         NSUInteger nextGlyphIndex;
-         NSRange glyphRange;
-         NSRect *glyphRects;
-         NSUInteger nrects;
-
-         if (!RIGHT_TO_LEFT_P)
-           gl = glyph_layouts + i;
-         else
-           {
-             NSUInteger dest = permutation[i];
-
-             gl = glyph_layouts + dest;
-             if (i < dest)
-               {
-                 CFIndex tmp = gl->string_index;
-
-                 gl->string_index = glyph_layouts[i].string_index;
-                 glyph_layouts[i].string_index = tmp;
-               }
-           }
-         gl->glyph_id = [layoutManager glyphAtIndex:glyphIndex];
-
-         location = [layoutManager locationForGlyphAtIndex:glyphIndex];
-         gl->baseline_delta = spaceLocation.y - location.y;
-
-         for (nextGlyphIndex = glyphIndex + 1; nextGlyphIndex < numberOfGlyphs;
-              nextGlyphIndex++)
-           if (![layoutManager
-                  notShownAttributeForGlyphAtIndex:nextGlyphIndex])
-             break;
-
-         if (!RIGHT_TO_LEFT_P)
-           {
-             CGFloat maxX;
-
-             if (prevGlyphIndex == 0)
-               glyphRange = NSMakeRange (0, nextGlyphIndex);
-             else
-               glyphRange = NSMakeRange (glyphIndex,
-                                         nextGlyphIndex - glyphIndex);
-             glyphRects =
-               [layoutManager
-                 rectArrayForGlyphRange:glyphRange
-                 withinSelectedGlyphRange:(NSMakeRange (NSNotFound, 0))
-                        inTextContainer:textContainer rectCount:&nrects];
-             maxX = max (NSMaxX (glyphRects[0]), totalAdvance);
-             gl->advance_delta = location.x - totalAdvance;
-             gl->advance = maxX - totalAdvance;
-             totalAdvance = maxX;
-           }
-         else
-           {
-             CGFloat minX;
-
-             if (nextGlyphIndex == numberOfGlyphs)
-               glyphRange = NSMakeRange (prevGlyphIndex,
-                                         numberOfGlyphs - prevGlyphIndex);
-             else
-               glyphRange = NSMakeRange (prevGlyphIndex,
-                                         glyphIndex + 1 - prevGlyphIndex);
-             glyphRects =
-               [layoutManager
-                 rectArrayForGlyphRange:glyphRange
-                 withinSelectedGlyphRange:(NSMakeRange (NSNotFound, 0))
-                        inTextContainer:textContainer rectCount:&nrects];
-             minX = min (NSMinX (glyphRects[0]), totalAdvance);
-             gl->advance = totalAdvance - minX;
-             totalAdvance = minX;
-             gl->advance_delta = location.x - totalAdvance;
-           }
-
-         prevGlyphIndex = glyphIndex + 1;
-         glyphIndex = nextGlyphIndex;
-       }
+        {
+          struct mac_glyph_layout *gl;
+          NSPoint location;
+          NSUInteger nextGlyphIndex;
+          NSRange glyphRange;
+          NSRect *glyphRects;
+          NSUInteger nrects;
+
+          if (!RIGHT_TO_LEFT_P)
+            gl = glyph_layouts + i;
+          else
+            {
+              NSUInteger dest = permutation[i];
+
+              gl = glyph_layouts + dest;
+              if (i < dest)
+                {
+                  CFIndex tmp = gl->string_index;
+
+                  gl->string_index = glyph_layouts[i].string_index;
+                  glyph_layouts[i].string_index = tmp;
+                }
+            }
+          gl->glyph_id = [layoutManager glyphAtIndex:glyphIndex];
+
+          location = [layoutManager locationForGlyphAtIndex:glyphIndex];
+          gl->baseline_delta = spaceLocation.y - location.y;
+
+          for (nextGlyphIndex = glyphIndex + 1; nextGlyphIndex < numberOfGlyphs;
+               nextGlyphIndex++)
+            if (![layoutManager
+                   notShownAttributeForGlyphAtIndex:nextGlyphIndex])
+              break;
+
+          if (!RIGHT_TO_LEFT_P)
+            {
+              CGFloat maxX;
+
+              if (prevGlyphIndex == 0)
+                glyphRange = NSMakeRange (0, nextGlyphIndex);
+              else
+                glyphRange = NSMakeRange (glyphIndex,
+                                          nextGlyphIndex - glyphIndex);
+              glyphRects =
+                [layoutManager
+                  rectArrayForGlyphRange:glyphRange
+                  withinSelectedGlyphRange:(NSMakeRange (NSNotFound, 0))
+                         inTextContainer:textContainer rectCount:&nrects];
+              maxX = max (NSMaxX (glyphRects[0]), totalAdvance);
+              gl->advance_delta = location.x - totalAdvance;
+              gl->advance = maxX - totalAdvance;
+              totalAdvance = maxX;
+            }
+          else
+            {
+              CGFloat minX;
+
+              if (nextGlyphIndex == numberOfGlyphs)
+                glyphRange = NSMakeRange (prevGlyphIndex,
+                                          numberOfGlyphs - prevGlyphIndex);
+              else
+                glyphRange = NSMakeRange (prevGlyphIndex,
+                                          glyphIndex + 1 - prevGlyphIndex);
+              glyphRects =
+                [layoutManager
+                  rectArrayForGlyphRange:glyphRange
+                  withinSelectedGlyphRange:(NSMakeRange (NSNotFound, 0))
+                         inTextContainer:textContainer rectCount:&nrects];
+              minX = min (NSMinX (glyphRects[0]), totalAdvance);
+              gl->advance = totalAdvance - minX;
+              totalAdvance = minX;
+              gl->advance_delta = location.x - totalAdvance;
+            }
+
+          prevGlyphIndex = glyphIndex + 1;
+          glyphIndex = nextGlyphIndex;
+        }
 
       if (RIGHT_TO_LEFT_P)
-       xfree (permutation);
+        xfree (permutation);
 
 #undef RIGHT_TO_LEFT_P
 
       result = used;
-   }
- [textStorage release];
+    }
 [textStorage release];
 
   return result;
 }
 
 static CFIndex
 mac_screen_font_shape (ScreenFontRef font, CFStringRef string,
-                      struct mac_glyph_layout *glyph_layouts,
-                      CFIndex glyph_len)
+                       struct mac_glyph_layout *glyph_layouts,
+                       CFIndex glyph_len)
 {
   return mac_font_shape_1 ([(NSFont *)font printerFont],
-                          (NSString *) string,
-                          glyph_layouts, glyph_len, YES);
+                           (NSString *) string,
+                           glyph_layouts, glyph_len, YES);
 }
 
 static CGColorRef
@@ -650,6 +647,7 @@ get_cgcolor(unsigned long idx, struct frame *f)
     CGColorRelease (refcol_);                                           \
   } while (0)
 
+
 \f
 /* Mac font driver.  */
 
@@ -712,17 +710,17 @@ static const struct
   CFStringRef font_names[3];
 } macfont_language_default_font_names[] = {
   { CFSTR ("ja"), { CFSTR ("HiraKakuProN-W3"), /* 10.5 - 10.9 */
-                   CFSTR ("HiraKakuPro-W3"),  /* 10.4 */
-                   NULL }},
+                    CFSTR ("HiraKakuPro-W3"),  /* 10.4 */
+                    NULL }},
   { CFSTR ("ko"), { CFSTR ("AppleSDGothicNeo-Regular"), /* 10.8 - 10.9 */
-                   CFSTR ("AppleGothic"), /* 10.4 - 10.7 */
-                   NULL }},
+                    CFSTR ("AppleGothic"), /* 10.4 - 10.7 */
+                    NULL }},
   { CFSTR ("zh-Hans"), { CFSTR ("STHeitiSC-Light"), /* 10.6 - 10.9 */
-                        CFSTR ("STXihei"),         /* 10.4 - 10.5 */
-                        NULL }},
+                         CFSTR ("STXihei"),        /* 10.4 - 10.5 */
+                         NULL }},
   { CFSTR ("zh-Hant"), { CFSTR ("STHeitiTC-Light"), /* 10.6 - 10.9 */
-                        CFSTR ("LiHeiPro"),        /* 10.4 - 10.5 */
-                        NULL }},
+                         CFSTR ("LiHeiPro"),       /* 10.4 - 10.5 */
+                         NULL }},
   { NULL }
 };
 #endif
@@ -737,8 +735,8 @@ macfont_update_antialias_threshold (void)
 
   threshold =
     CFPreferencesGetAppIntegerValue (CFSTR ("AppleAntiAliasingThreshold"),
-                                    kCFPreferencesCurrentApplication,
-                                    &valid_p);
+                                     kCFPreferencesCurrentApplication,
+                                     &valid_p);
   if (valid_p)
     macfont_antialias_threshold = threshold;
 }
@@ -772,12 +770,12 @@ macfont_store_utf32char_to_unichars (UTF32Char c, UniChar *unichars)
 
 static Boolean
 cfnumber_get_font_symbolic_traits_value (CFNumberRef number,
-                                        FontSymbolicTraits *sym_traits)
+                                         FontSymbolicTraits *sym_traits)
 {
   SInt64 sint64_value;
 
   /* Getting symbolic traits with kCFNumberSInt32Type is lossy on Mac
-     OS 10.6 when the value is greater than or equal to 1 << 31.  */
+     OS 10.6 when the value is greater than or equal to 1 << 31.  */
   if (CFNumberGetValue (number, kCFNumberSInt64Type, &sint64_value))
     {
       *sym_traits = (FontSymbolicTraits) sint64_value;
@@ -790,7 +788,7 @@ cfnumber_get_font_symbolic_traits_value (CFNumberRef number,
 
 static void
 macfont_store_descriptor_attributes (FontDescriptorRef desc,
-                                    Lisp_Object spec_or_entity)
+                                     Lisp_Object spec_or_entity)
 {
   CFStringRef str;
   CFDictionaryRef dict;
@@ -798,66 +796,66 @@ macfont_store_descriptor_attributes (FontDescriptorRef desc,
   CGFloat floatval;
 
   str = mac_font_descriptor_copy_attribute (desc,
-                                           MAC_FONT_FAMILY_NAME_ATTRIBUTE);
+                                            MAC_FONT_FAMILY_NAME_ATTRIBUTE);
   if (str)
     {
       ASET (spec_or_entity, FONT_FAMILY_INDEX,
-           macfont_intern_prop_cfstring (str));
+            macfont_intern_prop_cfstring (str));
       CFRelease (str);
     }
   dict = mac_font_descriptor_copy_attribute (desc, MAC_FONT_TRAITS_ATTRIBUTE);
   if (dict)
     {
       struct {
-       enum font_property_index index;
-       CFStringRef trait;
-       CGPoint points[6];
+        enum font_property_index index;
+        CFStringRef trait;
+        CGPoint points[6];
       } numeric_traits[] =
-         {{FONT_WEIGHT_INDEX, MAC_FONT_WEIGHT_TRAIT,
-           {{-0.4, 50},        /* light */
-            {-0.24, 87.5},     /* (semi-light + normal) / 2 */
-            {0, 100},          /* normal */
-            {0.24, 140},       /* (semi-bold + normal) / 2 */
-            {0.4, 200},        /* bold */
-            {CGFLOAT_MAX, CGFLOAT_MAX}}},
-          {FONT_SLANT_INDEX, MAC_FONT_SLANT_TRAIT,
-           {{0, 100}, {0.1, 200}, {CGFLOAT_MAX, CGFLOAT_MAX}}},
-          {FONT_WIDTH_INDEX, MAC_FONT_WIDTH_TRAIT,
-           {{0, 100}, {1, 200}, {CGFLOAT_MAX, CGFLOAT_MAX}}}};
+          {{FONT_WEIGHT_INDEX, MAC_FONT_WEIGHT_TRAIT,
+            {{-0.4, 50},       /* light */
+             {-0.24, 87.5},    /* (semi-light + normal) / 2 */
+             {0, 100},         /* normal */
+             {0.24, 140},      /* (semi-bold + normal) / 2 */
+             {0.4, 200},       /* bold */
+             {CGFLOAT_MAX, CGFLOAT_MAX}}},
+           {FONT_SLANT_INDEX, MAC_FONT_SLANT_TRAIT,
+            {{0, 100}, {0.1, 200}, {CGFLOAT_MAX, CGFLOAT_MAX}}},
+           {FONT_WIDTH_INDEX, MAC_FONT_WIDTH_TRAIT,
+            {{0, 100}, {1, 200}, {CGFLOAT_MAX, CGFLOAT_MAX}}}};
       int i;
 
-      for (i = 0; i < sizeof (numeric_traits) / sizeof (numeric_traits[0]); i++)
-       {
-         num = CFDictionaryGetValue (dict, numeric_traits[i].trait);
-         if (num && CFNumberGetValue (num, kCFNumberCGFloatType, &floatval))
-           {
-             CGPoint *point = numeric_traits[i].points;
-
-             while (point->x < floatval)
-               point++;
-             if (point == numeric_traits[i].points)
-               point++;
-             else if (point->x == CGFLOAT_MAX)
-               point--;
-             floatval = (point - 1)->y + ((floatval - (point - 1)->x)
-                                          * ((point->y - (point - 1)->y)
-                                             / (point->x - (point - 1)->x)));
-             FONT_SET_STYLE (spec_or_entity, numeric_traits[i].index,
-                             make_number (lround (floatval)));
-           }
-       }
+      for (i = 0; i < ARRAYELTS (numeric_traits); i++)
+        {
+          num = CFDictionaryGetValue (dict, numeric_traits[i].trait);
+          if (num && CFNumberGetValue (num, kCFNumberCGFloatType, &floatval))
+            {
+              CGPoint *point = numeric_traits[i].points;
+
+              while (point->x < floatval)
+                point++;
+              if (point == numeric_traits[i].points)
+                point++;
+              else if (point->x == CGFLOAT_MAX)
+                point--;
+              floatval = (point - 1)->y + ((floatval - (point - 1)->x)
+                                           * ((point->y - (point - 1)->y)
+                                              / (point->x - (point - 1)->x)));
+              FONT_SET_STYLE (spec_or_entity, numeric_traits[i].index,
+                              make_number (lround (floatval)));
+            }
+        }
 
       num = CFDictionaryGetValue (dict, MAC_FONT_SYMBOLIC_TRAIT);
       if (num)
-       {
-         FontSymbolicTraits sym_traits;
-         int spacing;
+        {
+          FontSymbolicTraits sym_traits;
+          int spacing;
 
-         cfnumber_get_font_symbolic_traits_value (num, &sym_traits);
-         spacing = (sym_traits & MAC_FONT_TRAIT_MONO_SPACE
-                    ? FONT_SPACING_MONO : FONT_SPACING_PROPORTIONAL);
-         ASET (spec_or_entity, FONT_SPACING_INDEX, make_number (spacing));
-       }
+          cfnumber_get_font_symbolic_traits_value (num, &sym_traits);
+          spacing = (sym_traits & MAC_FONT_TRAIT_MONO_SPACE
+                     ? FONT_SPACING_MONO : FONT_SPACING_PROPORTIONAL);
+          ASET (spec_or_entity, FONT_SPACING_INDEX, make_number (spacing));
+        }
 
       CFRelease (dict);
     }
@@ -872,7 +870,7 @@ macfont_store_descriptor_attributes (FontDescriptorRef desc,
 
 static Lisp_Object
 macfont_descriptor_entity (FontDescriptorRef desc, Lisp_Object extra,
-                          FontSymbolicTraits synth_sym_traits)
+                           FontSymbolicTraits synth_sym_traits)
 {
   Lisp_Object entity;
   CFDictionaryRef dict;
@@ -892,7 +890,7 @@ macfont_descriptor_entity (FontDescriptorRef desc, Lisp_Object extra,
       CFNumberRef num = CFDictionaryGetValue (dict, MAC_FONT_SYMBOLIC_TRAIT);
 
       if (num)
-       cfnumber_get_font_symbolic_traits_value (num, &sym_traits);
+        cfnumber_get_font_symbolic_traits_value (num, &sym_traits);
       CFRelease (dict);
     }
   if (EQ (AREF (entity, FONT_SIZE_INDEX), make_number (0)))
@@ -900,16 +898,16 @@ macfont_descriptor_entity (FontDescriptorRef desc, Lisp_Object extra,
   ASET (entity, FONT_EXTRA_INDEX, Fcopy_sequence (extra));
   name = mac_font_descriptor_copy_attribute (desc, MAC_FONT_NAME_ATTRIBUTE);
   font_put_extra (entity, QCfont_entity,
-                 make_save_ptr_int ((void *) name, sym_traits));
+                  make_save_ptr_int ((void *) name, sym_traits));
   if (synth_sym_traits & MAC_FONT_TRAIT_ITALIC)
     FONT_SET_STYLE (entity, FONT_SLANT_INDEX,
-                   make_number (FONT_SLANT_SYNTHETIC_ITALIC));
+                    make_number (FONT_SLANT_SYNTHETIC_ITALIC));
   if (synth_sym_traits & MAC_FONT_TRAIT_BOLD)
     FONT_SET_STYLE (entity, FONT_WEIGHT_INDEX,
-                   make_number (FONT_WEIGHT_SYNTHETIC_BOLD));
+                    make_number (FONT_WEIGHT_SYNTHETIC_BOLD));
   if (synth_sym_traits & MAC_FONT_TRAIT_MONO_SPACE)
     ASET (entity, FONT_SPACING_INDEX,
-         make_number (FONT_SPACING_SYNTHETIC_MONO));
+          make_number (FONT_SPACING_SYNTHETIC_MONO));
 
   return entity;
 }
@@ -926,22 +924,9 @@ macfont_create_family_with_symbol (Lisp_Object symbol)
   if (family_name == NULL)
     return NULL;
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
-#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
-  if (CTFontManagerCompareFontFamilyNames != NULL)
-#endif
     {
       family_name_comparator = CTFontManagerCompareFontFamilyNames;
     }
-#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
-  else              /* CTFontManagerCompareFontFamilyNames == NULL */
-#endif
-#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 */
-#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
-    {
-      family_name_comparator = mac_font_family_compare;
-    }
-#endif
 
   if ((*family_name_comparator) (family_name, CFSTR ("LastResort"), NULL)
       == kCFCompareEqualTo)
@@ -949,36 +934,36 @@ macfont_create_family_with_symbol (Lisp_Object symbol)
   else
     while (1)
       {
-       CFIndex i, count;
-
-       if (families == NULL)
-         {
-           families = mac_font_create_available_families ();
-           using_cache_p = 0;
-           if (families == NULL)
-             break;
-         }
-
-       count = CFArrayGetCount (families);
-       i = CFArrayBSearchValues (families, CFRangeMake (0, count),
-                                 (const void *) family_name,
-                                 family_name_comparator, NULL);
-       if (i < count)
-         {
-           CFStringRef name = CFArrayGetValueAtIndex (families, i);
-
-           if ((*family_name_comparator) (name, family_name, NULL)
-               == kCFCompareEqualTo)
-             result = CFRetain (name);
-         }
-
-       if (result || !using_cache_p)
-         break;
-       else
-         {
-           CFRelease (families);
-           families = NULL;
-         }
+        CFIndex i, count;
+
+        if (families == NULL)
+          {
+            families = mac_font_create_available_families ();
+            using_cache_p = 0;
+            if (families == NULL)
+              break;
+          }
+
+        count = CFArrayGetCount (families);
+        i = CFArrayBSearchValues (families, CFRangeMake (0, count),
+                                  (const void *) family_name,
+                                  family_name_comparator, NULL);
+        if (i < count)
+          {
+            CFStringRef name = CFArrayGetValueAtIndex (families, i);
+
+            if ((*family_name_comparator) (name, family_name, NULL)
+                == kCFCompareEqualTo)
+              result = CFRetain (name);
+          }
+
+        if (result || !using_cache_p)
+          break;
+        else
+          {
+            CFRelease (families);
+            families = NULL;
+          }
       }
 
   CFRelease (family_name);
@@ -1005,23 +990,23 @@ struct macfont_metrics
   signed width_frac : WIDTH_FRAC_BITS, width_int : 16 - WIDTH_FRAC_BITS;
 };
 
-#define METRICS_VALUE(metrics, member) \
+#define METRICS_VALUE(metrics, member)                          \
   (((metrics)->member##_high << 8) | (metrics)->member##_low)
-#define METRICS_SET_VALUE(metrics, member, value) \
-  do {short tmp = (value); (metrics)->member##_low = tmp & 0xff; \
-      (metrics)->member##_high = tmp >> 8;} while (0)
+#define METRICS_SET_VALUE(metrics, member, value)                   \
+  do {short tmp = (value); (metrics)->member##_low = tmp & 0xff;    \
+    (metrics)->member##_high = tmp >> 8;} while (0)
 
 enum metrics_status
-  {
-    METRICS_INVALID = -1,    /* metrics entry is invalid */
-    METRICS_WIDTH_VALID = -2 /* width is valid but others are invalid */
-  };
+{
+  METRICS_INVALID = -1,    /* metrics entry is invalid */
+  METRICS_WIDTH_VALID = -2 /* width is valid but others are invalid */
+};
 
-#define METRICS_STATUS(metrics)        \
+#define METRICS_STATUS(metrics)                                         \
   (METRICS_VALUE (metrics, ascent) + METRICS_VALUE (metrics, descent))
-#define METRICS_SET_STATUS(metrics, status) \
-  do {METRICS_SET_VALUE (metrics, ascent, 0); \
-      METRICS_SET_VALUE (metrics, descent, status);} while (0)
+#define METRICS_SET_STATUS(metrics, status)                     \
+  do {METRICS_SET_VALUE (metrics, ascent, 0);                   \
+    METRICS_SET_VALUE (metrics, descent, status);} while (0)
 
 #define METRICS_NCOLS_PER_ROW  (128)
 #define LCD_FONT_SMOOTHING_LEFT_MARGIN (0.396f)
@@ -1029,8 +1014,8 @@ enum metrics_status
 
 static int
 macfont_glyph_extents (struct font *font, CGGlyph glyph,
-                      struct font_metrics *metrics, CGFloat *advance_delta,
-                      int force_integral_p)
+                       struct font_metrics *metrics, CGFloat *advance_delta,
+                       int force_integral_p)
 {
   struct macfont_info *macfont_info = (struct macfont_info *) font;
   FontRef macfont = macfont_info->macfont;
@@ -1043,11 +1028,11 @@ macfont_glyph_extents (struct font *font, CGGlyph glyph,
   if (row >= macfont_info->metrics_nrows)
     {
       macfont_info->metrics =
-       xrealloc (macfont_info->metrics,
-                 sizeof (struct macfont_metrics *) * (row + 1));
+        xrealloc (macfont_info->metrics,
+                  sizeof (struct macfont_metrics *) * (row + 1));
       memset (macfont_info->metrics + macfont_info->metrics_nrows, 0,
-             (sizeof (struct macfont_metrics *)
-              * (row + 1 - macfont_info->metrics_nrows)));
+              (sizeof (struct macfont_metrics *)
+               * (row + 1 - macfont_info->metrics_nrows)));
       macfont_info->metrics_nrows = row + 1;
     }
   if (macfont_info->metrics[row] == NULL)
@@ -1057,7 +1042,7 @@ macfont_glyph_extents (struct font *font, CGGlyph glyph,
 
       new = xmalloc (sizeof (struct macfont_metrics) * METRICS_NCOLS_PER_ROW);
       for (i = 0; i < METRICS_NCOLS_PER_ROW; i++)
-       METRICS_SET_STATUS (new + i, METRICS_INVALID);
+        METRICS_SET_STATUS (new + i, METRICS_INVALID);
       macfont_info->metrics[row] = new;
     }
   cache = macfont_info->metrics[row] + col;
@@ -1067,17 +1052,17 @@ macfont_glyph_extents (struct font *font, CGGlyph glyph,
       CGFloat fwidth;
 
       if (macfont_info->screen_font)
-       fwidth = mac_screen_font_get_advance_width_for_glyph (macfont_info->screen_font, glyph);
+        fwidth = mac_screen_font_get_advance_width_for_glyph (macfont_info->screen_font, glyph);
       else
-       fwidth = mac_font_get_advance_width_for_glyph (macfont, glyph);
+        fwidth = mac_font_get_advance_width_for_glyph (macfont, glyph);
 
       /* For synthetic mono fonts, cache->width_{int,frac} holds the
-        advance delta value.  */
+         advance delta value.  */
       if (macfont_info->spacing == MACFONT_SPACING_SYNTHETIC_MONO)
-       fwidth = (font->pixel_size - fwidth) / 2;
+        fwidth = (font->pixel_size - fwidth) / 2;
       cache->width_int = lround (fwidth);
       cache->width_frac = lround ((fwidth - cache->width_int)
-                                 * WIDTH_FRAC_SCALE);
+                                  * WIDTH_FRAC_SCALE);
       METRICS_SET_STATUS (cache, METRICS_WIDTH_VALID);
     }
   if (macfont_info->spacing == MACFONT_SPACING_SYNTHETIC_MONO)
@@ -1088,52 +1073,52 @@ macfont_glyph_extents (struct font *font, CGGlyph glyph,
   if (metrics)
     {
       if (METRICS_STATUS (cache) == METRICS_WIDTH_VALID)
-       {
-         CGRect bounds = mac_font_get_bounding_rect_for_glyph (macfont, glyph);
-
-         if (macfont_info->synthetic_italic_p)
-           {
-             /* We assume the members a, b, c, and d in
-                synthetic_italic_atfm are non-negative.  */
-             bounds.origin =
-               CGPointApplyAffineTransform (bounds.origin,
-                                            synthetic_italic_atfm);
-             bounds.size =
-               CGSizeApplyAffineTransform (bounds.size, synthetic_italic_atfm);
-           }
-         if (macfont_info->synthetic_bold_p)
-           {
-             CGFloat d =
-               - synthetic_bold_factor * mac_font_get_size (macfont) / 2;
-
-             bounds = CGRectInset (bounds, d, d);
-           }
-         switch (macfont_info->spacing)
-           {
-           case MACFONT_SPACING_PROPORTIONAL:
-             bounds.origin.x += - (cache->width_frac
-                                   / (CGFloat) (WIDTH_FRAC_SCALE * 2));
-             break;
-           case MACFONT_SPACING_MONO:
-             break;
-           case MACFONT_SPACING_SYNTHETIC_MONO:
-             bounds.origin.x += (cache->width_int
-                                 + (cache->width_frac
-                                    / (CGFloat) WIDTH_FRAC_SCALE));
-             break;
-           }
-         if (bounds.size.width > 0)
-           {
-             bounds.origin.x -= LCD_FONT_SMOOTHING_LEFT_MARGIN;
-             bounds.size.width += (LCD_FONT_SMOOTHING_LEFT_MARGIN
-                                   + LCD_FONT_SMOOTHING_RIGHT_MARGIN);
-           }
-         bounds = CGRectIntegral (bounds);
-         METRICS_SET_VALUE (cache, lbearing, CGRectGetMinX (bounds));
-         METRICS_SET_VALUE (cache, rbearing, CGRectGetMaxX (bounds));
-         METRICS_SET_VALUE (cache, ascent, CGRectGetMaxY (bounds));
-         METRICS_SET_VALUE (cache, descent, -CGRectGetMinY (bounds));
-       }
+        {
+          CGRect bounds = mac_font_get_bounding_rect_for_glyph (macfont, glyph);
+
+          if (macfont_info->synthetic_italic_p)
+            {
+              /* We assume the members a, b, c, and d in
+                 synthetic_italic_atfm are non-negative.  */
+              bounds.origin =
+                CGPointApplyAffineTransform (bounds.origin,
+                                             synthetic_italic_atfm);
+              bounds.size =
+                CGSizeApplyAffineTransform (bounds.size, synthetic_italic_atfm);
+            }
+          if (macfont_info->synthetic_bold_p)
+            {
+              CGFloat d =
+                - synthetic_bold_factor * mac_font_get_size (macfont) / 2;
+
+                bounds = CGRectInset (bounds, d, d);
+            }
+          switch (macfont_info->spacing)
+            {
+            case MACFONT_SPACING_PROPORTIONAL:
+              bounds.origin.x += - (cache->width_frac
+                                    / (CGFloat) (WIDTH_FRAC_SCALE * 2));
+              break;
+            case MACFONT_SPACING_MONO:
+              break;
+            case MACFONT_SPACING_SYNTHETIC_MONO:
+              bounds.origin.x += (cache->width_int
+                                  + (cache->width_frac
+                                     / (CGFloat) WIDTH_FRAC_SCALE));
+              break;
+            }
+          if (bounds.size.width > 0)
+            {
+              bounds.origin.x -= LCD_FONT_SMOOTHING_LEFT_MARGIN;
+              bounds.size.width += (LCD_FONT_SMOOTHING_LEFT_MARGIN
+                                    + LCD_FONT_SMOOTHING_RIGHT_MARGIN);
+            }
+          bounds = CGRectIntegral (bounds);
+          METRICS_SET_VALUE (cache, lbearing, CGRectGetMinX (bounds));
+          METRICS_SET_VALUE (cache, rbearing, CGRectGetMaxX (bounds));
+          METRICS_SET_VALUE (cache, ascent, CGRectGetMaxY (bounds));
+          METRICS_SET_VALUE (cache, descent, -CGRectGetMinY (bounds));
+        }
       metrics->lbearing = METRICS_VALUE (cache, lbearing);
       metrics->rbearing = METRICS_VALUE (cache, rbearing);
       metrics->width = width;
@@ -1144,22 +1129,22 @@ macfont_glyph_extents (struct font *font, CGGlyph glyph,
   if (advance_delta)
     {
       switch (macfont_info->spacing)
-       {
-       case MACFONT_SPACING_PROPORTIONAL:
-         *advance_delta = (force_integral_p ? 0
-                           : - (cache->width_frac
-                                / (CGFloat) (WIDTH_FRAC_SCALE * 2)));
-         break;
-       case MACFONT_SPACING_MONO:
-         *advance_delta = 0;
-         break;
-       case MACFONT_SPACING_SYNTHETIC_MONO:
-         *advance_delta = (force_integral_p ? cache->width_int
-                           : (cache->width_int
-                              + (cache->width_frac
-                                 / (CGFloat) WIDTH_FRAC_SCALE)));
-         break;
-       }
+        {
+        case MACFONT_SPACING_PROPORTIONAL:
+          *advance_delta = (force_integral_p ? 0
+                            : - (cache->width_frac
+                                 / (CGFloat) (WIDTH_FRAC_SCALE * 2)));
+          break;
+        case MACFONT_SPACING_MONO:
+          *advance_delta = 0;
+          break;
+        case MACFONT_SPACING_SYNTHETIC_MONO:
+          *advance_delta = (force_integral_p ? cache->width_int
+                            : (cache->width_int
+                               + (cache->width_frac
+                                  / (CGFloat) WIDTH_FRAC_SCALE)));
+          break;
+        }
     }
 
   return width;
@@ -1221,7 +1206,7 @@ static CFCharacterSetRef macfont_get_cf_charset (struct font *);
 static CFCharacterSetRef macfont_get_cf_charset_for_name (CFStringRef);
 static CGGlyph macfont_get_glyph_for_character (struct font *, UTF32Char);
 static CGGlyph macfont_get_glyph_for_cid (struct font *font,
-                                         CharacterCollection, CGFontIndex);
+                                          CharacterCollection, CGFontIndex);
 static CFDataRef macfont_get_uvs_table (struct font *, CharacterCollection *);
 
 static struct macfont_cache *
@@ -1232,40 +1217,39 @@ macfont_lookup_cache (CFStringRef key)
   if (macfont_cache_dictionary == NULL)
     {
       macfont_cache_dictionary =
-       CFDictionaryCreateMutable (NULL, 0,
-                                  &kCFTypeDictionaryKeyCallBacks, NULL);
+        CFDictionaryCreateMutable (NULL, 0,
+                                   &kCFTypeDictionaryKeyCallBacks, NULL);
       cache = NULL;
     }
   else
     cache = ((struct macfont_cache *)
-            CFDictionaryGetValue (macfont_cache_dictionary, key));
+             CFDictionaryGetValue (macfont_cache_dictionary, key));
 
   if (cache == NULL)
     {
       FontRef macfont = mac_font_create_with_name (key, 0);
 
       if (macfont)
-       {
-         cache = xzalloc (sizeof (struct macfont_cache));
-         /* Treat the LastResort font as if it contained glyphs for
-            all characters.  This may look too rough, but neither
-            CTFontCopyCharacterSet nor -[NSFont coveredCharacterSet]
-            for this font is correct for non-BMP characters on Mac OS
-            X 10.5, anyway.  */
-         if (CFStringCompare (key, CFSTR ("LastResort"), 0)
-             == kCFCompareEqualTo)
-           {
-             CFRange range = CFRangeMake (0, MAX_UNICODE_CHAR + 1);
-
-             cache->cf_charset =
-               CFCharacterSetCreateWithCharactersInRange (NULL, range);
-           }
-         if (cache->cf_charset == NULL)
-           cache->cf_charset = mac_font_copy_character_set (macfont);
-         CFDictionaryAddValue (macfont_cache_dictionary, key,
-                               (const void *) cache);
-         CFRelease (macfont);
-       }
+        {
+          cache = xzalloc (sizeof (struct macfont_cache));
+          /* Treat the LastResort font as if it contained glyphs for
+             all characters.  This may look too rough, but neither
+             CTFontCopyCharacterSet nor -[NSFont coveredCharacterSet]
+             for this font is correct for non-BMP characters on Mac OS
+             X 10.5, anyway.  */
+          if (CFEqual (key, CFSTR ("LastResort")))
+            {
+              CFRange range = CFRangeMake (0, MAX_UNICODE_CHAR + 1);
+
+              cache->cf_charset =
+                CFCharacterSetCreateWithCharactersInRange (NULL, range);
+            }
+          if (cache->cf_charset == NULL)
+            cache->cf_charset = mac_font_copy_character_set (macfont);
+          CFDictionaryAddValue (macfont_cache_dictionary, key,
+                                (const void *) cache);
+          CFRelease (macfont);
+        }
     }
 
   return cache;
@@ -1287,13 +1271,13 @@ macfont_release_cache (struct macfont_cache *cache)
       int i;
 
       for (i = 0; i < cache->glyph.nrows; i++)
-       xfree (cache->glyph.matrix[i]);
+        xfree (cache->glyph.matrix[i]);
       xfree (cache->glyph.matrix);
       if (cache->glyph.dictionary)
-       CFRelease (cache->glyph.dictionary);
+        CFRelease (cache->glyph.dictionary);
       memset (&cache->glyph, 0, sizeof (cache->glyph));
       if (cache->uvs.table)
-       CFRelease (cache->uvs.table);
+        CFRelease (cache->uvs.table);
       memset (&cache->uvs, 0, sizeof (cache->uvs));
     }
 }
@@ -1327,124 +1311,114 @@ macfont_get_glyph_for_character (struct font *font, UTF32Char c)
       int nkeys_or_perm = cache->glyph.row_nkeys_or_perm[row];
 
       if (nkeys_or_perm < ROW_PERM_OFFSET)
-       {
-         UniChar unichars[256], ch;
-         CGGlyph *glyphs;
-         int i, len;
-         int nrows;
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
-         dispatch_queue_t queue;
-         dispatch_group_t group = NULL;
-#else
-         int nkeys;
-#endif
-
-         if (row != 0)
-           {
-             CFMutableDictionaryRef dictionary;
-             uintptr_t key, value;
-             int nshifts;
-             CGGlyph glyph;
-
-             if (cache->glyph.dictionary == NULL)
-               cache->glyph.dictionary =
-                 CFDictionaryCreateMutable (NULL, 0, NULL, NULL);
-             dictionary = cache->glyph.dictionary;
-             key = c / NGLYPHS_IN_VALUE;
-             nshifts = ((c % NGLYPHS_IN_VALUE) * sizeof (CGGlyph) * 8);
-             value = ((uintptr_t)
-                      CFDictionaryGetValue (dictionary, (const void *) key));
-             glyph = (value >> nshifts);
-             if (glyph)
-               return glyph;
-
-             if (nkeys_or_perm + 1 != ROW_PERM_OFFSET)
-               {
-                 ch = c;
-                 if (!mac_font_get_glyphs_for_characters (macfont, &ch,
-                                                          &glyph, 1)
-                     || glyph == 0)
-                   glyph = kCGFontIndexInvalid;
-
-                 if (value == 0)
-                   cache->glyph.row_nkeys_or_perm[row] = nkeys_or_perm + 1;
-                 value |= ((uintptr_t) glyph << nshifts);
-                 CFDictionarySetValue (dictionary, (const void *) key,
-                                       (const void *) value);
-
-                 return glyph;
-               }
-
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
-             queue =
-               dispatch_get_global_queue (DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
-             group = dispatch_group_create ();
-             dispatch_group_async (group, queue, ^{
-                 int nkeys;
-                 uintptr_t key;
-#endif
-                 nkeys = nkeys_or_perm;
-                 for (key = row * (256 / NGLYPHS_IN_VALUE); ; key++)
-                   if (CFDictionaryContainsKey (dictionary,
-                                                (const void *) key))
-                     {
-                       CFDictionaryRemoveValue (dictionary,
-                                                (const void *) key);
-                       if (--nkeys == 0)
-                         break;
-                     }
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
-               });
-#endif
-           }
-
-         len = 0;
-         for (i = 0; i < 256; i++)
-           {
-             ch = row * 256 + i;
-             if (CFCharacterSetIsLongCharacterMember (cache->cf_charset, ch))
-               unichars[len++] = ch;
-           }
-
-         glyphs = xmalloc (sizeof (CGGlyph) * 256);
-         if (len > 0)
-           {
-             mac_font_get_glyphs_for_characters (macfont, unichars,
-                                                 glyphs, len);
-             while (i > len)
-               {
-                 int next = unichars[len - 1] % 256;
-
-                 while (--i > next)
-                   glyphs[i] = kCGFontIndexInvalid;
-
-                 len--;
-                 glyphs[i] = glyphs[len];
-                 if (len == 0)
-                   break;
-               }
-           }
-         if (i > len)
-           while (i-- > 0)
-             glyphs[i] = kCGFontIndexInvalid;
-
-         nrows = cache->glyph.nrows;
-         nkeys_or_perm = nrows + ROW_PERM_OFFSET;
-         cache->glyph.row_nkeys_or_perm[row] = nkeys_or_perm;
-         nrows++;
-         cache->glyph.matrix = xrealloc (cache->glyph.matrix,
-                                         sizeof (CGGlyph *) * nrows);
-         cache->glyph.matrix[nrows - 1] = glyphs;
-         cache->glyph.nrows = nrows;
-
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
-         if (group)
-           {
-             dispatch_group_wait (group, DISPATCH_TIME_FOREVER);
-             dispatch_release (group);
-           }
-#endif
-       }
+        {
+          UniChar unichars[256], ch;
+          CGGlyph *glyphs;
+          int i, len;
+          int nrows;
+          dispatch_queue_t queue;
+          dispatch_group_t group = NULL;
+
+          if (row != 0)
+            {
+              CFMutableDictionaryRef dictionary;
+              uintptr_t key, value;
+              int nshifts;
+              CGGlyph glyph;
+
+              if (cache->glyph.dictionary == NULL)
+                cache->glyph.dictionary =
+                  CFDictionaryCreateMutable (NULL, 0, NULL, NULL);
+              dictionary = cache->glyph.dictionary;
+              key = c / NGLYPHS_IN_VALUE;
+              nshifts = ((c % NGLYPHS_IN_VALUE) * sizeof (CGGlyph) * 8);
+              value = ((uintptr_t)
+                       CFDictionaryGetValue (dictionary, (const void *) key));
+              glyph = (value >> nshifts);
+              if (glyph)
+                return glyph;
+
+              if (nkeys_or_perm + 1 != ROW_PERM_OFFSET)
+                {
+                  ch = c;
+                  if (!mac_font_get_glyphs_for_characters (macfont, &ch,
+                                                           &glyph, 1)
+                      || glyph == 0)
+                    glyph = kCGFontIndexInvalid;
+
+                  if (value == 0)
+                    cache->glyph.row_nkeys_or_perm[row] = nkeys_or_perm + 1;
+                  value |= ((uintptr_t) glyph << nshifts);
+                  CFDictionarySetValue (dictionary, (const void *) key,
+                                        (const void *) value);
+
+                  return glyph;
+                }
+
+              queue =
+                dispatch_get_global_queue (DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
+              group = dispatch_group_create ();
+              dispatch_group_async (group, queue, ^{
+                  int nkeys;
+                  uintptr_t key;
+                  nkeys = nkeys_or_perm;
+                  for (key = row * (256 / NGLYPHS_IN_VALUE); ; key++)
+                    if (CFDictionaryContainsKey (dictionary,
+                                                 (const void *) key))
+                      {
+                        CFDictionaryRemoveValue (dictionary,
+                                                 (const void *) key);
+                        if (--nkeys == 0)
+                          break;
+                      }
+                });
+            }
+
+          len = 0;
+          for (i = 0; i < 256; i++)
+            {
+              ch = row * 256 + i;
+              if (CFCharacterSetIsLongCharacterMember (cache->cf_charset, ch))
+                unichars[len++] = ch;
+            }
+
+          glyphs = xmalloc (sizeof (CGGlyph) * 256);
+          if (len > 0)
+            {
+              mac_font_get_glyphs_for_characters (macfont, unichars,
+                                                  glyphs, len);
+              while (i > len)
+                {
+                  int next = unichars[len - 1] % 256;
+
+                  while (--i > next)
+                    glyphs[i] = kCGFontIndexInvalid;
+
+                  len--;
+                  glyphs[i] = glyphs[len];
+                  if (len == 0)
+                    break;
+                }
+            }
+          if (i > len)
+            while (i-- > 0)
+              glyphs[i] = kCGFontIndexInvalid;
+
+          nrows = cache->glyph.nrows;
+          nkeys_or_perm = nrows + ROW_PERM_OFFSET;
+          cache->glyph.row_nkeys_or_perm[row] = nkeys_or_perm;
+          nrows++;
+          cache->glyph.matrix = xrealloc (cache->glyph.matrix,
+                                          sizeof (CGGlyph *) * nrows);
+          cache->glyph.matrix[nrows - 1] = glyphs;
+          cache->glyph.nrows = nrows;
+
+          if (group)
+            {
+              dispatch_group_wait (group, DISPATCH_TIME_FOREVER);
+              dispatch_release (group);
+            }
+        }
 
       return cache->glyph.matrix[nkeys_or_perm - ROW_PERM_OFFSET][c % 256];
     }
@@ -1455,29 +1429,29 @@ macfont_get_glyph_for_character (struct font *font, UTF32Char c)
       CGGlyph glyph;
 
       if (cache->glyph.dictionary == NULL)
-       cache->glyph.dictionary =
-         CFDictionaryCreateMutable (NULL, 0, NULL, NULL);
+        cache->glyph.dictionary =
+          CFDictionaryCreateMutable (NULL, 0, NULL, NULL);
       key = c / NGLYPHS_IN_VALUE;
       nshifts = ((c % NGLYPHS_IN_VALUE) * sizeof (CGGlyph) * 8);
       value = (uintptr_t) CFDictionaryGetValue (cache->glyph.dictionary,
-                                               (const void *) key);
+                                                (const void *) key);
       glyph = (value >> nshifts);
       if (glyph == 0)
-       {
-         UniChar unichars[2];
-         CGGlyph glyphs[2];
-         CFIndex count = macfont_store_utf32char_to_unichars (c, unichars);
-
-         if (mac_font_get_glyphs_for_characters (macfont, unichars, glyphs,
-                                                 count))
-           glyph = glyphs[0];
-         if (glyph == 0)
-           glyph = kCGFontIndexInvalid;
-
-         value |= ((uintptr_t) glyph << nshifts);
-         CFDictionarySetValue (cache->glyph.dictionary,
-                               (const void *) key, (const void *) value);
-       }
+        {
+          UniChar unichars[2];
+          CGGlyph glyphs[2];
+          CFIndex count = macfont_store_utf32char_to_unichars (c, unichars);
+
+          if (mac_font_get_glyphs_for_characters (macfont, unichars, glyphs,
+                                                  count))
+            glyph = glyphs[0];
+          if (glyph == 0)
+            glyph = kCGFontIndexInvalid;
+
+          value |= ((uintptr_t) glyph << nshifts);
+          CFDictionarySetValue (cache->glyph.dictionary,
+                                (const void *) key, (const void *) value);
+        }
 
       return glyph;
     }
@@ -1485,7 +1459,7 @@ macfont_get_glyph_for_character (struct font *font, UTF32Char c)
 
 static CGGlyph
 macfont_get_glyph_for_cid (struct font *font, CharacterCollection collection,
-                          CGFontIndex cid)
+                           CGFontIndex cid)
 {
   struct macfont_info *macfont_info = (struct macfont_info *) font;
   FontRef macfont = macfont_info->macfont;
@@ -1506,34 +1480,34 @@ macfont_get_uvs_table (struct font *font, CharacterCollection *collection)
     {
       CFDataRef uvs_table = mac_font_copy_uvs_table (macfont);
       CharacterCollection uvs_collection =
-       MAC_CHARACTER_COLLECTION_IDENTITY_MAPPING;
+        MAC_CHARACTER_COLLECTION_IDENTITY_MAPPING;
 
       if (uvs_table == NULL
-         && mac_font_get_glyph_for_cid (macfont,
-                                        MAC_CHARACTER_COLLECTION_ADOBE_JAPAN1,
-                                        6480) != kCGFontIndexInvalid)
-       {
-         /* If the glyph for U+4E55 is accessible via its CID 6480,
-            then we use the Adobe-Japan1 UVS table, which maps a
-            variation sequence to a CID, as a fallback.  */
-         static CFDataRef mac_uvs_table_adobe_japan1 = NULL;
-
-         if (mac_uvs_table_adobe_japan1 == NULL)
-           mac_uvs_table_adobe_japan1 =
-             CFDataCreateWithBytesNoCopy (NULL,
-                                          mac_uvs_table_adobe_japan1_bytes,
-                                          sizeof (mac_uvs_table_adobe_japan1_bytes),
-                                          kCFAllocatorNull);
-         if (mac_uvs_table_adobe_japan1)
-           {
-             uvs_table = CFRetain (mac_uvs_table_adobe_japan1);
-             uvs_collection = MAC_CHARACTER_COLLECTION_ADOBE_JAPAN1;
-           }
-       }
+          && mac_font_get_glyph_for_cid (macfont,
+                                         MAC_CHARACTER_COLLECTION_ADOBE_JAPAN1,
+                                         6480) != kCGFontIndexInvalid)
+        {
+          /* If the glyph for U+4E55 is accessible via its CID 6480,
+             then we use the Adobe-Japan1 UVS table, which maps a
+             variation sequence to a CID, as a fallback.  */
+          static CFDataRef mac_uvs_table_adobe_japan1 = NULL;
+
+          if (mac_uvs_table_adobe_japan1 == NULL)
+            mac_uvs_table_adobe_japan1 =
+              CFDataCreateWithBytesNoCopy (NULL,
+                                           mac_uvs_table_adobe_japan1_bytes,
+                                           sizeof (mac_uvs_table_adobe_japan1_bytes),
+                                           kCFAllocatorNull);
+          if (mac_uvs_table_adobe_japan1)
+            {
+              uvs_table = CFRetain (mac_uvs_table_adobe_japan1);
+              uvs_collection = MAC_CHARACTER_COLLECTION_ADOBE_JAPAN1;
+            }
+        }
       if (uvs_table == NULL)
-       cache->uvs.table = kCFNull;
+        cache->uvs.table = kCFNull;
       else
-       cache->uvs.table = uvs_table;
+        cache->uvs.table = uvs_table;
       cache->uvs.collection = uvs_collection;
     }
 
@@ -1555,12 +1529,12 @@ static Lisp_Object macfont_open (struct frame *, Lisp_Object, int);
 static void macfont_close (struct font *);
 static int macfont_has_char (Lisp_Object, int);
 static unsigned macfont_encode_char (struct font *, int);
-static int macfont_text_extents (struct font *, unsigned int *, int,
-                                struct font_metrics *);
+static void macfont_text_extents (struct font *, unsigned int *, int,
+                                  struct font_metrics *);
 static int macfont_draw (struct glyph_string *, int, int, int, int, bool);
 static Lisp_Object macfont_shape (Lisp_Object);
 static int macfont_variation_glyphs (struct font *, int c,
-                                    unsigned variations[256]);
+                                     unsigned variations[256]);
 static void macfont_filter_properties (Lisp_Object, Lisp_Object);
 
 static struct font_driver macfont_driver =
@@ -1582,8 +1556,6 @@ static struct font_driver macfont_driver =
     macfont_draw,
     NULL,                      /* get_bitmap */
     NULL,                      /* free_bitmap */
-    NULL,                      /* get_outline */
-    NULL,                      /* free_outline */
     NULL,                      /* anchor_point */
     NULL,                      /* otf_capability */
     NULL,                      /* otf_drive */
@@ -1614,19 +1586,19 @@ macfont_get_charset (Lisp_Object registry)
   for (i = j = 0; i < SBYTES (SYMBOL_NAME (registry)); i++, j++)
     {
       if (str[i] == '.')
-       re[j++] = '\\';
+        re[j++] = '\\';
       else if (str[i] == '*')
-       re[j++] = '.';
+        re[j++] = '.';
       re[j] = str[i];
       if (re[j] == '?')
-       re[j] = '.';
+        re[j] = '.';
     }
   re[j] = '\0';
   regexp = make_unibyte_string (re, j);
   for (i = 0; cf_charset_table[i].name; i++)
     if (fast_c_string_match_ignore_case
-       (regexp, cf_charset_table[i].name,
-        strlen (cf_charset_table[i].name)) >= 0)
+        (regexp, cf_charset_table[i].name,
+         strlen (cf_charset_table[i].name)) >= 0)
       break;
   if (! cf_charset_table[i].name)
     return -1;
@@ -1639,27 +1611,27 @@ macfont_get_charset (Lisp_Object registry)
       CFMutableCharacterSetRef charset = CFCharacterSetCreateMutable (NULL);
 
       if (! charset)
-       return -1;
+        return -1;
       for (j = 0; uniquifier[j]; j++)
-       {
-         count += macfont_store_utf32char_to_unichars (uniquifier[j],
-                                                       unichars + count);
-         CFCharacterSetAddCharactersInRange (charset,
-                                             CFRangeMake (uniquifier[j], 1));
-       }
+        {
+          count += macfont_store_utf32char_to_unichars (uniquifier[j],
+                                                        unichars + count);
+          CFCharacterSetAddCharactersInRange (charset,
+                                              CFRangeMake (uniquifier[j], 1));
+        }
 
       string = CFStringCreateWithCharacters (NULL, unichars, count);
       if (! string)
-       {
-         CFRelease (charset);
-         return -1;
-       }
+        {
+          CFRelease (charset);
+          return -1;
+        }
       cf_charset_table[i].cf_charset = CFCharacterSetCreateCopy (NULL,
-                                                                charset);
+                                                                 charset);
       CFRelease (charset);
       /* CFCharacterSetCreateWithCharactersInString does not handle
-        surrogate pairs properly as of Mac OS X 10.5.  */
-     cf_charset_table[i].cf_charset_string = string;
+         surrogate pairs properly as of Mac OS X 10.5.  */
+      cf_charset_table[i].cf_charset_string = string;
     }
   return i;
 }
@@ -1672,19 +1644,19 @@ struct OpenTypeSpec
   unsigned int *features[2];
 };
 
-#define OTF_SYM_TAG(SYM, TAG)                                  \
-  do {                                                         \
-    unsigned char *p = SDATA (SYMBOL_NAME (SYM));              \
+#define OTF_SYM_TAG(SYM, TAG)                               \
+  do {                                                      \
+    unsigned char *p = SDATA (SYMBOL_NAME (SYM));           \
     TAG = (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3];    \
   } while (0)
 
-#define OTF_TAG_STR(TAG, P)                    \
-  do {                                         \
-    (P)[0] = (char) (TAG >> 24);               \
-    (P)[1] = (char) ((TAG >> 16) & 0xFF);      \
-    (P)[2] = (char) ((TAG >> 8) & 0xFF);       \
-    (P)[3] = (char) (TAG & 0xFF);              \
-    (P)[4] = '\0';                             \
+#define OTF_TAG_STR(TAG, P)                     \
+  do {                                          \
+    (P)[0] = (char) (TAG >> 24);                \
+    (P)[1] = (char) ((TAG >> 16) & 0xFF);       \
+    (P)[2] = (char) ((TAG >> 8) & 0xFF);        \
+    (P)[3] = (char) (TAG & 0xFF);               \
+    (P)[4] = '\0';                              \
   } while (0)
 
 static struct OpenTypeSpec *
@@ -1703,9 +1675,9 @@ macfont_get_open_type_spec (Lisp_Object otf_spec)
       OTF_SYM_TAG (spec->script, spec->script_tag);
       val = assq_no_quit (spec->script, Votf_script_alist);
       if (CONSP (val) && SYMBOLP (XCDR (val)))
-       spec->script = XCDR (val);
+        spec->script = XCDR (val);
       else
-       spec->script = Qnil;
+        spec->script = Qnil;
     }
   else
     spec->script_tag = 0x44464C54;     /* "DFLT" */
@@ -1715,7 +1687,7 @@ macfont_get_open_type_spec (Lisp_Object otf_spec)
     {
       val = XCAR (otf_spec);
       if (! NILP (val))
-       OTF_SYM_TAG (val, spec->langsys_tag);
+        OTF_SYM_TAG (val, spec->langsys_tag);
       otf_spec = XCDR (otf_spec);
     }
   spec->nfeatures[0] = spec->nfeatures[1] = 0;
@@ -1725,31 +1697,31 @@ macfont_get_open_type_spec (Lisp_Object otf_spec)
 
       val = XCAR (otf_spec);
       if (NILP (val))
-       continue;
+        continue;
       len = Flength (val);
       spec->features[i] =
-       (min (PTRDIFF_MAX, SIZE_MAX) / sizeof (int) < XINT (len)
-        ? 0
-        : malloc (XINT (len) * sizeof *spec->features[i]));
+        (min (PTRDIFF_MAX, SIZE_MAX) / sizeof (int) < XINT (len)
+         ? 0
+         : malloc (XINT (len) * sizeof *spec->features[i]));
       if (! spec->features[i])
-       {
-         if (i > 0 && spec->features[0])
-           free (spec->features[0]);
-         free (spec);
-         return NULL;
-       }
+        {
+          if (i > 0 && spec->features[0])
+            free (spec->features[0]);
+          free (spec);
+          return NULL;
+        }
       for (j = 0, negative = 0; CONSP (val); val = XCDR (val))
-       {
-         if (NILP (XCAR (val)))
-           negative = 1;
-         else
-           {
-             unsigned int tag;
-
-             OTF_SYM_TAG (XCAR (val), tag);
-             spec->features[i][j++] = negative ? tag & 0x80000000 : tag;
-           }
-       }
+        {
+          if (NILP (XCAR (val)))
+            negative = 1;
+          else
+            {
+              unsigned int tag;
+
+              OTF_SYM_TAG (XCAR (val), tag);
+              spec->features[i][j++] = negative ? tag & 0x80000000 : tag;
+            }
+        }
       spec->nfeatures[i] = j;
     }
   return spec;
@@ -1773,16 +1745,16 @@ macfont_create_attributes_with_spec (Lisp_Object spec)
     CGPoint points[6];
   } numeric_traits[] =
       {{FONT_WEIGHT_INDEX, MAC_FONT_WEIGHT_TRAIT,
-       {{-0.4, 50},            /* light */
-        {-0.24, 87.5},         /* (semi-light + normal) / 2 */
-        {0, 100},              /* normal */
-        {0.24, 140},           /* (semi-bold + normal) / 2 */
-        {0.4, 200},            /* bold */
-        {CGFLOAT_MAX, CGFLOAT_MAX}}},
+        {{-0.4, 50},           /* light */
+         {-0.24, 87.5},                /* (semi-light + normal) / 2 */
+         {0, 100},             /* normal */
+         {0.24, 140},          /* (semi-bold + normal) / 2 */
+         {0.4, 200},           /* bold */
+         {CGFLOAT_MAX, CGFLOAT_MAX}}},
        {FONT_SLANT_INDEX, MAC_FONT_SLANT_TRAIT,
-       {{0, 100}, {0.1, 200}, {CGFLOAT_MAX, CGFLOAT_MAX}}},
+        {{0, 100}, {0.1, 200}, {CGFLOAT_MAX, CGFLOAT_MAX}}},
        {FONT_WIDTH_INDEX, MAC_FONT_WIDTH_TRAIT,
-       {{0, 100}, {1, 200}, {CGFLOAT_MAX, CGFLOAT_MAX}}}};
+        {{0, 100}, {1, 200}, {CGFLOAT_MAX, CGFLOAT_MAX}}}};
 
   registry = AREF (spec, FONT_REGISTRY_INDEX);
   if (NILP (registry)
@@ -1796,17 +1768,17 @@ macfont_create_attributes_with_spec (Lisp_Object spec)
 
       cf_charset_idx = macfont_get_charset (registry);
       if (cf_charset_idx < 0)
-       goto err;
+        goto err;
       charset = cf_charset_table[cf_charset_idx].cf_charset;
       charset_string = cf_charset_table[cf_charset_idx].cf_charset_string;
       lang = cf_charset_table[cf_charset_idx].lang;
       if (lang)
-       {
-         langarray = CFArrayCreateMutable (NULL, 0, &kCFTypeArrayCallBacks);
-         if (! langarray)
-           goto err;
-         CFArrayAppendValue (langarray, lang);
-       }
+        {
+          langarray = CFArrayCreateMutable (NULL, 0, &kCFTypeArrayCallBacks);
+          if (! langarray)
+            goto err;
+          CFArrayAppendValue (langarray, lang);
+        }
     }
 
   for (extra = AREF (spec, FONT_EXTRA_INDEX);
@@ -1817,35 +1789,35 @@ macfont_create_attributes_with_spec (Lisp_Object spec)
       tmp = XCAR (extra);
       key = XCAR (tmp), val = XCDR (tmp);
       if (EQ (key, QClang))
-       {
-         if (! langarray)
-           langarray = CFArrayCreateMutable (NULL, 0, &kCFTypeArrayCallBacks);
-         if (! langarray)
-           goto err;
-         if (SYMBOLP (val))
-           val = list1 (val);
-         for (; CONSP (val); val = XCDR (val))
-           if (SYMBOLP (XCAR (val)))
-             {
-               CFStringRef lang =
-                 cfstring_create_with_string_noencode (SYMBOL_NAME
-                                                       (XCAR (val)));
-
-               if (lang == NULL)
-                 goto err;
-               CFArrayAppendValue (langarray, lang);
-               CFRelease (lang);
-             }
-       }
+        {
+          if (! langarray)
+            langarray = CFArrayCreateMutable (NULL, 0, &kCFTypeArrayCallBacks);
+          if (! langarray)
+            goto err;
+          if (SYMBOLP (val))
+            val = list1 (val);
+          for (; CONSP (val); val = XCDR (val))
+            if (SYMBOLP (XCAR (val)))
+              {
+                CFStringRef lang =
+                  cfstring_create_with_string_noencode (SYMBOL_NAME
+                                                        (XCAR (val)));
+
+                if (lang == NULL)
+                  goto err;
+                CFArrayAppendValue (langarray, lang);
+                CFRelease (lang);
+              }
+        }
       else if (EQ (key, QCotf))
-       {
-         otspec = macfont_get_open_type_spec (val);
-         if (! otspec)
-           goto err;
-         script = otspec->script;
-       }
+        {
+          otspec = macfont_get_open_type_spec (val);
+          if (! otspec)
+            goto err;
+          script = otspec->script;
+        }
       else if (EQ (key, QCscript))
-       script = val;
+        script = val;
     }
 
   if (! NILP (script) && ! charset)
@@ -1853,40 +1825,40 @@ macfont_create_attributes_with_spec (Lisp_Object spec)
       Lisp_Object chars = assq_no_quit (script, Vscript_representative_chars);
 
       if (CONSP (chars) && CONSP (CDR (chars)))
-       {
-         CFMutableStringRef string = CFStringCreateMutable (NULL, 0);
-         CFMutableCharacterSetRef cs = CFCharacterSetCreateMutable (NULL);
-
-         if (! string || !cs)
-           {
-             if (string)
-               CFRelease (string);
-             else if (cs)
-               CFRelease (cs);
-             goto err;
-           }
-         for (chars = XCDR (chars); CONSP (chars); chars = XCDR (chars))
-           if (CHARACTERP (XCAR (chars)))
-             {
-               UniChar unichars[2];
-               CFIndex count =
-                 macfont_store_utf32char_to_unichars (XFASTINT (XCAR (chars)),
-                                                      unichars);
-               CFRange range = CFRangeMake (XFASTINT (XCAR (chars)), 1);
-
-               CFStringAppendCharacters (string, unichars, count);
-               CFCharacterSetAddCharactersInRange (cs, range);
-             }
-         charset = cs;
-         /* CFCharacterSetCreateWithCharactersInString does not
-            handle surrogate pairs properly as of Mac OS X 10.5.  */
-         charset_string = string;
-       }
+        {
+          CFMutableStringRef string = CFStringCreateMutable (NULL, 0);
+          CFMutableCharacterSetRef cs = CFCharacterSetCreateMutable (NULL);
+
+          if (! string || !cs)
+            {
+              if (string)
+                CFRelease (string);
+              else if (cs)
+                CFRelease (cs);
+              goto err;
+            }
+          for (chars = XCDR (chars); CONSP (chars); chars = XCDR (chars))
+            if (CHARACTERP (XCAR (chars)))
+              {
+                UniChar unichars[2];
+                CFIndex count =
+                  macfont_store_utf32char_to_unichars (XFASTINT (XCAR (chars)),
+                                                       unichars);
+                CFRange range = CFRangeMake (XFASTINT (XCAR (chars)), 1);
+
+                CFStringAppendCharacters (string, unichars, count);
+                CFCharacterSetAddCharactersInRange (cs, range);
+              }
+          charset = cs;
+          /* CFCharacterSetCreateWithCharactersInString does not
+             handle surrogate pairs properly as of Mac OS X 10.5.  */
+          charset_string = string;
+        }
     }
 
   attributes = CFDictionaryCreateMutable (NULL, 0,
-                                         &kCFTypeDictionaryKeyCallBacks,
-                                         &kCFTypeDictionaryValueCallBacks);
+                                          &kCFTypeDictionaryKeyCallBacks,
+                                          &kCFTypeDictionaryValueCallBacks);
   if (! attributes)
     goto err;
 
@@ -1896,56 +1868,56 @@ macfont_create_attributes_with_spec (Lisp_Object spec)
       CFStringRef family = macfont_create_family_with_symbol (tmp);
 
       if (! family)
-       goto err;
+        goto err;
       CFDictionaryAddValue (attributes, MAC_FONT_FAMILY_NAME_ATTRIBUTE,
-                           family);
+                            family);
       CFRelease (family);
     }
 
   traits = CFDictionaryCreateMutable (NULL, 4,
-                                     &kCFTypeDictionaryKeyCallBacks,
-                                     &kCFTypeDictionaryValueCallBacks);
+                                      &kCFTypeDictionaryKeyCallBacks,
+                                      &kCFTypeDictionaryValueCallBacks);
   if (! traits)
     goto err;
 
-  for (i = 0; i < sizeof (numeric_traits) / sizeof (numeric_traits[0]); i++)
+  for (i = 0; i < ARRAYELTS (numeric_traits); i++)
     {
       tmp = AREF (spec, numeric_traits[i].index);
       if (INTEGERP (tmp))
-       {
-         CGPoint *point = numeric_traits[i].points;
-         CGFloat floatval = (XINT (tmp) >> 8); // XXX
-         CFNumberRef num;
-
-         while (point->y < floatval)
-           point++;
-         if (point == numeric_traits[i].points)
-           point++;
-         else if (point->y == CGFLOAT_MAX)
-           point--;
-         floatval = (point - 1)->x + ((floatval - (point - 1)->y)
-                                      * ((point->x - (point - 1)->x)
-                                         / (point->y - (point - 1)->y)));
-         if (floatval > 1.0)
-           floatval = 1.0;
-         else if (floatval < -1.0)
-           floatval = -1.0;
-         num = CFNumberCreate (NULL, kCFNumberCGFloatType, &floatval);
-         if (! num)
-           goto err;
-         CFDictionaryAddValue (traits, numeric_traits[i].trait, num);
-         CFRelease (num);
-       }
+        {
+          CGPoint *point = numeric_traits[i].points;
+          CGFloat floatval = (XINT (tmp) >> 8); // XXX
+          CFNumberRef num;
+
+          while (point->y < floatval)
+            point++;
+          if (point == numeric_traits[i].points)
+            point++;
+          else if (point->y == CGFLOAT_MAX)
+            point--;
+          floatval = (point - 1)->x + ((floatval - (point - 1)->y)
+                                       * ((point->x - (point - 1)->x)
+                                          / (point->y - (point - 1)->y)));
+          if (floatval > 1.0)
+            floatval = 1.0;
+          else if (floatval < -1.0)
+            floatval = -1.0;
+          num = CFNumberCreate (NULL, kCFNumberCGFloatType, &floatval);
+          if (! num)
+            goto err;
+          CFDictionaryAddValue (traits, numeric_traits[i].trait, num);
+          CFRelease (num);
+        }
     }
   if (CFDictionaryGetCount (traits))
     CFDictionaryAddValue (attributes, MAC_FONT_TRAITS_ATTRIBUTE, traits);
 
   if (charset)
     CFDictionaryAddValue (attributes, MAC_FONT_CHARACTER_SET_ATTRIBUTE,
-                         charset);
+                          charset);
   if (charset_string)
     CFDictionaryAddValue (attributes, MAC_FONT_CHARACTER_SET_STRING_ATTRIBUTE,
-                         charset_string);
+                          charset_string);
   if (langarray)
     CFDictionaryAddValue (attributes, MAC_FONT_LANGUAGES_ATTRIBUTE, langarray);
 
@@ -1966,9 +1938,9 @@ macfont_create_attributes_with_spec (Lisp_Object spec)
   if (otspec)
     {
       if (otspec->nfeatures[0] > 0)
-       free (otspec->features[0]);
+        free (otspec->features[0]);
       if (otspec->nfeatures[1] > 0)
-       free (otspec->features[1]);
+        free (otspec->features[1]);
       free (otspec);
     }
 
@@ -1977,38 +1949,38 @@ macfont_create_attributes_with_spec (Lisp_Object spec)
 
 static Boolean
 macfont_supports_charset_and_languages_p (FontDescriptorRef desc,
-                                         CFCharacterSetRef charset,
-                                         Lisp_Object chars,
-                                         CFArrayRef languages)
+                                          CFCharacterSetRef charset,
+                                          Lisp_Object chars,
+                                          CFArrayRef languages)
 {
   Boolean result = true;
 
   if (charset || VECTORP (chars))
     {
       CFCharacterSetRef desc_charset =
-       mac_font_descriptor_copy_attribute (desc,
-                                           MAC_FONT_CHARACTER_SET_ATTRIBUTE);
+        mac_font_descriptor_copy_attribute (desc,
+                                            MAC_FONT_CHARACTER_SET_ATTRIBUTE);
 
       if (desc_charset == NULL)
-       result = false;
+        result = false;
       else
-       {
-         if (charset)
-           result = CFCharacterSetIsSupersetOfSet (desc_charset, charset);
-         else                  /* VECTORP (chars) */
-           {
-             ptrdiff_t j;
-
-             for (j = 0; j < ASIZE (chars); j++)
-               if (TYPE_RANGED_INTEGERP (UTF32Char, AREF (chars, j))
-                   && CFCharacterSetIsLongCharacterMember (desc_charset,
-                                                           XFASTINT (AREF (chars, j))))
-                 break;
-             if (j == ASIZE (chars))
-               result = false;
-           }
-         CFRelease (desc_charset);
-       }
+        {
+          if (charset)
+            result = CFCharacterSetIsSupersetOfSet (desc_charset, charset);
+          else                         /* VECTORP (chars) */
+            {
+              ptrdiff_t j;
+
+              for (j = 0; j < ASIZE (chars); j++)
+                if (TYPE_RANGED_INTEGERP (UTF32Char, AREF (chars, j))
+                    && CFCharacterSetIsLongCharacterMember (desc_charset,
+                                                            XFASTINT (AREF (chars, j))))
+                  break;
+              if (j == ASIZE (chars))
+                result = false;
+            }
+          CFRelease (desc_charset);
+        }
     }
   if (result && languages)
     result = mac_font_descriptor_supports_languages (desc, languages);
@@ -2016,38 +1988,49 @@ macfont_supports_charset_and_languages_p (FontDescriptorRef desc,
   return result;
 }
 
-static CFIndex
-macfont_closest_traits_index (CFArrayRef traits_array,
-                             FontSymbolicTraits target)
+static int
+macfont_traits_distance (FontSymbolicTraits sym_traits1,
+                         FontSymbolicTraits sym_traits2)
+{
+  FontSymbolicTraits diff = (sym_traits1 ^ sym_traits2);
+  int distance = 0;
+
+  /* We prefer synthetic bold of italic to synthetic italic of bold
+     when both bold and italic are available but bold-italic is not
+     available.  */
+  if (diff & MAC_FONT_TRAIT_BOLD)
+    distance |= (1 << 0);
+  if (diff & MAC_FONT_TRAIT_ITALIC)
+    distance |= (1 << 1);
+  if (diff & MAC_FONT_TRAIT_MONO_SPACE)
+    distance |= (1 << 2);
+
+  return distance;
+}
+
+static Boolean
+macfont_closest_traits_index_p (CFArrayRef traits_array,
+                                FontSymbolicTraits target,
+                                CFIndex index)
 {
-  CFIndex i, result = -1, count = CFArrayGetCount (traits_array);
-  int min_distance = (1 << 3);
+  CFIndex i, count = CFArrayGetCount (traits_array);
+  FontSymbolicTraits traits;
+  int my_distance;
+
+  traits = ((FontSymbolicTraits) (uintptr_t)
+            CFArrayGetValueAtIndex (traits_array, index));
+  my_distance = macfont_traits_distance (target, traits);
 
   for (i = 0; i < count; i++)
-    {
-      FontSymbolicTraits traits, diff;
-      int distance = 0;
-
-      traits = ((FontSymbolicTraits) (uintptr_t)
-               CFArrayGetValueAtIndex (traits_array, i));
-      diff = (target ^ traits);
-      /* We prefer synthetic bold of italic to synthetic italic of
-        bold when both bold and italic are available but bold-italic
-        is not available.  */
-      if (diff & MAC_FONT_TRAIT_BOLD)
-       distance |= (1 << 0);
-      if (diff & MAC_FONT_TRAIT_ITALIC)
-       distance |= (1 << 1);
-      if (diff & MAC_FONT_TRAIT_MONO_SPACE)
-       distance |= (1 << 2);
-      if (distance < min_distance)
-       {
-         min_distance = distance;
-         result = i;
-       }
-    }
+    if (i != index)
+      {
+        traits = ((FontSymbolicTraits) (uintptr_t)
+                  CFArrayGetValueAtIndex (traits_array, i));
+        if (macfont_traits_distance (target, traits) < my_distance)
+          return false;
+      }
 
-  return result;
+  return true;
 }
 
 static Lisp_Object
@@ -2072,7 +2055,7 @@ macfont_list (struct frame *f, Lisp_Object spec)
     {
       family_name = macfont_create_family_with_symbol (family);
       if (family_name == NULL)
-       goto finish;
+        goto finish;
     }
 
   attributes = macfont_create_attributes_with_spec (spec);
@@ -2085,14 +2068,14 @@ macfont_list (struct frame *f, Lisp_Object spec)
     spacing = XINT (AREF (spec, FONT_SPACING_INDEX));
 
   traits = ((CFMutableDictionaryRef)
-           CFDictionaryGetValue (attributes, MAC_FONT_TRAITS_ATTRIBUTE));
+            CFDictionaryGetValue (attributes, MAC_FONT_TRAITS_ATTRIBUTE));
 
   n = FONT_SLANT_NUMERIC (spec);
   if (n < 0 || n == FONT_SLANT_SYNTHETIC_ITALIC)
     {
       synth_sym_traits |= MAC_FONT_TRAIT_ITALIC;
       if (traits)
-       CFDictionaryRemoveValue (traits, MAC_FONT_SLANT_TRAIT);
+        CFDictionaryRemoveValue (traits, MAC_FONT_SLANT_TRAIT);
     }
 
   n = FONT_WEIGHT_NUMERIC (spec);
@@ -2100,7 +2083,7 @@ macfont_list (struct frame *f, Lisp_Object spec)
     {
       synth_sym_traits |= MAC_FONT_TRAIT_BOLD;
       if (traits)
-       CFDictionaryRemoveValue (traits, MAC_FONT_WEIGHT_TRAIT);
+        CFDictionaryRemoveValue (traits, MAC_FONT_WEIGHT_TRAIT);
     }
 
   if (languages
@@ -2109,15 +2092,15 @@ macfont_list (struct frame *f, Lisp_Object spec)
       CFStringRef language = CFArrayGetValueAtIndex (languages, 0);
 
       if (CFStringHasPrefix (language, CFSTR ("ja"))
-         || CFStringHasPrefix (language, CFSTR ("ko"))
-         || CFStringHasPrefix (language, CFSTR ("zh")))
-       synth_sym_traits |= MAC_FONT_TRAIT_MONO_SPACE;
+          || CFStringHasPrefix (language, CFSTR ("ko"))
+          || CFStringHasPrefix (language, CFSTR ("zh")))
+        synth_sym_traits |= MAC_FONT_TRAIT_MONO_SPACE;
     }
 
   /* Create array of families.  */
   if (family_name)
     families = CFArrayCreate (NULL, (const void **) &family_name,
-                             1, &kCFTypeArrayCallBacks);
+                              1, &kCFTypeArrayCallBacks);
   else
     {
       CFStringRef pref_family;
@@ -2125,46 +2108,46 @@ macfont_list (struct frame *f, Lisp_Object spec)
 
       families = mac_font_create_available_families ();
       if (families == NULL)
-       goto err;
+        goto err;
 
       families_count = CFArrayGetCount (families);
 
       /* Move preferred family to the front if exists.  */
       pref_family =
-       mac_font_create_preferred_family_for_attributes (attributes);
+        mac_font_create_preferred_family_for_attributes (attributes);
       if (pref_family)
-       {
-         pref_family_index =
-           CFArrayGetFirstIndexOfValue (families,
-                                        CFRangeMake (0, families_count),
-                                        pref_family);
-         CFRelease (pref_family);
-       }
+        {
+          pref_family_index =
+            CFArrayGetFirstIndexOfValue (families,
+                                         CFRangeMake (0, families_count),
+                                         pref_family);
+          CFRelease (pref_family);
+        }
       if (pref_family_index > 0)
-       {
-         CFMutableArrayRef mutable_families =
-           CFArrayCreateMutable (NULL, families_count, &kCFTypeArrayCallBacks);
-
-         if (mutable_families)
-           {
-             CFArrayAppendValue (mutable_families,
-                                 CFArrayGetValueAtIndex (families,
-                                                         pref_family_index));
-             CFArrayAppendArray (mutable_families, families,
-                                 CFRangeMake (0, pref_family_index));
-             if (pref_family_index + 1 < families_count)
-               CFArrayAppendArray (mutable_families, families,
-                                   CFRangeMake (pref_family_index + 1,
-                                                families_count
-                                                - (pref_family_index + 1)));
-             CFRelease (families);
-             families = mutable_families;
-           }
-       }
+        {
+          CFMutableArrayRef mutable_families =
+            CFArrayCreateMutable (NULL, families_count, &kCFTypeArrayCallBacks);
+
+          if (mutable_families)
+            {
+              CFArrayAppendValue (mutable_families,
+                                  CFArrayGetValueAtIndex (families,
+                                                          pref_family_index));
+              CFArrayAppendArray (mutable_families, families,
+                                  CFRangeMake (0, pref_family_index));
+              if (pref_family_index + 1 < families_count)
+                CFArrayAppendArray (mutable_families, families,
+                                    CFRangeMake (pref_family_index + 1,
+                                                 families_count
+                                                 - (pref_family_index + 1)));
+              CFRelease (families);
+              families = mutable_families;
+            }
+        }
     }
 
   charset = CFDictionaryGetValue (attributes,
-                                 MAC_FONT_CHARACTER_SET_ATTRIBUTE);
+                                  MAC_FONT_CHARACTER_SET_ATTRIBUTE);
   if (charset)
     {
       CFRetain (charset);
@@ -2174,11 +2157,11 @@ macfont_list (struct frame *f, Lisp_Object spec)
     {
       val = assq_no_quit (QCscript, AREF (spec, FONT_EXTRA_INDEX));
       if (! NILP (val))
-       {
-         val = assq_no_quit (XCDR (val), Vscript_representative_chars);
-         if (CONSP (val) && VECTORP (XCDR (val)))
-           chars = XCDR (val);
-       }
+        {
+          val = assq_no_quit (XCDR (val), Vscript_representative_chars);
+          if (CONSP (val) && VECTORP (XCDR (val)))
+            chars = XCDR (val);
+        }
       val = Qnil;
     }
 
@@ -2202,152 +2185,152 @@ macfont_list (struct frame *f, Lisp_Object spec)
       int j;
 
       CFDictionarySetValue (attributes, MAC_FONT_FAMILY_NAME_ATTRIBUTE,
-                           family_name);
+                            family_name);
       pat_desc = mac_font_descriptor_create_with_attributes (attributes);
       if (! pat_desc)
-       goto err;
+        goto err;
 
       /* CTFontDescriptorCreateMatchingFontDescriptors on Mac OS X
-        10.7 returns NULL if pat_desc represents the LastResort font.
-        So we use CTFontDescriptorCreateMatchingFontDescriptor (no
-        trailing "s") for such a font.  */
-      if (CFStringCompare (family_name, CFSTR ("LastResort"), 0)
-         != kCFCompareEqualTo)
-       descs = mac_font_descriptor_create_matching_font_descriptors (pat_desc,
-                                                                     NULL);
+         10.7 returns NULL if pat_desc represents the LastResort font.
+         So we use CTFontDescriptorCreateMatchingFontDescriptor (no
+         trailing "s") for such a font.  */
+      if (!CFEqual (family_name, CFSTR ("LastResort")))
+        descs = mac_font_descriptor_create_matching_font_descriptors (pat_desc,
+                                                                      NULL);
       else
-       {
-         FontDescriptorRef lr_desc =
-           mac_font_descriptor_create_matching_font_descriptor (pat_desc,
-                                                                NULL);
-         if (lr_desc)
-           {
-             descs = CFArrayCreate (NULL, (const void **) &lr_desc, 1,
-                                    &kCFTypeArrayCallBacks);
-             CFRelease (lr_desc);
-           }
-         else
-           descs = NULL;
-       }
+        {
+          FontDescriptorRef lr_desc =
+            mac_font_descriptor_create_matching_font_descriptor (pat_desc,
+                                                                 NULL);
+          if (lr_desc)
+            {
+              descs = CFArrayCreate (NULL, (const void **) &lr_desc, 1,
+                                     &kCFTypeArrayCallBacks);
+              CFRelease (lr_desc);
+            }
+          else
+            descs = NULL;
+        }
       CFRelease (pat_desc);
       if (! descs)
-       goto err;
+        goto err;
 
       descs_count = CFArrayGetCount (descs);
       if (descs_count == 0
-         || !macfont_supports_charset_and_languages_p (CFArrayGetValueAtIndex (descs, 0),
-                                                       charset, chars,
-                                                       languages))
-       {
-         CFRelease (descs);
-         continue;
-       }
+          || !macfont_supports_charset_and_languages_p (CFArrayGetValueAtIndex (descs, 0),
+                                                        charset, chars,
+                                                        languages))
+        {
+          CFRelease (descs);
+          continue;
+        }
 
       filtered_descs =
-       CFArrayCreateMutable (NULL, descs_count, &kCFTypeArrayCallBacks);
+        CFArrayCreateMutable (NULL, descs_count, &kCFTypeArrayCallBacks);
       traits_array = CFArrayCreateMutable (NULL, descs_count, NULL);
       for (j = 0; j < descs_count; j++)
-       {
-         FontDescriptorRef desc = CFArrayGetValueAtIndex (descs, j);
-         CFDictionaryRef dict;
-         CFNumberRef num;
-         FontSymbolicTraits sym_traits;
-
-         dict = mac_font_descriptor_copy_attribute (desc,
-                                                    MAC_FONT_TRAITS_ATTRIBUTE);
-         if (dict == NULL)
-           continue;
-
-         num = CFDictionaryGetValue (dict, MAC_FONT_SYMBOLIC_TRAIT);
-         CFRelease (dict);
-         if (num == NULL
-             || !cfnumber_get_font_symbolic_traits_value (num, &sym_traits))
-           continue;
-
-         if (spacing >= 0
-             && !(synth_sym_traits & MAC_FONT_TRAIT_MONO_SPACE)
-             && (((sym_traits & MAC_FONT_TRAIT_MONO_SPACE) != 0)
-                 != (spacing >= FONT_SPACING_MONO)))
-           continue;
-
-         /* Don't use a color bitmap font unless its family is
-            explicitly specified.  */
-         if ((sym_traits & MAC_FONT_TRAIT_COLOR_GLYPHS) && NILP (family))
-           continue;
-
-         if (j > 0
-             && !macfont_supports_charset_and_languages_p (desc, charset,
-                                                           chars, languages))
-           continue;
-
-         CFArrayAppendValue (filtered_descs, desc);
-         CFArrayAppendValue (traits_array,
-                             (const void *) (uintptr_t) sym_traits);
-       }
+        {
+          FontDescriptorRef desc = CFArrayGetValueAtIndex (descs, j);
+          CFDictionaryRef dict;
+          CFNumberRef num;
+          FontSymbolicTraits sym_traits;
+
+          dict = mac_font_descriptor_copy_attribute (desc,
+                                                     MAC_FONT_TRAITS_ATTRIBUTE);
+          if (dict == NULL)
+            continue;
+
+          num = CFDictionaryGetValue (dict, MAC_FONT_SYMBOLIC_TRAIT);
+          CFRelease (dict);
+          if (num == NULL
+              || !cfnumber_get_font_symbolic_traits_value (num, &sym_traits))
+            continue;
+
+          if (spacing >= 0
+              && !(synth_sym_traits & MAC_FONT_TRAIT_MONO_SPACE)
+              && (((sym_traits & MAC_FONT_TRAIT_MONO_SPACE) != 0)
+                  != (spacing >= FONT_SPACING_MONO)))
+            continue;
+
+          /* Don't use a color bitmap font unless its family is
+             explicitly specified.  */
+          if ((sym_traits & MAC_FONT_TRAIT_COLOR_GLYPHS) && NILP (family))
+            continue;
+
+          if (j > 0
+              && !macfont_supports_charset_and_languages_p (desc, charset,
+                                                            chars, languages))
+            continue;
+
+          CFArrayAppendValue (filtered_descs, desc);
+          CFArrayAppendValue (traits_array,
+                              (const void *) (uintptr_t) sym_traits);
+        }
 
       CFRelease (descs);
       descs = filtered_descs;
       descs_count = CFArrayGetCount (descs);
 
       for (j = 0; j < descs_count; j++)
-       {
-         FontDescriptorRef desc = CFArrayGetValueAtIndex (descs, j);
-         FontSymbolicTraits sym_traits =
-           ((FontSymbolicTraits) (uintptr_t)
-            CFArrayGetValueAtIndex (traits_array, j));
-         FontSymbolicTraits mask_min, mask_max, imask, bmask, mmask;
-
-         mask_min = ((synth_sym_traits ^ sym_traits)
-                     & (MAC_FONT_TRAIT_ITALIC | MAC_FONT_TRAIT_BOLD));
-         if (FONT_SLANT_NUMERIC (spec) < 0)
-           mask_min &= ~MAC_FONT_TRAIT_ITALIC;
-         if (FONT_WEIGHT_NUMERIC (spec) < 0)
-           mask_min &= ~MAC_FONT_TRAIT_BOLD;
-
-         mask_max = (synth_sym_traits & ~sym_traits);
-         /* Synthetic bold does not work for bitmap-only fonts on Mac
-            OS X 10.6.  */
-         if ((mask_min ^ mask_max) & MAC_FONT_TRAIT_BOLD)
-           {
-             CFNumberRef format =
-               mac_font_descriptor_copy_attribute (desc,
-                                                   MAC_FONT_FORMAT_ATTRIBUTE);
-
-             if (format)
-               {
-                 uint32_t format_val;
-
-                 if (CFNumberGetValue (format, kCFNumberSInt32Type,
-                                       &format_val)
-                     && format_val == MAC_FONT_FORMAT_BITMAP)
-                   mask_max &= ~MAC_FONT_TRAIT_BOLD;
-               }
-           }
-         if (spacing >= 0)
-           mask_min |= (mask_max & MAC_FONT_TRAIT_MONO_SPACE);
-
-         for (mmask = (mask_min & MAC_FONT_TRAIT_MONO_SPACE);
-              mmask <= (mask_max & MAC_FONT_TRAIT_MONO_SPACE);
-              mmask += MAC_FONT_TRAIT_MONO_SPACE)
-           for (bmask = (mask_min & MAC_FONT_TRAIT_BOLD);
-                bmask <= (mask_max & MAC_FONT_TRAIT_BOLD);
-                bmask += MAC_FONT_TRAIT_BOLD)
-             for (imask = (mask_min & MAC_FONT_TRAIT_ITALIC);
-                  imask <= (mask_max & MAC_FONT_TRAIT_ITALIC);
-                  imask += MAC_FONT_TRAIT_ITALIC)
-               {
-                 FontSymbolicTraits synth = (imask | bmask | mmask);
-
-                 if (synth == 0
-                     || j == macfont_closest_traits_index (traits_array,
-                                                           (sym_traits | synth)))
-                   {
-                     entity = macfont_descriptor_entity (desc, extra, synth);
-                     if (! NILP (entity))
-                       val = Fcons (entity, val);
-                   }
-               }
-       }
+        {
+          FontDescriptorRef desc = CFArrayGetValueAtIndex (descs, j);
+          FontSymbolicTraits sym_traits =
+            ((FontSymbolicTraits) (uintptr_t)
+             CFArrayGetValueAtIndex (traits_array, j));
+          FontSymbolicTraits mask_min, mask_max, imask, bmask, mmask;
+
+          mask_min = ((synth_sym_traits ^ sym_traits)
+                      & (MAC_FONT_TRAIT_ITALIC | MAC_FONT_TRAIT_BOLD));
+          if (FONT_SLANT_NUMERIC (spec) < 0)
+            mask_min &= ~MAC_FONT_TRAIT_ITALIC;
+          if (FONT_WEIGHT_NUMERIC (spec) < 0)
+            mask_min &= ~MAC_FONT_TRAIT_BOLD;
+
+          mask_max = (synth_sym_traits & ~sym_traits);
+          /* Synthetic bold does not work for bitmap-only fonts on Mac
+             OS X 10.6.  */
+          if ((mask_min ^ mask_max) & MAC_FONT_TRAIT_BOLD)
+            {
+              CFNumberRef format =
+                mac_font_descriptor_copy_attribute (desc,
+                                                    MAC_FONT_FORMAT_ATTRIBUTE);
+
+              if (format)
+                {
+                  uint32_t format_val;
+
+                  if (CFNumberGetValue (format, kCFNumberSInt32Type,
+                                        &format_val)
+                      && format_val == MAC_FONT_FORMAT_BITMAP)
+                    mask_max &= ~MAC_FONT_TRAIT_BOLD;
+                }
+            }
+          if (spacing >= 0)
+            mask_min |= (mask_max & MAC_FONT_TRAIT_MONO_SPACE);
+
+          for (mmask = (mask_min & MAC_FONT_TRAIT_MONO_SPACE);
+               mmask <= (mask_max & MAC_FONT_TRAIT_MONO_SPACE);
+               mmask += MAC_FONT_TRAIT_MONO_SPACE)
+            for (bmask = (mask_min & MAC_FONT_TRAIT_BOLD);
+                 bmask <= (mask_max & MAC_FONT_TRAIT_BOLD);
+                 bmask += MAC_FONT_TRAIT_BOLD)
+              for (imask = (mask_min & MAC_FONT_TRAIT_ITALIC);
+                   imask <= (mask_max & MAC_FONT_TRAIT_ITALIC);
+                   imask += MAC_FONT_TRAIT_ITALIC)
+                {
+                  FontSymbolicTraits synth = (imask | bmask | mmask);
+
+                  if (synth == 0
+                      || macfont_closest_traits_index_p (traits_array,
+                                                         (sym_traits | synth),
+                                                         j))
+                    {
+                      entity = macfont_descriptor_entity (desc, extra, synth);
+                      if (! NILP (entity))
+                        val = Fcons (entity, val);
+                    }
+                }
+        }
 
       CFRelease (traits_array);
       CFRelease (descs);
@@ -2389,13 +2372,13 @@ macfont_match (struct frame * frame, Lisp_Object spec)
   if (pat_desc)
     {
       desc = mac_font_descriptor_create_matching_font_descriptor (pat_desc,
-                                                                 NULL);
+                                                                  NULL);
       CFRelease (pat_desc);
     }
   if (desc)
     {
       entity = macfont_descriptor_entity (desc, AREF (spec, FONT_EXTRA_INDEX),
-                                         0);
+                                          0);
       CFRelease (desc);
     }
   unblock_input ();
@@ -2418,7 +2401,7 @@ macfont_list_family (struct frame *frame)
       CFIndex i, count = CFArrayGetCount (families);
 
       for (i = 0; i < count; i++)
-       list = Fcons (macfont_intern_prop_cfstring (CFArrayGetValueAtIndex (families, i)), list);
+        list = Fcons (macfont_intern_prop_cfstring (CFArrayGetValueAtIndex (families, i)), list);
       CFRelease (families);
     }
 
@@ -2431,7 +2414,7 @@ static void
 macfont_free_entity (Lisp_Object entity)
 {
   Lisp_Object val = assq_no_quit (QCfont_entity,
-                                 AREF (entity, FONT_EXTRA_INDEX));
+                                  AREF (entity, FONT_EXTRA_INDEX));
   CFStringRef name = XSAVE_POINTER (XCDR (val), 0);
 
   block_input ();
@@ -2477,17 +2460,8 @@ macfont_open (struct frame * f, Lisp_Object entity, int pixel_size)
   if (! macfont)
     return Qnil;
 
-  font_object = font_make_object (VECSIZE (struct macfont_info), entity, size);
-  ASET (font_object, FONT_TYPE_INDEX, macfont_driver.type);
-  len = font_unparse_xlfd (entity, size, name, 256);
-  if (len > 0)
-    ASET (font_object, FONT_NAME_INDEX, make_string (name, len));
-  len = font_unparse_fcname (entity, size, name, 256);
-  if (len > 0)
-    ASET (font_object, FONT_FULLNAME_INDEX, make_string (name, len));
-  else
-    ASET (font_object, FONT_FULLNAME_INDEX,
-         AREF (font_object, FONT_NAME_INDEX));
+  font_object = font_build_object (VECSIZE (struct macfont_info),
+                                   Qmac_ct, entity, size);
   font = XFONT_OBJECT (font_object);
   font->pixel_size = size;
   font->driver = &macfont_driver;
@@ -2502,7 +2476,7 @@ macfont_open (struct frame * f, Lisp_Object entity, int pixel_size)
   val = assq_no_quit (QCdestination, AREF (entity, FONT_EXTRA_INDEX));
   if (CONSP (val) && EQ (XCDR (val), make_number (1)))
     macfont_info->screen_font = mac_screen_font_create_with_name (font_name,
-                                                                 size);
+                                                                  size);
   else
     macfont_info->screen_font = NULL;
   macfont_info->cache = macfont_lookup_cache (font_name);
@@ -2522,8 +2496,8 @@ macfont_open (struct frame * f, Lisp_Object entity, int pixel_size)
   if (sym_traits & MAC_FONT_TRAIT_MONO_SPACE)
     macfont_info->spacing = MACFONT_SPACING_MONO;
   else if (INTEGERP (AREF (entity, FONT_SPACING_INDEX))
-          && (XINT (AREF (entity, FONT_SPACING_INDEX))
-              == FONT_SPACING_SYNTHETIC_MONO))
+           && (XINT (AREF (entity, FONT_SPACING_INDEX))
+               == FONT_SPACING_SYNTHETIC_MONO))
     macfont_info->spacing = MACFONT_SPACING_SYNTHETIC_MONO;
   if (macfont_info->synthetic_italic_p || macfont_info->synthetic_bold_p)
     macfont_info->antialias = MACFONT_ANTIALIAS_ON;
@@ -2531,8 +2505,8 @@ macfont_open (struct frame * f, Lisp_Object entity, int pixel_size)
     {
       val = assq_no_quit (QCantialias, AREF (entity, FONT_EXTRA_INDEX));
       if (CONSP (val))
-       macfont_info->antialias =
-         NILP (XCDR (val)) ? MACFONT_ANTIALIAS_OFF : MACFONT_ANTIALIAS_ON;
+        macfont_info->antialias =
+          NILP (XCDR (val)) ? MACFONT_ANTIALIAS_OFF : MACFONT_ANTIALIAS_ON;
     }
   macfont_info->color_bitmap_p = 0;
   if (sym_traits & MAC_FONT_TRAIT_COLOR_GLYPHS)
@@ -2550,7 +2524,7 @@ macfont_open (struct frame * f, Lisp_Object entity, int pixel_size)
     {
       glyph = macfont_get_glyph_for_character (font, ' ' + i);
       if (glyph == kCGFontIndexInvalid)
-       break;
+        break;
       total_width += macfont_glyph_extents (font, glyph, NULL, NULL, 0);
     }
   if (i == 95)
@@ -2559,8 +2533,8 @@ macfont_open (struct frame * f, Lisp_Object entity, int pixel_size)
     font->average_width = font->space_width; /* XXX */
 
   if (!(macfont_info->screen_font
-       && mac_screen_font_get_metrics (macfont_info->screen_font,
-                                       &ascent, &descent, &leading)))
+        && mac_screen_font_get_metrics (macfont_info->screen_font,
+                                        &ascent, &descent, &leading)))
     {
       CFStringRef family_name;
 
@@ -2568,24 +2542,21 @@ macfont_open (struct frame * f, Lisp_Object entity, int pixel_size)
       descent = mac_font_get_descent (macfont);
       leading = mac_font_get_leading (macfont);
       /* AppKit and WebKit do some adjustment to the heights of
-        Courier, Helvetica, and Times.  */
+         Courier, Helvetica, and Times.  */
       family_name = mac_font_copy_family_name (macfont);
       if (family_name)
-       {
-         if ((CFStringCompare (family_name, CFSTR ("Courier"), 0)
-              == kCFCompareEqualTo)
-             || (CFStringCompare (family_name, CFSTR ("Helvetica"), 0)
-                 == kCFCompareEqualTo)
-             || (CFStringCompare (family_name, CFSTR ("Times"), 0)
-                 == kCFCompareEqualTo))
-           ascent += (ascent + descent) * .15f;
-         else if (CFStringHasPrefix (family_name, CFSTR ("Hiragino")))
-           {
-             leading *= .25f;
-             ascent += leading;
-           }
-         CFRelease (family_name);
-       }
+        {
+          if (CFEqual (family_name, CFSTR ("Courier"))
+              || CFEqual (family_name, CFSTR ("Helvetica"))
+              || CFEqual (family_name, CFSTR ("Times")))
+            ascent += (ascent + descent) * .15f;
+          else if (CFStringHasPrefix (family_name, CFSTR ("Hiragino")))
+            {
+              leading *= .25f;
+              ascent += leading;
+            }
+          CFRelease (family_name);
+        }
     }
   font->ascent = ascent + 0.5f;
   val = assq_no_quit (QCminspace, AREF (entity, FONT_EXTRA_INDEX));
@@ -2625,13 +2596,13 @@ macfont_close (struct font *font)
       CFRelease (macfont_info->macfont);
       CGFontRelease (macfont_info->cgfont);
       if (macfont_info->screen_font)
-       CFRelease (macfont_info->screen_font);
+        CFRelease (macfont_info->screen_font);
       macfont_release_cache (macfont_info->cache);
       for (i = 0; i < macfont_info->metrics_nrows; i++)
-       if (macfont_info->metrics[i])
-         xfree (macfont_info->metrics[i]);
+        if (macfont_info->metrics[i])
+          xfree (macfont_info->metrics[i]);
       if (macfont_info->metrics)
-       xfree (macfont_info->metrics);
+        xfree (macfont_info->metrics);
       macfont_info->cache = NULL;
       unblock_input ();
     }
@@ -2676,9 +2647,9 @@ macfont_encode_char (struct font *font, int c)
   return glyph != kCGFontIndexInvalid ? glyph : FONT_INVALID_CODE;
 }
 
-static int
+static void
 macfont_text_extents (struct font *font, unsigned int *code, int nglyphs,
-                     struct font_metrics *metrics)
+                      struct font_metrics *metrics)
 {
   int width, i;
 
@@ -2688,143 +2659,139 @@ macfont_text_extents (struct font *font, unsigned int *code, int nglyphs,
     {
       struct font_metrics m;
       int w = macfont_glyph_extents (font, code[i], metrics ? &m : NULL,
-                                    NULL, 0);
+                                     NULL, 0);
 
       if (metrics)
-       {
-         if (width + m.lbearing < metrics->lbearing)
-           metrics->lbearing = width + m.lbearing;
-         if (width + m.rbearing > metrics->rbearing)
-           metrics->rbearing = width + m.rbearing;
-         if (m.ascent > metrics->ascent)
-           metrics->ascent = m.ascent;
-         if (m.descent > metrics->descent)
-           metrics->descent = m.descent;
-       }
+        {
+          if (width + m.lbearing < metrics->lbearing)
+            metrics->lbearing = width + m.lbearing;
+          if (width + m.rbearing > metrics->rbearing)
+            metrics->rbearing = width + m.rbearing;
+          if (m.ascent > metrics->ascent)
+            metrics->ascent = m.ascent;
+          if (m.descent > metrics->descent)
+            metrics->descent = m.descent;
+        }
       width += w;
     }
   unblock_input ();
 
   if (metrics)
     metrics->width = width;
-
-  return width;
 }
 
 static int
 macfont_draw (struct glyph_string *s, int from, int to, int x, int y,
-             bool with_background)
+              bool with_background)
 {
   struct frame * f = s->f;
   struct macfont_info *macfont_info = (struct macfont_info *) s->font;
-  FontRef macfont = macfont_info->macfont;
-  CGContextRef context;
-  BOOL isComposite = s->first_glyph->type == COMPOSITE_GLYPH;
-  int end = isComposite ? s->cmp_to : s->nchars;
-  int len = end - s->cmp_from;
+  CGRect background_rect;
+  CGPoint text_position;
+  CGGlyph *glyphs;
+  CGPoint *positions;
+  CGFloat font_size = mac_font_get_size (macfont_info->macfont);
+  bool no_antialias_p =
+    (macfont_info->antialias == MACFONT_ANTIALIAS_OFF
+     || (macfont_info->antialias == MACFONT_ANTIALIAS_DEFAULT
+         && font_size <= macfont_antialias_threshold));
+  int len = to - from;
   struct face *face = s->face;
-  int i;
+  CGContextRef context;
 
   block_input ();
 
-  context = [[NSGraphicsContext currentContext] graphicsPort];
-  CGContextSaveGState (context);
+  if (with_background)
+    background_rect = CGRectMake (x, y - FONT_BASE (s->font),
+                                  s->width, FONT_HEIGHT (s->font));
+  else
+    background_rect = CGRectNull;
 
-#if 0
-  if (s->num_clips > 0)
-    {
-      CGRect clips[2];
+  text_position = CGPointMake (x, -y);
+  glyphs = xmalloc (sizeof (CGGlyph) * len);
+  {
+    CGFloat advance_delta = 0;
+    int i;
+    CGFloat total_width = 0;
 
-      for (i = 0; i < s->num_clips; i++)
-       clips[i] = mac_rect_make (f, s->clip[i].left, s->clip[i].top,
-                                 s->clip[i].right - s->clip[i].left,
-                                 s->clip[i].bottom - s->clip[i].top);
-      CGContextClipToRects (context, clips, s->num_clips);
-    }
-#endif
+    positions = xmalloc (sizeof (CGPoint) * len);
+    for (i = 0; i < len; i++)
+      {
+        int width;
+
+        glyphs[i] = s->char2b[from + i];
+        width = (s->padding_p ? 1
+                 : macfont_glyph_extents (s->font, glyphs[i],
+                                          NULL, &advance_delta,
+                                          no_antialias_p));
+        positions[i].x = total_width + advance_delta;
+        positions[i].y = 0;
+        total_width += width;
+      }
+  }
 
-  if (with_background)
+  context = [[NSGraphicsContext currentContext] graphicsPort];
+  CGContextSaveGState (context);
+
+  if (!CGRectIsNull (background_rect))
     {
-      if (s->hl == DRAW_MOUSE_FACE) 
+      if (s->hl == DRAW_MOUSE_FACE)
         {
           face = FACE_FROM_ID (s->f, MOUSE_HL_INFO (s->f)->mouse_face_face_id);
           if (!face)
             face = FACE_FROM_ID (s->f, MOUSE_FACE_ID);
         }
-
       CG_SET_FILL_COLOR_WITH_FACE_BACKGROUND (context, face, f);
-      CGContextFillRect (context,
-                        CGRectMake (x, y,
-                                     s->width, FONT_HEIGHT (s->font)));
+      CGContextFillRects (context, &background_rect, 1);
     }
 
   if (macfont_info->cgfont)
     {
-      CGGlyph *glyphs = alloca (sizeof (CGGlyph) * len);
-      CGPoint *positions = alloca (sizeof (CGPoint) * len);
-      CGFloat total_width = 0;
-      CGFloat font_size = mac_font_get_size (macfont);
       CGAffineTransform atfm;
-      CGFloat advance_delta = 0;
-      int y_draw = -s->ybase;
-      int no_antialias_p =
-       (macfont_info->antialias == MACFONT_ANTIALIAS_OFF
-        || (macfont_info->antialias == MACFONT_ANTIALIAS_DEFAULT
-            && font_size <= macfont_antialias_threshold));
-
-      for (i = 0; i < len; i++)
-       {
-         int width;
-
-         glyphs[i] = *(s->char2b + s->cmp_from + i);
-         width = (s->padding_p ? 1
-                  : macfont_glyph_extents (s->font, glyphs[i],
-                                           NULL, &advance_delta,
-                                           no_antialias_p));
-         positions[i].x = total_width + advance_delta;
-         positions[i].y = 0;
-         total_width += width;
-       }
 
       CGContextScaleCTM (context, 1, -1);
       CG_SET_FILL_COLOR_WITH_FACE_FOREGROUND (context, face, s->f);
       if (macfont_info->synthetic_italic_p)
-       atfm = synthetic_italic_atfm;
+        atfm = synthetic_italic_atfm;
       else
-       atfm = CGAffineTransformIdentity;
+        atfm = CGAffineTransformIdentity;
       if (macfont_info->synthetic_bold_p)
-       {
-         CGContextSetTextDrawingMode (context, kCGTextFillStroke);
-         CGContextSetLineWidth (context, synthetic_bold_factor * font_size);
-         CG_SET_STROKE_COLOR_WITH_FACE_FOREGROUND (context, face, f);
-       }
+        {
+          CGContextSetTextDrawingMode (context, kCGTextFillStroke);
+          CGContextSetLineWidth (context, synthetic_bold_factor * font_size);
+          CG_SET_STROKE_COLOR_WITH_FACE_FOREGROUND (context, face, f);
+        }
       if (no_antialias_p)
-       CGContextSetShouldAntialias (context, false);
+        CGContextSetShouldAntialias (context, false);
 
       CGContextSetTextMatrix (context, atfm);
-      CGContextSetTextPosition (context, x, y_draw);
+      CGContextSetTextPosition (context, text_position.x, text_position.y);
 
 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
       if (macfont_info->color_bitmap_p
 #if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
-         && CTFontDrawGlyphs != NULL
+          && CTFontDrawGlyphs != NULL
 #endif
-         )
-       {
-         if (len > 0)
-           {
-             CTFontDrawGlyphs (macfont, glyphs, positions, len, context);
-           }
-       }
+          )
+        {
+          if (len > 0)
+            {
+              CTFontDrawGlyphs (macfont_info->macfont, glyphs, positions, len,
+                                context);
+            }
+        }
       else
 #endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 */
-       {
-         CGContextSetFont (context, macfont_info->cgfont);
-         CGContextSetFontSize (context, font_size);
-         CGContextShowGlyphsAtPositions (context, glyphs, positions, len);
-       }
+        {
+          CGContextSetFont (context, macfont_info->cgfont);
+          CGContextSetFontSize (context, font_size);
+          CGContextShowGlyphsAtPositions (context, glyphs, positions, len);
+        }
     }
 
+
+  xfree (glyphs);
+  xfree (positions);
   CGContextRestoreGState (context);
 
   unblock_input ();
@@ -2857,9 +2824,9 @@ macfont_shape (Lisp_Object lgstring)
       Lisp_Object lglyph = LGSTRING_GLYPH (lgstring, i);
 
       if (NILP (lglyph))
-       break;
+        break;
       if (LGLYPH_CHAR (lglyph) >= 0x10000)
-       nonbmp_len++;
+        nonbmp_len++;
     }
 
   len = i;
@@ -2874,25 +2841,25 @@ macfont_shape (Lisp_Object lgstring)
       UTF32Char c = LGLYPH_CHAR (LGSTRING_GLYPH (lgstring, i));
 
       if (macfont_store_utf32char_to_unichars (c, unichars + i + j) > 1)
-       {
-         nonbmp_indices[j] = i + j;
-         j++;
-       }
+        {
+          nonbmp_indices[j] = i + j;
+          j++;
+        }
     }
   nonbmp_indices[j] = len + j; /* sentinel */
 
   block_input ();
 
   string = CFStringCreateWithCharactersNoCopy (NULL, unichars, len + nonbmp_len,
-                                              kCFAllocatorNull);
+                                               kCFAllocatorNull);
   if (string)
     {
       glyph_layouts = alloca (sizeof (struct mac_glyph_layout) * glyph_len);
       if (macfont_info->screen_font)
-       used = mac_screen_font_shape (macfont_info->screen_font, string,
-                                     glyph_layouts, glyph_len);
+        used = mac_screen_font_shape (macfont_info->screen_font, string,
+                                      glyph_layouts, glyph_len);
       else
-       used = mac_font_shape (macfont, string, glyph_layouts, glyph_len);
+        used = mac_font_shape (macfont, string, glyph_layouts, glyph_len);
       CFRelease (string);
     }
 
@@ -2912,40 +2879,40 @@ macfont_shape (Lisp_Object lgstring)
       int xoff, yoff, wadjust;
 
       if (NILP (lglyph))
-       {
-         lglyph = Fmake_vector (make_number (LGLYPH_SIZE), Qnil);
-         LGSTRING_SET_GLYPH (lgstring, i, lglyph);
-       }
+        {
+          lglyph = Fmake_vector (make_number (LGLYPH_SIZE), Qnil);
+          LGSTRING_SET_GLYPH (lgstring, i, lglyph);
+        }
 
       from = gl->comp_range.location;
       /* Convert UTF-16 index to UTF-32.  */
       j = 0;
       while (nonbmp_indices[j] < from)
-       j++;
+        j++;
       from -= j;
       LGLYPH_SET_FROM (lglyph, from);
 
       to = gl->comp_range.location + gl->comp_range.length;
       /* Convert UTF-16 index to UTF-32.  */
       while (nonbmp_indices[j] < to)
-       j++;
+        j++;
       to -= j;
       LGLYPH_SET_TO (lglyph, to - 1);
 
       /* LGLYPH_CHAR is used in `describe-char' for checking whether
-        the composition is trivial.  */
+         the composition is trivial.  */
       {
-       UTF32Char c;
-
-       if (unichars[gl->string_index] >= 0xD800
-           && unichars[gl->string_index] < 0xDC00)
-         c = (((unichars[gl->string_index] - 0xD800) << 10)
-              + (unichars[gl->string_index + 1] - 0xDC00) + 0x10000);
-       else
-         c = unichars[gl->string_index];
-       if (macfont_get_glyph_for_character (font, c) != gl->glyph_id)
-         c = 0;
-       LGLYPH_SET_CHAR (lglyph, c);
+        UTF32Char c;
+
+        if (unichars[gl->string_index] >= 0xD800
+            && unichars[gl->string_index] < 0xDC00)
+          c = (((unichars[gl->string_index] - 0xD800) << 10)
+               + (unichars[gl->string_index + 1] - 0xDC00) + 0x10000);
+        else
+          c = unichars[gl->string_index];
+        if (macfont_get_glyph_for_character (font, c) != gl->glyph_id)
+          c = 0;
+        LGLYPH_SET_CHAR (lglyph, c);
       }
 
       {
@@ -2964,15 +2931,15 @@ macfont_shape (Lisp_Object lgstring)
       yoff = lround (- gl->baseline_delta);
       wadjust = lround (gl->advance);
       if (xoff != 0 || yoff != 0 || wadjust != metrics.width)
-       {
-         Lisp_Object vec;
+        {
+          Lisp_Object vec;
 
-         vec = Fmake_vector (make_number (3), Qnil);
-         ASET (vec, 0, make_number (xoff));
-         ASET (vec, 1, make_number (yoff));
-         ASET (vec, 2, make_number (wadjust));
-         LGLYPH_SET_ADJUSTMENT (lglyph, vec);
-       }
+          vec = Fmake_vector (make_number (3), Qnil);
+          ASET (vec, 0, make_number (xoff));
+          ASET (vec, 1, make_number (yoff));
+          ASET (vec, 2, make_number (wadjust));
+          LGLYPH_SET_ADJUSTMENT (lglyph, vec);
+        }
     }
 
   unblock_input ();
@@ -2995,7 +2962,7 @@ struct uvs_table
   UInt32 length, num_var_selector_records;
   struct variation_selector_record variation_selector_records[1];
 };
-#define SIZEOF_UVS_TABLE_HEADER \
+#define SIZEOF_UVS_TABLE_HEADER                                         \
   (sizeof (struct uvs_table) - sizeof (struct variation_selector_record))
 
 struct unicode_value_range
@@ -3007,7 +2974,7 @@ struct default_uvs_table {
   UInt32 num_unicode_value_ranges;
   struct unicode_value_range unicode_value_ranges[1];
 };
-#define SIZEOF_DEFAULT_UVS_TABLE_HEADER \
+#define SIZEOF_DEFAULT_UVS_TABLE_HEADER                                 \
   (sizeof (struct default_uvs_table) - sizeof (struct unicode_value_range))
 
 struct uvs_mapping
@@ -3020,7 +2987,7 @@ struct non_default_uvs_table
   UInt32 num_uvs_mappings;
   struct uvs_mapping uvs_mappings[1];
 };
-#define SIZEOF_NON_DEFAULT_UVS_TABLE_HEADER \
+#define SIZEOF_NON_DEFAULT_UVS_TABLE_HEADER                             \
   (sizeof (struct non_default_uvs_table) - sizeof (struct uvs_mapping))
 #pragma pack(pop)
 
@@ -3052,98 +3019,98 @@ mac_font_copy_uvs_table (FontRef font)
 
 #if __LP64__
       if (CFDataGetLength (cmap_table) > UINT32_MAX)
-       goto finish;
+        goto finish;
 #endif
 
       cmap_len = CFDataGetLength (cmap_table);
       if (sizeof_sfntCMapHeader > cmap_len)
-       goto finish;
+        goto finish;
 
       ntables = BUINT16_VALUE (cmap->numTables);
       if (ntables > ((cmap_len - sizeof_sfntCMapHeader)
-                    / sizeof_sfntCMapEncoding))
-       goto finish;
+                     / sizeof_sfntCMapEncoding))
+        goto finish;
 
       for (i = 0; i < ntables; i++)
-       if ((BUINT16_VALUE (cmap->encoding[i].platformID)
-            == kFontUnicodePlatform)
-           && (BUINT16_VALUE (cmap->encoding[i].scriptID)
-               == 5)) /* kFontUnicodeV4_0VariationSequenceSemantics */
-         {
-           uvs_offset = BUINT32_VALUE (cmap->encoding[i].offset);
-           break;
-         }
+        if ((BUINT16_VALUE (cmap->encoding[i].platformID)
+             == kFontUnicodePlatform)
+            && (BUINT16_VALUE (cmap->encoding[i].scriptID)
+                == 5)) /* kFontUnicodeV4_0VariationSequenceSemantics */
+          {
+            uvs_offset = BUINT32_VALUE (cmap->encoding[i].offset);
+            break;
+          }
       if (i == ntables
-         || uvs_offset > cmap_len
-         || SIZEOF_UVS_TABLE_HEADER > cmap_len - uvs_offset)
-       goto finish;
+          || uvs_offset > cmap_len
+          || SIZEOF_UVS_TABLE_HEADER > cmap_len - uvs_offset)
+        goto finish;
 
       uvs = (struct uvs_table *) ((UInt8 *) cmap + uvs_offset);
       uvs_len = BUINT32_VALUE (uvs->length);
       if (uvs_len > cmap_len - uvs_offset
-         || SIZEOF_UVS_TABLE_HEADER > uvs_len)
-       goto finish;
+          || SIZEOF_UVS_TABLE_HEADER > uvs_len)
+        goto finish;
 
       if (BUINT16_VALUE (uvs->format) != 14)
-       goto finish;
+        goto finish;
 
       nrecords = BUINT32_VALUE (uvs->num_var_selector_records);
       if (nrecords > ((uvs_len - SIZEOF_UVS_TABLE_HEADER)
-                     / sizeof (struct variation_selector_record)))
-       goto finish;
+                      / sizeof (struct variation_selector_record)))
+        goto finish;
 
       records = uvs->variation_selector_records;
       for (i = 0; i < nrecords; i++)
-       {
-         UInt32 default_uvs_offset, non_default_uvs_offset;
-
-         default_uvs_offset = BUINT32_VALUE (records[i].default_uvs_offset);
-         if (default_uvs_offset)
-           {
-             struct default_uvs_table *default_uvs;
-             UInt32 nranges;
-
-             if (default_uvs_offset > uvs_len
-                 || (SIZEOF_DEFAULT_UVS_TABLE_HEADER
-                     > uvs_len - default_uvs_offset))
-               goto finish;
-
-             default_uvs = ((struct default_uvs_table *)
-                            ((UInt8 *) uvs + default_uvs_offset));
-             nranges = BUINT32_VALUE (default_uvs->num_unicode_value_ranges);
-             if (nranges > ((uvs_len - default_uvs_offset
-                             - SIZEOF_DEFAULT_UVS_TABLE_HEADER)
-                            / sizeof (struct unicode_value_range)))
-               goto finish;
-             /* Now 2 * nranges can't overflow, so we can safely use
-                `(lo + hi) / 2' instead of `lo + (hi - lo) / 2' in
-                mac_font_get_glyphs_for_variants.  */
-           }
-
-         non_default_uvs_offset =
-           BUINT32_VALUE (records[i].non_default_uvs_offset);
-         if (non_default_uvs_offset)
-           {
-             struct non_default_uvs_table *non_default_uvs;
-             UInt32 nmappings;
-
-             if (non_default_uvs_offset > uvs_len
-                 || (SIZEOF_NON_DEFAULT_UVS_TABLE_HEADER
-                     > uvs_len - non_default_uvs_offset))
-               goto finish;
-
-             non_default_uvs = ((struct non_default_uvs_table *)
-                                ((UInt8 *) uvs + non_default_uvs_offset));
-             nmappings = BUINT32_VALUE (non_default_uvs->num_uvs_mappings);
-             if (nmappings > ((uvs_len - non_default_uvs_offset
-                               - SIZEOF_NON_DEFAULT_UVS_TABLE_HEADER)
-                              / sizeof (struct uvs_mapping)))
-               goto finish;
-             /* Now 2 * nmappings can't overflow, so we can safely
-                use `(lo + hi) / 2' instead of `lo + (hi - lo) / 2'
-                in mac_font_get_glyphs_for_variants.  */
-           }
-       }
+        {
+          UInt32 default_uvs_offset, non_default_uvs_offset;
+
+          default_uvs_offset = BUINT32_VALUE (records[i].default_uvs_offset);
+          if (default_uvs_offset)
+            {
+              struct default_uvs_table *default_uvs;
+              UInt32 nranges;
+
+              if (default_uvs_offset > uvs_len
+                  || (SIZEOF_DEFAULT_UVS_TABLE_HEADER
+                      > uvs_len - default_uvs_offset))
+                goto finish;
+
+              default_uvs = ((struct default_uvs_table *)
+                             ((UInt8 *) uvs + default_uvs_offset));
+              nranges = BUINT32_VALUE (default_uvs->num_unicode_value_ranges);
+              if (nranges > ((uvs_len - default_uvs_offset
+                              - SIZEOF_DEFAULT_UVS_TABLE_HEADER)
+                             / sizeof (struct unicode_value_range)))
+                goto finish;
+              /* Now 2 * nranges can't overflow, so we can safely use
+                 `(lo + hi) / 2' instead of `lo + (hi - lo) / 2' in
+                 mac_font_get_glyphs_for_variants.  */
+            }
+
+          non_default_uvs_offset =
+            BUINT32_VALUE (records[i].non_default_uvs_offset);
+          if (non_default_uvs_offset)
+            {
+              struct non_default_uvs_table *non_default_uvs;
+              UInt32 nmappings;
+
+              if (non_default_uvs_offset > uvs_len
+                  || (SIZEOF_NON_DEFAULT_UVS_TABLE_HEADER
+                      > uvs_len - non_default_uvs_offset))
+                goto finish;
+
+              non_default_uvs = ((struct non_default_uvs_table *)
+                                 ((UInt8 *) uvs + non_default_uvs_offset));
+              nmappings = BUINT32_VALUE (non_default_uvs->num_uvs_mappings);
+              if (nmappings > ((uvs_len - non_default_uvs_offset
+                                - SIZEOF_NON_DEFAULT_UVS_TABLE_HEADER)
+                               / sizeof (struct uvs_mapping)))
+                goto finish;
+              /* Now 2 * nmappings can't overflow, so we can safely
+                 use `(lo + hi) / 2' instead of `lo + (hi - lo) / 2'
+                 in mac_font_get_glyphs_for_variants.  */
+            }
+        }
 
       uvs_table = CFDataCreate (NULL, (UInt8 *) uvs, uvs_len);
 
@@ -3166,18 +3133,16 @@ mac_font_copy_uvs_table (FontRef font)
 
 static void
 mac_font_get_glyphs_for_variants (CFDataRef uvs_table, UTF32Char c,
-                                 const UTF32Char selectors[], CGGlyph glyphs[],
-                                 CFIndex count)
+                                  const UTF32Char selectors[], CGGlyph glyphs[],
+                                  CFIndex count)
 {
   struct uvs_table *uvs = (struct uvs_table *) CFDataGetBytePtr (uvs_table);
   struct variation_selector_record *records = uvs->variation_selector_records;
   CFIndex i;
   UInt32 ir, nrecords;
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
   dispatch_queue_t queue =
     dispatch_get_global_queue (DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
   dispatch_group_t group = dispatch_group_create ();
-#endif
 
   nrecords = BUINT32_VALUE (uvs->num_var_selector_records);
   i = 0;
@@ -3187,86 +3152,80 @@ mac_font_get_glyphs_for_variants (CFDataRef uvs_table, UTF32Char c,
       UInt32 default_uvs_offset, non_default_uvs_offset;
 
       if (selectors[i] < BUINT24_VALUE (records[ir].var_selector))
-       {
-         glyphs[i++] = kCGFontIndexInvalid;
-         continue;
-       }
+        {
+          glyphs[i++] = kCGFontIndexInvalid;
+          continue;
+        }
       else if (selectors[i] > BUINT24_VALUE (records[ir].var_selector))
-       {
-         ir++;
-         continue;
-       }
+        {
+          ir++;
+          continue;
+        }
 
       /* selectors[i] == BUINT24_VALUE (records[ir].var_selector) */
       default_uvs_offset = BUINT32_VALUE (records[ir].default_uvs_offset);
       non_default_uvs_offset =
-       BUINT32_VALUE (records[ir].non_default_uvs_offset);
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
+        BUINT32_VALUE (records[ir].non_default_uvs_offset);
       dispatch_group_async (group, queue, ^{
-#endif
-         glyphs[i] = kCGFontIndexInvalid;
-
-         if (default_uvs_offset)
-           {
-             struct default_uvs_table *default_uvs =
-               (struct default_uvs_table *) ((UInt8 *) uvs
-                                             + default_uvs_offset);
-             struct unicode_value_range *ranges =
-               default_uvs->unicode_value_ranges;
-             UInt32 lo, hi;
-
-             lo = 0;
-             hi = BUINT32_VALUE (default_uvs->num_unicode_value_ranges);
-             while (lo < hi)
-               {
-                 UInt32 mid = (lo + hi) / 2;
-
-                 if (c < BUINT24_VALUE (ranges[mid].start_unicode_value))
-                   hi = mid;
-                 else
-                   lo = mid + 1;
-               }
-             if (hi > 0
-                 && (c <= (BUINT24_VALUE (ranges[hi - 1].start_unicode_value)
-                           + BUINT8_VALUE (ranges[hi - 1].additional_count))))
-               glyphs[i] = 0;
-           }
-
-         if (glyphs[i] == kCGFontIndexInvalid && non_default_uvs_offset)
-           {
-             struct non_default_uvs_table *non_default_uvs =
-               (struct non_default_uvs_table *) ((UInt8 *) uvs
-                                                 + non_default_uvs_offset);
-             struct uvs_mapping *mappings = non_default_uvs->uvs_mappings;
-             UInt32 lo, hi;
-
-             lo = 0;
-             hi = BUINT32_VALUE (non_default_uvs->num_uvs_mappings);
-             while (lo < hi)
-               {
-                 UInt32 mid = (lo + hi) / 2;
-
-                 if (c < BUINT24_VALUE (mappings[mid].unicode_value))
-                   hi = mid;
-                 else
-                   lo = mid + 1;
-               }
-             if (hi > 0 &&
-                 BUINT24_VALUE (mappings[hi - 1].unicode_value) == c)
-               glyphs[i] = BUINT16_VALUE (mappings[hi - 1].glyph_id);
-           }
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
-       });
-#endif
+          glyphs[i] = kCGFontIndexInvalid;
+
+          if (default_uvs_offset)
+            {
+              struct default_uvs_table *default_uvs =
+                (struct default_uvs_table *) ((UInt8 *) uvs
+                                              + default_uvs_offset);
+              struct unicode_value_range *ranges =
+                default_uvs->unicode_value_ranges;
+              UInt32 lo, hi;
+
+              lo = 0;
+              hi = BUINT32_VALUE (default_uvs->num_unicode_value_ranges);
+              while (lo < hi)
+                {
+                  UInt32 mid = (lo + hi) / 2;
+
+                  if (c < BUINT24_VALUE (ranges[mid].start_unicode_value))
+                    hi = mid;
+                  else
+                    lo = mid + 1;
+                }
+              if (hi > 0
+                  && (c <= (BUINT24_VALUE (ranges[hi - 1].start_unicode_value)
+                            + BUINT8_VALUE (ranges[hi - 1].additional_count))))
+                glyphs[i] = 0;
+            }
+
+          if (glyphs[i] == kCGFontIndexInvalid && non_default_uvs_offset)
+            {
+              struct non_default_uvs_table *non_default_uvs =
+                (struct non_default_uvs_table *) ((UInt8 *) uvs
+                                                  + non_default_uvs_offset);
+              struct uvs_mapping *mappings = non_default_uvs->uvs_mappings;
+              UInt32 lo, hi;
+
+              lo = 0;
+              hi = BUINT32_VALUE (non_default_uvs->num_uvs_mappings);
+              while (lo < hi)
+                {
+                  UInt32 mid = (lo + hi) / 2;
+
+                  if (c < BUINT24_VALUE (mappings[mid].unicode_value))
+                    hi = mid;
+                  else
+                    lo = mid + 1;
+                }
+              if (hi > 0 &&
+                  BUINT24_VALUE (mappings[hi - 1].unicode_value) == c)
+                glyphs[i] = BUINT16_VALUE (mappings[hi - 1].glyph_id);
+            }
+        });
       i++;
       ir++;
     }
   while (i < count)
     glyphs[i++] = kCGFontIndexInvalid;
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
   dispatch_group_wait (group, DISPATCH_TIME_FOREVER);
   dispatch_release (group);
-#endif
 }
 
 static int
@@ -3285,26 +3244,26 @@ macfont_variation_glyphs (struct font *font, int c, unsigned variations[256])
       CGGlyph glyphs[256];
 
       for (i = 0; i < 16; i++)
-       selectors[i] = 0xFE00 + i;
+        selectors[i] = 0xFE00 + i;
       for (; i < 256; i++)
-       selectors[i] = 0xE0100 + (i - 16);
+        selectors[i] = 0xE0100 + (i - 16);
       mac_font_get_glyphs_for_variants (uvs_table, c, selectors, glyphs, 256);
       for (i = 0; i < 256; i++)
-       {
-         CGGlyph glyph = glyphs[i];
-
-         if (uvs_collection != MAC_CHARACTER_COLLECTION_IDENTITY_MAPPING
-             && glyph != kCGFontIndexInvalid)
-           glyph = macfont_get_glyph_for_cid (font, uvs_collection, glyph);
-         if (glyph == kCGFontIndexInvalid)
-           variations[i] = 0;
-         else
-           {
-             variations[i] = (glyph ? glyph
-                              : macfont_get_glyph_for_character (font, c));
-             n++;
-           }
-       }
+        {
+          CGGlyph glyph = glyphs[i];
+
+          if (uvs_collection != MAC_CHARACTER_COLLECTION_IDENTITY_MAPPING
+              && glyph != kCGFontIndexInvalid)
+            glyph = macfont_get_glyph_for_cid (font, uvs_collection, glyph);
+          if (glyph == kCGFontIndexInvalid)
+            variations[i] = 0;
+          else
+            {
+              variations[i] = (glyph ? glyph
+                               : macfont_get_glyph_for_character (font, c));
+              n++;
+            }
+        }
     }
   unblock_input ();
 
@@ -3332,7 +3291,7 @@ macfont_filter_properties (Lisp_Object font, Lisp_Object alist)
 
 static Boolean
 mac_ctfont_descriptor_supports_languages (CTFontDescriptorRef descriptor,
-                                         CFArrayRef languages)
+                                          CFArrayRef languages)
 {
   Boolean result = true;
   CFArrayRef desc_languages =
@@ -3347,13 +3306,13 @@ mac_ctfont_descriptor_supports_languages (CTFontDescriptorRef descriptor,
       desc_languages_count = CFArrayGetCount (desc_languages);
       languages_count = CFArrayGetCount (languages);
       for (i = 0; i < languages_count; i++)
-       if (!CFArrayContainsValue (desc_languages,
-                                  CFRangeMake (0, desc_languages_count),
-                                  CFArrayGetValueAtIndex (languages, i)))
-         {
-           result = false;
-           break;
-         }
+        if (!CFArrayContainsValue (desc_languages,
+                                   CFRangeMake (0, desc_languages_count),
+                                   CFArrayGetValueAtIndex (languages, i)))
+          {
+            result = false;
+            break;
+          }
       CFRelease (desc_languages);
     }
 
@@ -3371,79 +3330,79 @@ mac_ctfont_create_preferred_family_for_attributes (CFDictionaryRef attributes)
     {
       CFStringRef keys[] = {
 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
-       kCTLanguageAttributeName
+        kCTLanguageAttributeName
 #else
-       CFSTR ("NSLanguage")
+        CFSTR ("NSLanguage")
 #endif
       };
       CFTypeRef values[] = {NULL};
       CFIndex num_values = 0;
       CFArrayRef languages
-       = CFDictionaryGetValue (attributes, MAC_FONT_LANGUAGES_ATTRIBUTE);
+        = CFDictionaryGetValue (attributes, MAC_FONT_LANGUAGES_ATTRIBUTE);
 
       if (languages && CFArrayGetCount (languages) > 0)
-       {
-         if (CTGetCoreTextVersion () >= kCTVersionNumber10_9)
-           values[num_values++] = CFArrayGetValueAtIndex (languages, 0);
-         else
-           {
-             CFCharacterSetRef charset =
-               CFDictionaryGetValue (attributes,
-                                     MAC_FONT_CHARACTER_SET_ATTRIBUTE);
-
-             result = mac_font_copy_default_name_for_charset_and_languages (charset, languages);
-           }
-       }
+        {
+          if (CTGetCoreTextVersion () >= kCTVersionNumber10_9)
+            values[num_values++] = CFArrayGetValueAtIndex (languages, 0);
+          else
+            {
+              CFCharacterSetRef charset =
+                CFDictionaryGetValue (attributes,
+                                      MAC_FONT_CHARACTER_SET_ATTRIBUTE);
+
+              result = mac_font_copy_default_name_for_charset_and_languages (charset, languages);
+            }
+        }
       if (result == NULL)
-       {
-         CFAttributedStringRef attr_string = NULL;
-         CTLineRef ctline = NULL;
-         CFDictionaryRef attrs
-           = CFDictionaryCreate (NULL, (const void **) keys,
-                                 (const void **) values, num_values,
-                                 &kCFTypeDictionaryKeyCallBacks,
-                                 &kCFTypeDictionaryValueCallBacks);
-
-         if (attrs)
-           {
-             attr_string = CFAttributedStringCreate (NULL, charset_string,
-                                                     attrs);
-             CFRelease (attrs);
-           }
-         if (attr_string)
-           {
-             ctline = CTLineCreateWithAttributedString (attr_string);
-             CFRelease (attr_string);
-           }
-         if (ctline)
-           {
-             CFArrayRef runs = CTLineGetGlyphRuns (ctline);
-             CFIndex i, nruns = CFArrayGetCount (runs);
-             CTFontRef font;
-
-             for (i = 0; i < nruns; i++)
-               {
-                 CTRunRef run = CFArrayGetValueAtIndex (runs, i);
-                 CFDictionaryRef attributes = CTRunGetAttributes (run);
-                 CTFontRef font_in_run;
-
-                 if (attributes == NULL)
-                   break;
-                 font_in_run =
-                   CFDictionaryGetValue (attributes, kCTFontAttributeName);
-                 if (font_in_run == NULL)
-                   break;
-                 if (i == 0)
-                   font = font_in_run;
-                 else if (!mac_ctfont_equal_in_postscript_name (font,
-                                                                font_in_run))
-                   break;
-               }
-             if (nruns > 0 && i == nruns)
-               result = CTFontCopyAttribute (font, kCTFontFamilyNameAttribute);
-             CFRelease (ctline);
-           }
-       }
+        {
+          CFAttributedStringRef attr_string = NULL;
+          CTLineRef ctline = NULL;
+          CFDictionaryRef attrs
+            = CFDictionaryCreate (NULL, (const void **) keys,
+                                  (const void **) values, num_values,
+                                  &kCFTypeDictionaryKeyCallBacks,
+                                  &kCFTypeDictionaryValueCallBacks);
+
+          if (attrs)
+            {
+              attr_string = CFAttributedStringCreate (NULL, charset_string,
+                                                      attrs);
+              CFRelease (attrs);
+            }
+          if (attr_string)
+            {
+              ctline = CTLineCreateWithAttributedString (attr_string);
+              CFRelease (attr_string);
+            }
+          if (ctline)
+            {
+              CFArrayRef runs = CTLineGetGlyphRuns (ctline);
+              CFIndex i, nruns = CFArrayGetCount (runs);
+              CTFontRef font;
+
+              for (i = 0; i < nruns; i++)
+                {
+                  CTRunRef run = CFArrayGetValueAtIndex (runs, i);
+                  CFDictionaryRef attributes = CTRunGetAttributes (run);
+                  CTFontRef font_in_run;
+
+                  if (attributes == NULL)
+                    break;
+                  font_in_run =
+                    CFDictionaryGetValue (attributes, kCTFontAttributeName);
+                  if (font_in_run == NULL)
+                    break;
+                  if (i == 0)
+                    font = font_in_run;
+                  else if (!mac_ctfont_equal_in_postscript_name (font,
+                                                                 font_in_run))
+                    break;
+                }
+              if (nruns > 0 && i == nruns)
+                result = CTFontCopyAttribute (font, kCTFontFamilyNameAttribute);
+              CFRelease (ctline);
+            }
+        }
     }
 
   return result;
@@ -3453,14 +3412,14 @@ static inline double
 mac_ctfont_get_advance_width_for_glyph (CTFontRef font, CGGlyph glyph)
 {
   return CTFontGetAdvancesForGlyphs (font, kCTFontDefaultOrientation,
-                                    &glyph, NULL, 1);
+                                     &glyph, NULL, 1);
 }
 
 static inline CGRect
 mac_ctfont_get_bounding_rect_for_glyph (CTFontRef font, CGGlyph glyph)
 {
   return CTFontGetBoundingRectsForGlyphs (font, kCTFontDefaultOrientation,
-                                         &glyph, NULL, 1);
+                                          &glyph, NULL, 1);
 }
 
 static CFArrayRef
@@ -3468,83 +3427,31 @@ mac_ctfont_create_available_families (void)
 {
   CFMutableArrayRef families = NULL;
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
-#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
-  if (CTFontManagerCopyAvailableFontFamilyNames != NULL)
-#endif
     {
       CFArrayRef orig_families = CTFontManagerCopyAvailableFontFamilyNames ();
 
       if (orig_families)
-       {
-         CFIndex i, count = CFArrayGetCount (orig_families);
-
-         families = CFArrayCreateMutable (NULL, count, &kCFTypeArrayCallBacks);
-         if (families)
-           for (i = 0; i < count; i++)
-             {
-               CFStringRef family = CFArrayGetValueAtIndex (orig_families, i);
-
-               if (!CFStringHasPrefix (family, CFSTR ("."))
-                   && (CTFontManagerCompareFontFamilyNames (family,
-                                                            CFSTR ("LastResort"),
-                                                            NULL)
-                       != kCFCompareEqualTo))
-                 CFArrayAppendValue (families, family);
-             }
-         CFRelease (orig_families);
-       }
-    }
-#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
-  else        /* CTFontManagerCopyAvailableFontFamilyNames == NULL */
-#endif
-#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 */
-#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
-    {
-      CTFontCollectionRef collection;
-      CFArrayRef descs = NULL;
-
-      collection = CTFontCollectionCreateFromAvailableFonts (NULL);
-      if (collection)
-       {
-         descs = CTFontCollectionCreateMatchingFontDescriptors (collection);
-         CFRelease (collection);
-       }
-      if (descs)
-       {
-         CFIndex i, count = CFArrayGetCount (descs);
-
-         families = CFArrayCreateMutable (NULL, count, &kCFTypeArrayCallBacks);
-         if (families)
-           for (i = 0; i < count; i++)
-             {
-               FontDescriptorRef desc = CFArrayGetValueAtIndex (descs, i);
-               CFStringRef name =
-                 mac_font_descriptor_copy_attribute (desc,
-                                                     MAC_FONT_FAMILY_NAME_ATTRIBUTE);
-
-               if (name)
-                 {
-                   CFIndex p, limit = CFArrayGetCount (families);
-
-                   p = CFArrayBSearchValues (families, CFRangeMake (0, limit),
-                                             (const void *) name,
-                                             mac_font_family_compare, NULL);
-                   if (p >= limit)
-                     CFArrayAppendValue (families, name);
-                   else if (mac_font_family_compare
-                            (CFArrayGetValueAtIndex (families, p),
-                             name, NULL) != kCFCompareEqualTo)
-                     CFArrayInsertValueAtIndex (families, p, name);
-                   CFRelease (name);
-                 }
-             }
-         CFRelease (descs);
-       }
+        {
+          CFIndex i, count = CFArrayGetCount (orig_families);
+
+          families = CFArrayCreateMutable (NULL, count, &kCFTypeArrayCallBacks);
+          if (families)
+            for (i = 0; i < count; i++)
+              {
+                CFStringRef family = CFArrayGetValueAtIndex (orig_families, i);
+
+                if (!CFStringHasPrefix (family, CFSTR ("."))
+                    && (CTFontManagerCompareFontFamilyNames (family,
+                                                             CFSTR ("LastResort"),
+                                                             NULL)
+                        != kCFCompareEqualTo))
+                  CFArrayAppendValue (families, family);
+              }
+          CFRelease (orig_families);
+        }
     }
-#endif
 
-  return families;
+    return families;
 }
 
 static Boolean
@@ -3562,10 +3469,10 @@ mac_ctfont_equal_in_postscript_name (CTFontRef font1, CTFontRef font2)
     {
       name2 = CTFontCopyPostScriptName (font2);
       if (name2)
-       {
-         result = (CFStringCompare (name1, name2, 0) == kCFCompareEqualTo);
-         CFRelease (name2);
-       }
+        {
+          result = CFEqual (name1, name2);
+          CFRelease (name2);
+        }
       CFRelease (name1);
     }
 
@@ -3574,7 +3481,7 @@ mac_ctfont_equal_in_postscript_name (CTFontRef font1, CTFontRef font2)
 
 static CTLineRef
 mac_ctfont_create_line_with_string_and_font (CFStringRef string,
-                                            CTFontRef macfont)
+                                             CTFontRef macfont)
 {
   CFStringRef keys[] = {kCTFontAttributeName, kCTKernAttributeName};
   CFTypeRef values[] = {NULL, NULL};
@@ -3588,10 +3495,10 @@ mac_ctfont_create_line_with_string_and_font (CFStringRef string,
   if (values[1])
     {
       attributes = CFDictionaryCreate (NULL, (const void **) keys,
-                                      (const void **) values,
-                                      sizeof (keys) / sizeof (keys[0]),
-                                      &kCFTypeDictionaryKeyCallBacks,
-                                      &kCFTypeDictionaryValueCallBacks);
+                                       (const void **) values,
+                                       ARRAYELTS (keys),
+                                       &kCFTypeDictionaryKeyCallBacks,
+                                       &kCFTypeDictionaryValueCallBacks);
       CFRelease (values[1]);
     }
   if (attributes)
@@ -3607,30 +3514,30 @@ mac_ctfont_create_line_with_string_and_font (CFStringRef string,
   if (ctline)
     {
       /* Abandon if ctline contains some fonts other than the
-        specified one.  */
+         specified one.  */
       CFArrayRef runs = CTLineGetGlyphRuns (ctline);
       CFIndex i, nruns = CFArrayGetCount (runs);
 
       for (i = 0; i < nruns; i++)
-       {
-         CTRunRef run = CFArrayGetValueAtIndex (runs, i);
-         CFDictionaryRef attributes = CTRunGetAttributes (run);
-         CTFontRef font_in_run;
-
-         if (attributes == NULL)
-           break;
-         font_in_run =
-           CFDictionaryGetValue (attributes, kCTFontAttributeName);
-         if (font_in_run == NULL)
-           break;
-         if (!mac_ctfont_equal_in_postscript_name (macfont, font_in_run))
-           break;
-       }
+        {
+          CTRunRef run = CFArrayGetValueAtIndex (runs, i);
+          CFDictionaryRef attributes = CTRunGetAttributes (run);
+          CTFontRef font_in_run;
+
+          if (attributes == NULL)
+            break;
+          font_in_run =
+            CFDictionaryGetValue (attributes, kCTFontAttributeName);
+          if (font_in_run == NULL)
+            break;
+          if (!mac_ctfont_equal_in_postscript_name (macfont, font_in_run))
+            break;
+        }
       if (i < nruns)
-       {
-         CFRelease (ctline);
-         ctline = NULL;
-       }
+        {
+          CFRelease (ctline);
+          ctline = NULL;
+        }
     }
 
   return ctline;
@@ -3638,7 +3545,7 @@ mac_ctfont_create_line_with_string_and_font (CFStringRef string,
 
 static CFIndex
 mac_ctfont_shape (CTFontRef font, CFStringRef string,
-                 struct mac_glyph_layout *glyph_layouts, CFIndex glyph_len)
+                  struct mac_glyph_layout *glyph_layouts, CFIndex glyph_len)
 {
   CFIndex used, result = 0;
   CTLineRef ctline = mac_ctfont_create_line_with_string_and_font (string, font);
@@ -3655,128 +3562,128 @@ mac_ctfont_shape (CTFontRef font, CFStringRef string,
       CFIndex total_glyph_count = 0;
 
       for (k = 0; k < ctrun_count; k++)
-       {
-         CTRunRef ctrun = CFArrayGetValueAtIndex (ctruns, k);
-         CFIndex i, min_location, glyph_count = CTRunGetGlyphCount (ctrun);
-         struct mac_glyph_layout *glbuf = glyph_layouts + total_glyph_count;
-         CFRange string_range, comp_range, range;
-         CFIndex *permutation;
-
-         if (CTRunGetStatus (ctrun) & kCTRunStatusRightToLeft)
-           permutation = xmalloc (sizeof (CFIndex) * glyph_count);
-         else
-           permutation = NULL;
+        {
+          CTRunRef ctrun = CFArrayGetValueAtIndex (ctruns, k);
+          CFIndex i, min_location, glyph_count = CTRunGetGlyphCount (ctrun);
+          struct mac_glyph_layout *glbuf = glyph_layouts + total_glyph_count;
+          CFRange string_range, comp_range, range;
+          CFIndex *permutation;
+
+          if (CTRunGetStatus (ctrun) & kCTRunStatusRightToLeft)
+            permutation = xmalloc (sizeof (CFIndex) * glyph_count);
+          else
+            permutation = NULL;
 
 #define RIGHT_TO_LEFT_P permutation
 
-         /* Now the `comp_range' member of struct mac_glyph_layout is
-            temporarily used as a work area such that:
-             glbuf[i].comp_range.location =
-               min {compRange[i + 1].location, ...,
+          /* Now the `comp_range' member of struct mac_glyph_layout is
+             temporarily used as a work area such that:
+             glbuf[i].comp_range.location =
+             min {compRange[i + 1].location, ...,
                     compRange[glyph_count - 1].location,
                     maxRange (stringRangeForCTRun)}
-             glbuf[i].comp_range.length = maxRange (compRange[i])
-            where compRange[i] is the range of composed characters
-            containing i-th glyph.  */
-         string_range = CTRunGetStringRange (ctrun);
-         min_location = string_range.location + string_range.length;
-         for (i = 0; i < glyph_count; i++)
-           {
-             struct mac_glyph_layout *gl = glbuf + glyph_count - i - 1;
-             CFIndex glyph_index;
-             CFRange rng;
-
-             if (!RIGHT_TO_LEFT_P)
-               glyph_index = glyph_count - i - 1;
-             else
-               glyph_index = i;
-             CTRunGetStringIndices (ctrun, CFRangeMake (glyph_index, 1),
-                                    &gl->string_index);
-             rng =
-               CFStringGetRangeOfComposedCharactersAtIndex (string,
-                                                            gl->string_index);
-             gl->comp_range.location = min_location;
-             gl->comp_range.length = rng.location + rng.length;
-             if (rng.location < min_location)
-               min_location = rng.location;
-           }
-
-         /* Fill the `comp_range' member of struct mac_glyph_layout,
-            and setup a permutation for right-to-left text.  */
-         comp_range = CFRangeMake (string_range.location, 0);
-         range = CFRangeMake (0, 0);
-         while (1)
-           {
-             struct mac_glyph_layout *gl =
-               glbuf + range.location + range.length;
-
-             if (gl->comp_range.length
-                 > comp_range.location + comp_range.length)
-               comp_range.length = gl->comp_range.length - comp_range.location;
-             min_location = gl->comp_range.location;
-             range.length++;
-
-             if (min_location >= comp_range.location + comp_range.length)
-               {
-                 comp_range.length = min_location - comp_range.location;
-                 for (i = 0; i < range.length; i++)
-                   {
-                     glbuf[range.location + i].comp_range = comp_range;
-                     if (RIGHT_TO_LEFT_P)
-                       permutation[range.location + i] =
-                         range.location + range.length - i - 1;
-                   }
-
-                 comp_range = CFRangeMake (min_location, 0);
-                 range.location += range.length;
-                 range.length = 0;
-                 if (range.location == glyph_count)
-                   break;
-               }
-           }
-
-         /* Then fill the remaining members.  */
-         for (range = CFRangeMake (0, 1); range.location < glyph_count;
-              range.location++)
-           {
-             struct mac_glyph_layout *gl;
-             CGPoint position;
-
-             if (!RIGHT_TO_LEFT_P)
-               gl = glbuf + range.location;
-             else
-               {
-                 CFIndex src, dest;
-
-                 src = glyph_count - 1 - range.location;
-                 dest = permutation[src];
-                 gl = glbuf + dest;
-                 if (src < dest)
-                   {
-                     CFIndex tmp = gl->string_index;
-
-                     gl->string_index = glbuf[src].string_index;
-                     glbuf[src].string_index = tmp;
-                   }
-               }
-             CTRunGetGlyphs (ctrun, range, &gl->glyph_id);
-
-             CTRunGetPositions (ctrun, range, &position);
-             gl->advance_delta = position.x - total_advance;
-             gl->baseline_delta = position.y;
-             gl->advance = (gl->advance_delta
-                            + CTRunGetTypographicBounds (ctrun, range,
-                                                         NULL, NULL, NULL));
-             total_advance += gl->advance;
-           }
-
-         if (RIGHT_TO_LEFT_P)
-           xfree (permutation);
+             glbuf[i].comp_range.length = maxRange (compRange[i])
+             where compRange[i] is the range of composed characters
+             containing i-th glyph.  */
+          string_range = CTRunGetStringRange (ctrun);
+          min_location = string_range.location + string_range.length;
+          for (i = 0; i < glyph_count; i++)
+            {
+              struct mac_glyph_layout *gl = glbuf + glyph_count - i - 1;
+              CFIndex glyph_index;
+              CFRange rng;
+
+              if (!RIGHT_TO_LEFT_P)
+                glyph_index = glyph_count - i - 1;
+              else
+                glyph_index = i;
+              CTRunGetStringIndices (ctrun, CFRangeMake (glyph_index, 1),
+                                     &gl->string_index);
+              rng =
+                CFStringGetRangeOfComposedCharactersAtIndex (string,
+                                                             gl->string_index);
+              gl->comp_range.location = min_location;
+              gl->comp_range.length = rng.location + rng.length;
+              if (rng.location < min_location)
+                min_location = rng.location;
+            }
+
+          /* Fill the `comp_range' member of struct mac_glyph_layout,
+             and setup a permutation for right-to-left text.  */
+          comp_range = CFRangeMake (string_range.location, 0);
+          range = CFRangeMake (0, 0);
+          while (1)
+            {
+              struct mac_glyph_layout *gl =
+                glbuf + range.location + range.length;
+
+              if (gl->comp_range.length
+                  > comp_range.location + comp_range.length)
+                comp_range.length = gl->comp_range.length - comp_range.location;
+              min_location = gl->comp_range.location;
+              range.length++;
+
+              if (min_location >= comp_range.location + comp_range.length)
+                {
+                  comp_range.length = min_location - comp_range.location;
+                  for (i = 0; i < range.length; i++)
+                    {
+                      glbuf[range.location + i].comp_range = comp_range;
+                      if (RIGHT_TO_LEFT_P)
+                        permutation[range.location + i] =
+                          range.location + range.length - i - 1;
+                    }
+
+                  comp_range = CFRangeMake (min_location, 0);
+                  range.location += range.length;
+                  range.length = 0;
+                  if (range.location == glyph_count)
+                    break;
+                }
+            }
+
+          /* Then fill the remaining members.  */
+          for (range = CFRangeMake (0, 1); range.location < glyph_count;
+               range.location++)
+            {
+              struct mac_glyph_layout *gl;
+              CGPoint position;
+
+              if (!RIGHT_TO_LEFT_P)
+                gl = glbuf + range.location;
+              else
+                {
+                  CFIndex src, dest;
+
+                  src = glyph_count - 1 - range.location;
+                  dest = permutation[src];
+                  gl = glbuf + dest;
+                  if (src < dest)
+                    {
+                      CFIndex tmp = gl->string_index;
+
+                      gl->string_index = glbuf[src].string_index;
+                      glbuf[src].string_index = tmp;
+                    }
+                }
+              CTRunGetGlyphs (ctrun, range, &gl->glyph_id);
+
+              CTRunGetPositions (ctrun, range, &position);
+              gl->advance_delta = position.x - total_advance;
+              gl->baseline_delta = position.y;
+              gl->advance = (gl->advance_delta
+                             + CTRunGetTypographicBounds (ctrun, range,
+                                                          NULL, NULL, NULL));
+              total_advance += gl->advance;
+            }
+
+          if (RIGHT_TO_LEFT_P)
+            xfree (permutation);
 
 #undef RIGHT_TO_LEFT_P
 
-         total_glyph_count += glyph_count;
-       }
+          total_glyph_count += glyph_count;
+        }
 
       result = used;
     }
@@ -3791,7 +3698,7 @@ mac_ctfont_shape (CTFontRef font, CFStringRef string,
 #if USE_CT_GLYPH_INFO
 static CGGlyph
 mac_ctfont_get_glyph_for_cid (CTFontRef font, CTCharacterCollection collection,
-                             CGFontIndex cid)
+                              CGFontIndex cid)
 {
   CGGlyph result = kCGFontIndexInvalid;
   UniChar characters[] = {0xfffd};
@@ -3800,32 +3707,32 @@ mac_ctfont_get_glyph_for_cid (CTFontRef font, CTCharacterCollection collection,
   CTLineRef ctline = NULL;
 
   string = CFStringCreateWithCharacters (NULL, characters,
-                                        sizeof (characters)
-                                        / sizeof (characters[0]));
+                                         ARRAYELTS (characters));
+
   if (string)
     {
       CTGlyphInfoRef glyph_info =
-       CTGlyphInfoCreateWithCharacterIdentifier (cid, collection, string);
+        CTGlyphInfoCreateWithCharacterIdentifier (cid, collection, string);
       CFDictionaryRef attributes = NULL;
 
       if (glyph_info)
-       {
-         CFStringRef keys[] = {kCTFontAttributeName,
-                               kCTGlyphInfoAttributeName};
-         CFTypeRef values[] = {font, glyph_info};
-
-         attributes = CFDictionaryCreate (NULL, (const void **) keys,
-                                          (const void **) values,
-                                          sizeof (keys) / sizeof (keys[0]),
-                                          &kCFTypeDictionaryKeyCallBacks,
-                                          &kCFTypeDictionaryValueCallBacks);
-         CFRelease (glyph_info);
-       }
+        {
+          CFStringRef keys[] = {kCTFontAttributeName,
+                                kCTGlyphInfoAttributeName};
+          CFTypeRef values[] = {font, glyph_info};
+
+          attributes = CFDictionaryCreate (NULL, (const void **) keys,
+                                           (const void **) values,
+                                           ARRAYELTS (keys),
+                                           &kCFTypeDictionaryKeyCallBacks,
+                                           &kCFTypeDictionaryValueCallBacks);
+          CFRelease (glyph_info);
+        }
       if (attributes)
-       {
-         attr_string = CFAttributedStringCreate (NULL, string, attributes);
-         CFRelease (attributes);
-       }
+        {
+          attr_string = CFAttributedStringCreate (NULL, string, attributes);
+          CFRelease (attributes);
+        }
       CFRelease (string);
     }
   if (attr_string)
@@ -3838,24 +3745,24 @@ mac_ctfont_get_glyph_for_cid (CTFontRef font, CTCharacterCollection collection,
       CFArrayRef runs = CTLineGetGlyphRuns (ctline);
 
       if (CFArrayGetCount (runs) > 0)
-       {
-         CTRunRef run = CFArrayGetValueAtIndex (runs, 0);
-         CFDictionaryRef attributes = CTRunGetAttributes (run);
-
-         if (attributes)
-           {
-             CTFontRef font_in_run =
-               CFDictionaryGetValue (attributes, kCTFontAttributeName);
-
-             if (font_in_run
-                 && mac_ctfont_equal_in_postscript_name (font_in_run, font))
-               {
-                 CTRunGetGlyphs (run, CFRangeMake (0, 1), &result);
-                 if (result >= CTFontGetGlyphCount (font))
-                   result = kCGFontIndexInvalid;
-               }
-           }
-       }
+        {
+          CTRunRef run = CFArrayGetValueAtIndex (runs, 0);
+          CFDictionaryRef attributes = CTRunGetAttributes (run);
+
+          if (attributes)
+            {
+              CTFontRef font_in_run =
+                CFDictionaryGetValue (attributes, kCTFontAttributeName);
+
+              if (font_in_run
+                  && mac_ctfont_equal_in_postscript_name (font_in_run, font))
+                {
+                  CTRunGetGlyphs (run, CFRangeMake (0, 1), &result);
+                  if (result >= CTFontGetGlyphCount (font))
+                    result = kCGFontIndexInvalid;
+                }
+            }
+        }
       CFRelease (ctline);
     }
 
@@ -3863,41 +3770,6 @@ mac_ctfont_get_glyph_for_cid (CTFontRef font, CTCharacterCollection collection,
 }
 #endif
 
-#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
-static inline int
-mac_font_family_group (CFStringRef family)
-{
-  if (CFStringHasPrefix (family, CFSTR ("#")))
-    return 2;
-  else
-    {
-      CFRange range;
-
-      range = CFStringFind (family, CFSTR ("Apple"),
-                           kCFCompareCaseInsensitive | kCFCompareAnchored);
-      if (range.location != kCFNotFound)
-       return 1;
-
-      return 0;
-    }
-}
-
-static CFComparisonResult
-mac_font_family_compare (const void *val1, const void *val2, void *context)
-{
-  CFStringRef family1 = (CFStringRef) val1, family2 = (CFStringRef) val2;
-  int group1, group2;
-
-  group1 = mac_font_family_group (family1);
-  group2 = mac_font_family_group (family2);
-  if (group1 < group2)
-    return kCFCompareLessThan;
-  if (group1 > group2)
-    return kCFCompareGreaterThan;
-  return CFStringCompare (family1, family2, kCFCompareCaseInsensitive);
-}
-#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1060 */
-
 static CFArrayRef
 mac_font_copy_default_descriptors_for_language (CFStringRef language)
 {
@@ -3909,22 +3781,22 @@ mac_font_copy_default_descriptors_for_language (CFStringRef language)
 #endif
     {
       CTFontRef user_font =
-       CTFontCreateUIFontForLanguage (kCTFontUserFontType, 0, language);
+        CTFontCreateUIFontForLanguage (kCTFontUserFontType, 0, language);
 
       if (user_font)
-       {
-         CFArrayRef languages =
-           CFArrayCreate (NULL, (const void **) &language, 1,
-                          &kCFTypeArrayCallBacks);
-
-         if (languages)
-           {
-             result = CTFontCopyDefaultCascadeListForLanguages (user_font,
-                                                                languages);
-             CFRelease (languages);
-           }
-         CFRelease (user_font);
-       }
+        {
+          CFArrayRef languages =
+            CFArrayCreate (NULL, (const void **) &language, 1,
+                           &kCFTypeArrayCallBacks);
+
+          if (languages)
+            {
+              result = CTFontCopyDefaultCascadeListForLanguages (user_font,
+                                                                 languages);
+              CFRelease (languages);
+            }
+          CFRelease (user_font);
+        }
     }
 #if MAC_OS_X_VERSION_MIN_REQUIRED < 1080
   else         /* CTFontCopyDefaultCascadeListForLanguages == NULL */
@@ -3935,55 +3807,55 @@ mac_font_copy_default_descriptors_for_language (CFStringRef language)
       CFIndex i;
 
       for (i = 0; macfont_language_default_font_names[i].language; i++)
-       {
-         if (CFStringCompare (macfont_language_default_font_names[i].language,
-                              language, 0) == kCFCompareEqualTo)
-           {
-             CFMutableArrayRef descriptors =
-               CFArrayCreateMutable (NULL, 0, &kCFTypeArrayCallBacks);
-
-             if (descriptors)
-               {
-                 CFIndex j;
-
-                 for (j = 0;
-                      macfont_language_default_font_names[i].font_names[j];
-                      j++)
-                   {
-                     CFDictionaryRef attributes =
-                       CFDictionaryCreate (NULL,
-                                           ((const void **)
-                                            &MAC_FONT_NAME_ATTRIBUTE),
-                                           ((const void **)
-                                            &macfont_language_default_font_names[i].font_names[j]),
-                                           1, &kCFTypeDictionaryKeyCallBacks,
-                                           &kCFTypeDictionaryValueCallBacks);
-
-                     if (attributes)
-                       {
-                         FontDescriptorRef pat_desc =
-                           mac_font_descriptor_create_with_attributes (attributes);
-
-                         if (pat_desc)
-                           {
-                             FontDescriptorRef descriptor =
-                               mac_font_descriptor_create_matching_font_descriptor (pat_desc, NULL);
-
-                             if (descriptor)
-                               {
-                                 CFArrayAppendValue (descriptors, descriptor);
-                                 CFRelease (descriptor);
-                               }
-                             CFRelease (pat_desc);
-                           }
-                         CFRelease (attributes);
-                       }
-                   }
-                 result = descriptors;
-               }
-             break;
-           }
-       }
+        {
+          if (CFEqual (macfont_language_default_font_names[i].language,
+                       language))
+            {
+              CFMutableArrayRef descriptors =
+                CFArrayCreateMutable (NULL, 0, &kCFTypeArrayCallBacks);
+
+              if (descriptors)
+                {
+                  CFIndex j;
+
+                  for (j = 0;
+                       macfont_language_default_font_names[i].font_names[j];
+                       j++)
+                    {
+                      CFDictionaryRef attributes =
+                        CFDictionaryCreate (NULL,
+                                            ((const void **)
+                                             &MAC_FONT_NAME_ATTRIBUTE),
+                                            ((const void **)
+                                             &macfont_language_default_font_names[i].font_names[j]),
+                                            1, &kCFTypeDictionaryKeyCallBacks,
+                                            &kCFTypeDictionaryValueCallBacks);
+
+                      if (attributes)
+                        {
+                          FontDescriptorRef pat_desc =
+                            mac_font_descriptor_create_with_attributes (attributes);
+
+                          if (pat_desc)
+                            {
+                              FontDescriptorRef descriptor =
+                                mac_font_descriptor_create_matching_font_descriptor (pat_desc, NULL);
+
+                              if (descriptor)
+                                {
+                                  CFArrayAppendValue (descriptors, descriptor);
+                                  CFRelease (descriptor);
+                                }
+                              CFRelease (pat_desc);
+                            }
+                          CFRelease (attributes);
+                        }
+                    }
+                  result = descriptors;
+                }
+              break;
+            }
+        }
     }
 #endif
 
@@ -3992,7 +3864,7 @@ mac_font_copy_default_descriptors_for_language (CFStringRef language)
 
 static CFStringRef
 mac_font_copy_default_name_for_charset_and_languages (CFCharacterSetRef charset,
-                                                     CFArrayRef languages)
+                                                      CFArrayRef languages)
 {
   CFStringRef result = NULL;
   CFStringRef language = CFArrayGetValueAtIndex (languages, 0);
@@ -4004,30 +3876,29 @@ mac_font_copy_default_name_for_charset_and_languages (CFCharacterSetRef charset,
       CFIndex i, count = CFArrayGetCount (descriptors);
 
       for (i = 0; i < count; i++)
-       {
-         FontDescriptorRef descriptor =
-           CFArrayGetValueAtIndex (descriptors, i);
-
-         if (macfont_supports_charset_and_languages_p (descriptor, charset,
-                                                       Qnil, languages))
-           {
-             CFStringRef family =
-               mac_font_descriptor_copy_attribute (descriptor,
-                                                   MAC_FONT_FAMILY_NAME_ATTRIBUTE);
-             if (family)
-               {
-                 if (!CFStringHasPrefix (family, CFSTR ("."))
-                     && (CFStringCompare (family, CFSTR ("LastResort"), 0)
-                         != kCFCompareEqualTo))
-                   {
-                     result = family;
-                     break;
-                   }
-                 else
-                   CFRelease (family);
-               }
-           }
-       }
+        {
+          FontDescriptorRef descriptor =
+            CFArrayGetValueAtIndex (descriptors, i);
+
+          if (macfont_supports_charset_and_languages_p (descriptor, charset,
+                                                        Qnil, languages))
+            {
+              CFStringRef family =
+                mac_font_descriptor_copy_attribute (descriptor,
+                                                    MAC_FONT_FAMILY_NAME_ATTRIBUTE);
+              if (family)
+                {
+                  if (!CFStringHasPrefix (family, CFSTR ("."))
+                      && !CFEqual (family, CFSTR ("LastResort")))
+                    {
+                      result = family;
+                      break;
+                    }
+                  else
+                    CFRelease (family);
+                }
+            }
+        }
       CFRelease (descriptors);
     }
 
@@ -4049,13 +3920,10 @@ mac_register_font_driver (struct frame *f)
   register_font_driver (&macfont_driver, f);
 }
 
-#endif // MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
-
 \f
 void
 syms_of_macfont (void)
 {
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
   static struct font_driver mac_font_driver;
 
   DEFSYM (Qmac_ct, "mac-ct");
@@ -4064,5 +3932,4 @@ syms_of_macfont (void)
 
   DEFSYM (QCdestination, ":destination");
   DEFSYM (QCminspace, ":minspace");
-#endif
 }
index 5bed625ff41b1db0aa5dd9b1a8bd0abb4d33bf79..c3d26d0d5c2d8058e6b1dcb18d5220707c5fb518 100644 (file)
@@ -45,8 +45,6 @@ EMACS_INT executing_kbd_macro_iterations;
 
 Lisp_Object executing_kbd_macro;
 
-Lisp_Object Fexecute_kbd_macro (Lisp_Object macro, Lisp_Object count, Lisp_Object loopfunc);
-\f
 DEFUN ("start-kbd-macro", Fstart_kbd_macro, Sstart_kbd_macro, 1, 2, "P",
        doc: /* Record subsequent keyboard input, defining a keyboard macro.
 The commands are recorded even as they are executed.
@@ -84,28 +82,21 @@ macro before appending to it.  */)
     }
   else
     {
-      ptrdiff_t i;
-      EMACS_INT len;
+      int incr = 30;
+      ptrdiff_t i, len;
       bool cvt;
 
       /* Check the type of last-kbd-macro in case Lisp code changed it.  */
-      CHECK_VECTOR_OR_STRING (KVAR (current_kboard, Vlast_kbd_macro));
-
-      len = XINT (Flength (KVAR (current_kboard, Vlast_kbd_macro)));
+      len = CHECK_VECTOR_OR_STRING (KVAR (current_kboard, Vlast_kbd_macro));
 
       /* Copy last-kbd-macro into the buffer, in case the Lisp code
         has put another macro there.  */
-      if (current_kboard->kbd_macro_bufsize < len + 30)
-       {
-         if (PTRDIFF_MAX < MOST_POSITIVE_FIXNUM + 30
-             && PTRDIFF_MAX < len + 30)
-           memory_full (SIZE_MAX);
-         current_kboard->kbd_macro_buffer =
-           xpalloc (current_kboard->kbd_macro_buffer,
-                    &current_kboard->kbd_macro_bufsize,
-                    len + 30 - current_kboard->kbd_macro_bufsize, -1,
-                    sizeof *current_kboard->kbd_macro_buffer);
-       }
+      if (current_kboard->kbd_macro_bufsize - incr < len)
+       current_kboard->kbd_macro_buffer =
+         xpalloc (current_kboard->kbd_macro_buffer,
+                  &current_kboard->kbd_macro_bufsize,
+                  len - current_kboard->kbd_macro_bufsize + incr, -1,
+                  sizeof *current_kboard->kbd_macro_buffer);
 
       /* Must convert meta modifier when copying string to vector.  */
       cvt = STRINGP (KVAR (current_kboard, Vlast_kbd_macro));
index 91fcea5f25fde17f271ce093119379a9f590538e..d377efbc4faf10ea0711e887f37017584d5a23ba 100644 (file)
@@ -455,21 +455,8 @@ attach_marker (struct Lisp_Marker *m, struct buffer *b,
 static struct buffer *
 live_buffer (Lisp_Object buffer)
 {
-  struct buffer *b;
-
-  if (NILP (buffer))
-    {
-      b = current_buffer;
-      eassert (BUFFER_LIVE_P (b));
-    }
-  else
-    {
-      CHECK_BUFFER (buffer);
-      b = XBUFFER (buffer);
-      if (!BUFFER_LIVE_P (b))
-       b = NULL;
-    }
-  return b;
+  struct buffer *b = decode_buffer (buffer);
+  return BUFFER_LIVE_P (b) ? b : NULL;
 }
 
 /* Internal function to set MARKER in BUFFER at POSITION.  Non-zero
index 654be0db9c7cbbdbe9f98ae9100f8016f06e2616..61163ae02167035257aa5f0b995e37ab28d479ff 100644 (file)
@@ -66,9 +66,6 @@ Lisp_Object menu_items;
 
 /* If non-nil, means that the global vars defined here are already in use.
    Used to detect cases where we try to re-enter this non-reentrant code.  */
-#if ! (defined USE_GTK || defined USE_MOTIF)
-static
-#endif
 Lisp_Object menu_items_inuse;
 
 /* Number of slots currently allocated in menu_items.  */
@@ -357,7 +354,7 @@ single_menu_item (Lisp_Object key, Lisp_Object item, Lisp_Object dummy, void *sk
      front of them.  */
   if (!have_boxes ())
     {
-      Lisp_Object prefix = Qnil;
+      char const *prefix = 0;
       Lisp_Object type = AREF (item_properties, ITEM_PROPERTY_TYPE);
       if (!NILP (type))
        {
@@ -392,8 +389,11 @@ single_menu_item (Lisp_Object key, Lisp_Object item, Lisp_Object dummy, void *sk
                    {
                      if (!submenu && SREF (tem, 0) != '\0'
                          && SREF (tem, 0) != '-')
-                       ASET (menu_items, idx + MENU_ITEMS_ITEM_NAME,
-                             concat2 (build_string ("    "), tem));
+                       {
+                         AUTO_STRING (spaces, "    ");
+                         ASET (menu_items, idx + MENU_ITEMS_ITEM_NAME,
+                               concat2 (spaces, tem));
+                       }
                      idx += MENU_ITEMS_ITEM_LENGTH;
                    }
                }
@@ -402,24 +402,30 @@ single_menu_item (Lisp_Object key, Lisp_Object item, Lisp_Object dummy, void *sk
 
          /* Calculate prefix, if any, for this item.  */
          if (EQ (type, QCtoggle))
-           prefix = build_string (NILP (selected) ? "[ ] " : "[X] ");
+           prefix = NILP (selected) ? "[ ] " : "[X] ";
          else if (EQ (type, QCradio))
-           prefix = build_string (NILP (selected) ? "( ) " : "(*) ");
+           prefix = NILP (selected) ? "( ) " : "(*) ";
        }
       /* Not a button. If we have earlier buttons, then we need a prefix.  */
       else if (!skp->notbuttons && SREF (item_string, 0) != '\0'
               && SREF (item_string, 0) != '-')
-       prefix = build_string ("    ");
+       prefix = "    ";
 
-      if (!NILP (prefix))
-       item_string = concat2 (prefix, item_string);
+      if (prefix)
+       {
+         AUTO_STRING (prefix_obj, prefix);
+         item_string = concat2 (prefix_obj, item_string);
+       }
   }
 
   if ((FRAME_TERMCAP_P (XFRAME (Vmenu_updating_frame))
        || FRAME_MSDOS_P (XFRAME (Vmenu_updating_frame)))
       && !NILP (map))
     /* Indicate visually that this is a submenu.  */
-    item_string = concat2 (item_string, build_string (" >"));
+    {
+      AUTO_STRING (space_gt, " >");
+      item_string = concat2 (item_string, space_gt);
+    }
 
   push_menu_item (item_string, enabled, key,
                  AREF (item_properties, ITEM_PROPERTY_DEF),
@@ -576,21 +582,26 @@ parse_single_submenu (Lisp_Object item_key, Lisp_Object item_name,
 \f
 #if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NS) || defined (HAVE_NTGUI)
 
-/* Allocate a widget_value, blocking input.  */
+/* Allocate and basically initialize widget_value, blocking input.  */
 
 widget_value *
-xmalloc_widget_value (void)
+make_widget_value (const char *name, char *value,
+                  bool enabled, Lisp_Object help)
 {
-  widget_value *value;
+  widget_value *wv;
 
   block_input ();
-  value = malloc_widget_value ();
+  wv = xzalloc (sizeof (widget_value));
   unblock_input ();
 
-  return value;
+  wv->name = (char *) name;
+  wv->value = value;
+  wv->enabled = enabled;
+  wv->help = help;
+  return wv;
 }
 
-/* This recursively calls free_widget_value on the tree of widgets.
+/* This recursively calls xfree on the tree of widgets.
    It must free all data that was malloc'ed for these widget_values.
    In Emacs, many slots are pointers into the data of Lisp_Strings, and
    must be left alone.  */
@@ -613,7 +624,7 @@ free_menubar_widget_value_tree (widget_value *wv)
       wv->next = (widget_value *) 0xDEADBEEF;
     }
   block_input ();
-  free_widget_value (wv);
+  xfree (wv);
   unblock_input ();
 }
 
@@ -630,14 +641,11 @@ digest_single_submenu (int start, int end, bool top_level_items)
   widget_value **submenu_stack;
   bool panes_seen = 0;
   struct frame *f = XFRAME (Vmenu_updating_frame);
+  USE_SAFE_ALLOCA;
 
-  submenu_stack = alloca (menu_items_used * sizeof *submenu_stack);
-  wv = xmalloc_widget_value ();
-  wv->name = "menu";
-  wv->value = 0;
-  wv->enabled = 1;
+  SAFE_NALLOCA (submenu_stack, 1, menu_items_used);
+  wv = make_widget_value ("menu", NULL, true, Qnil);
   wv->button_type = BUTTON_TYPE_NONE;
-  wv->help = Qnil;
   first_wv = wv;
   save_wv = 0;
   prev_wv = 0;
@@ -721,17 +729,14 @@ digest_single_submenu (int start, int end, bool top_level_items)
             with its items as a submenu beneath it.  */
          if (strcmp (pane_string, ""))
            {
-             wv = xmalloc_widget_value ();
+             /* Set value to 1 so update_submenu_strings can handle '@'.  */
+             wv = make_widget_value (NULL, (char *) 1, true, Qnil);
              if (save_wv)
                save_wv->next = wv;
              else
                first_wv->contents = wv;
              wv->lname = pane_name;
-              /* Set value to 1 so update_submenu_strings can handle '@'  */
-             wv->value = (char *)1;
-             wv->enabled = 1;
              wv->button_type = BUTTON_TYPE_NONE;
-             wv->help = Qnil;
              save_wv = wv;
            }
          else
@@ -805,7 +810,8 @@ digest_single_submenu (int start, int end, bool top_level_items)
 #endif
            }
 
-         wv = xmalloc_widget_value ();
+         wv = make_widget_value (NULL, NULL, !NILP (enable),
+                                 STRINGP (help) ? help : Qnil);
          if (prev_wv)
            prev_wv->next = wv;
          else
@@ -814,11 +820,9 @@ digest_single_submenu (int start, int end, bool top_level_items)
          wv->lname = item_name;
          if (!NILP (descrip))
            wv->lkey = descrip;
-         wv->value = 0;
          /* The intptr_t cast avoids a warning.  There's no problem
             as long as pointers have enough bits to hold small integers.  */
          wv->call_data = (!NILP (def) ? (void *) (intptr_t) i : 0);
-         wv->enabled = !NILP (enable);
 
          if (NILP (type))
            wv->button_type = BUTTON_TYPE_NONE;
@@ -830,10 +834,6 @@ digest_single_submenu (int start, int end, bool top_level_items)
            emacs_abort ();
 
          wv->selected = !NILP (selected);
-         if (! STRINGP (help))
-           help = Qnil;
-
-         wv->help = help;
 
          prev_wv = wv;
 
@@ -845,11 +845,12 @@ digest_single_submenu (int start, int end, bool top_level_items)
      that was originally a button, return it by itself.  */
   if (top_level_items && first_wv->contents && first_wv->contents->next == 0)
     {
-      wv = first_wv->contents;
-      free_widget_value (first_wv);
-      return wv;
+      wv = first_wv;
+      first_wv = first_wv->contents;
+      xfree (wv);
     }
 
+  SAFE_FREE ();
   return first_wv;
 }
 
@@ -900,9 +901,10 @@ find_and_call_menu_selection (struct frame *f, int menu_bar_items_used,
   Lisp_Object *subprefix_stack;
   int submenu_depth = 0;
   int i;
+  USE_SAFE_ALLOCA;
 
   entry = Qnil;
-  subprefix_stack = alloca (menu_bar_items_used * sizeof *subprefix_stack);
+  SAFE_NALLOCA (subprefix_stack, 1, menu_bar_items_used);
   prefix = Qnil;
   i = 0;
 
@@ -964,11 +966,13 @@ find_and_call_menu_selection (struct frame *f, int menu_bar_items_used,
              buf.arg = entry;
              kbd_buffer_store_event (&buf);
 
-             return;
+             break;
            }
          i += MENU_ITEMS_ITEM_LENGTH;
        }
     }
+
+  SAFE_FREE ();
 }
 
 #endif /* USE_X_TOOLKIT || USE_GTK || HAVE_NS || HAVE_NTGUI */
@@ -983,10 +987,11 @@ find_and_return_menu_selection (struct frame *f, bool keymaps, void *client_data
   int i;
   Lisp_Object *subprefix_stack;
   int submenu_depth = 0;
+  USE_SAFE_ALLOCA;
 
   prefix = entry = Qnil;
   i = 0;
-  subprefix_stack = alloca (menu_items_used * word_size);
+  SAFE_ALLOCA_LISP (subprefix_stack, menu_items_used);
 
   while (i < menu_items_used)
     {
@@ -1028,11 +1033,13 @@ find_and_return_menu_selection (struct frame *f, bool keymaps, void *client_data
                     if (!NILP (subprefix_stack[j]))
                       entry = Fcons (subprefix_stack[j], entry);
                 }
+             SAFE_FREE ();
               return entry;
             }
           i += MENU_ITEMS_ITEM_LENGTH;
         }
     }
+  SAFE_FREE ();
   return Qnil;
 }
 #endif  /* HAVE_NS */
@@ -1168,9 +1175,7 @@ no quit occurs and `x-popup-menu' returns nil.  */)
   Lisp_Object selection = Qnil;
   struct frame *f = NULL;
   Lisp_Object x, y, window;
-  bool keymaps = 0;
-  bool for_click = 0;
-  bool kbd_menu_navigation = 0;
+  int menuflags = 0;
   ptrdiff_t specpdl_count = SPECPDL_INDEX ();
   struct gcpro gcpro1;
 
@@ -1200,12 +1205,12 @@ no quit occurs and `x-popup-menu' returns nil.  */)
          }
        else
          {
-           for_click = 1;
+           menuflags |= MENU_FOR_CLICK;
            tem = Fcar (Fcdr (position));  /* EVENT_START (position) */
            window = Fcar (tem);             /* POSN_WINDOW (tem) */
            tem2 = Fcar (Fcdr (tem));        /* POSN_POSN (tem) */
-           /* The kbd_menu_navigation flag is set when the menu was
-              invoked by F10, which probably means they have no
+           /* The MENU_KBD_NAVIGATION field is set when the menu
+              was invoked by F10, which probably means they have no
               mouse.  In that case, we let them switch between
               top-level menu-bar menus by using C-f/C-b and
               horizontal arrow keys, since they cannot click the
@@ -1218,7 +1223,7 @@ no quit occurs and `x-popup-menu' returns nil.  */)
            if (!EQ (POSN_POSN (last_nonmenu_event),
                     POSN_POSN (position))
                && CONSP (tem2) && EQ (Fcar (tem2), Qmenu_bar))
-             kbd_menu_navigation = 1;
+             menuflags |= MENU_KBD_NAVIGATION;
            tem = Fcar (Fcdr (Fcdr (tem))); /* POSN_WINDOW_POSN (tem) */
            x = Fcar (tem);
            y = Fcdr (tem);
@@ -1245,7 +1250,7 @@ no quit occurs and `x-popup-menu' returns nil.  */)
          {
            int cur_x, cur_y;
 
-           mouse_position_for_popup (new_f, &cur_x, &cur_y);
+           x_relative_mouse_position (new_f, &cur_x, &cur_y);
            /* cur_x/y may be negative, so use make_number.  */
            x = make_number (cur_x);
            y = make_number (cur_y);
@@ -1347,7 +1352,7 @@ no quit occurs and `x-popup-menu' returns nil.  */)
       if (!NILP (prompt) && menu_items_n_panes >= 0)
        ASET (menu_items, MENU_ITEMS_PANE_NAME, prompt);
 
-      keymaps = 1;
+      menuflags |= MENU_KEYMAPS;
     }
   else if (CONSP (menu) && KEYMAPP (XCAR (menu)))
     {
@@ -1380,7 +1385,7 @@ no quit occurs and `x-popup-menu' returns nil.  */)
       if (!NILP (title) && menu_items_n_panes >= 0)
        ASET (menu_items, MENU_ITEMS_PANE_NAME, title);
 
-      keymaps = 1;
+      menuflags |= MENU_KEYMAPS;
 
       SAFE_FREE ();
     }
@@ -1392,7 +1397,7 @@ no quit occurs and `x-popup-menu' returns nil.  */)
 
       list_of_panes (Fcdr (menu));
 
-      keymaps = 0;
+      menuflags &= ~MENU_KEYMAPS;
     }
 
   unbind_to (specpdl_count, Qnil);
@@ -1422,40 +1427,12 @@ no quit occurs and `x-popup-menu' returns nil.  */)
   record_unwind_protect_void (discard_menu_items);
 #endif
 
-  /* Display them in a menu.  */
-
-  /* FIXME: Use a terminal hook!  */
-#if defined HAVE_NTGUI
-  if (FRAME_W32_P (f))
-    selection = w32_menu_show (f, xpos, ypos, for_click,
-                              keymaps, title, &error_name);
-  else
-#endif
-#if defined HAVE_NS
-  if (FRAME_NS_P (f))
-    selection = ns_menu_show (f, xpos, ypos, for_click,
-                             keymaps, title, &error_name);
-  else
-#endif
-#if (defined (HAVE_X_WINDOWS) || defined (MSDOS))
-  if (FRAME_X_P (f) || FRAME_MSDOS_P (f))
-    selection = xmenu_show (f, xpos, ypos, for_click,
-                           keymaps, title, &error_name);
-  else
-#endif
-#ifndef MSDOS
-  if (FRAME_TERMCAP_P (f))
-    {
-      ptrdiff_t count1 = SPECPDL_INDEX ();
-
-      /* Avoid crashes if, e.g., another client will connect while we
-        are in a menu.  */
-      temporarily_switch_to_single_kboard (f);
-      selection = tty_menu_show (f, xpos, ypos, for_click, keymaps, title,
-                                kbd_menu_navigation, &error_name);
-      unbind_to (count1, Qnil);
-    }
-#endif
+  /* Display them in a menu, but not if F is the initial frame that
+     doesn't have its hooks set (e.g., in a batch session), because
+     such a frame cannot display menus.  */
+  if (!FRAME_INITIAL_P (f))
+    selection = FRAME_TERMINAL (f)->menu_show_hook (f, xpos, ypos, menuflags,
+                                                   title, &error_name);
 
 #ifdef HAVE_NS
   unbind_to (specpdl_count, Qnil);
@@ -1474,6 +1451,38 @@ no quit occurs and `x-popup-menu' returns nil.  */)
   return selection;
 }
 
+/* If F's terminal is not capable of displaying a popup dialog,
+   emulate it with a menu.  */
+
+static Lisp_Object
+emulate_dialog_with_menu (struct frame *f, Lisp_Object contents)
+{
+  Lisp_Object x, y, frame, newpos, prompt = Fcar (contents);
+  int x_coord, y_coord;
+
+  if (FRAME_WINDOW_P (f))
+    {
+      x_coord = FRAME_PIXEL_WIDTH (f);
+      y_coord = FRAME_PIXEL_HEIGHT (f);
+    }
+  else
+    {
+      x_coord = FRAME_COLS (f);
+      /* Center the title at frame middle.  (TTY menus have
+        their upper-left corner at the given position.)  */
+      if (STRINGP (prompt))
+       x_coord -= SCHARS (prompt);
+      y_coord = FRAME_TOTAL_LINES (f);
+    }
+
+  XSETFRAME (frame, f);
+  XSETINT (x, x_coord / 2);
+  XSETINT (y, y_coord / 2);
+  newpos = list2 (list2 (x, y), frame);
+
+  return Fx_popup_menu (newpos, list2 (prompt, contents));
+}
+
 DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 3, 0,
        doc: /* Pop up a dialog box and return user's selection.
 POSITION specifies which frame to use.
@@ -1506,24 +1515,7 @@ for instance using the window manager, then this produces a quit and
   if (EQ (position, Qt)
       || (CONSP (position) && (EQ (XCAR (position), Qmenu_bar)
                               || EQ (XCAR (position), Qtool_bar))))
-    {
-#if 0 /* Using the frame the mouse is on may not be right.  */
-      /* Use the mouse's current position.  */
-      struct frame *new_f = SELECTED_FRAME ();
-      Lisp_Object bar_window;
-      enum scroll_bar_part part;
-      Time time;
-      Lisp_Object x, y;
-
-      (*mouse_position_hook) (&new_f, 1, &bar_window, &part, &x, &y, &time);
-
-      if (new_f != 0)
-       XSETFRAME (window, new_f);
-      else
-       window = selected_window;
-#endif
-      window = selected_window;
-    }
+    window = selected_window;
   else if (CONSP (position))
     {
       Lisp_Object tem = XCAR (position);
@@ -1570,51 +1562,21 @@ for instance using the window manager, then this produces a quit and
      string contents, because Fredisplay may GC and relocate them.  */
   Fredisplay (Qt);
 
-#if defined USE_X_TOOLKIT || defined USE_GTK
-  if (FRAME_WINDOW_P (f))
-    return xw_popup_dialog (f, header, contents);
-#endif
-#ifdef HAVE_NTGUI
-  if (FRAME_W32_P (f))
+  /* Display the popup dialog by a terminal-specific hook ... */
+  if (FRAME_TERMINAL (f)->popup_dialog_hook)
     {
-      Lisp_Object selection = w32_popup_dialog (f, header, contents);
-
+      Lisp_Object selection
+       = FRAME_TERMINAL (f)->popup_dialog_hook (f, header, contents);
+#ifdef HAVE_NTGUI
+      /* NTGUI supports only simple dialogs with Yes/No choices.  For
+        other dialogs, it returns the symbol 'unsupported--w32-dialog',
+        as a signal for the caller to fall back to the emulation code.  */
       if (!EQ (selection, Qunsupported__w32_dialog))
+#endif
        return selection;
     }
-#endif
-#ifdef HAVE_NS
-  if (FRAME_NS_P (f))
-    return ns_popup_dialog (position, header, contents);
-#endif
-  /* Display a menu with these alternatives
-     in the middle of frame F.  */
-  {
-    Lisp_Object x, y, frame, newpos, prompt;
-    int x_coord, y_coord;
-
-    prompt = Fcar (contents);
-    if (FRAME_WINDOW_P (f))
-      {
-       x_coord = FRAME_PIXEL_WIDTH (f);
-       y_coord = FRAME_PIXEL_HEIGHT (f);
-      }
-    else
-      {
-       x_coord = FRAME_COLS (f);
-       /* Center the title at frame middle.  (TTY menus have their
-          upper-left corner at the given position.)  */
-       if (STRINGP (prompt))
-         x_coord -= SCHARS (prompt);
-       y_coord = FRAME_LINES (f);
-      }
-    XSETFRAME (frame, f);
-    XSETINT (x, x_coord / 2);
-    XSETINT (y, y_coord / 2);
-    newpos = list2 (list2 (x, y), frame);
-
-    return Fx_popup_menu (newpos, list2 (prompt, contents));
-  }
+  /* ... or emulate it with a menu.  */
+  return emulate_dialog_with_menu (f, contents);
 }
 
 void
index 429dcfa62211af65765ef200707e2c66bcce6e85..4dd7f17dca6feabdb1bcab73b437783a218ce690 100644 (file)
@@ -20,14 +20,19 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #define MENU_H
 
 #include "systime.h" /* for Time */
+#include "../lwlib/lwlib-widget.h"
 
 #ifdef HAVE_NTGUI
 extern Lisp_Object Qunsupported__w32_dialog;
 #endif
 
-extern void x_set_menu_bar_lines (struct frame *f,
-                                  Lisp_Object value,
-                                  Lisp_Object oldval);
+/* Bit fields used by terminal-specific menu_show_hook.  */
+
+enum {
+  MENU_KEYMAPS = 0x1,
+  MENU_FOR_CLICK = 0x2,
+  MENU_KBD_NAVIGATION = 0x4
+};
 
 extern void init_menu_items (void);
 extern void finish_menu_items (void) ATTRIBUTE_CONST;
@@ -41,21 +46,23 @@ extern void free_menubar_widget_value_tree (widget_value *);
 extern void update_submenu_strings (widget_value *);
 extern void find_and_call_menu_selection (struct frame *, int,
                                           Lisp_Object, void *);
-extern widget_value *xmalloc_widget_value (void);
+extern widget_value *make_widget_value (const char *, char *, bool, Lisp_Object);
 extern widget_value *digest_single_submenu (int, int, bool);
 #endif
 
-#ifdef HAVE_X_WINDOWS
-extern void mouse_position_for_popup (struct frame *f, int *x, int *y);
+#if defined (HAVE_X_WINDOWS) || defined (MSDOS)
+extern Lisp_Object x_menu_show (struct frame *, int, int, int,
+                               Lisp_Object, const char **);
 #endif
-
-extern Lisp_Object w32_menu_show (struct frame *, int, int, int, int,
+#ifdef HAVE_NTGUI
+extern Lisp_Object w32_menu_show (struct frame *, int, int, int,
                                  Lisp_Object, const char **);
-extern Lisp_Object ns_menu_show (struct frame *, int, int, bool, bool,
+#endif
+#ifdef HAVE_NS
+extern Lisp_Object ns_menu_show (struct frame *, int, int, int,
                                 Lisp_Object, const char **);
-extern Lisp_Object xmenu_show (struct frame *, int, int, bool, bool,
-                              Lisp_Object, const char **);
-extern Lisp_Object tty_menu_show (struct frame *, int, int, bool, bool,
-                                 Lisp_Object, bool, const char **);
+#endif
+extern Lisp_Object tty_menu_show (struct frame *, int, int, int,
+                                 Lisp_Object, const char **);
 extern ptrdiff_t menu_item_width (const unsigned char *);
 #endif /* MENU_H */
index c3fcbeb59c7d69c3b32cab8e4f8e35f63fcdf113..0b455157d52a46752836670de43bdf69ed7d233e 100644 (file)
@@ -22,6 +22,8 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <errno.h>
 #include <stdio.h>
 
+#include <binary-io.h>
+
 #include "lisp.h"
 #include "commands.h"
 #include "character.h"
@@ -34,6 +36,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "intervals.h"
 #include "keymap.h"
 #include "termhooks.h"
+#include "systty.h"
 
 /* List of buffers for use as minibuffers.
    The first element of the list is used for the outermost minibuffer
@@ -224,6 +227,22 @@ read_minibuf_noninteractive (Lisp_Object map, Lisp_Object initial,
   char *line;
   Lisp_Object val;
   int c;
+  unsigned char hide_char = 0;
+  struct emacs_tty etty;
+  bool etty_valid;
+
+  /* Check, whether we need to suppress echoing.  */
+  if (CHARACTERP (Vread_hide_char))
+    hide_char = XFASTINT (Vread_hide_char);
+
+  /* Manipulate tty.  */
+  if (hide_char)
+    {
+      etty_valid = emacs_get_tty (fileno (stdin), &etty) == 0;
+      if (etty_valid)
+       set_binary_mode (fileno (stdin), O_BINARY);
+      suppress_echo_on_tty (fileno (stdin));
+    }
 
   fprintf (stdout, "%s", SDATA (prompt));
   fflush (stdout);
@@ -233,7 +252,7 @@ read_minibuf_noninteractive (Lisp_Object map, Lisp_Object initial,
   len = 0;
   line = xmalloc (size);
 
-  while ((c = getchar ()) != '\n')
+  while ((c = getchar ()) != '\n' && c != '\r')
     {
       if (c == EOF)
        {
@@ -242,6 +261,8 @@ read_minibuf_noninteractive (Lisp_Object map, Lisp_Object initial,
        }
       else
        {
+         if (hide_char)
+           fprintf (stdout, "%c", hide_char);
          if (len == size)
            {
              if (STRING_BYTES_BOUND / 2 < size)
@@ -253,7 +274,18 @@ read_minibuf_noninteractive (Lisp_Object map, Lisp_Object initial,
        }
     }
 
-  if (len || c == '\n')
+  /* Reset tty.  */
+  if (hide_char)
+    {
+      fprintf (stdout, "\n");
+      if (etty_valid)
+       {
+         emacs_set_tty (fileno (stdin), &etty, 0);
+         set_binary_mode (fileno (stdin), O_TEXT);
+       }
+    }
+
+  if (len || c == '\n' || c == '\r')
     {
       val = make_string (line, len);
       xfree (line);
@@ -619,6 +651,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
   set_window_buffer (minibuf_window, Fcurrent_buffer (), 0, 0);
   Fselect_window (minibuf_window, Qnil);
   XWINDOW (minibuf_window)->hscroll = 0;
+  XWINDOW (minibuf_window)->suspend_auto_hscroll = 0;
 
   Fmake_local_variable (Qprint_escape_newlines);
   print_escape_newlines = 1;
@@ -1090,7 +1123,7 @@ If `read-buffer-function' is non-nil, this works by calling it as a
 function, instead of the usual behavior.  */)
   (Lisp_Object prompt, Lisp_Object def, Lisp_Object require_match)
 {
-  Lisp_Object args[4], result;
+  Lisp_Object result;
   char *s;
   ptrdiff_t len;
   ptrdiff_t count = SPECPDL_INDEX ();
@@ -1124,10 +1157,10 @@ function, instead of the usual behavior.  */)
                                              STRING_MULTIBYTE (prompt));
            }
 
-         args[0] = build_string ("%s (default %s): ");
-         args[1] = prompt;
-         args[2] = CONSP (def) ? XCAR (def) : def;
-         prompt = Fformat (3, args);
+         AUTO_STRING (format, "%s (default %s): ");
+         prompt = Fformat (3, ((Lisp_Object [])
+                               {format, prompt,
+                                CONSP (def) ? XCAR (def) : def}));
        }
 
       result = Fcompleting_read (prompt, intern ("internal-complete-buffer"),
@@ -1135,13 +1168,8 @@ function, instead of the usual behavior.  */)
                                 Qbuffer_name_history, def, Qnil);
     }
   else
-    {
-      args[0] = Vread_buffer_function;
-      args[1] = prompt;
-      args[2] = def;
-      args[3] = require_match;
-      result = Ffuncall (4, args);
-    }
+    result = Ffuncall (4, ((Lisp_Object [])
+      { Vread_buffer_function, prompt, def, require_match }));
   return unbind_to (count, result);
 }
 \f
@@ -1970,7 +1998,7 @@ A value of t means no truncation.
 This variable only affects history lists that don't specify their own
 maximum lengths.  Setting the `history-length' property of a history
 variable overrides this default.  */);
-  XSETFASTINT (Vhistory_length, 30);
+  XSETFASTINT (Vhistory_length, 100);
 
   DEFVAR_BOOL ("history-delete-duplicates", history_delete_duplicates,
               doc: /* Non-nil means to delete duplicates in history.
@@ -2079,6 +2107,12 @@ properties.  */);
      initialization-order problems.  */
   Vminibuffer_prompt_properties = list2 (intern_c_string ("read-only"), Qt);
 
+  DEFVAR_LISP ("read-hide-char", Vread_hide_char,
+              doc: /* Whether to hide input characters in noninteractive mode.
+It must be a character, which will be used to mask the input
+characters.  This variable should never be set globally.  */);
+  Vread_hide_char = Qnil;
+
   defsubr (&Sactive_minibuffer_window);
   defsubr (&Sset_minibuffer_window);
   defsubr (&Sread_from_minibuffer);
index 010a0a3746c7f2ee5d7bb4081a2fe4aa7fdfb040..14c2624114d06704ce83be9d186ddac9588f3269 100644 (file)
@@ -71,6 +71,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "coding.h"
 #include "disptab.h"
 #include "window.h"
+#include "menu.h"
 #include "buffer.h"
 #include "commands.h"
 #include "blockinput.h"
@@ -566,7 +567,7 @@ dos_set_window_size (int *rows, int *cols)
       };
       int i = 0;
 
-      while (i < sizeof (std_dimension) / sizeof (std_dimension[0]))
+      while (i < ARRAYELTS (std_dimension))
        {
         if (std_dimension[i].need_vga <= have_vga
             && std_dimension[i].rows >= *rows)
@@ -1791,7 +1792,7 @@ internal_terminal_init (void)
        }
 
       Vinitial_window_system = Qpc;
-      Vwindow_system_version = make_number (24); /* RE Emacs version */
+      Vwindow_system_version = make_number (25); /* RE Emacs version */
       tty->terminal->type = output_msdos_raw;
 
       /* If Emacs was dumped on DOS/V machine, forget the stale VRAM
@@ -1863,6 +1864,7 @@ initialize_msdos_display (struct terminal *term)
   term->update_end_hook = IT_update_end;
   term->frame_up_to_date_hook = IT_frame_up_to_date;
   term->mouse_position_hook = 0; /* set later by dos_ttraw */
+  term->menu_show_hook = x_menu_show;
   term->frame_rehighlight_hook = 0;
   term->frame_raise_lower_hook = 0;
   term->set_vertical_scroll_bar_hook = 0;
@@ -3455,7 +3457,7 @@ init_environment (int argc, char **argv, int skip_args)
   static const char * const tempdirs[] = {
     "$TMPDIR", "$TEMP", "$TMP", "c:/"
   };
-  const int imax = sizeof (tempdirs) / sizeof (tempdirs[0]);
+  const int imax = ARRAYELTS (tempdirs);
 
   /* Make sure they have a usable $TMPDIR.  Many Emacs functions use
      temporary files and assume "/tmp" if $TMPDIR is unset, which
@@ -4015,103 +4017,6 @@ unsetenv (const char *name)
 #endif
 
 \f
-#if __DJGPP__ == 2 && __DJGPP_MINOR__ < 2
-
-/* Augment DJGPP library POSIX signal functions.  This is needed
-   as of DJGPP v2.01, but might be in the library in later releases. */
-
-#include <libc/bss.h>
-
-/* A counter to know when to re-initialize the static sets.  */
-static int sigprocmask_count = -1;
-
-/* Which signals are currently blocked (initially none).  */
-static sigset_t current_mask;
-
-/* Which signals are pending (initially none).  */
-static sigset_t msdos_pending_signals;
-
-/* Previous handlers to restore when the blocked signals are unblocked.  */
-typedef void (*sighandler_t)(int);
-static sighandler_t prev_handlers[320];
-
-/* A signal handler which just records that a signal occurred
-   (it will be raised later, if and when the signal is unblocked).  */
-static void
-sig_suspender (int signo)
-{
-  sigaddset (&msdos_pending_signals, signo);
-}
-
-int
-sigprocmask (int how, const sigset_t *new_set, sigset_t *old_set)
-{
-  int signo;
-  sigset_t new_mask;
-
-  /* If called for the first time, initialize.  */
-  if (sigprocmask_count != __bss_count)
-    {
-      sigprocmask_count = __bss_count;
-      sigemptyset (&msdos_pending_signals);
-      sigemptyset (&current_mask);
-      for (signo = 0; signo < 320; signo++)
-       prev_handlers[signo] = SIG_ERR;
-    }
-
-  if (old_set)
-    *old_set = current_mask;
-
-  if (new_set == 0)
-    return 0;
-
-  if (how != SIG_BLOCK && how != SIG_UNBLOCK && how != SIG_SETMASK)
-    {
-      errno = EINVAL;
-      return -1;
-    }
-
-  sigemptyset (&new_mask);
-
-  /* DJGPP supports upto 320 signals.  */
-  for (signo = 0; signo < 320; signo++)
-    {
-      if (sigismember (&current_mask, signo))
-       sigaddset (&new_mask, signo);
-      else if (sigismember (new_set, signo) && how != SIG_UNBLOCK)
-       {
-         sigaddset (&new_mask, signo);
-
-         /* SIGKILL is silently ignored, as on other platforms.  */
-         if (signo != SIGKILL && prev_handlers[signo] == SIG_ERR)
-           prev_handlers[signo] = signal (signo, sig_suspender);
-       }
-      if ((   how == SIG_UNBLOCK
-             && sigismember (&new_mask, signo)
-             && sigismember (new_set, signo))
-         || (how == SIG_SETMASK
-             && sigismember (&new_mask, signo)
-             && !sigismember (new_set, signo)))
-       {
-         sigdelset (&new_mask, signo);
-         if (prev_handlers[signo] != SIG_ERR)
-           {
-             signal (signo, prev_handlers[signo]);
-             prev_handlers[signo] = SIG_ERR;
-           }
-         if (sigismember (&msdos_pending_signals, signo))
-           {
-             sigdelset (&msdos_pending_signals, signo);
-             raise (signo);
-           }
-       }
-    }
-  current_mask = new_mask;
-  return 0;
-}
-
-#endif /* not __DJGPP_MINOR__ < 2 */
-
 #ifndef HAVE_SELECT
 #include "sysselect.h"
 
@@ -4258,15 +4163,7 @@ msdos_abort (void)
   dos_ttcooked ();
   ScreenSetCursor (10, 0);
   cputs ("\r\n\nEmacs aborted!\r\n");
-#if __DJGPP__ == 2 && __DJGPP_MINOR__ < 2
-  if (screen_virtual_segment)
-    dosv_refresh_virtual_screen (2 * 10 * screen_size_X, 4 * screen_size_X);
-  /* Generate traceback, so we could tell whodunit.  */
-  signal (SIGINT, SIG_DFL);
-  __asm__ __volatile__ ("movb $0x1b,%al;call ___djgpp_hw_exception");
-#else  /* __DJGPP_MINOR__ >= 2 */
   raise (SIGABRT);
-#endif /* __DJGPP_MINOR__ >= 2 */
   exit (2);
 }
 
index 58746aed9faeedf3d99d1941e69097d0e2b245a5..a93b272440357318275cc9b6716fcc5f309aa44e 100644 (file)
@@ -46,10 +46,8 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu)
 
 #ifdef NS_IMPL_COCOA
 #include <IOKit/graphics/IOGraphicsLib.h>
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
 #include "macfont.h"
 #endif
-#endif
 
 #if 0
 int fns_trace_num = 1;
@@ -73,15 +71,15 @@ extern Lisp_Object Qicon_type;
 extern Lisp_Object Qicon_name;
 extern Lisp_Object Qicon_left;
 extern Lisp_Object Qicon_top;
-extern Lisp_Object Qleft;
-extern Lisp_Object Qright;
 extern Lisp_Object Qtop;
 extern Lisp_Object Qdisplay;
 extern Lisp_Object Qvertical_scroll_bars;
+extern Lisp_Object Qhorizontal_scroll_bars;
 extern Lisp_Object Qauto_raise;
 extern Lisp_Object Qauto_lower;
 extern Lisp_Object Qbox;
 extern Lisp_Object Qscroll_bar_width;
+extern Lisp_Object Qscroll_bar_height;
 extern Lisp_Object Qx_resource_name;
 extern Lisp_Object Qface_set_after_frame_default;
 extern Lisp_Object Qunderline, Qundefined;
@@ -135,7 +133,7 @@ check_ns_display_info (Lisp_Object object)
     }
   else if (TERMINALP (object))
     {
-      struct terminal *t = get_terminal (object, 1);
+      struct terminal *t = decode_live_terminal (object);
 
       if (t->type != output_ns)
         error ("Terminal %d is not a Nextstep display", t->id);
@@ -197,7 +195,7 @@ ns_display_info_for_name (Lisp_Object name)
 static NSString *
 ns_filename_from_panel (NSSavePanel *panel)
 {
-#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+#ifdef NS_IMPL_COCOA
   NSURL *url = [panel URL];
   NSString *str = [url path];
   return str;
@@ -209,7 +207,7 @@ ns_filename_from_panel (NSSavePanel *panel)
 static NSString *
 ns_directory_from_panel (NSSavePanel *panel)
 {
-#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+#ifdef NS_IMPL_COCOA
   NSURL *url = [panel directoryURL];
   NSString *str = [url path];
   return str;
@@ -707,6 +705,26 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
 }
 
 
+void
+x_set_internal_border_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
+{
+  int old_width = FRAME_INTERNAL_BORDER_WIDTH (f);
+
+  CHECK_TYPE_RANGED_INTEGER (int, arg);
+  FRAME_INTERNAL_BORDER_WIDTH (f) = XINT (arg);
+  if (FRAME_INTERNAL_BORDER_WIDTH (f) < 0)
+    FRAME_INTERNAL_BORDER_WIDTH (f) = 0;
+
+  if (FRAME_INTERNAL_BORDER_WIDTH (f) == old_width)
+    return;
+
+  if (FRAME_X_WINDOW (f) != 0)
+    adjust_frame_size (f, -1, -1, 3, 0);
+
+  SET_FRAME_GARBAGED (f);
+}
+
+
 static void
 ns_implicitly_set_icon_type (struct frame *f)
 {
@@ -873,12 +891,16 @@ x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 static Lisp_Object
 ns_appkit_version_str (void)
 {
-  char tmp[80];
+  char tmp[256];
 
 #ifdef NS_IMPL_GNUSTEP
   sprintf(tmp, "gnustep-gui-%s", Xstr(GNUSTEP_GUI_VERSION));
 #elif defined (NS_IMPL_COCOA)
-  sprintf(tmp, "apple-appkit-%.2f", NSAppKitVersionNumber);
+  NSString *osversion
+    = [[NSProcessInfo processInfo] operatingSystemVersionString];
+  sprintf(tmp, "appkit-%.2f %s",
+          NSAppKitVersionNumber,
+          [osversion UTF8String]);
 #else
   tmp = "ns-unknown";
 #endif
@@ -952,17 +974,19 @@ frame_parm_handler ns_frame_parm_handlers[] =
   x_set_mouse_color,
   x_explicitly_set_name,
   x_set_scroll_bar_width, /* generic OK */
+  x_set_scroll_bar_height, /* generic OK */
   x_set_title,
   x_set_unsplittable, /* generic OK */
   x_set_vertical_scroll_bars, /* generic OK */
+  x_set_horizontal_scroll_bars, /* generic OK */
   x_set_visibility, /* generic OK */
   x_set_tool_bar_lines,
   0, /* x_set_scroll_bar_foreground, will ignore (not possible on NS) */
   0, /* x_set_scroll_bar_background,  will ignore (not possible on NS) */
   x_set_screen_gamma, /* generic OK */
   x_set_line_spacing, /* generic OK, sets f->extra_line_spacing to int */
-  x_set_fringe_width, /* generic OK */
-  x_set_fringe_width, /* generic OK */
+  x_set_left_fringe, /* generic OK */
+  x_set_right_fringe, /* generic OK */
   0, /* x_set_wait_for_wm, will ignore */
   x_set_fullscreen, /* generic OK */
   x_set_font_backend, /* generic OK */
@@ -1024,7 +1048,7 @@ get_geometry_from_preferences (struct ns_display_info *dpyinfo,
   };
 
   int i;
-  for (i = 0; i < sizeof (r)/sizeof (r[0]); ++i)
+  for (i = 0; i < ARRAYELTS (r); ++i)
     {
       if (NILP (Fassq (r[i].tem, parms)))
         {
@@ -1171,13 +1195,10 @@ This function is an internal primitive--use `make-frame' instead.  */)
   block_input ();
 
 #ifdef NS_IMPL_COCOA
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
-  if (CTGetCoreTextVersion != NULL
-      && CTGetCoreTextVersion () >= kCTVersionNumber10_5)
     mac_register_font_driver (f);
+#else
+    register_font_driver (&nsfont_driver, f);
 #endif
-#endif
-  register_font_driver (&nsfont_driver, f);
 
   x_default_parameter (f, parms, Qfont_backend, Qnil,
                        "fontBackend", "FontBackend", RES_TYPE_STRING);
@@ -1206,7 +1227,7 @@ This function is an internal primitive--use `make-frame' instead.  */)
                       "internalBorderWidth", "InternalBorderWidth",
                       RES_TYPE_NUMBER);
 
-  /* default scrollbars on right on Mac */
+  /* default vertical scrollbars on right on Mac */
   {
       Lisp_Object spos
 #ifdef NS_IMPL_GNUSTEP
@@ -1218,6 +1239,9 @@ This function is an internal primitive--use `make-frame' instead.  */)
                           "verticalScrollBars", "VerticalScrollBars",
                           RES_TYPE_SYMBOL);
   }
+  x_default_parameter (f, parms, Qhorizontal_scroll_bars, Qnil,
+                      "horizontalScrollBars", "HorizontalScrollBars",
+                      RES_TYPE_SYMBOL);
   x_default_parameter (f, parms, Qforeground_color, build_string ("Black"),
                       "foreground", "Foreground", RES_TYPE_STRING);
   x_default_parameter (f, parms, Qbackground_color, build_string ("White"),
@@ -1238,11 +1262,8 @@ This function is an internal primitive--use `make-frame' instead.  */)
   init_frame_faces (f);
 
   /* Read comment about this code in corresponding place in xfns.c.  */
-  width = FRAME_TEXT_WIDTH (f);
-  height = FRAME_TEXT_HEIGHT (f);
-  FRAME_TEXT_HEIGHT (f) = 0;
-  SET_FRAME_WIDTH (f, 0);
-  change_frame_size (f, width, height, 1, 0, 0, 1);
+  adjust_frame_size (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
+                    FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 5, 1);
 
   /* The resources controlling the menu-bar and tool-bar are
      processed specially at startup, and reflected in the mode
@@ -1278,6 +1299,8 @@ This function is an internal primitive--use `make-frame' instead.  */)
   f->output_data.ns->vertical_drag_cursor = [NSCursor resizeUpDownCursor];
   FRAME_DISPLAY_INFO (f)->vertical_scroll_bar_cursor
      = [NSCursor arrowCursor];
+  FRAME_DISPLAY_INFO (f)->horizontal_scroll_bar_cursor
+     = [NSCursor arrowCursor];
   f->output_data.ns->current_pointer = f->output_data.ns->text_cursor;
 
   [[EmacsView alloc] initFrameFromEmacs: f];
@@ -1303,16 +1326,18 @@ This function is an internal primitive--use `make-frame' instead.  */)
   x_default_parameter (f, parms, Qscroll_bar_width, Qnil,
                        "scrollBarWidth", "ScrollBarWidth",
                        RES_TYPE_NUMBER);
+  x_default_parameter (f, parms, Qscroll_bar_height, Qnil,
+                       "scrollBarHeight", "ScrollBarHeight",
+                       RES_TYPE_NUMBER);
   x_default_parameter (f, parms, Qalpha, Qnil,
                        "alpha", "Alpha", RES_TYPE_NUMBER);
   x_default_parameter (f, parms, Qfullscreen, Qnil,
                        "fullscreen", "Fullscreen", RES_TYPE_SYMBOL);
 
-  width = FRAME_TEXT_WIDTH (f);
-  height = FRAME_TEXT_HEIGHT (f);
-  FRAME_TEXT_HEIGHT (f) = 0;
-  SET_FRAME_WIDTH (f, 0);
-  change_frame_size (f, width, height, 1, 0, 0, 1);
+  /* Consider frame official, now.  */
+  f->official = true;
+
+  adjust_frame_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f), 0, 1);
 
   if (! f->output_data.ns->explicit_parent)
     {
@@ -1384,11 +1409,11 @@ DEFUN ("ns-popup-font-panel", Fns_popup_font_panel, Sns_popup_font_panel,
   id fm = [NSFontManager sharedFontManager];
   struct font *font = f->output_data.ns->font;
   NSFont *nsfont;
-  if (EQ (font->driver->type, Qns))
-    nsfont = ((struct nsfont_info *)font)->nsfont;
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
-  else
-    nsfont = (NSFont *) macfont_get_nsctfont (font);
+#ifdef NS_IMPL_GNUSTEP
+  nsfont = ((struct nsfont_info *)font)->nsfont;
+#endif
+#ifdef NS_IMPL_COCOA
+  nsfont = (NSFont *) macfont_get_nsctfont (font);
 #endif
   [fm setSelectedFont: nsfont isMultiple: NO];
   [fm orderFrontFontPanel: NSApp];
@@ -1410,8 +1435,7 @@ static struct
 {
   id panel;
   BOOL ret;
-#if ! defined (NS_IMPL_COCOA) || \
-  MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
+#ifdef NS_IMPL_GNUSTEP
   NSString *dirS, *initS;
   BOOL no_types;
 #endif
@@ -1421,8 +1445,7 @@ void
 ns_run_file_dialog (void)
 {
   if (ns_fd_data.panel == nil) return;
-#if defined (NS_IMPL_COCOA) && \
-  MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+#ifdef NS_IMPL_COCOA
   ns_fd_data.ret = [ns_fd_data.panel runModal];
 #else
   if (ns_fd_data.no_types)
@@ -1502,8 +1525,7 @@ Optional arg DIR_ONLY_P, if non-nil, means choose only directories.  */)
   block_input ();
   ns_fd_data.panel = panel;
   ns_fd_data.ret = NO;
-#if defined (NS_IMPL_COCOA) && \
-  MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+#ifdef NS_IMPL_COCOA
   if (! NILP (mustmatch) || ! NILP (dir_only_p))
     [panel setAllowedFileTypes: nil];
   if (dirS) [panel setDirectoryURL: [NSURL fileURLWithPath: dirS]];
@@ -1963,7 +1985,7 @@ DEFUN ("ns-list-services", Fns_list_services, Sns_list_services, 0, 0, 0,
        doc: /* List available Nextstep services by querying NSApp.  */)
      (void)
 {
-#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+#ifdef NS_IMPL_COCOA
   /* You can't get services like this in 10.6+.  */
   return Qnil;
 #else
@@ -2096,7 +2118,6 @@ ns_do_applescript (Lisp_Object script, Lisp_Object *result)
 
   returnDescriptor = [scriptObject executeAndReturnError: &errorDict];
   [scriptObject release];
-
   *result = Qnil;
 
   if (returnDescriptor != NULL)
@@ -2157,6 +2178,7 @@ In case the execution fails, an error is signaled. */)
   Lisp_Object result;
   int status;
   NSEvent *nxev;
+  struct input_event ev;
 
   CHECK_STRING (script);
   check_window_system (NULL);
@@ -2184,8 +2206,10 @@ In case the execution fails, an error is signaled. */)
 
   // If there are other events, the event loop may exit.  Keep running
   // until the script has been handled.  */
+  ns_init_events (&ev);
   while (! NILP (as_script))
     [NSApp run];
+  ns_finish_events ();
 
   status = as_status;
   as_status = 0;
@@ -2225,6 +2249,15 @@ x_set_scroll_bar_default_width (struct frame *f)
                                       wid - 1) / wid;
 }
 
+void
+x_set_scroll_bar_default_height (struct frame *f)
+{
+  int height = FRAME_LINE_HEIGHT (f);
+  FRAME_CONFIG_SCROLL_BAR_HEIGHT (f) = NS_SCROLL_BAR_WIDTH_DEFAULT;
+  FRAME_CONFIG_SCROLL_BAR_LINES (f) = (FRAME_CONFIG_SCROLL_BAR_HEIGHT (f) +
+                                      height - 1) / height;
+}
+
 /* terms impl this instead of x-get-resource directly */
 char *
 x_get_string_resource (XrmDatabase rdb, const char *name, const char *class)
@@ -2508,7 +2541,7 @@ the attributes:
 Internal use only, use `display-monitor-attributes-list' instead.  */)
   (Lisp_Object terminal)
 {
-  struct terminal *term = get_terminal (terminal, 1);
+  struct terminal *term = decode_live_terminal (terminal);
   NSArray *screens;
   NSUInteger i, n_monitors;
   struct MonitorInfo *monitors;
index 14e24c270e8507cc52f236b1fa4b6a45b2e1b34a..13c7b0bce2c7978451a52f13eeccb42cb59d4c17 100644 (file)
@@ -627,8 +627,8 @@ static Lisp_Object nsfont_open (struct frame *f, Lisp_Object font_entity,
 static void nsfont_close (struct font *font);
 static int nsfont_has_char (Lisp_Object entity, int c);
 static unsigned int nsfont_encode_char (struct font *font, int c);
-static int nsfont_text_extents (struct font *font, unsigned int *code,
-                                int nglyphs, struct font_metrics *metrics);
+static void nsfont_text_extents (struct font *font, unsigned int *code,
+                                int nglyphs, struct font_metrics *metrics);
 static int nsfont_draw (struct glyph_string *s, int from, int to, int x, int y,
                         bool with_background);
 
@@ -649,7 +649,7 @@ struct font_driver nsfont_driver =
     nsfont_encode_char,
     nsfont_text_extents,
     nsfont_draw,
-    /* excluded: get_bitmap, free_bitmap, get_outline, free_outline,
+    /* excluded: get_bitmap, free_bitmap,
                  anchor_point, otf_capability, otf_driver,
                 start_for_frame, end_for_frame, shape */
   };
@@ -830,9 +830,6 @@ nsfont_open (struct frame *f, Lisp_Object font_entity, int pixel_size)
   font->baseline_offset = 0;
   font->relative_compose = 0;
 
-  font->props[FONT_FORMAT_INDEX] = Qns;
-  font->props[FONT_FILE_INDEX] = Qnil;
-
   {
     const char *fontName = [[nsfont fontName] UTF8String];
 
@@ -945,6 +942,8 @@ nsfont_close (struct font *font)
          xfree (font_info->glyphs[i]);
          xfree (font_info->metrics[i]);
        }
+      xfree (font_info->glyphs);
+      xfree (font_info->metrics);
       [font_info->nsfont release];
 #ifdef NS_IMPL_COCOA
       CGFontRelease (font_info->cgfont);
@@ -989,9 +988,9 @@ nsfont_encode_char (struct font *font, int c)
 /* Perform the size computation of glyphs of FONT and fill in members
    of METRICS.  The glyphs are specified by their glyph codes in
    CODE (length NGLYPHS). */
-static int
-nsfont_text_extents (struct font *font, unsigned int *code, int nglyphs,
-                     struct font_metrics *metrics)
+static void
+nsfont_text_extents (struct font *font, unsigned int *code,
+                    int nglyphs, struct font_metrics *metrics)
 {
   struct nsfont_info *font_info = (struct nsfont_info *)font;
   struct font_metrics *pcm;
@@ -1001,7 +1000,7 @@ nsfont_text_extents (struct font *font, unsigned int *code, int nglyphs,
 
   memset (metrics, 0, sizeof (struct font_metrics));
 
-  for (i =0; i<nglyphs; i++)
+  for (i = 0; i < nglyphs; i++)
     {
       /* get metrics for this glyph, filling cache if need be */
       /* TODO: get metrics for whole string from an NSLayoutManager
@@ -1025,8 +1024,6 @@ nsfont_text_extents (struct font *font, unsigned int *code, int nglyphs,
     }
 
   metrics->width = totalWidth;
-
-  return totalWidth; /* not specified in doc, but xfont.c does it */
 }
 
 
@@ -1037,14 +1034,18 @@ nsfont_text_extents (struct font *font, unsigned int *code, int nglyphs,
 static int
 nsfont_draw (struct glyph_string *s, int from, int to, int x, int y,
              bool with_background)
-/* NOTE: focus and clip must be set
-     also, currently assumed (true in nsterm.m call) from ==0, to ==nchars */
+/* NOTE: focus and clip must be set */
 {
   static unsigned char cbuf[1024];
   unsigned char *c = cbuf;
 #ifdef NS_IMPL_GNUSTEP
+#if GNUSTEP_GUI_MAJOR_VERSION > 0 || GNUSTEP_GUI_MINOR_VERSION > 22
+  static CGFloat advances[1024];
+  CGFloat *adv = advances;
+#else
   static float advances[1024];
   float *adv = advances;
+#endif
 #else
   static CGSize advances[1024];
   CGSize *adv = advances;
@@ -1056,7 +1057,6 @@ nsfont_draw (struct glyph_string *s, int from, int to, int x, int y,
   unsigned short *t = s->char2b;
   int i, len, flags;
   char isComposite = s->first_glyph->type == COMPOSITE_GLYPH;
-  int end = isComposite ? s->cmp_to : s->nchars;
 
   block_input ();
 
@@ -1098,8 +1098,8 @@ nsfont_draw (struct glyph_string *s, int from, int to, int x, int y,
     int cwidth, twidth = 0;
     int hi, lo;
     /* FIXME: composition: no vertical displacement is considered. */
-    t += s->cmp_from; /* advance into composition */
-    for (i = s->cmp_from; i < end; i++, t++)
+    t += from; /* advance into composition */
+    for (i = from; i < to; i++, t++)
       {
         hi = (*t & 0xFF00) >> 8;
         lo = *t & 0x00FF;
@@ -1193,7 +1193,7 @@ nsfont_draw (struct glyph_string *s, int from, int to, int x, int y,
 
 
   /* set up for character rendering */
-  r.origin.y = s->ybase;
+  r.origin.y = y;
 
   col = (NS_FACE_FOREGROUND (face) != 0
          ? ns_lookup_indexed_color (NS_FACE_FOREGROUND (face), s->f)
@@ -1275,13 +1275,13 @@ nsfont_draw (struct glyph_string *s, int from, int to, int x, int y,
     [col set];
 
     CGContextSetTextPosition (gcontext, r.origin.x, r.origin.y);
-    CGContextShowGlyphsWithAdvances (gcontext, s->char2b + s->cmp_from,
+    CGContextShowGlyphsWithAdvances (gcontext, s->char2b + from,
                                      advances, len);
 
     if (face->overstrike)
       {
         CGContextSetTextPosition (gcontext, r.origin.x+0.5, r.origin.y);
-        CGContextShowGlyphsWithAdvances (gcontext, s->char2b + s->cmp_from,
+        CGContextShowGlyphsWithAdvances (gcontext, s->char2b + from,
                                          advances, len);
       }
 
index 5935531fa4800bd4bf206f7eae4d1411d87ccc21..0f963f69e2bfd1233e105f0def512f97fa3392ac 100644 (file)
@@ -48,11 +48,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #undef _GL_VERIFY_H
 #include <verify.h>
 
-/* menu-related */
-#define free_widget_value(wv) xfree (wv)
-#define malloc_widget_value() ((widget_value *) memset (xmalloc \
-    (sizeof (widget_value)), 0, sizeof (widget_value)))
-
 /* Emulate XCharStruct.  */
 typedef struct _XCharStruct
 {
@@ -73,10 +68,10 @@ typedef unichar XChar2b;
   (*(chp) = ((XChar2b)((((b1) & 0x00ff) << 8) | ((b2) & 0x00ff))))
 
 #define XCHAR2B_BYTE1(chp) \
(((*chp) & 0xff00) >> 8)
 ((*(chp) & 0xff00) >> 8)
 
 #define XCHAR2B_BYTE2(chp) \
((*chp) & 0x00ff)
 (*(chp) & 0x00ff)
 
 
 /* XXX: xfaces requires these structures, but the question is are we
index 6b68072b87ab1d4574db097e10345bb8df70a09a..71e5f8aa5c6b11cb2ac638deda7ab23e3fac6fe9 100644 (file)
@@ -188,7 +188,7 @@ static EmacsImage *ImageList = nil;
   image = [[EmacsImage alloc] initByReferencingFile:
                      [NSString stringWithUTF8String: SSDATA (found)]];
 
-#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+#ifdef NS_IMPL_COCOA
   imgRep = [NSBitmapImageRep imageRepWithData:[image TIFFRepresentation]];
 #else
   imgRep = [image bestRepresentationForDevice: nil];
index 24842241f37e22d8f89583bd62bf3edeacd60415..a90cb9708748213fa623d37a3ff9721878459edf 100644 (file)
@@ -266,12 +266,8 @@ ns_update_menubar (struct frame *f, bool deep_p, EmacsMenu *submenu)
 
       /* parse stage 2: insert into lucid 'widget_value' structures
          [comments in other terms say not to evaluate lisp code here] */
-      wv = xmalloc_widget_value ();
-      wv->name = "menubar";
-      wv->value = 0;
-      wv->enabled = 1;
+      wv = make_widget_value ("menubar", NULL, true, Qnil);
       wv->button_type = BUTTON_TYPE_NONE;
-      wv->help = Qnil;
       first_wv = wv;
 
       for (i = 0; i < 4*n; i += 4)
@@ -378,12 +374,8 @@ ns_update_menubar (struct frame *f, bool deep_p, EmacsMenu *submenu)
       int n;
       Lisp_Object string;
 
-      wv = xmalloc_widget_value ();
-      wv->name = "menubar";
-      wv->value = 0;
-      wv->enabled = 1;
+      wv = make_widget_value ("menubar", NULL, true, Qnil);
       wv->button_type = BUTTON_TYPE_NONE;
-      wv->help = Qnil;
       first_wv = wv;
 
       /* Make widget-value tree w/ just the top level menu bar strings */
@@ -439,12 +431,8 @@ ns_update_menubar (struct frame *f, bool deep_p, EmacsMenu *submenu)
            memcpy (previous_strings[i/4], SDATA (string),
                     min (10, SBYTES (string) + 1));
 
-         wv = xmalloc_widget_value ();
-         wv->name = SSDATA (string);
-         wv->value = 0;
-         wv->enabled = 1;
+         wv = make_widget_value (SSDATA (string), NULL, true, Qnil);
          wv->button_type = BUTTON_TYPE_NONE;
-         wv->help = Qnil;
          wv->call_data = (void *) (intptr_t) (-1);
 
 #ifdef NS_IMPL_COCOA
@@ -504,11 +492,9 @@ void
 x_activate_menubar (struct frame *f)
 {
 #ifdef NS_IMPL_COCOA
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
   ns_update_menubar (f, true, nil);
   ns_check_pending_open_menu ();
 #endif
-#endif
 }
 
 
@@ -553,24 +539,15 @@ x_activate_menubar (struct frame *f)
   frame = f;
 }
 
-#ifdef NS_IMPL_COCOA
-#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
-extern NSString *NSMenuDidBeginTrackingNotification;
-#endif
-#endif
-
 #ifdef NS_IMPL_COCOA
 -(void)trackingNotification:(NSNotification *)notification
 {
   /* Update menu in menuNeedsUpdate only while tracking menus.  */
   trackingMenu = ([notification name] == NSMenuDidBeginTrackingNotification
                   ? 1 : 0);
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
   if (! trackingMenu) ns_check_menu_open (nil);
-#endif
 }
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
 - (void)menuWillOpen:(NSMenu *)menu
 {
   ++trackingMenu;
@@ -591,7 +568,6 @@ extern NSString *NSMenuDidBeginTrackingNotification;
 {
   --trackingMenu;
 }
-#endif /* OSX >= 10.5 */
 
 #endif /* NS_IMPL_COCOA */
 
@@ -620,8 +596,7 @@ extern NSString *NSMenuDidBeginTrackingNotification;
   if (trackingMenu == 0)
     return;
 /*fprintf (stderr, "Updating menu '%s'\n", [[self title] UTF8String]); NSLog (@"%@\n", event); */
-#if (! defined (NS_IMPL_COCOA) \
-     || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5)
+#ifdef NS_IMPL_GNUSTEP
   /* Don't know how to do this for anything other than OSX >= 10.5
      This is wrong, as it might run Lisp code in the event loop.  */
   ns_update_menubar (frame, true, self);
@@ -718,9 +693,7 @@ extern NSString *NSMenuDidBeginTrackingNotification;
     {
       NSMenuItem *item = [self itemAtIndex: n];
       NSString *title = [item title];
-      if (([title length] == 0  /* OSX 10.5 */
-          || [ns_app_name isEqualToString: title]  /* from 10.6 on */
-          || [@"Apple" isEqualToString: title]) /* older */
+      if ([ns_app_name isEqualToString: title]
           && ![item isSeparatorItem])
         continue;
       [self removeItemAtIndex: n];
@@ -824,7 +797,7 @@ extern NSString *NSMenuDidBeginTrackingNotification;
    ========================================================================== */
 
 Lisp_Object
-ns_menu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
+ns_menu_show (struct frame *f, int x, int y, int menuflags,
              Lisp_Object title, const char **error)
 {
   EmacsMenu *pmenu;
@@ -832,18 +805,15 @@ ns_menu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
   Lisp_Object tem;
   ptrdiff_t specpdl_count = SPECPDL_INDEX ();
   widget_value *wv, *first_wv = 0;
+  bool keymaps = (menuflags & MENU_KEYMAPS);
 
   block_input ();
 
   p.x = x; p.y = y;
 
   /* now parse stage 2 as in ns_update_menubar */
-  wv = xmalloc_widget_value ();
-  wv->name = "contextmenu";
-  wv->value = 0;
-  wv->enabled = 1;
+  wv = make_widget_value ("contextmenu", NULL, true, Qnil);
   wv->button_type = BUTTON_TYPE_NONE;
-  wv->help = Qnil;
   first_wv = wv;
 
 #if 0
@@ -914,18 +884,14 @@ ns_menu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
             with its items as a submenu beneath it.  */
          if (!keymaps && strcmp (pane_string, ""))
            {
-             wv = xmalloc_widget_value ();
+             wv = make_widget_value (pane_string, NULL, true, Qnil);
              if (save_wv)
                save_wv->next = wv;
              else
                first_wv->contents = wv;
-             wv->name = pane_string;
              if (keymaps && !NILP (prefix))
                wv->name++;
-             wv->value = 0;
-             wv->enabled = 1;
              wv->button_type = BUTTON_TYPE_NONE;
-             wv->help = Qnil;
              save_wv = wv;
              prev_wv = 0;
            }
@@ -963,20 +929,18 @@ ns_menu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
            }
 #endif /* not HAVE_MULTILINGUAL_MENU */
 
-         wv = xmalloc_widget_value ();
+         wv = make_widget_value (SSDATA (item_name), NULL, !NILP (enable),
+                                 STRINGP (help) ? help : Qnil);
          if (prev_wv)
            prev_wv->next = wv;
          else
            save_wv->contents = wv;
-         wv->name = SSDATA (item_name);
          if (!NILP (descrip))
            wv->key = SSDATA (descrip);
-         wv->value = 0;
          /* If this item has a null value,
             make the call_data null so that it won't display a box
             when the mouse is on it.  */
          wv->call_data = !NILP (def) ? aref_addr (menu_items, i) : 0;
-         wv->enabled = !NILP (enable);
 
          if (NILP (type))
            wv->button_type = BUTTON_TYPE_NONE;
@@ -989,11 +953,6 @@ ns_menu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
 
          wv->selected = !NILP (selected);
 
-          if (! STRINGP (help))
-           help = Qnil;
-
-         wv->help = help;
-
          prev_wv = wv;
 
          i += MENU_ITEMS_ITEM_LENGTH;
@@ -1004,24 +963,19 @@ ns_menu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
 
   if (!NILP (title))
     {
-      widget_value *wv_title = xmalloc_widget_value ();
-      widget_value *wv_sep = xmalloc_widget_value ();
+      widget_value *wv_title;
+      widget_value *wv_sep = make_widget_value ("--", NULL, false, Qnil);
 
       /* Maybe replace this separator with a bitmap or owner-draw item
         so that it looks better.  Having two separators looks odd.  */
-      wv_sep->name = "--";
       wv_sep->next = first_wv->contents;
-      wv_sep->help = Qnil;
 
 #ifndef HAVE_MULTILINGUAL_MENU
       if (STRING_MULTIBYTE (title))
        title = ENCODE_MENU_STRING (title);
 #endif
-
-      wv_title->name = SSDATA (title);
-      wv_title->enabled = NO;
+      wv_title = make_widget_value (SSDATA (title), NULL, false, Qnil);
       wv_title->button_type = BUTTON_TYPE_NONE;
-      wv_title->help = Qnil;
       wv_title->next = wv_sep;
       first_wv->contents = wv_title;
     }
@@ -1183,7 +1137,10 @@ update_frame_tool_bar (struct frame *f)
     FRAME_TOOLBAR_HEIGHT (f) = 0;
 
   if (view->wait_for_tool_bar && FRAME_TOOLBAR_HEIGHT (f) > 0)
+    {
+      view->wait_for_tool_bar = NO;
       [view setNeedsDisplay: YES];
+    }
 
   unblock_input ();
 }
@@ -1459,11 +1416,10 @@ pop_down_menu (void *arg)
 
 
 Lisp_Object
-ns_popup_dialog (Lisp_Object position, Lisp_Object header, Lisp_Object contents)
+ns_popup_dialog (struct frame *f, Lisp_Object header, Lisp_Object contents)
 {
   id dialog;
   Lisp_Object window, tem, title;
-  struct frame *f;
   NSPoint p;
   BOOL isQ;
   NSAutoreleasePool *pool;
@@ -1472,41 +1428,6 @@ ns_popup_dialog (Lisp_Object position, Lisp_Object header, Lisp_Object contents)
 
   isQ = NILP (header);
 
-  if (EQ (position, Qt)
-      || (CONSP (position) && (EQ (XCAR (position), Qmenu_bar)
-                               || EQ (XCAR (position), Qtool_bar))))
-    {
-      window = selected_window;
-    }
-  else if (CONSP (position))
-    {
-      Lisp_Object tem;
-      tem = Fcar (position);
-      if (XTYPE (tem) == Lisp_Cons)
-        window = Fcar (Fcdr (position));
-      else
-        {
-          tem = Fcar (Fcdr (position));  /* EVENT_START (position) */
-          window = Fcar (tem);      /* POSN_WINDOW (tem) */
-        }
-    }
-  else if (WINDOWP (position) || FRAMEP (position))
-    {
-      window = position;
-    }
-  else
-    window = Qnil;
-
-  if (FRAMEP (window))
-    f = XFRAME (window);
-  else if (WINDOWP (window))
-    {
-      CHECK_LIVE_WINDOW (window);
-      f = XFRAME (WINDOW_FRAME (XWINDOW (window)));
-    }
-  else
-    CHECK_WINDOW (window);
-
   check_window_system (f);
 
   p.x = (int)f->left_pos + ((int)FRAME_COLUMN_WIDTH (f) * f->text_cols)/2;
index 038849c0aed7ef2413c6766c0f65eab307a56ed6..3712ba064e792f2dbf0c71d18e92db0b48782a2b 100644 (file)
@@ -328,19 +328,14 @@ ns_string_to_pasteboard (id pb, Lisp_Object str)
    ========================================================================== */
 
 
-DEFUN ("x-own-selection-internal", Fx_own_selection_internal,
-       Sx_own_selection_internal, 2, 3, 0,
+DEFUN ("ns-own-selection-internal", Fns_own_selection_internal,
+       Sns_own_selection_internal, 2, 2, 0,
        doc: /* Assert an X selection of type SELECTION and value VALUE.
 SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'.
 \(Those are literal upper-case symbol names, since that's what X expects.)
 VALUE is typically a string, or a cons of two markers, but may be
-anything that the functions on `selection-converter-alist' know about.
-
-FRAME should be a frame that should own the selection.  If omitted or
-nil, it defaults to the selected frame.
-
-On Nextstep, FRAME is unused.  */)
-     (Lisp_Object selection, Lisp_Object value, Lisp_Object frame)
+anything that the functions on `selection-converter-alist' know about.  */)
+     (Lisp_Object selection, Lisp_Object value)
 {
   id pb;
   Lisp_Object old_value, new_value;
@@ -385,21 +380,11 @@ On Nextstep, FRAME is unused.  */)
 }
 
 
-DEFUN ("x-disown-selection-internal", Fx_disown_selection_internal,
-       Sx_disown_selection_internal, 1, 3, 0,
+DEFUN ("ns-disown-selection-internal", Fns_disown_selection_internal,
+       Sns_disown_selection_internal, 1, 1, 0,
        doc: /* If we own the selection SELECTION, disown it.
-Disowning it means there is no such selection.
-
-Sets the last-change time for the selection to TIME-OBJECT (by default
-the time of the last event).
-
-TERMINAL should be a terminal object or a frame specifying the X
-server to query.  If omitted or nil, that stands for the selected
-frame's display, or the first available X display.
-
-On Nextstep, the TIME-OBJECT and TERMINAL arguments are unused.
-On MS-DOS, all this does is return non-nil if we own the selection.  */)
-  (Lisp_Object selection, Lisp_Object time_object, Lisp_Object terminal)
+Disowning it means there is no such selection.  */)
+  (Lisp_Object selection)
 {
   id pb;
   check_window_system (NULL);
@@ -443,7 +428,7 @@ On Nextstep, TERMINAL is unused.  */)
 }
 
 
-DEFUN ("x-selection-owner-p", Fx_selection_owner_p, Sx_selection_owner_p,
+DEFUN ("ns-selection-owner-p", Fns_selection_owner_p, Sns_selection_owner_p,
        0, 2, 0,
        doc: /* Whether the current Emacs process owns the given X Selection.
 The arg should be the name of the selection in question, typically one of
@@ -507,7 +492,7 @@ On Nextstep, TIME-STAMP and TERMINAL are unused.  */)
 DEFUN ("ns-get-selection-internal", Fns_get_selection_internal,
        Sns_get_selection_internal, 1, 1, 0,
        doc: /* Returns the value of SELECTION as a string.
-SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'. */)
+SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'.  */)
      (Lisp_Object selection)
 {
   id pb;
@@ -520,7 +505,7 @@ SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'. */)
 DEFUN ("ns-store-selection-internal", Fns_store_selection_internal,
        Sns_store_selection_internal, 2, 2, 0,
        doc: /* Sets the string value of SELECTION.
-SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'. */)
+SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'.  */)
      (Lisp_Object selection, Lisp_Object string)
 {
   id pb;
@@ -546,11 +531,11 @@ syms_of_nsselect (void)
   QTEXT      = intern_c_string ("TEXT");       staticpro (&QTEXT);
   QFILE_NAME = intern_c_string ("FILE_NAME");  staticpro (&QFILE_NAME);
 
-  defsubr (&Sx_disown_selection_internal);
+  defsubr (&Sns_disown_selection_internal);
   defsubr (&Sx_get_selection_internal);
-  defsubr (&Sx_own_selection_internal);
+  defsubr (&Sns_own_selection_internal);
   defsubr (&Sx_selection_exists_p);
-  defsubr (&Sx_selection_owner_p);
+  defsubr (&Sns_selection_owner_p);
   defsubr (&Sns_get_selection_internal);
   defsubr (&Sns_store_selection_internal);
 
index 8c3e4e5c3147ed595ad6b544ef70987196b1b3a0..f59405fe9af69b0560dfaad5b36996b9736b427b 100644 (file)
@@ -27,12 +27,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifdef HAVE_NS
 
 #ifdef NS_IMPL_COCOA
-#ifndef MAC_OS_X_VERSION_10_4
-#define MAC_OS_X_VERSION_10_4 1040
-#endif
-#ifndef MAC_OS_X_VERSION_10_5
-#define MAC_OS_X_VERSION_10_5 1050
-#endif
 #ifndef MAC_OS_X_VERSION_10_6
 #define MAC_OS_X_VERSION_10_6 1060
 #endif
@@ -58,21 +52,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
    versions.
    On Cocoa >= 10.5, functions expect CGFloat*. Make compatible type.  */
 #ifdef NS_IMPL_COCOA
-
-#ifndef NS_HAVE_NSINTEGER
-#if defined (__LP64__) && __LP64__
-typedef double CGFloat;
-typedef long NSInteger;
-typedef unsigned long NSUInteger;
-#else
-typedef float CGFloat;
-typedef int NSInteger;
-typedef unsigned int NSUInteger;
-#endif /* not LP64 */
-#endif /* not NS_HAVE_NSINTEGER */
-
 typedef CGFloat EmacsCGFloat;
-
 #elif GNUSTEP_GUI_MAJOR_VERSION > 0 || GNUSTEP_GUI_MINOR_VERSION >= 22
 typedef CGFloat EmacsCGFloat;
 #else
@@ -100,7 +80,7 @@ typedef float EmacsCGFloat;
 /* We override sendEvent: as a means to stop/start the event loop */
 @interface EmacsApp : NSApplication
 {
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
+#ifdef NS_IMPL_COCOA
   BOOL shouldKeepRunning;
   BOOL isFirst;
 #endif
@@ -139,7 +119,7 @@ typedef float EmacsCGFloat;
 
 @class EmacsToolbar;
 
-#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+#ifdef NS_IMPL_COCOA
 @interface EmacsView : NSView <NSTextInput, NSWindowDelegate>
 #else
 @interface EmacsView : NSView <NSTextInput>
@@ -217,7 +197,7 @@ typedef float EmacsCGFloat;
 
    ========================================================================== */
 
-#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+#ifdef NS_IMPL_COCOA
 @interface EmacsMenu : NSMenu  <NSMenuDelegate>
 #else
 @interface EmacsMenu : NSMenu
@@ -249,7 +229,7 @@ typedef float EmacsCGFloat;
 
 @class EmacsImage;
 
-#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+#ifdef NS_IMPL_COCOA
 @interface EmacsToolbar : NSToolbar <NSToolbarDelegate>
 #else
 @interface EmacsToolbar : NSToolbar
@@ -305,7 +285,7 @@ typedef float EmacsCGFloat;
 - (void)timeout_handler: (NSTimer *)timedEntry;
 @end
 
-#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+#ifdef NS_IMPL_COCOA
 @interface EmacsTooltip : NSObject <NSWindowDelegate>
 #else
 @interface EmacsTooltip : NSObject
@@ -401,7 +381,7 @@ typedef float EmacsCGFloat;
    CGFloat last_mouse_offset;
    float min_portion;
    int pixel_height;
-   int last_hit_part;
+   enum scroll_bar_part last_hit_part;
 
    BOOL condemned;
 
@@ -413,7 +393,6 @@ typedef float EmacsCGFloat;
 
 - initFrame: (NSRect )r window: (Lisp_Object)win;
 - (void)setFrame: (NSRect)r;
-- (void)dealloc;
 
 - setPosition: (int) position portion: (int) portion whole: (int) whole;
 - (int) checkSamePosition: (int)position portion: (int)portion
@@ -607,6 +586,9 @@ struct ns_display_info
   /* The cursor to use for vertical scroll bars. */
   Cursor vertical_scroll_bar_cursor;
 
+  /* The cursor to use for horizontal scroll bars. */
+  Cursor horizontal_scroll_bar_cursor;
+
   /* Information about the range of text currently shown in
      mouse-face.  */
   Mouse_HLInfo mouse_highlight;
@@ -747,12 +729,20 @@ struct x_output
 #endif
 
 /* Compute pixel size for vertical scroll bars */
-#define NS_SCROLL_BAR_WIDTH(f)                              \
-(FRAME_HAS_VERTICAL_SCROLL_BARS (f)                          \
- ? rint (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) > 0               \
-        ? FRAME_CONFIG_SCROLL_BAR_WIDTH (f)                 \
-        : (FRAME_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f)))   \
- : 0)
+#define NS_SCROLL_BAR_WIDTH(f)                                         \
+  (FRAME_HAS_VERTICAL_SCROLL_BARS (f)                                  \
+   ? rint (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) > 0                       \
+          ? FRAME_CONFIG_SCROLL_BAR_WIDTH (f)                          \
+          : (FRAME_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f)))      \
+   : 0)
+
+/* Compute pixel size for horizontal scroll bars */
+#define NS_SCROLL_BAR_HEIGHT(f)                                                \
+  (FRAME_HAS_HORIZONTAL_SCROLL_BARS (f)                                        \
+   ? rint (FRAME_CONFIG_SCROLL_BAR_HEIGHT (f) > 0                      \
+          ? FRAME_CONFIG_SCROLL_BAR_HEIGHT (f)                         \
+          : (FRAME_SCROLL_BAR_LINES (f) * FRAME_LINE_HEIGHT (f)))      \
+   : 0)
 
 /* Difference btwn char-column-calculated and actual SB widths.
    This is only a concern for rendering when SB on left. */
@@ -761,6 +751,13 @@ struct x_output
     (FRAME_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f)        \
         - NS_SCROLL_BAR_WIDTH (f)) : 0)
 
+/* Difference btwn char-line-calculated and actual SB heights.
+   This is only a concern for rendering when SB on top. */
+#define NS_SCROLL_BAR_ADJUST_HORIZONTALLY(w, f)                \
+  (WINDOW_HAS_HORIZONTAL_SCROLL_BARS (w) ?             \
+   (FRAME_SCROLL_BAR_LINES (f) * FRAME_LINE_HEIGHT (f) \
+    - NS_SCROLL_BAR_HEIGHT (f)) : 0)
+
 /* XXX: fix for GNUstep inconsistent accounting for titlebar */
 #ifdef NS_IMPL_GNUSTEP
 #define NS_TOP_POS(f) ((f)->top_pos + 18)
@@ -778,8 +775,8 @@ struct x_output
 
 /* First position where characters can be shown (instead of scrollbar, if
    it is on left. */
-#define FIRST_CHAR_POSITION(f) \
-  (! (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f)) ? 0 \
+#define FIRST_CHAR_POSITION(f)                         \
+  (! (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f)) ? 0  \
    : FRAME_SCROLL_BAR_COLS (f))
 
 extern struct ns_display_info *ns_term_init (Lisp_Object display_name);
@@ -856,7 +853,7 @@ extern void find_and_call_menu_selection (struct frame *f,
 extern Lisp_Object find_and_return_menu_selection (struct frame *f,
                                                    bool keymaps,
                                                    void *client_data);
-extern Lisp_Object ns_popup_dialog (Lisp_Object position, Lisp_Object header,
+extern Lisp_Object ns_popup_dialog (struct frame *, Lisp_Object header,
                                     Lisp_Object contents);
 
 #define NSAPP_DATA2_RUNASSCRIPT 10
@@ -897,6 +894,9 @@ extern int ns_select (int nfds, fd_set *readfds, fd_set *writefds,
 extern unsigned long ns_get_rgb_color (struct frame *f,
                                        float r, float g, float b, float a);
 
+extern void ns_init_events ();
+extern void ns_finish_events ();
+
 /* From nsterm.m, needed in nsfont.m. */
 #ifdef __OBJC__
 extern void
@@ -916,6 +916,7 @@ extern char gnustep_base_version[];  /* version tracking */
 #define SCREENMAX 16000
 
 #define NS_SCROLL_BAR_WIDTH_DEFAULT     [EmacsScroller scrollerWidth]
+#define NS_SCROLL_BAR_HEIGHT_DEFAULT    [EmacsScroller scrollerHeight]
 /* This is to match emacs on other platforms, ugly though it is. */
 #define NS_SELECTION_BG_COLOR_DEFAULT  @"LightGoldenrod2";
 #define NS_SELECTION_FG_COLOR_DEFAULT  @"Black";
index 833b8e389a9a1d738dddac43acfd7ee0dac30543..3ae4146dc207a8283fac645b2c6be9e2a21aa19f 100644 (file)
@@ -54,7 +54,7 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu)
 
 #include "termhooks.h"
 #include "termchar.h"
-
+#include "menu.h"
 #include "window.h"
 #include "keyboard.h"
 #include "buffer.h"
@@ -65,10 +65,8 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu)
 #endif
 
 #ifdef NS_IMPL_COCOA
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
 #include "macfont.h"
 #endif
-#endif
 
 /* call tracing */
 #if 0
@@ -229,7 +227,7 @@ static unsigned convert_ns_to_X_keysym[] =
 
 static Lisp_Object Qmodifier_value;
 Lisp_Object Qalt, Qcontrol, Qhyper, Qmeta, Qsuper;
-extern Lisp_Object Qcursor_color, Qcursor_type, Qns, Qleft;
+extern Lisp_Object Qcursor_color, Qcursor_type, Qns;
 
 static Lisp_Object QUTF8_STRING;
 static Lisp_Object Qcocoa, Qgnustep;
@@ -283,6 +281,11 @@ static NSMutableArray *ns_pending_files, *ns_pending_service_names,
 static BOOL ns_do_open_file = NO;
 static BOOL ns_last_use_native_fullscreen;
 
+/* Non-zero means that a HELP_EVENT has been generated since Emacs
+   start.  */
+
+static BOOL any_help_event_p = NO;
+
 static struct {
   struct input_event *q;
   int nr, cap;
@@ -396,6 +399,19 @@ void x_set_frame_alpha (struct frame *f);
 
    ========================================================================== */
 
+void
+ns_init_events (struct input_event* ev)
+{
+  EVENT_INIT (*ev);
+  emacs_event = ev;
+}
+
+void
+ns_finish_events ()
+{
+  emacs_event = NULL;
+}
+
 static void
 hold_event (struct input_event *event)
 {
@@ -688,7 +704,6 @@ static void
 ns_update_auto_hide_menu_bar (void)
 {
 #ifdef NS_IMPL_COCOA
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
   block_input ();
 
   NSTRACE (ns_update_auto_hide_menu_bar);
@@ -721,7 +736,6 @@ ns_update_auto_hide_menu_bar (void)
 
   unblock_input ();
 #endif
-#endif
 }
 
 
@@ -1324,10 +1338,6 @@ x_set_window_size (struct frame *f,
 
   block_input ();
 
-  check_frame_size (f, &width, &height, pixelwise);
-
-  compute_fringe_widths (f, 0);
-
   if (pixelwise)
     {
       pixelwidth = FRAME_TEXT_TO_PIXEL_WIDTH (f, width);
@@ -1399,6 +1409,8 @@ x_set_window_size (struct frame *f,
   cancel_mouse_face (f);
 
   unblock_input ();
+
+  do_pending_window_change (0);
 }
 
 
@@ -1799,12 +1811,12 @@ x_set_frame_alpha (struct frame *f)
 
 
 void
-x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y)
+frame_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y)
 /* --------------------------------------------------------------------------
      Programmatically reposition mouse pointer in pixel coordinates
    -------------------------------------------------------------------------- */
 {
-  NSTRACE (x_set_mouse_pixel_position);
+  NSTRACE (frame_set_mouse_pixel_position);
   ns_raise_frame (f);
 #if 0
   /* FIXME: this does not work, and what about GNUstep? */
@@ -1816,28 +1828,6 @@ x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y)
 #endif
 }
 
-
-void
-x_set_mouse_position (struct frame *f, int h, int v)
-/* --------------------------------------------------------------------------
-     Programmatically reposition mouse pointer in character coordinates
-   -------------------------------------------------------------------------- */
-{
-  int pix_x, pix_y;
-
-  pix_x = FRAME_COL_TO_PIXEL_X (f, h) + FRAME_COLUMN_WIDTH (f) / 2;
-  pix_y = FRAME_LINE_TO_PIXEL_Y (f, v) + FRAME_LINE_HEIGHT (f) / 2;
-
-  if (pix_x < 0) pix_x = 0;
-  if (pix_x > FRAME_PIXEL_WIDTH (f)) pix_x = FRAME_PIXEL_WIDTH (f);
-
-  if (pix_y < 0) pix_y = 0;
-  if (pix_y > FRAME_PIXEL_HEIGHT (f)) pix_y = FRAME_PIXEL_HEIGHT (f);
-
-  x_set_mouse_pixel_position (f, pix_x, pix_y);
-}
-
-
 static int
 note_mouse_movement (struct frame *frame, CGFloat x, CGFloat y)
 /*   ------------------------------------------------------------------------
@@ -1936,10 +1926,9 @@ ns_mouse_position (struct frame **fp, int insist, Lisp_Object *bar_window,
           position = [view convertPoint: position fromView: nil];
           remember_mouse_glyph (f, position.x, position.y,
                                &dpyinfo->last_mouse_glyph);
-/*fprintf (stderr, "ns_mouse_position: %.0f, %.0f\n", position.x, position.y); */
 
           if (bar_window) *bar_window = Qnil;
-          if (part) *part = 0; /*scroll_bar_handle; */
+          if (part) *part = scroll_bar_above_handle;
 
           if (x) XSETINT (*x, lrint (position.x));
           if (y) XSETINT (*y, lrint (position.y));
@@ -2012,8 +2001,7 @@ ns_convert_key (unsigned code)
     Internal call used by NSView-keyDown.
    -------------------------------------------------------------------------- */
 {
-  const unsigned last_keysym = (sizeof (convert_ns_to_X_keysym)
-                                / sizeof (convert_ns_to_X_keysym[0]));
+  const unsigned last_keysym = ARRAYELTS (convert_ns_to_X_keysym);
   unsigned keysym;
   /* An array would be faster, but less easy to read. */
   for (keysym = 0; keysym < last_keysym; keysym += 2)
@@ -2320,52 +2308,6 @@ ns_draw_fringe_bitmap (struct window *w, struct glyph_row *row,
     {
       int bx = p->bx, by = p->by, nx = p->nx, ny = p->ny;
 
-      /* If the fringe is adjacent to the left (right) scroll bar of a
-        leftmost (rightmost, respectively) window, then extend its
-        background to the gap between the fringe and the bar.  */
-      if ((WINDOW_LEFTMOST_P (w)
-          && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w))
-         || (WINDOW_RIGHTMOST_P (w)
-             && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)))
-       {
-         int sb_width = WINDOW_CONFIG_SCROLL_BAR_WIDTH (w);
-
-         if (sb_width > 0)
-           {
-             int bar_area_x = WINDOW_SCROLL_BAR_AREA_X (w);
-             int bar_area_width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w)
-                                   * FRAME_COLUMN_WIDTH (f));
-
-             if (bx < 0)
-               {
-                 /* Bitmap fills the fringe.  */
-                 if (bar_area_x + bar_area_width == p->x)
-                   bx = bar_area_x + sb_width;
-                 else if (p->x + p->wd == bar_area_x)
-                   bx = bar_area_x;
-                 if (bx >= 0)
-                   {
-                     int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w);
-
-                     nx = bar_area_width - sb_width;
-                     by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height,
-                                                           row->y));
-                     ny = row->visible_height;
-                   }
-               }
-             else
-               {
-                 if (bar_area_x + bar_area_width == bx)
-                   {
-                     bx = bar_area_x + sb_width;
-                     nx += bar_area_width - sb_width;
-                   }
-                 else if (bx + nx == bar_area_x)
-                   nx += bar_area_width - sb_width;
-               }
-           }
-       }
-
       if (bx >= 0 && nx > 0)
         {
           NSRect r = NSMakeRect (bx, by, nx, ny);
@@ -2400,8 +2342,19 @@ ns_draw_fringe_bitmap (struct window *w, struct glyph_row *row,
          to erase the whole background. */
       [ns_lookup_indexed_color(face->background, f) set];
       NSRectFill (r);
-      [img setXBMColor: ns_lookup_indexed_color(face->foreground, f)];
-#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+
+      {
+        NSColor *bm_color;
+        if (!p->cursor_p)
+          bm_color = ns_lookup_indexed_color(face->foreground, f);
+        else if (p->overlay_p)
+          bm_color = ns_lookup_indexed_color(face->background, f);
+        else
+          bm_color = f->output_data.ns->cursor_color;
+        [img setXBMColor: bm_color];
+      }
+
+#ifdef NS_IMPL_COCOA
       [img drawInRect: r
               fromRect: NSZeroRect
              operation: NSCompositeSourceOver
@@ -2484,7 +2437,10 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row,
   else if (cursor_type == HBAR_CURSOR)
     {
       cursor_height = (cursor_width < 1) ? lrint (0.25 * h) : cursor_width;
-      fy += h - cursor_height;
+      if (cursor_height > glyph_row->height)
+        cursor_height = glyph_row->height;
+      if (h > cursor_height) // Cursor smaller than line height, move down
+        fy += h - cursor_height;
       h = cursor_height;
     }
 
@@ -2599,38 +2555,18 @@ ns_draw_window_divider (struct window *w, int x0, int x1, int y0, int y1)
   ns_unfocus (f);
 }
 
-
-void
-show_hourglass (struct atimer *timer)
+static void
+ns_show_hourglass (struct frame *f)
 {
-  if (hourglass_shown_p)
-    return;
-
-  block_input ();
-
-  /* TODO: add NSProgressIndicator to selected frame (see macfns.c) */
-
-  hourglass_shown_p = 1;
-  unblock_input ();
+  /* TODO: add NSProgressIndicator to all frames.  */
 }
 
-
-void
-hide_hourglass (void)
+static void
+ns_hide_hourglass (struct frame *f)
 {
-  if (!hourglass_shown_p)
-    return;
-
-  block_input ();
-
-  /* TODO: remove NSProgressIndicator from all frames */
-
-  hourglass_shown_p = 0;
-  unblock_input ();
+  /* TODO: remove NSProgressIndicator from all frames.  */
 }
 
-
-
 /* ==========================================================================
 
     Glyph drawing operations
@@ -3097,7 +3033,7 @@ ns_dumpglyphs_image (struct glyph_string *s, NSRect r)
   /* Draw the image.. do we need to draw placeholder if img ==nil? */
   if (img != nil)
     {
-#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+#ifdef NS_IMPL_COCOA
       NSRect dr = NSMakeRect (x, y, s->slice.width, s->slice.height);
       NSRect ir = NSMakeRect (s->slice.x, s->slice.y,
                               s->slice.width, s->slice.height);
@@ -3356,10 +3292,16 @@ ns_draw_glyph_string (struct glyph_string *s)
           NS_FACE_FOREGROUND (s->face) = tmp;
         }
 
-      font->driver->draw
-        (s, 0, s->nchars, s->x, s->y,
-         (flags == NS_DUMPGLYPH_NORMAL && !s->background_filled_p)
-         || flags == NS_DUMPGLYPH_MOUSEFACE);
+      {
+        BOOL isComposite = s->first_glyph->type == COMPOSITE_GLYPH;
+        int end = isComposite ? s->cmp_to : s->nchars;
+
+        font->driver->draw
+          (s, s->cmp_from, end, s->x, s->ybase,
+           (flags == NS_DUMPGLYPH_NORMAL && !s->background_filled_p)
+           || flags == NS_DUMPGLYPH_MOUSEFACE);
+
+      }
 
       {
         NSColor *col = (NS_FACE_FOREGROUND (s->face) != 0
@@ -3503,9 +3445,8 @@ check_native_fs ()
 }
 #endif
 
-/* GNUstep and OSX <= 10.4 does not have cancelTracking.  */
-#if defined (NS_IMPL_COCOA) && \
-  MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+/* GNUstep does not have cancelTracking.  */
+#ifdef NS_IMPL_COCOA
 /* Check if menu open should be canceled or continued as normal.  */
 void
 ns_check_menu_open (NSMenu *menu)
@@ -3568,7 +3509,16 @@ ns_check_pending_open_menu ()
       menu_will_open_state = MENU_OPENING;
     }
 }
-#endif /* NS_IMPL_COCOA) && >= MAC_OS_X_VERSION_10_5 */
+#endif /* NS_IMPL_COCOA */
+
+static void
+unwind_apploopnr (Lisp_Object not_used)
+{
+  --apploopnr;
+  n_emacs_events_pending = 0;
+  ns_finish_events ();
+  q_event_ptr = NULL;
+}
 
 static int
 ns_read_socket (struct terminal *terminal, struct input_event *hold_quit)
@@ -3601,8 +3551,7 @@ ns_read_socket (struct terminal *terminal, struct input_event *hold_quit)
 
   block_input ();
   n_emacs_events_pending = 0;
-  EVENT_INIT (ev);
-  emacs_event = &ev;
+  ns_init_events (&ev);
   q_event_ptr = hold_quit;
 
   /* we manage autorelease pools by allocate/reallocate each time around
@@ -3628,6 +3577,7 @@ ns_read_socket (struct terminal *terminal, struct input_event *hold_quit)
     }
   else
     {
+      ptrdiff_t specpdl_count = SPECPDL_INDEX ();
       /* Run and wait for events.  We must always send one NX_APPDEFINED event
          to ourself, otherwise [NXApp run] will never exit.  */
       send_appdefined = YES;
@@ -3637,13 +3587,15 @@ ns_read_socket (struct terminal *terminal, struct input_event *hold_quit)
         {
           emacs_abort ();
         }
+      record_unwind_protect (unwind_apploopnr, Qt);
       [NSApp run];
-      --apploopnr;
+      unbind_to (specpdl_count, Qnil);  /* calls unwind_apploopnr */
     }
 
   nevents = n_emacs_events_pending;
   n_emacs_events_pending = 0;
-  emacs_event = q_event_ptr = NULL;
+  ns_finish_events ();
+  q_event_ptr = NULL;
   unblock_input ();
 
   return nevents;
@@ -3738,16 +3690,21 @@ ns_select (int nfds, fd_set *readfds, fd_set *writefds,
       ns_send_appdefined (-1);
     }
 
-  EVENT_INIT (event);
   block_input ();
-  emacs_event = &event;
+  ns_init_events (&event);
   if (++apploopnr != 1)
     {
       emacs_abort ();
     }
-  [NSApp run];
-  --apploopnr;
-  emacs_event = NULL;
+
+  {
+    ptrdiff_t specpdl_count = SPECPDL_INDEX ();
+    record_unwind_protect (unwind_apploopnr, Qt);
+    [NSApp run];
+    unbind_to (specpdl_count, Qnil);  /* calls unwind_apploopnr */
+  }
+
+  ns_finish_events ();
   if (nr > 0 && readfds)
     {
       c = 's';
@@ -3812,10 +3769,9 @@ ns_set_vertical_scroll_bar (struct window *window,
   NSRect r, v;
   struct frame *f = XFRAME (WINDOW_FRAME (window));
   EmacsView *view = FRAME_NS_VIEW (f);
-  int window_y, window_height;
-  int top, left, height, width, sb_width, sb_left;
   EmacsScroller *bar;
-  BOOL fringe_extended_p;
+  int window_y, window_height;
+  int top, left, height, width;
 
   /* optimization; display engine sends WAY too many of these.. */
   if (!NILP (window->vertical_scroll_bar))
@@ -3842,18 +3798,11 @@ ns_set_vertical_scroll_bar (struct window *window,
   width = WINDOW_CONFIG_SCROLL_BAR_COLS (window) * FRAME_COLUMN_WIDTH (f);
   left = WINDOW_SCROLL_BAR_AREA_X (window);
 
-  /* allow for displaying a skinnier scrollbar than char area allotted */
-  sb_width = (WINDOW_CONFIG_SCROLL_BAR_WIDTH (window) > 0) ?
-    WINDOW_CONFIG_SCROLL_BAR_WIDTH (window) : width;
-  sb_left = left;
-
-  r = NSMakeRect (sb_left, top, sb_width, height);
+  r = NSMakeRect (left, top, width, height);
   /* the parent view is flipped, so we need to flip y value */
   v = [view frame];
   r.origin.y = (v.size.height - r.size.height - r.origin.y);
 
-  fringe_extended_p = WINDOW_FRINGE_EXTENDED_P (window);
-
   XSETWINDOW (win, window);
   block_input ();
 
@@ -3866,7 +3815,7 @@ ns_set_vertical_scroll_bar (struct window *window,
           [bar removeFromSuperview];
           wset_vertical_scroll_bar (window, Qnil);
         }
-      ns_clear_frame_area (f, sb_left, top, width, height);
+      ns_clear_frame_area (f, left, top, width, height);
       unblock_input ();
       return;
     }
@@ -3874,12 +3823,7 @@ ns_set_vertical_scroll_bar (struct window *window,
   if (NILP (window->vertical_scroll_bar))
     {
       if (width > 0 && height > 0)
-       {
-         if (fringe_extended_p)
-           ns_clear_frame_area (f, sb_left, top, sb_width, height);
-         else
-           ns_clear_frame_area (f, left, top, width, height);
-        }
+       ns_clear_frame_area (f, left, top, width, height);
 
       bar = [[EmacsScroller alloc] initFrame: r window: win];
       wset_vertical_scroll_bar (window, make_save_ptr (bar));
@@ -3893,7 +3837,97 @@ ns_set_vertical_scroll_bar (struct window *window,
       if (FRAME_LIVE_P (f) && !NSEqualRects (oldRect, r))
         {
           if (oldRect.origin.x != r.origin.x)
-              ns_clear_frame_area (f, sb_left, top, width, height);
+              ns_clear_frame_area (f, left, top, width, height);
+          [bar setFrame: r];
+        }
+    }
+
+  [bar setPosition: position portion: portion whole: whole];
+  unblock_input ();
+}
+
+
+static void
+ns_set_horizontal_scroll_bar (struct window *window,
+                             int portion, int whole, int position)
+/* --------------------------------------------------------------------------
+      External (hook): Update or add scrollbar
+   -------------------------------------------------------------------------- */
+{
+  Lisp_Object win;
+  NSRect r, v;
+  struct frame *f = XFRAME (WINDOW_FRAME (window));
+  EmacsView *view = FRAME_NS_VIEW (f);
+  EmacsScroller *bar;
+  int top, height, left, width;
+  int window_x, window_width;
+  int pixel_width = WINDOW_PIXEL_WIDTH (window);
+
+  /* optimization; display engine sends WAY too many of these.. */
+  if (!NILP (window->horizontal_scroll_bar))
+    {
+      bar = XNS_SCROLL_BAR (window->horizontal_scroll_bar);
+      if ([bar checkSamePosition: position portion: portion whole: whole])
+        {
+          if (view->scrollbarsNeedingUpdate == 0)
+            {
+              if (!windows_or_buffers_changed)
+                  return;
+            }
+          else
+            view->scrollbarsNeedingUpdate--;
+        }
+    }
+
+  NSTRACE (ns_set_horizontal_scroll_bar);
+
+  /* Get dimensions.  */
+  window_box (window, ANY_AREA, 0, &window_x, &window_width, 0);
+  left = window_x;
+  width = window_width;
+  height = WINDOW_CONFIG_SCROLL_BAR_LINES (window) * FRAME_LINE_HEIGHT (f);
+  top = WINDOW_SCROLL_BAR_AREA_Y (window);
+
+  r = NSMakeRect (left, top, width, height);
+  /* the parent view is flipped, so we need to flip y value */
+  v = [view frame];
+  /* ??????? PXW/scrollbars !!!!!!!!!!!!!!!!!!!! */
+  r.origin.y = (v.size.height - r.size.height - r.origin.y);
+
+  XSETWINDOW (win, window);
+  block_input ();
+
+  if (WINDOW_TOTAL_COLS (window) < 5)
+    {
+      if (!NILP (window->horizontal_scroll_bar))
+        {
+          bar = XNS_SCROLL_BAR (window->horizontal_scroll_bar);
+          [bar removeFromSuperview];
+          wset_horizontal_scroll_bar (window, Qnil);
+        }
+      ns_clear_frame_area (f, left, top, width, height);
+      unblock_input ();
+      return;
+    }
+
+  if (NILP (window->horizontal_scroll_bar))
+    {
+      if (width > 0 && height > 0)
+       ns_clear_frame_area (f, left, top, width, height);
+
+      bar = [[EmacsScroller alloc] initFrame: r window: win];
+      wset_horizontal_scroll_bar (window, make_save_ptr (bar));
+    }
+  else
+    {
+      NSRect oldRect;
+      bar = XNS_SCROLL_BAR (window->horizontal_scroll_bar);
+      oldRect = [bar frame];
+      r.size.width = oldRect.size.width;
+      if (FRAME_LIVE_P (f) && !NSEqualRects (oldRect, r))
+        {
+          if (oldRect.origin.x != r.origin.x)
+              ns_clear_frame_area (f, left, top, width, height);
           [bar setFrame: r];
         }
     }
@@ -3939,6 +3973,12 @@ ns_redeem_scroll_bar (struct window *window)
       bar = XNS_SCROLL_BAR (window->vertical_scroll_bar);
       [bar reprieve];
     }
+
+  if (!NILP (window->horizontal_scroll_bar))
+    {
+      bar = XNS_SCROLL_BAR (window->horizontal_scroll_bar);
+      [bar reprieve];
+    }
 }
 
 
@@ -4114,7 +4154,9 @@ static struct redisplay_interface ns_redisplay_interface =
   ns_draw_window_cursor,
   ns_draw_vertical_window_border,
   ns_draw_window_divider,
-  ns_shift_glyphs_for_insert
+  ns_shift_glyphs_for_insert,
+  ns_show_hourglass,
+  ns_hide_hourglass
 };
 
 
@@ -4154,38 +4196,30 @@ ns_create_terminal (struct ns_display_info *dpyinfo)
 
   NSTRACE (ns_create_terminal);
 
-  terminal = create_terminal ();
+  terminal = create_terminal (output_ns, &ns_redisplay_interface);
 
-  terminal->type = output_ns;
   terminal->display_info.ns = dpyinfo;
   dpyinfo->terminal = terminal;
 
-  terminal->rif = &ns_redisplay_interface;
-
   terminal->clear_frame_hook = ns_clear_frame;
-  terminal->ins_del_lines_hook = 0; /* XXX vestigial? */
-  terminal->delete_glyphs_hook = 0; /* XXX vestigial? */
   terminal->ring_bell_hook = ns_ring_bell;
-  terminal->reset_terminal_modes_hook = NULL;
-  terminal->set_terminal_modes_hook = NULL;
   terminal->update_begin_hook = ns_update_begin;
   terminal->update_end_hook = ns_update_end;
-  terminal->set_terminal_window_hook = NULL; /* XXX vestigial? */
   terminal->read_socket_hook = ns_read_socket;
   terminal->frame_up_to_date_hook = ns_frame_up_to_date;
   terminal->mouse_position_hook = ns_mouse_position;
   terminal->frame_rehighlight_hook = ns_frame_rehighlight;
   terminal->frame_raise_lower_hook = ns_frame_raise_lower;
-
   terminal->fullscreen_hook = ns_fullscreen_hook;
-
+  terminal->menu_show_hook = ns_menu_show;
+  terminal->popup_dialog_hook = ns_popup_dialog;
   terminal->set_vertical_scroll_bar_hook = ns_set_vertical_scroll_bar;
   terminal->condemn_scroll_bars_hook = ns_condemn_scroll_bars;
   terminal->redeem_scroll_bar_hook = ns_redeem_scroll_bar;
   terminal->judge_scroll_bars_hook = ns_judge_scroll_bars;
-
   terminal->delete_frame_hook = x_destroy_window;
   terminal->delete_terminal_hook = ns_delete_terminal;
+  /* Other hooks are NULL by default.  */
 
   return terminal;
 }
@@ -4466,7 +4500,7 @@ ns_term_shutdown (int sig)
 {
   if (self = [super init])
     {
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
+#ifdef NS_IMPL_COCOA
       self->isFirst = YES;
 #endif
 #ifdef NS_IMPL_GNUSTEP
@@ -4477,30 +4511,40 @@ ns_term_shutdown (int sig)
   return self;
 }
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
+#ifdef NS_IMPL_COCOA
 - (void)run
 {
-    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+#ifndef NSAppKitVersionNumber10_8
+#define NSAppKitVersionNumber10_8 1187
+#endif
 
-    if (isFirst) [self finishLaunching];
-    isFirst = NO;
+  if (NSAppKitVersionNumber <= NSAppKitVersionNumber10_8)
+    {
+      [super run];
+      return;
+    }
 
-    shouldKeepRunning = YES;
-    do
-      {
-        [pool release];
-        pool = [[NSAutoreleasePool alloc] init];
-
-        NSEvent *event =
-          [self nextEventMatchingMask:NSAnyEventMask
-                            untilDate:[NSDate distantFuture]
-                               inMode:NSDefaultRunLoopMode
-                              dequeue:YES];
-        [self sendEvent:event];
-        [self updateWindows];
+  NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+  if (isFirst) [self finishLaunching];
+  isFirst = NO;
+
+  shouldKeepRunning = YES;
+  do
+    {
+      [pool release];
+      pool = [[NSAutoreleasePool alloc] init];
+
+      NSEvent *event =
+        [self nextEventMatchingMask:NSAnyEventMask
+                          untilDate:[NSDate distantFuture]
+                             inMode:NSDefaultRunLoopMode
+                            dequeue:YES];
+      [self sendEvent:event];
+      [self updateWindows];
     } while (shouldKeepRunning);
 
-    [pool release];
+  [pool release];
 }
 
 - (void)stop: (id)sender
@@ -4510,7 +4554,7 @@ ns_term_shutdown (int sig)
     // The file dialog still leaks 7k - 10k on 10.9 though.
     [super stop:sender];
 }
-#endif
+#endif /* NS_IMPL_COCOA */
 
 - (void)logNotification: (NSNotification *)notification
 {
@@ -4671,13 +4715,11 @@ ns_term_shutdown (int sig)
 
   [self antialiasThresholdDidChange:nil];
 #ifdef NS_IMPL_COCOA
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
   [[NSNotificationCenter defaultCenter]
     addObserver:self
        selector:@selector(antialiasThresholdDidChange:)
           name:NSAntialiasThresholdChangedNotification
         object:nil];
-#endif
 #endif
 
   ns_send_appdefined (-2);
@@ -4686,10 +4728,8 @@ ns_term_shutdown (int sig)
 - (void)antialiasThresholdDidChange:(NSNotification *)notification
 {
 #ifdef NS_IMPL_COCOA
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
   macfont_update_antialias_threshold ();
 #endif
-#endif
 }
 
 
@@ -5029,11 +5069,11 @@ not_in_argv (NSString *arg)
   if (!emacs_event)
     return;
 
-  if (EQ (font->driver->type, Qns))
-    nsfont = ((struct nsfont_info *)font)->nsfont;
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
-  else
-    nsfont = (NSFont *) macfont_get_nsctfont (font);
+#ifdef NS_IMPL_GNUSTEP
+  nsfont = ((struct nsfont_info *)font)->nsfont;
+#endif
+#ifdef NS_IMPL_COCOA
+  nsfont = (NSFont *) macfont_get_nsctfont (font);
 #endif
 
   if ((newFont = [sender convertFont: nsfont]))
@@ -5085,7 +5125,7 @@ not_in_argv (NSString *arg)
   int code;
   unsigned fnKeysym = 0;
   static NSMutableArray *nsEvArray;
-#if !defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
+#ifdef NS_IMPL_GNUSTEP
   static BOOL firstTime = YES;
 #endif
   int left_is_none;
@@ -5316,7 +5356,7 @@ not_in_argv (NSString *arg)
     }
 
 
-#if !defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
+#ifdef NS_IMPL_GNUSTEP
   /* if we get here we should send the key for input manager processing */
   /* Disable warning, there is nothing a user can do about it anyway, and
      it does not seem to matter.  */
@@ -5712,14 +5752,10 @@ not_in_argv (NSString *arg)
       /* NOTE: help_echo_{window,pos,object} are set in xdisp.c
          (note_mouse_highlight), which is called through the
          note_mouse_movement () call above */
+      any_help_event_p = YES;
       gen_help_event (help_echo_string, frame, help_echo_window,
                       help_echo_object, help_echo_pos);
     }
-  else
-    {
-      help_echo_string = Qnil;
-      gen_help_event (Qnil, frame, Qnil, Qnil, 0);
-    }
 
   if (emacsframe->mouse_moved && send_appdefined)
     ns_send_appdefined (-1);
@@ -5780,7 +5816,8 @@ not_in_argv (NSString *arg)
     {
 #ifdef NS_IMPL_GNUSTEP
       // GNUstep does not always update the tool bar height.  Force it.
-      if (toolbar) update_frame_tool_bar (emacsframe);
+      if (toolbar && [toolbar isVisible])
+          update_frame_tool_bar (emacsframe);
 #endif
 
       extra = FRAME_NS_TITLEBAR_HEIGHT (emacsframe)
@@ -6000,6 +6037,14 @@ if (cols > 0 && rows > 0)
       x_set_frame_alpha (emacsframe);
     }
 
+  if (any_help_event_p)
+    {
+      Lisp_Object frame;
+      XSETFRAME (frame, emacsframe);
+      help_echo_string = Qnil;
+      gen_help_event (Qnil, frame, Qnil, Qnil, 0);
+    }
+
   if (emacs_event && is_focus_frame)
     {
       [self deleteWorkingText];
@@ -6453,8 +6498,7 @@ if (cols > 0 && rows > 0)
       /* Hide dock and menubar if we are on the primary screen.  */
       if (onFirstScreen)
         {
-#if defined (NS_IMPL_COCOA) && \
-  MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+#ifdef NS_IMPL_COCOA
           NSApplicationPresentationOptions options
             = NSApplicationPresentationAutoHideDock
             | NSApplicationPresentationAutoHideMenuBar;
@@ -6494,7 +6538,7 @@ if (cols > 0 && rows > 0)
       [fw makeFirstResponder:self];
       [w orderOut:self];
       r = [fw frameRectForContentRect:[screen frame]];
-      [fw setFrame: r display:YES animate:YES];
+      [fw setFrame: r display:YES animate:ns_use_fullscreen_animation];
       [self windowDidEnterFullScreen:nil];
       [fw display];
     }
@@ -6506,8 +6550,7 @@ if (cols > 0 && rows > 0)
 
       if (onFirstScreen)
         {
-#if defined (NS_IMPL_COCOA) && \
-  MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+#ifdef NS_IMPL_COCOA
           [NSApp setPresentationOptions: NSApplicationPresentationDefault];
 #else
           [NSMenu setMenuBarVisible:YES];
@@ -6526,7 +6569,7 @@ if (cols > 0 && rows > 0)
         FRAME_TOOLBAR_HEIGHT (f) = tobar_height;
 
       [self windowWillExitFullScreen:nil];
-      [fw setFrame: [w frame] display:YES animate:YES];
+      [fw setFrame: [w frame] display:YES animate:ns_use_fullscreen_animation];
       [fw close];
       [w makeKeyAndOrderFront:NSApp];
       [self windowDidExitFullScreen:nil];
@@ -6832,7 +6875,7 @@ if (cols > 0 && rows > 0)
     }
   else
     {
-      error ("Invalid data type in dragging pasteboard");
+      fprintf (stderr, "Invalid data type in dragging pasteboard");
       return NO;
     }
 }
@@ -7022,7 +7065,7 @@ if (cols > 0 && rows > 0)
 #endif
 #endif
 
-  for (i = 0; i < nr_screens; ++i) 
+  for (i = 0; i < nr_screens; ++i)
     {
       NSScreen *s = [screens objectAtIndex: i];
       NSRect scrrect = [s frame];
@@ -7034,7 +7077,7 @@ if (cols > 0 && rows > 0)
 
   if (nr_eff_screens == 1)
     return [super constrainFrameRect:frameRect toScreen:screen];
-  
+
   /* The default implementation does two things 1) ensure that the top
      of the rectangle is below the menu bar (or below the top of the
      screen) and 2) resizes windows larger than the screen. As we
@@ -7162,15 +7205,6 @@ if (cols > 0 && rows > 0)
 }
 
 
-- (void)dealloc
-{
-  NSTRACE (EmacsScroller_dealloc);
-  if (!NILP (win))
-    wset_vertical_scroll_bar (XWINDOW (win), Qnil);
-  [super dealloc];
-}
-
-
 - condemn
 {
   NSTRACE (condemn);
@@ -7198,6 +7232,9 @@ if (cols > 0 && rows > 0)
       view = (EmacsView *)FRAME_NS_VIEW (frame);
       if (view != nil)
         view->scrollbarsNeedingUpdate++;
+      if (!NILP (win))
+        wset_vertical_scroll_bar (XWINDOW (win), Qnil);
+      win = Qnil;
       [self removeFromSuperview];
       [self release];
       unblock_input ();
@@ -7235,7 +7272,7 @@ if (cols > 0 && rows > 0)
 
   if (portion >= whole)
     {
-#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
+#ifdef NS_IMPL_COCOA
       [self setKnobProportion: 1.0];
       [self setDoubleValue: 1.0];
 #else
@@ -7249,7 +7286,7 @@ if (cols > 0 && rows > 0)
       portion = max ((float)whole*min_portion/pixel_height, portion);
       pos = (float)position / (whole - portion);
       por = (CGFloat)portion/whole;
-#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
+#ifdef NS_IMPL_COCOA
       [self setKnobProportion: por];
       [self setDoubleValue: pos];
 #else
@@ -7475,7 +7512,7 @@ if (cols > 0 && rows > 0)
       [scroll_repeat_entry release];
       scroll_repeat_entry = nil;
     }
-  last_hit_part = 0;
+  last_hit_part = scroll_bar_above_handle;
 }
 
 
@@ -7525,8 +7562,6 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
   FRAME_COLUMN_WIDTH (f) = font->average_width;
   FRAME_LINE_HEIGHT (f) = font->height;
 
-  compute_fringe_widths (f, 1);
-
   /* Compute the scroll bar width in character columns.  */
   if (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) > 0)
     {
@@ -7540,6 +7575,19 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
       FRAME_CONFIG_SCROLL_BAR_COLS (f) = (14 + wid - 1) / wid;
     }
 
+  /* Compute the scroll bar height in character lines.  */
+  if (FRAME_CONFIG_SCROLL_BAR_HEIGHT (f) > 0)
+    {
+      int height = FRAME_LINE_HEIGHT (f);
+      FRAME_CONFIG_SCROLL_BAR_LINES (f)
+       = (FRAME_CONFIG_SCROLL_BAR_HEIGHT (f) + height - 1) / height;
+    }
+  else
+    {
+      int height = FRAME_LINE_HEIGHT (f);
+      FRAME_CONFIG_SCROLL_BAR_LINES (f) = (14 + height - 1) / height;
+    }
+
   /* Now make the frame display the given font.  */
   if (FRAME_NS_WINDOW (f) != 0 && ! [view isFullscreen])
     x_set_window_size (f, 0, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
@@ -7725,6 +7773,12 @@ Default is t for OSX >= 10.7, nil otherwise.  */);
 #endif
   ns_last_use_native_fullscreen = ns_use_native_fullscreen;
 
+  DEFVAR_BOOL ("ns-use-fullscreen-animation", ns_use_fullscreen_animation,
+     doc: /*Non-nil means use animation on non-native fullscreen.
+For native fullscreen, this does nothing.
+Default is nil.  */);
+  ns_use_fullscreen_animation = NO;
+
   DEFVAR_BOOL ("ns-use-srgb-colorspace", ns_use_srgb_colorspace,
      doc: /*Non-nil means to use sRGB colorspace on OSX >= 10.7.
 Note that this does not apply to images.
@@ -7762,14 +7816,12 @@ baseline level.  The default value is nil.  */);
   DEFSYM (Qcocoa, "cocoa");
   DEFSYM (Qgnustep, "gnustep");
 
-  syms_of_nsfont ();
 #ifdef NS_IMPL_COCOA
   Fprovide (Qcocoa, Qnil);
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
   syms_of_macfont ();
-#endif
 #else
   Fprovide (Qgnustep, Qnil);
+  syms_of_nsfont ();
 #endif
 
 }
index 475be9ec28542c213462367dfe43835a90adbb25..49331ef0984dafe02eb7e49203e432b6d3fb6f1b 100644 (file)
@@ -58,6 +58,9 @@ static ptrdiff_t new_backquote_output;
 #define PRINT_CIRCLE 200
 static Lisp_Object being_printed[PRINT_CIRCLE];
 
+/* Last char printed to stdout by printchar.  */
+static unsigned int printchar_stdout_last;
+
 /* When printing into a buffer, first we put the text in this
    block, then insert it all at once.  */
 static char *print_buffer;
@@ -169,11 +172,13 @@ bool print_output_debug_flag EXTERNALLY_VISIBLE = 1;
        if (print_buffer_pos != print_buffer_pos_byte                   \
           && NILP (BVAR (current_buffer, enable_multibyte_characters)))\
         {                                                              \
-          unsigned char *temp = alloca (print_buffer_pos + 1);         \
+          USE_SAFE_ALLOCA;                                             \
+          unsigned char *temp = SAFE_ALLOCA (print_buffer_pos + 1);    \
           copy_text ((unsigned char *) print_buffer, temp,             \
                      print_buffer_pos_byte, 1, 0);                     \
           insert_1_both ((char *) temp, print_buffer_pos,              \
                          print_buffer_pos, 0, 1, 0);                   \
+          SAFE_FREE ();                                                \
         }                                                              \
        else                                                            \
         insert_1_both (print_buffer, print_buffer_pos,                 \
@@ -236,6 +241,7 @@ printchar (unsigned int ch, Lisp_Object fun)
        }
       else if (noninteractive)
        {
+         printchar_stdout_last = ch;
          fwrite (str, 1, len, stdout);
          noninteractive_need_newline = 1;
        }
@@ -513,19 +519,33 @@ static void print_preprocess (Lisp_Object);
 static void print_preprocess_string (INTERVAL, Lisp_Object);
 static void print_object (Lisp_Object, Lisp_Object, bool);
 
-DEFUN ("terpri", Fterpri, Sterpri, 0, 1, 0,
+DEFUN ("terpri", Fterpri, Sterpri, 0, 2, 0,
        doc: /* Output a newline to stream PRINTCHARFUN.
+If ENSURE is non-nil only output a newline if not already at the
+beginning of a line.  Value is non-nil if a newline is printed.
 If PRINTCHARFUN is omitted or nil, the value of `standard-output' is used.  */)
-  (Lisp_Object printcharfun)
+  (Lisp_Object printcharfun, Lisp_Object ensure)
 {
-  PRINTDECLARE;
+  Lisp_Object val = Qnil;
 
+  PRINTDECLARE;
   if (NILP (printcharfun))
     printcharfun = Vstandard_output;
   PRINTPREPARE;
-  PRINTCHAR ('\n');
+
+  if (NILP (ensure))
+    val = Qt;
+  /* Difficult to check if at line beginning so abort.  */
+  else if (FUNCTIONP (printcharfun))
+    signal_error ("Unsupported function argument", printcharfun);
+  else if (noninteractive && !NILP (printcharfun))
+    val = printchar_stdout_last == 10 ? Qnil : Qt;
+  else if (NILP (Fbolp ()))
+    val = Qt;
+
+  if (!NILP (val)) PRINTCHAR ('\n');
   PRINTFINISH;
-  return Qt;
+  return val;
 }
 
 DEFUN ("prin1", Fprin1, Sprin1, 1, 2, 0,
@@ -581,7 +601,6 @@ A printed representation of an object is text which describes that object.  */)
 {
   Lisp_Object printcharfun;
   bool prev_abort_on_gc;
-  /* struct gcpro gcpro1, gcpro2; */
   Lisp_Object save_deactivate_mark;
   ptrdiff_t count = SPECPDL_INDEX ();
   struct buffer *previous;
@@ -595,7 +614,6 @@ A printed representation of an object is text which describes that object.  */)
        but we don't want to deactivate the mark just for that.
        No need for specbind, since errors deactivate the mark.  */
     save_deactivate_mark = Vdeactivate_mark;
-    /* GCPRO2 (object, save_deactivate_mark); */
     prev_abort_on_gc = abort_on_gc;
     abort_on_gc = 1;
 
@@ -619,7 +637,6 @@ A printed representation of an object is text which describes that object.  */)
   set_buffer_internal (previous);
 
   Vdeactivate_mark = save_deactivate_mark;
-  /* UNGCPRO; */
 
   abort_on_gc = prev_abort_on_gc;
   return unbind_to (count, object);
@@ -1228,7 +1245,8 @@ print_preprocess (Lisp_Object obj)
          size = ASIZE (obj);
          if (size & PSEUDOVECTOR_FLAG)
            size &= PSEUDOVECTOR_SIZE_MASK;
-         for (i = 0; i < size; i++)
+         for (i = (SUB_CHAR_TABLE_P (obj)
+                   ? SUB_CHAR_TABLE_OFFSET : 0); i < size; i++)
            print_preprocess (AREF (obj, i));
          if (HASH_TABLE_P (obj))
            { /* For hash tables, the key_and_value slot is past
@@ -1472,7 +1490,7 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag)
                  strout (outbuf, len, len, printcharfun);
                }
              else if (! multibyte
-                      && SINGLE_BYTE_CHAR_P (c) && ! ASCII_BYTE_P (c)
+                      && SINGLE_BYTE_CHAR_P (c) && ! ASCII_CHAR_P (c)
                       && print_escape_nonascii)
                {
                  /* When printing in a multibyte buffer
@@ -1968,7 +1986,7 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag)
                 Otherwise we'll make a line extremely long, which
                 results in slow redisplay.  */
              if (SUB_CHAR_TABLE_P (obj)
-                 && XINT (XSUB_CHAR_TABLE (obj)->depth) == 3)
+                 && XSUB_CHAR_TABLE (obj)->depth == 3)
                PRINTCHAR ('\n');
              PRINTCHAR ('#');
              PRINTCHAR ('^');
@@ -1981,16 +1999,24 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag)
 
          PRINTCHAR ('[');
          {
-           register int i;
+           int i, idx = SUB_CHAR_TABLE_P (obj) ? SUB_CHAR_TABLE_OFFSET : 0;
            register Lisp_Object tem;
            ptrdiff_t real_size = size;
 
+           /* For a sub char-table, print heading non-Lisp data first.  */
+           if (SUB_CHAR_TABLE_P (obj))
+             {
+               i = sprintf (buf, "%d %d", XSUB_CHAR_TABLE (obj)->depth,
+                            XSUB_CHAR_TABLE (obj)->min_char);
+               strout (buf, i, i, printcharfun);
+             }
+
            /* Don't print more elements than the specified maximum.  */
            if (NATNUMP (Vprint_length)
                && XFASTINT (Vprint_length) < size)
              size = XFASTINT (Vprint_length);
 
-           for (i = 0; i < size; i++)
+           for (i = idx; i < size; i++)
              {
                if (i) PRINTCHAR (' ');
                tem = AREF (obj, i);
index 178fba8887e547c397f5e674e271b5deac67103d..06fc918cf54c1dd946b79526c7c90a7ad3fc7699 100644 (file)
@@ -227,8 +227,9 @@ static EMACS_INT update_tick;
 /* Only W32 has this, it really means that select can't take write mask.  */
 #ifdef BROKEN_NON_BLOCKING_CONNECT
 #undef NON_BLOCKING_CONNECT
-#define SELECT_CANT_DO_WRITE_MASK
+enum { SELECT_CAN_DO_WRITE_MASK = false };
 #else
+enum { SELECT_CAN_DO_WRITE_MASK = true };
 #ifndef NON_BLOCKING_CONNECT
 #ifdef HAVE_SELECT
 #if defined (HAVE_GETPEERNAME) || defined (GNU_LINUX)
@@ -284,17 +285,11 @@ static void create_process (Lisp_Object, char **, Lisp_Object);
 static bool keyboard_bit_set (fd_set *);
 #endif
 static void deactivate_process (Lisp_Object);
-static void status_notify (struct Lisp_Process *);
+static int status_notify (struct Lisp_Process *, struct Lisp_Process *);
 static int read_process_output (Lisp_Object, int);
 static void handle_child_signal (int);
 static void create_pty (Lisp_Object);
 
-/* If we support a window system, turn on the code to poll periodically
-   to detect C-g.  It isn't actually used when doing interrupt input.  */
-#ifdef HAVE_WINDOW_SYSTEM
-#define POLL_FOR_INPUT
-#endif
-
 static Lisp_Object get_process (register Lisp_Object name);
 static void exec_sentinel (Lisp_Object proc, Lisp_Object reason);
 
@@ -471,7 +466,6 @@ static struct fd_callback_data
 void
 add_read_fd (int fd, fd_callback func, void *data)
 {
-  eassert (fd < FD_SETSIZE);
   add_keyboard_wait_descriptor (fd);
 
   fd_callback_info[fd].func = func;
@@ -484,7 +478,6 @@ add_read_fd (int fd, fd_callback func, void *data)
 void
 delete_read_fd (int fd)
 {
-  eassert (fd < FD_SETSIZE);
   delete_keyboard_wait_descriptor (fd);
 
   fd_callback_info[fd].condition &= ~FOR_READ;
@@ -501,7 +494,6 @@ delete_read_fd (int fd)
 void
 add_write_fd (int fd, fd_callback func, void *data)
 {
-  eassert (fd < FD_SETSIZE);
   FD_SET (fd, &write_mask);
   if (fd > max_input_desc)
     max_input_desc = fd;
@@ -532,7 +524,6 @@ delete_input_desc (int fd)
 void
 delete_write_fd (int fd)
 {
-  eassert (fd < FD_SETSIZE);
   FD_CLR (fd, &write_mask);
   fd_callback_info[fd].condition &= ~FOR_WRITE;
   if (fd_callback_info[fd].condition == 0)
@@ -608,7 +599,7 @@ status_message (struct Lisp_Process *p)
   Lisp_Object symbol;
   int code;
   bool coredump;
-  Lisp_Object string, string2;
+  Lisp_Object string;
 
   decode_status (status, &symbol, &code, &coredump);
 
@@ -632,8 +623,8 @@ status_message (struct Lisp_Process *p)
          if (c1 != c2)
            Faset (string, make_number (0), make_number (c2));
        }
-      string2 = build_string (coredump ? " (core dumped)\n" : "\n");
-      return concat2 (string, string2);
+      AUTO_STRING (suffix, coredump ? " (core dumped)\n" : "\n");
+      return concat2 (string, suffix);
     }
   else if (EQ (symbol, Qexit))
     {
@@ -641,17 +632,17 @@ status_message (struct Lisp_Process *p)
        return build_string (code == 0 ? "deleted\n" : "connection broken by remote peer\n");
       if (code == 0)
        return build_string ("finished\n");
+      AUTO_STRING (prefix, "exited abnormally with code ");
       string = Fnumber_to_string (make_number (code));
-      string2 = build_string (coredump ? " (core dumped)\n" : "\n");
-      return concat3 (build_string ("exited abnormally with code "),
-                     string, string2);
+      AUTO_STRING (suffix, coredump ? " (core dumped)\n" : "\n");
+      return concat3 (prefix, string, suffix);
     }
   else if (EQ (symbol, Qfailed))
     {
+      AUTO_STRING (prefix, "failed with code ");
       string = Fnumber_to_string (make_number (code));
-      string2 = build_string ("\n");
-      return concat3 (build_string ("failed with code "),
-                     string, string2);
+      AUTO_STRING (suffix, "\n");
+      return concat3 (prefix, string, suffix);
     }
   else
     return Fcopy_sequence (Fsymbol_name (symbol));
@@ -873,7 +864,7 @@ nil, indicating the current buffer's process.  */)
     {
       pset_status (p, list2 (Qexit, make_number (0)));
       p->tick = ++process_tick;
-      status_notify (p);
+      status_notify (p, NULL);
       redisplay_preserve_echo_area (13);
     }
   else
@@ -893,7 +884,7 @@ nil, indicating the current buffer's process.  */)
            pset_status (p, list2 (Qsignal, make_number (SIGKILL)));
 
          p->tick = ++process_tick;
-         status_notify (p);
+         status_notify (p, NULL);
          redisplay_preserve_echo_area (13);
        }
     }
@@ -1314,30 +1305,34 @@ Returns nil if format of ADDRESS is invalid.  */)
       ptrdiff_t size = p->header.size;
       Lisp_Object args[10];
       int nargs, i;
+      char const *format;
 
       if (size == 4 || (size == 5 && !NILP (omit_port)))
        {
-         args[0] = build_string ("%d.%d.%d.%d");
+         format = "%d.%d.%d.%d";
          nargs = 4;
        }
       else if (size == 5)
        {
-         args[0] = build_string ("%d.%d.%d.%d:%d");
+         format = "%d.%d.%d.%d:%d";
          nargs = 5;
        }
       else if (size == 8 || (size == 9 && !NILP (omit_port)))
        {
-         args[0] = build_string ("%x:%x:%x:%x:%x:%x:%x:%x");
+         format = "%x:%x:%x:%x:%x:%x:%x:%x";
          nargs = 8;
        }
       else if (size == 9)
        {
-         args[0] = build_string ("[%x:%x:%x:%x:%x:%x:%x:%x]:%d");
+         format = "[%x:%x:%x:%x:%x:%x:%x:%x]:%d";
          nargs = 9;
        }
       else
        return Qnil;
 
+      AUTO_STRING (format_obj, format);
+      args[0] = format_obj;
+
       for (i = 0; i < nargs; i++)
        {
          if (! RANGED_INTEGERP (0, p->contents[i], 65535))
@@ -1351,15 +1346,13 @@ Returns nil if format of ADDRESS is invalid.  */)
          args[i+1] = p->contents[i];
        }
 
-      return Fformat (nargs+1, args);
+      return Fformat (nargs + 1, args);
     }
 
   if (CONSP (address))
     {
-      Lisp_Object args[2];
-      args[0] = build_string ("<Family %d>");
-      args[1] = Fcar (address);
-      return Fformat (2, args);
+      AUTO_STRING (format, "<Family %d>");
+      return Fformat (2, (Lisp_Object []) {format, Fcar (address)});
     }
 
   return Qnil;
@@ -1398,9 +1391,10 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS)  */)
   (ptrdiff_t nargs, Lisp_Object *args)
 {
   Lisp_Object buffer, name, program, proc, current_dir, tem;
-  register unsigned char **new_argv;
+  unsigned char **new_argv;
   ptrdiff_t i;
   ptrdiff_t count = SPECPDL_INDEX ();
+  USE_SAFE_ALLOCA;
 
   buffer = args[1];
   if (!NILP (buffer))
@@ -1476,7 +1470,7 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS)  */)
     val = Vcoding_system_for_read;
     if (NILP (val))
       {
-       args2 = alloca ((nargs + 1) * sizeof *args2);
+       SAFE_ALLOCA_LISP (args2, nargs + 1);
        args2[0] = Qstart_process;
        for (i = 0; i < nargs; i++) args2[i + 1] = args[i];
        GCPRO2 (proc, current_dir);
@@ -1495,7 +1489,7 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS)  */)
       {
        if (EQ (coding_systems, Qt))
          {
-           args2 = alloca ((nargs + 1) * sizeof *args2);
+           SAFE_ALLOCA_LISP (args2, nargs + 1);
            args2[0] = Qstart_process;
            for (i = 0; i < nargs; i++) args2[i + 1] = args[i];
            GCPRO2 (proc, current_dir);
@@ -1590,7 +1584,7 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS)  */)
 
       /* Now that everything is encoded we can collect the strings into
         NEW_ARGV.  */
-      new_argv = alloca ((nargs - 1) * sizeof *new_argv);
+      SAFE_NALLOCA (new_argv, 1, nargs - 1);
       new_argv[nargs - 2] = 0;
 
       for (i = nargs - 2; i-- != 0; )
@@ -1604,6 +1598,7 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS)  */)
   else
     create_pty (proc);
 
+  SAFE_FREE ();
   return unbind_to (count, proc);
 }
 
@@ -1666,6 +1661,7 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir)
   bool pty_flag = 0;
   char pty_name[PTY_NAME_SIZE];
   Lisp_Object lisp_pty_name = Qnil;
+  sigset_t oldset;
 
   inchannel = outchannel = -1;
 
@@ -1731,7 +1727,7 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir)
   setup_process_coding_systems (process);
 
   block_input ();
-  block_child_signal ();
+  block_child_signal (&oldset);
 
 #ifndef WINDOWSNT
   /* vfork, and prevent local vars from being clobbered by the vfork.  */
@@ -1855,7 +1851,7 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir)
       signal (SIGPIPE, SIG_DFL);
 
       /* Stop blocking SIGCHLD in the child.  */
-      unblock_child_signal ();
+      unblock_child_signal (&oldset);
 
       if (pty_flag)
        child_setup_tty (xforkout);
@@ -1874,7 +1870,7 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir)
     p->alive = 1;
 
   /* Stop blocking in the parent.  */
-  unblock_child_signal ();
+  unblock_child_signal (&oldset);
   unblock_input ();
 
   if (pid < 0)
@@ -1969,9 +1965,6 @@ create_pty (Lisp_Object process)
 /* Convert an internal struct sockaddr to a lisp object (vector or string).
    The address family of sa is not included in the result.  */
 
-#ifndef WINDOWSNT
-static
-#endif
 Lisp_Object
 conv_sockaddr_to_lisp (struct sockaddr *sa, int len)
 {
@@ -2024,11 +2017,11 @@ conv_sockaddr_to_lisp (struct sockaddr *sa, int len)
            terminator, however.  */
         if (name_length > 0 && sockun->sun_path[0] != '\0')
           {
-            const char* terminator =
-              memchr (sockun->sun_path, '\0', name_length);
+            const char *terminator
+             = memchr (sockun->sun_path, '\0', name_length);
 
             if (terminator)
-              name_length = terminator - (const char*) sockun->sun_path;
+              name_length = terminator - (const char *) sockun->sun_path;
           }
 
        return make_unibyte_string (sockun->sun_path, name_length);
@@ -2085,8 +2078,10 @@ get_lisp_to_sockaddr_size (Lisp_Object address, int *familyp)
           && VECTORP (XCDR (address)))
     {
       struct sockaddr *sa;
-      *familyp = XINT (XCAR (address));
       p = XVECTOR (XCDR (address));
+      if (MAX_ALLOCA - sizeof sa->sa_family < p->header.size)
+       return 0;
+      *familyp = XINT (XCAR (address));
       return p->header.size + sizeof (sa->sa_family);
     }
   return 0;
@@ -2858,7 +2853,7 @@ usage: (make-network-process &rest ARGS)  */)
   struct gcpro gcpro1;
   ptrdiff_t count = SPECPDL_INDEX ();
   ptrdiff_t count1;
-  Lisp_Object QCaddress;  /* one of QClocal or QCremote */
+  Lisp_Object colon_address;  /* Either QClocal or QCremote.  */
   Lisp_Object tem;
   Lisp_Object name, buffer, host, service, address;
   Lisp_Object filter, sentinel;
@@ -2906,8 +2901,8 @@ usage: (make-network-process &rest ARGS)  */)
        backlog = XINT (tem);
     }
 
-  /* Make QCaddress an alias for :local (server) or :remote (client).  */
-  QCaddress = is_server ? QClocal : QCremote;
+  /* Make colon_address an alias for :local (server) or :remote (client).  */
+  colon_address = is_server ? QClocal : QCremote;
 
   /* :nowait BOOL */
   if (!is_server && socktype != SOCK_DGRAM
@@ -2934,7 +2929,7 @@ usage: (make-network-process &rest ARGS)  */)
   res = &ai;
 
   /* :local ADDRESS or :remote ADDRESS */
-  address = Fplist_get (contact, QCaddress);
+  address = Fplist_get (contact, colon_address);
   if (!NILP (address))
     {
       host = service = Qnil;
@@ -3003,7 +2998,7 @@ usage: (make-network-process &rest ARGS)  */)
       address_un.sun_family = AF_LOCAL;
       if (sizeof address_un.sun_path <= SBYTES (service))
        error ("Service name too long");
-      strcpy (address_un.sun_path, SSDATA (service));
+      lispstpcpy (address_un.sun_path, service);
       ai.ai_addr = (struct sockaddr *) &address_un;
       ai.ai_addrlen = sizeof address_un;
       goto open_socket;
@@ -3321,7 +3316,7 @@ usage: (make-network-process &rest ARGS)  */)
            memcpy (datagram_address[s].sa, lres->ai_addr, lres->ai_addrlen);
        }
 #endif
-      contact = Fplist_put (contact, QCaddress,
+      contact = Fplist_put (contact, colon_address,
                            conv_sockaddr_to_lisp (lres->ai_addr, lres->ai_addrlen));
 #ifdef HAVE_GETSOCKNAME
       if (!is_server)
@@ -3694,7 +3689,7 @@ network_interface_info (Lisp_Object ifname)
 
   if (sizeof rq.ifr_name <= SBYTES (ifname))
     error ("interface name too long");
-  strcpy (rq.ifr_name, SSDATA (ifname));
+  lispstpcpy (rq.ifr_name, ifname);
 
   s = socket (AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0);
   if (s < 0)
@@ -3936,19 +3931,20 @@ DEFUN ("accept-process-output", Faccept_process_output, Saccept_process_output,
        0, 4, 0,
        doc: /* Allow any pending output from subprocesses to be read by Emacs.
 It is given to their filter functions.
-Non-nil arg PROCESS means do not return until some output has been received
-from PROCESS.
+Optional argument PROCESS means do not return until output has been
+received from PROCESS.
 
-Non-nil second arg SECONDS and third arg MILLISEC are number of seconds
-and milliseconds to wait; return after that much time whether or not
-there is any subprocess output.  If SECONDS is a floating point number,
+Optional second argument SECONDS and third argument MILLISEC
+specify a timeout; return after that much time even if there is
+no subprocess output.  If SECONDS is a floating point number,
 it specifies a fractional number of seconds to wait.
 The MILLISEC argument is obsolete and should be avoided.
 
-If optional fourth arg JUST-THIS-ONE is non-nil, only accept output
-from PROCESS, suspending reading output from other processes.
+If optional fourth argument JUST-THIS-ONE is non-nil, accept output
+from PROCESS only, suspending reading output from other processes.
 If JUST-THIS-ONE is an integer, don't run any timers either.
-Return non-nil if we received any output before the timeout expired.  */)
+Return non-nil if we received any output from PROCESS (or, if PROCESS
+is nil, from any process) before the timeout expired.  */)
   (register Lisp_Object process, Lisp_Object seconds, Lisp_Object millisec, Lisp_Object just_this_one)
 {
   intmax_t secs;
@@ -4000,12 +3996,13 @@ Return non-nil if we received any output before the timeout expired.  */)
     nsecs = 0;
 
   return
-    (wait_reading_process_output (secs, nsecs, 0, 0,
+    ((wait_reading_process_output (secs, nsecs, 0, 0,
                                  Qnil,
                                  !NILP (process) ? XPROCESS (process) : NULL,
                                  NILP (just_this_one) ? 0 :
                                  !INTEGERP (just_this_one) ? 1 : -1)
-     ? Qt : Qnil);
+      <= 0)
+     ? Qnil : Qt);
 }
 
 /* Accept a connection for server process SERVER on CHANNEL.  */
@@ -4069,20 +4066,15 @@ server_accept_connection (Lisp_Object server, int channel)
     {
     case AF_INET:
       {
-       Lisp_Object args[5];
        unsigned char *ip = (unsigned char *)&saddr.in.sin_addr.s_addr;
-       args[0] = build_string ("%d.%d.%d.%d");
-       args[1] = make_number (*ip++);
-       args[2] = make_number (*ip++);
-       args[3] = make_number (*ip++);
-       args[4] = make_number (*ip++);
-       host = Fformat (5, args);
-       service = make_number (ntohs (saddr.in.sin_port));
 
-       args[0] = build_string (" <%s:%d>");
-       args[1] = host;
-       args[2] = service;
-       caller = Fformat (3, args);
+       AUTO_STRING (ipv4_format, "%d.%d.%d.%d");
+       host = Fformat (5, ((Lisp_Object [])
+         { ipv4_format, make_number (ip[0]),
+           make_number (ip[1]), make_number (ip[2]), make_number (ip[3]) }));
+       service = make_number (ntohs (saddr.in.sin_port));
+       AUTO_STRING (caller_format, " <%s:%d>");
+       caller = Fformat (3, (Lisp_Object []) {caller_format, host, service});
       }
       break;
 
@@ -4092,16 +4084,15 @@ server_accept_connection (Lisp_Object server, int channel)
        Lisp_Object args[9];
        uint16_t *ip6 = (uint16_t *)&saddr.in6.sin6_addr;
        int i;
-       args[0] = build_string ("%x:%x:%x:%x:%x:%x:%x:%x");
+
+       AUTO_STRING (ipv6_format, "%x:%x:%x:%x:%x:%x:%x:%x");
+       args[0] = ipv6_format;
        for (i = 0; i < 8; i++)
-         args[i+1] = make_number (ntohs (ip6[i]));
+         args[i + 1] = make_number (ntohs (ip6[i]));
        host = Fformat (9, args);
        service = make_number (ntohs (saddr.in.sin_port));
-
-       args[0] = build_string (" <[%s]:%d>");
-       args[1] = host;
-       args[2] = service;
-       caller = Fformat (3, args);
+       AUTO_STRING (caller_format, " <[%s]:%d>");
+       caller = Fformat (3, (Lisp_Object []) {caller_format, host, service});
       }
       break;
 #endif
@@ -4111,7 +4102,9 @@ server_accept_connection (Lisp_Object server, int channel)
 #endif
     default:
       caller = Fnumber_to_string (make_number (connect_counter));
-      caller = concat3 (build_string (" <"), caller, build_string (">"));
+      AUTO_STRING (space_less_than, " <");
+      AUTO_STRING (greater_than, ">");
+      caller = concat3 (space_less_than, caller, greater_than);
       break;
     }
 
@@ -4208,16 +4201,18 @@ server_accept_connection (Lisp_Object server, int channel)
   p->inherit_coding_system_flag
     = (NILP (buffer) ? 0 : ps->inherit_coding_system_flag);
 
+  AUTO_STRING (dash, "-");
+  AUTO_STRING (nl, "\n");
+  Lisp_Object host_string = STRINGP (host) ? host : dash;
+
   if (!NILP (ps->log))
-      call3 (ps->log, server, proc,
-            concat3 (build_string ("accept from "),
-                     (STRINGP (host) ? host : build_string ("-")),
-                     build_string ("\n")));
+    {
+      AUTO_STRING (accept_from, "accept from ");
+      call3 (ps->log, server, proc, concat3 (accept_from, host_string, nl));
+    }
 
-  exec_sentinel (proc,
-                concat3 (build_string ("open from "),
-                         (STRINGP (host) ? host : build_string ("-")),
-                         build_string ("\n")));
+  AUTO_STRING (open_from, "open from ");
+  exec_sentinel (proc, concat3 (open_from, host_string, nl));
 }
 
 /* This variable is different from waiting_for_input in keyboard.c.
@@ -4270,18 +4265,17 @@ wait_reading_process_output_1 (void)
      (and gobble terminal input into the buffer if any arrives).
 
    If WAIT_PROC is specified, wait until something arrives from that
-     process.  The return value is true if we read some input from
-     that process.
+     process.
 
    If JUST_WAIT_PROC is nonzero, handle only output from WAIT_PROC
      (suspending output from other processes).  A negative value
      means don't run any timers either.
 
-   If WAIT_PROC is specified, then the function returns true if we
-     received input from that process before the timeout elapsed.
-   Otherwise, return true if we received input from any process.  */
+   Return positive if we received input from WAIT_PROC (or from any
+   process if WAIT_PROC is null), zero if we attempted to receive
+   input but got none, and negative if we didn't even try.  */
 
-bool
+int
 wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
                             bool do_display,
                             Lisp_Object wait_for_cell,
@@ -4296,8 +4290,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
   int xerrno;
   Lisp_Object proc;
   struct timespec timeout, end_time;
-  int wait_channel = -1;
-  bool got_some_input = 0;
+  int got_some_input = -1;
   ptrdiff_t count = SPECPDL_INDEX ();
 
   FD_ZERO (&Available);
@@ -4308,10 +4301,6 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
           && EQ (XCAR (wait_proc->status), Qexit)))
     message1 ("Blocking call to accept-process-output with quit inhibited!!");
 
-  /* If wait_proc is a process to watch, set wait_channel accordingly.  */
-  if (wait_proc != NULL)
-    wait_channel = wait_proc->infd;
-
   record_unwind_protect_int (wait_reading_process_output_unwind,
                             waiting_for_user_input_p);
   waiting_for_user_input_p = read_kbd;
@@ -4348,6 +4337,10 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
       if (! NILP (wait_for_cell) && ! NILP (XCAR (wait_for_cell)))
        break;
 
+      /* After reading input, vacuum up any leftovers without waiting.  */
+      if (0 <= got_some_input)
+       nsecs = -1;
+
       /* Compute time from now till when time limit is up.  */
       /* Exit if already run out.  */
       if (nsecs < 0)
@@ -4466,7 +4459,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
              /* It's okay for us to do this and then continue with
                 the loop, since timeout has already been zeroed out.  */
              clear_waiting_for_input ();
-             status_notify (NULL);
+             got_some_input = status_notify (NULL, wait_proc);
              if (do_display) redisplay_preserve_echo_area (13);
            }
        }
@@ -4476,6 +4469,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
       if (wait_proc && wait_proc->raw_status_new)
        update_status (wait_proc);
       if (wait_proc
+         && wait_proc->infd >= 0
          && ! EQ (wait_proc->status, Qrun)
          && ! EQ (wait_proc->status, Qconnect))
        {
@@ -4485,21 +4479,26 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
          XSETPROCESS (proc, wait_proc);
 
          /* Read data from the process, until we exhaust it.  */
-         while (wait_proc->infd >= 0)
+         while (true)
            {
              int nread = read_process_output (proc, wait_proc->infd);
-
-             if (nread == 0)
-               break;
-
-             if (nread > 0)
-               got_some_input = read_some_bytes = 1;
-             else if (nread == -1 && (errno == EIO || errno == EAGAIN))
-               break;
+             if (nread < 0)
+               {
+                 if (errno == EIO || errno == EAGAIN)
+                   break;
 #ifdef EWOULDBLOCK
-             else if (nread == -1 && EWOULDBLOCK == errno)
-               break;
+                 if (errno == EWOULDBLOCK)
+                   break;
 #endif
+               }
+             else
+               {
+                 if (got_some_input < nread)
+                   got_some_input = nread;
+                 if (nread == 0)
+                   break;
+                 read_some_bytes = true;
+               }
            }
          if (read_some_bytes && do_display)
            redisplay_preserve_echo_area (10);
@@ -4530,12 +4529,8 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
          else
            Available = input_wait_mask;
           Writeok = write_mask;
-#ifdef SELECT_CANT_DO_WRITE_MASK
-          check_write = 0;
-#else
-          check_write = 1;
-#endif
-         check_delay = wait_channel >= 0 ? 0 : process_output_delay_count;
+         check_delay = wait_proc ? 0 : process_output_delay_count;
+         check_write = SELECT_CAN_DO_WRITE_MASK;
        }
 
       /* If frame size has changed or the window is newly mapped,
@@ -4561,6 +4556,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
        {
          nfds = read_kbd ? 0 : 1;
          no_avail = 1;
+         FD_ZERO (&Available);
        }
 
       if (!no_avail)
@@ -4570,7 +4566,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
          /* Set the timeout for adaptive read buffering if any
             process has non-zero read_output_skip and non-zero
             read_output_delay, and we are not reading output for a
-            specific wait_channel.  It is not executed if
+            specific process.  It is not executed if
             Vprocess_adaptive_read_buffering is nil.  */
          if (process_output_skip && check_delay > 0)
            {
@@ -4632,12 +4628,13 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
                      {
                        struct Lisp_Process *p =
                          XPROCESS (chan_process[channel]);
-                       if (p && p->gnutls_p && p->gnutls_state && p->infd
+                       if (p && p->gnutls_p && p->gnutls_state
                            && ((emacs_gnutls_record_check_pending
                                 (p->gnutls_state))
                                > 0))
                          {
                            nfds++;
+                           eassert (p->infd == channel);
                            FD_SET (p->infd, &Available);
                          }
                      }
@@ -4653,6 +4650,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
                          > 0))
                    {
                      nfds = 1;
+                     eassert (0 <= wait_proc->infd);
                      /* Set to Available.  */
                      FD_SET (wait_proc->infd, &Available);
                    }
@@ -4682,12 +4680,6 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
            report_file_errno ("Failed select", Qnil, xerrno);
        }
 
-      if (no_avail)
-       {
-         FD_ZERO (&Available);
-         check_write = 0;
-       }
-
       /* Check for keyboard input */
       /* If there is any, return immediately
         to give it higher priority than subprocesses */
@@ -4754,9 +4746,6 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
        handle_input_available_signal (SIGIO);
 #endif
 
-      if (! wait_proc)
-       got_some_input |= nfds > 0;
-
       /* If checking input just got us a size-change event from X,
         obey it now if we should.  */
       if (read_kbd || ! NILP (wait_for_cell))
@@ -4788,12 +4777,6 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
              /* If waiting for this channel, arrange to return as
                 soon as no more input to be processed.  No more
                 waiting.  */
-             if (wait_channel == channel)
-               {
-                 wait_channel = -1;
-                 nsecs = -1;
-                 got_some_input = 1;
-               }
              proc = chan_process[channel];
              if (NILP (proc))
                continue;
@@ -4809,6 +4792,8 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
                 buffered-ahead character if we have one.  */
 
              nread = read_process_output (proc, channel);
+             if ((!wait_proc || wait_proc == XPROCESS (proc)) && got_some_input < nread)
+               got_some_input = nread;
              if (nread > 0)
                {
                  /* Since read_process_output can run a filter,
@@ -4933,7 +4918,8 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
                     status_notify to do it later, it will read input
                     from the process before calling the sentinel.  */
                  exec_sentinel (proc, build_string ("open\n"));
-                 if (!EQ (p->filter, Qt) && !EQ (p->command, Qt))
+                 if (0 <= p->infd && !EQ (p->filter, Qt)
+                     && !EQ (p->command, Qt))
                    {
                      FD_SET (p->infd, &input_wait_mask);
                      FD_SET (p->infd, &non_keyboard_wait_mask);
@@ -4994,18 +4980,17 @@ read_and_dispose_of_process_output (struct Lisp_Process *p, char *chars,
    for decoding.  */
 
 static int
-read_process_output (Lisp_Object proc, register int channel)
+read_process_output (Lisp_Object proc, int channel)
 {
-  register ssize_t nbytes;
-  char *chars;
-  register struct Lisp_Process *p = XPROCESS (proc);
+  ssize_t nbytes;
+  struct Lisp_Process *p = XPROCESS (proc);
   struct coding_system *coding = proc_decode_coding_system[channel];
   int carryover = p->decoding_carryover;
-  int readmax = 4096;
+  enum { readmax = 4096 };
   ptrdiff_t count = SPECPDL_INDEX ();
   Lisp_Object odeactivate;
+  char chars[sizeof coding->carryover + readmax];
 
-  chars = alloca (carryover + readmax);
   if (carryover)
     /* See the comment above.  */
     memcpy (chars, SDATA (p->decoding_buf), carryover);
@@ -5155,7 +5140,7 @@ read_and_dispose_of_process_output (struct Lisp_Process *p, char *chars,
         proc_encode_coding_system[p->outfd] surely points to a
         valid memory because p->outfd will be changed once EOF is
         sent to the process.  */
-      if (NILP (p->encode_coding_system)
+      if (NILP (p->encode_coding_system) && p->outfd >= 0
          && proc_encode_coding_system[p->outfd])
        {
          pset_encode_coding_system
@@ -5829,36 +5814,31 @@ process_send_signal (Lisp_Object process, int signo, Lisp_Object current_group,
       p->tick = ++process_tick;
       if (!nomsg)
        {
-         status_notify (NULL);
+         status_notify (NULL, NULL);
          redisplay_preserve_echo_area (13);
        }
     }
 #endif
 
+#ifdef TIOCSIGSEND
+  /* Work around a HP-UX 7.0 bug that mishandles signals to subjobs.
+     We don't know whether the bug is fixed in later HP-UX versions.  */
+  if (! NILP (current_group) && ioctl (p->infd, TIOCSIGSEND, signo) != -1)
+    return;
+#endif
+
   /* If we don't have process groups, send the signal to the immediate
      subprocess.  That isn't really right, but it's better than any
      obvious alternative.  */
-  if (no_pgrp)
-    {
-      kill (p->pid, signo);
-      return;
-    }
+  pid_t pid = no_pgrp ? gid : - gid;
 
-  /* gid may be a pid, or minus a pgrp's number */
-#ifdef TIOCSIGSEND
-  if (!NILP (current_group))
-    {
-      if (ioctl (p->infd, TIOCSIGSEND, signo) == -1)
-       kill (-gid, signo);
-    }
-  else
-    {
-      gid = - p->pid;
-      kill (gid, signo);
-    }
-#else /* ! defined (TIOCSIGSEND) */
-  kill (-gid, signo);
-#endif /* ! defined (TIOCSIGSEND) */
+  /* Do not kill an already-reaped process, as that could kill an
+     innocent bystander that happens to have the same process ID.  */
+  sigset_t oldset;
+  block_child_signal (&oldset);
+  if (p->alive)
+    kill (pid, signo);
+  unblock_child_signal (&oldset);
 }
 
 DEFUN ("interrupt-process", Finterrupt_process, Sinterrupt_process, 0, 2, 0,
@@ -6100,8 +6080,8 @@ process has been transmitted to the serial port.  */)
         for communication with the subprocess, call shutdown to cause EOF.
         (In some old system, shutdown to socketpair doesn't work.
         Then we just can't win.)  */
-      if (EQ (p->type, Qnetwork)
-         || p->infd == old_outfd)
+      if (0 <= old_outfd
+         && (EQ (p->type, Qnetwork) || p->infd == old_outfd))
        shutdown (old_outfd, 1);
 #endif
       close_process_fd (&p->open_fd[WRITE_TO_SUBPROCESS]);
@@ -6357,14 +6337,20 @@ exec_sentinel (Lisp_Object proc, Lisp_Object reason)
 /* Report all recent events of a change in process status
    (either run the sentinel or output a message).
    This is usually done while Emacs is waiting for keyboard input
-   but can be done at other times.  */
+   but can be done at other times.
 
-static void
-status_notify (struct Lisp_Process *deleting_process)
+   Return positive if any input was received from WAIT_PROC (or from
+   any process if WAIT_PROC is null), zero if input was attempted but
+   none received, and negative if we didn't even try.  */
+
+static int
+status_notify (struct Lisp_Process *deleting_process,
+              struct Lisp_Process *wait_proc)
 {
-  register Lisp_Object proc;
+  Lisp_Object proc;
   Lisp_Object tail, msg;
   struct gcpro gcpro1, gcpro2;
+  int got_some_input = -1;
 
   tail = Qnil;
   msg = Qnil;
@@ -6394,8 +6380,14 @@ status_notify (struct Lisp_Process *deleting_process)
                 /* Network or serial process not stopped:  */
                 && ! EQ (p->command, Qt)
                 && p->infd >= 0
-                && p != deleting_process
-                && read_process_output (proc, p->infd) > 0);
+                && p != deleting_process)
+           {
+             int nread = read_process_output (proc, p->infd);
+             if (got_some_input < nread)
+               got_some_input = nread;
+             if (nread <= 0)
+               break;
+           }
 
          /* Get the text to use for the message.  */
          if (p->raw_status_new)
@@ -6427,6 +6419,7 @@ status_notify (struct Lisp_Process *deleting_process)
 
   update_mode_lines = 24;  /* In case buffers use %s in mode-line-format.  */
   UNGCPRO;
+  return got_some_input;
 }
 
 DEFUN ("internal-default-process-sentinel", Finternal_default_process_sentinel,
@@ -6562,6 +6555,8 @@ DEFUN ("process-filter-multibyte-p", Fprocess_filter_multibyte_p,
 
   CHECK_PROCESS (process);
   p = XPROCESS (process);
+  if (p->infd < 0)
+    return Qnil;
   coding = proc_decode_coding_system[p->infd];
   return (CODING_FOR_UNIBYTE (coding) ? Qnil : Qt);
 }
@@ -6606,7 +6601,7 @@ keyboard_bit_set (fd_set *mask)
 
 #else  /* not subprocesses */
 
-/* Defined on msdos.c.  */
+/* Defined in msdos.c.  */
 extern int sys_select (int, fd_set *, fd_set *, fd_set *,
                       struct timespec *, void *);
 
@@ -6638,9 +6633,11 @@ extern int sys_select (int, fd_set *, fd_set *, fd_set *,
    DO_DISPLAY means redisplay should be done to show subprocess
    output that arrives.
 
-   Return true if we received input from any process.  */
+   Return positive if we received input from WAIT_PROC (or from any
+   process if WAIT_PROC is null), zero if we attempted to receive
+   input but got none, and negative if we didn't even try.  */
 
-bool
+int
 wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
                             bool do_display,
                             Lisp_Object wait_for_cell,
@@ -6828,7 +6825,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
 
   start_polling ();
 
-  return 0;
+  return -1;
 }
 
 #endif /* not subprocesses */
@@ -6836,6 +6833,26 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
 /* The following functions are needed even if async subprocesses are
    not supported.  Some of them are no-op stubs in that case.  */
 
+#ifdef HAVE_TIMERFD
+
+/* Add FD, which is a descriptor returned by timerfd_create,
+   to the set of non-keyboard input descriptors.  */
+
+void
+add_timer_wait_descriptor (int fd)
+{
+  FD_SET (fd, &input_wait_mask);
+  FD_SET (fd, &non_keyboard_wait_mask);
+  FD_SET (fd, &non_process_wait_mask);
+  fd_callback_info[fd].func = timerfd_callback;
+  fd_callback_info[fd].data = NULL;
+  fd_callback_info[fd].condition |= FOR_READ;
+  if (fd > max_input_desc)
+    max_input_desc = fd;
+}
+
+#endif /* HAVE_TIMERFD */
+
 /* Add DESC to the set of keyboard input descriptors.  */
 
 void
@@ -7067,15 +7084,13 @@ integer or floating point values.
    futz with the SIGCHLD handler, but before Emacs forks any children.
    This function's caller should block SIGCHLD.  */
 
-#ifndef NS_IMPL_GNUSTEP
-static
-#endif
 void
 catch_child_signal (void)
 {
   struct sigaction action, old_action;
+  sigset_t oldset;
   emacs_sigaction_init (&action, deliver_child_signal);
-  block_child_signal ();
+  block_child_signal (&oldset);
   sigaction (SIGCHLD, &action, &old_action);
   eassert (! (old_action.sa_flags & SA_SIGINFO));
 
@@ -7084,7 +7099,7 @@ catch_child_signal (void)
       = (old_action.sa_handler == SIG_DFL || old_action.sa_handler == SIG_IGN
         ? dummy_handler
         : old_action.sa_handler);
-  unblock_child_signal ();
+  unblock_child_signal (&oldset);
 }
 #endif /* subprocesses */
 
index c3481f295f5b88d7a862d00d544ccb03da98fbef..273ad9267d68d271e1520726ca721a52e7517d52 100644 (file)
@@ -213,8 +213,6 @@ enum
 
 /* Defined in callproc.c.  */
 
-extern void block_child_signal (void);
-extern void unblock_child_signal (void);
 extern Lisp_Object encode_current_directory (void);
 extern void record_kill_process (struct Lisp_Process *, Lisp_Object);
 
@@ -227,9 +225,7 @@ extern Lisp_Object system_process_attributes (Lisp_Object);
 
 extern void record_deleted_pid (pid_t, Lisp_Object);
 struct sockaddr;
-#ifdef WINDOWSNT
 extern Lisp_Object conv_sockaddr_to_lisp (struct sockaddr *, int);
-#endif
 extern void hold_keyboard_input (void);
 extern void unhold_keyboard_input (void);
 extern bool kbd_on_hold_p (void);
@@ -240,9 +236,7 @@ extern void add_read_fd (int fd, fd_callback func, void *data);
 extern void delete_read_fd (int fd);
 extern void add_write_fd (int fd, fd_callback func, void *data);
 extern void delete_write_fd (int fd);
-#ifdef NS_IMPL_GNUSTEP
 extern void catch_child_signal (void);
-#endif
 
 #ifdef WINDOWSNT
 extern Lisp_Object network_interface_list (void);
index fff7c6b0ff6cc41f21350486893dca47a22f2f27..919aabc92af16d710b2ab853975a99d3ec45737a 100644 (file)
@@ -294,7 +294,7 @@ setup_cpu_timer (Lisp_Object sampling_interval)
       sigev.sigev_signo = SIGPROF;
       sigev.sigev_notify = SIGEV_SIGNAL;
 
-      for (i = 0; i < sizeof system_clock / sizeof *system_clock; i++)
+      for (i = 0; i < ARRAYELTS (system_clock); i++)
        if (timer_create (system_clock[i], &sigev, &profiler_timer) == 0)
          {
            profiler_timer_ok = 1;
index ad591c75672243ceed5a4cbbdcf12bde9743ddb3..376b11cf75b39cab5d426cead5bc9f99bb219121 100644 (file)
@@ -40,7 +40,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #endif
 
 #ifndef BASE_PURESIZE
-#define BASE_PURESIZE (1720000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA)
+#define BASE_PURESIZE (1800000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA)
 #endif
 
 /* Increase BASE_PURESIZE by a ratio depending on the machine's word size.  */
index c82cd4548d2533c03f83878dbc2f49baba5f2983..e63ed34c89b96d35359d292a6282270eaf6fb577 100644 (file)
@@ -35,9 +35,9 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #define M_TOP_PAD           -2
 extern int mallopt (int, int);
 #else /* not DOUG_LEA_MALLOC */
-#ifndef SYSTEM_MALLOC
+#if !defined SYSTEM_MALLOC && !defined HYBRID_MALLOC
 extern size_t __malloc_extra_blocks;
-#endif /* SYSTEM_MALLOC */
+#endif /* not SYSTEM_MALLOC and not HYBRID_MALLOC */
 #endif /* not DOUG_LEA_MALLOC */
 
 #else /* not emacs */
@@ -95,7 +95,7 @@ static int extra_bytes;
 /* The hook `malloc' uses for the function which gets more space
    from the system.  */
 
-#ifndef SYSTEM_MALLOC
+#if !defined SYSTEM_MALLOC && !defined HYBRID_MALLOC
 extern void *(*__morecore) (ptrdiff_t);
 #endif
 
@@ -1179,7 +1179,7 @@ r_alloc_init (void)
   r_alloc_initialized = 1;
 
   page_size = PAGE;
-#ifndef SYSTEM_MALLOC
+#if !defined SYSTEM_MALLOC && !defined HYBRID_MALLOC
   real_morecore = __morecore;
   __morecore = r_alloc_sbrk;
 
@@ -1198,7 +1198,7 @@ r_alloc_init (void)
   mallopt (M_TOP_PAD, 64 * 4096);
   unblock_input ();
 #else
-#ifndef SYSTEM_MALLOC
+#if !defined SYSTEM_MALLOC && !defined HYBRID_MALLOC
   /* Give GNU malloc's morecore some hysteresis so that we move all
      the relocatable blocks much less often.  The number used to be
      64, but alloc.c would override that with 32 in code that was
@@ -1211,7 +1211,7 @@ r_alloc_init (void)
 #endif
 #endif
 
-#ifndef SYSTEM_MALLOC
+#if !defined SYSTEM_MALLOC && !defined HYBRID_MALLOC
   first_heap->end = (void *) PAGE_ROUNDUP (first_heap->start);
 
   /* The extra call to real_morecore guarantees that the end of the
index 244924058a0a4854bd844233596da1ce82222119..766ad26e709dbe43ad16126d219b1f583640a748 100644 (file)
@@ -457,11 +457,17 @@ init_syntax_once (void)
 
 # endif /* not alloca */
 
-# define REGEX_ALLOCATE alloca
+# ifdef emacs
+#  define REGEX_USE_SAFE_ALLOCA USE_SAFE_ALLOCA
+#  define REGEX_SAFE_FREE() SAFE_FREE ()
+#  define REGEX_ALLOCATE SAFE_ALLOCA
+# else
+#  define REGEX_ALLOCATE alloca
+# endif
 
 /* Assumes a `char *destination' variable.  */
 # define REGEX_REALLOCATE(source, osize, nsize)                                \
-  (destination = alloca (nsize),                                       \
+  (destination = REGEX_ALLOCATE (nsize),                               \
    memcpy (destination, source, osize))
 
 /* No need to do anything to free, after alloca.  */
@@ -469,6 +475,11 @@ init_syntax_once (void)
 
 #endif /* not REGEX_MALLOC */
 
+#ifndef REGEX_USE_SAFE_ALLOCA
+# define REGEX_USE_SAFE_ALLOCA ((void) 0)
+# define REGEX_SAFE_FREE() ((void) 0)
+#endif
+
 /* Define how to allocate the failure stack.  */
 
 #if defined REL_ALLOC && defined REGEX_MALLOC
@@ -482,22 +493,10 @@ init_syntax_once (void)
 
 #else /* not using relocating allocator */
 
-# ifdef REGEX_MALLOC
-
-#  define REGEX_ALLOCATE_STACK malloc
-#  define REGEX_REALLOCATE_STACK(source, osize, nsize) realloc (source, nsize)
-#  define REGEX_FREE_STACK free
-
-# else /* not REGEX_MALLOC */
+# define REGEX_ALLOCATE_STACK(size) REGEX_ALLOCATE (size)
+# define REGEX_REALLOCATE_STACK(source, o, n) REGEX_REALLOCATE (source, o, n)
+# define REGEX_FREE_STACK(ptr) REGEX_FREE (ptr)
 
-#  define REGEX_ALLOCATE_STACK alloca
-
-#  define REGEX_REALLOCATE_STACK(source, osize, nsize)                 \
-   REGEX_REALLOCATE (source, osize, nsize)
-/* No need to explicitly free anything.  */
-#  define REGEX_FREE_STACK(arg) ((void)0)
-
-# endif /* not REGEX_MALLOC */
 #endif /* not using relocating allocator */
 
 
@@ -516,10 +515,12 @@ init_syntax_once (void)
 
 #define STREQ(s1, s2) ((strcmp (s1, s2) == 0))
 
-#undef MAX
-#undef MIN
-#define MAX(a, b) ((a) > (b) ? (a) : (b))
-#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#ifndef emacs  
+# undef max
+# undef min
+# define max(a, b) ((a) > (b) ? (a) : (b))
+# define min(a, b) ((a) < (b) ? (a) : (b))
+#endif
 
 /* Type of source-pattern and string chars.  */
 #ifdef _MSC_VER
@@ -713,7 +714,8 @@ typedef enum
 static int
 extract_number (re_char *source)
 {
-  return (SIGN_EXTEND_CHAR (source[1]) << 8) + source[0];
+  unsigned leading_byte = SIGN_EXTEND_CHAR (source[1]);
+  return (leading_byte << 8) + source[0];
 }
 
 /* Same as EXTRACT_NUMBER, except increment SOURCE to after the number.
@@ -1189,12 +1191,7 @@ print_double_string (re_char *where, re_char *string1, ssize_t size1,
 # define assert(e)
 
 # define DEBUG_STATEMENT(e)
-# if __STDC_VERSION__ < 199901L
-#  define DEBUG_COMPILES_ARGUMENTS
-#  define DEBUG_PRINT /* 'DEBUG_PRINT (x, y)' discards X and Y.  */ (void)
-# else
-#  define DEBUG_PRINT(...)
-# endif
+# define DEBUG_PRINT(...)
 # define DEBUG_PRINT_COMPILED_PATTERN(p, s, e)
 # define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2)
 
@@ -1399,14 +1396,14 @@ typedef struct
    : ((fail_stack).stack                                               \
       = REGEX_REALLOCATE_STACK ((fail_stack).stack,                    \
          (fail_stack).size * sizeof (fail_stack_elt_t),                \
-         MIN (re_max_failures * TYPICAL_FAILURE_SIZE,                  \
+         min (re_max_failures * TYPICAL_FAILURE_SIZE,                  \
               ((fail_stack).size * sizeof (fail_stack_elt_t)           \
                * FAIL_STACK_GROWTH_FACTOR))),                          \
                                                                        \
       (fail_stack).stack == NULL                                       \
       ? 0                                                              \
       : ((fail_stack).size                                             \
-        = (MIN (re_max_failures * TYPICAL_FAILURE_SIZE,                \
+        = (min (re_max_failures * TYPICAL_FAILURE_SIZE,                \
                 ((fail_stack).size * sizeof (fail_stack_elt_t)         \
                  * FAIL_STACK_GROWTH_FACTOR))                          \
            / sizeof (fail_stack_elt_t)),                               \
@@ -2314,8 +2311,8 @@ set_image_of_range (struct range_table_work_area *work_area,
                cmin = c, cmax = c;
              else
                {
-                 cmin = MIN (cmin, c);
-                 cmax = MAX (cmax, c);
+                 cmin = min (cmin, c);
+                 cmax = max (cmax, c);
                }
            }
        }
@@ -2994,7 +2991,7 @@ regex_compile (const_re_char *pattern, size_t size, reg_syntax_t syntax,
 #else  /* emacs */
                    if (c < 128)
                      {
-                       ch = MIN (127, c1);
+                       ch = min (127, c1);
                        SETUP_ASCII_RANGE (range_table_work, c, ch);
                        c = ch + 1;
                        if (CHAR_BYTE8_P (c1))
@@ -4346,8 +4343,7 @@ re_search_2 (struct re_pattern_buffer *bufp, const char *str1, size_t size1,
 
          if (range > 0)        /* Searching forwards.  */
            {
-             register int lim = 0;
-             ssize_t irange = range;
+             ssize_t irange = range, lim = 0;
 
              if (startpos < size1 && startpos + range >= size1)
                lim = range - (size1 - startpos);
@@ -4584,6 +4580,7 @@ static int bcmp_translate (re_char *s1, re_char *s2,
     FREE_VAR (regend);                                                 \
     FREE_VAR (best_regstart);                                          \
     FREE_VAR (best_regend);                                            \
+    REGEX_SAFE_FREE ();                                                        \
   } while (0)
 #else
 # define FREE_VARIABLES() ((void)0) /* Do nothing!  But inhibit gcc warning.  */
@@ -5023,6 +5020,8 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const_re_char *string1,
 
   DEBUG_PRINT ("\n\nEntering re_match_2.\n");
 
+  REGEX_USE_SAFE_ALLOCA;
+
   INIT_FAIL_STACK ();
 
 #ifdef MATCH_MAY_ALLOCATE
@@ -5213,7 +5212,7 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const_re_char *string1,
                { /* No.  So allocate them with malloc.  We need one
                     extra element beyond `num_regs' for the `-1' marker
                     GNU code uses.  */
-                 regs->num_regs = MAX (RE_NREGS, num_regs + 1);
+                 regs->num_regs = max (RE_NREGS, num_regs + 1);
                  regs->start = TALLOC (regs->num_regs, regoff_t);
                  regs->end = TALLOC (regs->num_regs, regoff_t);
                  if (regs->start == NULL || regs->end == NULL)
@@ -5257,7 +5256,7 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const_re_char *string1,
 
              /* Go through the first `min (num_regs, regs->num_regs)'
                 registers, since that is all we initialized.  */
-             for (reg = 1; reg < MIN (num_regs, regs->num_regs); reg++)
+             for (reg = 1; reg < min (num_regs, regs->num_regs); reg++)
                {
                  if (REG_UNSET (regstart[reg]) || REG_UNSET (regend[reg]))
                    regs->start[reg] = regs->end[reg] = -1;
index 1b064987eb769316a5479e837ca26d6f14e1ebbd..0e25723a85ecabf6516e131b85a804b463f27897 100644 (file)
@@ -172,6 +172,9 @@ extern reg_syntax_t re_syntax_options;
 extern Lisp_Object re_match_object;
 #endif
 
+/* Roughly the maximum number of failure points on the stack.  */
+extern size_t re_max_failures;
+
 \f
 /* Define combinations of the above bits for the standard possibilities.
    (The [[[ comments delimit what gets put into the Texinfo file, so
index 3da236ca8a6fac7ae3645c483d573122445ee3e3..7cb683c4577c059c1a8a6cf3fe03c21db73ad117 100644 (file)
@@ -90,7 +90,7 @@ calculate_scrolling (struct frame *frame,
                     /* matrix is of size window_size + 1 on each side.  */
                     struct matrix_elt *matrix,
                     int window_size, int lines_below,
-                    int *draw_cost, int *old_hash, int *new_hash,
+                    int *draw_cost, unsigned *old_hash, unsigned *new_hash,
                     int free_at_end)
 {
   register int i, j;
@@ -245,18 +245,20 @@ do_scrolling (struct frame *frame, struct glyph_matrix *current_matrix,
 {
   struct matrix_elt *p;
   int i, j, k;
+  USE_SAFE_ALLOCA;
 
   /* True if we have set a terminal window with set_terminal_window.  */
   bool terminal_window_p = 0;
 
   /* A queue for line insertions to be done.  */
   struct queue { int count, pos; };
-  struct queue *queue_start
-    = alloca (current_matrix->nrows * sizeof *queue_start);
+  struct queue *queue_start;
+  SAFE_NALLOCA (queue_start, 1, current_matrix->nrows);
   struct queue *queue = queue_start;
 
-  char *retained_p = alloca (window_size * sizeof *retained_p);
-  int *copy_from = alloca (window_size * sizeof *copy_from);
+  char *retained_p = SAFE_ALLOCA (window_size);
+  int *copy_from;
+  SAFE_NALLOCA (copy_from, 1, window_size);
 
   /* Zero means line is empty.  */
   memset (retained_p, 0, window_size * sizeof (char));
@@ -378,6 +380,7 @@ do_scrolling (struct frame *frame, struct glyph_matrix *current_matrix,
 
   if (terminal_window_p)
     set_terminal_window (frame, 0);
+  SAFE_FREE ();
 }
 
 \f
@@ -427,7 +430,7 @@ calculate_direct_scrolling (struct frame *frame,
                            struct matrix_elt *matrix,
                            int window_size, int lines_below,
                            int *draw_cost, int *old_draw_cost,
-                           int *old_hash, int *new_hash,
+                           unsigned *old_hash, unsigned *new_hash,
                            int free_at_end)
 {
   register int i, j;
@@ -649,10 +652,12 @@ do_direct_scrolling (struct frame *frame, struct glyph_matrix *current_matrix,
 {
   struct matrix_elt *p;
   int i, j;
+  USE_SAFE_ALLOCA;
 
   /* A queue of deletions and insertions to be performed.  */
   struct alt_queue { int count, pos, window; };
-  struct alt_queue *queue_start = alloca (window_size * sizeof *queue_start);
+  struct alt_queue *queue_start;
+  SAFE_NALLOCA (queue_start, 1, window_size);
   struct alt_queue *queue = queue_start;
 
   /* True if a terminal window has been set with set_terminal_window.  */
@@ -667,11 +672,12 @@ do_direct_scrolling (struct frame *frame, struct glyph_matrix *current_matrix,
   bool write_follows_p = 1;
 
   /* For each row in the new matrix what row of the old matrix it is.  */
-  int *copy_from = alloca (window_size * sizeof *copy_from);
+  int *copy_from;
+  SAFE_NALLOCA (copy_from, 1, window_size);
 
   /* Non-zero for each row in the new matrix that is retained from the
      old matrix.  Lines not retained are empty.  */
-  char *retained_p = alloca (window_size * sizeof *retained_p);
+  char *retained_p = SAFE_ALLOCA (window_size);
 
   memset (retained_p, 0, window_size * sizeof (char));
 
@@ -787,6 +793,7 @@ do_direct_scrolling (struct frame *frame, struct glyph_matrix *current_matrix,
 
   if (terminal_window_p)
     set_terminal_window (frame, 0);
+  SAFE_FREE ();
 }
 
 
@@ -794,10 +801,11 @@ do_direct_scrolling (struct frame *frame, struct glyph_matrix *current_matrix,
 void
 scrolling_1 (struct frame *frame, int window_size, int unchanged_at_top,
             int unchanged_at_bottom, int *draw_cost, int *old_draw_cost,
-            int *old_hash, int *new_hash, int free_at_end)
+            unsigned *old_hash, unsigned *new_hash, int free_at_end)
 {
-  struct matrix_elt *matrix
-    = alloca ((window_size + 1) * (window_size + 1) * sizeof *matrix);
+  USE_SAFE_ALLOCA;
+  struct matrix_elt *matrix;
+  SAFE_NALLOCA (matrix, window_size + 1, window_size + 1);
 
   if (FRAME_SCROLL_REGION_OK (frame))
     {
@@ -817,6 +825,8 @@ scrolling_1 (struct frame *frame, int window_size, int unchanged_at_top,
                     frame->current_matrix, matrix, window_size,
                    unchanged_at_top);
     }
+
+  SAFE_FREE ();
 }
 
 
@@ -829,12 +839,14 @@ scrolling_1 (struct frame *frame, int window_size, int unchanged_at_top,
 
 int
 scrolling_max_lines_saved (int start, int end,
-                           int *oldhash, int *newhash,
+                           unsigned *oldhash, unsigned *newhash,
                            int *cost)
 {
-  struct { int hash; int count; } lines[01000];
-  register int i, h;
-  register int matchcount = 0;
+  enum { LOG2_NLINES = 9 };
+  enum { NLINES = 1 << LOG2_NLINES };
+  struct { unsigned hash; int count; } lines[NLINES];
+  int i, h;
+  int matchcount = 0;
   int avg_length = 0;
   int threshold;
 
@@ -855,7 +867,7 @@ scrolling_max_lines_saved (int start, int end,
     {
       if (cost[i] > threshold)
        {
-         h = newhash[i] & 0777;
+         h = newhash[i] & (NLINES - 1);
          lines[h].hash = newhash[i];
          lines[h].count++;
        }
@@ -865,7 +877,7 @@ scrolling_max_lines_saved (int start, int end,
      matches between old lines and new.  */
   for (i = start; i < end; i++)
     {
-      h = oldhash[i] & 0777;
+      h = oldhash[i] & (NLINES - 1);
       if (oldhash[i] == lines[h].hash)
        {
          matchcount++;
index 0a693daa15edd31f1af3ef6d7afbff54535b2a0a..9eed390244fc47ab2309d0002b03d885a85c8128 100644 (file)
@@ -1318,6 +1318,7 @@ search_buffer (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte,
         translation.  Otherwise set to zero later.  */
       int char_base = -1;
       bool boyer_moore_ok = 1;
+      USE_SAFE_ALLOCA;
 
       /* MULTIBYTE says whether the text to be searched is multibyte.
         We must convert PATTERN to match that, or we will not really
@@ -1335,7 +1336,7 @@ search_buffer (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte,
          raw_pattern_size_byte
            = count_size_as_multibyte (SDATA (string),
                                       raw_pattern_size);
-         raw_pattern = alloca (raw_pattern_size_byte + 1);
+         raw_pattern = SAFE_ALLOCA (raw_pattern_size_byte + 1);
          copy_text (SDATA (string), raw_pattern,
                     SCHARS (string), 0, 1);
        }
@@ -1349,7 +1350,7 @@ search_buffer (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte,
             the chosen single-byte character set can possibly match.  */
          raw_pattern_size = SCHARS (string);
          raw_pattern_size_byte = SCHARS (string);
-         raw_pattern = alloca (raw_pattern_size + 1);
+         raw_pattern = SAFE_ALLOCA (raw_pattern_size + 1);
          copy_text (SDATA (string), raw_pattern,
                     SBYTES (string), 1, 0);
        }
@@ -1357,7 +1358,7 @@ search_buffer (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte,
       /* Copy and optionally translate the pattern.  */
       len = raw_pattern_size;
       len_byte = raw_pattern_size_byte;
-      patbuf = alloca (len * MAX_MULTIBYTE_LENGTH);
+      SAFE_NALLOCA (patbuf, MAX_MULTIBYTE_LENGTH, len);
       pat = patbuf;
       base_pat = raw_pattern;
       if (multibyte)
@@ -1416,7 +1417,7 @@ search_buffer (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte,
 
                      while (boyer_moore_ok)
                        {
-                         if (ASCII_BYTE_P (inverse))
+                         if (ASCII_CHAR_P (inverse))
                            {
                              if (this_char_base > 0)
                                boyer_moore_ok = 0;
@@ -1497,13 +1498,15 @@ search_buffer (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte,
       len_byte = pat - patbuf;
       pat = base_pat = patbuf;
 
-      if (boyer_moore_ok)
-       return boyer_moore (n, pat, len_byte, trt, inverse_trt,
-                           pos_byte, lim_byte,
-                           char_base);
-      else
-       return simple_search (n, pat, raw_pattern_size, len_byte, trt,
-                             pos, pos_byte, lim, lim_byte);
+      EMACS_INT result
+       = (boyer_moore_ok
+          ? boyer_moore (n, pat, len_byte, trt, inverse_trt,
+                         pos_byte, lim_byte,
+                         char_base)
+          : simple_search (n, pat, raw_pattern_size, len_byte, trt,
+                           pos, pos_byte, lim, lim_byte));
+      SAFE_FREE ();
+      return result;
     }
 }
 \f
@@ -1827,7 +1830,7 @@ boyer_moore (EMACS_INT n, unsigned char *base_pat,
             matching with CHAR_BASE are to be checked.  */
          int ch = -1;
 
-         if (ASCII_BYTE_P (*ptr) || ! multibyte)
+         if (ASCII_CHAR_P (*ptr) || ! multibyte)
            ch = *ptr;
          else if (char_base
                   && ((pat_end - ptr) == 1 || CHAR_HEAD_P (ptr[1])))
@@ -2596,7 +2599,7 @@ since only regular expressions have distinguished subexpressions.  */)
            {
              FETCH_STRING_CHAR_ADVANCE_NO_CHECK (c, newtext, pos, pos_byte);
              if (!buf_multibyte)
-               c = multibyte_char_to_unibyte (c);
+               c = CHAR_TO_BYTE8 (c);
            }
          else
            {
@@ -2619,7 +2622,7 @@ since only regular expressions have distinguished subexpressions.  */)
                  FETCH_STRING_CHAR_ADVANCE_NO_CHECK (c, newtext,
                                                      pos, pos_byte);
                  if (!buf_multibyte && !ASCII_CHAR_P (c))
-                   c = multibyte_char_to_unibyte (c);
+                   c = CHAR_TO_BYTE8 (c);
                }
              else
                {
@@ -2679,18 +2682,8 @@ since only regular expressions have distinguished subexpressions.  */)
        }
 
       if (really_changed)
-       {
-         if (buf_multibyte)
-           {
-             ptrdiff_t nchars =
-               multibyte_chars_in_text (substed, substed_len);
-
-             newtext = make_multibyte_string ((char *) substed, nchars,
-                                              substed_len);
-           }
-         else
-           newtext = make_unibyte_string ((char *) substed, substed_len);
-       }
+       newtext = make_specified_string ((const char *) substed, -1,
+                                        substed_len, buf_multibyte);
       xfree (substed);
     }
 
@@ -2819,7 +2812,8 @@ Return value is undefined if the last search failed.  */)
 
   prev = Qnil;
 
-  data = alloca ((2 * search_regs.num_regs + 1) * sizeof *data);
+  USE_SAFE_ALLOCA;
+  SAFE_NALLOCA (data, 1, 2 * search_regs.num_regs + 1);
 
   len = 0;
   for (i = 0; i < search_regs.num_regs; i++)
@@ -2862,25 +2856,28 @@ Return value is undefined if the last search failed.  */)
 
   /* If REUSE is not usable, cons up the values and return them.  */
   if (! CONSP (reuse))
-    return Flist (len, data);
-
-  /* If REUSE is a list, store as many value elements as will fit
-     into the elements of REUSE.  */
-  for (i = 0, tail = reuse; CONSP (tail);
-       i++, tail = XCDR (tail))
+    reuse = Flist (len, data);
+  else
     {
+      /* If REUSE is a list, store as many value elements as will fit
+        into the elements of REUSE.  */
+      for (i = 0, tail = reuse; CONSP (tail);
+          i++, tail = XCDR (tail))
+       {
+         if (i < len)
+           XSETCAR (tail, data[i]);
+         else
+           XSETCAR (tail, Qnil);
+         prev = tail;
+       }
+
+      /* If we couldn't fit all value elements into REUSE,
+        cons up the rest of them and add them to the end of REUSE.  */
       if (i < len)
-       XSETCAR (tail, data[i]);
-      else
-       XSETCAR (tail, Qnil);
-      prev = tail;
+       XSETCDR (prev, Flist (len - i, data + i));
     }
 
-  /* If we couldn't fit all value elements into REUSE,
-     cons up the rest of them and add them to the end of REUSE.  */
-  if (i < len)
-    XSETCDR (prev, Flist (len - i, data + i));
-
+  SAFE_FREE ();
   return reuse;
 }
 
@@ -3085,7 +3082,8 @@ DEFUN ("regexp-quote", Fregexp_quote, Sregexp_quote, 1, 1, 0,
 
   CHECK_STRING (string);
 
-  temp = alloca (SBYTES (string) * 2);
+  USE_SAFE_ALLOCA;
+  SAFE_NALLOCA (temp, 2, SBYTES (string));
 
   /* Now copy the data into the new string, inserting escapes. */
 
@@ -3103,10 +3101,13 @@ DEFUN ("regexp-quote", Fregexp_quote, Sregexp_quote, 1, 1, 0,
       *out++ = *in;
     }
 
-  return make_specified_string (temp,
-                               SCHARS (string) + backslashes_added,
-                               out - temp,
-                               STRING_MULTIBYTE (string));
+  Lisp_Object result
+    = make_specified_string (temp,
+                            SCHARS (string) + backslashes_added,
+                            out - temp,
+                            STRING_MULTIBYTE (string));
+  SAFE_FREE ();
+  return result;
 }
 
 /* Like find_newline, but doesn't use the cache, and only searches forward.  */
index 5069744435b71ded4d8888075ded1b2f6bba1bdd..956faa36aa1fd1bf655adcb5f7b48f534217fa97 100644 (file)
@@ -44,6 +44,8 @@ int debug_sheap = 0;
 #define BLOCKSIZE 4096
 
 char bss_sbrk_buffer[STATIC_HEAP_SIZE];
+/* The following is needed in gmalloc.c */
+void *bss_sbrk_buffer_end = bss_sbrk_buffer + STATIC_HEAP_SIZE;
 char *bss_sbrk_ptr;
 char *max_bss_sbrk_ptr;
 int bss_sbrk_did_unexec;
index 552f75b68e836428aa76ece0a76a502c96135131..b49348f1256a1b0a0050cf48bb103eb09aec0830 100644 (file)
@@ -86,10 +86,12 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 /* BEGIN: Windows Specific Includes */
 #include <stdio.h>
 #include <limits.h>
+#include <mbstring.h>
 #include <windows.h>
 #include <mmsystem.h>
 
 #include "coding.h"
+#include "w32common.h"
 #include "w32.h"
 /* END: Windows Specific Includes */
 
@@ -567,12 +569,11 @@ wav_play (struct sound *s, struct sound_device *sd)
               SBYTES (s->data) - sizeof *header);
   else
     {
-      char *buffer;
       ptrdiff_t nbytes = 0;
       ptrdiff_t blksize = sd->period_size ? sd->period_size (sd) : 2048;
       ptrdiff_t data_left = header->data_length;
-
-      buffer = alloca (blksize);
+      USE_SAFE_ALLOCA;
+      char *buffer = SAFE_ALLOCA (blksize);
       lseek (s->fd, sizeof *header, SEEK_SET);
       while (data_left > 0
              && (nbytes = emacs_read (s->fd, buffer, blksize)) > 0)
@@ -585,6 +586,7 @@ wav_play (struct sound *s, struct sound_device *sd)
 
       if (nbytes < 0)
        sound_perror ("Error reading sound file");
+      SAFE_FREE ();
     }
 }
 
@@ -659,19 +661,20 @@ au_play (struct sound *s, struct sound_device *sd)
   else
     {
       ptrdiff_t blksize = sd->period_size ? sd->period_size (sd) : 2048;
-      char *buffer;
       ptrdiff_t nbytes;
 
       /* Seek */
       lseek (s->fd, header->data_offset, SEEK_SET);
 
       /* Copy sound data to the device.  */
-      buffer = alloca (blksize);
+      USE_SAFE_ALLOCA;
+      char *buffer = SAFE_ALLOCA (blksize);
       while ((nbytes = emacs_read (s->fd, buffer, blksize)) > 0)
        sd->write (sd, buffer, nbytes);
 
       if (nbytes < 0)
        sound_perror ("Error reading sound file");
+      SAFE_FREE ();
     }
 }
 
@@ -705,7 +708,7 @@ vox_configure (struct sound_device *sd)
 {
   int val;
 #ifdef USABLE_SIGIO
-  sigset_t blocked;
+  sigset_t oldset, blocked;
 #endif
 
   eassert (sd->fd >= 0);
@@ -717,7 +720,7 @@ vox_configure (struct sound_device *sd)
 #ifdef USABLE_SIGIO
   sigemptyset (&blocked);
   sigaddset (&blocked, SIGIO);
-  pthread_sigmask (SIG_BLOCK, &blocked, 0);
+  pthread_sigmask (SIG_BLOCK, &blocked, &oldset);
 #endif
 
   val = sd->format;
@@ -751,7 +754,7 @@ vox_configure (struct sound_device *sd)
 
   turn_on_atimers (1);
 #ifdef USABLE_SIGIO
-  pthread_sigmask (SIG_UNBLOCK, &blocked, 0);
+  pthread_sigmask (SIG_SETMASK, &oldset, 0);
 #endif
 }
 
@@ -767,10 +770,10 @@ vox_close (struct sound_device *sd)
         be interrupted by a signal.  Block the ones we know to cause
         troubles.  */
 #ifdef USABLE_SIGIO
-      sigset_t blocked;
+      sigset_t blocked, oldset;
       sigemptyset (&blocked);
       sigaddset (&blocked, SIGIO);
-      pthread_sigmask (SIG_BLOCK, &blocked, 0);
+      pthread_sigmask (SIG_BLOCK, &blocked, &oldset);
 #endif
       turn_on_atimers (0);
 
@@ -779,7 +782,7 @@ vox_close (struct sound_device *sd)
 
       turn_on_atimers (1);
 #ifdef USABLE_SIGIO
-      pthread_sigmask (SIG_UNBLOCK, &blocked, 0);
+      pthread_sigmask (SIG_SETMASK, &oldset, 0);
 #endif
 
       /* Close the device.  */
@@ -1206,38 +1209,83 @@ alsa_init (struct sound_device *sd)
 
 /* BEGIN: Windows specific functions */
 
-#define SOUND_WARNING(fun, error, text)            \
-  {                                                \
-    char buf[1024];                                \
-    char err_string[MAXERRORLENGTH];               \
-    fun (error, err_string, sizeof (err_string));  \
-    _snprintf (buf, sizeof (buf), "%s\nError: %s", \
-              text, err_string);                  \
-    sound_warning (buf);                           \
-  }
+#define SOUND_WARNING(func, error, text)               \
+  do {                                                 \
+    char buf[1024];                                    \
+    char err_string[MAXERRORLENGTH];                   \
+    func (error, err_string, sizeof (err_string));     \
+    _snprintf (buf, sizeof (buf), "%s\nMCI Error: %s", \
+              text, err_string);                       \
+    message_with_string ("%s", build_string (buf), 1); \
+  } while (0)
 
 static int
 do_play_sound (const char *psz_file, unsigned long ui_volume)
 {
   int i_result = 0;
   MCIERROR mci_error = 0;
-  char sz_cmd_buf[520] = {0};
-  char sz_ret_buf[520] = {0};
+  char sz_cmd_buf_a[520];
+  char sz_ret_buf_a[520];
   MMRESULT mm_result = MMSYSERR_NOERROR;
   unsigned long ui_volume_org = 0;
   BOOL b_reset_volume = FALSE;
+  char warn_text[560];
+
+  /* Since UNICOWS.DLL includes only a stub for mciSendStringW, we
+     need to encode the file in the ANSI codepage on Windows 9X even
+     if w32_unicode_filenames is non-zero.  */
+  if (w32_major_version <= 4 || !w32_unicode_filenames)
+    {
+      char fname_a[MAX_PATH], shortname[MAX_PATH], *fname_to_use;
+
+      filename_to_ansi (psz_file, fname_a);
+      fname_to_use = fname_a;
+      /* If the file name is not encodable in ANSI, try its short 8+3
+        alias.  This will only work if w32_unicode_filenames is
+        non-zero.  */
+      if (_mbspbrk ((const unsigned char *)fname_a,
+                   (const unsigned char *)"?"))
+       {
+         if (w32_get_short_filename (psz_file, shortname, MAX_PATH))
+           fname_to_use = shortname;
+         else
+           mci_error = MCIERR_FILE_NOT_FOUND;
+       }
 
-  memset (sz_cmd_buf, 0, sizeof (sz_cmd_buf));
-  memset (sz_ret_buf, 0, sizeof (sz_ret_buf));
-  sprintf (sz_cmd_buf,
-           "open \"%s\" alias GNUEmacs_PlaySound_Device wait",
-           psz_file);
-  mci_error = mciSendString (sz_cmd_buf, sz_ret_buf, sizeof (sz_ret_buf), NULL);
+      if (!mci_error)
+       {
+         memset (sz_cmd_buf_a, 0, sizeof (sz_cmd_buf_a));
+         memset (sz_ret_buf_a, 0, sizeof (sz_ret_buf_a));
+         sprintf (sz_cmd_buf_a,
+                  "open \"%s\" alias GNUEmacs_PlaySound_Device wait",
+                  fname_to_use);
+         mci_error = mciSendStringA (sz_cmd_buf_a,
+                                     sz_ret_buf_a, sizeof (sz_ret_buf_a), NULL);
+       }
+    }
+  else
+    {
+      wchar_t sz_cmd_buf_w[520];
+      wchar_t sz_ret_buf_w[520];
+      wchar_t fname_w[MAX_PATH];
+
+      filename_to_utf16 (psz_file, fname_w);
+      memset (sz_cmd_buf_w, 0, sizeof (sz_cmd_buf_w));
+      memset (sz_ret_buf_w, 0, sizeof (sz_ret_buf_w));
+      /* _swprintf is not available on Windows 9X, so we construct the
+        UTF-16 command string by hand.  */
+      wcscpy (sz_cmd_buf_w, L"open \"");
+      wcscat (sz_cmd_buf_w, fname_w);
+      wcscat (sz_cmd_buf_w, L"\" alias GNUEmacs_PlaySound_Device wait");
+      mci_error = mciSendStringW (sz_cmd_buf_w,
+                                 sz_ret_buf_w, ARRAYELTS (sz_ret_buf_w) , NULL);
+    }
   if (mci_error != 0)
     {
-      SOUND_WARNING (mciGetErrorString, mci_error,
-                    "The open mciSendString command failed to open "
-                    "the specified sound file.");
+      strcpy (warn_text,
+             "mciSendString: 'open' command failed to open sound file ");
+      strcat (warn_text, psz_file);
+      SOUND_WARNING (mciGetErrorString, mci_error, warn_text);
       i_result = (int) mci_error;
       return i_result;
     }
@@ -1251,44 +1299,47 @@ do_play_sound (const char *psz_file, unsigned long ui_volume)
           if (mm_result != MMSYSERR_NOERROR)
             {
              SOUND_WARNING (waveOutGetErrorText, mm_result,
-                            "waveOutSetVolume failed to set the volume level "
-                            "of the WAVE_MAPPER device.\n"
-                            "As a result, the user selected volume level will "
-                            "not be used.");
+                            "waveOutSetVolume: failed to set the volume level"
+                            " of the WAVE_MAPPER device.\n"
+                            "As a result, the user selected volume level will"
+                            " not be used.");
             }
         }
       else
         {
           SOUND_WARNING (waveOutGetErrorText, mm_result,
-                        "waveOutGetVolume failed to obtain the original "
-                         "volume level of the WAVE_MAPPER device.\n"
-                         "As a result, the user selected volume level will "
-                         "not be used.");
+                        "waveOutGetVolume: failed to obtain the original"
+                         " volume level of the WAVE_MAPPER device.\n"
+                         "As a result, the user selected volume level will"
+                         " not be used.");
         }
     }
-  memset (sz_cmd_buf, 0, sizeof (sz_cmd_buf));
-  memset (sz_ret_buf, 0, sizeof (sz_ret_buf));
-  strcpy (sz_cmd_buf, "play GNUEmacs_PlaySound_Device wait");
-  mci_error = mciSendString (sz_cmd_buf, sz_ret_buf, sizeof (sz_ret_buf), NULL);
+  memset (sz_cmd_buf_a, 0, sizeof (sz_cmd_buf_a));
+  memset (sz_ret_buf_a, 0, sizeof (sz_ret_buf_a));
+  strcpy (sz_cmd_buf_a, "play GNUEmacs_PlaySound_Device wait");
+  mci_error = mciSendStringA (sz_cmd_buf_a, sz_ret_buf_a, sizeof (sz_ret_buf_a),
+                             NULL);
   if (mci_error != 0)
     {
-      SOUND_WARNING (mciGetErrorString, mci_error,
-                    "The play mciSendString command failed to play the "
-                    "opened sound file.");
+      strcpy (warn_text,
+             "mciSendString: 'play' command failed to play sound file ");
+      strcat (warn_text, psz_file);
+      SOUND_WARNING (mciGetErrorString, mci_error, warn_text);
       i_result = (int) mci_error;
     }
-  memset (sz_cmd_buf, 0, sizeof (sz_cmd_buf));
-  memset (sz_ret_buf, 0, sizeof (sz_ret_buf));
-  strcpy (sz_cmd_buf, "close GNUEmacs_PlaySound_Device wait");
-  mci_error = mciSendString (sz_cmd_buf, sz_ret_buf, sizeof (sz_ret_buf), NULL);
+  memset (sz_cmd_buf_a, 0, sizeof (sz_cmd_buf_a));
+  memset (sz_ret_buf_a, 0, sizeof (sz_ret_buf_a));
+  strcpy (sz_cmd_buf_a, "close GNUEmacs_PlaySound_Device wait");
+  mci_error = mciSendStringA (sz_cmd_buf_a, sz_ret_buf_a, sizeof (sz_ret_buf_a),
+                             NULL);
   if (b_reset_volume == TRUE)
     {
       mm_result = waveOutSetVolume ((HWAVEOUT) WAVE_MAPPER, ui_volume_org);
       if (mm_result != MMSYSERR_NOERROR)
         {
           SOUND_WARNING (waveOutGetErrorText, mm_result,
-                        "waveOutSetVolume failed to reset the original volume "
-                         "level of the WAVE_MAPPER device.");
+                        "waveOutSetVolume: failed to reset the original"
+                         " volume level of the WAVE_MAPPER device.");
         }
     }
   return i_result;
@@ -1306,13 +1357,11 @@ Internal use only, use `play-sound' instead.  */)
 {
   Lisp_Object attrs[SOUND_ATTR_SENTINEL];
   ptrdiff_t count = SPECPDL_INDEX ();
-
-#ifndef WINDOWSNT
   Lisp_Object file;
-  struct gcpro gcpro1, gcpro2;
   Lisp_Object args[2];
-#else /* WINDOWSNT */
-  Lisp_Object lo_file;
+  struct gcpro gcpro1, gcpro2;
+
+#ifdef WINDOWSNT
   unsigned long ui_volume_tmp = UINT_MAX;
   unsigned long ui_volume = UINT_MAX;
 #endif /* WINDOWSNT */
@@ -1327,7 +1376,8 @@ Internal use only, use `play-sound' instead.  */)
   current_sound_device = xzalloc (sizeof *current_sound_device);
   current_sound = xzalloc (sizeof *current_sound);
   record_unwind_protect_void (sound_cleanup);
-  current_sound->header = alloca (MAX_SOUND_HEADER_BYTES);
+  char headerbuf[MAX_SOUND_HEADER_BYTES];
+  current_sound->header = headerbuf;
 
   if (STRINGP (attrs[SOUND_FILE]))
     {
@@ -1384,11 +1434,8 @@ Internal use only, use `play-sound' instead.  */)
 
 #else /* WINDOWSNT */
 
-  lo_file = Fexpand_file_name (attrs[SOUND_FILE], Vdata_directory);
-  lo_file = ENCODE_FILE (lo_file);
-  /* Since UNICOWS.DLL includes only a stub for mciSendStringW, we
-     need to encode the file in the ANSI codepage.  */
-  lo_file = ansi_encode_filename (lo_file);
+  file = Fexpand_file_name (attrs[SOUND_FILE], Vdata_directory);
+  file = ENCODE_FILE (file);
   if (INTEGERP (attrs[SOUND_VOLUME]))
     {
       ui_volume_tmp = XFASTINT (attrs[SOUND_VOLUME]);
@@ -1397,6 +1444,13 @@ Internal use only, use `play-sound' instead.  */)
     {
       ui_volume_tmp = XFLOAT_DATA (attrs[SOUND_VOLUME]) * 100;
     }
+
+  GCPRO2 (sound, file);
+
+  args[0] = Qplay_sound_functions;
+  args[1] = sound;
+  Frun_hook_with_args (2, args);
+
   /*
     Based on some experiments I have conducted, a value of 100 or less
     for the sound volume is much too low.  You cannot even hear it.
@@ -1410,7 +1464,9 @@ Internal use only, use `play-sound' instead.  */)
     {
       ui_volume = ui_volume_tmp * (UINT_MAX / 100);
     }
-  do_play_sound (SDATA (lo_file), ui_volume);
+  (void)do_play_sound (SSDATA (file), ui_volume);
+
+  UNGCPRO;
 
 #endif /* WINDOWSNT */
 
index 5e697d350ff0e2f87db1cf20d429b574cb086d2c..9f5ef754e2a552dd65cf08ea75940eb1a214559a 100644 (file)
@@ -835,12 +835,10 @@ back_comment (ptrdiff_t from, ptrdiff_t from_byte, ptrdiff_t stop,
       from_byte = comstart_byte;
       UPDATE_SYNTAX_TABLE_FORWARD (from - 1);
     }
-  else
+  else lossage:
     {
       struct lisp_parse_state state;
-      bool adjusted;
-    lossage:
-      adjusted = true;
+      bool adjusted = true;
       /* We had two kinds of string delimiters mixed up
         together.  Decode this going forwards.
         Scan fwd from a known safe place (beginning-of-defun)
@@ -1233,7 +1231,7 @@ DEFUN ("internal-describe-syntax-value", Finternal_describe_syntax_value,
   syntax_code = XINT (first) & INT_MAX;
   code = syntax_code & 0377;
   start1 = SYNTAX_FLAGS_COMSTART_FIRST (syntax_code);
-  start2 = SYNTAX_FLAGS_COMSTART_SECOND (syntax_code);;
+  start2 = SYNTAX_FLAGS_COMSTART_SECOND (syntax_code);
   end1 = SYNTAX_FLAGS_COMEND_FIRST (syntax_code);
   end2 = SYNTAX_FLAGS_COMEND_SECOND (syntax_code);
   prefix = SYNTAX_FLAGS_PREFIX (syntax_code);
@@ -1569,6 +1567,7 @@ skip_chars (bool forwardp, Lisp_Object string, Lisp_Object lim,
   const unsigned char *str;
   int len;
   Lisp_Object iso_classes;
+  USE_SAFE_ALLOCA;
 
   CHECK_STRING (string);
   iso_classes = Qnil;
@@ -1701,7 +1700,7 @@ skip_chars (bool forwardp, Lisp_Object string, Lisp_Object lim,
          memcpy (himap, fastmap + 0200, 0200);
          himap[0200] = 0;
          memset (fastmap + 0200, 0, 0200);
-         char_ranges = alloca (sizeof *char_ranges * 128 * 2);
+         SAFE_NALLOCA (char_ranges, 2, 128);
          i = 0;
 
          while ((p1 = memchr (himap + i, 1, 0200 - i)))
@@ -1725,7 +1724,7 @@ skip_chars (bool forwardp, Lisp_Object string, Lisp_Object lim,
     }
   else                         /* STRING is multibyte */
     {
-      char_ranges = alloca (sizeof *char_ranges * SCHARS (string) * 2);
+      SAFE_NALLOCA (char_ranges, 2, SCHARS (string));
 
       while (i_byte < size_byte)
        {
@@ -2034,6 +2033,7 @@ skip_chars (bool forwardp, Lisp_Object string, Lisp_Object lim,
     SET_PT_BOTH (pos, pos_byte);
     immediate_quit = 0;
 
+    SAFE_FREE ();
     return make_number (PT - start_point);
   }
 }
index 3870b8d35cefe4d613606dff9c1e7b683e87d481..24cc5cb0b40eee8868359f73ba448f7ac295efd1 100644 (file)
@@ -19,6 +19,14 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
+/* If HYBRID_GET_CURRENT_DIR_NAME is defined in conf_post.h, then we
+   need the following before including unistd.h, in order to pick up
+   the right prototype for gget_current_dir_name.  */
+#ifdef HYBRID_GET_CURRENT_DIR_NAME
+#undef get_current_dir_name
+#define get_current_dir_name gget_current_dir_name
+#endif
+
 #include <execinfo.h>
 #include "sysstdio.h"
 #ifdef HAVE_PWD_H
@@ -46,7 +54,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 # include <sys/user.h>
 # undef frame
 
-# include <sys/resource.h>
 # include <math.h>
 #endif
 
@@ -72,6 +79,9 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "msdos.h"
 #endif
 
+#ifdef HAVE_SYS_RESOURCE_H
+#include <sys/resource.h>
+#endif
 #include <sys/param.h>
 #include <sys/file.h>
 #include <fcntl.h>
@@ -105,9 +115,6 @@ int _cdecl _getpid (void);
 #include "syssignal.h"
 #include "systime.h"
 
-static void emacs_get_tty (int, struct emacs_tty *);
-static int emacs_set_tty (int, struct emacs_tty *, bool);
-
 /* ULLONG_MAX is missing on Red Hat Linux 7.3; see Bug#11781.  */
 #ifndef ULLONG_MAX
 #define ULLONG_MAX TYPE_MAXIMUM (unsigned long long int)
@@ -122,13 +129,12 @@ static const int baud_convert[] =
     1800, 2400, 4800, 9600, 19200, 38400
   };
 
-
-#if !defined (HAVE_GET_CURRENT_DIR_NAME) || defined (BROKEN_GET_CURRENT_DIR_NAME)
-
+#if !defined HAVE_GET_CURRENT_DIR_NAME || defined BROKEN_GET_CURRENT_DIR_NAME \
+  || (defined HYBRID_GET_CURRENT_DIR_NAME)
 /* Return the current working directory.  Returns NULL on errors.
    Any other returned value must be freed with free. This is used
    only when get_current_dir_name is not defined on the system.  */
-char*
+char *
 get_current_dir_name (void)
 {
   char *buf;
@@ -222,7 +228,9 @@ discard_tty_input (void)
 void
 stuff_char (char c)
 {
-  if (! FRAME_TERMCAP_P (SELECTED_FRAME ()))
+  if (! (FRAMEP (selected_frame)
+        && FRAME_LIVE_P (XFRAME (selected_frame))
+        && FRAME_TERMCAP_P (XFRAME (selected_frame))))
     return;
 
 /* Should perhaps error if in batch mode */
@@ -255,7 +263,7 @@ init_baud_rate (int fd)
 #endif /* not DOS_NT */
     }
 
-  baud_rate = (emacs_ospeed < sizeof baud_convert / sizeof baud_convert[0]
+  baud_rate = (emacs_ospeed < ARRAYELTS (baud_convert)
               ? baud_convert[emacs_ospeed] : 9600);
   if (baud_rate == 0)
     baud_rate = 1200;
@@ -603,6 +611,7 @@ init_sigio (int fd)
 #endif
 }
 
+#ifndef DOS_NT
 static void
 reset_sigio (int fd)
 {
@@ -610,6 +619,7 @@ reset_sigio (int fd)
   fcntl (fd, F_SETFL, old_fcntl_flags[fd]);
 #endif
 }
+#endif
 
 void
 request_sigio (void)
@@ -657,7 +667,29 @@ ignore_sigio (void)
   signal (SIGIO, SIG_IGN);
 #endif
 }
+\f
+#ifndef MSDOS
+/* Block SIGCHLD.  */
+
+void
+block_child_signal (sigset_t *oldset)
+{
+  sigset_t blocked;
+  sigemptyset (&blocked);
+  sigaddset (&blocked, SIGCHLD);
+  sigaddset (&blocked, SIGINT);
+  pthread_sigmask (SIG_BLOCK, &blocked, oldset);
+}
+
+/* Unblock SIGCHLD.  */
+
+void
+unblock_child_signal (sigset_t const *oldset)
+{
+  pthread_sigmask (SIG_SETMASK, oldset, 0);
+}
 
+#endif /* !MSDOS */
 \f
 /* Saving and restoring the process group of Emacs's terminal.  */
 
@@ -692,21 +724,21 @@ init_foreground_group (void)
 /* Block and unblock SIGTTOU.  */
 
 void
-block_tty_out_signal (void)
+block_tty_out_signal (sigset_t *oldset)
 {
 #ifdef SIGTTOU
   sigset_t blocked;
   sigemptyset (&blocked);
   sigaddset (&blocked, SIGTTOU);
-  pthread_sigmask (SIG_BLOCK, &blocked, 0);
+  pthread_sigmask (SIG_BLOCK, &blocked, oldset);
 #endif
 }
 
 void
-unblock_tty_out_signal (void)
+unblock_tty_out_signal (sigset_t const *oldset)
 {
 #ifdef SIGTTOU
-  pthread_sigmask (SIG_SETMASK, &empty_mask, 0);
+  pthread_sigmask (SIG_SETMASK, oldset, 0);
 #endif
 }
 
@@ -721,10 +753,11 @@ static void
 tcsetpgrp_without_stopping (int fd, pid_t pgid)
 {
 #ifdef SIGTTOU
+  sigset_t oldset;
   block_input ();
-  block_tty_out_signal ();
+  block_tty_out_signal (&oldset);
   tcsetpgrp (fd, pgid);
-  unblock_tty_out_signal ();
+  unblock_tty_out_signal (&oldset);
   unblock_input ();
 #endif
 }
@@ -751,15 +784,28 @@ widen_foreground_group (int fd)
 /* Getting and setting emacs_tty structures.  */
 
 /* Set *TC to the parameters associated with the terminal FD,
-   or clear it if the parameters are not available.  */
-static void
+   or clear it if the parameters are not available.
+   Return 0 on success, -1 on failure.  */
+int
 emacs_get_tty (int fd, struct emacs_tty *settings)
 {
   /* Retrieve the primary parameters - baud rate, character size, etcetera.  */
-#ifndef DOS_NT
-  /* We have those nifty POSIX tcmumbleattr functions.  */
   memset (&settings->main, 0, sizeof (settings->main));
-  tcgetattr (fd, &settings->main);
+#ifdef DOS_NT
+#ifdef WINDOWSNT
+  HANDLE h = (HANDLE)_get_osfhandle (fd);
+  DWORD console_mode;
+
+  if (h && h != INVALID_HANDLE_VALUE && GetConsoleMode (h, &console_mode))
+    {
+      settings->main = console_mode;
+      return 0;
+    }
+#endif /* WINDOWSNT */
+  return -1;
+#else  /* !DOS_NT */
+  /* We have those nifty POSIX tcmumbleattr functions.  */
+  return tcgetattr (fd, &settings->main);
 #endif
 }
 
@@ -768,11 +814,26 @@ emacs_get_tty (int fd, struct emacs_tty *settings)
    *SETTINGS.  If FLUSHP, discard input.
    Return 0 if all went well, and -1 (setting errno) if anything failed.  */
 
-static int
+int
 emacs_set_tty (int fd, struct emacs_tty *settings, bool flushp)
 {
   /* Set the primary parameters - baud rate, character size, etcetera.  */
-#ifndef DOS_NT
+#ifdef DOS_NT
+#ifdef WINDOWSNT
+  HANDLE h = (HANDLE)_get_osfhandle (fd);
+
+  if (h && h != INVALID_HANDLE_VALUE)
+    {
+      DWORD new_mode;
+
+      /* Assume the handle is open for input.  */
+      if (flushp)
+       FlushConsoleInputBuffer (h);
+      new_mode = settings->main;
+      SetConsoleMode (h, new_mode);
+    }
+#endif /* WINDOWSNT */
+#else  /* !DOS_NT */
   int i;
   /* We have those nifty POSIX tcmumbleattr functions.
      William J. Smith <wjs@wiis.wang.com> writes:
@@ -1113,6 +1174,24 @@ tabs_safe_p (int fd)
   return 0;
 #endif /* DOS_NT */
 }
+
+/* Discard echoing.  */
+
+void
+suppress_echo_on_tty (int fd)
+{
+  struct emacs_tty etty;
+
+  emacs_get_tty (fd, &etty);
+#ifdef DOS_NT
+  /* Set raw input mode.  */
+  etty.main = 0;
+#else
+  etty.main.c_lflag &= ~ICANON;        /* Disable buffering */
+  etty.main.c_lflag &= ~ECHO;  /* Disable echoing */
+#endif /* ! WINDOWSNT */
+  emacs_set_tty (fd, &etty, 0);
+}
 \f
 /* Get terminal size from system.
    Store number of lines into *HEIGHTP and width into *WIDTHP.
@@ -1527,9 +1606,6 @@ emacs_sigaction_init (struct sigaction *action, signal_handler_t handler)
 #endif
     }
 
-  if (! IEEE_FLOATING_POINT)
-    sigaddset (&action->sa_mask, SIGFPE);
-
   action->sa_handler = handler;
   action->sa_flags = emacs_sigaction_flags ();
 }
@@ -1649,6 +1725,83 @@ handle_arith_signal (int sig)
   xsignal0 (Qarith_error);
 }
 
+#ifdef HAVE_STACK_OVERFLOW_HANDLING
+
+/* -1 if stack grows down as expected on most OS/ABI variants, 1 otherwise.  */
+
+static int stack_direction;
+
+/* Alternate stack used by SIGSEGV handler below.  */
+
+static unsigned char sigsegv_stack[SIGSTKSZ];
+
+/* Attempt to recover from SIGSEGV caused by C stack overflow.  */
+
+static void
+handle_sigsegv (int sig, siginfo_t *siginfo, void *arg)
+{
+  /* Hard GC error may lead to stack overflow caused by
+     too nested calls to mark_object.  No way to survive.  */
+  if (!gc_in_progress)
+    {
+      struct rlimit rlim;
+
+      if (!getrlimit (RLIMIT_STACK, &rlim))
+       {
+         enum { STACK_DANGER_ZONE = 16 * 1024 };
+         char *beg, *end, *addr;
+
+         beg = stack_bottom;
+         end = stack_bottom + stack_direction * rlim.rlim_cur;
+         if (beg > end)
+           addr = beg, beg = end, end = addr;
+         addr = (char *) siginfo->si_addr;
+         /* If we're somewhere on stack and too close to
+            one of its boundaries, most likely this is it.  */
+         if (beg < addr && addr < end
+             && (addr - beg < STACK_DANGER_ZONE
+                 || end - addr < STACK_DANGER_ZONE))
+           siglongjmp (return_to_command_loop, 1);
+       }
+    }
+
+  /* Otherwise we can't do anything with this.  */
+  deliver_fatal_thread_signal (sig);
+}
+
+/* Return true if we have successfully set up SIGSEGV handler on alternate
+   stack.  Otherwise we just treat SIGSEGV among the rest of fatal signals.  */
+
+static bool
+init_sigsegv (void)
+{
+  struct sigaction sa;
+  stack_t ss;
+
+  stack_direction = ((char *) &ss < stack_bottom) ? -1 : 1;
+
+  ss.ss_sp = sigsegv_stack;
+  ss.ss_size = sizeof (sigsegv_stack);
+  ss.ss_flags = 0;
+  if (sigaltstack (&ss, NULL) < 0)
+    return 0;
+
+  sigfillset (&sa.sa_mask);
+  sa.sa_sigaction = handle_sigsegv;
+  sa.sa_flags = SA_SIGINFO | SA_ONSTACK | emacs_sigaction_flags ();
+  return sigaction (SIGSEGV, &sa, NULL) < 0 ? 0 : 1;
+}
+
+#else /* not HAVE_STACK_OVERFLOW_HANDLING */
+
+static bool
+init_sigsegv (void)
+{
+  return 0;
+}
+
+#endif /* HAVE_STACK_OVERFLOW_HANDLING */
+
 static void
 deliver_arith_signal (int sig)
 {
@@ -1915,7 +2068,8 @@ init_signals (bool dumping)
 #ifdef SIGBUS
   sigaction (SIGBUS, &thread_fatal_action, 0);
 #endif
-  sigaction (SIGSEGV, &thread_fatal_action, 0);
+  if (!init_sigsegv ())
+    sigaction (SIGSEGV, &thread_fatal_action, 0);
 #ifdef SIGSYS
   sigaction (SIGSYS, &thread_fatal_action, 0);
 #endif
@@ -2133,6 +2287,7 @@ emacs_abort (void)
 #endif
 
 /* Open FILE for Emacs use, using open flags OFLAG and mode MODE.
+   Use binary I/O on systems that care about text vs binary I/O.
    Arrange for subprograms to not inherit the file descriptor.
    Prefer a method that is multithread-safe, if available.
    Do not fail merely because the open was interrupted by a signal.
@@ -2142,6 +2297,8 @@ int
 emacs_open (const char *file, int oflags, int mode)
 {
   int fd;
+  if (! (oflags & O_TEXT))
+    oflags |= O_BINARY;
   oflags |= O_CLOEXEC;
   while ((fd = open (file, oflags, mode)) < 0 && errno == EINTR)
     QUIT;
@@ -2189,7 +2346,7 @@ emacs_pipe (int fd[2])
 #ifdef MSDOS
   return pipe (fd);
 #else  /* !MSDOS */
-  int result = pipe2 (fd, O_CLOEXEC);
+  int result = pipe2 (fd, O_BINARY | O_CLOEXEC);
   if (! O_CLOEXEC && result == 0)
     {
       fcntl (fd[0], F_SETFD, FD_CLOEXEC);
@@ -3443,3 +3600,208 @@ system_process_attributes (Lisp_Object pid)
 }
 
 #endif /* !defined (WINDOWSNT) */
+\f
+/* Wide character string collation.  */
+
+#ifdef __STDC_ISO_10646__
+# include <wchar.h>
+# include <wctype.h>
+
+# if defined HAVE_NEWLOCALE || defined HAVE_SETLOCALE
+#  include <locale.h>
+# endif
+# ifndef LC_COLLATE
+#  define LC_COLLATE 0
+# endif
+# ifndef LC_COLLATE_MASK
+#  define LC_COLLATE_MASK 0
+# endif
+# ifndef LC_CTYPE
+#  define LC_CTYPE 0
+# endif
+# ifndef LC_CTYPE_MASK
+#  define LC_CTYPE_MASK 0
+# endif
+
+# ifndef HAVE_NEWLOCALE
+#  undef freelocale
+#  undef locale_t
+#  undef newlocale
+#  undef wcscoll_l
+#  undef towlower_l
+#  define freelocale emacs_freelocale
+#  define locale_t emacs_locale_t
+#  define newlocale emacs_newlocale
+#  define wcscoll_l emacs_wcscoll_l
+#  define towlower_l emacs_towlower_l
+
+typedef char const *locale_t;
+
+static locale_t
+newlocale (int category_mask, char const *locale, locale_t loc)
+{
+  return locale;
+}
+
+static void
+freelocale (locale_t loc)
+{
+}
+
+static char *
+emacs_setlocale (int category, char const *locale)
+{
+#  ifdef HAVE_SETLOCALE
+  errno = 0;
+  char *loc = setlocale (category, locale);
+  if (loc || errno)
+    return loc;
+  errno = EINVAL;
+#  else
+  errno = ENOTSUP;
+#  endif
+  return 0;
+}
+
+static int
+wcscoll_l (wchar_t const *a, wchar_t const *b, locale_t loc)
+{
+  int result = 0;
+  char *oldloc = emacs_setlocale (LC_COLLATE, NULL);
+  int err;
+
+  if (! oldloc)
+    err = errno;
+  else
+    {
+      USE_SAFE_ALLOCA;
+      char *oldcopy = SAFE_ALLOCA (strlen (oldloc) + 1);
+      strcpy (oldcopy, oldloc);
+      if (! emacs_setlocale (LC_COLLATE, loc))
+       err = errno;
+      else
+       {
+         errno = 0;
+         result = wcscoll (a, b);
+         err = errno;
+         if (! emacs_setlocale (LC_COLLATE, oldcopy))
+           err = errno;
+       }
+      SAFE_FREE ();
+    }
+
+  errno = err;
+  return result;
+}
+
+static wint_t
+towlower_l (wint_t wc, locale_t loc)
+{
+  wint_t result = wc;
+  char *oldloc = emacs_setlocale (LC_CTYPE, NULL);
+
+  if (oldloc)
+    {
+      USE_SAFE_ALLOCA;
+      char *oldcopy = SAFE_ALLOCA (strlen (oldloc) + 1);
+      strcpy (oldcopy, oldloc);
+      if (emacs_setlocale (LC_CTYPE, loc))
+       {
+         result = towlower (wc);
+         emacs_setlocale (LC_COLLATE, oldcopy);
+       }
+      SAFE_FREE ();
+    }
+
+  return result;
+}
+# endif
+
+int
+str_collate (Lisp_Object s1, Lisp_Object s2,
+            Lisp_Object locale, Lisp_Object ignore_case)
+{
+  int res, err;
+  ptrdiff_t len, i, i_byte;
+  wchar_t *p1, *p2;
+
+  USE_SAFE_ALLOCA;
+
+  /* Convert byte stream to code points.  */
+  len = SCHARS (s1); i = i_byte = 0;
+  SAFE_NALLOCA (p1, 1, len + 1);
+  while (i < len)
+    FETCH_STRING_CHAR_ADVANCE (*(p1+i-1), s1, i, i_byte);
+  *(p1+len) = 0;
+
+  len = SCHARS (s2); i = i_byte = 0;
+  SAFE_NALLOCA (p2, 1, len + 1);
+  while (i < len)
+    FETCH_STRING_CHAR_ADVANCE (*(p2+i-1), s2, i, i_byte);
+  *(p2+len) = 0;
+
+  if (STRINGP (locale))
+    {
+      locale_t loc = newlocale (LC_COLLATE_MASK | LC_CTYPE_MASK,
+                               SSDATA (locale), 0);
+      if (!loc)
+       error ("Invalid locale %s: %s", SSDATA (locale), strerror (errno));
+
+      if (! NILP (ignore_case))
+       for (int i = 1; i < 3; i++)
+         {
+           wchar_t *p = (i == 1) ? p1 : p2;
+           for (; *p; p++)
+             *p = towlower_l (*p, loc);
+         }
+
+      errno = 0;
+      res = wcscoll_l (p1, p2, loc);
+      err = errno;
+      freelocale (loc);
+    }
+  else
+    {
+      if (! NILP (ignore_case))
+       for (int i = 1; i < 3; i++)
+         {
+           wchar_t *p = (i == 1) ? p1 : p2;
+           for (; *p; p++)
+             *p = towlower (*p);
+         }
+
+      errno = 0;
+      res = wcscoll (p1, p2);
+      err = errno;
+    }
+#  ifndef HAVE_NEWLOCALE
+  if (err)
+    error ("Invalid locale or string for collation: %s", strerror (err));
+#  else
+  if (err)
+    error ("Invalid string for collation: %s", strerror (err));
+#  endif
+
+  SAFE_FREE ();
+  return res;
+}
+#endif  /* __STDC_ISO_10646__ */
+
+#ifdef WINDOWSNT
+int
+str_collate (Lisp_Object s1, Lisp_Object s2,
+            Lisp_Object locale, Lisp_Object ignore_case)
+{
+
+  char *loc = STRINGP (locale) ? SSDATA (locale) : NULL;
+  int res, err = errno;
+
+  errno = 0;
+  res = w32_compare_strings (SDATA (s1), SDATA (s2), loc, !NILP (ignore_case));
+  if (errno)
+    error ("Invalid string for collation: %s", strerror (errno));
+
+  errno = err;
+  return res;
+}
+#endif /* WINDOWSNT */
index b76e71a3a758bda67aba9fa8aaa595b8aac03651..db6438ed1f87589837971bb614f4f3979dcb2f52 100644 (file)
@@ -16,6 +16,9 @@ GNU General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#ifndef SYSSELECT_H
+#define SYSSELECT_H 1
+
 #ifndef DOS_NT
 #include <sys/select.h>
 #endif
@@ -47,3 +50,42 @@ typedef int fd_set;
 #ifdef MSDOS
 #define pselect sys_select
 #endif
+
+#ifndef WINDOWSNT
+INLINE_HEADER_BEGIN
+
+/* Check for out-of-range errors if ENABLE_CHECKING is defined.  */
+
+INLINE void
+fd_CLR (int fd, fd_set *set)
+{
+  eassume (0 <= fd && fd < FD_SETSIZE);
+  FD_CLR (fd, set);
+}
+
+INLINE bool
+fd_ISSET (int fd, fd_set *set)
+{
+  eassume (0 <= fd && fd < FD_SETSIZE);
+  return FD_ISSET (fd, set) != 0;
+}
+
+INLINE void
+fd_SET (int fd, fd_set *set)
+{
+  eassume (0 <= fd && fd < FD_SETSIZE);
+  FD_SET (fd, set);
+}
+
+#undef FD_CLR
+#undef FD_ISSET
+#undef FD_SET
+#define FD_CLR(fd, set) fd_CLR (fd, set)
+#define FD_ISSET(fd, set) fd_ISSET (fd, set)
+#define FD_SET(fd, set) fd_SET (fd, set)
+
+INLINE_HEADER_END
+
+#endif /* !WINDOWSNT */
+
+#endif
index 477ddfc2086a0d5e5fad0a2a12fadcdaca60f352..3fd9730e66593c66455f443d716d353599c3aed3 100644 (file)
@@ -20,6 +20,10 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <signal.h>
 
 extern void init_signals (bool);
+extern void block_child_signal (sigset_t *);
+extern void unblock_child_signal (sigset_t const *);
+extern void block_tty_out_signal (sigset_t *);
+extern void unblock_tty_out_signal (sigset_t const *);
 
 #ifdef HAVE_PTHREAD
 #include <pthread.h>
index a834bce76dca240bfc13a2d552d3c719e666511b..8f018044660984f475afe4aba1aa8901a6428aa5 100644 (file)
@@ -93,6 +93,22 @@ extern bool decode_time_components (Lisp_Object, Lisp_Object, Lisp_Object,
 extern struct timespec lisp_time_argument (Lisp_Object);
 #endif
 
+#ifndef HAVE_TZALLOC
+# undef mktime_z
+# undef timezone_t
+# undef tzalloc
+# undef tzfree
+# define mktime_z emacs_mktime_z
+# define timezone_t emacs_timezone_t
+# define tzalloc emacs_tzalloc
+# define tzfree emacs_tzfree
+typedef char const *timezone_t;
+INLINE timezone_t tzalloc (char const *name) { return name; }
+INLINE void tzfree (timezone_t tz) { }
+/* Defined in editfns.c.  */
+extern time_t mktime_z (timezone_t, struct tm *);
+#endif
+
 INLINE_HEADER_END
 
 #endif /* EMACS_SYSTIME_H */
index 6eb0c11ef6e7014a65f88272b589d7c30bb92ad6..a29c4933d7ba17a96f6d2f5e86baf4ff42e2c1f3 100644 (file)
@@ -23,6 +23,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <fcntl.h>
 #endif /* not DOS_NT */
 
+#include <stdbool.h>
 #include <sys/ioctl.h>
 
 #ifdef HPUX
@@ -74,10 +75,13 @@ struct emacs_tty {
 #ifndef DOS_NT
   struct termios main;
 #else /* DOS_NT */
-  int main;
+  unsigned main;
 #endif /* DOS_NT */
 };
 \f
 /* From sysdep.c or w32.c  */
+extern int emacs_get_tty (int, struct emacs_tty *) EXTERNALLY_VISIBLE;
+extern int emacs_set_tty (int, struct emacs_tty *, bool) EXTERNALLY_VISIBLE;
+extern void suppress_echo_on_tty (int);
 extern int serial_open (Lisp_Object);
 extern void serial_configure (struct Lisp_Process *, Lisp_Object);
index 8661cba1160057fc2ed02cb4355656a30f49c90d..0c36469f6554e57e100af33c7374f5799eacd277 100644 (file)
@@ -77,7 +77,6 @@ static void tty_turn_off_highlight (struct tty_display_info *);
 static void tty_show_cursor (struct tty_display_info *);
 static void tty_hide_cursor (struct tty_display_info *);
 static void tty_background_highlight (struct tty_display_info *tty);
-static struct terminal *get_tty_terminal (Lisp_Object, bool);
 static void clear_tty_hooks (struct terminal *terminal);
 static void set_tty_hooks (struct terminal *terminal);
 static void dissociate_if_controlling_tty (int fd);
@@ -91,7 +90,7 @@ static _Noreturn void vfatal (const char *str, va_list ap)
 
 #define OUTPUT(tty, a)                                          \
   emacs_tputs ((tty), a,                                        \
-               FRAME_LINES (XFRAME (selected_frame)) - curY (tty),     \
+               FRAME_TOTAL_LINES (XFRAME (selected_frame)) - curY (tty),       \
                cmputc)
 
 #define OUTPUT1(tty, a) emacs_tputs ((tty), a, 1, cmputc)
@@ -105,9 +104,9 @@ static _Noreturn void vfatal (const char *str, va_list ap)
 
 #define OUTPUT1_IF(tty, a) do { if (a) emacs_tputs ((tty), a, 1, cmputc); } while (0)
 
-/* Display space properties */
+/* Display space properties */
 
-/* Chain of all tty device parameters. */
+/* Chain of all tty device parameters.  */
 struct tty_display_info *tty_list;
 
 /* Meaning of bits in no_color_video.  Each bit set means that the
@@ -131,6 +130,9 @@ enum no_color_bit
 
 static int max_frame_cols;
 
+static Lisp_Object Qtty_mode_set_strings;
+static Lisp_Object Qtty_mode_reset_strings;
+
 \f
 
 #ifdef HAVE_GPM
@@ -161,6 +163,28 @@ tty_ring_bell (struct frame *f)
 
 /* Set up termcap modes for Emacs. */
 
+static void
+tty_send_additional_strings (struct terminal *terminal, Lisp_Object sym)
+{
+  Lisp_Object lisp_terminal;
+  Lisp_Object extra_codes;
+  struct tty_display_info *tty = terminal->display_info.tty;
+
+  XSETTERMINAL (lisp_terminal, terminal);
+  for (extra_codes = Fterminal_parameter (lisp_terminal, sym);
+       CONSP (extra_codes);
+       extra_codes = XCDR (extra_codes))
+    {
+      Lisp_Object string = XCAR (extra_codes);
+      if (STRINGP (string))
+        {
+          fwrite (SDATA (string), 1, SBYTES (string), tty->output);
+          if (tty->termscript)
+            fwrite (SDATA (string), 1, SBYTES (string), tty->termscript);
+        }
+    }
+}
+
 static void
 tty_set_terminal_modes (struct terminal *terminal)
 {
@@ -176,13 +200,14 @@ tty_set_terminal_modes (struct terminal *terminal)
              off the screen, so it won't be overwritten and lost.  */
           int i;
           current_tty = tty;
-          for (i = 0; i < FRAME_LINES (XFRAME (selected_frame)); i++)
+          for (i = 0; i < FRAME_TOTAL_LINES (XFRAME (selected_frame)); i++)
             cmputc ('\n');
         }
 
       OUTPUT_IF (tty, visible_cursor ? tty->TS_cursor_visible : tty->TS_cursor_normal);
       OUTPUT_IF (tty, tty->TS_keypad_mode);
       losecursor (tty);
+      tty_send_additional_strings (terminal, Qtty_mode_set_strings);
       fflush (tty->output);
     }
 }
@@ -196,6 +221,7 @@ tty_reset_terminal_modes (struct terminal *terminal)
 
   if (tty->output)
     {
+      tty_send_additional_strings (terminal, Qtty_mode_reset_strings);
       tty_turn_off_highlight (tty);
       tty_turn_off_insert (tty);
       OUTPUT_IF (tty, tty->TS_end_keypad_mode);
@@ -230,7 +256,7 @@ tty_set_terminal_window (struct frame *f, int size)
 {
   struct tty_display_info *tty = FRAME_TTY (f);
 
-  tty->specified_window = size ? size : FRAME_LINES (f);
+  tty->specified_window = size ? size : FRAME_TOTAL_LINES (f);
   if (FRAME_SCROLL_REGION_OK (f))
     tty_set_scroll_region (f, 0, tty->specified_window);
 }
@@ -245,9 +271,9 @@ tty_set_scroll_region (struct frame *f, int start, int stop)
     buf = tparam (tty->TS_set_scroll_region, 0, 0, start, stop - 1, 0, 0);
   else if (tty->TS_set_scroll_region_1)
     buf = tparam (tty->TS_set_scroll_region_1, 0, 0,
-                 FRAME_LINES (f), start,
-                 FRAME_LINES (f) - stop,
-                 FRAME_LINES (f));
+                 FRAME_TOTAL_LINES (f), start,
+                 FRAME_TOTAL_LINES (f) - stop,
+                 FRAME_TOTAL_LINES (f));
   else
     buf = tparam (tty->TS_set_window, 0, 0, start, 0, stop, FRAME_COLS (f));
 
@@ -419,7 +445,7 @@ tty_clear_to_end (struct frame *f)
     }
   else
     {
-      for (i = curY (tty); i < FRAME_LINES (f); i++)
+      for (i = curY (tty); i < FRAME_TOTAL_LINES (f); i++)
        {
          cursor_to (f, i, 0);
          clear_end_of_line (f, FRAME_COLS (f));
@@ -500,9 +526,6 @@ static ptrdiff_t encode_terminal_dst_size;
    Set CODING->produced to the byte-length of the resulting byte
    sequence, and return a pointer to that byte sequence.  */
 
-#ifndef DOS_NT
-static
-#endif
 unsigned char *
 encode_terminal_code (struct glyph *src, int src_len,
                      struct coding_system *coding)
@@ -724,7 +747,7 @@ tty_write_glyphs (struct frame *f, struct glyph *string, int len)
      since that would scroll the whole frame on some terminals.  */
 
   if (AutoWrap (tty)
-      && curY (tty) + 1 == FRAME_LINES (f)
+      && curY (tty) + 1 == FRAME_TOTAL_LINES (f)
       && (curX (tty) + len) == FRAME_COLS (f))
     len --;
   if (len <= 0)
@@ -796,7 +819,7 @@ tty_write_glyphs_with_face (register struct frame *f, register struct glyph *str
      since that would scroll the whole frame on some terminals.  */
 
   if (AutoWrap (tty)
-      && curY (tty) + 1 == FRAME_LINES (f)
+      && curY (tty) + 1 == FRAME_TOTAL_LINES (f)
       && (curX (tty) + len) == FRAME_COLS (f))
     len --;
   if (len <= 0)
@@ -985,7 +1008,7 @@ tty_ins_del_lines (struct frame *f, int vpos, int n)
       && vpos + i >= tty->specified_window)
     return;
   if (!FRAME_MEMORY_BELOW_FRAME (f)
-      && vpos + i >= FRAME_LINES (f))
+      && vpos + i >= FRAME_TOTAL_LINES (f))
     return;
 
   if (multi)
@@ -1022,7 +1045,7 @@ tty_ins_del_lines (struct frame *f, int vpos, int n)
       && FRAME_MEMORY_BELOW_FRAME (f)
       && n < 0)
     {
-      cursor_to (f, FRAME_LINES (f) + n, 0);
+      cursor_to (f, FRAME_TOTAL_LINES (f) + n, 0);
       clear_to_end (f);
     }
 }
@@ -1339,7 +1362,7 @@ term_get_fkeys_1 (void)
   if (!KEYMAPP (KVAR (kboard, Vinput_decode_map)))
     kset_input_decode_map (kboard, Fmake_sparse_keymap (Qnil));
 
-  for (i = 0; i < (sizeof (keys) / sizeof (keys[0])); i++)
+  for (i = 0; i < ARRAYELTS (keys); i++)
     {
       char *sequence = tgetstr (keys[i].cap, address);
       if (sequence)
@@ -1837,7 +1860,7 @@ produce_glyphless_glyph (struct it *it, Lisp_Object acronym)
            acronym = XCDR (acronym);
          buf[0] = '[';
          str = STRINGP (acronym) ? SSDATA (acronym) : "";
-         for (len = 0; len < 6 && str[len] && ASCII_BYTE_P (str[len]); len++)
+         for (len = 0; len < 6 && str[len] && ASCII_CHAR_P (str[len]); len++)
            buf[1 + len] = str[len];
          buf[1 + len] = ']';
          len += 2;
@@ -2008,11 +2031,9 @@ selected frame's terminal).  This function always returns nil if
 TERMINAL does not refer to a text terminal.  */)
   (Lisp_Object terminal)
 {
-  struct terminal *t = get_tty_terminal (terminal, 0);
-  if (!t)
-    return Qnil;
-  else
-    return t->display_info.tty->TN_max_colors > 0 ? Qt : Qnil;
+  struct terminal *t = decode_tty_terminal (terminal);
+
+  return (t && t->display_info.tty->TN_max_colors > 0) ? Qt : Qnil;
 }
 
 /* Return the number of supported colors.  */
@@ -2025,11 +2046,9 @@ selected frame's terminal).  This function always returns 0 if
 TERMINAL does not refer to a text terminal.  */)
   (Lisp_Object terminal)
 {
-  struct terminal *t = get_tty_terminal (terminal, 0);
-  if (!t)
-    return make_number (0);
-  else
-    return make_number (t->display_info.tty->TN_max_colors);
+  struct terminal *t = decode_tty_terminal (terminal);
+
+  return make_number (t ? t->display_info.tty->TN_max_colors : 0);
 }
 
 #ifndef DOS_NT
@@ -2144,52 +2163,6 @@ set_tty_color_mode (struct tty_display_info *tty, struct frame *f)
 
 #endif /* !DOS_NT */
 
-\f
-
-/* Return the tty display object specified by TERMINAL. */
-
-static struct terminal *
-get_tty_terminal (Lisp_Object terminal, bool throw)
-{
-  struct terminal *t = get_terminal (terminal, throw);
-
-  if (t && t->type != output_termcap && t->type != output_msdos_raw)
-    {
-      if (throw)
-        error ("Device %d is not a termcap terminal device", t->id);
-      else
-        return NULL;
-    }
-
-  return t;
-}
-
-/* Return an active termcap device that uses the tty device with the
-   given name.
-
-   This function ignores suspended devices.
-
-   Returns NULL if the named terminal device is not opened.  */
-
-struct terminal *
-get_named_tty (const char *name)
-{
-  struct terminal *t;
-
-  eassert (name);
-
-  for (t = terminal_list; t; t = t->next_terminal)
-    {
-      if ((t->type == output_termcap || t->type == output_msdos_raw)
-          && !strcmp (t->display_info.tty->name, name)
-          && TERMINAL_ACTIVE_P (t))
-        return t;
-    }
-
-  return 0;
-}
-
-\f
 DEFUN ("tty-type", Ftty_type, Stty_type, 0, 1, 0,
        doc: /* Return the type of the tty device that TERMINAL uses.
 Returns nil if TERMINAL is not on a tty device.
@@ -2198,15 +2171,10 @@ TERMINAL can be a terminal object, a frame, or nil (meaning the
 selected frame's terminal).  */)
   (Lisp_Object terminal)
 {
-  struct terminal *t = get_terminal (terminal, 1);
-
-  if (t->type != output_termcap && t->type != output_msdos_raw)
-    return Qnil;
+  struct terminal *t = decode_tty_terminal (terminal);
 
-  if (t->display_info.tty->type)
-    return build_string (t->display_info.tty->type);
-  else
-    return Qnil;
+  return (t && t->display_info.tty->type
+         ? build_string (t->display_info.tty->type) : Qnil);
 }
 
 DEFUN ("controlling-tty-p", Fcontrolling_tty_p, Scontrolling_tty_p, 0, 1, 0,
@@ -2217,13 +2185,9 @@ selected frame's terminal).  This function always returns nil if
 TERMINAL is not on a tty device.  */)
   (Lisp_Object terminal)
 {
-  struct terminal *t = get_terminal (terminal, 1);
+  struct terminal *t = decode_tty_terminal (terminal);
 
-  if ((t->type != output_termcap && t->type != output_msdos_raw)
-      || strcmp (t->display_info.tty->name, DEV_TTY) != 0)
-    return Qnil;
-  else
-    return Qt;
+  return (t && !strcmp (t->display_info.tty->name, DEV_TTY) ? Qt : Qnil);
 }
 
 DEFUN ("tty-no-underline", Ftty_no_underline, Stty_no_underline, 0, 1, 0,
@@ -2237,7 +2201,7 @@ selected frame's terminal).  This function always returns nil if
 TERMINAL does not refer to a text terminal.  */)
   (Lisp_Object terminal)
 {
-  struct terminal *t = get_terminal (terminal, 1);
+  struct terminal *t = decode_live_terminal (terminal);
 
   if (t->type == output_termcap)
     t->display_info.tty->TS_enter_underline_mode = 0;
@@ -2252,7 +2216,7 @@ does not refer to a text terminal.  Otherwise, it returns the
 top-most frame on the text terminal.  */)
   (Lisp_Object terminal)
 {
-  struct terminal *t = get_terminal (terminal, 1);
+  struct terminal *t = decode_live_terminal (terminal);
 
   if (t->type == output_termcap)
     return t->display_info.tty->top_frame;
@@ -2282,11 +2246,11 @@ suspended.
 A suspended tty may be resumed by calling `resume-tty' on it.  */)
   (Lisp_Object tty)
 {
-  struct terminal *t = get_tty_terminal (tty, 1);
+  struct terminal *t = decode_tty_terminal (tty);
   FILE *f;
 
   if (!t)
-    error ("Unknown tty device");
+    error ("Attempt to suspend a non-text terminal device");
 
   f = t->display_info.tty->input;
 
@@ -2342,15 +2306,15 @@ TTY may be a terminal object, a frame, or nil (meaning the selected
 frame's terminal). */)
   (Lisp_Object tty)
 {
-  struct terminal *t = get_tty_terminal (tty, 1);
+  struct terminal *t = decode_tty_terminal (tty);
   int fd;
 
   if (!t)
-    error ("Unknown tty device");
+    error ("Attempt to resume a non-text terminal device");
 
   if (!t->display_info.tty->input)
     {
-      if (get_named_tty (t->display_info.tty->name))
+      if (get_named_terminal (t->display_info.tty->name))
         error ("Cannot resume display while another display is active on the same device");
 
 #ifdef MSDOS
@@ -2381,13 +2345,14 @@ frame's terminal). */)
          struct frame *f = XFRAME (t->display_info.tty->top_frame);
          int width, height;
          int old_height = FRAME_COLS (f);
-         int old_width = FRAME_LINES (f);
+         int old_width = FRAME_TOTAL_LINES (f);
 
          /* Check if terminal/window size has changed while the frame
             was suspended.  */
          get_tty_size (fileno (t->display_info.tty->input), &width, &height);
          if (width != old_width || height != old_height)
-           change_frame_size (f, width, height, 0, 0, 0, 0);
+           change_frame_size (f, width, height - FRAME_MENU_BAR_LINES (f),
+                              0, 0, 0, 0);
          SET_FRAME_VISIBLE (XFRAME (t->display_info.tty->top_frame), 1);
        }
 
@@ -2515,7 +2480,7 @@ term_mouse_position (struct frame **fp, int insist, Lisp_Object *bar_window,
   (*fp)->mouse_moved = 0;
 
   *bar_window = Qnil;
-  *part = 0;
+  *part = scroll_bar_above_handle;
 
   XSETINT (*x, last_mouse_x);
   XSETINT (*y, last_mouse_y);
@@ -2870,7 +2835,7 @@ tty_menu_display (tty_menu *menu, int x, int y, int pn, int *faces,
   /* Don't try to display more menu items than the console can display
      using the available screen lines.  Exclude the echo area line, as
      it will be overwritten by the help-echo anyway.  */
-  int max_items = min (menu->count - first_item, FRAME_LINES (sf) - 1 - y);
+  int max_items = min (menu->count - first_item, FRAME_TOTAL_LINES (sf) - 1 - y);
 
   menu_help_message = NULL;
 
@@ -2918,7 +2883,6 @@ static int
 tty_menu_add_pane (tty_menu *menu, const char *txt)
 {
   int len;
-  const unsigned char *p;
 
   tty_menu_make_room (menu);
   menu->submenu[menu->count] = tty_menu_create ();
@@ -2928,15 +2892,7 @@ tty_menu_add_pane (tty_menu *menu, const char *txt)
   menu->count++;
 
   /* Update the menu width, if necessary.  */
-  for (len = 0, p = (unsigned char *) txt; *p; )
-    {
-      int ch_len;
-      int ch = STRING_CHAR_AND_LENGTH (p, ch_len);
-
-      len += CHAR_WIDTH (ch);
-      p += ch_len;
-    }
-
+  len = menu_item_width ((const unsigned char *) txt);
   if (len > menu->width)
     menu->width = len;
 
@@ -2950,7 +2906,6 @@ tty_menu_add_selection (tty_menu *menu, int pane,
                        char *txt, bool enable, char const *help_text)
 {
   int len;
-  unsigned char *p;
 
   if (pane)
     {
@@ -2966,15 +2921,7 @@ tty_menu_add_selection (tty_menu *menu, int pane,
   menu->count++;
 
   /* Update the menu width, if necessary.  */
-  for (len = 0, p = (unsigned char *) txt; *p; )
-    {
-      int ch_len;
-      int ch = STRING_CHAR_AND_LENGTH (p, ch_len);
-
-      len += CHAR_WIDTH (ch);
-      p += ch_len;
-    }
-
+  len = menu_item_width ((const unsigned char *) txt);
   if (len > menu->width)
     menu->width = len;
 
@@ -3184,6 +3131,7 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx,
   Lisp_Object selectface;
   int first_item = 0;
   int col, row;
+  USE_SAFE_ALLOCA;
 
   /* Don't allow non-positive x0 and y0, lest the menu will wrap
      around the display.  */
@@ -3192,7 +3140,7 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx,
   if (y0 <= 0)
     y0 = 1;
 
-  state = alloca (menu->panecount * sizeof (struct tty_menu_state));
+  SAFE_NALLOCA (state, 1, menu->panecount);
   memset (state, 0, sizeof (*state));
   faces[0]
     = lookup_derived_face (sf, intern ("tty-menu-disabled-face"),
@@ -3268,7 +3216,7 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx,
     {
       mi_result input_status;
       int min_y = state[0].y;
-      int max_y = min (min_y + state[0].menu->count, FRAME_LINES (sf) - 1) - 1;
+      int max_y = min (min_y + state[0].menu->count, FRAME_TOTAL_LINES (sf) - 1) - 1;
 
       input_status = read_menu_input (sf, &x, &y, min_y, max_y, &first_time);
       if (input_status)
@@ -3414,6 +3362,7 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx,
   discard_mouse_events ();
   if (!kbd_buffer_events_waiting ())
     clear_input_pending ();
+  SAFE_FREE ();
   return result;
 }
 
@@ -3555,9 +3504,10 @@ tty_menu_new_item_coords (struct frame *f, int which, int *x, int *y)
     }
 }
 
+/* WINDOWSNT uses this as menu_show_hook, see w32console.c.  */
 Lisp_Object
-tty_menu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
-              Lisp_Object title, bool kbd_navigation, const char **error_name)
+tty_menu_show (struct frame *f, int x, int y, int menuflags,
+              Lisp_Object title, const char **error_name)
 {
   tty_menu *menu;
   int pane, selidx, lpane, status;
@@ -3584,21 +3534,21 @@ tty_menu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
 
   /* Make the menu on that window.  */
   menu = tty_menu_create ();
-  if (menu == NULL)
-    {
-      *error_name = "Can't create menu";
-      return Qnil;
-    }
 
   /* Don't GC while we prepare and show the menu, because we give the
      menu functions pointers to the contents of strings.  */
   specpdl_count = inhibit_garbage_collection ();
 
+  /* Avoid crashes if, e.g., another client will connect while we
+     are in a menu.  */
+  temporarily_switch_to_single_kboard (f);
+
   /* Adjust coordinates to be root-window-relative.  */
   item_x = x += f->left_pos;
   item_y = y += f->top_pos;
 
   /* Create all the necessary panes and their items.  */
+  USE_SAFE_ALLOCA;
   maxwidth = maxlines = lines = i = 0;
   lpane = TTYM_FAILURE;
   while (i < menu_items_used)
@@ -3615,7 +3565,7 @@ tty_menu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
          prefix = AREF (menu_items, i + MENU_ITEMS_PANE_PREFIX);
          pane_string = (NILP (pane_name)
                         ? "" : SSDATA (pane_name));
-         if (keymaps && !NILP (prefix))
+         if ((menuflags & MENU_KEYMAPS) && !NILP (prefix))
            pane_string++;
 
          lpane = tty_menu_add_pane (menu, pane_string);
@@ -3667,9 +3617,7 @@ tty_menu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
 
          if (!NILP (descrip))
            {
-             /* If alloca is fast, use that to make the space,
-                to reduce gc needs.  */
-             item_data = (char *) alloca (maxwidth + SBYTES (descrip) + 1);
+             item_data = SAFE_ALLOCA (maxwidth + SBYTES (descrip) + 1);
              memcpy (item_data, SSDATA (item_name), SBYTES (item_name));
              for (j = SCHARS (item_name); j < maxwidth; j++)
                item_data[j] = ' ';
@@ -3755,7 +3703,8 @@ tty_menu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
   specbind (Qoverriding_terminal_local_map,
            Fsymbol_value (Qtty_menu_navigation_map));
   status = tty_menu_activate (menu, &pane, &selidx, x, y, &datap,
-                             tty_menu_help_callback, kbd_navigation);
+                             tty_menu_help_callback,
+                             menuflags & MENU_KBD_NAVIGATION);
   entry = pane_prefix = Qnil;
 
   switch (status)
@@ -3781,7 +3730,7 @@ tty_menu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
                    {
                      entry
                        = AREF (menu_items, i + MENU_ITEMS_ITEM_VALUE);
-                     if (keymaps != 0)
+                     if (menuflags & MENU_KEYMAPS)
                        {
                          entry = Fcons (entry, Qnil);
                          if (!NILP (pane_prefix))
@@ -3814,13 +3763,14 @@ tty_menu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
        Ftop_level ();
       /* Make "Cancel" equivalent to C-g unless FOR_CLICK (which means
         the menu was invoked with a mouse event as POSITION).  */
-      if (! for_click)
+      if (!(menuflags & MENU_FOR_CLICK))
         Fsignal (Qquit, Qnil);
       break;
     }
 
  tty_menu_end:
 
+  SAFE_FREE ();
   unbind_to (specpdl_count, Qnil);
   return entry;
 }
@@ -3895,7 +3845,9 @@ clear_tty_hooks (struct terminal *terminal)
   terminal->frame_rehighlight_hook = 0;
   terminal->frame_raise_lower_hook = 0;
   terminal->fullscreen_hook = 0;
+  terminal->menu_show_hook = 0;
   terminal->set_vertical_scroll_bar_hook = 0;
+  terminal->set_horizontal_scroll_bar_hook = 0;
   terminal->condemn_scroll_bars_hook = 0;
   terminal->redeem_scroll_bar_hook = 0;
   terminal->judge_scroll_bars_hook = 0;
@@ -3913,43 +3865,29 @@ clear_tty_hooks (struct terminal *terminal)
 static void
 set_tty_hooks (struct terminal *terminal)
 {
-  terminal->rif = 0; /* ttys don't support window-based redisplay. */
-
   terminal->cursor_to_hook = &tty_cursor_to;
   terminal->raw_cursor_to_hook = &tty_raw_cursor_to;
-
   terminal->clear_to_end_hook = &tty_clear_to_end;
   terminal->clear_frame_hook = &tty_clear_frame;
   terminal->clear_end_of_line_hook = &tty_clear_end_of_line;
-
   terminal->ins_del_lines_hook = &tty_ins_del_lines;
-
   terminal->insert_glyphs_hook = &tty_insert_glyphs;
   terminal->write_glyphs_hook = &tty_write_glyphs;
   terminal->delete_glyphs_hook = &tty_delete_glyphs;
-
   terminal->ring_bell_hook = &tty_ring_bell;
-
   terminal->reset_terminal_modes_hook = &tty_reset_terminal_modes;
   terminal->set_terminal_modes_hook = &tty_set_terminal_modes;
-  terminal->update_begin_hook = 0; /* Not needed. */
   terminal->update_end_hook = &tty_update_end;
+#ifdef MSDOS
+  terminal->menu_show_hook = &x_menu_show;
+#else
+  terminal->menu_show_hook = &tty_menu_show;
+#endif
   terminal->set_terminal_window_hook = &tty_set_terminal_window;
-
-  terminal->mouse_position_hook = 0; /* Not needed. */
-  terminal->frame_rehighlight_hook = 0; /* Not needed. */
-  terminal->frame_raise_lower_hook = 0; /* Not needed. */
-
-  terminal->set_vertical_scroll_bar_hook = 0; /* Not needed. */
-  terminal->condemn_scroll_bars_hook = 0; /* Not needed. */
-  terminal->redeem_scroll_bar_hook = 0; /* Not needed. */
-  terminal->judge_scroll_bars_hook = 0; /* Not needed. */
-
   terminal->read_socket_hook = &tty_read_avail_input; /* keyboard.c */
-  terminal->frame_up_to_date_hook = 0; /* Not needed. */
-
   terminal->delete_frame_hook = &tty_free_frame_resources;
   terminal->delete_terminal_hook = &delete_tty;
+  /* Other hooks are NULL by default.  */
 }
 
 /* If FD is the controlling terminal, drop it.  */
@@ -3964,9 +3902,10 @@ dissociate_if_controlling_tty (int fd)
       /* setsid failed, presumably because Emacs is already a process
         group leader.  Fall back on the obsolescent way to dissociate
         a controlling tty.  */
-      block_tty_out_signal ();
+      sigset_t oldset;
+      block_tty_out_signal (&oldset);
       ioctl (fd, TIOCNOTTY, 0);
-      unblock_tty_out_signal ();
+      unblock_tty_out_signal (&oldset);
 #endif
     }
 }
@@ -3990,6 +3929,7 @@ init_tty (const char *name, const char *terminal_type, bool must_succeed)
   int status;
   struct tty_display_info *tty = NULL;
   struct terminal *terminal = NULL;
+  sigset_t oldset;
   bool ctty = false;  /* True if asked to open controlling tty.  */
 
   if (!terminal_type)
@@ -4007,11 +3947,11 @@ init_tty (const char *name, const char *terminal_type, bool must_succeed)
   /* XXX Perhaps this should be made explicit by having init_tty
      always create a new terminal and separating terminal and frame
      creation on Lisp level.  */
-  terminal = get_named_tty (name);
+  terminal = get_named_terminal (name);
   if (terminal)
     return terminal;
 
-  terminal = create_terminal ();
+  terminal = create_terminal (output_termcap, NULL);
 #ifdef MSDOS
   if (been_here > 0)
     maybe_fatal (0, 0, "Attempt to create another terminal %s", "",
@@ -4025,7 +3965,6 @@ init_tty (const char *name, const char *terminal_type, bool must_succeed)
   tty->next = tty_list;
   tty_list = tty;
 
-  terminal->type = output_termcap;
   terminal->display_info.tty = tty;
   tty->terminal = terminal;
 
@@ -4051,12 +3990,15 @@ init_tty (const char *name, const char *terminal_type, bool must_succeed)
        open a frame on the same terminal.  */
     int flags = O_RDWR | O_NOCTTY | (ctty ? 0 : O_IGNORE_CTTY);
     int fd = emacs_open (name, flags, 0);
-    tty->input = tty->output = fd < 0 || ! isatty (fd) ? 0 : fdopen (fd, "w+");
+    tty->input = tty->output
+      = ((fd < 0 || ! isatty (fd))
+        ? NULL
+        : fdopen (fd, "w+"));
 
     if (! tty->input)
       {
        char const *diagnostic
-         = tty->input ? "Not a tty device: %s" : "Could not open file: %s";
+         = (fd < 0) ? "Could not open file: %s" : "Not a tty device: %s";
        emacs_close (fd);
        maybe_fatal (must_succeed, terminal, diagnostic, diagnostic, name);
       }
@@ -4076,11 +4018,11 @@ init_tty (const char *name, const char *terminal_type, bool must_succeed)
 
   /* On some systems, tgetent tries to access the controlling
      terminal.  */
-  block_tty_out_signal ();
+  block_tty_out_signal (&oldset);
   status = tgetent (tty->termcap_term_buffer, terminal_type);
   if (tty->termcap_term_buffer[TERMCAP_BUFFER_SIZE - 1])
     emacs_abort ();
-  unblock_tty_out_signal ();
+  unblock_tty_out_signal (&oldset);
 
   if (status < 0)
     {
@@ -4231,6 +4173,7 @@ use the Bourne shell command `TERM=... export TERM' (C-shell:\n\
     tty->specified_window = height;
 
     FRAME_VERTICAL_SCROLL_BAR_TYPE (f) = vertical_scroll_bar_none;
+    FRAME_HAS_HORIZONTAL_SCROLL_BARS (f) = 0;
     tty->char_ins_del_ok = 1;
     baud_rate = 19200;
   }
@@ -4466,7 +4409,7 @@ fatal (const char *str, ...)
 
 \f
 
-/* Delete the given tty terminal, closing all frames on it. */
+/* Delete the given tty terminal, closing all frames on it.  */
 
 static void
 delete_tty (struct terminal *terminal)
@@ -4491,7 +4434,7 @@ delete_tty (struct terminal *terminal)
         ;
 
       if (! p)
-        /* This should not happen. */
+        /* This should not happen.  */
         emacs_abort ();
 
       p->next = tty->next;
@@ -4499,7 +4442,7 @@ delete_tty (struct terminal *terminal)
     }
 
   /* reset_sys_modes needs a valid device, so this call needs to be
-     before delete_terminal. */
+     before delete_terminal.  */
   reset_sys_modes (tty);
 
   delete_terminal (terminal);
@@ -4577,6 +4520,9 @@ bigger, or it may make it blink, or it may do nothing at all.  */);
   encode_terminal_src = NULL;
   encode_terminal_dst = NULL;
 
+  DEFSYM (Qtty_mode_set_strings, "tty-mode-set-strings");
+  DEFSYM (Qtty_mode_reset_strings, "tty-mode-reset-strings");
+
 #ifndef MSDOS
   DEFSYM (Qtty_menu_next_item, "tty-menu-next-item");
   DEFSYM (Qtty_menu_prev_item, "tty-menu-prev-item");
index 8c766bd1994f1afb86a5c6529d016bd93d3b5cf4..26c6de06f88ee731f1d933fbceed2e72b790cd6c 100644 (file)
@@ -520,7 +520,7 @@ scan_file (char *str, int fd, struct termcap_buffer *bufp)
   bufp->ateof = 0;
   *bufp->ptr = '\0';
 
-  lseek (fd, 0L, 0);
+  lseek (fd, 0, 0);
 
   while (!bufp->ateof)
     {
index 708351da83d37c0e0866dd7d908e18faedf04fca..9cab853ed3d466c96f2ad231062423bb7c61140b 100644 (file)
@@ -28,7 +28,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 INLINE_HEADER_BEGIN
 
 enum scroll_bar_part {
-  scroll_bar_nowhere = -1,
+  scroll_bar_nowhere,
   scroll_bar_above_handle,
   scroll_bar_handle,
   scroll_bar_below_handle,
@@ -37,7 +37,14 @@ enum scroll_bar_part {
   scroll_bar_to_top,
   scroll_bar_to_bottom,
   scroll_bar_end_scroll,
-  scroll_bar_move_ratio
+  scroll_bar_move_ratio,
+  scroll_bar_before_handle,
+  scroll_bar_horizontal_handle,
+  scroll_bar_after_handle,
+  scroll_bar_left_arrow,
+  scroll_bar_right_arrow,
+  scroll_bar_to_leftmost,
+  scroll_bar_to_rightmost
 };
 
 /* Output method of a terminal (and frames on this terminal, respectively).  */
@@ -130,6 +137,19 @@ enum event_kind
                                   whose scroll bar was clicked in.
                                   .timestamp gives a timestamp (in
                                   milliseconds) for the click.  */
+  HORIZONTAL_SCROLL_BAR_CLICK_EVENT,   /* .code gives the number of the mouse button
+                                  that was clicked.
+                                  .modifiers holds the state of the modifier
+                                  keys.
+                                  .part is a lisp symbol indicating which
+                                  part of the scroll bar got clicked.
+                                  .x gives the distance from the start of the
+                                  scroll bar of the click; .y gives the total
+                                  length of the scroll bar.
+                                  .frame_or_window gives the window
+                                  whose scroll bar was clicked in.
+                                  .timestamp gives a timestamp (in
+                                  milliseconds) for the click.  */
   SELECTION_REQUEST_EVENT,     /* Another X client wants a selection from us.
                                   See `struct selection_input_event'.  */
   SELECTION_CLEAR_EVENT,       /* Another X client cleared our selection.  */
@@ -235,28 +255,36 @@ enum event_kind
 struct input_event
 {
   /* What kind of event was this?  */
-  enum event_kind kind;
+  ENUM_BF (event_kind) kind : 16;
+
+  /* Used in scroll back click events.  */
+  ENUM_BF (scroll_bar_part) part : 16;
 
   /* For an ASCII_KEYSTROKE_EVENT and MULTIBYTE_CHAR_KEYSTROKE_EVENT,
      this is the character.
      For a NON_ASCII_KEYSTROKE_EVENT, this is the keysym code.
-     For a mouse event, this is the button number.
-     For a HELP_EVENT, this is the position within the object
-      (stored in ARG below) where the help was found.  */
-  ptrdiff_t code;
-  enum scroll_bar_part part;
+     For a mouse event, this is the button number.  */
+  unsigned code;
 
-  int modifiers;               /* See enum below for interpretation.  */
+  /* See enum below for interpretation.  */
+  unsigned modifiers;
 
+  /* One would prefer C integers, but HELP_EVENT uses these to
+     record frame or window object and a help form, respectively.  */
   Lisp_Object x, y;
+
+  /* Usually a time as reported by window system-specific event loop.
+     For a HELP_EVENT, this is the position within the object (stored
+     in ARG below) where the help was found.  */
   Time timestamp;
 
   /* This field is copied into a vector while the event is in
      the queue, so that garbage collections won't kill it.  */
   Lisp_Object frame_or_window;
 
-  /* Additional event argument.  This is used for TOOL_BAR_EVENTs and
-     HELP_EVENTs and avoids calling Fcons during signal handling.  */
+  /* This additional argument is used in attempt to avoid extra consing
+     when building events.  Unfortunately some events have to pass much
+     more data than it's reasonable to pack directly into this structure.  */
   Lisp_Object arg;
 };
 
@@ -478,7 +506,14 @@ struct terminal
      may do something OS dependent, like extended window manager hints on X11.  */
   void (*fullscreen_hook) (struct frame *f);
 
-  \f
+  /* This hook is called to display menus.  */
+  Lisp_Object (*menu_show_hook) (struct frame *f, int x, int y, int menuflags,
+                                Lisp_Object title, const char **error_name);
+
+  /* This hook is called to display popup dialog.  */
+  Lisp_Object (*popup_dialog_hook) (struct frame *f, Lisp_Object header,
+                                   Lisp_Object contents);
+
   /* Scroll bar hooks.  */
 
   /* The representation of scroll bars is determined by the code which
@@ -511,6 +546,16 @@ struct terminal
                                         int position);
 
 
+  /* Set the horizontal scroll bar for WINDOW to have its upper left
+     corner at (TOP, LEFT), and be LENGTH rows high.  Set its handle to
+     indicate that we are displaying PORTION characters out of a total
+     of WHOLE characters, starting at POSITION.  If WINDOW doesn't yet
+     have a scroll bar, create one for it.  */
+  void (*set_horizontal_scroll_bar_hook) (struct window *window,
+                                         int portion, int whole,
+                                         int position);
+
+
   /* The following three hooks are used when we're doing a thorough
      redisplay of the frame.  We don't explicitly know which scroll bars
      are going to be deleted, because keeping track of when windows go
@@ -636,17 +681,18 @@ extern struct terminal *terminal_list;
   (t->type == output_ns ? t->display_info.ns->name_list_element : Qnil)
 #endif
 
-extern struct terminal *get_terminal (Lisp_Object terminal, bool);
-extern struct terminal *create_terminal (void);
+extern struct terminal *decode_live_terminal (Lisp_Object);
+extern struct terminal *decode_tty_terminal (Lisp_Object);
+extern struct terminal *get_named_terminal (const char *);
+extern struct terminal *create_terminal (enum output_method,
+                                        struct redisplay_interface *);
 extern void delete_terminal (struct terminal *);
 
 /* The initial terminal device, created by initial_term_init.  */
 extern struct terminal *initial_terminal;
 
-#ifdef DOS_NT
 extern unsigned char *encode_terminal_code (struct glyph *, int,
                                            struct coding_system *);
-#endif
 
 #ifdef HAVE_GPM
 extern void close_gpm (int gpm_fd);
index d0a38b97bb44537bff2d93f84cd5ea08cb418bd2..0cd6a0bf60271d14c4379fcdea1c0c8a9fa924ea 100644 (file)
@@ -28,16 +28,18 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "coding.h"
 #include "keyboard.h"
 
-/* Chain of all terminals currently in use. */
+/* Chain of all terminals currently in use.  */
 struct terminal *terminal_list;
 
-/* The first unallocated terminal id. */
+/* The first unallocated terminal id.  */
 static int next_terminal_id;
 
-/* The initial terminal device, created by initial_term_init. */
+/* The initial terminal device, created by initial_term_init.  */
 struct terminal *initial_terminal;
 
+Lisp_Object Qrun_hook_with_args;
 static Lisp_Object Qterminal_live_p;
+static Lisp_Object Qdelete_terminal_functions;
 
 static void delete_initial_terminal (struct terminal *);
 
@@ -121,9 +123,9 @@ raw_cursor_to (struct frame *f, int row, int col)
     (*FRAME_TERMINAL (f)->raw_cursor_to_hook) (f, row, col);
 }
 
-/* Erase operations */
+/* Erase operations */
 
-/* Clear from cursor to end of frame. */
+/* Clear from cursor to end of frame.  */
 void
 clear_to_end (struct frame *f)
 {
@@ -131,7 +133,7 @@ clear_to_end (struct frame *f)
     (*FRAME_TERMINAL (f)->clear_to_end_hook) (f);
 }
 
-/* Clear entire frame */
+/* Clear entire frame */
 
 void
 clear_frame (struct frame *f)
@@ -194,49 +196,81 @@ ins_del_lines (struct frame *f, int vpos, int n)
     (*FRAME_TERMINAL (f)->ins_del_lines_hook) (f, vpos, n);
 }
 
+/* Return the terminal object specified by TERMINAL.  TERMINAL may
+   be a terminal object, a frame, or nil for the terminal device of
+   the current frame.  If TERMINAL is neither from the above or the
+   resulting terminal object is deleted, return NULL.  */
 
-\f
-
-/* Return the terminal object specified by TERMINAL.  TERMINAL may be
-   a terminal object, a frame, or nil for the terminal device of the
-   current frame.  If THROW is false, return NULL for failure,
-   otherwise throw an error.  */
-
-struct terminal *
-get_terminal (Lisp_Object terminal, bool throw)
+static struct terminal *
+decode_terminal (Lisp_Object terminal)
 {
-  struct terminal *result = NULL;
+  struct terminal *t;
 
   if (NILP (terminal))
     terminal = selected_frame;
+  t = (TERMINALP (terminal)
+       ? XTERMINAL (terminal)
+       : FRAMEP (terminal) ? FRAME_TERMINAL (XFRAME (terminal)) : NULL);
+  return t && t->name ? t : NULL;
+}
 
-  if (TERMINALP (terminal))
-    result = XTERMINAL (terminal);
-  else if (FRAMEP (terminal))
-    result = FRAME_TERMINAL (XFRAME (terminal));
+/* Like above, but throw an error if TERMINAL is not valid or deleted.  */
 
-  if (result && !result->name)
-    result = NULL;
+struct terminal *
+decode_live_terminal (Lisp_Object terminal)
+{
+  struct terminal *t = decode_terminal (terminal);
 
-  if (result == NULL && throw)
+  if (!t)
     wrong_type_argument (Qterminal_live_p, terminal);
+  return t;
+}
+
+/* Like decode_terminal, but ensure that the resulting terminal object refers
+   to a text-based terminal device.  */
+
+struct terminal *
+decode_tty_terminal (Lisp_Object terminal)
+{
+  struct terminal *t = decode_live_terminal (terminal);
 
-  return result;
+  return (t->type == output_termcap || t->type == output_msdos_raw) ? t : NULL;
 }
 
-\f
+/* Return an active (not suspended) text-based terminal device that uses
+   the tty device with the given NAME, or NULL if the named terminal device
+   is not opened.  */
+
+struct terminal *
+get_named_terminal (const char *name)
+{
+  struct terminal *t;
+
+  eassert (name);
+
+  for (t = terminal_list; t; t = t->next_terminal)
+    {
+      if ((t->type == output_termcap || t->type == output_msdos_raw)
+          && !strcmp (t->display_info.tty->name, name)
+          && TERMINAL_ACTIVE_P (t))
+        return t;
+    }
+  return NULL;
+}
 
-/* Create a new terminal object and add it to the terminal list. */
+/* Create a new terminal object of TYPE and add it to the terminal list.  RIF
+   may be NULL if this terminal type doesn't support window-based redisplay.  */
 
 struct terminal *
-create_terminal (void)
+create_terminal (enum output_method type, struct redisplay_interface *rif)
 {
   struct terminal *terminal = allocate_terminal ();
   Lisp_Object terminal_coding, keyboard_coding;
 
   terminal->next_terminal = terminal_list;
   terminal_list = terminal;
-
+  terminal->type = type;
+  terminal->rif = rif;
   terminal->id = next_terminal_id++;
 
   terminal->keyboard_coding = xmalloc (sizeof (struct coding_system));
@@ -308,8 +342,6 @@ delete_terminal (struct terminal *terminal)
     }
 }
 
-Lisp_Object Qrun_hook_with_args;
-static Lisp_Object Qdelete_terminal_functions;
 DEFUN ("delete-terminal", Fdelete_terminal, Sdelete_terminal, 0, 2, 0,
        doc: /* Delete TERMINAL by deleting all frames on it and closing the terminal.
 TERMINAL may be a terminal object, a frame, or nil (meaning the
@@ -319,7 +351,7 @@ Normally, you may not delete a display if all other displays are suspended,
 but if the second argument FORCE is non-nil, you may do so. */)
   (Lisp_Object terminal, Lisp_Object force)
 {
-  struct terminal *t = get_terminal (terminal, 0);
+  struct terminal *t = decode_terminal (terminal);
 
   if (!t)
     return Qnil;
@@ -380,9 +412,7 @@ sort of output terminal it uses.  See the documentation of `framep' for
 possible return values.  */)
   (Lisp_Object object)
 {
-  struct terminal *t;
-
-  t = get_terminal (object, 0);
+  struct terminal *t = decode_terminal (object);
 
   if (!t)
     return Qnil;
@@ -429,8 +459,7 @@ TERMINAL may be a terminal object, a frame, or nil (meaning the
 selected frame's terminal). */)
   (Lisp_Object terminal)
 {
-  struct terminal *t
-    = TERMINALP (terminal) ? XTERMINAL (terminal) : get_terminal (terminal, 1);
+  struct terminal *t = decode_live_terminal (terminal);
 
   return t->name ? build_string (t->name) : Qnil;
 }
@@ -467,9 +496,7 @@ TERMINAL can be a terminal object, a frame, or nil (meaning the
 selected frame's terminal).  */)
   (Lisp_Object terminal)
 {
-  struct terminal *t
-    = TERMINALP (terminal) ? XTERMINAL (terminal) : get_terminal (terminal, 1);
-  return Fcopy_alist (t->param_alist);
+  return Fcopy_alist (decode_live_terminal (terminal)->param_alist);
 }
 
 DEFUN ("terminal-parameter", Fterminal_parameter, Sterminal_parameter, 2, 2, 0,
@@ -478,12 +505,8 @@ TERMINAL can be a terminal object, a frame, or nil (meaning the
 selected frame's terminal).  */)
   (Lisp_Object terminal, Lisp_Object parameter)
 {
-  Lisp_Object value;
-  struct terminal *t
-    = TERMINALP (terminal) ? XTERMINAL (terminal) : get_terminal (terminal, 1);
   CHECK_SYMBOL (parameter);
-  value = Fcdr (Fassq (parameter, t->param_alist));
-  return value;
+  return Fcdr (Fassq (parameter, decode_live_terminal (terminal)->param_alist));
 }
 
 DEFUN ("set-terminal-parameter", Fset_terminal_parameter,
@@ -495,9 +518,7 @@ TERMINAL can be a terminal object, a frame or nil (meaning the
 selected frame's terminal).  */)
   (Lisp_Object terminal, Lisp_Object parameter, Lisp_Object value)
 {
-  struct terminal *t
-    = TERMINALP (terminal) ? XTERMINAL (terminal) : get_terminal (terminal, 1);
-  return store_terminal_param (t, parameter, value);
+  return store_terminal_param (decode_live_terminal (terminal), parameter, value);
 }
 
 /* Initial frame has no device-dependent output data, but has
@@ -519,13 +540,12 @@ init_initial_terminal (void)
   if (initialized || terminal_list || tty_list)
     emacs_abort ();
 
-  initial_terminal = create_terminal ();
-  initial_terminal->type = output_initial;
+  initial_terminal = create_terminal (output_initial, NULL);
   initial_terminal->name = xstrdup ("initial_terminal");
   initial_terminal->kboard = initial_kboard;
   initial_terminal->delete_terminal_hook = &delete_initial_terminal;
   initial_terminal->delete_frame_hook = &initial_free_frame_resources;
-  /* All other hooks are NULL. */
+  /* Other hooks are NULL by default.  */
 
   return initial_terminal;
 }
index bd09304ba3b661c61f6411b8c4c089f1898dcd3d..91ade8ae2984f283209de5e2784d376f675b7a8f 100644 (file)
@@ -660,6 +660,7 @@ get_char_property_and_overlay (Lisp_Object position, register Lisp_Object prop,
 
       set_buffer_temp (XBUFFER (object));
 
+      USE_SAFE_ALLOCA;
       GET_OVERLAYS_AT (XINT (position), overlay_vec, noverlays, NULL, 0);
       noverlays = sort_overlays (overlay_vec, noverlays, w);
 
@@ -674,9 +675,11 @@ get_char_property_and_overlay (Lisp_Object position, register Lisp_Object prop,
              if (overlay)
                /* Return the overlay we got the property from.  */
                *overlay = overlay_vec[noverlays];
+             SAFE_FREE ();
              return tem;
            }
        }
+      SAFE_FREE ();
     }
 
   if (overlay)
@@ -1314,9 +1317,11 @@ specify the property to add.
 If the optional fifth argument OBJECT is a buffer (or nil, which means
 the current buffer), START and END are buffer positions (integers or
 markers).  If OBJECT is a string, START and END are 0-based indices into it.  */)
-  (Lisp_Object start, Lisp_Object end, Lisp_Object property, Lisp_Object value, Lisp_Object object)
+  (Lisp_Object start, Lisp_Object end, Lisp_Object property,
+   Lisp_Object value, Lisp_Object object)
 {
-  Fadd_text_properties (start, end, list2 (property, value), object);
+  AUTO_LIST2 (properties, property, value);
+  Fadd_text_properties (start, end, properties, object);
   return Qnil;
 }
 
@@ -1357,7 +1362,8 @@ into it.  */)
   (Lisp_Object start, Lisp_Object end, Lisp_Object face,
    Lisp_Object append, Lisp_Object object)
 {
-  add_text_properties_1 (start, end, list2 (Qface, face), object,
+  AUTO_LIST2 (properties, Qface, face);
+  add_text_properties_1 (start, end, properties, object,
                         (NILP (append)
                          ? TEXT_PROPERTY_PREPEND
                          : TEXT_PROPERTY_APPEND));
@@ -1906,7 +1912,8 @@ text_property_stickiness (Lisp_Object prop, Lisp_Object pos, Lisp_Object buffer)
 /* Note this can GC when DEST is a buffer.  */
 
 Lisp_Object
-copy_text_properties (Lisp_Object start, Lisp_Object end, Lisp_Object src, Lisp_Object pos, Lisp_Object dest, Lisp_Object prop)
+copy_text_properties (Lisp_Object start, Lisp_Object end, Lisp_Object src,
+                     Lisp_Object pos, Lisp_Object dest, Lisp_Object prop)
 {
   INTERVAL i;
   Lisp_Object res;
@@ -1959,12 +1966,10 @@ copy_text_properties (Lisp_Object start, Lisp_Object end, Lisp_Object src, Lisp_
            plist = Fcdr (Fcdr (plist));
          }
       if (! NILP (plist))
-       {
-         /* Must defer modifications to the interval tree in case src
-            and dest refer to the same string or buffer.  */
-         stuff = Fcons (list3 (make_number (p), make_number (p + len), plist),
-                        stuff);
-       }
+       /* Must defer modifications to the interval tree in case
+          src and dest refer to the same string or buffer.  */
+       stuff = Fcons (list3 (make_number (p), make_number (p + len), plist),
+                      stuff);
 
       i = next_interval (i);
       if (!i)
index 043f3348d16ba935849b920508f936f309237a09..0e47bdd86562dd7d791867cb46c4b4fce75389ff 100644 (file)
@@ -122,7 +122,7 @@ static int pagemask;
    into an int which is the number of a byte.
    This is a no-op on ordinary machines, but not on all.  */
 
-#define ADDR_CORRECT(x) ((char *)(x) - (char*)0)
+#define ADDR_CORRECT(x) ((char *) (x) - (char *) 0)
 
 #include "lisp.h"
 
index fcca5e5cbf201c3169738d7fe7db3b3480736d0d..cdeb899fd30034c8ee6bb48b3da0ab5fe40d3fd8 100644 (file)
@@ -34,12 +34,6 @@ extern void report_sheap_usage (int);
 
 extern int bss_sbrk_did_unexec;
 
-extern int __malloc_initialized;
-
-/* emacs symbols that indicate where bss and data end for emacs internals */
-extern char my_endbss[];
-extern char my_edata[];
-
 /*
 ** header for Windows executable files
 */
@@ -81,8 +75,7 @@ read_exe_header (int fd, exe_header_t * exe_header_buffer)
 #endif
   assert (exe_header_buffer->file_header.f_nscns > 0);
   assert (exe_header_buffer->file_header.f_nscns <=
-         sizeof (exe_header_buffer->section_header) /
-         sizeof (exe_header_buffer->section_header[0]));
+          ARRAYELTS (exe_header_buffer->section_header));
   assert (exe_header_buffer->file_header.f_opthdr > 0);
 
   ret =
@@ -234,12 +227,9 @@ fixup_executable (int fd)
            lseek (fd, (long) (exe_header->section_header[i].s_scnptr),
                   SEEK_SET);
          assert (ret != -1);
-         /* force the dumped emacs to reinitialize malloc */
-         __malloc_initialized = 0;
          ret =
            write (fd, (char *) start_address,
                   my_endbss - (char *) start_address);
-         __malloc_initialized = 1;
          assert (ret == (my_endbss - (char *) start_address));
          if (debug_unexcw)
            printf ("         .bss, mem start %#lx mem length %d\n",
@@ -286,13 +276,6 @@ unexec (const char *outfile, const char *infile)
   int ret;
   int ret2;
 
-  if (bss_sbrk_did_unexec)
-    {
-      /* can only dump once */
-      printf ("You can only dump Emacs once on this platform.\n");
-      return;
-    }
-
   report_sheap_usage (1);
 
   infile = add_exe_suffix_if_necessary (infile, infile_buffer);
index 55db8071b76a7ff642c0331919fe4c7aa03302d0..cbf1835b9eefae6e233180088a717aeff4b183a7 100644 (file)
@@ -72,7 +72,6 @@ run_time_remap (char *ignored)
 
 #undef roundup
 #define roundup(x,n) (((x) + ((n) - 1)) & ~((n) - 1))  /* n is power of 2 */
-#define min(x,y)  (((x) < (y)) ? (x) : (y))
 
 /* Report a fatal error and exit.  */
 static _Noreturn void
index 7d4762fdab2fe3ccc7e5358d86228381491566bd..2e1ac880d2a94b5ba3d078044f87babdc873bdce 100644 (file)
@@ -107,9 +107,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <mach/mach.h>
 #include <mach-o/loader.h>
 #include <mach-o/reloc.h>
-#if defined (__ppc__)
-#include <mach-o/ppc/reloc.h>
-#endif
 #ifdef HAVE_MALLOC_MALLOC_H
 #include <malloc/malloc.h>
 #else
@@ -826,7 +823,6 @@ copy_data_segment (struct load_command *lc)
         file.  */
       if (strncmp (sectp->sectname, SECT_DATA, 16) == 0)
        {
-         extern char my_edata[];
          unsigned long my_size;
 
          /* The __data section is basically dumped from memory.  But
@@ -857,7 +853,6 @@ copy_data_segment (struct load_command *lc)
        }
       else if (strncmp (sectp->sectname, SECT_BSS, 16) == 0)
        {
-         extern char *my_endbss_static;
          unsigned long my_size;
 
          sectp->flags = S_REGULAR;
@@ -881,6 +876,27 @@ copy_data_segment (struct load_command *lc)
          if (!unexec_write (header_offset, sectp, sizeof (struct section)))
            unexec_error ("cannot write section %.16s's header", sectp->sectname);
        }
+      else if (strncmp (sectp->sectname, "__bss", 5) == 0
+              || strncmp (sectp->sectname, "__pu_bss", 8) == 0)
+       {
+         sectp->flags = S_REGULAR;
+
+         /* These sections are produced by GCC 4.6+.
+
+            FIXME: We possibly ought to clear uninitialized local
+            variables in statically linked libraries like for
+            SECT_BSS (__bss) above, but setting up the markers we
+            need in lastfile.c would be rather messy. See
+            darwin_output_aligned_bss () in gcc/config/darwin.c for
+            the root of the problem, keeping in mind that the
+            sections are numbered by their alignment in GCC 4.6, but
+            by log2(alignment) in GCC 4.7. */
+
+         if (!unexec_write (sectp->offset, (void *) sectp->addr, sectp->size))
+           unexec_error ("cannot copy section %.16s", sectp->sectname);
+         if (!unexec_write (header_offset, sectp, sizeof (struct section)))
+           unexec_error ("cannot write section %.16s's header", sectp->sectname);
+       }
       else if (strncmp (sectp->sectname, "__la_symbol_ptr", 16) == 0
               || strncmp (sectp->sectname, "__nl_symbol_ptr", 16) == 0
               || strncmp (sectp->sectname, "__got", 16) == 0
@@ -892,6 +908,7 @@ copy_data_segment (struct load_command *lc)
               || strncmp (sectp->sectname, "__program_vars", 16) == 0
               || strncmp (sectp->sectname, "__mod_init_func", 16) == 0
               || strncmp (sectp->sectname, "__mod_term_func", 16) == 0
+              || strncmp (sectp->sectname, "__static_data", 16) == 0
               || strncmp (sectp->sectname, "__objc_", 7) == 0)
        {
          if (!unexec_copy (sectp->offset, old_file_offset, sectp->size))
@@ -1013,17 +1030,8 @@ unrelocate (const char *name, off_t reloff, int nrel, vm_address_t base)
                          name, i, reloc_info.r_type);
          }
       else
-       switch (sc_reloc_info->r_type)
-         {
-#if defined (__ppc__)
-         case PPC_RELOC_PB_LA_PTR:
-           /* nothing to do for prebound lazy pointer */
-           break;
-#endif
-         default:
-           unexec_error ("unrelocate: %s:%d cannot handle scattered type = %d",
-                         name, i, sc_reloc_info->r_type);
-         }
+        unexec_error ("unrelocate: %s:%d cannot handle scattered type = %d",
+                      name, i, sc_reloc_info->r_type);
     }
 
   if (nrel > 0)
@@ -1031,35 +1039,6 @@ unrelocate (const char *name, off_t reloff, int nrel, vm_address_t base)
            unreloc_count, nrel, name);
 }
 
-#if __ppc64__
-/* Rebase r_address in the relocation table.  */
-static void
-rebase_reloc_address (off_t reloff, int nrel, long linkedit_delta, long diff)
-{
-  int i;
-  struct relocation_info reloc_info;
-  struct scattered_relocation_info *sc_reloc_info
-    = (struct scattered_relocation_info *) &reloc_info;
-
-  for (i = 0; i < nrel; i++, reloff += sizeof (reloc_info))
-    {
-      if (lseek (infd, reloff - linkedit_delta, L_SET)
-         != reloff - linkedit_delta)
-       unexec_error ("rebase_reloc_table: cannot seek to reloc_info");
-      if (!unexec_read (&reloc_info, sizeof (reloc_info)))
-       unexec_error ("rebase_reloc_table: cannot read reloc_info");
-
-      if (sc_reloc_info->r_scattered == 0
-         && reloc_info.r_type == GENERIC_RELOC_VANILLA)
-       {
-         reloc_info.r_address -= diff;
-         if (!unexec_write (reloff, &reloc_info, sizeof (reloc_info)))
-           unexec_error ("rebase_reloc_table: cannot write reloc_info");
-       }
-    }
-}
-#endif
-
 /* Copy a LC_DYSYMTAB load command from the input file to the output
    file, adjusting the file offset fields.  */
 static void
@@ -1069,28 +1048,8 @@ copy_dysymtab (struct load_command *lc, long delta)
   vm_address_t base;
 
 #ifdef _LP64
-#if __ppc64__
-  {
-    int i;
-
-    base = 0;
-    for (i = 0; i < nlc; i++)
-      if (lca[i]->cmd == LC_SEGMENT)
-       {
-         struct segment_command *scp = (struct segment_command *) lca[i];
-
-         if (scp->vmaddr + scp->vmsize > 0x100000000
-             && (scp->initprot & VM_PROT_WRITE) != 0)
-           {
-             base = data_segment_scp->vmaddr;
-             break;
-           }
-       }
-  }
-#else
   /* First writable segment address.  */
   base = data_segment_scp->vmaddr;
-#endif
 #else
   /* First segment address in the file (unless MH_SPLIT_SEGS set). */
   base = 0;
@@ -1116,29 +1075,6 @@ copy_dysymtab (struct load_command *lc, long delta)
     unexec_error ("cannot write symtab command to header");
 
   curr_header_offset += lc->cmdsize;
-
-#if __ppc64__
-  /* Check if the relocation base needs to be changed.  */
-  if (base == 0)
-    {
-      vm_address_t newbase = 0;
-      int i;
-
-      for (i = 0; i < num_unexec_regions; i++)
-       if (unexec_regions[i].range.address + unexec_regions[i].range.size
-           > 0x100000000)
-         {
-           newbase = data_segment_scp->vmaddr;
-           break;
-         }
-
-      if (newbase)
-       {
-         rebase_reloc_address (dstp->locreloff, dstp->nlocrel, delta, newbase);
-         rebase_reloc_address (dstp->extreloff, dstp->nextrel, delta, newbase);
-       }
-    }
-#endif
 }
 
 /* Copy a LC_TWOLEVEL_HINTS load command from the input file to the output
index f70cdd794784db778a64b01b678b5c2c350d18d8..5c1c1f3f391bbd375df74cfd3bd84e6bfecb6b02 100644 (file)
@@ -43,19 +43,11 @@ PIMAGE_NT_HEADERS
 extern BOOL ctrl_c_handler (unsigned long type);
 
 extern char my_begdata[];
-extern char my_edata[];
 extern char my_begbss[];
-extern char my_endbss[];
 extern char *my_begbss_static;
-extern char *my_endbss_static;
 
 #include "w32heap.h"
 
-#undef min
-#undef max
-#define min(x, y) (((x) < (y)) ? (x) : (y))
-#define max(x, y) (((x) > (y)) ? (x) : (y))
-
 /* Basically, our "initialized" flag.  */
 BOOL using_dynamic_heap = FALSE;
 
@@ -83,8 +75,6 @@ PCHAR  bss_start_static = 0;
 DWORD_PTR  bss_size_static = 0;
 DWORD_PTR  extra_bss_size_static = 0;
 
-PIMAGE_SECTION_HEADER heap_section;
-
 /* MinGW64 doesn't add a leading underscore to external symbols,
    whereas configure.ac sets up LD_SWITCH_SYSTEM_TEMACS to force the
    entry point at __start, with two underscores.  */
@@ -475,8 +465,6 @@ get_section_info (file_data *p_infile)
       bss_section_static = 0;
       extra_bss_size_static = 0;
     }
-
-  heap_section = rva_to_section (PTR_TO_RVA (get_heap_start ()), nt_header);
 }
 
 
@@ -518,9 +506,11 @@ copy_executable_and_dump_data (file_data *p_infile,
     if (verbose)                                                               \
       {                                                                                \
        printf ("%s\n", (message));                                             \
-       printf ("\t0x%08x Address in process.\n", s);                           \
-       printf ("\t0x%08x Offset in output file.\n", dst - p_outfile->file_base); \
-       printf ("\t0x%08x Size in bytes.\n", count);                            \
+       printf ("\t0x%p Address in process.\n", s);                             \
+       printf ("\t0x%p Base       output file.\n", p_outfile->file_base); \
+       printf ("\t0x%p Offset  in output file.\n", dst - p_outfile->file_base); \
+       printf ("\t0x%p Address in output file.\n", dst); \
+       printf ("\t0x%p Size in bytes.\n", count);                              \
       }                                                                                \
     memcpy (dst, s, count);                                                    \
     dst += count;                                                              \
@@ -629,34 +619,6 @@ copy_executable_and_dump_data (file_data *p_infile,
          dst_section->Characteristics &= ~IMAGE_SCN_CNT_UNINITIALIZED_DATA;
          dst_section->Characteristics |= IMAGE_SCN_CNT_INITIALIZED_DATA;
        }
-      if (section == heap_section)
-       {
-         DWORD_PTR heap_start = (DWORD_PTR) get_heap_start ();
-         DWORD_PTR heap_size = get_committed_heap_size ();
-
-         /* Dump the used portion of the predump heap, adjusting the
-             section's size to the appropriate size.  */
-         dst = dst_save
-           + RVA_TO_SECTION_OFFSET (PTR_TO_RVA (heap_start), dst_section);
-         COPY_PROC_CHUNK ("Dumping heap...", heap_start, heap_size,
-                          be_verbose);
-         ROUND_UP_DST (dst_nt_header->OptionalHeader.FileAlignment);
-         dst_section->PointerToRawData = PTR_TO_OFFSET (dst_save, p_outfile);
-         /* Determine new size of raw data area.  */
-         dst = max (dst, dst_save + dst_section->SizeOfRawData);
-         dst_section->SizeOfRawData = dst - dst_save;
-         /* Reduce the size of the heap section to fit (must be last
-             section).  */
-         dst_nt_header->OptionalHeader.SizeOfImage -=
-           dst_section->Misc.VirtualSize
-           - ROUND_UP (dst_section->SizeOfRawData,
-                       dst_nt_header->OptionalHeader.SectionAlignment);
-         dst_section->Misc.VirtualSize =
-           ROUND_UP (dst_section->SizeOfRawData,
-                     dst_nt_header->OptionalHeader.SectionAlignment);
-         dst_section->Characteristics &= ~IMAGE_SCN_CNT_UNINITIALIZED_DATA;
-         dst_section->Characteristics |= IMAGE_SCN_CNT_INITIALIZED_DATA;
-       }
 
       /* Align the section's raw data area.  */
       ROUND_UP_DST (dst_nt_header->OptionalHeader.FileAlignment);
@@ -758,6 +720,10 @@ unexec (const char *new_name, const char *old_name)
     abort ();
   strcpy (p, q);
 
+#ifdef ENABLE_CHECKING
+  report_temacs_memory_usage ();
+#endif
+
   /* Make sure that the output filename has the ".exe" extension...patch
      it up if not.  */
   p = out_filename + strlen (out_filename) - 4;
@@ -767,9 +733,6 @@ unexec (const char *new_name, const char *old_name)
   printf ("Dumping from %s\n", in_filename);
   printf ("          to %s\n", out_filename);
 
-  /* We need to round off our heap to NT's page size.  */
-  round_heap (get_page_size ());
-
   /* Open the undumped executable file.  */
   if (!open_input_file (&in_file, in_filename))
     {
@@ -784,7 +747,6 @@ unexec (const char *new_name, const char *old_name)
   /* The size of the dumped executable is the size of the original
      executable plus the size of the heap and the size of the .bss section.  */
   size = in_file.size +
-    get_committed_heap_size () +
     extra_bss_size +
     extra_bss_size_static;
   if (!open_output_file (&out_file, out_filename, size))
@@ -799,6 +761,10 @@ unexec (const char *new_name, const char *old_name)
 
   copy_executable_and_dump_data (&in_file, &out_file);
 
+  /* Unset it because it is plain wrong to keep it after dumping.
+     Malloc can still occur!  */
+  using_dynamic_heap = FALSE;
+
   /* Patch up header fields; profiler is picky about this. */
   {
     PIMAGE_DOS_HEADER dos_header;
index bad1d61e6119b6c6e1ebb6454c0e8f23dde58789..015f3ee2111cc780e8b4a75ba34f0318dd720589 100644 (file)
@@ -21,7 +21,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "lisp.h"
 
 #ifdef MSDOS
-#include <dpmi.h>
+#include "dosfns.h"
 extern int etext;
 #endif
 
@@ -51,6 +51,15 @@ char data_start[1] = { 1 };
 # endif
 #endif
 
+/* From gmalloc.c.  */
+extern void (* __after_morecore_hook) (void);
+extern void *(*__morecore) (ptrdiff_t);
+
+/* From ralloc.c.  */
+#ifdef REL_ALLOC
+extern void *(*real_morecore) (ptrdiff_t);
+#endif
+
 /*
   Level number of warnings already issued.
   0 -- no warnings issued.
@@ -71,15 +80,6 @@ static char *data_space_start;
 /* Number of bytes of writable memory we can expect to be able to get.  */
 static size_t lim_data;
 \f
-/* Return true if PTR cannot be represented as an Emacs Lisp object.  */
-static bool
-exceeds_lisp_ptr (void *ptr)
-{
-  return (! USE_LSB_TAG
-         && VAL_MAX < UINTPTR_MAX
-         && ((uintptr_t) ptr & ~DATA_SEG_BITS) >> VALBITS != 0);
-}
-
 #ifdef HAVE_GETRLIMIT
 
 # ifndef RLIMIT_AS
@@ -115,29 +115,10 @@ get_lim_data (void)
 void
 get_lim_data (void)
 {
-  _go32_dpmi_meminfo info;
-  unsigned long lim1, lim2;
-
-  _go32_dpmi_get_free_memory_information (&info);
-  /* DPMI server of Windows NT and its descendants reports in
-     info.available_memory a much lower amount that is really
-     available, which causes bogus "past 95% of memory limit"
-     warnings.  Try to overcome that via circumstantial evidence.  */
-  lim1 = info.available_memory;
-  lim2 = info.available_physical_pages;
-  /* DPMI Spec: "Fields that are unavailable will hold -1."  */
-  if ((long)lim1 == -1L)
-    lim1 = 0;
-  if ((long)lim2 == -1L)
-    lim2 = 0;
-  else
-    lim2 *= 4096;
-  /* Surely, the available memory is at least what we have physically
-     available, right?  */
-  if (lim1 >= lim2)
-    lim_data = lim1;
-  else
-    lim_data = lim2;
+  unsigned long totalram, freeram, totalswap, freeswap;
+
+  dos_memory_info (&totalram, &freeram, &totalswap, &freeswap);
+  lim_data = freeram;
   /* Don't believe they will give us more that 0.5 GB.   */
   if (lim_data > 512U * 1024U * 1024U)
     lim_data = 512U * 1024U * 1024U;
@@ -158,12 +139,9 @@ ret_lim_data (void)
 static void
 check_memory_limits (void)
 {
-#ifdef REL_ALLOC
-  extern void *(*real_morecore) (ptrdiff_t);
-#else
+#ifndef REL_ALLOC
   void *(*real_morecore) (ptrdiff_t) = 0;
 #endif
-  extern void *(*__morecore) (ptrdiff_t);
 
   char *cp;
   size_t five_percent;
@@ -222,9 +200,6 @@ check_memory_limits (void)
       else if (warnlevel > warned_85 && data_size < five_percent * 18)
        warnlevel = warned_85;
     }
-
-  if (exceeds_lisp_ptr (cp))
-    (*warn_function) ("Warning: memory in use exceeds lisp pointer size");
 }
 \f
 /* Enable memory usage warnings.
@@ -234,8 +209,6 @@ check_memory_limits (void)
 void
 memory_warnings (void *start, void (*warnfun) (const char *))
 {
-  extern void (* __after_morecore_hook) (void);     /* From gmalloc.c */
-
   data_space_start = start ? start : data_start;
 
   warn_function = warnfun;
index aba0b5a81f9a04c4c08f86a44aa8ca850af200d9..f014cd73a767b9e6a997b9a7d89e421c0692d8da 100644 (file)
--- a/src/w32.c
+++ b/src/w32.c
@@ -73,9 +73,11 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <grp.h>
 
 /* MinGW64 (_W64) defines these in its _mingw.h.  */
-#if defined(__GNUC__) && !defined(_W64)
-#define _ANONYMOUS_UNION
-#define _ANONYMOUS_STRUCT
+#ifndef _ANONYMOUS_UNION
+# define _ANONYMOUS_UNION
+#endif
+#ifndef _ANONYMOUS_STRUCT
+# define _ANONYMOUS_STRUCT
 #endif
 #include <windows.h>
 /* Some versions of compiler define MEMORYSTATUSEX, some don't, so we
@@ -307,6 +309,8 @@ static BOOL g_b_init_set_named_security_info_w;
 static BOOL g_b_init_set_named_security_info_a;
 static BOOL g_b_init_get_adapters_info;
 
+BOOL g_b_init_compare_string_w;
+
 /*
   BEGIN: Wrapper functions around OpenProcessToken
   and other functions in advapi32.dll that are only
@@ -880,7 +884,7 @@ set_named_security_info (LPCTSTR lpObjectName,
          g_b_init_set_named_security_info_a = 1;
          hm_advapi32 = LoadLibrary ("Advapi32.dll");
          s_pfn_Set_Named_Security_InfoA =
-           (SetNamedSecurityInfoA_Proc) GetProcAddress (hm_advapi32, 
+           (SetNamedSecurityInfoA_Proc) GetProcAddress (hm_advapi32,
                                                         "SetNamedSecurityInfoA");
        }
       if (s_pfn_Set_Named_Security_InfoA == NULL)
@@ -1707,7 +1711,7 @@ static unsigned num_of_processors;
 /* We maintain 1-sec samples for the last 16 minutes in a circular buffer.  */
 static struct load_sample samples[16*60];
 static int first_idx = -1, last_idx = -1;
-static int max_idx = sizeof (samples) / sizeof (samples[0]);
+static int max_idx = ARRAYELTS (samples);
 
 static int
 buf_next (int from)
@@ -2290,7 +2294,7 @@ get_long_basename (char * name, char * buf, int size)
 
 /* Get long name for file, if possible (assumed to be absolute).  */
 BOOL
-w32_get_long_filename (char * name, char * buf, int size)
+w32_get_long_filename (const char * name, char * buf, int size)
 {
   char * o = buf;
   char * p;
@@ -2341,7 +2345,7 @@ w32_get_long_filename (char * name, char * buf, int size)
 }
 
 unsigned int
-w32_get_short_filename (char * name, char * buf, int size)
+w32_get_short_filename (const char * name, char * buf, int size)
 {
   if (w32_unicode_filenames)
     {
@@ -2415,7 +2419,6 @@ unsetenv (const char *name)
 {
   char *var;
   size_t name_len;
-  int retval;
 
   if (name == NULL || *name == '\0' || strchr (name, '=') != NULL)
     {
@@ -2514,7 +2517,7 @@ init_environment (char ** argv)
 
   int i;
 
-  const int imax = sizeof (tempdirs) / sizeof (tempdirs[0]);
+  const int imax = ARRAYELTS (tempdirs);
 
   /* Implementation note: This function explicitly works with ANSI
      file names, not with UTF-8 encoded file names.  This is because
@@ -2587,7 +2590,7 @@ init_environment (char ** argv)
       {"LANG", NULL},
     };
 
-#define N_ENV_VARS sizeof (dflt_envvars)/sizeof (dflt_envvars[0])
+#define N_ENV_VARS ARRAYELTS (dflt_envvars)
 
     /* We need to copy dflt_envvars[] and work on the copy because we
        don't want the dumped Emacs to inherit the values of
@@ -6956,6 +6959,35 @@ system_process_attributes (Lisp_Object pid)
   return attrs;
 }
 
+int
+w32_memory_info (unsigned long long *totalram, unsigned long long *freeram,
+                unsigned long long *totalswap, unsigned long long *freeswap)
+{
+  MEMORYSTATUS memst;
+  MEMORY_STATUS_EX memstex;
+
+  /* Use GlobalMemoryStatusEx if available, as it can report more than
+     2GB of memory.  */
+  if (global_memory_status_ex (&memstex))
+    {
+      *totalram  = memstex.ullTotalPhys;
+      *freeram   = memstex.ullAvailPhys;
+      *totalswap = memstex.ullTotalPageFile;
+      *freeswap  = memstex.ullAvailPageFile;
+      return 0;
+    }
+  else if (global_memory_status (&memst))
+    {
+      *totalram = memst.dwTotalPhys;
+      *freeram   = memst.dwAvailPhys;
+      *totalswap = memst.dwTotalPageFile;
+      *freeswap  = memst.dwAvailPageFile;
+      return 0;
+    }
+  else
+    return -1;
+}
+
 \f
 /* Wrappers for  winsock functions to map between our file descriptors
    and winsock's handles; also set h_errno for convenience.
@@ -7860,7 +7892,7 @@ pipe2 (int * phandles, int pipe2_flags)
   int rc;
   unsigned flags;
 
-  eassert (pipe2_flags == O_CLOEXEC);
+  eassert (pipe2_flags == (O_BINARY | O_CLOEXEC));
 
   /* make pipe handles non-inheritable; when we spawn a child, we
      replace the relevant handle with an inheritable one.  Also put
@@ -8233,6 +8265,7 @@ int
 sys_write (int fd, const void * buffer, unsigned int count)
 {
   int nchars;
+  USE_SAFE_ALLOCA;
 
   if (fd < 0)
     {
@@ -8251,30 +8284,33 @@ sys_write (int fd, const void * buffer, unsigned int count)
       /* Perform text mode translation if required.  */
       if ((fd_info[fd].flags & FILE_BINARY) == 0)
        {
-         char * tmpbuf = alloca (count * 2);
-         unsigned char * src = (void *)buffer;
-         unsigned char * dst = tmpbuf;
+         char * tmpbuf;
+         const unsigned char * src = buffer;
+         unsigned char * dst;
          int nbytes = count;
 
+         SAFE_NALLOCA (tmpbuf, 2, count);
+         dst = tmpbuf;
+
          while (1)
            {
              unsigned char *next;
-             /* copy next line or remaining bytes */
+             /* Copy next line or remaining bytes.  */
              next = _memccpy (dst, src, '\n', nbytes);
              if (next)
                {
-                 /* copied one line ending with '\n' */
+                 /* Copied one line ending with '\n'.  */
                  int copied = next - dst;
                  nbytes -= copied;
                  src += copied;
-                 /* insert '\r' before '\n' */
+                 /* Insert '\r' before '\n'.  */
                  next[-1] = '\r';
                  next[0] = '\n';
                  dst = next + 1;
                  count++;
                }
              else
-               /* copied remaining partial line -> now finished */
+               /* Copied remaining partial line -> now finished.  */
                break;
            }
          buffer = tmpbuf;
@@ -8288,31 +8324,44 @@ sys_write (int fd, const void * buffer, unsigned int count)
       HANDLE wait_hnd[2] = { interrupt_handle, ovl->hEvent };
       DWORD active = 0;
 
+      /* This is async (a.k.a. "overlapped") I/O, so the return value
+        of FALSE from WriteFile means either an error or the output
+        will be completed asynchronously (ERROR_IO_PENDING).  */
       if (!WriteFile (hnd, buffer, count, (DWORD*) &nchars, ovl))
        {
          if (GetLastError () != ERROR_IO_PENDING)
            {
              errno = EIO;
-             return -1;
+             nchars = -1;
            }
-         if (detect_input_pending ())
-           active = MsgWaitForMultipleObjects (2, wait_hnd, FALSE, INFINITE,
-                                               QS_ALLINPUT);
          else
-           active = WaitForMultipleObjects (2, wait_hnd, FALSE, INFINITE);
-         if (active == WAIT_OBJECT_0)
-           { /* User pressed C-g, cancel write, then leave.  Don't bother
-                cleaning up as we may only get stuck in buggy drivers.  */
-             PurgeComm (hnd, PURGE_TXABORT | PURGE_TXCLEAR);
-             CancelIo (hnd);
-             errno = EIO;
-             return -1;
-           }
-         if (active == WAIT_OBJECT_0 + 1
-             && !GetOverlappedResult (hnd, ovl, (DWORD*) &nchars, TRUE))
            {
-             errno = EIO;
-             return -1;
+             /* Wait for the write to complete, and watch C-g while
+                at that.  */
+             if (detect_input_pending ())
+               active = MsgWaitForMultipleObjects (2, wait_hnd, FALSE,
+                                                   INFINITE, QS_ALLINPUT);
+             else
+               active = WaitForMultipleObjects (2, wait_hnd, FALSE, INFINITE);
+             switch (active)
+               {
+               case WAIT_OBJECT_0:
+                 /* User pressed C-g, cancel write, then leave.
+                    Don't bother cleaning up as we may only get stuck
+                    in buggy drivers.  */
+                 PurgeComm (hnd, PURGE_TXABORT | PURGE_TXCLEAR);
+                 CancelIo (hnd);
+                 errno = EIO;  /* Why not EINTR? */
+                 nchars = -1;
+                 break;
+               case WAIT_OBJECT_0 + 1:
+                 if (!GetOverlappedResult (hnd, ovl, (DWORD*) &nchars, TRUE))
+                   {
+                     errno = EIO;
+                     nchars = -1;
+                   }
+                 break;
+               }
            }
        }
     }
@@ -8389,6 +8438,7 @@ sys_write (int fd, const void * buffer, unsigned int count)
        }
     }
 
+  SAFE_FREE ();
   return nchars;
 }
 
@@ -8738,6 +8788,13 @@ w32_delayed_load (Lisp_Object library_id)
                               /* Possibly truncated */
                               ? make_specified_string (name, -1, len, 1)
                               : Qnil);
+               /* This prevents thread start and end notifications
+                  from being sent to the DLL, for every thread we
+                  start.  We don't need those notifications because
+                  threads we create never use any of these DLLs, only
+                  the main thread uses them.  This is supposed to
+                  speed up thread creation.  */
+               DisableThreadLibraryCalls (dll_handle);
                break;
              }
          }
@@ -9071,6 +9128,7 @@ globals_of_w32 (void)
   g_b_init_set_named_security_info_w = 0;
   g_b_init_set_named_security_info_a = 0;
   g_b_init_get_adapters_info = 0;
+  g_b_init_compare_string_w = 0;
   num_of_processors = 0;
   /* The following sets a handler for shutdown notifications for
      console apps. This actually applies to Emacs in both console and
@@ -9290,8 +9348,6 @@ ssize_t
 emacs_gnutls_pull (gnutls_transport_ptr_t p, void* buf, size_t sz)
 {
   int n, err;
-  SELECT_TYPE fdset;
-  struct timespec timeout;
   struct Lisp_Process *process = (struct Lisp_Process *)p;
   int fd = process->infd;
 
index 33fd2709a71eb397d509cfdb964538f598ac96a3..e0aedcbffa21a3c01389575f0960f69614c7693c 100644 (file)
--- a/src/w32.h
+++ b/src/w32.h
@@ -144,10 +144,10 @@ extern char * w32_strerror (int error_no);
 extern int w32_valid_pointer_p (void *, int);
 
 /* Get long (aka "true") form of file name, if it exists.  */
-extern BOOL w32_get_long_filename (char * name, char * buf, int size);
+extern BOOL w32_get_long_filename (const char * name, char * buf, int size);
 
 /* Get the short (a.k.a. "8+3") form of a file name.  */
-extern unsigned int w32_get_short_filename (char *, char *, int);
+extern unsigned int w32_get_short_filename (const char *, char *, int);
 
 /* Prepare our standard handles for proper inheritance by child processes.  */
 extern void prepare_standard_handles (int in, int out,
@@ -206,6 +206,13 @@ extern void register_child (pid_t, int);
 extern void sys_sleep (int);
 extern int sys_link (const char *, const char *);
 
+/* Return total and free memory info.  */
+extern int w32_memory_info (unsigned long long *, unsigned long long *,
+                           unsigned long long *, unsigned long long *);
+
+/* Compare 2 UTF-8 strings in locale-dependent fashion.  */
+extern int w32_compare_strings (const char *, const char *, char *, int);
+
 #ifdef HAVE_GNUTLS
 #include <gnutls/gnutls.h>
 
index e3ca2f86b8da44bd1671a07a18cbb8dc095e103e..82a7c041900cb0cee145ffab529b7b3e78b2aad6 100644 (file)
@@ -36,8 +36,9 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "termhooks.h"
 #include "termchar.h"
 #include "dispextern.h"
+#include "menu.h"      /* for tty_menu_show */
 #include "w32term.h"
-#include "w32common.h" /* for os_subtype */
+#include "w32common.h" /* for os_subtype */
 #include "w32inevt.h"
 
 /* from window.c */
@@ -117,7 +118,7 @@ static void
 w32con_clear_to_end (struct frame *f)
 {
   w32con_clear_end_of_line (f, FRAME_COLS (f) - 1);
-  w32con_ins_del_lines (f, cursor_coords.Y, FRAME_LINES (f) - cursor_coords.Y - 1);
+  w32con_ins_del_lines (f, cursor_coords.Y, FRAME_TOTAL_LINES (f) - cursor_coords.Y - 1);
 }
 
 /* Clear the frame.  */
@@ -132,7 +133,7 @@ w32con_clear_frame (struct frame *f)
   GetConsoleScreenBufferInfo (GetStdHandle (STD_OUTPUT_HANDLE), &info);
 
   /* Remember that the screen buffer might be wider than the window.  */
-  n = FRAME_LINES (f) * info.dwSize.X;
+  n = FRAME_TOTAL_LINES (f) * info.dwSize.X;
   dest.X = dest.Y = 0;
 
   FillConsoleOutputAttribute (cur_screen, char_attr_normal, n, dest, &r);
@@ -174,18 +175,18 @@ w32con_ins_del_lines (struct frame *f, int vpos, int n)
   if (n < 0)
     {
       scroll.Top = vpos - n;
-      scroll.Bottom = FRAME_LINES (f);
+      scroll.Bottom = FRAME_TOTAL_LINES (f);
       dest.Y = vpos;
     }
   else
     {
       scroll.Top = vpos;
-      scroll.Bottom = FRAME_LINES (f) - n;
+      scroll.Bottom = FRAME_TOTAL_LINES (f) - n;
       dest.Y = vpos + n;
     }
   clip.Top = clip.Left = scroll.Left = 0;
   clip.Right = scroll.Right = FRAME_COLS (f);
-  clip.Bottom = FRAME_LINES (f);
+  clip.Bottom = FRAME_TOTAL_LINES (f);
 
   dest.X = 0;
 
@@ -650,11 +651,13 @@ initialize_w32_display (struct terminal *term, int *width, int *height)
 
   term->read_socket_hook = w32_console_read_socket;
   term->mouse_position_hook = w32_console_mouse_position;
+  term->menu_show_hook = tty_menu_show;
 
   /* The following are not used on the console.  */
   term->frame_rehighlight_hook = 0;
   term->frame_raise_lower_hook = 0;
   term->set_vertical_scroll_bar_hook = 0;
+  term->set_horizontal_scroll_bar_hook = 0;
   term->condemn_scroll_bars_hook = 0;
   term->redeem_scroll_bar_hook = 0;
   term->judge_scroll_bars_hook = 0;
index bc95005f52a368d2291cf7d0ddd130c0a7a25590..05da2a5c1d1d60c51229b78ab2202a10d13fca50 100644 (file)
@@ -89,14 +89,10 @@ extern void w32_free_menu_strings (HWND);
 extern const char *map_w32_filename (const char *, const char **);
 extern char * w32_strerror (int error_no);
 
-/* If non-NULL, a handle to a frame where to display the hourglass cursor.  */
-static HWND hourglass_hwnd = NULL;
-
 #ifndef IDC_HAND
 #define IDC_HAND MAKEINTRESOURCE(32649)
 #endif
 
-Lisp_Object Qsuppress_icon;
 Lisp_Object Qundefined_color;
 Lisp_Object Qcancel_timer;
 Lisp_Object Qfont_param;
@@ -228,16 +224,12 @@ static int w32_unicode_gui;
 
 /* From w32menu.c  */
 extern HMENU current_popup_menu;
-static int menubar_in_use = 0;
+int menubar_in_use = 0;
 
 /* From w32uniscribe.c  */
 extern void syms_of_w32uniscribe (void);
 extern int uniscribe_available;
 
-/* Function prototypes for hourglass support.  */
-static void w32_show_hourglass (struct frame *);
-static void w32_hide_hourglass (void);
-
 #ifdef WINDOWSNT
 /* From w32inevt.c */
 extern int faked_key;
@@ -271,9 +263,9 @@ static unsigned int sound_type = 0xFFFFFFFF;
    the first display on the list.  */
 
 struct w32_display_info *
-check_x_display_info (Lisp_Object frame)
+check_x_display_info (Lisp_Object object)
 {
-  if (NILP (frame))
+  if (NILP (object))
     {
       struct frame *sf = XFRAME (selected_frame);
 
@@ -282,14 +274,23 @@ check_x_display_info (Lisp_Object frame)
       else
        return &one_w32_display_info;
     }
-  else if (STRINGP (frame))
-    return x_display_info_for_name (frame);
+  else if (TERMINALP (object))
+    {
+      struct terminal *t = decode_live_terminal (object);
+
+      if (t->type != output_w32)
+        error ("Terminal %d is not a W32 display", t->id);
+
+      return t->display_info.w32;
+    }
+  else if (STRINGP (object))
+    return x_display_info_for_name (object);
   else
     {
       struct frame *f;
 
-      CHECK_LIVE_FRAME (frame);
-      f = XFRAME (frame);
+      CHECK_LIVE_FRAME (object);
+      f = XFRAME (object);
       if (! FRAME_W32_P (f))
        error ("Non-W32 frame used");
       return FRAME_DISPLAY_INFO (f);
@@ -336,8 +337,7 @@ void x_explicitly_set_name (struct frame *, Lisp_Object, Lisp_Object);
 void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
 void x_set_title (struct frame *, Lisp_Object, Lisp_Object);
 void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
-
-
+void x_set_internal_border_width (struct frame *f, Lisp_Object, Lisp_Object);
 \f
 
 /* Store the screen positions of frame F into XPTR and YPTR.
@@ -723,8 +723,7 @@ w32_default_color_map (void)
 
   cmap = Qnil;
 
-  for (i = 0; i < sizeof (w32_color_map) / sizeof (w32_color_map[0]);
-       pc++, i++)
+  for (i = 0; i < ARRAYELTS (w32_color_map); pc++, i++)
     cmap = Fcons (Fcons (build_string (pc->name),
                         make_number (pc->colorref)),
                  cmap);
@@ -1370,23 +1369,23 @@ x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
     {
       CHECK_NUMBER (Vx_window_horizontal_drag_shape);
       horizontal_drag_cursor
-       = XCreateFontCursor (FRAME_X_DISPLAY (f),
+       = XCreateFontCursor (FRAME_W32_DISPLAY (f),
                             XINT (Vx_window_horizontal_drag_shape));
     }
   else
     horizontal_drag_cursor
-      = XCreateFontCursor (FRAME_X_DISPLAY (f), XC_sb_h_double_arrow);
+      = XCreateFontCursor (FRAME_W32_DISPLAY (f), XC_sb_h_double_arrow);
 
   if (!NILP (Vx_window_vertical_drag_shape))
     {
       CHECK_NUMBER (Vx_window_vertical_drag_shape);
       vertical_drag_cursor
-       = XCreateFontCursor (FRAME_X_DISPLAY (f),
+       = XCreateFontCursor (FRAME_W32_DISPLAY (f),
                             XINT (Vx_window_vertical_drag_shape));
     }
   else
     vertical_drag_cursor
-      = XCreateFontCursor (FRAME_X_DISPLAY (f), XC_sb_v_double_arrow);
+      = XCreateFontCursor (FRAME_W32_DISPLAY (f), XC_sb_v_double_arrow);
 
   /* Check and report errors with the above calls.  */
   x_check_errors (FRAME_W32_DISPLAY (f), "can't set cursor shape: %s");
@@ -1608,8 +1607,53 @@ x_set_icon_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
   unblock_input ();
 #endif
 }
-
 \f
+void
+x_clear_under_internal_border (struct frame *f)
+{
+  int border = FRAME_INTERNAL_BORDER_WIDTH (f);
+
+  /* Clear border if it's larger than before.  */
+  if (border != 0)
+    {
+      HDC hdc = get_frame_dc (f);
+      int width = FRAME_PIXEL_WIDTH (f);
+      int height = FRAME_PIXEL_HEIGHT (f);
+
+      block_input ();
+      w32_clear_area (f, hdc, 0, FRAME_TOP_MARGIN_HEIGHT (f), width, border);
+      w32_clear_area (f, hdc, 0, 0, border, height);
+      w32_clear_area (f, hdc, width - border, 0, border, height);
+      w32_clear_area (f, hdc, 0, height - border, width, border);
+      release_frame_dc (f, hdc);
+      unblock_input ();
+    }
+}
+
+
+void
+x_set_internal_border_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
+{
+  int border;
+
+  CHECK_TYPE_RANGED_INTEGER (int, arg);
+  border = max (XINT (arg), 0);
+
+  if (border != FRAME_INTERNAL_BORDER_WIDTH (f))
+    {
+      FRAME_INTERNAL_BORDER_WIDTH (f) = border;
+
+      if (FRAME_X_WINDOW (f) != 0)
+       {
+         adjust_frame_size (f, -1, -1, 3, 0);
+
+         if (FRAME_VISIBLE_P (f))
+           x_clear_under_internal_border (f);
+       }
+    }
+}
+
+
 void
 x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
 {
@@ -1630,7 +1674,10 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
   FRAME_MENU_BAR_LINES (f) = 0;
   FRAME_MENU_BAR_HEIGHT (f) = 0;
   if (nlines)
-    FRAME_EXTERNAL_MENU_BAR (f) = 1;
+    {
+      FRAME_EXTERNAL_MENU_BAR (f) = 1;
+      windows_or_buffers_changed = 23;
+    }
   else
     {
       if (FRAME_EXTERNAL_MENU_BAR (f) == 1)
@@ -1639,11 +1686,16 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
 
       /* Adjust the frame size so that the client (text) dimensions
         remain the same.  This depends on FRAME_EXTERNAL_MENU_BAR being
-        set correctly.  */
-      x_set_window_size (f, 0, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f), 1);
-      do_pending_window_change (0);
+        set correctly.  Note that we resize twice: The first time upon
+        a request from the window manager who wants to keep the height
+        of the outer rectangle (including decorations) unchanged, and a
+        second time because we want to keep the height of the inner
+        rectangle (without the decorations unchanged).  */
+      adjust_frame_size (f, -1, -1, 2, 1);
+
+      /* Not sure whether this is needed.  */
+      x_clear_under_internal_border (f);
     }
-  adjust_frame_glyphs (f);
 }
 
 
@@ -1657,8 +1709,7 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
 void
 x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
 {
-  int delta, nlines, root_height;
-  int unit = FRAME_LINE_HEIGHT (f);
+  int nlines;
 
   /* Treat tool bars like menu bars.  */
   if (FRAME_MINIBUF_ONLY_P (f))
@@ -1670,66 +1721,50 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
   else
     nlines = 0;
 
-  /* Make sure we redisplay all windows in this frame.  */
-  windows_or_buffers_changed = 23;
+  x_change_tool_bar_height (f, nlines * FRAME_LINE_HEIGHT (f));
+}
 
-  /* DELTA is in pixels now.  */
-  delta = (nlines - FRAME_TOOL_BAR_LINES (f)) * unit;
 
-  /* Don't resize the tool-bar to more than we have room for.  Note: The
-     calculations below and the subsequent call to resize_frame_windows
-     are inherently flawed because they can make the toolbar higher than
-     the containing frame.  */
-  if (delta > 0)
-    {
-      root_height = WINDOW_PIXEL_HEIGHT (XWINDOW (FRAME_ROOT_WINDOW (f)));
-      if (root_height - delta < unit)
-       {
-         delta = root_height - unit;
-         /* When creating a new frame and toolbar mode is enabled, we
-            need at least one toolbar line.  */
-         nlines = max (FRAME_TOOL_BAR_LINES (f) + delta / unit, 1);
-       }
-    }
+/* Set the pixel height of the tool bar of frame F to HEIGHT.  */
+void
+x_change_tool_bar_height (struct frame *f, int height)
+{
+  Lisp_Object frame;
+  int unit = FRAME_LINE_HEIGHT (f);
+  int old_height = FRAME_TOOL_BAR_HEIGHT (f);
+  int lines = (height + unit - 1) / unit;
+  int old_text_height = FRAME_TEXT_HEIGHT (f);
 
-  FRAME_TOOL_BAR_LINES (f) = nlines;
-  FRAME_TOOL_BAR_HEIGHT (f) = nlines * FRAME_LINE_HEIGHT (f);
-  ++windows_or_buffers_changed;
-  resize_frame_windows (f, FRAME_TEXT_HEIGHT (f), 0, 1);
-  adjust_frame_glyphs (f);
+  /* Make sure we redisplay all windows in this frame.  */
+  windows_or_buffers_changed = 23;
+
+  /* Recalculate tool bar and frame text sizes.  */
+  FRAME_TOOL_BAR_HEIGHT (f) = height;
+  FRAME_TOOL_BAR_LINES (f) = lines;
+  FRAME_TEXT_HEIGHT (f)
+    = FRAME_PIXEL_TO_TEXT_HEIGHT (f, FRAME_PIXEL_HEIGHT (f));
+  FRAME_LINES (f)
+    = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, FRAME_PIXEL_HEIGHT (f));
+  /* Store the `tool-bar-lines' and `height' frame parameters.  */
+  store_frame_param (f, Qtool_bar_lines, make_number (lines));
+  store_frame_param (f, Qheight, make_number (FRAME_LINES (f)));
 
-  /* We also have to make sure that the internal border at the top of
-     the frame, below the menu bar or tool bar, is redrawn when the
-     tool bar disappears.  This is so because the internal border is
-     below the tool bar if one is displayed, but is below the menu bar
-     if there isn't a tool bar.  The tool bar draws into the area
-     below the menu bar.  */
   if (FRAME_W32_WINDOW (f) && FRAME_TOOL_BAR_HEIGHT (f) == 0)
     {
       clear_frame (f);
       clear_current_matrices (f);
     }
 
-  /* If the tool bar gets smaller, the internal border below it
-     has to be cleared.  It was formerly part of the display
-     of the larger tool bar, and updating windows won't clear it.  */
-  if (FRAME_INTERNAL_BORDER_WIDTH (f) != 0 && FRAME_VISIBLE_P (f))
-    {
-      int height = FRAME_INTERNAL_BORDER_WIDTH (f);
-      int width = FRAME_PIXEL_WIDTH (f);
-      int y = nlines * unit;
-      HDC hdc = get_frame_dc (f);
+  if ((height < old_height) && WINDOWP (f->tool_bar_window))
+    clear_glyph_matrix (XWINDOW (f->tool_bar_window)->current_matrix);
 
-      block_input ();
-      w32_clear_area (f, hdc, 0, y, width, height);
-      release_frame_dc (f, hdc);
-      unblock_input ();
-    }
+  /* Recalculate toolbar height.  */
+  f->n_tool_bar_rows = 0;
 
-  if (delta < 0 && WINDOWP (f->tool_bar_window))
-    clear_glyph_matrix (XWINDOW (f->tool_bar_window)->current_matrix);
+  adjust_frame_size (f, -1, -1, 4, 0);
 
-  run_window_configuration_change_hook (f);
+  if (FRAME_X_WINDOW (f))
+    x_clear_under_internal_border (f);
 }
 
 
@@ -1848,6 +1883,16 @@ x_set_scroll_bar_default_width (struct frame *f)
     = (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) + unit - 1) / unit;
 }
 
+
+void
+x_set_scroll_bar_default_height (struct frame *f)
+{
+  int unit = FRAME_LINE_HEIGHT (f);
+
+  FRAME_CONFIG_SCROLL_BAR_HEIGHT (f) = GetSystemMetrics (SM_CXHSCROLL);
+  FRAME_CONFIG_SCROLL_BAR_LINES (f)
+    = (FRAME_CONFIG_SCROLL_BAR_HEIGHT (f) + unit - 1) / unit;
+}
 \f
 /* Subroutines for creating a frame.  */
 
@@ -1902,7 +1947,7 @@ w32_init_class (HINSTANCE hinst)
 }
 
 static HWND
-w32_createscrollbar (struct frame *f, struct scroll_bar * bar)
+w32_createvscrollbar (struct frame *f, struct scroll_bar * bar)
 {
   return CreateWindow ("SCROLLBAR", "", SBS_VERT | WS_CHILD | WS_VISIBLE,
                       /* Position and size of scroll bar.  */
@@ -1910,6 +1955,15 @@ w32_createscrollbar (struct frame *f, struct scroll_bar * bar)
                       FRAME_W32_WINDOW (f), NULL, hinst, NULL);
 }
 
+static HWND
+w32_createhscrollbar (struct frame *f, struct scroll_bar * bar)
+{
+  return CreateWindow ("SCROLLBAR", "", SBS_HORZ | WS_CHILD | WS_VISIBLE,
+                      /* Position and size of scroll bar.  */
+                      bar->left, bar->top, bar->width, bar->height,
+                      FRAME_W32_WINDOW (f), NULL, hinst, NULL);
+}
+
 static void
 w32_createwindow (struct frame *f, int *coords)
 {
@@ -1956,7 +2010,8 @@ w32_createwindow (struct frame *f, int *coords)
       SetWindowLong (hwnd, WND_FONTWIDTH_INDEX, FRAME_COLUMN_WIDTH (f));
       SetWindowLong (hwnd, WND_LINEHEIGHT_INDEX, FRAME_LINE_HEIGHT (f));
       SetWindowLong (hwnd, WND_BORDER_INDEX, FRAME_INTERNAL_BORDER_WIDTH (f));
-      SetWindowLong (hwnd, WND_SCROLLBAR_INDEX, FRAME_SCROLL_BAR_AREA_WIDTH (f));
+      SetWindowLong (hwnd, WND_VSCROLLBAR_INDEX, FRAME_SCROLL_BAR_AREA_WIDTH (f));
+      SetWindowLong (hwnd, WND_HSCROLLBAR_INDEX, FRAME_SCROLL_BAR_AREA_HEIGHT (f));
       SetWindowLong (hwnd, WND_BACKGROUND_INDEX, FRAME_BACKGROUND_PIXEL (f));
 
       /* Enable drag-n-drop.  */
@@ -2371,7 +2426,8 @@ w32_name_of_message (UINT msg)
       M (WM_EMACS_KILL),
       M (WM_EMACS_CREATEWINDOW),
       M (WM_EMACS_DONE),
-      M (WM_EMACS_CREATESCROLLBAR),
+      M (WM_EMACS_CREATEVSCROLLBAR),
+      M (WM_EMACS_CREATEHSCROLLBAR),
       M (WM_EMACS_SHOWWINDOW),
       M (WM_EMACS_SETWINDOWPOS),
       M (WM_EMACS_DESTROYWINDOW),
@@ -2388,6 +2444,7 @@ w32_name_of_message (UINT msg)
       M (WM_EMACS_SHOW_CARET),
       M (WM_EMACS_HIDE_CARET),
       M (WM_EMACS_SETCURSOR),
+      M (WM_EMACS_SHOWCURSOR),
       M (WM_EMACS_PAINT),
       M (WM_CHAR),
 #undef M
@@ -3446,6 +3503,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
          track_mouse_event_fn (&tme);
          track_mouse_window = hwnd;
        }
+    case WM_HSCROLL:
     case WM_VSCROLL:
       if (w32_mouse_move_interval <= 0
          || (msg == WM_MOUSEMOVE && button_state == 0))
@@ -3784,10 +3842,14 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
       return 0;
 
     case WM_WINDOWPOSCHANGING:
-      /* Don't restrict the sizing of tip frames.  */
-      if (frame_resize_pixelwise || hwnd == tip_window)
-       return 0;
+      /* Don't restrict the sizing of any kind of frames.  If the window
+        manager doesn't, there's no reason to do it ourselves.  */
+#if 0
+        if (frame_resize_pixelwise || hwnd == tip_window)
+#endif
+         return 0;
 
+#if 0
       /* Don't restrict the sizing of fullscreened frames, allowing them to be
          flush with the sides of the screen.  */
       f = x_window_to_frame (dpyinfo, hwnd);
@@ -3810,7 +3872,8 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
            DWORD font_width;
            DWORD line_height;
            DWORD internal_border;
-           DWORD scrollbar_extra;
+           DWORD vscrollbar_extra;
+           DWORD hscrollbar_extra;
            RECT wr;
 
            wp.length = sizeof (wp);
@@ -3821,7 +3884,8 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
            font_width = GetWindowLong (hwnd, WND_FONTWIDTH_INDEX);
            line_height = GetWindowLong (hwnd, WND_LINEHEIGHT_INDEX);
            internal_border = GetWindowLong (hwnd, WND_BORDER_INDEX);
-           scrollbar_extra = GetWindowLong (hwnd, WND_SCROLLBAR_INDEX);
+           vscrollbar_extra = GetWindowLong (hwnd, WND_VSCROLLBAR_INDEX);
+           hscrollbar_extra = GetWindowLong (hwnd, WND_HSCROLLBAR_INDEX);
 
            leave_crit ();
 
@@ -3832,10 +3896,10 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
            /* Force width and height of client area to be exact
               multiples of the character cell dimensions.  */
            wdiff = (lppos->cx - (rect.right - rect.left)
-                    - 2 * internal_border - scrollbar_extra)
+                    - 2 * internal_border - vscrollbar_extra)
              % font_width;
            hdiff = (lppos->cy - (rect.bottom - rect.top)
-                    - 2 * internal_border)
+                    - 2 * internal_border - hscrollbar_extra)
              % line_height;
 
            if (wdiff || hdiff)
@@ -3870,6 +3934,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
       }
 
       goto dflt;
+#endif
 
     case WM_GETMINMAXINFO:
       /* Hack to allow resizing the Emacs frame above the screen size.
@@ -3904,9 +3969,20 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
        return 0;
       }
 
-    case WM_EMACS_CREATESCROLLBAR:
-      return (LRESULT) w32_createscrollbar ((struct frame *) wParam,
-                                           (struct scroll_bar *) lParam);
+    case WM_EMACS_SHOWCURSOR:
+      {
+       ShowCursor ((BOOL) wParam);
+
+       return 0;
+      }
+
+    case WM_EMACS_CREATEVSCROLLBAR:
+      return (LRESULT) w32_createvscrollbar ((struct frame *) wParam,
+                                            (struct scroll_bar *) lParam);
+
+    case WM_EMACS_CREATEHSCROLLBAR:
+      return (LRESULT) w32_createhscrollbar ((struct frame *) wParam,
+                                            (struct scroll_bar *) lParam);
 
     case WM_EMACS_SHOWWINDOW:
       return ShowWindow ((HWND) wParam, (WPARAM) lParam);
@@ -4126,7 +4202,8 @@ my_create_tip_window (struct frame *f)
       SetWindowLong (tip_window, WND_BACKGROUND_INDEX, FRAME_BACKGROUND_PIXEL (f));
 
       /* Tip frames have no scrollbars.  */
-      SetWindowLong (tip_window, WND_SCROLLBAR_INDEX, 0);
+      SetWindowLong (tip_window, WND_VSCROLLBAR_INDEX, 0);
+      SetWindowLong (tip_window, WND_HSCROLLBAR_INDEX, 0);
 
       /* Do this to discard the default setting specified by our parent. */
       ShowWindow (tip_window, SW_HIDE);
@@ -4358,7 +4435,6 @@ This function is an internal primitive--use `make-frame' instead.  */)
   Lisp_Object name;
   int minibuffer_only = 0;
   long window_prompting = 0;
-  int width, height;
   ptrdiff_t count = SPECPDL_INDEX ();
   struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
   Lisp_Object display;
@@ -4426,8 +4502,9 @@ This function is an internal primitive--use `make-frame' instead.  */)
 
   XSETFRAME (frame, f);
 
-  /* By default, make scrollbars the system standard width. */
-  x_set_scroll_bar_default_width (f);
+  /* By default, make scrollbars the system standard width and height. */
+  FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = GetSystemMetrics (SM_CXVSCROLL);
+  FRAME_CONFIG_SCROLL_BAR_HEIGHT (f) = GetSystemMetrics (SM_CXHSCROLL);
 
   f->terminal = dpyinfo->terminal;
 
@@ -4453,7 +4530,6 @@ This function is an internal primitive--use `make-frame' instead.  */)
 #endif /* GLYPH_DEBUG */
 
   /* Specify the parent under which to make this window.  */
-
   if (!NILP (parent))
     {
       f->output_data.w32->parent_desc = (Window) XFASTINT (parent);
@@ -4476,7 +4552,7 @@ This function is an internal primitive--use `make-frame' instead.  */)
     {
       fset_name (f, name);
       f->explicit_name = 1;
-      /* use the frame's title when getting resources for this frame.  */
+      /* Use the frame's title when getting resources for this frame.  */
       specbind (Qx_resource_name, name);
     }
 
@@ -4486,9 +4562,11 @@ This function is an internal primitive--use `make-frame' instead.  */)
 
   x_default_parameter (f, parameters, Qfont_backend, Qnil,
                       "fontBackend", "FontBackend", RES_TYPE_STRING);
+
   /* Extract the window parameters from the supplied values
      that are needed to determine window geometry.  */
   x_default_font_parameter (f, parameters);
+
   x_default_parameter (f, parameters, Qborder_width, make_number (2),
                       "borderWidth", "BorderWidth", RES_TYPE_NUMBER);
 
@@ -4502,7 +4580,7 @@ This function is an internal primitive--use `make-frame' instead.  */)
                         "internalBorder", "InternalBorder", RES_TYPE_NUMBER);
       if (! EQ (value, Qunbound))
        parameters = Fcons (Fcons (Qinternal_border_width, value),
-                            parameters);
+                           parameters);
     }
   /* Default internalBorderWidth to 0 on Windows to match other programs.  */
   x_default_parameter (f, parameters, Qinternal_border_width, make_number (0),
@@ -4513,6 +4591,8 @@ This function is an internal primitive--use `make-frame' instead.  */)
                       NULL, NULL, RES_TYPE_NUMBER);
   x_default_parameter (f, parameters, Qvertical_scroll_bars, Qright,
                       "verticalScrollBars", "ScrollBars", RES_TYPE_SYMBOL);
+  x_default_parameter (f, parameters, Qhorizontal_scroll_bars, Qnil,
+                      "horizontalScrollBars", "ScrollBars", RES_TYPE_SYMBOL);
 
   /* Also do the stuff which must be set before the window exists.  */
   x_default_parameter (f, parameters, Qforeground_color, build_string ("black"),
@@ -4533,57 +4613,42 @@ This function is an internal primitive--use `make-frame' instead.  */)
                       "rightFringe", "RightFringe", RES_TYPE_NUMBER);
   /* Process alpha here (Bug#16619).  */
   x_default_parameter (f, parameters, Qalpha, Qnil,
-                       "alpha", "Alpha", RES_TYPE_NUMBER);
+                      "alpha", "Alpha", RES_TYPE_NUMBER);
 
-  /* Init faces before x_default_parameter is called for scroll-bar
-     parameters because that function calls x_set_scroll_bar_width,
-     which calls change_frame_size, which calls Fset_window_buffer,
-     which runs hooks, which call Fvertical_motion.  At the end, we
-     end up in init_iterator with a null face cache, which should not
-     happen.  */
+  /* Init faces first since we need the frame's column width/line
+     height in various occasions.  */
   init_frame_faces (f);
 
-  /* Avoid calling window-configuration-change-hook; otherwise we
-     could get an infloop in next_frame since the frame is not yet in
-     Vframe_list.  */
-  {
-    ptrdiff_t count2 = SPECPDL_INDEX ();
-
-    record_unwind_protect (unwind_create_frame_1, inhibit_lisp_code);
-    inhibit_lisp_code = Qt;
-
-    /* PXW: This is a duplicate from below.  We have to do it here since
-       otherwise x_set_tool_bar_lines will work with the character sizes
-       installed by init_frame_faces while the frame's pixel size is still
-       calculated from a character size of 1 and we subsequently hit the
-       eassert (height >= 0) assertion in window_box_height.  The
-       non-pixelwise code apparently worked around this because it had one
-       frame line vs one toolbar line which left us with a zero root
-       window height which was obviously wrong as well ...  */
-    change_frame_size (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
-                      FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 1, 0, 0, 1);
-
-    /* The X resources controlling the menu-bar and tool-bar are
-       processed specially at startup, and reflected in the mode
-       variables; ignore them here.  */
-    x_default_parameter (f, parameters, Qmenu_bar_lines,
-                        NILP (Vmenu_bar_mode)
-                        ? make_number (0) : make_number (1),
-                        NULL, NULL, RES_TYPE_NUMBER);
-    x_default_parameter (f, parameters, Qtool_bar_lines,
-                        NILP (Vtool_bar_mode)
-                        ? make_number (0) : make_number (1),
-                        NULL, NULL, RES_TYPE_NUMBER);
-
-    unbind_to (count2, Qnil);
-  }
+  /* The following call of change_frame_size is needed since otherwise
+     x_set_tool_bar_lines will already work with the character sizes
+     installed by init_frame_faces while the frame's pixel size is
+     still calculated from a character size of 1 and we subsequently
+     hit the (height >= 0) assertion in window_box_height.
+
+     The non-pixelwise code apparently worked around this because it
+     had one frame line vs one toolbar line which left us with a zero
+     root window height which was obviously wrong as well ...  */
+  adjust_frame_size (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
+                    FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 5, 1);
+
+  /* The X resources controlling the menu-bar and tool-bar are
+     processed specially at startup, and reflected in the mode
+     variables; ignore them here.  */
+  x_default_parameter (f, parameters, Qmenu_bar_lines,
+                      NILP (Vmenu_bar_mode)
+                      ? make_number (0) : make_number (1),
+                      NULL, NULL, RES_TYPE_NUMBER);
+  x_default_parameter (f, parameters, Qtool_bar_lines,
+                      NILP (Vtool_bar_mode)
+                      ? make_number (0) : make_number (1),
+                      NULL, NULL, RES_TYPE_NUMBER);
 
   x_default_parameter (f, parameters, Qbuffer_predicate, Qnil,
                       "bufferPredicate", "BufferPredicate", RES_TYPE_SYMBOL);
   x_default_parameter (f, parameters, Qtitle, Qnil,
                       "title", "Title", RES_TYPE_STRING);
   x_default_parameter (f, parameters, Qfullscreen, Qnil,
-                       "fullscreen", "Fullscreen", RES_TYPE_SYMBOL);
+                      "fullscreen", "Fullscreen", RES_TYPE_SYMBOL);
 
   f->output_data.w32->dwStyle = WS_OVERLAPPEDWINDOW;
   f->output_data.w32->parent_desc = FRAME_DISPLAY_INFO (f)->root_window;
@@ -4626,15 +4691,13 @@ This function is an internal primitive--use `make-frame' instead.  */)
                       "cursorType", "CursorType", RES_TYPE_SYMBOL);
   x_default_parameter (f, parameters, Qscroll_bar_width, Qnil,
                       "scrollBarWidth", "ScrollBarWidth", RES_TYPE_NUMBER);
+  x_default_parameter (f, parameters, Qscroll_bar_height, Qnil,
+                      "scrollBarHeight", "ScrollBarHeight", RES_TYPE_NUMBER);
+
+  /* Consider frame official, now.  */
+  f->official = true;
 
-  /* Dimensions, especially FRAME_LINES (f), must be done via change_frame_size.
-     Change will not be effected unless different from the current
-     FRAME_LINES (f).  */
-  width = FRAME_TEXT_WIDTH (f);
-  height = FRAME_TEXT_HEIGHT (f);
-  FRAME_TEXT_HEIGHT (f) = 0;
-  SET_FRAME_WIDTH (f, 0);
-  change_frame_size (f, width, height, 1, 0, 0, 1);
+  adjust_frame_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f), 0, 1);
 
   /* Tell the server what size and position, etc, we want, and how
      badly we want them.  This should be done after we have the menu
@@ -4971,7 +5034,7 @@ If omitted or nil, that stands for the selected frame's display.  */)
   return Qnil;
 }
 
-static BOOL CALLBACK
+static BOOL CALLBACK ALIGN_STACK
 w32_monitor_enum (HMONITOR monitor, HDC hdc, RECT *rcMonitor, LPARAM dwData)
 {
   Lisp_Object *monitor_list = (Lisp_Object *) dwData;
@@ -5298,7 +5361,7 @@ terminate Emacs if we can't open the connection.
   {
     char basename[ MAX_PATH ], *str;
 
-    strcpy (basename, SDATA (Vinvocation_name));
+    lispstpcpy (basename, Vinvocation_name);
     str = strrchr (basename, '.');
     if (str) *str = 0;
     Vinvocation_name = build_string (basename);
@@ -5510,100 +5573,6 @@ no value of TYPE (always string in the MS Windows case).  */)
 
 #endif /* TODO */
 
-\f
-/***********************************************************************
-                               Busy cursor
- ***********************************************************************/
-
-void
-w32_note_current_window (void)
-{
-  struct frame * f = SELECTED_FRAME ();
-
-  if (!FRAME_W32_P (f))
-    return;
-
-  hourglass_hwnd = FRAME_W32_WINDOW (f);
-}
-
-void
-show_hourglass (struct atimer *timer)
-{
-  struct frame *f;
-
-  hourglass_atimer = NULL;
-
-  block_input ();
-  f = x_window_to_frame (&one_w32_display_info,
-                                      hourglass_hwnd);
-
-  if (f)
-    f->output_data.w32->hourglass_p = 0;
-  else
-    f = SELECTED_FRAME ();
-
-  if (!FRAME_W32_P (f))
-    {
-      unblock_input ();
-      return;
-    }
-
-  w32_show_hourglass (f);
-  unblock_input ();
-}
-
-void
-hide_hourglass (void)
-{
-  block_input ();
-  w32_hide_hourglass ();
-  unblock_input ();
-}
-
-
-/* Display an hourglass cursor.  Set the hourglass_p flag in display info
-   to indicate that an hourglass cursor is shown.  */
-
-static void
-w32_show_hourglass (struct frame *f)
-{
-  if (!hourglass_shown_p)
-    {
-      f->output_data.w32->hourglass_p = 1;
-      if (!menubar_in_use && !current_popup_menu)
-       SetCursor (f->output_data.w32->hourglass_cursor);
-      hourglass_shown_p = 1;
-    }
-}
-
-
-/* Hide the hourglass cursor on all frames, if it is currently shown.  */
-
-static void
-w32_hide_hourglass (void)
-{
-  if (hourglass_shown_p)
-    {
-      struct frame *f = x_window_to_frame (&one_w32_display_info,
-                                          hourglass_hwnd);
-      if (f)
-       f->output_data.w32->hourglass_p = 0;
-      else
-       /* If frame was deleted, restore to selected frame's cursor.  */
-       f = SELECTED_FRAME ();
-
-      if (FRAME_W32_P (f))
-       SetCursor (f->output_data.w32->current_cursor);
-      else
-       /* No cursors on non GUI frames - restore to stock arrow cursor.  */
-       SetCursor (w32_load_cursor (IDC_ARROW));
-
-      hourglass_shown_p = 0;
-    }
-}
-
-
-\f
 /***********************************************************************
                                Tool tips
  ***********************************************************************/
@@ -5693,7 +5662,8 @@ x_create_tip_frame (struct w32_display_info *dpyinfo,
   f->wants_modeline = 0;
   XSETFRAME (frame, f);
 
-  buffer = Fget_buffer_create (build_string (" *tip*"));
+  AUTO_STRING (tip, " *tip*");
+  buffer = Fget_buffer_create (tip);
   /* Use set_window_buffer instead of Fset_window_buffer (see
      discussion of bug#11984, bug#12025, bug#12026).  */
   set_window_buffer (FRAME_ROOT_WINDOW (f), buffer, 0, 0);
@@ -5788,13 +5758,12 @@ x_create_tip_frame (struct w32_display_info *dpyinfo,
                       "cursorColor", "Foreground", RES_TYPE_STRING);
   x_default_parameter (f, parms, Qborder_color, build_string ("black"),
                       "borderColor", "BorderColor", RES_TYPE_STRING);
+  x_default_parameter (f, parms, Qalpha, Qnil,
+                       "alpha", "Alpha", RES_TYPE_NUMBER);
 
-  /* Init faces before x_default_parameter is called for scroll-bar
-     parameters because that function calls x_set_scroll_bar_width,
-     which calls change_frame_size, which calls Fset_window_buffer,
-     which runs hooks, which call Fvertical_motion.  At the end, we
-     end up in init_iterator with a null face cache, which should not
-     happen.  */
+  /* Init faces before x_default_parameter is called for the
+     scroll-bar-width parameter because otherwise we end up in
+     init_iterator with a null face cache, which should not happen.  */
   init_frame_faces (f);
 
   f->output_data.w32->dwStyle = WS_BORDER | WS_POPUP | WS_DISABLED;
@@ -5825,9 +5794,10 @@ x_create_tip_frame (struct w32_display_info *dpyinfo,
      from the current FRAME_LINES (f).  */
   width = FRAME_COLS (f);
   height = FRAME_LINES (f);
-  FRAME_LINES (f) = 0;
   SET_FRAME_COLS (f, 0);
-  change_frame_size (f, width, height, 1, 0, 0, 0);
+  SET_FRAME_LINES (f, 0);
+  adjust_frame_size (f, width * FRAME_COLUMN_WIDTH (f),
+                    height * FRAME_LINE_HEIGHT (f), 0, 1);
 
   /* Add `tooltip' frame parameter's default value. */
   if (NILP (Fframe_parameter (frame, Qtooltip)))
@@ -5872,6 +5842,7 @@ x_create_tip_frame (struct w32_display_info *dpyinfo,
      below.  And the frame needs to be on Vframe_list or making it
      visible won't work.  */
   Vframe_list = Fcons (frame, Vframe_list);
+  f->official = true;
 
   /* Setting attributes of faces of the tooltip frame from resources
      and similar will increment face_change_count, which leads to the
@@ -6900,24 +6871,33 @@ operations:
                specified DOCUMENT.
  \"find\"    - initiate search starting from DOCUMENT, which must specify
                a directory.
+ \"delete\"  - move DOCUMENT, a file or a directory, to Recycle Bin.
+ \"copy\"    - copy DOCUMENT, which must be a file or a directory, into
+               the clipboard.
+ \"cut\"     - move DOCUMENT, a file or a directory, into the clipboard.
+ \"paste\"   - paste the file whose name is in the clipboard into DOCUMENT,
+               which must be a directory.
+ \"pastelink\"
+           - create a shortcut in DOCUMENT (which must be a directory)
+               the file or directory whose name is in the clipboard.
  \"runas\"   - run DOCUMENT, which must be an excutable file, with
                elevated privileges (a.k.a. \"as Administrator\").
  \"properties\"
-           - open the the property sheet dialog for DOCUMENT; works
-               for *.lnk desktop shortcuts, and little or nothing else.
+           - open the property sheet dialog for DOCUMENT.
  nil       - invoke the default OPERATION, or \"open\" if default is
                not defined or unavailable.
 
 DOCUMENT is typically the name of a document file or a URL, but can
 also be an executable program to run, or a directory to open in the
-Windows Explorer.  If it is a file, it must be a local one; this
-function does not support remote file names.
+Windows Explorer.  If it is a file or a directory, it must be a local
+one; this function does not support remote file names.
 
 If DOCUMENT is an executable program, the optional third arg PARAMETERS
-can be a string containing command line parameters that will be passed
-to the program.  Some values of OPERATION also require parameters (e.g.,
-\"printto\" requires the printer address).  Otherwise, PARAMETERS should
-be nil or unspecified.
+can be a string containing command line parameters, separated by blanks,
+that will be passed to the program.  Some values of OPERATION also require
+parameters (e.g., \"printto\" requires the printer address).  Otherwise,
+PARAMETERS should be nil or unspecified.  Note that double quote characters
+in PARAMETERS must each be enclosed in 2 additional quotes, as in \"\"\".
 
 Optional fourth argument SHOW-FLAG can be used to control how the
 application will be displayed when it is invoked.  If SHOW-FLAG is nil
@@ -6935,11 +6915,13 @@ a ShowWindow flag:
   char *errstr;
   Lisp_Object current_dir = BVAR (current_buffer, directory);;
   wchar_t *doc_w = NULL, *params_w = NULL, *ops_w = NULL;
+#ifdef CYGWIN
   intptr_t result;
-#ifndef CYGWIN
+#else
   int use_unicode = w32_unicode_filenames;
   char *doc_a = NULL, *params_a = NULL, *ops_a = NULL;
   Lisp_Object absdoc, handler;
+  BOOL success;
   struct gcpro gcpro1;
 #endif
 
@@ -6967,7 +6949,48 @@ a ShowWindow flag:
                                     GUI_SDATA (current_dir),
                                     (INTEGERP (show_flag)
                                      ? XINT (show_flag) : SW_SHOWDEFAULT));
+
+  if (result > 32)
+    return Qt;
+
+  switch (result)
+    {
+    case SE_ERR_ACCESSDENIED:
+      errstr = w32_strerror (ERROR_ACCESS_DENIED);
+      break;
+    case SE_ERR_ASSOCINCOMPLETE:
+    case SE_ERR_NOASSOC:
+      errstr = w32_strerror (ERROR_NO_ASSOCIATION);
+      break;
+    case SE_ERR_DDEBUSY:
+    case SE_ERR_DDEFAIL:
+      errstr = w32_strerror (ERROR_DDE_FAIL);
+      break;
+    case SE_ERR_DDETIMEOUT:
+      errstr = w32_strerror (ERROR_TIMEOUT);
+      break;
+    case SE_ERR_DLLNOTFOUND:
+      errstr = w32_strerror (ERROR_DLL_NOT_FOUND);
+      break;
+    case SE_ERR_FNF:
+      errstr = w32_strerror (ERROR_FILE_NOT_FOUND);
+      break;
+    case SE_ERR_OOM:
+      errstr = w32_strerror (ERROR_NOT_ENOUGH_MEMORY);
+      break;
+    case SE_ERR_PNF:
+      errstr = w32_strerror (ERROR_PATH_NOT_FOUND);
+      break;
+    case SE_ERR_SHARE:
+      errstr = w32_strerror (ERROR_SHARING_VIOLATION);
+      break;
+    default:
+      errstr = w32_strerror (0);
+      break;
+    }
+
 #else  /* !CYGWIN */
+
   current_dir = ENCODE_FILE (current_dir);
   /* We have a situation here.  If DOCUMENT is a relative file name,
      but its name includes leading directories, i.e. it lives not in
@@ -6997,6 +7020,7 @@ a ShowWindow flag:
   if (use_unicode)
     {
       wchar_t document_w[MAX_PATH], current_dir_w[MAX_PATH];
+      SHELLEXECUTEINFOW shexinfo_w;
 
       /* Encode filename, current directory and parameters, and
         convert operation to UTF-16.  */
@@ -7030,14 +7054,28 @@ a ShowWindow flag:
            *d++ = *s++;
          *d = 0;
        }
-      result = (intptr_t) ShellExecuteW (NULL, ops_w, doc_w, params_w,
-                                        current_dir_w,
-                                        (INTEGERP (show_flag)
-                                         ? XINT (show_flag) : SW_SHOWDEFAULT));
+
+      /* Using ShellExecuteEx and setting the SEE_MASK_INVOKEIDLIST
+        flag succeeds with more OPERATIONs (a.k.a. "verbs"), as it is
+        able to invoke verbs from shortcut menu extensions, not just
+        static verbs listed in the Registry.  */
+      memset (&shexinfo_w, 0, sizeof (shexinfo_w));
+      shexinfo_w.cbSize = sizeof (shexinfo_w);
+      shexinfo_w.fMask =
+       SEE_MASK_INVOKEIDLIST | SEE_MASK_FLAG_DDEWAIT | SEE_MASK_FLAG_NO_UI;
+      shexinfo_w.hwnd = NULL;
+      shexinfo_w.lpVerb = ops_w;
+      shexinfo_w.lpFile = doc_w;
+      shexinfo_w.lpParameters = params_w;
+      shexinfo_w.lpDirectory = current_dir_w;
+      shexinfo_w.nShow =
+       (INTEGERP (show_flag) ? XINT (show_flag) : SW_SHOWDEFAULT);
+      success = ShellExecuteExW (&shexinfo_w);
     }
   else
     {
       char document_a[MAX_PATH], current_dir_a[MAX_PATH];
+      SHELLEXECUTEINFOA shexinfo_a;
 
       filename_to_ansi (SSDATA (current_dir), current_dir_a);
       filename_to_ansi (SSDATA (document), document_a);
@@ -7052,51 +7090,27 @@ a ShowWindow flag:
          /* Assume OPERATION is pure ASCII.  */
          ops_a = SSDATA (operation);
        }
-      result = (intptr_t) ShellExecuteA (NULL, ops_a, doc_a, params_a,
-                                        current_dir_a,
-                                        (INTEGERP (show_flag)
-                                         ? XINT (show_flag) : SW_SHOWDEFAULT));
+      memset (&shexinfo_a, 0, sizeof (shexinfo_a));
+      shexinfo_a.cbSize = sizeof (shexinfo_a);
+      shexinfo_a.fMask =
+       SEE_MASK_INVOKEIDLIST | SEE_MASK_FLAG_DDEWAIT | SEE_MASK_FLAG_NO_UI;
+      shexinfo_a.hwnd = NULL;
+      shexinfo_a.lpVerb = ops_a;
+      shexinfo_a.lpFile = doc_a;
+      shexinfo_a.lpParameters = params_a;
+      shexinfo_a.lpDirectory = current_dir_a;
+      shexinfo_a.nShow =
+       (INTEGERP (show_flag) ? XINT (show_flag) : SW_SHOWDEFAULT);
+      success = ShellExecuteExA (&shexinfo_a);
     }
-#endif /* !CYGWIN */
 
-  if (result > 32)
+  if (success)
     return Qt;
 
-  switch (result)
-    {
-    case SE_ERR_ACCESSDENIED:
-      errstr = w32_strerror (ERROR_ACCESS_DENIED);
-      break;
-    case SE_ERR_ASSOCINCOMPLETE:
-    case SE_ERR_NOASSOC:
-      errstr = w32_strerror (ERROR_NO_ASSOCIATION);
-      break;
-    case SE_ERR_DDEBUSY:
-    case SE_ERR_DDEFAIL:
-      errstr = w32_strerror (ERROR_DDE_FAIL);
-      break;
-    case SE_ERR_DDETIMEOUT:
-      errstr = w32_strerror (ERROR_TIMEOUT);
-      break;
-    case SE_ERR_DLLNOTFOUND:
-      errstr = w32_strerror (ERROR_DLL_NOT_FOUND);
-      break;
-    case SE_ERR_FNF:
-      errstr = w32_strerror (ERROR_FILE_NOT_FOUND);
-      break;
-    case SE_ERR_OOM:
-      errstr = w32_strerror (ERROR_NOT_ENOUGH_MEMORY);
-      break;
-    case SE_ERR_PNF:
-      errstr = w32_strerror (ERROR_PATH_NOT_FOUND);
-      break;
-    case SE_ERR_SHARE:
-      errstr = w32_strerror (ERROR_SHARING_VIOLATION);
-      break;
-    default:
-      errstr = w32_strerror (0);
-      break;
-    }
+  errstr = w32_strerror (0);
+
+#endif /* !CYGWIN */
+
   /* The error string might be encoded in the locale's encoding.  */
   if (!NILP (Vlocale_coding_system))
     {
@@ -7516,8 +7530,8 @@ If the underlying system call fails, value is nil.  */)
       (char *, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER)
       = GetProcAddress (hKernel, "GetDiskFreeSpaceExA");
     bool have_pfn_GetDiskFreeSpaceEx =
-      (w32_unicode_filenames && pfn_GetDiskFreeSpaceExW
-       || !w32_unicode_filenames && pfn_GetDiskFreeSpaceExA);
+      ((w32_unicode_filenames && pfn_GetDiskFreeSpaceExW)
+       || (!w32_unicode_filenames && pfn_GetDiskFreeSpaceExA));
 
     /* On Windows, we may need to specify the root directory of the
        volume holding FILENAME.  */
@@ -8039,17 +8053,19 @@ frame_parm_handler w32_frame_parm_handlers[] =
   x_set_mouse_color,
   x_explicitly_set_name,
   x_set_scroll_bar_width,
+  x_set_scroll_bar_height,
   x_set_title,
   x_set_unsplittable,
   x_set_vertical_scroll_bars,
+  x_set_horizontal_scroll_bars,
   x_set_visibility,
   x_set_tool_bar_lines,
   0, /* x_set_scroll_bar_foreground, */
   0, /* x_set_scroll_bar_background, */
   x_set_screen_gamma,
   x_set_line_spacing,
-  x_set_fringe_width,
-  x_set_fringe_width,
+  x_set_left_fringe,
+  x_set_right_fringe,
   0, /* x_set_wait_for_wm, */
   x_set_fullscreen,
   x_set_font_backend,
@@ -8066,7 +8082,6 @@ syms_of_w32fns (void)
 
   w32_visible_system_caret_hwnd = NULL;
 
-  DEFSYM (Qsuppress_icon, "suppress-icon");
   DEFSYM (Qundefined_color, "undefined-color");
   DEFSYM (Qcancel_timer, "cancel-timer");
   DEFSYM (Qhyper, "hyper");
@@ -8081,8 +8096,6 @@ syms_of_w32fns (void)
   DEFSYM (Qworkarea, "workarea");
   DEFSYM (Qmm_size, "mm-size");
   DEFSYM (Qframes, "frames");
-  /* This is the end of symbol initialization.  */
-
 
   Fput (Qundefined_color, Qerror_conditions,
        listn (CONSTYPE_PURE, 2, Qundefined_color, Qerror));
@@ -8394,9 +8407,6 @@ only be necessary if the default setting causes problems.  */);
 #endif
 
   defsubr (&Sset_message_beep);
-
-  hourglass_hwnd = NULL;
-
   defsubr (&Sx_show_tip);
   defsubr (&Sx_hide_tip);
   tip_timer = Qnil;
index 5262f38663fbf097cadc77c676b3b3bebff3df79..895931843ba6a0684ad3691162812e67b9996275 100644 (file)
@@ -115,15 +115,15 @@ static void compute_metrics (HDC, struct w32font_info *, unsigned int,
 static Lisp_Object w32_registry (LONG, DWORD);
 
 /* EnumFontFamiliesEx callbacks.  */
-static int CALLBACK add_font_entity_to_list (ENUMLOGFONTEX *,
-                                             NEWTEXTMETRICEX *,
-                                             DWORD, LPARAM);
-static int CALLBACK add_one_font_entity_to_list (ENUMLOGFONTEX *,
-                                                 NEWTEXTMETRICEX *,
-                                                 DWORD, LPARAM);
-static int CALLBACK add_font_name_to_list (ENUMLOGFONTEX *,
-                                           NEWTEXTMETRICEX *,
-                                           DWORD, LPARAM);
+static int CALLBACK ALIGN_STACK add_font_entity_to_list (ENUMLOGFONTEX *,
+                                                        NEWTEXTMETRICEX *,
+                                                        DWORD, LPARAM);
+static int CALLBACK ALIGN_STACK add_one_font_entity_to_list (ENUMLOGFONTEX *,
+                                                            NEWTEXTMETRICEX *,
+                                                            DWORD, LPARAM);
+static int CALLBACK ALIGN_STACK add_font_name_to_list (ENUMLOGFONTEX *,
+                                                      NEWTEXTMETRICEX *,
+                                                      DWORD, LPARAM);
 
 /* struct passed in as LPARAM arg to EnumFontFamiliesEx, for keeping track
    of what we really want.  */
@@ -287,11 +287,11 @@ Lisp_Object
 intern_font_name (char * string)
 {
   Lisp_Object str = DECODE_SYSTEM (build_string (string));
-  int len = SCHARS (str);
+  ptrdiff_t len = SCHARS (str);
   Lisp_Object obarray = check_obarray (Vobarray);
   Lisp_Object tem = oblookup (obarray, SDATA (str), len, len);
   /* This code is similar to intern function from lread.c.  */
-  return SYMBOLP (tem) ? tem : Fintern (str, obarray);
+  return SYMBOLP (tem) ? tem : intern_driver (str, obarray, XINT (tem));
 }
 
 /* w32 implementation of get_cache for font backend.
@@ -473,7 +473,7 @@ w32font_encode_char (struct font *font, int c)
    of METRICS.  The glyphs are specified by their glyph codes in
    CODE (length NGLYPHS).  Apparently metrics can be NULL, in this
    case just return the overall width.  */
-int
+void
 w32font_text_extents (struct font *font, unsigned *code,
                      int nglyphs, struct font_metrics *metrics)
 {
@@ -487,84 +487,80 @@ w32font_text_extents (struct font *font, unsigned *code,
 
   struct w32font_info *w32_font = (struct w32font_info *) font;
 
-  if (metrics)
-    {
-      memset (metrics, 0, sizeof (struct font_metrics));
-      metrics->ascent = font->ascent;
-      metrics->descent = font->descent;
+  memset (metrics, 0, sizeof (struct font_metrics));
+  metrics->ascent = font->ascent;
+  metrics->descent = font->descent;
 
-      for (i = 0; i < nglyphs; i++)
-        {
-         struct w32_metric_cache *char_metric;
-         int block = *(code + i) / CACHE_BLOCKSIZE;
-         int pos_in_block = *(code + i) % CACHE_BLOCKSIZE;
-
-         if (block >= w32_font->n_cache_blocks)
-           {
-             if (!w32_font->cached_metrics)
-               w32_font->cached_metrics
-                 = xmalloc ((block + 1)
-                            * sizeof (struct w32_metric_cache *));
-             else
-               w32_font->cached_metrics
-                 = xrealloc (w32_font->cached_metrics,
-                             (block + 1)
-                             * sizeof (struct w32_metric_cache *));
-             memset (w32_font->cached_metrics + w32_font->n_cache_blocks, 0,
-                     ((block + 1 - w32_font->n_cache_blocks)
-                      * sizeof (struct w32_metric_cache *)));
-             w32_font->n_cache_blocks = block + 1;
-           }
+  for (i = 0; i < nglyphs; i++)
+    {
+      struct w32_metric_cache *char_metric;
+      int block = *(code + i) / CACHE_BLOCKSIZE;
+      int pos_in_block = *(code + i) % CACHE_BLOCKSIZE;
 
-         if (!w32_font->cached_metrics[block])
-           {
-             w32_font->cached_metrics[block]
-               = xzalloc (CACHE_BLOCKSIZE * sizeof (struct w32_metric_cache));
-           }
+      if (block >= w32_font->n_cache_blocks)
+       {
+         if (!w32_font->cached_metrics)
+           w32_font->cached_metrics
+             = xmalloc ((block + 1)
+                        * sizeof (struct w32_metric_cache *));
+         else
+           w32_font->cached_metrics
+             = xrealloc (w32_font->cached_metrics,
+                         (block + 1)
+                         * sizeof (struct w32_metric_cache *));
+         memset (w32_font->cached_metrics + w32_font->n_cache_blocks, 0,
+                 ((block + 1 - w32_font->n_cache_blocks)
+                  * sizeof (struct w32_metric_cache *)));
+         w32_font->n_cache_blocks = block + 1;
+       }
 
-         char_metric = w32_font->cached_metrics[block] + pos_in_block;
+      if (!w32_font->cached_metrics[block])
+       {
+         w32_font->cached_metrics[block]
+           = xzalloc (CACHE_BLOCKSIZE * sizeof (struct w32_metric_cache));
+       }
 
-         if (char_metric->status == W32METRIC_NO_ATTEMPT)
-           {
-             if (dc == NULL)
-               {
-                 /* TODO: Frames can come and go, and their fonts
-                    outlive them. So we can't cache the frame in the
-                    font structure.  Use selected_frame until the API
-                    is updated to pass in a frame.  */
-                 f = XFRAME (selected_frame);
-
-                  dc = get_frame_dc (f);
-                  old_font = SelectObject (dc, w32_font->hfont);
-               }
-             compute_metrics (dc, w32_font, *(code + i), char_metric);
-           }
+      char_metric = w32_font->cached_metrics[block] + pos_in_block;
 
-         if (char_metric->status == W32METRIC_SUCCESS)
+      if (char_metric->status == W32METRIC_NO_ATTEMPT)
+       {
+         if (dc == NULL)
            {
-             metrics->lbearing = min (metrics->lbearing,
-                                      metrics->width + char_metric->lbearing);
-             metrics->rbearing = max (metrics->rbearing,
-                                      metrics->width + char_metric->rbearing);
-             metrics->width += char_metric->width;
+             /* TODO: Frames can come and go, and their fonts
+                outlive them. So we can't cache the frame in the
+                font structure.  Use selected_frame until the API
+                is updated to pass in a frame.  */
+             f = XFRAME (selected_frame);
+
+             dc = get_frame_dc (f);
+             old_font = SelectObject (dc, w32_font->hfont);
            }
-         else
-           /* If we couldn't get metrics for a char,
-              use alternative method.  */
-           break;
+         compute_metrics (dc, w32_font, *(code + i), char_metric);
        }
-      /* If we got through everything, return.  */
-      if (i == nglyphs)
-        {
-          if (dc != NULL)
-            {
-              /* Restore state and release DC.  */
-              SelectObject (dc, old_font);
-              release_frame_dc (f, dc);
-            }
 
-          return metrics->width;
-        }
+      if (char_metric->status == W32METRIC_SUCCESS)
+       {
+         metrics->lbearing = min (metrics->lbearing,
+                                  metrics->width + char_metric->lbearing);
+         metrics->rbearing = max (metrics->rbearing,
+                                  metrics->width + char_metric->rbearing);
+         metrics->width += char_metric->width;
+       }
+      else
+       /* If we couldn't get metrics for a char,
+          use alternative method.  */
+       break;
+    }
+  /* If we got through everything, return.  */
+  if (i == nglyphs)
+    {
+      if (dc != NULL)
+       {
+         /* Restore state and release DC.  */
+         SelectObject (dc, old_font);
+         release_frame_dc (f, dc);
+       }
+      return;
     }
 
   /* For non-truetype fonts, GetGlyphOutlineW is not supported, so
@@ -620,18 +616,13 @@ w32font_text_extents (struct font *font, unsigned *code,
     }
 
   /* Give our best estimate of the metrics, based on what we know.  */
-  if (metrics)
-    {
-      metrics->width = total_width - w32_font->metrics.tmOverhang;
-      metrics->lbearing = 0;
-      metrics->rbearing = total_width;
-    }
+  metrics->width = total_width - w32_font->metrics.tmOverhang;
+  metrics->lbearing = 0;
+  metrics->rbearing = total_width;
 
   /* Restore state and release DC.  */
   SelectObject (dc, old_font);
   release_frame_dc (f, dc);
-
-  return total_width;
 }
 
 /* w32 implementation of draw for font backend.
@@ -757,19 +748,6 @@ w32font_get_bitmap (struct font *font, unsigned code,
 static void
 w32font_free_bitmap (struct font *font, struct font_bitmap *bitmap);
   */
-/* w32 implementation of get_outline for font backend.
-   Optional.
-   Return an outline data for glyph-code CODE of FONT.  The format
-   of the outline data depends on the font-driver.
-static void *
-w32font_get_outline (struct font *font, unsigned code);
-  */
-/* w32 implementation of free_outline for font backend.
-   Optional.
-   Free OUTLINE (that is obtained by the above method).
-static void
-w32font_free_outline (struct font *font, void *outline);
-  */
 /* w32 implementation of anchor_point for font backend.
    Optional.
    Get coordinates of the INDEXth anchor point of the glyph whose
@@ -899,7 +877,7 @@ w32font_open_internal (struct frame *f, Lisp_Object font_entity,
   LOGFONT logfont;
   HDC dc;
   HFONT hfont, old_font;
-  Lisp_Object val, extra;
+  Lisp_Object val;
   struct w32font_info *w32_font;
   struct font * font;
   OUTLINETEXTMETRICW* metrics = NULL;
@@ -992,21 +970,6 @@ w32font_open_internal (struct frame *f, Lisp_Object font_entity,
   font->default_ascent = w32_font->metrics.tmAscent;
   font->pixel_size = size;
   font->driver = &w32font_driver;
-  /* Use format cached during list, as the information we have access to
-     here is incomplete.  */
-  extra = AREF (font_entity, FONT_EXTRA_INDEX);
-  if (CONSP (extra))
-    {
-      val = assq_no_quit (QCformat, extra);
-      if (CONSP (val))
-        font->props[FONT_FORMAT_INDEX] = XCDR (val);
-      else
-        font->props[FONT_FORMAT_INDEX] = Qunknown;
-    }
-  else
-    font->props[FONT_FORMAT_INDEX] = Qunknown;
-
-  font->props[FONT_FILE_INDEX] = Qnil;
   font->encoding_charset = -1;
   font->repertory_charset = -1;
   /* TODO: do we really want the minimum width here, which could be negative? */
@@ -1037,7 +1000,7 @@ w32font_open_internal (struct frame *f, Lisp_Object font_entity,
 
 /* Callback function for EnumFontFamiliesEx.
  * Adds the name of a font to a Lisp list (passed in as the lParam arg).  */
-static int CALLBACK
+static int CALLBACK ALIGN_STACK
 add_font_name_to_list (ENUMLOGFONTEX *logical_font,
                       NEWTEXTMETRICEX *physical_font,
                       DWORD font_type, LPARAM list_object)
@@ -1483,7 +1446,7 @@ check_face_name (LOGFONT *font, char *full_name)
  * and if so, adds it to a list. Both the data we are checking against
  * and the list to which the fonts are added are passed in via the
  * lparam argument, in the form of a font_callback_data struct. */
-static int CALLBACK
+static int CALLBACK ALIGN_STACK
 add_font_entity_to_list (ENUMLOGFONTEX *logical_font,
                         NEWTEXTMETRICEX *physical_font,
                         DWORD font_type, LPARAM lParam)
@@ -1602,7 +1565,7 @@ add_font_entity_to_list (ENUMLOGFONTEX *logical_font,
 
 /* Callback function for EnumFontFamiliesEx.
  * Terminates the search once we have a match. */
-static int CALLBACK
+static int CALLBACK ALIGN_STACK
 add_one_font_entity_to_list (ENUMLOGFONTEX *logical_font,
                             NEWTEXTMETRICEX *physical_font,
                             DWORD font_type, LPARAM lParam)
@@ -2557,8 +2520,6 @@ struct font_driver w32font_driver =
     w32font_draw,
     NULL, /* get_bitmap */
     NULL, /* free_bitmap */
-    NULL, /* get_outline */
-    NULL, /* free_outline */
     NULL, /* anchor_point */
     NULL, /* otf_capability */
     NULL, /* otf_drive */
index 1be49bb91c276540f0cb66263895ea520ad87d33..5ce3ac7a5f93b59400d69ff22b017763c6bec1ac 100644 (file)
@@ -74,8 +74,8 @@ int w32font_open_internal (struct frame *f, Lisp_Object font_entity,
                            int pixel_size, Lisp_Object font_object);
 void w32font_close (struct font *font);
 int w32font_has_char (Lisp_Object entity, int c);
-int w32font_text_extents (struct font *font, unsigned *code, int nglyphs,
-                          struct font_metrics *metrics);
+void w32font_text_extents (struct font *font, unsigned *code, int nglyphs,
+                          struct font_metrics *metrics);
 int w32font_draw (struct glyph_string *s, int from, int to,
                   int x, int y, bool with_background);
 
index b8c8557357a57aa7dd4cf2140ef83a32d83dab9c..d04ce625d1de6b94dd85804d856654764b6840c5 100644 (file)
@@ -22,14 +22,11 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "systime.h" /* for Time */
 
-/* Local memory management for menus.  */
+/* FIXME: old local memory management for menus.  */
 #define local_heap (GetProcessHeap ())
 #define local_alloc(n) (HeapAlloc (local_heap, HEAP_ZERO_MEMORY, (n)))
 #define local_free(p) (HeapFree (local_heap, 0, ((LPVOID) (p))))
 
-#define malloc_widget_value() ((widget_value *) local_alloc (sizeof (widget_value)))
-#define free_widget_value(wv) (local_free ((wv)))
-
 /* Emulate X GC's by keeping color and font info in a structure.  */
 typedef struct _XGCValues
 {
index 8ab2f58c6e70c6a80849f9ec15163393e9e4638d..c431b87e0c25eb015b8cd01895481f9cacfc11ad 100644 (file)
-/* Heap management routines for GNU Emacs on the Microsoft Windows API.
-   Copyright (C) 1994, 2001-2014 Free Software Foundation, Inc.
+/* Heap management routines for GNU Emacs on the Microsoft Windows
+   API.  Copyright (C) 1994, 2001-2014 Free Software Foundation, Inc.
 
-This file is part of GNU Emacs.
+   This file is part of GNU Emacs.
 
-GNU Emacs is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+   GNU Emacs is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
 
-GNU Emacs is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
+   GNU Emacs is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
 
-You should have received a copy of the GNU General Public License
-along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU General Public License
+   along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>. */
 
 /*
-   Geoff Voelker (voelker@cs.washington.edu)                        7-29-94
+  Geoff Voelker (voelker@cs.washington.edu)                          7-29-94
 */
 
+/*
+  Heavily modified by Fabrice Popineau (fabrice.popineau@gmail.com) 28-02-2014
+*/
+
+/*
+  Memory allocation scheme for w32/w64:
+
+  - Buffers are mmap'ed using a very simple emulation of mmap/munmap
+  - During the temacs phase:
+    * we use a private heap declared to be stored into the `dumped_data'
+    * unfortunately, this heap cannot be made growable, so the size of
+      blocks it can allocate is limited to (0x80000 - pagesize)
+    * the blocks that are larger than this are allocated from the end
+      of the `dumped_data' array; there are not so many of them.
+      We use a very simple first-fit scheme to reuse those blocks.
+    * we check that the private heap does not cross the area used
+      by the bigger chunks.
+  - During the emacs phase:
+    * we create a private heap for new memory blocks
+    * we make sure that we never free a block that has been dumped.
+      Freeing a dumped block could work in principle, but may prove
+      unreliable if we distribute binaries of emacs.exe: MS does not
+      guarantee that the heap data structures are the same across all
+      versions of their OS, even though the API is available since XP.  */
+
 #include <config.h>
 #include <stdio.h>
+#include <errno.h>
 
+#include <sys/mman.h>
 #include "w32common.h"
 #include "w32heap.h"
 #include "lisp.h"  /* for VALMASK */
 
-#define RVA_TO_PTR(rva) ((unsigned char *)((DWORD_PTR)(rva) + (DWORD_PTR)GetModuleHandle (NULL)))
-
-/* Emulate getpagesize.  */
-int
-getpagesize (void)
-{
-  return sysinfo_cache.dwPageSize;
-}
+/* We chose to leave those declarations here.  They are used only in
+   this file.  The RtlCreateHeap is available since XP.  It is located
+   in ntdll.dll and is available with the DDK.  People often
+   complained that HeapCreate doesn't offer the ability to create a
+   heap at a given place, which we need here, and which RtlCreateHeap
+   provides.  We reproduce here the definitions available with the
+   DDK.  */
+
+typedef PVOID (WINAPI * RtlCreateHeap_Proc) (
+                                             /* _In_ */      ULONG Flags,
+                                             /* _In_opt_ */  PVOID HeapBase,
+                                             /* _In_opt_ */  SIZE_T ReserveSize,
+                                             /* _In_opt_ */  SIZE_T CommitSize,
+                                             /* _In_opt_ */  PVOID Lock,
+                                             /* _In_opt_ */  PVOID Parameters
+                                             );
+
+typedef LONG NTSTATUS;
+
+typedef NTSTATUS
+(NTAPI * PRTL_HEAP_COMMIT_ROUTINE)(
+                                   IN PVOID Base,
+                                   IN OUT PVOID *CommitAddress,
+                                   IN OUT PSIZE_T CommitSize
+                                   );
+
+typedef struct _RTL_HEAP_PARAMETERS {
+  ULONG Length;
+  SIZE_T SegmentReserve;
+  SIZE_T SegmentCommit;
+  SIZE_T DeCommitFreeBlockThreshold;
+  SIZE_T DeCommitTotalFreeThreshold;
+  SIZE_T MaximumAllocationSize;
+  SIZE_T VirtualMemoryThreshold;
+  SIZE_T InitialCommit;
+  SIZE_T InitialReserve;
+  PRTL_HEAP_COMMIT_ROUTINE CommitRoutine;
+  SIZE_T Reserved[ 2 ];
+} RTL_HEAP_PARAMETERS, *PRTL_HEAP_PARAMETERS;
+
+/* We reserve space for dumping emacs lisp byte-code inside a static
+   array.  By storing it in an array, the generic mechanism in
+   unexecw32.c will be able to dump it without the need to add a
+   special segment to the executable.  In order to be able to do this
+   without losing too much space, we need to create a Windows heap at
+   the specific address of the static array.  The RtlCreateHeap
+   available inside the NT kernel since XP will do this.  It allows to
+   create a non-growable heap at a specific address.  So before
+   dumping, we create a non-growable heap at the address of the
+   dumped_data[] array.  After dumping, we reuse memory allocated
+   there without being able to free it (but most of it is not meant to
+   be freed anyway), and we use a new private heap for all new
+   allocations.  */
+
+/* FIXME: Most of the space reserved for dumped_data[] is only used by
+   the 1st bootstrap-emacs.exe built while bootstrapping.  Once the
+   preloaded Lisp files are byte-compiled, the next loadup uses less
+   than half of the size stated below.  It would be nice to find a way
+   to build only the first bootstrap-emacs.exe with the large size,
+   and reset that to a lower value afterwards.  */
+#ifdef _WIN64
+# define DUMPED_HEAP_SIZE (18*1024*1024)
+#else
+# define DUMPED_HEAP_SIZE (11*1024*1024)
+#endif
 
-/* Info for managing our preload heap, which is essentially a fixed size
-   data area in the executable.  */
-PIMAGE_SECTION_HEADER preload_heap_section;
+static unsigned char dumped_data[DUMPED_HEAP_SIZE];
 
-/* Info for keeping track of our heap.  */
+/* Info for keeping track of our dynamic heap used after dumping. */
 unsigned char *data_region_base = NULL;
 unsigned char *data_region_end = NULL;
-unsigned char *real_data_region_end = NULL;
-size_t  reserved_heap_size = 0;
+static DWORD_PTR committed = 0;
 
-/* The start of the data segment.  */
-unsigned char *
-get_data_start (void)
-{
-  return data_region_base;
-}
+/* The maximum block size that can be handled by a non-growable w32
+   heap is limited by the MaxBlockSize value below.
+
+   This point deserves and explanation.
+
+   The W32 heap allocator can be used for a growable
+   heap or a non-growable one.
+
+   A growable heap is not compatible with a fixed base address for the
+   heap.  Only a non-growable one is.  One drawback of non-growable
+   heaps is that they can hold only objects smaller than a certain
+   size (the one defined below).  Most of the largest blocks are GC'ed
+   before dumping.  In any case and to be safe, we implement a simple
+   first-fit allocation algorithm starting at the end of the
+   dumped_data[] array like depicted below:
+
+  ----------------------------------------------
+  |               |              |             |
+  | Private heap  |->          <-|  Big chunks |
+  |               |              |             |
+  ----------------------------------------------
+  ^               ^              ^
+  dumped_data     dumped_data    bc_limit
+                  + committed
 
-/* The end of the data segment.  */
-unsigned char *
-get_data_end (void)
+*/
+
+/* Info for managing our preload heap, which is essentially a fixed size
+   data area in the executable. */
+#define PAGE_SIZE 0x1000
+#define MaxBlockSize (0x80000 - PAGE_SIZE)
+
+#define MAX_BLOCKS 0x40
+
+static struct
 {
-  return data_region_end;
-}
+  unsigned char *address;
+  size_t size;
+  DWORD occupied;
+} blocks[MAX_BLOCKS];
+
+static DWORD          blocks_number = 0;
+static unsigned char *bc_limit;
+
+/* Handle for the private heap:
+    - inside the dumped_data[] array before dump,
+    - outside of it after dump.
+*/
+HANDLE heap = NULL;
 
-#if !USE_LSB_TAG
-static char *
-allocate_heap (void)
+/* We redirect the standard allocation functions.  */
+malloc_fn the_malloc_fn;
+realloc_fn the_realloc_fn;
+free_fn the_free_fn;
+
+/* It doesn't seem to be useful to allocate from a file mapping.
+   It would be if the memory was shared.
+     http://stackoverflow.com/questions/307060/what-is-the-purpose-of-allocating-pages-in-the-pagefile-with-createfilemapping  */
+
+/* This is the function to commit memory when the heap allocator
+   claims for new memory.  Before dumping, we allocate space
+   from the fixed size dumped_data[] array.
+*/
+NTSTATUS NTAPI
+dumped_data_commit (PVOID Base, PVOID *CommitAddress, PSIZE_T CommitSize)
 {
-  /* Try to get as much as possible of the address range from the end of
-     the preload heap section up to the usable address limit.  Since GNU
-     malloc can handle gaps in the memory it gets from sbrk, we can
-     simply set the sbrk pointer to the base of the new heap region.  */
-  DWORD_PTR base =
-    ROUND_UP ((RVA_TO_PTR (preload_heap_section->VirtualAddress)
-              + preload_heap_section->Misc.VirtualSize),
-             get_allocation_unit ());
-  DWORD_PTR end  = ((unsigned __int64)1) << VALBITS; /* 256MB */
-  void *ptr = NULL;
-
-  while (!ptr && (base < end))
+  /* This is used before dumping.
+
+     The private heap is stored at dumped_data[] address.
+     We commit contiguous areas of the dumped_data array
+     as requests arrive.  */
+  *CommitAddress = data_region_base + committed;
+  committed += *CommitSize;
+  /* Check that the private heap area does not overlap the big chunks area.  */
+  if (((unsigned char *)(*CommitAddress)) + *CommitSize >= bc_limit)
     {
-#ifdef _WIN64
-      reserved_heap_size = min(end - base, 0x4000000000ull); /* Limit to 256Gb */
-#else
-      reserved_heap_size = end - base;
-#endif
-      ptr = VirtualAlloc ((void *) base,
-                         get_reserved_heap_size (),
-                         MEM_RESERVE,
-                         PAGE_NOACCESS);
-      base += 0x00100000;  /* 1MB increment */
+      fprintf (stderr,
+              "dumped_data_commit: memory exhausted.\nEnlarge dumped_data[]!\n");
+      exit (-1);
     }
-
-  return ptr;
+  return 0;
 }
-#else  /* USE_LSB_TAG */
-static char *
-allocate_heap (void)
+
+/* Heap creation.  */
+
+/* We want to turn on Low Fragmentation Heap for XP and older systems.
+   MinGW32 lacks those definitions.  */
+#ifndef _W64
+typedef enum _HEAP_INFORMATION_CLASS {
+  HeapCompatibilityInformation
+} HEAP_INFORMATION_CLASS;
+
+typedef WINBASEAPI BOOL (WINAPI * HeapSetInformation_Proc)(HANDLE,HEAP_INFORMATION_CLASS,PVOID,SIZE_T);
+#endif
+
+void
+init_heap (void)
 {
-#ifdef _WIN64
-  size_t size = 0x4000000000ull; /* start by asking for 32GB */
-#else
-  /* We used to start with 2GB here, but on Windows 7 that would leave
-     too little room in the address space for threads started by
-     Windows on our behalf, e.g. when we pop up the file selection
-     dialog.  */
-  size_t size = 0x68000000; /* start by asking for 1.7GB */
+  if (using_dynamic_heap)
+    {
+      unsigned long enable_lfh = 2;
+
+      /* After dumping, use a new private heap.  We explicitly enable
+         the low fragmentation heap (LFH) here, for the sake of pre
+         Vista versions.  Note: this will harmlessly fail on Vista and
+         later, where the low-fragmentation heap is enabled by
+         default.  It will also fail on pre-Vista versions when Emacs
+         is run under a debugger; set _NO_DEBUG_HEAP=1 in the
+         environment before starting GDB to get low fragmentation heap
+         on XP and older systems, for the price of losing "certain
+         heap debug options"; for the details see
+         http://msdn.microsoft.com/en-us/library/windows/desktop/aa366705%28v=vs.85%29.aspx.  */
+      data_region_end = data_region_base;
+
+      /* Create the private heap.  */
+      heap = HeapCreate (0, 0, 0);
+
+#ifndef _W64
+      /* Set the low-fragmentation heap for OS before Vista.  */
+      HMODULE hm_kernel32dll = LoadLibrary ("kernel32.dll");
+      HeapSetInformation_Proc s_pfn_Heap_Set_Information = (HeapSetInformation_Proc) GetProcAddress (hm_kernel32dll, "HeapSetInformation");
+      if (s_pfn_Heap_Set_Information != NULL)
+       {
+         if (s_pfn_Heap_Set_Information ((PVOID) heap,
+                                         HeapCompatibilityInformation,
+                                         &enable_lfh, sizeof(enable_lfh)) == 0)
+           DebPrint (("Enabling Low Fragmentation Heap failed: error %ld\n",
+                      GetLastError ()));
+       }
 #endif
-  void *ptr = NULL;
 
-  while (!ptr && size > 0x00100000)
+      the_malloc_fn = malloc_after_dump;
+      the_realloc_fn = realloc_after_dump;
+      the_free_fn = free_after_dump;
+    }
+  else
     {
-      reserved_heap_size = size;
-      ptr = VirtualAlloc (NULL,
-                         get_reserved_heap_size (),
-                         MEM_RESERVE,
-                         PAGE_NOACCESS);
-      size -= 0x00800000; /* if failed, decrease request by 8MB */
+      /* Find the RtlCreateHeap function.  Headers for this function
+         are provided with the w32 ddk, but the function is available
+         in ntdll.dll since XP.  */
+      HMODULE hm_ntdll = LoadLibrary ("ntdll.dll");
+      RtlCreateHeap_Proc s_pfn_Rtl_Create_Heap
+       = (RtlCreateHeap_Proc) GetProcAddress (hm_ntdll, "RtlCreateHeap");
+      /* Specific parameters for the private heap.  */
+      RTL_HEAP_PARAMETERS params;
+      ZeroMemory (&params, sizeof(params));
+      params.Length = sizeof(RTL_HEAP_PARAMETERS);
+
+      data_region_base = (unsigned char *)ROUND_UP (dumped_data, 0x1000);
+      data_region_end = bc_limit = dumped_data + DUMPED_HEAP_SIZE;
+
+      params.InitialCommit = committed = 0x1000;
+      params.InitialReserve = sizeof(dumped_data);
+      /* Use our own routine to commit memory from the dumped_data
+         array.  */
+      params.CommitRoutine = &dumped_data_commit;
+
+      /* Create the private heap.  */
+      if (s_pfn_Rtl_Create_Heap == NULL)
+       {
+         fprintf (stderr, "Cannot build Emacs without RtlCreateHeap being available; exiting.\n");
+         exit (-1);
+       }
+      heap = s_pfn_Rtl_Create_Heap (0, data_region_base, 0, 0, NULL, &params);
+      the_malloc_fn = malloc_before_dump;
+      the_realloc_fn = realloc_before_dump;
+      the_free_fn = free_before_dump;
     }
 
-  return ptr;
+  /* Update system version information to match current system.  */
+  cache_system_info ();
 }
-#endif /* USE_LSB_TAG */
 
+#undef malloc
+#undef realloc
+#undef free
+
+/* FREEABLE_P checks if the block can be safely freed.  */
+#define FREEABLE_P(addr)                                        \
+    ((unsigned char *)(addr) < dumped_data                      \
+     || (unsigned char *)(addr) >= dumped_data + DUMPED_HEAP_SIZE)
 
-/* Emulate Unix sbrk.  Note that ralloc.c expects the return value to
-   be the address of the _start_ (not end) of the new block in case of
-   success, and zero (not -1) in case of failure.  */
 void *
-sbrk (ptrdiff_t increment)
+malloc_after_dump (size_t size)
 {
-  void *result;
-  ptrdiff_t size = increment;
+  /* Use the new private heap.  */
+  void *p = HeapAlloc (heap, 0, size);
+
+  /* After dump, keep track of the "brk value" for sbrk(0).  */
+  if (p)
+    {
+      unsigned char *new_brk = (unsigned char *)p + size;
+
+      if (new_brk > data_region_end)
+       data_region_end = new_brk;
+    }
+  else
+    errno = ENOMEM;
+  return p;
+}
 
-  result = data_region_end;
+void *
+malloc_before_dump (size_t size)
+{
+  void *p;
 
-  /* If size is negative, shrink the heap by decommitting pages.  */
-  if (size < 0)
+  /* Before dumping.  The private heap can handle only requests for
+     less than MaxBlockSize.  */
+  if (size < MaxBlockSize)
+    {
+      /* Use the private heap if possible.  */
+      p = HeapAlloc (heap, 0, size);
+      if (!p)
+       errno = ENOMEM;
+    }
+  else
     {
-      ptrdiff_t new_size;
-      unsigned char *new_data_region_end;
-
-      size = -size;
-
-      /* Sanity checks.  */
-      if ((data_region_end - size) < data_region_base)
-       return NULL;
-
-      /* We can only decommit full pages, so allow for
-        partial deallocation [cga].  */
-      new_data_region_end = (data_region_end - size);
-      new_data_region_end = (unsigned char *)
-       ((DWORD_PTR) (new_data_region_end + syspage_mask) & ~syspage_mask);
-      new_size = real_data_region_end - new_data_region_end;
-      real_data_region_end = new_data_region_end;
-      if (new_size > 0)
+      /* Find the first big chunk that can hold the requested size.  */
+      int i = 0;
+
+      for (i = 0; i < blocks_number; i++)
+       {
+         if (blocks[i].occupied == 0 && blocks[i].size >= size)
+           break;
+       }
+      if (i < blocks_number)
        {
-         /* Decommit size bytes from the end of the heap.  */
-         if (using_dynamic_heap
-             && !VirtualFree (real_data_region_end, new_size, MEM_DECOMMIT))
-           return NULL;
-       }
+         /* If found, use it.  */
+         p = blocks[i].address;
+         blocks[i].occupied = TRUE;
+       }
+      else
+       {
+         /* Allocate a new big chunk from the end of the dumped_data
+            array.  */
+         if (blocks_number >= MAX_BLOCKS)
+           {
+             fprintf (stderr,
+                      "malloc_before_dump: no more big chunks available.\nEnlarge MAX_BLOCKS!\n");
+             exit (-1);
+           }
+         bc_limit -= size;
+         bc_limit = (unsigned char *)ROUND_DOWN (bc_limit, 0x10);
+         p = bc_limit;
+         blocks[blocks_number].address = p;
+         blocks[blocks_number].size = size;
+         blocks[blocks_number].occupied = TRUE;
+         blocks_number++;
+         /* Check that areas do not overlap.  */
+         if (bc_limit < dumped_data + committed)
+           {
+             fprintf (stderr,
+                      "malloc_before_dump: memory exhausted.\nEnlarge dumped_data[]!\n");
+             exit (-1);
+           }
+       }
+    }
+  return p;
+}
 
-      data_region_end -= size;
+/* Re-allocate the previously allocated block in ptr, making the new
+   block SIZE bytes long.  */
+void *
+realloc_after_dump (void *ptr, size_t size)
+{
+  void *p;
+
+  /* After dumping.  */
+  if (FREEABLE_P (ptr))
+    {
+      /* Reallocate the block since it lies in the new heap.  */
+      p = HeapReAlloc (heap, 0, ptr, size);
+      if (!p)
+       errno = ENOMEM;
     }
-  /* If size is positive, grow the heap by committing reserved pages.  */
-  else if (size > 0)
+  else
     {
-      /* Sanity checks.  */
-      if ((data_region_end + size) >
-         (data_region_base + get_reserved_heap_size ()))
-       return NULL;
-
-      /* Commit more of our heap. */
-      if (using_dynamic_heap
-         && VirtualAlloc (data_region_end, size, MEM_COMMIT,
-                          PAGE_READWRITE) == NULL)
-       return NULL;
-      data_region_end += size;
-
-      /* We really only commit full pages, so record where
-        the real end of committed memory is [cga].  */
-      real_data_region_end = (unsigned char *)
-         ((DWORD_PTR) (data_region_end + syspage_mask) & ~syspage_mask);
+      /* If the block lies in the dumped data, do not free it.  Only
+         allocate a new one.  */
+      p = HeapAlloc (heap, 0, size);
+      if (p)
+       CopyMemory (p, ptr, size);
+      else
+       errno = ENOMEM;
     }
+  /* After dump, keep track of the "brk value" for sbrk(0).  */
+  if (p)
+    {
+      unsigned char *new_brk = (unsigned char *)p + size;
 
-  return result;
+      if (new_brk > data_region_end)
+       data_region_end = new_brk;
+    }
+  return p;
 }
 
-/* Initialize the internal heap variables used by sbrk.  When running in
-   preload phase (ie. in the undumped executable), we rely entirely on a
-   fixed size heap section included in the .exe itself; this is
-   preserved during dumping, and truncated to the size actually used.
-
-   When running in the dumped executable, we reserve as much as possible
-   of the address range that is addressable by Lisp object pointers, to
-   supplement what is left of the preload heap.  Although we cannot rely
-   on the dynamically allocated arena being contiguous with the static
-   heap area, it is not a problem because sbrk can pretend that the gap
-   was allocated by something else; GNU malloc detects when there is a
-   jump in the sbrk values, and starts a new heap block.  */
-void
-init_heap (void)
+void *
+realloc_before_dump (void *ptr, size_t size)
 {
-  PIMAGE_DOS_HEADER dos_header;
-  PIMAGE_NT_HEADERS nt_header;
-
-  dos_header = (PIMAGE_DOS_HEADER) RVA_TO_PTR (0);
-  nt_header = (PIMAGE_NT_HEADERS) (((DWORD_PTR) dos_header) +
-                                  dos_header->e_lfanew);
-  preload_heap_section = find_section ("EMHEAP", nt_header);
+  void *p;
 
-  if (using_dynamic_heap)
+  /* Before dumping.  */
+  if (dumped_data < (unsigned char *)ptr
+      && (unsigned char *)ptr < bc_limit && size <= MaxBlockSize)
     {
-      data_region_base = allocate_heap ();
-      if (!data_region_base)
+      p = HeapReAlloc (heap, 0, ptr, size);
+      if (!p)
+       errno = ENOMEM;
+    }
+  else
+    {
+      /* In this case, either the new block is too large for the heap,
+         or the old block was already too large.  In both cases,
+         malloc_before_dump() and free_before_dump() will take care of
+         reallocation.  */
+      p = malloc_before_dump (size);
+      /* If SIZE is below MaxBlockSize, malloc_before_dump will try to
+        allocate it in the fixed heap.  If that fails, we could have
+        kept the block in its original place, above bc_limit, instead
+        of failing the call as below.  But this doesn't seem to be
+        worth the added complexity, as loadup allocates only a very
+        small number of large blocks, and never reallocates them.  */
+      if (p)
        {
-         printf ("Error: Could not reserve dynamic heap area.\n");
-         exit (1);
+         CopyMemory (p, ptr, size);
+         free_before_dump (ptr);
        }
+    }
+  return p;
+}
 
-#if !USE_LSB_TAG
-      /* Ensure that the addresses don't use the upper tag bits since
-        the Lisp type goes there.  */
-      if (((DWORD_PTR) data_region_base & ~VALMASK) != 0)
+/* Free a block allocated by `malloc', `realloc' or `calloc'.  */
+void
+free_after_dump (void *ptr)
+{
+  /* After dumping.  */
+  if (FREEABLE_P (ptr))
+    {
+      /* Free the block if it is in the new private heap.  */
+      HeapFree (heap, 0, ptr);
+    }
+}
+
+void
+free_before_dump (void *ptr)
+{
+  /* Before dumping.  */
+  if (dumped_data < (unsigned char *)ptr
+      && (unsigned char *)ptr < bc_limit)
+    {
+      /* Free the block if it is allocated in the private heap.  */
+      HeapFree (heap, 0, ptr);
+    }
+  else
+    {
+      /* Look for the big chunk.  */
+      int i;
+
+      for (i = 0; i < blocks_number; i++)
        {
-         printf ("Error: The heap was allocated in upper memory.\n");
-         exit (1);
+         if (blocks[i].address == ptr)
+           {
+             /* Reset block occupation if found.  */
+             blocks[i].occupied = 0;
+             break;
+           }
+         /* What if the block is not found?  We should trigger an
+            error here.  */
+         eassert (i < blocks_number);
        }
+    }
+}
+
+#ifdef ENABLE_CHECKING
+void
+report_temacs_memory_usage (void)
+{
+  DWORD blocks_used = 0;
+  size_t large_mem_used = 0;
+  int i;
+
+  for (i = 0; i < blocks_number; i++)
+    if (blocks[i].occupied)
+      {
+       blocks_used++;
+       large_mem_used += blocks[i].size;
+      }
+
+  /* Emulate 'message', which writes to stderr in non-interactive
+     sessions.  */
+  fprintf (stderr,
+          "Dump memory usage: Heap: %" PRIu64 "  Large blocks(%lu/%lu): %" PRIu64 "/%" PRIu64 "\n",
+          (unsigned long long)committed, blocks_used, blocks_number,
+          (unsigned long long)large_mem_used,
+          (unsigned long long)(dumped_data + DUMPED_HEAP_SIZE - bc_limit));
+}
 #endif
-      data_region_end = data_region_base;
-      real_data_region_end = data_region_end;
+
+/* Emulate getpagesize. */
+int
+getpagesize (void)
+{
+  return sysinfo_cache.dwPageSize;
+}
+
+void *
+sbrk (ptrdiff_t increment)
+{
+  /* data_region_end is the address beyond the last allocated byte.
+     The sbrk() function is not emulated at all, except for a 0 value
+     of its parameter.  This is needed by the Emacs Lisp function
+     `memory-limit'.  */
+  eassert (increment == 0);
+  return data_region_end;
+}
+
+#define MAX_BUFFER_SIZE (512 * 1024 * 1024)
+
+/* MMAP allocation for buffers.  */
+void *
+mmap_alloc (void **var, size_t nbytes)
+{
+  void *p = NULL;
+
+  /* We implement amortized allocation.  We start by reserving twice
+     the size requested and commit only the size requested.  Then
+     realloc could proceed and use the reserved pages, reallocating
+     only if needed.  Buffer shrink would happen only so that we stay
+     in the 2x range.  This is a big win when visiting compressed
+     files, where the final size of the buffer is not known in
+     advance, and the buffer is enlarged several times as the data is
+     decompressed on the fly.  */
+  if (nbytes < MAX_BUFFER_SIZE)
+    p = VirtualAlloc (NULL, (nbytes * 2), MEM_RESERVE, PAGE_READWRITE);
+
+  /* If it fails, or if the request is above 512MB, try with the
+     requested size.  */
+  if (p == NULL)
+    p = VirtualAlloc (NULL, nbytes, MEM_RESERVE, PAGE_READWRITE);
+
+  if (p != NULL)
+    {
+      /* Now, commit pages for NBYTES.  */
+      *var = VirtualAlloc (p, nbytes, MEM_COMMIT, PAGE_READWRITE);
     }
-  else
+
+  if (!p)
     {
-      data_region_base = RVA_TO_PTR (preload_heap_section->VirtualAddress);
-      data_region_end = data_region_base;
-      real_data_region_end = data_region_end;
-      reserved_heap_size = preload_heap_section->Misc.VirtualSize;
+      if (GetLastError () == ERROR_NOT_ENOUGH_MEMORY)
+       errno = ENOMEM;
+      else
+       {
+         DebPrint (("mmap_alloc: error %ld\n", GetLastError ()));
+         errno = EINVAL;
+       }
     }
 
-  /* Update system version information to match current system.  */
-  cache_system_info ();
+  return *var = p;
 }
 
-/* Round the heap up to the given alignment.  */
 void
-round_heap (size_t align)
+mmap_free (void **var)
 {
-  DWORD_PTR needs_to_be;
-  DWORD_PTR need_to_alloc;
+  if (*var)
+    {
+      if (VirtualFree (*var, 0, MEM_RELEASE) == 0)
+        DebPrint (("mmap_free: error %ld\n", GetLastError ()));
+      *var = NULL;
+    }
+}
+
+void *
+mmap_realloc (void **var, size_t nbytes)
+{
+  MEMORY_BASIC_INFORMATION memInfo, m2;
+
+  if (*var == NULL)
+    return mmap_alloc (var, nbytes);
+
+  /* This case happens in init_buffer().  */
+  if (nbytes == 0)
+    {
+      mmap_free (var);
+      return mmap_alloc (var, nbytes);
+    }
 
-  needs_to_be = (DWORD_PTR) ROUND_UP (get_heap_end (), align);
-  need_to_alloc = needs_to_be - (DWORD_PTR) get_heap_end ();
+  if (VirtualQuery (*var, &memInfo, sizeof (memInfo)) == 0)
+    DebPrint (("mmap_realloc: VirtualQuery error = %ld\n", GetLastError ()));
+
+  /* We need to enlarge the block.  */
+  if (memInfo.RegionSize < nbytes)
+    {
+      if (VirtualQuery (*var + memInfo.RegionSize, &m2, sizeof(m2)) == 0)
+        DebPrint (("mmap_realloc: VirtualQuery error = %ld\n",
+                  GetLastError ()));
+      /* If there is enough room in the current reserved area, then
+        commit more pages as needed.  */
+      if (m2.State == MEM_RESERVE
+         && nbytes <= memInfo.RegionSize + m2.RegionSize)
+       {
+         void *p;
+
+         p = VirtualAlloc (*var + memInfo.RegionSize,
+                           nbytes - memInfo.RegionSize,
+                           MEM_COMMIT, PAGE_READWRITE);
+         if (!p /* && GetLastError() != ERROR_NOT_ENOUGH_MEMORY */)
+           {
+             DebPrint (("realloc enlarge: VirtualAlloc error %ld\n",
+                        GetLastError ()));
+             errno = ENOMEM;
+           }
+         return *var;
+       }
+      else
+       {
+         /* Else we must actually enlarge the block by allocating a
+            new one and copying previous contents from the old to the
+            new one.  */
+         void *old_ptr = *var;
+
+         if (mmap_alloc (var, nbytes))
+           {
+             CopyMemory (*var, old_ptr, memInfo.RegionSize);
+             mmap_free (&old_ptr);
+             return *var;
+           }
+         else
+           {
+             /* We failed to enlarge the buffer.  */
+             *var = old_ptr;
+             return NULL;
+           }
+       }
+    }
+
+  /* If we are shrinking by more than one page...  */
+  if (memInfo.RegionSize  > nbytes + getpagesize())
+    {
+      /* If we are shrinking a lot...  */
+      if ((memInfo.RegionSize / 2) > nbytes)
+        {
+          /* Let's give some memory back to the system and release
+            some pages.  */
+          void *old_ptr = *var;
+
+         if (mmap_alloc (var, nbytes))
+            {
+              CopyMemory (*var, old_ptr, nbytes);
+              mmap_free (&old_ptr);
+              return *var;
+            }
+          else
+           {
+             /* In case we fail to shrink, try to go on with the old block.
+                But that means there is a lot of memory pressure.
+                We could also decommit pages.  */
+             *var = old_ptr;
+             return *var;
+           }
+        }
+
+      /* We still can decommit pages.  */
+      if (VirtualFree (*var + nbytes + get_page_size(),
+                      memInfo.RegionSize - nbytes - get_page_size(),
+                      MEM_DECOMMIT) == 0)
+        DebPrint (("mmap_realloc: VirtualFree error %ld\n", GetLastError ()));
+      return *var;
+    }
 
-  if (need_to_alloc)
-    sbrk (need_to_alloc);
+  /* Not enlarging, not shrinking by more than one page.  */
+  return *var;
 }
index d5791a3a23c636d18090ca0ea50dec07641c848f..787fe9ade5f1324cb41262b6cc0dab5ba63e6fd8 100644 (file)
@@ -27,15 +27,17 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 /*
  * Heap related stuff.
  */
-#define get_reserved_heap_size()       reserved_heap_size
-#define get_committed_heap_size()      (get_data_end () - get_data_start ())
-#define get_heap_start()               get_data_start ()
-#define get_heap_end()                 get_data_end ()
 
 extern unsigned char *get_data_start (void);
 extern unsigned char *get_data_end (void);
 extern size_t         reserved_heap_size;
-extern BOOL          using_dynamic_heap;
+extern BOOL           using_dynamic_heap;
+
+extern void *mmap_realloc (void **, size_t);
+extern void  mmap_free (void **);
+extern void *mmap_alloc (void **, size_t);
+
+extern void report_temacs_memory_usage (void);
 
 /* Emulation of Unix sbrk().  */
 extern void *sbrk (ptrdiff_t size);
@@ -43,11 +45,8 @@ extern void *sbrk (ptrdiff_t size);
 /* Initialize heap structures for sbrk on startup.  */
 extern void init_heap (void);
 
-/* Round the heap to this size.  */
-extern void round_heap (size_t size);
-
 /* ----------------------------------------------------------------- */
-/* Useful routines for manipulating memory-mapped files. */
+/* Useful routines for manipulating memory-mapped files.  */
 
 typedef struct file_data {
     char          *name;
@@ -61,11 +60,11 @@ int open_input_file (file_data *p_file, char *name);
 int open_output_file (file_data *p_file, char *name, unsigned long size);
 void close_file_data (file_data *p_file);
 
-/* Return pointer to section header for named section. */
+/* Return pointer to section header for named section.  */
 IMAGE_SECTION_HEADER * find_section (char * name, IMAGE_NT_HEADERS * nt_header);
 
 /* Return pointer to section header for section containing the given
-   relative virtual address. */
+   relative virtual address.  */
 IMAGE_SECTION_HEADER * rva_to_section (DWORD_PTR rva, IMAGE_NT_HEADERS * nt_header);
 
 #endif /* NTHEAP_H_ */
index 50538c5b4ba4baa892fcad8564d312ace50c05c2..7d10d88155c43b5b3ba2fea4d1781e824911f9bd 100644 (file)
@@ -411,7 +411,7 @@ w32_console_mouse_position (struct frame **f,
 
   *f = get_frame ();
   *bar_window = Qnil;
-  *part = 0;
+  *part = scroll_bar_above_handle;
   SELECTED_FRAME ()->mouse_moved = 0;
 
   XSETINT (*x, movement_pos.X);
@@ -587,7 +587,8 @@ resize_event (WINDOW_BUFFER_SIZE_RECORD *event)
 {
   struct frame *f = get_frame ();
 
-  change_frame_size (f, event->dwSize.X, event->dwSize.Y, 0, 1, 0, 0);
+  change_frame_size (f, event->dwSize.X, event->dwSize.Y
+                    - FRAME_MENU_BAR_LINES (f), 0, 1, 0, 0);
   SET_FRAME_GARBAGED (f);
 }
 
@@ -603,8 +604,8 @@ maybe_generate_resize_event (void)
      if the size hasn't actually changed.  */
   change_frame_size (f,
                     1 + info.srWindow.Right - info.srWindow.Left,
-                    1 + info.srWindow.Bottom - info.srWindow.Top,
-                    0, 0, 0, 0);
+                    1 + info.srWindow.Bottom - info.srWindow.Top
+                    - FRAME_MENU_BAR_LINES (f), 0, 1, 0, 0);
 }
 
 #if HAVE_W32NOTIFY
index 9117453e721cbe0d575cdb1ea568cb2c3054b41c..c4836211bc9946ebf499f61003675ee7c38840f6 100644 (file)
@@ -27,6 +27,6 @@ extern void w32_console_mouse_position (struct frame **f, int insist,
                                        Lisp_Object *bar_window,
                                        enum scroll_bar_part *part,
                                        Lisp_Object *x, Lisp_Object *y,
-                                       unsigned long *time);
+                                       Time *time);
 
 #endif /* EMACS_W32INEVT_H */
index a4acdfd9e91b140b62a0dfe458cbad89a49f5bcc..9f777167bf07298a76acda014d1639ba383b236c 100644 (file)
@@ -103,7 +103,7 @@ Lisp_Object Qdebug_on_next_call, Qunsupported__w32_dialog;
 void set_frame_menubar (struct frame *, bool, bool);
 
 #ifdef HAVE_DIALOGS
-static Lisp_Object w32_dialog_show (struct frame *, int, Lisp_Object, char**);
+static Lisp_Object w32_dialog_show (struct frame *, Lisp_Object, Lisp_Object, char **);
 #else
 static int is_simple_dialog (Lisp_Object);
 static Lisp_Object simple_dialog_show (struct frame *, Lisp_Object, Lisp_Object);
@@ -141,7 +141,7 @@ w32_popup_dialog (struct frame *f, Lisp_Object header, Lisp_Object contents)
 
       /* Display them in a dialog box.  */
       block_input ();
-      selection = w32_dialog_show (f, 0, title, header, &error_name);
+      selection = w32_dialog_show (f, title, header, &error_name);
       unblock_input ();
 
       discard_menu_items ();
@@ -376,12 +376,8 @@ set_frame_menubar (struct frame *f, bool first_time, bool deep_p)
       /* Convert menu_items into widget_value trees
         to display the menu.  This cannot evaluate Lisp code.  */
 
-      wv = xmalloc_widget_value ();
-      wv->name = "menubar";
-      wv->value = 0;
-      wv->enabled = 1;
+      wv = make_widget_value ("menubar", NULL, true, Qnil);
       wv->button_type = BUTTON_TYPE_NONE;
-      wv->help = Qnil;
       first_wv = wv;
 
       for (i = 0; i < last_i; i += 4)
@@ -444,12 +440,8 @@ set_frame_menubar (struct frame *f, bool first_time, bool deep_p)
       /* Make a widget-value tree containing
         just the top level menu bar strings.  */
 
-      wv = xmalloc_widget_value ();
-      wv->name = "menubar";
-      wv->value = 0;
-      wv->enabled = 1;
+      wv = make_widget_value ("menubar", NULL, true, Qnil);
       wv->button_type = BUTTON_TYPE_NONE;
-      wv->help = Qnil;
       first_wv = wv;
 
       items = FRAME_MENU_BAR_ITEMS (f);
@@ -461,12 +453,8 @@ set_frame_menubar (struct frame *f, bool first_time, bool deep_p)
          if (NILP (string))
            break;
 
-         wv = xmalloc_widget_value ();
-         wv->name = SSDATA (string);
-         wv->value = 0;
-         wv->enabled = 1;
+         wv = make_widget_value (SSDATA (string), NULL, true, Qnil);
          wv->button_type = BUTTON_TYPE_NONE;
-         wv->help = Qnil;
          /* This prevents lwlib from assuming this
             menu item is really supposed to be empty.  */
          /* The EMACS_INT cast avoids a warning.
@@ -515,7 +503,8 @@ set_frame_menubar (struct frame *f, bool first_time, bool deep_p)
     /* Force the window size to be recomputed so that the frame's text
        area remains the same, if menubar has just been created.  */
     if (old_widget == NULL)
-      x_set_window_size (f, 0, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f), 1);
+      adjust_frame_size (f, FRAME_TEXT_WIDTH (f),
+                        FRAME_TEXT_HEIGHT (f), 2, 0);
   }
 
   unblock_input ();
@@ -561,8 +550,9 @@ free_frame_menubar (struct frame *f)
 /* F is the frame the menu is for.
    X and Y are the frame-relative specified position,
    relative to the inside upper left corner of the frame F.
-   FOR_CLICK is nonzero if this menu was invoked for a mouse click.
-   KEYMAPS is 1 if this menu was specified with keymaps;
+   Bitfield MENUFLAGS bits are:
+   MENU_FOR_CLICK is set if this menu was invoked for a mouse click.
+   MENU_KEYMAPS is set if this menu was specified with keymaps;
     in that case, we return a list containing the chosen item's value
     and perhaps also the pane's prefix.
    TITLE is the specified menu title.
@@ -570,7 +560,7 @@ free_frame_menubar (struct frame *f)
    (We return nil on failure, but the value doesn't actually matter.)  */
 
 Lisp_Object
-w32_menu_show (struct frame *f, int x, int y, int for_click, int keymaps,
+w32_menu_show (struct frame *f, int x, int y, int menuflags,
               Lisp_Object title, const char **error)
 {
   int i;
@@ -600,12 +590,8 @@ w32_menu_show (struct frame *f, int x, int y, int for_click, int keymaps,
 
   /* Create a tree of widget_value objects
      representing the panes and their items.  */
-  wv = xmalloc_widget_value ();
-  wv->name = "menu";
-  wv->value = 0;
-  wv->enabled = 1;
+  wv = make_widget_value ("menu", NULL, true, Qnil);
   wv->button_type = BUTTON_TYPE_NONE;
-  wv->help = Qnil;
   first_wv = wv;
   first_pane = 1;
 
@@ -663,20 +649,16 @@ w32_menu_show (struct frame *f, int x, int y, int for_click, int keymaps,
          /* If the pane has a meaningful name,
             make the pane a top-level menu item
             with its items as a submenu beneath it.  */
-         if (!keymaps && strcmp (pane_string, ""))
+         if (!(menuflags & MENU_KEYMAPS) && strcmp (pane_string, ""))
            {
-             wv = xmalloc_widget_value ();
+             wv = make_widget_value (pane_string, NULL, true, Qnil);
              if (save_wv)
                save_wv->next = wv;
              else
                first_wv->contents = wv;
-             wv->name = pane_string;
-             if (keymaps && !NILP (prefix))
+             if ((menuflags & MENU_KEYMAPS) && !NILP (prefix))
                wv->name++;
-             wv->value = 0;
-             wv->enabled = 1;
              wv->button_type = BUTTON_TYPE_NONE;
-             wv->help = Qnil;
              save_wv = wv;
              prev_wv = 0;
            }
@@ -717,19 +699,17 @@ w32_menu_show (struct frame *f, int x, int y, int for_click, int keymaps,
              ASET (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY, descrip);
            }
 
-         wv = xmalloc_widget_value ();
+         wv = make_widget_value (SSDATA (item_name), NULL, !NILP (enable),
+                                 STRINGP (help) ? help : Qnil);
          if (prev_wv)
            prev_wv->next = wv;
          else
            save_wv->contents = wv;
-         wv->name = SSDATA (item_name);
          if (!NILP (descrip))
            wv->key = SSDATA (descrip);
-         wv->value = 0;
          /* Use the contents index as call_data, since we are
              restricted to 16-bits.  */
          wv->call_data = !NILP (def) ? (void *) (EMACS_INT) i : 0;
-         wv->enabled = !NILP (enable);
 
          if (NILP (type))
            wv->button_type = BUTTON_TYPE_NONE;
@@ -742,11 +722,6 @@ w32_menu_show (struct frame *f, int x, int y, int for_click, int keymaps,
 
          wv->selected = !NILP (selected);
 
-          if (!STRINGP (help))
-           help = Qnil;
-
-         wv->help = help;
-
          prev_wv = wv;
 
          i += MENU_ITEMS_ITEM_LENGTH;
@@ -756,25 +731,21 @@ w32_menu_show (struct frame *f, int x, int y, int for_click, int keymaps,
   /* Deal with the title, if it is non-nil.  */
   if (!NILP (title))
     {
-      widget_value *wv_title = xmalloc_widget_value ();
-      widget_value *wv_sep = xmalloc_widget_value ();
+      widget_value *wv_title;
+      widget_value *wv_sep = make_widget_value ("--", NULL, false, Qnil);
 
       /* Maybe replace this separator with a bitmap or owner-draw item
         so that it looks better.  Having two separators looks odd.  */
-      wv_sep->name = "--";
       wv_sep->next = first_wv->contents;
-      wv_sep->help = Qnil;
 
       if (unicode_append_menu)
        title = ENCODE_UTF_8 (title);
       else if (STRING_MULTIBYTE (title))
        title = ENCODE_SYSTEM (title);
 
-      wv_title->name = SSDATA (title);
-      wv_title->enabled = TRUE;
+      wv_title = make_widget_value (SSDATA (title), NULL, true, Qnil);
       wv_title->title = TRUE;
       wv_title->button_type = BUTTON_TYPE_NONE;
-      wv_title->help = Qnil;
       wv_title->next = wv_sep;
       first_wv->contents = wv_title;
     }
@@ -842,10 +813,10 @@ w32_menu_show (struct frame *f, int x, int y, int for_click, int keymaps,
            i += 1;
          else
            {
-             entry     = AREF (menu_items, i + MENU_ITEMS_ITEM_VALUE);
+             entry = AREF (menu_items, i + MENU_ITEMS_ITEM_VALUE);
              if (menu_item_selection == i)
                {
-                 if (keymaps != 0)
+                 if (menuflags & MENU_KEYMAPS)
                    {
                      int j;
 
@@ -863,7 +834,7 @@ w32_menu_show (struct frame *f, int x, int y, int for_click, int keymaps,
            }
        }
     }
-  else if (!for_click)
+  else if (!(menuflags & MENU_FOR_CLICK))
     {
       unblock_input ();
       /* Make "Cancel" equivalent to C-g.  */
@@ -904,9 +875,8 @@ static char * button_names [] = {
   "button6", "button7", "button8", "button9", "button10" };
 
 static Lisp_Object
-w32_dialog_show (struct frame *f, int keymaps,
-                Lisp_Object title, Lisp_Object header,
-                char **error)
+w32_dialog_show (struct frame *f, Lisp_Object title,
+                Lisp_Object header, char **error)
 {
   int i, nb_buttons = 0;
   char dialog_name[6];
@@ -930,19 +900,12 @@ w32_dialog_show (struct frame *f, int keymaps,
   /* Create a tree of widget_value objects
      representing the text label and buttons.  */
   {
-    Lisp_Object pane_name, prefix;
+    Lisp_Object pane_name;
     char *pane_string;
     pane_name = AREF (menu_items, MENU_ITEMS_PANE_NAME);
-    prefix = AREF (menu_items, MENU_ITEMS_PANE_PREFIX);
     pane_string = (NILP (pane_name)
                   ? "" : SSDATA (pane_name));
-    prev_wv = xmalloc_widget_value ();
-    prev_wv->value = pane_string;
-    if (keymaps && !NILP (prefix))
-      prev_wv->name++;
-    prev_wv->enabled = 1;
-    prev_wv->name = "message";
-    prev_wv->help = Qnil;
+    prev_wv = make_widget_value ("message", pane_string, true, Qnil);
     first_wv = prev_wv;
 
     /* Loop over all panes and items, filling in the tree.  */
@@ -979,15 +942,13 @@ w32_dialog_show (struct frame *f, int keymaps,
            return Qnil;
          }
 
-       wv = xmalloc_widget_value ();
+       wv = make_widget_value (button_names[nb_buttons],
+                               SSDATA (item_name),
+                               !NILP (enable), Qnil);
        prev_wv->next = wv;
-       wv->name = (char *) button_names[nb_buttons];
        if (!NILP (descrip))
          wv->key = SSDATA (descrip);
-       wv->value = SSDATA (item_name);
        wv->call_data = aref_addr (menu_items, i);
-       wv->enabled = !NILP (enable);
-       wv->help = Qnil;
        prev_wv = wv;
 
        if (! boundary_seen)
@@ -1002,9 +963,7 @@ w32_dialog_show (struct frame *f, int keymaps,
     if (! boundary_seen)
       left_count = nb_buttons - nb_buttons / 2;
 
-    wv = xmalloc_widget_value ();
-    wv->name = dialog_name;
-    wv->help = Qnil;
+    wv = make_widget_value (dialog_name, NULL, false, Qnil);
 
     /*  Frame title: 'Q' = Question, 'I' = Information.
         Can also have 'E' = Error if, one day, we want
@@ -1052,32 +1011,18 @@ w32_dialog_show (struct frame *f, int keymaps,
      the proper value.  */
   if (menu_item_selection != 0)
     {
-      Lisp_Object prefix;
-
-      prefix = Qnil;
       i = 0;
       while (i < menu_items_used)
        {
          Lisp_Object entry;
 
          if (EQ (AREF (menu_items, i), Qt))
-           {
-             prefix = AREF (menu_items, i + MENU_ITEMS_PANE_PREFIX);
-             i += MENU_ITEMS_PANE_LENGTH;
-           }
+           i += MENU_ITEMS_PANE_LENGTH;
          else
            {
-             entry     = AREF (menu_items, i + MENU_ITEMS_ITEM_VALUE);
+             entry = AREF (menu_items, i + MENU_ITEMS_ITEM_VALUE);
              if (menu_item_selection == i)
-               {
-                 if (keymaps != 0)
-                   {
-                     entry = Fcons (entry, Qnil);
-                     if (!NILP (prefix))
-                       entry = Fcons (prefix, entry);
-                   }
-                 return entry;
-               }
+               return entry;
              i += MENU_ITEMS_ITEM_LENGTH;
            }
        }
index 7155f16f3b0795cf52d696d8678364dea8aac305..86412b8a97439afad8447c912248e3494884f820 100644 (file)
@@ -247,7 +247,6 @@ watch_worker (LPVOID arg)
 
   do {
     BOOL status;
-    DWORD sleep_result;
     DWORD bytes_ret = 0;
 
     if (dirwatch->dir)
@@ -275,7 +274,7 @@ watch_worker (LPVOID arg)
     /* Sleep indefinitely until awoken by the I/O completion, which
        could be either a change notification or a cancellation of the
        watch.  */
-    sleep_result = SleepEx (INFINITE, TRUE);
+    SleepEx (INFINITE, TRUE);
   } while (!dirwatch->terminate);
 
   return 0;
@@ -287,7 +286,6 @@ static struct notification *
 start_watching (const char *file, HANDLE hdir, BOOL subdirs, DWORD flags)
 {
   struct notification *dirwatch = xzalloc (sizeof (struct notification));
-  HANDLE thr;
 
   dirwatch->signature = DIRWATCH_SIGNATURE;
   dirwatch->buf = xmalloc (16384);
index 96f116578923d5820248469bec7dfd7d550365ff..38452917addb9a301d15dce1be2035afb6169b6c 100644 (file)
@@ -32,6 +32,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <signal.h>
 #include <sys/file.h>
 #include <mbstring.h>
+#include <locale.h>
 
 /* must include CRT headers *before* config.h */
 #include <config.h>
@@ -1604,6 +1605,15 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp)
       program = ENCODE_FILE (full);
       cmdname = SDATA (program);
     }
+  else
+    {
+      char *p = alloca (strlen (cmdname) + 1);
+
+      /* Don't change the command name we were passed by our caller
+        (unixtodos_filename below will destructively mirror forward
+        slashes).  */
+      cmdname = strcpy (p, cmdname);
+    }
 
   /* make sure argv[0] and cmdname are both in DOS format */
   unixtodos_filename (cmdname);
@@ -1646,7 +1656,7 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp)
        strcpy (cmdname, egetenv ("CMDPROXY"));
       else
        {
-         strcpy (cmdname, SDATA (Vinvocation_directory));
+         lispstpcpy (cmdname, Vinvocation_directory);
          strcat (cmdname, "cmdproxy.exe");
        }
 
@@ -1772,12 +1782,12 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp)
       if (need_quotes)
        {
          int escape_char_run = 0;
-         char * first;
-         char * last;
+         /* char * first; */
+         /* char * last; */
 
          p = *targ;
-         first = p;
-         last = p + strlen (p) - 1;
+         /* first = p; */
+         /* last = p + strlen (p) - 1; */
          *parg++ = '"';
 #if 0
          /* This version does not escape quotes if they occur at the
@@ -2249,10 +2259,9 @@ static BOOL CALLBACK
 find_child_console (HWND hwnd, LPARAM arg)
 {
   child_process * cp = (child_process *) arg;
-  DWORD thread_id;
   DWORD process_id;
 
-  thread_id = GetWindowThreadProcessId (hwnd, &process_id);
+  GetWindowThreadProcessId (hwnd, &process_id);
   if (process_id == cp->procinfo.dwProcessId)
     {
       char window_class[32];
@@ -2909,7 +2918,7 @@ int_from_hex (char * s)
    function isn't given a context pointer.  */
 Lisp_Object Vw32_valid_locale_ids;
 
-static BOOL CALLBACK
+static BOOL CALLBACK ALIGN_STACK
 enum_locale_fn (LPTSTR localeNum)
 {
   DWORD id = int_from_hex (localeNum);
@@ -2973,7 +2982,7 @@ If successful, the new locale id is returned, otherwise nil.  */)
    function isn't given a context pointer.  */
 Lisp_Object Vw32_valid_codepages;
 
-static BOOL CALLBACK
+static BOOL CALLBACK ALIGN_STACK
 enum_codepage_fn (LPTSTR codepageNum)
 {
   DWORD id = atoi (codepageNum);
@@ -3145,6 +3154,190 @@ If successful, the new layout id is returned, otherwise nil.  */)
   return Fw32_get_keyboard_layout ();
 }
 
+/* Two variables to interface between get_lcid and the EnumLocales
+   callback function below.  */
+#ifndef LOCALE_NAME_MAX_LENGTH
+# define LOCALE_NAME_MAX_LENGTH 85
+#endif
+static LCID found_lcid;
+static char lname[3 * LOCALE_NAME_MAX_LENGTH + 1 + 1];
+
+/* Callback function for EnumLocales.  */
+static BOOL CALLBACK
+get_lcid_callback (LPTSTR locale_num_str)
+{
+  char *endp;
+  char locval[2 * LOCALE_NAME_MAX_LENGTH + 1 + 1];
+  LCID try_lcid = strtoul (locale_num_str, &endp, 16);
+
+  if (GetLocaleInfo (try_lcid, LOCALE_SABBREVLANGNAME,
+                    locval, LOCALE_NAME_MAX_LENGTH))
+    {
+      /* This is for when they only specify the language, as in "ENU".  */
+      if (stricmp (locval, lname) == 0)
+       {
+         found_lcid = try_lcid;
+         return FALSE;
+       }
+      strcat (locval, "_");
+      if (GetLocaleInfo (try_lcid, LOCALE_SABBREVCTRYNAME,
+                        locval + strlen (locval), LOCALE_NAME_MAX_LENGTH))
+       {
+         size_t locval_len = strlen (locval);
+
+         if (strnicmp (locval, lname, locval_len) == 0
+             && (lname[locval_len] == '.'
+                 || lname[locval_len] == '\0'))
+           {
+             found_lcid = try_lcid;
+             return FALSE;
+           }
+       }
+    }
+  return TRUE;
+}
+
+/* Return the Locale ID (LCID) number given the locale's name, a
+   string, in LOCALE_NAME.  This works by enumerating all the locales
+   supported by the system, until we find one whose name matches
+   LOCALE_NAME.  */
+static LCID
+get_lcid (const char *locale_name)
+{
+  /* A simple cache.  */
+  static LCID last_lcid;
+  static char last_locale[1000];
+
+  /* The code below is not thread-safe, as it uses static variables.
+     But this function is called only from the Lisp thread.  */
+  if (last_lcid > 0 && strcmp (locale_name, last_locale) == 0)
+    return last_lcid;
+
+  strncpy (lname, locale_name, sizeof (lname) - 1);
+  lname[sizeof (lname) - 1] = '\0';
+  found_lcid = 0;
+  EnumSystemLocales (get_lcid_callback, LCID_SUPPORTED);
+  if (found_lcid > 0)
+    {
+      last_lcid = found_lcid;
+      strcpy (last_locale, locale_name);
+    }
+  return found_lcid;
+}
+
+#ifndef _NSLCMPERROR
+# define _NSLCMPERROR INT_MAX
+#endif
+#ifndef LINGUISTIC_IGNORECASE
+# define LINGUISTIC_IGNORECASE  0x00000010
+#endif
+
+int
+w32_compare_strings (const char *s1, const char *s2, char *locname,
+                    int ignore_case)
+{
+  LCID lcid = GetThreadLocale ();
+  wchar_t *string1_w, *string2_w;
+  int val, needed;
+  extern BOOL g_b_init_compare_string_w;
+  static int (WINAPI *pCompareStringW)(LCID, DWORD, LPCWSTR, int, LPCWSTR, int);
+  DWORD flags = 0;
+
+  USE_SAFE_ALLOCA;
+
+  /* The LCID machinery doesn't seem to support the "C" locale, so we
+     need to do that by hand.  */
+  if (locname
+      && ((locname[0] == 'C' && (locname[1] == '\0' || locname[1] == '.'))
+         || strcmp (locname, "POSIX") == 0))
+    return (ignore_case ? stricmp (s1, s2) : strcmp (s1, s2));
+
+  if (!g_b_init_compare_string_w)
+    {
+      if (os_subtype == OS_9X)
+       {
+         pCompareStringW = GetProcAddress (LoadLibrary ("Unicows.dll"),
+                                           "CompareStringW");
+         if (!pCompareStringW)
+           {
+             errno = EINVAL;
+             /* This return value is compatible with wcscoll and
+                other MS CRT functions.  */
+             return _NSLCMPERROR;
+           }
+       }
+      else
+       pCompareStringW = CompareStringW;
+
+      g_b_init_compare_string_w = 1;
+    }
+
+  needed = pMultiByteToWideChar (CP_UTF8, MB_ERR_INVALID_CHARS, s1, -1, NULL, 0);
+  if (needed > 0)
+    {
+      SAFE_NALLOCA (string1_w, 1, needed + 1);
+      pMultiByteToWideChar (CP_UTF8, MB_ERR_INVALID_CHARS, s1, -1,
+                           string1_w, needed);
+    }
+  else
+    {
+      errno = EINVAL;
+      return _NSLCMPERROR;
+    }
+
+  needed = pMultiByteToWideChar (CP_UTF8, MB_ERR_INVALID_CHARS, s2, -1, NULL, 0);
+  if (needed > 0)
+    {
+      SAFE_NALLOCA (string2_w, 1, needed + 1);
+      pMultiByteToWideChar (CP_UTF8, MB_ERR_INVALID_CHARS, s2, -1,
+                           string2_w, needed);
+    }
+  else
+    {
+      SAFE_FREE ();
+      errno = EINVAL;
+      return _NSLCMPERROR;
+    }
+
+  if (locname)
+    {
+      /* Convert locale name string to LCID.  We don't want to use
+        LocaleNameToLCID because (a) it is only available since
+        Vista, and (b) it doesn't accept locale names returned by
+        'setlocale' and 'GetLocaleInfo'.  */
+      LCID new_lcid = get_lcid (locname);
+
+      if (new_lcid > 0)
+       lcid = new_lcid;
+      else
+       error ("Invalid locale %s: Invalid argument", locname);
+    }
+
+  if (ignore_case)
+    {
+      /* NORM_IGNORECASE ignores any tertiary distinction, not just
+        case variants.  LINGUISTIC_IGNORECASE is more selective, and
+        is sensitive to the locale's language, but it is not
+        available before Vista.  */
+      if (w32_major_version >= 6)
+       flags |= LINGUISTIC_IGNORECASE;
+      else
+       flags |= NORM_IGNORECASE;
+    }
+  /* This approximates what glibc collation functions do when the
+     locale's codeset is UTF-8.  */
+  if (!NILP (Vw32_collate_ignore_punctuation))
+    flags |= NORM_IGNORESYMBOLS;
+  val = pCompareStringW (lcid, flags, string1_w, -1, string2_w, -1);
+  SAFE_FREE ();
+  if (!val)
+    {
+      errno = EINVAL;
+      return _NSLCMPERROR;
+    }
+  return val - 2;
+}
+
 \f
 void
 syms_of_ntproc (void)
@@ -3255,6 +3448,20 @@ Any other non-nil value means do this even on remote and removable drives
 where the performance impact may be noticeable even on modern hardware.  */);
   Vw32_get_true_file_attributes = Qlocal;
 
+  DEFVAR_LISP ("w32-collate-ignore-punctuation",
+              Vw32_collate_ignore_punctuation,
+              doc: /* Non-nil causes string collation functions ignore punctuation on MS-Windows.
+On Posix platforms, `string-collate-lessp' and `string-collate-equalp'
+ignore punctuation characters when they compare strings, if the
+locale's codeset is UTF-8, as in \"en_US.UTF-8\".  Binding this option
+to a non-nil value will achieve a similar effect on MS-Windows, where
+locales with UTF-8 codeset are not supported.
+
+Note that setting this to non-nil will also ignore blanks and symbols
+in the strings.  So do NOT use this option when comparing file names
+for equality, only when you need to sort them.  */);
+  Vw32_collate_ignore_punctuation = Qnil;
+
   staticpro (&Vw32_valid_locale_ids);
   staticpro (&Vw32_valid_codepages);
 }
index 66cdbfaecb01b4035f07de2251a90aee324c4dd6..e8bcf3ef6392080bfde947ad5ded9b265936c19b 100644 (file)
@@ -50,6 +50,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "process.h"
 #include "atimer.h"
 #include "keymap.h"
+#include "menu.h"
 
 #ifdef WINDOWSNT
 #include "w32.h"       /* for filename_from_utf16, filename_from_ansi */
@@ -157,8 +158,11 @@ DWORD dwMainThreadId = 0;
 HANDLE hMainThread = NULL;
 
 int vertical_scroll_bar_min_handle;
+int horizontal_scroll_bar_min_handle;
 int vertical_scroll_bar_top_border;
 int vertical_scroll_bar_bottom_border;
+int horizontal_scroll_bar_left_border;
+int horizontal_scroll_bar_right_border;
 
 int last_scroll_bar_drag_pos;
 
@@ -454,7 +458,7 @@ x_set_frame_alpha (struct frame *f)
   if (!pfnSetLayeredWindowAttributes)
     return;
 
-  if (dpyinfo->x_highlight_frame == f)
+  if (dpyinfo->w32_focus_frame == f)
     alpha = f->alpha[0];
   else
     alpha = f->alpha[1];
@@ -999,7 +1003,7 @@ x_set_mouse_face_gc (struct glyph_string *s)
   else
     face_id = FACE_FOR_CHAR (s->f, face, 0, -1, Qnil);
   s->face = FACE_FROM_ID (s->f, face_id);
-  PREPARE_FACE_FOR_DISPLAY (s->f, s->face);
+  prepare_face_for_display (s->f, s->face);
 
   /* If font in this face is same as S->font, use it.  */
   if (s->font == s->face->font)
@@ -1049,7 +1053,7 @@ x_set_mode_line_face_gc (struct glyph_string *s)
 static inline void
 x_set_glyph_string_gc (struct glyph_string *s)
 {
-  PREPARE_FACE_FOR_DISPLAY (s->f, s->face);
+  prepare_face_for_display (s->f, s->face);
 
   if (s->hl == DRAW_NORMAL_TEXT)
     {
@@ -1078,10 +1082,7 @@ x_set_glyph_string_gc (struct glyph_string *s)
       s->stippled_p = s->face->stipple != 0;
     }
   else
-    {
-      s->gc = s->face->gc;
-      s->stippled_p = s->face->stipple != 0;
-    }
+    emacs_abort ();
 
   /* GC must have been set.  */
   eassert (s->gc != 0);
@@ -3339,11 +3340,15 @@ note_mouse_movement (struct frame *frame, MSG *msg)
                              Mouse Face
  ************************************************************************/
 
-static struct scroll_bar *x_window_to_scroll_bar (Window);
+static struct scroll_bar *x_window_to_scroll_bar (Window, int);
 static void x_scroll_bar_report_motion (struct frame **, Lisp_Object *,
                                        enum scroll_bar_part *,
                                        Lisp_Object *, Lisp_Object *,
-                                       unsigned long *);
+                                       Time *);
+static void x_horizontal_scroll_bar_report_motion (struct frame **, Lisp_Object *,
+                                                  enum scroll_bar_part *,
+                                                  Lisp_Object *, Lisp_Object *,
+                                                  Time *);
 static void x_check_fullscreen (struct frame *);
 
 static void
@@ -3351,6 +3356,7 @@ w32_define_cursor (Window window, Cursor cursor)
 {
   PostMessage (window, WM_EMACS_SETCURSOR, (WPARAM) cursor, 0);
 }
+
 /* Return the current position of the mouse.
    *fp should be a frame which indicates which display to ask about.
 
@@ -3374,7 +3380,7 @@ w32_define_cursor (Window window, Cursor cursor)
 static void
 w32_mouse_position (struct frame **fp, int insist, Lisp_Object *bar_window,
                    enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y,
-                   unsigned long *time)
+                   Time *time)
 {
   struct frame *f1;
   struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (*fp);
@@ -3382,7 +3388,14 @@ w32_mouse_position (struct frame **fp, int insist, Lisp_Object *bar_window,
   block_input ();
 
   if (dpyinfo->last_mouse_scroll_bar && insist == 0)
-    x_scroll_bar_report_motion (fp, bar_window, part, x, y, time);
+    {
+      struct scroll_bar *bar = dpyinfo->last_mouse_scroll_bar;
+
+      if (bar->horizontal)
+       x_horizontal_scroll_bar_report_motion (fp, bar_window, part, x, y, time);
+      else
+       x_scroll_bar_report_motion (fp, bar_window, part, x, y, time);
+    }
   else
     {
       POINT pt;
@@ -3410,7 +3423,7 @@ w32_mouse_position (struct frame **fp, int insist, Lisp_Object *bar_window,
        if (! f1)
          {
            struct scroll_bar *bar
-              = x_window_to_scroll_bar (WindowFromPoint (pt));
+              = x_window_to_scroll_bar (WindowFromPoint (pt), 2);
 
            if (bar)
              f1 = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
@@ -3435,7 +3448,7 @@ w32_mouse_position (struct frame **fp, int insist, Lisp_Object *bar_window,
            dpyinfo->last_mouse_glyph_frame = f1;
 
            *bar_window = Qnil;
-           *part = 0;
+           *part = scroll_bar_above_handle;
            *fp = f1;
            XSETINT (*x, pt.x);
            XSETINT (*y, pt.y);
@@ -3477,12 +3490,12 @@ w32_handle_tool_bar_click (struct frame *f, struct input_event *button_event)
 
 /* Scroll bar support.  */
 
-/* Given a window ID, find the struct scroll_bar which manages it.
-   This can be called in GC, so we have to make sure to strip off mark
-   bits.  */
+/* Given a window ID, find the struct scroll_bar which manages it
+   vertically.  This can be called in GC, so we have to make sure to
+   strip off mark bits.  */
 
 static struct scroll_bar *
-x_window_to_scroll_bar (Window window_id)
+x_window_to_scroll_bar (Window window_id, int type)
 {
   Lisp_Object tail, frame;
 
@@ -3500,7 +3513,10 @@ x_window_to_scroll_bar (Window window_id)
                               condemned = Qnil,
                               ! NILP (bar));
           bar = XSCROLL_BAR (bar)->next)
-       if (SCROLL_BAR_W32_WINDOW (XSCROLL_BAR (bar)) == window_id)
+       if (SCROLL_BAR_W32_WINDOW (XSCROLL_BAR (bar)) == window_id
+           && (type = 2
+               || (type == 1 && XSCROLL_BAR (bar)->horizontal)
+               || (type == 0 && !XSCROLL_BAR (bar)->horizontal)))
          return XSCROLL_BAR (bar);
     }
 
@@ -3509,7 +3525,7 @@ x_window_to_scroll_bar (Window window_id)
 
 
 \f
-/* Set the thumb size and position of scroll bar BAR.  We are currently
+/* Set the thumb size and position of vertical scroll bar BAR.  We are currently
    displaying PORTION out of a whole WHOLE, and our position POSITION.  */
 
 static void
@@ -3583,16 +3599,49 @@ w32_set_scroll_bar_thumb (struct scroll_bar *bar,
   unblock_input ();
 }
 
+/* Set the thumb size and position of horizontal scroll bar BAR.  We are currently
+   displaying PORTION out of a whole WHOLE, and our position POSITION.  */
+
+static void
+w32_set_horizontal_scroll_bar_thumb (struct scroll_bar *bar,
+                                    int portion, int position, int whole)
+{
+  Window w = SCROLL_BAR_W32_WINDOW (bar);
+  SCROLLINFO si;
+
+  block_input ();
+
+  si.cbSize = sizeof (si);
+  si.fMask = SIF_PAGE | SIF_POS | SIF_RANGE;
+  si.nMin = 0;
+  si.nMax = whole;
+  /* Allow nPage to be one larger than nPos so we don't allow to scroll
+     an already fully visible buffer.  */
+  si.nPage = min (portion, si.nMax) + 1;
+  si.nPos = min (position, si.nMax);
+  SetScrollInfo (w, SB_CTL, &si, TRUE);
+
+  unblock_input ();
+}
+
 \f
 /************************************************************************
                         Scroll bars, general
  ************************************************************************/
 
 static HWND
-my_create_scrollbar (struct frame * f, struct scroll_bar * bar)
+my_create_vscrollbar (struct frame * f, struct scroll_bar * bar)
+{
+  return (HWND) SendMessage (FRAME_W32_WINDOW (f),
+                            WM_EMACS_CREATEVSCROLLBAR, (WPARAM) f,
+                            (LPARAM) bar);
+}
+
+static HWND
+my_create_hscrollbar (struct frame * f, struct scroll_bar * bar)
 {
   return (HWND) SendMessage (FRAME_W32_WINDOW (f),
-                            WM_EMACS_CREATESCROLLBAR, (WPARAM) f,
+                            WM_EMACS_CREATEHSCROLLBAR, (WPARAM) f,
                             (LPARAM) bar);
 }
 
@@ -3662,7 +3711,7 @@ my_bring_window_to_top (HWND hwnd)
    scroll bar. */
 
 static struct scroll_bar *
-x_scroll_bar_create (struct window *w, int top, int left, int width, int height)
+x_scroll_bar_create (struct window *w, int left, int top, int width, int height, bool horizontal)
 {
   struct frame *f = XFRAME (WINDOW_FRAME (w));
   HWND hwnd;
@@ -3681,16 +3730,24 @@ x_scroll_bar_create (struct window *w, int top, int left, int width, int height)
   bar->start = 0;
   bar->end = 0;
   bar->dragging = 0;
+  bar->horizontal = horizontal;
 
   /* Requires geometry to be set before call to create the real window */
 
-  hwnd = my_create_scrollbar (f, bar);
+  if (horizontal)
+    hwnd = my_create_hscrollbar (f, bar);
+  else
+    hwnd = my_create_vscrollbar (f, bar);
 
   si.cbSize = sizeof (si);
   si.fMask = SIF_ALL;
   si.nMin = 0;
-  si.nMax = VERTICAL_SCROLL_BAR_TOP_RANGE (f, height)
-    + VERTICAL_SCROLL_BAR_MIN_HANDLE;
+  if (horizontal)
+    si.nMax = HORIZONTAL_SCROLL_BAR_LEFT_RANGE (f, width)
+      + HORIZONTAL_SCROLL_BAR_MIN_HANDLE;
+  else
+    si.nMax = VERTICAL_SCROLL_BAR_TOP_RANGE (f, height)
+      + VERTICAL_SCROLL_BAR_MIN_HANDLE;
   si.nPage = si.nMax;
   si.nPos = 0;
 
@@ -3726,15 +3783,18 @@ x_scroll_bar_remove (struct scroll_bar *bar)
   my_destroy_window (f, SCROLL_BAR_W32_WINDOW (bar));
 
   /* Dissociate this scroll bar from its window.  */
-  wset_vertical_scroll_bar (XWINDOW (bar->window), Qnil);
+  if (bar->horizontal)
+    wset_horizontal_scroll_bar (XWINDOW (bar->window), Qnil);
+  else
+    wset_vertical_scroll_bar (XWINDOW (bar->window), Qnil);
 
   unblock_input ();
 }
 
-/* Set the handle of the vertical scroll bar for WINDOW to indicate
-   that we are displaying PORTION characters out of a total of WHOLE
-   characters, starting at POSITION.  If WINDOW has no scroll bar,
-   create one.  */
+/* Set the handle of the vertical scroll bar for WINDOW to indicate that
+   we are displaying PORTION characters out of a total of WHOLE
+   characters, starting at POSITION.  If WINDOW has no vertical scroll
+   bar, create one.  */
 static void
 w32_set_vertical_scroll_bar (struct window *w,
                             int portion, int whole, int position)
@@ -3767,7 +3827,7 @@ w32_set_vertical_scroll_bar (struct window *w,
        }
       unblock_input ();
 
-      bar = x_scroll_bar_create (w, top, left, width, height);
+      bar = x_scroll_bar_create (w, left, top, width, height, 0);
     }
   else
     {
@@ -3831,6 +3891,106 @@ w32_set_vertical_scroll_bar (struct window *w,
   wset_vertical_scroll_bar (w, barobj);
 }
 
+/* Set the handle of the horizontal scroll bar for WINDOW to indicate
+   that we are displaying PORTION characters out of a total of WHOLE
+   characters, starting at POSITION.  If WINDOW has no horizontal scroll
+   bar, create one.  */
+static void
+w32_set_horizontal_scroll_bar (struct window *w,
+                              int portion, int whole, int position)
+{
+  struct frame *f = XFRAME (w->frame);
+  Lisp_Object barobj;
+  struct scroll_bar *bar;
+  int top, height, left, width;
+  int window_x, window_width;
+  int clear_left = WINDOW_LEFT_EDGE_X (w);
+  int clear_width = WINDOW_PIXEL_WIDTH (w) - WINDOW_RIGHT_DIVIDER_WIDTH (w);
+
+  /* Get window dimensions.  */
+  window_box (w, ANY_AREA, &window_x, 0, &window_width, 0);
+  left  = window_x;
+  height = WINDOW_SCROLL_BAR_AREA_HEIGHT (w);
+  width = window_width;
+  top = WINDOW_SCROLL_BAR_AREA_Y (w);
+
+  /* Does the scroll bar exist yet?  */
+  if (NILP (w->horizontal_scroll_bar))
+    {
+      HDC hdc;
+      block_input ();
+      if (width > 0 && height > 0)
+       {
+         hdc = get_frame_dc (f);
+         w32_clear_area (f, hdc, clear_left, top, clear_width, height);
+         release_frame_dc (f, hdc);
+       }
+      unblock_input ();
+
+      bar = x_scroll_bar_create (w, left, top, width, height, 1);
+    }
+  else
+    {
+      /* It may just need to be moved and resized.  */
+      HWND hwnd;
+
+      bar = XSCROLL_BAR (w->horizontal_scroll_bar);
+      hwnd = SCROLL_BAR_W32_WINDOW (bar);
+
+      /* If already correctly positioned, do nothing.  */
+      if (bar->left == left && bar->top == top
+         && bar->width == width && bar->height == height)
+        {
+          /* Redraw after clear_frame. */
+          if (!my_show_window (f, hwnd, SW_NORMAL))
+            InvalidateRect (hwnd, NULL, FALSE);
+        }
+      else
+        {
+          HDC hdc;
+         SCROLLINFO si;
+
+          block_input ();
+         if (width && height)
+           {
+             hdc = get_frame_dc (f);
+             /* Since Windows scroll bars are smaller than the space reserved
+                for them on the frame, we have to clear "under" them.  */
+             w32_clear_area (f, hdc, clear_left, top, clear_width, height);
+             release_frame_dc (f, hdc);
+           }
+          /* Make sure scroll bar is "visible" before moving, to ensure the
+             area of the parent window now exposed will be refreshed.  */
+          my_show_window (f, hwnd, SW_HIDE);
+          MoveWindow (hwnd, left, top, width, max (height, 1), TRUE);
+
+         /* +++ SetScrollInfo +++ */
+         si.cbSize = sizeof (si);
+         si.fMask = SIF_PAGE | SIF_POS | SIF_RANGE;
+         si.nMin = 0;
+         si.nMax = whole;
+         si.nPage = min (portion, si.nMax) + 1;
+         si.nPos = min (position, si.nMax);
+         SetScrollInfo (hwnd, SB_CTL, &si, FALSE);
+
+          my_show_window (f, hwnd, SW_NORMAL);
+          /* InvalidateRect (w, NULL, FALSE);  */
+
+          /* Remember new settings.  */
+          bar->left = left;
+          bar->top = top;
+          bar->width = width;
+          bar->height = height;
+
+          unblock_input ();
+        }
+    }
+
+  w32_set_horizontal_scroll_bar_thumb (bar, portion, position, whole);
+  XSETVECTOR (barobj, bar);
+  wset_horizontal_scroll_bar (w, barobj);
+}
+
 
 /* The following three hooks are used when we're doing a thorough
    redisplay of the frame.  We don't explicitly know which scroll bars
@@ -3847,17 +4007,22 @@ w32_set_vertical_scroll_bar (struct window *w,
 static void
 w32_condemn_scroll_bars (struct frame *frame)
 {
-  /* Transfer all the scroll bars to FRAME_CONDEMNED_SCROLL_BARS.  */
-  while (! NILP (FRAME_SCROLL_BARS (frame)))
+  if (!NILP (FRAME_SCROLL_BARS (frame)))
     {
-      Lisp_Object bar;
-      bar = FRAME_SCROLL_BARS (frame);
-      fset_scroll_bars (frame, XSCROLL_BAR (bar)->next);
-      XSCROLL_BAR (bar)->next = FRAME_CONDEMNED_SCROLL_BARS (frame);
-      XSCROLL_BAR (bar)->prev = Qnil;
-      if (! NILP (FRAME_CONDEMNED_SCROLL_BARS (frame)))
-       XSCROLL_BAR (FRAME_CONDEMNED_SCROLL_BARS (frame))->prev = bar;
-      fset_condemned_scroll_bars (frame, bar);
+      if (!NILP (FRAME_CONDEMNED_SCROLL_BARS (frame)))
+       {
+         /* Prepend scrollbars to already condemned ones.  */
+         Lisp_Object last = FRAME_SCROLL_BARS (frame);
+
+         while (!NILP (XSCROLL_BAR (last)->next))
+           last = XSCROLL_BAR (last)->next;
+
+         XSCROLL_BAR (last)->next = FRAME_CONDEMNED_SCROLL_BARS (frame);
+         XSCROLL_BAR (FRAME_CONDEMNED_SCROLL_BARS (frame))->prev = last;
+       }
+
+      fset_condemned_scroll_bars (frame, FRAME_SCROLL_BARS (frame));
+      fset_scroll_bars (frame, Qnil);
     }
 }
 
@@ -3866,47 +4031,84 @@ w32_condemn_scroll_bars (struct frame *frame)
    Note that WINDOW isn't necessarily condemned at all.  */
 
 static void
-w32_redeem_scroll_bar (struct window *window)
+w32_redeem_scroll_bar (struct window *w)
 {
   struct scroll_bar *bar;
   Lisp_Object barobj;
   struct frame *f;
 
   /* We can't redeem this window's scroll bar if it doesn't have one.  */
-  if (NILP (window->vertical_scroll_bar))
+  if (NILP (w->vertical_scroll_bar) && NILP (w->horizontal_scroll_bar))
     emacs_abort ();
 
-  bar = XSCROLL_BAR (window->vertical_scroll_bar);
-
-  /* Unlink it from the condemned list.  */
-  f = XFRAME (WINDOW_FRAME (window));
-  if (NILP (bar->prev))
+  if (!NILP (w->vertical_scroll_bar) && WINDOW_HAS_VERTICAL_SCROLL_BAR (w))
     {
-      /* If the prev pointer is nil, it must be the first in one of
-         the lists.  */
-      if (EQ (FRAME_SCROLL_BARS (f), window->vertical_scroll_bar))
-        /* It's not condemned.  Everything's fine.  */
-        return;
-      else if (EQ (FRAME_CONDEMNED_SCROLL_BARS (f),
-                   window->vertical_scroll_bar))
-        fset_condemned_scroll_bars (f, bar->next);
+      bar = XSCROLL_BAR (w->vertical_scroll_bar);
+      /* Unlink it from the condemned list.  */
+      f = XFRAME (WINDOW_FRAME (w));
+      if (NILP (bar->prev))
+       {
+         /* If the prev pointer is nil, it must be the first in one of
+            the lists.  */
+         if (EQ (FRAME_SCROLL_BARS (f), w->vertical_scroll_bar))
+           /* It's not condemned.  Everything's fine.  */
+           goto horizontal;
+         else if (EQ (FRAME_CONDEMNED_SCROLL_BARS (f),
+                      w->vertical_scroll_bar))
+           fset_condemned_scroll_bars (f, bar->next);
+         else
+           /* If its prev pointer is nil, it must be at the front of
+              one or the other!  */
+           emacs_abort ();
+       }
       else
-        /* If its prev pointer is nil, it must be at the front of
-           one or the other!  */
-        emacs_abort ();
+       XSCROLL_BAR (bar->prev)->next = bar->next;
+
+      if (! NILP (bar->next))
+       XSCROLL_BAR (bar->next)->prev = bar->prev;
+
+      bar->next = FRAME_SCROLL_BARS (f);
+      bar->prev = Qnil;
+      XSETVECTOR (barobj, bar);
+      fset_scroll_bars (f, barobj);
+      if (! NILP (bar->next))
+       XSETVECTOR (XSCROLL_BAR (bar->next)->prev, bar);
     }
-  else
-    XSCROLL_BAR (bar->prev)->next = bar->next;
 
-  if (! NILP (bar->next))
-    XSCROLL_BAR (bar->next)->prev = bar->prev;
+ horizontal:
+  if (!NILP (w->horizontal_scroll_bar) && WINDOW_HAS_HORIZONTAL_SCROLL_BAR (w))
+    {
+      bar = XSCROLL_BAR (w->horizontal_scroll_bar);
+      /* Unlink it from the condemned list.  */
+      f = XFRAME (WINDOW_FRAME (w));
+      if (NILP (bar->prev))
+       {
+         /* If the prev pointer is nil, it must be the first in one of
+            the lists.  */
+         if (EQ (FRAME_SCROLL_BARS (f), w->horizontal_scroll_bar))
+           /* It's not condemned.  Everything's fine.  */
+           return;
+         else if (EQ (FRAME_CONDEMNED_SCROLL_BARS (f),
+                      w->horizontal_scroll_bar))
+           fset_condemned_scroll_bars (f, bar->next);
+         else
+           /* If its prev pointer is nil, it must be at the front of
+              one or the other!  */
+           emacs_abort ();
+       }
+      else
+       XSCROLL_BAR (bar->prev)->next = bar->next;
 
-  bar->next = FRAME_SCROLL_BARS (f);
-  bar->prev = Qnil;
-  XSETVECTOR (barobj, bar);
-  fset_scroll_bars (f, barobj);
-  if (! NILP (bar->next))
-    XSETVECTOR (XSCROLL_BAR (bar->next)->prev, bar);
+      if (! NILP (bar->next))
+       XSCROLL_BAR (bar->next)->prev = bar->prev;
+
+      bar->next = FRAME_SCROLL_BARS (f);
+      bar->prev = Qnil;
+      XSETVECTOR (barobj, bar);
+      fset_scroll_bars (f, barobj);
+      if (! NILP (bar->next))
+       XSETVECTOR (XSCROLL_BAR (bar->next)->prev, bar);
+    }
 }
 
 /* Remove all scroll bars on FRAME that haven't been saved since the
@@ -3937,8 +4139,9 @@ w32_judge_scroll_bars (struct frame *f)
      and they should get garbage-collected.  */
 }
 
-/* Handle a mouse click on the scroll bar BAR.  If *EMACS_EVENT's kind
-   is set to something other than NO_EVENT, it is enqueued.
+/* Handle a mouse click on the vertical scroll bar BAR.  If
+   *EMACS_EVENT's kind is set to something other than NO_EVENT, it is
+   enqueued.
 
    This may be called from a signal handler, so we have to ignore GC
    mark bits.  */
@@ -3963,17 +4166,24 @@ w32_scroll_bar_handle_click (struct scroll_bar *bar, W32Msg *msg,
     int y;
     int dragging = bar->dragging;
     SCROLLINFO si;
+    int sb_event = LOWORD (msg->msg.wParam);
 
     si.cbSize = sizeof (si);
-    si.fMask = SIF_POS;
+    if (sb_event == SB_THUMBTRACK)
+      si.fMask = SIF_TRACKPOS;
+    else
+      si.fMask = SIF_POS;
 
     GetScrollInfo ((HWND) msg->msg.lParam, SB_CTL, &si);
-    y = si.nPos;
+    if (sb_event == SB_THUMBTRACK)
+      y = si.nTrackPos;
+    else
+      y = si.nPos;
 
     bar->dragging = 0;
     FRAME_DISPLAY_INFO (f)->last_mouse_scroll_bar_pos = msg->msg.wParam;
 
-    switch (LOWORD (msg->msg.wParam))
+    switch (sb_event)
       {
       case SB_LINEDOWN:
        emacs_event->part = scroll_bar_down_arrow;
@@ -3997,8 +4207,6 @@ w32_scroll_bar_handle_click (struct scroll_bar *bar, W32Msg *msg,
        break;
       case SB_THUMBTRACK:
       case SB_THUMBPOSITION:
-       if (VERTICAL_SCROLL_BAR_TOP_RANGE (f, bar->height) <= 0xffff)
-          y = HIWORD (msg->msg.wParam);
        bar->dragging = 1; /* ??????? */
        emacs_event->part = scroll_bar_handle;
 
@@ -4045,14 +4253,128 @@ w32_scroll_bar_handle_click (struct scroll_bar *bar, W32Msg *msg,
   }
 }
 
-/* Return information to the user about the current position of the mouse
-   on the scroll bar.  */
+/* Handle a mouse click on the horizontal scroll bar BAR.  If
+   *EMACS_EVENT's kind is set to something other than NO_EVENT, it is
+   enqueued.
+
+   This may be called from a signal handler, so we have to ignore GC
+   mark bits.  */
+
+static int
+w32_horizontal_scroll_bar_handle_click (struct scroll_bar *bar, W32Msg *msg,
+                                       struct input_event *emacs_event)
+{
+  if (! WINDOWP (bar->window))
+    emacs_abort ();
 
+  emacs_event->kind = HORIZONTAL_SCROLL_BAR_CLICK_EVENT;
+  emacs_event->code = 0;
+  /* not really meaningful to distinguish left/right */
+  emacs_event->modifiers = msg->dwModifiers;
+  emacs_event->frame_or_window = bar->window;
+  emacs_event->arg = Qnil;
+  emacs_event->timestamp = msg->msg.time;
+
+  {
+    int left_range = HORIZONTAL_SCROLL_BAR_LEFT_RANGE (f, bar->width);
+    int x, y;
+    int dragging = bar->dragging;
+    SCROLLINFO si;
+    int sb_event = LOWORD (msg->msg.wParam);
+
+    si.cbSize = sizeof (si);
+    if (sb_event == SB_THUMBTRACK)
+      si.fMask = SIF_TRACKPOS | SIF_PAGE | SIF_RANGE;
+    else
+      si.fMask = SIF_POS | SIF_PAGE | SIF_RANGE;
+
+    GetScrollInfo ((HWND) msg->msg.lParam, SB_CTL, &si);
+    if (sb_event == SB_THUMBTRACK)
+      x = si.nTrackPos;
+    else
+      x = si.nPos;
+    y = si.nMax - si.nPage;
+
+    bar->dragging = 0;
+    FRAME_DISPLAY_INFO (f)->last_mouse_scroll_bar_pos = msg->msg.wParam;
+
+    switch (sb_event)
+      {
+      case SB_LINELEFT:
+       emacs_event->part = scroll_bar_left_arrow;
+       break;
+      case SB_LINERIGHT:
+       emacs_event->part = scroll_bar_right_arrow;
+       break;
+      case SB_PAGELEFT:
+       emacs_event->part = scroll_bar_before_handle;
+       break;
+      case SB_PAGERIGHT:
+       emacs_event->part = scroll_bar_after_handle;
+       break;
+      case SB_LEFT:
+       emacs_event->part = scroll_bar_horizontal_handle;
+       x = 0;
+       break;
+      case SB_RIGHT:
+       emacs_event->part = scroll_bar_horizontal_handle;
+       x = left_range;
+       break;
+      case SB_THUMBTRACK:
+      case SB_THUMBPOSITION:
+       bar->dragging = 1;
+       emacs_event->part = scroll_bar_horizontal_handle;
+
+       /* "Silently" update current position.  */
+       {
+         SCROLLINFO si;
+
+         si.cbSize = sizeof (si);
+         si.fMask = SIF_POS;
+         si.nPos = min (x, XWINDOW (bar->window)->hscroll_whole - 1);
+         /* Remember apparent position (we actually lag behind the real
+            position, so don't set that directly).  */
+         last_scroll_bar_drag_pos = x;
+
+         SetScrollInfo (SCROLL_BAR_W32_WINDOW (bar), SB_CTL, &si, FALSE);
+       }
+       break;
+      case SB_ENDSCROLL:
+       /* If this is the end of a drag sequence, then reset the scroll
+          handle size to normal and do a final redraw.  Otherwise do
+          nothing.  */
+       if (dragging)
+         {
+           SCROLLINFO si;
+           int start = bar->start;
+           int end = bar->end;
+
+           si.cbSize = sizeof (si);
+           si.fMask = SIF_POS;
+           si.nPos = min (last_scroll_bar_drag_pos,
+                          XWINDOW (bar->window)->hscroll_whole - 1);
+           SetScrollInfo (SCROLL_BAR_W32_WINDOW (bar), SB_CTL, &si, TRUE);
+         }
+       /* fall through */
+      default:
+       emacs_event->kind = NO_EVENT;
+       return FALSE;
+      }
+
+    XSETINT (emacs_event->x, x);
+    XSETINT (emacs_event->y, y);
+
+    return TRUE;
+  }
+}
+
+/* Return information to the user about the current position of the mouse
+   on the vertical scroll bar.  */
 static void
 x_scroll_bar_report_motion (struct frame **fp, Lisp_Object *bar_window,
                            enum scroll_bar_part *part,
                            Lisp_Object *x, Lisp_Object *y,
-                           unsigned long *time)
+                           Time *time)
 {
   struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (*fp);
   struct scroll_bar *bar = dpyinfo->last_mouse_scroll_bar;
@@ -4061,6 +4383,7 @@ x_scroll_bar_report_motion (struct frame **fp, Lisp_Object *bar_window,
   int pos;
   int top_range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, bar->height);
   SCROLLINFO si;
+  int sb_event = LOWORD (dpyinfo->last_mouse_scroll_bar_pos);
 
   block_input ();
 
@@ -4068,28 +4391,21 @@ x_scroll_bar_report_motion (struct frame **fp, Lisp_Object *bar_window,
   *bar_window = bar->window;
 
   si.cbSize = sizeof (si);
-  si.fMask = SIF_POS | SIF_PAGE | SIF_RANGE;
+  if (sb_event == SB_THUMBTRACK)
+    si.fMask = SIF_TRACKPOS | SIF_PAGE | SIF_RANGE;
+  else
+    si.fMask = SIF_POS | SIF_PAGE | SIF_RANGE;
 
   GetScrollInfo (w, SB_CTL, &si);
-  pos = si.nPos;
+  if (sb_event == SB_THUMBTRACK)
+    pos = si.nTrackPos;
+  else
+    pos = si.nPos;
   top_range = si.nMax - si.nPage + 1;
 
-  switch (LOWORD (dpyinfo->last_mouse_scroll_bar_pos))
-  {
-  case SB_THUMBPOSITION:
-  case SB_THUMBTRACK:
-      *part = scroll_bar_handle;
-      if (VERTICAL_SCROLL_BAR_TOP_RANGE (f, bar->height) <= 0xffff)
-       pos = HIWORD (dpyinfo->last_mouse_scroll_bar_pos);
-      break;
-  case SB_LINEDOWN:
-      *part = scroll_bar_handle;
-      pos++;
-      break;
-  default:
-      *part = scroll_bar_handle;
-      break;
-  }
+  *part = scroll_bar_handle;
+  if (sb_event == SB_LINEDOWN)
+    pos++;
 
   XSETINT (*x, pos);
   XSETINT (*y, top_range);
@@ -4102,6 +4418,57 @@ x_scroll_bar_report_motion (struct frame **fp, Lisp_Object *bar_window,
   unblock_input ();
 }
 
+/* Return information to the user about the current position of the mouse
+   on the horizontal scroll bar.  */
+static void
+x_horizontal_scroll_bar_report_motion (struct frame **fp, Lisp_Object *bar_window,
+                                      enum scroll_bar_part *part,
+                                      Lisp_Object *x, Lisp_Object *y,
+                                      Time *time)
+{
+  struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (*fp);
+  struct scroll_bar *bar = dpyinfo->last_mouse_scroll_bar;
+  Window w = SCROLL_BAR_W32_WINDOW (bar);
+  struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
+  int pos;
+  int left_range = HORIZONTAL_SCROLL_BAR_LEFT_RANGE (f, bar->width);
+  SCROLLINFO si;
+  int sb_event = LOWORD (dpyinfo->last_mouse_scroll_bar_pos);
+
+  block_input ();
+
+  *fp = f;
+  *bar_window = bar->window;
+
+  si.cbSize = sizeof (si);
+  if (sb_event == SB_THUMBTRACK)
+    si.fMask = SIF_TRACKPOS | SIF_PAGE | SIF_RANGE;
+  else
+    si.fMask = SIF_POS | SIF_PAGE | SIF_RANGE;
+
+  GetScrollInfo (w, SB_CTL, &si);
+  if (sb_event == SB_THUMBTRACK)
+    pos = si.nTrackPos;
+  else
+    pos = si.nPos;
+  left_range = si.nMax - si.nPage + 1;
+
+  *part = scroll_bar_handle;
+  if (sb_event == SB_LINERIGHT)
+    pos++;
+
+
+  XSETINT (*y, pos);
+  XSETINT (*x, left_range);
+
+  f->mouse_moved = 0;
+  dpyinfo->last_mouse_scroll_bar = NULL;
+
+  *time = dpyinfo->last_mouse_movement_time;
+
+  unblock_input ();
+}
+
 
 /* The screen has been cleared so we may have changed foreground or
    background colors, and the scroll bars may need to be redrawn.
@@ -4116,7 +4483,8 @@ x_scroll_bar_clear (struct frame *f)
   /* We can have scroll bars even if this is 0,
      if we just turned off scroll bar mode.
      But in that case we should not clear them.  */
-  if (FRAME_HAS_VERTICAL_SCROLL_BARS (f))
+  if (FRAME_HAS_VERTICAL_SCROLL_BARS (f)
+      || FRAME_HAS_HORIZONTAL_SCROLL_BARS (f))
     for (bar = FRAME_SCROLL_BARS (f); VECTORP (bar);
          bar = XSCROLL_BAR (bar)->next)
       {
@@ -4137,7 +4505,18 @@ x_scroll_bar_clear (struct frame *f)
       }
 }
 
-\f
+static void
+set_frame_param (struct frame *f, Lisp_Object prop, Lisp_Object val)
+{
+  register Lisp_Object old_alist_elt;
+
+  old_alist_elt = Fassq (prop, f->param_alist);
+  if (EQ (old_alist_elt, Qnil))
+    fset_param_alist (f, Fcons (Fcons (prop, val), f->param_alist));
+  else
+    Fsetcdr (old_alist_elt, val);
+}
+
 /* The main W32 event-reading loop - w32_read_socket.  */
 
 /* Record the last 100 characters stored
@@ -4538,10 +4917,11 @@ w32_read_socket (struct terminal *terminal,
                    Emacs events should reflect only motion after
                    the ButtonPress.  */
                 if (f != 0)
-                  f->mouse_moved = 0;
-
-                if (!tool_bar_p)
-                  last_tool_bar_item = -1;
+                 {
+                   f->mouse_moved = 0;
+                   if (!tool_bar_p)
+                     f->last_tool_bar_item = -1;
+                 }
              }
            break;
          }
@@ -4566,9 +4946,9 @@ w32_read_socket (struct terminal *terminal,
                   should reflect only motion after the
                   ButtonPress.  */
                f->mouse_moved = 0;
+               f->last_tool_bar_item = -1;
              }
            dpyinfo->last_mouse_frame = f;
-           last_tool_bar_item = -1;
          }
          break;
 
@@ -4579,10 +4959,20 @@ w32_read_socket (struct terminal *terminal,
            construct_drag_n_drop (&inev, &msg, f);
          break;
 
+       case WM_HSCROLL:
+         {
+           struct scroll_bar *bar =
+             x_window_to_scroll_bar ((HWND)msg.msg.lParam, 1);
+
+           if (bar)
+             w32_horizontal_scroll_bar_handle_click (bar, &msg, &inev);
+           break;
+         }
+
        case WM_VSCROLL:
          {
            struct scroll_bar *bar =
-             x_window_to_scroll_bar ((HWND)msg.msg.lParam);
+             x_window_to_scroll_bar ((HWND)msg.msg.lParam, 0);
 
            if (bar)
              w32_scroll_bar_handle_click (bar, &msg, &inev);
@@ -4767,8 +5157,8 @@ w32_read_socket (struct terminal *terminal,
                  width = rect.right - rect.left;
                  text_width = FRAME_PIXEL_TO_TEXT_WIDTH (f, width);
                  text_height = FRAME_PIXEL_TO_TEXT_HEIGHT (f, height);
-                 rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, height);
-                 columns = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, width);
+                 /* rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, height); */
+                 /* columns = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, width); */
 
                  /* TODO: Clip size to the screen dimensions.  */
 
@@ -4784,10 +5174,6 @@ w32_read_socket (struct terminal *terminal,
                      change_frame_size (f, text_width, text_height, 0, 1, 0, 1);
                      SET_FRAME_GARBAGED (f);
                      cancel_mouse_face (f);
-                     /* Do we want to set these here ????  */
-                     /**               FRAME_PIXEL_WIDTH (f) = width; **/
-                     /**               FRAME_TEXT_WIDTH (f) = text_width; **/
-                     /**               FRAME_PIXEL_HEIGHT (f) = height; **/
                      f->win_gravity = NorthWestGravity;
                    }
                }
@@ -5437,8 +5823,6 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
   FRAME_COLUMN_WIDTH (f) = unit = font->average_width;
   FRAME_LINE_HEIGHT (f) = font->height;
 
-  compute_fringe_widths (f, 1);
-
   /* Compute number of scrollbar columns.  */
   unit = FRAME_COLUMN_WIDTH (f);
   if (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) > 0)
@@ -5458,8 +5842,8 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
         doing it because it's done in Fx_show_tip, and it leads to
         problems because the tip frame has no widget.  */
       if (NILP (tip_frame) || XFRAME (tip_frame) != f)
-       x_set_window_size (f, 0, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
-                          FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 1);
+       adjust_frame_size (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
+                          FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, 0);
     }
 
   /* X version sets font of input methods here also.  */
@@ -5579,6 +5963,47 @@ x_set_offset (struct frame *f, register int xoff, register int yoff,
   unblock_input ();
 }
 
+/* Calculate fullscreen size.  Return in *TOP_POS and *LEFT_POS the
+   wanted positions of the WM window (not Emacs window).
+   Return in *WIDTH and *HEIGHT the wanted width and height of Emacs
+   window (FRAME_X_WINDOW).
+ */
+
+static void
+x_fullscreen_adjust (struct frame *f, int *width, int *height, int *top_pos, int *left_pos)
+{
+  int newwidth = FRAME_COLS (f);
+  int newheight = FRAME_LINES (f);
+  Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
+
+  *top_pos = f->top_pos;
+  *left_pos = f->left_pos;
+
+  if (f->want_fullscreen & FULLSCREEN_HEIGHT)
+    {
+      int ph;
+
+      ph = x_display_pixel_height (dpyinfo);
+      newheight = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, ph);
+      ph = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, newheight) - f->y_pixels_diff;
+      newheight = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, ph);
+      *top_pos = 0;
+    }
+
+  if (f->want_fullscreen & FULLSCREEN_WIDTH)
+    {
+      int pw;
+
+      pw = x_display_pixel_width (dpyinfo);
+      newwidth = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, pw);
+      pw = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, newwidth) - f->x_pixels_diff;
+      newwidth = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, pw);
+      *left_pos = 0;
+    }
+
+  *width = newwidth;
+  *height = newheight;
+}
 
 /* Check if we need to resize the frame due to a fullscreen request.
    If so needed, resize the frame.  */
@@ -5615,6 +6040,7 @@ w32fullscreen_hook (struct frame *f)
       HWND hwnd = FRAME_W32_WINDOW(f);
       DWORD dwStyle = GetWindowLong (hwnd, GWL_STYLE);
       RECT rect;
+      enum fullscreen_type prev_fsmode = FRAME_PREV_FSMODE (f);
 
       block_input();
       f->want_fullscreen &= ~FULLSCREEN_WAIT;
@@ -5636,7 +6062,14 @@ w32fullscreen_hook (struct frame *f)
       if (f->want_fullscreen == FULLSCREEN_NONE)
        ShowWindow (hwnd, SW_SHOWNORMAL);
       else if (f->want_fullscreen == FULLSCREEN_MAXIMIZED)
-       ShowWindow (hwnd, SW_MAXIMIZE);
+       {
+         if (prev_fsmode == FULLSCREEN_BOTH || prev_fsmode == FULLSCREEN_WIDTH
+             || prev_fsmode == FULLSCREEN_HEIGHT)
+           /* Make window normal since otherwise the subsequent
+              maximization might fail in some cases.  */
+           ShowWindow (hwnd, SW_SHOWNORMAL);
+         ShowWindow (hwnd, SW_MAXIMIZE);
+       }
       else if (f->want_fullscreen == FULLSCREEN_BOTH)
         {
          w32_fullscreen_rect (hwnd, f->want_fullscreen,
@@ -5671,70 +6104,40 @@ void
 x_set_window_size (struct frame *f, int change_gravity, int width, int height, bool pixelwise)
 {
   int pixelwidth, pixelheight;
+  RECT rect;
 
   block_input ();
 
-  check_frame_size (f, &width, &height, pixelwise);
-
-  compute_fringe_widths (f, 0);
-
-  if (frame_resize_pixelwise)
+  if (pixelwise)
     {
-      if (pixelwise)
-       {
-         pixelwidth = FRAME_TEXT_TO_PIXEL_WIDTH (f, width);
-         pixelheight = FRAME_TEXT_TO_PIXEL_HEIGHT (f, height);
-       }
-      else
-       {
-         pixelwidth = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, width);
-         pixelheight = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, height);
-       }
+      pixelwidth = FRAME_TEXT_TO_PIXEL_WIDTH (f, width);
+      pixelheight = FRAME_TEXT_TO_PIXEL_HEIGHT (f, height);
     }
   else
     {
-      /* If we don't resize frames pixelwise, round sizes to multiples
-        of character sizes here.  Otherwise, when enforcing size hints
-        while processing WM_WINDOWPOSCHANGING in w32_wnd_proc, we might
-        clip our frame rectangle to a multiple of the frame's character
-        size and subsequently lose our mode line or scroll bar.
-        Bug#16923 could be one possible consequence of this.  Carefully
-        reverse-engineer what WM_WINDOWPOSCHANGING does here since
-        otherwise we might make our frame too small, see Bug#17077.  */
-      int unit_width = FRAME_COLUMN_WIDTH (f);
-      int unit_height = FRAME_LINE_HEIGHT (f);
-
-      pixelwidth = (((((pixelwise ? width : (width * FRAME_COLUMN_WIDTH (f)))
-                      + FRAME_TOTAL_FRINGE_WIDTH (f))
-                     / unit_width) * unit_width)
-                   + FRAME_SCROLL_BAR_AREA_WIDTH (f)
-                   + 2 * FRAME_INTERNAL_BORDER_WIDTH (f));
-
-      pixelheight = ((((pixelwise ? height : (height * FRAME_LINE_HEIGHT (f)))
-                      / unit_height) * unit_height)
-                    + 2 * FRAME_INTERNAL_BORDER_WIDTH (f));
+      pixelwidth = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, width);
+      pixelheight = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, height);
     }
 
   f->win_gravity = NorthWestGravity;
   x_wm_set_size_hint (f, (long) 0, 0);
 
-  {
-    RECT rect;
+  f->want_fullscreen = FULLSCREEN_NONE;
+  w32fullscreen_hook (f);
 
-    rect.left = rect.top = 0;
-    rect.right = pixelwidth;
-    rect.bottom = pixelheight;
+  rect.left = rect.top = 0;
+  rect.right = pixelwidth;
+  rect.bottom = pixelheight;
 
-    AdjustWindowRect (&rect, f->output_data.w32->dwStyle,
-                     FRAME_EXTERNAL_MENU_BAR (f));
+  AdjustWindowRect (&rect, f->output_data.w32->dwStyle,
+                   FRAME_EXTERNAL_MENU_BAR (f));
 
-    my_set_window_pos (FRAME_W32_WINDOW (f),
-                      NULL,
-                      0, 0,
-                      rect.right - rect.left,
-                      rect.bottom - rect.top,
-                      SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE);
-  }
+  my_set_window_pos (FRAME_W32_WINDOW (f),
+                    NULL,
+                    0, 0,
+                    rect.right - rect.left,
+                    rect.bottom - rect.top,
+                    SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE);
 
   /* If w32_enable_frame_resize_hack is non-nil, immediately apply the
      new pixel sizes to the frame and its subwindows.
@@ -5783,31 +6186,14 @@ x_set_window_size (struct frame *f, int change_gravity, int width, int height, b
     }
 
   unblock_input ();
+
+  do_pending_window_change (0);
 }
 \f
 /* Mouse warping.  */
 
-void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y);
-
 void
-x_set_mouse_position (struct frame *f, int x, int y)
-{
-  int pix_x, pix_y;
-
-  pix_x = FRAME_COL_TO_PIXEL_X (f, x) + FRAME_COLUMN_WIDTH (f) / 2;
-  pix_y = FRAME_LINE_TO_PIXEL_Y (f, y) + FRAME_LINE_HEIGHT (f) / 2;
-
-  if (pix_x < 0) pix_x = 0;
-  if (pix_x > FRAME_PIXEL_WIDTH (f)) pix_x = FRAME_PIXEL_WIDTH (f);
-
-  if (pix_y < 0) pix_y = 0;
-  if (pix_y > FRAME_PIXEL_HEIGHT (f)) pix_y = FRAME_PIXEL_HEIGHT (f);
-
-  x_set_mouse_pixel_position (f, pix_x, pix_y);
-}
-
-void
-x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y)
+frame_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y)
 {
   RECT rect;
   POINT pt;
@@ -5830,7 +6216,9 @@ x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y)
 void
 x_focus_frame (struct frame *f)
 {
+#if 0
   struct w32_display_info *dpyinfo = &one_w32_display_info;
+#endif
 
   /* Give input focus to frame.  */
   block_input ();
@@ -6139,7 +6527,8 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
   SetWindowLong (window, WND_FONTWIDTH_INDEX, FRAME_COLUMN_WIDTH (f));
   SetWindowLong (window, WND_LINEHEIGHT_INDEX, FRAME_LINE_HEIGHT (f));
   SetWindowLong (window, WND_BORDER_INDEX, FRAME_INTERNAL_BORDER_WIDTH (f));
-  SetWindowLong (window, WND_SCROLLBAR_INDEX, FRAME_SCROLL_BAR_AREA_WIDTH (f));
+  SetWindowLong (window, WND_VSCROLLBAR_INDEX, FRAME_SCROLL_BAR_AREA_WIDTH (f));
+  SetWindowLong (window, WND_HSCROLLBAR_INDEX, FRAME_SCROLL_BAR_AREA_HEIGHT (f));
 
   leave_crit ();
 }
@@ -6163,8 +6552,40 @@ x_check_font (struct frame *f, struct font *font)
 
 #endif /* GLYPH_DEBUG */
 
+/* Show hourglass cursor on frame F.  */
+
+static void
+w32_show_hourglass (struct frame *f)
+{
+  if (!menubar_in_use && !current_popup_menu)
+    {
+      struct w32_output *w32 = FRAME_X_OUTPUT (f);
+
+      w32->hourglass_p = 1;
+      SetCursor (w32->hourglass_cursor);
+    }
+}
+
+/* Hide hourglass cursor on frame F.  */
+
+static void
+w32_hide_hourglass (struct frame *f)
+{
+  struct w32_output *w32 = FRAME_X_OUTPUT (f);
+
+  w32->hourglass_p = 0;
+  SetCursor (w32->current_cursor);
+}
+
+/* FIXME: old code did that, but I don't know why.  Anyway,
+   this is used for non-GUI frames (see cancel_hourglass).  */
+
+void
+w32_arrow_cursor (void)
+{
+  SetCursor (w32_load_cursor (IDC_ARROW));
+}
 
-\f
 /***********************************************************************
                            Initialization
  ***********************************************************************/
@@ -6194,6 +6615,7 @@ w32_initialize_display_info (Lisp_Object display_name)
   dpyinfo->smallest_font_height = 1;
   dpyinfo->smallest_char_width = 1;
   dpyinfo->vertical_scroll_bar_cursor = w32_load_cursor (IDC_ARROW);
+  dpyinfo->horizontal_scroll_bar_cursor = w32_load_cursor (IDC_ARROW);
   /* TODO: dpyinfo->gray */
 
   reset_mouse_highlight (&dpyinfo->mouse_highlight);
@@ -6280,7 +6702,9 @@ static struct redisplay_interface w32_redisplay_interface =
   w32_draw_window_cursor,
   w32_draw_vertical_window_border,
   w32_draw_window_divider,
-  w32_shift_glyphs_for_insert
+  w32_shift_glyphs_for_insert,
+  w32_show_hourglass,
+  w32_hide_hourglass
 };
 
 static void x_delete_terminal (struct terminal *term);
@@ -6290,9 +6714,8 @@ w32_create_terminal (struct w32_display_info *dpyinfo)
 {
   struct terminal *terminal;
 
-  terminal = create_terminal ();
+  terminal = create_terminal (output_w32, &w32_redisplay_interface);
 
-  terminal->type = output_w32;
   terminal->display_info.w32 = dpyinfo;
   dpyinfo->terminal = terminal;
 
@@ -6302,26 +6725,24 @@ w32_create_terminal (struct w32_display_info *dpyinfo)
   terminal->ins_del_lines_hook = x_ins_del_lines;
   terminal->delete_glyphs_hook = x_delete_glyphs;
   terminal->ring_bell_hook = w32_ring_bell;
-  terminal->reset_terminal_modes_hook = NULL;
-  terminal->set_terminal_modes_hook = NULL;
   terminal->update_begin_hook = x_update_begin;
   terminal->update_end_hook = x_update_end;
-  terminal->set_terminal_window_hook = NULL;
   terminal->read_socket_hook = w32_read_socket;
   terminal->frame_up_to_date_hook = w32_frame_up_to_date;
   terminal->mouse_position_hook = w32_mouse_position;
   terminal->frame_rehighlight_hook = w32_frame_rehighlight;
   terminal->frame_raise_lower_hook = w32_frame_raise_lower;
   terminal->fullscreen_hook = w32fullscreen_hook;
+  terminal->menu_show_hook = w32_menu_show;
+  terminal->popup_dialog_hook = w32_popup_dialog;
   terminal->set_vertical_scroll_bar_hook = w32_set_vertical_scroll_bar;
+  terminal->set_horizontal_scroll_bar_hook = w32_set_horizontal_scroll_bar;
   terminal->condemn_scroll_bars_hook = w32_condemn_scroll_bars;
   terminal->redeem_scroll_bar_hook = w32_redeem_scroll_bar;
   terminal->judge_scroll_bars_hook = w32_judge_scroll_bars;
-
   terminal->delete_frame_hook = x_destroy_window;
   terminal->delete_terminal_hook = x_delete_terminal;
-
-  terminal->rif = &w32_redisplay_interface;
+  /* Other hooks are NULL by default.  */
 
   /* We don't yet support separate terminals on W32, so don't try to share
      keyboards between virtual terminals that are on the same physical
@@ -6443,12 +6864,6 @@ x_delete_display (struct w32_display_info *dpyinfo)
     if (dpyinfo->palette)
       DeleteObject (dpyinfo->palette);
   }
-  /* Avoid freeing dpyinfo->w32_id_name more than once if emacs is
-     running as a daemon; see bug#17510. */
-#ifndef CYGWIN
-  xfree (dpyinfo->w32_id_name);
-#endif
-
   w32_reset_fringes ();
 }
 
@@ -6500,7 +6915,6 @@ w32_initialize (void)
                             &w32_use_visible_system_caret, 0))
     w32_use_visible_system_caret = 0;
 
-  last_tool_bar_item = -1;
   any_help_event_p = 0;
 
   /* Initialize input mode: interrupt_input off, no flow control, allow
@@ -6555,13 +6969,16 @@ w32_initialize (void)
 
 #undef LOAD_PROC
 
-    /* Ensure scrollbar handle is at least 5 pixels.  */
+    /* Ensure scrollbar handles are at least 5 pixels.  */
     vertical_scroll_bar_min_handle = 5;
+    horizontal_scroll_bar_min_handle = 5;
 
     /* For either kind of scroll bar, take account of the arrows; these
        effectively form the border of the main scroll bar range.  */
     vertical_scroll_bar_top_border = vertical_scroll_bar_bottom_border
       = GetSystemMetrics (SM_CYVSCROLL);
+    horizontal_scroll_bar_left_border = horizontal_scroll_bar_right_border
+      = GetSystemMetrics (SM_CYHSCROLL);
   }
 }
 
index e3b65f0ffaf75d98eef50a6c3878a072759819b9..fb37550100e3259e483f173502287417fc7fbb81 100644 (file)
@@ -22,6 +22,22 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "frame.h"
 #include "atimer.h"
 
+/* Stack alignment stuff.  Every CALLBACK function should have the
+   ALIGN_STACK attribute if it manipulates Lisp objects, because
+   Windows x86 32-bit ABI only guarantees 4-byte stack alignment, and
+   that is what we will get when a Windows function calls us.  The
+   ALIGN_STACK attribute forces GCC to emit a preamble code to
+   re-align the stack at function entry.  Further details about this
+   can be found in http://www.peterstock.co.uk/games/mingw_sse/.  */
+#ifdef __GNUC__
+# if USE_STACK_LISP_OBJECTS && !defined _WIN64 && !defined __x86_64__  \
+  && __GNUC__ + (__GNUC_MINOR__ > 1) >= 5
+#  define ALIGN_STACK __attribute__((force_align_arg_pointer))
+# else
+#  define ALIGN_STACK
+# endif         /* USE_STACK_LISP_OBJECTS */
+#endif
+
 \f
 #define BLACK_PIX_DEFAULT(f) PALETTERGB(0,0,0)
 #define WHITE_PIX_DEFAULT(f) PALETTERGB(255,255,255)
@@ -99,6 +115,9 @@ struct w32_display_info
   /* The cursor to use for vertical scroll bars.  */
   Cursor vertical_scroll_bar_cursor;
 
+  /* The cursor to use for horizontal scroll bars.  */
+  Cursor horizontal_scroll_bar_cursor;
+
   /* Resource data base */
   XrmDatabase xrdb;
 
@@ -194,12 +213,19 @@ struct w32_display_info
 
   /* Time of last mouse movement.  */
   Time last_mouse_movement_time;
+
+  /* Value returned by last call of ShowCursor.  */
+  int cursor_display_counter;
 };
 
 /* This is a chain of structures for all the displays currently in use.  */
 extern struct w32_display_info *x_display_list;
 extern struct w32_display_info one_w32_display_info;
 
+/* These 2 are set by w32fns.c and examined in w32term.c.  */
+extern HMENU current_popup_menu;
+extern int menubar_in_use;
+
 extern struct frame *x_window_to_frame (struct w32_display_info *, HWND);
 
 struct w32_display_info *x_display_info_for_name (Lisp_Object);
@@ -219,8 +245,6 @@ extern void x_set_window_size (struct frame *f, int change_grav,
 extern int x_display_pixel_height (struct w32_display_info *);
 extern int x_display_pixel_width (struct w32_display_info *);
 extern Lisp_Object x_get_focus_frame (struct frame *);
-extern void x_set_mouse_position (struct frame *f, int h, int v);
-extern void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y);
 extern void x_make_frame_visible (struct frame *f);
 extern void x_make_frame_invisible (struct frame *f);
 extern void x_iconify_frame (struct frame *f);
@@ -229,6 +253,9 @@ extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
 extern void x_set_tool_bar_lines (struct frame *f,
                                   Lisp_Object value,
                                   Lisp_Object oldval);
+extern void x_set_internal_border_width (struct frame *f,
+                                        Lisp_Object value,
+                                        Lisp_Object oldval);
 extern void x_activate_menubar (struct frame *);
 extern int x_bitmap_icon (struct frame *, Lisp_Object);
 extern void initialize_frame_menubar (struct frame *);
@@ -449,6 +476,9 @@ struct scroll_bar {
      place where the user grabbed it.  If the handle isn't currently
      being dragged, this is Qnil.  */
   int dragging;
+
+  /* true if the scroll bar is horizontal.  */
+  bool horizontal;
 };
 
 /* Turning a lisp vector value into a pointer to a struct scroll_bar.  */
@@ -482,9 +512,9 @@ struct scroll_bar {
 
 /* Return the inside width of a vertical scroll bar, given the outside
    width.  */
-#define VERTICAL_SCROLL_BAR_INSIDE_WIDTH(f,width) \
-  ((width) \
-   - VERTICAL_SCROLL_BAR_LEFT_BORDER \
+#define VERTICAL_SCROLL_BAR_INSIDE_WIDTH(f,width)      \
+  ((width)                                             \
+   - VERTICAL_SCROLL_BAR_LEFT_BORDER                   \
    - VERTICAL_SCROLL_BAR_RIGHT_BORDER)
 
 /* Return the length of the rectangle within which the top of the
@@ -494,14 +524,36 @@ struct scroll_bar {
    This is the real range of motion for the scroll bar, so when we're
    scaling buffer positions to scroll bar positions, we use this, not
    VERTICAL_SCROLL_BAR_INSIDE_HEIGHT.  */
-#define VERTICAL_SCROLL_BAR_TOP_RANGE(f,height) \
+#define VERTICAL_SCROLL_BAR_TOP_RANGE(f,height)                                \
   (VERTICAL_SCROLL_BAR_INSIDE_HEIGHT (f, height) - VERTICAL_SCROLL_BAR_MIN_HANDLE)
 
 /* Return the inside height of vertical scroll bar, given the outside
    height.  See VERTICAL_SCROLL_BAR_TOP_RANGE too.  */
-#define VERTICAL_SCROLL_BAR_INSIDE_HEIGHT(f,height) \
+#define VERTICAL_SCROLL_BAR_INSIDE_HEIGHT(f,height)                    \
   ((height) - VERTICAL_SCROLL_BAR_TOP_BORDER - VERTICAL_SCROLL_BAR_BOTTOM_BORDER)
 
+/* Return the inside height of a horizontal scroll bar, given the
+   outside height.  */
+#define HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT(f,height) \
+  ((height)                                          \
+   - HORIZONTAL_SCROLL_BAR_TOP_BORDER                \
+   - HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER)
+
+/* Return the length of the rectangle within which the left of the
+   handle must stay.  This isn't equivalent to the inside width,
+   because the scroll bar handle has a minimum width.
+
+   This is the real range of motion for the scroll bar, so when we're
+   scaling buffer positions to scroll bar positions, we use this, not
+   HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH.  */
+#define HORIZONTAL_SCROLL_BAR_LEFT_RANGE(f,width)                      \
+  (HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH (f, width) - HORIZONTAL_SCROLL_BAR_MIN_HANDLE)
+
+/* Return the inside width of horizontal scroll bar, given the outside
+   width.  See HORIZONTAL_SCROLL_BAR_LEFT_RANGE too.  */
+#define HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH(f,width)                    \
+  ((width) - HORIZONTAL_SCROLL_BAR_LEFT_BORDER - HORIZONTAL_SCROLL_BAR_RIGHT_BORDER)
+
 
 /* Border widths for scroll bars.
 
@@ -519,8 +571,14 @@ struct scroll_bar {
 #define VERTICAL_SCROLL_BAR_TOP_BORDER (vertical_scroll_bar_top_border)
 #define VERTICAL_SCROLL_BAR_BOTTOM_BORDER (vertical_scroll_bar_bottom_border)
 
+#define HORIZONTAL_SCROLL_BAR_LEFT_BORDER (horizontal_scroll_bar_left_border)
+#define HORIZONTAL_SCROLL_BAR_RIGHT_BORDER (horizontal_scroll_bar_right_border)
+#define HORIZONTAL_SCROLL_BAR_TOP_BORDER (0)
+#define HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER (0)
+
 /* Minimum lengths for scroll bar handles, in pixels.  */
 #define VERTICAL_SCROLL_BAR_MIN_HANDLE (vertical_scroll_bar_min_handle)
+#define HORIZONTAL_SCROLL_BAR_MIN_HANDLE (horizontal_scroll_bar_min_handle)
 
 struct frame;  /* from frame.h */
 
@@ -582,35 +640,38 @@ do { \
 #define WM_EMACS_KILL                  (WM_EMACS_START + 0)
 #define WM_EMACS_CREATEWINDOW          (WM_EMACS_START + 1)
 #define WM_EMACS_DONE                  (WM_EMACS_START + 2)
-#define WM_EMACS_CREATESCROLLBAR       (WM_EMACS_START + 3)
-#define WM_EMACS_SHOWWINDOW            (WM_EMACS_START + 4)
-#define WM_EMACS_SETWINDOWPOS          (WM_EMACS_START + 5)
-#define WM_EMACS_DESTROYWINDOW         (WM_EMACS_START + 6)
-#define WM_EMACS_TRACKPOPUPMENU        (WM_EMACS_START + 7)
-#define WM_EMACS_SETFOCUS              (WM_EMACS_START + 8)
-#define WM_EMACS_SETFOREGROUND         (WM_EMACS_START + 9)
-#define WM_EMACS_SETLOCALE             (WM_EMACS_START + 10)
-#define WM_EMACS_SETKEYBOARDLAYOUT     (WM_EMACS_START + 11)
-#define WM_EMACS_REGISTER_HOT_KEY      (WM_EMACS_START + 12)
-#define WM_EMACS_UNREGISTER_HOT_KEY    (WM_EMACS_START + 13)
-#define WM_EMACS_TOGGLE_LOCK_KEY       (WM_EMACS_START + 14)
-#define WM_EMACS_TRACK_CARET           (WM_EMACS_START + 15)
-#define WM_EMACS_DESTROY_CARET         (WM_EMACS_START + 16)
-#define WM_EMACS_SHOW_CARET            (WM_EMACS_START + 17)
-#define WM_EMACS_HIDE_CARET            (WM_EMACS_START + 18)
-#define WM_EMACS_SETCURSOR             (WM_EMACS_START + 19)
-#define WM_EMACS_PAINT                 (WM_EMACS_START + 20)
-#define WM_EMACS_BRINGTOTOP            (WM_EMACS_START + 21)
-#define WM_EMACS_INPUT_READY           (WM_EMACS_START + 22)
-#define WM_EMACS_FILENOTIFY            (WM_EMACS_START + 23)
-#define WM_EMACS_END                   (WM_EMACS_START + 24)
+#define WM_EMACS_CREATEVSCROLLBAR      (WM_EMACS_START + 3)
+#define WM_EMACS_CREATEHSCROLLBAR      (WM_EMACS_START + 4)
+#define WM_EMACS_SHOWWINDOW            (WM_EMACS_START + 5)
+#define WM_EMACS_SETWINDOWPOS          (WM_EMACS_START + 6)
+#define WM_EMACS_DESTROYWINDOW         (WM_EMACS_START + 7)
+#define WM_EMACS_TRACKPOPUPMENU        (WM_EMACS_START + 8)
+#define WM_EMACS_SETFOCUS              (WM_EMACS_START + 9)
+#define WM_EMACS_SETFOREGROUND         (WM_EMACS_START + 10)
+#define WM_EMACS_SETLOCALE             (WM_EMACS_START + 11)
+#define WM_EMACS_SETKEYBOARDLAYOUT     (WM_EMACS_START + 12)
+#define WM_EMACS_REGISTER_HOT_KEY      (WM_EMACS_START + 13)
+#define WM_EMACS_UNREGISTER_HOT_KEY    (WM_EMACS_START + 14)
+#define WM_EMACS_TOGGLE_LOCK_KEY       (WM_EMACS_START + 15)
+#define WM_EMACS_TRACK_CARET           (WM_EMACS_START + 16)
+#define WM_EMACS_DESTROY_CARET         (WM_EMACS_START + 17)
+#define WM_EMACS_SHOW_CARET            (WM_EMACS_START + 18)
+#define WM_EMACS_HIDE_CARET            (WM_EMACS_START + 19)
+#define WM_EMACS_SETCURSOR             (WM_EMACS_START + 20)
+#define WM_EMACS_SHOWCURSOR            (WM_EMACS_START + 21)
+#define WM_EMACS_PAINT                 (WM_EMACS_START + 22)
+#define WM_EMACS_BRINGTOTOP            (WM_EMACS_START + 23)
+#define WM_EMACS_INPUT_READY           (WM_EMACS_START + 24)
+#define WM_EMACS_FILENOTIFY            (WM_EMACS_START + 25)
+#define WM_EMACS_END                   (WM_EMACS_START + 26)
 
 #define WND_FONTWIDTH_INDEX    (0)
 #define WND_LINEHEIGHT_INDEX   (4)
 #define WND_BORDER_INDEX       (8)
-#define WND_SCROLLBAR_INDEX    (12)
-#define WND_BACKGROUND_INDEX   (16)
-#define WND_LAST_INDEX         (20)
+#define WND_VSCROLLBAR_INDEX   (12)
+#define WND_HSCROLLBAR_INDEX   (16)
+#define WND_BACKGROUND_INDEX   (20)
+#define WND_LAST_INDEX         (24)
 
 #define WND_EXTRA_BYTES     (WND_LAST_INDEX)
 
@@ -782,6 +843,7 @@ typedef char guichar_t;
 #define GUI_SDATA(x) ((guichar_t*) SDATA (x))
 
 extern Lisp_Object w32_popup_dialog (struct frame *, Lisp_Object, Lisp_Object);
+extern void w32_arrow_cursor (void);
 
 extern void syms_of_w32term (void);
 extern void syms_of_w32menu (void);
index 5bb444f519af74303c921999a7c8437214082d2c..1c7b256988c7c558643c2029c342c2cbe285a9c6 100644 (file)
@@ -52,9 +52,9 @@ extern Lisp_Object Quniscribe;
 extern Lisp_Object Qopentype;
 
 /* EnumFontFamiliesEx callback.  */
-static int CALLBACK add_opentype_font_name_to_list (ENUMLOGFONTEX *,
-                                                    NEWTEXTMETRICEX *,
-                                                    DWORD, LPARAM);
+static int CALLBACK ALIGN_STACK add_opentype_font_name_to_list (ENUMLOGFONTEX *,
+                                                               NEWTEXTMETRICEX *,
+                                                               DWORD, LPARAM);
 /* Used by uniscribe_otf_capability.  */
 static Lisp_Object otf_features (HDC context, char *table);
 
@@ -127,8 +127,6 @@ uniscribe_open (struct frame *f, Lisp_Object font_entity, int pixel_size)
   /* Uniscribe backend uses glyph indices.  */
   uniscribe_font->w32_font.glyph_idx = ETO_GLYPH_INDEX;
 
-  /* Mark the format as opentype  */
-  uniscribe_font->w32_font.font.props[FONT_FORMAT_INDEX] = Qopentype;
   uniscribe_font->w32_font.font.driver = &uniscribe_font_driver;
 
   return font_object;
@@ -593,8 +591,8 @@ uniscribe_encode_char (struct font *font, int c)
    Lisp_Object uniscribe_get_cache (Lisp_Object frame);
    void uniscribe_free_entity (Lisp_Object font_entity);
    int uniscribe_has_char (Lisp_Object entity, int c);
-   int uniscribe_text_extents (struct font *font, unsigned *code,
-                               int nglyphs, struct font_metrics *metrics);
+   void uniscribe_text_extents (struct font *font, unsigned *code,
+                                int nglyphs, struct font_metrics *metrics);
    int uniscribe_draw (struct glyph_string *s, int from, int to,
                        int x, int y, int with_background);
 
@@ -604,8 +602,6 @@ uniscribe_encode_char (struct font *font, int c)
    int uniscribe_get_bitmap (struct font *font, unsigned code,
                              struct font_bitmap *bitmap, int bits_per_pixel);
    void uniscribe_free_bitmap (struct font *font, struct font_bitmap *bitmap);
-   void * uniscribe_get_outline (struct font *font, unsigned code);
-   void uniscribe_free_outline (struct font *font, void *outline);
    int uniscribe_anchor_point (struct font *font, unsigned code,
                                int index, int *x, int *y);
    int uniscribe_start_for_frame (struct frame *f);
@@ -617,7 +613,7 @@ uniscribe_encode_char (struct font *font, int c)
 /* Callback function for EnumFontFamiliesEx.
    Adds the name of opentype fonts to a Lisp list (passed in as the
    lParam arg). */
-static int CALLBACK
+static int CALLBACK ALIGN_STACK
 add_opentype_font_name_to_list (ENUMLOGFONTEX *logical_font,
                                NEWTEXTMETRICEX *physical_font,
                                DWORD font_type, LPARAM list_object)
@@ -981,8 +977,6 @@ struct font_driver uniscribe_font_driver =
     w32font_draw,
     NULL, /* get_bitmap */
     NULL, /* free_bitmap */
-    NULL, /* get_outline */
-    NULL, /* free_outline */
     NULL, /* anchor_point */
     uniscribe_otf_capability, /* Defined so (font-get FONTOBJ :otf) works.  */
     NULL, /* otf_drive - use shape instead.  */
index bd0fe826e6831769d121a5391b74ab597685273e..baa6a2ab9174daeb9b8673879fbe604325b2e9fd 100644 (file)
@@ -53,30 +53,11 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "character.h"
 #include "font.h"
 
-/* This sucks: this is the first default that x-faces.el tries.  This won't
-   be used unless neither the "Emacs.EmacsFrame" resource nor the
-   "Emacs.EmacsFrame" resource is set; the frame
-   may have the wrong default size if this font doesn't exist, but some other
-   font that x-faces.el does.  The workaround is to specify some font in the
-   resource database; I don't know a solution other than duplicating the font-
-   searching code from x-faces.el in this file.
-
-   This also means that if "Emacs.EmacsFrame" is specified as a non-
-   existent font, then Xt is going to substitute "XtDefaultFont" for it,
-   which is a different size than this one.  The solution for this is to
-   make x-faces.el try to use XtDefaultFont.  The problem with that is that
-   XtDefaultFont is almost certainly variable-width.
-
-   #### Perhaps we could have this code explicitly set XtDefaultFont to this?
- */
-#define DEFAULT_FACE_FONT "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*"
-
 
 static void EmacsFrameInitialize (Widget request, Widget new, ArgList dum1, Cardinal *dum2);
 static void EmacsFrameDestroy (Widget widget);
 static void EmacsFrameRealize (Widget widget, XtValueMask *mask, XSetWindowAttributes *attrs);
 static void EmacsFrameResize (Widget widget);
-static Boolean EmacsFrameSetValues (Widget cur_widget, Widget req_widget, Widget new_widget, ArgList dum1, Cardinal *dum2);
 static XtGeometryResult EmacsFrameQueryGeometry (Widget widget, XtWidgetGeometry *request, XtWidgetGeometry *result);
 
 
@@ -102,8 +83,6 @@ static XtResource resources[] = {
      offset (internal_border_width), XtRImmediate, (XtPointer)4},
   {XtNinterline, XtCInterline, XtRInt, sizeof (int),
      offset (interline), XtRImmediate, (XtPointer)0},
-  {XtNfont,  XtCFont, XtRFontStruct, sizeof (struct font *),
-     offset (font),XtRString, DEFAULT_FACE_FONT},
   {XtNforeground, XtCForeground, XtRPixel, sizeof (Pixel),
      offset (foreground_pixel), XtRString, "XtDefaultForeground"},
   {XtNcursorColor, XtCForeground, XtRPixel, sizeof (Pixel),
@@ -157,7 +136,10 @@ static EmacsFrameClassRec emacsFrameClassRec = {
     /* destroy                 */      EmacsFrameDestroy,
     /* resize                  */      EmacsFrameResize,
     /* expose                  */      XtInheritExpose,
-    /* set_values              */      EmacsFrameSetValues,
+
+    /* Emacs never does XtSetvalues on this widget, so we have no code
+       for it. */
+    /* set_values              */      0, /* Not supported */
     /* set_values_hook         */      0,
     /* set_values_almost       */      XtInheritSetValuesAlmost,
     /* get_values_hook         */      0,
@@ -404,7 +386,6 @@ set_frame_size (EmacsFrame ew)
     }
 #endif /* 0 */
   {
-    struct frame *f = ew->emacs_frame.frame;
     Dimension pixel_width, pixel_height;
 
     /* Take into account the size of the scrollbar.  Always use the
@@ -413,8 +394,6 @@ set_frame_size (EmacsFrame ew)
        frame's character width which is bad for vertically split
        windows.  */
 
-    compute_fringe_widths (f, 0);
-
 #if 0 /* This can run Lisp code, and it is dangerous to give
         out the frame to Lisp code before it officially exists.
         This is handled in Fx_create_frame so not needed here.  */
@@ -472,10 +451,6 @@ update_wm_hints (EmacsFrame ew)
   /* This happens when the frame is just created.  */
   if (! wmshell) return;
 
-#if 0
-  check_frame_size (ew->emacs_frame.frame, &min_cols, &min_rows, 0);
-#endif
-
   pixel_to_char_size (ew, ew->core.width, ew->core.height,
                      &char_width, &char_height);
   char_to_pixel_size (ew, char_width, char_height,
@@ -509,91 +484,6 @@ widget_update_wm_size_hints (Widget widget)
   update_wm_hints (ew);
 }
 
-static char setup_frame_cursor_bits[] =
-{
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-};
-
-static void
-setup_frame_gcs (EmacsFrame ew)
-{
-  XGCValues gc_values;
-  struct frame* s = ew->emacs_frame.frame;
-  Pixmap blank_stipple, blank_tile;
-  unsigned long valuemask = (GCForeground | GCBackground | GCGraphicsExposures
-                            | GCStipple | GCTile);
-  Lisp_Object font;
-
-  XSETFONT (font, ew->emacs_frame.font);
-  font = Ffont_xlfd_name (font, Qnil);
-  if (STRINGP (font))
-    {
-      XFontStruct *xfont = XLoadQueryFont (FRAME_DISPLAY_INFO (s)->display,
-                                          SSDATA (font));
-      if (xfont)
-       {
-         gc_values.font = xfont->fid;
-         valuemask |= GCFont;
-       }
-    }
-
-  /* We have to initialize all of our GCs to have a stipple/tile, otherwise
-     XGetGCValues returns uninitialized data when we query the stipple
-     (instead of None or something sensible) and it makes things hard.
-
-     This should be fixed for real by not querying the GCs but instead having
-     some GC-based cache instead of the current face-based cache which doesn't
-     effectively cache all of the GC settings we need to use.
-   */
-
-  blank_stipple
-    = XCreateBitmapFromData (XtDisplay (ew),
-                            RootWindowOfScreen (XtScreen (ew)),
-                            setup_frame_cursor_bits, 2, 2);
-
-  /* use fg = 0, bg = 1 below, but it's irrelevant since this pixmap should
-     never actually get used as a background tile!
-   */
-  blank_tile
-    = XCreatePixmapFromBitmapData (XtDisplay (ew),
-                                  RootWindowOfScreen (XtScreen (ew)),
-                                  setup_frame_cursor_bits, 2, 2,
-                                  0, 1, ew->core.depth);
-
-  /* Normal video */
-  gc_values.foreground = ew->emacs_frame.foreground_pixel;
-  gc_values.background = ew->core.background_pixel;
-  gc_values.graphics_exposures = False;
-  gc_values.stipple = blank_stipple;
-  gc_values.tile = blank_tile;
-  XChangeGC (XtDisplay (ew), s->output_data.x->normal_gc,
-            valuemask, &gc_values);
-
-  /* Reverse video style. */
-  gc_values.foreground = ew->core.background_pixel;
-  gc_values.background = ew->emacs_frame.foreground_pixel;
-  gc_values.graphics_exposures = False;
-  gc_values.stipple = blank_stipple;
-  gc_values.tile = blank_tile;
-  XChangeGC (XtDisplay (ew), s->output_data.x->reverse_gc,
-            valuemask, &gc_values);
-
-  /* Cursor has to have an empty stipple. */
-  gc_values.foreground = ew->core.background_pixel;
-  gc_values.background = ew->emacs_frame.cursor_color;
-  gc_values.graphics_exposures = False;
-  gc_values.tile = blank_tile;
-  gc_values.stipple
-    = XCreateBitmapFromData (XtDisplay (ew),
-                            RootWindowOfScreen (XtScreen (ew)),
-                            setup_frame_cursor_bits, 16, 16);
-  XChangeGC (XtDisplay (ew), s->output_data.x->cursor_gc,
-            valuemask, &gc_values);
-}
-
 static void
 update_various_frame_slots (EmacsFrame ew)
 {
@@ -621,7 +511,6 @@ update_from_various_frame_slots (EmacsFrame ew)
   ew->core.width = FRAME_PIXEL_WIDTH (f);
   ew->core.background_pixel = FRAME_BACKGROUND_PIXEL (f);
   ew->emacs_frame.internal_border_width = f->internal_border_width;
-  ew->emacs_frame.font = x->font;
   ew->emacs_frame.foreground_pixel = FRAME_FOREGROUND_PIXEL (f);
   ew->emacs_frame.cursor_color = x->cursor_pixel;
   ew->core.border_pixel = x->border_pixel;
@@ -719,80 +608,6 @@ EmacsFrameResize (Widget widget)
     }
 }
 
-static Boolean
-EmacsFrameSetValues (Widget cur_widget, Widget req_widget, Widget new_widget, ArgList dum1, Cardinal *dum2)
-{
-  EmacsFrame cur = (EmacsFrame)cur_widget;
-  EmacsFrame new = (EmacsFrame)new_widget;
-
-  Boolean needs_a_refresh = False;
-  Boolean has_to_recompute_size;
-  Boolean has_to_recompute_gcs;
-  Boolean has_to_update_hints;
-
-  int char_width, char_height;
-  Dimension pixel_width;
-  Dimension pixel_height;
-
-  /* AFAIK, this function is never called. -- Jan D, Oct 2009.  */
-  has_to_recompute_gcs = (cur->emacs_frame.font != new->emacs_frame.font
-                         || (cur->emacs_frame.foreground_pixel
-                             != new->emacs_frame.foreground_pixel)
-                         || (cur->core.background_pixel
-                             != new->core.background_pixel)
-                         );
-
-  has_to_recompute_size = (cur->emacs_frame.font != new->emacs_frame.font
-                          && cur->core.width == new->core.width
-                          && cur->core.height == new->core.height);
-
-  has_to_update_hints = (cur->emacs_frame.font != new->emacs_frame.font);
-
-  if (has_to_recompute_gcs)
-    {
-      setup_frame_gcs (new);
-      needs_a_refresh = True;
-    }
-
-  if (has_to_recompute_size)
-    {
-      /* Don't do this pixelwise, hopefully.  */
-      pixel_width = new->core.width;
-      pixel_height = new->core.height;
-      pixel_to_char_size (new, pixel_width, pixel_height, &char_width,
-                         &char_height);
-      char_to_pixel_size (new, char_width, char_height, &pixel_width,
-                         &pixel_height);
-      new->core.width = pixel_width;
-      new->core.height = pixel_height;
-
-      change_frame_size (new->emacs_frame.frame, char_width, char_height,
-                        1, 0, 0, 0);
-      needs_a_refresh = True;
-    }
-
-  if (has_to_update_hints)
-    update_wm_hints (new);
-
-  update_various_frame_slots (new);
-
-  /* #### This doesn't work, I haven't been able to find ANY kludge that
-     will let (x-create-frame '((iconic . t))) work.  It seems that changes
-     to wm_shell's iconic slot have no effect after it has been realized,
-     and calling XIconifyWindow doesn't work either (even though the window
-     has been created.)  Perhaps there is some property we could smash
-     directly, but I'm sick of this for now.
-   */
-  if (cur->emacs_frame.iconic != new->emacs_frame.iconic)
-    {
-      Widget wmshell = get_wm_shell ((Widget) cur);
-      XtVaSetValues (wmshell, XtNiconic,
-                    (XtArgVal) new->emacs_frame.iconic, NULL);
-    }
-
-  return needs_a_refresh;
-}
-
 static XtGeometryResult
 EmacsFrameQueryGeometry (Widget widget, XtWidgetGeometry *request, XtWidgetGeometry *result)
 {
@@ -829,7 +644,8 @@ EmacsFrameSetCharSize (Widget widget, int columns, int rows)
   EmacsFrame ew = (EmacsFrame) widget;
   struct frame *f = ew->emacs_frame.frame;
 
-  x_set_window_size (f, 0, columns, rows, 0);
+  if (!frame_inhibit_resize (f, 0) && !frame_inhibit_resize (f, 1))
+    x_set_window_size (f, 0, columns, rows, 0);
 }
 
 \f
index c0a5238743e691e7c44097748335ff86d4b53c5a..f5e2eb549a19ab5572836616b102f52e40b910c1 100644 (file)
@@ -43,7 +43,6 @@ typedef struct {
   int          internal_border_width;  /* internal borders */
   int          interline;              /* skips between lines */
 
-  struct font* font;                   /* font */
   Pixel                foreground_pixel;       /* foreground */
 
   Pixel                cursor_color;           /* text cursor color */
index 2210d5bc86892b6de1d8de05f68d52c6d326ef3c..0b0f2140a5821e757668c5b739cb0489a46f6225 100644 (file)
@@ -27,6 +27,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "buffer.h"
 #include "keyboard.h"
 #include "keymap.h"
+#include "menu.h"
 #include "frame.h"
 #include "window.h"
 #include "commands.h"
@@ -51,6 +52,7 @@ static Lisp_Object Qrecord_window_buffer;
 static Lisp_Object Qwindow_deletable_p, Qdelete_window, Qdisplay_buffer;
 static Lisp_Object Qreplace_buffer_in_windows, Qget_mru_window;
 static Lisp_Object Qwindow_resize_root_window, Qwindow_resize_root_window_vertically;
+static Lisp_Object Qwindow_sanitize_window_sizes;
 static Lisp_Object Qwindow_pixel_to_total;
 static Lisp_Object Qscroll_up, Qscroll_down, Qscroll_command;
 static Lisp_Object Qsafe, Qabove, Qbelow, Qwindow_size, Qclone_of;
@@ -86,7 +88,7 @@ static struct window *set_window_fringes (struct window *, Lisp_Object,
 static struct window *set_window_margins (struct window *, Lisp_Object,
                                          Lisp_Object);
 static struct window *set_window_scroll_bars (struct window *, Lisp_Object,
-                                             Lisp_Object, Lisp_Object);
+                                             Lisp_Object, Lisp_Object, Lisp_Object);
 static void apply_window_adjustment (struct window *);
 
 /* This is the window in which the terminal's cursor should
@@ -119,9 +121,6 @@ static Lisp_Object Qtemp_buffer_show_hook;
 /* Incremented for each window created.  */
 static int sequence_number;
 
-/* Nonzero after init_window_once has finished.  */
-static int window_initialized;
-
 /* Hook to run when window config changes.  */
 static Lisp_Object Qwindow_configuration_change_hook;
 
@@ -145,66 +144,85 @@ wset_combination_limit (struct window *w, Lisp_Object val)
 {
   w->combination_limit = val;
 }
+
 static void
 wset_dedicated (struct window *w, Lisp_Object val)
 {
   w->dedicated = val;
 }
+
 static void
 wset_display_table (struct window *w, Lisp_Object val)
 {
   w->display_table = val;
 }
+
 static void
 wset_new_normal (struct window *w, Lisp_Object val)
 {
   w->new_normal = val;
 }
+
 static void
 wset_new_total (struct window *w, Lisp_Object val)
 {
   w->new_total = val;
 }
+
 static void
 wset_normal_cols (struct window *w, Lisp_Object val)
 {
   w->normal_cols = val;
 }
+
 static void
 wset_normal_lines (struct window *w, Lisp_Object val)
 {
   w->normal_lines = val;
 }
+
 static void
 wset_parent (struct window *w, Lisp_Object val)
 {
   w->parent = val;
 }
+
 static void
 wset_pointm (struct window *w, Lisp_Object val)
 {
   w->pointm = val;
 }
+
+static void
+wset_old_pointm (struct window *w, Lisp_Object val)
+{
+  w->old_pointm = val;
+}
+
 static void
 wset_start (struct window *w, Lisp_Object val)
 {
   w->start = val;
 }
+
 static void
 wset_temslot (struct window *w, Lisp_Object val)
 {
   w->temslot = val;
 }
+
 static void
 wset_vertical_scroll_bar_type (struct window *w, Lisp_Object val)
 {
   w->vertical_scroll_bar_type = val;
 }
+
 static void
 wset_window_parameters (struct window *w, Lisp_Object val)
 {
   w->window_parameters = val;
 }
+
 static void
 wset_combination (struct window *w, bool horflag, Lisp_Object val)
 {
@@ -905,6 +923,9 @@ window_body_height (struct window *w, bool pixelwise)
 {
   int height = (w->pixel_height
                - WINDOW_HEADER_LINE_HEIGHT (w)
+               - (WINDOW_HAS_HORIZONTAL_SCROLL_BAR (w)
+                  ? WINDOW_SCROLL_BAR_AREA_HEIGHT (w)
+                  : 0)
                - WINDOW_MODE_LINE_HEIGHT (w)
                - WINDOW_BOTTOM_DIVIDER_WIDTH (w));
 
@@ -1025,6 +1046,15 @@ WINDOW must be a live window and defaults to the selected one.  */)
   return (make_number (WINDOW_SCROLL_BAR_AREA_WIDTH (decode_live_window (window))));
 }
 
+DEFUN ("window-scroll-bar-height", Fwindow_scroll_bar_height,
+       Swindow_scroll_bar_height, 0, 1, 0,
+       doc: /* Return the height in pixels of WINDOW's horizontal scrollbar.
+WINDOW must be a live window and defaults to the selected one.  */)
+  (Lisp_Object window)
+{
+  return (make_number (WINDOW_SCROLL_BAR_AREA_HEIGHT (decode_live_window (window))));
+}
+
 DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0,
        doc: /* Return the number of columns by which WINDOW is scrolled from left margin.
 WINDOW must be a live window and defaults to the selected one.  */)
@@ -1052,6 +1082,8 @@ set_window_hscroll (struct window *w, EMACS_INT hscroll)
     XBUFFER (w->contents)->prevent_redisplay_optimizations_p = 1;
 
   w->hscroll = new_hscroll;
+  w->suspend_auto_hscroll = 1;
+
   return make_number (new_hscroll);
 }
 
@@ -1201,12 +1233,16 @@ display margins, fringes, header line, and/or mode line.  */)
 
   return list4i ((WINDOW_BOX_LEFT_EDGE_COL (w)
                  + WINDOW_LEFT_MARGIN_COLS (w)
-                 + WINDOW_LEFT_FRINGE_COLS (w)),
+                 + ((WINDOW_LEFT_FRINGE_WIDTH (w)
+                     + WINDOW_FRAME_COLUMN_WIDTH (w) - 1)
+                    / WINDOW_FRAME_COLUMN_WIDTH (w))),
                 (WINDOW_TOP_EDGE_LINE (w)
                  + WINDOW_HEADER_LINE_LINES (w)),
                 (WINDOW_BOX_RIGHT_EDGE_COL (w)
                  - WINDOW_RIGHT_MARGIN_COLS (w)
-                 - WINDOW_RIGHT_FRINGE_COLS (w)),
+                 - ((WINDOW_RIGHT_FRINGE_WIDTH (w)
+                     + WINDOW_FRAME_COLUMN_WIDTH (w) - 1)
+                    / WINDOW_FRAME_COLUMN_WIDTH (w))),
                 (WINDOW_BOTTOM_EDGE_LINE (w)
                  - WINDOW_MODE_LINE_LINES (w)));
 }
@@ -1320,6 +1356,17 @@ coordinates_in_window (register struct window *w, int x, int y)
           && x >= right_x - WINDOW_RIGHT_DIVIDER_WIDTH (w)
           && x <= right_x)
     return ON_RIGHT_DIVIDER;
+  /* On the horizontal scroll bar?  (Including the empty space at its
+     right!)  */
+  else if ((WINDOW_HAS_HORIZONTAL_SCROLL_BAR (w)
+           && y >= (bottom_y
+                    - WINDOW_SCROLL_BAR_AREA_HEIGHT (w)
+                    - CURRENT_MODE_LINE_HEIGHT (w)
+                    - WINDOW_BOTTOM_DIVIDER_WIDTH (w))
+           && y <= (bottom_y
+                    - CURRENT_MODE_LINE_HEIGHT (w)
+                    - WINDOW_BOTTOM_DIVIDER_WIDTH (w))))
+    return ON_HORIZONTAL_SCROLL_BAR;
   /* On the mode or header line?   */
   else if ((WINDOW_WANTS_MODELINE_P (w)
            && y >= (bottom_y
@@ -1363,7 +1410,7 @@ coordinates_in_window (register struct window *w, int x, int y)
 
   /* Outside any interesting column?  */
   if (x < left_x || x > right_x)
-    return ON_SCROLL_BAR;
+    return ON_VERTICAL_SCROLL_BAR;
 
   lmargin_width = window_box_width (w, LEFT_MARGIN_AREA);
   rmargin_width = window_box_width (w, RIGHT_MARGIN_AREA);
@@ -1527,10 +1574,13 @@ If they are in the windows's left or right marginal areas, `left-margin'\n\
     case ON_RIGHT_MARGIN:
       return Qright_margin;
 
-    case ON_SCROLL_BAR:
+    case ON_VERTICAL_SCROLL_BAR:
       /* Historically we are supposed to return nil in this case.  */
       return Qnil;
 
+    case ON_HORIZONTAL_SCROLL_BAR:
+      return Qnil;
+
     case ON_RIGHT_DIVIDER:
       return Qright_divider;
 
@@ -1671,6 +1721,14 @@ correct to return the top-level value of `point', outside of any
     return Fmarker_position (w->pointm);
 }
 
+DEFUN ("window-old-point", Fwindow_old_point, Swindow_old_point, 0, 1, 0,
+       doc: /* Return old value of point in WINDOW.
+WINDOW must be a live window and defaults to the selected one.  */)
+  (Lisp_Object window)
+{
+  return Fmarker_position (decode_live_window (window)->old_pointm);
+}
+
 DEFUN ("window-start", Fwindow_start, Swindow_start, 0, 1, 0,
        doc: /* Return position at which display currently starts in WINDOW.
 WINDOW must be a live window and defaults to the selected one.
@@ -2949,6 +3007,7 @@ selected frame and no others.  */)
     return Qnil;
 }
 
+
 static Lisp_Object
 resize_root_window (Lisp_Object window, Lisp_Object delta, Lisp_Object horizontal, Lisp_Object ignore, Lisp_Object pixelwise)
 {
@@ -2956,10 +3015,17 @@ resize_root_window (Lisp_Object window, Lisp_Object delta, Lisp_Object horizonta
 }
 
 
+Lisp_Object
+sanitize_window_sizes (Lisp_Object frame, Lisp_Object horizontal)
+{
+  return call2 (Qwindow_sanitize_window_sizes, frame, horizontal);
+}
+
+
 static Lisp_Object
 window_pixel_to_total (Lisp_Object frame, Lisp_Object horizontal)
 {
-  return call2(Qwindow_pixel_to_total, frame, horizontal);
+  return call2 (Qwindow_pixel_to_total, frame, horizontal);
 }
 
 
@@ -3238,89 +3304,6 @@ replace_buffer_in_windows_safely (Lisp_Object buffer)
        window_loop (REPLACE_BUFFER_IN_WINDOWS_SAFELY, buffer, 1, frame);
     }
 }
-
-/* If *HEIGHT or *WIDTH are too small a size for FRAME, set them to the
-   minimum allowable size.  PIXELWISE means interpret these as pixel
-   sizes.  */
-
-void
-check_frame_size (struct frame *frame, int *width, int *height, bool pixelwise)
-{
-  /* For height, we have to see:
-     how many windows the frame has at minimum (one or two),
-     and whether it has a menu bar or other special stuff at the top.  */
-  if (pixelwise)
-    {
-      int min_height = MIN_SAFE_WINDOW_HEIGHT * FRAME_LINE_HEIGHT (frame);
-      int min_width = MIN_SAFE_WINDOW_WIDTH * FRAME_COLUMN_WIDTH (frame);
-
-      if (!FRAME_MINIBUF_ONLY_P (frame) && FRAME_HAS_MINIBUF_P (frame))
-       min_height = 2 * min_height;
-
-      min_height += FRAME_TOP_MARGIN_HEIGHT (frame);
-      min_height += FRAME_INTERNAL_BORDER_WIDTH (frame);
-
-      if (*height < min_height)
-       *height = min_height;
-      if (*width < min_width)
-       *width = min_width;
-    }
-  else
-    {
-      int min_height
-       = ((FRAME_MINIBUF_ONLY_P (frame) || ! FRAME_HAS_MINIBUF_P (frame))
-          ? MIN_SAFE_WINDOW_HEIGHT
-          : 2 * MIN_SAFE_WINDOW_HEIGHT);
-
-      if (FRAME_TOP_MARGIN (frame) > 0)
-       min_height += FRAME_TOP_MARGIN (frame);
-
-      if (*height < min_height)
-       *height = min_height;
-      if (*width  < MIN_SAFE_WINDOW_WIDTH)
-       *width = MIN_SAFE_WINDOW_WIDTH;
-    }
-}
-
-/* Adjust the margins of window W if text area is too small.
-   Return 1 if window width is ok after adjustment; 0 if window
-   is still too narrow.  */
-
-static int
-adjust_window_margins (struct window *w)
-{
-  int box_width = (WINDOW_PIXEL_WIDTH (w)
-                  - WINDOW_FRINGES_WIDTH (w)
-                  - WINDOW_SCROLL_BAR_AREA_WIDTH (w));
-  int margin_width = WINDOW_MARGINS_WIDTH (w);
-
-  if (box_width - margin_width >= MIN_SAFE_WINDOW_PIXEL_WIDTH (w))
-    return 1;
-
-  if (margin_width < 0 || box_width < MIN_SAFE_WINDOW_PIXEL_WIDTH (w))
-    return 0;
-  else
-    /* Window's text area is too narrow, but reducing the window
-       margins will fix that.  */
-    {
-      int unit = WINDOW_FRAME_COLUMN_WIDTH (w);
-
-      margin_width = box_width - MIN_SAFE_WINDOW_PIXEL_WIDTH (w);
-
-      if (WINDOW_RIGHT_MARGIN_WIDTH (w) > 0)
-       {
-         if (WINDOW_LEFT_MARGIN_WIDTH (w) > 0)
-           w->left_margin_cols = w->right_margin_cols =
-             margin_width / (2 * unit);
-         else
-           w->right_margin_cols = margin_width / unit;
-       }
-      else
-       w->left_margin_cols = margin_width / unit;
-
-      return 1;
-    }
-}
 \f
 /* The following three routines are needed for running a window's
    configuration change hook.  */
@@ -3354,7 +3337,7 @@ run_window_configuration_change_hook (struct frame *f)
     = Fdefault_value (Qwindow_configuration_change_hook);
   XSETFRAME (frame, f);
 
-  if (NILP (Vrun_hooks) || !NILP (inhibit_lisp_code))
+  if (NILP (Vrun_hooks) || !(f->official))
     return;
 
   /* Use the right buffer.  Matters when running the local hooks.  */
@@ -3449,17 +3432,21 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer,
   w->last_cursor_vpos = 0;
 
   if (!(keep_margins_p && samebuf))
-    { /* If we're not actually changing the buffer, don't reset hscroll and
-        vscroll.  This case happens for example when called from
+    { /* If we're not actually changing the buffer, don't reset hscroll
+        and vscroll.  This case happens for example when called from
         change_frame_size_1, where we use a dummy call to
-        Fset_window_buffer on the frame's selected window (and no other)
-        just in order to run window-configuration-change-hook.
-        Resetting hscroll and vscroll here is problematic for things like
-        image-mode and doc-view-mode since it resets the image's position
-        whenever we resize the frame.  */
-      w->hscroll = w->min_hscroll = 0;
+        Fset_window_buffer on the frame's selected window (and no
+        other) just in order to run window-configuration-change-hook
+        (no longer true since change_frame_size_1 directly calls
+        run_window_configuration_change_hook).  Resetting hscroll and
+        vscroll here is problematic for things like image-mode and
+        doc-view-mode since it resets the image's position whenever we
+        resize the frame.  */
+      w->hscroll = w->min_hscroll = w->hscroll_whole = 0;
+      w->suspend_auto_hscroll = 0;
       w->vscroll = 0;
       set_marker_both (w->pointm, buffer, BUF_PT (b), BUF_PT_BYTE (b));
+      set_marker_both (w->old_pointm, buffer, BUF_PT (b), BUF_PT_BYTE (b));
       set_marker_restricted (w->start,
                             make_number (b->last_window_start),
                             buffer);
@@ -3471,16 +3458,13 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer,
   wset_redisplay (w);
   w->update_mode_line = true;
 
-  /* We must select BUFFER for running the window-scroll-functions.  */
-  /* We can't check ! NILP (Vwindow_scroll_functions) here
-     because that might itself be a local variable.  */
-  if (window_initialized)
-    {
-      record_unwind_current_buffer ();
-      Fset_buffer (buffer);
-    }
+  /* We must select BUFFER to run the window-scroll-functions and to look up
+     the buffer-local value of Vwindow_point_insertion_type.  */
+  record_unwind_current_buffer ();
+  Fset_buffer (buffer);
 
   XMARKER (w->pointm)->insertion_type = !NILP (Vwindow_point_insertion_type);
+  XMARKER (w->old_pointm)->insertion_type = !NILP (Vwindow_point_insertion_type);
 
   if (!keep_margins_p)
     {
@@ -3489,7 +3473,9 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer,
                          BVAR (b, right_fringe_width),
                          BVAR (b, fringes_outside_margins));
       set_window_scroll_bars (w, BVAR (b, scroll_bar_width),
-                             BVAR (b, vertical_scroll_bar_type), Qnil);
+                             BVAR (b, vertical_scroll_bar_type),
+                             BVAR (b, scroll_bar_height),
+                             BVAR (b, horizontal_scroll_bar_type));
       set_window_margins (w, BVAR (b, left_margin_cols),
                          BVAR (b, right_margin_cols));
       apply_window_adjustment (w);
@@ -3635,10 +3621,11 @@ temp_output_buffer_show (register Lisp_Object buf)
        Fmake_frame_visible (WINDOW_FRAME (XWINDOW (window)));
       Vminibuf_scroll_window = window;
       w = XWINDOW (window);
-      w->hscroll = 0;
-      w->min_hscroll = 0;
+      w->hscroll = w->min_hscroll = w->hscroll_whole = 0;
+      w->suspend_auto_hscroll = 0;
       set_marker_restricted_both (w->start, buf, BEG, BEG);
       set_marker_restricted_both (w->pointm, buf, BEG, BEG);
+      set_marker_restricted_both (w->old_pointm, buf, BEG, BEG);
 
       /* Run temp-buffer-show-hook, with the chosen window selected
         and its buffer current.  */
@@ -3690,6 +3677,7 @@ make_parent_window (Lisp_Object window, bool horflag)
   /* ...but now P becomes an internal window.  */
   wset_start (p, Qnil);
   wset_pointm (p, Qnil);
+  wset_old_pointm (p, Qnil);
   wset_buffer (p, Qnil);
   wset_combination (p, horflag, window);
   wset_combination_limit (p, Qnil);
@@ -3713,7 +3701,9 @@ make_window (void)
   wset_new_pixel (w, make_number (0));
   wset_start (w, Fmake_marker ());
   wset_pointm (w, Fmake_marker ());
+  wset_old_pointm (w, Fmake_marker ());
   wset_vertical_scroll_bar_type (w, Qt);
+  wset_horizontal_scroll_bar_type (w, Qt);
   /* These Lisp fields are marked specially so they're not set to nil by
      allocate_window.  */
   wset_prev_buffers (w, Qnil);
@@ -3730,8 +3720,8 @@ make_window (void)
 #endif
   w->sequence_number = ++sequence_number;
   w->scroll_bar_width = -1;
+  w->scroll_bar_height = -1;
   w->column_number_displayed = -1;
-
   /* Reset window_list.  */
   Vwindow_list = Qnil;
   /* Return window.  */
@@ -3992,11 +3982,8 @@ window_resize_apply (struct window *w, bool horflag)
        }
     }
   else
-    {
-      adjust_window_margins (w);
-      /* Bug#15957.  */
-      w->window_end_valid = 0;
-    }
+    /* Bug#15957.  */
+    w->window_end_valid = 0;
 }
 
 
@@ -4161,6 +4148,7 @@ resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise)
   /* old_size is the old size of the frame's root window.  */
   int old_size = horflag ? r->total_cols : r->total_lines;
   int old_pixel_size = horflag ? r->pixel_width : r->pixel_height;
+  int old_pixel_top = r->pixel_top;
   /* new_size is the new size of the frame's root window.  */
   int new_size, new_pixel_size;
   int unit = horflag ? FRAME_COLUMN_WIDTH (f) : FRAME_LINE_HEIGHT (f);
@@ -4175,7 +4163,6 @@ resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise)
       new_pixel_size = max (horflag
                            ? size
                            : (size
-                              - FRAME_TOP_MARGIN_HEIGHT (f)
                               - ((FRAME_HAS_MINIBUF_P (f)
                                   && !FRAME_MINIBUF_ONLY_P (f))
                                  ? FRAME_LINE_HEIGHT (f) : 0)),
@@ -4187,7 +4174,6 @@ resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise)
       new_size = max (horflag
                      ? size
                      : (size
-                        - FRAME_TOP_MARGIN (f)
                         - ((FRAME_HAS_MINIBUF_P (f)
                             && !FRAME_MINIBUF_ONLY_P (f))
                            ? 1 : 0)),
@@ -4198,7 +4184,8 @@ resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise)
   r->top_line = FRAME_TOP_MARGIN (f);
   r->pixel_top = FRAME_TOP_MARGIN_HEIGHT (f);
 
-  if (new_pixel_size == old_pixel_size)
+  if (new_pixel_size == old_pixel_size
+      && r->pixel_top == old_pixel_top)
     ;
   else if (WINDOW_LEAF_P (r))
     /* For a leaf root window just set the size.  */
@@ -4240,6 +4227,7 @@ resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise)
            {
              window_resize_apply (r, horflag);
              window_pixel_to_total (r->frame, horflag ? Qt : Qnil);
+#if 0 /* Let's try without safe sizes and/or killing other windows.  */
            }
          else
            {
@@ -4252,7 +4240,6 @@ resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise)
                  window_resize_apply (r, horflag);
                  window_pixel_to_total (r->frame, horflag ? Qt : Qnil);
                }
-#if 0 /* Let's try without killing other windows.  */
              else
                {
                  /* We lost.  Delete all windows but the frame's
@@ -4456,7 +4443,9 @@ set correctly.  See the code of `split-window' for how this is done.  */)
   n->right_fringe_width = r->right_fringe_width;
   n->fringes_outside_margins = r->fringes_outside_margins;
   n->scroll_bar_width = r->scroll_bar_width;
+  n->scroll_bar_height = r->scroll_bar_height;
   wset_vertical_scroll_bar_type (n, r->vertical_scroll_bar_type);
+  wset_horizontal_scroll_bar_type (n, r->horizontal_scroll_bar_type);
 
   /* Directly assign orthogonal coordinates and sizes.  */
   if (horflag)
@@ -4600,6 +4589,7 @@ Signal an error when WINDOW is the only window on its frame.  */)
        {
          unshow_buffer (w);
          unchain_marker (XMARKER (w->pointm));
+         unchain_marker (XMARKER (w->old_pointm));
          unchain_marker (XMARKER (w->start));
          wset_buffer (w, Qnil);
        }
@@ -4861,6 +4851,7 @@ window_internal_height (struct window *w)
 
   return ht;
 }
+
 \f
 /************************************************************************
                           Window Scrolling
@@ -4911,6 +4902,8 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, int noerror)
   void *itdata = NULL;
   int window_total_lines;
   int frame_line_height = default_line_pixel_height (w);
+  bool adjust_old_pointm = !NILP (Fequal (Fwindow_point (window),
+                                         Fwindow_old_point (window)));
 
   SET_TEXT_POS_FROM_MARKER (start, w->start);
   /* Scrolling a minibuffer window via scroll bar when the echo area
@@ -4922,7 +4915,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, int noerror)
   /* If PT is not visible in WINDOW, move back one half of
      the screen.  Allow PT to be partially visible, otherwise
      something like (scroll-down 1) with PT in the line before
-     the partially visible one would recenter. */
+     the partially visible one would recenter.  */
 
   if (!pos_visible_p (w, PT, &x, &y, &rtop, &rbot, &rowh, &vpos))
     {
@@ -4951,7 +4944,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, int noerror)
     }
   else if (auto_window_vscroll_p)
     {
-      if (rtop || rbot)                /* partially visible */
+      if (rtop || rbot)                /* Partially visible.  */
        {
          int px;
          int dy = frame_line_height;
@@ -5039,6 +5032,7 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, int noerror)
     {
       ptrdiff_t start_pos = IT_CHARPOS (it);
       int dy = frame_line_height;
+
       dy = max ((window_box_height (w)
                 - next_screen_context_lines * dy),
                dy) * n;
@@ -5282,6 +5276,13 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, int noerror)
        }
     }
   bidi_unshelve_cache (itdata, 0);
+
+  if (adjust_old_pointm)
+    Fset_marker (w->old_pointm,
+                ((w == XWINDOW (selected_window))
+                 ? make_number (BUF_PT (XBUFFER (w->contents)))
+                 : Fmarker_position (w->pointm)),
+                w->contents);
 }
 
 
@@ -5306,6 +5307,8 @@ window_scroll_line_based (Lisp_Object window, int n, bool whole, int noerror)
   ptrdiff_t startpos = marker_position (w->start);
   ptrdiff_t startbyte = marker_byte_position (w->start);
   Lisp_Object original_pos = Qnil;
+  bool adjust_old_pointm = !NILP (Fequal (Fwindow_point (window),
+                                         Fwindow_old_point (window)));
 
   /* If scrolling screen-fulls, compute the number of lines to
      scroll from the window's height.  */
@@ -5321,6 +5324,7 @@ window_scroll_line_based (Lisp_Object window, int n, bool whole, int noerror)
          struct position posit
            = *compute_motion (startpos, startbyte, 0, 0, 0,
                               PT, ht, 0, -1, w->hscroll, 0, w);
+
          window_scroll_preserve_vpos = posit.vpos;
          window_scroll_preserve_hpos = posit.hpos + w->hscroll;
        }
@@ -5436,6 +5440,13 @@ window_scroll_line_based (Lisp_Object window, int n, bool whole, int noerror)
       else
        xsignal0 (Qend_of_buffer);
     }
+
+  if (adjust_old_pointm)
+    Fset_marker (w->old_pointm,
+                ((w == XWINDOW (selected_window))
+                 ? make_number (BUF_PT (XBUFFER (w->contents)))
+                 : Fmarker_position (w->pointm)),
+                w->contents);
 }
 
 
@@ -5572,6 +5583,7 @@ specifies the window to scroll.  This takes precedence over
 
   Fset_buffer (w->contents);
   SET_PT_BOTH (marker_position (w->pointm), marker_byte_position (w->pointm));
+  SET_PT_BOTH (marker_position (w->old_pointm), marker_byte_position (w->old_pointm));
 
   if (NILP (arg))
     window_scroll (window, 1, 1, 1);
@@ -5586,6 +5598,7 @@ specifies the window to scroll.  This takes precedence over
     }
 
   set_marker_both (w->pointm, Qnil, PT, PT_BYTE);
+  set_marker_both (w->old_pointm, Qnil, PT, PT_BYTE);
   unbind_to (count, Qnil);
 
   return Qnil;
@@ -5611,6 +5624,8 @@ by this function.  This happens in an interactive call.  */)
   if (!NILP (set_minimum))
     w->min_hscroll = w->hscroll;
 
+  w->suspend_auto_hscroll = 1;
+
   return result;
 }
 
@@ -5634,6 +5649,8 @@ by this function.  This happens in an interactive call.  */)
   if (!NILP (set_minimum))
     w->min_hscroll = w->hscroll;
 
+  w->suspend_auto_hscroll = 1;
+
   return result;
 }
 
@@ -5724,14 +5741,16 @@ and redisplay normally--don't erase and redraw the frame.  */)
 {
   struct window *w = XWINDOW (selected_window);
   struct buffer *buf = XBUFFER (w->contents);
-  struct buffer *obuf = current_buffer;
   bool center_p = 0;
   ptrdiff_t charpos, bytepos;
   EMACS_INT iarg IF_LINT (= 0);
   int this_scroll_margin;
 
+  if (buf != current_buffer)
+    error ("`recenter'ing a window that does not display current-buffer.");
+
   /* If redisplay is suppressed due to an error, try again.  */
-  obuf->display_error_modiff = 0;
+  buf->display_error_modiff = 0;
 
   if (NILP (arg))
     {
@@ -5753,7 +5772,7 @@ and redisplay normally--don't erase and redraw the frame.  */)
 
       center_p = 1;
     }
-  else if (CONSP (arg)) /* Just C-u. */
+  else if (CONSP (arg)) /* Just C-u.  */
     center_p = 1;
   else
     {
@@ -5762,12 +5781,10 @@ and redisplay normally--don't erase and redraw the frame.  */)
       iarg = XINT (arg);
     }
 
-  set_buffer_internal (buf);
-
   /* Do this after making BUF current
      in case scroll_margin is buffer-local.  */
-  this_scroll_margin =
-    max (0, min (scroll_margin, w->total_lines / 4));
+  this_scroll_margin
+    max (0, min (scroll_margin, w->total_lines / 4));
 
   /* Handle centering on a graphical frame specially.  Such frames can
      have variable-height lines and centering point on the basis of
@@ -5815,7 +5832,7 @@ and redisplay normally--don't erase and redraw the frame.  */)
            h -= it.current_y;
          else
            {
-             /* Last line has no newline */
+             /* Last line has no newline */
              h -= line_bottom_y (&it);
              it.vpos++;
            }
@@ -5894,44 +5911,55 @@ and redisplay normally--don't erase and redraw the frame.  */)
 
   w->optional_new_start = 1;
 
-  w->start_at_line_beg = (bytepos == BEGV_BYTE ||
-                         FETCH_BYTE (bytepos - 1) == '\n');
+  w->start_at_line_beg = (bytepos == BEGV_BYTE
+                         || FETCH_BYTE (bytepos - 1) == '\n');
 
   wset_redisplay (w);
 
-  set_buffer_internal (obuf);
   return Qnil;
 }
 
 DEFUN ("window-text-width", Fwindow_text_width, Swindow_text_width,
-       0, 1, 0,
+       0, 2, 0,
        doc: /* Return the width in columns of the text display area of WINDOW.
 WINDOW must be a live window and defaults to the selected one.
 
 The returned width does not include dividers, scrollbars, margins,
 fringes, nor any partial-width columns at the right of the text
-area.  */)
-  (Lisp_Object window)
+area.
+
+Optional argument PIXELWISE non-nil, means to return the width in
+pixels.  */)
+  (Lisp_Object window, Lisp_Object pixelwise)
 {
   struct window *w = decode_live_window (window);
 
-  return make_number (window_box_width (w, TEXT_AREA)
-                     / FRAME_COLUMN_WIDTH (WINDOW_XFRAME (w)));
+  if (NILP (pixelwise))
+    return make_number (window_box_width (w, TEXT_AREA)
+                       / FRAME_COLUMN_WIDTH (WINDOW_XFRAME (w)));
+  else
+    return make_number (window_box_width (w, TEXT_AREA));
 }
 
 DEFUN ("window-text-height", Fwindow_text_height, Swindow_text_height,
-       0, 1, 0,
+       0, 2, 0,
        doc: /* Return the height in lines of the text display area of WINDOW.
 WINDOW must be a live window and defaults to the selected one.
 
 The returned height does not include dividers, the mode line, any header
-line, nor any partial-height lines at the bottom of the text area.  */)
-  (Lisp_Object window)
+line, nor any partial-height lines at the bottom of the text area.
+
+Optional argument PIXELWISE non-nil, means to return the height in
+pixels.  */)
+  (Lisp_Object window, Lisp_Object pixelwise)
 {
   struct window *w = decode_live_window (window);
 
-  return make_number (window_box_height (w)
-                     / FRAME_LINE_HEIGHT (WINDOW_XFRAME (w)));
+  if (NILP (pixelwise))
+    return make_number (window_box_height (w)
+                       / FRAME_LINE_HEIGHT (WINDOW_XFRAME (w)));
+  else
+    return make_number (window_box_height (w));
 }
 \f
 DEFUN ("move-to-window-line", Fmove_to_window_line, Smove_to_window_line,
@@ -6036,22 +6064,23 @@ struct save_window_data
     int frame_menu_bar_height, frame_tool_bar_height;
   };
 
-/* This is saved as a Lisp_Vector  */
+/* This is saved as a Lisp_Vector.  */
 struct saved_window
 {
   struct vectorlike_header header;
 
-  Lisp_Object window, buffer, start, pointm, mark;
+  Lisp_Object window, buffer, start, pointm, old_pointm;
   Lisp_Object pixel_left, pixel_top, pixel_height, pixel_width;
   Lisp_Object left_col, top_line, total_cols, total_lines;
   Lisp_Object normal_cols, normal_lines;
-  Lisp_Object hscroll, min_hscroll;
+  Lisp_Object hscroll, min_hscroll, hscroll_whole, suspend_auto_hscroll;
   Lisp_Object parent, prev;
   Lisp_Object start_at_line_beg;
   Lisp_Object display_table;
   Lisp_Object left_margin_cols, right_margin_cols;
   Lisp_Object left_fringe_width, right_fringe_width, fringes_outside_margins;
   Lisp_Object scroll_bar_width, vertical_scroll_bar_type, dedicated;
+  Lisp_Object scroll_bar_height, horizontal_scroll_bar_type;
   Lisp_Object combination_limit, window_parameters;
 };
 
@@ -6079,13 +6108,6 @@ DEFUN ("window-configuration-frame", Fwindow_configuration_frame, Swindow_config
   return XWINDOW (SAVED_WINDOW_N (saved_windows, 0)->window)->frame;
 }
 
-/* From Chong's unwind_create_frame_1.  */
-static void
-unwind_change_frame (Lisp_Object val)
-{
-  inhibit_lisp_code = val;
-}
-
 DEFUN ("set-window-configuration", Fset_window_configuration,
        Sset_window_configuration, 1, 1, 0,
        doc: /* Set the configuration of windows and buffers as specified by CONFIGURATION.
@@ -6102,6 +6124,7 @@ the return value is nil.  Otherwise the value is t.  */)
   Lisp_Object frame;
   struct frame *f;
   ptrdiff_t old_point = -1;
+  USE_SAFE_ALLOCA;
 
   CHECK_WINDOW_CONFIGURATION (configuration);
 
@@ -6165,19 +6188,6 @@ the return value is nil.  Otherwise the value is t.  */)
       int n_leaf_windows;
       ptrdiff_t k;
       int i, n;
-      ptrdiff_t count = SPECPDL_INDEX ();
-      /* If the frame has been resized since this window configuration was
-        made, we change the frame to the size specified in the
-        configuration, restore the configuration, and then resize it
-        back.  We keep track of the prevailing height in these variables.  */
-      int previous_frame_text_height = FRAME_TEXT_HEIGHT (f);
-      int previous_frame_text_width =  FRAME_TEXT_WIDTH  (f);
-      /* int previous_frame_menu_bar_height = FRAME_MENU_BAR_HEIGHT (f); */
-      /* int previous_frame_tool_bar_height = FRAME_TOOL_BAR_HEIGHT (f); */
-      /* int previous_frame_lines = FRAME_LINES (f); */
-      /* int previous_frame_cols =  FRAME_COLS  (f); */
-      int previous_frame_menu_bar_lines = FRAME_MENU_BAR_LINES (f);
-      int previous_frame_tool_bar_lines = FRAME_TOOL_BAR_LINES (f);
 
       /* Don't do this within the main loop below: This may call Lisp
         code and is thus potentially unsafe while input is blocked.  */
@@ -6194,36 +6204,12 @@ the return value is nil.  Otherwise the value is t.  */)
            call1 (Qrecord_window_buffer, window);
        }
 
-      /* Don't run lisp in the following segment since the frame is in a
-        completely inconsistent state.  See Bug#16207.  */
-      record_unwind_protect (unwind_change_frame, inhibit_lisp_code);
-      inhibit_lisp_code = Qt;
+      /* Consider frame unofficial, temporarily.  */
+      f->official = false;
       /* The mouse highlighting code could get screwed up
         if it runs during this.  */
       block_input ();
 
-      if (data->frame_text_width != previous_frame_text_width
-         || data->frame_text_height != previous_frame_text_height)
-       change_frame_size (f, data->frame_text_width,
-                          data->frame_text_height, 0, 0, 0, 1);
-
-      if (data->frame_menu_bar_lines != previous_frame_menu_bar_lines)
-       {
-#ifdef HAVE_WINDOW_SYSTEM
-         if (FRAME_WINDOW_P (f))
-           x_set_menu_bar_lines (f, make_number (data->frame_menu_bar_lines),
-                                 make_number (0));
-         else  /* TTY or MSDOS */
-#endif
-           set_menu_bar_lines (f, make_number (data->frame_menu_bar_lines),
-                               make_number (0));
-       }
-#ifdef HAVE_WINDOW_SYSTEM
-      if (data->frame_tool_bar_lines != previous_frame_tool_bar_lines)
-       x_set_tool_bar_lines (f, make_number (data->frame_tool_bar_lines),
-                             make_number (0));
-#endif
-
       /* "Swap out" point from the selected window's buffer
         into the window itself.  (Normally the pointm of the selected
         window holds garbage.)  We do this now, before
@@ -6246,8 +6232,8 @@ the return value is nil.  Otherwise the value is t.  */)
         really like to do is to free only those matrices not reused
         below.  */
       root_window = XWINDOW (FRAME_ROOT_WINDOW (f));
-      leaf_windows = alloca (count_windows (root_window)
-                            * sizeof *leaf_windows);
+      int nwindows = count_windows (root_window);
+      SAFE_NALLOCA (leaf_windows, 1, nwindows);
       n_leaf_windows = get_leaf_windows (root_window, leaf_windows, 0);
 
       /* Kludge Alert!
@@ -6302,7 +6288,9 @@ the return value is nil.  Otherwise the value is t.  */)
          wset_normal_cols (w, p->normal_cols);
          wset_normal_lines (w, p->normal_lines);
          w->hscroll = XFASTINT (p->hscroll);
+         w->suspend_auto_hscroll = !NILP (p->suspend_auto_hscroll);
          w->min_hscroll = XFASTINT (p->min_hscroll);
+         w->hscroll_whole = XFASTINT (p->hscroll_whole);
          wset_display_table (w, p->display_table);
          w->left_margin_cols = XINT (p->left_margin_cols);
          w->right_margin_cols = XINT (p->right_margin_cols);
@@ -6310,7 +6298,9 @@ the return value is nil.  Otherwise the value is t.  */)
          w->right_fringe_width = XINT (p->right_fringe_width);
          w->fringes_outside_margins = !NILP (p->fringes_outside_margins);
          w->scroll_bar_width = XINT (p->scroll_bar_width);
+         w->scroll_bar_height = XINT (p->scroll_bar_height);
          wset_vertical_scroll_bar_type (w, p->vertical_scroll_bar_type);
+         wset_horizontal_scroll_bar_type (w, p->horizontal_scroll_bar_type);
          wset_dedicated (w, p->dedicated);
          wset_combination_limit (w, p->combination_limit);
          /* Restore any window parameters that have been saved.
@@ -6341,18 +6331,15 @@ the return value is nil.  Otherwise the value is t.  */)
              wset_buffer (w, p->buffer);
              w->start_at_line_beg = !NILP (p->start_at_line_beg);
              set_marker_restricted (w->start, p->start, w->contents);
-             set_marker_restricted (w->pointm, p->pointm,
-                                    w->contents);
-             Fset_marker (BVAR (XBUFFER (w->contents), mark),
-                          p->mark, w->contents);
-
+             set_marker_restricted (w->pointm, p->pointm, w->contents);
+             set_marker_restricted (w->old_pointm, p->old_pointm, w->contents);
              /* As documented in Fcurrent_window_configuration, don't
                 restore the location of point in the buffer which was
                 current when the window configuration was recorded.  */
              if (!EQ (p->buffer, new_current_buffer)
                  && XBUFFER (p->buffer) == current_buffer)
                Fgoto_char (w->pointm);
-            }
+           }
          else if (BUFFERP (w->contents) && BUFFER_LIVE_P (XBUFFER (w->contents)))
            /* Keep window's old buffer; make sure the markers are real.  */
            {
@@ -6364,20 +6351,26 @@ the return value is nil.  Otherwise the value is t.  */)
                  (w->pointm, w->contents,
                   BUF_PT (XBUFFER (w->contents)),
                   BUF_PT_BYTE (XBUFFER (w->contents)));
+             if (XMARKER (w->old_pointm)->buffer == 0)
+               set_marker_restricted_both
+                 (w->old_pointm, w->contents,
+                  BUF_PT (XBUFFER (w->contents)),
+                  BUF_PT_BYTE (XBUFFER (w->contents)));
              w->start_at_line_beg = 1;
            }
          else if (!NILP (w->start))
            /* Leaf window has no live buffer, get one.  */
            {
              /* Get the buffer via other_buffer_safely in order to
-             avoid showing an unimportant buffer and, if necessary, to
-             recreate *scratch* in the course (part of Juanma's bs-show
-             scenario from March 2011).  */
+                avoid showing an unimportant buffer and, if necessary, to
+                recreate *scratch* in the course (part of Juanma's bs-show
+                scenario from March 2011).  */
              wset_buffer (w, other_buffer_safely (Fcurrent_buffer ()));
              /* This will set the markers to beginning of visible
                 range.  */
              set_marker_restricted_both (w->start, w->contents, 0, 0);
              set_marker_restricted_both (w->pointm, w->contents, 0, 0);
+             set_marker_restricted_both (w->old_pointm, w->contents, 0, 0);
              w->start_at_line_beg = 1;
              if (!NILP (w->dedicated))
                /* Record this window as dead.  */
@@ -6412,30 +6405,6 @@ the return value is nil.  Otherwise the value is t.  */)
              && FRAME_LIVE_P (XFRAME (data->focus_frame))))
        Fredirect_frame_focus (frame, data->focus_frame);
 
-      /* Set the frame size to the value it had before this function.  */
-      if (previous_frame_text_width != FRAME_TEXT_WIDTH (f)
-         || previous_frame_text_height != FRAME_TEXT_HEIGHT (f))
-       change_frame_size (f, previous_frame_text_width,
-                          previous_frame_text_height, 0, 0, 0, 1);
-
-      if (previous_frame_menu_bar_lines != FRAME_MENU_BAR_LINES (f))
-       {
-#ifdef HAVE_WINDOW_SYSTEM
-         if (FRAME_WINDOW_P (f))
-           x_set_menu_bar_lines (f,
-                                 make_number (previous_frame_menu_bar_lines),
-                                 make_number (0));
-         else  /* TTY or MSDOS */
-#endif
-           set_menu_bar_lines (f, make_number (previous_frame_menu_bar_lines),
-                               make_number (0));
-       }
-#ifdef HAVE_WINDOW_SYSTEM
-      if (previous_frame_tool_bar_lines != FRAME_TOOL_BAR_LINES (f))
-       x_set_tool_bar_lines (f, make_number (previous_frame_tool_bar_lines),
-                             make_number (0));
-#endif
-
       /* Now, free glyph matrices in windows that were not reused.  */
       for (i = n = 0; i < n_leaf_windows; ++i)
        {
@@ -6445,9 +6414,13 @@ the return value is nil.  Otherwise the value is t.  */)
            ++n;
        }
 
+      /* Make frame official again and apply frame size changes if
+        needed.  */
+      f->official = true;
+      adjust_frame_size (f, -1, -1, 1, 0);
+
       adjust_frame_glyphs (f);
       unblock_input ();
-      unbind_to (count, Qnil);
 
       /* Scan dead buffer windows.  */
       for (; CONSP (dead_windows); dead_windows = XCDR (dead_windows))
@@ -6484,9 +6457,11 @@ the return value is nil.  Otherwise the value is t.  */)
   Vminibuf_scroll_window = data->minibuf_scroll_window;
   minibuf_selected_window = data->minibuf_selected_window;
 
+  SAFE_FREE ();
   return (FRAME_LIVE_P (f) ? Qt : Qnil);
 }
 
+
 void
 restore_window_configuration (Lisp_Object configuration)
 {
@@ -6518,6 +6493,7 @@ delete_all_child_windows (Lisp_Object window)
     {
       unshow_buffer (w);
       unchain_marker (XMARKER (w->pointm));
+      unchain_marker (XMARKER (w->old_pointm));
       unchain_marker (XMARKER (w->start));
       /* Since combination limit makes sense for an internal windows
         only, we use this slot to save the buffer for the sake of
@@ -6624,7 +6600,9 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, int i)
       p->normal_cols = w->normal_cols;
       p->normal_lines = w->normal_lines;
       XSETFASTINT (p->hscroll, w->hscroll);
+      p->suspend_auto_hscroll = w->suspend_auto_hscroll ? Qt : Qnil;
       XSETFASTINT (p->min_hscroll, w->min_hscroll);
+      XSETFASTINT (p->hscroll_whole, w->hscroll_whole);
       p->display_table = w->display_table;
       p->left_margin_cols = make_number (w->left_margin_cols);
       p->right_margin_cols = make_number (w->right_margin_cols);
@@ -6632,7 +6610,9 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, int i)
       p->right_fringe_width = make_number (w->right_fringe_width);
       p->fringes_outside_margins = w->fringes_outside_margins ? Qt : Qnil;
       p->scroll_bar_width = make_number (w->scroll_bar_width);
+      p->scroll_bar_height = make_number (w->scroll_bar_height);
       p->vertical_scroll_bar_type = w->vertical_scroll_bar_type;
+      p->horizontal_scroll_bar_type = w->horizontal_scroll_bar_type;
       p->dedicated = w->dedicated;
       p->combination_limit = w->combination_limit;
       p->window_parameters = Qnil;
@@ -6694,33 +6674,27 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, int i)
                                      BUF_PT_BYTE (XBUFFER (w->contents)));
          else
            p->pointm = Fcopy_marker (w->pointm, Qnil);
+         p->old_pointm = Fcopy_marker (w->old_pointm, Qnil);
          XMARKER (p->pointm)->insertion_type
-           = !NILP (buffer_local_value_1 /* Don't signal error if void.  */
+           = !NILP (buffer_local_value /* Don't signal error if void.  */
+                    (Qwindow_point_insertion_type, w->contents));
+         XMARKER (p->old_pointm)->insertion_type
+           = !NILP (buffer_local_value /* Don't signal error if void.  */
                     (Qwindow_point_insertion_type, w->contents));
 
          p->start = Fcopy_marker (w->start, Qnil);
          p->start_at_line_beg = w->start_at_line_beg ? Qt : Qnil;
-
-         tem = BVAR (XBUFFER (w->contents), mark);
-         p->mark = Fcopy_marker (tem, Qnil);
        }
       else
        {
          p->pointm = Qnil;
+         p->old_pointm = Qnil;
          p->start = Qnil;
-         p->mark = Qnil;
          p->start_at_line_beg = Qnil;
        }
 
-      if (NILP (w->parent))
-       p->parent = Qnil;
-      else
-       p->parent = XWINDOW (w->parent)->temslot;
-
-      if (NILP (w->prev))
-       p->prev = Qnil;
-      else
-       p->prev = XWINDOW (w->prev)->temslot;
+      p->parent = NILP (w->parent) ? Qnil : XWINDOW (w->parent)->temslot;
+      p->prev = NILP (w->prev) ? Qnil : XWINDOW (w->prev)->temslot;
 
       if (WINDOWP (w->contents))
        i = save_window_save (w->contents, vector, i);
@@ -6734,8 +6708,8 @@ DEFUN ("current-window-configuration", Fcurrent_window_configuration,
        doc: /* Return an object representing the current window configuration of FRAME.
 If FRAME is nil or omitted, use the selected frame.
 This describes the number of windows, their sizes and current buffers,
-and for each displayed buffer, where display starts, and the positions of
-point and mark.  An exception is made for point in the current buffer:
+and for each displayed buffer, where display starts, and the position of
+point.  An exception is made for point in the current buffer:
 its value is -not- saved.
 This also records the currently selected frame, and FRAME's focus
 redirection (see `redirect-frame-focus').  The variable
@@ -6784,7 +6758,6 @@ static void
 apply_window_adjustment (struct window *w)
 {
   eassert (w);
-  adjust_window_margins (w);
   clear_glyph_matrix (w->current_matrix);
   w->window_end_valid = 0;
   windows_or_buffers_changed = 30;
@@ -6802,8 +6775,8 @@ set_window_margins (struct window *w, Lisp_Object left_width,
                    Lisp_Object right_width)
 {
   int left, right;
+  int unit = WINDOW_FRAME_COLUMN_WIDTH (w);
 
-  /* FIXME: what about margins that are too wide?  */
   left = (NILP (left_width) ? 0
          : (CHECK_NATNUM (left_width), XINT (left_width)));
   right = (NILP (right_width) ? 0
@@ -6811,11 +6784,23 @@ set_window_margins (struct window *w, Lisp_Object left_width,
 
   if (w->left_margin_cols != left || w->right_margin_cols != right)
     {
-      w->left_margin_cols = left;
-      w->right_margin_cols = right;
-      return w;
+      /* Don't change anything if new margins won't fit.  */
+      if ((WINDOW_PIXEL_WIDTH (w)
+          - WINDOW_FRINGES_WIDTH (w)
+          - WINDOW_SCROLL_BAR_AREA_WIDTH (w)
+          - (left + right) * unit)
+         >= MIN_SAFE_WINDOW_PIXEL_WIDTH (w))
+       {
+         w->left_margin_cols = left;
+         w->right_margin_cols = right;
+
+         return w;
+       }
+      else
+       return NULL;
     }
-  return NULL;
+  else
+    return NULL;
 }
 
 DEFUN ("set-window-margins", Fset_window_margins, Sset_window_margins,
@@ -6877,12 +6862,25 @@ set_window_fringes (struct window *w, Lisp_Object left_width,
          || w->right_fringe_width != right
          || w->fringes_outside_margins != outside))
     {
+      if (left > 0 || right > 0)
+       {
+         /* Don't change anything if new fringes don't fit.  */
+         if ((WINDOW_PIXEL_WIDTH (w)
+              - WINDOW_MARGINS_WIDTH (w)
+              - WINDOW_SCROLL_BAR_AREA_WIDTH (w)
+              - max (left, 0) - max (right, 0))
+             < MIN_SAFE_WINDOW_PIXEL_WIDTH (w))
+           return NULL;
+       }
+
       w->left_fringe_width = left;
       w->right_fringe_width = right;
       w->fringes_outside_margins = outside;
+
       return w;
     }
-  return NULL;
+  else
+    return NULL;
 }
 
 DEFUN ("set-window-fringes", Fset_window_fringes, Sset_window_fringes,
@@ -6933,9 +6931,11 @@ Value is a list of the form (LEFT-WIDTH RIGHT-WIDTH OUTSIDE-MARGINS).  */)
 
 static struct window *
 set_window_scroll_bars (struct window *w, Lisp_Object width,
-                       Lisp_Object vertical_type, Lisp_Object horizontal_type)
+                       Lisp_Object vertical_type, Lisp_Object height,
+                       Lisp_Object horizontal_type)
 {
   int iwidth = (NILP (width) ? -1 : (CHECK_NATNUM (width), XINT (width)));
+  bool changed = 0;
 
   if (iwidth == 0)
     vertical_type = Qnil;
@@ -6949,32 +6949,78 @@ set_window_scroll_bars (struct window *w, Lisp_Object width,
   if (w->scroll_bar_width != iwidth
       || !EQ (w->vertical_scroll_bar_type, vertical_type))
     {
-      w->scroll_bar_width = iwidth;
-      wset_vertical_scroll_bar_type (w, vertical_type);
-      return w;
+      /* Don't change anything if new scroll bar won't fit.  */
+      if ((WINDOW_PIXEL_WIDTH (w)
+          - WINDOW_MARGINS_WIDTH (w)
+          - WINDOW_FRINGES_WIDTH (w)
+          - max (iwidth, 0))
+         >= MIN_SAFE_WINDOW_PIXEL_WIDTH (w))
+       {
+         w->scroll_bar_width = iwidth;
+         wset_vertical_scroll_bar_type (w, vertical_type);
+         changed = 1;
+       }
     }
-  return NULL;
+
+#if USE_HORIZONTAL_SCROLL_BARS
+  {
+    int iheight = (NILP (height) ? -1 : (CHECK_NATNUM (height), XINT (height)));
+
+    if (MINI_WINDOW_P (w) || iheight == 0)
+      horizontal_type = Qnil;
+
+    if (!(NILP (horizontal_type)
+         || EQ (horizontal_type, Qbottom)
+         || EQ (horizontal_type, Qt)))
+      error ("Invalid type of horizontal scroll bar");
+
+    if (w->scroll_bar_height != iheight
+       || !EQ (w->horizontal_scroll_bar_type, horizontal_type))
+      {
+       /* Don't change anything if new scroll bar won't fit.  */
+       if ((WINDOW_PIXEL_HEIGHT (w)
+            - WINDOW_HEADER_LINE_HEIGHT (w)
+            - WINDOW_MODE_LINE_HEIGHT (w)
+            - max (iheight, 0))
+           >= MIN_SAFE_WINDOW_PIXEL_HEIGHT (w))
+         {
+           w->scroll_bar_height = iheight;
+           wset_horizontal_scroll_bar_type (w, horizontal_type);
+           changed = 1;
+         }
+      }
+  }
+#else
+  wset_horizontal_scroll_bar_type (w, Qnil);
+#endif
+
+  return changed ? w : NULL;
 }
 
 DEFUN ("set-window-scroll-bars", Fset_window_scroll_bars,
-       Sset_window_scroll_bars, 2, 4, 0,
+       Sset_window_scroll_bars, 1, 5, 0,
        doc: /* Set width and type of scroll bars of window WINDOW.
 WINDOW must be a live window and defaults to the selected one.
 
-Second parameter WIDTH specifies the pixel width for the scroll bar.
+Second parameter WIDTH specifies the pixel width for the vertical scroll
+bar.  If WIDTH is nil, use the scroll-bar width of WINDOW's frame.
 Third parameter VERTICAL-TYPE specifies the type of the vertical scroll
-bar: left, right, or nil.
-If WIDTH is nil, use the frame's scroll-bar width.
-If VERTICAL-TYPE is t, use the frame's scroll-bar type.
-Fourth parameter HORIZONTAL-TYPE is currently unused.
+bar: left, right, or nil.  If VERTICAL-TYPE is t, this means use the
+frame's scroll-bar type.
+
+Fourth parameter HEIGHT specifies the pixel height for the horizontal
+scroll bar.  If HEIGHT is nil, use the scroll-bar height of WINDOW's
+frame.  Fifth parameter HORIZONTAL-TYPE specifies the type of the
+horizontal scroll bar: nil, bottom, or t.  If HORIZONTAL-TYPE is t, this
+means to use the frame's horizontal scroll-bar type.
 
 Return t if scroll bars were actually changed and nil otherwise.  */)
-  (Lisp_Object window, Lisp_Object width,
-   Lisp_Object vertical_type, Lisp_Object horizontal_type)
+  (Lisp_Object window, Lisp_Object width, Lisp_Object vertical_type,
+   Lisp_Object height, Lisp_Object horizontal_type)
 {
   struct window *w
     = set_window_scroll_bars (decode_live_window (window),
-                             width, vertical_type, horizontal_type);
+                             width, vertical_type, height, horizontal_type);
   return w ? (apply_window_adjustment (w), Qt) : Qnil;
 }
 
@@ -6984,19 +7030,25 @@ DEFUN ("window-scroll-bars", Fwindow_scroll_bars, Swindow_scroll_bars,
        doc: /* Get width and type of scroll bars of window WINDOW.
 WINDOW must be a live window and defaults to the selected one.
 
-Value is a list of the form (WIDTH COLS VERTICAL-TYPE HORIZONTAL-TYPE).
-If WIDTH is nil or TYPE is t, the window is using the frame's corresponding
+Value is a list of the form (WIDTH COLUMNS VERTICAL-TYPE HEIGHT LINES
+HORIZONTAL-TYPE).  If WIDTH or HEIGHT is nil or VERTICAL-TYPE or
+HORIZONTAL-TYPE is t, the window is using the frame's corresponding
 value.  */)
   (Lisp_Object window)
 {
   struct window *w = decode_live_window (window);
 
-  return list4 (make_number (WINDOW_SCROLL_BAR_AREA_WIDTH (w)),
-               make_number (WINDOW_SCROLL_BAR_COLS (w)),
-               w->vertical_scroll_bar_type, Qnil);
+  return Fcons (((w->scroll_bar_width >= 0)
+                ? make_number (w->scroll_bar_width)
+                : Qnil),
+               list5 (make_number (WINDOW_SCROLL_BAR_COLS (w)),
+                      w->vertical_scroll_bar_type,
+                      ((w->scroll_bar_height >= 0)
+                       ? make_number (w->scroll_bar_height)
+                       : Qnil),
+                      make_number (WINDOW_SCROLL_BAR_LINES (w)),
+                      w->horizontal_scroll_bar_type));
 }
-
-
 \f
 /***********************************************************************
                           Smooth scrolling
@@ -7179,15 +7231,16 @@ compare_window_configurations (Lisp_Object configuration1,
                  || !EQ (sw1->min_hscroll, sw2->min_hscroll)
                  || !EQ (sw1->start_at_line_beg, sw2->start_at_line_beg)
                  || NILP (Fequal (sw1->start, sw2->start))
-                 || NILP (Fequal (sw1->pointm, sw2->pointm))
-                 || NILP (Fequal (sw1->mark, sw2->mark))))
+                 || NILP (Fequal (sw1->pointm, sw2->pointm))))
          || !EQ (sw1->left_margin_cols, sw2->left_margin_cols)
          || !EQ (sw1->right_margin_cols, sw2->right_margin_cols)
          || !EQ (sw1->left_fringe_width, sw2->left_fringe_width)
          || !EQ (sw1->right_fringe_width, sw2->right_fringe_width)
          || !EQ (sw1->fringes_outside_margins, sw2->fringes_outside_margins)
          || !EQ (sw1->scroll_bar_width, sw2->scroll_bar_width)
-         || !EQ (sw1->vertical_scroll_bar_type, sw2->vertical_scroll_bar_type))
+         || !EQ (sw1->scroll_bar_height, sw2->scroll_bar_height)
+         || !EQ (sw1->vertical_scroll_bar_type, sw2->vertical_scroll_bar_type)
+         || !EQ (sw1->horizontal_scroll_bar_type, sw2->horizontal_scroll_bar_type))
        return 0;
     }
 
@@ -7197,7 +7250,7 @@ compare_window_configurations (Lisp_Object configuration1,
 DEFUN ("compare-window-configurations", Fcompare_window_configurations,
        Scompare_window_configurations, 2, 2, 0,
        doc: /* Compare two window configurations as regards the structure of windows.
-This function ignores details such as the values of point and mark
+This function ignores details such as the values of point
 and scrolling positions.  */)
   (Lisp_Object x, Lisp_Object y)
 {
@@ -7214,8 +7267,6 @@ init_window_once (void)
   Vterminal_frame = selected_frame;
   minibuf_window = f->minibuffer_window;
   selected_window = f->selected_window;
-
-  window_initialized = 1;
 }
 
 void
@@ -7243,6 +7294,7 @@ syms_of_window (void)
   DEFSYM (Qdelete_window, "delete-window");
   DEFSYM (Qwindow_resize_root_window, "window--resize-root-window");
   DEFSYM (Qwindow_resize_root_window_vertically, "window--resize-root-window-vertically");
+  DEFSYM (Qwindow_sanitize_window_sizes, "window--sanitize-window-sizes");
   DEFSYM (Qwindow_pixel_to_total, "window--pixel-to-total");
   DEFSYM (Qsafe, "safe");
   DEFSYM (Qdisplay_buffer, "display-buffer");
@@ -7469,12 +7521,14 @@ pixelwise even if this option is nil.  */);
   defsubr (&Swindow_right_divider_width);
   defsubr (&Swindow_bottom_divider_width);
   defsubr (&Swindow_scroll_bar_width);
+  defsubr (&Swindow_scroll_bar_height);
   defsubr (&Swindow_inside_edges);
   defsubr (&Swindow_inside_pixel_edges);
   defsubr (&Swindow_inside_absolute_pixel_edges);
   defsubr (&Scoordinates_in_window_p);
   defsubr (&Swindow_at);
   defsubr (&Swindow_point);
+  defsubr (&Swindow_old_point);
   defsubr (&Swindow_start);
   defsubr (&Swindow_end);
   defsubr (&Sset_window_point);
index b9c2b1f5ba83873d25f08113e75cab1ec6efe74d..ea5dddc9fc8b4c49cec6c962c70c895c185309b8 100644 (file)
@@ -128,21 +128,37 @@ struct window
        each one can have its own value of point.  */
     Lisp_Object pointm;
 
+    /* A marker pointing to where in the text point was in this window
+       at the time of last redisplay.  The value is saved for the
+       selected window too.  */
+    Lisp_Object old_pointm;
+
     /* No permanent meaning; used by save-window-excursion's
        bookkeeping.  */
     Lisp_Object temslot;
 
-    /* This window's vertical scroll bar.  This field is only for use
-       by the window-system-dependent code which implements the
-       scroll bars; it can store anything it likes here.  If this
-       window is newly created and we haven't displayed a scroll bar in
-       it yet, or if the frame doesn't have any scroll bars, this is nil.  */
+    /* This window's vertical scroll bar.  This field is only for use by
+       the window-system-dependent code which implements the scroll
+       bars; it can store anything it likes here.  If this window is
+       newly created and we haven't displayed a scroll bar in it yet, or
+       if the frame doesn't have any scroll bars, this is nil.  */
     Lisp_Object vertical_scroll_bar;
 
     /* Type of vertical scroll bar.  A value of nil means
        no scroll bar.  A value of t means use frame value.  */
     Lisp_Object vertical_scroll_bar_type;
 
+    /* This window's horizontal scroll bar.  This field is only for use
+       by the window-system-dependent code which implements the scroll
+       bars; it can store anything it likes here.  If this window is
+       newly created and we haven't displayed a scroll bar in it yet, or
+       if the frame doesn't have any scroll bars, this is nil.  */
+    Lisp_Object horizontal_scroll_bar;
+
+    /* Type of horizontal scroll bar.  A value of nil means
+       no scroll bar.  A value of t means use frame value.  */
+    Lisp_Object horizontal_scroll_bar_type;
+
     /* Display-table to use for displaying chars in this window.
        Nil means use the buffer's own display-table.  */
     Lisp_Object display_table;
@@ -209,6 +225,10 @@ struct window
        the user has set, by set-window-hscroll for example.  */
     ptrdiff_t min_hscroll;
 
+    /* Maximum line length in pixels within window bound by size of
+       window (set up by set_horizontal_scroll_bar).  */
+    ptrdiff_t hscroll_whole;
+
     /* Displayed buffer's text modification events counter as of last time
        display completed.  */
     EMACS_INT last_modified;
@@ -282,6 +302,10 @@ struct window
        A value of -1 means use frame values.  */
     int scroll_bar_width;
 
+    /* Pixel height of scroll bars.
+       A value of -1 means use frame values.  */
+    int scroll_bar_height;
+
     /* Effective height of the mode line, or -1 if not known.  */
     int mode_line_height;
 
@@ -355,6 +379,10 @@ struct window
     /* True if it needs to be redisplayed.  */
     bool_bf redisplay : 1;
 
+    /* True if auto hscrolling is currently suspended in this
+       window.  */
+    bool_bf suspend_auto_hscroll : 1;
+
     /* Amount by which lines of this window are scrolled in
        y-direction (smooth scrolling).  */
     int vscroll;
@@ -402,6 +430,18 @@ wset_vertical_scroll_bar (struct window *w, Lisp_Object val)
   w->vertical_scroll_bar = val;
 }
 
+INLINE void
+wset_horizontal_scroll_bar (struct window *w, Lisp_Object val)
+{
+  w->horizontal_scroll_bar = val;
+}
+
+INLINE void
+wset_horizontal_scroll_bar_type (struct window *w, Lisp_Object val)
+{
+  w->horizontal_scroll_bar_type = val;
+}
+
 INLINE void
 wset_prev_buffers (struct window *w, Lisp_Object val)
 {
@@ -415,8 +455,17 @@ wset_next_buffers (struct window *w, Lisp_Object val)
 }
 
 /* True if W is a minibuffer window.  */
+#define MINI_WINDOW_P(W) ((W)->mini)
+
+/* 1 if W is a non-only minibuffer window.  */
+/* The first check is redundant and the second overly complicated. */
+#define MINI_NON_ONLY_WINDOW_P(W)                              \
+  (MINI_WINDOW_P (W)                                           \
+   && (EQ (W->prev, FRAME_ROOT_WINDOW (WINDOW_XFRAME (W)))))
 
-#define MINI_WINDOW_P(W)       ((W)->mini)
+/* 1 if W is a minibuffer-only window.  */
+#define MINI_ONLY_WINDOW_P(W)                  \
+  (MINI_WINDOW_P (W) && NILP (W->prev))
 
 /* General window layout:
 
@@ -460,16 +509,17 @@ wset_next_buffers (struct window *w, Lisp_Object val)
 #define WINDOW_VERTICAL_COMBINATION_P(W) \
   (WINDOWP ((W)->contents) && !(W)->horizontal)
 
-#define WINDOW_XFRAME(W) \
-  (XFRAME (WINDOW_FRAME ((W))))
+/* WINDOW's XFRAME.  */
+#define WINDOW_XFRAME(W) (XFRAME (WINDOW_FRAME ((W))))
 
-/* Return the canonical column width of the frame of window W.  */
+/* Whether WINDOW is a pseudo window.  */
+#define WINDOW_PSEUDO_P(W) ((W)->pseudo_window_p)
 
+/* Return the canonical column width of the frame of window W.  */
 #define WINDOW_FRAME_COLUMN_WIDTH(W) \
   (FRAME_COLUMN_WIDTH (WINDOW_XFRAME ((W))))
 
 /* Return the canonical column width of the frame of window W.  */
-
 #define WINDOW_FRAME_LINE_HEIGHT(W) \
   (FRAME_LINE_HEIGHT (WINDOW_XFRAME ((W))))
 
@@ -613,6 +663,10 @@ wset_next_buffers (struct window *w, Lisp_Object val)
 #define WINDOW_LEFTMOST_P(W) \
   (WINDOW_LEFT_PIXEL_EDGE (W) == 0)
 
+/* True if window W's has no other windows above in its frame.  */
+#define WINDOW_TOPMOST_P(W) \
+  (WINDOW_TOP_PIXEL_EDGE (W) == 0)
+
 /* True if window W's has no other windows to its right in its frame.  */
 #define WINDOW_RIGHTMOST_P(W)                                  \
   (WINDOW_RIGHT_PIXEL_EDGE (W)                                 \
@@ -629,7 +683,6 @@ wset_next_buffers (struct window *w, Lisp_Object val)
 /* Return the frame column at which the text (or left fringe) in
    window W starts.  This is different from the `LEFT_EDGE' because it
    does not include a left-hand scroll bar if any.  */
-
 #define WINDOW_BOX_LEFT_EDGE_COL(W) \
   (WINDOW_LEFT_EDGE_COL (W) \
    + WINDOW_LEFT_SCROLL_BAR_COLS (W))
@@ -644,7 +697,6 @@ wset_next_buffers (struct window *w, Lisp_Object val)
 /* Return the window column before which the text in window W ends.
    This is different from WINDOW_RIGHT_EDGE_COL because it does not
    include a scroll bar or window-separating line on the right edge.  */
-
 #define WINDOW_BOX_RIGHT_EDGE_COL(W) \
   (WINDOW_RIGHT_EDGE_COL (W) \
    - WINDOW_RIGHT_SCROLL_BAR_COLS (W))
@@ -706,114 +758,116 @@ wset_next_buffers (struct window *w, Lisp_Object val)
 #define WINDOW_FRINGES_WIDTH(W)                \
   (WINDOW_LEFT_FRINGE_WIDTH (W) + WINDOW_RIGHT_FRINGE_WIDTH (W))
 
-/* Widths of fringes in columns.  */
-#define WINDOW_FRINGE_COLS(W)                  \
-  ((W->left_fringe_width >= 0                  \
-    && W->right_fringe_width >= 0)             \
-   ? ((WINDOW_FRINGES_WIDTH (W)                        \
-       + WINDOW_FRAME_COLUMN_WIDTH (W) - 1)    \
-      / WINDOW_FRAME_COLUMN_WIDTH (W))         \
-   : FRAME_FRINGE_COLS (WINDOW_XFRAME (W)))
-
-#define WINDOW_LEFT_FRINGE_COLS(W)             \
-  ((WINDOW_LEFT_FRINGE_WIDTH ((W))             \
-    + WINDOW_FRAME_COLUMN_WIDTH (W) - 1)       \
-   / WINDOW_FRAME_COLUMN_WIDTH (W))
-
-#define WINDOW_RIGHT_FRINGE_COLS(W)            \
-  ((WINDOW_RIGHT_FRINGE_WIDTH ((W))            \
-    + WINDOW_FRAME_COLUMN_WIDTH (W) - 1)       \
-   / WINDOW_FRAME_COLUMN_WIDTH (W))
-
 /* Are fringes outside display margins in window W.  */
 #define WINDOW_HAS_FRINGES_OUTSIDE_MARGINS(W)  \
   ((W)->fringes_outside_margins)
 
-/* Say whether scroll bars are currently enabled for window W,
+/* Say whether vertical scroll bars are currently enabled for window W,
    and which side they are on.  */
-#define WINDOW_VERTICAL_SCROLL_BAR_TYPE(w)             \
-  (EQ (w->vertical_scroll_bar_type, Qt)                        \
-   ? FRAME_VERTICAL_SCROLL_BAR_TYPE (WINDOW_XFRAME (w))        \
-   : EQ (w->vertical_scroll_bar_type, Qleft)           \
+#define WINDOW_VERTICAL_SCROLL_BAR_TYPE(W)             \
+  (WINDOW_PSEUDO_P (W)                                 \
+   ? vertical_scroll_bar_none                          \
+   : EQ (W->vertical_scroll_bar_type, Qt)              \
+   ? FRAME_VERTICAL_SCROLL_BAR_TYPE (WINDOW_XFRAME (W))        \
+   : EQ (W->vertical_scroll_bar_type, Qleft)           \
    ? vertical_scroll_bar_left                          \
-   : EQ (w->vertical_scroll_bar_type, Qright)          \
+   : EQ (W->vertical_scroll_bar_type, Qright)          \
    ? vertical_scroll_bar_right                         \
-   : vertical_scroll_bar_none)                         \
+   : vertical_scroll_bar_none)
+
+#define WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT(W)                      \
+  (WINDOW_VERTICAL_SCROLL_BAR_TYPE (W) == vertical_scroll_bar_left)
 
-#define WINDOW_HAS_VERTICAL_SCROLL_BAR(w)              \
-  (EQ (w->vertical_scroll_bar_type, Qt)                        \
-   ? FRAME_HAS_VERTICAL_SCROLL_BARS (WINDOW_XFRAME (w))        \
-   : !NILP (w->vertical_scroll_bar_type))
+#define WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT(W)                     \
+  (WINDOW_VERTICAL_SCROLL_BAR_TYPE (W) == vertical_scroll_bar_right)
 
-#define WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT(w)              \
-  (EQ (w->vertical_scroll_bar_type, Qt)                                \
-   ? FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (WINDOW_XFRAME (w))        \
-   : EQ (w->vertical_scroll_bar_type, Qleft))
+#define WINDOW_HAS_VERTICAL_SCROLL_BAR(W)              \
+  (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (W)          \
+   || WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (W))
 
-#define WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT(w)                     \
-  (EQ (w->vertical_scroll_bar_type, Qt)                                        \
-   ? FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (WINDOW_XFRAME (w))       \
-   : EQ (w->vertical_scroll_bar_type, Qright))
+#if (defined (HAVE_WINDOW_SYSTEM)                                      \
+     && ((defined (USE_TOOLKIT_SCROLL_BARS) && !defined (HAVE_NS))     \
+        || defined (HAVE_NTGUI)))
+# define USE_HORIZONTAL_SCROLL_BARS true
+#else
+# define USE_HORIZONTAL_SCROLL_BARS false
+#endif
+
+/* Say whether horizontal scroll bars are currently enabled for window
+   W.  Horizontal scrollbars exist for toolkit versions only.  */
+#if USE_HORIZONTAL_SCROLL_BARS
+#define WINDOW_HAS_HORIZONTAL_SCROLL_BAR(W)                    \
+  ((WINDOW_PSEUDO_P (W) || MINI_NON_ONLY_WINDOW_P (W))         \
+   ? false                                                     \
+   : EQ (W->horizontal_scroll_bar_type, Qt)                    \
+   ? FRAME_HAS_HORIZONTAL_SCROLL_BARS (WINDOW_XFRAME (W))      \
+   : EQ (W->horizontal_scroll_bar_type, Qbottom)               \
+   ? true                                                      \
+   : false)
+#else
+#define WINDOW_HAS_HORIZONTAL_SCROLL_BAR(W) false
+#endif
 
 /* Width that a scroll bar in window W should have, if there is one.
    Measured in pixels.  If scroll bars are turned off, this is still
    nonzero.  */
-#define WINDOW_CONFIG_SCROLL_BAR_WIDTH(w)              \
-  (w->scroll_bar_width >= 0                            \
-   ? w->scroll_bar_width                               \
-   : FRAME_CONFIG_SCROLL_BAR_WIDTH (WINDOW_XFRAME (w)))
+#define WINDOW_CONFIG_SCROLL_BAR_WIDTH(W)              \
+  (W->scroll_bar_width >= 0                            \
+   ? W->scroll_bar_width                               \
+   : FRAME_CONFIG_SCROLL_BAR_WIDTH (WINDOW_XFRAME (W)))
 
 /* Width that a scroll bar in window W should have, if there is one.
    Measured in columns (characters).  If scroll bars are turned off,
    this is still nonzero.  */
-#define WINDOW_CONFIG_SCROLL_BAR_COLS(w)               \
-  (w->scroll_bar_width >= 0                            \
-   ? ((w->scroll_bar_width                             \
-       + WINDOW_FRAME_COLUMN_WIDTH (w) - 1)            \
-      / WINDOW_FRAME_COLUMN_WIDTH (w))                 \
-   : FRAME_CONFIG_SCROLL_BAR_COLS (WINDOW_XFRAME (w)))
+#define WINDOW_CONFIG_SCROLL_BAR_COLS(W)               \
+  (W->scroll_bar_width >= 0                            \
+   ? ((W->scroll_bar_width                             \
+       + WINDOW_FRAME_COLUMN_WIDTH (W) - 1)            \
+      / WINDOW_FRAME_COLUMN_WIDTH (W))                 \
+   : FRAME_CONFIG_SCROLL_BAR_COLS (WINDOW_XFRAME (W)))
 
 /* Width of left scroll bar in window W, measured in columns
    (characters).  If scroll bars are on the right in this frame, or
    there are no scroll bars, value is 0.  */
-#define WINDOW_LEFT_SCROLL_BAR_COLS(w)        \
-  (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)  \
-   ? (WINDOW_CONFIG_SCROLL_BAR_COLS (w))       \
+#define WINDOW_LEFT_SCROLL_BAR_COLS(W)        \
+  (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (W)  \
+   ? (WINDOW_CONFIG_SCROLL_BAR_COLS (W))       \
    : 0)
 
 /* Width of right scroll bar in window W, measured in columns
    (characters).  If scroll bars are on the left in this frame, or there
    are no scroll bars, value is 0.  */
-#define WINDOW_RIGHT_SCROLL_BAR_COLS(w)                \
-  (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w) \
-   ? WINDOW_CONFIG_SCROLL_BAR_COLS (w)         \
+#define WINDOW_RIGHT_SCROLL_BAR_COLS(W)                \
+  (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (W) \
+   ? WINDOW_CONFIG_SCROLL_BAR_COLS (W)         \
    : 0)
 
 /* Width of a scroll bar in window W, measured in columns.  */
-#define WINDOW_SCROLL_BAR_COLS(w)             \
-  (WINDOW_HAS_VERTICAL_SCROLL_BAR (w)         \
-   ? WINDOW_CONFIG_SCROLL_BAR_COLS (w)        \
+#define WINDOW_SCROLL_BAR_COLS(W)             \
+  (WINDOW_HAS_VERTICAL_SCROLL_BAR (W)         \
+   ? WINDOW_CONFIG_SCROLL_BAR_COLS (W)        \
    : 0)
 
 /* Width of a left scroll bar area in window W, measured in pixels.  */
-#define WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH(w)                           \
-  (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)                          \
-   ? WINDOW_CONFIG_SCROLL_BAR_WIDTH (w)                                        \
+#define WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH(W)                           \
+  (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (W)                          \
+   ? WINDOW_CONFIG_SCROLL_BAR_WIDTH (W)                                        \
    : 0)
 
 /* Width of a right scroll bar area in window W, measured in pixels.  */
-#define WINDOW_RIGHT_SCROLL_BAR_AREA_WIDTH(w)                          \
-  (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)                         \
-   ? WINDOW_CONFIG_SCROLL_BAR_WIDTH (w)                                        \
+#define WINDOW_RIGHT_SCROLL_BAR_AREA_WIDTH(W)                          \
+  (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (W)                         \
+   ? WINDOW_CONFIG_SCROLL_BAR_WIDTH (W)                                        \
    : 0)
 
 /* Width of scroll bar area in window W, measured in pixels.  */
-#define WINDOW_SCROLL_BAR_AREA_WIDTH(w)                                        \
-  (WINDOW_HAS_VERTICAL_SCROLL_BAR (w)                                  \
-   ? WINDOW_CONFIG_SCROLL_BAR_WIDTH (w)                                        \
+#define WINDOW_SCROLL_BAR_AREA_WIDTH(W)                                        \
+  (WINDOW_HAS_VERTICAL_SCROLL_BAR (W)                                  \
+   ? WINDOW_CONFIG_SCROLL_BAR_WIDTH (W)                                        \
    : 0)
 
-/* Return the frame position where the scroll bar of window W starts.  */
+/* Return the frame position where the vertical scroll bar of window W
+   starts.  */
 #define WINDOW_SCROLL_BAR_AREA_X(W)            \
   (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (W) \
    ? WINDOW_BOX_RIGHT_EDGE_X (W)               \
@@ -829,6 +883,36 @@ wset_next_buffers (struct window *w, Lisp_Object val)
    ? 0                                                                 \
    : FRAME_BOTTOM_DIVIDER_WIDTH (WINDOW_XFRAME (W)))
 
+/* Height that a scroll bar in window W should have, if there is one.
+   Measured in pixels.  If scroll bars are turned off, this is still
+   nonzero.  */
+#define WINDOW_CONFIG_SCROLL_BAR_HEIGHT(W)                     \
+  (W->scroll_bar_height >= 0                                   \
+   ? W->scroll_bar_height                                      \
+   : FRAME_CONFIG_SCROLL_BAR_HEIGHT (WINDOW_XFRAME (W)))
+
+/* Height that a scroll bar in window W should have, if there is one.
+   Measured in lines (characters).  If scroll bars are turned off, this
+   is still nonzero.  */
+#define WINDOW_CONFIG_SCROLL_BAR_LINES(W)              \
+  (W->scroll_bar_height >= 0                           \
+   ? ((W->scroll_bar_height                            \
+       + WINDOW_FRAME_LINE_HEIGHT (W) - 1)             \
+      / WINDOW_FRAME_LINE_HEIGHT (W))                  \
+   : FRAME_CONFIG_SCROLL_BAR_LINES (WINDOW_XFRAME (W)))
+
+/* Height of a scroll bar in window W, measured in columns.  */
+#define WINDOW_SCROLL_BAR_LINES(W)            \
+  (WINDOW_HAS_HORIZONTAL_SCROLL_BAR (W)               \
+   ? WINDOW_CONFIG_SCROLL_BAR_LINES (W)               \
+   : 0)
+
+/* Height of scroll bar area in window W, measured in pixels.  */
+#define WINDOW_SCROLL_BAR_AREA_HEIGHT(W)       \
+  (WINDOW_HAS_HORIZONTAL_SCROLL_BAR (W)                \
+   ? WINDOW_CONFIG_SCROLL_BAR_HEIGHT (W)       \
+   : 0)
+
 /* Height in pixels, and in lines, of the mode line.
    May be zero if W doesn't have a mode line.  */
 #define WINDOW_MODE_LINE_HEIGHT(W)     \
@@ -837,67 +921,63 @@ wset_next_buffers (struct window *w, Lisp_Object val)
    : 0)
 
 #define WINDOW_MODE_LINE_LINES(W)      \
-  (!! WINDOW_WANTS_MODELINE_P ((W)))
+  (!! WINDOW_WANTS_MODELINE_P (W))
 
 /* Height in pixels, and in lines, of the header line.
    Zero if W doesn't have a header line.  */
 #define WINDOW_HEADER_LINE_HEIGHT(W)   \
-  (WINDOW_WANTS_HEADER_LINE_P ((W))    \
+  (WINDOW_WANTS_HEADER_LINE_P (W)      \
    ? CURRENT_HEADER_LINE_HEIGHT (W)    \
    : 0)
 
 #define WINDOW_HEADER_LINE_LINES(W)    \
-  (!! WINDOW_WANTS_HEADER_LINE_P ((W)))
+  (!! WINDOW_WANTS_HEADER_LINE_P (W))
 
-/* Pixel height of window W without mode line and bottom divider.  */
+/* Pixel height of window W without mode line, bottom scroll bar and
+   bottom divider.  */
 #define WINDOW_BOX_HEIGHT_NO_MODE_LINE(W)      \
-  (WINDOW_PIXEL_HEIGHT ((W))                   \
+  (WINDOW_PIXEL_HEIGHT (W)                     \
    - WINDOW_BOTTOM_DIVIDER_WIDTH (W)           \
-   - WINDOW_MODE_LINE_HEIGHT ((W)))
+   - WINDOW_SCROLL_BAR_AREA_HEIGHT (W)         \
+   - WINDOW_MODE_LINE_HEIGHT (W))
 
 /* Pixel height of window W without mode and header line and bottom
    divider.  */
 #define WINDOW_BOX_TEXT_HEIGHT(W)      \
   (WINDOW_PIXEL_HEIGHT ((W))           \
    - WINDOW_BOTTOM_DIVIDER_WIDTH (W)   \
-   - WINDOW_MODE_LINE_HEIGHT ((W))     \
-   - WINDOW_HEADER_LINE_HEIGHT ((W)))
+   - WINDOW_SCROLL_BAR_AREA_HEIGHT (W) \
+   - WINDOW_MODE_LINE_HEIGHT (W)       \
+   - WINDOW_HEADER_LINE_HEIGHT (W))
+
+/* Return the frame position where the horizontal scroll bar of window W
+   starts.  */
+#define WINDOW_SCROLL_BAR_AREA_Y(W)                    \
+  (WINDOW_TOP_EDGE_Y (W)                               \
+   + (WINDOW_HAS_HORIZONTAL_SCROLL_BAR (W)             \
+      ? WINDOW_BOX_HEIGHT_NO_MODE_LINE (W) : 0))
 
 /* Convert window W relative pixel X to frame pixel coordinates.  */
 #define WINDOW_TO_FRAME_PIXEL_X(W, X)  \
   ((X) + WINDOW_BOX_LEFT_EDGE_X ((W)))
 
 /* Convert window W relative pixel Y to frame pixel coordinates.  */
-#define WINDOW_TO_FRAME_PIXEL_Y(W, Y)  \
-  ((Y) + WINDOW_TOP_EDGE_Y ((W)))
+#define WINDOW_TO_FRAME_PIXEL_Y(W, Y)          \
+  ((Y) + WINDOW_TOP_EDGE_Y (W))
 
 /* Convert frame relative pixel X to window relative pixel X.  */
-#define FRAME_TO_WINDOW_PIXEL_X(W, X)  \
+#define FRAME_TO_WINDOW_PIXEL_X(W, X)          \
   ((X) - WINDOW_BOX_LEFT_EDGE_X ((W)))
 
 /* Convert frame relative pixel Y to window relative pixel Y.  */
-#define FRAME_TO_WINDOW_PIXEL_Y(W, Y)  \
-  ((Y) - WINDOW_TOP_EDGE_Y ((W)))
+#define FRAME_TO_WINDOW_PIXEL_Y(W, Y)          \
+  ((Y) - WINDOW_TOP_EDGE_Y (W))
 
 /* Convert a text area relative x-position in window W to frame X
    pixel coordinates.  */
 #define WINDOW_TEXT_TO_FRAME_PIXEL_X(W, X)     \
   (window_box_left ((W), TEXT_AREA) + (X))
 
-/* True if the background of the window W's fringe that is adjacent to
-   a scroll bar is extended to the gap between the fringe and the bar.  */
-
-#define WINDOW_FRINGE_EXTENDED_P(w)                    \
-  (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)          \
-   ? (WINDOW_LEFTMOST_P (w)                            \
-      && WINDOW_LEFT_FRINGE_WIDTH (w)                  \
-      && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)       \
-         || WINDOW_LEFT_MARGIN_COLS (w) == 0))         \
-   : (WINDOW_RIGHTMOST_P (w)                           \
-      && WINDOW_RIGHT_FRINGE_WIDTH (w)                 \
-      && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)       \
-         || WINDOW_RIGHT_MARGIN_COLS (w) == 0)))
-
 /* This is the window in which the terminal's cursor should be left when
    nothing is being done with it.  This must always be a leaf window, and its
    buffer is selected by the top level editing loop at the end of each command.
@@ -981,11 +1061,6 @@ extern void bset_update_mode_line (struct buffer *b);
    above already does it, so it's only needed in unusual cases.  */
 extern void redisplay_other_windows (void);
 
-/* If *ROWS or *COLS are too small a size for FRAME, set them to the
-   minimum allowable size.  */
-
-extern void check_frame_size (struct frame *frame, int *width, int *height, bool pixelwise);
-
 /* Return a pointer to the glyph W's physical cursor is on.  Value is
    null if W's current matrix is invalid, so that no meaningful glyph
    can be returned.  */
@@ -1010,7 +1085,6 @@ struct glyph *get_phys_cursor_glyph (struct window *w);
   CHECK_TYPE (WINDOW_LIVE_P (WINDOW), Qwindow_live_p, WINDOW)
 
 /* These used to be in lisp.h.  */
-
 extern Lisp_Object Qwindow_live_p;
 extern Lisp_Object Vwindow_list;
 
@@ -1024,6 +1098,7 @@ extern int window_body_width (struct window *w, bool);
 extern void temp_output_buffer_show (Lisp_Object);
 extern void replace_buffer_in_windows (Lisp_Object);
 extern void replace_buffer_in_windows_safely (Lisp_Object);
+extern Lisp_Object sanitize_window_sizes (Lisp_Object, Lisp_Object);
 /* This looks like a setter, but it is a bit special.  */
 extern void wset_buffer (struct window *, Lisp_Object);
 extern bool window_outdated (struct window *);
index 80d4d52531acc6dbbe32b0a2766e34213c3a5489..bf73de69669e8e9b3990174f58f278d52bda2872 100644 (file)
@@ -816,11 +816,11 @@ Lisp_Object previous_help_echo_string;
 #ifdef HAVE_WINDOW_SYSTEM
 
 /* Non-zero means an hourglass cursor is currently shown.  */
-bool hourglass_shown_p;
+static bool hourglass_shown_p;
 
 /* If non-null, an asynchronous timer that, when it expires, displays
    an hourglass cursor on all frames.  */
-struct atimer *hourglass_atimer;
+static struct atimer *hourglass_atimer;
 
 #endif /* HAVE_WINDOW_SYSTEM */
 
@@ -1024,6 +1024,8 @@ window_text_bottom_y (struct window *w)
   if (WINDOW_WANTS_MODELINE_P (w))
     height -= CURRENT_MODE_LINE_HEIGHT (w);
 
+  height -= WINDOW_SCROLL_BAR_AREA_HEIGHT (w);
+
   return height;
 }
 
@@ -1068,6 +1070,7 @@ window_box_height (struct window *w)
   eassert (height >= 0);
 
   height -= WINDOW_BOTTOM_DIVIDER_WIDTH (w);
+  height -= WINDOW_SCROLL_BAR_AREA_HEIGHT (w);
 
   /* Note: the code below that determines the mode-line/header-line
      height is essentially the same as that contained in the macro
@@ -1141,7 +1144,7 @@ window_box_left_offset (struct window *w, enum glyph_row_area area)
    area AREA of window W.  ANY_AREA means return the right edge of the
    whole window, to the left of the right fringe of W.  */
 
-int
+static int
 window_box_right_offset (struct window *w, enum glyph_row_area area)
 {
   /* Don't return more than the window's pixel width.  */
@@ -1957,8 +1960,8 @@ pixel_to_glyph_coords (struct frame *f, register int pix_x, register int pix_y,
 
          if (pix_y < 0)
            pix_y = 0;
-         else if (pix_y > FRAME_LINES (f))
-           pix_y = FRAME_LINES (f);
+         else if (pix_y > FRAME_TOTAL_LINES (f))
+           pix_y = FRAME_TOTAL_LINES (f);
        }
     }
 #endif
@@ -2174,7 +2177,10 @@ get_glyph_string_clip_rects (struct glyph_string *s, NativeRectangle *rects, int
 
       if (s->x > r.x)
        {
-         r.width -= s->x - r.x;
+         if (r.width >= s->x - r.x)
+           r.width -= s->x - r.x;
+         else  /* R2L hscrolled row with cursor outside text area */
+           r.width = 0;
          r.x = s->x;
        }
       r.width = min (r.width, glyph->pixel_width);
@@ -2501,7 +2507,7 @@ remember_mouse_glyph (struct frame *f, int gx, int gy, NativeRectangle *rect)
       gx = WINDOW_PIXEL_WIDTH (w) - width;
       goto row_glyph;
 
-    case ON_SCROLL_BAR:
+    case ON_VERTICAL_SCROLL_BAR:
       gx = (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)
            ? 0
            : (window_box_right_offset (w, RIGHT_MARGIN_AREA)
@@ -2535,7 +2541,7 @@ remember_mouse_glyph (struct frame *f, int gx, int gy, NativeRectangle *rect)
       gy = 0;
       /* The bottom divider prevails. */
       height = WINDOW_PIXEL_HEIGHT (w) - WINDOW_BOTTOM_DIVIDER_WIDTH (w);
-      goto add_edge;;
+      goto add_edge;
 
     case ON_BOTTOM_DIVIDER:
       gx = 0;
@@ -2623,15 +2629,14 @@ safe__call (bool inhibit_quit, ptrdiff_t nargs, Lisp_Object func, va_list ap)
     {
       ptrdiff_t i;
       ptrdiff_t count = SPECPDL_INDEX ();
-      struct gcpro gcpro1;
-      Lisp_Object *args = alloca (nargs * word_size);
+      Lisp_Object *args;
+      USE_SAFE_ALLOCA;
+      SAFE_ALLOCA_LISP (args, nargs);
 
       args[0] = func;
       for (i = 1; i < nargs; i++)
        args[i] = va_arg (ap, Lisp_Object);
 
-      GCPRO1 (args[0]);
-      gcpro1.nvars = nargs;
       specbind (Qinhibit_redisplay, Qt);
       if (inhibit_quit)
        specbind (Qinhibit_quit, Qt);
@@ -2639,7 +2644,7 @@ safe__call (bool inhibit_quit, ptrdiff_t nargs, Lisp_Object func, va_list ap)
         so there is no possibility of wanting to redisplay.  */
       val = internal_condition_case_n (Ffuncall, nargs, args, Qt,
                                       safe_eval_handler);
-      UNGCPRO;
+      SAFE_FREE ();
       val = unbind_to (count, val);
     }
 
@@ -2971,10 +2976,6 @@ init_iterator (struct it *it, struct window *w,
   it->glyph_row = row;
   it->area = TEXT_AREA;
 
-  /* Forget any previous info about this row being reversed.  */
-  if (it->glyph_row)
-    it->glyph_row->reversed_p = 0;
-
   /* Get the dimensions of the display area.  The display area
      consists of the visible window area plus a horizontally scrolled
      part to the left of the window.  All x-values are relative to the
@@ -3669,6 +3670,7 @@ next_overlay_change (ptrdiff_t pos)
   ptrdiff_t i, noverlays;
   ptrdiff_t endpos;
   Lisp_Object *overlays;
+  USE_SAFE_ALLOCA;
 
   /* Get all overlays at the given position.  */
   GET_OVERLAYS_AT (pos, overlays, noverlays, &endpos, 1);
@@ -3685,6 +3687,7 @@ next_overlay_change (ptrdiff_t pos)
       endpos = min (endpos, oendpos);
     }
 
+  SAFE_FREE ();
   return endpos;
 }
 
@@ -5130,7 +5133,7 @@ handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
 
       if (it)
        {
-         int face_id = lookup_basic_face (it->f, DEFAULT_FACE_ID);;
+         int face_id = lookup_basic_face (it->f, DEFAULT_FACE_ID);
 
          if (CONSP (XCDR (XCDR (spec))))
            {
@@ -5745,10 +5748,11 @@ load_overlay_strings (struct it *it, ptrdiff_t charpos)
   Lisp_Object overlay, window, str, invisible;
   struct Lisp_Overlay *ov;
   ptrdiff_t start, end;
-  ptrdiff_t size = 20;
   ptrdiff_t n = 0, i, j;
   int invis_p;
-  struct overlay_entry *entries = alloca (size * sizeof *entries);
+  struct overlay_entry entriesbuf[20];
+  ptrdiff_t size = ARRAYELTS (entriesbuf);
+  struct overlay_entry *entries = entriesbuf;
   USE_SAFE_ALLOCA;
 
   if (charpos <= 0)
@@ -8344,7 +8348,7 @@ next_element_from_buffer (struct it *it)
 
       /* Get the next character, maybe multibyte.  */
       p = BYTE_POS_ADDR (IT_BYTEPOS (*it));
-      if (it->multibyte_p && !ASCII_BYTE_P (*p))
+      if (it->multibyte_p && !ASCII_CHAR_P (*p))
        it->c = STRING_CHAR_AND_LENGTH (p, it->len);
       else
        it->c = *p, it->len = 1;
@@ -10027,9 +10031,7 @@ message_dolog (const char *m, ptrdiff_t nbytes, bool nlflag, bool multibyte)
          for (i = 0; i < nbytes; i += char_bytes)
            {
              c = string_char_and_length (msg + i, &char_bytes);
-             work[0] = (ASCII_CHAR_P (c)
-                        ? c
-                        : multibyte_char_to_unibyte (c));
+             work[0] = CHAR_TO_BYTE8 (c);
              insert_1_both (work, 1, 1, 1, 0, 0);
            }
        }
@@ -10204,9 +10206,9 @@ message3 (Lisp_Object m)
     {
       ptrdiff_t nbytes = SBYTES (m);
       bool multibyte = STRING_MULTIBYTE (m);
+      char *buffer;
       USE_SAFE_ALLOCA;
-      char *buffer = SAFE_ALLOCA (nbytes);
-      memcpy (buffer, SDATA (m), nbytes);
+      SAFE_ALLOCA_STRING (buffer, m);
       message_dolog (buffer, nbytes, 1, multibyte);
       SAFE_FREE ();
     }
@@ -10311,19 +10313,17 @@ message_with_string (const char *m, Lisp_Object string, int log)
     {
       if (m)
        {
-         /* ENCODE_SYSTEM below can GC and/or relocate the Lisp
-            String whose data pointer might be passed to us in M.  So
-            we use a local copy.  */
-         char *fmt = xstrdup (m);
+         /* ENCODE_SYSTEM below can GC and/or relocate the
+            Lisp data, so make sure we don't use it here.  */
+         eassert (relocatable_string_data_p (m) != 1);
 
          if (noninteractive_need_newline)
            putc ('\n', stderr);
          noninteractive_need_newline = 0;
-         fprintf (stderr, fmt, SDATA (ENCODE_SYSTEM (string)));
+         fprintf (stderr, m, SDATA (ENCODE_SYSTEM (string)));
          if (!cursor_in_echo_area)
            fprintf (stderr, "\n");
          fflush (stderr);
-         xfree (fmt);
        }
     }
   else if (INTERACTIVE)
@@ -10410,11 +10410,13 @@ vmessage (const char *m, va_list ap)
            {
              ptrdiff_t len;
              ptrdiff_t maxsize = FRAME_MESSAGE_BUF_SIZE (f);
-             char *message_buf = alloca (maxsize + 1);
+             USE_SAFE_ALLOCA;
+             char *message_buf = SAFE_ALLOCA (maxsize + 1);
 
              len = doprnt (message_buf, maxsize, m, 0, ap);
 
              message3 (make_string (message_buf, len));
+             SAFE_FREE ();
            }
          else
            message1 (0);
@@ -10580,6 +10582,7 @@ with_echo_area_buffer (struct window *w, int which,
     {
       wset_buffer (w, buffer);
       set_marker_both (w->pointm, buffer, BEG, BEG_BYTE);
+      set_marker_both (w->old_pointm, buffer, BEG, BEG_BYTE);
     }
 
   bset_undo_list (current_buffer, Qt);
@@ -10618,7 +10621,7 @@ with_echo_area_buffer_unwind_data (struct window *w)
   Vwith_echo_area_save_vector = Qnil;
 
   if (NILP (vector))
-    vector = Fmake_vector (make_number (9), Qnil);
+    vector = Fmake_vector (make_number (11), Qnil);
 
   XSETBUFFER (tmp, current_buffer); ASET (vector, i, tmp); ++i;
   ASET (vector, i, Vdeactivate_mark); ++i;
@@ -10630,12 +10633,14 @@ with_echo_area_buffer_unwind_data (struct window *w)
       ASET (vector, i, w->contents); ++i;
       ASET (vector, i, make_number (marker_position (w->pointm))); ++i;
       ASET (vector, i, make_number (marker_byte_position (w->pointm))); ++i;
+      ASET (vector, i, make_number (marker_position (w->old_pointm))); ++i;
+      ASET (vector, i, make_number (marker_byte_position (w->old_pointm))); ++i;
       ASET (vector, i, make_number (marker_position (w->start))); ++i;
       ASET (vector, i, make_number (marker_byte_position (w->start))); ++i;
     }
   else
     {
-      int end = i + 6;
+      int end = i + 8;
       for (; i < end; ++i)
        ASET (vector, i, Qnil);
     }
@@ -10667,9 +10672,12 @@ unwind_with_echo_area_buffer (Lisp_Object vector)
       set_marker_both (w->pointm, buffer,
                       XFASTINT (AREF (vector, 5)),
                       XFASTINT (AREF (vector, 6)));
-      set_marker_both (w->start, buffer,
+      set_marker_both (w->old_pointm, buffer,
                       XFASTINT (AREF (vector, 7)),
                       XFASTINT (AREF (vector, 8)));
+      set_marker_both (w->start, buffer,
+                      XFASTINT (AREF (vector, 9)),
+                      XFASTINT (AREF (vector, 10)));
     }
 
   Vwith_echo_area_save_vector = vector;
@@ -11918,11 +11926,6 @@ update_menu_bar (struct frame *f, int save_match_data, int hooks_run)
 
 #ifdef HAVE_WINDOW_SYSTEM
 
-/* Tool-bar item index of the item on which a mouse button was pressed
-   or -1.  */
-
-int last_tool_bar_item;
-
 /* Select `frame' temporarily without running all the code in
    do_switch_frame.
    FIXME: Maybe do_switch_frame should be trimmed down similarly
@@ -11949,7 +11952,7 @@ update_tool_bar (struct frame *f, int save_match_data)
   int do_update = FRAME_EXTERNAL_TOOL_BAR (f);
 #else
   int do_update = (WINDOWP (f->tool_bar_window)
-                  && WINDOW_PIXEL_HEIGHT (XWINDOW (f->tool_bar_window)) > 0);
+                  && WINDOW_TOTAL_LINES (XWINDOW (f->tool_bar_window)) > 0);
 #endif
 
   if (do_update)
@@ -12045,11 +12048,11 @@ static void
 build_desired_tool_bar_string (struct frame *f)
 {
   int i, size, size_needed;
-  struct gcpro gcpro1, gcpro2, gcpro3;
-  Lisp_Object image, plist, props;
+  struct gcpro gcpro1, gcpro2;
+  Lisp_Object image, plist;
 
-  image = plist = props = Qnil;
-  GCPRO3 (image, plist, props);
+  image = plist = Qnil;
+  GCPRO2 (image, plist);
 
   /* Prepare F->desired_tool_bar_string.  If we can reuse it, do so.
      Otherwise, make a new string.  */
@@ -12068,9 +12071,12 @@ build_desired_tool_bar_string (struct frame *f)
       (f, Fmake_string (make_number (size_needed), make_number (' ')));
   else
     {
-      props = list4 (Qdisplay, Qnil, Qmenu_item, Qnil);
+      AUTO_LIST4 (props, Qdisplay, Qnil, Qmenu_item, Qnil);
+      struct gcpro gcpro1;
+      GCPRO1 (props);
       Fremove_text_properties (make_number (0), make_number (size),
                               props, f->desired_tool_bar_string);
+      UNGCPRO;
     }
 
   /* Put a `display' property on the string for the images to display,
@@ -12181,8 +12187,10 @@ build_desired_tool_bar_string (struct frame *f)
         the start of this item's properties in the tool-bar items
         vector.  */
       image = Fcons (Qimage, plist);
-      props = list4 (Qdisplay, image,
-                    Qmenu_item, make_number (i * TOOL_BAR_ITEM_NSLOTS));
+      AUTO_LIST4 (props, Qdisplay, image, Qmenu_item,
+                 make_number (i * TOOL_BAR_ITEM_NSLOTS));
+      struct gcpro gcpro1;
+      GCPRO1 (props);
 
       /* Let the last image hide all remaining spaces in the tool bar
          string.  The string can be longer than needed when we reuse a
@@ -12193,6 +12201,7 @@ build_desired_tool_bar_string (struct frame *f)
        end = i + 1;
       Fadd_text_properties (make_number (i), make_number (end),
                            props, f->desired_tool_bar_string);
+      UNGCPRO;
 #undef PROP
     }
 
@@ -12333,16 +12342,9 @@ display_tool_bar_line (struct it *it, int height)
 }
 
 
-/* Max tool-bar height.  Basically, this is what makes all other windows
-   disappear when the frame gets too small.  Rethink this!  */
-
-#define MAX_FRAME_TOOL_BAR_HEIGHT(f) \
-  ((FRAME_LINE_HEIGHT (f) * FRAME_LINES (f)))
-
 /* Value is the number of pixels needed to make all tool-bar items of
    frame F visible.  The actual number of glyph rows needed is
    returned in *N_ROWS if non-NULL.  */
-
 static int
 tool_bar_height (struct frame *f, int *n_rows, bool pixelwise)
 {
@@ -12356,6 +12358,7 @@ tool_bar_height (struct frame *f, int *n_rows, bool pixelwise)
   /* Initialize an iterator for iteration over
      F->desired_tool_bar_string in the tool-bar window of frame F.  */
   init_iterator (&it, w, -1, -1, temp_row, TOOL_BAR_FACE_ID);
+  temp_row->reversed_p = false;
   it.first_visible_x = 0;
   it.last_visible_x = WINDOW_PIXEL_WIDTH (w);
   reseat_to_string (&it, NULL, f->desired_tool_bar_string, 0, 0, 0, -1);
@@ -12381,11 +12384,6 @@ tool_bar_height (struct frame *f, int *n_rows, bool pixelwise)
 
 #endif /* !USE_GTK && !HAVE_NS */
 
-#if defined USE_GTK || defined HAVE_NS
-EXFUN (Ftool_bar_height, 2) ATTRIBUTE_CONST;
-EXFUN (Ftool_bar_lines_needed, 1) ATTRIBUTE_CONST;
-#endif
-
 DEFUN ("tool-bar-height", Ftool_bar_height, Stool_bar_height,
        0, 2, 0,
        doc: /* Return the number of lines occupied by the tool bar of FRAME.
@@ -12416,7 +12414,6 @@ PIXELWISE non-nil means return the height of the tool bar in pixels.  */)
 
 /* Display the tool-bar of frame F.  Value is non-zero if tool-bar's
    height should be changed.  */
-
 static int
 redisplay_tool_bar (struct frame *f)
 {
@@ -12438,7 +12435,7 @@ redisplay_tool_bar (struct frame *f)
      can turn off tool-bars by specifying tool-bar-lines zero.  */
   if (!WINDOWP (f->tool_bar_window)
       || (w = XWINDOW (f->tool_bar_window),
-          WINDOW_PIXEL_HEIGHT (w) == 0))
+          WINDOW_TOTAL_LINES (w) == 0))
     return 0;
 
   /* Set up an iterator for the tool-bar window.  */
@@ -12446,6 +12443,7 @@ redisplay_tool_bar (struct frame *f)
   it.first_visible_x = 0;
   it.last_visible_x = WINDOW_PIXEL_WIDTH (w);
   row = it.glyph_row;
+  row->reversed_p = false;
 
   /* Build a string that represents the contents of the tool-bar.  */
   build_desired_tool_bar_string (f);
@@ -12465,14 +12463,7 @@ redisplay_tool_bar (struct frame *f)
 
       if (new_height != WINDOW_PIXEL_HEIGHT (w))
        {
-         Lisp_Object frame;
-         int new_lines = ((new_height + FRAME_LINE_HEIGHT (f) - 1)
-                          / FRAME_LINE_HEIGHT (f));
-
-         XSETFRAME (frame, f);
-         Fmodify_frame_parameters (frame,
-                                   list1 (Fcons (Qtool_bar_lines,
-                                                 make_number (new_lines))));
+         x_change_tool_bar_height (f, new_height);
          /* Always do that now.  */
          clear_glyph_matrix (w->desired_matrix);
          f->fonts_changed = 1;
@@ -12525,14 +12516,11 @@ redisplay_tool_bar (struct frame *f)
 
   if (!NILP (Vauto_resize_tool_bars))
     {
-      /* Do we really allow the toolbar to occupy the whole frame?  */
-      int max_tool_bar_height = MAX_FRAME_TOOL_BAR_HEIGHT (f);
       int change_height_p = 0;
 
       /* If we couldn't display everything, change the tool-bar's
         height if there is room for more.  */
-      if (IT_STRING_CHARPOS (it) < it.end_charpos
-         && it.current_y < max_tool_bar_height)
+      if (IT_STRING_CHARPOS (it) < it.end_charpos)
        change_height_p = 1;
 
       /* We subtract 1 because display_tool_bar_line advances the
@@ -12551,15 +12539,13 @@ redisplay_tool_bar (struct frame *f)
       /* If row displays tool-bar items, but is partially visible,
         change the tool-bar's height.  */
       if (MATRIX_ROW_DISPLAYS_TEXT_P (row)
-         && MATRIX_ROW_BOTTOM_Y (row) > it.last_visible_y
-         && MATRIX_ROW_BOTTOM_Y (row) < max_tool_bar_height)
+         && MATRIX_ROW_BOTTOM_Y (row) > it.last_visible_y)
        change_height_p = 1;
 
       /* Resize windows as needed by changing the `tool-bar-lines'
         frame parameter.  */
       if (change_height_p)
        {
-         Lisp_Object frame;
          int nrows;
          int new_height = tool_bar_height (f, &nrows, 1);
 
@@ -12571,35 +12557,12 @@ redisplay_tool_bar (struct frame *f)
 
          if (change_height_p)
            {
-             /* Current size of the tool-bar window in canonical line
-                units.  */
-             int old_lines = WINDOW_TOTAL_LINES (w);
-             /* Required size of the tool-bar window in canonical
-                line units. */
-             int new_lines = ((new_height + FRAME_LINE_HEIGHT (f) - 1)
-                              / FRAME_LINE_HEIGHT (f));
-             /* Maximum size of the tool-bar window in canonical line
-                units that this frame can allow. */
-             int max_lines =
-               WINDOW_TOTAL_LINES (XWINDOW (FRAME_ROOT_WINDOW (f))) - 1;
-
-             /* Don't try to change the tool-bar window size and set
-                the fonts_changed flag unless really necessary.  That
-                flag causes redisplay to give up and retry
-                redisplaying the frame from scratch, so setting it
-                unnecessarily can lead to nasty redisplay loops.  */
-             if (new_lines <= max_lines
-                 && eabs (new_lines - old_lines) >= 1)
-               {
-                 XSETFRAME (frame, f);
-                 Fmodify_frame_parameters (frame,
-                                           list1 (Fcons (Qtool_bar_lines,
-                                                         make_number (new_lines))));
-                 clear_glyph_matrix (w->desired_matrix);
-                 f->n_tool_bar_rows = nrows;
-                 f->fonts_changed = 1;
-                 return 1;
-               }
+             x_change_tool_bar_height (f, new_height);
+             clear_glyph_matrix (w->desired_matrix);
+             f->n_tool_bar_rows = nrows;
+             f->fonts_changed = 1;
+
+             return 1;
            }
        }
     }
@@ -12724,7 +12687,7 @@ handle_tool_bar_click (struct frame *f, int x, int y, int down_p,
      where the button was pressed, disregarding where it was
      released.  */
   if (NILP (Vmouse_highlight) && !down_p)
-    prop_idx = last_tool_bar_item;
+    prop_idx = f->last_tool_bar_item;
 
   /* If item is disabled, do nothing.  */
   enabled_p = AREF (f->tool_bar_items, prop_idx + TOOL_BAR_ITEM_ENABLED_P);
@@ -12736,7 +12699,7 @@ handle_tool_bar_click (struct frame *f, int x, int y, int down_p,
       /* Show item in pressed state.  */
       if (!NILP (Vmouse_highlight))
        show_mouse_face (hlinfo, DRAW_IMAGE_SUNKEN);
-      last_tool_bar_item = prop_idx;
+      f->last_tool_bar_item = prop_idx;
     }
   else
     {
@@ -12761,7 +12724,7 @@ handle_tool_bar_click (struct frame *f, int x, int y, int down_p,
       event.arg = key;
       event.modifiers = modifiers;
       kbd_buffer_store_event (&event);
-      last_tool_bar_item = -1;
+      f->last_tool_bar_item = -1;
     }
 }
 
@@ -12811,8 +12774,7 @@ note_tool_bar_highlight (struct frame *f, int x, int y)
   mouse_down_p = (x_mouse_grabbed (dpyinfo)
                  && f == dpyinfo->last_mouse_frame);
 
-  if (mouse_down_p
-      && last_tool_bar_item != prop_idx)
+  if (mouse_down_p && f->last_tool_bar_item != prop_idx)
     return;
 
   draw = mouse_down_p ? DRAW_IMAGE_SUNKEN : DRAW_IMAGE_RAISED;
@@ -12934,7 +12896,20 @@ hscroll_window_tree (Lisp_Object window)
          /* Scroll when cursor is inside this scroll margin.  */
          h_margin = hscroll_margin * WINDOW_FRAME_COLUMN_WIDTH (w);
 
+         /* If the position of this window's point has explicitly
+            changed, no more suspend auto hscrolling.  */
+         if (NILP (Fequal (Fwindow_point (window), Fwindow_old_point (window))))
+           w->suspend_auto_hscroll = 0;
+
+         /* Remember window point.  */
+         Fset_marker (w->old_pointm,
+                      ((w == XWINDOW (selected_window))
+                       ? make_number (BUF_PT (XBUFFER (w->contents)))
+                       : Fmarker_position (w->pointm)),
+                      w->contents);
+
          if (!NILP (Fbuffer_local_value (Qauto_hscroll_mode, w->contents))
+             && w->suspend_auto_hscroll == 0
              /* In some pathological cases, like restoring a window
                 configuration into a frame that is much smaller than
                 the one from which the configuration was saved, we
@@ -12947,8 +12922,7 @@ hscroll_window_tree (Lisp_Object window)
                 inside the left margin and the window is already
                 hscrolled.  */
              && ((!row_r2l_p
-                  && ((w->hscroll
-                       && w->cursor.x <= h_margin)
+                  && ((w->hscroll && w->cursor.x <= h_margin)
                       || (cursor_row->enabled_p
                           && cursor_row->truncated_on_right_p
                           && (w->cursor.x >= text_area_width - h_margin))))
@@ -15839,9 +15813,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste
   return rc;
 }
 
-#if !defined USE_TOOLKIT_SCROLL_BARS || defined USE_GTK
-static
-#endif
+
 void
 set_vertical_scroll_bar (struct window *w)
 {
@@ -15880,6 +15852,71 @@ set_vertical_scroll_bar (struct window *w)
 }
 
 
+void
+set_horizontal_scroll_bar (struct window *w)
+{
+  int start, end, whole, portion;
+
+  if (!MINI_WINDOW_P (w)
+      || (w == XWINDOW (minibuf_window)
+         && NILP (echo_area_buffer[0])))
+    {
+      struct buffer *b = XBUFFER (w->contents);
+      struct buffer *old_buffer = NULL;
+      struct it it;
+      struct text_pos startp;
+
+      if (b != current_buffer)
+       {
+         old_buffer = current_buffer;
+         set_buffer_internal (b);
+       }
+
+      SET_TEXT_POS_FROM_MARKER (startp, w->start);
+      start_display (&it, w, startp);
+      it.last_visible_x = INT_MAX;
+      whole = move_it_to (&it, -1, INT_MAX, window_box_height (w), -1,
+                         MOVE_TO_X | MOVE_TO_Y);
+      /* whole = move_it_to (&it, w->window_end_pos, INT_MAX,
+                         window_box_height (w), -1,
+                         MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y); */
+
+      start = w->hscroll * FRAME_COLUMN_WIDTH (WINDOW_XFRAME (w));
+      end = start + window_box_width (w, TEXT_AREA);
+      portion = end - start;
+      /* After enlarging a horizontally scrolled window such that it
+        gets at least as wide as the text it contains, make sure that
+        the thumb doesn't fill the entire scroll bar so we can still
+        drag it back to see the entire text.  */
+      whole = max (whole, end);
+
+      if (it.bidi_p)
+       {
+         Lisp_Object pdir;
+
+         pdir = Fcurrent_bidi_paragraph_direction (Qnil);
+         if (EQ (pdir, Qright_to_left))
+           {
+             start = whole - end;
+             end = start + portion;
+           }
+       }
+
+      if (old_buffer)
+       set_buffer_internal (old_buffer);
+    }
+  else
+    start = end = whole = portion = 0;
+
+  w->hscroll_whole = whole;
+
+  /* Indicate what this scroll bar ought to be displaying now.  */
+  if (FRAME_TERMINAL (XFRAME (w->frame))->set_horizontal_scroll_bar_hook)
+    (*FRAME_TERMINAL (XFRAME (w->frame))->set_horizontal_scroll_bar_hook)
+      (w, portion, whole, start);
+}
+
+
 /* Redisplay leaf window WINDOW.  JUST_THIS_ONE_P non-zero means only
    selected_window is redisplayed.
 
@@ -16093,6 +16130,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p)
     {
       ptrdiff_t new_pt = marker_position (w->pointm);
       ptrdiff_t new_pt_byte = marker_byte_position (w->pointm);
+
       if (new_pt < BEGV)
        {
          new_pt = BEGV;
@@ -16866,7 +16904,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p)
            redisplay_tool_bar (f);
 #else
          if (WINDOWP (f->tool_bar_window)
-             && (FRAME_TOOL_BAR_HEIGHT (f) > 0
+             && (FRAME_TOOL_BAR_LINES (f) > 0
                  || !NILP (Vauto_resize_tool_bars))
              && redisplay_tool_bar (f))
            ignore_mouse_drag_p = 1;
@@ -16906,10 +16944,15 @@ redisplay_window (Lisp_Object window, bool just_this_one_p)
   ;
  finish_scroll_bars:
 
-  if (WINDOW_HAS_VERTICAL_SCROLL_BAR (w))
+   if (WINDOW_HAS_VERTICAL_SCROLL_BAR (w) || WINDOW_HAS_HORIZONTAL_SCROLL_BAR (w))
     {
-      /* Set the thumb's position and size.  */
-      set_vertical_scroll_bar (w);
+      if (WINDOW_HAS_VERTICAL_SCROLL_BAR (w))
+       /* Set the thumb's position and size.  */
+       set_vertical_scroll_bar (w);
+
+      if (WINDOW_HAS_HORIZONTAL_SCROLL_BAR (w))
+       /* Set the thumb's position and size.  */
+       set_horizontal_scroll_bar (w);
 
       /* Note that we actually used the scroll bar attached to this
         window, so it shouldn't be deleted at the end of redisplay.  */
@@ -16965,6 +17008,7 @@ try_window (Lisp_Object window, struct text_pos pos, int flags)
 
   /* Initialize iterator and info to start at POS.  */
   start_display (&it, w, pos);
+  it.glyph_row->reversed_p = false;
 
   /* Display all lines of W.  */
   while (it.current_y < it.last_visible_y)
@@ -17148,6 +17192,7 @@ try_window_reusing_current_matrix (struct window *w)
              && it.current.dpvec_index < 0)
            break;
 
+         it.glyph_row->reversed_p = false;
          if (display_line (&it))
            last_text_row = it.glyph_row - 1;
 
@@ -18168,6 +18213,11 @@ try_window_id (struct window *w)
   w->cursor.vpos = -1;
   last_text_row = NULL;
   overlay_arrow_seen = 0;
+  if (it.current_y < it.last_visible_y
+      && !f->fonts_changed
+      && (first_unchanged_at_end_row == NULL
+         || IT_CHARPOS (it) < stop_pos))
+    it.glyph_row->reversed_p = false;
   while (it.current_y < it.last_visible_y
         && !f->fonts_changed
         && (first_unchanged_at_end_row == NULL
@@ -18712,10 +18762,10 @@ dump_glyph_row (struct glyph_row *row, int vpos, int glyphs)
   else if (glyphs == 1)
     {
       int area;
+      char s[SHRT_MAX + 4];
 
       for (area = LEFT_MARGIN_AREA; area < LAST_AREA; ++area)
        {
-         char *s = alloca (row->used[area] + 4);
          int i;
 
          for (i = 0; i < row->used[area]; ++i)
@@ -18868,7 +18918,7 @@ get_overlay_arrow_glyph_row (struct window *w, Lisp_Object overlay_arrow_string)
   struct buffer *buffer = XBUFFER (w->contents);
   struct buffer *old = current_buffer;
   const unsigned char *arrow_string = SDATA (overlay_arrow_string);
-  int arrow_len = SCHARS (overlay_arrow_string);
+  ptrdiff_t arrow_len = SCHARS (overlay_arrow_string);
   const unsigned char *arrow_end = arrow_string + arrow_len;
   const unsigned char *p;
   struct it it;
@@ -18877,6 +18927,7 @@ get_overlay_arrow_glyph_row (struct window *w, Lisp_Object overlay_arrow_string)
 
   set_buffer_temp (buffer);
   init_iterator (&it, w, -1, -1, &scratch_glyph_row, DEFAULT_FACE_ID);
+  scratch_glyph_row.reversed_p = false;
   it.glyph_row->used[TEXT_AREA] = 0;
   SET_TEXT_POS (it.position, 0, 0);
 
@@ -20915,7 +20966,8 @@ See also `bidi-paragraph-direction'.  */)
         the previous non-empty line.  */
       if (pos >= ZV && pos > BEGV)
        DEC_BOTH (pos, bytepos);
-      if (fast_looking_at (build_string ("[\f\t ]*\n"),
+      AUTO_STRING (trailing_white_space, "[\f\t ]*\n");
+      if (fast_looking_at (trailing_white_space,
                           pos, bytepos, ZV, ZV_BYTE, Qnil) > 0)
        {
          while ((c = FETCH_BYTE (bytepos)) == '\n'
@@ -21026,7 +21078,7 @@ Value is the new character position of point.  */)
                  if ((gpt->resolved_level - row->reversed_p) % 2 == 0)
                    new_pos += (row->reversed_p ? -dir : dir);
                  else
-                   new_pos -= (row->reversed_p ? -dir : dir);;
+                   new_pos -= (row->reversed_p ? -dir : dir);
                }
              else if (BUFFERP (g->object))
                new_pos = g->charpos;
@@ -21494,6 +21546,7 @@ display_menu_bar (struct window *w)
       clear_glyph_row (row);
       row->enabled_p = true;
       row->full_width_p = 1;
+      row->reversed_p = false;
     }
 
   /* Display all items of the menu bar.  */
@@ -22727,10 +22780,8 @@ decode_mode_spec_coding (Lisp_Object coding_system, register char *buf, int eol_
        }
       else if (CHARACTERP (eoltype))
        {
-         unsigned char *tmp = alloca (MAX_MULTIBYTE_LENGTH);
          int c = XFASTINT (eoltype);
-         eol_str_len = CHAR_STRING (c, tmp);
-         eol_str = tmp;
+         return buf + CHAR_STRING (c, (unsigned char *) buf);
        }
       else
        {
@@ -22866,7 +22917,7 @@ decode_mode_spec (struct window *w, register int c, int field_width,
        }
 
     case 'e':
-#ifndef SYSTEM_MALLOC
+#if !defined SYSTEM_MALLOC && !defined HYBRID_MALLOC
       {
        if (NILP (Vmemory_full))
          return "";
@@ -23007,7 +23058,7 @@ decode_mode_spec (struct window *w, register int c, int field_width,
        return decode_mode_spec_buf;
     no_value:
         {
-         charp = decode_mode_spec_buf;
+         char *p = decode_mode_spec_buf;
          int pad = width - 2;
          while (pad-- > 0)
            *p++ = ' ';
@@ -23759,7 +23810,7 @@ calc_pixel_width_or_height (double *res, struct it *it, Lisp_Object prop,
            return OK_PIXELS (WINDOW_SCROLL_BAR_AREA_WIDTH (it->w));
        }
 
-      prop = buffer_local_value_1 (prop, it->w->contents);
+      prop = buffer_local_value (prop, it->w->contents);
       if (EQ (prop, Qunbound))
        prop = Qnil;
     }
@@ -23811,7 +23862,7 @@ calc_pixel_width_or_height (double *res, struct it *it, Lisp_Object prop,
              return OK_PIXELS (pixels);
            }
 
-         car = buffer_local_value_1 (car, it->w->contents);
+         car = buffer_local_value (car, it->w->contents);
          if (EQ (car, Qunbound))
            car = Qnil;
        }
@@ -23988,7 +24039,7 @@ get_char_face_and_encoding (struct frame *f, int c, int face_id,
 #endif
     {
       eassert (face != NULL);
-      PREPARE_FACE_FOR_DISPLAY (f, face);
+      prepare_face_for_display (f, face);
     }
 
   return face;
@@ -24011,7 +24062,7 @@ get_glyph_face_and_encoding (struct frame *f, struct glyph *glyph,
 
   /* Make sure X resources of the face are allocated.  */
   eassert (face != NULL);
-  PREPARE_FACE_FOR_DISPLAY (f, face);
+  prepare_face_for_display (f, face);
 
   if (two_byte_p)
     *two_byte_p = 0;
@@ -24328,7 +24379,7 @@ fill_stretch_glyph_string (struct glyph_string *s, int start, int end)
   s->ybase += voffset;
 
   /* The case that face->gc == 0 is handled when drawing the glyph
-     string by calling PREPARE_FACE_FOR_DISPLAY.  */
+     string by calling prepare_face_for_display.  */
   eassert (s->face);
   return glyph - s->row->glyphs[s->area];
 }
@@ -24646,7 +24697,7 @@ compute_overhangs_and_x (struct glyph_string *s, int x, int backward_p)
         face_id = (row)->glyphs[area][START].face_id;                     \
                                                                           \
         s = alloca (sizeof *s);                                           \
-        char2b = alloca ((END - START) * sizeof *char2b);                 \
+        SAFE_NALLOCA (char2b, 1, (END) - (START));                        \
         INIT_GLYPH_STRING (s, char2b, w, row, area, START, HL);           \
         append_glyph_string (&HEAD, &TAIL, s);                            \
         s->x = (X);                                                       \
@@ -24674,7 +24725,7 @@ compute_overhangs_and_x (struct glyph_string *s, int x, int backward_p)
     struct glyph_string *first_s = NULL;                                   \
     int n;                                                                 \
                                                                            \
-    char2b = alloca (cmp->glyph_len * sizeof *char2b);                     \
+    SAFE_NALLOCA (char2b, 1, cmp->glyph_len);                              \
                                                                            \
     /* Make glyph_strings for each glyph sequence that is drawable by      \
        the same face, and append them to HEAD/TAIL.  */                            \
@@ -24709,7 +24760,7 @@ compute_overhangs_and_x (struct glyph_string *s, int x, int backward_p)
     gstring = (composition_gstring_from_id                               \
               ((row)->glyphs[area][START].u.cmp.id));                    \
     s = alloca (sizeof *s);                                              \
-    char2b = alloca (LGSTRING_GLYPH_LEN (gstring) * sizeof *char2b);     \
+    SAFE_NALLOCA (char2b, 1, LGSTRING_GLYPH_LEN (gstring));              \
     INIT_GLYPH_STRING (s, char2b, w, row, area, START, HL);              \
     append_glyph_string (&(HEAD), &(TAIL), s);                           \
     s->x = (X);                                                                  \
@@ -24861,6 +24912,7 @@ draw_glyphs (struct window *w, int x, struct glyph_row *row,
      BUILD_GLYPH_STRINGS will modify its start parameter.  That's
      the reason we use a separate variable `i'.  */
   i = start;
+  USE_SAFE_ALLOCA;
   BUILD_GLYPH_STRINGS (i, end, head, tail, hl, x, last_x);
   if (tail)
     x_reached = tail->x + tail->background_width;
@@ -24926,13 +24978,16 @@ draw_glyphs (struct window *w, int x, struct glyph_row *row,
          else
            overlap_hl = DRAW_NORMAL_TEXT;
 
+         if (hl != overlap_hl)
+           clip_head = head;
          j = i;
          BUILD_GLYPH_STRINGS (j, start, h, t,
                               overlap_hl, dummy_x, last_x);
          start = i;
          compute_overhangs_and_x (t, head->x, 1);
          prepend_glyph_string_lists (&head, &tail, h, t);
-         clip_head = head;
+         if (clip_head == NULL)
+           clip_head = head;
        }
 
       /* Prepend glyph strings for glyphs in front of the first glyph
@@ -24953,7 +25008,8 @@ draw_glyphs (struct window *w, int x, struct glyph_row *row,
          else
            overlap_hl = DRAW_NORMAL_TEXT;
 
-         clip_head = head;
+         if (hl == overlap_hl || clip_head == NULL)
+           clip_head = head;
          BUILD_GLYPH_STRINGS (i, start, h, t,
                               overlap_hl, dummy_x, last_x);
          for (s = h; s; s = s->next)
@@ -24977,13 +25033,16 @@ draw_glyphs (struct window *w, int x, struct glyph_row *row,
          else
            overlap_hl = DRAW_NORMAL_TEXT;
 
+         if (hl != overlap_hl)
+           clip_tail = tail;
          BUILD_GLYPH_STRINGS (end, i, h, t,
                               overlap_hl, x, last_x);
          /* Because BUILD_GLYPH_STRINGS updates the first argument,
             we don't have `end = i;' here.  */
          compute_overhangs_and_x (h, tail->x + tail->width, 0);
          append_glyph_string_lists (&head, &tail, h, t);
-         clip_tail = tail;
+         if (clip_tail == NULL)
+           clip_tail = tail;
        }
 
       /* Append glyph strings for glyphs following the last glyph
@@ -25001,7 +25060,8 @@ draw_glyphs (struct window *w, int x, struct glyph_row *row,
          else
            overlap_hl = DRAW_NORMAL_TEXT;
 
-         clip_tail = tail;
+         if (hl == overlap_hl || clip_tail == NULL)
+           clip_tail = tail;
          i++;                  /* We must include the Ith glyph.  */
          BUILD_GLYPH_STRINGS (end, i, h, t,
                               overlap_hl, x, last_x);
@@ -25052,6 +25112,7 @@ draw_glyphs (struct window *w, int x, struct glyph_row *row,
 
   RELEASE_HDC (hdc, f);
 
+  SAFE_FREE ();
   return x_reached;
 }
 
@@ -25269,7 +25330,7 @@ produce_image_glyph (struct it *it)
   face = FACE_FROM_ID (it->f, it->face_id);
   eassert (face);
   /* Make sure X resources of the face is loaded.  */
-  PREPARE_FACE_FOR_DISPLAY (it->f, face);
+  prepare_face_for_display (it->f, face);
 
   if (it->image_id < 0)
     {
@@ -25565,7 +25626,7 @@ produce_stretch_glyph (struct it *it)
     {
       struct face *face = FACE_FROM_ID (it->f, it->face_id);
       font = face->font ? face->font : FRAME_FONT (it->f);
-      PREPARE_FACE_FOR_DISPLAY (it->f, face);
+      prepare_face_for_display (it->f, face);
     }
 #endif
 
@@ -26028,7 +26089,7 @@ produce_glyphless_glyph (struct it *it, int for_no_font, Lisp_Object acronym)
 
       face = FACE_FROM_ID (it->f, face_id);
       font = face->font ? face->font : FRAME_FONT (it->f);
-      PREPARE_FACE_FOR_DISPLAY (it->f, face);
+      prepare_face_for_display (it->f, face);
 
       if (it->glyphless_method == GLYPHLESS_DISPLAY_ACRONYM)
        {
@@ -26044,7 +26105,7 @@ produce_glyphless_glyph (struct it *it, int for_no_font, Lisp_Object acronym)
          sprintf (buf, "%0*X", it->c < 0x10000 ? 4 : 6, it->c);
          str = buf;
        }
-      for (len = 0; str[len] && ASCII_BYTE_P (str[len]) && len < 6; len++)
+      for (len = 0; str[len] && ASCII_CHAR_P (str[len]) && len < 6; len++)
        code[len] = font->driver->encode_char (font, str[len]);
       upper_len = (len + 1) / 2;
       font->driver->text_extents (font, code, upper_len,
@@ -27369,9 +27430,6 @@ draw_phys_cursor_glyph (struct window *w, struct glyph_row *row,
 
 /* Erase the image of a cursor of window W from the screen.  */
 
-#ifndef HAVE_NTGUI
-static
-#endif
 void
 erase_phys_cursor (struct window *w)
 {
@@ -27451,7 +27509,7 @@ erase_phys_cursor (struct window *w)
   /* Maybe clear the display under the cursor.  */
   if (w->phys_cursor_type == HOLLOW_BOX_CURSOR)
     {
-      int x, y, left_x;
+      int x, y;
       int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w);
       int width;
 
@@ -27460,13 +27518,15 @@ erase_phys_cursor (struct window *w)
        goto mark_cursor_off;
 
       width = cursor_glyph->pixel_width;
-      left_x = window_box_left_offset (w, TEXT_AREA);
       x = w->phys_cursor.x;
-      if (x < left_x)
-       width -= left_x - x;
+      if (x < 0)
+       {
+         width += x;
+         x = 0;
+       }
       width = min (width, window_box_width (w, TEXT_AREA) - x);
       y = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, cursor_row->y));
-      x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, max (x, left_x));
+      x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, x);
 
       if (width > 0)
        FRAME_RIF (f)->clear_frame_area (f, x, y, width, cursor_row->visible_height);
@@ -28901,8 +28961,8 @@ note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y,
          else if (area == ON_MODE_LINE)
            {
              Lisp_Object default_help
-               = buffer_local_value_1 (Qmode_line_default_help_echo,
-                                       w->contents);
+               = buffer_local_value (Qmode_line_default_help_echo,
+                                     w->contents);
 
              if (STRINGP (default_help))
                {
@@ -29196,7 +29256,8 @@ note_mouse_highlight (struct frame *f, int x, int y)
     else
       cursor = FRAME_X_OUTPUT (f)->nontext_cursor;
   else if (part == ON_LEFT_FRINGE || part == ON_RIGHT_FRINGE
-          || part == ON_SCROLL_BAR)
+          || part == ON_VERTICAL_SCROLL_BAR
+          || part == ON_HORIZONTAL_SCROLL_BAR)
     cursor = FRAME_X_OUTPUT (f)->nontext_cursor;
   else
     cursor = FRAME_X_OUTPUT (f)->text_cursor;
@@ -29319,6 +29380,8 @@ note_mouse_highlight (struct frame *f, int x, int y)
       /* Is this char mouse-active or does it have help-echo?  */
       position = make_number (pos);
 
+      USE_SAFE_ALLOCA;
+
       if (BUFFERP (object))
        {
          /* Put all the overlays we want in a vector in overlay_vec.  */
@@ -29600,6 +29663,7 @@ note_mouse_highlight (struct frame *f, int x, int y)
       BEGV = obegv;
       ZV = ozv;
       current_buffer = obuf;
+      SAFE_FREE ();
     }
 
  set_cursor:
@@ -30117,8 +30181,8 @@ expose_frame (struct frame *f, int x, int y, int w, int h)
   if (w == 0 || h == 0)
     {
       r.x = r.y = 0;
-      r.width = FRAME_COLUMN_WIDTH (f) * FRAME_COLS (f);
-      r.height = FRAME_LINE_HEIGHT (f) * FRAME_LINES (f);
+      r.width = FRAME_TEXT_WIDTH (f);
+      r.height = FRAME_TEXT_HEIGHT (f);
     }
   else
     {
@@ -30404,8 +30468,9 @@ A value of nil means no special handling of these characters.  */);
 
   DEFVAR_LISP ("void-text-area-pointer", Vvoid_text_area_pointer,
     doc: /* The pointer shape to show in void text areas.
-A value of nil means to show the text pointer.  Other options are `arrow',
-`text', `hand', `vdrag', `hdrag', `modeline', and `hourglass'.  */);
+A value of nil means to show the text pointer.  Other options are
+`arrow', `text', `hand', `vdrag', `hdrag', `nhdrag', `modeline', and
+`hourglass'.  */);
   Vvoid_text_area_pointer = Qarrow;
 
   DEFVAR_LISP ("inhibit-redisplay", Vinhibit_redisplay,
@@ -30900,10 +30965,10 @@ init_xdisp (void)
       r->pixel_top = r->top_line * FRAME_LINE_HEIGHT (f);
       r->total_cols = FRAME_COLS (f);
       r->pixel_width = r->total_cols * FRAME_COLUMN_WIDTH (f);
-      r->total_lines = FRAME_LINES (f) - 1 - FRAME_TOP_MARGIN (f);
+      r->total_lines = FRAME_TOTAL_LINES (f) - 1 - FRAME_TOP_MARGIN (f);
       r->pixel_height = r->total_lines * FRAME_LINE_HEIGHT (f);
 
-      m->top_line = FRAME_LINES (f) - 1;
+      m->top_line = FRAME_TOTAL_LINES (f) - 1;
       m->pixel_top = m->top_line * FRAME_LINE_HEIGHT (f);
       m->total_cols = FRAME_COLS (f);
       m->pixel_width = m->total_cols * FRAME_COLUMN_WIDTH (f);
@@ -30936,7 +31001,38 @@ init_xdisp (void)
 
 /* Platform-independent portion of hourglass implementation.  */
 
+/* Timer function of hourglass_atimer.  */
+
+static void
+show_hourglass (struct atimer *timer)
+{
+  /* The timer implementation will cancel this timer automatically
+     after this function has run.  Set hourglass_atimer to null
+     so that we know the timer doesn't have to be canceled.  */
+  hourglass_atimer = NULL;
+
+  if (!hourglass_shown_p)
+    {
+      Lisp_Object tail, frame;
+
+      block_input ();
+
+      FOR_EACH_FRAME (tail, frame)
+       {
+         struct frame *f = XFRAME (frame);
+
+         if (FRAME_LIVE_P (f) && FRAME_WINDOW_P (f)
+             && FRAME_RIF (f)->show_hourglass)
+           FRAME_RIF (f)->show_hourglass (f);
+       }
+
+      hourglass_shown_p = 1;
+      unblock_input ();
+    }
+}
+
 /* Cancel a currently active hourglass timer, and start a new one.  */
+
 void
 start_hourglass (void)
 {
@@ -30955,20 +31051,13 @@ start_hourglass (void)
   else
     delay = make_timespec (DEFAULT_HOURGLASS_DELAY, 0);
 
-#ifdef HAVE_NTGUI
-  {
-    extern void w32_note_current_window (void);
-    w32_note_current_window ();
-  }
-#endif /* HAVE_NTGUI */
-
   hourglass_atimer = start_atimer (ATIMER_RELATIVE, delay,
                                   show_hourglass, NULL);
 }
 
-
 /* Cancel the hourglass cursor timer if active, hide a busy cursor if
    shown.  */
+
 void
 cancel_hourglass (void)
 {
@@ -30979,7 +31068,28 @@ cancel_hourglass (void)
     }
 
   if (hourglass_shown_p)
-    hide_hourglass ();
+    {
+      Lisp_Object tail, frame;
+
+      block_input ();
+
+      FOR_EACH_FRAME (tail, frame)
+       {
+         struct frame *f = XFRAME (frame);
+
+         if (FRAME_LIVE_P (f) && FRAME_WINDOW_P (f)
+             && FRAME_RIF (f)->hide_hourglass)
+           FRAME_RIF (f)->hide_hourglass (f);
+#ifdef HAVE_NTGUI
+         /* No cursors on non GUI frames - restore to stock arrow cursor.  */
+         else if (!FRAME_W32_P (f))
+           w32_arrow_cursor ();
+#endif
+       }
+
+      hourglass_shown_p = 0;
+      unblock_input ();
+    }
 }
 
 #endif /* HAVE_WINDOW_SYSTEM */
index 1dc068cf18a823d7374510e26196ec3362d68a9f..6afa0a2953d9bc39790c922965b700fe2f71c59b 100644 (file)
@@ -273,10 +273,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #define IGNORE_DEFFACE_P(ATTR) EQ ((ATTR), QCignore_defface)
 
-/* Value is the number of elements of VECTOR.  */
-
-#define DIM(VECTOR) (sizeof (VECTOR) / sizeof *(VECTOR))
-
 /* Size of hash table of realized faces in face caches (should be a
    prime number).  */
 
@@ -515,7 +511,7 @@ DEFUN ("dump-colors", Fdump_colors, Sdump_colors, 0, 0, 0,
 
   fputc ('\n', stderr);
 
-  for (i = n = 0; i < sizeof color_count / sizeof color_count[0]; ++i)
+  for (i = n = 0; i < ARRAYELTS (color_count); ++i)
     if (color_count[i])
       {
        fprintf (stderr, "%3d: %5d", i, color_count[i]);
@@ -1072,7 +1068,7 @@ tty_color_name (struct frame *f, int idx)
        return XCAR (coldesc);
     }
 #ifdef MSDOS
-  /* We can have an MSDOG frame under -nw for a short window of
+  /* We can have an MS-DOS frame under -nw for a short window of
      opportunity before internal_terminal_init is called.  DTRT.  */
   if (FRAME_MSDOS_P (f) && !inhibit_window_system)
     return msdos_stdcolor_name (idx);
@@ -1242,9 +1238,6 @@ load_color2 (struct frame *f, struct face *face, Lisp_Object name,
    record that fact in flags of the face so that we don't try to free
    these colors.  */
 
-#ifndef MSDOS
-static
-#endif
 unsigned long
 load_color (struct frame *f, struct face *face, Lisp_Object name,
            enum lface_attribute_index target_index)
@@ -3124,8 +3117,7 @@ FRAME 0 means change the face on all frames, and change the default
                  If frame is t, and selected frame is a tty frame, the font
                  can't be realized.  An improvement would be to loop over frames
                  for a non-tty frame and use that.  See discussion in
-                 bug#18573.
-              */
+                 bug#18573.  */
               if (f->terminal->type != output_termcap)
                 {
                   if (! FONT_OBJECT_P (value))
@@ -3415,7 +3407,8 @@ set_font_frame_param (Lisp_Object frame, Lisp_Object lface)
          ASET (lface, LFACE_FONT_INDEX, font);
        }
       f->default_face_done_p = 0;
-      Fmodify_frame_parameters (frame, list1 (Fcons (Qfont, font)));
+      AUTO_FRAME_ARG (arg, Qfont, font);
+      Fmodify_frame_parameters (frame, arg);
     }
 }
 
@@ -3804,18 +3797,23 @@ Default face attributes override any local face attributes.  */)
              && newface->font)
            {
              Lisp_Object name = newface->font->props[FONT_NAME_INDEX];
-             Fmodify_frame_parameters (frame, list1 (Fcons (Qfont, name)));
+             AUTO_FRAME_ARG (arg, Qfont, name);
+             Fmodify_frame_parameters (frame, arg);
            }
 
          if (STRINGP (gvec[LFACE_FOREGROUND_INDEX]))
-           Fmodify_frame_parameters (frame,
-                                     list1 (Fcons (Qforeground_color,
-                                                   gvec[LFACE_FOREGROUND_INDEX])));
+           {
+             AUTO_FRAME_ARG (arg, Qforeground_color,
+                             gvec[LFACE_FOREGROUND_INDEX]);
+             Fmodify_frame_parameters (frame, arg);
+           }
 
          if (STRINGP (gvec[LFACE_BACKGROUND_INDEX]))
-           Fmodify_frame_parameters (frame,
-                                     list1 (Fcons (Qbackground_color,
-                                                   gvec[LFACE_BACKGROUND_INDEX])));
+           {
+             AUTO_FRAME_ARG (arg, Qbackground_color,
+                             gvec[LFACE_BACKGROUND_INDEX]);
+             Fmodify_frame_parameters (frame, arg);
+           }
        }
     }
 
@@ -4105,15 +4103,15 @@ free_realized_face (struct frame *f, struct face *face)
     }
 }
 
+#ifdef HAVE_WINDOW_SYSTEM
 
-/* Prepare face FACE for subsequent display on frame F.  This
-   allocated GCs if they haven't been allocated yet or have been freed
-   by clearing the face cache.  */
+/* Prepare face FACE for subsequent display on frame F.  This must be called
+   before using X resources of FACE to allocate GCs if they haven't been
+   allocated yet or have been freed by clearing the face cache.  */
 
 void
 prepare_face_for_display (struct frame *f, struct face *face)
 {
-#ifdef HAVE_WINDOW_SYSTEM
   eassert (FRAME_WINDOW_P (f));
 
   if (face->gc == 0)
@@ -4141,10 +4139,10 @@ prepare_face_for_display (struct frame *f, struct face *face)
        font_prepare_for_face (f, face);
       unblock_input ();
     }
-#endif /* HAVE_WINDOW_SYSTEM */
 }
 
-\f
+#endif /* HAVE_WINDOW_SYSTEM */
+
 /* Returns the `distance' between the colors X and Y.  */
 
 static int
@@ -5093,14 +5091,14 @@ Value is ORDER.  */)
 {
   Lisp_Object list;
   int i;
-  int indices[DIM (font_sort_order)];
+  int indices[ARRAYELTS (font_sort_order)];
 
   CHECK_LIST (order);
   memset (indices, 0, sizeof indices);
   i = 0;
 
   for (list = order;
-       CONSP (list) && i < DIM (indices);
+       CONSP (list) && i < ARRAYELTS (indices);
        list = XCDR (list), ++i)
     {
       Lisp_Object attr = XCAR (list);
@@ -5122,9 +5120,9 @@ Value is ORDER.  */)
       indices[i] = xlfd;
     }
 
-  if (!NILP (list) || i != DIM (indices))
+  if (!NILP (list) || i != ARRAYELTS (indices))
     signal_error ("Invalid font sort order", order);
-  for (i = 0; i < DIM (font_sort_order); ++i)
+  for (i = 0; i < ARRAYELTS (font_sort_order); ++i)
     if (indices[i] == 0)
       signal_error ("Invalid font sort order", order);
 
@@ -5490,7 +5488,6 @@ realize_non_ascii_face (struct frame *f, Lisp_Object font_object,
   face = xmalloc (sizeof *face);
   *face = *base_face;
   face->gc = 0;
-  face->extra = NULL;
   face->overstrike
     = (! NILP (font_object)
        && FONT_WEIGHT_NAME_NUMERIC (face->lface[LFACE_WEIGHT_INDEX]) > 100
@@ -5565,7 +5562,7 @@ realize_x_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE])
        }
       if (! FONT_OBJECT_P (attrs[LFACE_FONT_INDEX]))
        attrs[LFACE_FONT_INDEX]
-         = font_load_for_lface (f, attrs, attrs[LFACE_FONT_INDEX]);
+         = font_load_for_lface (f, attrs, Ffont_spec (0, NULL));
       if (FONT_OBJECT_P (attrs[LFACE_FONT_INDEX]))
        {
          face->font = XFONT_OBJECT (attrs[LFACE_FONT_INDEX]);
@@ -5998,6 +5995,7 @@ face_at_buffer_position (struct window *w, ptrdiff_t pos,
     endpos = XINT (end);
 
   /* Look at properties from overlays.  */
+  USE_SAFE_ALLOCA;
   {
     ptrdiff_t next_overlay;
 
@@ -6024,7 +6022,10 @@ face_at_buffer_position (struct window *w, ptrdiff_t pos,
   /* Optimize common cases where we can use the default face.  */
   if (noverlays == 0
       && NILP (prop))
-    return default_face->id;
+    {
+      SAFE_FREE ();
+      return default_face->id;
+    }
 
   /* Begin with attributes from the default face.  */
   memcpy (attrs, default_face->lface, sizeof attrs);
@@ -6052,6 +6053,8 @@ face_at_buffer_position (struct window *w, ptrdiff_t pos,
 
   *endptr = endpos;
 
+  SAFE_FREE ();
+
   /* Look up a realized face with the given face attributes,
      or realize a new one for ASCII characters.  */
   return lookup_face (f, attrs);
@@ -6317,7 +6320,7 @@ dump_realized_face (struct face *face)
 {
   fprintf (stderr, "ID: %d\n", face->id);
 #ifdef HAVE_X_WINDOWS
-  fprintf (stderr, "gc: %ld\n", (long) face->gc);
+  fprintf (stderr, "gc: %p\n", face->gc);
 #endif
   fprintf (stderr, "foreground: 0x%lx (%s)\n",
           face->foreground,
@@ -6348,7 +6351,7 @@ DEFUN ("dump-face", Fdump_face, Sdump_face, 0, 1, 0, doc: /* */)
       int i;
 
       fprintf (stderr, "font selection order: ");
-      for (i = 0; i < DIM (font_sort_order); ++i)
+      for (i = 0; i < ARRAYELTS (font_sort_order); ++i)
        fprintf (stderr, "%d ", font_sort_order[i]);
       fprintf (stderr, "\n");
 
index 96a4b07b1501e220eb886a16044e9215ec60e9c4..5edb635b1827429e2b3cb985ac766b101d73bade 100644 (file)
@@ -24,6 +24,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "lisp.h"
 #include "xterm.h"
+#include "menu.h"
 #include "frame.h"
 #include "window.h"
 #include "character.h"
@@ -124,7 +125,6 @@ extern LWLIB_ID widget_id_tick;
 
 #define MAXREQUEST(dpy) (XMaxRequestSize (dpy))
 
-static Lisp_Object Qsuppress_icon;
 static Lisp_Object Qundefined_color;
 static Lisp_Object Qcompound_text, Qcancel_timer;
 Lisp_Object Qfont_param;
@@ -159,7 +159,7 @@ check_x_display_info (Lisp_Object object)
     }
   else if (TERMINALP (object))
     {
-      struct terminal *t = get_terminal (object, 1);
+      struct terminal *t = decode_live_terminal (object);
 
       if (t->type != output_x_window)
         error ("Terminal %d is not an X display", t->id);
@@ -329,8 +329,43 @@ x_real_positions (struct frame *f, int *xptr, int *yptr)
   *yptr = real_y;
 }
 
-\f
+/* Get the mouse position in frame relative coordinates.  */
+
+void
+x_relative_mouse_position (struct frame *f, int *x, int *y)
+{
+  Window root, dummy_window;
+  int dummy;
+
+  eassert (FRAME_X_P (f));
+
+  block_input ();
+
+  XQueryPointer (FRAME_X_DISPLAY (f),
+                 DefaultRootWindow (FRAME_X_DISPLAY (f)),
+
+                 /* The root window which contains the pointer.  */
+                 &root,
 
+                 /* Window pointer is on, not used  */
+                 &dummy_window,
+
+                 /* The position on that root window.  */
+                 x, y,
+
+                 /* x/y in dummy_window coordinates, not used.  */
+                 &dummy, &dummy,
+
+                 /* Modifier keys and pointer buttons, about which
+                    we don't care.  */
+                 (unsigned int *) &dummy);
+
+  unblock_input ();
+
+  /* Translate root window coordinates to window coordinates.  */
+  *x -= f->left_pos + FRAME_OUTER_TO_INNER_DIFF_X (f);
+  *y -= f->top_pos + FRAME_OUTER_TO_INNER_DIFF_Y (f);
+}
 
 /* Gamma-correct COLOR on frame F.  */
 
@@ -422,15 +457,23 @@ x_set_tool_bar_position (struct frame *f,
                          Lisp_Object new_value,
                          Lisp_Object old_value)
 {
-  if (! EQ (new_value, Qleft) && ! EQ (new_value, Qright)
-      && ! EQ (new_value, Qbottom) && ! EQ (new_value, Qtop))
-    return;
-  if (EQ (new_value, old_value)) return;
+  Lisp_Object choice = list4 (Qleft, Qright, Qtop, Qbottom);
 
+  if (!NILP (Fmemq (new_value, choice)))
+    {
 #ifdef USE_GTK
-  xg_change_toolbar_position (f, new_value);
-  fset_tool_bar_position (f, new_value);
+      if (!EQ (new_value, old_value))
+       {
+         xg_change_toolbar_position (f, new_value);
+         fset_tool_bar_position (f, new_value);
+       }
+#else
+      if (!EQ (new_value, Qtop))
+       error ("The only supported tool bar position is top");
 #endif
+    }
+  else
+    wrong_choice (choice, new_value);
 }
 
 #ifdef USE_GTK
@@ -577,35 +620,6 @@ x_set_background_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
     }
 }
 
-static Cursor
-make_invisible_cursor (struct frame *f)
-{
-  Display *dpy = FRAME_X_DISPLAY (f);
-  static char const no_data[] = { 0 };
-  Pixmap pix;
-  XColor col;
-  Cursor c = 0;
-
-  x_catch_errors (dpy);
-  pix = XCreateBitmapFromData (dpy, FRAME_DISPLAY_INFO (f)->root_window,
-                               no_data, 1, 1);
-  if (! x_had_errors_p (dpy) && pix != None)
-    {
-      Cursor pixc;
-      col.pixel = 0;
-      col.red = col.green = col.blue = 0;
-      col.flags = DoRed | DoGreen | DoBlue;
-      pixc = XCreatePixmapCursor (dpy, pix, pix, &col, &col, 0, 0);
-      if (! x_had_errors_p (dpy) && pixc != None)
-        c = pixc;
-      XFreePixmap (dpy, pix);
-    }
-
-  x_uncatch_errors ();
-
-  return c;
-}
-
 static void
 x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
@@ -723,9 +737,6 @@ x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
     XDefineCursor (dpy, FRAME_X_WINDOW (f),
                    f->output_data.x->current_cursor = cursor);
 
-  if (FRAME_DISPLAY_INFO (f)->invisible_cursor == 0)
-    FRAME_DISPLAY_INFO (f)->invisible_cursor = make_invisible_cursor (f);
-
   if (cursor != x->text_cursor
       && x->text_cursor != 0)
     XFreeCursor (dpy, x->text_cursor);
@@ -954,7 +965,7 @@ x_set_icon_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 }
 
 \f
-void
+static void
 x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
 {
   int nlines;
@@ -998,7 +1009,7 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
 #else /* not USE_X_TOOLKIT && not USE_GTK */
   FRAME_MENU_BAR_LINES (f) = nlines;
   FRAME_MENU_BAR_HEIGHT (f) = nlines * FRAME_LINE_HEIGHT (f);
-  resize_frame_windows (f, FRAME_TEXT_HEIGHT (f), 0, 1);
+  adjust_frame_size (f, -1, -1, 2, 1);
   if (FRAME_X_WINDOW (f))
     x_clear_under_internal_border (f);
 
@@ -1049,14 +1060,10 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
    height of all windows on frame F to match the new tool bar height.
    The frame's height doesn't change.  */
 
-void
+static void
 x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
 {
   int nlines;
-#if ! defined (USE_GTK)
-  int delta, root_height;
-  int unit = FRAME_LINE_HEIGHT (f);
-#endif
 
   /* Treat tool bars like menu bars.  */
   if (FRAME_MINIBUF_ONLY_P (f))
@@ -1068,11 +1075,18 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
   else
     nlines = 0;
 
-#ifdef USE_GTK
+  x_change_tool_bar_height (f, nlines * FRAME_LINE_HEIGHT (f));
+}
 
+
+/* Set the pixel height of the tool bar of frame F to HEIGHT.  */
+void
+x_change_tool_bar_height (struct frame *f, int height)
+{
+#ifdef USE_GTK
   FRAME_TOOL_BAR_LINES (f) = 0;
   FRAME_TOOL_BAR_HEIGHT (f) = 0;
-  if (nlines)
+  if (height)
     {
       FRAME_EXTERNAL_TOOL_BAR (f) = 1;
       if (FRAME_X_P (f) && f->output_data.x->toolbar_widget == 0)
@@ -1086,39 +1100,25 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
         free_frame_tool_bar (f);
       FRAME_EXTERNAL_TOOL_BAR (f) = 0;
     }
-
 #else /* !USE_GTK */
+  int unit = FRAME_LINE_HEIGHT (f);
+  int old_height = FRAME_TOOL_BAR_HEIGHT (f);
+  int lines = (height + unit - 1) / unit;
 
   /* Make sure we redisplay all windows in this frame.  */
   windows_or_buffers_changed = 60;
 
-  /* DELTA is in pixels now.  */
-  delta = (nlines - FRAME_TOOL_BAR_LINES (f)) * unit;
-
-  /* Don't resize the tool-bar to more than we have room for.  Note: The
-     calculations below and the subsequent call to resize_frame_windows
-     are inherently flawed because they can make the toolbar higher than
-     the containing frame.  */
-  if (delta > 0)
-    {
-      root_height = WINDOW_PIXEL_HEIGHT (XWINDOW (FRAME_ROOT_WINDOW (f)));
-      if (root_height - delta < unit)
-       {
-         delta = root_height - unit;
-         /* When creating a new frame and toolbar mode is enabled, we
-            need at least one toolbar line.  */
-         nlines = max (FRAME_TOOL_BAR_LINES (f) + delta / unit, 1);
-       }
-    }
 
-  FRAME_TOOL_BAR_LINES (f) = nlines;
-  FRAME_TOOL_BAR_HEIGHT (f) = nlines * FRAME_LINE_HEIGHT (f);
-  resize_frame_windows (f, FRAME_TEXT_HEIGHT (f), 0, 1);
-#if !defined USE_X_TOOLKIT && !defined USE_GTK
-  if (FRAME_X_WINDOW (f))
-    x_clear_under_internal_border (f);
-#endif
-  adjust_frame_glyphs (f);
+  /* Recalculate tool bar and frame text sizes.  */
+  FRAME_TOOL_BAR_HEIGHT (f) = height;
+  FRAME_TOOL_BAR_LINES (f) = lines;
+  FRAME_TEXT_HEIGHT (f)
+    = FRAME_PIXEL_TO_TEXT_HEIGHT (f, FRAME_PIXEL_HEIGHT (f));
+  FRAME_LINES (f)
+    = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, FRAME_PIXEL_HEIGHT (f));
+  /* Store the `tool-bar-lines' and `height' frame parameters.  */
+  store_frame_param (f, Qtool_bar_lines, make_number (lines));
+  store_frame_param (f, Qheight, make_number (FRAME_LINES (f)));
 
   /* We also have to make sure that the internal border at the top of
      the frame, below the menu bar or tool bar, is redrawn when the
@@ -1132,30 +1132,50 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
       clear_current_matrices (f);
     }
 
-  /* If the tool bar gets smaller, the internal border below it
-     has to be cleared.  It was formerly part of the display
-     of the larger tool bar, and updating windows won't clear it.  */
-  if (delta < 0)
+  if ((height < old_height) && WINDOWP (f->tool_bar_window))
+    clear_glyph_matrix (XWINDOW (f->tool_bar_window)->current_matrix);
+
+  /* Recalculate toolbar height.  */
+  f->n_tool_bar_rows = 0;
+
+  adjust_frame_size (f, -1, -1, 4, 0);
+
+  if (FRAME_X_WINDOW (f))
+    x_clear_under_internal_border (f);
+
+#endif /* USE_GTK */
+}
+
+
+static void
+x_set_internal_border_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
+{
+  int border;
+
+  CHECK_TYPE_RANGED_INTEGER (int, arg);
+  border = max (XINT (arg), 0);
+
+  if (border != FRAME_INTERNAL_BORDER_WIDTH (f))
     {
-      int height = FRAME_INTERNAL_BORDER_WIDTH (f);
-      int width = FRAME_PIXEL_WIDTH (f);
-      int y = nlines * unit;
+      FRAME_INTERNAL_BORDER_WIDTH (f) = border;
 
-      /* height can be zero here. */
-      if (height > 0 && width > 0)
+#ifdef USE_X_TOOLKIT
+      if (FRAME_X_OUTPUT (f)->edit_widget)
+       widget_store_internal_border (FRAME_X_OUTPUT (f)->edit_widget);
+#endif
+
+      if (FRAME_X_WINDOW (f) != 0)
        {
-          block_input ();
-         x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                       0, y, width, height);
-          unblock_input ();
-        }
+         adjust_frame_size (f, -1, -1, 3, 0);
 
-      if (WINDOWP (f->tool_bar_window))
-       clear_glyph_matrix (XWINDOW (f->tool_bar_window)->current_matrix);
+#ifdef USE_GTK
+         xg_clear_under_internal_border (f);
+#else
+         x_clear_under_internal_border (f);
+#endif
+       }
     }
 
-  run_window_configuration_change_hook (f);
-#endif /* USE_GTK */
 }
 
 
@@ -1210,7 +1230,7 @@ x_set_scroll_bar_background (struct frame *f, Lisp_Object value, Lisp_Object old
   if (f->output_data.x->scroll_bar_background_pixel != -1)
     unload_color (f, f->output_data.x->scroll_bar_background_pixel);
 
-#ifdef USE_TOOLKIT_SCROLL_BARS
+#if defined (USE_LUCID) && defined (USE_TOOLKIT_SCROLL_BARS)
   /* Scrollbar shadow colors.  */
   if (f->output_data.x->scroll_bar_top_shadow_pixel != -1)
     {
@@ -1222,7 +1242,7 @@ x_set_scroll_bar_background (struct frame *f, Lisp_Object value, Lisp_Object old
       unload_color (f, f->output_data.x->scroll_bar_bottom_shadow_pixel);
       f->output_data.x->scroll_bar_bottom_shadow_pixel = -1;
     }
-#endif /* USE_TOOLKIT_SCROLL_BARS */
+#endif /* USE_LUCID && USE_TOOLKIT_SCROLL_BARS */
 
   f->output_data.x->scroll_bar_background_pixel = pixel;
   if (FRAME_X_WINDOW (f) && FRAME_VISIBLE_P (f))
@@ -1249,10 +1269,6 @@ x_set_scroll_bar_background (struct frame *f, Lisp_Object value, Lisp_Object old
    CODING_SYSTEM, and return a newly allocated memory area which
    should be freed by `xfree' by a caller.
 
-   SELECTIONP non-zero means the string is being encoded for an X
-   selection, so it is safe to run pre-write conversions (which
-   may run Lisp code).
-
    Store the byte length of resulting text in *TEXT_BYTES.
 
    If the text contains only ASCII and Latin-1, store 1 in *STRING_P,
@@ -1261,8 +1277,8 @@ x_set_scroll_bar_background (struct frame *f, Lisp_Object value, Lisp_Object old
    the result should be `COMPOUND_TEXT'.  */
 
 static unsigned char *
-x_encode_text (Lisp_Object string, Lisp_Object coding_system, int selectionp,
-              ptrdiff_t *text_bytes, int *stringp, int *freep)
+x_encode_text (Lisp_Object string, Lisp_Object coding_system,
+              ptrdiff_t *text_bytes, int *stringp, bool *freep)
 {
   int result = string_xstring_p (string);
   struct coding_system coding;
@@ -1305,7 +1321,7 @@ x_set_name_internal (struct frame *f, Lisp_Object name)
        XTextProperty text, icon;
        ptrdiff_t bytes;
        int stringp;
-        int do_free_icon_value = 0, do_free_text_value = 0;
+       bool do_free_icon_value = 0, do_free_text_value = 0;
        Lisp_Object coding_system;
        Lisp_Object encoded_name;
        Lisp_Object encoded_icon_name;
@@ -1337,14 +1353,12 @@ x_set_name_internal (struct frame *f, Lisp_Object name)
           properties.  Per the EWMH specification, those two properties
           are always UTF8_STRING.  This matches what gtk_window_set_title()
           does in the USE_GTK case. */
-       text.value = x_encode_text (name, coding_system, 0, &bytes, &stringp,
-                                   &do_free_text_value);
+       text.value = x_encode_text (name, coding_system, &bytes,
+                                   &stringp, &do_free_text_value);
        text.encoding = (stringp ? XA_STRING
                         : FRAME_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT);
        text.format = 8;
        text.nitems = bytes;
-       if (text.nitems != bytes)
-         error ("Window name too large");
 
        if (!STRINGP (f->icon_name))
          {
@@ -1354,14 +1368,12 @@ x_set_name_internal (struct frame *f, Lisp_Object name)
        else
          {
            /* See the above comment "Note: Encoding strategy".  */
-           icon.value = x_encode_text (f->icon_name, coding_system, 0,
-                                       &bytes, &stringp, &do_free_icon_value);
+           icon.value = x_encode_text (f->icon_name, coding_system, &bytes,
+                                       &stringp, &do_free_icon_value);
            icon.encoding = (stringp ? XA_STRING
                             : FRAME_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT);
            icon.format = 8;
            icon.nitems = bytes;
-           if (icon.nitems != bytes)
-             error ("Icon name too large");
 
            encoded_icon_name = ENCODE_UTF_8 (f->icon_name);
          }
@@ -1399,16 +1411,16 @@ x_set_name_internal (struct frame *f, Lisp_Object name)
 /* Change the name of frame F to NAME.  If NAME is nil, set F's name to
        x_id_name.
 
-   If EXPLICIT is non-zero, that indicates that lisp code is setting the
+   If EXPLICIT is true, that indicates that lisp code is setting the
        name; if NAME is a string, set F's name to NAME and set
        F->explicit_name; if NAME is Qnil, then clear F->explicit_name.
 
-   If EXPLICIT is zero, that indicates that Emacs redisplay code is
+   If EXPLICIT is false, that indicates that Emacs redisplay code is
        suggesting a new name, which lisp code should override; if
        F->explicit_name is set, ignore the new name; otherwise, set it.  */
 
 static void
-x_set_name (struct frame *f, Lisp_Object name, int explicit)
+x_set_name (struct frame *f, Lisp_Object name, bool explicit)
 {
   /* Make sure that requests from lisp code override requests from
      Emacs redisplay code.  */
@@ -1505,14 +1517,36 @@ x_set_scroll_bar_default_width (struct frame *f)
   FRAME_CONFIG_SCROLL_BAR_COLS (f) = (minw + unit - 1) / unit;
   FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = minw;
 #else
-  /* The width of a non-toolkit scrollbar is at least 14 pixels and a
-     multiple of the frame's character width.  */
+  /* The width of a non-toolkit scrollbar is 14 pixels.  */
   FRAME_CONFIG_SCROLL_BAR_COLS (f) = (14 + unit - 1) / unit;
   FRAME_CONFIG_SCROLL_BAR_WIDTH (f)
     = FRAME_CONFIG_SCROLL_BAR_COLS (f) * unit;
 #endif
 }
 
+void
+x_set_scroll_bar_default_height (struct frame *f)
+{
+  int height = FRAME_LINE_HEIGHT (f);
+#ifdef USE_TOOLKIT_SCROLL_BARS
+#ifdef USE_GTK
+  int min_height = xg_get_default_scrollbar_height ();
+#else
+  int min_height = 16;
+#endif
+  /* A minimum height of 14 doesn't look good for toolkit scroll bars.  */
+  FRAME_CONFIG_SCROLL_BAR_HEIGHT (f) = min_height;
+  FRAME_CONFIG_SCROLL_BAR_LINES (f) = (min_height + height - 1) / height;
+#else
+  /* The height of a non-toolkit scrollbar is 14 pixels.  */
+  FRAME_CONFIG_SCROLL_BAR_LINES (f) = (14 + height - 1) / height;
+
+  /* Use all of that space (aside from required margins) for the
+     scroll bar.  */
+  FRAME_CONFIG_SCROLL_BAR_HEIGHT (f) = 14;
+#endif
+}
+
 \f
 /* Record in frame F the specified or default value according to ALIST
    of the parameter named PROP (a Lisp symbol).  If no value is
@@ -1535,13 +1569,14 @@ x_default_scroll_bar_color_parameter (struct frame *f,
 
       /* See if an X resource for the scroll bar color has been
         specified.  */
-      tem = display_x_get_resource (dpyinfo,
-                                   build_string (foreground_p
-                                                 ? "foreground"
-                                                 : "background"),
-                                   empty_unibyte_string,
-                                   build_string ("verticalScrollBar"),
-                                   empty_unibyte_string);
+      AUTO_STRING (foreground, "foreground");
+      AUTO_STRING (background, "foreground");
+      AUTO_STRING (verticalScrollBar, "verticalScrollBar");
+      tem = (display_x_get_resource
+            (dpyinfo, foreground_p ? foreground : background,
+             empty_unibyte_string,
+             verticalScrollBar,
+             empty_unibyte_string));
       if (!STRINGP (tem))
        {
          /* If nothing has been specified, scroll bars will use a
@@ -1559,7 +1594,8 @@ x_default_scroll_bar_color_parameter (struct frame *f,
 #endif /* not USE_TOOLKIT_SCROLL_BARS */
     }
 
-  x_set_frame_parameters (f, list1 (Fcons (prop, tem)));
+  AUTO_FRAME_ARG (arg, prop, tem);
+  x_set_frame_parameters (f, arg);
   return tem;
 }
 
@@ -1592,7 +1628,7 @@ hack_wm_protocols (struct frame *f, Widget widget)
 
     if ((XGetWindowProperty (dpy, w,
                             FRAME_DISPLAY_INFO (f)->Xatom_wm_protocols,
-                            (long)0, (long)100, False, XA_ATOM,
+                            0, 100, False, XA_ATOM,
                             &type, &format, &nitems, &bytes_after,
                             &catoms)
         == Success)
@@ -1750,7 +1786,7 @@ xic_create_fontsetname (const char *base_fontname, int motif)
          len = p - base_fontname + strlen (allcs) + 1;
          font_allcs = alloca (len);
          memcpy (font_allcs, base_fontname, p - base_fontname);
-         strcat (font_allcs, allcs);
+         strcpy (font_allcs + (p - base_fontname), allcs);
 
          /* Build the font spec that matches all families and
             add-styles.  */
@@ -1758,7 +1794,7 @@ xic_create_fontsetname (const char *base_fontname, int motif)
          font_allfamilies = alloca (len);
          strcpy (font_allfamilies, allfamilies);
          memcpy (font_allfamilies + strlen (allfamilies), p1, p - p1);
-         strcat (font_allfamilies, allcs);
+         strcpy (font_allfamilies + strlen (allfamilies) + (p - p1), allcs);
 
          /* Build the font spec that matches all.  */
          len = p - p2 + strlen (allcs) + strlen (all) + strlen (allfamilies) + 1;
@@ -1766,7 +1802,8 @@ xic_create_fontsetname (const char *base_fontname, int motif)
          strcpy (font_all, allfamilies);
          strcat (font_all, all);
          memcpy (font_all + strlen (all) + strlen (allfamilies), p2, p - p2);
-         strcat (font_all, allcs);
+         strcpy (font_all + strlen (all) + strlen (allfamilies) + (p - p2),
+                 allcs);
 
          /* Build the actual font set name.  */
          len = strlen (base_fontname) + strlen (font_allcs)
@@ -1944,8 +1981,7 @@ static XIMStyle
 best_xim_style (XIMStyles *xim)
 {
   int i, j;
-  int nr_supported =
-    sizeof (supported_xim_styles) / sizeof (supported_xim_styles[0]);
+  int nr_supported = ARRAYELTS (supported_xim_styles);
 
   for (i = 0; i < nr_supported; ++i)
     for (j = 0; j < xim->count_styles; ++j)
@@ -2253,8 +2289,7 @@ x_window (struct frame *f, long window_prompting, int minibuffer_only)
 
   /* Do some needed geometry management.  */
   {
-    char *tem, shell_position[sizeof "=x++" + 4 * INT_STRLEN_BOUND (int)];
-    Arg gal[10];
+    Arg gal[3];
     int gac = 0;
     int extra_borders = 0;
     int menubar_size
@@ -2273,7 +2308,7 @@ x_window (struct frame *f, long window_prompting, int minibuffer_only)
       }
 #endif
 
-    f->output_data.x->menubar_height = menubar_size;
+    FRAME_MENUBAR_HEIGHT (f) = menubar_size;
 
 #ifndef USE_LUCID
     /* Motif seems to need this amount added to the sizes
@@ -2284,6 +2319,8 @@ x_window (struct frame *f, long window_prompting, int minibuffer_only)
     extra_borders *= 2;
 #endif
 
+    f->shell_position = xmalloc (sizeof "=x++" + 4 * INT_STRLEN_BOUND (int));
+
     /* Convert our geometry parameters into a geometry string
        and specify it.
        Note that we do not specify here whether the position
@@ -2300,14 +2337,14 @@ x_window (struct frame *f, long window_prompting, int minibuffer_only)
        top = -top;
 
       if (window_prompting & USPosition)
-       sprintf (shell_position, "=%dx%d%c%d%c%d",
+       sprintf (f->shell_position, "=%dx%d%c%d%c%d",
                 FRAME_PIXEL_WIDTH (f) + extra_borders,
                 FRAME_PIXEL_HEIGHT (f) + menubar_size + extra_borders,
                 (xneg ? '-' : '+'), left,
                 (yneg ? '-' : '+'), top);
       else
         {
-          sprintf (shell_position, "=%dx%d",
+          sprintf (f->shell_position, "=%dx%d",
                    FRAME_PIXEL_WIDTH (f) + extra_borders,
                    FRAME_PIXEL_HEIGHT (f) + menubar_size + extra_borders);
 
@@ -2321,12 +2358,7 @@ x_window (struct frame *f, long window_prompting, int minibuffer_only)
         }
     }
 
-    /* We don't free this because we don't know whether
-       it is safe to free it while the frame exists.
-       It isn't worth the trouble of arranging to free it
-       when the frame is deleted.  */
-    tem = xstrdup (shell_position);
-    XtSetArg (gal[gac], XtNgeometry, tem); gac++;
+    XtSetArg (gal[gac], XtNgeometry, f->shell_position); gac++;
     XtSetValues (shell_widget, gal, gac);
   }
 
@@ -2395,7 +2427,7 @@ x_window (struct frame *f, long window_prompting, int minibuffer_only)
      the X server hasn't been told.  */
   {
     Lisp_Object name;
-    int explicit = f->explicit_name;
+    bool explicit = f->explicit_name;
 
     f->explicit_name = 0;
     name = f->name;
@@ -2509,10 +2541,6 @@ x_window (struct frame *f)
   class_hints.res_class = SSDATA (Vx_resource_class);
   XSetClassHint (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), &class_hints);
 
-  /* The menubar is part of the ordinary display;
-     it does not count in addition to the height of the window.  */
-  f->output_data.x->menubar_height = 0;
-
   /* This indicates that we use the "Passive Input" input model.
      Unless we do this, we don't get the Focus{In,Out} events that we
      need to draw the cursor correctly.  Accursed bureaucrats.
@@ -2538,7 +2566,7 @@ x_window (struct frame *f)
      the X server hasn't been told.  */
   {
     Lisp_Object name;
-    int explicit = f->explicit_name;
+    bool explicit = f->explicit_name;
 
     f->explicit_name = 0;
     name = f->name;
@@ -2761,12 +2789,6 @@ do_unwind_create_frame (Lisp_Object frame)
   unwind_create_frame (frame);
 }
 
-static void
-unwind_create_frame_1 (Lisp_Object val)
-{
-  inhibit_lisp_code = val;
-}
-
 static void
 x_default_font_parameter (struct frame *f, Lisp_Object parms)
 {
@@ -2825,7 +2847,8 @@ x_default_font_parameter (struct frame *f, Lisp_Object parms)
     {
       /* Remember the explicit font parameter, so we can re-apply it after
         we've applied the `default' face settings.  */
-      x_set_frame_parameters (f, list1 (Fcons (Qfont_param, font_param)));
+      AUTO_FRAME_ARG (arg, Qfont_param, font_param);
+      x_set_frame_parameters (f, arg);
     }
 
   /* This call will make X resources override any system font setting.  */
@@ -2851,29 +2874,31 @@ Signal error if FRAME is not an X frame.  */)
 static void
 set_machine_and_pid_properties (struct frame *f)
 {
-  long pid = (long) getpid ();
-
   /* This will set WM_CLIENT_MACHINE and WM_LOCALE_NAME.  */
   XSetWMProperties (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), NULL, NULL,
                     NULL, 0, NULL, NULL, NULL);
-  XChangeProperty (FRAME_X_DISPLAY (f),
-                   FRAME_OUTER_WINDOW (f),
-                   XInternAtom (FRAME_X_DISPLAY (f),
-                                "_NET_WM_PID",
-                                False),
-                   XA_CARDINAL, 32, PropModeReplace,
-                   (unsigned char *) &pid, 1);
+  pid_t pid = getpid ();
+  if (pid <= 0xffffffffu)
+    {
+      unsigned long xpid = pid;
+      XChangeProperty (FRAME_X_DISPLAY (f),
+                      FRAME_OUTER_WINDOW (f),
+                      XInternAtom (FRAME_X_DISPLAY (f),
+                                   "_NET_WM_PID",
+                                   False),
+                      XA_CARDINAL, 32, PropModeReplace,
+                      (unsigned char *) &xpid, 1);
+    }
 }
 
 DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
        1, 1, 0,
        doc: /* Make a new X window, which is called a "frame" in Emacs terms.
-Return an Emacs frame object.
-PARMS is an alist of frame parameters.
+Return an Emacs frame object.  PARMS is an alist of frame parameters.
 If the parameters specify that the frame should not have a minibuffer,
-and do not specify a specific minibuffer window to use,
-then `default-minibuffer-frame' must be a frame whose minibuffer can
-be shared by the new frame.
+and do not specify a specific minibuffer window to use, then
+`default-minibuffer-frame' must be a frame whose minibuffer can be
+shared by the new frame.
 
 This function is an internal primitive--use `make-frame' instead.  */)
   (Lisp_Object parms)
@@ -2883,8 +2908,7 @@ This function is an internal primitive--use `make-frame' instead.  */)
   Lisp_Object name;
   int minibuffer_only = 0;
   long window_prompting = 0;
-  int width, height;
-  ptrdiff_t count = SPECPDL_INDEX (), count2;
+  ptrdiff_t count = SPECPDL_INDEX ();
   struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
   Lisp_Object display;
   struct x_display_info *dpyinfo = NULL;
@@ -2953,10 +2977,10 @@ This function is an internal primitive--use `make-frame' instead.  */)
   FRAME_FONTSET (f) = -1;
   f->output_data.x->scroll_bar_foreground_pixel = -1;
   f->output_data.x->scroll_bar_background_pixel = -1;
-#ifdef USE_TOOLKIT_SCROLL_BARS
+#if defined (USE_LUCID) && defined (USE_TOOLKIT_SCROLL_BARS)
   f->output_data.x->scroll_bar_top_shadow_pixel = -1;
   f->output_data.x->scroll_bar_bottom_shadow_pixel = -1;
-#endif /* USE_TOOLKIT_SCROLL_BARS */
+#endif /* USE_LUCID && USE_TOOLKIT_SCROLL_BARS */
   f->output_data.x->white_relief.pixel = -1;
   f->output_data.x->black_relief.pixel = -1;
 
@@ -3005,7 +3029,6 @@ This function is an internal primitive--use `make-frame' instead.  */)
   }
 
   /* Specify the parent under which to make this X window.  */
-
   if (!NILP (parent))
     {
       f->output_data.x->parent_desc = (Window) XFASTINT (parent);
@@ -3028,7 +3051,7 @@ This function is an internal primitive--use `make-frame' instead.  */)
     {
       fset_name (f, name);
       f->explicit_name = 1;
-      /* use the frame's title when getting resources for this frame.  */
+      /* Use the frame's title when getting resources for this frame.  */
       specbind (Qx_resource_name, name);
     }
 
@@ -3091,7 +3114,9 @@ This function is an internal primitive--use `make-frame' instead.  */)
 #endif
                       "verticalScrollBars", "ScrollBars",
                       RES_TYPE_SYMBOL);
-
+  x_default_parameter (f, parms, Qhorizontal_scroll_bars, Qnil,
+                      "horizontalScrollBars", "ScrollBars",
+                      RES_TYPE_SYMBOL);
   /* Also do the stuff which must be set before the window exists.  */
   x_default_parameter (f, parms, Qforeground_color, build_string ("black"),
                       "foreground", "Foreground", RES_TYPE_STRING);
@@ -3123,32 +3148,22 @@ This function is an internal primitive--use `make-frame' instead.  */)
   dpyinfo_refcount = dpyinfo->reference_count;
 #endif /* GLYPH_DEBUG */
 
-  /* Init faces before x_default_parameter is called for scroll-bar
-     parameters because that function calls x_set_scroll_bar_width,
-     which calls change_frame_size, which calls Fset_window_buffer,
-     which runs hooks, which call Fvertical_motion.  At the end, we
-     end up in init_iterator with a null face cache, which should not
-     happen.  */
+  /* Init faces before x_default_parameter is called for the
+     scroll-bar-width parameter because otherwise we end up in
+     init_iterator with a null face cache, which should not happen.  */
   init_frame_faces (f);
-  
-  /* Temporary disable window-configuration-change-hook to avoid
-     an infloop in next_frame and access to uninitialized frame
-     from Lisp code (Bug#18161).  */
-
-  count2 = SPECPDL_INDEX ();
-  record_unwind_protect (unwind_create_frame_1, inhibit_lisp_code);
-  inhibit_lisp_code = Qt;
-
-  /* PXW: This is a duplicate from below.  We have to do it here since
-     otherwise x_set_tool_bar_lines will work with the character sizes
-     installed by init_frame_faces while the frame's pixel size is still
-     calculated from a character size of 1 and we subsequently hit the
-     eassert (height >= 0) assertion in window_box_height.  The
-     non-pixelwise code apparently worked around this because it had one
-     frame line vs one toolbar line which left us with a zero root
-     window height which was obviously wrong as well ...  */
-  change_frame_size (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
-                    FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 1, 0, 0, 1);
+
+  /* The following call of change_frame_size is needed since otherwise
+     x_set_tool_bar_lines will already work with the character sizes
+     installed by init_frame_faces while the frame's pixel size is
+     still calculated from a character size of 1 and we subsequently
+     hit the (height >= 0) assertion in window_box_height.
+
+     The non-pixelwise code apparently worked around this because it
+     had one frame line vs one toolbar line which left us with a zero
+     root window height which was obviously wrong as well ...  */
+  adjust_frame_size (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
+                    FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 5, 1);
 
   /* Set the menu-bar-lines and tool-bar-lines parameters.  We don't
      look up the X resources controlling the menu-bar and tool-bar
@@ -3164,8 +3179,6 @@ This function is an internal primitive--use `make-frame' instead.  */)
                       ? make_number (0) : make_number (1),
                       NULL, NULL, RES_TYPE_NUMBER);
 
-  unbind_to (count2, Qnil);
-
   x_default_parameter (f, parms, Qbuffer_predicate, Qnil,
                       "bufferPredicate", "BufferPredicate",
                       RES_TYPE_SYMBOL);
@@ -3174,9 +3187,9 @@ This function is an internal primitive--use `make-frame' instead.  */)
   x_default_parameter (f, parms, Qwait_for_wm, Qt,
                       "waitForWM", "WaitForWM", RES_TYPE_BOOLEAN);
   x_default_parameter (f, parms, Qfullscreen, Qnil,
-                       "fullscreen", "Fullscreen", RES_TYPE_SYMBOL);
+                      "fullscreen", "Fullscreen", RES_TYPE_SYMBOL);
   x_default_parameter (f, parms, Qtool_bar_position,
-                       f->tool_bar_position, 0, 0, RES_TYPE_SYMBOL);
+                       FRAME_TOOL_BAR_POSITION (f), 0, 0, RES_TYPE_SYMBOL);
 
   /* Compute the size of the X window.  */
   window_prompting = x_figure_window_size (f, parms, 1);
@@ -3215,17 +3228,16 @@ This function is an internal primitive--use `make-frame' instead.  */)
   x_default_parameter (f, parms, Qscroll_bar_width, Qnil,
                       "scrollBarWidth", "ScrollBarWidth",
                       RES_TYPE_NUMBER);
+  x_default_parameter (f, parms, Qscroll_bar_height, Qnil,
+                      "scrollBarHeight", "ScrollBarHeight",
+                      RES_TYPE_NUMBER);
   x_default_parameter (f, parms, Qalpha, Qnil,
                       "alpha", "Alpha", RES_TYPE_NUMBER);
 
-  /* Dimensions, especially FRAME_LINES (f), must be done via change_frame_size.
-     Change will not be effected unless different from the current
-     FRAME_LINES (f).  */
-  width = FRAME_TEXT_WIDTH (f);
-  height = FRAME_TEXT_HEIGHT (f);
-  FRAME_TEXT_HEIGHT (f) = 0;
-  SET_FRAME_WIDTH (f, 0);
-  change_frame_size (f, width, height, 1, 0, 0, 1);
+  /* Consider frame official, now.  */
+  f->official = true;
+
+  adjust_frame_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f), 0, 1);
 
 #if defined (USE_X_TOOLKIT) || defined (USE_GTK)
   /* Create the menu bar.  */
@@ -4263,13 +4275,13 @@ select_visual (struct x_display_info *dpyinfo)
 {
   Display *dpy = dpyinfo->display;
   Screen *screen = dpyinfo->screen;
-  Lisp_Object value;
 
   /* See if a visual is specified.  */
-  value = display_x_get_resource (dpyinfo,
-                                 build_string ("visualClass"),
-                                 build_string ("VisualClass"),
-                                 Qnil, Qnil);
+  AUTO_STRING (visualClass, "visualClass");
+  AUTO_STRING (VisualClass, "VisualClass");
+  Lisp_Object value = display_x_get_resource (dpyinfo, visualClass,
+                                             VisualClass, Qnil, Qnil);
+
   if (STRINGP (value))
     {
       /* VALUE should be of the form CLASS-DEPTH, where CLASS is one
@@ -4280,7 +4292,7 @@ select_visual (struct x_display_info *dpyinfo)
       int i, class = -1;
       XVisualInfo vinfo;
 
-      strcpy (s, SSDATA (value));
+      lispstpcpy (s, value);
       dash = strchr (s, '-');
       if (dash)
        {
@@ -4582,75 +4594,43 @@ FRAME nil or omitted means use the selected frame.  Value is PROP.  */)
 }
 
 
-DEFUN ("x-window-property", Fx_window_property, Sx_window_property,
-       1, 6, 0,
-       doc: /* Value is the value of window property PROP on FRAME.
-If FRAME is nil or omitted, use the selected frame.
-
-On X Windows, the following optional arguments are also accepted:
-If TYPE is nil or omitted, get the property as a string.
-Otherwise TYPE is the name of the atom that denotes the type expected.
-If SOURCE is non-nil, get the property on that window instead of from
-FRAME.  The number 0 denotes the root window.
-If DELETE-P is non-nil, delete the property after retrieving it.
-If VECTOR-RET-P is non-nil, don't return a string but a vector of values.
-
-On MS Windows, this function accepts but ignores those optional arguments.
-
-Value is nil if FRAME hasn't a property with name PROP or if PROP has
-no value of TYPE (always string in the MS Windows case).  */)
-  (Lisp_Object prop, Lisp_Object frame, Lisp_Object type,
-   Lisp_Object source, Lisp_Object delete_p, Lisp_Object vector_ret_p)
+static Lisp_Object
+x_window_property_intern (struct frame *f,
+                          Window target_window,
+                          Atom prop_atom,
+                          Atom target_type,
+                          Lisp_Object delete_p,
+                          Lisp_Object vector_ret_p,
+                          bool *found)
 {
-  struct frame *f = decode_window_system_frame (frame);
-  Atom prop_atom;
-  int rc;
-  Lisp_Object prop_value = Qnil;
   unsigned char *tmp_data = NULL;
+  Lisp_Object prop_value = Qnil;
   Atom actual_type;
-  Atom target_type = XA_STRING;
   int actual_format;
   unsigned long actual_size, bytes_remaining;
-  Window target_window = FRAME_X_WINDOW (f);
+  int rc;
   struct gcpro gcpro1;
 
   GCPRO1 (prop_value);
-  CHECK_STRING (prop);
 
-  if (! NILP (source))
-    {
-      CONS_TO_INTEGER (source, Window, target_window);
-      if (! target_window)
-       target_window = FRAME_DISPLAY_INFO (f)->root_window;
-    }
-
-  block_input ();
-  if (STRINGP (type))
-    {
-      if (strcmp ("AnyPropertyType", SSDATA (type)) == 0)
-        target_type = AnyPropertyType;
-      else
-        target_type = XInternAtom (FRAME_X_DISPLAY (f), SSDATA (type), False);
-    }
-
-  prop_atom = XInternAtom (FRAME_X_DISPLAY (f), SSDATA (prop), False);
   rc = XGetWindowProperty (FRAME_X_DISPLAY (f), target_window,
                           prop_atom, 0, 0, False, target_type,
                           &actual_type, &actual_format, &actual_size,
                           &bytes_remaining, &tmp_data);
-  if (rc == Success)
-    {
-      int size = bytes_remaining;
 
+  *found = actual_format != 0;
+
+  if (rc == Success && *found)
+    {
       XFree (tmp_data);
       tmp_data = NULL;
 
       rc = XGetWindowProperty (FRAME_X_DISPLAY (f), target_window,
-                              prop_atom, 0, bytes_remaining,
-                              ! NILP (delete_p), target_type,
-                              &actual_type, &actual_format,
-                              &actual_size, &bytes_remaining,
-                              &tmp_data);
+                               prop_atom, 0, bytes_remaining,
+                               ! NILP (delete_p), target_type,
+                               &actual_type, &actual_format,
+                               &actual_size, &bytes_remaining,
+                               &tmp_data);
       if (rc == Success && tmp_data)
         {
           /* The man page for XGetWindowProperty says:
@@ -4678,7 +4658,7 @@ no value of TYPE (always string in the MS Windows case).  */)
             }
 
           if (NILP (vector_ret_p))
-            prop_value = make_string ((char *) tmp_data, size);
+            prop_value = make_string ((char *) tmp_data, actual_size);
           else
             prop_value = x_property_data_to_lisp (f,
                                                   tmp_data,
@@ -4690,121 +4670,85 @@ no value of TYPE (always string in the MS Windows case).  */)
       if (tmp_data) XFree (tmp_data);
     }
 
-  unblock_input ();
   UNGCPRO;
   return prop_value;
 }
 
+DEFUN ("x-window-property", Fx_window_property, Sx_window_property,
+       1, 6, 0,
+       doc: /* Value is the value of window property PROP on FRAME.
+If FRAME is nil or omitted, use the selected frame.
 
-\f
-/***********************************************************************
-                               Busy cursor
- ***********************************************************************/
-
-/* Timer function of hourglass_atimer.  TIMER is equal to
-   hourglass_atimer.
+On X Windows, the following optional arguments are also accepted:
+If TYPE is nil or omitted, get the property as a string.
+Otherwise TYPE is the name of the atom that denotes the type expected.
+If SOURCE is non-nil, get the property on that window instead of from
+FRAME.  The number 0 denotes the root window.
+If DELETE-P is non-nil, delete the property after retrieving it.
+If VECTOR-RET-P is non-nil, don't return a string but a vector of values.
 
-   Display an hourglass pointer on all frames by mapping the frames'
-   hourglass_window.  Set the hourglass_p flag in the frames'
-   output_data.x structure to indicate that an hourglass cursor is
-   shown on the frames.  */
+On MS Windows, this function accepts but ignores those optional arguments.
 
-void
-show_hourglass (struct atimer *timer)
+Value is nil if FRAME hasn't a property with name PROP or if PROP has
+no value of TYPE (always string in the MS Windows case).  */)
+  (Lisp_Object prop, Lisp_Object frame, Lisp_Object type,
+   Lisp_Object source, Lisp_Object delete_p, Lisp_Object vector_ret_p)
 {
-  /* The timer implementation will cancel this timer automatically
-     after this function has run.  Set hourglass_atimer to null
-     so that we know the timer doesn't have to be canceled.  */
-  hourglass_atimer = NULL;
-
-  if (!hourglass_shown_p)
-    {
-      Lisp_Object rest, frame;
-
-      block_input ();
-
-      FOR_EACH_FRAME (rest, frame)
-       {
-         struct frame *f = XFRAME (frame);
-
-         if (FRAME_LIVE_P (f) && FRAME_X_P (f) && FRAME_X_DISPLAY (f))
-           {
-             Display *dpy = FRAME_X_DISPLAY (f);
-
-#ifdef USE_X_TOOLKIT
-             if (f->output_data.x->widget)
-#else
-             if (FRAME_OUTER_WINDOW (f))
-#endif
-               {
-                 f->output_data.x->hourglass_p = 1;
+  struct frame *f = decode_window_system_frame (frame);
+  Atom prop_atom;
+  Lisp_Object prop_value = Qnil;
+  Atom target_type = XA_STRING;
+  Window target_window = FRAME_X_WINDOW (f);
+  struct gcpro gcpro1;
+  bool found;
 
-                 if (!f->output_data.x->hourglass_window)
-                   {
-                     unsigned long mask = CWCursor;
-                     XSetWindowAttributes attrs;
-#ifdef USE_GTK
-                      Window parent = FRAME_X_WINDOW (f);
-#else
-                      Window parent = FRAME_OUTER_WINDOW (f);
-#endif
-                     attrs.cursor = f->output_data.x->hourglass_cursor;
-
-                     f->output_data.x->hourglass_window
-                       = XCreateWindow (dpy, parent,
-                                        0, 0, 32000, 32000, 0, 0,
-                                        InputOnly,
-                                        CopyFromParent,
-                                        mask, &attrs);
-                   }
-
-                 XMapRaised (dpy, f->output_data.x->hourglass_window);
-                 XFlush (dpy);
-               }
-           }
-       }
+  GCPRO1 (prop_value);
+  CHECK_STRING (prop);
 
-      hourglass_shown_p = 1;
-      unblock_input ();
+  if (! NILP (source))
+    {
+      CONS_TO_INTEGER (source, Window, target_window);
+      if (! target_window)
+       target_window = FRAME_DISPLAY_INFO (f)->root_window;
     }
-}
-
-
-/* Hide the hourglass pointer on all frames, if it is currently
-   shown.  */
 
-void
-hide_hourglass (void)
-{
-  if (hourglass_shown_p)
+  block_input ();
+  if (STRINGP (type))
     {
-      Lisp_Object rest, frame;
+      if (strcmp ("AnyPropertyType", SSDATA (type)) == 0)
+        target_type = AnyPropertyType;
+      else
+        target_type = XInternAtom (FRAME_X_DISPLAY (f), SSDATA (type), False);
+    }
 
-      block_input ();
-      FOR_EACH_FRAME (rest, frame)
-       {
-         struct frame *f = XFRAME (frame);
+  prop_atom = XInternAtom (FRAME_X_DISPLAY (f), SSDATA (prop), False);
+  prop_value = x_window_property_intern (f,
+                                         target_window,
+                                         prop_atom,
+                                         target_type,
+                                         delete_p,
+                                         vector_ret_p,
+                                         &found);
+  if (NILP (prop_value)
+      && ! found
+      && NILP (source)
+      && target_window != FRAME_OUTER_WINDOW (f))
+    {
+      prop_value = x_window_property_intern (f,
+                                             FRAME_OUTER_WINDOW (f),
+                                             prop_atom,
+                                             target_type,
+                                             delete_p,
+                                             vector_ret_p,
+                                             &found);
+    }
 
-         if (FRAME_X_P (f)
-             /* Watch out for newly created frames.  */
-             && f->output_data.x->hourglass_window)
-           {
-             XUnmapWindow (FRAME_X_DISPLAY (f),
-                           f->output_data.x->hourglass_window);
-             /* Sync here because XTread_socket looks at the
-                hourglass_p flag that is reset to zero below.  */
-             XSync (FRAME_X_DISPLAY (f), False);
-             f->output_data.x->hourglass_p = 0;
-           }
-       }
 
-      hourglass_shown_p = 0;
-      unblock_input ();
-    }
+  unblock_input ();
+  UNGCPRO;
+  return prop_value;
 }
 
-
-\f
 /***********************************************************************
                                Tool tips
  ***********************************************************************/
@@ -4885,7 +4829,8 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
   f = make_frame (1);
   XSETFRAME (frame, f);
 
-  buffer = Fget_buffer_create (build_string (" *tip*"));
+  AUTO_STRING (tip, " *tip*");
+  buffer = Fget_buffer_create (tip);
   /* Use set_window_buffer instead of Fset_window_buffer (see
      discussion of bug#11984, bug#12025, bug#12026).  */
   set_window_buffer (FRAME_ROOT_WINDOW (f), buffer, 0, 0);
@@ -4912,10 +4857,10 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
   FRAME_FONTSET (f) = -1;
   f->output_data.x->scroll_bar_foreground_pixel = -1;
   f->output_data.x->scroll_bar_background_pixel = -1;
-#ifdef USE_TOOLKIT_SCROLL_BARS
+#if defined (USE_LUCID) && defined (USE_TOOLKIT_SCROLL_BARS)
   f->output_data.x->scroll_bar_top_shadow_pixel = -1;
   f->output_data.x->scroll_bar_bottom_shadow_pixel = -1;
-#endif /* USE_TOOLKIT_SCROLL_BARS */
+#endif /* USE_LUCID && USE_TOOLKIT_SCROLL_BARS */
   f->output_data.x->white_relief.pixel = -1;
   f->output_data.x->black_relief.pixel = -1;
 
@@ -5031,12 +4976,9 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
   dpyinfo_refcount = dpyinfo->reference_count;
 #endif /* GLYPH_DEBUG */
 
-  /* Init faces before x_default_parameter is called for scroll-bar
-     parameters because that function calls x_set_scroll_bar_width,
-     which calls change_frame_size, which calls Fset_window_buffer,
-     which runs hooks, which call Fvertical_motion.  At the end, we
-     end up in init_iterator with a null face cache, which should not
-     happen.  */
+  /* Init faces before x_default_parameter is called for the
+     scroll-bar-width parameter because otherwise we end up in
+     init_iterator with a null face cache, which should not happen.  */
   init_frame_faces (f);
 
   f->output_data.x->parent_desc = FRAME_DISPLAY_INFO (f)->root_window;
@@ -5093,12 +5035,15 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
   width = FRAME_COLS (f);
   height = FRAME_LINES (f);
   SET_FRAME_COLS (f, 0);
-  FRAME_LINES (f) = 0;
+  SET_FRAME_LINES (f, 0);
   change_frame_size (f, width, height, 1, 0, 0, 0);
 
   /* Add `tooltip' frame parameter's default value. */
   if (NILP (Fframe_parameter (frame, Qtooltip)))
-    Fmodify_frame_parameters (frame, list1 (Fcons (Qtooltip, Qt)));
+    {
+      AUTO_FRAME_ARG (arg, Qtooltip, Qt);
+      Fmodify_frame_parameters (frame, arg);
+    }
 
   /* FIXME - can this be done in a similar way to normal frames?
      http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg00641.html */
@@ -5116,7 +5061,10 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
       disptype = intern ("color");
 
     if (NILP (Fframe_parameter (frame, Qdisplay_type)))
-      Fmodify_frame_parameters (frame, list1 (Fcons (Qdisplay_type, disptype)));
+      {
+       AUTO_FRAME_ARG (arg, Qdisplay_type, disptype);
+       Fmodify_frame_parameters (frame, arg);
+      }
   }
 
   /* Set up faces after all frame parameters are known.  This call
@@ -5135,7 +5083,10 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
     call2 (Qface_set_after_frame_default, frame, Qnil);
 
     if (!EQ (bg, Fframe_parameter (frame, Qbackground_color)))
-      Fmodify_frame_parameters (frame, list1 (Fcons (Qbackground_color, bg)));
+      {
+       AUTO_FRAME_ARG (arg, Qbackground_color, bg);
+       Fmodify_frame_parameters (frame, arg);
+      }
   }
 
   f->no_split = 1;
@@ -5151,7 +5102,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
      below.  And the frame needs to be on Vframe_list or making it
      visible won't work.  */
   Vframe_list = Fcons (frame, Vframe_list);
-
+  f->official = true;
 
   /* Setting attributes of faces of the tooltip frame from resources
      and similar will increment face_change_count, which leads to the
@@ -6035,7 +5986,11 @@ present and mapped to the usual X keysyms.  */)
          XkbFreeNames (kb, 0, True);
        }
 
-      XkbFreeClientMap (kb, 0, True);
+      /* As of libX11-1.6.2, XkbGetMap manual says that you should use
+        XkbFreeClientMap to free the data returned by XkbGetMap.  But
+        this function just frees the data referenced from KB and not
+        KB itself.  To free KB as well, call XkbFreeKeyboard.  */
+      XkbFreeKeyboard (kb, XkbAllMapComponentsMask, True);
 
       if (delete_keycode
          && backspace_keycode
@@ -6077,17 +6032,19 @@ frame_parm_handler x_frame_parm_handlers[] =
   x_set_mouse_color,
   x_explicitly_set_name,
   x_set_scroll_bar_width,
+  x_set_scroll_bar_height,
   x_set_title,
   x_set_unsplittable,
   x_set_vertical_scroll_bars,
+  x_set_horizontal_scroll_bars,
   x_set_visibility,
   x_set_tool_bar_lines,
   x_set_scroll_bar_foreground,
   x_set_scroll_bar_background,
   x_set_screen_gamma,
   x_set_line_spacing,
-  x_set_fringe_width,
-  x_set_fringe_width,
+  x_set_left_fringe,
+  x_set_right_fringe,
   x_set_wait_for_wm,
   x_set_fullscreen,
   x_set_font_backend,
@@ -6099,15 +6056,10 @@ frame_parm_handler x_frame_parm_handlers[] =
 void
 syms_of_xfns (void)
 {
-  /* The section below is built by the lisp expression at the top of the file,
-     just above where these variables are declared.  */
-  /*&&& init symbols here &&&*/
-  DEFSYM (Qsuppress_icon, "suppress-icon");
   DEFSYM (Qundefined_color, "undefined-color");
   DEFSYM (Qcompound_text, "compound-text");
   DEFSYM (Qcancel_timer, "cancel-timer");
   DEFSYM (Qfont_param, "font-parameter");
-  /* This is the end of symbol initialization.  */
 
   Fput (Qundefined_color, Qerror_conditions,
        listn (CONSTYPE_PURE, 2, Qundefined_color, Qerror));
index 525f00031c5b371eb4ea7ca4ccc048431bc4e132..5e8dd370120997e1eef9d483dda439f066f29e9e 100644 (file)
@@ -121,11 +121,11 @@ static Lisp_Object xfont_match (struct frame *, Lisp_Object);
 static Lisp_Object xfont_list_family (struct frame *);
 static Lisp_Object xfont_open (struct frame *, Lisp_Object, int);
 static void xfont_close (struct font *);
-static int xfont_prepare_face (struct frame *, struct face *);
+static void xfont_prepare_face (struct frame *, struct face *);
 static int xfont_has_char (Lisp_Object, int);
 static unsigned xfont_encode_char (struct font *, int);
-static int xfont_text_extents (struct font *, unsigned *, int,
-                               struct font_metrics *);
+static void xfont_text_extents (struct font *, unsigned *, int,
+                               struct font_metrics *);
 static int xfont_draw (struct glyph_string *, int, int, int, int, bool);
 static int xfont_check (struct frame *, struct font *);
 
@@ -146,7 +146,7 @@ struct font_driver xfont_driver =
     xfont_encode_char,
     xfont_text_extents,
     xfont_draw,
-    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
     xfont_check,
     NULL, /* get_variation_glyphs */
     NULL, /* filter_properties */
@@ -541,7 +541,7 @@ xfont_list (struct frame *f, Lisp_Object spec)
            if (STRINGP (XCAR (alter))
                && ((r - name) + SBYTES (XCAR (alter))) < 256)
              {
-               strcpy (r, SSDATA (XCAR (alter)));
+               lispstpcpy (r, XCAR (alter));
                list = xfont_list_pattern (display, name, registry, script);
                if (! NILP (list))
                  break;
@@ -804,8 +804,6 @@ xfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
       ASET (font_object, FONT_NAME_INDEX, make_string (buf, len));
     }
   ASET (font_object, FONT_FULLNAME_INDEX, fullname);
-  ASET (font_object, FONT_FILE_INDEX, Qnil);
-  ASET (font_object, FONT_FORMAT_INDEX, Qx);
   font = XFONT_OBJECT (font_object);
   ((struct xfont_info *) font)->xfont = xfont;
   ((struct xfont_info *) font)->display = FRAME_X_DISPLAY (f);
@@ -916,15 +914,13 @@ xfont_close (struct font *font)
     }
 }
 
-static int
+static void
 xfont_prepare_face (struct frame *f, struct face *face)
 {
   block_input ();
   XSetFont (FRAME_X_DISPLAY (f), face->gc,
            ((struct xfont_info *) face->font)->xfont->fid);
   unblock_input ();
-
-  return 0;
 }
 
 static int
@@ -979,15 +975,14 @@ xfont_encode_char (struct font *font, int c)
   return (xfont_get_pcm (xfont, &char2b) ? code : FONT_INVALID_CODE);
 }
 
-static int
-xfont_text_extents (struct font *font, unsigned int *code, int nglyphs, struct font_metrics *metrics)
+static void
+xfont_text_extents (struct font *font, unsigned int *code,
+                   int nglyphs, struct font_metrics *metrics)
 {
   XFontStruct *xfont = ((struct xfont_info *) font)->xfont;
-  int width = 0;
-  int i, first;
+  int i, width = 0;
+  bool first;
 
-  if (metrics)
-    memset (metrics, 0, sizeof (struct font_metrics));
   for (i = 0, first = 1; i < nglyphs; i++)
     {
       XChar2b char2b;
@@ -1001,34 +996,27 @@ xfont_text_extents (struct font *font, unsigned int *code, int nglyphs, struct f
        continue;
       if (first)
        {
-         if (metrics)
-           {
-             metrics->lbearing = pcm->lbearing;
-             metrics->rbearing = pcm->rbearing;
-             metrics->ascent = pcm->ascent;
-             metrics->descent = pcm->descent;
-           }
+         metrics->lbearing = pcm->lbearing;
+         metrics->rbearing = pcm->rbearing;
+         metrics->ascent = pcm->ascent;
+         metrics->descent = pcm->descent;
          first = 0;
        }
       else
        {
-         if (metrics)
-           {
-             if (metrics->lbearing > width + pcm->lbearing)
-               metrics->lbearing = width + pcm->lbearing;
-             if (metrics->rbearing < width + pcm->rbearing)
-               metrics->rbearing = width + pcm->rbearing;
-             if (metrics->ascent < pcm->ascent)
-               metrics->ascent = pcm->ascent;
-             if (metrics->descent < pcm->descent)
-               metrics->descent = pcm->descent;
-           }
+         if (metrics->lbearing > width + pcm->lbearing)
+           metrics->lbearing = width + pcm->lbearing;
+         if (metrics->rbearing < width + pcm->rbearing)
+           metrics->rbearing = width + pcm->rbearing;
+         if (metrics->ascent < pcm->ascent)
+           metrics->ascent = pcm->ascent;
+         if (metrics->descent < pcm->descent)
+           metrics->descent = pcm->descent;
        }
       width += pcm->width;
     }
-  if (metrics)
-    metrics->width = width;
-  return width;
+
+  metrics->width = width;
 }
 
 static int
index 18c180f906a0a46fb376c3b37cff67d13713b60b..0a883a7b87b4386acb7d5439b457c8b3c9d3ca14 100644 (file)
@@ -270,8 +270,7 @@ xftfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
   double size = 0;
   XftFont *xftfont = NULL;
   int spacing;
-  char name[256];
-  int len, i;
+  int i;
   XGlyphInfo extents;
   FT_Face ft_face;
   FcMatrix *matrix;
@@ -322,16 +321,6 @@ xftfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
 
 
   block_input ();
-  /* Make sure that the Xrender extension is added before the Xft one.
-     Otherwise, the close-display hook set by Xft is called after the
-     one for Xrender, and the former tries to re-add the latter.  This
-     results in inconsistency of internal states and leads to X
-     protocol error when one reconnects to the same X server.
-     (Bug#1696)  */
-  {
-    int event_base, error_base;
-    XRenderQueryExtension (display, &event_base, &error_base);
-  }
 
   /* Substitute in values from X resources and XftDefaultSet.  */
   XftDefaultSubstitute (display, FRAME_X_SCREEN_NUMBER (f), pat);
@@ -351,20 +340,9 @@ xftfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
 
   /* We should not destroy PAT here because it is kept in XFTFONT and
      destroyed automatically when XFTFONT is closed.  */
-  font_object = font_make_object (VECSIZE (struct xftfont_info), entity, size);
-  ASET (font_object, FONT_TYPE_INDEX, Qxft);
-  len = font_unparse_xlfd (entity, size, name, 256);
-  if (len > 0)
-    ASET (font_object, FONT_NAME_INDEX, make_string (name, len));
-  len = font_unparse_fcname (entity, size, name, 256);
-  if (len > 0)
-    ASET (font_object, FONT_FULLNAME_INDEX, make_string (name, len));
-  else
-    ASET (font_object, FONT_FULLNAME_INDEX,
-         AREF (font_object, FONT_NAME_INDEX));
+  font_object = font_build_object (VECSIZE (struct xftfont_info),
+                                  Qxft, entity, size);
   ASET (font_object, FONT_FILE_INDEX, filename);
-  ASET (font_object, FONT_FORMAT_INDEX,
-       ftfont_font_format (xftfont->pattern, filename));
   font = XFONT_OBJECT (font_object);
   font->pixel_size = size;
   font->driver = &xftfont_driver;
@@ -507,7 +485,7 @@ xftfont_close (struct font *font)
     }
 }
 
-static int
+static void
 xftfont_prepare_face (struct frame *f, struct face *face)
 {
   struct xftface_info *xftface_info;
@@ -517,17 +495,14 @@ xftfont_prepare_face (struct frame *f, struct face *face)
   if (face != face->ascii_face)
     {
       face->extra = face->ascii_face->extra;
-      return 0;
+      return;
     }
 #endif
 
-  xftface_info = malloc (sizeof *xftface_info);
-  if (! xftface_info)
-    return -1;
+  xftface_info = xmalloc (sizeof *xftface_info);
   xftfont_get_colors (f, face, face->gc, NULL,
                      &xftface_info->xft_fg, &xftface_info->xft_bg);
   face->extra = xftface_info;
-  return 0;
 }
 
 static void
@@ -545,7 +520,7 @@ xftfont_done_face (struct frame *f, struct face *face)
   xftface_info = (struct xftface_info *) face->extra;
   if (xftface_info)
     {
-      free (xftface_info);
+      xfree (xftface_info);
       face->extra = NULL;
     }
 }
@@ -582,8 +557,9 @@ xftfont_encode_char (struct font *font, int c)
   return (code ? code : FONT_INVALID_CODE);
 }
 
-static int
-xftfont_text_extents (struct font *font, unsigned int *code, int nglyphs, struct font_metrics *metrics)
+static void
+xftfont_text_extents (struct font *font, unsigned int *code,
+                     int nglyphs, struct font_metrics *metrics)
 {
   struct xftfont_info *xftfont_info = (struct xftfont_info *) font;
   XGlyphInfo extents;
@@ -592,21 +568,18 @@ xftfont_text_extents (struct font *font, unsigned int *code, int nglyphs, struct
   XftGlyphExtents (xftfont_info->display, xftfont_info->xftfont, code, nglyphs,
                   &extents);
   unblock_input ();
-  if (metrics)
-    {
-      metrics->lbearing = - extents.x;
-      metrics->rbearing = - extents.x + extents.width;
-      metrics->width = extents.xOff;
-      metrics->ascent = extents.y;
-      metrics->descent = extents.height - extents.y;
-    }
-  return extents.xOff;
+
+  metrics->lbearing = - extents.x;
+  metrics->rbearing = - extents.x + extents.width;
+  metrics->width = extents.xOff;
+  metrics->ascent = extents.y;
+  metrics->descent = extents.height - extents.y;
 }
 
 static XftDraw *
 xftfont_get_xft_draw (struct frame *f)
 {
-  XftDraw *xft_draw = font_get_frame_data (f, &xftfont_driver);
+  XftDraw *xft_draw = font_get_frame_data (f, Qxft);
 
   if (! xft_draw)
     {
@@ -617,7 +590,7 @@ xftfont_get_xft_draw (struct frame *f)
                               FRAME_X_COLORMAP (f));
       unblock_input ();
       eassert (xft_draw != NULL);
-      font_put_frame_data (f, &xftfont_driver, xft_draw);
+      font_put_frame_data (f, Qxft, xft_draw);
     }
   return xft_draw;
 }
@@ -693,14 +666,14 @@ xftfont_end_for_frame (struct frame *f)
   /* Don't do anything if display is dead */
   if (FRAME_X_DISPLAY (f) == NULL) return 0;
 
-  xft_draw = font_get_frame_data (f, &xftfont_driver);
+  xft_draw = font_get_frame_data (f, Qxft);
 
   if (xft_draw)
     {
       block_input ();
       XftDrawDestroy (xft_draw);
       unblock_input ();
-      font_put_frame_data (f, &xftfont_driver, NULL);
+      font_put_frame_data (f, Qxft, NULL);
     }
   return 0;
 }
index 42fdfed0d3448c1311de48424c3ea5ae471e7095..bf889a90e978a329f7f09f18c0e13068d34fb01a 100644 (file)
@@ -53,7 +53,7 @@ xg_select (int fds_lim, fd_set *rfds, fd_set *wfds, fd_set *efds,
   int have_wfds = wfds != NULL;
   GPollFD gfds_buf[128];
   GPollFD *gfds = gfds_buf;
-  int gfds_size = sizeof gfds_buf / sizeof *gfds_buf;
+  int gfds_size = ARRAYELTS (gfds_buf);
   int n_gfds, retval = 0, our_fds = 0, max_fds = fds_lim - 1;
   int i, nfds, tmo_in_millisec;
   bool need_to_dispatch;
index 9b1ac540c217888a2bd260eb38f66eae3188d5ae..e3f1a17fbce216e117f9dab4b4abde533ff87d77 100644 (file)
@@ -110,11 +110,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 static Lisp_Object Qdebug_on_next_call;
 
-#if defined (USE_X_TOOLKIT) || defined (USE_GTK)
-static Lisp_Object xdialog_show (struct frame *, bool, Lisp_Object, Lisp_Object,
-                                 const char **);
-#endif
-\f
 /* Flag which when set indicates a dialog or menu has been posted by
    Xt on behalf of one of the widget sets.  */
 static int popup_activated_flag;
@@ -122,7 +117,7 @@ static int popup_activated_flag;
 \f
 #ifdef USE_X_TOOLKIT
 
-static int next_menubar_widget_id;
+static LWLIB_ID next_menubar_widget_id;
 
 /* Return the frame whose ->output_data.x->id equals ID, or 0 if none.  */
 
@@ -144,53 +139,6 @@ menubar_id_to_frame (LWLIB_ID id)
 }
 
 #endif
-\f
-#ifdef HAVE_X_WINDOWS
-/* Return the mouse position in *X and *Y.  The coordinates are window
-   relative for the edit window in frame F.
-   This is for Fx_popup_menu.  The mouse_position_hook can not
-   be used for X, as it returns window relative coordinates
-   for the window where the mouse is in.  This could be the menu bar,
-   the scroll bar or the edit window.  Fx_popup_menu needs to be
-   sure it is the edit window.  */
-void
-mouse_position_for_popup (struct frame *f, int *x, int *y)
-{
-  Window root, dummy_window;
-  int dummy;
-
-  eassert (FRAME_X_P (f));
-
-  block_input ();
-
-  XQueryPointer (FRAME_X_DISPLAY (f),
-                 DefaultRootWindow (FRAME_X_DISPLAY (f)),
-
-                 /* The root window which contains the pointer.  */
-                 &root,
-
-                 /* Window pointer is on, not used  */
-                 &dummy_window,
-
-                 /* The position on that root window.  */
-                 x, y,
-
-                 /* x/y in dummy_window coordinates, not used.  */
-                 &dummy, &dummy,
-
-                 /* Modifier keys and pointer buttons, about which
-                    we don't care.  */
-                 (unsigned int *) &dummy);
-
-  unblock_input ();
-
-  /* xmenu_show expects window coordinates, not root window
-     coordinates.  Translate.  */
-  *x -= f->left_pos + FRAME_OUTER_TO_INNER_DIFF_X (f);
-  *y -= f->top_pos + FRAME_OUTER_TO_INNER_DIFF_Y (f);
-}
-
-#endif /* HAVE_X_WINDOWS */
 
 #ifndef MSDOS
 
@@ -213,9 +161,6 @@ x_menu_set_in_use (int in_use)
 
 /* Wait for an X event to arrive or for a timer to expire.  */
 
-#ifndef USE_MOTIF
-static
-#endif
 void
 x_menu_wait_for_event (void *data)
 {
@@ -682,7 +627,6 @@ update_frame_menubar (struct frame *f)
   xg_update_frame_menubar (f);
 #else
   struct x_output *x;
-  int columns, rows;
 
   eassert (FRAME_X_P (f));
 
@@ -692,10 +636,6 @@ update_frame_menubar (struct frame *f)
     return;
 
   block_input ();
-  /* Save the size of the frame because the pane widget doesn't accept
-     to resize itself. So force it.  */
-  columns = FRAME_COLS (f);
-  rows = FRAME_LINES (f);
 
   /* Do the voodoo which means "I'm changing lots of things, don't try
      to refigure sizes until I'm done."  */
@@ -716,8 +656,8 @@ update_frame_menubar (struct frame *f)
   XtManageChild (x->edit_widget);
   lw_refigure_widget (x->column_widget, True);
 
-  /* Force the pane widget to resize itself with the right values.  */
-  EmacsFrameSetCharSize (x->edit_widget, columns, rows);
+  /* Force the pane widget to resize itself.  */
+  adjust_frame_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f), 2, 0);
   unblock_input ();
 #endif
 }
@@ -760,7 +700,7 @@ apply_systemfont_to_menu (struct frame *f, Widget w)
 void
 set_frame_menubar (struct frame *f, bool first_time, bool deep_p)
 {
-  xt_or_gtk_widget menubar_widget;
+  xt_or_gtk_widget menubar_widget, old_widget;
 #ifdef USE_X_TOOLKIT
   LWLIB_ID id;
 #endif
@@ -773,7 +713,7 @@ set_frame_menubar (struct frame *f, bool first_time, bool deep_p)
 
   eassert (FRAME_X_P (f));
 
-  menubar_widget = f->output_data.x->menubar_widget;
+  menubar_widget = old_widget = f->output_data.x->menubar_widget;
 
   XSETFRAME (Vmenu_updating_frame, f);
 
@@ -887,12 +827,8 @@ set_frame_menubar (struct frame *f, bool first_time, bool deep_p)
       /* Convert menu_items into widget_value trees
         to display the menu.  This cannot evaluate Lisp code.  */
 
-      wv = xmalloc_widget_value ();
-      wv->name = "menubar";
-      wv->value = 0;
-      wv->enabled = 1;
+      wv = make_widget_value ("menubar", NULL, true, Qnil);
       wv->button_type = BUTTON_TYPE_NONE;
-      wv->help = Qnil;
       first_wv = wv;
 
       for (i = 0; submenu_start[i] >= 0; i++)
@@ -957,12 +893,8 @@ set_frame_menubar (struct frame *f, bool first_time, bool deep_p)
       /* Make a widget-value tree containing
         just the top level menu bar strings.  */
 
-      wv = xmalloc_widget_value ();
-      wv->name = "menubar";
-      wv->value = 0;
-      wv->enabled = 1;
+      wv = make_widget_value ("menubar", NULL, true, Qnil);
       wv->button_type = BUTTON_TYPE_NONE;
-      wv->help = Qnil;
       first_wv = wv;
 
       items = FRAME_MENU_BAR_ITEMS (f);
@@ -974,12 +906,8 @@ set_frame_menubar (struct frame *f, bool first_time, bool deep_p)
          if (NILP (string))
            break;
 
-         wv = xmalloc_widget_value ();
-         wv->name = SSDATA (string);
-         wv->value = 0;
-         wv->enabled = 1;
+         wv = make_widget_value (SSDATA (string), NULL, true, Qnil);
          wv->button_type = BUTTON_TYPE_NONE;
-         wv->help = Qnil;
          /* This prevents lwlib from assuming this
             menu item is really supposed to be empty.  */
          /* The intptr_t cast avoids a warning.
@@ -1090,7 +1018,7 @@ set_frame_menubar (struct frame *f, bool first_time, bool deep_p)
 #endif /* USE_LUCID */
 #endif /* 1 */
 
-    f->output_data.x->menubar_height = menubar_size;
+    FRAME_MENUBAR_HEIGHT (f) = menubar_size;
   }
 #endif /* not USE_GTK */
 
@@ -1133,7 +1061,7 @@ free_frame_menubar (struct frame *f)
 
   menubar_widget = f->output_data.x->menubar_widget;
 
-  f->output_data.x->menubar_height = 0;
+  FRAME_MENUBAR_HEIGHT (f) = 0;
 
   if (menubar_widget)
     {
@@ -1166,7 +1094,15 @@ free_frame_menubar (struct frame *f)
          if (x1 == 0 && y1 == 0)
            XtVaSetValues (f->output_data.x->widget, XtNx, x0, XtNy, y0, NULL);
 #endif
-         x_set_window_size (f, 0, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f), 1);
+         adjust_frame_size (f, FRAME_TEXT_WIDTH (f),
+                            FRAME_TEXT_HEIGHT (f), 2, 0);
+         /*
+           if (frame_inhibit_resize (f, 0))
+           change_frame_size (f, 0, 0, 0, 0, 0, 1);
+         else
+           x_set_window_size (f, 0, FRAME_TEXT_WIDTH (f),
+           FRAME_TEXT_HEIGHT (f), 1);
+         */
        }
       unblock_input ();
     }
@@ -1175,16 +1111,17 @@ free_frame_menubar (struct frame *f)
 
 #endif /* USE_X_TOOLKIT || USE_GTK */
 \f
-/* xmenu_show actually displays a menu using the panes and items in menu_items
+/* x_menu_show actually displays a menu using the panes and items in menu_items
    and returns the value selected from it.
-   There are two versions of xmenu_show, one for Xt and one for Xlib.
+   There are two versions of x_menu_show, one for Xt and one for Xlib.
    Both assume input is blocked by the caller.  */
 
 /* F is the frame the menu is for.
    X and Y are the frame-relative specified position,
    relative to the inside upper left corner of the frame F.
-   FOR_CLICK is true if this menu was invoked for a mouse click.
-   KEYMAPS is true if this menu was specified with keymaps;
+   Bitfield MENUFLAGS bits are:
+   MENU_FOR_CLICK is set if this menu was invoked for a mouse click.
+   MENU_KEYMAPS is set if this menu was specified with keymaps;
     in that case, we return a list containing the chosen item's value
     and perhaps also the pane's prefix.
    TITLE is the specified menu title.
@@ -1339,8 +1276,8 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv,
 /* We need a unique id for each widget handled by the Lucid Widget
    library.
 
-   For the main windows, and popup menus, we use this counter,
-   which we increment each time after use.  This starts from 1<<16.
+   For the main windows, and popup menus, we use this counter, which we
+   increment each time after use.  This starts from WIDGET_ID_TICK_START.
 
    For menu bars, we use numbers starting at 0, counted in
    next_menubar_widget_id.  */
@@ -1352,17 +1289,13 @@ popup_selection_callback (Widget widget, LWLIB_ID id, XtPointer client_data)
   menu_item_selection = client_data;
 }
 
-/* ARG is the LWLIB ID of the dialog box, represented
-   as a Lisp object as (HIGHPART . LOWPART).  */
+/* ID is the LWLIB ID of the dialog box.  */
 
 static void
-pop_down_menu (Lisp_Object arg)
+pop_down_menu (int id)
 {
-  LWLIB_ID id = (XINT (XCAR (arg)) << 4 * sizeof (LWLIB_ID)
-                 | XINT (XCDR (arg)));
-
   block_input ();
-  lw_destroy_all_widgets (id);
+  lw_destroy_all_widgets ((LWLIB_ID) id);
   unblock_input ();
   popup_activated_flag = 0;
 }
@@ -1428,11 +1361,9 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv,
   x_activate_timeout_atimer ();
 
   {
-    int fact = 4 * sizeof (LWLIB_ID);
     ptrdiff_t specpdl_count = SPECPDL_INDEX ();
-    record_unwind_protect (pop_down_menu,
-                           Fcons (make_number (menu_id >> (fact)),
-                                  make_number (menu_id & ~(-1 << (fact)))));
+
+    record_unwind_protect_int (pop_down_menu, (int) menu_id);
 
     /* Process events that apply to the menu.  */
     popup_get_selection (0, FRAME_DISPLAY_INFO (f), menu_id, 1);
@@ -1450,8 +1381,8 @@ cleanup_widget_value_tree (void *arg)
 }
 
 Lisp_Object
-xmenu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
-           Lisp_Object title, const char **error_name)
+x_menu_show (struct frame *f, int x, int y, int menuflags,
+            Lisp_Object title, const char **error_name)
 {
   int i;
   widget_value *wv, *save_wv = 0, *first_wv = 0, *prev_wv = 0;
@@ -1479,12 +1410,8 @@ xmenu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
 
   /* Create a tree of widget_value objects
      representing the panes and their items.  */
-  wv = xmalloc_widget_value ();
-  wv->name = "menu";
-  wv->value = 0;
-  wv->enabled = 1;
+  wv = make_widget_value ("menu", NULL, true, Qnil);
   wv->button_type = BUTTON_TYPE_NONE;
-  wv->help =Qnil;
   first_wv = wv;
   first_pane = 1;
 
@@ -1540,20 +1467,16 @@ xmenu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
          /* If the pane has a meaningful name,
             make the pane a top-level menu item
             with its items as a submenu beneath it.  */
-         if (!keymaps && strcmp (pane_string, ""))
+         if (!(menuflags & MENU_KEYMAPS) && strcmp (pane_string, ""))
            {
-             wv = xmalloc_widget_value ();
+             wv = make_widget_value (pane_string, NULL, true, Qnil);
              if (save_wv)
                save_wv->next = wv;
              else
                first_wv->contents = wv;
-             wv->name = (char *) pane_string;
-             if (keymaps && !NILP (prefix))
+             if ((menuflags & MENU_KEYMAPS) && !NILP (prefix))
                wv->name++;
-             wv->value = 0;
-             wv->enabled = 1;
              wv->button_type = BUTTON_TYPE_NONE;
-             wv->help = Qnil;
              save_wv = wv;
              prev_wv = 0;
            }
@@ -1591,20 +1514,18 @@ xmenu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
            }
 #endif /* not HAVE_MULTILINGUAL_MENU */
 
-         wv = xmalloc_widget_value ();
+         wv = make_widget_value (SSDATA (item_name), NULL, !NILP (enable),
+                                 STRINGP (help) ? help : Qnil);
          if (prev_wv)
            prev_wv->next = wv;
          else
            save_wv->contents = wv;
-         wv->name = SSDATA (item_name);
          if (!NILP (descrip))
            wv->key = SSDATA (descrip);
-         wv->value = 0;
          /* If this item has a null value,
             make the call_data null so that it won't display a box
             when the mouse is on it.  */
          wv->call_data = !NILP (def) ? aref_addr (menu_items, i) : 0;
-         wv->enabled = !NILP (enable);
 
          if (NILP (type))
            wv->button_type = BUTTON_TYPE_NONE;
@@ -1617,11 +1538,6 @@ xmenu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
 
          wv->selected = !NILP (selected);
 
-          if (! STRINGP (help))
-           help = Qnil;
-
-         wv->help = help;
-
          prev_wv = wv;
 
          i += MENU_ITEMS_ITEM_LENGTH;
@@ -1631,27 +1547,20 @@ xmenu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
   /* Deal with the title, if it is non-nil.  */
   if (!NILP (title))
     {
-      widget_value *wv_title = xmalloc_widget_value ();
-      widget_value *wv_sep1 = xmalloc_widget_value ();
-      widget_value *wv_sep2 = xmalloc_widget_value ();
+      widget_value *wv_title;
+      widget_value *wv_sep1 = make_widget_value ("--", NULL, false, Qnil);
+      widget_value *wv_sep2 = make_widget_value ("--", NULL, false, Qnil);
 
-      wv_sep2->name = "--";
       wv_sep2->next = first_wv->contents;
-      wv_sep2->help = Qnil;
-
-      wv_sep1->name = "--";
       wv_sep1->next = wv_sep2;
-      wv_sep1->help = Qnil;
 
 #ifndef HAVE_MULTILINGUAL_MENU
       if (STRING_MULTIBYTE (title))
        title = ENCODE_MENU_STRING (title);
 #endif
 
-      wv_title->name = SSDATA (title);
-      wv_title->enabled = true;
+      wv_title = make_widget_value (SSDATA (title), NULL, true, Qnil);
       wv_title->button_type = BUTTON_TYPE_NONE;
-      wv_title->help = Qnil;
       wv_title->next = wv_sep1;
       first_wv->contents = wv_title;
     }
@@ -1664,7 +1573,8 @@ xmenu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
   record_unwind_protect_ptr (cleanup_widget_value_tree, first_wv);
 
   /* Actually create and show the menu until popped down.  */
-  create_and_show_popup_menu (f, first_wv, x, y, for_click);
+  create_and_show_popup_menu (f, first_wv, x, y,
+                             menuflags & MENU_FOR_CLICK);
 
   unbind_to (specpdl_count, Qnil);
 
@@ -1705,7 +1615,7 @@ xmenu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
                = AREF (menu_items, i + MENU_ITEMS_ITEM_VALUE);
              if (menu_item_selection == aref_addr (menu_items, i))
                {
-                 if (keymaps)
+                 if (menuflags & MENU_KEYMAPS)
                    {
                      int j;
 
@@ -1723,7 +1633,7 @@ xmenu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
            }
        }
     }
-  else if (!for_click)
+  else if (!(menuflags & MENU_FOR_CLICK))
     {
       unblock_input ();
       /* Make "Cancel" equivalent to C-g.  */
@@ -1819,12 +1729,10 @@ create_and_show_dialog (struct frame *f, widget_value *first_wv)
      Also handle timers.  */
   {
     ptrdiff_t count = SPECPDL_INDEX ();
-    int fact = 4 * sizeof (LWLIB_ID);
 
     /* xdialog_show_unwind is responsible for popping the dialog box down.  */
-    record_unwind_protect (pop_down_menu,
-                           Fcons (make_number (dialog_id >> (fact)),
-                                  make_number (dialog_id & ~(-1 << (fact)))));
+
+    record_unwind_protect_int (pop_down_menu, (int) dialog_id);
 
     popup_get_selection (0, FRAME_DISPLAY_INFO (f), dialog_id, 1);
 
@@ -1839,11 +1747,8 @@ static const char * button_names [] = {
   "button6", "button7", "button8", "button9", "button10" };
 
 static Lisp_Object
-xdialog_show (struct frame *f,
-              bool keymaps,
-              Lisp_Object title,
-              Lisp_Object header,
-              const char **error_name)
+x_dialog_show (struct frame *f, Lisp_Object title,
+              Lisp_Object header, const char **error_name)
 {
   int i, nb_buttons=0;
   char dialog_name[6];
@@ -1870,19 +1775,12 @@ xdialog_show (struct frame *f,
   /* Create a tree of widget_value objects
      representing the text label and buttons.  */
   {
-    Lisp_Object pane_name, prefix;
+    Lisp_Object pane_name;
     const char *pane_string;
     pane_name = AREF (menu_items, MENU_ITEMS_PANE_NAME);
-    prefix = AREF (menu_items, MENU_ITEMS_PANE_PREFIX);
     pane_string = (NILP (pane_name)
                   ? "" : SSDATA (pane_name));
-    prev_wv = xmalloc_widget_value ();
-    prev_wv->value = (char *) pane_string;
-    if (keymaps && !NILP (prefix))
-      prev_wv->name++;
-    prev_wv->enabled = 1;
-    prev_wv->name = "message";
-    prev_wv->help = Qnil;
+    prev_wv = make_widget_value ("message", (char *) pane_string, true, Qnil);
     first_wv = prev_wv;
 
     /* Loop over all panes and items, filling in the tree.  */
@@ -1918,15 +1816,13 @@ xdialog_show (struct frame *f,
            return Qnil;
          }
 
-       wv = xmalloc_widget_value ();
+       wv = make_widget_value (button_names[nb_buttons],
+                               SSDATA (item_name),
+                               !NILP (enable), Qnil);
        prev_wv->next = wv;
-       wv->name = (char *) button_names[nb_buttons];
        if (!NILP (descrip))
          wv->key = SSDATA (descrip);
-       wv->value = SSDATA (item_name);
        wv->call_data = aref_addr (menu_items, i);
-       wv->enabled = !NILP (enable);
-       wv->help = Qnil;
        prev_wv = wv;
 
        if (! boundary_seen)
@@ -1941,9 +1837,7 @@ xdialog_show (struct frame *f,
     if (! boundary_seen)
       left_count = nb_buttons - nb_buttons / 2;
 
-    wv = xmalloc_widget_value ();
-    wv->name = dialog_name;
-    wv->help = Qnil;
+    wv = make_widget_value (dialog_name, NULL, false, Qnil);
 
     /*  Frame title: 'Q' = Question, 'I' = Information.
         Can also have 'E' = Error if, one day, we want
@@ -1982,20 +1876,13 @@ xdialog_show (struct frame *f,
      the proper value.  */
   if (menu_item_selection != 0)
     {
-      Lisp_Object prefix;
-
-      prefix = Qnil;
       i = 0;
       while (i < menu_items_used)
        {
          Lisp_Object entry;
 
          if (EQ (AREF (menu_items, i), Qt))
-           {
-             prefix
-               = AREF (menu_items, i + MENU_ITEMS_PANE_PREFIX);
-             i += MENU_ITEMS_PANE_LENGTH;
-           }
+           i += MENU_ITEMS_PANE_LENGTH;
          else if (EQ (AREF (menu_items, i), Qquote))
            {
              /* This is the boundary between left-side elts and
@@ -2007,15 +1894,7 @@ xdialog_show (struct frame *f,
              entry
                = AREF (menu_items, i + MENU_ITEMS_ITEM_VALUE);
              if (menu_item_selection == aref_addr (menu_items, i))
-               {
-                 if (keymaps != 0)
-                   {
-                     entry = list1 (entry);
-                     if (!NILP (prefix))
-                       entry = Fcons (prefix, entry);
-                   }
-                 return entry;
-               }
+               return entry;
              i += MENU_ITEMS_ITEM_LENGTH;
            }
        }
@@ -2052,7 +1931,7 @@ xw_popup_dialog (struct frame *f, Lisp_Object header, Lisp_Object contents)
 
   /* Display them in a dialog box.  */
   block_input ();
-  selection = xdialog_show (f, 0, title, header, &error_name);
+  selection = x_dialog_show (f, title, header, &error_name);
   unblock_input ();
 
   unbind_to (specpdl_count, Qnil);
@@ -2090,7 +1969,7 @@ menu_help_callback (char const *help_string, int pane, int item)
   if (EQ (first_item[0], Qt))
     pane_name = first_item[MENU_ITEMS_PANE_NAME];
   else if (EQ (first_item[0], Qquote))
-    /* This shouldn't happen, see xmenu_show.  */
+    /* This shouldn't happen, see x_menu_show.  */
     pane_name = empty_unibyte_string;
   else
     pane_name = first_item[MENU_ITEMS_ITEM_NAME];
@@ -2132,13 +2011,14 @@ pop_down_menu (Lisp_Object arg)
 
 
 Lisp_Object
-xmenu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
-           Lisp_Object title, const char **error_name)
+x_menu_show (struct frame *f, int x, int y, int menuflags,
+            Lisp_Object title, const char **error_name)
 {
   Window root;
   XMenu *menu;
   int pane, selidx, lpane, status;
-  Lisp_Object entry, pane_prefix;
+  Lisp_Object entry = Qnil;
+  Lisp_Object pane_prefix;
   char *datap;
   int ulx, uly, width, height;
   int dispwidth, dispheight;
@@ -2160,6 +2040,7 @@ xmenu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
       return Qnil;
     }
 
+  USE_SAFE_ALLOCA;
   block_input ();
 
   /* Figure out which root window F is on.  */
@@ -2172,8 +2053,7 @@ xmenu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
   if (menu == NULL)
     {
       *error_name = "Can't create menu";
-      unblock_input ();
-      return Qnil;
+      goto return_entry;
     }
 
   /* Don't GC while we prepare and show the menu,
@@ -2208,7 +2088,7 @@ xmenu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
          prefix = AREF (menu_items, i + MENU_ITEMS_PANE_PREFIX);
          pane_string = (NILP (pane_name)
                         ? "" : SSDATA (pane_name));
-         if (keymaps && !NILP (prefix))
+         if ((menuflags & MENU_KEYMAPS) && !NILP (prefix))
            pane_string++;
 
          lpane = XMenuAddPane (FRAME_X_DISPLAY (f), menu, pane_string, TRUE);
@@ -2216,8 +2096,7 @@ xmenu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
            {
              XMenuDestroy (FRAME_X_DISPLAY (f), menu);
              *error_name = "Can't create pane";
-             unblock_input ();
-             return Qnil;
+             goto return_entry;
            }
          i += MENU_ITEMS_PANE_LENGTH;
 
@@ -2261,9 +2140,7 @@ xmenu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
 
          if (!NILP (descrip))
            {
-             /* if alloca is fast, use that to make the space,
-                to reduce gc needs.  */
-             item_data = alloca (maxwidth + SBYTES (descrip) + 1);
+             item_data = SAFE_ALLOCA (maxwidth + SBYTES (descrip) + 1);
              memcpy (item_data, SSDATA (item_name), SBYTES (item_name));
              for (j = SCHARS (item_name); j < maxwidth; j++)
                item_data[j] = ' ';
@@ -2281,8 +2158,7 @@ xmenu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
            {
              XMenuDestroy (FRAME_X_DISPLAY (f), menu);
              *error_name = "Can't add selection to menu";
-             unblock_input ();
-             return Qnil;
+             goto return_entry;
            }
          i += MENU_ITEMS_ITEM_LENGTH;
           lines++;
@@ -2331,7 +2207,7 @@ xmenu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
   if (ulx < 0) x -= ulx;
   if (uly < 0) y -= uly;
 
-  if (! for_click)
+  if (!(menuflags & MENU_FOR_CLICK))
     {
       /* If position was not given by a mouse click, adjust so upper left
          corner of the menu as a whole ends up at given coordinates.  This
@@ -2356,7 +2232,7 @@ xmenu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
   status = XMenuActivate (FRAME_X_DISPLAY (f), menu, &pane, &selidx,
                           x, y, ButtonReleaseMask, &datap,
                           menu_help_callback);
-  entry = pane_prefix = Qnil;
+  pane_prefix = Qnil;
 
   switch (status)
     {
@@ -2385,7 +2261,7 @@ xmenu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
                    {
                      entry
                        = AREF (menu_items, i + MENU_ITEMS_ITEM_VALUE);
-                     if (keymaps)
+                     if (menuflags & MENU_KEYMAPS)
                        {
                          entry = list1 (entry);
                          if (!NILP (pane_prefix))
@@ -2407,7 +2283,7 @@ xmenu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
     case XM_NO_SELECT:
       /* Make "Cancel" equivalent to C-g unless FOR_CLICK (which means
         the menu was invoked with a mouse event as POSITION).  */
-      if (! for_click)
+      if (!(menuflags & MENU_FOR_CLICK))
        {
          unblock_input ();
          Fsignal (Qquit, Qnil);
@@ -2415,10 +2291,10 @@ xmenu_show (struct frame *f, int x, int y, bool for_click, bool keymaps,
       break;
     }
 
+ return_entry:
   unblock_input ();
-  unbind_to (specpdl_count, Qnil);
-
-  return entry;
+  SAFE_FREE ();
+  return unbind_to (specpdl_count, entry);
 }
 
 #endif /* not USE_X_TOOLKIT */
@@ -2446,13 +2322,13 @@ DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_
 void
 syms_of_xmenu (void)
 {
-  DEFSYM (Qdebug_on_next_call, "debug-on-next-call");
-
 #ifdef USE_X_TOOLKIT
-  widget_id_tick = (1<<16);
+  enum { WIDGET_ID_TICK_START = 1 << 16 };
+  widget_id_tick = WIDGET_ID_TICK_START;
   next_menubar_widget_id = 1;
 #endif
 
+  DEFSYM (Qdebug_on_next_call, "debug-on-next-call");
   defsubr (&Smenu_or_popup_active_p);
 
 #if defined (USE_GTK) || defined (USE_X_TOOLKIT)
index 107a8fca4e1c80ae3c5a1e0ea5158ccbbc67f6db..32ad3c7f01e65caaca4376dcc358565b4d10d684 100644 (file)
@@ -452,6 +452,10 @@ x_load_resources (Display *display, const char *xrm_string,
   XrmPutLineResource (&rdb, line);
   sprintf (line, "%s*verticalScrollBar.troughColor: grey75", myclass);
   XrmPutLineResource (&rdb, line);
+  sprintf (line, "%s*horizontalScrollBar.background: grey75", myclass);
+  XrmPutLineResource (&rdb, line);
+  sprintf (line, "%s*horizontalScrollBar.troughColor: grey75", myclass);
+  XrmPutLineResource (&rdb, line);
   sprintf (line, "%s.dialog*.background: grey75", myclass);
   XrmPutLineResource (&rdb, line);
   sprintf (line, "%s*fsb.Text.background: white", myclass);
@@ -499,6 +503,8 @@ x_load_resources (Display *display, const char *xrm_string,
   XrmPutLineResource (&rdb, line);
   sprintf (line, "Emacs*verticalScrollBar.background: grey75");
   XrmPutLineResource (&rdb, line);
+  sprintf (line, "Emacs*horizontalScrollBar.background: grey75");
+  XrmPutLineResource (&rdb, line);
 
 #endif /* not USE_MOTIF */
 
index 28f2d770a7790757e80b0ab5af3350872b29204d..92e8982229378d984b145ddba1aadf94c6808e58 100644 (file)
@@ -53,15 +53,14 @@ static struct prop_location *expect_property_change (Display *, Window,
                                                      Atom, int);
 static void unexpect_property_change (struct prop_location *);
 static void wait_for_property_change (struct prop_location *);
-static Lisp_Object x_get_window_property_as_lisp_data (Display *,
+static Lisp_Object x_get_window_property_as_lisp_data (struct x_display_info *,
                                                        Window, Atom,
                                                        Lisp_Object, Atom);
-static Lisp_Object selection_data_to_lisp_data (Display *,
+static Lisp_Object selection_data_to_lisp_data (struct x_display_info *,
                                                const unsigned char *,
                                                ptrdiff_t, Atom, int);
-static void lisp_data_to_selection_data (Display *, Lisp_Object,
-                                         unsigned char **, Atom *,
-                                        ptrdiff_t *, int *, int *);
+static void lisp_data_to_selection_data (struct x_display_info *, Lisp_Object,
+                                        struct selection_data *);
 
 /* Printing traces to stderr.  */
 
@@ -97,13 +96,6 @@ static Lisp_Object Qx_lost_selection_functions, Qx_sent_selection_functions;
    is not necessarily sizeof (long).  */
 #define X_LONG_SIZE 4
 
-/* Extreme 'short' and 'long' values suitable for libX11.  */
-#define X_SHRT_MAX 0x7fff
-#define X_SHRT_MIN (-1 - X_SHRT_MAX)
-#define X_LONG_MAX 0x7fffffff
-#define X_LONG_MIN (-1 - X_LONG_MAX)
-#define X_ULONG_MAX 0xffffffffUL
-
 /* If this is a smaller number than the max-request-size of the display,
    emacs will use INCR selection transfer when the selection is larger
    than this.  The max-request-size is usually around 64k, so if you want
@@ -245,9 +237,8 @@ symbol_to_x_atom (struct x_display_info *dpyinfo, Lisp_Object sym)
    and calls to intern whenever possible.  */
 
 static Lisp_Object
-x_atom_to_symbol (Display *dpy, Atom atom)
+x_atom_to_symbol (struct x_display_info *dpyinfo, Atom atom)
 {
-  struct x_display_info *dpyinfo;
   char *str;
   Lisp_Object val;
 
@@ -268,7 +259,6 @@ x_atom_to_symbol (Display *dpy, Atom atom)
       return QATOM;
     }
 
-  dpyinfo = x_display_info_for_display (dpy);
   if (dpyinfo == NULL)
     return Qnil;
   if (atom == dpyinfo->Xatom_CLIPBOARD)
@@ -295,7 +285,7 @@ x_atom_to_symbol (Display *dpy, Atom atom)
     return QNULL;
 
   block_input ();
-  str = XGetAtomName (dpy, atom);
+  str = XGetAtomName (dpyinfo->display, atom);
   unblock_input ();
   TRACE1 ("XGetAtomName --> %s", str);
   if (! str) return Qnil;
@@ -458,7 +448,7 @@ x_decline_selection_request (struct input_event *event)
      died in the meantime.  Handle that case.  */
   block_input ();
   x_catch_errors (reply->display);
-  XSendEvent (reply->display, reply->requestor, False, 0L, &reply_base);
+  XSendEvent (reply->display, reply->requestor, False, 0, &reply_base);
   XFlush (reply->display);
   x_uncatch_errors ();
   unblock_input ();
@@ -632,7 +622,7 @@ x_reply_selection_request (struct input_event *event,
     }
 
   /* Now issue the SelectionNotify event.  */
-  XSendEvent (display, window, False, 0L, &reply_base);
+  XSendEvent (display, window, False, 0, &reply_base);
   XFlush (display);
 
 #ifdef TRACE_SELECTION
@@ -710,7 +700,7 @@ x_reply_selection_request (struct input_event *event,
           requestor that we're done.  */
        block_input ();
        if (! waiting_for_other_props_on_window (display, window))
-         XSelectInput (display, window, 0L);
+         XSelectInput (display, window, 0);
 
        TRACE1 ("Set %s to a 0-length chunk to indicate EOF",
                XGetAtomName (display, cs->property));
@@ -750,12 +740,11 @@ x_handle_selection_request (struct input_event *event)
   struct gcpro gcpro1, gcpro2;
   Time local_selection_time;
 
-  Display *display = SELECTION_EVENT_DISPLAY (event);
-  struct x_display_info *dpyinfo = x_display_info_for_display (display);
+  struct x_display_info *dpyinfo = SELECTION_EVENT_DPYINFO (event);
   Atom selection = SELECTION_EVENT_SELECTION (event);
-  Lisp_Object selection_symbol = x_atom_to_symbol (display, selection);
+  Lisp_Object selection_symbol = x_atom_to_symbol (dpyinfo, selection);
   Atom target = SELECTION_EVENT_TARGET (event);
-  Lisp_Object target_symbol = x_atom_to_symbol (display, target);
+  Lisp_Object target_symbol = x_atom_to_symbol (dpyinfo, target);
   Atom property = SELECTION_EVENT_PROPERTY (event);
   Lisp_Object local_selection_data;
   int success = 0;
@@ -800,7 +789,7 @@ x_handle_selection_request (struct input_event *event)
 
       if (property == None) goto DONE;
       multprop
-       = x_get_window_property_as_lisp_data (display, requestor, property,
+       = x_get_window_property_as_lisp_data (dpyinfo, requestor, property,
                                              QMULTIPLE, selection);
 
       if (!VECTORP (multprop) || ASIZE (multprop) % 2)
@@ -904,11 +893,7 @@ x_convert_selection (struct input_event *event, Lisp_Object selection_symbol,
   cs->wait_object = NULL;
   cs->next = converted_selections;
   converted_selections = cs;
-  lisp_data_to_selection_data (SELECTION_EVENT_DISPLAY (event),
-                              lisp_selection,
-                              &(cs->data), &(cs->type),
-                              &(cs->size), &(cs->format),
-                              &(cs->nofree));
+  lisp_data_to_selection_data (dpyinfo, lisp_selection, cs);
   UNGCPRO;
   return 1;
 }
@@ -920,20 +905,19 @@ x_convert_selection (struct input_event *event, Lisp_Object selection_symbol,
 static void
 x_handle_selection_clear (struct input_event *event)
 {
-  Display *display = SELECTION_EVENT_DISPLAY (event);
   Atom selection = SELECTION_EVENT_SELECTION (event);
   Time changed_owner_time = SELECTION_EVENT_TIME (event);
 
   Lisp_Object selection_symbol, local_selection_data;
   Time local_selection_time;
-  struct x_display_info *dpyinfo = x_display_info_for_display (display);
+  struct x_display_info *dpyinfo = SELECTION_EVENT_DPYINFO (event);
   Lisp_Object Vselection_alist;
 
   TRACE0 ("x_handle_selection_clear");
 
   if (!dpyinfo) return;
 
-  selection_symbol = x_atom_to_symbol (display, selection);
+  selection_symbol = x_atom_to_symbol (dpyinfo, selection);
   local_selection_data = LOCAL_SELECTION (selection_symbol, dpyinfo);
 
   /* Well, we already believe that we don't own it, so that's just fine.  */
@@ -1070,20 +1054,18 @@ expect_property_change (Display *display, Window window,
 static void
 unexpect_property_change (struct prop_location *location)
 {
-  struct prop_location *prev = 0, *rest = property_change_wait_list;
-  while (rest)
+  struct prop_location *prop, **pprev = &property_change_wait_list;
+
+  for (prop = property_change_wait_list; prop; prop = *pprev)
     {
-      if (rest == location)
+      if (prop == location)
        {
-         if (prev)
-           prev->next = rest->next;
-         else
-           property_change_wait_list = rest->next;
-         xfree (rest);
-         return;
+         *pprev = prop->next;
+         xfree (prop);
+         break;
        }
-      prev = rest;
-      rest = rest->next;
+      else
+       pprev = &prop->next;
     }
 }
 
@@ -1245,7 +1227,7 @@ x_get_foreign_selection (Lisp_Object selection_symbol, Lisp_Object target_type,
 
   /* Otherwise, the selection is waiting for us on the requested property.  */
   return
-    x_get_window_property_as_lisp_data (display, requestor_window,
+    x_get_window_property_as_lisp_data (dpyinfo, requestor_window,
                                        target_property, target_type,
                                        selection_atom);
 }
@@ -1283,7 +1265,7 @@ x_get_window_property (Display *display, Window window, Atom property,
 
   /* First probe the thing to find out how big it is.  */
   result = XGetWindowProperty (display, window, property,
-                              0L, 0L, False, AnyPropertyType,
+                              0, 0, False, AnyPropertyType,
                               actual_type_ret, actual_format_ret,
                               actual_size_ret,
                               &bytes_remaining, &tmp_data);
@@ -1299,9 +1281,7 @@ x_get_window_property (Display *display, Window window, Atom property,
   if (total_size_max < bytes_remaining)
     goto size_overflow;
   total_size = bytes_remaining;
-  data = malloc (total_size + 1);
-  if (! data)
-    goto memory_exhausted;
+  data = xmalloc (total_size + 1);
 
   /* Now read, until we've gotten it all.  */
   while (bytes_remaining)
@@ -1352,9 +1332,7 @@ x_get_window_property (Display *display, Window window, Atom property,
          if (remaining_lim < 0 || remaining_lim < bytes_remaining)
            goto size_overflow;
          total_size = offset + bytes_gotten + bytes_remaining;
-         data1 = realloc (data, total_size + 1);
-         if (! data1)
-           goto memory_exhausted;
+         data1 = xrealloc (data, total_size + 1);
          data = data1;
        }
 
@@ -1386,20 +1364,17 @@ x_get_window_property (Display *display, Window window, Atom property,
   return;
 
  size_overflow:
-  free (data);
+  if (data)
+    xfree (data);
   unblock_input ();
   memory_full (SIZE_MAX);
-
- memory_exhausted:
-  free (data);
-  unblock_input ();
-  memory_full (total_size + 1);
 }
 \f
 /* Use xfree, not XFree, to free the data obtained with this function.  */
 
 static void
-receive_incremental_selection (Display *display, Window window, Atom property,
+receive_incremental_selection (struct x_display_info *dpyinfo,
+                              Window window, Atom property,
                               Lisp_Object target_type,
                               unsigned int min_size_bytes,
                               unsigned char **data_ret,
@@ -1409,6 +1384,8 @@ receive_incremental_selection (Display *display, Window window, Atom property,
 {
   ptrdiff_t offset = 0;
   struct prop_location *wait_object;
+  Display *display = dpyinfo->display;
+
   if (min (PTRDIFF_MAX, SIZE_MAX) < min_size_bytes)
     memory_full (SIZE_MAX);
   *data_ret = xmalloc (min_size_bytes);
@@ -1427,10 +1404,10 @@ receive_incremental_selection (Display *display, Window window, Atom property,
   block_input ();
   XSelectInput (display, window, STANDARD_EVENT_SET | PropertyChangeMask);
   TRACE1 ("  Delete property %s",
-         SDATA (SYMBOL_NAME (x_atom_to_symbol (display, property))));
+         SDATA (SYMBOL_NAME (x_atom_to_symbol (dpyinfo, property))));
   XDeleteProperty (display, window, property);
   TRACE1 ("  Expect new value of property %s",
-         SDATA (SYMBOL_NAME (x_atom_to_symbol (display, property))));
+         SDATA (SYMBOL_NAME (x_atom_to_symbol (dpyinfo, property))));
   wait_object = expect_property_change (display, window, property,
                                        PropertyNewValue);
   XFlush (display);
@@ -1495,8 +1472,8 @@ receive_incremental_selection (Display *display, Window window, Atom property,
    if this fails.  */
 
 static Lisp_Object
-x_get_window_property_as_lisp_data (Display *display, Window window,
-                                   Atom property,
+x_get_window_property_as_lisp_data (struct x_display_info *dpyinfo,
+                                   Window window, Atom property,
                                    Lisp_Object target_type,
                                    Atom selection_atom)
 {
@@ -1506,7 +1483,7 @@ x_get_window_property_as_lisp_data (Display *display, Window window,
   unsigned char *data = 0;
   ptrdiff_t bytes = 0;
   Lisp_Object val;
-  struct x_display_info *dpyinfo = x_display_info_for_display (display);
+  Display *display = dpyinfo->display;
 
   TRACE0 ("Reading selection data");
 
@@ -1523,11 +1500,11 @@ x_get_window_property_as_lisp_data (Display *display, Window window,
        signal_error ("Selection owner couldn't convert",
                      actual_type
                      ? list2 (target_type,
-                              x_atom_to_symbol (display, actual_type))
+                              x_atom_to_symbol (dpyinfo, actual_type))
                      : target_type);
       else
        signal_error ("No selection",
-                     x_atom_to_symbol (display, selection_atom));
+                     x_atom_to_symbol (dpyinfo, selection_atom));
     }
 
   if (actual_type == dpyinfo->Xatom_INCR)
@@ -1540,7 +1517,7 @@ x_get_window_property_as_lisp_data (Display *display, Window window,
         calls xmalloc itself.  */
       xfree (data);
       unblock_input ();
-      receive_incremental_selection (display, window, property, target_type,
+      receive_incremental_selection (dpyinfo, window, property, target_type,
                                     min_size_bytes, &data, &bytes,
                                     &actual_type, &actual_format,
                                     &actual_size);
@@ -1554,7 +1531,7 @@ x_get_window_property_as_lisp_data (Display *display, Window window,
 
   /* It's been read.  Now convert it to a lisp object in some semi-rational
      manner.  */
-  val = selection_data_to_lisp_data (display, data, bytes,
+  val = selection_data_to_lisp_data (dpyinfo, data, bytes,
                                     actual_type, actual_format);
 
   /* Use xfree, not XFree, because x_get_window_property
@@ -1595,11 +1572,10 @@ x_get_window_property_as_lisp_data (Display *display, Window window,
 
 
 static Lisp_Object
-selection_data_to_lisp_data (Display *display, const unsigned char *data,
+selection_data_to_lisp_data (struct x_display_info *dpyinfo,
+                            const unsigned char *data,
                             ptrdiff_t size, Atom type, int format)
 {
-  struct x_display_info *dpyinfo = x_display_info_for_display (display);
-
   if (type == dpyinfo->Xatom_NULL)
     return QNULL;
 
@@ -1637,13 +1613,13 @@ selection_data_to_lisp_data (Display *display, const unsigned char *data,
       int *idata = (int *) data;
 
       if (size == sizeof (int))
-       return x_atom_to_symbol (display, (Atom) idata[0]);
+       return x_atom_to_symbol (dpyinfo, (Atom) idata[0]);
       else
        {
          Lisp_Object v = make_uninit_vector (size / sizeof (int));
 
          for (i = 0; i < size / sizeof (int); i++)
-           ASET (v, i, x_atom_to_symbol (display, (Atom) idata[i]));
+           ASET (v, i, x_atom_to_symbol (dpyinfo, (Atom) idata[i]));
          return v;
        }
     }
@@ -1705,15 +1681,13 @@ cons_to_x_long (Lisp_Object obj)
 /* Use xfree, not XFree, to free the data obtained with this function.  */
 
 static void
-lisp_data_to_selection_data (Display *display, Lisp_Object obj,
-                            unsigned char **data_ret, Atom *type_ret,
-                            ptrdiff_t *size_ret,
-                            int *format_ret, int *nofree_ret)
+lisp_data_to_selection_data (struct x_display_info *dpyinfo,
+                            Lisp_Object obj, struct selection_data *cs)
 {
   Lisp_Object type = Qnil;
-  struct x_display_info *dpyinfo = x_display_info_for_display (display);
 
-  *nofree_ret = 0;
+  eassert (cs != NULL);
+  cs->nofree = 0;
 
   if (CONSP (obj) && SYMBOLP (XCAR (obj)))
     {
@@ -1725,9 +1699,9 @@ lisp_data_to_selection_data (Display *display, Lisp_Object obj,
 
   if (EQ (obj, QNULL) || (EQ (type, QNULL)))
     {                          /* This is not the same as declining */
-      *format_ret = 32;
-      *size_ret = 0;
-      *data_ret = 0;
+      cs->format = 32;
+      cs->size = 0;
+      cs->data = NULL;
       type = QNULL;
     }
   else if (STRINGP (obj))
@@ -1737,19 +1711,19 @@ lisp_data_to_selection_data (Display *display, Lisp_Object obj,
        signal_error ("Non-ASCII string must be encoded in advance", obj);
       if (NILP (type))
        type = QSTRING;
-      *format_ret = 8;
-      *size_ret = SBYTES (obj);
-      *data_ret = SDATA (obj);
-      *nofree_ret = 1;
+      cs->format = 8;
+      cs->size = SBYTES (obj);
+      cs->data = SDATA (obj);
+      cs->nofree = 1;
     }
   else if (SYMBOLP (obj))
     {
       void *data = xmalloc (sizeof (Atom) + 1);
       Atom *x_atom_ptr = data;
-      *data_ret = data;
-      *format_ret = 32;
-      *size_ret = 1;
-      (*data_ret) [sizeof (Atom)] = 0;
+      cs->data = data;
+      cs->format = 32;
+      cs->size = 1;
+      cs->data[sizeof (Atom)] = 0;
       *x_atom_ptr = symbol_to_x_atom (dpyinfo, obj);
       if (NILP (type)) type = QATOM;
     }
@@ -1757,10 +1731,10 @@ lisp_data_to_selection_data (Display *display, Lisp_Object obj,
     {
       void *data = xmalloc (sizeof (short) + 1);
       short *short_ptr = data;
-      *data_ret = data;
-      *format_ret = 16;
-      *size_ret = 1;
-      (*data_ret) [sizeof (short)] = 0;
+      cs->data = data;
+      cs->format = 16;
+      cs->size = 1;
+      cs->data[sizeof (short)] = 0;
       *short_ptr = XINT (obj);
       if (NILP (type)) type = QINTEGER;
     }
@@ -1772,10 +1746,10 @@ lisp_data_to_selection_data (Display *display, Lisp_Object obj,
     {
       void *data = xmalloc (sizeof (unsigned long) + 1);
       unsigned long *x_long_ptr = data;
-      *data_ret = data;
-      *format_ret = 32;
-      *size_ret = 1;
-      (*data_ret) [sizeof (unsigned long)] = 0;
+      cs->data = data;
+      cs->format = 32;
+      cs->size = 1;
+      cs->data[sizeof (unsigned long)] = 0;
       *x_long_ptr = cons_to_x_long (obj);
       if (NILP (type)) type = QINTEGER;
     }
@@ -1798,10 +1772,10 @@ lisp_data_to_selection_data (Display *display, Lisp_Object obj,
            if (!SYMBOLP (AREF (obj, i)))
              signal_error ("All elements of selection vector must have same type", obj);
 
-         *data_ret = data = xnmalloc (size, sizeof *x_atoms);
+         cs->data = data = xnmalloc (size, sizeof *x_atoms);
          x_atoms = data;
-         *format_ret = 32;
-         *size_ret = size;
+         cs->format = 32;
+         cs->size = size;
          for (i = 0; i < size; i++)
            x_atoms[i] = symbol_to_x_atom (dpyinfo, AREF (obj, i));
        }
@@ -1827,11 +1801,11 @@ lisp_data_to_selection_data (Display *display, Lisp_Object obj,
                  break;
                }
            }
-         *data_ret = data = xnmalloc (size, data_size);
+         cs->data = data = xnmalloc (size, data_size);
          x_atoms = data;
          shorts = data;
-         *format_ret = format;
-         *size_ret = size;
+         cs->format = format;
+         cs->size = size;
          for (i = 0; i < size; i++)
            {
              if (format == 32)
@@ -1844,7 +1818,7 @@ lisp_data_to_selection_data (Display *display, Lisp_Object obj,
   else
     signal_error (/* Qselection_error */ "Unrecognized selection data", obj);
 
-  *type_ret = symbol_to_x_atom (dpyinfo, type);
+  cs->type = symbol_to_x_atom (dpyinfo, type);
 }
 
 static Lisp_Object
@@ -1927,7 +1901,7 @@ frame_for_x_selection (Lisp_Object object)
     }
   else if (TERMINALP (object))
     {
-      struct terminal *t = get_terminal (object, 1);
+      struct terminal *t = decode_live_terminal (object);
 
       if (t->type == output_x_window)
        FOR_EACH_FRAME (tail, frame)
@@ -2077,7 +2051,7 @@ On MS-DOS, all this does is return non-nil if we own the selection.  */)
      the selection owner to None.  The NCD server does, the MIT Sun4 server
      doesn't.  So we synthesize one; this means we might get two, but
      that's ok, because the second one won't have any effect.  */
-  SELECTION_EVENT_DISPLAY (&event.sie) = dpyinfo->display;
+  SELECTION_EVENT_DPYINFO (&event.sie) = dpyinfo;
   SELECTION_EVENT_SELECTION (&event.sie) = selection_atom;
   SELECTION_EVENT_TIME (&event.sie) = timestamp;
   x_handle_selection_clear (&event.ie);
@@ -2178,11 +2152,9 @@ x_clipboard_manager_save (Lisp_Object frame)
 static Lisp_Object
 x_clipboard_manager_error_1 (Lisp_Object err)
 {
-  Lisp_Object args[2];
-  args[0] = build_string ("X clipboard manager error: %s\n\
+  AUTO_STRING (format, "X clipboard manager error: %s\n\
 If the problem persists, set `x-select-enable-clipboard-manager' to nil.");
-  args[1] = CAR (CDR (err));
-  Fmessage (2, args);
+  Fmessage (2, (Lisp_Object []) {format, CAR (CDR (err))});
   return Qnil;
 }
 
@@ -2249,10 +2221,8 @@ x_clipboard_manager_save_all (void)
       local_frame = XCAR (XCDR (XCDR (XCDR (local_selection))));
       if (FRAME_LIVE_P (XFRAME (local_frame)))
        {
-         Lisp_Object args[1];
-         args[0] = build_string ("Saving clipboard to X clipboard manager...");
-         Fmessage (1, args);
-
+         AUTO_STRING (saving, "Saving clipboard to X clipboard manager...");
+         Fmessage (1, &saving);
          internal_condition_case_1 (x_clipboard_manager_save, local_frame,
                                     Qt, x_clipboard_manager_error_2);
        }
@@ -2307,10 +2277,10 @@ x_check_property_data (Lisp_Object data)
 void
 x_fill_property_data (Display *dpy, Lisp_Object data, void *ret, int format)
 {
-  long val;
-  long  *d32 = (long  *) ret;
-  short *d16 = (short *) ret;
-  char  *d08 = (char  *) ret;
+  unsigned long val;
+  unsigned long  *d32 = (unsigned long  *) ret;
+  unsigned short *d16 = (unsigned short *) ret;
+  unsigned char  *d08 = (unsigned char  *) ret;
   Lisp_Object iter;
 
   for (iter = data; CONSP (iter); iter = XCDR (iter))
@@ -2318,11 +2288,26 @@ x_fill_property_data (Display *dpy, Lisp_Object data, void *ret, int format)
       Lisp_Object o = XCAR (iter);
 
       if (INTEGERP (o) || FLOATP (o) || CONSP (o))
-       val = cons_to_signed (o, LONG_MIN, LONG_MAX);
+        {
+          if (CONSP (o)
+             && RANGED_INTEGERP (X_LONG_MIN >> 16, XCAR (o), X_LONG_MAX >> 16)
+             && RANGED_INTEGERP (- (1 << 15), XCDR (o), -1))
+            {
+             /* cons_to_x_long does not handle negative values for v2.
+                 For XDnd, v2 might be y of a window, and can be negative.
+                 The XDnd spec. is not explicit about negative values,
+                 but let's assume negative v2 is sent modulo 2**16.  */
+             unsigned long v1 = XINT (XCAR (o)) & 0xffff;
+             unsigned long v2 = XINT (XCDR (o)) & 0xffff;
+             val = (v1 << 16) | v2;
+            }
+          else
+            val = cons_to_x_long (o);
+        }
       else if (STRINGP (o))
         {
           block_input ();
-          val = (long) XInternAtom (dpy, SSDATA (o), False);
+          val = XInternAtom (dpy, SSDATA (o), False);
           unblock_input ();
         }
       else
@@ -2330,17 +2315,15 @@ x_fill_property_data (Display *dpy, Lisp_Object data, void *ret, int format)
 
       if (format == 8)
        {
-         if (CHAR_MIN <= val && val <= CHAR_MAX)
-           *d08++ = val;
-         else
+         if ((1 << 8) < val && val <= X_ULONG_MAX - (1 << 7))
            error ("Out of 'char' range");
+         *d08++ = val;
        }
       else if (format == 16)
        {
-         if (SHRT_MIN <= val && val <= SHRT_MAX)
-           *d16++ = val;
-         else
+         if ((1 << 16) < val && val <= X_ULONG_MAX - (1 << 15))
            error ("Out of 'short' range");
+         *d16++ = val;
        }
       else
         *d32++ = val;
@@ -2369,45 +2352,8 @@ x_property_data_to_lisp (struct frame *f, const unsigned char *data,
   ptrdiff_t format_bytes = format >> 3;
   if (PTRDIFF_MAX / format_bytes < size)
     memory_full (SIZE_MAX);
-  return selection_data_to_lisp_data (FRAME_X_DISPLAY (f),
-                                     data, size * format_bytes, type, format);
-}
-
-/* Get the mouse position in frame relative coordinates.  */
-
-static void
-mouse_position_for_drop (struct frame *f, int *x, int *y)
-{
-  Window root, dummy_window;
-  int dummy;
-
-  block_input ();
-
-  XQueryPointer (FRAME_X_DISPLAY (f),
-                 DefaultRootWindow (FRAME_X_DISPLAY (f)),
-
-                 /* The root window which contains the pointer.  */
-                 &root,
-
-                 /* Window pointer is on, not used  */
-                 &dummy_window,
-
-                 /* The position on that root window.  */
-                 x, y,
-
-                 /* x/y in dummy_window coordinates, not used.  */
-                 &dummy, &dummy,
-
-                 /* Modifier keys and pointer buttons, about which
-                    we don't care.  */
-                 (unsigned int *) &dummy);
-
-
-  /* Absolute to relative.  */
-  *x -= f->left_pos + FRAME_OUTER_TO_INNER_DIFF_X (f);
-  *y -= f->top_pos + FRAME_OUTER_TO_INNER_DIFF_Y (f);
-
-  unblock_input ();
+  return selection_data_to_lisp_data (FRAME_DISPLAY_INFO (f), data,
+                                     size * format_bytes, type, format);
 }
 
 DEFUN ("x-get-atom-name", Fx_get_atom_name,
@@ -2519,7 +2465,7 @@ x_handle_dnd_message (struct frame *f, const XClientMessageEvent *event,
     }
 
   vec = Fmake_vector (make_number (4), Qnil);
-  ASET (vec, 0, SYMBOL_NAME (x_atom_to_symbol (FRAME_X_DISPLAY (f),
+  ASET (vec, 0, SYMBOL_NAME (x_atom_to_symbol (FRAME_DISPLAY_INFO (f),
                                               event->message_type)));
   ASET (vec, 1, frame);
   ASET (vec, 2, make_number (event->format));
@@ -2529,7 +2475,7 @@ x_handle_dnd_message (struct frame *f, const XClientMessageEvent *event,
                                         event->format,
                                         size));
 
-  mouse_position_for_drop (f, &x, &y);
+  x_relative_mouse_position (f, &x, &y);
   bufp->kind = DRAG_N_DROP_EVENT;
   bufp->frame_or_window = frame;
   bufp->timestamp = CurrentTime;
@@ -2683,12 +2629,14 @@ syms_of_xselect (void)
   converted_selections = NULL;
   conversion_fail_tag = None;
 
+  /* FIXME: Duplicate definition in nsselect.c.  */
   DEFVAR_LISP ("selection-converter-alist", Vselection_converter_alist,
               doc: /* An alist associating X Windows selection-types with functions.
 These functions are called to convert the selection, with three args:
 the name of the selection (typically `PRIMARY', `SECONDARY', or `CLIPBOARD');
 a desired type to which the selection should be converted;
-and the local selection value (whatever was given to `x-own-selection').
+and the local selection value (whatever was given to
+`x-own-selection-internal').
 
 The function should return the value to send to the X server
 \(typically a string).  A return value of nil
index 9a31f518f3086eb4fd1ac08561bad50870ee39ed..cd4f9ce57fa9d5aa008cf492399b73b3d10ac5bc 100644 (file)
@@ -49,7 +49,7 @@ static struct input_event emacs_event;
 
 /* The descriptor that we use to check for data from the session manager.  */
 
-static int ice_fd;
+static int ice_fd = -1;
 
 /* A flag that says if we are in shutdown interactions or not.  */
 
@@ -395,7 +395,7 @@ x_session_initialize (struct x_display_info *dpyinfo)
 {
 #define SM_ERRORSTRING_LEN 512
   char errorstring[SM_ERRORSTRING_LEN];
-  charprevious_id = NULL;
+  char *previous_id = NULL;
   SmcCallbacks callbacks;
   ptrdiff_t name_len = 0;
 
@@ -415,11 +415,11 @@ x_session_initialize (struct x_display_info *dpyinfo)
   /* This malloc will not be freed, but it is only done once, and hopefully
      not very large   */
   emacs_program = xmalloc (name_len + 1);
-  emacs_program[0] = '\0';
+  char *z = emacs_program;
 
   if (! EQ (Vinvocation_directory, Qnil))
-    strcpy (emacs_program, SSDATA (Vinvocation_directory));
-  strcat (emacs_program, SSDATA (Vinvocation_name));
+    z = lispstpcpy (z, Vinvocation_directory);
+  lispstpcpy (z, Vinvocation_name);
 
   /* The SM protocol says all callbacks are mandatory, so set up all
      here and in the mask passed to SmcOpenConnection.  */
index 717df452569b07de2f75531f2d185bf2e8c21458..f32aea031f91181603c677a0915e840e01bba890 100644 (file)
@@ -32,6 +32,16 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "xterm.h"
 #include <X11/cursorfont.h>
 
+/* If we have Xfixes extension, use it for pointer blanking.  */
+#ifdef HAVE_XFIXES
+#include <X11/extensions/Xfixes.h>
+#endif
+
+/* Using Xft implies that XRender is available.  */
+#ifdef HAVE_XFT
+#include <X11/extensions/Xrender.h>
+#endif
+
 /* Load sys/types.h if not already loaded.
    In some systems loading it twice is suicidal.  */
 #ifndef makedev
@@ -70,6 +80,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "xsettings.h"
 #include "xgselect.h"
 #include "sysselect.h"
+#include "menu.h"
 
 #ifdef USE_X_TOOLKIT
 #include <X11/Shell.h>
@@ -215,7 +226,6 @@ static void x_lower_frame (struct frame *);
 static const XColor *x_color_cells (Display *, int *);
 static int x_io_error_quitter (Display *);
 static struct terminal *x_create_terminal (struct x_display_info *);
-void x_delete_terminal (struct terminal *);
 static void x_update_end (struct frame *);
 static void XTframe_up_to_date (struct frame *);
 static void x_clear_frame (struct frame *);
@@ -236,11 +246,15 @@ static void x_clip_to_row (struct window *, struct glyph_row *,
 static void x_flush (struct frame *f);
 static void x_update_begin (struct frame *);
 static void x_update_window_begin (struct window *);
-static struct scroll_bar *x_window_to_scroll_bar (Display *, Window);
+static struct scroll_bar *x_window_to_scroll_bar (Display *, Window, int);
 static void x_scroll_bar_report_motion (struct frame **, Lisp_Object *,
                                         enum scroll_bar_part *,
                                         Lisp_Object *, Lisp_Object *,
                                         Time *);
+static void x_horizontal_scroll_bar_report_motion (struct frame **, Lisp_Object *,
+                                                  enum scroll_bar_part *,
+                                                  Lisp_Object *, Lisp_Object *,
+                                                  Time *);
 static int x_handle_net_wm_state (struct frame *, const XPropertyEvent *);
 static void x_check_fullscreen (struct frame *);
 static void x_check_expected_move (struct frame *, int, int);
@@ -258,6 +272,7 @@ static void x_wm_set_window_state (struct frame *, int);
 static void x_wm_set_icon_pixmap (struct frame *, ptrdiff_t);
 static void x_initialize (void);
 
+static int get_current_wm_state (struct frame *, Window, int *, int *);
 
 /* Flush display of frame F.  */
 
@@ -308,7 +323,7 @@ int event_record_index;
 void
 record_event (char *locus, int type)
 {
-  if (event_record_index == sizeof (event_record) / sizeof (struct record))
+  if (event_record_index == ARRAYELTS (event_record))
     event_record_index = 0;
 
   event_record[event_record_index].locus = locus;
@@ -348,8 +363,10 @@ x_find_topmost_parent (struct frame *f)
       unsigned int nchildren;
 
       win = wi;
-      XQueryTree (dpy, win, &root, &wi, &children, &nchildren);
-      XFree (children);
+      if (XQueryTree (dpy, win, &root, &wi, &children, &nchildren))
+       XFree (children);
+      else
+       break;
     }
 
   return win;
@@ -398,7 +415,7 @@ x_set_frame_alpha (struct frame *f)
   if (parent != None)
     XChangeProperty (dpy, parent, dpyinfo->Xatom_net_wm_window_opacity,
                      XA_CARDINAL, 32, PropModeReplace,
-                     (unsigned char *) &opac, 1L);
+                     (unsigned char *) &opac, 1);
 
   /* return unless necessary */
   {
@@ -408,7 +425,7 @@ x_set_frame_alpha (struct frame *f)
     unsigned long n, left;
 
     rc = XGetWindowProperty (dpy, win, dpyinfo->Xatom_net_wm_window_opacity,
-                            0L, 1L, False, XA_CARDINAL,
+                            0, 1, False, XA_CARDINAL,
                             &actual, &format, &n, &left,
                             &data);
 
@@ -426,23 +443,10 @@ x_set_frame_alpha (struct frame *f)
 
   XChangeProperty (dpy, win, dpyinfo->Xatom_net_wm_window_opacity,
                   XA_CARDINAL, 32, PropModeReplace,
-                  (unsigned char *) &opac, 1L);
+                  (unsigned char *) &opac, 1);
   x_uncatch_errors ();
 }
 
-int
-x_display_pixel_height (struct x_display_info *dpyinfo)
-{
-  return HeightOfScreen (dpyinfo->screen);
-}
-
-int
-x_display_pixel_width (struct x_display_info *dpyinfo)
-{
-  return WidthOfScreen (dpyinfo->screen);
-}
-
-\f
 /***********************************************************************
                    Starting and ending an update
  ***********************************************************************/
@@ -635,10 +639,8 @@ XTframe_up_to_date (struct frame *f)
 }
 
 
-/* Clear under internal border if any for non-toolkit builds. */
-
-
-#if !defined USE_X_TOOLKIT && !defined USE_GTK
+/* Clear under internal border if any (GTK has its own version). */
+#ifndef USE_GTK
 void
 x_clear_under_internal_border (struct frame *f)
 {
@@ -897,7 +899,7 @@ x_set_mouse_face_gc (struct glyph_string *s)
   else
     face_id = FACE_FOR_CHAR (s->f, face, 0, -1, Qnil);
   s->face = FACE_FROM_ID (s->f, face_id);
-  PREPARE_FACE_FOR_DISPLAY (s->f, s->face);
+  prepare_face_for_display (s->f, s->face);
 
   if (s->font == s->face->font)
     s->gc = s->face->gc;
@@ -945,7 +947,7 @@ x_set_mode_line_face_gc (struct glyph_string *s)
 static void
 x_set_glyph_string_gc (struct glyph_string *s)
 {
-  PREPARE_FACE_FOR_DISPLAY (s->f, s->face);
+  prepare_face_for_display (s->f, s->face);
 
   if (s->hl == DRAW_NORMAL_TEXT)
     {
@@ -974,10 +976,7 @@ x_set_glyph_string_gc (struct glyph_string *s)
       s->stippled_p = s->face->stipple != 0;
     }
   else
-    {
-      s->gc = s->face->gc;
-      s->stippled_p = s->face->stipple != 0;
-    }
+    emacs_abort ();
 
   /* GC must have been set.  */
   eassert (s->gc != 0);
@@ -2956,8 +2955,64 @@ x_clear_frame (struct frame *f)
   unblock_input ();
 }
 
+/* RIF: Show hourglass cursor on frame F.  */
+
+static void
+x_show_hourglass (struct frame *f)
+{
+  Display *dpy = FRAME_X_DISPLAY (f);
+
+  if (dpy)
+    {
+      struct x_output *x = FRAME_X_OUTPUT (f);
+#ifdef USE_X_TOOLKIT
+      if (x->widget)
+#else
+      if (FRAME_OUTER_WINDOW (f))
+#endif
+       {
+         x->hourglass_p = 1;
+
+         if (!x->hourglass_window)
+           {
+            unsigned long mask = CWCursor;
+            XSetWindowAttributes attrs;
+#ifdef USE_GTK
+             Window parent = FRAME_X_WINDOW (f);
+#else
+             Window parent = FRAME_OUTER_WINDOW (f);
+#endif
+            attrs.cursor = x->hourglass_cursor;
+
+             x->hourglass_window = XCreateWindow
+               (dpy, parent, 0, 0, 32000, 32000, 0, 0,
+                InputOnly, CopyFromParent, mask, &attrs);
+           }
+
+         XMapRaised (dpy, x->hourglass_window);
+         XFlush (dpy);
+       }
+    }
+}
+
+/* RIF: Cancel hourglass cursor on frame F.  */
+
+static void
+x_hide_hourglass (struct frame *f)
+{
+  struct x_output *x = FRAME_X_OUTPUT (f);
+
+  /* Watch out for newly created frames.  */
+  if (x->hourglass_window)
+    {
+      XUnmapWindow (FRAME_X_DISPLAY (f), x->hourglass_window);
+      /* Sync here because XTread_socket looks at the
+        hourglass_p flag that is reset to zero below.  */
+      XSync (FRAME_X_DISPLAY (f), False);
+      x->hourglass_p = 0;
+    }
+}
 
-\f
 /* Invert the middle quarter of the frame for .15 sec.  */
 
 static void
@@ -3105,16 +3160,7 @@ static void
 XTtoggle_invisible_pointer (struct frame *f, int invisible)
 {
   block_input ();
-  if (invisible)
-    {
-      if (FRAME_DISPLAY_INFO (f)->invisible_cursor != 0)
-        XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                       FRAME_DISPLAY_INFO (f)->invisible_cursor);
-    }
-  else
-    XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                   f->output_data.x->current_cursor);
-  f->pointer_invisible = invisible;
+  FRAME_DISPLAY_INFO (f)->toggle_visible_pointer (f, invisible);
   unblock_input ();
 }
 
@@ -3931,7 +3977,14 @@ XTmouse_position (struct frame **fp, int insist, Lisp_Object *bar_window,
   block_input ();
 
   if (dpyinfo->last_mouse_scroll_bar && insist == 0)
-    x_scroll_bar_report_motion (fp, bar_window, part, x, y, timestamp);
+    {
+      struct scroll_bar *bar = dpyinfo->last_mouse_scroll_bar;
+
+      if (bar->horizontal)
+       x_horizontal_scroll_bar_report_motion (fp, bar_window, part, x, y, timestamp);
+      else
+       x_scroll_bar_report_motion (fp, bar_window, part, x, y, timestamp);
+    }
   else
     {
       Window root;
@@ -4075,7 +4128,7 @@ XTmouse_position (struct frame **fp, int insist, Lisp_Object *bar_window,
          {
            struct scroll_bar *bar;
 
-            bar = x_window_to_scroll_bar (FRAME_X_DISPLAY (*fp), win);
+            bar = x_window_to_scroll_bar (FRAME_X_DISPLAY (*fp), win, 2);
 
            if (bar)
              {
@@ -4104,7 +4157,7 @@ XTmouse_position (struct frame **fp, int insist, Lisp_Object *bar_window,
            dpyinfo->last_mouse_glyph_frame = f1;
 
            *bar_window = Qnil;
-           *part = 0;
+           *part = scroll_bar_above_handle;
            *fp = f1;
            XSETINT (*x, win_x);
            XSETINT (*y, win_y);
@@ -4130,7 +4183,7 @@ XTmouse_position (struct frame **fp, int insist, Lisp_Object *bar_window,
    bits.  */
 
 static struct scroll_bar *
-x_window_to_scroll_bar (Display *display, Window window_id)
+x_window_to_scroll_bar (Display *display, Window window_id, int type)
 {
   Lisp_Object tail, frame;
 
@@ -4155,8 +4208,11 @@ x_window_to_scroll_bar (Display *display, Window window_id)
                               condemned = Qnil,
                               ! NILP (bar));
           bar = XSCROLL_BAR (bar)->next)
-       if (XSCROLL_BAR (bar)->x_window == window_id &&
-            FRAME_X_DISPLAY (XFRAME (frame)) == display)
+       if (XSCROLL_BAR (bar)->x_window == window_id
+            && FRAME_X_DISPLAY (XFRAME (frame)) == display
+           && (type = 2
+               || (type == 1 && XSCROLL_BAR (bar)->horizontal)
+               || (type == 0 && !XSCROLL_BAR (bar)->horizontal)))
          return XSCROLL_BAR (bar);
     }
 
@@ -4194,7 +4250,8 @@ x_window_to_menu_bar (Window window)
 
 #ifdef USE_TOOLKIT_SCROLL_BARS
 
-static void x_send_scroll_bar_event (Lisp_Object, int, int, int);
+static void x_send_scroll_bar_event (Lisp_Object, enum scroll_bar_part,
+                                    int, int, bool);
 
 /* Lisp window being scrolled.  Set when starting to interact with
    a toolkit scroll bar, reset to nil when ending the interaction.  */
@@ -4208,6 +4265,7 @@ static Lisp_Object window_being_scrolled;
 /* Id of action hook installed for scroll bars.  */
 
 static XtActionHookId action_hook_id;
+static XtActionHookId horizontal_action_hook_id;
 
 static Boolean xaw3d_arrow_scroll;
 
@@ -4245,7 +4303,7 @@ xt_action_hook (Widget widget, XtPointer client_data, String action_name,
       struct scroll_bar *bar;
 
       x_send_scroll_bar_event (window_being_scrolled,
-                              scroll_bar_end_scroll, 0, 0);
+                              scroll_bar_end_scroll, 0, 0, 0);
       w = XWINDOW (window_being_scrolled);
       bar = XSCROLL_BAR (w->vertical_scroll_bar);
 
@@ -4263,6 +4321,49 @@ xt_action_hook (Widget widget, XtPointer client_data, String action_name,
       toolkit_scroll_bar_interaction = 0;
     }
 }
+
+
+static void
+xt_horizontal_action_hook (Widget widget, XtPointer client_data, String action_name,
+                          XEvent *event, String *params, Cardinal *num_params)
+{
+  int scroll_bar_p;
+  const char *end_action;
+
+#ifdef USE_MOTIF
+  scroll_bar_p = XmIsScrollBar (widget);
+  end_action = "Release";
+#else /* !USE_MOTIF i.e. use Xaw */
+  scroll_bar_p = XtIsSubclass (widget, scrollbarWidgetClass);
+  end_action = "EndScroll";
+#endif /* USE_MOTIF */
+
+  if (scroll_bar_p
+      && strcmp (action_name, end_action) == 0
+      && WINDOWP (window_being_scrolled))
+    {
+      struct window *w;
+      struct scroll_bar *bar;
+
+      x_send_scroll_bar_event (window_being_scrolled,
+                              scroll_bar_end_scroll, 0, 0, 1);
+      w = XWINDOW (window_being_scrolled);
+      bar = XSCROLL_BAR (w->horizontal_scroll_bar);
+
+      if (bar->dragging != -1)
+       {
+         bar->dragging = -1;
+         /* The thumb size is incorrect while dragging: fix it.  */
+         set_horizontal_scroll_bar (w);
+       }
+      window_being_scrolled = Qnil;
+#if defined (USE_LUCID)
+      bar->last_seen_part = scroll_bar_nowhere;
+#endif
+      /* Xt timeouts no longer needed.  */
+      toolkit_scroll_bar_interaction = 0;
+    }
+}
 #endif /* not USE_GTK */
 
 /* Send a client message with message type Xatom_Scrollbar for a
@@ -4271,7 +4372,8 @@ xt_action_hook (Widget widget, XtPointer client_data, String action_name,
    amount to scroll of a whole of WHOLE.  */
 
 static void
-x_send_scroll_bar_event (Lisp_Object window, int part, int portion, int whole)
+x_send_scroll_bar_event (Lisp_Object window, enum scroll_bar_part part,
+                        int portion, int whole, bool horizontal)
 {
   XEvent event;
   XClientMessageEvent *ev = &event.xclient;
@@ -4286,7 +4388,9 @@ x_send_scroll_bar_event (Lisp_Object window, int part, int portion, int whole)
 
   /* Construct a ClientMessage event to send to the frame.  */
   ev->type = ClientMessage;
-  ev->message_type = FRAME_DISPLAY_INFO (f)->Xatom_Scrollbar;
+  ev->message_type = (horizontal
+                     ? FRAME_DISPLAY_INFO (f)->Xatom_Horizontal_Scrollbar
+                     : FRAME_DISPLAY_INFO (f)->Xatom_Scrollbar);
   ev->display = FRAME_X_DISPLAY (f);
   ev->window = FRAME_X_WINDOW (f);
   ev->format = 32;
@@ -4351,6 +4455,41 @@ x_scroll_bar_to_input_event (const XEvent *event,
   ievent->modifiers = 0;
 }
 
+/* Transform a horizontal scroll bar ClientMessage EVENT to an Emacs
+   input event in *IEVENT.  */
+
+static void
+x_horizontal_scroll_bar_to_input_event (const XEvent *event,
+                                       struct input_event *ievent)
+{
+  const XClientMessageEvent *ev = &event->xclient;
+  Lisp_Object window;
+  struct window *w;
+
+  /* See the comment in the function above.  */
+  intptr_t iw0 = ev->data.l[0];
+  intptr_t iw1 = ev->data.l[1];
+  intptr_t iw = (iw0 << 31 << 1) + (iw1 & 0xffffffffu);
+  w = (struct window *) iw;
+
+  XSETWINDOW (window, w);
+
+  ievent->kind = HORIZONTAL_SCROLL_BAR_CLICK_EVENT;
+  ievent->frame_or_window = window;
+  ievent->arg = Qnil;
+#ifdef USE_GTK
+  ievent->timestamp = CurrentTime;
+#else
+  ievent->timestamp =
+    XtLastTimestampProcessed (FRAME_X_DISPLAY (XFRAME (w->frame)));
+#endif
+  ievent->code = 0;
+  ievent->part = ev->data.l[2];
+  ievent->x = make_number (ev->data.l[3]);
+  ievent->y = make_number (ev->data.l[4]);
+  ievent->modifiers = 0;
+}
+
 
 #ifdef USE_MOTIF
 
@@ -4358,7 +4497,6 @@ x_scroll_bar_to_input_event (const XEvent *event,
 
 #define XM_SB_MAX 10000000
 
-
 /* Scroll bar callback for Motif scroll bars.  WIDGET is the scroll
    bar widget.  CLIENT_DATA is a pointer to the scroll_bar structure.
    CALL_DATA is a pointer to a XmScrollBarCallbackStruct.  */
@@ -4368,52 +4506,63 @@ xm_scroll_callback (Widget widget, XtPointer client_data, XtPointer call_data)
 {
   struct scroll_bar *bar = client_data;
   XmScrollBarCallbackStruct *cs = call_data;
-  int part = -1, whole = 0, portion = 0;
+  enum scroll_bar_part part = scroll_bar_nowhere;
+  int horizontal = bar->horizontal, whole = 0, portion = 0;
 
   switch (cs->reason)
     {
     case XmCR_DECREMENT:
       bar->dragging = -1;
-      part = scroll_bar_up_arrow;
+      part = horizontal ? scroll_bar_left_arrow : scroll_bar_up_arrow;
       break;
 
     case XmCR_INCREMENT:
       bar->dragging = -1;
-      part = scroll_bar_down_arrow;
+      part = horizontal ? scroll_bar_right_arrow : scroll_bar_down_arrow;
       break;
 
     case XmCR_PAGE_DECREMENT:
       bar->dragging = -1;
-      part = scroll_bar_above_handle;
+      part = horizontal ? scroll_bar_before_handle : scroll_bar_above_handle;
       break;
 
     case XmCR_PAGE_INCREMENT:
       bar->dragging = -1;
-      part = scroll_bar_below_handle;
+      part = horizontal ? scroll_bar_after_handle : scroll_bar_below_handle;
       break;
 
     case XmCR_TO_TOP:
       bar->dragging = -1;
-      part = scroll_bar_to_top;
+      part = horizontal ? scroll_bar_to_leftmost : scroll_bar_to_top;
       break;
 
     case XmCR_TO_BOTTOM:
       bar->dragging = -1;
-      part = scroll_bar_to_bottom;
+      part = horizontal ? scroll_bar_to_rightmost : scroll_bar_to_bottom;
       break;
 
     case XmCR_DRAG:
       {
        int slider_size;
 
-       /* Get the slider size.  */
        block_input ();
        XtVaGetValues (widget, XmNsliderSize, &slider_size, NULL);
        unblock_input ();
 
-       whole = XM_SB_MAX - slider_size;
-       portion = min (cs->value, whole);
-       part = scroll_bar_handle;
+       if (horizontal)
+         {
+           portion = bar->whole * ((float)cs->value / XM_SB_MAX);
+           whole = bar->whole * ((float)(XM_SB_MAX - slider_size) / XM_SB_MAX);
+           portion = min (portion, whole);
+           part = scroll_bar_horizontal_handle;
+         }
+       else
+         {
+           whole = XM_SB_MAX - slider_size;
+           portion = min (cs->value, whole);
+           part = scroll_bar_handle;
+         }
+
        bar->dragging = cs->value;
       }
       break;
@@ -4422,10 +4571,10 @@ xm_scroll_callback (Widget widget, XtPointer client_data, XtPointer call_data)
       break;
     };
 
-  if (part >= 0)
+  if (part != scroll_bar_nowhere)
     {
       window_being_scrolled = bar->window;
-      x_send_scroll_bar_event (bar->window, part, portion, whole);
+      x_send_scroll_bar_event (bar->window, part, portion, whole, bar->horizontal);
     }
 }
 
@@ -4440,8 +4589,9 @@ xg_scroll_callback (GtkRange     *range,
                     gdouble       value,
                     gpointer      user_data)
 {
+  int whole = 0, portion = 0;
   struct scroll_bar *bar = user_data;
-  int part = -1, whole = 0, portion = 0;
+  enum scroll_bar_part part = scroll_bar_nowhere;
   GtkAdjustment *adj = GTK_ADJUSTMENT (gtk_range_get_adjustment (range));
   struct frame *f = g_object_get_data (G_OBJECT (range), XG_FRAME_DATA);
 
@@ -4454,35 +4604,50 @@ xg_scroll_callback (GtkRange     *range,
       if (FRAME_DISPLAY_INFO (f)->grabbed != 0
           && FRAME_DISPLAY_INFO (f)->grabbed < (1 << 4))
         {
-          part = scroll_bar_handle;
-          whole = gtk_adjustment_get_upper (adj) -
-            gtk_adjustment_get_page_size (adj);
-          portion = min ((int)value, whole);
-          bar->dragging = portion;
-        }
+         if (bar->horizontal)
+           {
+             part = scroll_bar_horizontal_handle;
+             whole = (int)(gtk_adjustment_get_upper (adj) -
+                           gtk_adjustment_get_page_size (adj));
+             portion = min ((int)value, whole);
+             bar->dragging = portion;
+           }
+         else
+           {
+             part = scroll_bar_handle;
+             whole = gtk_adjustment_get_upper (adj) -
+               gtk_adjustment_get_page_size (adj);
+             portion = min ((int)value, whole);
+             bar->dragging = portion;
+           }
+       }
       break;
     case GTK_SCROLL_STEP_BACKWARD:
-      part = scroll_bar_up_arrow;
+      part = (bar->horizontal
+             ? scroll_bar_left_arrow : scroll_bar_up_arrow);
       bar->dragging = -1;
       break;
     case GTK_SCROLL_STEP_FORWARD:
-      part = scroll_bar_down_arrow;
+      part = (bar->horizontal
+             ? scroll_bar_right_arrow : scroll_bar_down_arrow);
       bar->dragging = -1;
       break;
     case GTK_SCROLL_PAGE_BACKWARD:
-      part = scroll_bar_above_handle;
+      part = (bar->horizontal
+             ? scroll_bar_before_handle : scroll_bar_above_handle);
       bar->dragging = -1;
       break;
     case GTK_SCROLL_PAGE_FORWARD:
-      part = scroll_bar_below_handle;
+      part = (bar->horizontal
+             ? scroll_bar_after_handle : scroll_bar_below_handle);
       bar->dragging = -1;
       break;
     }
 
-  if (part >= 0)
+  if (part != scroll_bar_nowhere)
     {
       window_being_scrolled = bar->window;
-      x_send_scroll_bar_event (bar->window, part, portion, whole);
+      x_send_scroll_bar_event (bar->window, part, portion, whole, bar->horizontal);
     }
 
   return FALSE;
@@ -4500,7 +4665,7 @@ xg_end_scroll_callback (GtkWidget *widget,
   if (WINDOWP (window_being_scrolled))
     {
       x_send_scroll_bar_event (window_being_scrolled,
-                               scroll_bar_end_scroll, 0, 0);
+                               scroll_bar_end_scroll, 0, 0, bar->horizontal);
       window_being_scrolled = Qnil;
     }
 
@@ -4522,31 +4687,56 @@ xaw_jump_callback (Widget widget, XtPointer client_data, XtPointer call_data)
   float *top_addr = call_data;
   float top = *top_addr;
   float shown;
-  int whole, portion, height;
+  int whole, portion, height, width;
   enum scroll_bar_part part;
+  int horizontal = bar->horizontal;
 
-  /* Get the size of the thumb, a value between 0 and 1.  */
-  block_input ();
-  XtVaGetValues (widget, XtNshown, &shown, XtNheight, &height, NULL);
-  unblock_input ();
 
-  whole = 10000000;
-  portion = shown < 1 ? top * whole : 0;
+  if (horizontal)
+    {
+      /* Get the size of the thumb, a value between 0 and 1.  */
+      block_input ();
+      XtVaGetValues (widget, XtNshown, &shown, XtNwidth, &width, NULL);
+      unblock_input ();
+
+      if (shown < 1)
+       {
+         whole = bar->whole - (shown * bar->whole);
+         portion = min (top * bar->whole, whole);
+       }
+      else
+       {
+         whole = bar->whole;
+         portion = 0;
+       }
 
-  if (shown < 1 && (eabs (top + shown - 1) < 1.0f / height))
-    /* Some derivatives of Xaw refuse to shrink the thumb when you reach
-       the bottom, so we force the scrolling whenever we see that we're
-       too close to the bottom (in x_set_toolkit_scroll_bar_thumb
-       we try to ensure that we always stay two pixels away from the
-       bottom).  */
-    part = scroll_bar_down_arrow;
+      part = scroll_bar_horizontal_handle;
+    }
   else
-    part = scroll_bar_handle;
+    {
+      /* Get the size of the thumb, a value between 0 and 1.  */
+      block_input ();
+      XtVaGetValues (widget, XtNshown, &shown, XtNheight, &height, NULL);
+      unblock_input ();
+
+      whole = 10000000;
+      portion = shown < 1 ? top * whole : 0;
+
+      if (shown < 1 && (eabs (top + shown - 1) < 1.0f / height))
+       /* Some derivatives of Xaw refuse to shrink the thumb when you reach
+          the bottom, so we force the scrolling whenever we see that we're
+          too close to the bottom (in x_set_toolkit_scroll_bar_thumb
+          we try to ensure that we always stay two pixels away from the
+          bottom).  */
+       part = scroll_bar_down_arrow;
+      else
+       part = scroll_bar_handle;
+    }
 
   window_being_scrolled = bar->window;
   bar->dragging = portion;
   bar->last_seen_part = part;
-  x_send_scroll_bar_event (bar->window, part, portion, whole);
+  x_send_scroll_bar_event (bar->window, part, portion, whole, bar->horizontal);
 }
 
 
@@ -4564,33 +4754,60 @@ xaw_scroll_callback (Widget widget, XtPointer client_data, XtPointer call_data)
   struct scroll_bar *bar = client_data;
   /* The position really is stored cast to a pointer.  */
   int position = (intptr_t) call_data;
-  Dimension height;
+  Dimension height, width;
   enum scroll_bar_part part;
 
-  /* Get the height of the scroll bar.  */
-  block_input ();
-  XtVaGetValues (widget, XtNheight, &height, NULL);
-  unblock_input ();
+  if (bar->horizontal)
+    {
+      /* Get the width of the scroll bar.  */
+      block_input ();
+      XtVaGetValues (widget, XtNwidth, &width, NULL);
+      unblock_input ();
+
+      if (eabs (position) >= width)
+       part = (position < 0) ? scroll_bar_before_handle : scroll_bar_after_handle;
 
-  if (eabs (position) >= height)
-    part = (position < 0) ? scroll_bar_above_handle : scroll_bar_below_handle;
+      /* If Xaw3d was compiled with ARROW_SCROLLBAR,
+        it maps line-movement to call_data = max(5, height/20).  */
+      else if (xaw3d_arrow_scroll && eabs (position) <= max (5, width / 20))
+       part = (position < 0) ? scroll_bar_left_arrow : scroll_bar_right_arrow;
+      else
+       part = scroll_bar_move_ratio;
 
-  /* If Xaw3d was compiled with ARROW_SCROLLBAR,
-     it maps line-movement to call_data = max(5, height/20).  */
-  else if (xaw3d_arrow_scroll && eabs (position) <= max (5, height / 20))
-    part = (position < 0) ? scroll_bar_up_arrow : scroll_bar_down_arrow;
+      window_being_scrolled = bar->window;
+      bar->dragging = -1;
+      bar->last_seen_part = part;
+      x_send_scroll_bar_event (bar->window, part, position, width, bar->horizontal);
+    }
   else
-    part = scroll_bar_move_ratio;
+    {
 
-  window_being_scrolled = bar->window;
-  bar->dragging = -1;
-  bar->last_seen_part = part;
-  x_send_scroll_bar_event (bar->window, part, position, height);
+      /* Get the height of the scroll bar.  */
+      block_input ();
+      XtVaGetValues (widget, XtNheight, &height, NULL);
+      unblock_input ();
+
+      if (eabs (position) >= height)
+       part = (position < 0) ? scroll_bar_above_handle : scroll_bar_below_handle;
+
+      /* If Xaw3d was compiled with ARROW_SCROLLBAR,
+        it maps line-movement to call_data = max(5, height/20).  */
+      else if (xaw3d_arrow_scroll && eabs (position) <= max (5, height / 20))
+       part = (position < 0) ? scroll_bar_up_arrow : scroll_bar_down_arrow;
+      else
+       part = scroll_bar_move_ratio;
+
+      window_being_scrolled = bar->window;
+      bar->dragging = -1;
+      bar->last_seen_part = part;
+      x_send_scroll_bar_event (bar->window, part, position, height, bar->horizontal);
+    }
 }
 
 #endif /* not USE_GTK and not USE_MOTIF */
 
 #define SCROLL_BAR_NAME "verticalScrollBar"
+#define SCROLL_BAR_HORIZONTAL_NAME "horizontalScrollBar"
 
 /* Create the widget for scroll bar BAR on frame F.  Record the widget
    and X window of the scroll bar in BAR.  */
@@ -4608,6 +4825,18 @@ x_create_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar)
   unblock_input ();
 }
 
+static void
+x_create_horizontal_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar)
+{
+  const char *scroll_bar_name = SCROLL_BAR_HORIZONTAL_NAME;
+
+  block_input ();
+  xg_create_horizontal_scroll_bar (f, bar, G_CALLBACK (xg_scroll_callback),
+                                  G_CALLBACK (xg_end_scroll_callback),
+                                  scroll_bar_name);
+  unblock_input ();
+}
+
 #else /* not USE_GTK */
 
 static void
@@ -4803,64 +5032,272 @@ x_create_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar)
   SET_SCROLL_BAR_X_WIDGET (bar, widget);
   xwindow = XtWindow (widget);
   bar->x_window = xwindow;
+  bar->whole = 1;
+  bar->horizontal = 0;
 
   unblock_input ();
 }
-#endif /* not USE_GTK */
-
-
-/* Set the thumb size and position of scroll bar BAR.  We are currently
-   displaying PORTION out of a whole WHOLE, and our position POSITION.  */
-
-#ifdef USE_GTK
-static void
-x_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int position, int whole)
-{
-  xg_set_toolkit_scroll_bar_thumb (bar, portion, position, whole);
-}
 
-#else /* not USE_GTK */
 static void
-x_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int position,
-                               int whole)
+x_create_horizontal_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar)
 {
-  struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
-  Widget widget = SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar);
-  float top, shown;
+  Window xwindow;
+  Widget widget;
+  Arg av[20];
+  int ac = 0;
+  const char *scroll_bar_name = SCROLL_BAR_HORIZONTAL_NAME;
+  unsigned long pixel;
 
   block_input ();
 
 #ifdef USE_MOTIF
+  /* Set resources.  Create the widget.  */
+  XtSetArg (av[ac], XtNmappedWhenManaged, False); ++ac;
+  XtSetArg (av[ac], XmNminimum, 0); ++ac;
+  XtSetArg (av[ac], XmNmaximum, XM_SB_MAX); ++ac;
+  XtSetArg (av[ac], XmNorientation, XmHORIZONTAL); ++ac;
+  XtSetArg (av[ac], XmNprocessingDirection, XmMAX_ON_RIGHT), ++ac;
+  XtSetArg (av[ac], XmNincrement, 1); ++ac;
+  XtSetArg (av[ac], XmNpageIncrement, 1); ++ac;
 
-  if (scroll_bar_adjust_thumb_portion_p)
+  pixel = f->output_data.x->scroll_bar_foreground_pixel;
+  if (pixel != -1)
     {
-      /* We use an estimate of 30 chars per line rather than the real
-         `portion' value.  This has the disadvantage that the thumb size
-         is not very representative, but it makes our life a lot easier.
-         Otherwise, we have to constantly adjust the thumb size, which
-         we can't always do quickly enough: while dragging, the size of
-         the thumb might prevent the user from dragging the thumb all the
-         way to the end.  but Motif and some versions of Xaw3d don't allow
-         updating the thumb size while dragging.  Also, even if we can update
-         its size, the update will often happen too late.
-         If you don't believe it, check out revision 1.650 of xterm.c to see
-         what hoops we were going through and the still poor behavior we got.  */
-      portion = WINDOW_TOTAL_LINES (XWINDOW (bar->window)) * 30;
-      /* When the thumb is at the bottom, position == whole.
-         So we need to increase `whole' to make space for the thumb.  */
-      whole += portion;
+      XtSetArg (av[ac], XmNforeground, pixel);
+      ++ac;
     }
 
-  if (whole <= 0)
-    top = 0, shown = 1;
-  else
+  pixel = f->output_data.x->scroll_bar_background_pixel;
+  if (pixel != -1)
     {
-      top = (float) position / whole;
-      shown = (float) portion / whole;
+      XtSetArg (av[ac], XmNbackground, pixel);
+      ++ac;
     }
 
-  if (bar->dragging == -1)
-    {
+  widget = XmCreateScrollBar (f->output_data.x->edit_widget,
+                             (char *) scroll_bar_name, av, ac);
+
+  /* Add one callback for everything that can happen.  */
+  XtAddCallback (widget, XmNdecrementCallback, xm_scroll_callback,
+                (XtPointer) bar);
+  XtAddCallback (widget, XmNdragCallback, xm_scroll_callback,
+                (XtPointer) bar);
+  XtAddCallback (widget, XmNincrementCallback, xm_scroll_callback,
+                (XtPointer) bar);
+  XtAddCallback (widget, XmNpageDecrementCallback, xm_scroll_callback,
+                (XtPointer) bar);
+  XtAddCallback (widget, XmNpageIncrementCallback, xm_scroll_callback,
+                (XtPointer) bar);
+  XtAddCallback (widget, XmNtoBottomCallback, xm_scroll_callback,
+                (XtPointer) bar);
+  XtAddCallback (widget, XmNtoTopCallback, xm_scroll_callback,
+                (XtPointer) bar);
+
+  /* Realize the widget.  Only after that is the X window created.  */
+  XtRealizeWidget (widget);
+
+  /* Set the cursor to an arrow.  I didn't find a resource to do that.
+     And I'm wondering why it hasn't an arrow cursor by default.  */
+  XDefineCursor (XtDisplay (widget), XtWindow (widget),
+                 f->output_data.x->nontext_cursor);
+
+#else /* !USE_MOTIF i.e. use Xaw */
+
+  /* Set resources.  Create the widget.  The background of the
+     Xaw3d scroll bar widget is a little bit light for my taste.
+     We don't alter it here to let users change it according
+     to their taste with `emacs*verticalScrollBar.background: xxx'.  */
+  XtSetArg (av[ac], XtNmappedWhenManaged, False); ++ac;
+  XtSetArg (av[ac], XtNorientation, XtorientHorizontal); ++ac;
+  /* For smoother scrolling with Xaw3d   -sm */
+  /* XtSetArg (av[ac], XtNpickTop, True); ++ac; */
+
+  pixel = f->output_data.x->scroll_bar_foreground_pixel;
+  if (pixel != -1)
+    {
+      XtSetArg (av[ac], XtNforeground, pixel);
+      ++ac;
+    }
+
+  pixel = f->output_data.x->scroll_bar_background_pixel;
+  if (pixel != -1)
+    {
+      XtSetArg (av[ac], XtNbackground, pixel);
+      ++ac;
+    }
+
+  /* Top/bottom shadow colors.  */
+
+  /* Allocate them, if necessary.  */
+  if (f->output_data.x->scroll_bar_top_shadow_pixel == -1)
+    {
+      pixel = f->output_data.x->scroll_bar_background_pixel;
+      if (pixel != -1)
+        {
+          if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f),
+                                      FRAME_X_COLORMAP (f),
+                                      &pixel, 1.2, 0x8000))
+            pixel = -1;
+          f->output_data.x->scroll_bar_top_shadow_pixel = pixel;
+        }
+    }
+  if (f->output_data.x->scroll_bar_bottom_shadow_pixel == -1)
+    {
+      pixel = f->output_data.x->scroll_bar_background_pixel;
+      if (pixel != -1)
+        {
+          if (!x_alloc_lighter_color (f, FRAME_X_DISPLAY (f),
+                                      FRAME_X_COLORMAP (f),
+                                      &pixel, 0.6, 0x4000))
+            pixel = -1;
+          f->output_data.x->scroll_bar_bottom_shadow_pixel = pixel;
+        }
+    }
+
+#ifdef XtNbeNiceToColormap
+  /* Tell the toolkit about them.  */
+  if (f->output_data.x->scroll_bar_top_shadow_pixel == -1
+      || f->output_data.x->scroll_bar_bottom_shadow_pixel == -1)
+    /* We tried to allocate a color for the top/bottom shadow, and
+       failed, so tell Xaw3d to use dithering instead.   */
+    /* But only if we have a small colormap.  Xaw3d can allocate nice
+       colors itself.  */
+    {
+      XtSetArg (av[ac], XtNbeNiceToColormap,
+                DefaultDepthOfScreen (FRAME_X_SCREEN (f)) < 16);
+      ++ac;
+    }
+  else
+    /* Tell what colors Xaw3d should use for the top/bottom shadow, to
+       be more consistent with other emacs 3d colors, and since Xaw3d is
+       not good at dealing with allocation failure.  */
+    {
+      /* This tells Xaw3d to use real colors instead of dithering for
+        the shadows.  */
+      XtSetArg (av[ac], XtNbeNiceToColormap, False);
+      ++ac;
+
+      /* Specify the colors.  */
+      pixel = f->output_data.x->scroll_bar_top_shadow_pixel;
+      if (pixel != -1)
+       {
+         XtSetArg (av[ac], XtNtopShadowPixel, pixel);
+         ++ac;
+       }
+      pixel = f->output_data.x->scroll_bar_bottom_shadow_pixel;
+      if (pixel != -1)
+       {
+         XtSetArg (av[ac], XtNbottomShadowPixel, pixel);
+         ++ac;
+       }
+    }
+#endif
+
+  widget = XtCreateWidget (scroll_bar_name, scrollbarWidgetClass,
+                          f->output_data.x->edit_widget, av, ac);
+
+  {
+    char const *initial = "";
+    char const *val = initial;
+    XtVaGetValues (widget, XtNscrollVCursor, (XtPointer) &val,
+#ifdef XtNarrowScrollbars
+                  XtNarrowScrollbars, (XtPointer) &xaw3d_arrow_scroll,
+#endif
+                  XtNpickTop, (XtPointer) &xaw3d_pick_top, NULL);
+    if (xaw3d_arrow_scroll || val == initial)
+      {        /* ARROW_SCROLL */
+       xaw3d_arrow_scroll = True;
+       /* Isn't that just a personal preference ?   --Stef */
+       XtVaSetValues (widget, XtNcursorName, "top_left_arrow", NULL);
+      }
+  }
+
+  /* Define callbacks.  */
+  XtAddCallback (widget, XtNjumpProc, xaw_jump_callback, (XtPointer) bar);
+  XtAddCallback (widget, XtNscrollProc, xaw_scroll_callback,
+                (XtPointer) bar);
+
+  /* Realize the widget.  Only after that is the X window created.  */
+  XtRealizeWidget (widget);
+
+#endif /* !USE_MOTIF */
+
+  /* Install an action hook that lets us detect when the user
+     finishes interacting with a scroll bar.  */
+  if (horizontal_action_hook_id == 0)
+   horizontal_action_hook_id
+     = XtAppAddActionHook (Xt_app_con, xt_horizontal_action_hook, 0);
+
+  /* Remember X window and widget in the scroll bar vector.  */
+  SET_SCROLL_BAR_X_WIDGET (bar, widget);
+  xwindow = XtWindow (widget);
+  bar->x_window = xwindow;
+  bar->whole = 1;
+  bar->horizontal = 1;
+
+  unblock_input ();
+}
+#endif /* not USE_GTK */
+
+
+/* Set the thumb size and position of scroll bar BAR.  We are currently
+   displaying PORTION out of a whole WHOLE, and our position POSITION.  */
+
+#ifdef USE_GTK
+static void
+x_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int position, int whole)
+{
+  xg_set_toolkit_scroll_bar_thumb (bar, portion, position, whole);
+}
+
+static void
+x_set_toolkit_horizontal_scroll_bar_thumb (struct scroll_bar *bar, int portion, int position, int whole)
+{
+  xg_set_toolkit_horizontal_scroll_bar_thumb (bar, portion, position, whole);
+}
+
+#else /* not USE_GTK */
+static void
+x_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int position,
+                               int whole)
+{
+  struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
+  Widget widget = SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar);
+  float top, shown;
+
+  block_input ();
+
+#ifdef USE_MOTIF
+
+  if (scroll_bar_adjust_thumb_portion_p)
+    {
+      /* We use an estimate of 30 chars per line rather than the real
+         `portion' value.  This has the disadvantage that the thumb size
+         is not very representative, but it makes our life a lot easier.
+         Otherwise, we have to constantly adjust the thumb size, which
+         we can't always do quickly enough: while dragging, the size of
+         the thumb might prevent the user from dragging the thumb all the
+         way to the end.  but Motif and some versions of Xaw3d don't allow
+         updating the thumb size while dragging.  Also, even if we can update
+         its size, the update will often happen too late.
+         If you don't believe it, check out revision 1.650 of xterm.c to see
+         what hoops we were going through and the still poor behavior we got.  */
+      portion = WINDOW_TOTAL_LINES (XWINDOW (bar->window)) * 30;
+      /* When the thumb is at the bottom, position == whole.
+         So we need to increase `whole' to make space for the thumb.  */
+      whole += portion;
+    }
+
+  if (whole <= 0)
+    top = 0, shown = 1;
+  else
+    {
+      top = (float) position / whole;
+      shown = (float) portion / whole;
+    }
+
+  if (bar->dragging == -1)
+    {
       int size, value;
 
       /* Slider size.  Must be in the range [1 .. MAX - MIN] where MAX
@@ -4931,6 +5368,89 @@ x_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int positio
 
   unblock_input ();
 }
+
+static void
+x_set_toolkit_horizontal_scroll_bar_thumb (struct scroll_bar *bar, int portion, int position,
+                               int whole)
+{
+  struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
+  Widget widget = SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar);
+  float top, shown;
+
+  block_input ();
+
+#ifdef USE_MOTIF
+  bar->whole = whole;
+  shown = (float) portion / whole;
+  top = (float) position / (whole - portion);
+  {
+    int size = clip_to_bounds (1, shown * XM_SB_MAX, XM_SB_MAX);
+    int value = clip_to_bounds (0, top * (XM_SB_MAX - size), XM_SB_MAX - size);
+
+    XmScrollBarSetValues (widget, value, size, 0, 0, False);
+  }
+#else /* !USE_MOTIF i.e. use Xaw */
+  bar->whole = whole;
+  if (whole == 0)
+    top = 0, shown = 1;
+  else
+    {
+      top = (float) position / whole;
+      shown = (float) portion / whole;
+    }
+
+  {
+    float old_top, old_shown;
+    Dimension height;
+    XtVaGetValues (widget,
+                  XtNtopOfThumb, &old_top,
+                  XtNshown, &old_shown,
+                  XtNheight, &height,
+                  NULL);
+
+#if 0
+    /* Massage the top+shown values.  */
+    if (bar->dragging == -1 || bar->last_seen_part == scroll_bar_down_arrow)
+      top = max (0, min (1, top));
+    else
+      top = old_top;
+#if ! defined (HAVE_XAW3D)
+    /* With Xaw, 'top' values too closer to 1.0 may
+       cause the thumb to disappear.  Fix that.  */
+    top = min (top, 0.99f);
+#endif
+    /* Keep two pixels available for moving the thumb down.  */
+    shown = max (0, min (1 - top - (2.0f / height), shown));
+#if ! defined (HAVE_XAW3D)
+    /* Likewise with too small 'shown'.  */
+    shown = max (shown, 0.01f);
+#endif
+#endif
+
+    /* If the call to XawScrollbarSetThumb below doesn't seem to
+       work, check that 'NARROWPROTO' is defined in src/config.h.
+       If this is not so, most likely you need to fix configure.  */
+    XawScrollbarSetThumb (widget, top, shown);
+#if 0
+    if (top != old_top || shown != old_shown)
+      {
+       if (bar->dragging == -1)
+         XawScrollbarSetThumb (widget, top, shown);
+       else
+         {
+           /* Try to make the scrolling a tad smoother.  */
+           if (!xaw3d_pick_top)
+             shown = min (shown, old_shown);
+
+           XawScrollbarSetThumb (widget, top, shown);
+         }
+      }
+#endif
+  }
+#endif /* !USE_MOTIF */
+
+  unblock_input ();
+}
 #endif /* not USE_GTK */
 
 #endif /* USE_TOOLKIT_SCROLL_BARS */
@@ -4947,7 +5467,7 @@ x_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int positio
    scroll bar. */
 
 static struct scroll_bar *
-x_scroll_bar_create (struct window *w, int top, int left, int width, int height)
+x_scroll_bar_create (struct window *w, int top, int left, int width, int height, bool horizontal)
 {
   struct frame *f = XFRAME (w->frame);
   struct scroll_bar *bar
@@ -4957,7 +5477,10 @@ x_scroll_bar_create (struct window *w, int top, int left, int width, int height)
   block_input ();
 
 #ifdef USE_TOOLKIT_SCROLL_BARS
-  x_create_toolkit_scroll_bar (f, bar);
+  if (horizontal)
+    x_create_horizontal_toolkit_scroll_bar (f, bar);
+  else
+    x_create_toolkit_scroll_bar (f, bar);
 #else /* not USE_TOOLKIT_SCROLL_BARS */
   {
     XSetWindowAttributes a;
@@ -5004,6 +5527,7 @@ x_scroll_bar_create (struct window *w, int top, int left, int width, int height)
   bar->start = 0;
   bar->end = 0;
   bar->dragging = -1;
+  bar->horizontal = horizontal;
 #if defined (USE_TOOLKIT_SCROLL_BARS) && defined (USE_LUCID)
   bar->last_seen_part = scroll_bar_nowhere;
 #endif
@@ -5020,8 +5544,12 @@ x_scroll_bar_create (struct window *w, int top, int left, int width, int height)
 #ifdef USE_TOOLKIT_SCROLL_BARS
   {
 #ifdef USE_GTK
-    xg_update_scrollbar_pos (f, bar->x_window, top,
-                            left,width, max (height, 1));
+    if (horizontal)
+      xg_update_horizontal_scrollbar_pos (f, bar->x_window, top,
+                                         left, width, max (height, 1));
+    else
+      xg_update_scrollbar_pos (f, bar->x_window, top,
+                              left, width, max (height, 1));
 #else /* not USE_GTK */
     Widget scroll_bar = SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar);
     XtConfigureWidget (scroll_bar, left, top, width, max (height, 1), 0);
@@ -5105,7 +5633,7 @@ x_scroll_bar_set_handle (struct scroll_bar *bar, int start, int end, int rebuild
 
     /* Draw the empty space above the handle.  Note that we can't clear
        zero-height areas; that means "clear to end of window."  */
-    if (start > 0)
+    if ((inside_width > 0) && (start > 0))
       x_clear_area (FRAME_X_DISPLAY (f), w,
                    VERTICAL_SCROLL_BAR_LEFT_BORDER,
                    VERTICAL_SCROLL_BAR_TOP_BORDER,
@@ -5130,7 +5658,7 @@ x_scroll_bar_set_handle (struct scroll_bar *bar, int start, int end, int rebuild
 
     /* Draw the empty space below the handle.  Note that we can't
        clear zero-height areas; that means "clear to end of window." */
-    if (end < inside_height)
+    if ((inside_width > 0) && (end < inside_height))
       x_clear_area (FRAME_X_DISPLAY (f), w,
                    VERTICAL_SCROLL_BAR_LEFT_BORDER,
                    VERTICAL_SCROLL_BAR_TOP_BORDER + end,
@@ -5162,7 +5690,10 @@ x_scroll_bar_remove (struct scroll_bar *bar)
 #endif
 
   /* Dissociate this scroll bar from its window.  */
-  wset_vertical_scroll_bar (XWINDOW (bar->window), Qnil);
+  if (bar->horizontal)
+    wset_horizontal_scroll_bar (XWINDOW (bar->window), Qnil);
+  else
+    wset_vertical_scroll_bar (XWINDOW (bar->window), Qnil);
 
   unblock_input ();
 }
@@ -5186,8 +5717,6 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio
   window_box (w, ANY_AREA, 0, &window_y, 0, &window_height);
   top = window_y;
   height = window_height;
-
-  /* Compute the left edge and the width of the scroll bar area.  */
   left = WINDOW_SCROLL_BAR_AREA_X (w);
   width = WINDOW_SCROLL_BAR_AREA_WIDTH (w);
 
@@ -5202,7 +5731,7 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio
          unblock_input ();
        }
 
-      bar = x_scroll_bar_create (w, top, left, width, max (height, 1));
+      bar = x_scroll_bar_create (w, top, left, width, max (height, 1), 0);
     }
   else
     {
@@ -5287,7 +5816,139 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio
 #endif /* not USE_TOOLKIT_SCROLL_BARS */
 
   XSETVECTOR (barobj, bar);
-  wset_vertical_scroll_bar (w, barobj);
+  wset_vertical_scroll_bar (w, barobj);
+}
+
+
+static void
+XTset_horizontal_scroll_bar (struct window *w, int portion, int whole, int position)
+{
+  struct frame *f = XFRAME (w->frame);
+  Lisp_Object barobj;
+  struct scroll_bar *bar;
+  int top, height, left, width;
+  int window_x, window_width;
+  int pixel_width = WINDOW_PIXEL_WIDTH (w);
+
+  /* Get window dimensions.  */
+  window_box (w, ANY_AREA, &window_x, 0, &window_width, 0);
+  left = window_x;
+  width = window_width;
+  top = WINDOW_SCROLL_BAR_AREA_Y (w);
+  height = WINDOW_SCROLL_BAR_AREA_HEIGHT (w);
+
+  /* Does the scroll bar exist yet?  */
+  if (NILP (w->horizontal_scroll_bar))
+    {
+      if (width > 0 && height > 0)
+       {
+         block_input ();
+
+         /* Clear also part between window_width and
+            WINDOW_PIXEL_WIDTH.  */
+         x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+                       left, top, pixel_width, height);
+         unblock_input ();
+       }
+
+      bar = x_scroll_bar_create (w, top, left, width, height, 1);
+    }
+  else
+    {
+      /* It may just need to be moved and resized.  */
+      unsigned int mask = 0;
+
+      bar = XSCROLL_BAR (w->horizontal_scroll_bar);
+
+      block_input ();
+
+      if (left != bar->left)
+       mask |= CWX;
+      if (top != bar->top)
+       mask |= CWY;
+      if (width != bar->width)
+       mask |= CWWidth;
+      if (height != bar->height)
+       mask |= CWHeight;
+
+#ifdef USE_TOOLKIT_SCROLL_BARS
+      /* Move/size the scroll bar widget.  */
+      if (mask)
+       {
+         /* Since toolkit scroll bars are smaller than the space reserved
+            for them on the frame, we have to clear "under" them.  */
+         if (width > 0 && height > 0)
+           x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+                         WINDOW_LEFT_EDGE_X (w), top,
+                         pixel_width - WINDOW_RIGHT_DIVIDER_WIDTH (w), height);
+#ifdef USE_GTK
+          xg_update_horizontal_scrollbar_pos (f, bar->x_window, top, left,
+                                             width, height);
+#else /* not USE_GTK */
+          XtConfigureWidget (SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar),
+                             left, top, width, height, 0);
+#endif /* not USE_GTK */
+       }
+#else /* not USE_TOOLKIT_SCROLL_BARS */
+
+      /* Clear areas not covered by the scroll bar because it's not as
+        wide as the area reserved for it.  This makes sure a
+        previous mode line display is cleared after C-x 2 C-x 1, for
+        example.  */
+      {
+       int area_height = WINDOW_CONFIG_SCROLL_BAR_HEIGHT (w);
+       int rest = area_height - height;
+       if (rest > 0 && width > 0)
+         x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+                       left, top, width, rest);
+      }
+
+      /* Move/size the scroll bar window.  */
+      if (mask)
+       {
+         XWindowChanges wc;
+
+         wc.x = left;
+         wc.y = top;
+         wc.width = width;
+         wc.height = height;
+         XConfigureWindow (FRAME_X_DISPLAY (f), bar->x_window,
+                           mask, &wc);
+       }
+
+#endif /* not USE_TOOLKIT_SCROLL_BARS */
+
+      /* Remember new settings.  */
+      bar->left = left;
+      bar->top = top;
+      bar->width = width;
+      bar->height = height;
+
+      unblock_input ();
+    }
+
+#ifdef USE_TOOLKIT_SCROLL_BARS
+  x_set_toolkit_horizontal_scroll_bar_thumb (bar, portion, position, whole);
+#else /* not USE_TOOLKIT_SCROLL_BARS */
+  /* Set the scroll bar's current state, unless we're currently being
+     dragged.  */
+  if (bar->dragging == -1)
+    {
+      int left_range = HORIZONTAL_SCROLL_BAR_LEFT_RANGE (f, width);
+
+      if (whole == 0)
+       x_scroll_bar_set_handle (bar, 0, left_range, 0);
+      else
+       {
+         int start = ((double) position * left_range) / whole;
+         int end = ((double) (position + portion) * left_range) / whole;
+         x_scroll_bar_set_handle (bar, start, end, 0);
+       }
+    }
+#endif /* not USE_TOOLKIT_SCROLL_BARS */
+
+  XSETVECTOR (barobj, bar);
+  wset_horizontal_scroll_bar (w, barobj);
 }
 
 
@@ -5306,17 +5967,22 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio
 static void
 XTcondemn_scroll_bars (struct frame *frame)
 {
-  /* Transfer all the scroll bars to FRAME_CONDEMNED_SCROLL_BARS.  */
-  while (! NILP (FRAME_SCROLL_BARS (frame)))
+  if (!NILP (FRAME_SCROLL_BARS (frame)))
     {
-      Lisp_Object bar;
-      bar = FRAME_SCROLL_BARS (frame);
-      fset_scroll_bars (frame, XSCROLL_BAR (bar)->next);
-      XSCROLL_BAR (bar)->next = FRAME_CONDEMNED_SCROLL_BARS (frame);
-      XSCROLL_BAR (bar)->prev = Qnil;
-      if (! NILP (FRAME_CONDEMNED_SCROLL_BARS (frame)))
-       XSCROLL_BAR (FRAME_CONDEMNED_SCROLL_BARS (frame))->prev = bar;
-      fset_condemned_scroll_bars (frame, bar);
+      if (!NILP (FRAME_CONDEMNED_SCROLL_BARS (frame)))
+       {
+         /* Prepend scrollbars to already condemned ones.  */
+         Lisp_Object last = FRAME_SCROLL_BARS (frame);
+
+         while (!NILP (XSCROLL_BAR (last)->next))
+           last = XSCROLL_BAR (last)->next;
+
+         XSCROLL_BAR (last)->next = FRAME_CONDEMNED_SCROLL_BARS (frame);
+         XSCROLL_BAR (FRAME_CONDEMNED_SCROLL_BARS (frame))->prev = last;
+       }
+
+      fset_condemned_scroll_bars (frame, FRAME_SCROLL_BARS (frame));
+      fset_scroll_bars (frame, Qnil);
     }
 }
 
@@ -5325,47 +5991,84 @@ XTcondemn_scroll_bars (struct frame *frame)
    Note that WINDOW isn't necessarily condemned at all.  */
 
 static void
-XTredeem_scroll_bar (struct window *window)
+XTredeem_scroll_bar (struct window *w)
 {
   struct scroll_bar *bar;
-  struct frame *f;
   Lisp_Object barobj;
+  struct frame *f;
 
   /* We can't redeem this window's scroll bar if it doesn't have one.  */
-  if (NILP (window->vertical_scroll_bar))
+  if (NILP (w->vertical_scroll_bar) && NILP (w->horizontal_scroll_bar))
     emacs_abort ();
 
-  bar = XSCROLL_BAR (window->vertical_scroll_bar);
-
-  /* Unlink it from the condemned list.  */
-  f = XFRAME (WINDOW_FRAME (window));
-  if (NILP (bar->prev))
+  if (!NILP (w->vertical_scroll_bar) && WINDOW_HAS_VERTICAL_SCROLL_BAR (w))
     {
-      /* If the prev pointer is nil, it must be the first in one of
-        the lists.  */
-      if (EQ (FRAME_SCROLL_BARS (f), window->vertical_scroll_bar))
-       /* It's not condemned.  Everything's fine.  */
-       return;
-      else if (EQ (FRAME_CONDEMNED_SCROLL_BARS (f),
-                  window->vertical_scroll_bar))
-       fset_condemned_scroll_bars (f, bar->next);
+      bar = XSCROLL_BAR (w->vertical_scroll_bar);
+      /* Unlink it from the condemned list.  */
+      f = XFRAME (WINDOW_FRAME (w));
+      if (NILP (bar->prev))
+       {
+         /* If the prev pointer is nil, it must be the first in one of
+            the lists.  */
+         if (EQ (FRAME_SCROLL_BARS (f), w->vertical_scroll_bar))
+           /* It's not condemned.  Everything's fine.  */
+           goto horizontal;
+         else if (EQ (FRAME_CONDEMNED_SCROLL_BARS (f),
+                      w->vertical_scroll_bar))
+           fset_condemned_scroll_bars (f, bar->next);
+         else
+           /* If its prev pointer is nil, it must be at the front of
+              one or the other!  */
+           emacs_abort ();
+       }
       else
-       /* If its prev pointer is nil, it must be at the front of
-          one or the other!  */
-       emacs_abort ();
+       XSCROLL_BAR (bar->prev)->next = bar->next;
+
+      if (! NILP (bar->next))
+       XSCROLL_BAR (bar->next)->prev = bar->prev;
+
+      bar->next = FRAME_SCROLL_BARS (f);
+      bar->prev = Qnil;
+      XSETVECTOR (barobj, bar);
+      fset_scroll_bars (f, barobj);
+      if (! NILP (bar->next))
+       XSETVECTOR (XSCROLL_BAR (bar->next)->prev, bar);
     }
-  else
-    XSCROLL_BAR (bar->prev)->next = bar->next;
 
-  if (! NILP (bar->next))
-    XSCROLL_BAR (bar->next)->prev = bar->prev;
+ horizontal:
+  if (!NILP (w->horizontal_scroll_bar) && WINDOW_HAS_HORIZONTAL_SCROLL_BAR (w))
+    {
+      bar = XSCROLL_BAR (w->horizontal_scroll_bar);
+      /* Unlink it from the condemned list.  */
+      f = XFRAME (WINDOW_FRAME (w));
+      if (NILP (bar->prev))
+       {
+         /* If the prev pointer is nil, it must be the first in one of
+            the lists.  */
+         if (EQ (FRAME_SCROLL_BARS (f), w->horizontal_scroll_bar))
+           /* It's not condemned.  Everything's fine.  */
+           return;
+         else if (EQ (FRAME_CONDEMNED_SCROLL_BARS (f),
+                      w->horizontal_scroll_bar))
+           fset_condemned_scroll_bars (f, bar->next);
+         else
+           /* If its prev pointer is nil, it must be at the front of
+              one or the other!  */
+           emacs_abort ();
+       }
+      else
+       XSCROLL_BAR (bar->prev)->next = bar->next;
 
-  bar->next = FRAME_SCROLL_BARS (f);
-  bar->prev = Qnil;
-  XSETVECTOR (barobj, bar);
-  fset_scroll_bars (f, barobj);
-  if (! NILP (bar->next))
-    XSETVECTOR (XSCROLL_BAR (bar->next)->prev, bar);
+      if (! NILP (bar->next))
+       XSCROLL_BAR (bar->next)->prev = bar->prev;
+
+      bar->next = FRAME_SCROLL_BARS (f);
+      bar->prev = Qnil;
+      XSETVECTOR (barobj, bar);
+      fset_scroll_bars (f, barobj);
+      if (! NILP (bar->next))
+       XSETVECTOR (XSCROLL_BAR (bar->next)->prev, bar);
+    }
 }
 
 /* Remove all scroll bars on FRAME that haven't been saved since the
@@ -5450,7 +6153,9 @@ x_scroll_bar_handle_click (struct scroll_bar *bar,
   if (! WINDOWP (bar->window))
     emacs_abort ();
 
-  emacs_event->kind = SCROLL_BAR_CLICK_EVENT;
+  emacs_event->kind = (bar->horizontal
+                      ? HORIZONTAL_SCROLL_BAR_CLICK_EVENT
+                      : SCROLL_BAR_CLICK_EVENT);
   emacs_event->code = event->xbutton.button - Button1;
   emacs_event->modifiers
     = (x_x_to_emacs_modifiers (FRAME_DISPLAY_INFO
@@ -5462,36 +6167,68 @@ x_scroll_bar_handle_click (struct scroll_bar *bar,
   emacs_event->frame_or_window = bar->window;
   emacs_event->arg = Qnil;
   emacs_event->timestamp = event->xbutton.time;
-  {
-    int top_range
-      = VERTICAL_SCROLL_BAR_TOP_RANGE (f, bar->height);
-    int y = event->xbutton.y - VERTICAL_SCROLL_BAR_TOP_BORDER;
+  if (bar->horizontal)
+    {
+      int left_range
+       = HORIZONTAL_SCROLL_BAR_LEFT_RANGE (f, bar->width);
+      int x = event->xbutton.x - HORIZONTAL_SCROLL_BAR_LEFT_BORDER;
 
-    if (y < 0) y = 0;
-    if (y > top_range) y = top_range;
+      if (x < 0) x = 0;
+      if (x > left_range) x = left_range;
 
-    if (y < bar->start)
-      emacs_event->part = scroll_bar_above_handle;
-    else if (y < bar->end + VERTICAL_SCROLL_BAR_MIN_HANDLE)
-      emacs_event->part = scroll_bar_handle;
-    else
-      emacs_event->part = scroll_bar_below_handle;
+      if (x < bar->start)
+       emacs_event->part = scroll_bar_before_handle;
+      else if (x < bar->end + HORIZONTAL_SCROLL_BAR_MIN_HANDLE)
+       emacs_event->part = scroll_bar_horizontal_handle;
+      else
+       emacs_event->part = scroll_bar_after_handle;
 
 #ifndef USE_TOOLKIT_SCROLL_BARS
-    /* If the user has released the handle, set it to its final position.  */
-    if (event->type == ButtonRelease && bar->dragging != -1)
-      {
-       int new_start = y - bar->dragging;
-       int new_end = new_start + bar->end - bar->start;
+      /* If the user has released the handle, set it to its final position.  */
+      if (event->type == ButtonRelease && bar->dragging != -1)
+       {
+         int new_start = - bar->dragging;
+         int new_end = new_start + bar->end - bar->start;
 
-       x_scroll_bar_set_handle (bar, new_start, new_end, 0);
-       bar->dragging = -1;
-      }
+         x_scroll_bar_set_handle (bar, new_start, new_end, 0);
+         bar->dragging = -1;
+       }
 #endif
 
-    XSETINT (emacs_event->x, y);
-    XSETINT (emacs_event->y, top_range);
-  }
+      XSETINT (emacs_event->x, left_range);
+      XSETINT (emacs_event->y, x);
+    }
+  else
+    {
+      int top_range
+       = VERTICAL_SCROLL_BAR_TOP_RANGE (f, bar->height);
+      int y = event->xbutton.y - VERTICAL_SCROLL_BAR_TOP_BORDER;
+
+      if (y < 0) y = 0;
+      if (y > top_range) y = top_range;
+
+      if (y < bar->start)
+       emacs_event->part = scroll_bar_above_handle;
+      else if (y < bar->end + VERTICAL_SCROLL_BAR_MIN_HANDLE)
+       emacs_event->part = scroll_bar_handle;
+      else
+       emacs_event->part = scroll_bar_below_handle;
+
+#ifndef USE_TOOLKIT_SCROLL_BARS
+      /* If the user has released the handle, set it to its final position.  */
+      if (event->type == ButtonRelease && bar->dragging != -1)
+       {
+         int new_start = y - bar->dragging;
+         int new_end = new_start + bar->end - bar->start;
+
+         x_scroll_bar_set_handle (bar, new_start, new_end, 0);
+         bar->dragging = -1;
+       }
+#endif
+
+      XSETINT (emacs_event->x, y);
+      XSETINT (emacs_event->y, top_range);
+    }
 }
 
 #ifndef USE_TOOLKIT_SCROLL_BARS
@@ -5598,6 +6335,75 @@ x_scroll_bar_report_motion (struct frame **fp, Lisp_Object *bar_window,
 }
 
 
+/* Return information to the user about the current position of the mouse
+   on the scroll bar.  */
+
+static void
+x_horizontal_scroll_bar_report_motion (struct frame **fp, Lisp_Object *bar_window,
+                                      enum scroll_bar_part *part, Lisp_Object *x,
+                                      Lisp_Object *y, Time *timestamp)
+{
+  struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (*fp);
+  struct scroll_bar *bar = dpyinfo->last_mouse_scroll_bar;
+  Window w = bar->x_window;
+  struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
+  int win_x, win_y;
+  Window dummy_window;
+  int dummy_coord;
+  unsigned int dummy_mask;
+
+  block_input ();
+
+  /* Get the mouse's position relative to the scroll bar window, and
+     report that.  */
+  if (XQueryPointer (FRAME_X_DISPLAY (f), w,
+
+                    /* Root, child, root x and root y.  */
+                    &dummy_window, &dummy_window,
+                    &dummy_coord, &dummy_coord,
+
+                    /* Position relative to scroll bar.  */
+                    &win_x, &win_y,
+
+                    /* Mouse buttons and modifier keys.  */
+                    &dummy_mask))
+    {
+      int left_range = HORIZONTAL_SCROLL_BAR_LEFT_RANGE (f, bar->width);
+
+      win_x -= HORIZONTAL_SCROLL_BAR_LEFT_BORDER;
+
+      if (bar->dragging != -1)
+       win_x -= bar->dragging;
+
+      if (win_x < 0)
+       win_x = 0;
+      if (win_x > left_range)
+       win_x = left_range;
+
+      *fp = f;
+      *bar_window = bar->window;
+
+      if (bar->dragging != -1)
+       *part = scroll_bar_horizontal_handle;
+      else if (win_x < bar->start)
+       *part = scroll_bar_before_handle;
+      else if (win_x < bar->end + HORIZONTAL_SCROLL_BAR_MIN_HANDLE)
+       *part = scroll_bar_handle;
+      else
+       *part = scroll_bar_after_handle;
+
+      XSETINT (*y, win_x);
+      XSETINT (*x, left_range);
+
+      f->mouse_moved = 0;
+      dpyinfo->last_mouse_scroll_bar = NULL;
+      *timestamp = dpyinfo->last_mouse_movement_time;
+    }
+
+  unblock_input ();
+}
+
+
 /* The screen has been cleared so we may have changed foreground or
    background colors, and the scroll bars may need to be redrawn.
    Clear out the scroll bars, and ask for expose events, so we can
@@ -5630,7 +6436,7 @@ static int temp_index;
 static short temp_buffer[100];
 
 #define STORE_KEYSYM_FOR_DEBUG(keysym)                         \
-  if (temp_index == sizeof temp_buffer / sizeof (short))       \
+  if (temp_index == ARRAYELTS (temp_buffer))                   \
     temp_index = 0;                                            \
   temp_buffer[temp_index++] = (keysym)
 
@@ -5740,6 +6546,35 @@ static void xembed_send_message (struct frame *f, Time,
                                  enum xembed_message,
                                  long detail, long data1, long data2);
 
+static void
+x_net_wm_state (struct frame *f, Window window)
+{
+  int value = FULLSCREEN_NONE;
+  Lisp_Object lval = Qnil;
+  int sticky = 0;
+
+  (void)get_current_wm_state (f, window, &value, &sticky);
+
+  switch (value)
+    {
+    case FULLSCREEN_WIDTH:
+      lval = Qfullwidth;
+      break;
+    case FULLSCREEN_HEIGHT:
+      lval = Qfullheight;
+      break;
+    case FULLSCREEN_BOTH:
+      lval = Qfullboth;
+      break;
+    case FULLSCREEN_MAXIMIZED:
+      lval = Qmaximized;
+      break;
+    }
+
+  store_frame_param (f, Qfullscreen, lval);
+/**   store_frame_param (f, Qsticky, sticky ? Qt : Qnil); **/
+}
+
 /* Handles the XEvent EVENT on display DPYINFO.
 
    *FINISH is X_EVENT_GOTO_OUT if caller should stop reading events.
@@ -5937,6 +6772,12 @@ handle_one_xevent (struct x_display_info *dpyinfo,
            *finish = X_EVENT_GOTO_OUT;
             goto done;
           }
+        else if (event->xclient.message_type == dpyinfo->Xatom_Horizontal_Scrollbar)
+          {
+            x_horizontal_scroll_bar_to_input_event (event, &inev.ie);
+           *finish = X_EVENT_GOTO_OUT;
+            goto done;
+          }
 #endif /* USE_TOOLKIT_SCROLL_BARS */
 
        /* XEmbed messages from the embedder (if any).  */
@@ -5961,7 +6802,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
       break;
 
     case SelectionNotify:
-      dpyinfo->last_user_time = event->xselection.time;
+      x_display_set_last_user_time (dpyinfo, event->xselection.time);
 #ifdef USE_X_TOOLKIT
       if (! x_window_to_frame (dpyinfo, event->xselection.requestor))
         goto OTHER;
@@ -5970,7 +6811,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
       break;
 
     case SelectionClear:       /* Someone has grabbed ownership.  */
-      dpyinfo->last_user_time = event->xselectionclear.time;
+      x_display_set_last_user_time (dpyinfo, event->xselectionclear.time);
 #ifdef USE_X_TOOLKIT
       if (! x_window_to_frame (dpyinfo, event->xselectionclear.window))
         goto OTHER;
@@ -5979,14 +6820,14 @@ handle_one_xevent (struct x_display_info *dpyinfo,
         const XSelectionClearEvent *eventp = &event->xselectionclear;
 
         inev.ie.kind = SELECTION_CLEAR_EVENT;
-        SELECTION_EVENT_DISPLAY (&inev.sie) = eventp->display;
+        SELECTION_EVENT_DPYINFO (&inev.sie) = dpyinfo;
         SELECTION_EVENT_SELECTION (&inev.sie) = eventp->selection;
         SELECTION_EVENT_TIME (&inev.sie) = eventp->time;
       }
       break;
 
     case SelectionRequest:     /* Someone wants our selection.  */
-      dpyinfo->last_user_time = event->xselectionrequest.time;
+      x_display_set_last_user_time (dpyinfo, event->xselectionrequest.time);
 #ifdef USE_X_TOOLKIT
       if (!x_window_to_frame (dpyinfo, event->xselectionrequest.owner))
         goto OTHER;
@@ -5995,7 +6836,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
        const XSelectionRequestEvent *eventp = &event->xselectionrequest;
 
        inev.ie.kind = SELECTION_REQUEST_EVENT;
-       SELECTION_EVENT_DISPLAY (&inev.sie) = eventp->display;
+       SELECTION_EVENT_DPYINFO (&inev.sie) = dpyinfo;
        SELECTION_EVENT_REQUESTOR (&inev.sie) = eventp->requestor;
        SELECTION_EVENT_SELECTION (&inev.sie) = eventp->selection;
        SELECTION_EVENT_TARGET (&inev.sie) = eventp->target;
@@ -6005,23 +6846,33 @@ handle_one_xevent (struct x_display_info *dpyinfo,
       break;
 
     case PropertyNotify:
-      dpyinfo->last_user_time = event->xproperty.time;
+      x_display_set_last_user_time (dpyinfo, event->xproperty.time);
       f = x_top_window_to_frame (dpyinfo, event->xproperty.window);
       if (f && event->xproperty.atom == dpyinfo->Xatom_net_wm_state)
-        if (x_handle_net_wm_state (f, &event->xproperty)
-           && FRAME_ICONIFIED_P (f)
-           && f->output_data.x->net_wm_state_hidden_seen)
-          {
-            /* Gnome shell does not iconify us when C-z is pressed.
-              It hides the frame.  So if our state says we aren't
-              hidden anymore, treat it as deiconified.  */
-            SET_FRAME_VISIBLE (f, 1);
-            SET_FRAME_ICONIFIED (f, 0);
-            f->output_data.x->has_been_visible = 1;
-            f->output_data.x->net_wm_state_hidden_seen = 0;
-            inev.ie.kind = DEICONIFY_EVENT;
-            XSETFRAME (inev.ie.frame_or_window, f);
-          }
+       {
+         if (x_handle_net_wm_state (f, &event->xproperty)
+             && FRAME_ICONIFIED_P (f)
+             && f->output_data.x->net_wm_state_hidden_seen)
+           {
+             /* Gnome shell does not iconify us when C-z is pressed.
+                It hides the frame.  So if our state says we aren't
+                hidden anymore, treat it as deiconified.  */
+             SET_FRAME_VISIBLE (f, 1);
+             SET_FRAME_ICONIFIED (f, 0);
+             f->output_data.x->has_been_visible = 1;
+             f->output_data.x->net_wm_state_hidden_seen = 0;
+             inev.ie.kind = DEICONIFY_EVENT;
+             XSETFRAME (inev.ie.frame_or_window, f);
+           }
+         else if (! FRAME_ICONIFIED_P (f)
+                  && f->output_data.x->net_wm_state_hidden_seen)
+           {
+             SET_FRAME_VISIBLE (f, 0);
+             SET_FRAME_ICONIFIED (f, 1);
+             inev.ie.kind = ICONIFY_EVENT;
+             XSETFRAME (inev.ie.frame_or_window, f);
+           }
+       }
 
       x_handle_property_notify (&event->xproperty);
       xft_settings_event (dpyinfo, event);
@@ -6088,7 +6939,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
           goto OTHER;
 #else /* not USE_TOOLKIT_SCROLL_BARS */
           bar = x_window_to_scroll_bar (event->xexpose.display,
-                                        event->xexpose.window);
+                                        event->xexpose.window, 2);
 
           if (bar)
             x_scroll_bar_expose (bar, event);
@@ -6193,7 +7044,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
 
     case KeyPress:
 
-      dpyinfo->last_user_time = event->xkey.time;
+      x_display_set_last_user_time (dpyinfo, event->xkey.time);
       ignore_next_mouse_click_timeout = 0;
 
 #if defined (USE_X_TOOLKIT) || defined (USE_GTK)
@@ -6460,7 +7311,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
 
            for (i = 0, nchars = 0; i < nbytes; i++)
              {
-               if (ASCII_BYTE_P (copy_bufptr[i]))
+               if (ASCII_CHAR_P (copy_bufptr[i]))
                  nchars++;
                STORE_KEYSYM_FOR_DEBUG (copy_bufptr[i]);
              }
@@ -6527,7 +7378,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
 #endif
 
     case KeyRelease:
-      dpyinfo->last_user_time = event->xkey.time;
+      x_display_set_last_user_time (dpyinfo, event->xkey.time);
 #ifdef HAVE_X_I18N
       /* Don't dispatch this event since XtDispatchEvent calls
          XFilterEvent, and two calls in a row may freeze the
@@ -6538,7 +7389,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
 #endif
 
     case EnterNotify:
-      dpyinfo->last_user_time = event->xcrossing.time;
+      x_display_set_last_user_time (dpyinfo, event->xcrossing.time);
       x_detect_focus_change (dpyinfo, any, event, &inev.ie);
 
       f = any;
@@ -6563,7 +7414,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
       goto OTHER;
 
     case LeaveNotify:
-      dpyinfo->last_user_time = event->xcrossing.time;
+      x_display_set_last_user_time (dpyinfo, event->xcrossing.time);
       x_detect_focus_change (dpyinfo, any, event, &inev.ie);
 
       f = x_top_window_to_frame (dpyinfo, event->xcrossing.window);
@@ -6597,7 +7448,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
 
     case MotionNotify:
       {
-        dpyinfo->last_user_time = event->xmotion.time;
+        x_display_set_last_user_time (dpyinfo, event->xmotion.time);
         previous_help_echo_string = help_echo_string;
         help_echo_string = Qnil;
 
@@ -6652,7 +7503,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
 #ifndef USE_TOOLKIT_SCROLL_BARS
             struct scroll_bar *bar
               = x_window_to_scroll_bar (event->xmotion.display,
-                                        event->xmotion.window);
+                                        event->xmotion.window, 2);
 
             if (bar)
               x_scroll_bar_note_movement (bar, &event->xmotion);
@@ -6685,6 +7536,8 @@ handle_one_xevent (struct x_display_info *dpyinfo,
 #endif
       if (f)
         {
+         x_net_wm_state (f, event->xconfigure.window);
+
 #ifndef USE_X_TOOLKIT
 #ifndef USE_GTK
           int width = FRAME_PIXEL_TO_TEXT_WIDTH (f, event->xconfigure.width);
@@ -6707,9 +7560,6 @@ handle_one_xevent (struct x_display_info *dpyinfo,
              SET_FRAME_GARBAGED (f);
               cancel_mouse_face (f);
             }
-
-/**           FRAME_PIXEL_WIDTH (f) = event->xconfigure.width; **/
-/**           FRAME_PIXEL_HEIGHT (f) = event->xconfigure.height; **/
 #endif /* not USE_GTK */
 #endif
 
@@ -6738,7 +7588,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
 
        memset (&compose_status, 0, sizeof (compose_status));
        dpyinfo->last_mouse_glyph_frame = NULL;
-       dpyinfo->last_user_time = event->xbutton.time;
+       x_display_set_last_user_time (dpyinfo, event->xbutton.time);
 
         f = (x_mouse_grabbed (dpyinfo) ? dpyinfo->last_mouse_frame
             : x_window_to_frame (dpyinfo, event->xbutton.window));
@@ -6795,7 +7645,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
           {
             struct scroll_bar *bar
               = x_window_to_scroll_bar (event->xbutton.display,
-                                        event->xbutton.window);
+                                        event->xbutton.window, 2);
 
 #ifdef USE_TOOLKIT_SCROLL_BARS
             /* Make the "Ctrl-Mouse-2 splits window" work for toolkit
@@ -6815,9 +7665,10 @@ handle_one_xevent (struct x_display_info *dpyinfo,
           {
             dpyinfo->grabbed |= (1 << event->xbutton.button);
             dpyinfo->last_mouse_frame = f;
-
-            if (!tool_bar_p)
-              last_tool_bar_item = -1;
+#if ! defined (USE_GTK)
+            if (f && !tool_bar_p)
+              f->last_tool_bar_item = -1;
+#endif /* not USE_GTK */
           }
         else
           dpyinfo->grabbed &= ~(1 << event->xbutton.button);
@@ -6846,7 +7697,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
             && event->xbutton.x >= 0
             && event->xbutton.x < FRAME_PIXEL_WIDTH (f)
             && event->xbutton.y >= 0
-            && event->xbutton.y < f->output_data.x->menubar_height
+            && event->xbutton.y < FRAME_MENUBAR_HEIGHT (f)
             && event->xbutton.same_screen)
           {
            if (!f->output_data.x->saved_menu_event)
@@ -7372,9 +8223,13 @@ x_bitmap_icon (struct frame *f, Lisp_Object file)
 
 #ifdef USE_GTK
 
-         if (xg_set_icon (f, xg_default_icon_file)
-             || xg_set_icon_from_xpm_data (f, gnu_xpm_bits))
-           return 0;
+         if (FRAME_DISPLAY_INFO (f)->icon_bitmap_id == -2
+              || xg_set_icon (f, xg_default_icon_file)
+              || xg_set_icon_from_xpm_data (f, gnu_xpm_bits))
+            {
+              FRAME_DISPLAY_INFO (f)->icon_bitmap_id = -2;
+              return 0;
+            }
 
 #elif defined (HAVE_XPM) && defined (HAVE_X_WINDOWS)
 
@@ -7788,10 +8643,9 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
   FRAME_COLUMN_WIDTH (f) = font->average_width;
   FRAME_LINE_HEIGHT (f) = FONT_HEIGHT (font);
 
-  FRAME_TOOL_BAR_HEIGHT (f) = FRAME_TOOL_BAR_LINES (f) * FRAME_LINE_HEIGHT (f);
+#ifndef USE_X_TOOLKIT
   FRAME_MENU_BAR_HEIGHT (f) = FRAME_MENU_BAR_LINES (f) * FRAME_LINE_HEIGHT (f);
-
-  compute_fringe_widths (f, 1);
+#endif
 
   /* Compute character columns occupied by scrollbar.
 
@@ -7867,11 +8721,6 @@ xim_destroy_callback (XIM xim, XPointer client_data, XPointer call_data)
 
 #endif /* HAVE_X11R6 */
 
-#ifdef HAVE_X11R6
-/* This isn't prototyped in OSF 5.0 or 5.1a.  */
-extern char *XSetIMValues (XIM, ...);
-#endif
-
 /* Open the connection to the XIM server on display DPYINFO.
    RESOURCE_NAME is the resource name Emacs uses.  */
 
@@ -8106,7 +8955,7 @@ x_set_offset (struct frame *f, register int xoff, register int yoff, int change_
   x_calc_absolute_position (f);
 
   block_input ();
-  x_wm_set_size_hint (f, (long) 0, 0);
+  x_wm_set_size_hint (f, 0, 0);
 
   modified_left = f->left_pos;
   modified_top = f->top_pos;
@@ -8574,7 +9423,7 @@ x_sync_with_move (struct frame *f, int left, int top, int fuzzy)
           if (eabs (current_left - left) <= 10
              && eabs (current_top - top) <= 40)
             return;
-  }
+       }
       else if (current_left == left && current_top == top)
         return;
     }
@@ -8582,7 +9431,7 @@ x_sync_with_move (struct frame *f, int left, int top, int fuzzy)
   /* As a last resort, just wait 0.5 seconds and hope that XGetGeometry
      will then return up-to-date position info. */
 
-  wait_reading_process_output (0, 500000, 0, 0, Qnil, NULL, 0);
+  wait_reading_process_output (0, 500000000, 0, 0, Qnil, NULL, 0);
 }
 
 
@@ -8627,7 +9476,7 @@ x_wait_for_event (struct frame *f, int eventtype)
 }
 
 
-/* Change the size of frame F's X window to COLS/ROWS in the case F
+/* Change the size of frame F's X window to WIDTH/HEIGHT in the case F
    doesn't have a widget.  If CHANGE_GRAVITY is 1, we change to
    top-left-corner window gravity for this size change and subsequent
    size changes.  Otherwise we leave the window gravity unchanged.  */
@@ -8637,23 +9486,17 @@ x_set_window_size_1 (struct frame *f, int change_gravity, int width, int height,
 {
   int pixelwidth, pixelheight;
 
-  check_frame_size (f, &width, &height, pixelwise);
-
-  compute_fringe_widths (f, 0);
-
-  pixelwidth = ((pixelwise
-                ? FRAME_TEXT_TO_PIXEL_WIDTH (f, width)
-                : FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, width))
-               + FRAME_TOOLBAR_WIDTH (f));
+  pixelwidth = (pixelwise
+               ? FRAME_TEXT_TO_PIXEL_WIDTH (f, width)
+               : FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, width));
   pixelheight = ((pixelwise
                  ? FRAME_TEXT_TO_PIXEL_HEIGHT (f, height)
-                 : FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, height))
-                + FRAME_MENUBAR_HEIGHT (f)
-                + FRAME_TOOLBAR_HEIGHT (f));
+                 : FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, height)));
+
   if (change_gravity) f->win_gravity = NorthWestGravity;
-  x_wm_set_size_hint (f, (long) 0, 0);
+  x_wm_set_size_hint (f, 0, 0);
   XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
-                pixelwidth, pixelheight);
+                pixelwidth, pixelheight + FRAME_MENUBAR_HEIGHT (f));
 
 
   /* We've set {FRAME,PIXEL}_{WIDTH,HEIGHT} to the values we hope to
@@ -8683,7 +9526,7 @@ x_set_window_size_1 (struct frame *f, int change_gravity, int width, int height,
     x_wait_for_event (f, ConfigureNotify);
   else
     {
-      change_frame_size (f, width, height, 0, 1, 0, 1);
+      change_frame_size (f, pixelwidth, pixelheight, 0, 1, 0, 1);
       x_sync (f);
     }
 }
@@ -8699,8 +9542,9 @@ x_set_window_size (struct frame *f, int change_gravity, int width, int height, b
 {
   block_input ();
 
-  check_frame_size (f, &width, &height, pixelwise);
-
+  /* The following breaks our calculations.  If it's really needed,
+     think of something else.  */
+#if 0
   if (NILP (tip_frame) || XFRAME (tip_frame) != f)
     {
       int text_width, text_height;
@@ -8723,6 +9567,7 @@ x_set_window_size (struct frame *f, int change_gravity, int width, int height, b
 
       change_frame_size (f, text_width, text_height, 0, 1, 0, 1);
     }
+#endif
 
 #ifdef USE_GTK
   if (FRAME_GTK_WIDGET (f))
@@ -8736,9 +9581,7 @@ x_set_window_size (struct frame *f, int change_gravity, int width, int height, b
 #else /* not USE_GTK */
 
   x_set_window_size_1 (f, change_gravity, width, height, pixelwise);
-#if !defined USE_X_TOOLKIT
   x_clear_under_internal_border (f);
-#endif
 
 #endif /* not USE_GTK */
 
@@ -8752,35 +9595,14 @@ x_set_window_size (struct frame *f, int change_gravity, int width, int height, b
   cancel_mouse_face (f);
 
   unblock_input ();
-}
-\f
-/* Mouse warping.  */
-
-void
-x_set_mouse_position (struct frame *f, int x, int y)
-{
-  int pix_x, pix_y;
-
-  pix_x = FRAME_COL_TO_PIXEL_X (f, x) + FRAME_COLUMN_WIDTH (f) / 2;
-  pix_y = FRAME_LINE_TO_PIXEL_Y (f, y) + FRAME_LINE_HEIGHT (f) / 2;
 
-  if (pix_x < 0) pix_x = 0;
-  if (pix_x > FRAME_PIXEL_WIDTH (f)) pix_x = FRAME_PIXEL_WIDTH (f);
-
-  if (pix_y < 0) pix_y = 0;
-  if (pix_y > FRAME_PIXEL_HEIGHT (f)) pix_y = FRAME_PIXEL_HEIGHT (f);
-
-  block_input ();
-
-  XWarpPointer (FRAME_X_DISPLAY (f), None, FRAME_X_WINDOW (f),
-               0, 0, 0, 0, pix_x, pix_y);
-  unblock_input ();
+  do_pending_window_change (0);
 }
 
 /* Move the mouse to position pixel PIX_X, PIX_Y relative to frame F.  */
 
 void
-x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y)
+frame_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y)
 {
   block_input ();
 
@@ -9081,7 +9903,7 @@ x_make_frame_invisible (struct frame *f)
      program-specified, so that when the window is mapped again, it will be
      placed at the same location, without forcing the user to position it
      by hand again (they have already done that once for this window.)  */
-  x_wm_set_size_hint (f, (long) 0, 1);
+  x_wm_set_size_hint (f, 0, 1);
 
 #ifdef USE_GTK
   if (FRAME_GTK_OUTER_WIDGET (f))
@@ -9251,6 +10073,11 @@ x_free_frame_resources (struct frame *f)
      commands to the X server.  */
   if (dpyinfo->display)
     {
+      /* Always exit with visible pointer to avoid weird issue
+        with Xfixes (Bug#17609).  */
+      if (f->pointer_invisible)
+       FRAME_DISPLAY_INFO (f)->toggle_visible_pointer (f, 0);
+
       /* We must free faces before destroying windows because some
         font-driver (e.g. xft) access a window while finishing a
         face.  */
@@ -9288,6 +10115,9 @@ x_free_frame_resources (struct frame *f)
        XDestroyWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
 
       free_frame_menubar (f);
+
+      if (f->shell_position)
+       xfree (f->shell_position);
 #else  /* !USE_X_TOOLKIT */
 
 #ifdef USE_GTK
@@ -9309,13 +10139,13 @@ x_free_frame_resources (struct frame *f)
        unload_color (f, f->output_data.x->scroll_bar_background_pixel);
       if (f->output_data.x->scroll_bar_foreground_pixel != -1)
        unload_color (f, f->output_data.x->scroll_bar_foreground_pixel);
-#ifdef USE_TOOLKIT_SCROLL_BARS
+#if defined (USE_LUCID) && defined (USE_TOOLKIT_SCROLL_BARS)
       /* Scrollbar shadow colors.  */
       if (f->output_data.x->scroll_bar_top_shadow_pixel != -1)
        unload_color (f, f->output_data.x->scroll_bar_top_shadow_pixel);
       if (f->output_data.x->scroll_bar_bottom_shadow_pixel != -1)
        unload_color (f, f->output_data.x->scroll_bar_bottom_shadow_pixel);
-#endif /* USE_TOOLKIT_SCROLL_BARS */
+#endif /* USE_LUCID && USE_TOOLKIT_SCROLL_BARS */
       if (f->output_data.x->white_relief.pixel != -1)
        unload_color (f, f->output_data.x->white_relief.pixel);
       if (f->output_data.x->black_relief.pixel != -1)
@@ -9403,6 +10233,9 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
   XSizeHints size_hints;
   Window window = FRAME_OUTER_WINDOW (f);
 
+  if (!window)
+    return;
+
 #ifdef USE_X_TOOLKIT
   if (f->output_data.x->widget)
     {
@@ -9436,8 +10269,6 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
     base_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 0);
     base_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 0);
 
-    check_frame_size (f, &min_cols, &min_rows, 0);
-
     if (frame_resize_pixelwise)
       /* Needed to prevent a bad protocol error crash when making the
         frame size very small.  */
@@ -9734,6 +10565,96 @@ my_log_handler (const gchar *log_domain, GLogLevelFlags log_level,
 }
 #endif
 
+/* Create invisible cursor on X display referred by DPYINFO.  */
+
+static Cursor
+make_invisible_cursor (struct x_display_info *dpyinfo)
+{
+  Display *dpy = dpyinfo->display;
+  static char const no_data[] = { 0 };
+  Pixmap pix;
+  XColor col;
+  Cursor c = 0;
+
+  x_catch_errors (dpy);
+  pix = XCreateBitmapFromData (dpy, dpyinfo->root_window, no_data, 1, 1);
+  if (! x_had_errors_p (dpy) && pix != None)
+    {
+      Cursor pixc;
+      col.pixel = 0;
+      col.red = col.green = col.blue = 0;
+      col.flags = DoRed | DoGreen | DoBlue;
+      pixc = XCreatePixmapCursor (dpy, pix, pix, &col, &col, 0, 0);
+      if (! x_had_errors_p (dpy) && pixc != None)
+        c = pixc;
+      XFreePixmap (dpy, pix);
+    }
+
+  x_uncatch_errors ();
+
+  return c;
+}
+
+/* True if DPY supports Xfixes extension >= 4.  */
+
+static bool
+x_probe_xfixes_extension (Display *dpy)
+{
+#ifdef HAVE_XFIXES
+  int major, minor;
+  return XFixesQueryVersion (dpy, &major, &minor) && major >= 4;
+#else
+  return false;
+#endif /* HAVE_XFIXES */
+}
+
+/* Toggle mouse pointer visibility on frame F by using Xfixes functions.  */
+
+static void
+xfixes_toggle_visible_pointer (struct frame *f, bool invisible)
+{
+#ifdef HAVE_XFIXES
+  if (invisible)
+    XFixesHideCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
+  else
+    XFixesShowCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
+  f->pointer_invisible = invisible;
+#else
+  emacs_abort ();
+#endif /* HAVE_XFIXES */
+}
+
+/* Toggle mouse pointer visibility on frame F by using invisible cursor.  */
+
+static void
+x_toggle_visible_pointer (struct frame *f, bool invisible)
+{
+  eassert (FRAME_DISPLAY_INFO (f)->invisible_cursor != 0);
+  if (invisible)
+    XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+                  FRAME_DISPLAY_INFO (f)->invisible_cursor);
+  else
+    XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
+                  f->output_data.x->current_cursor);
+  f->pointer_invisible = invisible;
+}
+
+/* Setup pointer blanking, prefer Xfixes if available.  */
+
+static void
+x_setup_pointer_blanking (struct x_display_info *dpyinfo)
+{
+  /* FIXME: the brave tester should set EMACS_XFIXES because we're suspecting
+     X server bug, see http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17609.  */
+  if (egetenv ("EMACS_XFIXES") && x_probe_xfixes_extension (dpyinfo->display))
+    dpyinfo->toggle_visible_pointer = xfixes_toggle_visible_pointer;
+  else
+    {
+      dpyinfo->toggle_visible_pointer = x_toggle_visible_pointer;
+      dpyinfo->invisible_cursor = make_invisible_cursor (dpyinfo);
+    }
+}
+
 /* Current X display connection identifier.  Incremented for each next
    connection established.  */
 static unsigned x_display_id;
@@ -9745,7 +10666,6 @@ static unsigned x_display_id;
 struct x_display_info *
 x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
 {
-  int connection;
   Display *dpy;
   struct terminal *terminal;
   struct x_display_info *dpyinfo;
@@ -9797,10 +10717,6 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
 
         XSetLocaleModifiers ("");
 
-        /* Emacs can only handle core input events, so make sure
-           Gtk doesn't use Xinput or Xinput2 extensions.  */
-       xputenv ("GDK_CORE_DEVICE_EVENTS=1");
-
         /* Work around GLib bug that outputs a faulty warning. See
            https://bugzilla.gnome.org/show_bug.cgi?id=563627.  */
         id = g_log_set_handler ("GLib", G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL
@@ -9959,8 +10875,9 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
   dpyinfo->x_id = ++x_display_id;
   dpyinfo->x_id_name = xmalloc (SBYTES (Vinvocation_name)
                                + SBYTES (Vsystem_name) + 2);
-  strcat (strcat (strcpy (dpyinfo->x_id_name, SSDATA (Vinvocation_name)), "@"),
-         SSDATA (Vsystem_name));
+  char *nametail = lispstpcpy (dpyinfo->x_id_name, Vinvocation_name);
+  *nametail++ = '@';
+  lispstpcpy (nametail, Vsystem_name);
 
   /* Figure out which modifier bits mean what.  */
   x_find_modifier_meanings (dpyinfo);
@@ -9974,6 +10891,9 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
   dpyinfo->vertical_scroll_bar_cursor
     = XCreateFontCursor (dpyinfo->display, XC_sb_v_double_arrow);
 
+  dpyinfo->horizontal_scroll_bar_cursor
+    = XCreateFontCursor (dpyinfo->display, XC_sb_h_double_arrow);
+
   xrdb = x_load_resources (dpyinfo->display, xrm_option,
                           resource_name, EMACS_CLASS);
 #ifdef HAVE_XRMSETDATABASE
@@ -10011,11 +10931,11 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
     {
       if (dpyinfo->visual->class == PseudoColor)
        {
-         Lisp_Object value;
-         value = display_x_get_resource (dpyinfo,
-                                         build_string ("privateColormap"),
-                                         build_string ("PrivateColormap"),
-                                         Qnil, Qnil);
+         AUTO_STRING (privateColormap, "privateColormap");
+         AUTO_STRING (PrivateColormap, "PrivateColormap");
+         Lisp_Object value
+           = display_x_get_resource (dpyinfo, privateColormap,
+                                     PrivateColormap, Qnil, Qnil);
          if (STRINGP (value)
              && (!strcmp (SSDATA (value), "true")
                  || !strcmp (SSDATA (value), "on")))
@@ -10028,14 +10948,27 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
 
 #ifdef HAVE_XFT
   {
-    /* If we are using Xft, check dpi value in X resources.
-       It is better we use it as well, since Xft will use it, as will all
-       Gnome applications.  If our real DPI is smaller or larger than the
-       one Xft uses, our font will look smaller or larger than other
-       for other applications, even if it is the same font name (monospace-10
-       for example).  */
-    char *v = XGetDefault (dpyinfo->display, "Xft", "dpi");
+    /* If we are using Xft, the following precautions should be made:
+
+       1. Make sure that the Xrender extension is added before the Xft one.
+       Otherwise, the close-display hook set by Xft is called after the one
+       for Xrender, and the former tries to re-add the latter.  This results
+       in inconsistency of internal states and leads to X protocol error when
+       one reconnects to the same X server (Bug#1696).
+
+       2. Check dpi value in X resources.  It is better we use it as well,
+       since Xft will use it, as will all Gnome applications.  If our real DPI
+       is smaller or larger than the one Xft uses, our font will look smaller
+       or larger than other for other applications, even if it is the same
+       font name (monospace-10 for example).  */
+
+    int event_base, error_base;
+    char *v;
     double d;
+
+    XRenderQueryExtension (dpyinfo->display, &event_base, &error_base);
+
+    v = XGetDefault (dpyinfo->display, "Xft", "dpi");
     if (v != NULL && sscanf (v, "%lf", &d) == 1)
       dpyinfo->resy = dpyinfo->resx = d;
   }
@@ -10096,6 +11029,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
       ATOM_REFS_INIT ("DONE", Xatom_DONE)
       ATOM_REFS_INIT ("PAGE", Xatom_PAGE)
       ATOM_REFS_INIT ("SCROLLBAR", Xatom_Scrollbar)
+      ATOM_REFS_INIT ("HORIZONTAL_SCROLLBAR", Xatom_Horizontal_Scrollbar)
       ATOM_REFS_INIT ("_XEMBED", Xatom_XEMBED)
       /* EWMH */
       ATOM_REFS_INIT ("_NET_WM_STATE", Xatom_net_wm_state)
@@ -10125,11 +11059,11 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
     };
 
     int i;
-    const int atom_count = sizeof (atom_refs) / sizeof (atom_refs[0]);
-    /* 1 for _XSETTINGS_SN  */
-    const int total_atom_count = 1 + atom_count;
-    Atom *atoms_return = xmalloc (total_atom_count * sizeof *atoms_return);
-    char **atom_names = xmalloc (total_atom_count * sizeof *atom_names);
+    enum { atom_count = ARRAYELTS (atom_refs) };
+    /* 1 for _XSETTINGS_SN.  */
+    enum { total_atom_count = 1 + atom_count };
+    Atom atoms_return[total_atom_count];
+    char *atom_names[total_atom_count];
     static char const xsettings_fmt[] = "_XSETTINGS_S%d";
     char xsettings_atom_name[sizeof xsettings_fmt - 2
                             + INT_STRLEN_BOUND (int)];
@@ -10137,7 +11071,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
     for (i = 0; i < atom_count; i++)
       atom_names[i] = (char *) atom_refs[i].name;
 
-    /* Build _XSETTINGS_SN atom name */
+    /* Build _XSETTINGS_SN atom name */
     sprintf (xsettings_atom_name, xsettings_fmt,
             XScreenNumberOfScreen (dpyinfo->screen));
     atom_names[i] = xsettings_atom_name;
@@ -10148,11 +11082,8 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
     for (i = 0; i < atom_count; i++)
       *(Atom *) ((char *) dpyinfo + atom_refs[i].offset) = atoms_return[i];
 
-    /* Manual copy of last atom */
+    /* Manually copy last atom.  */
     dpyinfo->Xatom_xsettings_sel = atoms_return[i];
-
-    xfree (atom_names);
-    xfree (atoms_return);
   }
 
   dpyinfo->x_dnd_atoms_size = 8;
@@ -10163,24 +11094,24 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
                                   gray_bits, gray_width, gray_height,
                                   1, 0, 1);
 
+  x_setup_pointer_blanking (dpyinfo);
+
 #ifdef HAVE_X_I18N
   xim_initialize (dpyinfo, resource_name);
 #endif
 
   xsettings_initialize (dpyinfo);
 
-  connection = ConnectionNumber (dpyinfo->display);
-
   /* This is only needed for distinguishing keyboard and process input.  */
-  if (connection != 0)
-    add_keyboard_wait_descriptor (connection);
+  if (dpyinfo->connection != 0)
+    add_keyboard_wait_descriptor (dpyinfo->connection);
 
 #ifdef F_SETOWN
-  fcntl (connection, F_SETOWN, getpid ());
+  fcntl (dpyinfo->connection, F_SETOWN, getpid ());
 #endif /* ! defined (F_SETOWN) */
 
   if (interrupt_input)
-    init_sigio (connection);
+    init_sigio (dpyinfo->connection);
 
 #ifdef USE_LUCID
   {
@@ -10199,6 +11130,8 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
       emacs_abort ();
     if (x_had_errors_p (dpy) || !XQueryFont (dpy, font))
       XrmPutLineResource (&xrdb, "Emacs.dialog.*.font: 9x15");
+    /* Do not free XFontStruct returned by the above call to XQueryFont.
+       This leads to X protocol errors at XtCloseDisplay (Bug#18403).  */
     x_uncatch_errors ();
   }
 #endif
@@ -10206,11 +11139,10 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
   /* See if we should run in synchronous mode.  This is useful
      for debugging X code.  */
   {
-    Lisp_Object value;
-    value = display_x_get_resource (dpyinfo,
-                                   build_string ("synchronous"),
-                                   build_string ("Synchronous"),
-                                   Qnil, Qnil);
+    AUTO_STRING (synchronous, "synchronous");
+    AUTO_STRING (Synchronous, "Synchronous");
+    Lisp_Object value = display_x_get_resource (dpyinfo, synchronous,
+                                               Synchronous, Qnil, Qnil);
     if (STRINGP (value)
        && (!strcmp (SSDATA (value), "true")
            || !strcmp (SSDATA (value), "on")))
@@ -10218,11 +11150,10 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
   }
 
   {
-    Lisp_Object value;
-    value = display_x_get_resource (dpyinfo,
-                                   build_string ("useXIM"),
-                                   build_string ("UseXIM"),
-                                   Qnil, Qnil);
+    AUTO_STRING (useXIM, "useXIM");
+    AUTO_STRING (UseXIM, "UseXIM");
+    Lisp_Object value = display_x_get_resource (dpyinfo, useXIM, UseXIM,
+                                               Qnil, Qnil);
 #ifdef USE_XIM
     if (STRINGP (value)
        && (!strcmp (SSDATA (value), "false")
@@ -10239,8 +11170,8 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
 #ifdef HAVE_X_SM
   /* Only do this for the very first display in the Emacs session.
      Ignore X session management when Emacs was first started on a
-     tty.  */
-  if (terminal->id == 1)
+     tty or started as a daemon.  */
+  if (terminal->id == 1 && ! IS_DAEMON)
     x_session_initialize (dpyinfo);
 #endif
 
@@ -10364,7 +11295,9 @@ static struct redisplay_interface x_redisplay_interface =
     x_draw_window_cursor,
     x_draw_vertical_window_border,
     x_draw_window_divider,
-    x_shift_glyphs_for_insert
+    x_shift_glyphs_for_insert,
+    x_show_hourglass,
+    x_hide_hourglass
   };
 
 
@@ -10429,15 +11362,17 @@ x_delete_terminal (struct terminal *terminal)
       XCloseDisplay (dpyinfo->display);
 #endif
 #endif /* ! USE_GTK */
-    }
 
-  /* No more input on this descriptor.  */
-  if (0 <= dpyinfo->connection)
-    delete_keyboard_wait_descriptor (dpyinfo->connection);
+      /* No more input on this descriptor.  Do not close it because
+        it's already closed by X(t)CloseDisplay (Bug#18403).  */
+      eassert (0 <= dpyinfo->connection);
+      delete_keyboard_wait_descriptor (dpyinfo->connection);
+
+      /* Mark as dead. */
+      dpyinfo->display = NULL;
+      dpyinfo->connection = -1;
+    }
 
-  /* Mark as dead. */
-  dpyinfo->display = NULL;
-  dpyinfo->connection = -1;
   x_delete_display (dpyinfo);
   unblock_input ();
 }
@@ -10450,9 +11385,8 @@ x_create_terminal (struct x_display_info *dpyinfo)
 {
   struct terminal *terminal;
 
-  terminal = create_terminal ();
+  terminal = create_terminal (output_x_window, &x_redisplay_interface);
 
-  terminal->type = output_x_window;
   terminal->display_info.x = dpyinfo;
   dpyinfo->terminal = terminal;
 
@@ -10463,37 +11397,36 @@ x_create_terminal (struct x_display_info *dpyinfo)
   terminal->delete_glyphs_hook = x_delete_glyphs;
   terminal->ring_bell_hook = XTring_bell;
   terminal->toggle_invisible_pointer_hook = XTtoggle_invisible_pointer;
-  terminal->reset_terminal_modes_hook = NULL;
-  terminal->set_terminal_modes_hook = NULL;
   terminal->update_begin_hook = x_update_begin;
   terminal->update_end_hook = x_update_end;
-  terminal->set_terminal_window_hook = NULL;
   terminal->read_socket_hook = XTread_socket;
   terminal->frame_up_to_date_hook = XTframe_up_to_date;
   terminal->mouse_position_hook = XTmouse_position;
   terminal->frame_rehighlight_hook = XTframe_rehighlight;
   terminal->frame_raise_lower_hook = XTframe_raise_lower;
   terminal->fullscreen_hook = XTfullscreen_hook;
+  terminal->menu_show_hook = x_menu_show;
+#if defined (USE_X_TOOLKIT) || defined (USE_GTK)
+  terminal->popup_dialog_hook = xw_popup_dialog;
+#endif
   terminal->set_vertical_scroll_bar_hook = XTset_vertical_scroll_bar;
+  terminal->set_horizontal_scroll_bar_hook = XTset_horizontal_scroll_bar;
   terminal->condemn_scroll_bars_hook = XTcondemn_scroll_bars;
   terminal->redeem_scroll_bar_hook = XTredeem_scroll_bar;
   terminal->judge_scroll_bars_hook = XTjudge_scroll_bars;
-
   terminal->delete_frame_hook = x_destroy_window;
   terminal->delete_terminal_hook = x_delete_terminal;
-
-  terminal->rif = &x_redisplay_interface;
+  /* Other hooks are NULL by default.  */
 
   return terminal;
 }
 
-void
+static void
 x_initialize (void)
 {
   baud_rate = 19200;
 
   x_noop_count = 0;
-  last_tool_bar_item = -1;
   any_help_event_p = 0;
   ignore_next_mouse_click_timeout = 0;
 
@@ -10533,6 +11466,15 @@ x_initialize (void)
   XSetIOErrorHandler (x_io_error_quitter);
 }
 
+#ifdef USE_GTK
+void
+init_xterm (void)
+{
+  /* Emacs can handle only core input events, so make sure
+     Gtk doesn't use Xinput or Xinput2 extensions.  */
+  xputenv ("GDK_CORE_DEVICE_EVENTS=1");
+}
+#endif
 
 void
 syms_of_xterm (void)
index 2bed0d1d5d174847f4715e0da4eb7ea6dcbedcc4..ed611f1d19fa16bc31ef46f173b02afd55e37cc9 100644 (file)
@@ -47,7 +47,6 @@ typedef Widget xt_or_gtk_widget;
 
 /* Some definitions to reduce conditionals.  */
 typedef GtkWidget *xt_or_gtk_widget;
-#define XtParent(x) (gtk_widget_get_parent (x))
 #undef XSync
 #define XSync(d, b) do { gdk_window_process_all_updates (); \
                          XSync (d, b);  } while (false)
@@ -78,6 +77,8 @@ typedef GtkWidget *xt_or_gtk_widget;
 #include "dispextern.h"
 #include "termhooks.h"
 
+INLINE_HEADER_BEGIN
+
 /* Black and white pixel values for the screen which frame F is on.  */
 #define BLACK_PIX_DEFAULT(f)                                   \
   BlackPixel (FRAME_X_DISPLAY (f), FRAME_X_SCREEN_NUMBER (f))
@@ -177,9 +178,16 @@ struct x_display_info
   /* The cursor to use for vertical scroll bars.  */
   Cursor vertical_scroll_bar_cursor;
 
-  /* The invisible cursor used for pointer blanking.  */
+  /* The cursor to use for horizontal scroll bars.  */
+  Cursor horizontal_scroll_bar_cursor;
+
+  /* The invisible cursor used for pointer blanking.
+     Unused if this display supports Xfixes extension.  */
   Cursor invisible_cursor;
 
+  /* Function used to toggle pointer visibility on this display.  */
+  void (*toggle_visible_pointer) (struct frame *, bool);
+
 #ifdef USE_GTK
   /* The GDK cursor for scroll bars and popup menus.  */
   GdkCursor *xg_cursor;
@@ -277,8 +285,8 @@ struct x_display_info
   /* More atoms for Ghostscript support.  */
   Atom Xatom_DONE, Xatom_PAGE;
 
-  /* Atom used in toolkit scroll bar client messages.  */
-  Atom Xatom_Scrollbar;
+  /* Atoms used in toolkit scroll bar client messages.  */
+  Atom Xatom_Scrollbar, Xatom_Horizontal_Scrollbar;
 
   /* Atom used in XEmbed client messages.  */
   Atom Xatom_XEMBED, Xatom_XEMBED_INFO;
@@ -426,11 +434,11 @@ extern void select_visual (struct x_display_info *);
 
 struct x_output
 {
-  /* Height of menu bar widget, in pixels.
-     Zero if not using the X toolkit.
-     When using the toolkit, this value is not meaningful
-     if the menubar is turned off.  */
+#if defined (USE_X_TOOLKIT) || defined (USE_GTK)
+  /* Height of menu bar widget, in pixels.  This value
+     is not meaningful if the menubar is turned off.  */
   int menubar_height;
+#endif
 
   /* Height of tool bar widget, in pixels.  top_height is used if tool bar
      at top, bottom_height if tool bar is at the bottom.
@@ -539,10 +547,12 @@ struct x_output
      bars).  */
   unsigned long scroll_bar_background_pixel;
 
-  /* Top and bottom shadow colors for 3d toolkit scrollbars.  -1 means
-     let the scroll compute them itself.  */
+#if defined (USE_LUCID) && defined (USE_TOOLKIT_SCROLL_BARS)
+  /* Top and bottom shadow colors for 3D Lucid scrollbars.
+     -1 means let the scroll compute them itself.  */
   unsigned long scroll_bar_top_shadow_pixel;
   unsigned long scroll_bar_bottom_shadow_pixel;
+#endif
 
   /* Descriptor for the cursor in use for this window.  */
   Cursor text_cursor;
@@ -644,6 +654,13 @@ struct x_output
   int move_offset_left;
 };
 
+/* Extreme 'short' and 'long' values suitable for libX11.  */
+#define X_SHRT_MAX 0x7fff
+#define X_SHRT_MIN (-1 - X_SHRT_MAX)
+#define X_LONG_MAX 0x7fffffff
+#define X_LONG_MIN (-1 - X_LONG_MAX)
+#define X_ULONG_MAX 0xffffffffUL
+
 #define No_Cursor (None)
 
 enum
@@ -712,10 +729,14 @@ enum
 #endif /* !USE_GTK */
 #endif
 
+#if defined (USE_X_TOOLKIT) || defined (USE_GTK)
+#define FRAME_MENUBAR_HEIGHT(f) ((f)->output_data.x->menubar_height)
+#else
+#define FRAME_MENUBAR_HEIGHT(f) ((void) f, 0)
+#endif /* USE_X_TOOLKIT || USE_GTK */
 
 #define FRAME_FONT(f) ((f)->output_data.x->font)
 #define FRAME_FONTSET(f) ((f)->output_data.x->fontset)
-#define FRAME_MENUBAR_HEIGHT(f) ((f)->output_data.x->menubar_height)
 #define FRAME_TOOLBAR_TOP_HEIGHT(f) ((f)->output_data.x->toolbar_top_height)
 #define FRAME_TOOLBAR_BOTTOM_HEIGHT(f) \
   ((f)->output_data.x->toolbar_bottom_height)
@@ -814,6 +835,14 @@ struct scroll_bar
   /* Last scroll bar part seen in xaw_jump_callback and xaw_scroll_callback.  */
   enum scroll_bar_part last_seen_part;
 #endif
+
+#if defined (USE_TOOLKIT_SCROLL_BARS) && !defined (USE_GTK)
+  /* Last value of whole for horizontal scrollbars.  */
+  int whole;
+#endif
+
+  /* 1 if the scroll bar is horizontal.  */
+  bool horizontal;
 };
 
 /* Turning a lisp vector value into a pointer to a struct scroll_bar.  */
@@ -860,6 +889,28 @@ struct scroll_bar
 #define VERTICAL_SCROLL_BAR_INSIDE_HEIGHT(f, height) \
   ((height) - VERTICAL_SCROLL_BAR_TOP_BORDER - VERTICAL_SCROLL_BAR_BOTTOM_BORDER)
 
+/* Return the inside height of a horizontal scroll bar, given the outside
+   height.  */
+#define HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT(f, height) \
+  ((height) \
+   - HORIZONTAL_SCROLL_BAR_TOP_BORDER \
+   - HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER)
+
+/* Return the length of the rectangle within which the left part of the
+   handle must stay.  This isn't equivalent to the inside width, because
+   the scroll bar handle has a minimum width.
+
+   This is the real range of motion for the scroll bar, so when we're
+   scaling buffer positions to scroll bar positions, we use this, not
+   HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH.  */
+#define HORIZONTAL_SCROLL_BAR_LEFT_RANGE(f, width) \
+  (HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH (f, width) - HORIZONTAL_SCROLL_BAR_MIN_HANDLE)
+
+/* Return the inside width of horizontal scroll bar, given the outside
+   width.  See HORIZONTAL_SCROLL_BAR_LEFT_RANGE too.  */
+#define HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH(f, width) \
+  ((width) - HORIZONTAL_SCROLL_BAR_LEFT_BORDER - HORIZONTAL_SCROLL_BAR_LEFT_BORDER)
+
 
 /* Border widths for scroll bars.
 
@@ -877,8 +928,14 @@ struct scroll_bar
 #define VERTICAL_SCROLL_BAR_TOP_BORDER (2)
 #define VERTICAL_SCROLL_BAR_BOTTOM_BORDER (2)
 
+#define HORIZONTAL_SCROLL_BAR_LEFT_BORDER (2)
+#define HORIZONTAL_SCROLL_BAR_RIGHT_BORDER (2)
+#define HORIZONTAL_SCROLL_BAR_TOP_BORDER (2)
+#define HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER (2)
+
 /* Minimum lengths for scroll bar handles, in pixels.  */
 #define VERTICAL_SCROLL_BAR_MIN_HANDLE (5)
+#define HORIZONTAL_SCROLL_BAR_MIN_HANDLE (5)
 
 /* If a struct input_event has a kind which is SELECTION_REQUEST_EVENT
    or SELECTION_CLEAR_EVENT, then its contents are really described
@@ -890,15 +947,21 @@ struct scroll_bar
 struct selection_input_event
 {
   int kind;
-  Display *display;
+  struct x_display_info *dpyinfo;
   /* We spell it with an "o" here because X does.  */
   Window requestor;
   Atom selection, target, property;
   Time time;
 };
 
-#define SELECTION_EVENT_DISPLAY(eventp)        \
-  (((struct selection_input_event *) (eventp))->display)
+/* Unlike macros below, this can't be used as an lvalue.  */
+INLINE Display *
+SELECTION_EVENT_DISPLAY (struct input_event *ev)
+{
+  return ((struct selection_input_event *) ev)->dpyinfo->display;
+}
+#define SELECTION_EVENT_DPYINFO(eventp) \
+  (((struct selection_input_event *) (eventp))->dpyinfo)
 /* We spell it with an "o" here because X does.  */
 #define SELECTION_EVENT_REQUESTOR(eventp)      \
   (((struct selection_input_event *) (eventp))->requestor)
@@ -914,6 +977,7 @@ struct selection_input_event
 /* From xfns.c.  */
 
 extern void x_free_gcs (struct frame *);
+extern void x_relative_mouse_position (struct frame *, int *, int *);
 
 /* From xrdb.c.  */
 
@@ -929,9 +993,6 @@ extern void x_check_errors (Display *, const char *)
 extern bool x_had_errors_p (Display *);
 extern void x_uncatch_errors (void);
 extern void x_clear_errors (Display *);
-extern void x_set_window_size (struct frame *, int, int, int, bool);
-extern void x_set_mouse_position (struct frame *, int, int);
-extern void x_set_mouse_pixel_position (struct frame *, int, int);
 extern void xembed_request_focus (struct frame *);
 extern void x_ewmh_activate_frame (struct frame *);
 extern void x_delete_terminal (struct terminal *terminal);
@@ -946,7 +1007,6 @@ extern bool x_alloc_lighter_color_for_widget (Widget, Display *, Colormap,
                                              double, int);
 #endif
 extern bool x_alloc_nearest_color (struct frame *, Colormap, XColor *);
-extern void x_query_color (struct frame *f, XColor *);
 extern void x_clear_area (Display *, Window, int, int, int, int);
 #if !defined USE_X_TOOLKIT && !defined USE_GTK
 extern void x_mouse_leave (struct x_display_info *);
@@ -956,11 +1016,31 @@ extern void x_mouse_leave (struct x_display_info *);
 extern int x_dispatch_event (XEvent *, Display *);
 #endif
 extern int x_x_to_emacs_modifiers (struct x_display_info *, int);
-extern int x_display_pixel_height (struct x_display_info *);
-extern int x_display_pixel_width (struct x_display_info *);
+
+INLINE int
+x_display_pixel_height (struct x_display_info *dpyinfo)
+{
+  return HeightOfScreen (dpyinfo->screen);
+}
+
+INLINE int
+x_display_pixel_width (struct x_display_info *dpyinfo)
+{
+  return WidthOfScreen (dpyinfo->screen);
+}
+
+INLINE void
+x_display_set_last_user_time (struct x_display_info *dpyinfo, Time t)
+{
+#ifdef ENABLE_CHECKING
+  eassert (t <= X_ULONG_MAX);
+#endif
+  dpyinfo->last_user_time = t;
+}
 
 extern void x_set_sticky (struct frame *, Lisp_Object, Lisp_Object);
 extern void x_wait_for_event (struct frame *, int);
+extern void x_clear_under_internal_border (struct frame *f);
 
 /* Defined in xselect.c.  */
 
@@ -993,16 +1073,11 @@ extern Lisp_Object x_property_data_to_lisp (struct frame *,
 extern void x_clipboard_manager_save_frame (Lisp_Object);
 extern void x_clipboard_manager_save_all (void);
 
-/* Defined in xfns.c */
-
-extern Lisp_Object x_get_focus_frame (struct frame *);
-
 #ifdef USE_GTK
 extern int xg_set_icon (struct frame *, Lisp_Object);
-extern int xg_set_icon_from_xpm_data (struct frame *, const char**);
+extern int xg_set_icon_from_xpm_data (struct frame *, const char **);
 #endif /* USE_GTK */
 
-extern void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object);
 extern void xic_free_xfontset (struct frame *);
 extern void create_frame_xic (struct frame *);
 extern void destroy_frame_xic (struct frame *);
@@ -1033,18 +1108,9 @@ extern Lisp_Object xw_popup_dialog (struct frame *, Lisp_Object, Lisp_Object);
 #if defined USE_GTK || defined USE_MOTIF
 extern void x_menu_set_in_use (int);
 #endif
-#ifdef USE_MOTIF
 extern void x_menu_wait_for_event (void *data);
-#endif
-extern int popup_activated (void);
 extern void initialize_frame_menubar (struct frame *);
 
-/* Defined in widget.c */
-
-#ifdef USE_X_TOOLKIT
-extern void widget_store_internal_border (Widget);
-#endif
-
 /* Defined in xsmfns.c */
 #ifdef HAVE_X_SM
 extern void x_session_initialize (struct x_display_info *dpyinfo);
@@ -1056,10 +1122,6 @@ extern void x_session_close (void);
 
 extern Lisp_Object Qx_gtk_map_stock;
 
-#if !defined USE_X_TOOLKIT && !defined USE_GTK
-extern void x_clear_under_internal_border (struct frame *f);
-#endif
-
 /* Is the frame embedded into another application? */
 
 #define FRAME_X_EMBEDDED_P(f) (FRAME_X_OUTPUT(f)->explicit_parent != 0)
@@ -1079,4 +1141,6 @@ extern void x_clear_under_internal_border (struct frame *f);
    (nr).width = (rwidth),                              \
    (nr).height = (rheight))
 
+INLINE_HEADER_END
+
 #endif /* XTERM_H */
index 264173fa557d62fffe8c765c7c2d8f271f8eb651..1ef5ee99775656e8b3b893ba31214da0d8619818 100644 (file)
-2014-10-01  Glenn Morris  <rgm@gnu.org>
+2014-10-08  Leo Liu  <sdl.web@gmail.com>
+
+       * automated/print-tests.el: New file.
+       (terpri): Tests for terpri.  (Bug#18652)
+
+2014-10-06  Glenn Morris  <rgm@gnu.org>
+
+       * automated/icalendar-tests.el (icalendar--calendar-style):
+       Remove test, no longer relevant.
+
+2014-10-04  Glenn Morris  <rgm@gnu.org>
+
+       * automated/package-x-test.el: Remove file...
+       * automated/package-test.el: ... merge package-x-test.el.  (Bug#18574)
+
+2014-10-02  Glenn Morris  <rgm@gnu.org>
 
        * automated/package-test.el (with-package-test, package-test-signed):
        Also set HOME to a temp value, in case the real one is absent (e.g.
        hydra) or read-only.  (Bug#18575)
        (package-test-signed): Use skip-unless rather than expected-result.
 
-2014-09-01  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+2014-09-26  Leo Liu  <sdl.web@gmail.com>
 
-       * automated/python-tests.el:
-       (python-indent-electric-colon-1): New test.  (Bug#18228)
+       * automated/cl-lib.el (cl-digit-char-p, cl-parse-integer): New
+       tests.  (Bug#18557)
+
+2014-09-24  Ulf Jasper  <ulf.jasper@web.de>
+
+       * automated/newsticker-tests.el
+       (newsticker--group-find-parent-group),
+       (newsticker--group-do-rename-group): New tests.
+
+2014-09-09  Eli Zaretskii  <eliz@gnu.org>
+
+       * automated/fns-tests.el (fns-tests-collate-sort): Bind
+       w32-collate-ignore-punctuation to t when sorting according to
+       UTS#10 rules.
+
+2014-09-07  Michael Albinus  <michael.albinus@gmx.de>
+
+       * automated/fns-tests.el (fns-tests--collate-enabled-p): New function.
+       (fns-tests-collate-strings, fns-tests-collate-sort): Use it.
+
+2014-09-05  Michael Albinus  <michael.albinus@gmx.de>
+
+       * automated/fns-tests.el (fns-tests-compare-strings): In case
+       `compare-strings' shall return t, check for this.
+       (fns-tests-collate-strings, fns-tests-collate-sort): New tests.
+
+2014-09-03  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+
+       * automated/python-tests.el (python-indent-electric-colon-1):
+       New test.  (Bug#18228)
+
+2014-08-29  Dmitry Antipov  <dmantipov@yandex.ru>
 
-2014-08-18  Glenn Morris  <rgm@gnu.org>
+       * automated/fns-tests.el (fns-tests-sort): New test.
+
+2014-08-28  Glenn Morris  <rgm@gnu.org>
 
        * automated/python-tests.el (python-shell-calculate-exec-path-2):
        Update test for today's python.el changes.
 
+2014-08-13  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+       * automated/compile-tests.el (compile--test-error-line): Grok FILE
+       being nil.  Allows for Guile tests to pass.
+       (compile-tests--test-regexps-data): Add Guile tests.
+
 2014-08-11  Glenn Morris  <rgm@gnu.org>
 
        * automated/data/files-bug18141.el.gz: New file.
        * automated/files.el (files-test-bug-18141-file):
        New variable and test.  (Bug#18141)
 
+2014-08-10  Ulf Jasper  <ulf.jasper@web.de>
+
+       Enumerate evaluated sexp diary entries (Bug#7911).
+       * automated/icalendar-tests.el (icalendar--convert-anniversary-to-ical)
+       (icalendar--convert-cyclic-to-ical, icalendar--convert-block-to-ical)
+       (icalendar--convert-yearly-to-ical, icalendar--convert-weekly-to-ical)
+       (icalendar--convert-ordinary-to-ical): Returns cons cell now.
+       (icalendar--convert-to-ical, icalendar--convert-sexp-to-ical):
+       New tests.
+
 2014-08-07  Glenn Morris  <rgm@gnu.org>
 
-       * automated/Makefile.in (check-tar): Remove, no longer needed.
+       * automated/Makefile.in (check-tar): Remove, hydra recipe does it now.
+
+2014-08-06  Ulf Jasper  <ulf.jasper@web.de>
+
+       * automated/icalendar-tests.el (icalendar--convert-ordinary-to-ical)
+       (icalendar--diarytime-to-isotime): More testcases (Bug#13750).
 
 2014-08-03  Glenn Morris  <rgm@gnu.org>
 
-       * automated/Makefile.in (check-tar): Add as alias for check.
+       * automated/Makefile.in (check-tar): New rule.
+
+2014-08-02  Glenn Morris  <rgm@gnu.org>
+
+       * automated/fns-tests.el (fns-tests-compare-strings):
+       Update test.  (Bug#17903)
 
-2014-07-20  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+       * automated/icalendar-tests.el (icalendar--decode-isodatetime):
+       Use more precise TZ specification, as per 2013-08-04.
+
+2014-07-30  Ulf Jasper  <ulf.jasper@web.de>
+
+       * automated/icalendar-tests.el (icalendar--decode-isodatetime):
+       New test.
+
+2014-07-28  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * automated/timer-tests.el (timer-tests-debug-timer-check): New test.
+
+2014-07-26  Ulf Jasper  <ulf.jasper@web.de>
+
+       * automated/icalendar-tests.el (icalendar-tests--do-test-import):
+       Work around the failures in icalendar-tests which occasionally occur on
+       hydra.nixos.org.
+
+2014-07-21  Fabián Ezequiel Gallina  <fgallina@gnu.org>
 
        * automated/python-tests.el:
        (python-util-clone-local-variables-1): Fix test.
 
-2014-07-17  Fabián Ezequiel Gallina  <fgallina@gnu.org>
-
        * automated/python-tests.el (python-shell-make-comint-1):
        (python-shell-make-comint-2): Fix indentation.
        (python-shell-make-comint-3)
        (python-shell-prompt-set-calculated-regexps-6)
        (python-util-valid-regexp-p-1): New tests.
 
-2014-07-09  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+2014-07-21  Stefan Monnier  <monnier@iro.umontreal.ca>
 
-       * automated/python-tests.el
-       (python-indent-block-enders-1)
+       * automated/advice-tests.el (advice-test-call-interactively): Make sure
+       the function's definition is fully restored at the end.
+
+2014-07-12  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+
+       * automated/python-tests.el (python-indent-block-enders-1)
        (python-indent-block-enders-2): Fix tests.
-       (python-indent-block-enders-3)
-       (python-indent-block-enders-4)
-       (python-indent-block-enders-5)
-       (python-indent-dedenters-1)
+       (python-indent-block-enders-3, python-indent-block-enders-4)
+       (python-indent-block-enders-5, python-indent-dedenters-1)
        (python-indent-dedenters-2): Remove tests.
-       (python-indent-dedenters-1)
-       (python-indent-dedenters-2)
-       (python-indent-dedenters-3)
-       (python-indent-dedenters-4)
-       (python-indent-dedenters-5)
-       (python-indent-dedenters-6)
+       (python-indent-dedenters-1, python-indent-dedenters-2)
+       (python-indent-dedenters-3, python-indent-dedenters-4)
+       (python-indent-dedenters-5, python-indent-dedenters-6)
        (python-indent-dedenters-7)
        (python-info-dedenter-opening-block-position-1)
        (python-info-dedenter-opening-block-position-2)
        (python-info-dedenter-statement-p-4)
        (python-info-dedenter-statement-p-5): New tests.
 
-2014-07-01  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+2014-07-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 
-       * automated/python-tests.el
-       (python-tests-self-insert): New function.
+       * indent/perl.perl: Add indentation pattern for hash-table entries.
+
+2014-07-04  Michael Albinus  <michael.albinus@gmx.de>
+
+       * automated/dbus-tests.el (dbus-test02-register-service-session)
+       (dbus-test02-register-service-system): Fix docstring.
+       (dbus-test02-register-service-own-bus)
+       (dbus-test03-peer-interface): New tests.
+
+2014-07-03  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+
+       * automated/python-tests.el (python-tests-self-insert): New function.
        (python-triple-quote-pairing): Use it.
        (python-parens-electric-indent-1): New test. (Bug#17658)
 
+2014-06-30  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+
+       * automated/subr-x-tests.el: New file.
+
+2014-06-29  Michael Albinus  <michael.albinus@gmx.de>
+
+       * automated/tramp-tests.el (tramp--instrument-test-case):
+       Print debug buffer in any case.
+
 2014-06-28  Leo Liu  <sdl.web@gmail.com>
 
        * automated/calc-tests.el: New file and add tests for math-bignum.
        (Bug#17556)
 
-2014-06-27  Michael Albinus  <michael.albinus@gmx.de>
+2014-06-28  Michael Albinus  <michael.albinus@gmx.de>
 
        * automated/dbus-tests.el (dbus--test-register-service)
        (dbus-test02-register-service-session): Replace `dbus-ping' calls
        by `dbus-list-known-names'.  (Bug#17858)
 
-2014-06-25  Stefan Monnier  <monnier@iro.umontreal.ca>
+2014-06-28  Glenn Morris  <rgm@gnu.org>
+
+       * automated/Makefile.in (GDB): New variable.
+       (emacs): Use $GDB.  (Bug#15991)
+
+       * automated/Makefile.in (WRITE_LOG): New variable.
+       (%.log): Use WRITE_LOG.
+       (test_template): Disable logging.
+
+       * automated/Makefile.in (TESTS): New list of short PHONY aliases.
+       (test_template): New definition.  Apply to TESTS.
+
+2014-06-27  Glenn Morris  <rgm@gnu.org>
+
+       * automated/Makefile.in (check-maybe): Rename from check.
+       (check): Re-run all the tests, every time.
+       (clean, mostlyclean): Also delete *.log~.
+
+2014-06-26  Glenn Morris  <rgm@gnu.org>
+
+       * automated/package-x-test.el: Do not mess with load-path.
+
+       * automated/Makefile.in (%.log): If error, dump log to stdout.
+
+2014-06-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * automated/package-test.el (package-test-update-listing)
        (package-test-update-archives, package-test-describe-package):
        Adjust tests according to new package-list-unsigned.
 
+2014-06-26  Glenn Morris  <rgm@gnu.org>
+
+       * automated/ert-tests.el (no-byte-compile): Set it.  (Bug#17851)
+
+       * automated/eieio-tests.el (no-byte-compile): Set it.  (Bug#17852)
+
+       * automated/Makefile.in: Simplify and parallelize.  (Bug#15991)
+       (XARGS_LIMIT, BYTE_COMPILE_EXTRA_FLAGS)
+       (setwins, compile-targets, compile-main, compile-clean): Remove.
+       (GREP_OPTIONS): Unexport.
+       (.el.elc): Replace with pattern rule.
+       (%.elc, %.log): New pattern rules.
+       (ELFILES, LOGFILES): New variables.
+       (check): Depend on LOGFILES.  Call ert-summarize-tests-batch-and-exit.
+       (clean, mostlyclean): New rules.
+       (bootstrap-clean): Simplify.
+       (bootstrap-clean, distclean): Depend on clean.
+
+2014-06-25  Glenn Morris  <rgm@gnu.org>
+
+       * automated/flymake-tests.el (flymake-tests--current-face):
+       Sleep for longer.  Avoid querying.
+
+2014-06-25  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * automated/fns-tests.el (fns-tests-compare-string): New test.
+
+2014-06-24  Michael Albinus  <michael.albinus@gmx.de>
+
+       * automated/tramp-tests.el (tramp-test26-process-file): Extend test
+       according to Bug#17815.
+
 2014-06-21  Fabián Ezequiel Gallina  <fgallina@gnu.org>
 
        * automated/python-tests.el (python-util-strip-string-1): New test.
 
+2014-06-15  Michael Albinus  <michael.albinus@gmx.de>
+
+       Sync with Tramp 2.2.10.
+
+       * automated/tramp-tests.el (tramp--test-enabled): Ignore errors.
+       (tramp--instrument-test-case): Extend docstring.
+       (tramp-test15-copy-directory): Skip for tramp-smb.el.
+       (tramp-test21-file-links): Use `file-truename' for directories.
+       (tramp-test27-start-file-process, tramp-test28-shell-command):
+       Retrieve process output more robustly.
+       (tramp--test-check-files): Extend test.
+       (tramp-test30-special-characters): Skip for tramp-adb.el,
+       tramp-gvfs.el and tramp-smb.el.  Add further file names.
+
+2014-06-13  Glenn Morris  <rgm@gnu.org>
+
+       * automated/Makefile.in (compile-main):
+       GNU make automatically passes command-line arguments to sub-makes.
+
+2014-06-05  Michal Nazarewicz  <mina86@mina86.com>
+
+       * automated/tildify-tests.el (tildify-test--test): Optimize the test
+       slightly by reusing the same temporary buffer across multiple test
+       cases.
+
+       * automated/tildify-tests.el (tildify-test-find-env-end-re-bug)
+       (tildify-test-find-env-group-index-bug): Update to support new
+       signature of the `tildify-foreach-region-outside-env' function.
+       Namely, it now takes pairs as an argument instead of looking it up in
+       `tildify-ignored-environments-alist'.
+
+       * automated/tildify-tests.el (tildify-test--example-html): Add support
+       for generating XML code, so that…
+       (tildify-test-xml) …test can be added to check handling of XML
+       documents.
+
+       * automated/tildify-tests.el (tildify-test-find-env-group-index-bug):
+       New test checking end-regex building when multiple environment pairs
+       use integers to refer to capture groups.
+
+       * automated/tildify-tests.el (tildify-test-find-env-end-re-bug): New
+       test checking end-regex building in `tildify-find-env' function when
+       integers (denoting capture groups) and strings are mixed together.
+
+2014-06-02  Michael Albinus  <michael.albinus@gmx.de>
+
+       * automated/tramp-tests.el (tramp-remote-process-environment): Declare.
+       (tramp-test29-vc-registered): Set $BZR_HOME.  Remove instrumentation.
+
+2014-06-01  Michael Albinus  <michael.albinus@gmx.de>
+
+       * automated/tramp-tests.el (tramp-test29-vc-registered):
+       Instrument failed test case.
+
+2014-05-29  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * automated/ruby-mode-tests.el (ruby-assert-face): Use font-lock-ensure.
+       (ruby-interpolation-keeps-non-quote-syntax): Use syntax-propertize.
+
+2014-05-21  Michal Nazarewicz  <mina86@mina86.com>
+
+       * automated/tildify-tests.el: New file.
+
+2014-05-27  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * indent/ruby.rb: Add one more test.
+
+       * indent/ps-mode.ps: New file.
+
+       * indent/octave.m: Add a few more tests.
+
+       * automated/core-elisp-tests.el
+       (core-elisp-test-window-configurations): New test.
+
+2014-05-26  Glenn Morris  <rgm@gnu.org>
+
+       * automated/package-test.el (package-test-install-single):
+       Update for changed output.
+
+2014-05-22  Glenn Morris  <rgm@gnu.org>
+
+       * automated/bytecomp-tests.el (test-byte-comp-compile-and-load):
+       Fix handling of temporary elc files.
+
+       * automated/fns-tests.el (fns-tests-nreverse):
+       Update for changed string behavior.
+
+2014-05-15  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * automated/fns-tests.el: New file.
+       * automated/fns-tests.el (fns-tests-nreverse)
+       (fns-tests-nreverse-bool-vector): New tests.
+
 2014-05-08  Glenn Morris  <rgm@gnu.org>
 
        * automated/vc-bzr.el (vc-bzr-test-bug9726, vc-bzr-test-bug9781)
        (vc-bzr-test-faulty-bzr-autoloads):
        Give bzr a temporary home-directory, in case the real one is missing.
 
-2014-05-05  Dmitry Gutov  <dgutov@yandex.ru>
+2014-05-08  Dmitry Gutov  <dgutov@yandex.ru>
 
-       * automated/ruby-mode-tests.el
-       (ruby-interpolation-after-dollar-sign): New test.
+       * automated/ruby-mode-tests.el (ruby-interpolation-after-dollar-sign):
+       New test.
 
-2014-05-05  Glenn Morris  <rgm@gnu.org>
+2014-05-08  Glenn Morris  <rgm@gnu.org>
 
        * automated/help-fns.el: New file.
 
+2014-05-01  Barry O'Reilly  <gundaetiapo@gmail.com>
+
+       * automated/undo-tests.el (undo-test-region-deletion): New test to
+       demonstrate bug#17235.
+       (undo-test-region-example): New test to verify example given in
+       comments for undo-make-selective-list.
+
 2014-04-25  Michael Albinus  <michael.albinus@gmx.de>
 
        * automated/tramp-tests.el (top):
        passwords in batch mode.
        (password-cache-expiry): Set to nil.
 
-2014-04-24  Michael Albinus  <michael.albinus@gmx.de>
-
        * automated/file-notify-tests.el
        (file-notify-test-remote-temporary-file-directory):
        * automated/tramp-tests.el (tramp-test-temporary-file-directory):
        only if there is a usable timestamp.
        (tramp--test-check-files): Do not use `copy-sequence'.
 
+2014-04-22  Daniel Colascione  <dancol@dancol.org>
+
+       * automated/bytecomp-tests.el (test-byte-comp-compile-and-load):
+       Add compile flag.
+       (test-byte-comp-macro-expansion)
+       (test-byte-comp-macro-expansion-eval-and-compile)
+       (test-byte-comp-macro-expansion-eval-when-compile)
+       (test-byte-comp-macro-expand-lexical-override): Use it.
+       (test-eager-load-macro-expansion)
+       (test-eager-load-macro-expansion-eval-and-compile)
+       (test-eager-load-macro-expansion-eval-when-compile)
+       (test-eager-load-macro-expand-lexical-override): New tests.
+
+       * automated/cl-lib.el (cl-lib-struct-accessors): Fix test to
+       account for removal of `cl-struct-set-slot-value'. Also, move
+       the defstruct to top level.
+
+2014-04-21  Daniel Colascione  <dancol@dancol.org>
+
+       * automated/bytecomp-tests.el (test-byte-comp-compile-and-load):
+       New function.
+       (test-byte-comp-macro-expansion)
+       (test-byte-comp-macro-expansion-eval-and-compile)
+       (test-byte-comp-macro-expansion-eval-when-compile)
+       (test-byte-comp-macro-expand-lexical-override): New tests.
+
+       * automated/cl-lib.el (cl-loop-destructuring-with): New test.
+       (cl-the): Fix cl-the test.
+
+2014-04-20  Daniel Colascione  <dancol@dancol.org>
+
+       * automated/cl-lib.el (cl-lib-struct-accessors,cl-the): New tests.
+
 2014-04-19  Michael Albinus  <michael.albinus@gmx.de>
 
        * automated/tramp-tests.el (tramp--test-check-files): Extend test.
        (tramp-test34-unload): New tests.
        (tramp-test31-utf8, tramp-test32-asynchronous-requests):  Rename.
 
-2014-04-10  Paul Eggert  <eggert@cs.ucla.edu>
+2014-04-11  Glenn Morris  <rgm@gnu.org>
+
+       * automated/Makefile.in (EMACSDATA, EMACSDOC, EMACSPATH): Unexport.
+
+2014-04-11  Paul Eggert  <eggert@cs.ucla.edu>
 
        * automated/electric-tests.el: Fix spelling error in test name.
        (whitespace-skipping-for-quotes-not-outside):
        Rename from whitespace-skipping-for-quotes-not-ouside.
 
+2014-04-09  Daniel Colascione  <dancol@dancol.org>
+
+       * automated/syntax-tests.el: New file.
+
 2014-04-09  Glenn Morris  <rgm@gnu.org>
 
        * automated/python-tests.el (python-triple-quote-pairing):
 
 2014-04-07  João Távora  <joaotavora@gmail.com>
 
-       * automated/electric-tests.el (define-electric-pair-test):
-       Don't overtest.
-       (inhibit-in-mismatched-string-inside-ruby-comments): New test.
-       (inhibit-in-mismatched-string-inside-c-comments): New test.
-
-       * automated/electric-tests.el (inhibit-if-strings-mismatched):
-       New test, change from `inhibit-only-of-next-is-mismatched'.
-
-2014-04-06  João Távora  <joaotavora@gmail.com>
-
        * automated/python-tests.el (python-triple-quote-pairing): New test.
        (python-syntax-after-python-backspace): New test.
 
        (whitespace-skipping-for-quotes-only-inside)
        (whitespace-skipping-quotes-not-without-proper-syntax): New tests.
 
-2014-03-24  Barry O'Reilly  <gundaetiapo@gmail.com>
+2014-04-04  João Távora  <joaotavora@gmail.com>
+
+       * automated/electric-tests.el (define-electric-pair-test):
+       Don't overtest.
+       (inhibit-in-mismatched-string-inside-ruby-comments): New test.
+       (inhibit-in-mismatched-string-inside-c-comments): New test.
+
+2014-04-02  João Távora  <joaotavora@gmail.com>
+
+       * automated/electric-tests.el (inhibit-if-strings-mismatched):
+       New test, change from `inhibit-only-of-next-is-mismatched'.
+
+2014-03-26  Barry O'Reilly  <gundaetiapo@gmail.com>
 
        * automated/undo-tests.el (undo-test-marker-adjustment-nominal):
        (undo-test-region-t-marker): New tests of marker adjustments.
        (undo-test-region-mark-adjustment): New tests to demonstrate
        bug#16818, which fail without the fix.
 
-2014-03-23  Daniel Colascione  <dancol@dancol.org>
-
-       * automated/cl-lib.el (cl-lib-keyword-names-versus-values): New
-       test: correct parsing of keyword arguments.
-
 2014-03-23  Dmitry Gutov  <dgutov@yandex.ru>
 
        * automated/package-test.el (package-test-describe-package):
        Fix test failure in non-graphical mode.
 
+2014-03-23  Daniel Colascione  <dancol@dancol.org>
+
+       * automated/subword-tests.el (subword-tests2): More subword tests.
+
+       * automated/cl-lib.el (cl-lib-keyword-names-versus-values): New
+       test: correct parsing of keyword arguments.
+
 2014-03-22  Dmitry Gutov  <dgutov@yandex.ru>
 
        * automated/package-test.el (package-test-describe-package):
index 764b80ece93136c8d0e0c055896d44b6c333d185..e0eaffa4c2c09284cb5c926956e761be5e8db55e 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
+### Commentary:
+
+## Some targets:
+## check: re-run all tests, writing to .log files.
+## check-maybe: run all tests whose .log file needs updating
+## filename.log: run tests from filename.el(c) if .log file needs updating
+## filename: re-run tests from filename.el(c), with no logging
+
+### Code:
+
 SHELL = @SHELL@
 
 srcdir = @srcdir@
@@ -24,10 +34,6 @@ VPATH = $(srcdir)
 
 SEPCHAR = @SEPCHAR@
 
-# Empty for all systems except MinGW, where xargs needs an explicit
-# limitation.
-XARGS_LIMIT = @XARGS_LIMIT@
-
 # We never change directory before running Emacs, so a relative file
 # name is fine, and makes life easier.  If we need to change
 # directory, we can use emacs --chdir.
@@ -38,84 +44,94 @@ EMACS = ../../src/emacs
 # but we might as well be explicit.
 EMACSOPT = -batch --no-site-file --no-site-lisp -L "$(SEPCHAR)$(srcdir)"
 
-# Extra flags to pass to the byte compiler.
-BYTE_COMPILE_EXTRA_FLAGS =
+# Prevent any settings in the user environment causing problems.
+unexport EMACSDATA EMACSDOC EMACSPATH GREP_OPTIONS
+
+## To run tests under a debugger, set this to eg: "gdb --args".
+GDB =
 
 # The actual Emacs command run in the targets below.
 # Prevent any setting of EMACSLOADPATH in user environment causing problems.
-emacs = EMACSLOADPATH= LC_ALL=C EMACS_TEST_DIRECTORY=$(srcdir) "$(EMACS)" $(EMACSOPT)
-
-# Common command to find subdirectories
-setwins=for file in `find $(srcdir) -type d -print`; do \
-          case $$file in $(srcdir)*/data* | $(srcdir)*/flymake* ) ;; \
-               *) wins="$$wins$${wins:+ }$$file" ;; \
-          esac; \
-        done
+emacs = EMACSLOADPATH= LC_ALL=C EMACS_TEST_DIRECTORY=$(srcdir) $(GDB) "$(EMACS)" $(EMACSOPT)
 
 .PHONY: all check
 
 all: check
 
-# The compilation stuff is copied from lisp/Makefile - see comments there.
-
-.SUFFIXES: .elc .el
-
-.el.elc:
+%.elc: %.el
        @echo Compiling $<
-       @$(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $<
-
-
-.PHONY: compile-targets compile-main compile-clean
-
-# TARGETS is set dynamically in the recursive call from `compile-main'.
-compile-targets: $(TARGETS)
-
-# Compile all the Elisp files that need it.  Beware: it approximates
-# `no-byte-compile', so watch out for false-positives!
-compile-main: compile-clean
-       @$(setwins); \
-       els=`echo "$$wins " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.el |g'`; \
-       for el in $$els; do \
-         test -f $$el || continue; \
-         test ! -f $${el}c && GREP_OPTIONS= grep '^;.*no-byte-compile: t' $$el > /dev/null && continue; \
-         echo "$${el}c"; \
-       done | xargs $(XARGS_LIMIT) echo | \
-       while read chunk; do \
-         $(MAKE) $(MFLAGS) compile-targets EMACS="$(EMACS)" TARGETS="$$chunk"; \
-       done
-
-# Erase left-over .elc files that do not have a corresponding .el file.
-compile-clean:
-       @$(setwins); \
-       elcs=`echo "$$wins " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.elc |g'`; \
-       for el in $$(echo $$elcs | sed -e 's/\.elc/\.el/g'); do \
-         if test -f "$$el" -o \! -f "$${el}c"; then :; else \
-           echo rm "$${el}c"; \
-           rm "$${el}c"; \
-         fi \
-       done
-
-
-.PHONY: bootstrap-clean distclean maintainer-clean
-
-bootstrap-clean:
-       -cd $(srcdir) && rm -f *.elc */*.elc */*/*.elc */*/*/*.elc
-
-distclean:
+       @$(emacs) -f batch-byte-compile $<
+
+## Ignore any test errors so we can continue to test other files.
+## But compilation errors are always fatal.
+WRITE_LOG = >& $@ || { stat=ERROR; cat $@; }; echo $$stat: $@
+
+## I'd prefer to use -emacs -f ert-run-tests-batch-and-exit rather
+## than || true, since the former makes problems more obvious.
+## I'd also prefer to @-hide the grep part and not the
+## ert-run-tests-batch-and-exit part.
+##
+## We need to use $loadfile because:
+## i) -L :$srcdir -l basename does not work, because we have files whose
+## basename duplicates a file in lisp/ (eg eshell.el).
+## ii) Although -l basename will automatically load .el or .elc,
+## -l ./basename treats basename as a literal file (it would be nice
+## to change this; bug#17848 - if that gets done, this can be simplified).
+##
+## Beware: it approximates `no-byte-compile', so watch out for false-positives!
+%.log: ${srcdir}/%.el
+       @if grep '^;.*no-byte-compile: t' $< > /dev/null; then \
+         loadfile=$<; \
+       else \
+         loadfile=$<c; \
+         ${MAKE} $$loadfile; \
+       fi; \
+       echo Testing $$loadfile; \
+       stat=OK ; \
+       $(emacs) -l ert -l $$loadfile \
+         -f ert-run-tests-batch-and-exit ${WRITE_LOG}
+
+ELFILES = $(wildcard ${srcdir}/*.el)
+LOGFILES = $(patsubst %.el,%.log,$(notdir ${ELFILES}))
+TESTS = ${LOGFILES:.log=}
+
+## If we have to interrupt a hanging test, preserve the log so we can
+## see what the problem was.
+.PRECIOUS: %.log
+
+.PHONY: ${TESTS}
+
+## The short aliases that always re-run the tests, with no logging.
+define test_template
+$(1):
+       @test ! -f $(1).log || mv $(1).log $(1).log~
+       @${MAKE} $(1).log WRITE_LOG=
+endef
+
+$(foreach test,${TESTS},$(eval $(call test_template,${test})))
+
+
+## Re-run all the tests every time.
+check:
+       -@for f in *.log; do test ! -f $$f || mv $$f $$f~; done
+       @${MAKE} check-maybe
+
+## Only re-run tests whose .log is older than the test.
+.PHONY: check-maybe
+check-maybe: ${LOGFILES}
+       $(emacs) -l ert -f ert-summarize-tests-batch-and-exit $^
+
+.PHONY: mostlyclean clean bootstrap-clean distclean maintainer-clean
+
+clean mostlyclean:
+       -rm -f *.log *.log~
+
+bootstrap-clean: clean
+       -rm -f ${srcdir}/*.elc
+
+distclean: clean
        rm -f Makefile
 
 maintainer-clean: distclean bootstrap-clean
 
-
-check: compile-main
-       @$(setwins); \
-       pattern=`echo "$$wins " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.el |g'`; \
-       for el in $$pattern; do \
-         test -f $$el || continue; \
-         args="$$args -l $$el"; \
-         els="$$els $$el"; \
-       done; \
-       echo Testing $$els; \
-       $(emacs) $$args -f ert-run-tests-batch-and-exit
-
 # Makefile ends here.
index a87d979f919ab819390d53fa63f1de01c973da0f..bbb4adda9fd665e3dcb03c74f36795556096fc22 100644 (file)
@@ -160,7 +160,8 @@ function being an around advice."
           (advice-add 'call-interactively :before #'ignore)
           (should (equal (sm-test7.4) '(1 . nil)))
           (should (equal (call-interactively 'sm-test7.4) '(1 . t))))
-      (fset 'call-interactively old))))
+      (advice-remove 'call-interactively #'ignore)
+      (should (eq (symbol-function 'call-interactively) old)))))
 
 (ert-deftest advice-test-interactive ()
   "Check handling of interactive spec."
index 0a9a301dd0d883caaaf96c3eb40135fa48e448b4..1d96f1cdfcecaa7bef48c7bbdef1d8ebf767963a 100644 (file)
@@ -305,6 +305,95 @@ Subtests signal errors if something goes wrong."
                            'face fail-face)))
       (insert "\n"))))
 
+(defun test-byte-comp-compile-and-load (compile &rest forms)
+  (let ((elfile nil)
+        (elcfile nil))
+    (unwind-protect
+         (progn
+           (setf elfile (make-temp-file "test-bytecomp" nil ".el"))
+           (when compile
+             (setf elcfile (make-temp-file "test-bytecomp" nil ".elc")))
+           (with-temp-buffer
+             (dolist (form forms)
+               (print form (current-buffer)))
+             (write-region (point-min) (point-max) elfile))
+           (if compile
+               (let ((byte-compile-dest-file-function
+                      (lambda (e) elcfile)))
+                 (byte-compile-file elfile t))
+             (load elfile)))
+      (when elfile (delete-file elfile))
+      (when elcfile (delete-file elcfile)))))
+(put 'test-byte-comp-compile-and-load 'lisp-indent-function 1)
+
+(ert-deftest test-byte-comp-macro-expansion ()
+  (test-byte-comp-compile-and-load t
+    '(progn (defmacro abc (arg) 1) (defun def () (abc 2))))
+  (should (equal (funcall 'def) 1)))
+
+(ert-deftest test-byte-comp-macro-expansion-eval-and-compile ()
+  (test-byte-comp-compile-and-load t
+    '(eval-and-compile (defmacro abc (arg) -1) (defun def () (abc 2))))
+  (should (equal (funcall 'def) -1)))
+
+(ert-deftest test-byte-comp-macro-expansion-eval-when-compile ()
+  ;; Make sure we interpret eval-when-compile forms properly.  CLISP
+  ;; and SBCL interpreter eval-when-compile (well, the CL equivalent)
+  ;; in the same way.
+  (test-byte-comp-compile-and-load t
+    '(eval-when-compile
+      (defmacro abc (arg) -10)
+      (defun abc-1 () (abc 2)))
+    '(defmacro abc-2 () (abc-1))
+    '(defun def () (abc-2)))
+  (should (equal (funcall 'def) -10)))
+
+(ert-deftest test-byte-comp-macro-expand-lexical-override ()
+  ;; Intuitively, one might expect the defmacro to override the
+  ;; macrolet since macrolet's is explicitly called out as being
+  ;; equivalent to toplevel, but CLISP and SBCL both evaluate the form
+  ;; this way, so we should too.
+  (test-byte-comp-compile-and-load t
+    '(require 'cl-lib)
+    '(cl-macrolet ((m () 4))
+      (defmacro m () 5)
+      (defun def () (m))))
+  (should (equal (funcall 'def) 4)))
+
+(ert-deftest test-eager-load-macro-expansion ()
+  (test-byte-comp-compile-and-load nil
+    '(progn (defmacro abc (arg) 1) (defun def () (abc 2))))
+  (should (equal (funcall 'def) 1)))
+
+(ert-deftest test-eager-load-macro-expansion-eval-and-compile ()
+  (test-byte-comp-compile-and-load nil
+    '(eval-and-compile (defmacro abc (arg) -1) (defun def () (abc 2))))
+  (should (equal (funcall 'def) -1)))
+
+(ert-deftest test-eager-load-macro-expansion-eval-when-compile ()
+  ;; Make sure we interpret eval-when-compile forms properly.  CLISP
+  ;; and SBCL interpreter eval-when-compile (well, the CL equivalent)
+  ;; in the same way.
+  (test-byte-comp-compile-and-load nil
+    '(eval-when-compile
+      (defmacro abc (arg) -10)
+      (defun abc-1 () (abc 2)))
+    '(defmacro abc-2 () (abc-1))
+    '(defun def () (abc-2)))
+  (should (equal (funcall 'def) -10)))
+
+(ert-deftest test-eager-load-macro-expand-lexical-override ()
+  ;; Intuitively, one might expect the defmacro to override the
+  ;; macrolet since macrolet's is explicitly called out as being
+  ;; equivalent to toplevel, but CLISP and SBCL both evaluate the form
+  ;; this way, so we should too.
+  (test-byte-comp-compile-and-load nil
+    '(require 'cl-lib)
+    '(cl-macrolet ((m () 4))
+      (defmacro m () 5)
+      (defun def () (m))))
+  (should (equal (funcall 'def) 4)))
+
 
 ;; Local Variables:
 ;; no-byte-compile: t
index 0587bf92b7ca0c0ee2dd53e6157c173498f09282..e4c6e914ee2a76e2e6f999ca6724a2d591e4e329 100644 (file)
                     :b :a :a 42)
            '(42 :a))))
 
+(cl-defstruct mystruct (abc :readonly t) def)
+(ert-deftest cl-lib-struct-accessors ()
+  (let ((x (make-mystruct :abc 1 :def 2)))
+    (should (eql (cl-struct-slot-value 'mystruct 'abc x) 1))
+    (should (eql (cl-struct-slot-value 'mystruct 'def x) 2))
+    (setf (cl-struct-slot-value 'mystruct 'def x) -1)
+    (should (eql (cl-struct-slot-value 'mystruct 'def x) -1))
+    (should (eql (cl-struct-slot-offset 'mystruct 'abc) 1))
+    (should-error (cl-struct-slot-offset 'mystruct 'marypoppins))
+    (should (equal (cl-struct-slot-info 'mystruct)
+                   '((cl-tag-slot) (abc :readonly t) (def))))))
+
+(ert-deftest cl-the ()
+  (should (eql (cl-the integer 42) 42))
+  (should-error (cl-the integer "abc"))
+  (let ((side-effect 0))
+    (should (= (cl-the integer (cl-incf side-effect)) 1))
+    (should (= side-effect 1))))
+
+(ert-deftest cl-digit-char-p ()
+  (should (cl-digit-char-p ?3))
+  (should (cl-digit-char-p ?a 11))
+  (should-not (cl-digit-char-p ?a))
+  (should (cl-digit-char-p ?w 36))
+  (should-error (cl-digit-char-p ?a 37))
+  (should-error (cl-digit-char-p ?a 1)))
+
+(ert-deftest cl-parse-integer ()
+  (should-error (cl-parse-integer "abc"))
+  (should (null (cl-parse-integer "abc" :junk-allowed t)))
+  (should (null (cl-parse-integer "" :junk-allowed t)))
+  (should (= 342391 (cl-parse-integer "0123456789" :radix 8 :junk-allowed t)))
+  (should-error (cl-parse-integer "0123456789" :radix 8))
+  (should (= -239 (cl-parse-integer "-efz" :radix 16 :junk-allowed t)))
+  (should-error (cl-parse-integer "efz" :radix 16))
+  (should (= 239 (cl-parse-integer "zzef" :radix 16 :start 2)))
+  (should (= -123 (cl-parse-integer "  -123  "))))
+
+(ert-deftest cl-loop-destructuring-with ()
+  (should (equal (cl-loop with (a b c) = '(1 2 3) return (+ a b c)) 6)))
+
 ;;; cl-lib.el ends here
index 6c169eeab6484f92fd2828932cd850d2b250bc4e..e231331c5a0a414159ef6b489476aec0d154b7f0 100644 (file)
      1 nil 54 "G:/cygwin/dev/build-myproj.xml")
     ("{standard input}:27041: Warning: end of file not at end of a line; newline inserted"
      1 nil 27041 "{standard input}")
+    ;; Guile
+    ("In foo.scm:\n" 1 nil nil "foo.scm")
+    ("  63:4 [call-with-prompt prompt0 ...]" 1 4 63 nil)
+    ("1038: 1 [main (\"gud-break.scm\")]" 1 1 1038 nil)
     ;; lcc
     ("E, file.cc(35,52) Illegal operation on pointers" 1 52 35 "file.cc")
     ("W, file.cc(36,52) blah blah" 1 52 36 "file.cc")
@@ -338,7 +342,8 @@ END-LINE, if that matched.")
            (setq end-line (cdr line) line (car line)))
        (and (equal (compilation--loc->col loc) col)
             (equal (compilation--loc->line loc) line)
-            (equal (caar (compilation--loc->file-struct loc)) file)
+            (or (not file) 
+                 (equal (caar (compilation--loc->file-struct loc)) file))
             (or (null end-col)
                 (equal (car (cadr (nth 2 (compilation--loc->file-struct loc))))
                        end-col))
index 1abaa4d7dec77153e31b6b883b9d02d60043eebb..67ed6b659622590d40d628a45ed647b041f8790c 100644 (file)
                          c-e-x)
                    '(1 2)))))
 
+(ert-deftest core-elisp-test-window-configurations ()
+  "Test properties of window-configurations."
+  (let ((wc (current-window-configuration)))
+    (with-current-buffer (window-buffer (frame-selected-window))
+      (push-mark)
+      (activate-mark))
+    (set-window-configuration wc)
+    (should (or (not mark-active) (mark)))))
+
 (provide 'core-elisp-tests)
 ;;; core-elisp-tests.el ends here
index 1af5c77de5373cbbc855193168be80f47bf90410..b157a365a4c128810feff58a0c9efcbc26c810c3 100644 (file)
   (should-error (dbus-unregister-service bus dbus-service-dbus)))
 
 (ert-deftest dbus-test02-register-service-session ()
-  "Check service registration at `:session'."
+  "Check service registration at `:session' bus."
   (skip-unless (and dbus--test-enabled-session-bus
                    (dbus-register-service :session dbus-service-emacs)))
   (dbus--test-register-service :session)
       (should (eq (dbus-unregister-service :session service) :not-owner)))))
 
 (ert-deftest dbus-test02-register-service-system ()
-  "Check service registration at `:system'."
+  "Check service registration at `:system' bus."
   (skip-unless (and dbus--test-enabled-system-bus
                    (dbus-register-service :system dbus-service-emacs)))
   (dbus--test-register-service :system))
 
+(ert-deftest dbus-test02-register-service-own-bus ()
+  "Check service registration with an own bus.
+This includes initialization and closing the bus."
+  ;; Start bus.
+  (let ((output
+        (ignore-errors
+          (shell-command-to-string "dbus-launch --sh-syntax")))
+       bus pid)
+    (skip-unless (stringp output))
+    (when (string-match "DBUS_SESSION_BUS_ADDRESS='\\(.+\\)';" output)
+      (setq bus (match-string 1 output)))
+    (when (string-match "DBUS_SESSION_BUS_PID=\\([[:digit:]]+\\);" output)
+      (setq pid (match-string 1 output)))
+    (unwind-protect
+       (progn
+         (skip-unless
+          (dbus-ignore-errors
+            (and bus pid
+                 (featurep 'dbusbind)
+                 (dbus-init-bus bus)
+                 (dbus-get-unique-name bus)
+                 (dbus-register-service bus dbus-service-emacs))))
+         ;; Run the test.
+         (dbus--test-register-service bus))
+
+      ;; Save exit.
+      (when pid (call-process "kill" nil nil nil pid)))))
+
+(ert-deftest dbus-test03-peer-interface ()
+  "Check `dbus-interface-peer' methods."
+  (skip-unless
+   (and dbus--test-enabled-session-bus
+       (dbus-register-service :session dbus-service-emacs)
+       ;; "GetMachineId" is not implemented (yet).  When it returns a
+       ;; value, another D-Bus client like dbus-monitor is reacting
+       ;; on `dbus-interface-peer'.  We cannot test then.
+       (not
+        (dbus-ignore-errors
+          (dbus-call-method
+           :session dbus-service-emacs dbus-path-dbus
+           dbus-interface-peer "GetMachineId" :timeout 100)))))
+
+  (should (dbus-ping :session dbus-service-emacs 100))
+  (dbus-unregister-service :session dbus-service-emacs)
+  (should-not (dbus-ping :session dbus-service-emacs 100)))
+
 (defun dbus-test-all (&optional interactive)
   "Run all tests for \\[dbus]."
   (interactive "p")
index 77ea75ddce20cc510b1650ddef6ec17900dc2c27..9a8886231d1d07db7465c09807dfa4d77237e9c0 100644 (file)
@@ -1,7 +1,6 @@
 ;;; eieio-tests.el -- eieio tests routines
 
-;; Copyright (C) 1999-2003, 2005-2010, 2012-2014 Free Software
-;; Foundation, Inc.
+;; Copyright (C) 1999-2003, 2005-2010, 2012-2014 Free Software Foundation, Inc.
 
 ;; Author: Eric M. Ludlam <zappo@gnu.org>
 
@@ -888,3 +887,7 @@ Subclasses to override slot attributes.")
 (provide 'eieio-tests)
 
 ;;; eieio-tests.el ends here
+
+;; Local Variables:
+;; no-byte-compile: t
+;; End:
index 53cbd1f1f88d328c50e93ca1367520e04fff6d70..45440e060c2610c4786e49d990eefc3ff6f712e4 100644 (file)
@@ -831,3 +831,7 @@ This macro is used to test if macroexpansion in `should' works."
 (provide 'ert-tests)
 
 ;;; ert-tests.el ends here
+
+;; Local Variables:
+;; no-byte-compile: t
+;; End:
index c9761050f738b1490a48caa6bf542f906da03615..e5f444e262b40da51d3191656c44ae7c57268a3a 100644 (file)
 ;; Warning predicate
 (defun flymake-tests--current-face (file predicate)
   (let ((buffer (find-file-noselect
-                 (expand-file-name file flymake-tests-data-directory))))
+                 (expand-file-name file flymake-tests-data-directory)))
+        (i 0))
     (unwind-protect
         (with-current-buffer buffer
           (setq-local flymake-warning-predicate predicate)
           (goto-char (point-min))
           (flymake-mode 1)
-          ;; XXX: is this reliable enough?
-          (sleep-for (+ 0.5 flymake-no-changes-timeout))
+          ;; Weirdness here...  http://debbugs.gnu.org/17647#25
+          (while (and flymake-is-running (< (setq i (1+ i)) 10))
+            (sleep-for (+ 0.5 flymake-no-changes-timeout)))
           (flymake-goto-next-error)
           (face-at-point))
-      (and buffer (kill-buffer buffer)))))
+      (and buffer (let (kill-buffer-query-functions) (kill-buffer buffer))))))
 
 (ert-deftest warning-predicate-rx-gcc ()
   "Test GCC warning via regexp predicate."
diff --git a/test/automated/fns-tests.el b/test/automated/fns-tests.el
new file mode 100644 (file)
index 0000000..56d7ece
--- /dev/null
@@ -0,0 +1,191 @@
+;;; fns-tests.el --- tests for src/fns.c
+
+;; Copyright (C) 2014 Free Software Foundation, Inc.
+
+;; This file is part of GNU Emacs.
+
+;; This program is free software: you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation, either version 3 of the
+;; License, or (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see `http://www.gnu.org/licenses/'.
+
+;;; Commentary:
+
+;;; Code:
+
+(require 'cl-lib)
+(eval-when-compile (require 'cl))
+
+(ert-deftest fns-tests-reverse ()
+  (should-error (reverse))
+  (should-error (reverse 1))
+  (should-error (reverse (make-char-table 'foo)))
+  (should (equal [] (reverse [])))
+  (should (equal [0] (reverse [0])))
+  (should (equal [1 2 3 4] (reverse (reverse [1 2 3 4]))))
+  (should (equal '(a b c d) (reverse (reverse '(a b c d)))))
+  (should (equal "xyzzy" (reverse (reverse "xyzzy"))))
+  (should (equal "こんにちは / コンニチハ" (reverse (reverse "こんにちは / コンニチハ")))))
+
+(ert-deftest fns-tests-nreverse ()
+  (should-error (nreverse))
+  (should-error (nreverse 1))
+  (should-error (nreverse (make-char-table 'foo)))
+  (should (equal (nreverse "xyzzy") "yzzyx"))
+  (let ((A []))
+    (nreverse A)
+    (should (equal A [])))
+  (let ((A [0]))
+    (nreverse A)
+    (should (equal A [0])))
+  (let ((A [1 2 3 4]))
+    (nreverse A)
+    (should (equal A [4 3 2 1])))
+  (let ((A [1 2 3 4]))
+    (nreverse A)
+    (nreverse A)
+    (should (equal A [1 2 3 4])))
+  (let* ((A [1 2 3 4])
+        (B (nreverse (nreverse A))))
+    (should (equal A B))))
+
+(ert-deftest fns-tests-reverse-bool-vector ()
+  (let ((A (make-bool-vector 10 nil)))
+    (dotimes (i 5) (aset A i t))
+    (should (equal [nil nil nil nil nil t t t t t] (vconcat (reverse A))))
+    (should (equal A (reverse (reverse A))))))
+
+(ert-deftest fns-tests-nreverse-bool-vector ()
+  (let ((A (make-bool-vector 10 nil)))
+    (dotimes (i 5) (aset A i t))
+    (nreverse A)
+    (should (equal [nil nil nil nil nil t t t t t] (vconcat A)))
+    (should (equal [t t t t t nil nil nil nil nil] (vconcat (nreverse A))))))
+
+(ert-deftest fns-tests-compare-strings ()
+  (should-error (compare-strings))
+  (should-error (compare-strings "xyzzy" "xyzzy"))
+  (should (= (compare-strings "xyzzy" 0 10 "zyxxy" 0 5) -1))
+  (should-error (compare-strings "xyzzy" 0 5 "zyxxy" -1 2))
+  (should-error (compare-strings "xyzzy" 'foo nil "zyxxy" 0 1))
+  (should-error (compare-strings "xyzzy" 0 'foo "zyxxy" 2 3))
+  (should-error (compare-strings "xyzzy" 0 2 "zyxxy" 'foo 3))
+  (should-error (compare-strings "xyzzy" nil 3 "zyxxy" 4 'foo))
+  (should (eq (compare-strings "" nil nil "" nil nil) t))
+  (should (eq (compare-strings "" 0 0 "" 0 0) t))
+  (should (eq (compare-strings "test" nil nil "test" nil nil) t))
+  (should (eq (compare-strings "test" nil nil "test" nil nil t) t))
+  (should (eq (compare-strings "test" nil nil "test" nil nil nil) t))
+  (should (eq (compare-strings "Test" nil nil "test" nil nil t) t))
+  (should (= (compare-strings "Test" nil nil "test" nil nil) -1))
+  (should (= (compare-strings "Test" nil nil "test" nil nil) -1))
+  (should (= (compare-strings "test" nil nil "Test" nil nil) 1))
+  (should (= (compare-strings "foobaz" nil nil "barbaz" nil nil) 1))
+  (should (= (compare-strings "barbaz" nil nil "foobar" nil nil) -1))
+  (should (= (compare-strings "foobaz" nil nil "farbaz" nil nil) 2))
+  (should (= (compare-strings "farbaz" nil nil "foobar" nil nil) -2))
+  (should (eq (compare-strings "abcxyz" 0 2 "abcprq" 0 2) t))
+  (should (eq (compare-strings "abcxyz" 0 -3 "abcprq" 0 -3) t))
+  (should (= (compare-strings "abcxyz" 0 6 "abcprq" 0 6) 4))
+  (should (= (compare-strings "abcprq" 0 6 "abcxyz" 0 6) -4))
+  (should (eq (compare-strings "xyzzy" -3 4 "azza" -3 3) t))
+  (should (eq (compare-strings "こんにちはコンニチハ" nil nil "こんにちはコンニチハ" nil nil) t))
+  (should (= (compare-strings "んにちはコンニチハこ" nil nil "こんにちはコンニチハ" nil nil) 1))
+  (should (= (compare-strings "こんにちはコンニチハ" nil nil "んにちはコンニチハこ" nil nil) -1)))
+
+(defun fns-tests--collate-enabled-p ()
+  "Check whether collation functions are enabled."
+  (and
+   ;; When there is no collation library, collation functions fall back
+   ;; to their lexicographic counterparts.  We don't need to test then.
+   (not (ignore-errors (string-collate-equalp "" "" t)))
+   ;; We use a locale, which might not be installed.  Check it.
+   (ignore-errors
+     (string-collate-equalp
+      "" "" (if (eq system-type 'windows-nt) "enu_USA" "en_US.UTF-8")))))
+
+(ert-deftest fns-tests-collate-strings ()
+  (skip-unless (fns-tests--collate-enabled-p))
+
+  (should (string-collate-equalp "xyzzy" "xyzzy"))
+  (should-not (string-collate-equalp "xyzzy" "XYZZY"))
+
+  ;; In POSIX or C locales, collation order is lexicographic.
+  (should (string-collate-lessp "XYZZY" "xyzzy" "POSIX"))
+  ;; In a language specific locale, collation order is different.
+  (should (string-collate-lessp
+          "xyzzy" "XYZZY"
+          (if (eq system-type 'windows-nt) "enu_USA" "en_US.UTF-8")))
+
+  ;; Ignore case.
+  (should (string-collate-equalp "xyzzy" "XYZZY" nil t))
+
+  ;; Locale must be valid.
+  (should-error (string-collate-equalp "xyzzy" "xyzzy" "en_DE.UTF-8")))
+
+;; There must be a check for valid codepoints.  (Check not implemented yet)
+;  (should-error
+;   (string-collate-equalp (string ?\x00110000) (string ?\x00110000)))
+;; Invalid UTF-8 sequences shall be indicated.  How to create such strings?
+
+(ert-deftest fns-tests-sort ()
+  (should (equal (sort '(9 5 2 -1 5 3 8 7 4) (lambda (x y) (< x y)))
+                '(-1 2 3 4 5 5 7 8 9)))
+  (should (equal (sort '(9 5 2 -1 5 3 8 7 4) (lambda (x y) (> x y)))
+                '(9 8 7 5 5 4 3 2 -1)))
+  (should (equal (sort '[9 5 2 -1 5 3 8 7 4] (lambda (x y) (< x y)))
+                [-1 2 3 4 5 5 7 8 9]))
+  (should (equal (sort '[9 5 2 -1 5 3 8 7 4] (lambda (x y) (> x y)))
+                [9 8 7 5 5 4 3 2 -1]))
+  (should (equal
+          (sort
+           (vector
+            '(8 . "xxx") '(9 . "aaa") '(8 . "bbb") '(9 . "zzz")
+            '(9 . "ppp") '(8 . "ttt") '(8 . "eee") '(9 . "fff"))
+           (lambda (x y) (< (car x) (car y))))
+          [(8 . "xxx") (8 . "bbb") (8 . "ttt") (8 . "eee")
+           (9 . "aaa") (9 . "zzz") (9 . "ppp") (9 . "fff")])))
+
+(ert-deftest fns-tests-collate-sort ()
+  (skip-unless (fns-tests--collate-enabled-p))
+
+  ;; Punctuation and whitespace characters are relevant for POSIX.
+  (should
+   (equal
+    (sort '("11" "12" "1 1" "1 2" "1.1" "1.2")
+         (lambda (a b) (string-collate-lessp a b "POSIX")))
+    '("1 1" "1 2" "1.1" "1.2" "11" "12")))
+  ;; Punctuation and whitespace characters are not taken into account
+  ;; for collation in other locales.
+  (should
+   (equal
+    (sort '("11" "12" "1 1" "1 2" "1.1" "1.2")
+         (lambda (a b)
+           (let ((w32-collate-ignore-punctuation t))
+             (string-collate-lessp
+              a b (if (eq system-type 'windows-nt) "enu_USA" "en_US.UTF-8")))))
+    '("11" "1 1" "1.1" "12" "1 2" "1.2")))
+
+  ;; Diacritics are different letters for POSIX, they sort lexicographical.
+  (should
+   (equal
+    (sort '("Ævar" "Agustín" "Adrian" "Eli")
+         (lambda (a b) (string-collate-lessp a b "POSIX")))
+    '("Adrian" "Agustín" "Eli" "Ævar")))
+  ;; Diacritics are sorted between similar letters for other locales.
+  (should
+   (equal
+    (sort '("Ævar" "Agustín" "Adrian" "Eli")
+         (lambda (a b)
+           (let ((w32-collate-ignore-punctuation t))
+             (string-collate-lessp
+              a b (if (eq system-type 'windows-nt) "enu_USA" "en_US.UTF-8")))))
+    '("Adrian" "Ævar" "Agustín" "Eli"))))
index b921853c4aa06bf40a3a7f7dec281bcb703f868f..a6a5da2ff576d36b9904a0ffab46847a26c0805f 100644 (file)
     (should (string=  (concat "yyyDTSTARTyyy")
                       (icalendar--create-uid entry-full contents)))))
 
-(ert-deftest icalendar--calendar-style ()
-  "Test for `icalendar--date-style'."
-  (dolist (calendar-date-style '(iso american european))
-    (should (eq (icalendar--date-style) calendar-date-style)))
-  (let ((cds calendar-date-style)
-        (european-calendar-style t))
-    (makunbound 'calendar-date-style)
-    (should (eq (icalendar--date-style) 'european))
-    (with-no-warnings (setq european-calendar-style nil)) ;still get warning!?! FIXME
-    (should (eq (icalendar--date-style) 'american))
-    (setq calendar-date-style cds)))
-
 (ert-deftest icalendar-convert-anniversary-to-ical ()
   "Test method for `icalendar--convert-anniversary-to-ical'."
   (let* ((calendar-date-style 'iso)
          result)
     (setq result (icalendar--convert-anniversary-to-ical
                   "" "%%(diary-anniversary 1964 6 30) g"))
-    (should (= 2 (length result)))
+    (should (consp result))
     (should (string= (concat
                       "\nDTSTART;VALUE=DATE:19640630"
                       "\nDTEND;VALUE=DATE:19640701"
                       "\nRRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=06;BYMONTHDAY=30")
                      (car result)))
-    (should (string= "g" (cadr result)))))
+    (should (string= "g" (cdr result)))))
 
 (ert-deftest icalendar--convert-cyclic-to-ical ()
   "Test method for `icalendar--convert-cyclic-to-ical'."
          result)
     (setq result (icalendar--convert-block-to-ical
                   "" "%%(diary-block 2004 7 19 2004 8 27) Sommerferien"))
-    (should (= 2 (length result)))
+    (should (consp result))
     (should (string= (concat
                       "\nDTSTART;VALUE=DATE:20040719"
                       "\nDTEND;VALUE=DATE:20040828")
                      (car result)))
-    (should (string= "Sommerferien" (cadr result)))))
+    (should (string= "Sommerferien" (cdr result)))))
 
 (ert-deftest icalendar--convert-block-to-ical ()
   "Test method for `icalendar--convert-block-to-ical'."
          result)
     (setq result (icalendar--convert-block-to-ical
                   "" "%%(diary-block 2004 7 19 2004 8 27) Sommerferien"))
-    (should (= 2 (length result)))
+    (should (consp result))
     (should (string= (concat
                       "\nDTSTART;VALUE=DATE:20040719"
                       "\nDTEND;VALUE=DATE:20040828")
                      (car result)))
-    (should (string= "Sommerferien" (cadr result)))))
+    (should (string= "Sommerferien" (cdr result)))))
 
 (ert-deftest icalendar--convert-yearly-to-ical ()
   "Test method for `icalendar--convert-yearly-to-ical'."
           ["January" "February" "March" "April" "May" "June" "July" "August"
            "September" "October" "November" "December"]))
     (setq result (icalendar--convert-yearly-to-ical "" "May 1 Tag der Arbeit"))
-    (should (= 2 (length result)))
+    (should (consp result))
     (should (string= (concat
                       "\nDTSTART;VALUE=DATE:19000501"
                       "\nDTEND;VALUE=DATE:19000502"
                       "\nRRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=5;BYMONTHDAY=1")
                      (car result)))
-    (should (string= "Tag der Arbeit" (cadr result)))))
+    (should (string= "Tag der Arbeit" (cdr result)))))
 
 (ert-deftest icalendar--convert-weekly-to-ical ()
   "Test method for `icalendar--convert-weekly-to-ical'."
           ["Sunday" "Monday" "Tuesday" "Wednesday" "Thursday" "Friday"
            "Saturday"]))
     (setq result (icalendar--convert-weekly-to-ical "" "Monday 8:30 subject"))
-    (should (= 2 (length result)))
+    (should (consp result))
     (should (string= (concat "\nDTSTART;VALUE=DATE-TIME:20050103T083000"
                              "\nDTEND;VALUE=DATE-TIME:20050103T093000"
                              "\nRRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO")
                      (car result)))
-    (should (string= "subject" (cadr result)))))
+    (should (string= "subject" (cdr result)))))
+
+(ert-deftest icalendar--convert-sexp-to-ical ()
+  "Test method for `icalendar--convert-sexp-to-ical'."
+  (let* (result
+         (icalendar-export-sexp-enumeration-days 3))
+    ;; test case %%(diary-hebrew-date)
+    (setq result (icalendar--convert-sexp-to-ical "" "%%(diary-hebrew-date)"))
+    (should (consp result))
+    (should (eq icalendar-export-sexp-enumeration-days (length result)))
+    (mapc (lambda (i)
+            (should (consp i))
+            (should (string-match "Hebrew date (until sunset): .*" (cdr i))))
+          result)))
+
+(ert-deftest icalendar--convert-to-ical ()
+  "Test method for `icalendar--convert-to-ical'."
+  (let* (result
+         (icalendar-export-sexp-enumerate-all t)
+         (icalendar-export-sexp-enumeration-days 3)
+         (calendar-date-style 'iso))
+    ;; test case: %%(diary-anniversary 1642 12 25) Newton
+    ;; forced enumeration not matching the actual day --> empty
+    (setq result (icalendar--convert-sexp-to-ical
+                  "" "%%(diary-anniversary 1642 12 25) Newton's birthday"
+                  (encode-time 1 1 1 6 12 2014)))
+    (should (null result))
+    ;; test case: %%(diary-anniversary 1642 12 25) Newton
+    ;; enumeration does match the actual day -->
+    (setq result (icalendar--convert-sexp-to-ical
+                  "" "%%(diary-anniversary 1642 12 25) Newton's birthday"
+                  (encode-time 1 1 1 24 12 2014)))
+    (should (= 1 (length result)))
+    (should (consp (car result)))
+    (should (string-match
+             "\nDTSTART;VALUE=DATE:20141225\nDTEND;VALUE=DATE:20141226"
+             (car (car result))))
+    (should (string-match "Newton's birthday" (cdr (car result))))))
 
 (ert-deftest icalendar--parse-vtimezone ()
   "Test method for `icalendar--parse-vtimezone'."
@@ -215,28 +240,37 @@ END:VTIMEZONE
          result)
     ;; without time
     (setq result (icalendar--convert-ordinary-to-ical "&?" "2010 2 15 subject"))
-    (should (= 2 (length result)))
+    (should (consp result))
     (should (string=  "\nDTSTART;VALUE=DATE:20100215\nDTEND;VALUE=DATE:20100216"
                       (car result)))
-    (should (string= "subject" (cadr result)))
+    (should (string= "subject" (cdr result)))
+
+    ;; with start time
+    (setq result (icalendar--convert-ordinary-to-ical
+                  "&?" "&2010 2 15 12:34 s"))
+    (should (consp result))
+    (should (string=  (concat "\nDTSTART;VALUE=DATE-TIME:20100215T123400"
+                              "\nDTEND;VALUE=DATE-TIME:20100215T133400")
+                      (car result)))
+    (should (string= "s" (cdr result)))
 
     ;; with time
     (setq result (icalendar--convert-ordinary-to-ical
                   "&?" "&2010 2 15 12:34-23:45 s"))
-    (should (= 2 (length result)))
+    (should (consp result))
     (should (string=  (concat "\nDTSTART;VALUE=DATE-TIME:20100215T123400"
                               "\nDTEND;VALUE=DATE-TIME:20100215T234500")
                       (car result)))
-    (should (string= "s" (cadr result)))
+    (should (string= "s" (cdr result)))
 
     ;; with time, again -- test bug#5549
     (setq result (icalendar--convert-ordinary-to-ical
                   "x?" "x2010 2 15 0:34-1:45 s"))
-    (should (= 2 (length result)))
+    (should (consp result))
     (should (string=  (concat "\nDTSTART;VALUE=DATE-TIME:20100215T003400"
                               "\nDTEND;VALUE=DATE-TIME:20100215T014500")
                       (car result)))
-    (should (string= "s" (cadr result)))))
+    (should (string= "s" (cdr result)))))
 
 (ert-deftest icalendar--diarytime-to-isotime ()
   "Test method for `icalendar--diarytime-to-isotime'."
@@ -267,7 +301,9 @@ END:VTIMEZONE
   (should (string= "T120100"
                   (icalendar--diarytime-to-isotime "1201" "pm")))
   (should (string= "T125900"
-                  (icalendar--diarytime-to-isotime "1259" "pm"))))
+                  (icalendar--diarytime-to-isotime "1259" "pm")))
+  (should (string= "T150000"
+                  (icalendar--diarytime-to-isotime "3" "pm"))))
 
 (ert-deftest icalendar--datetime-to-diary-date ()
   "Test method for `icalendar--datetime-to-diary-date'."
@@ -414,6 +450,38 @@ END:VEVENT
     (should (not result))
     ))
 
+(ert-deftest icalendar--decode-isodatetime ()
+  "Test `icalendar--decode-isodatetime'."
+  (let ((tz (getenv "TZ"))
+       result)
+    (unwind-protect
+       (progn
+         ;; Use Eastern European Time (UTC+2, UTC+3 daylight saving)
+         (setenv "TZ" "EET-2EEST,M3.5.0/3,M10.5.0/4")
+
+          (message "%s" (current-time-zone (encode-time 0 0 10 1 1 2013 0)))
+          (message "%s" (current-time-zone (encode-time 0 0 10 1 8 2013 0)))
+
+          ;; testcase: no time zone in input -> keep time as is
+          ;; 1 Jan 2013 10:00
+          (should (equal '(0 0 10 1 1 2013 2 nil 7200)
+                         (icalendar--decode-isodatetime "20130101T100000")))
+          ;; 1 Aug 2013 10:00 (DST)
+          (should (equal '(0 0 10 1 8 2013 4 t 10800)
+                         (icalendar--decode-isodatetime "20130801T100000")))
+
+          ;; testcase: UTC time zone specifier in input -> convert to local time
+          ;; 31 Dec 2013 23:00 UTC -> 1 Jan 2013 01:00 EET
+          (should (equal '(0 0 1 1 1 2014 3 nil 7200)
+                         (icalendar--decode-isodatetime "20131231T230000Z")))
+          ;; 1 Aug 2013 10:00 UTC -> 1 Aug 2013 13:00 EEST
+          (should (equal '(0 0 13 1 8 2013 4 t 10800)
+                         (icalendar--decode-isodatetime "20130801T100000Z")))
+
+          )
+      ;; restore time-zone even if something went terribly wrong
+      (setenv "TZ" tz)))  )
+
 ;; ======================================================================
 ;; Export tests
 ;; ======================================================================
@@ -718,11 +786,34 @@ Argument EXPECTED-AMERICAN expected american style diary string."
 Argument INPUT input icalendar string.
 Argument EXPECTED-OUTPUT expected diary string."
   (let ((temp-file (make-temp-file "icalendar-test-diary")))
+    ;; Test the Catch-the-mysterious-coding-header logic below.
+    ;; Ruby-mode adds an after-save-hook which inserts the header!
+    ;; (save-excursion
+    ;;   (find-file temp-file)
+    ;;   (ruby-mode))
     (icalendar-import-buffer temp-file t t)
     (save-excursion
       (find-file temp-file)
+      ;; Check for the mysterious "# coding: ..." header, remove it
+      ;; and give a shout
+      (goto-char (point-min))
+      (when (re-search-forward "# coding: .*?\n" nil t)
+        (message (concat "%s\n"
+                         "Found mysterious \"# coding ...\" header!  Removing it.\n"
+                         "Current Modes: %s, %s\n"
+                         "Current test: %s\n"
+                         "%s")
+                 (make-string 70 ?*)
+                 major-mode
+                 minor-mode-list
+                 (ert-running-test)
+                 (make-string 70 ?*))
+        (buffer-disable-undo)
+        (replace-match "")
+        (set-buffer-modified-p nil))
+
       (let ((result (buffer-substring-no-properties (point-min) (point-max))))
-       (should (string= expected-output result)))
+        (should (string= expected-output result)))
       (kill-buffer (find-buffer-visiting temp-file))
       (delete-file temp-file))))
 
index 2dbb850c407de43421b6559bab5a963a8da26f33..5f9ec0492461a801cef964a11b23671d95a6d50c 100644 (file)
@@ -143,6 +143,26 @@ Signals an error if something goes wrong."
     (should (equal '("Feeds" "feed3" "feed2" "feed1")
                    newsticker-groups))))
 
+(ert-deftest newsticker--group-find-parent-group ()
+  "Test `newsticker--group-find-parent-group'."
+  (let ((newsticker-groups '("g1" "f1a" ("g2" "f2" ("g3" "f3a" "f3b")) "f1b")))
+    ;; feeds
+    (should (equal "g1" (car (newsticker--group-find-parent-group "f1a"))))
+    (should (equal "g1" (car (newsticker--group-find-parent-group "f1b"))))
+    (should (equal "g2" (car (newsticker--group-find-parent-group "f2"))))
+    (should (equal "g3" (car (newsticker--group-find-parent-group "f3b"))))
+    ;; groups
+    (should (equal "g1" (car (newsticker--group-find-parent-group "g2"))))
+    (should (equal "g2" (car (newsticker--group-find-parent-group "g3"))))))
+
+(ert-deftest newsticker--group-do-rename-group ()
+  "Test `newsticker--group-do-rename-group'."
+  (let ((newsticker-groups '("g1" "f1a" ("g2" "f2" ("g3" "f3a" "f3b")) "f1b")))
+    (should (equal '("g1" "f1a" ("h2" "f2" ("g3" "f3a" "f3b")) "f1b")
+                   (newsticker--group-do-rename-group "g2" "h2")))
+    ))
+
+
 (provide 'newsticker-tests)
 
 ;;; newsticker-tests.el ends here
index f21e1421a8dd3d92df70927729bd67ddf5ff9dd9..6e7994a5a81f23085db7463664fcd7d6e4e7cbda 100644 (file)
@@ -188,7 +188,8 @@ Must called from within a `tar-mode' buffer."
         (insert-file-contents (expand-file-name "simple-single-pkg.el"
                                                 simple-pkg-dir))
         (should (string= (buffer-string)
-                         (concat "(define-package \"simple-single\" \"1.3\" "
+                         (concat ";;; -*- no-byte-compile: t -*-\n"
+                                 "(define-package \"simple-single\" \"1.3\" "
                                  "\"A single-file package "
                                  "with no dependencies\" 'nil "
                                  ":url \"http://doodles.au\""
@@ -395,6 +396,73 @@ Must called from within a `tar-mode' buffer."
                        (expand-file-name "signed-good-1.0" package-user-dir))
                nil t))))))
 
+
+\f
+;;; Tests for package-x features.
+
+(require 'package-x)
+
+(defvar package-x-test--single-archive-entry-1-3
+  (cons 'simple-single
+        (package-make-ac-desc '(1 3) nil
+                              "A single-file package with no dependencies"
+                              'single
+                              '((:url . "http://doodles.au"))))
+  "Expected contents of the archive entry from the \"simple-single\" package.")
+
+(defvar package-x-test--single-archive-entry-1-4
+  (cons 'simple-single
+        (package-make-ac-desc '(1 4) nil
+                              "A single-file package with no dependencies"
+                              'single
+                              nil))
+  "Expected contents of the archive entry from the updated \"simple-single\" package.")
+
+(ert-deftest package-x-test-upload-buffer ()
+  "Test creating an \"archive-contents\" file"
+  (with-package-test (:basedir "data/package"
+                               :file "simple-single-1.3.el"
+                               :upload-base t)
+    (package-upload-buffer)
+    (should (file-exists-p (expand-file-name "archive-contents"
+                                             package-archive-upload-base)))
+    (should (file-exists-p (expand-file-name "simple-single-1.3.el"
+                                             package-archive-upload-base)))
+    (should (file-exists-p (expand-file-name "simple-single-readme.txt"
+                                             package-archive-upload-base)))
+
+    (let (archive-contents)
+      (with-temp-buffer
+        (insert-file-contents
+         (expand-file-name "archive-contents"
+                           package-archive-upload-base))
+        (setq archive-contents
+              (package-read-from-string
+               (buffer-substring (point-min) (point-max)))))
+      (should (equal archive-contents
+                     (list 1 package-x-test--single-archive-entry-1-3))))))
+
+(ert-deftest package-x-test-upload-new-version ()
+  "Test uploading a new version of a package"
+  (with-package-test (:basedir "data/package"
+                               :file "simple-single-1.3.el"
+                               :upload-base t)
+    (package-upload-buffer)
+    (with-temp-buffer
+      (insert-file-contents "newer-versions/simple-single-1.4.el")
+      (package-upload-buffer))
+
+    (let (archive-contents)
+      (with-temp-buffer
+        (insert-file-contents
+         (expand-file-name "archive-contents"
+                           package-archive-upload-base))
+        (setq archive-contents
+              (package-read-from-string
+               (buffer-substring (point-min) (point-max)))))
+      (should (equal archive-contents
+                     (list 1 package-x-test--single-archive-entry-1-4))))))
+
 (provide 'package-test)
 
 ;;; package-test.el ends here
diff --git a/test/automated/package-x-test.el b/test/automated/package-x-test.el
deleted file mode 100644 (file)
index cce51b6..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-;;; package-test.el --- Tests for the Emacs package system
-
-;; Copyright (C) 2013-2014 Free Software Foundation, Inc.
-
-;; Author: Daniel Hackney <dan@haxney.org>
-;; Version: 1.0
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;; You may want to run this from a separate Emacs instance from your
-;; main one, because a bug in the code below could mess with your
-;; installed packages.
-
-;; Run this in a clean Emacs session using:
-;;
-;;     $ emacs -Q --batch -L . -l package-x-test.el -f ert-run-tests-batch-and-exit
-
-;;; Code:
-
-(require 'package-x)
-(require 'ert)
-(require 'cl-lib)
-(eval-when-compile (require 'package-test))
-
-;; package-test is not normally in `load-path', so temporarily set
-;; `load-path' to contain the current directory.
-(let ((load-path (append (list (file-name-directory (or load-file-name
-                                                        buffer-file-name)))
-                         load-path)))
-  (require 'package-test))
-
-(defvar package-x-test--single-archive-entry-1-3
-  (cons 'simple-single
-        (package-make-ac-desc '(1 3) nil
-                              "A single-file package with no dependencies"
-                              'single
-                              '((:url . "http://doodles.au"))))
-  "Expected contents of the archive entry from the \"simple-single\" package.")
-
-(defvar package-x-test--single-archive-entry-1-4
-  (cons 'simple-single
-        (package-make-ac-desc '(1 4) nil
-                              "A single-file package with no dependencies"
-                              'single
-                              nil))
-  "Expected contents of the archive entry from the updated \"simple-single\" package.")
-
-(ert-deftest package-x-test-upload-buffer ()
-  "Test creating an \"archive-contents\" file"
-  (with-package-test (:basedir "data/package"
-                               :file "simple-single-1.3.el"
-                               :upload-base t)
-    (package-upload-buffer)
-    (should (file-exists-p (expand-file-name "archive-contents"
-                                             package-archive-upload-base)))
-    (should (file-exists-p (expand-file-name "simple-single-1.3.el"
-                                             package-archive-upload-base)))
-    (should (file-exists-p (expand-file-name "simple-single-readme.txt"
-                                             package-archive-upload-base)))
-
-    (let (archive-contents)
-      (with-temp-buffer
-        (insert-file-contents
-         (expand-file-name "archive-contents"
-                           package-archive-upload-base))
-        (setq archive-contents
-              (package-read-from-string
-               (buffer-substring (point-min) (point-max)))))
-      (should (equal archive-contents
-                     (list 1 package-x-test--single-archive-entry-1-3))))))
-
-(ert-deftest package-x-test-upload-new-version ()
-  "Test uploading a new version of a package"
-  (with-package-test (:basedir "data/package"
-                               :file "simple-single-1.3.el"
-                               :upload-base t)
-    (package-upload-buffer)
-    (with-temp-buffer
-      (insert-file-contents "newer-versions/simple-single-1.4.el")
-      (package-upload-buffer))
-
-    (let (archive-contents)
-      (with-temp-buffer
-        (insert-file-contents
-         (expand-file-name "archive-contents"
-                           package-archive-upload-base))
-        (setq archive-contents
-              (package-read-from-string
-               (buffer-substring (point-min) (point-max)))))
-      (should (equal archive-contents
-                     (list 1 package-x-test--single-archive-entry-1-4))))))
-
-(provide 'package-x-test)
-
-;;; package-x-test.el ends here
diff --git a/test/automated/pcase-tests.el b/test/automated/pcase-tests.el
new file mode 100644 (file)
index 0000000..f5ecadf
--- /dev/null
@@ -0,0 +1,74 @@
+;;; pcase-tests.el --- Test suite for pcase macro.
+
+;; Copyright (C) 2012-2014 Free Software Foundation, Inc.
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;; Code:
+
+(require 'ert)
+(require 'cl-lib)
+
+(ert-deftest pcase-tests-base ()
+  "Test pcase code."
+  (should (equal (pcase '(1 . 2) ((app car '2) 6) ((app car '1) 5)) 5)))
+
+(ert-deftest pcase-tests-bugs ()
+  (should (equal (pcase '(2 . 3)        ;bug#18554
+                   (`(,hd . ,(and (pred atom) tl)) (list hd tl))
+                   ((pred consp) nil))
+                 '(2 3))))
+
+(pcase-defmacro pcase-tests-plus (pat n)
+  `(app (lambda (v) (- v ,n)) ,pat))
+
+(ert-deftest pcase-tests-macro ()
+  (should (equal (pcase 5 ((pcase-tests-plus x 3) x)) 2)))
+
+(defun pcase-tests-grep (fname exp)
+  (when (consp exp)
+    (or (eq fname (car exp))
+        (cl-some (lambda (exp) (pcase-tests-grep fname exp)) (cdr exp)))))
+
+(ert-deftest pcase-tests-tests ()
+  (should (pcase-tests-grep 'memq '(or (+ 2 3) (memq x y))))
+  (should-not (pcase-tests-grep 'memq '(or (+ 2 3) (- x y)))))
+
+(ert-deftest pcase-tests-member ()
+  (should (pcase-tests-grep
+           'memq (macroexpand-all '(pcase x ((or 1 2 3) body)))))
+  (should (pcase-tests-grep
+           'member (macroexpand-all '(pcase x ((or '"a" '2 '3) body)))))
+  (should-not (pcase-tests-grep
+               'memq (macroexpand-all '(pcase x ((or "a" 2 3) body)))))
+  (let ((exp (macroexpand-all
+                      '(pcase x
+                         ("a" body1)
+                         (2 body2)
+                         ((or "a" 2 3) body)))))
+    (should-not (pcase-tests-grep 'memq exp))
+    (should-not (pcase-tests-grep 'member exp))))
+
+(ert-deftest pcase-tests-vectors ()
+  (should (equal (pcase [1 2] (`[,x] 1) (`[,x ,y] (+ x y))) 3)))
+
+;; Local Variables:
+;; no-byte-compile: t
+;; End:
+
+;;; pcase-tests.el ends here.
diff --git a/test/automated/print-tests.el b/test/automated/print-tests.el
new file mode 100644 (file)
index 0000000..1974cc4
--- /dev/null
@@ -0,0 +1,56 @@
+;;; print-tests.el --- tests for src/print.c         -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2014 Free Software Foundation, Inc.
+
+;; This file is part of GNU Emacs.
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Code:
+
+(require 'ert)
+
+(ert-deftest terpri ()
+  (should (string= (with-output-to-string
+                     (princ 'abc)
+                     (should (terpri nil t)))
+                   "abc\n"))
+  (should (string= (with-output-to-string
+                     (should-not (terpri nil t))
+                     (princ 'xyz))
+                   "xyz"))
+  (message nil)
+  (if noninteractive
+      (progn (should            (terpri nil t))
+             (should-not        (terpri nil t))
+             (princ 'abc)
+             (should            (terpri nil t))
+             (should-not        (terpri nil t)))
+    (should (string= (progn (should-not (terpri nil t))
+                            (princ 'abc)
+                            (should (terpri nil t))
+                            (current-message))
+                     "abc\n")))
+  (let ((standard-output
+         (with-current-buffer (get-buffer-create "*terpri-test*")
+           (insert "--------")
+           (point-max-marker))))
+    (should     (terpri nil t))
+    (should-not (terpri nil t))
+    (should (string= (with-current-buffer (marker-buffer standard-output)
+                       (buffer-string))
+                     "--------\n"))))
+
+(provide 'print-tests)
+;;; print-tests.el ends here
index 0ad5650cd7719dffc93a269b780622ef91d9c2de..1c14a0c4696f025b3f898c58e9b15902e498220d 100644 (file)
@@ -61,7 +61,7 @@ VALUES-PLIST is a list with alternating index and value elements."
 
 (defun ruby-assert-face (content pos face)
   (ruby-with-temp-buffer content
-    (font-lock-fontify-buffer)
+    (font-lock-ensure nil nil)
     (should (eq face (get-text-property pos 'face)))))
 
 (ert-deftest ruby-indent-after-symbol-made-from-string-interpolation ()
@@ -420,7 +420,7 @@ VALUES-PLIST is a list with alternating index and value elements."
     (ruby-with-temp-buffer s
       (goto-char (point-min))
       (ruby-mode)
-      (font-lock-fontify-buffer)
+      (syntax-propertize (point-max))
       (search-forward "tee")
       (should (string= (thing-at-point 'symbol) "tee")))))
 
diff --git a/test/automated/subr-x-tests.el b/test/automated/subr-x-tests.el
new file mode 100644 (file)
index 0000000..03541f1
--- /dev/null
@@ -0,0 +1,526 @@
+;;; subr-x-tests.el --- Testing the extended lisp routines
+
+;; Copyright (C) 2014 Free Software Foundation, Inc.
+
+;; Author: Fabián E. Gallina <fgallina@gnu.org>
+;; Keywords:
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;
+
+;;; Code:
+
+(require 'ert)
+(require 'subr-x)
+
+\f
+;; if-let tests
+
+(ert-deftest subr-x-test-if-let-single-binding-expansion ()
+  "Test single bindings are expanded properly."
+  (should (equal
+           (macroexpand
+            '(if-let (a 1)
+                 (- a)
+               "no"))
+           '(let* ((a (and t 1)))
+              (if a
+                  (- a)
+                "no"))))
+  (should (equal
+           (macroexpand
+            '(if-let (a)
+                 (- a)
+               "no"))
+           '(let* ((a (and t nil)))
+              (if a
+                  (- a)
+                "no")))))
+
+(ert-deftest subr-x-test-if-let-single-symbol-expansion ()
+  "Test single symbol bindings are expanded properly."
+  (should (equal
+           (macroexpand
+            '(if-let (a)
+                 (- a)
+               "no"))
+           '(let* ((a (and t nil)))
+              (if a
+                  (- a)
+                "no"))))
+  (should (equal
+           (macroexpand
+            '(if-let (a b c)
+                 (- a)
+               "no"))
+           '(let* ((a (and t nil))
+                   (b (and a nil))
+                   (c (and b nil)))
+              (if c
+                  (- a)
+                "no"))))
+  (should (equal
+           (macroexpand
+            '(if-let (a (b 2) c)
+                 (- a)
+               "no"))
+           '(let* ((a (and t nil))
+                   (b (and a 2))
+                   (c (and b nil)))
+              (if c
+                  (- a)
+                "no")))))
+
+(ert-deftest subr-x-test-if-let-nil-related-expansion ()
+  "Test nil is processed properly."
+  (should (equal
+           (macroexpand
+            '(if-let (nil)
+                 (- a)
+               "no"))
+           '(let* ((nil (and t nil)))
+              (if nil
+                  (- a)
+                "no"))))
+  (should (equal
+           (macroexpand
+            '(if-let ((nil))
+                 (- a)
+               "no"))
+           '(let* ((nil (and t nil)))
+              (if nil
+                  (- a)
+                "no"))))
+  (should (equal
+           (macroexpand
+            '(if-let ((a 1) (nil) (b 2))
+                 (- a)
+               "no"))
+           '(let* ((a (and t 1))
+                   (nil (and a nil))
+                   (b (and nil 2)))
+              (if b
+                  (- a)
+                "no"))))
+  (should (equal
+           (macroexpand
+            '(if-let ((a 1) nil (b 2))
+                 (- a)
+               "no"))
+           '(let* ((a (and t 1))
+                   (nil (and a nil))
+                   (b (and nil 2)))
+              (if b
+                  (- a)
+                "no")))))
+
+(ert-deftest subr-x-test-if-let-malformed-binding ()
+  "Test malformed bindings trigger errors."
+  (should-error (macroexpand
+                 '(if-let (_ (a 1 1) (b 2) (c 3) d)
+                      (- a)
+                    "no"))
+                :type 'error)
+  (should-error (macroexpand
+                 '(if-let (_ (a 1) (b 2 2) (c 3) d)
+                      (- a)
+                    "no"))
+                :type 'error)
+  (should-error (macroexpand
+                 '(if-let (_ (a 1) (b 2) (c 3 3) d)
+                      (- a)
+                    "no"))
+                :type 'error)
+  (should-error (macroexpand
+                 '(if-let ((a 1 1))
+                      (- a)
+                    "no"))
+                :type 'error))
+
+(ert-deftest subr-x-test-if-let-true ()
+  "Test `if-let' with truthy bindings."
+  (should (equal
+           (if-let (a 1)
+               a
+             "no")
+           1))
+  (should (equal
+           (if-let ((a 1) (b 2) (c 3))
+               (list a b c)
+             "no")
+           (list 1 2 3))))
+
+(ert-deftest subr-x-test-if-let-false ()
+  "Test `if-let' with falsie bindings."
+  (should (equal
+           (if-let (a nil)
+               (list a b c)
+             "no")
+           "no"))
+  (should (equal
+           (if-let ((a nil) (b 2) (c 3))
+               (list a b c)
+             "no")
+           "no"))
+  (should (equal
+           (if-let ((a 1) (b nil) (c 3))
+               (list a b c)
+             "no")
+           "no"))
+  (should (equal
+           (if-let ((a 1) (b 2) (c nil))
+               (list a b c)
+             "no")
+           "no"))
+  (should (equal
+           (if-let (z (a 1) (b 2) (c 3))
+               (list a b c)
+             "no")
+           "no"))
+  (should (equal
+           (if-let ((a 1) (b 2) (c 3) d)
+               (list a b c)
+             "no")
+           "no")))
+
+(ert-deftest subr-x-test-if-let-bound-references ()
+  "Test `if-let' bindings can refer to already bound symbols."
+  (should (equal
+           (if-let ((a (1+ 0)) (b (1+ a)) (c (1+ b)))
+               (list a b c)
+             "no")
+           (list 1 2 3))))
+
+(ert-deftest subr-x-test-if-let-and-laziness-is-preserved ()
+  "Test `if-let' respects `and' laziness."
+  (let (a-called b-called c-called)
+    (should (equal
+             (if-let ((a nil)
+                      (b (setq b-called t))
+                      (c (setq c-called t)))
+                 "yes"
+               (list a-called b-called c-called))
+             (list nil nil nil))))
+  (let (a-called b-called c-called)
+    (should (equal
+             (if-let ((a (setq a-called t))
+                      (b nil)
+                      (c (setq c-called t)))
+                 "yes"
+               (list a-called b-called c-called))
+             (list t nil nil))))
+  (let (a-called b-called c-called)
+    (should (equal
+             (if-let ((a (setq a-called t))
+                      (b (setq b-called t))
+                      (c nil)
+                      (d (setq c-called t)))
+                 "yes"
+               (list a-called b-called c-called))
+             (list t t nil)))))
+
+\f
+;; when-let tests
+
+(ert-deftest subr-x-test-when-let-body-expansion ()
+  "Test body allows for multiple sexps wrapping with progn."
+  (should (equal
+           (macroexpand
+            '(when-let (a 1)
+               (message "opposite")
+               (- a)))
+           '(let* ((a (and t 1)))
+              (if a
+                  (progn
+                    (message "opposite")
+                    (- a)))))))
+
+(ert-deftest subr-x-test-when-let-single-binding-expansion ()
+  "Test single bindings are expanded properly."
+  (should (equal
+           (macroexpand
+            '(when-let (a 1)
+               (- a)))
+           '(let* ((a (and t 1)))
+              (if a
+                  (- a)))))
+  (should (equal
+           (macroexpand
+            '(when-let (a)
+               (- a)))
+           '(let* ((a (and t nil)))
+              (if a
+                  (- a))))))
+
+(ert-deftest subr-x-test-when-let-single-symbol-expansion ()
+  "Test single symbol bindings are expanded properly."
+  (should (equal
+           (macroexpand
+            '(when-let (a)
+               (- a)))
+           '(let* ((a (and t nil)))
+              (if a
+                  (- a)))))
+  (should (equal
+           (macroexpand
+            '(when-let (a b c)
+               (- a)))
+           '(let* ((a (and t nil))
+                   (b (and a nil))
+                   (c (and b nil)))
+              (if c
+                  (- a)))))
+  (should (equal
+           (macroexpand
+            '(when-let (a (b 2) c)
+               (- a)))
+           '(let* ((a (and t nil))
+                   (b (and a 2))
+                   (c (and b nil)))
+              (if c
+                  (- a))))))
+
+(ert-deftest subr-x-test-when-let-nil-related-expansion ()
+  "Test nil is processed properly."
+  (should (equal
+           (macroexpand
+            '(when-let (nil)
+               (- a)))
+           '(let* ((nil (and t nil)))
+              (if nil
+                  (- a)))))
+  (should (equal
+           (macroexpand
+            '(when-let ((nil))
+               (- a)))
+           '(let* ((nil (and t nil)))
+              (if nil
+                  (- a)))))
+  (should (equal
+           (macroexpand
+            '(when-let ((a 1) (nil) (b 2))
+               (- a)))
+           '(let* ((a (and t 1))
+                   (nil (and a nil))
+                   (b (and nil 2)))
+              (if b
+                  (- a)))))
+  (should (equal
+           (macroexpand
+            '(when-let ((a 1) nil (b 2))
+               (- a)))
+           '(let* ((a (and t 1))
+                   (nil (and a nil))
+                   (b (and nil 2)))
+              (if b
+                  (- a))))))
+
+(ert-deftest subr-x-test-when-let-malformed-binding ()
+  "Test malformed bindings trigger errors."
+  (should-error (macroexpand
+                 '(when-let (_ (a 1 1) (b 2) (c 3) d)
+                    (- a)))
+                :type 'error)
+  (should-error (macroexpand
+                 '(when-let (_ (a 1) (b 2 2) (c 3) d)
+                    (- a)))
+                :type 'error)
+  (should-error (macroexpand
+                 '(when-let (_ (a 1) (b 2) (c 3 3) d)
+                    (- a)))
+                :type 'error)
+  (should-error (macroexpand
+                 '(when-let ((a 1 1))
+                    (- a)))
+                :type 'error))
+
+(ert-deftest subr-x-test-when-let-true ()
+  "Test `when-let' with truthy bindings."
+  (should (equal
+           (when-let (a 1)
+             a)
+           1))
+  (should (equal
+           (when-let ((a 1) (b 2) (c 3))
+             (list a b c))
+           (list 1 2 3))))
+
+(ert-deftest subr-x-test-when-let-false ()
+  "Test `when-let' with falsie bindings."
+  (should (equal
+           (when-let (a nil)
+             (list a b c)
+             "no")
+           nil))
+  (should (equal
+           (when-let ((a nil) (b 2) (c 3))
+             (list a b c)
+             "no")
+           nil))
+  (should (equal
+           (when-let ((a 1) (b nil) (c 3))
+             (list a b c)
+             "no")
+           nil))
+  (should (equal
+           (when-let ((a 1) (b 2) (c nil))
+             (list a b c)
+             "no")
+           nil))
+  (should (equal
+           (when-let (z (a 1) (b 2) (c 3))
+             (list a b c)
+             "no")
+           nil))
+  (should (equal
+           (when-let ((a 1) (b 2) (c 3) d)
+             (list a b c)
+             "no")
+           nil)))
+
+(ert-deftest subr-x-test-when-let-bound-references ()
+  "Test `when-let' bindings can refer to already bound symbols."
+  (should (equal
+           (when-let ((a (1+ 0)) (b (1+ a)) (c (1+ b)))
+             (list a b c))
+           (list 1 2 3))))
+
+(ert-deftest subr-x-test-when-let-and-laziness-is-preserved ()
+  "Test `when-let' respects `and' laziness."
+  (let (a-called b-called c-called)
+    (should (equal
+             (progn
+               (when-let ((a nil)
+                          (b (setq b-called t))
+                          (c (setq c-called t)))
+                 "yes")
+               (list a-called b-called c-called))
+             (list nil nil nil))))
+  (let (a-called b-called c-called)
+    (should (equal
+             (progn
+               (when-let ((a (setq a-called t))
+                          (b nil)
+                          (c (setq c-called t)))
+                 "yes")
+               (list a-called b-called c-called))
+             (list t nil nil))))
+  (let (a-called b-called c-called)
+    (should (equal
+             (progn
+               (when-let ((a (setq a-called t))
+                          (b (setq b-called t))
+                          (c nil)
+                          (d (setq c-called t)))
+                 "yes")
+               (list a-called b-called c-called))
+             (list t t nil)))))
+
+\f
+;; Thread first tests
+
+(ert-deftest subr-x-test-thread-first-no-forms ()
+  "Test `thread-first' with no forms expands to the first form."
+  (should (equal (macroexpand '(thread-first 5)) 5))
+  (should (equal (macroexpand '(thread-first (+ 1 2))) '(+ 1 2))))
+
+(ert-deftest subr-x-test-thread-first-function-names-are-threaded ()
+  "Test `thread-first' wraps single function names."
+  (should (equal (macroexpand
+                  '(thread-first 5
+                     -))
+                 '(- 5)))
+  (should (equal (macroexpand
+                  '(thread-first (+ 1 2)
+                     -))
+                 '(- (+ 1 2)))))
+
+(ert-deftest subr-x-test-thread-first-expansion ()
+  "Test `thread-first' expands correctly."
+  (should (equal
+           (macroexpand '(thread-first
+                             5
+                           (+ 20)
+                           (/ 25)
+                           -
+                           (+ 40)))
+           '(+ (- (/ (+ 5 20) 25)) 40))))
+
+(ert-deftest subr-x-test-thread-first-examples ()
+  "Test several `thread-first' examples."
+  (should (equal (thread-first (+ 40 2)) 42))
+  (should (equal (thread-first
+                     5
+                   (+ 20)
+                   (/ 25)
+                   -
+                   (+ 40)) 39))
+  (should (equal (thread-first
+                     "this-is-a-string"
+                   (split-string "-")
+                   (nbutlast 2)
+                   (append (list "good")))
+                 (list "this" "is" "good"))))
+\f
+;; Thread last tests
+
+(ert-deftest subr-x-test-thread-last-no-forms ()
+  "Test `thread-last' with no forms expands to the first form."
+  (should (equal (macroexpand '(thread-last 5)) 5))
+  (should (equal (macroexpand '(thread-last (+ 1 2))) '(+ 1 2))))
+
+(ert-deftest subr-x-test-thread-last-function-names-are-threaded ()
+  "Test `thread-last' wraps single function names."
+  (should (equal (macroexpand
+                  '(thread-last 5
+                     -))
+                 '(- 5)))
+  (should (equal (macroexpand
+                  '(thread-last (+ 1 2)
+                     -))
+                 '(- (+ 1 2)))))
+
+(ert-deftest subr-x-test-thread-last-expansion ()
+  "Test `thread-last' expands correctly."
+  (should (equal
+           (macroexpand '(thread-last
+                             5
+                           (+ 20)
+                           (/ 25)
+                           -
+                           (+ 40)))
+           '(+ 40 (- (/ 25 (+ 20 5)))))))
+
+(ert-deftest subr-x-test-thread-last-examples ()
+  "Test several `thread-last' examples."
+  (should (equal (thread-last (+ 40 2)) 42))
+  (should (equal (thread-last
+                     5
+                   (+ 20)
+                   (/ 25)
+                   -
+                   (+ 40)) 39))
+  (should (equal (thread-last
+                     (list 1 -2 3 -4 5)
+                   (mapcar #'abs)
+                   (cl-reduce #'+)
+                   (format "abs sum is: %s"))
+                 "abs sum is: 15")))
+
+
+(provide 'subr-x-tests)
+;;; subr-x-tests.el ends here
index 3b37bc84886a26c5646bc6c5737d1c8e5ae2cfd7..7c6c77d4cc9ad46c213c052d0ca893b836eacb95 100644 (file)
         (insert "^"))
       (should (equal (buffer-string) str)))))
 
+(ert-deftest subword-tests2 ()
+  "Test that motion in subword-mode stops at the right places."
+
+  (let* ((line "fooBarBAZ quXD g_TESTThingAbc word BLAH test")
+         (fwrd "*  *  *  *  * * *    *    *  *    *    *    *")
+         (bkwd "*  *  *   * *  * *   *    *   *    *    *   *"))
+
+    (with-temp-buffer
+      (subword-mode 1)
+      (insert line)
+
+      ;; Test forward motion.
+      
+      (goto-char (point-min))
+      (let ((stops (make-string (length fwrd) ?\ )))
+        (while (progn
+                 (aset stops (1- (point)) ?\*)
+                 (not (eobp)))          
+          (forward-word))
+        (should (equal stops fwrd)))
+
+      ;; Test backward motion.
+
+      (goto-char (point-max))
+      (let ((stops (make-string (length bkwd) ?\ )))
+        (while (progn
+                 (aset stops (1- (point)) ?\*)
+                 (not (bobp)))          
+          (backward-word))
+        (should (equal stops bkwd))))))
+
 (provide 'subword-tests)
 ;;; subword-tests.el ends here
diff --git a/test/automated/syntax-tests.el b/test/automated/syntax-tests.el
new file mode 100644 (file)
index 0000000..9b97001
--- /dev/null
@@ -0,0 +1,97 @@
+;;; syntax-tests.el --- Testing syntax rules and basic movement -*- lexical-binding: t -*-
+
+;; Copyright (C) 2014 Free Software Foundation, Inc.
+
+;; Author: Daniel Colascione <dancol@dancol.org>
+;; Keywords:
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;
+
+;;; Code:
+(require 'ert)
+(require 'cl-lib)
+
+(defun run-up-list-test (fn data start instructions)
+  (cl-labels ((posof (thing)
+                (and (symbolp thing)
+                     (= (length (symbol-name thing)) 1)
+                     (- (aref (symbol-name thing) 0) ?a -1))))
+    (with-temp-buffer
+      (set-syntax-table (make-syntax-table))
+      ;; Use a syntax table in which single quote is a string
+      ;; character so that we can embed the test data in a lisp string
+      ;; literal.
+      (modify-syntax-entry ?\' "\"")
+      (insert data)
+      (goto-char (posof start))
+      (dolist (instruction instructions)
+        (cond ((posof instruction)
+               (funcall fn)
+               (should (eql (point) (posof instruction))))
+              ((symbolp instruction)
+               (should-error (funcall fn)
+                             :type instruction))
+              (t (cl-assert nil nil "unknown ins")))))))
+
+(defmacro define-up-list-test (name fn data start &rest expected)
+  `(ert-deftest ,name ()
+     (run-up-list-test ,fn ,data ',start ',expected)))
+
+(define-up-list-test up-list-basic
+  (lambda () (up-list))
+  (or "(1 1 (1 1) 1 (1 1) 1)")
+  ;;   abcdefghijklmnopqrstuv
+  i k v scan-error)
+
+(define-up-list-test up-list-with-forward-sexp-function
+  (lambda ()
+    (let ((forward-sexp-function
+           (lambda (&optional arg)
+             (let ((forward-sexp-function nil))
+               (forward-sexp arg)))))
+      (up-list)))
+  (or "(1 1 (1 1) 1 (1 1) 1)")
+  ;;   abcdefghijklmnopqrstuv
+  i k v scan-error)
+
+(define-up-list-test up-list-out-of-string
+  (lambda () (up-list 1 t))
+  (or "1 (1 '2 2 (2 2 2' 1) 1")
+  ;;   abcdefghijklmnopqrstuvwxy
+  o r u scan-error)
+
+(define-up-list-test up-list-cross-string
+  (lambda () (up-list 1 t))
+  (or "(1 '2 ( 2' 1 '2 ) 2' 1)")
+  ;;   abcdefghijklmnopqrstuvwxy
+  i r u x scan-error)
+
+(define-up-list-test up-list-no-cross-string
+  (lambda () (up-list 1 t t))
+  (or "(1 '2 ( 2' 1 '2 ) 2' 1)")
+  ;;   abcdefghijklmnopqrstuvwxy
+  i k x scan-error)
+
+(define-up-list-test backward-up-list-basic
+  (lambda () (backward-up-list))
+  (or "(1 1 (1 1) 1 (1 1) 1)")
+  ;;   abcdefghijklmnopqrstuv
+  i f a scan-error)
+
+(provide 'syntax-tests)
+;;; syntax-tests.el ends here
diff --git a/test/automated/tildify-tests.el b/test/automated/tildify-tests.el
new file mode 100644 (file)
index 0000000..53c2e62
--- /dev/null
@@ -0,0 +1,137 @@
+;;; tildify-test.el --- ERT tests for tildify.el
+
+;; Copyright (C) 2014 Free Software Foundation, Inc.
+
+;; Author:     Michal Nazarewicz <mina86@mina86.com>
+;; Version:    4.5
+;; Keywords:   text, TeX, SGML, wp
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; This package defines regression tests for the tildify package.
+
+;;; Code:
+
+(require 'ert)
+(require 'tildify)
+
+(defun tildify-test--example-sentence (space)
+  "Return an example sentence with SPACE where hard space is required."
+  (concat "Lorem ipsum v" space "dolor sit amet, a" space
+          "consectetur adipiscing elit."))
+
+
+(defun tildify-test--example-html (sentence &optional with-nbsp is-xml)
+  "Return an example HTML code.
+SENTENCE is placed where spaces should not be replaced with hard spaces, and
+WITH-NBSP is placed where spaces should be replaced with hard spaces.  If the
+latter is missing, SENTENCE will be used in all placeholder positions.
+If IS-XML is non-nil, <pre> tag is not treated specially."
+  (let ((with-nbsp (or with-nbsp sentence)))
+    (concat "<p>" with-nbsp "</p>\n"
+            "<pre>" (if is-xml with-nbsp sentence) "</pre>\n"
+            "<! -- " sentence " -- >\n"
+            "<p>" with-nbsp "</p>\n"
+            "<" sentence ">\n")))
+
+
+(defun tildify-test--test (modes input expected)
+  "Test tildify running in MODES.
+INPUT is the initial content of the buffer and EXPECTED is expected result
+after `tildify-buffer' is run."
+  (with-temp-buffer
+    (dolist (mode modes)
+      (erase-buffer)
+      (funcall mode)
+      (let ((header (concat "Testing `tildify-buffer' in "
+                            (symbol-name mode) "\n")))
+        (insert header input)
+        (tildify-buffer t)
+        (should (string-equal (concat header expected) (buffer-string))))
+      (erase-buffer)
+      (let ((header (concat "Testing `tildify-region' in "
+                            (symbol-name mode) "\n")))
+        (insert header input)
+        (tildify-region (point-min) (point-max) t)
+        (should (string-equal (concat header expected) (buffer-string)))))))
+
+(ert-deftest tildify-test-html ()
+  "Tests tildification in an HTML document"
+  (let* ((sentence (tildify-test--example-sentence " "))
+         (with-nbsp (tildify-test--example-sentence "&nbsp;")))
+    (tildify-test--test '(html-mode sgml-mode)
+                        (tildify-test--example-html sentence sentence)
+                        (tildify-test--example-html sentence with-nbsp))))
+
+(ert-deftest tildify-test-xml ()
+  "Tests tildification in an XML document"
+  (let* ((sentence (tildify-test--example-sentence " "))
+         (with-nbsp (tildify-test--example-sentence "&#160;")))
+    (tildify-test--test '(nxml-mode)
+                        (tildify-test--example-html sentence sentence t)
+                        (tildify-test--example-html sentence with-nbsp t))))
+
+
+(defun tildify-test--example-tex (sentence &optional with-nbsp)
+  "Return an example (La)Tex code.
+SENTENCE is placed where spaces should not be replaced with hard spaces, and
+WITH-NBSP is placed where spaces should be replaced with hard spaces.  If the
+latter is missing, SENTENCE will be used in all placeholder positions."
+  (let ((with-nbsp (or with-nbsp sentence)))
+    (concat with-nbsp "\n"
+            "\\begin{verbatim}\n" sentence "\n\\end{verbatim}\n"
+            "\\verb#" sentence "#\n"
+            "$$" sentence "$$\n"
+            "$" sentence "$\n"
+            "\\[" sentence "\\]\n"
+            "\\v A % " sentence "\n"
+            with-nbsp "\n")))
+
+(ert-deftest tildify-test-tex ()
+  "Tests tildification in a (La)TeX document"
+  (let* ((sentence (tildify-test--example-sentence " "))
+         (with-nbsp (tildify-test--example-sentence "~")))
+    (tildify-test--test '(tex-mode latex-mode plain-tex-mode)
+                        (tildify-test--example-tex sentence sentence)
+                        (tildify-test--example-tex sentence with-nbsp))))
+
+
+(ert-deftest tildify-test-find-env-end-re-bug ()
+    "Tests generation of end-regex using mix of indexes and strings"
+  (with-temp-buffer
+    (insert "foo whatever end-foo")
+    (goto-char (point-min))
+    (should (string-equal "end-foo"
+                          (tildify-find-env "foo\\|bar"
+                                            '(("foo\\|bar" . ("end-" 0))))))))
+
+
+(ert-deftest tildify-test-find-env-group-index-bug ()
+    "Tests generation of match-string indexes"
+  (with-temp-buffer
+    (let ((pairs '(("start-\\(foo\\|bar\\)" . ("end-" 1))
+                   ("open-\\(foo\\|bar\\)" . ("close-" 1))))
+          (beg-re "start-\\(foo\\|bar\\)\\|open-\\(foo\\|bar\\)"))
+      (insert "open-foo whatever close-foo")
+      (goto-char (point-min))
+      (should (string-equal "close-foo" (tildify-find-env beg-re pairs))))))
+
+
+(provide 'tildify-tests)
+
+;;; tildify-tests.el ends here
index bc95df5e773688278fae269ab1b51aa7d85c468f..f8e8414f8d72ca7b358849ee8e3be2ff01714d5d 100644 (file)
@@ -34,5 +34,9 @@
     (sit-for 0 t)
     (should timer-ran)))
 
-;;; timer-tests.el ends here
+(ert-deftest timer-tests-debug-timer-check ()
+  ;; This function exists only if --enable-checking.
+  (if (fboundp 'debug-timer-check)
+      (should (debug-timer-check)) t))
 
+;;; timer-tests.el ends here
index 2640ee9cef5b287240aa6e533eeb14abd8484c8c..864a43d638f9bb3bf45f7acf310014681ed3525c 100644 (file)
@@ -47,6 +47,7 @@
 (declare-function tramp-find-executable "tramp-sh")
 (declare-function tramp-get-remote-path "tramp-sh")
 (defvar tramp-copy-size-limit)
+(defvar tramp-remote-process-environment)
 
 ;; There is no default value on w32 systems, which could work out of the box.
 (defconst tramp-test-temporary-file-directory
@@ -92,9 +93,10 @@ being the result.")
 
   (when (cdr tramp--test-enabled-checked)
     ;; Cleanup connection.
-    (tramp-cleanup-connection
-     (tramp-dissect-file-name tramp-test-temporary-file-directory)
-     nil 'keep-password))
+    (ignore-errors
+      (tramp-cleanup-connection
+       (tramp-dissect-file-name tramp-test-temporary-file-directory)
+       nil 'keep-password)))
 
   ;; Return result.
   (cdr tramp--test-enabled-checked))
@@ -108,27 +110,21 @@ being the result.")
 (defmacro tramp--instrument-test-case (verbose &rest body)
   "Run BODY with `tramp-verbose' equal VERBOSE.
 Print the the content of the Tramp debug buffer, if BODY does not
-eval properly in `should', `should-not' or `should-error'."
+eval properly in `should', `should-not' or `should-error'.  BODY
+shall not contain a timeout."
   (declare (indent 1) (debug (natnump body)))
   `(let ((tramp-verbose ,verbose)
         (tramp-message-show-message t)
         (tramp-debug-on-error t))
-     (condition-case err
-        ;; In general, we cannot use a timeout here: this would
-        ;; prevent traces when the test runs into an error.
-;       (with-timeout (10 (ert-fail "`tramp--instrument-test-case' timed out"))
-        (progn
-          ,@body)
-       (ert-test-skipped
-       (signal (car err) (cdr err)))
-       ((error quit)
-       (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
-         (with-current-buffer (tramp-get-connection-buffer v)
-           (message "%s" (buffer-string)))
-         (with-current-buffer (tramp-get-debug-buffer v)
-           (message "%s" (buffer-string))))
-       (message "%s" err)
-       (signal (car err) (cdr err))))))
+     (unwind-protect
+        (progn ,@body)
+       (when (> tramp-verbose 3)
+        (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
+          (with-current-buffer (tramp-get-connection-buffer v)
+            (message "%s" (buffer-string)))
+          (with-current-buffer
+              (tramp-get-debug-buffer v)
+            (message "%s" (buffer-string))))))))
 
 (ert-deftest tramp-test00-availability ()
   "Test availability of Tramp functions."
@@ -867,6 +863,11 @@ This tests also `file-directory-p' and `file-accessible-directory-p'."
 (ert-deftest tramp-test15-copy-directory ()
   "Check `copy-directory'."
   (skip-unless (tramp--test-enabled))
+  (skip-unless
+   (not
+    (eq
+     (tramp-find-foreign-file-name-handler tramp-test-temporary-file-directory)
+     'tramp-smb-file-name-handler)))
 
   (let* ((tmp-name1 (tramp--test-make-temp-name))
         (tmp-name2 (tramp--test-make-temp-name))
@@ -1073,9 +1074,14 @@ This tests also `file-executable-p', `file-writable-p' and `set-file-modes'."
 This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
   (skip-unless (tramp--test-enabled))
 
-  (let ((tmp-name1 (tramp--test-make-temp-name))
-       (tmp-name2 (tramp--test-make-temp-name))
-       (tmp-name3 (tramp--test-make-temp-name 'local)))
+  ;; We must use `file-truename' for the temporary directory, because
+  ;; it could be located on a symlinked directory.  This would let the
+  ;; test fail.
+  (let* ((tramp-test-temporary-file-directory
+         (file-truename tramp-test-temporary-file-directory))
+        (tmp-name1 (tramp--test-make-temp-name))
+        (tmp-name2 (tramp--test-make-temp-name))
+        (tmp-name3 (tramp--test-make-temp-name 'local)))
     (unwind-protect
        (progn
          (write-region "foo" nil tmp-name1)
@@ -1237,9 +1243,10 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
      (tramp-find-foreign-file-name-handler tramp-test-temporary-file-directory)
      '(tramp-gvfs-file-name-handler tramp-smb-file-name-handler))))
 
-  (let ((tmp-name (tramp--test-make-temp-name))
-       (default-directory tramp-test-temporary-file-directory)
-       kill-buffer-query-functions)
+  (let* ((tmp-name (tramp--test-make-temp-name))
+        (fnnd (file-name-nondirectory tmp-name))
+        (default-directory tramp-test-temporary-file-directory)
+        kill-buffer-query-functions)
     (unwind-protect
        (progn
          ;; We cannot use "/bin/true" and "/bin/false"; those paths
@@ -1250,17 +1257,25 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
          (with-temp-buffer
            (write-region "foo" nil tmp-name)
            (should (file-exists-p tmp-name))
-           (should
-            (zerop
-             (process-file "ls" nil t nil (file-name-nondirectory tmp-name))))
+           (should (zerop (process-file "ls" nil t nil fnnd)))
+           ;; `ls' could produce colorized output.
+           (goto-char (point-min))
+           (while (re-search-forward tramp-color-escape-sequence-regexp nil t)
+             (replace-match "" nil nil))
+           (should (string-equal (format "%s\n" fnnd) (buffer-string)))
+           (should-not (get-buffer-window (current-buffer) t))
+
+           ;; Second run. The output must be appended.
+           (should (zerop (process-file "ls" nil t t fnnd)))
            ;; `ls' could produce colorized output.
            (goto-char (point-min))
            (while (re-search-forward tramp-color-escape-sequence-regexp nil t)
              (replace-match "" nil nil))
            (should
-            (string-equal
-             (format "%s\n" (file-name-nondirectory tmp-name))
-             (buffer-string)))))
+            (string-equal (format "%s\n%s\n" fnnd fnnd) (buffer-string)))
+           ;; A non-nil DISPLAY must not raise the buffer.
+           (should-not (get-buffer-window (current-buffer) t))))
+
       (ignore-errors (delete-file tmp-name)))))
 
 (ert-deftest tramp-test27-start-file-process ()
@@ -1284,7 +1299,10 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
          (should (equal (process-status proc) 'run))
          (process-send-string proc "foo")
          (process-send-eof proc)
-         (accept-process-output proc 1)
+         ;; Read output.
+         (with-timeout (10 (ert-fail "`start-file-process' timed out"))
+           (while (< (- (point-max) (point-min)) (length "foo"))
+             (accept-process-output proc 1)))
          (should (string-equal (buffer-string) "foo")))
       (ignore-errors (delete-process proc)))
 
@@ -1297,22 +1315,30 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
                 "test2" (current-buffer)
                 "cat" (file-name-nondirectory tmp-name)))
          (should (processp proc))
-         (accept-process-output proc 1)
+         ;; Read output.
+         (with-timeout (10 (ert-fail "`start-file-process' timed out"))
+           (while (< (- (point-max) (point-min)) (length "foo"))
+             (accept-process-output proc 1)))
          (should (string-equal (buffer-string) "foo")))
       (ignore-errors
        (delete-process proc)
        (delete-file tmp-name)))
 
     (unwind-protect
-       (progn
-         (setq proc (start-file-process "test3" nil "cat"))
+       (with-temp-buffer
+         (setq proc (start-file-process "test3" (current-buffer) "cat"))
          (should (processp proc))
          (should (equal (process-status proc) 'run))
          (set-process-filter
-          proc (lambda (_p s) (should (string-equal s "foo"))))
+          proc
+          (lambda (p s) (with-current-buffer (process-buffer p) (insert s))))
          (process-send-string proc "foo")
          (process-send-eof proc)
-         (accept-process-output proc 1))
+         ;; Read output.
+         (with-timeout (10 (ert-fail "`start-file-process' timed out"))
+           (while (< (- (point-max) (point-min)) (length "foo"))
+             (accept-process-output proc 1)))
+         (should (string-equal (buffer-string) "foo")))
       (ignore-errors (delete-process proc)))))
 
 (ert-deftest tramp-test28-shell-command ()
@@ -1350,17 +1376,20 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
          (should (file-exists-p tmp-name))
           (async-shell-command
           (format "ls %s" (file-name-nondirectory tmp-name)) (current-buffer))
-         (accept-process-output (get-buffer-process (current-buffer)) 1)
+         (set-process-sentinel (get-buffer-process (current-buffer)) nil)
+         ;; Read output.
          (with-timeout (10 (ert-fail "`async-shell-command' timed out"))
-           (while
-               (ignore-errors
-                 (memq (process-status (get-buffer-process (current-buffer)))
-                       '(run open)))
+           (while (< (- (point-max) (point-min))
+                     (1+ (length (file-name-nondirectory tmp-name))))
              (accept-process-output (get-buffer-process (current-buffer)) 1)))
          ;; `ls' could produce colorized output.
          (goto-char (point-min))
          (while (re-search-forward tramp-color-escape-sequence-regexp nil t)
            (replace-match "" nil nil))
+         ;; There might be a nasty "Process *Async Shell* finished" message.
+         (goto-char (point-min))
+         (forward-line)
+         (narrow-to-region (point-min) (point))
          (should
           (string-equal
            (format "%s\n" (file-name-nondirectory tmp-name)) (buffer-string))))
@@ -1371,16 +1400,23 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
           (write-region "foo" nil tmp-name)
          (should (file-exists-p tmp-name))
          (async-shell-command "read line; ls $line" (current-buffer))
+         (set-process-sentinel (get-buffer-process (current-buffer)) nil)
          (process-send-string
           (get-buffer-process (current-buffer))
           (format "%s\n" (file-name-nondirectory tmp-name)))
-         (accept-process-output (get-buffer-process (current-buffer)) 1)
+         ;; Read output.
          (with-timeout (10 (ert-fail "`async-shell-command' timed out"))
-           (while
-               (ignore-errors
-                 (memq (process-status (get-buffer-process (current-buffer)))
-                       '(run open)))
+           (while (< (- (point-max) (point-min))
+                     (1+ (length (file-name-nondirectory tmp-name))))
              (accept-process-output (get-buffer-process (current-buffer)) 1)))
+         ;; `ls' could produce colorized output.
+         (goto-char (point-min))
+         (while (re-search-forward tramp-color-escape-sequence-regexp nil t)
+           (replace-match "" nil nil))
+         ;; There might be a nasty "Process *Async Shell* finished" message.
+         (goto-char (point-min))
+         (forward-line)
+         (narrow-to-region (point-min) (point))
          (should
           (string-equal
            (format "%s\n" (file-name-nondirectory tmp-name)) (buffer-string))))
@@ -1397,10 +1433,19 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
   (let* ((default-directory tramp-test-temporary-file-directory)
         (tmp-name1 (tramp--test-make-temp-name))
         (tmp-name2 (expand-file-name "foo" tmp-name1))
+        (tramp-remote-process-environment tramp-remote-process-environment)
         (vc-handled-backends
          (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
            (cond
             ((tramp-find-executable v vc-bzr-program (tramp-get-remote-path v))
+             (setq tramp-remote-process-environment
+                   (cons (format "BZR_HOME=%s"
+                                 (file-remote-p tmp-name1 'localname))
+                         tramp-remote-process-environment))
+             ;; We must force a reconnect, in order to activate $BZR_HOME.
+             (tramp-cleanup-connection
+              (tramp-dissect-file-name tramp-test-temporary-file-directory)
+              nil 'keep-password)
              '(Bzr))
             ((tramp-find-executable v vc-git-program (tramp-get-remote-path v))
              '(Git))
@@ -1455,13 +1500,34 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
              (should-not (file-exists-p file1))
              (copy-file file2 tmp-name1)
              (should (file-exists-p file1))))
+
          ;; Check file names.
          (should (equal (directory-files
                          tmp-name1 nil directory-files-no-dot-files-regexp)
                         (sort (copy-sequence files) 'string-lessp)))
          (should (equal (directory-files
                          tmp-name2 nil directory-files-no-dot-files-regexp)
-                        (sort files 'string-lessp))))
+                        (sort (copy-sequence files) 'string-lessp)))
+
+         ;; `substitute-in-file-name' could return different values.
+         ;; For `adb', there could be strange file permissions
+         ;; preventing overwriting a file.  We don't care in this
+         ;; testcase.
+         (dolist (elt files)
+           (let ((file1
+                  (substitute-in-file-name (expand-file-name elt tmp-name1)))
+                 (file2
+                  (substitute-in-file-name (expand-file-name elt tmp-name2))))
+             (ignore-errors (write-region elt nil file1))
+             (should (file-exists-p file1))
+             (ignore-errors (write-region elt nil file2 nil 'nomessage))
+             (should (file-exists-p file2))))
+
+         (should (equal (directory-files
+                         tmp-name1 nil directory-files-no-dot-files-regexp)
+                        (directory-files
+                         tmp-name2 nil directory-files-no-dot-files-regexp))))
+
       (ignore-errors (delete-directory tmp-name1 'recursive))
       (ignore-errors (delete-directory tmp-name2 'recursive)))))
 
@@ -1469,6 +1535,13 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
 (ert-deftest tramp-test30-special-characters ()
   "Check special characters in file names."
   (skip-unless (tramp--test-enabled))
+  (skip-unless
+   (not
+    (memq
+     (tramp-find-foreign-file-name-handler tramp-test-temporary-file-directory)
+     '(tramp-adb-file-name-handler
+       tramp-gvfs-file-name-handler
+       tramp-smb-file-name-handler))))
 
   ;; Newlines, slashes and backslashes in file names are not supported.
   ;; So we don't test.
@@ -1481,11 +1554,13 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
    "?foo?bar?baz?"
    "*foo*bar*baz*"
    "'foo\"bar'baz\""
-   "#foo#bar#baz#"
+   "#foo~bar#baz~"
    "!foo|bar!baz|"
    ":foo;bar:baz;"
    "<foo>bar<baz>"
-   "(foo)bar(baz)"))
+   "(foo)bar(baz)"
+   "[foo]bar[baz]"
+   "{foo}bar{baz}"))
 
 (ert-deftest tramp-test31-utf8 ()
   "Check UTF8 encoding in file names and file contents."
@@ -1657,8 +1732,13 @@ Since it unloads Tramp, it shall be the last test to run."
 ;; * set-file-acl
 ;; * set-file-selinux-context
 
-;; * Fix `tramp-test27-start-file-process' on MS Windows (`process-send-eof'?).
+;; * Work on skipped tests.  Make a comment, when it is impossible.
+;; * Fix `tramp-test15-copy-directory' for `smb'.  Using tar in a pipe
+;;   doesn't work well when an interactive password must be provided.
+;; * Fix `tramp-test27-start-file-process' for `nc' and on MS
+;;   Windows (`process-send-eof'?).
 ;; * Fix `tramp-test28-shell-command' on MS Windows (nasty plink message).
+;; * Fix `tramp-test30-special-characters' for `adb', `nc' and `smb'.
 ;; * Fix `tramp-test31-utf8' for MS Windows and `nc'/`telnet' (when
 ;;   target is a dumb busybox).  Seems to be in `directory-files'.
 ;; * Fix Bug#16928.  Set expected error of `tramp-test32-asynchronous-requests'.
index 6ecac36b6b3544f3777019b0c5a6affed08e578f..178eaf194d88ca2f3567a04a0c8aa87eb0a14ab7 100644 (file)
             (should-not (buffer-modified-p))))
       (delete-file tempfile))))
 
-(ert-deftest undo-test-in-region-not-most-recent ()
+(ert-deftest undo-test-region-not-most-recent ()
   "Test undo in region of an edit not the most recent."
   (with-temp-buffer
     (buffer-enable-undo)
     (should (string= (buffer-string)
                      "11131"))))
 
-(ert-deftest undo-test-in-region-eob ()
+(ert-deftest undo-test-region-deletion ()
+  "Test undoing a deletion to demonstrate bug 17235."
+  (with-temp-buffer
+    (buffer-enable-undo)
+    (transient-mark-mode 1)
+    (insert "12345")
+    (search-backward "4")
+    (undo-boundary)
+    (delete-forward-char 1)
+    (search-backward "1")
+    (undo-boundary)
+    (insert "xxxx")
+    (undo-boundary)
+    (insert "yy")
+    (search-forward "35")
+    (undo-boundary)
+    ;; Select "35"
+    (push-mark (point) t t)
+    (setq mark-active t)
+    (forward-char -2)
+    (undo) ; Expect "4" to come back
+    (should (string= (buffer-string)
+                     "xxxxyy12345"))))
+
+(ert-deftest undo-test-region-example ()
+  "The same example test case described in comments for
+undo-make-selective-list."
+  ;; buf pos:
+  ;; 123456789 buffer-undo-list  undo-deltas
+  ;; --------- ----------------  -----------
+  ;; aaa       (1 . 4)           (1 . -3)
+  ;; aaba      (3 . 4)           N/A (in region)
+  ;; ccaaba    (1 . 3)           (1 . -2)
+  ;; ccaabaddd (7 . 10)          (7 . -3)
+  ;; ccaabdd   ("ad" . 6)        (6 . 2)
+  ;; ccaabaddd (6 . 8)           (6 . -2)
+  ;;  |   |<-- region: "caab", from 2 to 6
+  (with-temp-buffer
+    (buffer-enable-undo)
+    (transient-mark-mode 1)
+    (insert "aaa")
+    (goto-char 3)
+    (undo-boundary)
+    (insert "b")
+    (goto-char 1)
+    (undo-boundary)
+    (insert "cc")
+    (goto-char 7)
+    (undo-boundary)
+    (insert "ddd")
+    (search-backward "ad")
+    (undo-boundary)
+    (delete-forward-char 2)
+    (undo-boundary)
+    ;; Select "dd"
+    (push-mark (point) t t)
+    (setq mark-active t)
+    (goto-char (point-max))
+    (undo)
+    (undo-boundary)
+    (should (string= (buffer-string)
+                     "ccaabaddd"))
+    ;; Select "caab"
+    (push-mark 2 t t)
+    (setq mark-active t)
+    (goto-char 6)
+    (undo)
+    (undo-boundary)
+    (should (string= (buffer-string)
+                     "ccaaaddd"))))
+
+(ert-deftest undo-test-region-eob ()
   "Test undo in region of a deletion at EOB, demonstrating bug 16411."
   (with-temp-buffer
     (buffer-enable-undo)
index e5bae8505897134a631974b822658c557ee706a2..a7041462f7f3309f2fd1843d088073448af8e3db 100644 (file)
@@ -14,7 +14,15 @@ function res = tcomp (fn)
   y = 'hello';
   z = y';
 
+  ## Bug#14399.
+  vec = [...
+          one;...
+          two;...
+          three];
+
   cnty = repmat(x(:,1)(:), 10, 1);
+  x = ...
+  12
 
   pop = x(:,1:10)(:);
     ## Here and below, we test if the indentation aligns with a previous
@@ -1974,7 +1982,7 @@ function [out1, out2] = installed_packages (local_list, global_list)
   endif
 
   h1 = postpad (h1, max_name_length + 1, " ");
-  h2 = postpad (h2, max_version_length, " ");;
+  h2 = postpad (h2, max_version_length, " ");
 
   ## Print a header.
   header = sprintf("%s | %s | %s\n", h1, h2, h3);
index aca478a1375285bd7acaa1db2c07c1553330dce3..00ef312f735fefbf0b71a17fec4499a35b0cec8f 100755 (executable)
@@ -1,6 +1,10 @@
 #!/usr/bin/perl
 # -*- eval: (bug-reference-mode 1) -*-
 
+sub add_funds($) {
+    return 0;
+}
+
 use v5.14;
 
 my $str= <<END;
@@ -14,12 +18,23 @@ my $b=3;
 print $str;
 if ($c && /====/){xyz;}
 
-print << "EOF1" . s/he"llo/th'ere/;
+print "a" . <<EOF . s/he"llo/th'ere/;
+It's a surprise!
+EOF
+
+print <<\EOF1 . s/he"llo/th'ere/;
 foo
 EOF2
 bar
 EOF1
 
+$config = {
+    b  =>
+        [
+         "123",
+        ],
+    c => "123",
+};
 
 print <<"EOF1" . <<\EOF2 . s/he"llo/th'ere/;
 foo
diff --git a/test/indent/ps-mode.ps b/test/indent/ps-mode.ps
new file mode 100644 (file)
index 0000000..4b4ee0f
--- /dev/null
@@ -0,0 +1,14 @@
+%!PS-2.0
+
+<< 23 45 >>                     %dictionary
+< 23 >                          %hex string
+<~a>a%a~>                       %base85 string
+(%)s
+(sf\(g>a)sdg)
+
+/foo {
+    <<
+       hello 2
+       3
+    >>
+} def
index 7e7787989965ee5191562ead8960d89aef26ce05..82cc63f916839a82f3a91f57100f0177b94f3f82 100644 (file)
@@ -6,6 +6,10 @@ if something_wrong?             # ruby-move-to-block-skips-heredoc
   foo
 end
 
+def foo
+  %^bar^
+end
+
 # Percent literals.
 b = %Q{This is a "string"}
 c = %w!foo
old mode 100755 (executable)
new mode 100644 (file)